@hackler/react-sdk 11.32.0 → 11.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/lib/index.umd.js +1 -1
- package/package.json +2 -2
package/lib/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hackleReactSDK={})}(this,function(n){"use strict";var D,L=new Uint8Array(16);var F=/^(?:[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;for(var V=[],j=0;j<256;++j)V.push((j+256).toString(16).substr(1));function z(e,t){var t=1<arguments.length&&void 0!==t?t:0,e=(V[e[t+0]]+V[e[t+1]]+V[e[t+2]]+V[e[t+3]]+"-"+V[e[t+4]]+V[e[t+5]]+"-"+V[e[t+6]]+V[e[t+7]]+"-"+V[e[t+8]]+V[e[t+9]]+"-"+V[e[t+10]]+V[e[t+11]]+V[e[t+12]]+V[e[t+13]]+V[e[t+14]]+V[e[t+15]]).toLowerCase();if("string"==typeof(t=e)&&F.test(t))return e;throw TypeError("Stringified UUID is invalid")}function H(e,t,r){var n=(e=e||{}).random||(e.rng||function(){if(D=D||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return D(L);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")})();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 z(n)}var B="3.7.5",e="function"==typeof atob,t="function"==typeof btoa,r="function"==typeof Buffer;const G="function"==typeof TextDecoder?new TextDecoder:void 0,K="function"==typeof TextEncoder?new TextEncoder:void 0;const J=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Y=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(J),q=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,$=String.fromCharCode.bind(String),X="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),W=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Z=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var i=t=>{let r,n,i,o,s="";var e=t.length%3;for(let e=0;e<t.length;){if(255<(n=t.charCodeAt(e++))||255<(i=t.charCodeAt(e++))||255<(o=t.charCodeAt(e++)))throw new TypeError("invalid character found");r=n<<16|i<<8|o,s+=J[r>>18&63]+J[r>>12&63]+J[r>>6&63]+J[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const Q=t?e=>btoa(e):r?e=>Buffer.from(e,"binary").toString("base64"):i,ee=r?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push($.apply(null,r.subarray(e,e+4096)));return Q(n.join(""))},te=(e,t=!1)=>t?W(ee(e)):ee(e),re=e=>{var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?$(192|t>>>6)+$(128|63&t):$(224|t>>>12&15)+$(128|t>>>6&63)+$(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),$(240|t>>>18&7)+$(128|t>>>12&63)+$(128|t>>>6&63)+$(128|63&t))},ne=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ie=e=>e.replace(ne,re),oe=r?e=>Buffer.from(e,"utf8").toString("base64"):K?e=>ee(K.encode(e)):e=>Q(ie(e)),se=(e,t=!1)=>t?W(oe(e)):oe(e);t=e=>se(e,!0);const ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return $(55296+(t>>>10))+$(56320+(1023&t));case 3:return $((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return $((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ce=e=>e.replace(ae,ue);var o=t=>{if(t=t.replace(/\s+/g,""),!q.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r,n="",i,o;for(let e=0;e<t.length;)r=Y[t.charAt(e++)]<<18|Y[t.charAt(e++)]<<12|(i=Y[t.charAt(e++)])<<6|(o=Y[t.charAt(e++)]),n+=64===i?$(r>>16&255):64===o?$(r>>16&255,r>>8&255):$(r>>16&255,r>>8&255,255&r);return n};const le=e?e=>atob(Z(e)):r?e=>Buffer.from(e,"base64").toString("binary"):o,pe=r?e=>X(Buffer.from(e,"base64")):e=>X(le(e).split("").map(e=>e.charCodeAt(0))),fe=e=>pe(de(e)),he=r?e=>Buffer.from(e,"base64").toString("utf8"):G?e=>G.decode(pe(e)):e=>ce(le(e)),de=e=>Z(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ve=e=>he(de(e));function ye(){var e=(e,t)=>Object.defineProperty(String.prototype,e,ge(t));e("fromBase64",function(){return ve(this)}),e("toBase64",function(e){return se(this,e)}),e("toBase64URI",function(){return se(this,!0)}),e("toBase64URL",function(){return se(this,!0)}),e("toUint8Array",function(){return fe(this)})}function me(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,ge(t));e("toBase64",function(e){return te(this,e)}),e("toBase64URI",function(){return te(this,!0)}),e("toBase64URL",function(){return te(this,!0)})}const ge=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const Ee={version:B,VERSION:"3.7.5",atob:le,atobPolyfill:o,btoa:Q,btoaPolyfill:i,fromBase64:ve,toBase64:se,encode:se,encodeURI:t,encodeURL:t,utob:ie,btou:ce,decode:ve,isValid:e=>{if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:te,toUint8Array:fe,extendString:ye,extendUint8Array:me,extendBuiltins:()=>{ye(),me()}};we.isNotNullOrUndefined=function(e){return null!=e},we.isNullOrUndefined=function(e){return null==e},we.requiredNotNullOrUndefined=function(e,t){if(void 0===t&&(t=function(){return"Required value is null or undefined"}),this.isNullOrUndefined(e))throw new Error(t());return e},we.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var a=we;function we(){}be.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);a.isNotNullOrUndefined(o)&&r.push(o)}return r},be.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r},be.associateTo=function(e,t,r){for(var n=0,i=e;n<i.length;n++){var o=r(i[n]);t.set(o[0],o[1])}return t},be.associate=function(e,t){return this.associateTo(e,new Map,t)},be.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},be.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r};var p=be;function be(){}var Te={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(_e.setLogLevel=function(e){this.logLevel=e=void 0===e?Te.INFO:e},_e.initCounter=function(t){this.counters=p.associate(Object.keys(Te),function(e){return[e,t(e)]})},_e._log=function(e,t){var r;switch(e){case"WARN":r="orange";break;case"ERROR":r="red";break;default:r="#AAAAAA"}if(t instanceof Error)Ie.log(e,r,t.message,t);else try{Ie.log(e,r,t)}catch(e){}},_e.increment=function(e){var t;null!=(t=null==(t=_e.counters)?void 0:t.get(e))&&t.increment()},_e.logLevel=Te.INFO,_e.log={error:function(e){Te.ERROR<=_e.logLevel&&(_e._log("ERROR",e),_e.increment("ERROR"))},warn:function(e){Te.WARN<=_e.logLevel&&(_e._log("WARN",e),_e.increment("WARN"))},info:function(e){Te.INFO<=_e.logLevel&&(_e._log("INFO",e),_e.increment("INFO"))},debug:function(e){Te.DEBUG<=_e.logLevel&&(_e._log("DEBUG",e),_e.increment("DEBUG"))}},_e);function _e(){}Ae.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Ie=Ae;function Ae(){}var Oe=function(e,t){return(Oe=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)};function Ne(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Oe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function l(n,i){var o,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Re(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var Se=s.log,xe=(Ce.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},Ce.isEquals=function(t,r){if(null==r)return!1;var e=Object.keys(t);return e.length===Object.keys(r).length&&e.every(function(e){return t[e]===r[e]})},Ce.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],i=i[1];this.isValidType(o)?(i=this.sanitizeValue(i),a.isNullOrUndefined(i)?Se.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Se.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},Ce.isValidType=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},Ce.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},Ce.MAX_IDENTIFIER_TYPE_LENGTH=128,Ce.MAX_IDENTIFIER_VALUE_LENGTH=512,Ce);function Ce(){}var Me=s.log,ke=(Pe.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i,o=n[r],s=o[0],o=o[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){Me.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),a.isNullOrUndefined(i)?Me.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):Me.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},Pe.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},Pe.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},Pe.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},Pe.isValidValue=function(e){return!a.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))},Pe.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},Pe.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},Pe.SYSTEM_PROPERTY_KEY_PREFIX="$",Pe.MAX_PROPERTIES_COUNT=128,Pe.MAX_PROPERTY_KEY_LENGTH=128,Pe.MAX_PROPERTY_VALUE_LENGTH=1024,Pe);function Pe(){}var Ue=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],De=(f.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C0);case"seconds":return e/(f.C3/f.C0);case"minutes":return e/(f.C4/f.C0);case"hours":return e/(f.C5/f.C0);case"days":return e/(f.C6/f.C0)}},f.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C1);case"microseconds":return e;case"seconds":return e/(f.C3/f.C1);case"minutes":return e/(f.C4/f.C1);case"hours":return e/(f.C5/f.C1);case"days":return e/(f.C6/f.C1)}},f.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C2/f.C0);case"microseconds":return e*(f.C2/f.C1);case"milliseconds":return e;case"seconds":return e/(f.C3/f.C2);case"minutes":return e/(f.C4/f.C2);case"hours":return e/(f.C5/f.C2);case"days":return e/(f.C6/f.C2)}},f.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C3/f.C0);case"microseconds":return e*(f.C3/f.C1);case"milliseconds":return e*(f.C3/f.C2);case"seconds":return e;case"minutes":return e/(f.C4/f.C3);case"hours":return e/(f.C5/f.C3);case"days":return e/(f.C6/f.C3)}},f.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C4/f.C0);case"microseconds":return e*(f.C4/f.C1);case"milliseconds":return e*(f.C4/f.C2);case"seconds":return e*(f.C4/f.C3);case"minutes":return e;case"hours":return e/(f.C5/f.C4);case"days":return e/(f.C6/f.C4)}},f.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C5/f.C0);case"microseconds":return e*(f.C5/f.C1);case"milliseconds":return e*(f.C5/f.C2);case"seconds":return e*(f.C5/f.C3);case"minutes":return e*(f.C5/f.C4);case"hours":return e;case"days":return e/(f.C6/f.C5)}},f.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C6/f.C0);case"microseconds":return e*(f.C6/f.C1);case"milliseconds":return e*(f.C6/f.C2);case"seconds":return e*(f.C6/f.C3);case"minutes":return e*(f.C6/f.C4);case"hours":return e*(f.C6/f.C5);case"days":return e}},f.C6=24*(f.C5=60*(f.C4=60*(f.C3=1e3*(f.C2=1e3*(f.C1=1e3*(f.C0=1)))))),f.converter={nanoseconds:f.nanosToUnit,microseconds:f.microsToUnit,milliseconds:f.millisToUnit,seconds:f.secondsToUnit,minutes:f.minutesToUnit,hours:f.hoursToUnit,days:f.daysToUnit},f);function f(){}Fe.prototype.tick=function(){return 1e3*Date.now()},Fe.prototype.currentMillis=function(){return Date.now()},Fe.instance=new Fe;var Le=Fe;function Fe(){}je.prototype.get=function(e,t){return t};var Ve=je;function je(){}He.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var ze=He;function He(e){this.parameters=e}var Be=s.log;function Ge(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||Be.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function Ke(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=Ge(e,i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r}}Ye.of=function(e,t){return new Ye(e,t)};var Je=Ye;function Ye(e,t){this.value=e,this.reason=t}$e.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},$e.of=function(e,t,r,n){return new $e(t,r,e,n=void 0===n?{}:n)};var qe=$e;function $e(e,t,r,n){this.inAppMessage=e,this.message=t,this.reason=r,this.properties=n}We.of=function(e,t,r,n){return new We(e,t,r=void 0===r?new Ve:r,n=void 0===n?void 0:n)},We.prototype.get=function(e,t){return this.config.get(e,t)};var Xe=We;function We(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}Qe.on=function(e,t,r){return new Qe(!0,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},Qe.off=function(e,t,r){return new Qe(!1,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},Qe.prototype.get=function(e,t){return this.config.get(e,t)};var Ze=Qe;function Qe(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}tt.prototype.get=function(e,t){return t};var et=tt;function tt(){}nt.fromJson=function(e){return new nt(e.id,new ze(p.associate(e.parameters,function(e){return[e.key,e.value]})))},nt.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var rt=nt;function nt(e,t){this.id=e,this.config=t}d.SDK_NOT_READY="SDK_NOT_READY",d.EXCEPTION="EXCEPTION",d.INVALID_INPUT="INVALID_INPUT",d.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",d.TYPE_MISMATCH="TYPE_MISMATCH",d.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",d.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",d.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",d.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",d.OVERRIDDEN="OVERRIDDEN",d.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",d.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",d.VARIATION_DROPPED="VARIATION_DROPPED",d.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",d.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",d.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",d.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",d.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",d.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",d.TARGET_RULE_MATCH="TARGET_RULE_MATCH",d.DEFAULT_RULE="DEFAULT_RULE",d.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",d.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",d.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",d.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",d.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",d.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",d.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",d.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET";var h=d;function d(){}var it=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],ot=(st.fromJson=function(e,t){var r=st.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new at(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),i=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),o=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return xt.fromJson(e,rr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return wt.fromJson(e,rr.PROPERTY)}),a=an.fromJson(t.execution.targetUrls),u=Ge(it,t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return xt.fromJson(e,rr.PROPERTY)}),l=Rt.fromJson(t.execution.defaultRule);return r&&u&&l&&new st(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,i,o,s,a,c,l,t.containerId,u,t.winnerVariationId)},st.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void Be.debug("Unsupported status [".concat(e,"]"))}},st.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},st.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},st.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},st);function st(e,t,r,n,i,o,s,a,u,c,l,p,f,h,d,v,y){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=v,this.winnerVariationId=y}var at=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},ut=(ct.fromJson=function(e){return new ct(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new lt(t,r,e)}))},ct);function ct(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}pt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var lt=pt;function pt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}ht.fromJson=function(e){return new ht(e.id,e.key)};var ft=ht;function ht(e,t){this.id=e,this.key=t}vt.ID="$id",vt.USER="$userId",vt.DEVICE="$deviceId",vt.SESSION="$sessionId",vt.HACKLE_DEVICE="$hackleDeviceId";var dt=vt;function vt(){}function yt(e){var t=new mt;return t.addIdentifiers(e.identifiers||{}),t.add(dt.ID,e.id),t.add(dt.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(dt.USER,e.userId),t.build()}gt.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},gt.prototype.add=function(e,t){var r=xe.sanitizeValue(t);return xe.isValidType(e)&&r?this.identifiers[e]=t:Be.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},gt.prototype.build=function(){return this.identifiers};var mt=gt;function gt(){this.identifiers={}}function Et(e){var t,r={};return r.id=null!=(t=xe.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=xe.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=xe.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=ke.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=xe.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}bt.fromJson=function(e,t){return new bt(p.mapNotNullOrUndefined(e.conditions,function(e){return Tt.fromJson(e,t)}))},bt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var wt=bt;function bt(e){this.conditions=e}_t.fromJson=function(e,t){var r=It.fromJson(e.key);if(r&&t.supports(r.type))return(t=Ot.fromJson(e.match))&&new _t(r,t)},_t.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Tt=_t;function _t(e,t){this.key=e,this.match=t}At.fromJson=function(e){var t=Ge(er,e.type);return t&&new At(t,e.name)},At.prototype.toJson=function(){return{type:this.type,name:this.name}};var It=At;function At(e,t){this.type=e,this.name=t}Nt.fromJson=function(e){var t=Ge(Xt,e.type),r=Ge(Zt,e.operator),n=Ge(Wt,e.valueType);return t&&r&&n&&new Nt(t,r,n,e.values)},Nt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var Ot=Nt;function Nt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}St.fromJson=function(e){var t=Ge(Qt,e.type);return t&&new St(t,e.variationId,e.bucketId)};var Rt=St;function St(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}Ct.fromJson=function(e,t){t=wt.fromJson(e.target,t),e=Rt.fromJson(e.action);return t&&e&&new Ct(t,e)};var xt=Ct;function Ct(e,t){this.target=e,this.action=t}kt.fromJson=function(e){var t=Ge(tr,e.type);return t&&new kt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.SEGMENT)}))};var Mt=kt;function kt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}Ut.fromJson=function(e){return new Ut(e.id,e.bucketId,e.groups.map(function(e){return Dt.fromJson(e)}))},Ut.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var Pt=Ut;function Ut(e,t,r){this.id=e,this.bucketId=t,this.groups=r}Lt.fromJson=function(e){return new Lt(e.id,e.experiments)};var Dt=Lt;function Lt(e,t){this.id=e,this.experiments=t}Vt.fromJson=function(e){var t=Ge(Wt,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return jt.fromJson(e,rr.PROPERTY)}),n=Ht.fromJson(e.defaultValue);return t&&new Vt(e.id,e.key,t,e.identifierType,r,n)};var Ft=Vt;function Vt(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}zt.fromJson=function(e,t){t=wt.fromJson(e.target,t);return t&&new zt(e.key,e.name,t,e.bucketId,Ht.fromJson(e.value))};var jt=zt;function zt(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}Bt.fromJson=function(e){return new Bt(e.id,e.value)};var Ht=Bt;function Bt(e,t){this.id=e,this.rawValue=t}Kt.tryParse=function(e){var t,r,n,i,e=Kt.regExp.exec(e);if(e)return e[0],t=e[1],r=e[2],r=void 0===r?"0":r,n=e[3],n=void 0===n?"0":n,i=e[4],e=e[5],new Kt(new Jt(parseInt(t,10),parseInt(r,10),parseInt(n,10)),qt.parse(i),qt.parse(e))},Kt.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Kt.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Kt.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Kt.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Kt.prototype.isLessThan=function(e){return this.compareTo(e)<0},Kt.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Kt.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-]+)*))?$/;var Gt=Kt;function Kt(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}Yt.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var Jt=Yt;function Yt(e,t,r){this.major=e,this.minor=t,this.patch=r}$t.parse=function(e){return e?new $t(e.split(".")):$t.EMPTY},$t.prototype.isEmpty=function(){return 0===this.identifiers.length},$t.prototype.isNotEmpty=function(){return!this.isEmpty()},$t.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},$t.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=$t.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},$t.compareIdentifiers=function(e,t){return $t.numericIdentifierRegExp.test(e)&&$t.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},$t.EMPTY=new $t([]),$t.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var qt=$t;function $t(e){this.identifiers=e}var Xt=["MATCH","NOT_MATCH"],Wt=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Zt=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Qt=["VARIATION","BUCKET"],er=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],tr=["USER_ID","USER_PROPERTY"],rr=(nr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},nr.IDENTIFIER=new nr("SEGMENT"),nr.PROPERTY=new nr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),nr.SEGMENT=new nr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),nr);function nr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var ir=["ACTIVE","DRAFT","PAUSE"],or=["WEB","ANDROID","IOS"],sr=["IMMEDIATE","CUSTOM"],ar=["MODAL","BANNER"],ur=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE"],cr=["VERTICAL","HORIZONTAL"],lr=["CLICK"],pr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],fr=["TOP","MIDDLE","BOTTOM"],hr=["LEFT","CENTER","RIGHT"],dr=(vr.fromJson=function(e){var t,r=Ge(ir,e.status);if(!a.isNullOrUndefined(r)){switch(Ge(sr,e.timeUnit)){case"IMMEDIATE":t=new yr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new gr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=kr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(br.fromJson),i=_r.fromJson(e.eventFrequencyCap),new vr(e.id,e.key,r,t,new wr(n,i),Sr.fromJson(e.targetContext),o)}},vr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},vr);function vr(e,t,r,n,i,o,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s}mr.prototype.within=function(e){return!0};var yr=mr;function mr(){this.type="IMMEDIATE"}Er.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var gr=Er;function Er(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var wr=function(e,t){this.rules=e,this.frequencyCap=t},br=(Tr.fromJson=function(e){return new Tr(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))},Tr);function Tr(e,t){this.eventKey=e,this.targets=t}Ir.fromJson=function(e){return e?new Ir(e.identifiers.map(Ar.fromJson),Nr.fromJson(e.duration)):null};var _r=Ir;function Ir(e,t){this.identifierCaps=e,this.durationCap=t}Or.fromJson=function(e){return new Or(e.identifierType,e.countPerIdentifier)};var Ar=Or;function Or(e,t){this.identifierType=e,this.count=t}Rr.fromJson=function(e){if(!e)return null;var t=Ge(Ue,e.durationUnit.timeUnit);return t?new Rr(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Nr=Rr;function Rr(e,t){this.durationMillis=e,this.count=t}xr.fromJson=function(e){return new xr(e.overrides.map(Cr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var Sr=xr;function xr(e,t){this.overrides=e,this.targets=t}Mr.fromJson=function(e){return new Mr(e.identifierType,e.identifiers)};var Cr=Mr;function Mr(e,t){this.identifierType=e,this.identifiers=t}Pr.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new Ur(e.exposure.key)),Ke(or,e.platformTypes));if(!a.isNullOrUndefined(r)){var n=Ke(cr,e.orientations);if(!a.isNullOrUndefined(n)){var i=p.mapOrUndefined(e.messages,Dr.fromJson);if(!a.isNullOrUndefined(i))return new Pr(e.defaultLang,t,r,n,i)}}};var kr=Pr;function Pr(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var Ur=function(e){this.key=e},Dr=(Lr.fromJson=function(e){var t=Fr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,Hr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,$r.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=$r.fromJson2(e.closeButton),!a.isNullOrUndefined(i))){var o=p.mapOrUndefined(e.outerButtons,Wr.fromJson);if(!a.isNullOrUndefined(o))return new Lr(e.variationKey,e.lang,t,r,e.text?Gr.fromJson(e.text):void 0,n,i,new en(e.background.color),e.action?tn.fromJson(e.action):void 0,o)}}}}},Lr.prototype.toJson=function(){var e;return{variationKey:this.variationKey,lang:this.lang,layout:{layoutType:this.layout.layoutType,alignment:null!=(e=null==(e=this.layout.alignment)?void 0:e.toJson())?e:null,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),text:null!=(e=null==(e=this.text)?void 0:e.toJson())?e:null,closeButton:null!=(e=null==(e=this.closeButton)?void 0:e.toCloseButtonJson())?e:null,buttons:this.buttons.map(function(e){return e.toJson()}),background:{color:this.background.color},action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null,outerButtons:this.outerButtons.map(function(e){return e.toJson()})}},Lr);function Lr(e,t,r,n,i,o,s,a,u,c){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.text=i,this.buttons=o,this.closeButton=s,this.background=a,this.action=u,this.outerButtons=c}Vr.fromJson=function(e){var t=Ge(ur,e.layoutType),r=Ge(ar,e.displayType);if(!a.isNullOrUndefined(r)&&!a.isNullOrUndefined(t))return new Vr(r,t,e.alignment?jr.fromJson(e.alignment):void 0)};var Fr=Vr;function Vr(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}zr.fromJson=function(e){var t=Ge(hr,e.horizontal);if(!a.isNullOrUndefined(t)){e=Ge(fr,e.vertical);if(!a.isNullOrUndefined(e))return new zr(t,e)}},zr.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var jr=zr;function zr(e,t){this.horizontal=e,this.vertical=t}Br.fromJson=function(e){var t=Ge(cr,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=tn.fromJson(e.action),!a.isNullOrUndefined(r)))return new Br(t,e.imagePath,r)}},Br.prototype.toJson=function(){var e;return{orientation:this.orientation,imagePath:this.imagePath,action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null}};var Hr=Br;function Br(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}Kr.fromJson=function(e){return new Kr(Jr.fromJson(e.title),Jr.fromJson(e.body))},Kr.prototype.toJson=function(){return{title:{text:this.title.text,style:{textColor:this.title.style.color}},body:{text:this.body.text,style:{textColor:this.body.style.color}}}};var Gr=Kr;function Kr(e,t){this.title=e,this.body=t}Yr.fromJson=function(e){return new Yr(e.text,new qr(e.style.textColor))};var Jr=Yr;function Yr(e,t){this.text=e,this.style=t}var qr=function(e){this.color=e},$r=(Xr.fromJson=function(e){var t=tn.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Xr(e.text,new Qr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Xr.fromJson2=function(e){var t=tn.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Xr("✕",new Qr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Xr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},Xr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Xr);function Xr(e,t,r){this.text=e,this.style=t,this.action=r}Zr.fromJson=function(e){var t=$r.fromJson(e.button);if(!a.isNullOrUndefined(t)){e=jr.fromJson(e.alignment);if(!a.isNullOrUndefined(e))return new Zr(t,e)}},Zr.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}};var Wr=Zr;function Zr(e,t){this.button=e,this.alignment=t}var Qr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},en=function(e){this.color=e},tn=(rn.fromJson=function(e){var t=Ge(lr,e.behavior);if(!a.isNullOrUndefined(t)){var r=Ge(pr,e.type);if(!a.isNullOrUndefined(r))return new rn(t,r,null!=(t=e.value)?t:void 0)}},rn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},rn);function rn(e,t,r){this.behavior=e,this.type=t,this.value=r}var nn=function(e){this.id=e},on=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",sn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new sn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},sn);function sn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}un.fromJson=function(e){if(null!==e)return new un(p.mapNotNullOrUndefined(e.match,function(e){return wt.fromJson(e,rr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var an=un;function un(e,t){this.includeTargets=e,this.excludeTargets=t}var cn="X-HACKLE-SDK-KEY",ln="X-HACKLE-SDK-NAME",pn="X-HACKLE-SDK-VERSION",fn="X-HACKLE-SDK-TIME",hn=100,dn=6e4,vn=500,yn=3650,mn="_hackle_hid",gn="_hackle_id",En="hackle-repository-storage",wn="_hackle_session_id",bn="_hackle_last_event_ts",Tn="_hackle_uid",_n="_hackle_did",In="_hackle_mkt",An="hackle-manual-override_ab",On="hackle-manual-override_ff",Nn="hackle-iam-hide",Rn="hackle-iam-impression",Sn="hackle-split-url-redirected",xn=1/86400*3,Cn="hackle-workspace-config",Mn=6e4,kn=(Pn.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},Pn.prototype.tag=function(e,t){return this._tags[e]=t,this},Pn.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},Pn);function Pn(e){this.name=e,this._tags={},this.name=e}Dn.start=function(e){return new Dn(e=void 0===e?Dn.defaultClock:e)},Dn.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Dn.defaultClock=new Le;var Un=Dn;function Dn(e){this._clock=e,this.startTime=this._clock.tick()}Fn.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},Fn.prototype.tag=function(e,t){return this._tags[e]=t,this},Fn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Ln=Fn;function Fn(e){this.name=e,this._tags={}}jn.prototype.values=function(){return Array.from(this.data.values())},jn.prototype.keys=function(){return Array.from(this.data.keys())},jn.prototype.get=function(t){var r=this,e=this.keys().find(function(e){return r.compareFn(e,t)});return e?this.data.get(e):void 0},jn.prototype.has=function(e){return void 0!==this.get(e)},jn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},jn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},jn.prototype.forEach=function(e){this.data.forEach(e)},jn.prototype.filter=function(e){for(var t=new jn(this.compareFn),r=0,n=this.entries();r<n.length;r++){var i=n[r];e(i[0],i[1])&&t.add(i[0],i[1])}return t},jn.prototype.entries=function(){return Array.from(this.data.entries())};var Vn=jn;function jn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(Hn.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var zn=Hn;function Hn(e,t){this.valueSupplier=t,this.field=e}function Bn(e,t){return e.name===t.name&&xe.isEquals(e.tags,t.tags)}Object.defineProperty(Gn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Gn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Gn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Gn.prototype.counter=function(e,t){return void 0===t&&(t={}),new Ln(e).tags(t).register(this)},Gn.prototype.timer=function(e,t){return void 0===t&&(t={}),new kn(e).tags(t).register(this)},Gn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Gn.prototype.getOrCreateMetric=function(e,t){var r,n=this._metrics.get(e);return n?r=n:(r=t(e),this._metrics.add(e,r)),r},Gn.prototype.close=function(){};e=Gn;function Gn(){this.id=H(),this.name="MetricRegistry",this._metrics=new Vn(Bn)}Ne(Jn,Kn=e),Jn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),s.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Jn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},Jn.prototype.close=function(){this.stop()};var Kn,r=Jn;function Jn(e,t){var r=Kn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}qn.prototype.count=function(){return this.counterValue},qn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},qn.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var Yn=qn;function qn(e){this.counterValue=0,this.id=e}Xn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new Yn(this.id),e},Xn.prototype.count=function(){return this.currentCounter.count()},Xn.prototype.increment=function(e){this.currentCounter.increment(e)},Xn.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var $n=Xn;function Xn(e){this.id=e,this.currentCounter=new Yn(e)}Zn.prototype.count=function(){return this._count},Zn.prototype.totalTime=function(e){return De.nanosToUnit(this._total,e)},Zn.prototype.max=function(e){return De.nanosToUnit(this._max,e)},Zn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Zn.prototype.record=function(e,t){e<0||(t=De.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},Zn.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var Wn=Zn;function Zn(e){this._count=0,this._total=0,this._max=0,this.id=e}ei.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Wn(this.id),e},ei.prototype.count=function(){return this.currentTimer.count()},ei.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},ei.prototype.max=function(e){return this.currentTimer.max(e)},ei.prototype.record=function(e,t){this.currentTimer.record(e,t)},ei.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},ei.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var Qn=ei;function ei(e){this.id=e,this.currentTimer=new Wn(e)}Ne(ri,ti=r),ri.prototype.createCounter=function(e){return new $n(e)},ri.prototype.createTimer=function(e){return new Qn(e)},ri.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0===(r=t).flush||"function"!=typeof r.flush?e:e.concat(t.flush());var r},[]);this.flushMetrics(t,e)};var ti,B=ri;function ri(e,t){return ti.call(this,e,t)||this}ii.prototype.count=function(){return 0},ii.prototype.increment=function(e){},ii.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var ni=ii;function ii(e){this.id=e}Object.defineProperty(si.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),si.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},si.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},si.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},si.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var oi=si;function si(e){this._counters=new Vn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new ni(e)}ui.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]},ui.prototype.count=function(){return 0},ui.prototype.totalTime=function(e){return 0},ui.prototype.max=function(e){return 0},ui.prototype.mean=function(e){return 0},ui.prototype.record=function(e,t){};var ai=ui;function ui(e){this.id=e}Object.defineProperty(li.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),li.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},li.prototype.max=function(e){return this.firstTimer.max(e)},li.prototype.mean=function(e){return this.firstTimer.mean(e)},li.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(li.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),li.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},li.prototype.count=function(){return this.firstTimer.count()},li.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var ci=li;function li(e){this._timers=new Vn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new ai(e)}Ne(fi,pi=e),fi.prototype.createCounter=function(e){e=new oi(e);return this.addRegistry(e),e},fi.prototype.createTimer=function(e){e=new ci(e);return this.addRegistry(e),e},fi.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},fi.prototype.add=function(r){r instanceof fi||this.registries.has(r)||(this.registries.add(r),this.metrics.forEach(function(e){var t;void 0!==(t=e).add&&"function"==typeof t.add&&e.add(r)}))},fi.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var pi,o=fi;function fi(){var e=null!==pi&&pi.apply(this,arguments)||this;return e.registries=new Vn(function(e,t){return e.id===t.id}),e}di.counter=function(e,t){return di.globalRegistry.counter(e,t)},di.timer=function(e,t){return di.globalRegistry.timer(e,t)},di.addRegistry=function(e){di.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},di.globalRegistry=new o;var hi=di;function di(){}yi.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},yi.isNotEmptyString=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var vi=yi;function yi(){}gi.builder=function(){return new Ei},gi.get=function(e){return gi.builder().url(e).build()},gi.prototype.toBuilder=function(){return new Ei(this)};var mi=gi;function gi(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}wi.prototype.url=function(e){return this._url=e,this},wi.prototype.method=function(e){return this._method=e,this},wi.prototype.body=function(e){return this._body=e,this},wi.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},wi.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},wi.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new mi(this._url,this._method,this._body,this._headers.build(),e)};var Ei=wi;function wi(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:_i.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}Ti.ok=function(e,t){return Ti.of(200,e,t)},Ti.of=function(e,t,r){return new Ti(e,null!=t?t:null,null!=r?r:_i.empty())},Ti.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},Ti.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},Ti.prototype.isNotModified=function(){return 304===this.statusCode};var bi=Ti;function Ti(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Ii.empty=function(){return new Ii(new Map)},Ii.builder=function(){return new Ai(new Map)},Ii.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],i=n[0],n=n[1];if(vi.equalsIgnoreCase(i,e))return n}return null},Ii.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Ii.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],t=t[1];return e[r]=t,e},{})},Ii.prototype.toBuilder=function(){return new Ai(this.headers)},Ii.IF_MODIFIED_SINCE="If-Modified-Since",Ii.LAST_MODIFIED="Last-Modified";var _i=Ii;function Ii(e){this.headers=e}Oi.prototype.add=function(e,t){return this.headers.set(e,t),this},Oi.prototype.build=function(){return new _i(this.headers)};var Ai=Oi;function Oi(e){this.headers=e}Ne(Si,Ni=B),Si.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),hn).forEach(function(e){r.dispatch(e,t)})},Si.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Si.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return s.log.debug("Failed to flushing metrics: ".concat(e))})},Si.prototype.createRequest=function(e){return mi.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Si.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Si.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:a.fromMap(p.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Si.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.publish(!0)}};var Ni,Ri=Si;function Si(e,t,r,n,i){n=Ni.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}Ci.experiment=function(e,t,r){t=hi.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Ci.featureFlag=function(e,t,r){t=hi.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Ci.remoteConfig=function(e,t,r){t=hi.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Ci.inAppMessage=function(e,t,r){t=hi.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var xi=Ci;function Ci(){}ki.record=function(e,t,r){e=hi.timer("api.call",{operation:e,success:ki.success(r)});t.stop(e)},ki.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Mi=ki;function ki(){}Ui.decide=function(e,t,r,n){if(a.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)}},Ui.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?Je.of(n,h.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Pi=Ui;function Ui(){}var Di=s.log,Li=(Fi.prototype.get=function(t,r){var n,e=Un.start();try{n=this.decide(t,r)}catch(e){Di.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Je.of(r,h.EXCEPTION)}return xi.remoteConfig(e,t,n),n.value},Fi.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Pi.decide(this.core,e,t,r)},Fi);function Fi(e,t,r){this.core=e,this.userManager=t,this.user=r}zi.prototype.contains=function(e){return this._properties.has(e)},zi.prototype.remove=function(e){var r=this;return e instanceof Map&&e.forEach(function(e,t){r.remove(t)}),"string"==typeof e&&this._properties.delete(e),this},zi.prototype.compute=function(e,t){var r=this._properties.get(e),t=t(r);null!==t?this.add(e,t):null===r&&!this.contains(e)||this.remove(e)},zi.prototype.add=function(e,t,r){if((r=void 0===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;r=ke.sanitizeValue(e,t);return a.isNullOrUndefined(r)||this._properties.set(e,r),this},zi.prototype.addProperties=function(e,r){var n=this;return void 0===r&&(r=!1),e.forEach(function(e,t){n.add(t,e,r)}),this},zi.prototype.build=function(){return this._properties};var Vi,ji=zi;function zi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(i=Vi=Vi||{}).SET="$set",i.SET_ONCE="$setOnce",i.UNSET="$unset",i.INCREMENT="$increment",i.APPEND="$append",i.APPEND_ONCE="$appendOnce",i.PREPEND="$prepend",i.PREPEND_ONCE="$prependOnce",i.REMOVE="$remove",i.CLEAR_ALL="$clearAll";Bi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new ji).addProperties(e).addProperties(t).build()};var Hi=Bi;function Bi(){}Ki.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new ji).addProperties(e).addProperties(t,!0).build()};var Gi=Ki;function Ki(){}Yi.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new ji).addProperties(e).remove(t).build()};var Ji=Yi;function Yi(){}$i.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new ji;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},$i.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var qi=$i;function $i(){}Xi.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new ji;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},Xi.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},Xi.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},Xi.prototype.contains=function(e,t){return e.includes(t)},Xi.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Re([e],t,!0)},Xi.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Re(Re([],e,!0),[t],!1)};t=Xi;function Xi(){}Ne(Qi,Wi=t),Qi.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var Wi,Zi=Qi;function Qi(){return null!==Wi&&Wi.apply(this,arguments)||this}Ne(ro,eo=t),ro.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},ro.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var eo,to=ro;function ro(){return null!==eo&&eo.apply(this,arguments)||this}Ne(oo,no=t),oo.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var no,io=oo;function oo(){return null!==no&&no.apply(this,arguments)||this}Ne(uo,so=t),uo.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)},uo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},uo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var so,ao=uo;function uo(){return null!==so&&so.apply(this,arguments)||this}Ne(po,co=t),po.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},po.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var co,lo=po;function po(){return null!==co&&co.apply(this,arguments)||this}ho.prototype.operate=function(e,t){return new Map};var fo=ho;function ho(){}yo.get=function(e){switch(e){case Vi.SET:return new Hi;case Vi.SET_ONCE:return new Gi;case Vi.UNSET:return new Ji;case Vi.INCREMENT:return new qi;case Vi.APPEND:return new Zi;case Vi.APPEND_ONCE:return new to;case Vi.PREPEND:return new io;case Vi.PREPEND_ONCE:return new ao;case Vi.CLEAR_ALL:return new fo;case Vi.REMOVE:return new lo}};var vo=yo;function yo(){}go.prototype.set=function(e,t){return this.add(Vi.SET,e,t)},go.prototype.setOnce=function(e,t){return this.add(Vi.SET_ONCE,e,t)},go.prototype.unset=function(e){return this.add(Vi.UNSET,e,"-")},go.prototype.increment=function(e,t){return this.add(Vi.INCREMENT,e,t)},go.prototype.append=function(e,t){return this.add(Vi.APPEND,e,t)},go.prototype.appendOnce=function(e,t){return this.add(Vi.APPEND_ONCE,e,t)},go.prototype.prepend=function(e,t){return this.add(Vi.PREPEND,e,t)},go.prototype.prependOnce=function(e,t){return this.add(Vi.PREPEND_ONCE,e,t)},go.prototype.remove=function(e,t){return this.add(Vi.REMOVE,e,t)},go.prototype.clearAll=function(){return this.add(Vi.CLEAR_ALL,"clearAll","-")},go.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new Eo(new Map(e))},go.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},go.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new ji);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var mo=go;function go(){this.operations=new Map}wo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=vo.get(t).operate(r,e)}),r},wo.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),ke.sanitize(a.fromMap(e))),r))}),i},wo.prototype.toRecord=function(){var n={};return this.operations.forEach(function(e,t){var r={};e.forEach(function(e,t){r[t]=e}),n[t]=r}),n};var Eo=wo;function wo(e){this.operations=null!=e?e:new Map}To.timeout=function(r,n){return new Promise(function(e,t){setTimeout(function(){return t(new Error("timeout (".concat(n,"ms)")))},n),r.then(e,t)})};var bo=To;function To(){}var _o=s.log,Io=(Ao.prototype.initialize=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),_o.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),_o.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),_o.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},Ao.prototype.getSessionId=function(){return this.sessionManager.sessionId},Ao.prototype.getUser=function(){return this.userManager.currentUser},Ao.prototype.setUser=function(e){try{var t=Et(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(_o.warn("invalid user"),Promise.resolve())}catch(e){return _o.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},Ao.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=xe.sanitizeValue(e);if(!t)return _o.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return _o.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},Ao.prototype.setDeviceId=function(e){try{var t=xe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(_o.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return _o.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},Ao.prototype.setUserProperty=function(e,t){e=(new mo).set(e,t).build();return this.updateUserProperties(e)},Ao.prototype.setUserProperties=function(e){try{var t=ke.sanitize(e),r=new mo;return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){return _o.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},Ao.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return _o.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},Ao.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new mo).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return _o.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},Ao.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},Ao.prototype.variationDetail=function(r,n,e){var i=e||"A",e=Un.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return _o.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),Xe.of(i,h.EXCEPTION)}}(this);return xi.experiment(e,r,t),t},Ao.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},Ao.prototype.featureFlagDetail=function(r,n){var e=Un.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return _o.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}}(this);return xi.featureFlag(e,r,t),t},Ao.prototype.track=function(e,t){try{_o.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){_o.error("Unexpected exception while tracking event: ".concat(e))}},Ao.prototype.trackPageView=function(e){_o.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},Ao.prototype.remoteConfig=function(e){return new Li(this.core,this.userManager,e)},Ao.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},Ao.prototype.onInitialized=function(r){var n;return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(this.initialized)return[2,{success:!0}];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,bo.timeout(this.initialization,null!=(n=null==r?void 0:r.timeout)?n:3e3)];case 2:return e.sent(),[2,{success:!0}];case 3:return t=e.sent(),_o.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},Ao.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},Ao.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(_o.debug("UserExplorer opened."),hi.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):_o.error("UserExplorer is not provided")},Ao.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():_o.warn("There is no active HackleDevtools.")},Ao.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},Ao.prototype.close=function(){_o.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},Ao);function Ao(e,t,r,n,i,o){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.fetchThrottler=i,this.devTools=o,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.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.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.initialization=this.initialize()}var Oo=s.log,No=(Ro.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user}},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(e){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(e){return Oo.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},Ro);function Ro(e,t){this.invocationProcessor=e,this.user=t}xo.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},xo.prototype.resolve=function(e){e=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(e))throw new Error("invalid invocator response data");if(e.success)return{message:e.message,success:e.success,data:e.data};throw new Error("failed response")};var So=xo;function xo(){}Mo.extractDomain=function(e){var t=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i),e.match(t));return r?r[0]:""},Mo.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},Mo.prototype.getAllItem=function(e){var t=document.cookie.split("; ").map(function(e){return e.split("=")}),r=null==e?void 0:e.keyPrefix;return r?t.filter(function(e){var t=e[0];return e[1],t.startsWith(r)}):t},Mo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Mo.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),i="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(o+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+n+s+o);return document.cookie=a},Mo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Mo.prototype.getOptions=function(){return this.options},Mo.getInstance=function(e){return void 0===e&&(e={days:yn,isCrossSubdomain:!0}),Mo.storage=Mo.storage?Mo.storage:new Mo(e)};var Co=Mo;function Mo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Po.prototype.initialize=function(){Co.getInstance().getItem(mn)||Lo()},Po.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void Do()}};var ko=Po;function Po(){}function Uo(){var e=Co.getInstance(),t=e.getItem(gn);if(t)return t;t=e.getItem(mn);return t||Lo()}function Do(){Co.getInstance().removeItem(gn)}function Lo(){var e=H();return Co.getInstance().setItem(mn,e),e}Vo.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},Vo.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var Fo=Vo;function Vo(e){this.invocator=e}var jo=s.log;Ho.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:Uo()}catch(e){return jo.error("Unexpected exception while get sessionId: ".concat(e)),Uo()}},Ho.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=Et(t))?e:this.defaultUser()}catch(e){return jo.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},Ho.prototype.setUser=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Et(n)))return jo.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){jo.error("Unexpected exception while set user: ".concat(e))}return[2]})})},Ho.prototype.setUserId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=xe.sanitizeValue(n)))return jo.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){jo.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},Ho.prototype.setDeviceId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=xe.sanitizeValue(n)))return jo.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){jo.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},Ho.prototype.setUserProperty=function(r,n){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){jo.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},Ho.prototype.setUserProperties=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{t=ke.sanitize(n),r=new mo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){jo.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},Ho.prototype.updateUserProperties=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){jo.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},Ho.prototype.resetUser=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){jo.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},Ho.prototype.variation=function(t,e,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return jo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},Ho.prototype.variationDetail=function(t,e,r){var n;void 0===r&&(r="A");try{var i={command:"variationDetail",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return Xe.of(o.variation,o.reason,new ze(new Map(Object.entries(null!=(n=o.config.parameters)?n:{}))))}catch(e){return jo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),Xe.of(r,h.EXCEPTION)}},Ho.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)}},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return jo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},Ho.prototype.featureFlagDetail=function(t,e){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:t,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new Ze(i.isOn,i.reason,new ze(new Map(Object.entries(null!=(r=i.config.parameters)?r:{}))),void 0)}catch(e){return jo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}},Ho.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)}};this.invocationProcessor.process(r)}catch(e){jo.error("Unexpected exception while tracking event: ".concat(e))}},Ho.prototype.trackPageView=function(e){jo.info("Web to app integration feature is not support 'trackPageView' method")},Ho.prototype.remoteConfig=function(e){return new No(this.invocationProcessor,this.convertUser(e))},Ho.prototype.onReady=function(e,t){e()},Ho.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){jo.error("Unexpected exception while show userExplorer: ".concat(e))}},Ho.prototype.hideUserExplorer=function(){jo.info("Web to app integration feature is not support 'hideUserExplorer' method")},Ho.prototype.fetch=function(){return Promise.resolve()},Ho.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},Ho.prototype.close=function(){jo.info("Web to app integration feature is not support 'close' method")},Ho.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},Ho.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=Et(e))?e:void 0},Ho.prototype.defaultUser=function(){return{deviceId:Uo()}};var zo=Ho;function Ho(e){this.invocationProcessor=e,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.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.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)}function Bo(e){return e&&e.Math==Math&&e}function Go(e){try{return!!e()}catch(e){return!0}}function Ko(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Jo(e){return Ss(Rs(e),8,-1)}function Yo(e){if(null==e)throw ks("Can't call method on "+e);return e}function qo(e){return Ps(Us(e))}function $o(e){return"function"==typeof e}function Xo(e){return"object"==typeof e?null!==e:Ds(e)}function Wo(e,t){return arguments.length<2?(r=Ls[e],Fs(r)?r:void 0):Ls[e]&&Ls[e][t];var r}function Zo(e){try{return Ys(e)}catch(e){return"Object"}}function Qo(e){if(qs(e))return e;throw Xs($s(e)+" is not a function")}function es(e,t){return null==(e=e[t])?void 0:Ws(e)}function ts(t,r){try{na(ra,t,{value:r,configurable:!0,writable:!0})}catch(e){ra[t]=r}return r}function rs(e){return aa(sa(e))}function ns(e){return"Symbol("+(void 0===e?"":e)+")_"+ha(++pa+fa,36)}function is(e){var t;return va(Ea,e)&&(ma||"string"==typeof Ea[e])||(t="Symbol."+e,ma&&va(wa,e)?Ea[e]=wa[e]:Ea[e]=(ga&&ba?ba:Ta)(t)),Ea[e]}function os(e){return e=xa(e,"string"),Ca(e)?e:e+""}function ss(e){return ka?Ma.createElement(e):{}}function as(e){if(Ba(e))return e;throw Ka(Ga(e)+" is not an object")}function us(e){return su[e]||(su[e]=ou(e))}function cs(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(Iu(r)&&Ou(r,o,n),n.global)i?e[t]=r:Nu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Au.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function ls(e){return(e=+e)!=e||0==e?0:xu(e)}function ps(e,t){return(e=Cu(e))<0?Mu(e+t,0):ku(e,t)}function v(e){return Du(e.length)}function fs(a){return function(e,t,r){var n,i=Lu(e),o=Vu(i),s=Fu(r,o);if(a&&t!=t){for(;s<o;)if((n=i[s++])!=n)return!0}else for(;s<o;s++)if((a||s in i)&&i[s]===t)return a||s||0;return!a&&-1}}function hs(e,t){var r,n=zu(e),i=0,o=[];for(r in n)!ju(Bu,r)&&ju(n,r)&&Gu(o,r);for(;t.length>i;)!ju(n,r=t[i++])||~Hu(o,r)||Gu(o,r);return o}function ds(e,t,r){for(var n=Zu(t),i=ec.f,o=Qu.f,s=0;s<n.length;s++){var a=n[s];Wu(e,a)||r&&Wu(r,a)||i(e,a,o(t,a))}}function vs(e,t){return(e=oc[ic(e)])==ac||e!=sc&&(rc(t)?tc(t):!!t)}function y(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?uc:a?uc[o]||fc(o,{}):(uc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=cc(u,r))&&i.value:u[r],!dc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;hc(n,i)}(e.sham||i&&i.sham)&&lc(n,"sham",!0),pc(u,r,n,e)}}var ys,ms,gs,Es,ws,bs,Ts,_s,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=Bo("object"==typeof globalThis&&globalThis)||Bo("object"==typeof window&&window)||Bo("object"==typeof self&&self)||Bo("object"==typeof r&&r)||function(){return this}()||Function("return this")(),o={},B=!Go(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),i=!Go(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Is=Function.prototype.call,t=i?Is.bind(Is):function(){return Is.apply(Is,arguments)},r={},m={}.propertyIsEnumerable,As=Object.getOwnPropertyDescriptor,g=As&&!m.call({1:2},1),g=(r.f=g?function(e){e=As(this,e);return!!e&&e.enumerable}:m,i),m=Function.prototype,E=m.bind,Os=m.call,Ns=g&&E.bind(Os,Os),m=g?function(e){return e&&Ns(e)}:function(e){return e&&function(){return Os.apply(e,arguments)}},E=m,Rs=E({}.toString),Ss=E("".slice),g=Go,xs=Jo,Cs=Object,Ms=m("".split),E=g(function(){return!Cs("z").propertyIsEnumerable(0)})?function(e){return"String"==xs(e)?Ms(e,""):Cs(e)}:Cs,ks=TypeError,Ps=E,Us=Yo,Ds=$o,Ls=e,Fs=$o,g=m({}.isPrototypeOf),Vs=Wo("navigator","userAgent")||"",w=Vs,js=e.process,zs=e.Deno,js=js&&js.versions||zs&&zs.version,zs=js&&js.v8,js=T=!(T=zs?0<(b=zs.split("."))[0]&&b[0]<4?1:+(b[0]+b[1]):T)&&w&&(!(b=w.match(/Edge\/(\d+)/))||74<=b[1])&&(b=w.match(/Chrome\/(\d+)/))?+b[1]:T,Hs=js,zs=Go,w=!!Object.getOwnPropertySymbols&&!zs(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Hs&&Hs<41}),b=w&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Bs=Wo,Gs=$o,Ks=g,Js=Object,T=b?function(e){return"symbol"==typeof e}:function(e){var t=Bs("Symbol");return Gs(t)&&Ks(t.prototype,Js(e))},Ys=String,qs=$o,$s=Zo,Xs=TypeError,Ws=Qo,Zs=t,Qs=$o,ea=Xo,ta=TypeError,zs={exports:{}},ra=e,na=Object.defineProperty,ia=ts,_="__core-js_shared__",ia=e[_]||ia(_,{}),oa=ia,sa=((zs.exports=function(e,t){return oa[e]||(oa[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"}),Yo),aa=Object,ua=rs,ca=m({}.hasOwnProperty),_=Object.hasOwn||function(e,t){return ca(ua(e),t)},la=m,pa=0,fa=Math.random(),ha=la(1..toString),la=e,da=zs.exports,va=_,ya=ns,ma=w,ga=b,Ea=da("wks"),wa=la.Symbol,ba=wa&&wa.for,Ta=ga?wa:wa&&wa.withoutSetter||ya,_a=t,Ia=Xo,Aa=T,Oa=es,Na=function(e,t){var r,n;if("string"===t&&Qs(r=e.toString)&&!ea(n=Zs(r,e)))return n;if(Qs(r=e.valueOf)&&!ea(n=Zs(r,e)))return n;if("string"!==t&&Qs(r=e.toString)&&!ea(n=Zs(r,e)))return n;throw ta("Can't convert object to primitive value")},Ra=TypeError,Sa=is("toPrimitive"),xa=function(e,t){if(!Ia(e)||Aa(e))return e;var r=Oa(e,Sa);if(r){if(r=_a(r,e,t=void 0===t?"default":t),!Ia(r)||Aa(r))return r;throw Ra("Can't convert object to primitive value")}return Na(e,t=void 0===t?"number":t)},Ca=T,w=Xo,Ma=e.document,ka=w(Ma)&&w(Ma.createElement),Pa=ss,b=!B&&!Go(function(){return 7!=Object.defineProperty(Pa("div"),"a",{get:function(){return 7}}).a}),Ua=t,Da=r,La=Ko,Fa=qo,Va=os,ja=_,za=b,Ha=Object.getOwnPropertyDescriptor,da=(o.f=B?Ha:function(e,t){if(e=Fa(e),t=Va(t),za)try{return Ha(e,t)}catch(e){}if(ja(e,t))return La(!Ua(Da.f,e,t),e[t])},{}),la=B&&Go(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ba=Xo,Ga=String,Ka=TypeError,Ja=b,Ya=as,qa=os,$a=TypeError,Xa=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,Za="enumerable",Qa="configurable",eu="writable",ya=(da.f=B?la?function(e,t,r){var n;return Ya(e),t=qa(t),Ya(r),"function"==typeof e&&"prototype"===t&&"value"in r&&eu in r&&!r[eu]&&((n=Wa(e,t))&&n[eu]&&(e[t]=r.value,r={configurable:(Qa in r?r:n)[Qa],enumerable:(Za in r?r:n)[Za],writable:!1})),Xa(e,t,r)}:Xa:function(e,t,r){if(Ya(e),t=qa(t),Ya(r),Ja)try{return Xa(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $a("Accessors not supported");return"value"in r&&(e[t]=r.value),e},B),tu=da,ru=Ko,T=ya?function(e,t,r){return tu.f(e,t,ru(1,r))}:function(e,t,r){return e[t]=r,e},w={exports:{}},r=B,b=_,ya=Function.prototype,I=r&&Object.getOwnPropertyDescriptor,b=b(ya,"name"),b={EXISTS:b,PROPER:b&&"something"===function(){}.name,CONFIGURABLE:b&&(!r||I(ya,"name").configurable)},r=$o,I=ia,nu=m(Function.toString),ya=(r(I.inspectSource)||(I.inspectSource=function(e){return nu(e)}),I.inspectSource),r=$o,I=ya,iu=e.WeakMap,r=r(iu)&&/native code/.test(I(iu)),I=zs.exports,ou=ns,su=I("keys"),iu={},zs=m,au=Xo,uu=T,cu=_,I=ia,lu=us,pu=iu,fu="Object already initialized",hu=e.TypeError,A=e.WeakMap,r=(Ts=r||I.state?(ys=I.state||(I.state=new A),ms=zs(ys.get),gs=zs(ys.has),Es=zs(ys.set),ws=function(e,t){if(gs(ys,e))throw new hu(fu);return t.facade=e,Es(ys,e,t),t},bs=function(e){return ms(ys,e)||{}},function(e){return gs(ys,e)}):(pu[_s=lu("state")]=!0,ws=function(e,t){if(cu(e,_s))throw new hu(fu);return t.facade=e,uu(e,_s,t),t},bs=function(e){return cu(e,_s)?e[_s]:{}},function(e){return cu(e,_s)}),{set:ws,get:bs,has:Ts,enforce:function(e){return Ts(e)?bs(e):ws(e,{})},getterFor:function(t){return function(e){if(au(e)&&(e=bs(e)).type===t)return e;throw hu("Incompatible receiver, "+t+" required")}}}),I=Go,du=$o,vu=_,yu=B,mu=b.CONFIGURABLE,gu=ya,Eu=r.enforce,wu=r.get,bu=Object.defineProperty,Tu=yu&&!I(function(){return 8!==bu(function(){},"length",{value:8}).length}),_u=String(String).split("String"),A=w.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),(!vu(e,"name")||mu&&e.name!==t)&&(yu?bu(e,"name",{value:t,configurable:!0}):e.name=t),Tu&&r&&vu(r,"arity")&&e.length!==r.arity&&bu(e,"length",{value:r.arity});try{r&&vu(r,"constructor")&&r.constructor?yu&&bu(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=Eu(e);return vu(r,"source")||(r.source=_u.join("string"==typeof t?t:"")),e},Iu=(Function.prototype.toString=A(function(){return du(this)&&wu(this).source||gu(this)},"toString"),$o),Au=da,Ou=w.exports,Nu=ts,zs={},Ru=Math.ceil,Su=Math.floor,xu=Math.trunc||function(e){e=+e;return(0<e?Su:Ru)(e)},Cu=ls,Mu=Math.max,ku=Math.min,Pu=ls,Uu=Math.min,Du=function(e){return 0<e?Uu(Pu(e),9007199254740991):0},Lu=qo,Fu=ps,Vu=v,pu={includes:fs(!0),indexOf:fs(!1)},lu=m,ju=_,zu=qo,Hu=pu.indexOf,Bu=iu,Gu=lu([].push),I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ku=hs,Ju=I.concat("length","prototype"),A=(zs.f=Object.getOwnPropertyNames||function(e){return Ku(e,Ju)},{}),lu=(A.f=Object.getOwnPropertySymbols,Wo),Yu=zs,qu=A,$u=as,Xu=m([].concat),A=lu("Reflect","ownKeys")||function(e){var t=Yu.f($u(e)),r=qu.f;return r?Xu(t,r(e)):t},Wu=_,Zu=A,Qu=o,ec=da,tc=Go,rc=$o,nc=/#|\.prototype\./,ic=vs.normalize=function(e){return String(e).replace(nc,".").toLowerCase()},oc=vs.data={},sc=vs.NATIVE="N",ac=vs.POLYFILL="P",lu=vs,uc=e,cc=o.f,lc=T,pc=cs,fc=ts,hc=ds,dc=lu,A=!Go(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),vc=_,yc=$o,mc=rs,gc=us("IE_PROTO"),Ec=Object,wc=Ec.prototype,A=A?Ec.getPrototypeOf:function(e){e=mc(e);if(vc(e,gc))return e[gc];var t=e.constructor;return yc(t)&&e instanceof t?t.prototype:e instanceof Ec?wc:null},bc=$o,Tc=String,_c=TypeError,Ic=m,Ac=as,Oc=function(e){if("object"==typeof e||bc(e))return e;throw _c("Can't set "+Tc(e)+" as a prototype")},Nc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Ic(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Ac(e),Oc(t),n?r(e,t):e.__proto__=t,e}}():void 0),Rc={},Sc=hs,xc=I,O=Object.keys||function(e){return Sc(e,xc)},Cc=da,Mc=as,kc=qo,Pc=O;Rc.f=B&&!la?Object.defineProperties:function(e,t){Mc(e);for(var r,n=kc(t),i=Pc(t),o=i.length,s=0;s<o;)Cc.f(e,r=i[s++],n[r]);return e};function Uc(){}function Dc(e){e.write(nl("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Lc(e,t){return pl(e),void 0===t?e:fl?hl(e,t):function(){return e.apply(t,arguments)}}function Fc(e){return void 0!==e&&(dl.Array===e||yl[vl]===e)}function Vc(e){if(null!=e)return _l(e,Al)||_l(e,"@@iterator")||Il[Tl(e)]}function jc(e,t){if(t=arguments.length<2?xl(e):t,Nl(t))return Rl(Ol(t,e));throw Cl(Sl(e)+" is not iterable")}function zc(e,t,r){var n,i;kl(e);try{if(!(n=Pl(e,"return"))){if("throw"===t)throw r;return r}n=Ml(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return kl(n),r}function Hc(e,t){this.stopped=e,this.result=t}function Bc(e,t,r){function n(e){return o&&Gl(o,"normal",e),new Hc(!0,e)}function i(e){return f?(Ll(e),v?y(e[0],e[1],n):y(e[0],e[1])):v?y(e,n):y(e)}var o,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Ul(t,p);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=Bl(e)))throw Kl(Fl(e)+" is not iterable");if(Vl(r)){for(s=0,a=jl(e);s<a;s++)if((u=i(e[s]))&&zl(Jl,u))return u;return new Hc(!1)}o=Hl(e,r)}for(c=(h?e:o).next;!(l=Dl(c,o)).done;){try{u=i(l.value)}catch(e){Gl(o,"throw",e)}if("object"==typeof u&&u&&zl(Jl,u))return u}return new Hc(!1)}function Gc(e){if("Symbol"===Yl(e))throw TypeError("Cannot convert a Symbol value to a string");return ql(e)}function Kc(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=Wl(pp,this);return Ql?r=Ql(new cp,i?Zl(this):pp):(r=i?this:ep(pp),tp(r,up,"Error")),void 0!==t&&tp(r,"message",sp(t)),ap&&tp(r,"stack",np(r.stack,1)),ip(r,n),op(e,lp,{that:i=[]}),tp(r,"errors",i),r}function Jc(e){hp[fp][e]=!0}var Yc,qc,O=Wo("document","documentElement"),$c=as,Xc=Rc,Wc=I,la=iu,Zc=O,Qc=ss,el="prototype",tl="script",rl=us("IE_PROTO"),nl=function(e){return"<"+tl+">"+e+"</"+tl+">"},il=function(){try{Yc=new ActiveXObject("htmlfile")}catch(e){}il="undefined"==typeof document||document.domain&&Yc?Dc(Yc):(e=Qc("iframe"),t="java"+tl+":",e.style.display="none",Zc.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(nl("document.F=Object")),t.close(),t.F);for(var e,t,r=Wc.length;r--;)delete il[el][Wc[r]];return il()},Rc=(la[rl]=!0,Object.create||function(e,t){var r;return null!==e?(Uc[el]=$c(e),r=new Uc,Uc[el]=null,r[rl]=e):r=il(),void 0===t?r:Xc.f(r,t)}),ol=Error,sl=m("".replace),I=String(ol("zxcasd").stack),al=/\n\s*at [^:]*:[^\n]*/,ul=al.test(I),cl=Xo,ll=T,pl=Qo,fl=i,hl=m(m.bind),la={},dl=la,vl=is("iterator"),yl=Array.prototype,I={},I=(I[is("toStringTag")]="z","[object z]"===String(I)),N=I,ml=$o,gl=Jo,El=is("toStringTag"),wl=Object,bl="Arguments"==gl(function(){return arguments}()),N=N?gl:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=wl(e),El))?t:bl?gl(e):"Object"==(t=gl(e))&&ml(e.callee)?"Arguments":t},Tl=N,_l=es,Il=la,Al=is("iterator"),Ol=t,Nl=Qo,Rl=as,Sl=Zo,xl=Vc,Cl=TypeError,Ml=t,kl=as,Pl=es,Ul=Lc,Dl=t,Ll=as,Fl=Zo,Vl=Fc,jl=v,zl=g,Hl=jc,Bl=Vc,Gl=zc,Kl=TypeError,Jl=Hc.prototype,Yl=N,ql=String,$l=Gc,Xl=Ko,R=!Go(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Xl(1,7)),7!==e.stack)}),S=y,Wl=g,Zl=A,Ql=Nc,x=ds,ep=Rc,tp=T,rp=Ko,np=function(e,t){if(ul&&"string"==typeof e&&!ol.prepareStackTrace)for(;t--;)e=sl(e,al,"");return e},ip=function(e,t){cl(t)&&"cause"in t&&ll(e,"cause",t.cause)},op=Bc,sp=function(e,t){return void 0===e?arguments.length<2?"":t:$l(e)},ap=R,up=is("toStringTag"),cp=Error,lp=[].push,pp=(Ql?Ql(Kc,cp):x(Kc,cp,{name:!0}),Kc.prototype=ep(cp.prototype,{constructor:rp(1,Kc),message:rp(1,""),name:rp(1,"AggregateError")})),R=(S({global:!0,constructor:!0,arity:2},{AggregateError:Kc}),is),x=Rc,rp=da.f,fp=R("unscopables"),hp=Array.prototype,S=(null==hp[fp]&&rp(hp,fp,{configurable:!0,value:x(null)}),Go),R=$o,rp=A,x=cs,dp=is("iterator"),vp=!1;[].keys&&("next"in(C=[].keys())?(rp=rp(rp(C)))!==Object.prototype&&(qc=rp):vp=!0);function yp(e,t,r){(e=e&&!r?e.prototype:e)&&!bp(e,Tp)&&wp(e,Tp,{configurable:!0,value:t})}function mp(){return this}function gp(){return this}function Ep(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!zp&&e in p)return p[e];switch(e){case"keys":case Bp:case Gp:return function(){return new r(this,e)}}return function(){return new r(this)}}Cp(r,t,n);var u,c,n=t+" Iterator",l=!1,p=e.prototype,f=p[Hp]||p["@@iterator"]||i&&p[i],h=!zp&&f||a(i),d="Array"==t&&p.entries||f;if(d&&(d=Mp(d.call(new e)))!==Object.prototype&&d.next&&(Mp(d)!==jp&&(kp?kp(d,jp):xp(d[Hp])||Dp(d,Hp,gp)),Pp(d,n,!0)),Fp&&i==Bp&&f&&f.name!==Bp&&(Vp?Up(p,"name",Bp):(l=!0,h=function(){return Sp(f,this)})),i)if(u={values:a(Bp),keys:o?h:a("keys"),entries:a(Gp)},s)for(c in u)!zp&&!l&&c in p||Dp(p,c,u[c]);else Rp({target:t,proto:!0,forced:zp||l},u);return p[Hp]!==h&&Dp(p,Hp,h,{name:i}),Lp[t]=h,u}R((qc=null==qc||S(function(){var e={};return qc[dp].call(e)!==e})?{}:qc)[dp])||x(qc,dp,function(){return this});var C={IteratorPrototype:qc,BUGGY_SAFARI_ITERATORS:vp},wp=da.f,bp=_,Tp=is("toStringTag"),_p=C.IteratorPrototype,Ip=Rc,Ap=Ko,Op=yp,Np=la,Rp=y,Sp=t,xp=$o,Cp=function(e,t,r,n){t+=" Iterator";return e.prototype=Ip(_p,{next:Ap(+!n,r)}),Op(e,t,!1),Np[t]=mp,e},Mp=A,kp=Nc,Pp=yp,Up=T,Dp=cs,rp=is,Lp=la,Fp=b.PROPER,Vp=b.CONFIGURABLE,jp=C.IteratorPrototype,zp=C.BUGGY_SAFARI_ITERATORS,Hp=rp("iterator"),Bp="values",Gp="entries",Kp=qo,R=Jc,S=la,x=r,vp=da.f,b=Ep,C=B,Jp="Array Iterator",Yp=x.set,qp=x.getterFor(Jp),rp=b(Array,"Array",function(e,t){Yp(this,{type:Jp,target:Kp(e),index:0,kind:t})},function(){var e=qp(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),la=S.Arguments=S.Array;if(R("keys"),R("values"),R("entries"),C&&"values"!==la.name)try{vp(la,"name",{value:"values"})}catch(e){}var $p=N;I||cs(Object.prototype,"toString",I?{}.toString:function(){return"[object "+$p(this)+"]"},{unsafe:!0});function Xp(e){var e=of(e),t=sf.f;af&&e&&!e[uf]&&t(e,uf,{configurable:!0,get:function(){return this}})}function Wp(e,t){if(cf(t,e))return e;throw lf("Incorrect invocation")}function Zp(){}function Qp(e){if(!pf(e))return!1;try{return vf(Zp,df,e),!0}catch(e){return!1}}function ef(e){if(!pf(e))return!1;switch(ff(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gf||!!mf(yf,hf(e))}catch(e){return!0}}function tf(e,t){return void 0===(e=Tf(e).constructor)||null==(e=Tf(e)[If])?t:_f(e)}var rf,nf,x="process"==Jo(e.process),of=Wo,sf=da,af=B,uf=is("species"),cf=g,lf=TypeError,b=m,S=Go,pf=$o,ff=N,hf=ya,df=[],vf=Wo("Reflect","construct"),yf=/^\s*(?:class|function)\b/,mf=b(yf.exec),gf=!yf.exec(Zp),R=(ef.sham=!0,!vf||S(function(){var e;return Qp(Qp.call)||!Qp(Object)||!Qp(function(){e=!0})||e})?ef:Qp),Ef=R,wf=Zo,bf=TypeError,Tf=as,_f=function(e){if(Ef(e))return e;throw bf(wf(e)+" is not a constructor")},If=is("species"),C=Function.prototype,Af=C.apply,Of=C.call,vp="object"==typeof Reflect&&Reflect.apply||(i?Of.bind(Af):function(){return Of.apply(Af,arguments)}),la=m([].slice),Nf=TypeError,I=/(?:ipad|iphone|ipod).*applewebkit/i.test(Vs),Rf=e,Sf=vp,g=Lc,xf=$o,Cf=_,N=Go,Mf=O,kf=la,Pf=ss,Uf=function(e,t){if(e<t)throw Nf("Not enough arguments");return e},b=I,S=x,C=Rf.setImmediate,i=Rf.clearImmediate,Df=Rf.process,Lf=Rf.Dispatch,Ff=Rf.Function,O=Rf.MessageChannel,Vf=Rf.String,jf=0,zf={},Hf="onreadystatechange";try{rf=Rf.location}catch(e){}function Bf(e){return function(){sh(e)}}function Gf(e){sh(e.data)}function Kf(e){Rf.postMessage(Vf(e),rf.protocol+"//"+rf.host)}function Jf(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function Yf(){this.head=null,this.tail=null}function qf(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=e,n=t}),this.resolve=Eh(r),this.reject=Eh(n)}function $f(e,t){var r,n,i,o,s=t.value,a=t.state==qh,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(t.rejection===Wh&&(o=t,Th(Rh,bh,function(){var e=o.facade;wh?Hh.emit("rejectionHandled",e):ed(Yh,e,o.value)})),t.rejection=Xh),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(jh("Promise-chain cycle")):(n=Zh(r))?Th(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var Xf,Wf,Zf,Qf,eh,th,rh,nh,ih,oh,sh=function(e){var t;Cf(zf,e)&&(t=zf[e],delete zf[e],t())},O=(C&&i||(C=function(e){Uf(arguments.length,1);var t=xf(e)?e:Ff(e),r=kf(arguments,1);return zf[++jf]=function(){Sf(t,void 0,r)},nf(jf),jf},i=function(e){delete zf[e]},S?nf=function(e){Df.nextTick(Bf(e))}:Lf&&Lf.now?nf=function(e){Lf.now(Bf(e))}:O&&!b?(b=(S=new O).port2,S.port1.onmessage=Gf,nf=g(b.postMessage,b)):Rf.addEventListener&&xf(Rf.postMessage)&&!Rf.importScripts&&rf&&"file:"!==rf.protocol&&!N(Kf)?(nf=Kf,Rf.addEventListener("message",Gf,!1)):nf=Hf in Pf("script")?function(e){Mf.appendChild(Pf("script"))[Hf]=function(){Mf.removeChild(this),sh(e)}}:function(e){setTimeout(Bf(e),0)}),{set:C,clear:i}),S=e,g=/ipad|iphone|ipod/i.test(Vs)&&void 0!==S.Pebble,b=/web0s(?!.*chrome)/i.test(Vs),N=e,C=Lc,i=o.f,ah=O.set,S=I,o=g,I=b,uh=x,g=N.MutationObserver||N.WebKitMutationObserver,b=N.document,ch=N.process,M=N.Promise,i=i(N,"queueMicrotask"),i=i&&i.value,I=(i||(Xf=function(){var e,t;for(uh&&(e=ch.domain)&&e.exit();Wf;){t=Wf.fn,Wf=Wf.next;try{t()}catch(e){throw Wf?Qf():Zf=void 0,e}}Zf=void 0,e&&e.enter()},Qf=S||uh||I||!g||!b?!o&&M&&M.resolve?((S=M.resolve(void 0)).constructor=M,rh=C(S.then,S),function(){rh(Xf)}):uh?function(){ch.nextTick(Xf)}:(ah=C(ah,N),function(){ah(Xf)}):(eh=!0,th=b.createTextNode(""),new g(Xf).observe(th,{characterData:!0}),function(){th.data=eh=!eh})),i||function(e){e={fn:e,next:void 0};Zf&&(Zf.next=e),Wf||(Wf=e,Qf()),Zf=e}),lh=e,o=(Yf.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},Yf),M=e.Promise,S="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,C=!S&&!x&&"object"==typeof window&&"object"==typeof document,N=e,ph=M,b=$o,g=lu,fh=ya,i=is,hh=C,dh=S,vh=js,yh=(ph&&ph.prototype,i("species")),mh=!1,gh=b(N.PromiseRejectionEvent),ya={CONSTRUCTOR:g("Promise",function(){var e=fh(ph),t=e!==String(ph);if(!t&&66===vh)return!0;if(!vh||vh<51||!/native code/.test(e)){var e=new ph(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[yh]=r,!(mh=e.then(function(){})instanceof r))return!0}return!t&&(hh||dh)&&!gh}),REJECTION_EVENT:gh,SUBCLASSING:mh},C={},Eh=Qo,S=(C.f=function(e){return new qf(e)},y),wh=x,bh=e,Th=t,i=cs,b=Nc,N=yp,g=Xp,_h=Qo,Ih=$o,Ah=Xo,Oh=Wp,Nh=tf,Rh=O.set,Sh=I,xh=function(e,t){var r=lh.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},Ch=Jf,Mh=o,O=r,I=M,o=C,kh="Promise",Ph=ya.CONSTRUCTOR,Uh=ya.REJECTION_EVENT,k=ya.SUBCLASSING,Dh=O.getterFor(kh),Lh=O.set,O=I&&I.prototype,Fh=I,Vh=O,jh=bh.TypeError,zh=bh.document,Hh=bh.process,Bh=o.f,Gh=Bh,Kh=!!(zh&&zh.createEvent&&bh.dispatchEvent),Jh="unhandledrejection",Yh="rejectionhandled",qh=1,$h=2,Xh=1,Wh=2,Zh=function(e){var t;return!(!Ah(e)||!Ih(t=e.then))&&t},Qh=function(r,i){r.notified||(r.notified=!0,Sh(function(){for(var e,n,t=r.reactions;e=t.get();)$f(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Th(Rh,bh,function(){var e=n.facade,t=n.value,r=td(n);if(r&&(r=Ch(function(){wh?Hh.emit("unhandledRejection",t,e):ed(Jh,e,t)}),n.rejection=wh||td(n)?Wh:Xh,r.error))throw r.value}))}))},ed=function(e,t,r){var n;Kh?((n=zh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),bh.dispatchEvent(n)):n={promise:t,reason:r},!Uh&&(t=bh["on"+e])?t(n):e===Jh&&xh("Unhandled promise rejection",r)},td=function(e){return e.rejection!==Xh&&!e.parent},rd=function(t,r,n){return function(e){t(r,e,n)}},nd=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=$h,Qh(e,!0))},id=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw jh("Promise can't be resolved itself");var n=Zh(e);n?Sh(function(){var t={done:!1};try{Th(n,e,rd(id,t,r),rd(nd,t,r))}catch(e){nd(t,e,r)}}):(r.value=e,r.state=qh,Qh(r,!1))}catch(e){nd({done:!1},e,r)}}};if(Ph&&(Vh=(Fh=function(e){Oh(this,Vh),_h(e),Th(nh,this);var t=Dh(this);try{e(rd(id,t),rd(nd,t))}catch(e){nd(t,e)}}).prototype,(nh=function(e){Lh(this,{type:kh,done:!1,notified:!1,parent:!1,reactions:new Mh,rejection:!1,state:0,value:void 0})}).prototype=i(Vh,"then",function(e,t){var r=Dh(this),n=Bh(Nh(this,Fh));return r.parent=!0,n.ok=!Ih(e)||e,n.fail=Ih(t)&&t,n.domain=wh?Hh.domain:void 0,0==r.state?r.reactions.add(n):Sh(function(){$f(n,r)}),n.promise}),ih=function(){var e=new nh,t=Dh(e);this.promise=e,this.resolve=rd(id,t),this.reject=rd(nd,t)},o.f=Bh=function(e){return e===Fh||void 0===e?new ih:Gh(e)},Ih(I)&&O!==Object.prototype)){oh=O.then,k||i(O,"then",function(e,t){var r=this;return new Fh(function(e,t){Th(oh,r,e,t)}).then(e,t)},{unsafe:!0});try{delete O.constructor}catch(e){}b&&b(O,Vh)}S({global:!0,constructor:!0,wrap:!0,forced:Ph},{Promise:Fh}),N(Fh,kh,!1),g(kh);var od=is("iterator"),sd=!1;try{var ad=0,ud={next:function(){return{done:!!ad++}},return:function(){sd=!0}};ud[od]=function(){return this},Array.from(ud,function(){throw 2})}catch(e){}function cd(e,t){if(!t&&!sd)return!1;var r=!1;try{var n={};n[od]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var ld=M,o=cd,I=ya.CONSTRUCTOR||!o(function(e){ld.all(e).then(void 0,function(){})}),pd=t,fd=Qo,hd=C,dd=Jf,vd=Bc,k=(y({target:"Promise",stat:!0,forced:I},{all:function(e){var a=this,t=hd.f(a),u=t.resolve,c=t.reject,r=dd(function(){var n=fd(a.resolve),i=[],o=0,s=1;vd(e,function(e){var t=o++,r=!1;s++,pd(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),y),i=M,b=Wo,O=$o,S=cs,Ph=i&&i.prototype;k({target:"Promise",proto:!0,forced:ya.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),O(i)&&(N=b("Promise").prototype.catch,Ph.catch!==N&&S(Ph,"catch",N,{unsafe:!0}));var yd=t,md=Qo,gd=C,Ed=Jf,wd=Bc;y({target:"Promise",stat:!0,forced:I},{race:function(e){var r=this,n=gd.f(r),i=n.reject,t=Ed(function(){var t=md(r.resolve);wd(e,function(e){yd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function bd(e,t){return Id(e),Ad(t)&&t.constructor===e?t:((0,(e=Od.f(e)).resolve)(t),e.promise)}var Td=t,_d=C,Id=(y({target:"Promise",stat:!0,forced:ya.CONSTRUCTOR},{reject:function(e){var t=_d.f(this);return Td(t.reject,void 0,e),t.promise}}),as),Ad=Xo,Od=C,g=y,ud=Wo,o=ya.CONSTRUCTOR,Nd=bd;ud("Promise"),g({target:"Promise",stat:!0,forced:o},{resolve:function(e){return Nd(this,e)}});var Rd=t,Sd=Qo,xd=C,Cd=Jf,Md=Bc;y({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=xd.f(a),u=t.resolve,r=t.reject,n=Cd(function(){var n=Sd(a.resolve),i=[],o=0,s=1;Md(e,function(e){var t=o++,r=!1;s++,Rd(n,a,e).then(function(e){r||(r=!0,i[t]={status:"fulfilled",value:e},--s||u(i))},function(e){r||(r=!0,i[t]={status:"rejected",reason:e},--s||u(i))})}),--s||u(i)});return n.error&&r(n.value),t.promise}});function kd(i){return function(e,t){var r,e=Yd(qd(e)),t=Jd(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=Xd(e,t))<55296||56319<r||t+1===n||(n=Xd(e,t+1))<56320||57343<n?i?$d(e,t):r:i?Wd(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Pd=t,Ud=Qo,Dd=Wo,Ld=C,Fd=Jf,Vd=Bc,jd="No one promise resolved",k=(y({target:"Promise",stat:!0},{any:function(e){var u=this,c=Dd("AggregateError"),t=Ld.f(u),l=t.resolve,p=t.reject,r=Fd(function(){var n=Ud(u.resolve),i=[],o=0,s=1,a=!1;Vd(e,function(e){var t=o++,r=!1;s++,Pd(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,i[t]=e,--s||p(new c(i,jd)))})}),--s||p(new c(i,jd))});return r.error&&p(r.value),t.promise}}),y),O=M,i=Go,zd=Wo,Hd=$o,Bd=tf,Gd=bd,b=cs,Kd=O&&O.prototype,Ph=(k({target:"Promise",proto:!0,real:!0,forced:!!O&&i(function(){Kd.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=Bd(this,zd("Promise")),e=Hd(t);return this.then(e?function(e){return Gd(r,t()).then(function(){return e})}:t,e?function(e){return Gd(r,t()).then(function(){throw e})}:t)}}),Hd(O)&&(S=zd("Promise").prototype.finally,Kd.finally!==S&&b(Kd,"finally",S,{unsafe:!0})),m),Jd=ls,Yd=Gc,qd=Yo,$d=Ph("".charAt),Xd=Ph("".charCodeAt),Wd=Ph("".slice),Zd={codeAt:kd(!1),charAt:kd(!0)}.charAt,Qd=Gc,N=r,I=Ep,ev="String Iterator",tv=N.set,rv=N.getterFor(ev);I(String,"String",function(e){tv(this,{type:ev,string:Qd(e),index:0})},function(){var e=rv(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=Zd(t,r),e.index+=t.length,{value:t,done:!1})});function nv(t,e){if(t){if(t[cv]!==pv)try{uv(t,cv,pv)}catch(e){t[cv]=pv}if(t[lv]||uv(t,lv,e),sv[e])for(var r in av)if(t[r]!==av[r])try{uv(t,r,av[r])}catch(e){t[r]=av[r]}}}var iv,ya=e,ud=ya.Promise,g=ss("span").classList,o=g&&g.constructor&&g.constructor.prototype,M=o===Object.prototype?void 0:o,ov=e,sv={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},k=M,av=rp,uv=T,i=is,cv=i("iterator"),lv=i("toStringTag"),pv=av.values;for(iv in sv)nv(ov[iv]&&ov[iv].prototype,iv);nv(k,"DOMTokenList");var O,b,S=b=O=ud,Ph,fv=C,hv=Jf,dv=((Ph=y)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=fv.f(this),e=hv(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),as),vv=zc,yv=os,mv=da,gv=Ko,N,Ev=Lc,wv=t,bv=rs,Tv=function(t,e,r,n){try{return n?e(dv(r)[0],r[1]):e(r)}catch(e){vv(t,"throw",e)}},_v=Fc,Iv=R,Av=v,Ov=N=function(e,t,r){t=yv(t);t in e?mv.f(e,t,gv(0,r)):e[t]=r},Nv=jc,Rv=Vc,Sv=Array,I,g=function(e){var t,r,n,i,o,s,a=bv(e),e=Iv(this),u=arguments.length,c=1<u?arguments[1]:void 0,l=void 0!==c,u=(l&&(c=Ev(c,2<u?arguments[2]:void 0)),Rv(a)),p=0;if(!u||this===Sv&&_v(u))for(t=Av(a),r=e?new this(t):Sv(t);p<t;p++)s=l?c(a[p],p):a[p],Ov(r,p,s);else for(o=(i=Nv(a,u)).next,r=e?new this:[];!(n=wv(o,i)).done;p++)s=l?Tv(i,c,[n.value,p],!0):n.value,Ov(r,p,s);return r.length=p,r},o,M,xv=((I=y)({target:"Array",stat:!0,forced:M=!(o=cd)(function(e){Array.from(e)})},{from:g}),Jo),rp=Array.isArray||function(e){return"Array"==xv(e)},T,i,k=((T=y)({target:"Array",stat:!0},{isArray:i=rp}),y),ud=Go,Cv=R,Mv=N,kv=Array,O=ud(function(){function e(){}return!(kv.of.call(e)instanceof e)}),Pv=(k({target:"Array",stat:!0,forced:O},{of:function(){for(var e=0,t=arguments.length,r=new(Cv(this)?this:kv)(t);e<t;)Mv(r,e,arguments[e++]);return r.length=t,r}}),rs),Uv=v,Dv=ls,b=Jc,Lv=(y({target:"Array",proto:!0},{at:function(e){var t=Pv(this),r=Uv(t),e=Dv(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),b("at"),TypeError),S=function(e){if(9007199254740991<e)throw Lv("Maximum allowed index exceeded");return e},Fv=rp,Vv=R,jv=Xo,zv=is("species"),Hv=Array,Bv=function(e){var t;return Fv(e)&&(t=e.constructor,(Vv(t)&&(t===Hv||Fv(t.prototype))||jv(t)&&null===(t=t[zv]))&&(t=void 0)),void 0===t?Hv:t},C=function(e,t){return new(Bv(e))(0===t?0:t)},Gv=Go,Kv=js,Jv=is("species"),Ph,o=y,I=Go,Yv=rp,qv=Xo,$v=rs,Xv=v,Wv=S,Zv=N,Qv=C,M=Ph=function(t){return 51<=Kv||!Gv(function(){var e=[];return(e.constructor={})[Jv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},g=js,ey=is("isConcatSpreadable"),T=51<=g||!I(function(){var e=[];return e[ey]=!1,e.concat()[0]!==e}),i=M("concat"),ty=(o({target:"Array",proto:!0,arity:1,forced:!T||!i},{concat:function(e){for(var t,r,n,i=$v(this),o=Qv(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!qv(e))return!1;var t=e[ey];return void 0!==t?!!t:Yv(e)}(n=-1===a?i:arguments[a]))for(r=Xv(n),Wv(s+r),t=0;t<r;t++,s++)t in n&&Zv(o,s,n[t]);else Wv(s+1),Zv(o,s++,n);return o.length=s,o}}),Zo),ry=TypeError,ud,ny=rs,iy=ps,oy=v,sy=ud=function(e,t){if(!delete e[t])throw ry("Cannot delete property "+ty(t)+" of "+ty(e))},ay=Math.min,k=Jc,uy=(y({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=ny(this),n=oy(r),i=iy(e,n),o=iy(t,n),e=2<arguments.length?arguments[2]:void 0,s=ay((void 0===e?n:iy(e,n))-o,n-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in r?r[i]=r[o]:sy(r,i),i+=a,o+=a;return r}}),k("copyWithin"),Lc),cy=E,ly=rs,py=v,fy=C,hy=m([].push),O,b={forEach:(O=function(f){var h=1==f,d=2==f,v=3==f,y=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var i,o,s=ly(e),a=cy(s),u=uy(t,r),c=py(a),l=0,t=n||fy,p=h?t(e,c):d||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(h)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:hy(p,i)}else switch(f){case 4:return!1;case 7:hy(p,i)}return m?-1:v||y?y:p}})(0),map:O(1),filter:O(2),some:O(3),every:O(4),find:O(5),findIndex:O(6),filterReject:O(7)},dy=Go,g=function(e,t){var r=[][e];return!!r&&dy(function(){r.call(null,t||function(){return 1},1)})},I=y,vy=b.every,yy=(I({target:"Array",proto:!0,forced:!g("every")},{every:function(e){return vy(this,e,1<arguments.length?arguments[1]:void 0)}}),rs),my=ps,gy=v,M=Jc,o=(y({target:"Array",proto:!0},{fill:function(e){for(var t=yy(this),r=gy(t),n=arguments.length,i=my(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:my(n,r);i<o;)t[i++]=e;return t}}),M("fill"),y),Ey=b.filter,T=(o({target:"Array",proto:!0,forced:!Ph("filter")},{filter:function(e){return Ey(this,e,1<arguments.length?arguments[1]:void 0)}}),y),wy=b.find,i=Jc,k,by=!0,O=((k="find")in[]&&Array(1)[k](function(){by=!1}),T({target:"Array",proto:!0,forced:by},{find:function(e){return wy(this,e,1<arguments.length?arguments[1]:void 0)}}),i(k),y),Ty=b.findIndex,I=Jc,M,_y=!0,Iy=((M="findIndex")in[]&&Array(1)[M](function(){_y=!1}),O({target:"Array",proto:!0,forced:_y},{findIndex:function(e){return Ty(this,e,1<arguments.length?arguments[1]:void 0)}}),I(M),Lc),Ay=E,Oy=rs,Ny=v,o,T={findLast:(o=function(u){var c=1==u;return function(e,t,r){for(var n,i=Oy(e),o=Ay(i),s=Iy(t,r),a=Ny(o);0<a--;)if(s(n=o[a],a,i))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}})(0),findLastIndex:o(1)},i=y,Ry=T.findLast,k=Jc,O=(i({target:"Array",proto:!0},{findLast:function(e){return Ry(this,e,1<arguments.length?arguments[1]:void 0)}}),k("findLast"),y),Sy=T.findLastIndex,I=Jc,xy=(O({target:"Array",proto:!0},{findLastIndex:function(e){return Sy(this,e,1<arguments.length?arguments[1]:void 0)}}),I("findLastIndex"),rp),Cy=v,My=S,ky=Lc,Py=function(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&ky(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&xy(u)?(c=Cy(u),l=Py(e,t,u,c,l,o-1)-1):(My(l+1),e[l]=u),l++),p++;return l},M,Uy=M=Py,Dy=rs,Ly=v,Fy=ls,Vy=C;y({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Dy(this),r=Ly(t),n=Vy(t,0);return n.length=Uy(n,t,t,r,0,void 0===e?1:Fy(e)),n}});function jy(c){return function(e,t,r,n){fm(t);var i=hm(e),o=dm(i),s=vm(i),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in o){n=o[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw ym("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in o&&(n=t(n,o[a],a,i));return n}}function zy(e,t,r){for(var n=Pm(e),i=km(t,n),o=km(void 0===r?n:r,n),s=Dm(Lm(o-i,0)),a=0;i<o;i++,a++)Um(s,a,e[i]);return s.length=a,s}function Hy(e,t){var r=e.length,n=Vm(r/2);if(r<8){for(var i,o,s=e,a=t,u=s.length,c=1;c<u;){for(i=s[o=c];o&&0<a(s[o-1],i);)s[o]=s[--o];o!==c++&&(s[o]=i)}return s}for(var l=e,p=Hy(Fm(e,0,n),t),f=Hy(Fm(e,n),t),h=t,d=p.length,v=f.length,y=0,m=0;y<d||m<v;)l[y+m]=y<d&&m<v?h(p[y],f[m])<=0?p[y++]:f[m++]:y<d?p[y++]:f[m++];return l}var By=M,Gy=Qo,Ky=rs,Jy=v,Yy=C,qy=(y({target:"Array",proto:!0},{flatMap:function(e){var t,r=Ky(this),n=Jy(r);return Gy(e),(t=Yy(r,0)).length=By(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),b.forEach),o=g("forEach")?[].forEach:function(e){return qy(this,e,1<arguments.length?arguments[1]:void 0)},i=(y({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o}),y),$y=pu.includes,k=Jc,T=(i({target:"Array",proto:!0,forced:Go(function(){return!Array(1).includes()})},{includes:function(e){return $y(this,e,1<arguments.length?arguments[1]:void 0)}}),k("includes"),y),O=m,Xy=pu.indexOf,I=g,Wy=O([].indexOf),Zy=!!Wy&&1/Wy([1],1,-0)<0,M=I("indexOf"),o=(T({target:"Array",proto:!0,forced:Zy||!M},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Zy?Wy(this,e,t)||0:Xy(this,e,t)}}),y),i=E,Qy=qo,k=g,em=m([].join),pu=i!=Object,O=k("join",","),tm=(o({target:"Array",proto:!0,forced:pu||!O},{join:function(e){return em(Qy(this),void 0===e?",":e)}}),vp),rm=qo,nm=ls,im=v,I=g,om=Math.min,sm=[].lastIndexOf,am=!!sm&&1/[1].lastIndexOf(1,-0)<0,T=I("lastIndexOf"),M=am||!T?function(e){if(am)return tm(sm,this,arguments)||0;var t=rm(this),r=im(t),n=r-1;for((n=1<arguments.length?om(n,nm(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:sm,i=(y({target:"Array",proto:!0,forced:M!==[].lastIndexOf},{lastIndexOf:M}),y),um=b.map,k=(i({target:"Array",proto:!0,forced:!Ph("map")},{map:function(e){return um(this,e,1<arguments.length?arguments[1]:void 0)}}),y),cm=rs,lm=v,pm=S,o=Go(function(){return 4294967297!==[].push.call({length:4294967296},1)}),pu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),fm=(k({target:"Array",proto:!0,arity:1,forced:o||pu},{push:function(e){var t=cm(this),r=lm(t),n=arguments.length;pm(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),Qo),hm=rs,dm=E,vm=v,ym=TypeError,O={left:jy(!1),right:jy(!0)},vp=y,mm=O.left,I=js,T=x,M=(vp({target:"Array",proto:!0,forced:!g("reduce")||!T&&79<I&&I<83},{reduce:function(e){var t=arguments.length;return mm(this,e,t,1<t?arguments[1]:void 0)}}),y),gm=O.right,i=js,k=x,o=(M({target:"Array",proto:!0,forced:!g("reduceRight")||!k&&79<i&&i<83},{reduceRight:function(e){return gm(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),y),Em=rp,wm=m([].reverse),pu=[1,2],vp=(o({target:"Array",proto:!0,forced:String(pu)===String(pu.reverse())},{reverse:function(){return Em(this)&&(this.length=this.length),wm(this)}}),y),bm=rp,Tm=R,_m=Xo,Im=ps,Am=v,Om=qo,Nm=N,T=is,Rm=la,I=Ph("slice"),Sm=T("species"),xm=Array,Cm=Math.max,O=(vp({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,n,i,o=Om(this),s=Am(o),a=Im(e,s),u=Im(void 0===t?s:t,s);if(bm(o)&&(r=o.constructor,(r=Tm(r)&&(r===xm||bm(r.prototype))||_m(r)&&null===(r=r[Sm])?void 0:r)===xm||void 0===r))return Rm(o,a,u);for(n=new(void 0===r?xm:r)(Cm(u-a,0)),i=0;a<u;a++,i++)a in o&&Nm(n,i,o[a]);return n.length=i,n}}),y),Mm=b.some,km=(O({target:"Array",proto:!0,forced:!g("some")},{some:function(e){return Mm(this,e,1<arguments.length?arguments[1]:void 0)}}),ps),Pm=v,Um=N,Dm=Array,Lm=Math.max,Fm=zy,Vm=Math.floor,x=Hy,M=Vs.match(/firefox\/(\d+)/i),k=!!M&&+M[1],i=/MSIE|Trident/.test(Vs),o=Vs.match(/AppleWebKit\/(\d+)\./),pu=!!o&&+o[1],la=y,T=m,jm=Qo,zm=rs,Hm=v,Bm=ud,Gm=Gc,vp=Go,Km=x,I=g,Jm=k,Ym=i,qm=js,$m=pu,Xm=[],Wm=T(Xm.sort),Zm=T(Xm.push),O=vp(function(){Xm.sort(void 0)}),M=vp(function(){Xm.sort(null)}),Vs=I("sort"),Qm=!vp(function(){if(qm)return qm<70;if(!(Jm&&3<Jm)){if(Ym)return!0;if($m)return $m<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)Xm.push({k:e+r,v:t})}for(Xm.sort(function(e,t){return t.v-e.v}),r=0;r<Xm.length;r++)e=Xm[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});la({target:"Array",proto:!0,forced:O||!M||!Vs||!Qm},{sort:function(e){void 0!==e&&jm(e);var t=zm(this);if(Qm)return void 0===e?Wm(t):Wm(t,e);for(var r,n,i=[],o=Hm(t),s=0;s<o;s++)s in t&&Zm(i,t[s]);for(Km(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Gm(e)>Gm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)Bm(t,s++);return t}});Xp("Array");var o=y,eg=rs,tg=ps,rg=ls,ng=v,ig=S,og=C,sg=N,ag=ud,x=Ph("splice"),ug=Math.max,cg=Math.min;o({target:"Array",proto:!0,forced:!x},{splice:function(e,t){var r,n,i,o,s,a,u=eg(this),c=ng(u),l=tg(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,cg(ug(rg(t),0),c-l)),ig(c+r-n),i=og(u,n),o=0;o<n;o++)(s=l+o)in u&&sg(i,o,u[s]);if(r<(i.length=n)){for(o=l;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:ag(u,a);for(o=c;c-n+r<o;o--)ag(u,o-1)}else if(n<r)for(o=c-n;l<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:ag(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),Jc("flat");Jc("flatMap");var k=y,lg=rs,pg=v,fg=ud,hg=S,i=1!==[].unshift(0),js=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();k({target:"Array",proto:!0,arity:1,forced:i||js},{unshift:function(e){var t=lg(this),r=pg(t),n=arguments.length;if(n){hg(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:fg(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});ya.Array;var pu={exports:{}},T={},dg=Jo,vg=qo,yg=zs.f,mg=zy,gg="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.f=function(e){if(!gg||"Window"!=dg(e))return yg(vg(e));try{return yg(e)}catch(e){return mg(gg)}};function Eg(e){Cg(e,Lg,{value:{objectID:"O"+Fg++,weakData:{}}})}function wg(e,t,r){for(var n in t)nE(e,n,t[n],r);return e}function bg(e,t){for(var r=0,n=yE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Tg(e,t,r,n){for(var i,o,s,a=EE(e),u=gE(a),c=mE(t,r),l=TE(null),p=bE(u),f=0;f<p;f++)s=u[f],(o=wE(c(s,f,a)))in l?AE(l[o],s):l[o]=[s];if(n&&(i=n(a))!==IE)for(o in l)l[o]=_E(i,l[o]);return l}var I=Go(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),vp=Go,_g=Xo,Ig=Jo,Ag=I,Og=Object.isExtensible,la=vp(function(){Og(1)})||Ag?function(e){return!!_g(e)&&((!Ag||"ArrayBuffer"!=Ig(e))&&(!Og||Og(e)))}:Og,O=!Go(function(){return Object.isExtensible(Object.preventExtensions({}))}),Ng=y,Rg=m,M=iu,Sg=Xo,xg=_,Cg=da.f,Mg=zs,kg=T,Pg=la,Ug=O,Dg=!1,Lg=ns("meta"),Fg=0,Vg=pu.exports={enable:function(){Vg.enable=function(){},Dg=!0;var i=Mg.f,o=Rg([].splice),e={};e[Lg]=1,i(e).length&&(Mg.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===Lg){o(t,r,1);break}return t},Ng({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:kg.f}))},fastKey:function(e,t){if(!Sg(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!xg(e,Lg)){if(!Pg(e))return"F";if(!t)return"E";Eg(e)}return e[Lg].objectID},getWeakData:function(e,t){if(!xg(e,Lg)){if(!Pg(e))return!0;if(!t)return!1;Eg(e)}return e[Lg].weakData},onFreeze:function(e){return Ug&&Dg&&Pg(e)&&!xg(e,Lg)&&Eg(e),e}},jg=(M[Lg]=!0,$o),zg=Xo,Hg=Nc,Bg=y,Gg=e,Kg=m,Jg=lu,Yg=cs,qg=pu.exports,$g=Bc,Xg=Wp,Wg=$o,Zg=Xo,Qg=Go,eE=cd,tE=yp,rE=function(e,t,r){return Hg&&jg(t=t.constructor)&&t!==r&&zg(t=t.prototype)&&t!==r.prototype&&Hg(e,t),e},nE=cs,iE=da.f,oE=Rc,sE=wg,aE=Lc,uE=Wp,cE=Bc,lE=Ep,pE=Xp,fE=B,hE=pu.exports.fastKey,dE=r.set,vE=r.getterFor,yE=(function(e,t,r){function n(e){var r=Kg(h[e]);Yg(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(l&&!Zg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return l&&!Zg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(l&&!Zg(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}var i,o,s,a,u,c=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),p=c?"set":"add",f=Gg[e],h=f&&f.prototype,d=f,v={};return Jg(e,!Wg(f)||!(l||h.forEach&&!Qg(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,p),qg.enable()):Jg(e,!0)&&(o=(i=new d)[p](l?{}:-0,1)!=i,s=Qg(function(){i.has(1)}),a=eE(function(e){new f(e)}),u=!l&&Qg(function(){for(var e=new f,t=5;t--;)e[p](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){Xg(e,h);e=rE(new f,e,d);return null!=t&&$g(t,e[p],{that:e,AS_ENTRIES:c}),e})).prototype=h).constructor=d),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(p),l&&h.clear&&delete h.clear),v[e]=d,Bg({global:!0,constructor:!0,forced:d!=f},v),tE(d,e),l||r.setStrong(d,e,c),d}("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,r,n,i){function o(e,t,r){var n,i=u(e),o=s(e,t);return o?o.value=r:(i.last=o={index:n=hE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),fE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=hE(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){uE(e,a),dE(e,{type:r,index:oE(null),first:void 0,last:void 0,size:0}),fE||(e.size=0),null!=t&&cE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=vE(r);return sE(a,{clear:function(){for(var e=u(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,fE?e.size=0:this.size=0},delete:function(e){var t,r,n=u(this),e=s(this,e);return e&&(t=e.next,r=e.previous,delete n.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),n.first==e&&(n.first=t),n.last==e&&(n.last=r),fE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=aE(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),sE(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),fE&&iE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=vE(t),o=vE(n);lE(e,t,function(e,t){dE(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),pE(t)}}),v),mE=Lc,gE=E,EE=rs,wE=os,bE=v,TE=Rc,_E=bg,IE=Array,AE=m([].push),OE=Tg,Vs=Jc;y({target:"Array",proto:!0},{group:function(e){return OE(this,e,1<arguments.length?arguments[1]:void 0)}}),Vs("group");var NE=Tg,N=Jc;y({target:"Array",proto:!0,forced:!g("groupBy")},{groupBy:function(e){return NE(this,e,1<arguments.length?arguments[1]:void 0)}}),N("groupBy");function RE(e){for(var t,r,n=CE(this),i=xE(n),o=SE(e,1<arguments.length?arguments[1]:void 0),s=new kE,a=ME(i),u=0;u<a;u++)t=o(r=i[u],u,n),UE(s,t)?LE(PE(s,t),r):DE(s,t,[r]);return s}var SE=Lc,Ph=m,xE=E,CE=rs,ME=v,kE=Wo("Map"),o=kE.prototype,PE=Ph(o.get),UE=Ph(o.has),DE=Ph(o.set),LE=Ph([].push),x=Jc,ud=RE;y({target:"Array",proto:!0,name:"groupToMap",forced:!g("groupByToMap")},{groupByToMap:ud}),x("groupByToMap");function FE(e){return BE[e].prototype}var k=Jc,VE=(y({target:"Array",proto:!0},{groupToMap:RE}),k("groupToMap"),v),jE=function(e,t){for(var r=VE(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},zE=qo,i=Jc,HE=Array,BE=(y({target:"Array",proto:!0},{toReversed:function(){return jE(zE(this),HE)}}),i("toReversed"),e),js=y,GE=Qo,KE=qo,JE=bg,ya=Jc,YE=Array,qE=m(FE("Array").sort),I=(js({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&GE(e);var t=KE(this),t=JE(YE,t);return qE(t,e)}}),ya("toSorted"),y),vp=Jc,$E=S,XE=v,WE=ps,ZE=qo,QE=ls,ew=Array,tw=Math.max,rw=Math.min,nw=(I({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=ZE(this),a=XE(s),u=WE(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,rw(tw(QE(t),0),a-u)),i=$E(a+r-n),o=ew(i);c<u;c++)o[c]=s[c];for(;c<u+r;c++)o[c]=arguments[c-u+2];for(;c<i;c++)o[c]=s[c+n-r];return o}}),vp("toSpliced"),v),iw=ls,ow=RangeError,sw=function(e,t,r,n){var i=nw(e),r=iw(r),o=r<0?i+r:r;if(i<=o||o<0)throw ow("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},aw=qo,uw=Array;y({target:"Array",proto:!0},{with:function(e,t){return sw(aw(this),uw,e,t)}});iu=e,_=ia,zs=$o,T=A,la=cs,O="USE_FUNCTION_CONSTRUCTOR",M=is("asyncIterator"),Nc=iu.AsyncIterator,lu=_.AsyncIteratorPrototype;if(lu)xb=lu;else if(zs(Nc))xb=Nc.prototype;else if(_[O]||iu[O])try{bb=T(T(T(Function("return async function*(){}()")()))),T(bb)===Object.prototype&&(xb=bb)}catch(e){}zs((xb=xb||{})[M])||la(xb,M,function(){return this});function cw(e,t,r){var n=e.done;mw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function lw(e){Ew(this,{type:gw,iterator:vw(e),next:e.next})}function pw(e){var f=0==e,h=1==e,d=2==e,v=3==e;return function(e,s,a){var e=Lw(e),u=Dw("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||kw(s),new u(function(r,n){var i=function(e){Fw(c,n,e,n)},o=function(){try{if(f&&p)try{Uw(l)}catch(e){i(e)}u.resolve(Pw(Mw(t,c))).then(function(e){try{if(Pw(e).done)f?(a.length=l,r(a)):r(!v&&(d||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(h)o();else if(d)e?o():Fw(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?Fw(c,r,v||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function fw(e,t){if(!e0||!Qw(e)||!e0(e))return!1;for(var r,n=0,i=e.length;n<i;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==i}function hw(e,t,r){return r.get&&t0(r.get,t,{getter:!0}),r.set&&t0(r.set,t,{setter:!0}),r0.f(e,t,r)}var dw=t,vw=as,pu=Rc,yw=es,Vs=wg,N=r,E=xb,mw=Wo("Promise"),gw="AsyncFromSyncIterator",Ew=N.set,ww=N.getterFor(gw),o=(lw.prototype=Vs(pu(E),{next:function(){var n=ww(this);return new mw(function(e,t){var r=vw(dw(n.next,n.iterator));cw(r,e,t)})},return:function(){var n=ww(this).iterator;return new mw(function(e,t){var r=yw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=vw(dw(r,n));cw(r,e,t)})}}),lw),bw=t,Tw=o,_w=as,Iw=jc,Aw=es,Ow=is("asyncIterator"),Nw=Qo,Rw=as,Sw=t,xw=Wo,Cw=es,Mw=t,kw=Qo,Pw=as,Uw=S,Dw=Wo,Lw=function(e){return{iterator:e,next:Nw(Rw(e).next)}},Fw=function(e,t,r,n){try{var i=Cw(e,"return");if(i)return xw("Promise").resolve(Sw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},Ph={toArray:pw(0),forEach:pw(1),every:pw(2),some:pw(3),find:pw(4)},Vw=Lc,jw=rs,zw=R,Hw=function(e,t){t=arguments.length<2?Aw(e,Ow):t;return t?_w(bw(t,e)):new Tw(Iw(e))},Bw=jc,Gw=Vc,Kw=es,g=FE,Jw=Wo,ud=is,Yw=o,qw=Ph.toArray,$w=ud("asyncIterator"),Xw=g("Array").values,x=(y({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(Jw("Promise"))(function(e){var t=jw(o),r=(void 0!==a&&(a=Vw(a,u)),Kw(t,$w)),n=r?void 0:Gw(t)||Xw,i=zw(s)?new s:[],r=r?Hw(t,r):new Yw(Bw(t,n));e(qw(r,a,i))})}}),y),Ww=b.filterReject,k=Jc,i=(x({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return Ww(this,e,1<arguments.length?arguments[1]:void 0)}}),k("filterOut"),y),Zw=b.filterReject,js=Jc,ya=(i({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return Zw(this,e,1<arguments.length?arguments[1]:void 0)}}),js("filterReject"),y),Qw=rp,e0=Object.isFrozen,t0=(ya({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!fw(e,!0))return!1;var t=e.raw;return t.length===e.length&&fw(t,!1)}}),w.exports),r0=da,I=Jc,n0=rs,i0=v;B&&(hw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=n0(this),t=i0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=n0(this),r=i0(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var vp=Jc,o0=rs,s0=v;B&&(hw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=o0(this),e=s0(e);return 0==e?0:e-1}}),vp("lastIndex"));var e=m,a0=Qo,u0=v,c0=rs,l0=C,p0=Wo("Map"),ia=p0.prototype,f0=e(ia.forEach),h0=e(ia.has),d0=e(ia.set),v0=e([].push),A=Jc;y({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=c0(this),i=u0(n),o=l0(n,0),s=new p0,a=null!=e?a0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),h0(s,r)||d0(s,r,t);return f0(s,function(e){v0(o,e)}),o}}),A("uniqueBy");m0.exposure=function(e,t,r,n){return new E0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},m0.track=function(e,t,r,n){return new T0(n,r,e,t)},m0.remoteConfig=function(e,t,r,n){return new A0(n,e,t.parameter,t.valueId,t.reason,r)},m0.isExposureEvent=function(e){return void 0!==e.experiment},m0.isTrackEvent=function(e){return void 0!==e.eventType},m0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},m0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},m0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},m0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},m0.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[dt.ID],identifiers:this.user.identifiers,userProperties:ke.sanitize(this.user.properties),hackleProperties:ke.sanitize(this.user.hackleProperties)}};var y0=m0;function m0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Ne(w0,g0=y0),w0.prototype.copyWithUser=function(e){return new w0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},w0.prototype.toDto=function(){return c(c({},g0.prototype.toDto.call(this)),{experimentId:this.experiment.id,experimentKey:this.experiment.key,experimentType:this.experiment.type,experimentVersion:this.experiment.version,variationId:this.variationId,variationKey:this.variationKey,decisionReason:this.decisionReason.toString(),properties:this.properties})};var g0,E0=w0;function w0(e,t,r,n,i,o,s,a){e=g0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Ne(_0,b0=y0),_0.prototype.copyWithUser=function(e){return new _0(this.timestamp,e,this.eventType,this.event,this.insertId)},_0.prototype.toDto=function(){return c(c({},b0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:ke.sanitize(this.event.properties)})};var b0,T0=_0;function _0(e,t,r,n,i){e=b0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Ne(O0,I0=y0),O0.prototype.copyWithUser=function(e){return new O0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},O0.prototype.toDto=function(){return c(c({},I0.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:ke.sanitize(this.properties)})};var I0,A0=O0;function O0(e,t,r,n,i,o,s){e=I0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}R0.isSessionEvent=function(e){return!!y0.isTrackEvent(e)&&(e.event.key===R0.SESSION_START_EVENT_NAME||e.event.key===R0.SESSION_END_EVENT_NAME)},R0.prototype.onSessionStarted=function(e,t,r){this.track(R0.SESSION_START_EVENT_NAME,e,t,r)},R0.prototype.onSessionEnded=function(e,t,r){this.track(R0.SESSION_END_EVENT_NAME,e,t,r)},R0.prototype.track=function(e,t,r,n){e={key:e},r=this.userManager.toHackleUser(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},R0.prototype.decorateSession=function(e,t){t=(new mt).add(dt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},R0.SESSION_START_EVENT_NAME="$session_start",R0.SESSION_END_EVENT_NAME="$session_end";var N0=R0;function R0(e,t){this.userManager=e,this.core=t}x0.prototype.process=function(e){var t;N0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=e,t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[dt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[dt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},x0.prototype.flush=function(e){this.delegate.flush(e)},x0.prototype.close=function(){this.delegate.close()},x0.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.flush(!0)}};var S0=x0;function x0(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}M0.toEvent=function(e){var t;return{key:M0.EVENT_KEY,properties:{level:M0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:M0._stacktrace(e)}}},M0._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,M0.STACK_TRACK_LIMIT).join("\n")},M0.EVENT_KEY="$trace",M0.LEVEL_ERROR="error",M0.STACK_TRACK_LIMIT=30;var C0=M0;function M0(){}k0.prototype.evaluate=function(e,t){if(!this.supports(e))throw new Error("Unsupported EvaluatorRequest ".concat(e.toString()));var r;if(t.contains(e))throw r=t.stack.map(function(e){return e.toString()}).join(" - "),new Error("Circular evaluation has occurred [".concat(r," - ").concat(e.toString(),"]"));t.addRequest(e);try{return this.evaluateInternal(e,t)}finally{t.removeRequest(e)}};lu=k0;function k0(){}U0.prototype.with=function(e){return new U0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},U0.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new U0(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},U0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new U0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},U0.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})};var P0=U0;function U0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}Ne(F0,D0=lu),F0.prototype.supports=function(e){return void 0!==e.experiment},F0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:P0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var D0,L0=F0;function F0(e){var t=D0.call(this)||this;return t.evaluationFlowFactory=e,t}j0.of=function(e,t,r,n,i,o){return o.returnValue=ke.truncateStringValue(n),new j0(i,t.targetEvaluations,e.parameter,r,n,o)},j0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var V0=j0;function j0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}Ne(B0,z0=lu),B0.prototype.supports=function(e){return void 0!==e.parameter},B0.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=ke.truncateStringValue(e.defaultValue),a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return V0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return a.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,h.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,h.DEFAULT_RULE,r)},B0.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?V0.ofDefault(e,t,h.TYPE_MISMATCH,i):V0.of(e,t,r.id,r.rawValue,n,i)};var z0,H0=B0;function B0(e){var t=z0.call(this)||this;return t.targetRuleDeterminer=e,t}K0.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var G0=K0;function K0(e,t){this.type=e,this.id=t}Y0.create=function(){return new Y0},Object.defineProperty(Y0.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(Y0.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(Y0.prototype,"properties",{get:function(){return ke.sanitize(this._properties)},enumerable:!1,configurable:!0}),Y0.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},Y0.prototype.addRequest=function(e){this._stack.push(e)},Y0.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},Y0.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof P0&&e.experiment.id===t.id})},Y0.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},Y0.prototype.setProperty=function(e,t){this._properties[e]=t};var J0=Y0;function Y0(){this._stack=[],this._targetEvaluations=[],this._properties={}}$0.of=function(e,t,r,n){return new $0(e,t,r,n)},$0.by=function(e,t){return new $0(e.workspace,e.user,t,"A")},$0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var q0=$0;function $0(e,t,r,n){this.key=new G0("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}W0.of=function(e,t,r,n,i){return new W0(e,t,r,n,i)},W0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var X0=W0;function W0(e,t,r,n,i){this.key=new G0("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}Q0.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},Q0.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},Q0.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var Z0=Q0;function Q0(){}tb.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var i=n[r].getVariation(e,t);if(void 0!==i)return i}};var eb=tb;function tb(e){this.storages=e}nb.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},nb.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return Z0.asNumber(e)},nb.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=Z0.asNumber(t),e=Z0.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},nb.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},nb.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},nb.prototype.clear=function(){this.listStorage.clear()};var rb=nb;function nb(e){this.listStorage=e}ob.prototype.add=function(e){this.evaluators.push(e)},ob.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(a.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)};var ib=ob;function ob(){this.evaluators=new Array}ab.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},ab.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},ab.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var sb=ab;function ab(e){this.conditionMatcherFactory=e}cb.prototype.decorate=function(e){return e};var ub=cb;function cb(){}pb.prototype.decorate=function(e){return"string"==typeof e?decodeURI(e):e};var lb=pb;function pb(){}hb.prototype.matches=function(e,t,r){void 0===r&&(r=new ub);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,e)},hb.prototype.userValueMatches=function(e,t,r,n,i){return Array.isArray(e)?this.arrayMatches(e,t,r,n,i):this.singleMatches(e,t,r,n,i)},hb.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},hb.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},hb.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var fb=hb;function hb(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}vb.tryParse=function(e){try{return new URL(e)}catch(e){return}},vb.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:vb.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)};var db=vb;function vb(){}yb.prototype.booleanMatches=function(e,t){return e===t},yb.prototype.numberMatches=function(e,t){return e===t},yb.prototype.stringMatches=function(e,t){return e===t},yb.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},yb.prototype.urlMatches=function(e,t){return decodeURI(db.removePathnameTrailingSlash(e))===decodeURI(db.removePathnameTrailingSlash(t))};Nc=yb;function yb(){}mb.prototype.booleanMatches=function(e,t){return!1},mb.prototype.numberMatches=function(e,t){return!1},mb.prototype.stringMatches=function(e,t){return e.includes(t)},mb.prototype.versionMatches=function(e,t){return!1},mb.prototype.urlMatches=function(e,t){return decodeURI(e.href).includes(t)};_=mb;function mb(){}gb.prototype.booleanMatches=function(e,t){return!1},gb.prototype.numberMatches=function(e,t){return!1},gb.prototype.stringMatches=function(e,t){return e.startsWith(t)},gb.prototype.versionMatches=function(e,t){return!1},gb.prototype.urlMatches=function(e,t){return decodeURI(e.href).startsWith(t)};iu=gb;function gb(){}Eb.prototype.booleanMatches=function(e,t){return!1},Eb.prototype.numberMatches=function(e,t){return!1},Eb.prototype.stringMatches=function(e,t){return e.endsWith(t)},Eb.prototype.versionMatches=function(e,t){return!1},Eb.prototype.urlMatches=function(e,t){return!1};O=Eb;function Eb(){}wb.prototype.booleanMatches=function(e,t){return!1},wb.prototype.numberMatches=function(e,t){return t<e},wb.prototype.stringMatches=function(e,t){return t<e},wb.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},wb.prototype.urlMatches=function(e,t){return!1};T=wb;function wb(){}Tb.prototype.booleanMatches=function(e,t){return!1},Tb.prototype.numberMatches=function(e,t){return t<=e},Tb.prototype.stringMatches=function(e,t){return t<=e},Tb.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},Tb.prototype.urlMatches=function(e,t){return!1};var bb=Tb;function Tb(){}_b.prototype.booleanMatches=function(e,t){return!1},_b.prototype.numberMatches=function(e,t){return e<t},_b.prototype.stringMatches=function(e,t){return e<t},_b.prototype.versionMatches=function(e,t){return e.isLessThan(t)},_b.prototype.urlMatches=function(e,t){return!1};zs=_b;function _b(){}Ib.prototype.booleanMatches=function(e,t){return!1},Ib.prototype.numberMatches=function(e,t){return e<=t},Ib.prototype.stringMatches=function(e,t){return e<=t},Ib.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},Ib.prototype.urlMatches=function(e,t){return!1};la=Ib;function Ib(){}Ob.prototype.getMatcher=function(e){switch(e){case"IN":return Ob.IN_MATCHER;case"CONTAINS":return Ob.CONTAINS_MATCHER;case"STARTS_WITH":return Ob.STARTS_WITH_MATCHER;case"ENDS_WITH":return Ob.ENDS_WITH_MATCHER;case"GT":return Ob.GT_MATCHER;case"GTE":return Ob.GTE_MATCHER;case"LT":return Ob.LT_MATCHER;case"LTE":return Ob.LTE_MATCHER}},Ob.IN_MATCHER=new Nc,Ob.CONTAINS_MATCHER=new _,Ob.STARTS_WITH_MATCHER=new iu,Ob.ENDS_WITH_MATCHER=new O,Ob.GT_MATCHER=new T,Ob.GTE_MATCHER=new bb,Ob.LT_MATCHER=new zs,Ob.LTE_MATCHER=new la;var Ab=Ob;function Ob(){}Nb.prototype.matches=function(e,t,r){t=Z0.asString(t),r=Z0.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)};M=Nb;function Nb(){}Rb.prototype.matches=function(e,t,r){t=Z0.asNumber(t),r=Z0.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)};Rc=Rb;function Rb(){}Sb.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)};r=Sb;function Sb(){}Cb.prototype.matches=function(e,t,r){t=Gt.tryParse(t),r=Gt.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)};var xb=Cb;function Cb(){}Mb.prototype.matches=function(e,t,r){t=db.tryParse(t),r=Z0.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)};N=Mb;function Mb(){}kb.prototype.matches=function(e,t,r){return!1};Vs=kb;function kb(){}Ub.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return Ub.STRING_MATCHER;case"NUMBER":return Ub.NUMBER_MATCHER;case"BOOLEAN":return Ub.BOOLEAN_MATCHER;case"VERSION":return Ub.VERSION_MATCHER;case"URL":return Ub.URL_MATCHER;case"NULL":case"UNKNOWN":return Ub.NULL_MATCHER}},Ub.STRING_MATCHER=new M,Ub.NUMBER_MATCHER=new Rc,Ub.BOOLEAN_MATCHER=new r,Ub.VERSION_MATCHER=new xb,Ub.URL_MATCHER=new N,Ub.NULL_MATCHER=new Vs;var Pb=Ub;function Ub(){}Lb.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(a.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},Lb.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?lb:ub)};var Db=Lb;function Lb(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}Vb.prototype.resolveOrNull=function(e,t){switch(t.type){case"USER_ID":return e.identifiers[t.name];case"USER_PROPERTY":return e.properties[t.name];case"HACKLE_PROPERTY":return e.hackleProperties[t.name];case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"EVENT_PROPERTY":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var Fb=Vb;function Vb(){}zb.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var i=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},zb.prototype._matches=function(e,t,r){if("string"!=typeof r)throw new Error("SegmentKey[".concat(r,"]"));var n=e.workspace.getSegmentOrNull(r);if(n)return this.segmentMatcher.matches(e,t,n);throw new Error("Segment[".concat(r,"]"))};var jb=zb;function zb(e){this.segmentMatcher=e}Bb.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},Bb.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var Hb=Bb;function Bb(e){this.userConditionMatcher=e}Kb.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"EVENT_PROPERTY":case"SEGMENT":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var Gb=Kb;function Kb(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}Jb.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(Z0.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var i=null!=(i=t.getEvaluation(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},Jb.prototype.evaluate=function(e,t,r){r=q0.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};pu=Jb;function Jb(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Ne($b,Yb=pu),$b.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},$b.prototype.resolve=function(e,t){return e instanceof q0&&t.reason===h.TRAFFIC_ALLOCATED?t.with(h.TRAFFIC_ALLOCATED_BY_TARGETING):t},$b.prototype.evaluationMatches=function(e,t){return!!$b.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},$b.AB_TEST_MATCHED_REASONS=[h.OVERRIDDEN,h.TRAFFIC_ALLOCATED,h.EXPERIMENT_COMPLETED,h.TRAFFIC_ALLOCATED_BY_TARGETING];var Yb,qb=$b;function $b(e,t){return Yb.call(this,e,t)||this}Ne(Zb,Xb=pu),Zb.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},Zb.prototype.resolve=function(e,t){return t},Zb.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var Xb,Wb=Zb;function Zb(e,t){return Xb.call(this,e,t)||this}eT.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},eT.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var Qb=eT;function eT(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}rT.prototype.resolveOrNull=function(e,t){var r;switch(t.type){case"EVENT_PROPERTY":return null==(r=this.properties(e))?void 0:r[t.name];case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},rT.prototype.properties=function(e){return y0.isTrackEvent(e)?e.event.properties:y0.isExposureEvent(e)||y0.isRemoteConfigEvent(e)?e.properties:void 0};var tT=rT;function rT(){}iT.prototype.matches=function(e,t,r){var n=this;if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));return!!e.user.cohorts&&e.user.cohorts.some(function(e){return n.valueOperatorMatcher.matches(e.id,r.match)})};var nT=iT;function iT(e){this.valueOperatorMatcher=e}sT.prototype.getMatcher=function(e){switch(e){case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":return this.userConditionMatcher;case"EVENT_PROPERTY":return this.eventConditionMatcher;case"SEGMENT":return this.segmentConditionMatcher;case"AB_TEST":case"FEATURE_FLAG":return this.experimentConditionMatcher;case"COHORT":return this.cohortConditionMatcher}};var oT=sT;function sT(e){var t=new fb(new Pb,new Ab);this.userConditionMatcher=new Db(new Fb,t),this.eventConditionMatcher=new Qb(new tT,t),this.segmentConditionMatcher=new jb(new Hb(this.userConditionMatcher)),this.experimentConditionMatcher=new Gb(new qb(e,t),new Wb(e,t)),this.cohortConditionMatcher=new nT(t)}uT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},uT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},uT.prototype.resolveBucket=function(e,t){var t=e.workspace.getBucketOrNull(t.bucketId),r=e.user.identifiers[e.experiment.identifierType];if(r){t=this.bucketer.bucketing(t,r);if(t)return e.experiment._getVariationByIdOrNull(t.variationId)}};var aT=uT;function uT(e){this.bucketer=e}var cT={murmurhash3_x86_32:function(e,t,r,n){for(var i,o=-4&(n=void 0===n?e.length:n),s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=this.mul32(i,3432918353),s=5*(s=(524287&(s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)))<<13|s>>>19)+3864292196|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(2+o))<<16;case 2:i|=(255&e.charCodeAt(1+o))<<8;case 1:i|=255&e.charCodeAt(o),i=this.mul32(i,3432918353),s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),s=this.mul32(s^=s>>>13,3266489909),s^=s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},lT=(pT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},pT.prototype.calculateSlotNumber=function(e,t,r){r=cT.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},pT);function pT(){}hT.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},hT.end=function(){return new hT(void 0,void 0)},hT.decision=function(e,t){return new hT(e,t)},hT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,i=e.reverse();n<i.length;n++)var o=i[n],r=this.decision(o,r);return r};var fT=hT;function hT(e,t){this.flowEvaluator=e,this.nextFlow=t}vT.prototype.evaluate=function(e,t,r){var n=this.overrideResolver.resolveOrNull(e,t);if(!n)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return P0.of(e,t,n,h.OVERRIDDEN);case"FEATURE_FLAG":return P0.of(e,t,n,h.INDIVIDUAL_TARGET_MATCH)}};var dT=vT;function vT(e){this.overrideResolver=e}mT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?P0.ofDefault(e,t,h.EXPERIMENT_DRAFT):r.evaluate(e,t)};var yT=mT;function mT(){}ET.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return P0.ofDefault(e,t,h.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return P0.ofDefault(e,t,h.FEATURE_FLAG_INACTIVE)}};var gT=ET;function ET(){}bT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return P0.of(e,t,r,h.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var wT=bT;function bT(){}_T.prototype.evaluate=function(e,t,r){if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));return this.experimentTargetDeterminer.isUserInExperimentTarget(e,t)?r.evaluate(e,t):P0.ofDefault(e,t,h.NOT_IN_EXPERIMENT_TARGET)};var TT=_T;function _T(e){this.experimentTargetDeterminer=e}AT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);return n?n.isDropped?P0.ofDefault(e,t,h.VARIATION_DROPPED):P0.of(e,t,n,h.TRAFFIC_ALLOCATED):P0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var IT=AT;function AT(e){this.actionResolver=e}NT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return r.evaluate(e,t);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);if(!n)return r.evaluate(e,t);r=this.actionResolver.resolveOrNull(e,t,n.action);if(r)return P0.of(e,t,r,h.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var OT=NT;function NT(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}ST.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return P0.ofDefault(e,t,h.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return P0.of(e,t,n,h.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var RT=ST;function ST(e){this.actionResolver=e}CT.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(i)return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):P0.ofDefault(e,t,h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var xT=CT;function CT(e){this.containerResolver=e}kT.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):P0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND)};var MT=kT;function kT(){}UT.prototype.isUserInExperimentTarget=function(t,r){var n=this;return 0===t.experiment.targetAudiences.length||t.experiment.targetAudiences.some(function(e){return n.targetMatcher.matches(t,r,e)})};var PT=UT;function UT(e){this.targetMatcher=e}LT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var DT=LT;function LT(e){this.targetMatcher=e}VT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},VT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},VT.prototype._resolveUserOverride=function(e){var t=e.experiment,e=e.user.identifiers[t.identifierType];if(e){e=t.userOverrides.get(e);if(e)return t._getVariationByIdOrNull(e)}},VT.prototype._resolveSegmentOverride=function(t,r){var n=this,e=t.experiment.segmentOverrides.find(function(e){return n.targetMatcher.matches(t,r,e.target)});if(e)return this.actionResolver.resolveOrNull(t,r,e.action)};var FT=VT;function VT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}zT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(a.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var jT=zT;function zT(e){this.bucketer=e}BT.of=function(e,t,r,n){return new BT(r,t.targetEvaluations,e.inAppMessage,n,t.properties)};var HT=BT;function BT(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n,this.properties=i}KT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):HT.of(e,t,h.UNSUPPORTED_PLATFORM)};var GT=KT;function KT(){}YT.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),HT.of(e,t,h.OVERRIDDEN,n)):r.evaluate(e,t)};var JT=YT;function YT(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}$T.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?HT.of(e,t,h.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var qT=$T;function $T(){}WT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?HT.of(e,t,h.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var XT=WT;function WT(){}QT.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):HT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_PERIOD)};var ZT=QT;function QT(){}t_.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?HT.of(e,t,h.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var e_=t_;function t_(e){this.hiddenMatcher=e}n_.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),HT.of(e,t,h.IN_APP_MESSAGE_TARGET,n)):HT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var r_=n_;function n_(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}o_.prototype.resolve=function(e,t){return null!=(t=this.resolveExperiment(e,t))?t:this.resolveDefault(e)},o_.prototype.resolveExperiment=function(e,t){var r=e.inAppMessage.messageContext.experimentContext;if(!r)return null;var n=a.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[".concat(r.key,"]")}),n=q0.by(e,n),i=this.evaluator.evaluate(n,t),o=(this.addExperimentContext(i,t),e.inAppMessage.messageContext.defaultLang);return this.resolveMessage(e,function(e){return e.lang===o&&i.variationKey===e.variationKey})},o_.prototype.addExperimentContext=function(e,t){t.addEvaluation(e),t.setProperty("experiment_id",e.experiment.id),t.setProperty("experiment_key",e.experiment.key),t.setProperty("variation_id",e.variationId),t.setProperty("variation_key",e.variationKey),t.setProperty("experiment_decision_reason",e.reason)},o_.prototype.resolveDefault=function(e){var t=e.inAppMessage.messageContext.defaultLang;return this.resolveMessage(e,function(e){return e.lang===t})},o_.prototype.resolveMessage=function(e,t){t=e.inAppMessage.messageContext.messages.find(t);return a.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.inAppMessage.id,"]")})};var i_=o_;function o_(e){this.evaluator=e}a_.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},a_.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)};var s_=a_;function a_(){}c_.prototype.matches=function(t,r){var n=this,e=t.inAppMessage.targetContext.targets;return 0===e.length||e.some(function(e){return n.targetMatcher.matches(t,r,e)})};var u_=c_;function c_(e){this.targetMatcher=e}p_.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var l_=p_;function p_(e){this.storage=e}h_.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},h_.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(a.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return a.isNotNullOrUndefined(this.bucketer.bucketing(e,t))};var f_=h_;function h_(e,t){this.targetMatcher=e,this.bucketer=t}v_.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},v_.getOrNull=function(e){return v_.instances.get(e)},v_.register=function(e,t){return v_.instances.set(e,t),t},v_.instances=new Map;var d_=v_;function v_(){}m_.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},m_.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var y_=m_;function m_(e,t,r){var n=new lT,i=d_.register("targetMatcher",new sb(new oT(e))),o=new aT(n),t=new FT(t,i,o),s=new jT(n),s=(this.abTestFlow=fT.of(new dT(t),new MT,new xT(s),new TT(new PT(i)),new yT,new gT,new wT,new IT(o)),this.featureFlagFlow=fT.of(new yT,new gT,new wT,new dT(t),new MT,new OT(new DT(i),o),new RT(o)),new i_(e));this.inAppMessageFlow=fT.of(new GT,new JT(new s_,s),new qT,new XT,new ZT,new e_(new l_(r)),new r_(new u_(i),s)),this.remoteConfigParameterTargetRuleDeterminer=new f_(i,n)}E_.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return t&&o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[E_.ROOT_TYPE]=r.key.type,t[E_.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},E_.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof P0)return n[E_.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[E_.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[E_.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,y0.exposure(e.user,t,n,r);if(t instanceof V0)return y0.remoteConfig(e.user,t,c(c({},n),t.properties),r);if(t instanceof HT)return null;throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},E_.ROOT_TYPE="$targetingRootType",E_.ROOT_ID="$targetingRootId",E_.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",E_.EXPERIMENT_VERSION_KEY="$experiment_version",E_.EXECUTION_VERSION_KEY="$execution_version";var g_=E_;function E_(e){this.clock=e}Ne(T_,w_=lu),T_.prototype.supports=function(e){return void 0!==e.inAppMessage},T_.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:HT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var w_,b_=T_;function T_(e){var t=w_.call(this)||this;return t.evaluationFlowFactory=e,t}I_.of=function(e,t,r,n){return new I_(e,t,r,n)},I_.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var __=I_;function I_(e,t,r,n){this.key=new G0("IN_APP_MESSAGE",r.id),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var A_=s.log,O_=(N_.create=function(e,t,r,n){var i=new ib,r=new eb(r),r=new y_(i,r,n),n=new L0(r),o=new H0(r.remoteConfigParameterTargetRuleDeterminer),r=new b_(r);return i.add(n),i.add(o),new N_(n,o,r,e,new g_(Le.instance),t,new R_,Le.instance)},N_.prototype.experiment=function(e,t,r){var n=this;if(!e)return A_.error("experimentKey must not be empty"),Xe.of(r,h.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return A_.warn("SDK not ready."),Xe.of(r,h.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return A_.warn("Experiment does not exist."),Xe.of(r,h.EXPERIMENT_NOT_FOUND);i=q0.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},N_.prototype.experiments=function(r){var n=this,i=new Vn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=q0.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},N_.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,J0.create()),t=null!=(t=e.config)?t:new Ve;return[e,Xe.of(e.variationKey,e.reason,t,e.experiment)]},N_.prototype.featureFlag=function(e,t){var r=this;if(!e)return A_.error("featureKey must not be empty"),Ze.off(h.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return A_.warn("SDK not ready."),Ze.off(h.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return A_.warn("FeatureFlag does not exist."),Ze.off(h.FEATURE_FLAG_NOT_FOUND);n=q0.of(n,t,e,"A"),t=this.featureFlagInternal(n),e=t[0],t=t[1];return this.eventFactory.create(n,e).forEach(function(e){return r.eventProcessor.process(e)}),t},N_.prototype.featureFlags=function(r){var n=this,i=new Vn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=q0.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},N_.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,J0.create()),t=null!=(t=e.config)?t:new Ve;return[e,"A"===e.variationKey?Ze.off(e.reason,t,e.experiment):Ze.on(e.reason,t,e.experiment)]},N_.prototype.inAppMessage=function(e,t){var r=this,n=this.workspaceFetcher.get();if(!n)return A_.warn("SDK not ready."),qe.of(h.SDK_NOT_READY);e=n.getInAppMessageOrNull(e);if(!e)return A_.warn("In app message does not exist."),qe.of(h.IN_APP_MESSAGE_NOT_FOUND);n=__.of(n,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(n,J0.create());return this.eventFactory.create(n,t).forEach(function(e){return r.eventProcessor.process(e)}),qe.of(t.reason,t.inAppMessage,t.message,t.properties)},N_.prototype.tryInAppMessage=function(t,e){var r,n=Un.start();try{r=this.inAppMessage(t,e)}catch(e){A_.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=qe.of(h.EXCEPTION)}return xi.inAppMessage(n,t,r),r},N_.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?A_.warn("Event must be event type."):"object"!=typeof e||e.key&&"string"==typeof e.key?(n=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new ft(0,e.key),this.eventProcessor.process(y0.track(n,e,t,r))):A_.warn("Event key must be not null. or event key must be string type."):A_.warn("event must not be null.")},N_.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=C0.toEvent(e),this.flush(),this.track(e,t),this.flush())},N_.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},N_.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return A_.warn("SDK not ready."),Je.of(n,h.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return A_.warn("Remote config parameter does not exist."),Je.of(n,h.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=X0.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,J0.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Je.of(t.value,t.reason)},N_.prototype.close=function(){this.eventProcessor.close()},N_);function N_(e,t,r,n,i,o,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=i,this.eventProcessor=o,this.errorDedupDeterminer=s,this.clock=a}S_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},S_.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var R_=S_;function S_(){}C_.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},C_.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var x_=C_;function C_(){this._installed=[],this._installations={onerror:P_,onunhandledrejection:U_}}var M_,k_=null;function P_(o,s){k_=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),k_&&k_.apply(this,arguments)}}function U_(r,n){M_=window.onunhandledrejection,window.onunhandledrejection=function(e){var t;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}t instanceof Error&&r.trackException(t,n.resolve()),M_&&M_.apply(this,arguments)}}L_.prototype.read=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},L_.prototype.save=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},L_.prototype.add=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),[4,this.save(t.concat(r).slice(-this.maxSize))];case 2:return e.sent(),[2]}})})},L_.prototype.delete=function(n){return u(this,void 0,void 0,function(){var t,r=this;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),t=t.filter(function(e){return!r.isDeleteTarget(e,n)}),[4,this.save(t)];case 2:return e.sent(),[2]}})})},L_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},L_.prototype.clear=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var D_=L_;function L_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var F_=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},V_=(j_.builder=function(){return new z_},j_.empty=function(){return j_.builder().build()},j_.from=function(e){return new j_(e)},j_.fromDto=function(e){for(var t=j_.builder(),r=0,n=e.cohorts;r<n.length;r++){var i=n[r];t.put({identifier:i.identifier,cohorts:i.cohorts.map(function(e){return new nn(e)})})}return t.build()},Object.defineProperty(j_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),j_.prototype.get=function(e){return this.cohorts.get(e)},j_.prototype.filterBy=function(e){var r=yt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return j_.from(e)},j_.prototype.asArray=function(){return this.cohorts.values()},j_.prototype.asComparable=function(){return this.cohorts},j_.prototype.toBuilder=function(){return new z_(this)},j_);function j_(e){this.cohorts=e}H_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},H_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},H_.prototype.build=function(){return new V_(this.cohorts)};var z_=H_;function H_(e){this.cohorts=new Vn(xe.isEqual),e&&this.putAll(e)}var E="model",t="name",S="type",R="vendor",o="version",Ph="architecture",ud="console",g="mobile",x="tablet",k="smarttv",b="wearable",B_=(P.parse=function(e){return{browser:P.getBrowser(e),cpu:P.getCPU(e),device:P.getDevice(e),engine:P.getEngine(e),os:P.getOS(e)}},P.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return P.mapper.rgx.call(t,e,P.regexes.browser),t.major=P.util.major(t.version),t},P.getCPU=function(e){var t={architecture:void 0};return P.mapper.rgx.call(t,e,P.regexes.cpu),t},P.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return P.mapper.rgx.call(t,e,P.regexes.device),t},P.getEngine=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.getOS=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.util={extend:function(e,t){var r,n={};for(r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},P.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[t,o],[/(opios)[\/\s]+([\w\.]+)/i],[[t,"Opera Mini"],o],[/\s(opr)\/([\w\.]+)/i],[[t,"Opera"],o],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[t,o],[/(konqueror)\/([\w\.]+)/i],[[t,"Konqueror"],o],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[t,"IE"],o],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[t,"Edge"],o],[/(yabrowser)\/([\w\.]+)/i],[[t,"Yandex"],o],[/(Avast)\/([\w\.]+)/i],[[t,"Avast Secure Browser"],o],[/(AVG)\/([\w\.]+)/i],[[t,"AVG Secure Browser"],o],[/(puffin)\/([\w\.]+)/i],[[t,"Puffin"],o],[/(focus)\/([\w\.]+)/i],[[t,"Firefox Focus"],o],[/(opt)\/([\w\.]+)/i],[[t,"Opera Touch"],o],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[t,"UCBrowser"],o],[/(comodo_dragon)\/([\w\.]+)/i],[[t,/_/g," "],o],[/(windowswechat qbcore)\/([\w\.]+)/i],[[t,"WeChat(Win) Desktop"],o],[/(micromessenger)\/([\w\.]+)/i],[[t,"WeChat"],o],[/(brave)\/([\w\.]+)/i],[[t,"Brave"],o],[/(whale)\/([\w\.]+)/i],[[t,"Whale"],o],[/(qqbrowserlite)\/([\w\.]+)/i],[t,o],[/(QQ)\/([\d\.]+)/i],[t,o],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[t,o],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[t,o],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[t,o],[/(MetaSr)[\/\s]?([\w\.]+)/i],[t],[/(LBBROWSER)/i],[t],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[o,[t,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[o,[t,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[t,o],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[o,[t,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[t,/(.+)/,"$1 WebView"],o],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[t,/(.+(?:g|us))(.+)/,"$1 $2"],o],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[t,"Chrome Mobile"],o],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[o,[t,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[t,"Sailfish Browser"],o],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[t,o],[/(dolfin)\/([\w\.]+)/i],[[t,"Dolphin"],o],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[t,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[t,"Opera Coast"],o],[/fxios\/([\w\.-]+)/i],[o,[t,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[o,[t,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[o,t],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[t,"GSA"],o],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[t,[o,(P.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!o;)if(o=u[l++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(P.util.has(t[r][n],e))return"?"===r?void 0:r}else if(P.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(P.maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}}).browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[t,o],[/(navigator|netscape)\/([\w\.-]+)/i],[[t,"Netscape"],o],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[t,o]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[Ph,"amd64"]],[/(ia32(?=;))/i],[[Ph,P.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[Ph,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[Ph,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[Ph,/ower/,"",P.util.lowerize]],[/(sun4\w)[;\)]/i],[[Ph,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[Ph,P.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[E,R,[S,x]],[/applecoremedia\/[\w\.]+ \((ipad)/],[E,[R,"Apple"],[S,x]],[/(apple\s{0,1}tv)/i],[[E,"Apple TV"],[R,"Apple"],[S,k]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[R,E,[S,x]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[E,[R,"Amazon"],[S,x]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[E,P.mapper.str,P.maps.device.amazon.model],[R,"Amazon"],[S,g]],[/android.+aft([bms])\sbuild/i],[E,[R,"Amazon"],[S,k]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[E,R,[S,g]],[/\((ip[honed|\s\w*]+);/i],[E,[R,"Apple"],[S,g]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[R,E,[S,g]],[/\(bb10;\s(\w+)/i],[E,[R,"BlackBerry"],[S,g]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[E,[R,"Asus"],[S,x]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[E,"Xperia Tablet"],[S,x]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[R,"Sony"],[S,g]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[R,E,[S,ud]],[/android.+;\s(shield)\sbuild/i],[E,[R,"Nvidia"],[S,ud]],[/(playstation\s[34portablevi]+)/i],[E,[R,"Sony"],[S,ud]],[/(sprint\s(\w+))/i],[[R,P.mapper.str,P.maps.device.sprint.vendor],[E,P.mapper.str,P.maps.device.sprint.model],[S,g]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[R,[E,/_/g," "],[S,g]],[/(nexus\s9)/i],[E,[R,"HTC"],[S,x]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[E,[R,"Huawei"],[S,g]],[/android.+(bah2?-a?[lw]\d{2})/i],[E,[R,"Huawei"],[S,x]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,E,[S,g]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[E,[R,"Microsoft"],[S,ud]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[R,"Microsoft"],[S,g]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[E,[R,"Motorola"],[S,g]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[E,[R,"Motorola"],[S,x]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[R,P.util.trim],[E,P.util.trim],[S,k]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[R,"Samsung"],[S,k]],[/\(dtv[\);].+(aquos)/i],[E,[R,"Sharp"],[S,k]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[R,"Samsung"],E,[S,x]],[/smart-tv.+(samsung)/i],[R,[S,k],E],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[R,"Samsung"],E,[S,g]],[/sie-(\w*)/i],[E,[R,"Siemens"],[S,g]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[R,"Nokia"],E,[S,g]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[E,[R,"Acer"],[S,x]],[/android.+([vl]k\-?\d{3})\s+build/i],[E,[R,"LG"],[S,x]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],E,[S,x]],[/(lg) netcast\.tv/i],[R,E,[S,k]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[E,[R,"LG"],[S,g]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[R,E,[S,x]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[E,[R,"Lenovo"],[S,x]],[/(lenovo)[_\s-]?([\w-]+)/i],[R,E,[S,g]],[/linux;.+((jolla));/i],[R,E,[S,g]],[/((pebble))app\/[\d\.]+\s/i],[R,E,[S,b]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[R,E,[S,g]],[/crkey/i],[[E,"Chromecast"],[R,"Google"],[S,k]],[/android.+;\s(glass)\s\d/i],[E,[R,"Google"],[S,b]],[/android.+;\s(pixel c)[\s)]/i],[E,[R,"Google"],[S,x]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[E,[R,"Google"],[S,g]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[E,/_/g," "],[R,"Xiaomi"],[S,g]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[E,/_/g," "],[R,"Xiaomi"],[S,x]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[E,[R,"Meizu"],[S,g]],[/(mz)-([\w-]{2,})/i],[[R,"Meizu"],E,[S,g]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[E,[R,"OnePlus"],[S,g]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[E,[R,"RCA"],[S,x]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[E,[R,"Dell"],[S,x]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[E,[R,"Verizon"],[S,x]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],E,[S,x]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[E,[R,"NuVision"],[S,x]],[/android.+;\s(k88)\sbuild/i],[E,[R,"ZTE"],[S,x]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[E,[R,"Swiss"],[S,g]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[E,[R,"Swiss"],[S,x]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[E,[R,"Zeki"],[S,x]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],E,[S,x]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[E,[R,"Insignia"],[S,x]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[E,[R,"NextBook"],[S,x]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[R,"Voice"],E,[S,g]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[R,"LvTel"],E,[S,g]],[/android.+;\s(PH-1)\s/i],[E,[R,"Essential"],[S,g]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[E,[R,"Envizen"],[S,x]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,E,[S,x]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[E,[R,"MachSpeed"],[S,x]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,E,[S,x]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[E,[R,"Rotor"],[S,x]],[/android.+(KS(.+))\s+build/i],[E,[R,"Amazon"],[S,x]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,E,[S,x]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[S,P.util.lowerize],R,E],[/[\s\/\(](smart-?tv)[;\)]/i],[[S,k]],[/(android[\w\.\s\-]{0,9});.+build/i],[E,[R,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[o,[t,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[o,[t,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[t,o],[/rv\:([\w\.]{1,9}).+(gecko)/i],[o,t]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[t,o],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[t,P.mapper.str,P.maps.os.windows],[o,P.mapper.str,P.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[t,"Windows"],[o,P.mapper.str,P.maps.os.windows.version]],[/\((bb)(10);/i],[[t,"BlackBerry"],o],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[t,o],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[t,"Symbian"],o],[/\((series40);/i],[t],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[t,"Firefox OS"],o],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[[t,"Linux"],o],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[t,"Chromium OS"],o],[/(sunos)\s?([\w\.\d]*)/i],[[t,"Solaris"],o],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[t,"Linux"],o],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[t,"iOS"],[o,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[t,"iOS"],[o,/_/g,"."]],[/(haiku)\s(\w+)/i],[t,o],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[o,/_/g,"."],[t,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[t,"Mac"],[o,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[t,o]]},P);function P(){}K_.generate=function(e){o=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:o={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:o,screen:{width:"",height:""}}:e;var t,r,n,i,o,e=B_.parse(o.navigator.userAgent),s=e.browser,a=e.os,e=e.device,u=(o.location.protocol||"").replace(":",""),c=o.screen,l=(null==(l=o.navigator.languages)?void 0:l[0])||"",p=l.split("-")[0],f=(null!=(f=e.type)?f:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),h=a.name||"",d="",v="";try{h=null!=(r=null==(t=h.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:h,d=null!=(i=null==(n=c.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",v=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:s.name||"",browserMajorVersion:s.major||"",browserVersion:s.version||"",osName:h,osVersion:a.version||"",deviceModel:e.model||"",deviceType:f,deviceVendor:e.vendor||"",deviceBrand:e.vendor||"",locale:l,language:p,orientation:d,userAgent:o.navigator.userAgent||"",pagePath:o.location.pathname||"",pageTitle:o.document.title||"",host:o.location.host||"",url:o.location.href||"",protocol:u,referrer:o.document.referrer||"",queryParameter:o.location.search||"",screenWidth:c.width||"",screenHeight:c.height||"",timeZone:v}};var G_=K_;function K_(){}Y_.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return X_.of(Z_(e,this.hackleDeviceId),V_.empty())},Y_.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(Y_.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),Y_.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},Y_.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},Y_.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},Y_.prototype.hackleUser=function(e){var t=(new mt).addIdentifiers(e.user.identifiers||{}).add(dt.ID,e.user.id||this.hackleDeviceId).add(dt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(dt.HACKLE_DEVICE,this.hackleDeviceId),t=(a.isNotNullOrUndefined(e.user.userId)&&t.add(dt.USER,e.user.userId),t.build()),r=this.campaignParser.parse();return{identifiers:t,properties:c(c({},r),e.user.properties),hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},Y_.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?G_.generate(window):e)||{}},Y_.prototype.setUser=function(e){return this.updateUser(e).user},Y_.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},Y_.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},Y_.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},Y_.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},Y_.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},Y_.prototype.saveUser=function(e){this.storage.saveUser(e)},Y_.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,F_(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},Y_.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=Z_(r,n.hackleDeviceId),F_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},Y_.prototype.operateProperties=function(r){return this.updateContext(function(e){var t=null!=(t=e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return c(c({},e),{properties:a.fromMap(t)})})},Y_.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.cohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},Y_.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var J_=Y_;function Y_(e,t,r,n,i,o,s){this.hackleDeviceId=e,this.storage=t,this.cohortFetcher=r,this.campaignParser=n,this.clock=i,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(o,s),this.storage.saveUser(this.context.user)}$_.prototype.getUser=function(){var e=this.deviceId||void 0,t=this.userId||void 0;return void 0!==e||void 0!==t?{deviceId:e,userId:t}:null},$_.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty($_.prototype,"deviceId",{get:function(){return this.storage.getItem(_n)},enumerable:!1,configurable:!0}),Object.defineProperty($_.prototype,"userId",{get:function(){return this.storage.getItem(Tn)},enumerable:!1,configurable:!0}),$_.prototype.setDeviceId=function(e){this.setId(_n,e)},$_.prototype.setUserId=function(e){this.setId(Tn,e)},$_.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var q_=$_;function $_(e){this.storage=e}W_.of=function(e,t){return new W_(e,t.filterBy(e))},W_.prototype.with=function(e){return W_.of(e,this.cohorts.filterBy(e))},W_.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return W_.of(this.user,e)};var X_=W_;function W_(e,t){this.user=e,this.cohorts=t}var Z_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},Q_=(Object.defineProperty(eI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(eI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:eI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(eI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),eI.prototype.addListener=function(e){this.sessionListeners.push(e)},eI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},eI.prototype.startNewSessionIfNeeded=function(e,t){var r=this._lastEventTime;return null!==r&&null!==this._currentSessionId&&t-r<this.sessionTimeoutMillis?(this.updateLastEventTime(t),this._currentSessionId):this.startNewSession(e,e,t)},eI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(bn,"".concat(e))},eI.prototype.endSession=function(t){var r=this._currentSessionId,n=this._lastEventTime;null!==r&&null!==n&&this.sessionListeners.forEach(function(e){return e.onSessionEnded(r,t,n)})},eI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(H().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},eI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(wn,e)},eI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(wn)},eI.prototype.loadLastEventTime=function(){var e=this.storage.getItem(bn);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},eI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},eI.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.updateLastEventTime(t)}},eI.EMPTY_SESSION_ID="0.ffffffff",eI);function eI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}rI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},rI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},rI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},rI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var tI=rI;function rI(){this.storage=window.localStorage}iI.postfix=function(e,t){return new iI(e,function(e){return"".concat(e).concat(t)})},iI.prefix=function(e,t){return new iI(e,function(e){return"".concat(t).concat(e)})},iI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},iI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},iI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var nI=iI;function iI(e,t){this.delegate=e,this.transform=t}sI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},sI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},sI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},sI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),i=0;return n.findIndex(function(e){return(i+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},sI.prototype.getList=function(){try{var e=this.delegate.getItem(this.listKey);if(!e)return[];var t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}},sI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},sI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),i=((r={})[e]=t,r);if(!this.isAddableItem(i)){var o=this.getVictimIndex(i);if(o<0)return;n=n.slice(o+1)}var s=JSON.stringify(n.concat(i));this.delegate.setItem(this.listKey,s)}catch(e){}},sI.prototype.getItem=function(t){var r=this,e=this.getList().find(function(e){return r.isEqualItem(e,t)});if(e&&e[t])return e[t]},sI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(e){}},sI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var oI=sI;function sI(e,t,r){void 0===r&&(r=4096);var n=this;this.delegate=e,this.listKey=t,this.encodedListCharLen=6,this.resolveMaxLength=function(e){e-=n.encodedListCharLen;return e<0?0:e},this.maxLength=this.resolveMaxLength(r)}uI.prototype.currentUser=function(){return this.userManager.resolve()},uI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},uI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},uI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},uI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},uI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},uI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},uI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},uI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},uI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},uI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},uI.prototype.increment=function(e,t){hi.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var aI=uI;function uI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}lI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},lI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},lI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},lI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},lI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},lI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},lI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},lI.monitoring=function(e){return"".concat(e,"/metrics")};var cI=lI;function lI(){}fI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(a.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},fI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},fI.prototype.key=function(e){return"".concat(e.key)};var pI=fI;function fI(e){this.storage=e}dI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var hI=dI;function dI(e){this.handlers=e}yI.prototype.handle=function(e,t){e.close()},yI.prototype.supports=function(e){return"CLOSE"===e.type};var vI=yI;function yI(){}gI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},gI.prototype.supports=function(e){return"WEB_LINK"===e.type};var mI=gI;function gI(e){this.urlHandler=e}wI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},wI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var EI=wI;function wI(e){this.urlHandler=e}TI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+TI.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},TI.prototype.supports=function(e){return"HIDDEN"===e.type},TI.HIDE_EXPIRATION=864e5;var bI=TI;function TI(e,t){this.storage=e,this.clock=t}II.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},II.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var _I=II;function II(e){this.urlHandler=e}OI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},OI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var AI=OI;function OI(e){this.urlHandler=e}RI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},RI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var NI=RI;function RI(e){this.urlHandler=e}xI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},xI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var SI=xI;function xI(e){this.urlHandler=e}MI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},MI.prototype.createTrackEvent=function(e,t){switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,title_text:null==(r=null==(r=t.message.text)?void 0:r.title)?void 0:r.text,body_text:null==(r=null==(r=t.message.text)?void 0:r.body)?void 0:r.text,button_text:t.message.buttons.map(function(e){return e.text}),image_url:t.message.images.map(function(e){return e.imagePath})})};case"CLOSE":return{key:"$in_app_close",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key})};case"ACTION":var r=e;return{key:"$in_app_action",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.text})}}};var CI=MI;function MI(e){this.core=e}PI.prototype.present=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(this.currentMessageView)return[2];if(this.opening)return[2];this.opening=!0,t=null,e.label=1;case 1:return e.trys.push([1,3,4,5]),t=this.messageViewFactory.create(r,this),[4,(this.currentMessageView=t).open()];case 2:return e.sent(),[3,5];case 3:return e.sent(),null!=t&&t.close(),[3,5];case 4:return this.opening=!1,[7];case 5:return[2]}})})};var kI=PI;function PI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}DI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},DI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var UI=DI;function DI(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.presenter=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.presenter.present(e)},this.initialize()}var LI=function(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n},FI=(VI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var i=n[r];if(this.eventMatcher.matches(t,i,e)){i=this.context(i,e);if(i)return i}}},VI.prototype.context=function(e,t){var r,e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return r=c(c({},e.properties),{decision_reason:e.reason}),new LI(e.inAppMessage,e.message,t.user,ke.sanitize(r))},VI);function VI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}zI.prototype.open=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(zI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),[4,this.scriptLoader.load()];case 1:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(zI.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),r=this.context.user.hackleProperties.deviceType,[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),deviceType:r?String(r):null})];case 2:return e.sent(),t.classList.remove("".concat(zI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleEvent({type:"IMPRESSION"}),[3,4];case 3:return e.sent(),this.close(),[3,4];case 4:return[2]}})})},zI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(zI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},zI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(zI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},zI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},zI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},zI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},zI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",zI.CONTAINER_CLASS_NAME="hackle-iam";var jI=zI;function zI(e,t,r){var n=this;this.scriptLoader=e,this.context=t,this.ui=r,this.container=null,this.renderer=null,this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===zI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}BI.create=function(e){return new BI(e)},BI.prototype.create=function(e,t){return new jI(this.scriptLoader,e,t)};var HI=BI;function BI(e){this.scriptLoader=e}KI.prototype.load=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return window.HackleInAppMessageRenderer?[2]:(t=this.createScript(),document.head.appendChild(t),[4,this.waitForLoad(t)]);case 1:return[2,e.sent()]}})})},KI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},KI.prototype.waitForLoad=function(o){return new Promise(function(e,t){function r(){o.removeEventListener("error",i),o.removeEventListener("load",n)}var n=function(){r(),e(o)},i=function(e){r(),t(e.message)};o.addEventListener("load",n),o.addEventListener("error",i)})};var GI=KI;function KI(e){this.scriptUrl=e}YI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},YI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=qI.of(e,t,r);return this.targetMatcher.anyMatches(e,J0.create(),n.targets)};var JI=YI;function YI(e){this.targetMatcher=e}$I.of=function(e,t,r){return new $I(new G0("IN_APP_MESSAGE",r.id),e,t.user,t)};var qI=$I;function $I(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}WI.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var i=0,o=this.storage.get(t);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},WI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new ZI(new eA(i)))}return e.durationCap&&t.push(new ZI(new rA(e.durationCap))),t};var XI=WI;function WI(e){this.storage=e}QI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var ZI=QI;function QI(e){this.matchCount=0,this.predicate=e}Object.defineProperty(tA.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),tA.prototype.matches=function(e,t){e=e.user.identifiers[this.identifierCap.identifierType];if(a.isNullOrUndefined(e))return!1;t=t.identifiers[this.identifierCap.identifierType];return!a.isNullOrUndefined(t)&&e===t};var eA=tA;function tA(e){this.identifierCap=e}Object.defineProperty(nA.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),nA.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis};var rA=nA;function nA(e){this.durationCap=e}oA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},oA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var iA=oA;function oA(e){this.storage=e}aA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var sA=aA;function aA(e){this.processors=e}cA.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},cA.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>cA.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-cA.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},cA.prototype.supports=function(e){return"IMPRESSION"===e.type},cA.IMPRESSION_MAX_SIZE=100;var uA=cA;function cA(e){this.impressionStorage=e}pA.prototype.process=function(e,t,r){},pA.prototype.supports=function(e){return"CLOSE"===e.type};var lA=pA;function pA(){}hA.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},hA.prototype.supports=function(e){return"ACTION"===e.type};var fA=hA;function hA(e){this.actionHandlerFactory=e}vA.prototype.handle=function(e,t){var r=this.clock.currentMillis(),n=(this.eventTracker.track(e.context,t,r),this.eventProcessorFactory.get(t));n&&n.process(e,t,r)};var dA=vA;function vA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}mA.prototype.matches=function(e,t,r){return!!y0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var yA=mA;function mA(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}EA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var gA=EA;function EA(e){this.handlers=e}bA.prototype.handle=function(e,t){e.close()},bA.prototype.supports=function(e){return"CLOSE"===e.type};var wA=bA;function bA(){}_A.prototype.handle=function(e,t){var r=tn.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},_A.prototype.supports=function(e){return"ACTION"===e.type};var TA=_A;function _A(e){this.eventHandler=e}AA.prototype.open=function(e){window.location.href=e.href};var IA=AA;function AA(){}NA.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var OA=NA;function NA(){}SA.prototype.open=function(e){window.open(e.href)};var RA=SA;function SA(){}CA.prototype.open=function(e){window.location.replace(e)};var xA=CA;function CA(){}function MA(e,t,r){return null===e||(!UA(t,kA)||r.current!==r.referrer)&&!UA(e,t)}var kA={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,gclid:void 0,fbclid:void 0},PA={current:void 0,referrer:void 0},UA=function(t,r){return Object.keys(kA).every(function(e){return t[e]===r[e]})},DA=(LA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},kA),t),n=new mo,i=0,o=Object.entries(t);i<o.length;i++){var s=o[i],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userManager.toHackleUser(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},LA.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();MA(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},LA.prototype.onSessionEnded=function(e,t,r){},LA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},LA);function LA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}VA.prototype.get=function(){var e=this.storage.getItem(In);return e?JSON.parse(e):null},VA.prototype.set=function(e){this.storage.setItem(In,JSON.stringify(e))};var FA=VA;function VA(e){this.storage=e}zA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},zA.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(t[o]=decodeURIComponent(i))}return t},zA.getQueryParams=function(e){return"undefined"==typeof window?{}:new zA(window.location.search).getQueryParams(e)};var jA=zA;function zA(e){this.search=e}BA.extractDomain=function(e){var t=this.DOMAIN_MATCH_REGEX,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=this.SIMPLE_DOMAIN_MATCH_REGEX),e.match(t));return r?r[0]:e},BA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,BA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var HA=BA;function BA(){}KA.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},KA.prototype.params=function(e){return(a.isNullOrUndefined(e)?jA:new jA(e)).getQueryParams(KA.CAMPAIGN_QUERY_CONDITION)},KA.prototype.resolve=function(e){return{utm_campaign:e[JA],utm_content:e[YA],utm_id:e[qA],utm_medium:e[$A],utm_source:e[XA],utm_term:e[WA],gclid:e[ZA],fbclid:e[QA]}},KA.prototype.parseDomain=function(){if("undefined"==typeof window)return PA;return{current:HA.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,HA.extractDomain(e)}()}},KA.CAMPAIGN_QUERY_CONDITION=function(e,t){return vi.isNotEmptyString(t)};var GA=KA;function KA(){}var JA="utm_campaign",YA="utm_content",qA="utm_id",$A="utm_medium",XA="utm_source",WA="utm_term",ZA="gclid",QA="fbclid",eO=(tO.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},tO.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,t="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:t})}catch(e){s.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},tO);function tO(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){e=r.determiner.determineTargetExposureOrNull(e);e&&r.send(e)},this.initialize()}nO.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!y0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==h.TRAFFIC_ALLOCATED?null:e};var rO=nO;function nO(e){this.workspaceFetcher=e}var iO={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://client-sdk.hackle.io",eventUrl:"https://event.hackle.io",monitoringUrl:"https://monitoring.hackle.io",cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.32.0",IAM_RENDERER_VERSION_HEADER:"0.0.6"},oO=(sO.config=function(e){return c(c({},iO),e)},sO.logging=function(e){s.initCounter(function(e){return hi.counter("log",{level:e})}),s.setLogLevel(Te.INFO),e.log_disabled?s.setLogLevel(Te.DISABLE):e.debug&&s.setLogLevel(Te.DEBUG)},sO.sdk=function(e,t){return s.log.debug("SDK key: ".concat(e)),e||s.log.error("invalid sdk key: '".concat(e,"' (expected: not null, not undefined and not empty string)")),{key:e,name:t.SDK_NAME_HEADER,version:t.SDK_VERSION_HEADER}},sO.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},sO.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},sO.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(s.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},sO);function sO(){}uO.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},uO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.sync())}))];case 1:return e.sent(),[2]}})})},uO.prototype.syncOnly=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(t=this.synchronizations.find(function(e){return e.type===r}))return[4,t.synchronizer.sync()];throw new Error("Unsupported SynchronizerType [".concat(r,"]"));case 1:return e.sent(),[2]}})})},uO.prototype.close=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.close())}))];case 1:return e.sent(),[2]}})})},uO.prototype.safe=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})};var aO=uO;function uO(){this.synchronizations=[]}lO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},lO.prototype.syncOnly=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.syncOnly(r)];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},lO.prototype.start=function(){var e=this;-1!==this.intervalMillis&&null===this.pollingJob&&(this.pollingJob=this.scheduler.schedulePeriodically(this.intervalMillis,this.intervalMillis,function(){return e.sync()}))},lO.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},lO.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var cO=lO;function lO(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}fO.prototype.schedule=function(e,t){e=new hO(e,t);return e.start(),e},fO.prototype.schedulePeriodically=function(e,t,r){e=new vO(e,t,r);return e.start(),e};var pO=fO;function fO(){}dO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},dO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var hO=dO;function dO(e,t){this.delayMillis=e,this.task=t,this.timeout=null}yO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},yO.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},yO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var vO=yO;function yO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}gO.prototype.fetchIfModified=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},gO.prototype.createRequest=function(e){var t=mi.builder().url(this.url).method("GET");return null!==e&&t.addHeader(_i.IF_MODIFIED_SINCE,e),t.build()},gO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Un.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Mi.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Mi.record("get.workspace",t,null),r;case 4:return[2]}})})},gO.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");return{config:JSON.parse(e.body),lastModified:e.headers.get(_i.LAST_MODIFIED)}};var mO=gO;function gO(e,t){this.url=e,this.transport=t}wO.prototype.fetch=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},wO.prototype.createRequest=function(e){e={identifiers:yt(e)},e=Ee.encodeURL(JSON.stringify(e));return mi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},wO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Un.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Mi.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Mi.record("get.cohorts",t,null),r;case 4:return[2]}})})},wO.prototype.handleResponse=function(e){if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is null");e=JSON.parse(e.body);return V_.fromDto(e)};var EO=wO;function wO(e,t){this.url=e,this.transport=t}TO.prototype.getExperiments=function(){return Array.from(this.experiments.values())},TO.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},TO.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},TO.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},TO.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},TO.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},TO.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},TO.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},TO.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},TO.prototype.getContainerOrNull=function(e){return this.containers.get(e)},TO.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},TO.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},TO.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},TO.prototype.getAttributes=function(){return this.attributes},TO.from=function(e){return new TO(p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return ot.fromJson("FEATURE_FLAG",e)}),e.buckets.map(ut.fromJson),e.events.map(ft.fromJson),p.mapNotNullOrUndefined(e.segments,Mt.fromJson),e.containers.map(Pt.fromJson),e.parameterConfigurations.map(rt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Ft.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,dr.fromJson),e.workspace.attributes)};var bO=TO;function TO(e,t,r,n,i,o,s,a,u,c,l){this.experiments=p.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=p.associateBy(t,function(e){return e.key}),this.featureFlags=p.associateBy(r,function(e){return e.key}),this.buckets=p.associateBy(n,function(e){return e.id}),this.eventTypes=p.associateBy(i,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(s,function(e){return e.id}),this.parameterConfigurations=p.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(u,function(e){return e.key}),this.inAppMessages=p.associateBy(c,function(e){return e.key}),this.attributes=l}IO.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},IO.prototype.setWorkspace=function(e){try{this.workspace=bO.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},IO.prototype.get=function(){return this.workspace},IO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.workspaceFetcher.fetchIfModified(this.lastModified)];case 1:return(t=e.sent())&&(this.setConfig(t),this.workspaceConfigStorage.set(t)),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},IO.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var _O=IO;function IO(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}OO.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},OO.prototype.dispatchEventsSynchronously=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.retryManager.add(r)];case 1:return e.sent(),[4,this.synchronousTransport.send(r)];case 2:return(t=e.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(r)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},OO.prototype.dispatchEvents=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.transport.send(r)];case 1:return(t=e.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(r)];case 2:return e.sent(),[2]}})})};var AO=OO;function OO(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}RO.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},RO.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof y0?y0.isExposureEvent(e)?t.push(e.toDto()):y0.isTrackEvent(e)?r.push(e.toDto()):y0.isRemoteConfigEvent(e)&&n.push(e.toDto()):y0.isExposureEventDto(e)?t.push(e):y0.isTrackEventDto(e)?r.push(e):y0.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return mi.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},RO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Un.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Mi.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Mi.record("post.events",t,null),r;case 4:return[2]}})})};var NO=RO;function RO(e,t){this.url=e,this.transport=t}xO.prototype.add=function(e){return this.repository.add(e)},xO.prototype.delete=function(e){return this.repository.delete(e)},xO.prototype.flush=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return[4,this.repository.read()];case 1:return 0===(t=e.sent()).length?[2]:[4,this.transport.send(t)];case 2:return(r=e.sent()).isSuccessful()||r.isClientError()?[4,this.delete(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},xO.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"hidden":return}};var SO=xO;function xO(e,t){this.repository=e,this.transport=t}function CO(){this.listeners={}}CO.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},CO.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},CO.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ne(kO,MO=CO);var MO,i=kO;function kO(){return null!==MO&&MO.apply(this,arguments)||this}Ne(DO,PO=i),DO.prototype.process=function(e){this.isEnqueueTarget(e)&&this.enqueue(e),this.emit("event",e)},DO.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},DO.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},DO.prototype.isPageViewEvent=function(e){return y0.isTrackEvent(e)&&"$page_view"===e.event.key},DO.prototype.isEnqueueTarget=function(e){return!(this.isPageViewEvent(e)&&!this.autoTrackPageView)},DO.prototype.flush=function(e){var t;void 0===e&&(e=!1),null!=(t=this.flushingJob)&&t.cancel(),0!==this.queue.length&&(this.eventDispatcher.dispatch(this.queue,e).catch(function(e){return s.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},DO.prototype.close=function(){this.flush(!0)};var PO,UO=DO;function DO(e,t,r,n,i){var o=PO.call(this)||this;return o.eventDispatcher=e,o.eventDispatchMaxSize=t,o.flushScheduler=r,o.flushIntervalMillis=n,o.autoTrackPageView=i,o.queue=[],o.flushingJob=null,o}FO.prototype.send=function(e){e=e.toBuilder().addHeader(cn,this.sdk.key).addHeader(ln,this.sdk.name).addHeader(pn,this.sdk.version).addHeader(fn,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var LO=FO;function FO(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}jO.intercept=function(e,t){return t instanceof LO?t:new LO(e,Le.instance,t)};var VO=jO;function jO(){}HO.create=function(){return new HO},HO.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,i=(s.options.timeoutMillis&&(n.timeout=s.options.timeoutMillis),n.open(s.method,s.url),n.onreadystatechange=function(){var e;n.readyState===n.DONE&&(0===n.status?r(new Error("Request Error")):(e=new bi(n.status,n.responseText,function(e){var t=_i.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})};var zO=HO;function HO(){}GO.create=function(){return new GO},GO.prototype.send=function(n){var i=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(bi.ok())})},GO.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(cn),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(ln,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(pn,"unknown")),e.headers.get(fn));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var BO=GO;function GO(){}JO.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var KO=JO;function JO(e){this.invocationResponseResolver=e}$O.prototype.invoke=function(e){if(null==(t=window._hackleApp)||!t.invoke)throw new Error("window._hackleApp.invoke is not implemented");var t=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)};var YO,qO=$O;function $O(e){this.invocationResponseResolver=e}(js=YO=YO||{}).prompt="prompt",js.function="function";WO.prototype.getInvocator=function(e,t){return e===YO.prompt?new KO(t):e===YO.function?new qO(t):null};var XO=WO;function WO(){}QO.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},QO.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var ZO=QO;function QO(e,t,r,n){var i=this;this.userEventEmitter=e,this.determiner=t,this.redirector=r,this.core=n,this.onEvent=function(e){e=i.determiner.determineOrNull(e);e&&(i.core.flush(!0),i.redirector.redirect(e))},this.initialize()}var eN=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.event=n},tN=(rN.prototype.determineOrNull=function(e){if(!y0.isTrackEvent(e))return null;if("$page_view"!==e.event.key)return null;if(this.splitUrlRedirectedCookieStorage.alreadyRedirected())return this.splitUrlRedirectedCookieStorage.clear(),null;var t=this.workspaceFetcher.get();if(!t)return null;for(var r=0,n=t.getSplitUrlExperiments();r<n.length;r++){var i,o=n[r];if(this.splitUrlMatcher.matches(t,o,e))return i=this.core.experiment(o.key,e.user,"A"),new eN(t,o,i,e)}return null},rN);function rN(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}iN.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=oN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,J0.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,J0.create(),t.includeTargets))};var nN=iN;function iN(e){this.targetMatcher=e}sN.of=function(e,t){return new sN(new G0("SPLIT_URL",t.insertId),t.user,e)};var oN=sN;function sN(e,t,r){this.key=e,this.user=t,this.workspace=r}uN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var aN=uN;function uN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}lN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(lN.SPLIT_URL_CONFIG_KEY,"")),r=on.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},lN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},lN.prototype.resolveManualRedirectUrl=function(e,t){e=db.tryParse(e);return e?this.decorateCampaign(e,t):null},lN.prototype.decorateCampaign=function(e,t){t=t.event.user.hackleProperties.queryParameter;if(vi.isNotEmptyString(t)){for(var t=this.campaignParser.parse(t),r=e,n=0,i=Object.entries(t);n<i.length;n++){var o=i[n],s=o[0],o=o[1];vi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},lN.SPLIT_URL_CONFIG_KEY="redirectUrl";var cN=lN;function lN(e){this.campaignParser=e}fN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return a.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},fN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},fN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var pN=fN;function fN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}dN.prototype.setNeedDispatch=function(e){this.needDispatch=e},dN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(dN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},dN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var hN=dN;function dN(){this.needDispatch=!0}yN.prototype.get=function(){var e=this.storage.getItem(Cn);if(a.isNullOrUndefined(e))return null;try{var t=JSON.parse(e);return this.sdk.version!==t.version?(this.clear(),null):t}catch(e){return this.clear(),null}},yN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(Cn,JSON.stringify(e))},yN.prototype.clear=function(){this.storage.removeItem(Cn)};var vN=yN;function yN(e,t){this.sdk=e,this.storage=t}gN.prototype.addListener=function(e){this.listeners.push(e)},gN.prototype.changeVisibility=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onVisibilityChanged(t,r)})};var mN=gN;function gN(e){void 0===e&&(e=Le.instance),this.clock=e,this.listeners=[]}wN.create=function(e,t,r){return void 0===r&&(r=Le.instance),new wN(new bN(r,e,t))},wN.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var EN=wN;function wN(e){this.limiter=e}TN.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},TN.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new _N(e+this.intervalMillis,this.limit)),this.currentScope};var bN=TN;function TN(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}IN.prototype.isExpired=function(e){return this.expirationTime<e},IN.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var _N=IN;function IN(e,t){this.expirationTime=e,this.token=t}ON.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var AN=ON;function ON(e){this.determiners=e}NN.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;xe.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache={});var t=this.cacheKey(e),e=this.clock.currentMillis(),r=this.cache[t];return void 0!==r&&e-r<=this.dedupIntervalMillis||(this.cache[t]=e,!1)};rp=NN;function NN(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}Ne(xN,RN=rp),xN.prototype.supports=function(e){return y0.isRemoteConfigEvent(e)},xN.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var RN,SN=xN;function xN(e,t){return void 0===t&&(t=Le.instance),RN.call(this,e,t)||this}Ne(kN,CN=rp),kN.prototype.supports=function(e){return y0.isExposureEvent(e)},kN.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var CN,MN=kN;function kN(e,t){return void 0===t&&(t=Le.instance),CN.call(this,e,t)||this}var PN=s.log,UN=null;function DN(e,t){t=oO.config(t);oO.logging(t);try{if((n=window)&&"_hackleApp"in n&&null!==n._hackleApp&&"object"==typeof n._hackleApp&&("getAppSdkKey"in n._hackleApp&&"function"==typeof n._hackleApp.getAppSdkKey&&("getInvocationType"in n._hackleApp&&"function"==typeof n._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){i=window._hackleApp.getInvocationType();var r=null===(o=(o=new XO).getInvocator(i,new So))?(jo.error("Failed to get invocator with invocationType:".concat(i)),null):new zo(new Fo(o));if(r)return r}}catch(e){PN.error("Unexpected exception while check WebApp client: ".concat(e))}var n=oO.sdk(e,t);if(UN)return PN.debug("use already exists hackleClient"),UN;var i=new ko,o=(i.initialize(),new tI),r=Co.getInstance({days:yn,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=oO.isBeaconSupported(),a=VO.intercept(n,zO.create()),u=VO.intercept(n,BO.create()),c=a,l=(s&&(c=u),new aO),p=new cO(l,new pO,oO.pollingIntervalMillis(t)),f=new vN(n,nI.postfix(o,"_".concat(e.slice(0,8)))),h=new mO(cI.clientFetch(t.sdkUrl,n.key),a),f=new _O(f,h),h=(l.add("workspace",f),new EO(cI.userCohorts(t.sdkUrl),a)),d=new GA,v=new q_(nI.postfix(r,"_".concat(e))),y=v.getUser(),m=t.user||null,g=new J_(Uo(),v,h,d,Le.instance,y,m),v=(l.add("cohort",g),new Q_(t.sessionTimeoutMillis,nI.postfix(r,"_".concat(e.slice(8))))),h=(g.addListener(v),new D_(o,"".concat(En,"_").concat(e),hn)),m=new NO(cI.clientDispatch(t.eventUrl),a),l=m,s=(s&&(l=new NO(cI.beaconDispatch(t.eventUrl,n.key),u)),new SO(h,m)),u=new AO(m,l,s),h=new AN([new SN(oO.dedupIntervalMillis(t)),new MN(oO.dedupIntervalMillis(t))]),m=new UO(u,hn,new pO,vn,t.auto_track_page_view),l=new S0(m,h,v,g),E=new hN,u=new rb(new oI(r,"".concat(An,"_").concat(e.slice(0,8)))),h=new rb(new oI(r,"".concat(On,"_").concat(e.slice(0,8)))),w=new pI(nI.prefix(o,"".concat(Nn,"_").concat(e.slice(0,8),"_"))),b=new iA(nI.prefix(o,"".concat(Rn,"_").concat(e.slice(0,8),"_"))),T=O_.create(f,l,[u,h],w),e=new DA(new FA(nI.postfix(r,"_".concat(e.slice(0,8)))),d,T,g),_=new N0(g,T),_=(v.addListener(e),v.addListener(_),new CI(T)),w=new hI([new vI,new mI(new IA),new EI(new IA),new bI(w,Le.instance),new _I(new OA),new AI(new OA),new NI(new RA),new SI(new RA)]),w=new sA([new uA(b),new fA(w),new lA]),_=new dA(Le.instance,_,w),w=new gA([new wA,new TA(_)]),I=new GI(cI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),I=new kI(HI.create(I),_,w),_=new yA(new JI(d_.get("targetMatcher")),new XI(b)),w=new FI(f,_,T),b=(new UI(m,w,I),new rO(f)),_=(new eO(m,b),new nN(d_.get("targetMatcher"))),w=new pN(r,Sn,{days:xn}),I=new tN(f,_,w,T),b=new aN(new cN(d),new xA,w,E),r=(new ZO(m,I,b,T),new aI(T,g,u,h)),d=(null==(f=t.devTool)?void 0:f.userExplorer)&&"function"==typeof(null==(_=t.devTool)?void 0:_.userExplorer),w=t.devTool&&d?{manager:t.devTool,userExplorer:r}:void 0,m=new Ri(cI.monitoring(t.monitoringUrl),a,c,new pO,dn),I=(hi.addRegistry(m),p.start(),EN.create(Mn,1)),A=new Io(T,p,v,g,I,w),O=(UN=A,new mN);O.addListener(l),O.addListener(s),O.addListener(v),O.addListener(m),O.addListener(i),window.addEventListener("pageshow",function(){return O.changeVisibility("visible")}),window.addEventListener("pagehide",function(){return O.changeVisibility("hidden")}),document.addEventListener("visibilitychange",function(){return O.changeVisibility(document.visibilityState)});return t.autoOpenDevTool&&(t.devTool?A.showUserExplorer():PN.error("DevTool is not provided")),b=Date.now(),u=g.currentUser,h=v.currentSessionId,(F_(y,u)?v.startNewSessionIfNeeded(u,b):v.startNewSession(y,u,b))===h&&e.startNewCampaignIfNeeded(u,b),O.changeVisibility("visible"),A.onReady(function(){(new x_).install(T,g);var e=A;function r(e){if("function"==typeof window.Event)return new Event(e);var t={bubbles:!1,cancelable:!1,detail:void 0},r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}try{history.pushState=function(t){return function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(r("locationchange")),e}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}}}(history.pushState),history.replaceState=function(t){return function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(r("locationchange")),e}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}}}(history.replaceState),window.addEventListener("popstate",function(){try{window.dispatchEvent(r("locationchange"))}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}A.trackPageView(),E.dispatchDoneEventIfNeeded()}),A}var LN=function(e,t){return(LN=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)};var FN=function(){return(FN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function VN(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}jN.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},jN.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},jN.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};ya=jN;function jN(){this.listeners={}}HN.arePropertiesEqual=function(e,t){var r=HN.coerceUnknownToProperties(e),n=HN.coerceUnknownToProperties(t),e=Object.keys(r),t=Object.keys(n);return e.length===t.length&&e.every(function(e){return e in n&&r[e]===n[e]})},HN.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var zN=HN;function HN(){}GN.isUserEqual=function(e,t){return(null==e?void 0:e.id)===(null==t?void 0:t.id)&&(null==e?void 0:e.deviceId)===(null==t?void 0:t.deviceId)&&(null==e?void 0:e.userId)===(null==t?void 0:t.userId)&&zN.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&zN.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var BN=GN;function GN(){}var KN=function(n){var e=i,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function i(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=DN(e,FN(FN({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.32.0"})),r.getUser=r.getUser.bind(r),r.setUser=r.setUser.bind(r),r.setUserId=r.setUserId.bind(r),r.setDeviceId=r.setDeviceId.bind(r),r.setUserProperty=r.setUserProperty.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.resetUser=r.resetUser.bind(r),r.variation=r.variation.bind(r),r.variationDetail=r.variationDetail.bind(r),r.isFeatureOn=r.isFeatureOn.bind(r),r.featureFlagDetail=r.featureFlagDetail.bind(r),r.track=r.track.bind(r),r.trackPageView=r.trackPageView.bind(r),r.remoteConfig=r.remoteConfig.bind(r),r.onReady=r.onReady.bind(r),r.onInitialized=r.onInitialized.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),r.fetch=r.fetch.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return LN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},i.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},i.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},i.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},i.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},i.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},i.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},i.prototype.track=function(e,t){this.client.track(e,t||void 0)},i.prototype.trackPageView=function(e){this.client.trackPageView(FN(FN({},e),{user:(null==e?void 0:e.user)||void 0}))},i.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},i.prototype.onReady=function(e,t){this.client.onReady(e,t)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){BN.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},i.prototype.showUserExplorer=function(){this.client.showUserExplorer()},i.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},i.prototype.fetch=function(){return this.client.fetch()},i}(ya);var U={exports:{}},w={},JN=Object.getOwnPropertySymbols,YN=Object.prototype.hasOwnProperty,qN=Object.prototype.propertyIsEnumerable;var da=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var o in r=Object(arguments[i]))YN.call(r,o)&&(n[o]=r[o]);if(JN)for(var s=JN(r),a=0;a<s.length;a++)qN.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},$N=da,I="function"==typeof Symbol&&Symbol.for,XN=I?Symbol.for("react.element"):60103,WN=I?Symbol.for("react.portal"):60106,B=I?Symbol.for("react.fragment"):60107,vp=I?Symbol.for("react.strict_mode"):60108,m=I?Symbol.for("react.profiler"):60114,ZN=I?Symbol.for("react.provider"):60109,QN=I?Symbol.for("react.context"):60110,eR=I?Symbol.for("react.forward_ref"):60112,C=I?Symbol.for("react.suspense"):60113,tR=I?Symbol.for("react.memo"):60115,rR=I?Symbol.for("react.lazy"):60116,nR="function"==typeof Symbol&&Symbol.iterator;function iR(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var oR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sR={};function aR(e,t,r){this.props=e,this.context=t,this.refs=sR,this.updater=r||oR}function uR(){}function cR(e,t,r){this.props=e,this.context=t,this.refs=sR,this.updater=r||oR}aR.prototype.isReactComponent={},aR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(iR(85));this.updater.enqueueSetState(this,e,t,"setState")},aR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},uR.prototype=aR.prototype;var ia=cR.prototype=new uR,lR=(ia.constructor=cR,$N(ia,aR.prototype),ia.isPureReactComponent=!0,{current:null}),pR=Object.prototype.hasOwnProperty,fR={key:!0,ref:!0,__self:!0,__source:!0};function hR(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)pR.call(t,n)&&!fR.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(1===a)i.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===i[n]&&(i[n]=a[n]);return{$$typeof:XN,type:e,key:o,ref:s,props:i,_owner:lR.current}}function dR(e){return"object"==typeof e&&null!==e&&e.$$typeof===XN}var vR=/\/+/g,yR=[];function mR(e,t,r,n){var i;return yR.length?((i=yR.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function gR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,yR.length<10&&yR.push(e)}function ER(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case XN:case WN:o=!0}}if(o)return n(i,t,""===r?"."+wR(t,0):r),1;if(o=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+wR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=nR&&t[nR]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+wR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(iR(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function wR(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function bR(e,t){e.func.call(e.context,t,e.count++)}function TR(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?_R(e,n,r,function(e){return e}):null!=e&&(dR(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(vR,"$&/")+"/")+r,e={$$typeof:XN,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function _R(e,t,r,n,i){var o="";ER(e,TR,t=mR(t,o=null!=r?(""+r).replace(vR,"$&/")+"/":o,n,i)),gR(t)}var IR={current:null};function AR(){var e=IR.current;if(null===e)throw Error(iR(321));return e}var OR,NR,RR,e={ReactCurrentDispatcher:IR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:lR,IsSomeRendererActing:{current:!1},assign:$N},A=(w.Children={map:function(e,t,r){if(null==e)return e;var n=[];return _R(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;ER(e,bR,t=mR(null,null,t,r)),gR(t)},count:function(e){return ER(e,function(){return null},null)},toArray:function(e){var t=[];return _R(e,t,null,function(e){return e}),t},only:function(e){if(dR(e))return e;throw Error(iR(143))}},w.Component=aR,w.Fragment=B,w.Profiler=m,w.PureComponent=cR,w.StrictMode=vp,w.Suspense=C,w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=e,w.cloneElement=function(e,t,r){if(null==e)throw Error(iR(267,e));var n=$N({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(o=t.ref,s=lR.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)pR.call(t,a)&&!fR.hasOwnProperty(a)&&(n[a]=(void 0===t[a]&&void 0!==u?u:t)[a]);var a=arguments.length-2;if(1===a)n.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];n.children=u}return{$$typeof:XN,type:e.type,key:i,ref:o,props:n,_owner:s}},w.createContext=function(e,t){return(e={$$typeof:QN,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:ZN,_context:e},e.Consumer=e},w.createElement=hR,w.createFactory=function(e){var t=hR.bind(null,e);return t.type=e,t},w.createRef=function(){return{current:null}},w.forwardRef=function(e){return{$$typeof:eR,render:e}},w.isValidElement=dR,w.lazy=function(e){return{$$typeof:rR,_ctor:e,_status:-1,_result:null}},w.memo=function(e,t){return{$$typeof:tR,type:e,compare:void 0===t?null:t}},w.useCallback=function(e,t){return AR().useCallback(e,t)},w.useContext=function(e,t){return AR().useContext(e,t)},w.useDebugValue=function(){},w.useEffect=function(e,t){return AR().useEffect(e,t)},w.useImperativeHandle=function(e,t,r){return AR().useImperativeHandle(e,t,r)},w.useLayoutEffect=function(e,t){return AR().useLayoutEffect(e,t)},w.useMemo=function(e,t){return AR().useMemo(e,t)},w.useReducer=function(e,t,r){return AR().useReducer(e,t,r)},w.useRef=function(e){return AR().useRef(e)},w.useState=function(e){return AR().useState(e)},w.version="16.14.0",{}),Nc=Function.call.bind(Object.prototype.hasOwnProperty),SR=function(){};function xR(e,t,r,n,i){if("production"!==production)for(var o in e)if(RR(e,o)){var s,a;try{if("function"!=typeof e[o])throw(a=Error((n||"React class")+": "+r+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[o](t,o,n,r,null,OR)}catch(e){s=e}!s||s instanceof Error||SR((n||"React class")+": type specification of "+r+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in NR)&&(NR[s.message]=!0,o=i?i():"",SR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(OR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",NR={},RR=Nc,SR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),xR.resetWarningCache=function(){"production"!==production&&(NR={})},"production"!==production){var CR=da,MR=xR,_="function"==typeof Symbol&&Symbol.for,kR=_?Symbol.for("react.element"):60103,PR=_?Symbol.for("react.portal"):60106,UR=_?Symbol.for("react.fragment"):60107,DR=_?Symbol.for("react.strict_mode"):60108,LR=_?Symbol.for("react.profiler"):60114,FR=_?Symbol.for("react.provider"):60109,VR=_?Symbol.for("react.context"):60110,jR=_?Symbol.for("react.concurrent_mode"):60111,zR=_?Symbol.for("react.forward_ref"):60112,HR=_?Symbol.for("react.suspense"):60113,BR=_?Symbol.for("react.suspense_list"):60120,GR=_?Symbol.for("react.memo"):60115,KR=_?Symbol.for("react.lazy"):60116,JR=_?Symbol.for("react.block"):60121,YR=_?Symbol.for("react.fundamental"):60117,qR=_?Symbol.for("react.responder"):60118,$R=_?Symbol.for("react.scope"):60119,XR="function"==typeof Symbol&&Symbol.iterator,WR="@@iterator";function ZR(e){if(null===e||"object"!=typeof e)return null;e=XR&&e[XR]||e[WR];return"function"==typeof e?e:null}var QR={current:null},eS={current:null},tS=/^(.*)[\\\/]/,rS=1;function nS(e){if(null==e)return null;if("number"==typeof e.tag&&cS("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case UR:return"Fragment";case PR:return"Portal";case LR:return"Profiler";case DR:return"StrictMode";case HR:return"Suspense";case BR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case VR:return"Context.Consumer";case FR:return"Context.Provider";case zR:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case GR:return nS(e.type);case JR:return nS(e.render);case KR:r=(t=e)._status===rS?t._result:null;if(r)return nS(r)}var t,r;return null}var iS={},oS=null;function sS(e){oS=e}iS.getCurrentStack=null,iS.getStackAddendum=function(){var e,t,r,n,i,o="",s=(oS&&(e=nS(oS.type),r=oS._owner,o+=(e=e,t=oS._source,r=r&&nS(r.type),i="",t?(n=(s=t.fileName).replace(tS,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(tS))&&(s=s[1])?s.replace(tS,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),iS.getCurrentStack);return s&&(o+=s()||""),o};var aS={ReactCurrentDispatcher:QR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:eS,IsSomeRendererActing:{current:!1},assign:CR};function uS(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];lS("warn",e,r)}function cS(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];lS("error",e,r)}function lS(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=aS.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var i=0,o="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(o)}catch(e){}}CR(aS,{ReactDebugCurrentFrame:iS,ReactComponentTreeHook:{}});var pS={};function fS(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;pS[r]||(cS("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),pS[r]=!0)}var hS={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){fS(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){fS(e,"replaceState")},enqueueSetState:function(e,t,r,n){fS(e,"setState")}},dS={};function vS(e,t,r){this.props=e,this.context=t,this.refs=dS,this.updater=r||hS}Object.freeze(dS),vS.prototype.isReactComponent={},vS.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},vS.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var yS,mS={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(yS in mS)mS.hasOwnProperty(yS)&&!function(e,t){Object.defineProperty(vS.prototype,e,{get:function(){uS("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(yS,mS[yS]);function gS(){}function ES(e,t,r){this.props=e,this.context=t,this.refs=dS,this.updater=r||hS}gS.prototype=vS.prototype,(_=ES.prototype=new gS).constructor=ES,CR(_,vS.prototype),_.isPureReactComponent=!0;var wS,bS,TS=Object.prototype.hasOwnProperty,_S={key:!0,ref:!0,__self:!0,__source:!0};function IS(e){if(TS.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function AS(e){if(TS.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var OS={},NS=function(e,t,r,n,i,o,s){e={$$typeof:kR,type:e,key:t,ref:r,props:s,_owner:o,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function RS(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in IS(t)&&(s=t.ref,"string"==typeof(c=t).ref&&eS.current&&c.__self&&eS.current.stateNode!==c.__self&&(p=nS(eS.current.type),OS[p]||(cS('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',nS(eS.current.type),c.ref),OS[p]=!0))),AS(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)TS.call(t,n)&&!_S.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,h=arguments.length-2;if(1==h)i.children=r;else if(1<h){for(var d=Array(h),v=0;v<h;v++)d[v]=arguments[v+2];Object.freeze&&Object.freeze(d),i.children=d}if(e&&e.defaultProps){var y=e.defaultProps;for(n in y)void 0===i[n]&&(i[n]=y[n])}function m(){bS||(bS=!0,cS("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",l))}function g(){wS||(wS=!0,cS("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(o||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,o&&(p=i,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=i,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),NS(e,o,s,a,u,eS.current,i)}function SS(e){return"object"==typeof e&&null!==e&&e.$$typeof===kR}var xS=".",CS=":",MS=!1,kS=/\/+/g;function PS(e){return(""+e).replace(kS,"$&/")}var US=10,DS=[];function LS(e,t,r,n){var i;return DS.length?((i=DS.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function FS(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,DS.length<US&&DS.push(e)}function VS(e,t,r){return null==e?0:function e(t,r,n,i){var o,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case kR:case PR:a=!0}}if(a)return n(i,t,""===r?xS+jS(t,0):r),1;var u=0,c=""===r?xS:r+CS;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+jS(o,l),n,i);else if("function"==typeof(r=ZR(t))){r===t.entries&&(MS||uS("Using Maps as children is deprecated and will be removed in a future major release. Consider converting children to an array of keyed ReactElements instead."),MS=!0);for(var p,f=r.call(t),h=0;!(p=f.next()).done;)u+=e(o=p.value,c+jS(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+iS.getStackAddendum(),s=""+t,Error("Objects are not valid as a React child (found: "+("[object Object]"==s?"object with keys {"+Object.keys(t).join(", ")+"}":s)+")."+r);return u}(e,"",t,r)}function jS(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function zS(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function HS(e,t,r){var n=e.result,i=e.keyPrefix,o=e.func,s=e.context,o=o.call(s,t,e.count++);Array.isArray(o)?BS(o,n,r,function(e){return e}):null!=o&&(SS(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":PS(o.key)+"/")+r,o=NS(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function BS(e,t,r,n,i){var o="",t=LS(t,o=null!=r?PS(r)+"/":o,n,i);VS(e,HS,t),FS(t)}function GS(e){return"string"==typeof e||"function"==typeof e||e===UR||e===jR||e===LR||e===DR||e===HR||e===BR||"object"==typeof e&&null!==e&&(e.$$typeof===KR||e.$$typeof===GR||e.$$typeof===FR||e.$$typeof===VR||e.$$typeof===zR||e.$$typeof===YR||e.$$typeof===qR||e.$$typeof===$R||e.$$typeof===JR)}function KS(){var e=QR.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");return e}function JS(){if(eS.current){var e=nS(eS.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var YS=!1,qS={};function $S(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=JS())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),qS[t=r]||(qS[t]=!0,r="",e&&e._owner&&e._owner!==eS.current&&(r=" It was passed a child from "+nS(e._owner.type)+"."),sS(e),cS('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',t,r),sS(null)))}function XS(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];SS(n)&&$S(n,t)}else if(SS(e))e._store&&(e._store.validated=!0);else if(e){var i=ZR(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)SS(o.value)&&$S(o.value,t)}}function WS(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=nS(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==zR&&t.$$typeof!==GR)return;r=t.propTypes}r?(sS(e),MR(r,e.props,"prop",n,iS.getStackAddendum),sS(null)):void 0===t.PropTypes||YS||(YS=!0,cS("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||cS("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ZS(e,t,r){var n,i=GS(e),t=(i||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||JS(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===kR?(s="<"+(nS(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,cS("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,n)),RS.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)XS(arguments[o],e);if(e===UR){var s=t;sS(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){cS("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&cS("Invalid attribute `ref` supplied to `React.Fragment`."),sS(null)}else WS(t);return t}var QS=!1;try{var ex=Object.freeze({}),tx=new Map([[ex,null]]),rx=new Set([ex]);tx.set(0,0),rx.add(0)}catch(e){}function nx(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,i,o=CR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in IS(t)&&(a=t.ref,l=eS.current),AS(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)TS.call(t,n)&&!_S.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var p=arguments.length-2;if(1==p)o.children=r;else if(1<p){for(var f=Array(p),h=0;h<p;h++)f[h]=arguments[h+2];o.children=f}return NS(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)XS(arguments[i],n.type);return WS(n),n}function ix(e){var t=ZS.bind(null,e);return t.type=e,QS||(QS=!0,uS("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return uS("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}_=ZS,A.Children={map:function(e,t,r){if(null==e)return e;var n=[];return BS(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=LS(null,null,t,r),VS(e,zS,t),FS(t)},count:function(e){return VS(e,function(){return null},null)},toArray:function(e){var t=[];return BS(e,t,null,function(e){return e}),t},only:function(e){if(SS(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},A.Component=vS,A.Fragment=UR,A.Profiler=LR,A.PureComponent=ES,A.StrictMode=DR,A.Suspense=HR,A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aS,A.cloneElement=nx,A.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&cS("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:VR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:FR,_context:r}),i=!1,t={$$typeof:VR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,cS("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(e){r.Provider=e}},_currentValue:{get:function(){return r._currentValue},set:function(e){r._currentValue=e}},_currentValue2:{get:function(){return r._currentValue2},set:function(e){r._currentValue2=e}},_threadCount:{get:function(){return r._threadCount},set:function(e){r._threadCount=e}},Consumer:{get:function(){return n||(n=!0,cS("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}}}),r.Consumer=t,r._currentRenderer=null,r._currentRenderer2=null,r},A.createElement=_,A.createFactory=ix,A.createRef=function(){var e={current:null};return Object.seal(e),e},A.forwardRef=function(e){return null!=e&&e.$$typeof===GR?cS("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?cS("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&cS("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null==e||null==e.defaultProps&&null==e.propTypes||cS("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:zR,render:e}},A.isValidElement=SS,A.lazy=function(e){var t,r,n={$$typeof:KR,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){cS("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){cS("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},A.memo=function(e,t){return GS(e)||cS("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:GR,type:e,compare:void 0===t?null:t}},A.useCallback=function(e,t){return KS().useCallback(e,t)},A.useContext=function(e,t){var r,n=KS();return void 0!==t&&cS("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context&&((r=e._context).Consumer===e?cS("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&cS("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},A.useDebugValue=function(e,t){return KS().useDebugValue(e,t)},A.useEffect=function(e,t){return KS().useEffect(e,t)},A.useImperativeHandle=function(e,t,r){return KS().useImperativeHandle(e,t,r)},A.useLayoutEffect=function(e,t){return KS().useLayoutEffect(e,t)},A.useMemo=function(e,t){return KS().useMemo(e,t)},A.useReducer=function(e,t,r){return KS().useReducer(e,t,r)},A.useRef=function(e){return KS().useRef(e)},A.useState=function(e){return KS().useState(e)},A.version="16.14.0"}"production"===production?U.exports=w:U.exports=A;var ox=U.exports,sx=U.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),iu=sx.Consumer,ax=sx.Provider;var ux=s.log;function cx(e,t){e=lx(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function lx(e,t){void 0===t&&(t="A");var r=U.exports.useContext(sx),n=r.hackle,i=r.userVersion,o=r.initialized,s=U.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||Xe.of(t,h.EXCEPTION):Xe.of(t,h.SDK_NOT_READY)},[t,e,n,o]),r=VN(U.exports.useState(function(){return n?s():(ux.error("HackleClient is not existed"),Xe.of(t,h.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=VN(U.exports.useState(i),2),c=u[0],u=u[1];return hx(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function px(e){e=fx(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function fx(e){var t=U.exports.useContext(sx),r=t.hackle,n=t.userVersion,i=t.initialized,o=U.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||Ze.off(h.EXCEPTION):Ze.off(h.SDK_NOT_READY)},[e,r,i]),t=VN(U.exports.useState(function(){return r?o():(ux.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=VN(U.exports.useState(n),2),u=a[0],a=a[1];return hx(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function hx(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function dx(e){var t,r=e.experimentKey,e=e.children,n=(r=cx(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(U.exports.Children.forEach(e,function(e){U.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?U.exports.cloneElement(t,{variation:i}):null)}function vx(e){return e.variation,e=e.children,U.exports.createElement(U.exports.Fragment,null,e)}function yx(e){var t=(r=px(e.featureKey)).isLoading,r=r.isOn;return t?null:ox.createElement(ox.Fragment,null,e.children(r))}n.Bucket=ut,n.Cohort=nn,n.Container=Pt,n.ContainerGroup=Dt,n.CoreVersion=Jt,n.Decision=Xe,n.DecisionReason=h,n.EXPERIMENT_IMPLEMENTATION_TYPE=it,n.EmptyHackleRemoteConfig=et,n.EmptyParameterConfig=Ve,n.EventType=ft,n.Experiment=ot,n.FeatureFlagDecision=Ze,n.HackleContext=sx,n.HackleContextConsumer=iu,n.HackleContextProvider=ax,n.HackleExperiment=dx,n.HackleFeature=yx,n.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(i=e.timeout)?3e3:i,i=void 0!==(i=e.supportSSR)&&i,e=e.children,o=VN(U.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return U.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),U.exports.useEffect(function(){function e(){a(function(e){return FN(FN({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),U.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return FN(FN({},e),{initialized:!0})})},function(){a(function(e){return FN(FN({},e),{initialized:!0})})}).catch(function(){a(function(e){return FN(FN({},e),{initialized:!0})})})},[t]),i||s.initialized?ox.createElement(ax,{value:s},e):null},n.HackleVariation=vx,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=pr,n.IAM_BEHAVIOR=lr,n.IAM_DISPLAY_TYPE=ar,n.IAM_HORIZONTAL_ALIGNMENT=hr,n.IAM_LAYOUT_TYPE=ur,n.IAM_ORIENTATION=cr,n.IAM_PLATFORM_TYPE=or,n.IAM_STATUS=ir,n.IAM_TIMEUNIT=sr,n.IAM_VERTICAL_ALIGNMENT=fr,n.IdentifierType=dt,n.IdentifiersBuilder=mt,n.InAppMessage=dr,n.InAppMessageAction=tn,n.InAppMessageAlignment=jr,n.InAppMessageBackground=en,n.InAppMessageButton=$r,n.InAppMessageButtonStyle=Qr,n.InAppMessageContext=kr,n.InAppMessageContextLayout=Fr,n.InAppMessageContextMessage=Dr,n.InAppMessageDecision=qe,n.InAppMessageDurationCap=Nr,n.InAppMessageEventFrequencyCap=_r,n.InAppMessageEventTrigger=wr,n.InAppMessageEventTriggerRule=br,n.InAppMessageExperimentContext=Ur,n.InAppMessageIdentifierCap=Ar,n.InAppMessageImage=Hr,n.InAppMessagePeriodAlways=yr,n.InAppMessagePeriodCustom=gr,n.InAppMessagePositionalButton=Wr,n.InAppMessageTargetContext=Sr,n.InAppMessageText=Gr,n.InAppMessageTextAttribute=Jr,n.InAppMessageTextStyle=qr,n.InAppMessageUserOverride=Cr,n.Logger=s,n.MATCH_OPERATORS=Zt,n.MATCH_TYPES=Xt,n.MATCH_VALUE_TYPES=Wt,n.MetaVersion=qt,n.ParameterConfiguration=rt,n.PropertyOperations=Eo,n.PropertyOperationsBuilder=mo,n.RemoteConfigDecision=Je,n.RemoteConfigParameter=Ft,n.RemoteConfigParameterValue=Ht,n.RemoteConfigTargetRule=jt,n.SEGMENT_TYPES=tr,n.Segment=Mt,n.Slot=lt,n.SplitUrlConfig=on,n.SplitUrlTargets=an,n.TARGET_ACTION_TYPES=Qt,n.TARGET_KEY_TYPES=er,n.Target=wt,n.TargetAction=Rt,n.TargetCondition=Tt,n.TargetKey=It,n.TargetMatch=Ot,n.TargetRule=xt,n.TargetingType=rr,n.Variation=at,n.Version=Gt,n.createInstance=function(e,t){return new KN(e,t)},n.getUserId=Uo,n.removeUserId=Do,n.resolveIdentifiers=yt,n.sanitizeUser=Et,n.setUserId=function(e){Co.getInstance().setItem(gn,e)},n.useFeature=function(e){var t=(n=U.exports.useContext(sx)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=VN(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&ux.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=VN(U.exports.useState(r),2))[0],n=n[1];return hx(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=U.exports.useContext(sx)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||Ze.off(h.EXCEPTION)},[e,t,n]),o=(s=VN(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&ux.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=VN(U.exports.useState(r),2))[0],n=n[1];return hx(a,r)||(n(r),s(i())),o},n.useLoadableFeature=px,n.useLoadableFeatureDetail=fx,n.useLoadableRemoteConfig=function(){var e=(o=U.exports.useContext(sx)).hackle,t=o.userVersion,r=o.initialized,n=U.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=VN(U.exports.useState(function(){return e||ux.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=VN(U.exports.useState(t),2))[0],a=a[1];return hx(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=cx,n.useLoadableVariationDetail=lx,n.useRemoteConfig=function(){var e=(r=U.exports.useContext(sx)).hackle,t=r.userVersion,r=r.initialized,n=U.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=VN(U.exports.useState(function(){return e||ux.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=VN(U.exports.useState(t),2))[0],r=r[1];return hx(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=U.exports.useContext(sx).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(ux.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=U.exports.useContext(sx)).hackle,n=a.userVersion,i=a.initialized,o=U.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=VN(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&ux.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=VN(U.exports.useState(n),2))[0],c=c[1];return hx(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=U.exports.useContext(sx)).hackle,n=i.userVersion,i=i.initialized,o=U.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||Xe.of(t,h.EXCEPTION)},[t,e,r,i]),s=(a=VN(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&ux.error("HackleClient is not existed"),Xe.of(t,h.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=VN(U.exports.useState(n),2))[0],i=i[1];return hx(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hackleReactSDK={})}(this,function(n){"use strict";var D,L=new Uint8Array(16);var F=/^(?:[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;for(var V=[],j=0;j<256;++j)V.push((j+256).toString(16).substr(1));function z(e,t){var t=1<arguments.length&&void 0!==t?t:0,e=(V[e[t+0]]+V[e[t+1]]+V[e[t+2]]+V[e[t+3]]+"-"+V[e[t+4]]+V[e[t+5]]+"-"+V[e[t+6]]+V[e[t+7]]+"-"+V[e[t+8]]+V[e[t+9]]+"-"+V[e[t+10]]+V[e[t+11]]+V[e[t+12]]+V[e[t+13]]+V[e[t+14]]+V[e[t+15]]).toLowerCase();if("string"==typeof(t=e)&&F.test(t))return e;throw TypeError("Stringified UUID is invalid")}function H(e,t,r){var n=(e=e||{}).random||(e.rng||function(){if(D=D||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return D(L);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")})();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 z(n)}var B="3.7.5",e="function"==typeof atob,t="function"==typeof btoa,r="function"==typeof Buffer;const G="function"==typeof TextDecoder?new TextDecoder:void 0,K="function"==typeof TextEncoder?new TextEncoder:void 0;const J=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Y=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(J),q=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,$=String.fromCharCode.bind(String),X="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),W=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Z=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var i=t=>{let r,n,i,o,s="";var e=t.length%3;for(let e=0;e<t.length;){if(255<(n=t.charCodeAt(e++))||255<(i=t.charCodeAt(e++))||255<(o=t.charCodeAt(e++)))throw new TypeError("invalid character found");r=n<<16|i<<8|o,s+=J[r>>18&63]+J[r>>12&63]+J[r>>6&63]+J[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const Q=t?e=>btoa(e):r?e=>Buffer.from(e,"binary").toString("base64"):i,ee=r?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push($.apply(null,r.subarray(e,e+4096)));return Q(n.join(""))},te=(e,t=!1)=>t?W(ee(e)):ee(e),re=e=>{var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?$(192|t>>>6)+$(128|63&t):$(224|t>>>12&15)+$(128|t>>>6&63)+$(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),$(240|t>>>18&7)+$(128|t>>>12&63)+$(128|t>>>6&63)+$(128|63&t))},ne=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ie=e=>e.replace(ne,re),oe=r?e=>Buffer.from(e,"utf8").toString("base64"):K?e=>ee(K.encode(e)):e=>Q(ie(e)),se=(e,t=!1)=>t?W(oe(e)):oe(e);t=e=>se(e,!0);const ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return $(55296+(t>>>10))+$(56320+(1023&t));case 3:return $((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return $((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ce=e=>e.replace(ae,ue);var o=t=>{if(t=t.replace(/\s+/g,""),!q.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r,n="",i,o;for(let e=0;e<t.length;)r=Y[t.charAt(e++)]<<18|Y[t.charAt(e++)]<<12|(i=Y[t.charAt(e++)])<<6|(o=Y[t.charAt(e++)]),n+=64===i?$(r>>16&255):64===o?$(r>>16&255,r>>8&255):$(r>>16&255,r>>8&255,255&r);return n};const le=e?e=>atob(Z(e)):r?e=>Buffer.from(e,"base64").toString("binary"):o,pe=r?e=>X(Buffer.from(e,"base64")):e=>X(le(e).split("").map(e=>e.charCodeAt(0))),fe=e=>pe(de(e)),he=r?e=>Buffer.from(e,"base64").toString("utf8"):G?e=>G.decode(pe(e)):e=>ce(le(e)),de=e=>Z(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ve=e=>he(de(e));function ye(){var e=(e,t)=>Object.defineProperty(String.prototype,e,ge(t));e("fromBase64",function(){return ve(this)}),e("toBase64",function(e){return se(this,e)}),e("toBase64URI",function(){return se(this,!0)}),e("toBase64URL",function(){return se(this,!0)}),e("toUint8Array",function(){return fe(this)})}function me(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,ge(t));e("toBase64",function(e){return te(this,e)}),e("toBase64URI",function(){return te(this,!0)}),e("toBase64URL",function(){return te(this,!0)})}const ge=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const Ee={version:B,VERSION:"3.7.5",atob:le,atobPolyfill:o,btoa:Q,btoaPolyfill:i,fromBase64:ve,toBase64:se,encode:se,encodeURI:t,encodeURL:t,utob:ie,btou:ce,decode:ve,isValid:e=>{if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:te,toUint8Array:fe,extendString:ye,extendUint8Array:me,extendBuiltins:()=>{ye(),me()}};we.isNotNullOrUndefined=function(e){return null!=e},we.isNullOrUndefined=function(e){return null==e},we.requiredNotNullOrUndefined=function(e,t){if(void 0===t&&(t=function(){return"Required value is null or undefined"}),this.isNullOrUndefined(e))throw new Error(t());return e},we.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var a=we;function we(){}be.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);a.isNotNullOrUndefined(o)&&r.push(o)}return r},be.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r},be.associateTo=function(e,t,r){for(var n=0,i=e;n<i.length;n++){var o=r(i[n]);t.set(o[0],o[1])}return t},be.associate=function(e,t){return this.associateTo(e,new Map,t)},be.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},be.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r};var p=be;function be(){}var Te={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(_e.setLogLevel=function(e){this.logLevel=e=void 0===e?Te.INFO:e},_e.initCounter=function(t){this.counters=p.associate(Object.keys(Te),function(e){return[e,t(e)]})},_e._log=function(e,t){var r;switch(e){case"WARN":r="orange";break;case"ERROR":r="red";break;default:r="#AAAAAA"}if(t instanceof Error)Ie.log(e,r,t.message,t);else try{Ie.log(e,r,t)}catch(e){}},_e.increment=function(e){var t;null!=(t=null==(t=_e.counters)?void 0:t.get(e))&&t.increment()},_e.logLevel=Te.INFO,_e.log={error:function(e){Te.ERROR<=_e.logLevel&&(_e._log("ERROR",e),_e.increment("ERROR"))},warn:function(e){Te.WARN<=_e.logLevel&&(_e._log("WARN",e),_e.increment("WARN"))},info:function(e){Te.INFO<=_e.logLevel&&(_e._log("INFO",e),_e.increment("INFO"))},debug:function(e){Te.DEBUG<=_e.logLevel&&(_e._log("DEBUG",e),_e.increment("DEBUG"))}},_e);function _e(){}Oe.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Ie=Oe;function Oe(){}var Ae=function(e,t){return(Ae=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)};function Ne(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ae(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function l(n,i){var o,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Re(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var Se=s.log,xe=(Ce.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},Ce.isEquals=function(t,r){if(null==r)return!1;var e=Object.keys(t);return e.length===Object.keys(r).length&&e.every(function(e){return t[e]===r[e]})},Ce.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],i=i[1];this.isValidType(o)?(i=this.sanitizeValue(i),a.isNullOrUndefined(i)?Se.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Se.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},Ce.isValidType=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},Ce.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},Ce.MAX_IDENTIFIER_TYPE_LENGTH=128,Ce.MAX_IDENTIFIER_VALUE_LENGTH=512,Ce);function Ce(){}var Me=s.log,ke=(Pe.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i,o=n[r],s=o[0],o=o[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){Me.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),a.isNullOrUndefined(i)?Me.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):Me.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},Pe.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},Pe.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},Pe.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},Pe.isValidValue=function(e){return!a.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))},Pe.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},Pe.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},Pe.SYSTEM_PROPERTY_KEY_PREFIX="$",Pe.MAX_PROPERTIES_COUNT=128,Pe.MAX_PROPERTY_KEY_LENGTH=128,Pe.MAX_PROPERTY_VALUE_LENGTH=1024,Pe);function Pe(){}var Ue=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],De=(f.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C0);case"seconds":return e/(f.C3/f.C0);case"minutes":return e/(f.C4/f.C0);case"hours":return e/(f.C5/f.C0);case"days":return e/(f.C6/f.C0)}},f.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C1);case"microseconds":return e;case"seconds":return e/(f.C3/f.C1);case"minutes":return e/(f.C4/f.C1);case"hours":return e/(f.C5/f.C1);case"days":return e/(f.C6/f.C1)}},f.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C2/f.C0);case"microseconds":return e*(f.C2/f.C1);case"milliseconds":return e;case"seconds":return e/(f.C3/f.C2);case"minutes":return e/(f.C4/f.C2);case"hours":return e/(f.C5/f.C2);case"days":return e/(f.C6/f.C2)}},f.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C3/f.C0);case"microseconds":return e*(f.C3/f.C1);case"milliseconds":return e*(f.C3/f.C2);case"seconds":return e;case"minutes":return e/(f.C4/f.C3);case"hours":return e/(f.C5/f.C3);case"days":return e/(f.C6/f.C3)}},f.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C4/f.C0);case"microseconds":return e*(f.C4/f.C1);case"milliseconds":return e*(f.C4/f.C2);case"seconds":return e*(f.C4/f.C3);case"minutes":return e;case"hours":return e/(f.C5/f.C4);case"days":return e/(f.C6/f.C4)}},f.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C5/f.C0);case"microseconds":return e*(f.C5/f.C1);case"milliseconds":return e*(f.C5/f.C2);case"seconds":return e*(f.C5/f.C3);case"minutes":return e*(f.C5/f.C4);case"hours":return e;case"days":return e/(f.C6/f.C5)}},f.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C6/f.C0);case"microseconds":return e*(f.C6/f.C1);case"milliseconds":return e*(f.C6/f.C2);case"seconds":return e*(f.C6/f.C3);case"minutes":return e*(f.C6/f.C4);case"hours":return e*(f.C6/f.C5);case"days":return e}},f.C6=24*(f.C5=60*(f.C4=60*(f.C3=1e3*(f.C2=1e3*(f.C1=1e3*(f.C0=1)))))),f.converter={nanoseconds:f.nanosToUnit,microseconds:f.microsToUnit,milliseconds:f.millisToUnit,seconds:f.secondsToUnit,minutes:f.minutesToUnit,hours:f.hoursToUnit,days:f.daysToUnit},f);function f(){}Fe.prototype.tick=function(){return 1e3*Date.now()},Fe.prototype.currentMillis=function(){return Date.now()},Fe.instance=new Fe;var Le=Fe;function Fe(){}je.prototype.get=function(e,t){return t};var Ve=je;function je(){}He.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var ze=He;function He(e){this.parameters=e}var Be=s.log;function Ge(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||Be.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function Ke(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=Ge(e,i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r}}Ye.of=function(e,t){return new Ye(e,t)};var Je=Ye;function Ye(e,t){this.value=e,this.reason=t}$e.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},$e.of=function(e,t,r,n){return new $e(t,r,e,n=void 0===n?{}:n)};var qe=$e;function $e(e,t,r,n){this.inAppMessage=e,this.message=t,this.reason=r,this.properties=n}We.of=function(e,t,r,n){return new We(e,t,r=void 0===r?new Ve:r,n=void 0===n?void 0:n)},We.prototype.get=function(e,t){return this.config.get(e,t)};var Xe=We;function We(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}Qe.on=function(e,t,r){return new Qe(!0,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},Qe.off=function(e,t,r){return new Qe(!1,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},Qe.prototype.get=function(e,t){return this.config.get(e,t)};var Ze=Qe;function Qe(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}tt.prototype.get=function(e,t){return t};var et=tt;function tt(){}nt.fromJson=function(e){return new nt(e.id,new ze(p.associate(e.parameters,function(e){return[e.key,e.value]})))},nt.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var rt=nt;function nt(e,t){this.id=e,this.config=t}d.SDK_NOT_READY="SDK_NOT_READY",d.EXCEPTION="EXCEPTION",d.INVALID_INPUT="INVALID_INPUT",d.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",d.TYPE_MISMATCH="TYPE_MISMATCH",d.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",d.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",d.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",d.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",d.OVERRIDDEN="OVERRIDDEN",d.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",d.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",d.VARIATION_DROPPED="VARIATION_DROPPED",d.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",d.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",d.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",d.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",d.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",d.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",d.TARGET_RULE_MATCH="TARGET_RULE_MATCH",d.DEFAULT_RULE="DEFAULT_RULE",d.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",d.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",d.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",d.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",d.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",d.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",d.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",d.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET";var h=d;function d(){}var it=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],ot=(st.fromJson=function(e,t){var r=st.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new at(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),i=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),o=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return xt.fromJson(e,rr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return wt.fromJson(e,rr.PROPERTY)}),a=an.fromJson(t.execution.targetUrls),u=Ge(it,t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return xt.fromJson(e,rr.PROPERTY)}),l=Rt.fromJson(t.execution.defaultRule);return r&&u&&l&&new st(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,i,o,s,a,c,l,t.containerId,u,t.winnerVariationId)},st.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void Be.debug("Unsupported status [".concat(e,"]"))}},st.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},st.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},st.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},st);function st(e,t,r,n,i,o,s,a,u,c,l,p,f,h,d,v,y){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=v,this.winnerVariationId=y}var at=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},ut=(ct.fromJson=function(e){return new ct(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new lt(t,r,e)}))},ct);function ct(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}pt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var lt=pt;function pt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}ht.fromJson=function(e){return new ht(e.id,e.key)};var ft=ht;function ht(e,t){this.id=e,this.key=t}vt.ID="$id",vt.USER="$userId",vt.DEVICE="$deviceId",vt.SESSION="$sessionId",vt.HACKLE_DEVICE="$hackleDeviceId";var dt=vt;function vt(){}function yt(e){var t=new mt;return t.addIdentifiers(e.identifiers||{}),t.add(dt.ID,e.id),t.add(dt.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(dt.USER,e.userId),t.build()}gt.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},gt.prototype.add=function(e,t){var r=xe.sanitizeValue(t);return xe.isValidType(e)&&r?this.identifiers[e]=t:Be.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},gt.prototype.build=function(){return this.identifiers};var mt=gt;function gt(){this.identifiers={}}function Et(e){var t,r={};return r.id=null!=(t=xe.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=xe.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=xe.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=ke.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=xe.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}bt.fromJson=function(e,t){return new bt(p.mapNotNullOrUndefined(e.conditions,function(e){return Tt.fromJson(e,t)}))},bt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var wt=bt;function bt(e){this.conditions=e}_t.fromJson=function(e,t){var r=It.fromJson(e.key);if(r&&t.supports(r.type))return(t=At.fromJson(e.match))&&new _t(r,t)},_t.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Tt=_t;function _t(e,t){this.key=e,this.match=t}Ot.fromJson=function(e){var t=Ge(er,e.type);return t&&new Ot(t,e.name)},Ot.prototype.toJson=function(){return{type:this.type,name:this.name}};var It=Ot;function Ot(e,t){this.type=e,this.name=t}Nt.fromJson=function(e){var t=Ge(Xt,e.type),r=Ge(Zt,e.operator),n=Ge(Wt,e.valueType);return t&&r&&n&&new Nt(t,r,n,e.values)},Nt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var At=Nt;function Nt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}St.fromJson=function(e){var t=Ge(Qt,e.type);return t&&new St(t,e.variationId,e.bucketId)};var Rt=St;function St(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}Ct.fromJson=function(e,t){t=wt.fromJson(e.target,t),e=Rt.fromJson(e.action);return t&&e&&new Ct(t,e)};var xt=Ct;function Ct(e,t){this.target=e,this.action=t}kt.fromJson=function(e){var t=Ge(tr,e.type);return t&&new kt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.SEGMENT)}))};var Mt=kt;function kt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}Ut.fromJson=function(e){return new Ut(e.id,e.bucketId,e.groups.map(function(e){return Dt.fromJson(e)}))},Ut.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var Pt=Ut;function Ut(e,t,r){this.id=e,this.bucketId=t,this.groups=r}Lt.fromJson=function(e){return new Lt(e.id,e.experiments)};var Dt=Lt;function Lt(e,t){this.id=e,this.experiments=t}Vt.fromJson=function(e){var t=Ge(Wt,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return jt.fromJson(e,rr.PROPERTY)}),n=Ht.fromJson(e.defaultValue);return t&&new Vt(e.id,e.key,t,e.identifierType,r,n)};var Ft=Vt;function Vt(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}zt.fromJson=function(e,t){t=wt.fromJson(e.target,t);return t&&new zt(e.key,e.name,t,e.bucketId,Ht.fromJson(e.value))};var jt=zt;function zt(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}Bt.fromJson=function(e){return new Bt(e.id,e.value)};var Ht=Bt;function Bt(e,t){this.id=e,this.rawValue=t}Kt.tryParse=function(e){var t,r,n,i,e=Kt.regExp.exec(e);if(e)return e[0],t=e[1],r=e[2],r=void 0===r?"0":r,n=e[3],n=void 0===n?"0":n,i=e[4],e=e[5],new Kt(new Jt(parseInt(t,10),parseInt(r,10),parseInt(n,10)),qt.parse(i),qt.parse(e))},Kt.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Kt.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Kt.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Kt.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Kt.prototype.isLessThan=function(e){return this.compareTo(e)<0},Kt.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Kt.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-]+)*))?$/;var Gt=Kt;function Kt(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}Yt.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var Jt=Yt;function Yt(e,t,r){this.major=e,this.minor=t,this.patch=r}$t.parse=function(e){return e?new $t(e.split(".")):$t.EMPTY},$t.prototype.isEmpty=function(){return 0===this.identifiers.length},$t.prototype.isNotEmpty=function(){return!this.isEmpty()},$t.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},$t.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=$t.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},$t.compareIdentifiers=function(e,t){return $t.numericIdentifierRegExp.test(e)&&$t.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},$t.EMPTY=new $t([]),$t.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var qt=$t;function $t(e){this.identifiers=e}var Xt=["MATCH","NOT_MATCH"],Wt=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Zt=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Qt=["VARIATION","BUCKET"],er=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],tr=["USER_ID","USER_PROPERTY"],rr=(nr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},nr.IDENTIFIER=new nr("SEGMENT"),nr.PROPERTY=new nr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),nr.SEGMENT=new nr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),nr);function nr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var ir=["ACTIVE","DRAFT","PAUSE"],or=["WEB","ANDROID","IOS"],sr=["IMMEDIATE","CUSTOM"],ar=["MODAL","BANNER"],ur=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE"],cr=["VERTICAL","HORIZONTAL"],lr=["CLICK"],pr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],fr=["TOP","MIDDLE","BOTTOM"],hr=["LEFT","CENTER","RIGHT"],dr=(vr.fromJson=function(e){var t,r=Ge(ir,e.status);if(!a.isNullOrUndefined(r)){switch(Ge(sr,e.timeUnit)){case"IMMEDIATE":t=new yr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new gr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=kr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(br.fromJson),i=_r.fromJson(e.eventFrequencyCap),new vr(e.id,e.key,r,t,new wr(n,i),Sr.fromJson(e.targetContext),o)}},vr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},vr);function vr(e,t,r,n,i,o,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s}mr.prototype.within=function(e){return!0};var yr=mr;function mr(){this.type="IMMEDIATE"}Er.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var gr=Er;function Er(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var wr=function(e,t){this.rules=e,this.frequencyCap=t},br=(Tr.fromJson=function(e){return new Tr(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))},Tr);function Tr(e,t){this.eventKey=e,this.targets=t}Ir.fromJson=function(e){return e?new Ir(e.identifiers.map(Or.fromJson),Nr.fromJson(e.duration)):null};var _r=Ir;function Ir(e,t){this.identifierCaps=e,this.durationCap=t}Ar.fromJson=function(e){return new Ar(e.identifierType,e.countPerIdentifier)};var Or=Ar;function Ar(e,t){this.identifierType=e,this.count=t}Rr.fromJson=function(e){if(!e)return null;var t=Ge(Ue,e.durationUnit.timeUnit);return t?new Rr(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Nr=Rr;function Rr(e,t){this.durationMillis=e,this.count=t}xr.fromJson=function(e){return new xr(e.overrides.map(Cr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var Sr=xr;function xr(e,t){this.overrides=e,this.targets=t}Mr.fromJson=function(e){return new Mr(e.identifierType,e.identifiers)};var Cr=Mr;function Mr(e,t){this.identifierType=e,this.identifiers=t}Pr.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new Ur(e.exposure.key)),Ke(or,e.platformTypes));if(!a.isNullOrUndefined(r)){var n=Ke(cr,e.orientations);if(!a.isNullOrUndefined(n)){var i=p.mapOrUndefined(e.messages,Dr.fromJson);if(!a.isNullOrUndefined(i))return new Pr(e.defaultLang,t,r,n,i)}}};var kr=Pr;function Pr(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var Ur=function(e){this.key=e},Dr=(Lr.fromJson=function(e){var t=Fr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,Hr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,$r.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=$r.fromJson2(e.closeButton),!a.isNullOrUndefined(i))){var o=p.mapOrUndefined(e.outerButtons,Wr.fromJson);if(!a.isNullOrUndefined(o))return new Lr(e.variationKey,e.lang,t,r,e.text?Gr.fromJson(e.text):void 0,n,i,new en(e.background.color),e.action?tn.fromJson(e.action):void 0,o)}}}}},Lr.prototype.toJson=function(){var e;return{variationKey:this.variationKey,lang:this.lang,layout:{layoutType:this.layout.layoutType,alignment:null!=(e=null==(e=this.layout.alignment)?void 0:e.toJson())?e:null,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),text:null!=(e=null==(e=this.text)?void 0:e.toJson())?e:null,closeButton:null!=(e=null==(e=this.closeButton)?void 0:e.toCloseButtonJson())?e:null,buttons:this.buttons.map(function(e){return e.toJson()}),background:{color:this.background.color},action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null,outerButtons:this.outerButtons.map(function(e){return e.toJson()})}},Lr);function Lr(e,t,r,n,i,o,s,a,u,c){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.text=i,this.buttons=o,this.closeButton=s,this.background=a,this.action=u,this.outerButtons=c}Vr.fromJson=function(e){var t=Ge(ur,e.layoutType),r=Ge(ar,e.displayType);if(!a.isNullOrUndefined(r)&&!a.isNullOrUndefined(t))return new Vr(r,t,e.alignment?jr.fromJson(e.alignment):void 0)};var Fr=Vr;function Vr(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}zr.fromJson=function(e){var t=Ge(hr,e.horizontal);if(!a.isNullOrUndefined(t)){e=Ge(fr,e.vertical);if(!a.isNullOrUndefined(e))return new zr(t,e)}},zr.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var jr=zr;function zr(e,t){this.horizontal=e,this.vertical=t}Br.fromJson=function(e){var t=Ge(cr,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=tn.fromJson(e.action),!a.isNullOrUndefined(r)))return new Br(t,e.imagePath,r)}},Br.prototype.toJson=function(){var e;return{orientation:this.orientation,imagePath:this.imagePath,action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null}};var Hr=Br;function Br(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}Kr.fromJson=function(e){return new Kr(Jr.fromJson(e.title),Jr.fromJson(e.body))},Kr.prototype.toJson=function(){return{title:{text:this.title.text,style:{textColor:this.title.style.color}},body:{text:this.body.text,style:{textColor:this.body.style.color}}}};var Gr=Kr;function Kr(e,t){this.title=e,this.body=t}Yr.fromJson=function(e){return new Yr(e.text,new qr(e.style.textColor))};var Jr=Yr;function Yr(e,t){this.text=e,this.style=t}var qr=function(e){this.color=e},$r=(Xr.fromJson=function(e){var t=tn.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Xr(e.text,new Qr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Xr.fromJson2=function(e){var t=tn.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Xr("✕",new Qr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Xr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},Xr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Xr);function Xr(e,t,r){this.text=e,this.style=t,this.action=r}Zr.fromJson=function(e){var t=$r.fromJson(e.button);if(!a.isNullOrUndefined(t)){e=jr.fromJson(e.alignment);if(!a.isNullOrUndefined(e))return new Zr(t,e)}},Zr.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}};var Wr=Zr;function Zr(e,t){this.button=e,this.alignment=t}var Qr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},en=function(e){this.color=e},tn=(rn.fromJson=function(e){var t=Ge(lr,e.behavior);if(!a.isNullOrUndefined(t)){var r=Ge(pr,e.type);if(!a.isNullOrUndefined(r))return new rn(t,r,null!=(t=e.value)?t:void 0)}},rn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},rn);function rn(e,t,r){this.behavior=e,this.type=t,this.value=r}var nn=function(e){this.id=e},on=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",sn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new sn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},sn);function sn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}un.fromJson=function(e){if(null!==e)return new un(p.mapNotNullOrUndefined(e.match,function(e){return wt.fromJson(e,rr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var an=un;function un(e,t){this.includeTargets=e,this.excludeTargets=t}var cn="X-HACKLE-SDK-KEY",ln="X-HACKLE-SDK-NAME",pn="X-HACKLE-SDK-VERSION",fn="X-HACKLE-SDK-TIME",hn=100,dn=6e4,vn=500,yn=3650,mn="_hackle_hid",gn="_hackle_id",En="hackle-repository-storage",wn="_hackle_session_id",bn="_hackle_last_event_ts",Tn="_hackle_uid",_n="_hackle_did",In="_hackle_mkt",On="hackle-manual-override_ab",An="hackle-manual-override_ff",Nn="hackle-iam-hide",Rn="hackle-iam-impression",Sn="hackle-split-url-redirected",xn=1/86400*3,Cn="hackle-workspace-config",Mn=6e4,kn=(Pn.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},Pn.prototype.tag=function(e,t){return this._tags[e]=t,this},Pn.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},Pn);function Pn(e){this.name=e,this._tags={},this.name=e}Dn.start=function(e){return new Dn(e=void 0===e?Dn.defaultClock:e)},Dn.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Dn.defaultClock=new Le;var Un=Dn;function Dn(e){this._clock=e,this.startTime=this._clock.tick()}Fn.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},Fn.prototype.tag=function(e,t){return this._tags[e]=t,this},Fn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Ln=Fn;function Fn(e){this.name=e,this._tags={}}jn.prototype.values=function(){return Array.from(this.data.values())},jn.prototype.keys=function(){return Array.from(this.data.keys())},jn.prototype.get=function(t){var r=this,e=this.keys().find(function(e){return r.compareFn(e,t)});return e?this.data.get(e):void 0},jn.prototype.has=function(e){return void 0!==this.get(e)},jn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},jn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},jn.prototype.forEach=function(e){this.data.forEach(e)},jn.prototype.filter=function(e){for(var t=new jn(this.compareFn),r=0,n=this.entries();r<n.length;r++){var i=n[r];e(i[0],i[1])&&t.add(i[0],i[1])}return t},jn.prototype.entries=function(){return Array.from(this.data.entries())};var Vn=jn;function jn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(Hn.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var zn=Hn;function Hn(e,t){this.valueSupplier=t,this.field=e}function Bn(e,t){return e.name===t.name&&xe.isEquals(e.tags,t.tags)}Object.defineProperty(Gn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Gn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Gn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Gn.prototype.counter=function(e,t){return void 0===t&&(t={}),new Ln(e).tags(t).register(this)},Gn.prototype.timer=function(e,t){return void 0===t&&(t={}),new kn(e).tags(t).register(this)},Gn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Gn.prototype.getOrCreateMetric=function(e,t){var r,n=this._metrics.get(e);return n?r=n:(r=t(e),this._metrics.add(e,r)),r},Gn.prototype.close=function(){};e=Gn;function Gn(){this.id=H(),this.name="MetricRegistry",this._metrics=new Vn(Bn)}Ne(Jn,Kn=e),Jn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),s.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Jn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},Jn.prototype.close=function(){this.stop()};var Kn,r=Jn;function Jn(e,t){var r=Kn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}qn.prototype.count=function(){return this.counterValue},qn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},qn.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var Yn=qn;function qn(e){this.counterValue=0,this.id=e}Xn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new Yn(this.id),e},Xn.prototype.count=function(){return this.currentCounter.count()},Xn.prototype.increment=function(e){this.currentCounter.increment(e)},Xn.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var $n=Xn;function Xn(e){this.id=e,this.currentCounter=new Yn(e)}Zn.prototype.count=function(){return this._count},Zn.prototype.totalTime=function(e){return De.nanosToUnit(this._total,e)},Zn.prototype.max=function(e){return De.nanosToUnit(this._max,e)},Zn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Zn.prototype.record=function(e,t){e<0||(t=De.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},Zn.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var Wn=Zn;function Zn(e){this._count=0,this._total=0,this._max=0,this.id=e}ei.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Wn(this.id),e},ei.prototype.count=function(){return this.currentTimer.count()},ei.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},ei.prototype.max=function(e){return this.currentTimer.max(e)},ei.prototype.record=function(e,t){this.currentTimer.record(e,t)},ei.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},ei.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var Qn=ei;function ei(e){this.id=e,this.currentTimer=new Wn(e)}Ne(ri,ti=r),ri.prototype.createCounter=function(e){return new $n(e)},ri.prototype.createTimer=function(e){return new Qn(e)},ri.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0===(r=t).flush||"function"!=typeof r.flush?e:e.concat(t.flush());var r},[]);this.flushMetrics(t,e)};var ti,B=ri;function ri(e,t){return ti.call(this,e,t)||this}ii.prototype.count=function(){return 0},ii.prototype.increment=function(e){},ii.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var ni=ii;function ii(e){this.id=e}Object.defineProperty(si.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),si.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},si.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},si.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},si.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var oi=si;function si(e){this._counters=new Vn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new ni(e)}ui.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]},ui.prototype.count=function(){return 0},ui.prototype.totalTime=function(e){return 0},ui.prototype.max=function(e){return 0},ui.prototype.mean=function(e){return 0},ui.prototype.record=function(e,t){};var ai=ui;function ui(e){this.id=e}Object.defineProperty(li.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),li.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},li.prototype.max=function(e){return this.firstTimer.max(e)},li.prototype.mean=function(e){return this.firstTimer.mean(e)},li.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(li.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),li.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},li.prototype.count=function(){return this.firstTimer.count()},li.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var ci=li;function li(e){this._timers=new Vn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new ai(e)}Ne(fi,pi=e),fi.prototype.createCounter=function(e){e=new oi(e);return this.addRegistry(e),e},fi.prototype.createTimer=function(e){e=new ci(e);return this.addRegistry(e),e},fi.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},fi.prototype.add=function(r){r instanceof fi||this.registries.has(r)||(this.registries.add(r),this.metrics.forEach(function(e){var t;void 0!==(t=e).add&&"function"==typeof t.add&&e.add(r)}))},fi.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var pi,o=fi;function fi(){var e=null!==pi&&pi.apply(this,arguments)||this;return e.registries=new Vn(function(e,t){return e.id===t.id}),e}di.counter=function(e,t){return di.globalRegistry.counter(e,t)},di.timer=function(e,t){return di.globalRegistry.timer(e,t)},di.addRegistry=function(e){di.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},di.globalRegistry=new o;var hi=di;function di(){}yi.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},yi.isNotEmptyString=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var vi=yi;function yi(){}gi.builder=function(){return new Ei},gi.get=function(e){return gi.builder().url(e).build()},gi.prototype.toBuilder=function(){return new Ei(this)};var mi=gi;function gi(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}wi.prototype.url=function(e){return this._url=e,this},wi.prototype.method=function(e){return this._method=e,this},wi.prototype.body=function(e){return this._body=e,this},wi.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},wi.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},wi.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new mi(this._url,this._method,this._body,this._headers.build(),e)};var Ei=wi;function wi(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:_i.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}Ti.ok=function(e,t){return Ti.of(200,e,t)},Ti.of=function(e,t,r){return new Ti(e,null!=t?t:null,null!=r?r:_i.empty())},Ti.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},Ti.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},Ti.prototype.isNotModified=function(){return 304===this.statusCode};var bi=Ti;function Ti(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Ii.empty=function(){return new Ii(new Map)},Ii.builder=function(){return new Oi(new Map)},Ii.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],i=n[0],n=n[1];if(vi.equalsIgnoreCase(i,e))return n}return null},Ii.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Ii.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],t=t[1];return e[r]=t,e},{})},Ii.prototype.toBuilder=function(){return new Oi(this.headers)},Ii.IF_MODIFIED_SINCE="If-Modified-Since",Ii.LAST_MODIFIED="Last-Modified";var _i=Ii;function Ii(e){this.headers=e}Ai.prototype.add=function(e,t){return this.headers.set(e,t),this},Ai.prototype.build=function(){return new _i(this.headers)};var Oi=Ai;function Ai(e){this.headers=e}Ne(Si,Ni=B),Si.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),hn).forEach(function(e){r.dispatch(e,t)})},Si.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Si.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return s.log.debug("Failed to flushing metrics: ".concat(e))})},Si.prototype.createRequest=function(e){return mi.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Si.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Si.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:a.fromMap(p.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Si.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.publish(!0)}};var Ni,Ri=Si;function Si(e,t,r,n,i){n=Ni.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}Ci.experiment=function(e,t,r){t=hi.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Ci.featureFlag=function(e,t,r){t=hi.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Ci.remoteConfig=function(e,t,r){t=hi.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Ci.inAppMessage=function(e,t,r){t=hi.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var xi=Ci;function Ci(){}ki.record=function(e,t,r){e=hi.timer("api.call",{operation:e,success:ki.success(r)});t.stop(e)},ki.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Mi=ki;function ki(){}Ui.decide=function(e,t,r,n){if(a.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)}},Ui.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?Je.of(n,h.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Pi=Ui;function Ui(){}var Di=s.log,Li=(Fi.prototype.get=function(t,r){var n,e=Un.start();try{n=this.decide(t,r)}catch(e){Di.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Je.of(r,h.EXCEPTION)}return xi.remoteConfig(e,t,n),n.value},Fi.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Pi.decide(this.core,e,t,r)},Fi);function Fi(e,t,r){this.core=e,this.userManager=t,this.user=r}zi.prototype.contains=function(e){return this._properties.has(e)},zi.prototype.remove=function(e){var r=this;return e instanceof Map&&e.forEach(function(e,t){r.remove(t)}),"string"==typeof e&&this._properties.delete(e),this},zi.prototype.compute=function(e,t){var r=this._properties.get(e),t=t(r);null!==t?this.add(e,t):null===r&&!this.contains(e)||this.remove(e)},zi.prototype.add=function(e,t,r){if((r=void 0===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;r=ke.sanitizeValue(e,t);return a.isNullOrUndefined(r)||this._properties.set(e,r),this},zi.prototype.addProperties=function(e,r){var n=this;return void 0===r&&(r=!1),e.forEach(function(e,t){n.add(t,e,r)}),this},zi.prototype.build=function(){return this._properties};var Vi,ji=zi;function zi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(i=Vi=Vi||{}).SET="$set",i.SET_ONCE="$setOnce",i.UNSET="$unset",i.INCREMENT="$increment",i.APPEND="$append",i.APPEND_ONCE="$appendOnce",i.PREPEND="$prepend",i.PREPEND_ONCE="$prependOnce",i.REMOVE="$remove",i.CLEAR_ALL="$clearAll";Bi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new ji).addProperties(e).addProperties(t).build()};var Hi=Bi;function Bi(){}Ki.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new ji).addProperties(e).addProperties(t,!0).build()};var Gi=Ki;function Ki(){}Yi.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new ji).addProperties(e).remove(t).build()};var Ji=Yi;function Yi(){}$i.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new ji;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},$i.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var qi=$i;function $i(){}Xi.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new ji;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},Xi.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},Xi.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},Xi.prototype.contains=function(e,t){return e.includes(t)},Xi.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Re([e],t,!0)},Xi.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Re(Re([],e,!0),[t],!1)};t=Xi;function Xi(){}Ne(Qi,Wi=t),Qi.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var Wi,Zi=Qi;function Qi(){return null!==Wi&&Wi.apply(this,arguments)||this}Ne(ro,eo=t),ro.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},ro.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var eo,to=ro;function ro(){return null!==eo&&eo.apply(this,arguments)||this}Ne(oo,no=t),oo.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var no,io=oo;function oo(){return null!==no&&no.apply(this,arguments)||this}Ne(uo,so=t),uo.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)},uo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},uo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var so,ao=uo;function uo(){return null!==so&&so.apply(this,arguments)||this}Ne(po,co=t),po.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},po.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var co,lo=po;function po(){return null!==co&&co.apply(this,arguments)||this}ho.prototype.operate=function(e,t){return new Map};var fo=ho;function ho(){}yo.get=function(e){switch(e){case Vi.SET:return new Hi;case Vi.SET_ONCE:return new Gi;case Vi.UNSET:return new Ji;case Vi.INCREMENT:return new qi;case Vi.APPEND:return new Zi;case Vi.APPEND_ONCE:return new to;case Vi.PREPEND:return new io;case Vi.PREPEND_ONCE:return new ao;case Vi.CLEAR_ALL:return new fo;case Vi.REMOVE:return new lo}};var vo=yo;function yo(){}go.prototype.set=function(e,t){return this.add(Vi.SET,e,t)},go.prototype.setOnce=function(e,t){return this.add(Vi.SET_ONCE,e,t)},go.prototype.unset=function(e){return this.add(Vi.UNSET,e,"-")},go.prototype.increment=function(e,t){return this.add(Vi.INCREMENT,e,t)},go.prototype.append=function(e,t){return this.add(Vi.APPEND,e,t)},go.prototype.appendOnce=function(e,t){return this.add(Vi.APPEND_ONCE,e,t)},go.prototype.prepend=function(e,t){return this.add(Vi.PREPEND,e,t)},go.prototype.prependOnce=function(e,t){return this.add(Vi.PREPEND_ONCE,e,t)},go.prototype.remove=function(e,t){return this.add(Vi.REMOVE,e,t)},go.prototype.clearAll=function(){return this.add(Vi.CLEAR_ALL,"clearAll","-")},go.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new Eo(new Map(e))},go.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},go.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new ji);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var mo=go;function go(){this.operations=new Map}wo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=vo.get(t).operate(r,e)}),r},wo.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),ke.sanitize(a.fromMap(e))),r))}),i},wo.prototype.toRecord=function(){var n={};return this.operations.forEach(function(e,t){var r={};e.forEach(function(e,t){r[t]=e}),n[t]=r}),n};var Eo=wo;function wo(e){this.operations=null!=e?e:new Map}To.timeout=function(r,n){return new Promise(function(e,t){setTimeout(function(){return t(new Error("timeout (".concat(n,"ms)")))},n),r.then(e,t)})};var bo=To;function To(){}var _o=s.log,Io=(Oo.prototype.initialize=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),_o.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),_o.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),_o.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},Oo.prototype.getSessionId=function(){return this.sessionManager.sessionId},Oo.prototype.getUser=function(){return this.userManager.currentUser},Oo.prototype.setUser=function(e){try{var t=Et(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(_o.warn("invalid user"),Promise.resolve())}catch(e){return _o.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},Oo.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=xe.sanitizeValue(e);if(!t)return _o.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return _o.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},Oo.prototype.setDeviceId=function(e){try{var t=xe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(_o.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return _o.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},Oo.prototype.setUserProperty=function(e,t){e=(new mo).set(e,t).build();return this.updateUserProperties(e)},Oo.prototype.setUserProperties=function(e){try{var t=ke.sanitize(e),r=new mo;return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){return _o.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},Oo.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return _o.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},Oo.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new mo).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return _o.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},Oo.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},Oo.prototype.variationDetail=function(r,n,e){var i=e||"A",e=Un.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return _o.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),Xe.of(i,h.EXCEPTION)}}(this);return xi.experiment(e,r,t),t},Oo.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},Oo.prototype.featureFlagDetail=function(r,n){var e=Un.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return _o.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}}(this);return xi.featureFlag(e,r,t),t},Oo.prototype.track=function(e,t){try{_o.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){_o.error("Unexpected exception while tracking event: ".concat(e))}},Oo.prototype.trackPageView=function(e){_o.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},Oo.prototype.remoteConfig=function(e){return new Li(this.core,this.userManager,e)},Oo.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},Oo.prototype.onInitialized=function(r){var n;return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(this.initialized)return[2,{success:!0}];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,bo.timeout(this.initialization,null!=(n=null==r?void 0:r.timeout)?n:3e3)];case 2:return e.sent(),[2,{success:!0}];case 3:return t=e.sent(),_o.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},Oo.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},Oo.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(_o.debug("UserExplorer opened."),hi.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):_o.error("UserExplorer is not provided")},Oo.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():_o.warn("There is no active HackleDevtools.")},Oo.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},Oo.prototype.close=function(){_o.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},Oo);function Oo(e,t,r,n,i,o){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.fetchThrottler=i,this.devTools=o,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.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.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.initialization=this.initialize()}var Ao=s.log,No=(Ro.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user}},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(e){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(e){return Ao.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},Ro);function Ro(e,t){this.invocationProcessor=e,this.user=t}xo.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},xo.prototype.resolve=function(e){e=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(e))throw new Error("invalid invocator response data");if(e.success)return{message:e.message,success:e.success,data:e.data};throw new Error("failed response")};var So=xo;function xo(){}Mo.tryParse=function(e){try{return new URL(e)}catch(e){return}},Mo.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:Mo.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},Mo.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},Mo.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},Mo.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},Mo.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var Co=Mo;function Mo(){}Po.extractDomain=function(e){var t=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i),e.match(t));return r?r[0]:""},Po.prototype.getItem=function(e){for(var t,r=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return null!=(t=Co.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},Po.prototype.getAllItem=function(e){var t=document.cookie.split("; ").map(function(e){return e.split("=")}),r=null==e?void 0:e.keyPrefix;return r?t.filter(function(e){var t=e[0];return e[1],t.startsWith(r)}):t},Po.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Po.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),i="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(o+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+n+s+o);return document.cookie=a},Po.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Po.prototype.getOptions=function(){return this.options},Po.getInstance=function(e){return void 0===e&&(e={days:yn,isCrossSubdomain:!0}),Po.storage=Po.storage?Po.storage:new Po(e)};var ko=Po;function Po(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Do.prototype.initialize=function(){ko.getInstance().getItem(mn)||Vo()},Do.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void Fo()}};var Uo=Do;function Do(){}function Lo(){var e=ko.getInstance(),t=e.getItem(gn);if(t)return t;t=e.getItem(mn);return t||Vo()}function Fo(){ko.getInstance().removeItem(gn)}function Vo(){var e=H();return ko.getInstance().setItem(mn,e),e}zo.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},zo.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var jo=zo;function zo(e){this.invocator=e}var Ho=s.log;Go.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:Lo()}catch(e){return Ho.error("Unexpected exception while get sessionId: ".concat(e)),Lo()}},Go.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=Et(t))?e:this.defaultUser()}catch(e){return Ho.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},Go.prototype.setUser=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Et(n)))return Ho.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){Ho.error("Unexpected exception while set user: ".concat(e))}return[2]})})},Go.prototype.setUserId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=xe.sanitizeValue(n)))return Ho.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){Ho.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},Go.prototype.setDeviceId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=xe.sanitizeValue(n)))return Ho.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){Ho.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},Go.prototype.setUserProperty=function(r,n){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){Ho.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},Go.prototype.setUserProperties=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{t=ke.sanitize(n),r=new mo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Ho.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},Go.prototype.updateUserProperties=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){Ho.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},Go.prototype.resetUser=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){Ho.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},Go.prototype.variation=function(t,e,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return Ho.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},Go.prototype.variationDetail=function(t,e,r){var n;void 0===r&&(r="A");try{var i={command:"variationDetail",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return Xe.of(o.variation,o.reason,new ze(new Map(Object.entries(null!=(n=o.config.parameters)?n:{}))))}catch(e){return Ho.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),Xe.of(r,h.EXCEPTION)}},Go.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)}},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return Ho.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},Go.prototype.featureFlagDetail=function(t,e){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:t,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new Ze(i.isOn,i.reason,new ze(new Map(Object.entries(null!=(r=i.config.parameters)?r:{}))),void 0)}catch(e){return Ho.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}},Go.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)}};this.invocationProcessor.process(r)}catch(e){Ho.error("Unexpected exception while tracking event: ".concat(e))}},Go.prototype.trackPageView=function(e){Ho.info("Web to app integration feature is not support 'trackPageView' method")},Go.prototype.remoteConfig=function(e){return new No(this.invocationProcessor,this.convertUser(e))},Go.prototype.onReady=function(e,t){e()},Go.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){Ho.error("Unexpected exception while show userExplorer: ".concat(e))}},Go.prototype.hideUserExplorer=function(){Ho.info("Web to app integration feature is not support 'hideUserExplorer' method")},Go.prototype.fetch=function(){return Promise.resolve()},Go.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},Go.prototype.close=function(){Ho.info("Web to app integration feature is not support 'close' method")},Go.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},Go.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=Et(e))?e:void 0},Go.prototype.defaultUser=function(){return{deviceId:Lo()}};var Bo=Go;function Go(e){this.invocationProcessor=e,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.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.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)}function Ko(e){return e&&e.Math==Math&&e}function Jo(e){try{return!!e()}catch(e){return!0}}function Yo(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function qo(e){return Cs(xs(e),8,-1)}function $o(e){if(null==e)throw Us("Can't call method on "+e);return e}function Xo(e){return Ds(Ls(e))}function Wo(e){return"function"==typeof e}function Zo(e){return"object"==typeof e?null!==e:Fs(e)}function Qo(e,t){return arguments.length<2?(r=Vs[e],js(r)?r:void 0):Vs[e]&&Vs[e][t];var r}function es(e){try{return $s(e)}catch(e){return"Object"}}function ts(e){if(Xs(e))return e;throw Zs(Ws(e)+" is not a function")}function rs(e,t){return null==(e=e[t])?void 0:Qs(e)}function ns(t,r){try{oa(ia,t,{value:r,configurable:!0,writable:!0})}catch(e){ia[t]=r}return r}function is(e){return ca(ua(e))}function os(e){return"Symbol("+(void 0===e?"":e)+")_"+va(++ha+da,36)}function ss(e){var t;return ma(ba,e)&&(Ea||"string"==typeof ba[e])||(t="Symbol."+e,Ea&&ma(Ta,e)?ba[e]=Ta[e]:ba[e]=(wa&&_a?_a:Ia)(t)),ba[e]}function as(e){return e=Ma(e,"string"),ka(e)?e:e+""}function us(e){return Ua?Pa.createElement(e):{}}function cs(e){if(Ka(e))return e;throw Ya(Ja(e)+" is not an object")}function ls(e){return uu[e]||(uu[e]=au(e))}function ps(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(Au(r)&&Ru(r,o,n),n.global)i?e[t]=r:Su(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Nu.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function fs(e){return(e=+e)!=e||0==e?0:Mu(e)}function hs(e,t){return(e=ku(e))<0?Pu(e+t,0):Uu(e,t)}function v(e){return Fu(e.length)}function ds(a){return function(e,t,r){var n,i=Vu(e),o=zu(i),s=ju(r,o);if(a&&t!=t){for(;s<o;)if((n=i[s++])!=n)return!0}else for(;s<o;s++)if((a||s in i)&&i[s]===t)return a||s||0;return!a&&-1}}function vs(e,t){var r,n=Bu(e),i=0,o=[];for(r in n)!Hu(Ku,r)&&Hu(n,r)&&Ju(o,r);for(;t.length>i;)!Hu(n,r=t[i++])||~Gu(o,r)||Ju(o,r);return o}function ys(e,t,r){for(var n=ec(t),i=rc.f,o=tc.f,s=0;s<n.length;s++){var a=n[s];Qu(e,a)||r&&Qu(r,a)||i(e,a,o(t,a))}}function ms(e,t){return(e=ac[sc(e)])==cc||e!=uc&&(ic(t)?nc(t):!!t)}function y(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?lc:a?lc[o]||dc(o,{}):(lc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=pc(u,r))&&i.value:u[r],!yc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;vc(n,i)}(e.sham||i&&i.sham)&&fc(n,"sham",!0),hc(u,r,n,e)}}var gs,Es,ws,bs,Ts,_s,Is,Os,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=Ko("object"==typeof globalThis&&globalThis)||Ko("object"==typeof window&&window)||Ko("object"==typeof self&&self)||Ko("object"==typeof r&&r)||function(){return this}()||Function("return this")(),o={},B=!Jo(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),i=!Jo(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),As=Function.prototype.call,t=i?As.bind(As):function(){return As.apply(As,arguments)},r={},m={}.propertyIsEnumerable,Ns=Object.getOwnPropertyDescriptor,g=Ns&&!m.call({1:2},1),g=(r.f=g?function(e){e=Ns(this,e);return!!e&&e.enumerable}:m,i),m=Function.prototype,E=m.bind,Rs=m.call,Ss=g&&E.bind(Rs,Rs),m=g?function(e){return e&&Ss(e)}:function(e){return e&&function(){return Rs.apply(e,arguments)}},E=m,xs=E({}.toString),Cs=E("".slice),g=Jo,Ms=qo,ks=Object,Ps=m("".split),E=g(function(){return!ks("z").propertyIsEnumerable(0)})?function(e){return"String"==Ms(e)?Ps(e,""):ks(e)}:ks,Us=TypeError,Ds=E,Ls=$o,Fs=Wo,Vs=e,js=Wo,g=m({}.isPrototypeOf),zs=Qo("navigator","userAgent")||"",w=zs,Hs=e.process,Bs=e.Deno,Hs=Hs&&Hs.versions||Bs&&Bs.version,Bs=Hs&&Hs.v8,Hs=T=!(T=Bs?0<(b=Bs.split("."))[0]&&b[0]<4?1:+(b[0]+b[1]):T)&&w&&(!(b=w.match(/Edge\/(\d+)/))||74<=b[1])&&(b=w.match(/Chrome\/(\d+)/))?+b[1]:T,Gs=Hs,Bs=Jo,w=!!Object.getOwnPropertySymbols&&!Bs(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Gs&&Gs<41}),b=w&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ks=Qo,Js=Wo,Ys=g,qs=Object,T=b?function(e){return"symbol"==typeof e}:function(e){var t=Ks("Symbol");return Js(t)&&Ys(t.prototype,qs(e))},$s=String,Xs=Wo,Ws=es,Zs=TypeError,Qs=ts,ea=t,ta=Wo,ra=Zo,na=TypeError,Bs={exports:{}},ia=e,oa=Object.defineProperty,sa=ns,_="__core-js_shared__",sa=e[_]||sa(_,{}),aa=sa,ua=((Bs.exports=function(e,t){return aa[e]||(aa[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"}),$o),ca=Object,la=is,pa=m({}.hasOwnProperty),_=Object.hasOwn||function(e,t){return pa(la(e),t)},fa=m,ha=0,da=Math.random(),va=fa(1..toString),fa=e,ya=Bs.exports,ma=_,ga=os,Ea=w,wa=b,ba=ya("wks"),Ta=fa.Symbol,_a=Ta&&Ta.for,Ia=wa?Ta:Ta&&Ta.withoutSetter||ga,Oa=t,Aa=Zo,Na=T,Ra=rs,Sa=function(e,t){var r,n;if("string"===t&&ta(r=e.toString)&&!ra(n=ea(r,e)))return n;if(ta(r=e.valueOf)&&!ra(n=ea(r,e)))return n;if("string"!==t&&ta(r=e.toString)&&!ra(n=ea(r,e)))return n;throw na("Can't convert object to primitive value")},xa=TypeError,Ca=ss("toPrimitive"),Ma=function(e,t){if(!Aa(e)||Na(e))return e;var r=Ra(e,Ca);if(r){if(r=Oa(r,e,t=void 0===t?"default":t),!Aa(r)||Na(r))return r;throw xa("Can't convert object to primitive value")}return Sa(e,t=void 0===t?"number":t)},ka=T,w=Zo,Pa=e.document,Ua=w(Pa)&&w(Pa.createElement),Da=us,b=!B&&!Jo(function(){return 7!=Object.defineProperty(Da("div"),"a",{get:function(){return 7}}).a}),La=t,Fa=r,Va=Yo,ja=Xo,za=as,Ha=_,Ba=b,Ga=Object.getOwnPropertyDescriptor,ya=(o.f=B?Ga:function(e,t){if(e=ja(e),t=za(t),Ba)try{return Ga(e,t)}catch(e){}if(Ha(e,t))return Va(!La(Fa.f,e,t),e[t])},{}),fa=B&&Jo(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ka=Zo,Ja=String,Ya=TypeError,qa=b,$a=cs,Xa=as,Wa=TypeError,Za=Object.defineProperty,Qa=Object.getOwnPropertyDescriptor,eu="enumerable",tu="configurable",ru="writable",ga=(ya.f=B?fa?function(e,t,r){var n;return $a(e),t=Xa(t),$a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&ru in r&&!r[ru]&&((n=Qa(e,t))&&n[ru]&&(e[t]=r.value,r={configurable:(tu in r?r:n)[tu],enumerable:(eu in r?r:n)[eu],writable:!1})),Za(e,t,r)}:Za:function(e,t,r){if($a(e),t=Xa(t),$a(r),qa)try{return Za(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Wa("Accessors not supported");return"value"in r&&(e[t]=r.value),e},B),nu=ya,iu=Yo,T=ga?function(e,t,r){return nu.f(e,t,iu(1,r))}:function(e,t,r){return e[t]=r,e},w={exports:{}},r=B,b=_,ga=Function.prototype,I=r&&Object.getOwnPropertyDescriptor,b=b(ga,"name"),b={EXISTS:b,PROPER:b&&"something"===function(){}.name,CONFIGURABLE:b&&(!r||I(ga,"name").configurable)},r=Wo,I=sa,ou=m(Function.toString),ga=(r(I.inspectSource)||(I.inspectSource=function(e){return ou(e)}),I.inspectSource),r=Wo,I=ga,su=e.WeakMap,r=r(su)&&/native code/.test(I(su)),I=Bs.exports,au=os,uu=I("keys"),su={},Bs=m,cu=Zo,lu=T,pu=_,I=sa,fu=ls,hu=su,du="Object already initialized",vu=e.TypeError,O=e.WeakMap,r=(Is=r||I.state?(gs=I.state||(I.state=new O),Es=Bs(gs.get),ws=Bs(gs.has),bs=Bs(gs.set),Ts=function(e,t){if(ws(gs,e))throw new vu(du);return t.facade=e,bs(gs,e,t),t},_s=function(e){return Es(gs,e)||{}},function(e){return ws(gs,e)}):(hu[Os=fu("state")]=!0,Ts=function(e,t){if(pu(e,Os))throw new vu(du);return t.facade=e,lu(e,Os,t),t},_s=function(e){return pu(e,Os)?e[Os]:{}},function(e){return pu(e,Os)}),{set:Ts,get:_s,has:Is,enforce:function(e){return Is(e)?_s(e):Ts(e,{})},getterFor:function(t){return function(e){if(cu(e)&&(e=_s(e)).type===t)return e;throw vu("Incompatible receiver, "+t+" required")}}}),I=Jo,yu=Wo,mu=_,gu=B,Eu=b.CONFIGURABLE,wu=ga,bu=r.enforce,Tu=r.get,_u=Object.defineProperty,Iu=gu&&!I(function(){return 8!==_u(function(){},"length",{value:8}).length}),Ou=String(String).split("String"),O=w.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),(!mu(e,"name")||Eu&&e.name!==t)&&(gu?_u(e,"name",{value:t,configurable:!0}):e.name=t),Iu&&r&&mu(r,"arity")&&e.length!==r.arity&&_u(e,"length",{value:r.arity});try{r&&mu(r,"constructor")&&r.constructor?gu&&_u(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=bu(e);return mu(r,"source")||(r.source=Ou.join("string"==typeof t?t:"")),e},Au=(Function.prototype.toString=O(function(){return yu(this)&&Tu(this).source||wu(this)},"toString"),Wo),Nu=ya,Ru=w.exports,Su=ns,Bs={},xu=Math.ceil,Cu=Math.floor,Mu=Math.trunc||function(e){e=+e;return(0<e?Cu:xu)(e)},ku=fs,Pu=Math.max,Uu=Math.min,Du=fs,Lu=Math.min,Fu=function(e){return 0<e?Lu(Du(e),9007199254740991):0},Vu=Xo,ju=hs,zu=v,hu={includes:ds(!0),indexOf:ds(!1)},fu=m,Hu=_,Bu=Xo,Gu=hu.indexOf,Ku=su,Ju=fu([].push),I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Yu=vs,qu=I.concat("length","prototype"),O=(Bs.f=Object.getOwnPropertyNames||function(e){return Yu(e,qu)},{}),fu=(O.f=Object.getOwnPropertySymbols,Qo),$u=Bs,Xu=O,Wu=cs,Zu=m([].concat),O=fu("Reflect","ownKeys")||function(e){var t=$u.f(Wu(e)),r=Xu.f;return r?Zu(t,r(e)):t},Qu=_,ec=O,tc=o,rc=ya,nc=Jo,ic=Wo,oc=/#|\.prototype\./,sc=ms.normalize=function(e){return String(e).replace(oc,".").toLowerCase()},ac=ms.data={},uc=ms.NATIVE="N",cc=ms.POLYFILL="P",fu=ms,lc=e,pc=o.f,fc=T,hc=ps,dc=ns,vc=ys,yc=fu,O=!Jo(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),mc=_,gc=Wo,Ec=is,wc=ls("IE_PROTO"),bc=Object,Tc=bc.prototype,O=O?bc.getPrototypeOf:function(e){e=Ec(e);if(mc(e,wc))return e[wc];var t=e.constructor;return gc(t)&&e instanceof t?t.prototype:e instanceof bc?Tc:null},_c=Wo,Ic=String,Oc=TypeError,Ac=m,Nc=cs,Rc=function(e){if("object"==typeof e||_c(e))return e;throw Oc("Can't set "+Ic(e)+" as a prototype")},Sc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Ac(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Nc(e),Rc(t),n?r(e,t):e.__proto__=t,e}}():void 0),xc={},Cc=vs,Mc=I,A=Object.keys||function(e){return Cc(e,Mc)},kc=ya,Pc=cs,Uc=Xo,Dc=A;xc.f=B&&!fa?Object.defineProperties:function(e,t){Pc(e);for(var r,n=Uc(t),i=Dc(t),o=i.length,s=0;s<o;)kc.f(e,r=i[s++],n[r]);return e};function Lc(){}function Fc(e){e.write(ol("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Vc(e,t){return hl(e),void 0===t?e:dl?vl(e,t):function(){return e.apply(t,arguments)}}function jc(e){return void 0!==e&&(yl.Array===e||gl[ml]===e)}function zc(e){if(null!=e)return Ol(e,Nl)||Ol(e,"@@iterator")||Al[Il(e)]}function Hc(e,t){if(t=arguments.length<2?Ml(e):t,Sl(t))return xl(Rl(t,e));throw kl(Cl(e)+" is not iterable")}function Bc(e,t,r){var n,i;Ul(e);try{if(!(n=Dl(e,"return"))){if("throw"===t)throw r;return r}n=Pl(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Ul(n),r}function Gc(e,t){this.stopped=e,this.result=t}function Kc(e,t,r){function n(e){return o&&Jl(o,"normal",e),new Gc(!0,e)}function i(e){return f?(Vl(e),v?y(e[0],e[1],n):y(e[0],e[1])):v?y(e,n):y(e)}var o,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Ll(t,p);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=Kl(e)))throw Yl(jl(e)+" is not iterable");if(zl(r)){for(s=0,a=Hl(e);s<a;s++)if((u=i(e[s]))&&Bl(ql,u))return u;return new Gc(!1)}o=Gl(e,r)}for(c=(h?e:o).next;!(l=Fl(c,o)).done;){try{u=i(l.value)}catch(e){Jl(o,"throw",e)}if("object"==typeof u&&u&&Bl(ql,u))return u}return new Gc(!1)}function Jc(e){if("Symbol"===$l(e))throw TypeError("Cannot convert a Symbol value to a string");return Xl(e)}function Yc(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=Ql(hp,this);return tp?r=tp(new pp,i?ep(this):hp):(r=i?this:rp(hp),np(r,lp,"Error")),void 0!==t&&np(r,"message",up(t)),cp&&np(r,"stack",op(r.stack,1)),sp(r,n),ap(e,fp,{that:i=[]}),np(r,"errors",i),r}function qc(e){vp[dp][e]=!0}var $c,Xc,A=Qo("document","documentElement"),Wc=cs,Zc=xc,Qc=I,fa=su,el=A,tl=us,rl="prototype",nl="script",il=ls("IE_PROTO"),ol=function(e){return"<"+nl+">"+e+"</"+nl+">"},sl=function(){try{$c=new ActiveXObject("htmlfile")}catch(e){}sl="undefined"==typeof document||document.domain&&$c?Fc($c):(e=tl("iframe"),t="java"+nl+":",e.style.display="none",el.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(ol("document.F=Object")),t.close(),t.F);for(var e,t,r=Qc.length;r--;)delete sl[rl][Qc[r]];return sl()},xc=(fa[il]=!0,Object.create||function(e,t){var r;return null!==e?(Lc[rl]=Wc(e),r=new Lc,Lc[rl]=null,r[il]=e):r=sl(),void 0===t?r:Zc.f(r,t)}),al=Error,ul=m("".replace),I=String(al("zxcasd").stack),cl=/\n\s*at [^:]*:[^\n]*/,ll=cl.test(I),pl=Zo,fl=T,hl=ts,dl=i,vl=m(m.bind),fa={},yl=fa,ml=ss("iterator"),gl=Array.prototype,I={},I=(I[ss("toStringTag")]="z","[object z]"===String(I)),N=I,El=Wo,wl=qo,bl=ss("toStringTag"),Tl=Object,_l="Arguments"==wl(function(){return arguments}()),N=N?wl:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=Tl(e),bl))?t:_l?wl(e):"Object"==(t=wl(e))&&El(e.callee)?"Arguments":t},Il=N,Ol=rs,Al=fa,Nl=ss("iterator"),Rl=t,Sl=ts,xl=cs,Cl=es,Ml=zc,kl=TypeError,Pl=t,Ul=cs,Dl=rs,Ll=Vc,Fl=t,Vl=cs,jl=es,zl=jc,Hl=v,Bl=g,Gl=Hc,Kl=zc,Jl=Bc,Yl=TypeError,ql=Gc.prototype,$l=N,Xl=String,Wl=Jc,Zl=Yo,R=!Jo(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Zl(1,7)),7!==e.stack)}),S=y,Ql=g,ep=O,tp=Sc,x=ys,rp=xc,np=T,ip=Yo,op=function(e,t){if(ll&&"string"==typeof e&&!al.prepareStackTrace)for(;t--;)e=ul(e,cl,"");return e},sp=function(e,t){pl(t)&&"cause"in t&&fl(e,"cause",t.cause)},ap=Kc,up=function(e,t){return void 0===e?arguments.length<2?"":t:Wl(e)},cp=R,lp=ss("toStringTag"),pp=Error,fp=[].push,hp=(tp?tp(Yc,pp):x(Yc,pp,{name:!0}),Yc.prototype=rp(pp.prototype,{constructor:ip(1,Yc),message:ip(1,""),name:ip(1,"AggregateError")})),R=(S({global:!0,constructor:!0,arity:2},{AggregateError:Yc}),ss),x=xc,ip=ya.f,dp=R("unscopables"),vp=Array.prototype,S=(null==vp[dp]&&ip(vp,dp,{configurable:!0,value:x(null)}),Jo),R=Wo,ip=O,x=ps,yp=ss("iterator"),mp=!1;[].keys&&("next"in(C=[].keys())?(ip=ip(ip(C)))!==Object.prototype&&(Xc=ip):mp=!0);function gp(e,t,r){(e=e&&!r?e.prototype:e)&&!_p(e,Ip)&&Tp(e,Ip,{configurable:!0,value:t})}function Ep(){return this}function wp(){return this}function bp(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!Bp&&e in p)return p[e];switch(e){case"keys":case Kp:case Jp:return function(){return new r(this,e)}}return function(){return new r(this)}}kp(r,t,n);var u,c,n=t+" Iterator",l=!1,p=e.prototype,f=p[Gp]||p["@@iterator"]||i&&p[i],h=!Bp&&f||a(i),d="Array"==t&&p.entries||f;if(d&&(d=Pp(d.call(new e)))!==Object.prototype&&d.next&&(Pp(d)!==Hp&&(Up?Up(d,Hp):Mp(d[Gp])||Fp(d,Gp,wp)),Dp(d,n,!0)),jp&&i==Kp&&f&&f.name!==Kp&&(zp?Lp(p,"name",Kp):(l=!0,h=function(){return Cp(f,this)})),i)if(u={values:a(Kp),keys:o?h:a("keys"),entries:a(Jp)},s)for(c in u)!Bp&&!l&&c in p||Fp(p,c,u[c]);else xp({target:t,proto:!0,forced:Bp||l},u);return p[Gp]!==h&&Fp(p,Gp,h,{name:i}),Vp[t]=h,u}R((Xc=null==Xc||S(function(){var e={};return Xc[yp].call(e)!==e})?{}:Xc)[yp])||x(Xc,yp,function(){return this});var C={IteratorPrototype:Xc,BUGGY_SAFARI_ITERATORS:mp},Tp=ya.f,_p=_,Ip=ss("toStringTag"),Op=C.IteratorPrototype,Ap=xc,Np=Yo,Rp=gp,Sp=fa,xp=y,Cp=t,Mp=Wo,kp=function(e,t,r,n){t+=" Iterator";return e.prototype=Ap(Op,{next:Np(+!n,r)}),Rp(e,t,!1),Sp[t]=Ep,e},Pp=O,Up=Sc,Dp=gp,Lp=T,Fp=ps,ip=ss,Vp=fa,jp=b.PROPER,zp=b.CONFIGURABLE,Hp=C.IteratorPrototype,Bp=C.BUGGY_SAFARI_ITERATORS,Gp=ip("iterator"),Kp="values",Jp="entries",Yp=Xo,R=qc,S=fa,x=r,mp=ya.f,b=bp,C=B,qp="Array Iterator",$p=x.set,Xp=x.getterFor(qp),ip=b(Array,"Array",function(e,t){$p(this,{type:qp,target:Yp(e),index:0,kind:t})},function(){var e=Xp(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),fa=S.Arguments=S.Array;if(R("keys"),R("values"),R("entries"),C&&"values"!==fa.name)try{mp(fa,"name",{value:"values"})}catch(e){}var Wp=N;I||ps(Object.prototype,"toString",I?{}.toString:function(){return"[object "+Wp(this)+"]"},{unsafe:!0});function Zp(e){var e=af(e),t=uf.f;cf&&e&&!e[lf]&&t(e,lf,{configurable:!0,get:function(){return this}})}function Qp(e,t){if(pf(t,e))return e;throw ff("Incorrect invocation")}function ef(){}function tf(e){if(!hf(e))return!1;try{return mf(ef,yf,e),!0}catch(e){return!1}}function rf(e){if(!hf(e))return!1;switch(df(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wf||!!Ef(gf,vf(e))}catch(e){return!0}}function nf(e,t){return void 0===(e=If(e).constructor)||null==(e=If(e)[Af])?t:Of(e)}var of,sf,x="process"==qo(e.process),af=Qo,uf=ya,cf=B,lf=ss("species"),pf=g,ff=TypeError,b=m,S=Jo,hf=Wo,df=N,vf=ga,yf=[],mf=Qo("Reflect","construct"),gf=/^\s*(?:class|function)\b/,Ef=b(gf.exec),wf=!gf.exec(ef),R=(rf.sham=!0,!mf||S(function(){var e;return tf(tf.call)||!tf(Object)||!tf(function(){e=!0})||e})?rf:tf),bf=R,Tf=es,_f=TypeError,If=cs,Of=function(e){if(bf(e))return e;throw _f(Tf(e)+" is not a constructor")},Af=ss("species"),C=Function.prototype,Nf=C.apply,Rf=C.call,mp="object"==typeof Reflect&&Reflect.apply||(i?Rf.bind(Nf):function(){return Rf.apply(Nf,arguments)}),fa=m([].slice),Sf=TypeError,I=/(?:ipad|iphone|ipod).*applewebkit/i.test(zs),xf=e,Cf=mp,g=Vc,Mf=Wo,kf=_,N=Jo,Pf=A,Uf=fa,Df=us,Lf=function(e,t){if(e<t)throw Sf("Not enough arguments");return e},b=I,S=x,C=xf.setImmediate,i=xf.clearImmediate,Ff=xf.process,Vf=xf.Dispatch,jf=xf.Function,A=xf.MessageChannel,zf=xf.String,Hf=0,Bf={},Gf="onreadystatechange";try{of=xf.location}catch(e){}function Kf(e){return function(){uh(e)}}function Jf(e){uh(e.data)}function Yf(e){xf.postMessage(zf(e),of.protocol+"//"+of.host)}function qf(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function $f(){this.head=null,this.tail=null}function Xf(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=e,n=t}),this.resolve=bh(r),this.reject=bh(n)}function Wf(e,t){var r,n,i,o,s=t.value,a=t.state==Xh,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(t.rejection===Qh&&(o=t,Ih(xh,_h,function(){var e=o.facade;Th?Gh.emit("rejectionHandled",e):rd($h,e,o.value)})),t.rejection=Zh),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(Hh("Promise-chain cycle")):(n=ed(r))?Ih(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var Zf,Qf,eh,th,rh,nh,ih,oh,sh,ah,uh=function(e){var t;kf(Bf,e)&&(t=Bf[e],delete Bf[e],t())},A=(C&&i||(C=function(e){Lf(arguments.length,1);var t=Mf(e)?e:jf(e),r=Uf(arguments,1);return Bf[++Hf]=function(){Cf(t,void 0,r)},sf(Hf),Hf},i=function(e){delete Bf[e]},S?sf=function(e){Ff.nextTick(Kf(e))}:Vf&&Vf.now?sf=function(e){Vf.now(Kf(e))}:A&&!b?(b=(S=new A).port2,S.port1.onmessage=Jf,sf=g(b.postMessage,b)):xf.addEventListener&&Mf(xf.postMessage)&&!xf.importScripts&&of&&"file:"!==of.protocol&&!N(Yf)?(sf=Yf,xf.addEventListener("message",Jf,!1)):sf=Gf in Df("script")?function(e){Pf.appendChild(Df("script"))[Gf]=function(){Pf.removeChild(this),uh(e)}}:function(e){setTimeout(Kf(e),0)}),{set:C,clear:i}),S=e,g=/ipad|iphone|ipod/i.test(zs)&&void 0!==S.Pebble,b=/web0s(?!.*chrome)/i.test(zs),N=e,C=Vc,i=o.f,ch=A.set,S=I,o=g,I=b,lh=x,g=N.MutationObserver||N.WebKitMutationObserver,b=N.document,ph=N.process,M=N.Promise,i=i(N,"queueMicrotask"),i=i&&i.value,I=(i||(Zf=function(){var e,t;for(lh&&(e=ph.domain)&&e.exit();Qf;){t=Qf.fn,Qf=Qf.next;try{t()}catch(e){throw Qf?th():eh=void 0,e}}eh=void 0,e&&e.enter()},th=S||lh||I||!g||!b?!o&&M&&M.resolve?((S=M.resolve(void 0)).constructor=M,ih=C(S.then,S),function(){ih(Zf)}):lh?function(){ph.nextTick(Zf)}:(ch=C(ch,N),function(){ch(Zf)}):(rh=!0,nh=b.createTextNode(""),new g(Zf).observe(nh,{characterData:!0}),function(){nh.data=rh=!rh})),i||function(e){e={fn:e,next:void 0};eh&&(eh.next=e),Qf||(Qf=e,th()),eh=e}),fh=e,o=($f.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},$f),M=e.Promise,S="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,C=!S&&!x&&"object"==typeof window&&"object"==typeof document,N=e,hh=M,b=Wo,g=fu,dh=ga,i=ss,vh=C,yh=S,mh=Hs,gh=(hh&&hh.prototype,i("species")),Eh=!1,wh=b(N.PromiseRejectionEvent),ga={CONSTRUCTOR:g("Promise",function(){var e=dh(hh),t=e!==String(hh);if(!t&&66===mh)return!0;if(!mh||mh<51||!/native code/.test(e)){var e=new hh(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[gh]=r,!(Eh=e.then(function(){})instanceof r))return!0}return!t&&(vh||yh)&&!wh}),REJECTION_EVENT:wh,SUBCLASSING:Eh},C={},bh=ts,S=(C.f=function(e){return new Xf(e)},y),Th=x,_h=e,Ih=t,i=ps,b=Sc,N=gp,g=Zp,Oh=ts,Ah=Wo,Nh=Zo,Rh=Qp,Sh=nf,xh=A.set,Ch=I,Mh=function(e,t){var r=fh.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},kh=qf,Ph=o,A=r,I=M,o=C,Uh="Promise",Dh=ga.CONSTRUCTOR,Lh=ga.REJECTION_EVENT,k=ga.SUBCLASSING,Fh=A.getterFor(Uh),Vh=A.set,A=I&&I.prototype,jh=I,zh=A,Hh=_h.TypeError,Bh=_h.document,Gh=_h.process,Kh=o.f,Jh=Kh,Yh=!!(Bh&&Bh.createEvent&&_h.dispatchEvent),qh="unhandledrejection",$h="rejectionhandled",Xh=1,Wh=2,Zh=1,Qh=2,ed=function(e){var t;return!(!Nh(e)||!Ah(t=e.then))&&t},td=function(r,i){r.notified||(r.notified=!0,Ch(function(){for(var e,n,t=r.reactions;e=t.get();)Wf(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Ih(xh,_h,function(){var e=n.facade,t=n.value,r=nd(n);if(r&&(r=kh(function(){Th?Gh.emit("unhandledRejection",t,e):rd(qh,e,t)}),n.rejection=Th||nd(n)?Qh:Zh,r.error))throw r.value}))}))},rd=function(e,t,r){var n;Yh?((n=Bh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),_h.dispatchEvent(n)):n={promise:t,reason:r},!Lh&&(t=_h["on"+e])?t(n):e===qh&&Mh("Unhandled promise rejection",r)},nd=function(e){return e.rejection!==Zh&&!e.parent},id=function(t,r,n){return function(e){t(r,e,n)}},od=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=Wh,td(e,!0))},sd=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Hh("Promise can't be resolved itself");var n=ed(e);n?Ch(function(){var t={done:!1};try{Ih(n,e,id(sd,t,r),id(od,t,r))}catch(e){od(t,e,r)}}):(r.value=e,r.state=Xh,td(r,!1))}catch(e){od({done:!1},e,r)}}};if(Dh&&(zh=(jh=function(e){Rh(this,zh),Oh(e),Ih(oh,this);var t=Fh(this);try{e(id(sd,t),id(od,t))}catch(e){od(t,e)}}).prototype,(oh=function(e){Vh(this,{type:Uh,done:!1,notified:!1,parent:!1,reactions:new Ph,rejection:!1,state:0,value:void 0})}).prototype=i(zh,"then",function(e,t){var r=Fh(this),n=Kh(Sh(this,jh));return r.parent=!0,n.ok=!Ah(e)||e,n.fail=Ah(t)&&t,n.domain=Th?Gh.domain:void 0,0==r.state?r.reactions.add(n):Ch(function(){Wf(n,r)}),n.promise}),sh=function(){var e=new oh,t=Fh(e);this.promise=e,this.resolve=id(sd,t),this.reject=id(od,t)},o.f=Kh=function(e){return e===jh||void 0===e?new sh:Jh(e)},Ah(I)&&A!==Object.prototype)){ah=A.then,k||i(A,"then",function(e,t){var r=this;return new jh(function(e,t){Ih(ah,r,e,t)}).then(e,t)},{unsafe:!0});try{delete A.constructor}catch(e){}b&&b(A,zh)}S({global:!0,constructor:!0,wrap:!0,forced:Dh},{Promise:jh}),N(jh,Uh,!1),g(Uh);var ad=ss("iterator"),ud=!1;try{var cd=0,ld={next:function(){return{done:!!cd++}},return:function(){ud=!0}};ld[ad]=function(){return this},Array.from(ld,function(){throw 2})}catch(e){}function pd(e,t){if(!t&&!ud)return!1;var r=!1;try{var n={};n[ad]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var fd=M,o=pd,I=ga.CONSTRUCTOR||!o(function(e){fd.all(e).then(void 0,function(){})}),hd=t,dd=ts,vd=C,yd=qf,md=Kc,k=(y({target:"Promise",stat:!0,forced:I},{all:function(e){var a=this,t=vd.f(a),u=t.resolve,c=t.reject,r=yd(function(){var n=dd(a.resolve),i=[],o=0,s=1;md(e,function(e){var t=o++,r=!1;s++,hd(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),y),i=M,b=Qo,A=Wo,S=ps,Dh=i&&i.prototype;k({target:"Promise",proto:!0,forced:ga.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),A(i)&&(N=b("Promise").prototype.catch,Dh.catch!==N&&S(Dh,"catch",N,{unsafe:!0}));var gd=t,Ed=ts,wd=C,bd=qf,Td=Kc;y({target:"Promise",stat:!0,forced:I},{race:function(e){var r=this,n=wd.f(r),i=n.reject,t=bd(function(){var t=Ed(r.resolve);Td(e,function(e){gd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function _d(e,t){return Ad(e),Nd(t)&&t.constructor===e?t:((0,(e=Rd.f(e)).resolve)(t),e.promise)}var Id=t,Od=C,Ad=(y({target:"Promise",stat:!0,forced:ga.CONSTRUCTOR},{reject:function(e){var t=Od.f(this);return Id(t.reject,void 0,e),t.promise}}),cs),Nd=Zo,Rd=C,g=y,ld=Qo,o=ga.CONSTRUCTOR,Sd=_d;ld("Promise"),g({target:"Promise",stat:!0,forced:o},{resolve:function(e){return Sd(this,e)}});var xd=t,Cd=ts,Md=C,kd=qf,Pd=Kc;y({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Md.f(a),u=t.resolve,r=t.reject,n=kd(function(){var n=Cd(a.resolve),i=[],o=0,s=1;Pd(e,function(e){var t=o++,r=!1;s++,xd(n,a,e).then(function(e){r||(r=!0,i[t]={status:"fulfilled",value:e},--s||u(i))},function(e){r||(r=!0,i[t]={status:"rejected",reason:e},--s||u(i))})}),--s||u(i)});return n.error&&r(n.value),t.promise}});function Ud(i){return function(e,t){var r,e=$d(Xd(e)),t=qd(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=Zd(e,t))<55296||56319<r||t+1===n||(n=Zd(e,t+1))<56320||57343<n?i?Wd(e,t):r:i?Qd(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Dd=t,Ld=ts,Fd=Qo,Vd=C,jd=qf,zd=Kc,Hd="No one promise resolved",k=(y({target:"Promise",stat:!0},{any:function(e){var u=this,c=Fd("AggregateError"),t=Vd.f(u),l=t.resolve,p=t.reject,r=jd(function(){var n=Ld(u.resolve),i=[],o=0,s=1,a=!1;zd(e,function(e){var t=o++,r=!1;s++,Dd(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,i[t]=e,--s||p(new c(i,Hd)))})}),--s||p(new c(i,Hd))});return r.error&&p(r.value),t.promise}}),y),A=M,i=Jo,Bd=Qo,Gd=Wo,Kd=nf,Jd=_d,b=ps,Yd=A&&A.prototype,Dh=(k({target:"Promise",proto:!0,real:!0,forced:!!A&&i(function(){Yd.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=Kd(this,Bd("Promise")),e=Gd(t);return this.then(e?function(e){return Jd(r,t()).then(function(){return e})}:t,e?function(e){return Jd(r,t()).then(function(){throw e})}:t)}}),Gd(A)&&(S=Bd("Promise").prototype.finally,Yd.finally!==S&&b(Yd,"finally",S,{unsafe:!0})),m),qd=fs,$d=Jc,Xd=$o,Wd=Dh("".charAt),Zd=Dh("".charCodeAt),Qd=Dh("".slice),ev={codeAt:Ud(!1),charAt:Ud(!0)}.charAt,tv=Jc,N=r,I=bp,rv="String Iterator",nv=N.set,iv=N.getterFor(rv);I(String,"String",function(e){nv(this,{type:rv,string:tv(e),index:0})},function(){var e=iv(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=ev(t,r),e.index+=t.length,{value:t,done:!1})});function ov(t,e){if(t){if(t[pv]!==hv)try{lv(t,pv,hv)}catch(e){t[pv]=hv}if(t[fv]||lv(t,fv,e),uv[e])for(var r in cv)if(t[r]!==cv[r])try{lv(t,r,cv[r])}catch(e){t[r]=cv[r]}}}var sv,ga=e,ld=ga.Promise,g=us("span").classList,o=g&&g.constructor&&g.constructor.prototype,M=o===Object.prototype?void 0:o,av=e,uv={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},k=M,cv=ip,lv=T,i=ss,pv=i("iterator"),fv=i("toStringTag"),hv=cv.values;for(sv in uv)ov(av[sv]&&av[sv].prototype,sv);ov(k,"DOMTokenList");var A,b,S=b=A=ld,Dh,dv=C,vv=qf,yv=((Dh=y)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=dv.f(this),e=vv(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),cs),mv=Bc,gv=as,Ev=ya,wv=Yo,N,bv=Vc,Tv=t,_v=is,Iv=function(t,e,r,n){try{return n?e(yv(r)[0],r[1]):e(r)}catch(e){mv(t,"throw",e)}},Ov=jc,Av=R,Nv=v,Rv=N=function(e,t,r){t=gv(t);t in e?Ev.f(e,t,wv(0,r)):e[t]=r},Sv=Hc,xv=zc,Cv=Array,I,g=function(e){var t,r,n,i,o,s,a=_v(e),e=Av(this),u=arguments.length,c=1<u?arguments[1]:void 0,l=void 0!==c,u=(l&&(c=bv(c,2<u?arguments[2]:void 0)),xv(a)),p=0;if(!u||this===Cv&&Ov(u))for(t=Nv(a),r=e?new this(t):Cv(t);p<t;p++)s=l?c(a[p],p):a[p],Rv(r,p,s);else for(o=(i=Sv(a,u)).next,r=e?new this:[];!(n=Tv(o,i)).done;p++)s=l?Iv(i,c,[n.value,p],!0):n.value,Rv(r,p,s);return r.length=p,r},o,M,Mv=((I=y)({target:"Array",stat:!0,forced:M=!(o=pd)(function(e){Array.from(e)})},{from:g}),qo),ip=Array.isArray||function(e){return"Array"==Mv(e)},T,i,k=((T=y)({target:"Array",stat:!0},{isArray:i=ip}),y),ld=Jo,kv=R,Pv=N,Uv=Array,A=ld(function(){function e(){}return!(Uv.of.call(e)instanceof e)}),Dv=(k({target:"Array",stat:!0,forced:A},{of:function(){for(var e=0,t=arguments.length,r=new(kv(this)?this:Uv)(t);e<t;)Pv(r,e,arguments[e++]);return r.length=t,r}}),is),Lv=v,Fv=fs,b=qc,Vv=(y({target:"Array",proto:!0},{at:function(e){var t=Dv(this),r=Lv(t),e=Fv(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),b("at"),TypeError),S=function(e){if(9007199254740991<e)throw Vv("Maximum allowed index exceeded");return e},jv=ip,zv=R,Hv=Zo,Bv=ss("species"),Gv=Array,Kv=function(e){var t;return jv(e)&&(t=e.constructor,(zv(t)&&(t===Gv||jv(t.prototype))||Hv(t)&&null===(t=t[Bv]))&&(t=void 0)),void 0===t?Gv:t},C=function(e,t){return new(Kv(e))(0===t?0:t)},Jv=Jo,Yv=Hs,qv=ss("species"),Dh,o=y,I=Jo,$v=ip,Xv=Zo,Wv=is,Zv=v,Qv=S,ey=N,ty=C,M=Dh=function(t){return 51<=Yv||!Jv(function(){var e=[];return(e.constructor={})[qv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},g=Hs,ry=ss("isConcatSpreadable"),T=51<=g||!I(function(){var e=[];return e[ry]=!1,e.concat()[0]!==e}),i=M("concat"),ny=(o({target:"Array",proto:!0,arity:1,forced:!T||!i},{concat:function(e){for(var t,r,n,i=Wv(this),o=ty(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Xv(e))return!1;var t=e[ry];return void 0!==t?!!t:$v(e)}(n=-1===a?i:arguments[a]))for(r=Zv(n),Qv(s+r),t=0;t<r;t++,s++)t in n&&ey(o,s,n[t]);else Qv(s+1),ey(o,s++,n);return o.length=s,o}}),es),iy=TypeError,ld,oy=is,sy=hs,ay=v,uy=ld=function(e,t){if(!delete e[t])throw iy("Cannot delete property "+ny(t)+" of "+ny(e))},cy=Math.min,k=qc,ly=(y({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=oy(this),n=ay(r),i=sy(e,n),o=sy(t,n),e=2<arguments.length?arguments[2]:void 0,s=cy((void 0===e?n:sy(e,n))-o,n-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in r?r[i]=r[o]:uy(r,i),i+=a,o+=a;return r}}),k("copyWithin"),Vc),py=E,fy=is,hy=v,dy=C,vy=m([].push),A,b={forEach:(A=function(f){var h=1==f,d=2==f,v=3==f,y=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var i,o,s=fy(e),a=py(s),u=ly(t,r),c=hy(a),l=0,t=n||dy,p=h?t(e,c):d||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(h)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:vy(p,i)}else switch(f){case 4:return!1;case 7:vy(p,i)}return m?-1:v||y?y:p}})(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)},yy=Jo,g=function(e,t){var r=[][e];return!!r&&yy(function(){r.call(null,t||function(){return 1},1)})},I=y,my=b.every,gy=(I({target:"Array",proto:!0,forced:!g("every")},{every:function(e){return my(this,e,1<arguments.length?arguments[1]:void 0)}}),is),Ey=hs,wy=v,M=qc,o=(y({target:"Array",proto:!0},{fill:function(e){for(var t=gy(this),r=wy(t),n=arguments.length,i=Ey(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:Ey(n,r);i<o;)t[i++]=e;return t}}),M("fill"),y),by=b.filter,T=(o({target:"Array",proto:!0,forced:!Dh("filter")},{filter:function(e){return by(this,e,1<arguments.length?arguments[1]:void 0)}}),y),Ty=b.find,i=qc,k,_y=!0,A=((k="find")in[]&&Array(1)[k](function(){_y=!1}),T({target:"Array",proto:!0,forced:_y},{find:function(e){return Ty(this,e,1<arguments.length?arguments[1]:void 0)}}),i(k),y),Iy=b.findIndex,I=qc,M,Oy=!0,Ay=((M="findIndex")in[]&&Array(1)[M](function(){Oy=!1}),A({target:"Array",proto:!0,forced:Oy},{findIndex:function(e){return Iy(this,e,1<arguments.length?arguments[1]:void 0)}}),I(M),Vc),Ny=E,Ry=is,Sy=v,o,T={findLast:(o=function(u){var c=1==u;return function(e,t,r){for(var n,i=Ry(e),o=Ny(i),s=Ay(t,r),a=Sy(o);0<a--;)if(s(n=o[a],a,i))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}})(0),findLastIndex:o(1)},i=y,xy=T.findLast,k=qc,A=(i({target:"Array",proto:!0},{findLast:function(e){return xy(this,e,1<arguments.length?arguments[1]:void 0)}}),k("findLast"),y),Cy=T.findLastIndex,I=qc,My=(A({target:"Array",proto:!0},{findLastIndex:function(e){return Cy(this,e,1<arguments.length?arguments[1]:void 0)}}),I("findLastIndex"),ip),ky=v,Py=S,Uy=Vc,Dy=function(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&Uy(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&My(u)?(c=ky(u),l=Dy(e,t,u,c,l,o-1)-1):(Py(l+1),e[l]=u),l++),p++;return l},M,Ly=M=Dy,Fy=is,Vy=v,jy=fs,zy=C;y({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Fy(this),r=Vy(t),n=zy(t,0);return n.length=Ly(n,t,t,r,0,void 0===e?1:jy(e)),n}});function Hy(c){return function(e,t,r,n){dm(t);var i=vm(e),o=ym(i),s=mm(i),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in o){n=o[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw gm("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in o&&(n=t(n,o[a],a,i));return n}}function By(e,t,r){for(var n=Dm(e),i=Um(t,n),o=Um(void 0===r?n:r,n),s=Fm(Vm(o-i,0)),a=0;i<o;i++,a++)Lm(s,a,e[i]);return s.length=a,s}function Gy(e,t){var r=e.length,n=zm(r/2);if(r<8){for(var i,o,s=e,a=t,u=s.length,c=1;c<u;){for(i=s[o=c];o&&0<a(s[o-1],i);)s[o]=s[--o];o!==c++&&(s[o]=i)}return s}for(var l=e,p=Gy(jm(e,0,n),t),f=Gy(jm(e,n),t),h=t,d=p.length,v=f.length,y=0,m=0;y<d||m<v;)l[y+m]=y<d&&m<v?h(p[y],f[m])<=0?p[y++]:f[m++]:y<d?p[y++]:f[m++];return l}var Ky=M,Jy=ts,Yy=is,qy=v,$y=C,Xy=(y({target:"Array",proto:!0},{flatMap:function(e){var t,r=Yy(this),n=qy(r);return Jy(e),(t=$y(r,0)).length=Ky(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),b.forEach),o=g("forEach")?[].forEach:function(e){return Xy(this,e,1<arguments.length?arguments[1]:void 0)},i=(y({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o}),y),Wy=hu.includes,k=qc,T=(i({target:"Array",proto:!0,forced:Jo(function(){return!Array(1).includes()})},{includes:function(e){return Wy(this,e,1<arguments.length?arguments[1]:void 0)}}),k("includes"),y),A=m,Zy=hu.indexOf,I=g,Qy=A([].indexOf),em=!!Qy&&1/Qy([1],1,-0)<0,M=I("indexOf"),o=(T({target:"Array",proto:!0,forced:em||!M},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return em?Qy(this,e,t)||0:Zy(this,e,t)}}),y),i=E,tm=Xo,k=g,rm=m([].join),hu=i!=Object,A=k("join",","),nm=(o({target:"Array",proto:!0,forced:hu||!A},{join:function(e){return rm(tm(this),void 0===e?",":e)}}),mp),im=Xo,om=fs,sm=v,I=g,am=Math.min,um=[].lastIndexOf,cm=!!um&&1/[1].lastIndexOf(1,-0)<0,T=I("lastIndexOf"),M=cm||!T?function(e){if(cm)return nm(um,this,arguments)||0;var t=im(this),r=sm(t),n=r-1;for((n=1<arguments.length?am(n,om(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:um,i=(y({target:"Array",proto:!0,forced:M!==[].lastIndexOf},{lastIndexOf:M}),y),lm=b.map,k=(i({target:"Array",proto:!0,forced:!Dh("map")},{map:function(e){return lm(this,e,1<arguments.length?arguments[1]:void 0)}}),y),pm=is,fm=v,hm=S,o=Jo(function(){return 4294967297!==[].push.call({length:4294967296},1)}),hu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),dm=(k({target:"Array",proto:!0,arity:1,forced:o||hu},{push:function(e){var t=pm(this),r=fm(t),n=arguments.length;hm(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),ts),vm=is,ym=E,mm=v,gm=TypeError,A={left:Hy(!1),right:Hy(!0)},mp=y,Em=A.left,I=Hs,T=x,M=(mp({target:"Array",proto:!0,forced:!g("reduce")||!T&&79<I&&I<83},{reduce:function(e){var t=arguments.length;return Em(this,e,t,1<t?arguments[1]:void 0)}}),y),wm=A.right,i=Hs,k=x,o=(M({target:"Array",proto:!0,forced:!g("reduceRight")||!k&&79<i&&i<83},{reduceRight:function(e){return wm(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),y),bm=ip,Tm=m([].reverse),hu=[1,2],mp=(o({target:"Array",proto:!0,forced:String(hu)===String(hu.reverse())},{reverse:function(){return bm(this)&&(this.length=this.length),Tm(this)}}),y),_m=ip,Im=R,Om=Zo,Am=hs,Nm=v,Rm=Xo,Sm=N,T=ss,xm=fa,I=Dh("slice"),Cm=T("species"),Mm=Array,km=Math.max,A=(mp({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,n,i,o=Rm(this),s=Nm(o),a=Am(e,s),u=Am(void 0===t?s:t,s);if(_m(o)&&(r=o.constructor,(r=Im(r)&&(r===Mm||_m(r.prototype))||Om(r)&&null===(r=r[Cm])?void 0:r)===Mm||void 0===r))return xm(o,a,u);for(n=new(void 0===r?Mm:r)(km(u-a,0)),i=0;a<u;a++,i++)a in o&&Sm(n,i,o[a]);return n.length=i,n}}),y),Pm=b.some,Um=(A({target:"Array",proto:!0,forced:!g("some")},{some:function(e){return Pm(this,e,1<arguments.length?arguments[1]:void 0)}}),hs),Dm=v,Lm=N,Fm=Array,Vm=Math.max,jm=By,zm=Math.floor,x=Gy,M=zs.match(/firefox\/(\d+)/i),k=!!M&&+M[1],i=/MSIE|Trident/.test(zs),o=zs.match(/AppleWebKit\/(\d+)\./),hu=!!o&&+o[1],fa=y,T=m,Hm=ts,Bm=is,Gm=v,Km=ld,Jm=Jc,mp=Jo,Ym=x,I=g,qm=k,$m=i,Xm=Hs,Wm=hu,Zm=[],Qm=T(Zm.sort),eg=T(Zm.push),A=mp(function(){Zm.sort(void 0)}),M=mp(function(){Zm.sort(null)}),zs=I("sort"),tg=!mp(function(){if(Xm)return Xm<70;if(!(qm&&3<qm)){if($m)return!0;if(Wm)return Wm<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)Zm.push({k:e+r,v:t})}for(Zm.sort(function(e,t){return t.v-e.v}),r=0;r<Zm.length;r++)e=Zm[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});fa({target:"Array",proto:!0,forced:A||!M||!zs||!tg},{sort:function(e){void 0!==e&&Hm(e);var t=Bm(this);if(tg)return void 0===e?Qm(t):Qm(t,e);for(var r,n,i=[],o=Gm(t),s=0;s<o;s++)s in t&&eg(i,t[s]);for(Ym(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Jm(e)>Jm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)Km(t,s++);return t}});Zp("Array");var o=y,rg=is,ng=hs,ig=fs,og=v,sg=S,ag=C,ug=N,cg=ld,x=Dh("splice"),lg=Math.max,pg=Math.min;o({target:"Array",proto:!0,forced:!x},{splice:function(e,t){var r,n,i,o,s,a,u=rg(this),c=og(u),l=ng(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,pg(lg(ig(t),0),c-l)),sg(c+r-n),i=ag(u,n),o=0;o<n;o++)(s=l+o)in u&&ug(i,o,u[s]);if(r<(i.length=n)){for(o=l;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:cg(u,a);for(o=c;c-n+r<o;o--)cg(u,o-1)}else if(n<r)for(o=c-n;l<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:cg(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),qc("flat");qc("flatMap");var k=y,fg=is,hg=v,dg=ld,vg=S,i=1!==[].unshift(0),Hs=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();k({target:"Array",proto:!0,arity:1,forced:i||Hs},{unshift:function(e){var t=fg(this),r=hg(t),n=arguments.length;if(n){vg(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:dg(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});ga.Array;var hu={exports:{}},T={},yg=qo,mg=Xo,gg=Bs.f,Eg=By,wg="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.f=function(e){if(!wg||"Window"!=yg(e))return gg(mg(e));try{return gg(e)}catch(e){return Eg(wg)}};function bg(e){kg(e,Vg,{value:{objectID:"O"+jg++,weakData:{}}})}function Tg(e,t,r){for(var n in t)oE(e,n,t[n],r);return e}function _g(e,t){for(var r=0,n=gE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Ig(e,t,r,n){for(var i,o,s,a=bE(e),u=wE(a),c=EE(t,r),l=IE(null),p=_E(u),f=0;f<p;f++)s=u[f],(o=TE(c(s,f,a)))in l?NE(l[o],s):l[o]=[s];if(n&&(i=n(a))!==AE)for(o in l)l[o]=OE(i,l[o]);return l}var I=Jo(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),mp=Jo,Og=Zo,Ag=qo,Ng=I,Rg=Object.isExtensible,fa=mp(function(){Rg(1)})||Ng?function(e){return!!Og(e)&&((!Ng||"ArrayBuffer"!=Ag(e))&&(!Rg||Rg(e)))}:Rg,A=!Jo(function(){return Object.isExtensible(Object.preventExtensions({}))}),Sg=y,xg=m,M=su,Cg=Zo,Mg=_,kg=ya.f,Pg=Bs,Ug=T,Dg=fa,Lg=A,Fg=!1,Vg=os("meta"),jg=0,zg=hu.exports={enable:function(){zg.enable=function(){},Fg=!0;var i=Pg.f,o=xg([].splice),e={};e[Vg]=1,i(e).length&&(Pg.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===Vg){o(t,r,1);break}return t},Sg({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Ug.f}))},fastKey:function(e,t){if(!Cg(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Mg(e,Vg)){if(!Dg(e))return"F";if(!t)return"E";bg(e)}return e[Vg].objectID},getWeakData:function(e,t){if(!Mg(e,Vg)){if(!Dg(e))return!0;if(!t)return!1;bg(e)}return e[Vg].weakData},onFreeze:function(e){return Lg&&Fg&&Dg(e)&&!Mg(e,Vg)&&bg(e),e}},Hg=(M[Vg]=!0,Wo),Bg=Zo,Gg=Sc,Kg=y,Jg=e,Yg=m,qg=fu,$g=ps,Xg=hu.exports,Wg=Kc,Zg=Qp,Qg=Wo,eE=Zo,tE=Jo,rE=pd,nE=gp,iE=function(e,t,r){return Gg&&Hg(t=t.constructor)&&t!==r&&Bg(t=t.prototype)&&t!==r.prototype&&Gg(e,t),e},oE=ps,sE=ya.f,aE=xc,uE=Tg,cE=Vc,lE=Qp,pE=Kc,fE=bp,hE=Zp,dE=B,vE=hu.exports.fastKey,yE=r.set,mE=r.getterFor,gE=(function(e,t,r){function n(e){var r=Yg(h[e]);$g(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(l&&!eE(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return l&&!eE(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(l&&!eE(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}var i,o,s,a,u,c=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),p=c?"set":"add",f=Jg[e],h=f&&f.prototype,d=f,v={};return qg(e,!Qg(f)||!(l||h.forEach&&!tE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,p),Xg.enable()):qg(e,!0)&&(o=(i=new d)[p](l?{}:-0,1)!=i,s=tE(function(){i.has(1)}),a=rE(function(e){new f(e)}),u=!l&&tE(function(){for(var e=new f,t=5;t--;)e[p](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){Zg(e,h);e=iE(new f,e,d);return null!=t&&Wg(t,e[p],{that:e,AS_ENTRIES:c}),e})).prototype=h).constructor=d),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(p),l&&h.clear&&delete h.clear),v[e]=d,Kg({global:!0,constructor:!0,forced:d!=f},v),nE(d,e),l||r.setStrong(d,e,c),d}("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,r,n,i){function o(e,t,r){var n,i=u(e),o=s(e,t);return o?o.value=r:(i.last=o={index:n=vE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),dE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=vE(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){lE(e,a),yE(e,{type:r,index:aE(null),first:void 0,last:void 0,size:0}),dE||(e.size=0),null!=t&&pE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=mE(r);return uE(a,{clear:function(){for(var e=u(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,dE?e.size=0:this.size=0},delete:function(e){var t,r,n=u(this),e=s(this,e);return e&&(t=e.next,r=e.previous,delete n.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),n.first==e&&(n.first=t),n.last==e&&(n.last=r),dE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=cE(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),uE(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),dE&&sE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=mE(t),o=mE(n);fE(e,t,function(e,t){yE(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),hE(t)}}),v),EE=Vc,wE=E,bE=is,TE=as,_E=v,IE=xc,OE=_g,AE=Array,NE=m([].push),RE=Ig,zs=qc;y({target:"Array",proto:!0},{group:function(e){return RE(this,e,1<arguments.length?arguments[1]:void 0)}}),zs("group");var SE=Ig,N=qc;y({target:"Array",proto:!0,forced:!g("groupBy")},{groupBy:function(e){return SE(this,e,1<arguments.length?arguments[1]:void 0)}}),N("groupBy");function xE(e){for(var t,r,n=kE(this),i=ME(n),o=CE(e,1<arguments.length?arguments[1]:void 0),s=new UE,a=PE(i),u=0;u<a;u++)t=o(r=i[u],u,n),LE(s,t)?VE(DE(s,t),r):FE(s,t,[r]);return s}var CE=Vc,Dh=m,ME=E,kE=is,PE=v,UE=Qo("Map"),o=UE.prototype,DE=Dh(o.get),LE=Dh(o.has),FE=Dh(o.set),VE=Dh([].push),x=qc,ld=xE;y({target:"Array",proto:!0,name:"groupToMap",forced:!g("groupByToMap")},{groupByToMap:ld}),x("groupByToMap");function jE(e){return KE[e].prototype}var k=qc,zE=(y({target:"Array",proto:!0},{groupToMap:xE}),k("groupToMap"),v),HE=function(e,t){for(var r=zE(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},BE=Xo,i=qc,GE=Array,KE=(y({target:"Array",proto:!0},{toReversed:function(){return HE(BE(this),GE)}}),i("toReversed"),e),Hs=y,JE=ts,YE=Xo,qE=_g,ga=qc,$E=Array,XE=m(jE("Array").sort),I=(Hs({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&JE(e);var t=YE(this),t=qE($E,t);return XE(t,e)}}),ga("toSorted"),y),mp=qc,WE=S,ZE=v,QE=hs,ew=Xo,tw=fs,rw=Array,nw=Math.max,iw=Math.min,ow=(I({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=ew(this),a=ZE(s),u=QE(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,iw(nw(tw(t),0),a-u)),i=WE(a+r-n),o=rw(i);c<u;c++)o[c]=s[c];for(;c<u+r;c++)o[c]=arguments[c-u+2];for(;c<i;c++)o[c]=s[c+n-r];return o}}),mp("toSpliced"),v),sw=fs,aw=RangeError,uw=function(e,t,r,n){var i=ow(e),r=sw(r),o=r<0?i+r:r;if(i<=o||o<0)throw aw("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},cw=Xo,lw=Array;y({target:"Array",proto:!0},{with:function(e,t){return uw(cw(this),lw,e,t)}});su=e,_=sa,Bs=Wo,T=O,fa=ps,A="USE_FUNCTION_CONSTRUCTOR",M=ss("asyncIterator"),Sc=su.AsyncIterator,fu=_.AsyncIteratorPrototype;if(fu)xb=fu;else if(Bs(Sc))xb=Sc.prototype;else if(_[A]||su[A])try{bb=T(T(T(Function("return async function*(){}()")()))),T(bb)===Object.prototype&&(xb=bb)}catch(e){}Bs((xb=xb||{})[M])||fa(xb,M,function(){return this});function pw(e,t,r){var n=e.done;Ew.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function fw(e){bw(this,{type:ww,iterator:mw(e),next:e.next})}function hw(e){var f=0==e,h=1==e,d=2==e,v=3==e;return function(e,s,a){var e=Vw(e),u=Fw("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||Uw(s),new u(function(r,n){var i=function(e){jw(c,n,e,n)},o=function(){try{if(f&&p)try{Lw(l)}catch(e){i(e)}u.resolve(Dw(Pw(t,c))).then(function(e){try{if(Dw(e).done)f?(a.length=l,r(a)):r(!v&&(d||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(h)o();else if(d)e?o():jw(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?jw(c,r,v||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function dw(e,t){if(!r0||!t0(e)||!r0(e))return!1;for(var r,n=0,i=e.length;n<i;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==i}function vw(e,t,r){return r.get&&n0(r.get,t,{getter:!0}),r.set&&n0(r.set,t,{setter:!0}),i0.f(e,t,r)}var yw=t,mw=cs,hu=xc,gw=rs,zs=Tg,N=r,E=xb,Ew=Qo("Promise"),ww="AsyncFromSyncIterator",bw=N.set,Tw=N.getterFor(ww),o=(fw.prototype=zs(hu(E),{next:function(){var n=Tw(this);return new Ew(function(e,t){var r=mw(yw(n.next,n.iterator));pw(r,e,t)})},return:function(){var n=Tw(this).iterator;return new Ew(function(e,t){var r=gw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=mw(yw(r,n));pw(r,e,t)})}}),fw),_w=t,Iw=o,Ow=cs,Aw=Hc,Nw=rs,Rw=ss("asyncIterator"),Sw=ts,xw=cs,Cw=t,Mw=Qo,kw=rs,Pw=t,Uw=ts,Dw=cs,Lw=S,Fw=Qo,Vw=function(e){return{iterator:e,next:Sw(xw(e).next)}},jw=function(e,t,r,n){try{var i=kw(e,"return");if(i)return Mw("Promise").resolve(Cw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},Dh={toArray:hw(0),forEach:hw(1),every:hw(2),some:hw(3),find:hw(4)},zw=Vc,Hw=is,Bw=R,Gw=function(e,t){t=arguments.length<2?Nw(e,Rw):t;return t?Ow(_w(t,e)):new Iw(Aw(e))},Kw=Hc,Jw=zc,Yw=rs,g=jE,qw=Qo,ld=ss,$w=o,Xw=Dh.toArray,Ww=ld("asyncIterator"),Zw=g("Array").values,x=(y({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(qw("Promise"))(function(e){var t=Hw(o),r=(void 0!==a&&(a=zw(a,u)),Yw(t,Ww)),n=r?void 0:Jw(t)||Zw,i=Bw(s)?new s:[],r=r?Gw(t,r):new $w(Kw(t,n));e(Xw(r,a,i))})}}),y),Qw=b.filterReject,k=qc,i=(x({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return Qw(this,e,1<arguments.length?arguments[1]:void 0)}}),k("filterOut"),y),e0=b.filterReject,Hs=qc,ga=(i({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return e0(this,e,1<arguments.length?arguments[1]:void 0)}}),Hs("filterReject"),y),t0=ip,r0=Object.isFrozen,n0=(ga({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!dw(e,!0))return!1;var t=e.raw;return t.length===e.length&&dw(t,!1)}}),w.exports),i0=ya,I=qc,o0=is,s0=v;B&&(vw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=o0(this),t=s0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=o0(this),r=s0(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var mp=qc,a0=is,u0=v;B&&(vw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=a0(this),e=u0(e);return 0==e?0:e-1}}),mp("lastIndex"));var e=m,c0=ts,l0=v,p0=is,f0=C,h0=Qo("Map"),sa=h0.prototype,d0=e(sa.forEach),v0=e(sa.has),y0=e(sa.set),m0=e([].push),O=qc;y({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=p0(this),i=l0(n),o=f0(n,0),s=new h0,a=null!=e?c0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),v0(s,r)||y0(s,r,t);return d0(s,function(e){m0(o,e)}),o}}),O("uniqueBy");E0.exposure=function(e,t,r,n){return new b0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},E0.track=function(e,t,r,n){return new I0(n,r,e,t)},E0.remoteConfig=function(e,t,r,n){return new N0(n,e,t.parameter,t.valueId,t.reason,r)},E0.isExposureEvent=function(e){return void 0!==e.experiment},E0.isTrackEvent=function(e){return void 0!==e.eventType},E0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},E0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},E0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},E0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},E0.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[dt.ID],identifiers:this.user.identifiers,userProperties:ke.sanitize(this.user.properties),hackleProperties:ke.sanitize(this.user.hackleProperties)}};var g0=E0;function E0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Ne(T0,w0=g0),T0.prototype.copyWithUser=function(e){return new T0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},T0.prototype.toDto=function(){return c(c({},w0.prototype.toDto.call(this)),{experimentId:this.experiment.id,experimentKey:this.experiment.key,experimentType:this.experiment.type,experimentVersion:this.experiment.version,variationId:this.variationId,variationKey:this.variationKey,decisionReason:this.decisionReason.toString(),properties:this.properties})};var w0,b0=T0;function T0(e,t,r,n,i,o,s,a){e=w0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Ne(O0,_0=g0),O0.prototype.copyWithUser=function(e){return new O0(this.timestamp,e,this.eventType,this.event,this.insertId)},O0.prototype.toDto=function(){return c(c({},_0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:ke.sanitize(this.event.properties)})};var _0,I0=O0;function O0(e,t,r,n,i){e=_0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Ne(R0,A0=g0),R0.prototype.copyWithUser=function(e){return new R0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},R0.prototype.toDto=function(){return c(c({},A0.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:ke.sanitize(this.properties)})};var A0,N0=R0;function R0(e,t,r,n,i,o,s){e=A0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}x0.isSessionEvent=function(e){return!!g0.isTrackEvent(e)&&(e.event.key===x0.SESSION_START_EVENT_NAME||e.event.key===x0.SESSION_END_EVENT_NAME)},x0.prototype.onSessionStarted=function(e,t,r){this.track(x0.SESSION_START_EVENT_NAME,e,t,r)},x0.prototype.onSessionEnded=function(e,t,r){this.track(x0.SESSION_END_EVENT_NAME,e,t,r)},x0.prototype.track=function(e,t,r,n){e={key:e},r=this.userManager.toHackleUser(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},x0.prototype.decorateSession=function(e,t){t=(new mt).add(dt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},x0.SESSION_START_EVENT_NAME="$session_start",x0.SESSION_END_EVENT_NAME="$session_end";var S0=x0;function x0(e,t){this.userManager=e,this.core=t}M0.prototype.process=function(e){var t;S0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=e,t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[dt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[dt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},M0.prototype.flush=function(e){this.delegate.flush(e)},M0.prototype.close=function(){this.delegate.close()},M0.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.flush(!0)}};var C0=M0;function M0(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}P0.toEvent=function(e){var t;return{key:P0.EVENT_KEY,properties:{level:P0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:P0._stacktrace(e)}}},P0._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,P0.STACK_TRACK_LIMIT).join("\n")},P0.EVENT_KEY="$trace",P0.LEVEL_ERROR="error",P0.STACK_TRACK_LIMIT=30;var k0=P0;function P0(){}U0.prototype.evaluate=function(e,t){if(!this.supports(e))throw new Error("Unsupported EvaluatorRequest ".concat(e.toString()));var r;if(t.contains(e))throw r=t.stack.map(function(e){return e.toString()}).join(" - "),new Error("Circular evaluation has occurred [".concat(r," - ").concat(e.toString(),"]"));t.addRequest(e);try{return this.evaluateInternal(e,t)}finally{t.removeRequest(e)}};fu=U0;function U0(){}L0.prototype.with=function(e){return new L0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},L0.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new L0(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},L0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new L0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},L0.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})};var D0=L0;function L0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}Ne(j0,F0=fu),j0.prototype.supports=function(e){return void 0!==e.experiment},j0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:D0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var F0,V0=j0;function j0(e){var t=F0.call(this)||this;return t.evaluationFlowFactory=e,t}H0.of=function(e,t,r,n,i,o){return o.returnValue=ke.truncateStringValue(n),new H0(i,t.targetEvaluations,e.parameter,r,n,o)},H0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var z0=H0;function H0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}Ne(K0,B0=fu),K0.prototype.supports=function(e){return void 0!==e.parameter},K0.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=ke.truncateStringValue(e.defaultValue),a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return z0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return a.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,h.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,h.DEFAULT_RULE,r)},K0.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?z0.ofDefault(e,t,h.TYPE_MISMATCH,i):z0.of(e,t,r.id,r.rawValue,n,i)};var B0,G0=K0;function K0(e){var t=B0.call(this)||this;return t.targetRuleDeterminer=e,t}Y0.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var J0=Y0;function Y0(e,t){this.type=e,this.id=t}$0.create=function(){return new $0},Object.defineProperty($0.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty($0.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty($0.prototype,"properties",{get:function(){return ke.sanitize(this._properties)},enumerable:!1,configurable:!0}),$0.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},$0.prototype.addRequest=function(e){this._stack.push(e)},$0.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},$0.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof D0&&e.experiment.id===t.id})},$0.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},$0.prototype.setProperty=function(e,t){this._properties[e]=t};var q0=$0;function $0(){this._stack=[],this._targetEvaluations=[],this._properties={}}W0.of=function(e,t,r,n){return new W0(e,t,r,n)},W0.by=function(e,t){return new W0(e.workspace,e.user,t,"A")},W0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var X0=W0;function W0(e,t,r,n){this.key=new J0("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}Q0.of=function(e,t,r,n,i){return new Q0(e,t,r,n,i)},Q0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var Z0=Q0;function Q0(e,t,r,n,i){this.key=new J0("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}tb.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},tb.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},tb.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var eb=tb;function tb(){}nb.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var i=n[r].getVariation(e,t);if(void 0!==i)return i}};var rb=nb;function nb(e){this.storages=e}ob.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},ob.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return eb.asNumber(e)},ob.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=eb.asNumber(t),e=eb.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},ob.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},ob.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},ob.prototype.clear=function(){this.listStorage.clear()};var ib=ob;function ob(e){this.listStorage=e}ab.prototype.add=function(e){this.evaluators.push(e)},ab.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(a.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)};var sb=ab;function ab(){this.evaluators=new Array}cb.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},cb.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},cb.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var ub=cb;function cb(e){this.conditionMatcherFactory=e}pb.prototype.decorate=function(e){return e};var lb=pb;function pb(){}hb.prototype.decorate=function(e){return"string"==typeof e?Co.decodeURIOrOriginal(e):e};var fb=hb;function hb(){}vb.prototype.matches=function(e,t,r){void 0===r&&(r=new lb);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,e)},vb.prototype.userValueMatches=function(e,t,r,n,i){return Array.isArray(e)?this.arrayMatches(e,t,r,n,i):this.singleMatches(e,t,r,n,i)},vb.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},vb.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},vb.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var db=vb;function vb(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}yb.prototype.booleanMatches=function(e,t){return e===t},yb.prototype.numberMatches=function(e,t){return e===t},yb.prototype.stringMatches=function(e,t){return e===t},yb.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},yb.prototype.urlMatches=function(e,t){return Co.decodeURIOrOriginal(Co.removePathnameTrailingSlash(e))===Co.decodeURIOrOriginal(Co.removePathnameTrailingSlash(t))};Sc=yb;function yb(){}mb.prototype.booleanMatches=function(e,t){return!1},mb.prototype.numberMatches=function(e,t){return!1},mb.prototype.stringMatches=function(e,t){return e.includes(t)},mb.prototype.versionMatches=function(e,t){return!1},mb.prototype.urlMatches=function(e,t){e=Co.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))};_=mb;function mb(){}gb.prototype.booleanMatches=function(e,t){return!1},gb.prototype.numberMatches=function(e,t){return!1},gb.prototype.stringMatches=function(e,t){return e.startsWith(t)},gb.prototype.versionMatches=function(e,t){return!1},gb.prototype.urlMatches=function(e,t){e=Co.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))};su=gb;function gb(){}Eb.prototype.booleanMatches=function(e,t){return!1},Eb.prototype.numberMatches=function(e,t){return!1},Eb.prototype.stringMatches=function(e,t){return e.endsWith(t)},Eb.prototype.versionMatches=function(e,t){return!1},Eb.prototype.urlMatches=function(e,t){return!1};A=Eb;function Eb(){}wb.prototype.booleanMatches=function(e,t){return!1},wb.prototype.numberMatches=function(e,t){return t<e},wb.prototype.stringMatches=function(e,t){return t<e},wb.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},wb.prototype.urlMatches=function(e,t){return!1};T=wb;function wb(){}Tb.prototype.booleanMatches=function(e,t){return!1},Tb.prototype.numberMatches=function(e,t){return t<=e},Tb.prototype.stringMatches=function(e,t){return t<=e},Tb.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},Tb.prototype.urlMatches=function(e,t){return!1};var bb=Tb;function Tb(){}_b.prototype.booleanMatches=function(e,t){return!1},_b.prototype.numberMatches=function(e,t){return e<t},_b.prototype.stringMatches=function(e,t){return e<t},_b.prototype.versionMatches=function(e,t){return e.isLessThan(t)},_b.prototype.urlMatches=function(e,t){return!1};Bs=_b;function _b(){}Ib.prototype.booleanMatches=function(e,t){return!1},Ib.prototype.numberMatches=function(e,t){return e<=t},Ib.prototype.stringMatches=function(e,t){return e<=t},Ib.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},Ib.prototype.urlMatches=function(e,t){return!1};fa=Ib;function Ib(){}Ab.prototype.getMatcher=function(e){switch(e){case"IN":return Ab.IN_MATCHER;case"CONTAINS":return Ab.CONTAINS_MATCHER;case"STARTS_WITH":return Ab.STARTS_WITH_MATCHER;case"ENDS_WITH":return Ab.ENDS_WITH_MATCHER;case"GT":return Ab.GT_MATCHER;case"GTE":return Ab.GTE_MATCHER;case"LT":return Ab.LT_MATCHER;case"LTE":return Ab.LTE_MATCHER}},Ab.IN_MATCHER=new Sc,Ab.CONTAINS_MATCHER=new _,Ab.STARTS_WITH_MATCHER=new su,Ab.ENDS_WITH_MATCHER=new A,Ab.GT_MATCHER=new T,Ab.GTE_MATCHER=new bb,Ab.LT_MATCHER=new Bs,Ab.LTE_MATCHER=new fa;var Ob=Ab;function Ab(){}Nb.prototype.matches=function(e,t,r){t=eb.asString(t),r=eb.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)};M=Nb;function Nb(){}Rb.prototype.matches=function(e,t,r){t=eb.asNumber(t),r=eb.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)};xc=Rb;function Rb(){}Sb.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)};r=Sb;function Sb(){}Cb.prototype.matches=function(e,t,r){t=Gt.tryParse(t),r=Gt.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)};var xb=Cb;function Cb(){}Mb.prototype.matches=function(e,t,r){t=Co.tryParse(t),r=eb.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)};N=Mb;function Mb(){}kb.prototype.matches=function(e,t,r){return!1};zs=kb;function kb(){}Ub.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return Ub.STRING_MATCHER;case"NUMBER":return Ub.NUMBER_MATCHER;case"BOOLEAN":return Ub.BOOLEAN_MATCHER;case"VERSION":return Ub.VERSION_MATCHER;case"URL":return Ub.URL_MATCHER;case"NULL":case"UNKNOWN":return Ub.NULL_MATCHER}},Ub.STRING_MATCHER=new M,Ub.NUMBER_MATCHER=new xc,Ub.BOOLEAN_MATCHER=new r,Ub.VERSION_MATCHER=new xb,Ub.URL_MATCHER=new N,Ub.NULL_MATCHER=new zs;var Pb=Ub;function Ub(){}Lb.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(a.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},Lb.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?fb:lb)};var Db=Lb;function Lb(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}Vb.prototype.resolveOrNull=function(e,t){switch(t.type){case"USER_ID":return e.identifiers[t.name];case"USER_PROPERTY":return e.properties[t.name];case"HACKLE_PROPERTY":return e.hackleProperties[t.name];case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"EVENT_PROPERTY":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var Fb=Vb;function Vb(){}zb.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var i=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},zb.prototype._matches=function(e,t,r){if("string"!=typeof r)throw new Error("SegmentKey[".concat(r,"]"));var n=e.workspace.getSegmentOrNull(r);if(n)return this.segmentMatcher.matches(e,t,n);throw new Error("Segment[".concat(r,"]"))};var jb=zb;function zb(e){this.segmentMatcher=e}Bb.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},Bb.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var Hb=Bb;function Bb(e){this.userConditionMatcher=e}Kb.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"EVENT_PROPERTY":case"SEGMENT":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var Gb=Kb;function Kb(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}Jb.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(eb.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var i=null!=(i=t.getEvaluation(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},Jb.prototype.evaluate=function(e,t,r){r=X0.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};hu=Jb;function Jb(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Ne($b,Yb=hu),$b.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},$b.prototype.resolve=function(e,t){return e instanceof X0&&t.reason===h.TRAFFIC_ALLOCATED?t.with(h.TRAFFIC_ALLOCATED_BY_TARGETING):t},$b.prototype.evaluationMatches=function(e,t){return!!$b.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},$b.AB_TEST_MATCHED_REASONS=[h.OVERRIDDEN,h.TRAFFIC_ALLOCATED,h.EXPERIMENT_COMPLETED,h.TRAFFIC_ALLOCATED_BY_TARGETING];var Yb,qb=$b;function $b(e,t){return Yb.call(this,e,t)||this}Ne(Zb,Xb=hu),Zb.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},Zb.prototype.resolve=function(e,t){return t},Zb.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var Xb,Wb=Zb;function Zb(e,t){return Xb.call(this,e,t)||this}eT.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},eT.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var Qb=eT;function eT(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}rT.prototype.resolveOrNull=function(e,t){var r;switch(t.type){case"EVENT_PROPERTY":return null==(r=this.properties(e))?void 0:r[t.name];case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},rT.prototype.properties=function(e){return g0.isTrackEvent(e)?e.event.properties:g0.isExposureEvent(e)||g0.isRemoteConfigEvent(e)?e.properties:void 0};var tT=rT;function rT(){}iT.prototype.matches=function(e,t,r){var n=this;if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));return!!e.user.cohorts&&e.user.cohorts.some(function(e){return n.valueOperatorMatcher.matches(e.id,r.match)})};var nT=iT;function iT(e){this.valueOperatorMatcher=e}sT.prototype.getMatcher=function(e){switch(e){case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":return this.userConditionMatcher;case"EVENT_PROPERTY":return this.eventConditionMatcher;case"SEGMENT":return this.segmentConditionMatcher;case"AB_TEST":case"FEATURE_FLAG":return this.experimentConditionMatcher;case"COHORT":return this.cohortConditionMatcher}};var oT=sT;function sT(e){var t=new db(new Pb,new Ob);this.userConditionMatcher=new Db(new Fb,t),this.eventConditionMatcher=new Qb(new tT,t),this.segmentConditionMatcher=new jb(new Hb(this.userConditionMatcher)),this.experimentConditionMatcher=new Gb(new qb(e,t),new Wb(e,t)),this.cohortConditionMatcher=new nT(t)}uT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},uT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},uT.prototype.resolveBucket=function(e,t){var t=e.workspace.getBucketOrNull(t.bucketId),r=e.user.identifiers[e.experiment.identifierType];if(r){t=this.bucketer.bucketing(t,r);if(t)return e.experiment._getVariationByIdOrNull(t.variationId)}};var aT=uT;function uT(e){this.bucketer=e}var cT={murmurhash3_x86_32:function(e,t,r,n){for(var i,o=-4&(n=void 0===n?e.length:n),s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=this.mul32(i,3432918353),s=5*(s=(524287&(s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)))<<13|s>>>19)+3864292196|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(2+o))<<16;case 2:i|=(255&e.charCodeAt(1+o))<<8;case 1:i|=255&e.charCodeAt(o),i=this.mul32(i,3432918353),s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),s=this.mul32(s^=s>>>13,3266489909),s^=s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},lT=(pT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},pT.prototype.calculateSlotNumber=function(e,t,r){r=cT.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},pT);function pT(){}hT.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},hT.end=function(){return new hT(void 0,void 0)},hT.decision=function(e,t){return new hT(e,t)},hT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,i=e.reverse();n<i.length;n++)var o=i[n],r=this.decision(o,r);return r};var fT=hT;function hT(e,t){this.flowEvaluator=e,this.nextFlow=t}vT.prototype.evaluate=function(e,t,r){var n=this.overrideResolver.resolveOrNull(e,t);if(!n)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return D0.of(e,t,n,h.OVERRIDDEN);case"FEATURE_FLAG":return D0.of(e,t,n,h.INDIVIDUAL_TARGET_MATCH)}};var dT=vT;function vT(e){this.overrideResolver=e}mT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?D0.ofDefault(e,t,h.EXPERIMENT_DRAFT):r.evaluate(e,t)};var yT=mT;function mT(){}ET.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return D0.ofDefault(e,t,h.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return D0.ofDefault(e,t,h.FEATURE_FLAG_INACTIVE)}};var gT=ET;function ET(){}bT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return D0.of(e,t,r,h.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var wT=bT;function bT(){}_T.prototype.evaluate=function(e,t,r){if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));return this.experimentTargetDeterminer.isUserInExperimentTarget(e,t)?r.evaluate(e,t):D0.ofDefault(e,t,h.NOT_IN_EXPERIMENT_TARGET)};var TT=_T;function _T(e){this.experimentTargetDeterminer=e}OT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);return n?n.isDropped?D0.ofDefault(e,t,h.VARIATION_DROPPED):D0.of(e,t,n,h.TRAFFIC_ALLOCATED):D0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var IT=OT;function OT(e){this.actionResolver=e}NT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return r.evaluate(e,t);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);if(!n)return r.evaluate(e,t);r=this.actionResolver.resolveOrNull(e,t,n.action);if(r)return D0.of(e,t,r,h.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var AT=NT;function NT(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}ST.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return D0.ofDefault(e,t,h.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return D0.of(e,t,n,h.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var RT=ST;function ST(e){this.actionResolver=e}CT.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(i)return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):D0.ofDefault(e,t,h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var xT=CT;function CT(e){this.containerResolver=e}kT.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):D0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND)};var MT=kT;function kT(){}UT.prototype.isUserInExperimentTarget=function(t,r){var n=this;return 0===t.experiment.targetAudiences.length||t.experiment.targetAudiences.some(function(e){return n.targetMatcher.matches(t,r,e)})};var PT=UT;function UT(e){this.targetMatcher=e}LT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var DT=LT;function LT(e){this.targetMatcher=e}VT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},VT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},VT.prototype._resolveUserOverride=function(e){var t=e.experiment,e=e.user.identifiers[t.identifierType];if(e){e=t.userOverrides.get(e);if(e)return t._getVariationByIdOrNull(e)}},VT.prototype._resolveSegmentOverride=function(t,r){var n=this,e=t.experiment.segmentOverrides.find(function(e){return n.targetMatcher.matches(t,r,e.target)});if(e)return this.actionResolver.resolveOrNull(t,r,e.action)};var FT=VT;function VT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}zT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(a.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var jT=zT;function zT(e){this.bucketer=e}BT.of=function(e,t,r,n){return new BT(r,t.targetEvaluations,e.inAppMessage,n,t.properties)};var HT=BT;function BT(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n,this.properties=i}KT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):HT.of(e,t,h.UNSUPPORTED_PLATFORM)};var GT=KT;function KT(){}YT.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),HT.of(e,t,h.OVERRIDDEN,n)):r.evaluate(e,t)};var JT=YT;function YT(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}$T.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?HT.of(e,t,h.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var qT=$T;function $T(){}WT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?HT.of(e,t,h.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var XT=WT;function WT(){}QT.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):HT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_PERIOD)};var ZT=QT;function QT(){}t_.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?HT.of(e,t,h.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var e_=t_;function t_(e){this.hiddenMatcher=e}n_.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),HT.of(e,t,h.IN_APP_MESSAGE_TARGET,n)):HT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var r_=n_;function n_(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}o_.prototype.resolve=function(e,t){return null!=(t=this.resolveExperiment(e,t))?t:this.resolveDefault(e)},o_.prototype.resolveExperiment=function(e,t){var r=e.inAppMessage.messageContext.experimentContext;if(!r)return null;var n=a.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[".concat(r.key,"]")}),n=X0.by(e,n),i=this.evaluator.evaluate(n,t),o=(this.addExperimentContext(i,t),e.inAppMessage.messageContext.defaultLang);return this.resolveMessage(e,function(e){return e.lang===o&&i.variationKey===e.variationKey})},o_.prototype.addExperimentContext=function(e,t){t.addEvaluation(e),t.setProperty("experiment_id",e.experiment.id),t.setProperty("experiment_key",e.experiment.key),t.setProperty("variation_id",e.variationId),t.setProperty("variation_key",e.variationKey),t.setProperty("experiment_decision_reason",e.reason)},o_.prototype.resolveDefault=function(e){var t=e.inAppMessage.messageContext.defaultLang;return this.resolveMessage(e,function(e){return e.lang===t})},o_.prototype.resolveMessage=function(e,t){t=e.inAppMessage.messageContext.messages.find(t);return a.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.inAppMessage.id,"]")})};var i_=o_;function o_(e){this.evaluator=e}a_.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},a_.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)};var s_=a_;function a_(){}c_.prototype.matches=function(t,r){var n=this,e=t.inAppMessage.targetContext.targets;return 0===e.length||e.some(function(e){return n.targetMatcher.matches(t,r,e)})};var u_=c_;function c_(e){this.targetMatcher=e}p_.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var l_=p_;function p_(e){this.storage=e}h_.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},h_.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(a.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return a.isNotNullOrUndefined(this.bucketer.bucketing(e,t))};var f_=h_;function h_(e,t){this.targetMatcher=e,this.bucketer=t}v_.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},v_.getOrNull=function(e){return v_.instances.get(e)},v_.register=function(e,t){return v_.instances.set(e,t),t},v_.instances=new Map;var d_=v_;function v_(){}m_.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},m_.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var y_=m_;function m_(e,t,r){var n=new lT,i=d_.register("targetMatcher",new ub(new oT(e))),o=new aT(n),t=new FT(t,i,o),s=new jT(n),s=(this.abTestFlow=fT.of(new dT(t),new MT,new xT(s),new TT(new PT(i)),new yT,new gT,new wT,new IT(o)),this.featureFlagFlow=fT.of(new yT,new gT,new wT,new dT(t),new MT,new AT(new DT(i),o),new RT(o)),new i_(e));this.inAppMessageFlow=fT.of(new GT,new JT(new s_,s),new qT,new XT,new ZT,new e_(new l_(r)),new r_(new u_(i),s)),this.remoteConfigParameterTargetRuleDeterminer=new f_(i,n)}E_.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return t&&o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[E_.ROOT_TYPE]=r.key.type,t[E_.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},E_.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof D0)return n[E_.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[E_.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[E_.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,g0.exposure(e.user,t,n,r);if(t instanceof z0)return g0.remoteConfig(e.user,t,c(c({},n),t.properties),r);if(t instanceof HT)return null;throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},E_.ROOT_TYPE="$targetingRootType",E_.ROOT_ID="$targetingRootId",E_.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",E_.EXPERIMENT_VERSION_KEY="$experiment_version",E_.EXECUTION_VERSION_KEY="$execution_version";var g_=E_;function E_(e){this.clock=e}Ne(T_,w_=fu),T_.prototype.supports=function(e){return void 0!==e.inAppMessage},T_.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:HT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var w_,b_=T_;function T_(e){var t=w_.call(this)||this;return t.evaluationFlowFactory=e,t}I_.of=function(e,t,r,n){return new I_(e,t,r,n)},I_.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var __=I_;function I_(e,t,r,n){this.key=new J0("IN_APP_MESSAGE",r.id),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var O_=s.log,A_=(N_.create=function(e,t,r,n){var i=new sb,r=new rb(r),r=new y_(i,r,n),n=new V0(r),o=new G0(r.remoteConfigParameterTargetRuleDeterminer),r=new b_(r);return i.add(n),i.add(o),new N_(n,o,r,e,new g_(Le.instance),t,new R_,Le.instance)},N_.prototype.experiment=function(e,t,r){var n=this;if(!e)return O_.error("experimentKey must not be empty"),Xe.of(r,h.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return O_.warn("SDK not ready."),Xe.of(r,h.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return O_.warn("Experiment does not exist."),Xe.of(r,h.EXPERIMENT_NOT_FOUND);i=X0.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},N_.prototype.experiments=function(r){var n=this,i=new Vn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=X0.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},N_.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,q0.create()),t=null!=(t=e.config)?t:new Ve;return[e,Xe.of(e.variationKey,e.reason,t,e.experiment)]},N_.prototype.featureFlag=function(e,t){var r=this;if(!e)return O_.error("featureKey must not be empty"),Ze.off(h.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return O_.warn("SDK not ready."),Ze.off(h.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return O_.warn("FeatureFlag does not exist."),Ze.off(h.FEATURE_FLAG_NOT_FOUND);n=X0.of(n,t,e,"A"),t=this.featureFlagInternal(n),e=t[0],t=t[1];return this.eventFactory.create(n,e).forEach(function(e){return r.eventProcessor.process(e)}),t},N_.prototype.featureFlags=function(r){var n=this,i=new Vn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=X0.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},N_.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,q0.create()),t=null!=(t=e.config)?t:new Ve;return[e,"A"===e.variationKey?Ze.off(e.reason,t,e.experiment):Ze.on(e.reason,t,e.experiment)]},N_.prototype.inAppMessage=function(e,t){var r=this,n=this.workspaceFetcher.get();if(!n)return O_.warn("SDK not ready."),qe.of(h.SDK_NOT_READY);e=n.getInAppMessageOrNull(e);if(!e)return O_.warn("In app message does not exist."),qe.of(h.IN_APP_MESSAGE_NOT_FOUND);n=__.of(n,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(n,q0.create());return this.eventFactory.create(n,t).forEach(function(e){return r.eventProcessor.process(e)}),qe.of(t.reason,t.inAppMessage,t.message,t.properties)},N_.prototype.tryInAppMessage=function(t,e){var r,n=Un.start();try{r=this.inAppMessage(t,e)}catch(e){O_.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=qe.of(h.EXCEPTION)}return xi.inAppMessage(n,t,r),r},N_.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?O_.warn("Event must be event type."):"object"!=typeof e||e.key&&"string"==typeof e.key?(n=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new ft(0,e.key),this.eventProcessor.process(g0.track(n,e,t,r))):O_.warn("Event key must be not null. or event key must be string type."):O_.warn("event must not be null.")},N_.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=k0.toEvent(e),this.flush(),this.track(e,t),this.flush())},N_.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},N_.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return O_.warn("SDK not ready."),Je.of(n,h.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return O_.warn("Remote config parameter does not exist."),Je.of(n,h.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=Z0.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,q0.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Je.of(t.value,t.reason)},N_.prototype.close=function(){this.eventProcessor.close()},N_);function N_(e,t,r,n,i,o,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=i,this.eventProcessor=o,this.errorDedupDeterminer=s,this.clock=a}S_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},S_.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var R_=S_;function S_(){}C_.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},C_.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var x_=C_;function C_(){this._installed=[],this._installations={onerror:P_,onunhandledrejection:U_}}var M_,k_=null;function P_(o,s){k_=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),k_&&k_.apply(this,arguments)}}function U_(r,n){M_=window.onunhandledrejection,window.onunhandledrejection=function(e){var t;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}t instanceof Error&&r.trackException(t,n.resolve()),M_&&M_.apply(this,arguments)}}L_.prototype.read=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},L_.prototype.save=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},L_.prototype.add=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),[4,this.save(t.concat(r).slice(-this.maxSize))];case 2:return e.sent(),[2]}})})},L_.prototype.delete=function(n){return u(this,void 0,void 0,function(){var t,r=this;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),t=t.filter(function(e){return!r.isDeleteTarget(e,n)}),[4,this.save(t)];case 2:return e.sent(),[2]}})})},L_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},L_.prototype.clear=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var D_=L_;function L_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var F_=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},V_=(j_.builder=function(){return new z_},j_.empty=function(){return j_.builder().build()},j_.from=function(e){return new j_(e)},j_.fromDto=function(e){for(var t=j_.builder(),r=0,n=e.cohorts;r<n.length;r++){var i=n[r];t.put({identifier:i.identifier,cohorts:i.cohorts.map(function(e){return new nn(e)})})}return t.build()},Object.defineProperty(j_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),j_.prototype.get=function(e){return this.cohorts.get(e)},j_.prototype.filterBy=function(e){var r=yt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return j_.from(e)},j_.prototype.asArray=function(){return this.cohorts.values()},j_.prototype.asComparable=function(){return this.cohorts},j_.prototype.toBuilder=function(){return new z_(this)},j_);function j_(e){this.cohorts=e}H_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},H_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},H_.prototype.build=function(){return new V_(this.cohorts)};var z_=H_;function H_(e){this.cohorts=new Vn(xe.isEqual),e&&this.putAll(e)}var E="model",t="name",S="type",R="vendor",o="version",Dh="architecture",ld="console",g="mobile",x="tablet",k="smarttv",b="wearable",B_=(P.parse=function(e){return{browser:P.getBrowser(e),cpu:P.getCPU(e),device:P.getDevice(e),engine:P.getEngine(e),os:P.getOS(e)}},P.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return P.mapper.rgx.call(t,e,P.regexes.browser),t.major=P.util.major(t.version),t},P.getCPU=function(e){var t={architecture:void 0};return P.mapper.rgx.call(t,e,P.regexes.cpu),t},P.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return P.mapper.rgx.call(t,e,P.regexes.device),t},P.getEngine=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.getOS=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.util={extend:function(e,t){var r,n={};for(r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},P.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[t,o],[/(opios)[\/\s]+([\w\.]+)/i],[[t,"Opera Mini"],o],[/\s(opr)\/([\w\.]+)/i],[[t,"Opera"],o],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[t,o],[/(konqueror)\/([\w\.]+)/i],[[t,"Konqueror"],o],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[t,"IE"],o],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[t,"Edge"],o],[/(yabrowser)\/([\w\.]+)/i],[[t,"Yandex"],o],[/(Avast)\/([\w\.]+)/i],[[t,"Avast Secure Browser"],o],[/(AVG)\/([\w\.]+)/i],[[t,"AVG Secure Browser"],o],[/(puffin)\/([\w\.]+)/i],[[t,"Puffin"],o],[/(focus)\/([\w\.]+)/i],[[t,"Firefox Focus"],o],[/(opt)\/([\w\.]+)/i],[[t,"Opera Touch"],o],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[t,"UCBrowser"],o],[/(comodo_dragon)\/([\w\.]+)/i],[[t,/_/g," "],o],[/(windowswechat qbcore)\/([\w\.]+)/i],[[t,"WeChat(Win) Desktop"],o],[/(micromessenger)\/([\w\.]+)/i],[[t,"WeChat"],o],[/(brave)\/([\w\.]+)/i],[[t,"Brave"],o],[/(whale)\/([\w\.]+)/i],[[t,"Whale"],o],[/(qqbrowserlite)\/([\w\.]+)/i],[t,o],[/(QQ)\/([\d\.]+)/i],[t,o],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[t,o],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[t,o],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[t,o],[/(MetaSr)[\/\s]?([\w\.]+)/i],[t],[/(LBBROWSER)/i],[t],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[o,[t,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[o,[t,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[t,o],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[o,[t,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[t,/(.+)/,"$1 WebView"],o],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[t,/(.+(?:g|us))(.+)/,"$1 $2"],o],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[t,"Chrome Mobile"],o],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[o,[t,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[t,"Sailfish Browser"],o],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[t,o],[/(dolfin)\/([\w\.]+)/i],[[t,"Dolphin"],o],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[t,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[t,"Opera Coast"],o],[/fxios\/([\w\.-]+)/i],[o,[t,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[o,[t,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[o,t],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[t,"GSA"],o],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[t,[o,(P.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!o;)if(o=u[l++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(P.util.has(t[r][n],e))return"?"===r?void 0:r}else if(P.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(P.maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}}).browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[t,o],[/(navigator|netscape)\/([\w\.-]+)/i],[[t,"Netscape"],o],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[t,o]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[Dh,"amd64"]],[/(ia32(?=;))/i],[[Dh,P.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[Dh,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[Dh,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[Dh,/ower/,"",P.util.lowerize]],[/(sun4\w)[;\)]/i],[[Dh,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[Dh,P.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[E,R,[S,x]],[/applecoremedia\/[\w\.]+ \((ipad)/],[E,[R,"Apple"],[S,x]],[/(apple\s{0,1}tv)/i],[[E,"Apple TV"],[R,"Apple"],[S,k]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[R,E,[S,x]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[E,[R,"Amazon"],[S,x]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[E,P.mapper.str,P.maps.device.amazon.model],[R,"Amazon"],[S,g]],[/android.+aft([bms])\sbuild/i],[E,[R,"Amazon"],[S,k]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[E,R,[S,g]],[/\((ip[honed|\s\w*]+);/i],[E,[R,"Apple"],[S,g]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[R,E,[S,g]],[/\(bb10;\s(\w+)/i],[E,[R,"BlackBerry"],[S,g]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[E,[R,"Asus"],[S,x]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[E,"Xperia Tablet"],[S,x]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[R,"Sony"],[S,g]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[R,E,[S,ld]],[/android.+;\s(shield)\sbuild/i],[E,[R,"Nvidia"],[S,ld]],[/(playstation\s[34portablevi]+)/i],[E,[R,"Sony"],[S,ld]],[/(sprint\s(\w+))/i],[[R,P.mapper.str,P.maps.device.sprint.vendor],[E,P.mapper.str,P.maps.device.sprint.model],[S,g]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[R,[E,/_/g," "],[S,g]],[/(nexus\s9)/i],[E,[R,"HTC"],[S,x]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[E,[R,"Huawei"],[S,g]],[/android.+(bah2?-a?[lw]\d{2})/i],[E,[R,"Huawei"],[S,x]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,E,[S,g]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[E,[R,"Microsoft"],[S,ld]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[R,"Microsoft"],[S,g]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[E,[R,"Motorola"],[S,g]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[E,[R,"Motorola"],[S,x]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[R,P.util.trim],[E,P.util.trim],[S,k]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[R,"Samsung"],[S,k]],[/\(dtv[\);].+(aquos)/i],[E,[R,"Sharp"],[S,k]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[R,"Samsung"],E,[S,x]],[/smart-tv.+(samsung)/i],[R,[S,k],E],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[R,"Samsung"],E,[S,g]],[/sie-(\w*)/i],[E,[R,"Siemens"],[S,g]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[R,"Nokia"],E,[S,g]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[E,[R,"Acer"],[S,x]],[/android.+([vl]k\-?\d{3})\s+build/i],[E,[R,"LG"],[S,x]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],E,[S,x]],[/(lg) netcast\.tv/i],[R,E,[S,k]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[E,[R,"LG"],[S,g]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[R,E,[S,x]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[E,[R,"Lenovo"],[S,x]],[/(lenovo)[_\s-]?([\w-]+)/i],[R,E,[S,g]],[/linux;.+((jolla));/i],[R,E,[S,g]],[/((pebble))app\/[\d\.]+\s/i],[R,E,[S,b]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[R,E,[S,g]],[/crkey/i],[[E,"Chromecast"],[R,"Google"],[S,k]],[/android.+;\s(glass)\s\d/i],[E,[R,"Google"],[S,b]],[/android.+;\s(pixel c)[\s)]/i],[E,[R,"Google"],[S,x]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[E,[R,"Google"],[S,g]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[E,/_/g," "],[R,"Xiaomi"],[S,g]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[E,/_/g," "],[R,"Xiaomi"],[S,x]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[E,[R,"Meizu"],[S,g]],[/(mz)-([\w-]{2,})/i],[[R,"Meizu"],E,[S,g]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[E,[R,"OnePlus"],[S,g]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[E,[R,"RCA"],[S,x]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[E,[R,"Dell"],[S,x]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[E,[R,"Verizon"],[S,x]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],E,[S,x]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[E,[R,"NuVision"],[S,x]],[/android.+;\s(k88)\sbuild/i],[E,[R,"ZTE"],[S,x]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[E,[R,"Swiss"],[S,g]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[E,[R,"Swiss"],[S,x]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[E,[R,"Zeki"],[S,x]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],E,[S,x]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[E,[R,"Insignia"],[S,x]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[E,[R,"NextBook"],[S,x]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[R,"Voice"],E,[S,g]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[R,"LvTel"],E,[S,g]],[/android.+;\s(PH-1)\s/i],[E,[R,"Essential"],[S,g]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[E,[R,"Envizen"],[S,x]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,E,[S,x]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[E,[R,"MachSpeed"],[S,x]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,E,[S,x]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[E,[R,"Rotor"],[S,x]],[/android.+(KS(.+))\s+build/i],[E,[R,"Amazon"],[S,x]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,E,[S,x]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[S,P.util.lowerize],R,E],[/[\s\/\(](smart-?tv)[;\)]/i],[[S,k]],[/(android[\w\.\s\-]{0,9});.+build/i],[E,[R,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[o,[t,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[o,[t,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[t,o],[/rv\:([\w\.]{1,9}).+(gecko)/i],[o,t]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[t,o],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[t,P.mapper.str,P.maps.os.windows],[o,P.mapper.str,P.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[t,"Windows"],[o,P.mapper.str,P.maps.os.windows.version]],[/\((bb)(10);/i],[[t,"BlackBerry"],o],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[t,o],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[t,"Symbian"],o],[/\((series40);/i],[t],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[t,"Firefox OS"],o],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[[t,"Linux"],o],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[t,"Chromium OS"],o],[/(sunos)\s?([\w\.\d]*)/i],[[t,"Solaris"],o],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[t,"Linux"],o],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[t,"iOS"],[o,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[t,"iOS"],[o,/_/g,"."]],[/(haiku)\s(\w+)/i],[t,o],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[o,/_/g,"."],[t,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[t,"Mac"],[o,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[t,o]]},P);function P(){}K_.generate=function(e){o=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:o={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:o,screen:{width:"",height:""}}:e;var t,r,n,i,o,e=B_.parse(o.navigator.userAgent),s=e.browser,a=e.os,e=e.device,u=(o.location.protocol||"").replace(":",""),c=o.screen,l=(null==(l=o.navigator.languages)?void 0:l[0])||"",p=l.split("-")[0],f=(null!=(f=e.type)?f:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),h=a.name||"",d="",v="";try{h=null!=(r=null==(t=h.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:h,d=null!=(i=null==(n=c.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",v=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:s.name||"",browserMajorVersion:s.major||"",browserVersion:s.version||"",osName:h,osVersion:a.version||"",deviceModel:e.model||"",deviceType:f,deviceVendor:e.vendor||"",deviceBrand:e.vendor||"",locale:l,language:p,orientation:d,userAgent:o.navigator.userAgent||"",pagePath:o.location.pathname||"",pageTitle:o.document.title||"",host:o.location.host||"",url:o.location.href||"",protocol:u,referrer:o.document.referrer||"",queryParameter:o.location.search||"",screenWidth:c.width||"",screenHeight:c.height||"",timeZone:v}};var G_=K_;function K_(){}Y_.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return X_.of(Z_(e,this.hackleDeviceId),V_.empty())},Y_.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(Y_.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),Y_.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},Y_.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},Y_.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},Y_.prototype.hackleUser=function(e){var t=(new mt).addIdentifiers(e.user.identifiers||{}).add(dt.ID,e.user.id||this.hackleDeviceId).add(dt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(dt.HACKLE_DEVICE,this.hackleDeviceId),t=(a.isNotNullOrUndefined(e.user.userId)&&t.add(dt.USER,e.user.userId),t.build()),r=this.campaignParser.parse();return{identifiers:t,properties:c(c({},r),e.user.properties),hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},Y_.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?G_.generate(window):e)||{}},Y_.prototype.setUser=function(e){return this.updateUser(e).user},Y_.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},Y_.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},Y_.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},Y_.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},Y_.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},Y_.prototype.saveUser=function(e){this.storage.saveUser(e)},Y_.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,F_(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},Y_.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=Z_(r,n.hackleDeviceId),F_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},Y_.prototype.operateProperties=function(r){return this.updateContext(function(e){var t=null!=(t=e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return c(c({},e),{properties:a.fromMap(t)})})},Y_.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.cohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},Y_.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var J_=Y_;function Y_(e,t,r,n,i,o,s){this.hackleDeviceId=e,this.storage=t,this.cohortFetcher=r,this.campaignParser=n,this.clock=i,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(o,s),this.storage.saveUser(this.context.user)}$_.prototype.getUser=function(){var e=this.deviceId||void 0,t=this.userId||void 0;return void 0!==e||void 0!==t?{deviceId:e,userId:t}:null},$_.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty($_.prototype,"deviceId",{get:function(){return this.storage.getItem(_n)},enumerable:!1,configurable:!0}),Object.defineProperty($_.prototype,"userId",{get:function(){return this.storage.getItem(Tn)},enumerable:!1,configurable:!0}),$_.prototype.setDeviceId=function(e){this.setId(_n,e)},$_.prototype.setUserId=function(e){this.setId(Tn,e)},$_.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var q_=$_;function $_(e){this.storage=e}W_.of=function(e,t){return new W_(e,t.filterBy(e))},W_.prototype.with=function(e){return W_.of(e,this.cohorts.filterBy(e))},W_.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return W_.of(this.user,e)};var X_=W_;function W_(e,t){this.user=e,this.cohorts=t}var Z_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},Q_=(Object.defineProperty(eI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(eI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:eI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(eI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),eI.prototype.addListener=function(e){this.sessionListeners.push(e)},eI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},eI.prototype.startNewSessionIfNeeded=function(e,t){var r=this._lastEventTime;return null!==r&&null!==this._currentSessionId&&t-r<this.sessionTimeoutMillis?(this.updateLastEventTime(t),this._currentSessionId):this.startNewSession(e,e,t)},eI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(bn,"".concat(e))},eI.prototype.endSession=function(t){var r=this._currentSessionId,n=this._lastEventTime;null!==r&&null!==n&&this.sessionListeners.forEach(function(e){return e.onSessionEnded(r,t,n)})},eI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(H().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},eI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(wn,e)},eI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(wn)},eI.prototype.loadLastEventTime=function(){var e=this.storage.getItem(bn);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},eI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},eI.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.updateLastEventTime(t)}},eI.EMPTY_SESSION_ID="0.ffffffff",eI);function eI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}rI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},rI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},rI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},rI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var tI=rI;function rI(){this.storage=window.localStorage}iI.postfix=function(e,t){return new iI(e,function(e){return"".concat(e).concat(t)})},iI.prefix=function(e,t){return new iI(e,function(e){return"".concat(t).concat(e)})},iI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},iI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},iI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var nI=iI;function iI(e,t){this.delegate=e,this.transform=t}sI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},sI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},sI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},sI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),i=0;return n.findIndex(function(e){return(i+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},sI.prototype.getList=function(){try{var e=this.delegate.getItem(this.listKey);if(!e)return[];var t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}},sI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},sI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),i=((r={})[e]=t,r);if(!this.isAddableItem(i)){var o=this.getVictimIndex(i);if(o<0)return;n=n.slice(o+1)}var s=JSON.stringify(n.concat(i));this.delegate.setItem(this.listKey,s)}catch(e){}},sI.prototype.getItem=function(t){var r=this,e=this.getList().find(function(e){return r.isEqualItem(e,t)});if(e&&e[t])return e[t]},sI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(e){}},sI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var oI=sI;function sI(e,t,r){void 0===r&&(r=4096);var n=this;this.delegate=e,this.listKey=t,this.encodedListCharLen=6,this.resolveMaxLength=function(e){e-=n.encodedListCharLen;return e<0?0:e},this.maxLength=this.resolveMaxLength(r)}uI.prototype.currentUser=function(){return this.userManager.resolve()},uI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},uI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},uI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},uI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},uI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},uI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},uI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},uI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},uI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},uI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},uI.prototype.increment=function(e,t){hi.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var aI=uI;function uI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}lI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},lI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},lI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},lI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},lI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},lI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},lI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},lI.monitoring=function(e){return"".concat(e,"/metrics")};var cI=lI;function lI(){}fI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(a.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},fI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},fI.prototype.key=function(e){return"".concat(e.key)};var pI=fI;function fI(e){this.storage=e}dI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var hI=dI;function dI(e){this.handlers=e}yI.prototype.handle=function(e,t){e.close()},yI.prototype.supports=function(e){return"CLOSE"===e.type};var vI=yI;function yI(){}gI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},gI.prototype.supports=function(e){return"WEB_LINK"===e.type};var mI=gI;function gI(e){this.urlHandler=e}wI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},wI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var EI=wI;function wI(e){this.urlHandler=e}TI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+TI.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},TI.prototype.supports=function(e){return"HIDDEN"===e.type},TI.HIDE_EXPIRATION=864e5;var bI=TI;function TI(e,t){this.storage=e,this.clock=t}II.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},II.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var _I=II;function II(e){this.urlHandler=e}AI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},AI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var OI=AI;function AI(e){this.urlHandler=e}RI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},RI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var NI=RI;function RI(e){this.urlHandler=e}xI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},xI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var SI=xI;function xI(e){this.urlHandler=e}MI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},MI.prototype.createTrackEvent=function(e,t){switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,title_text:null==(r=null==(r=t.message.text)?void 0:r.title)?void 0:r.text,body_text:null==(r=null==(r=t.message.text)?void 0:r.body)?void 0:r.text,button_text:t.message.buttons.map(function(e){return e.text}),image_url:t.message.images.map(function(e){return e.imagePath})})};case"CLOSE":return{key:"$in_app_close",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key})};case"ACTION":var r=e;return{key:"$in_app_action",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.text})}}};var CI=MI;function MI(e){this.core=e}PI.prototype.present=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(this.currentMessageView)return[2];if(this.opening)return[2];this.opening=!0,t=null,e.label=1;case 1:return e.trys.push([1,3,4,5]),t=this.messageViewFactory.create(r,this),[4,(this.currentMessageView=t).open()];case 2:return e.sent(),[3,5];case 3:return e.sent(),null!=t&&t.close(),[3,5];case 4:return this.opening=!1,[7];case 5:return[2]}})})};var kI=PI;function PI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}DI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},DI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var UI=DI;function DI(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.presenter=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.presenter.present(e)},this.initialize()}var LI=function(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n},FI=(VI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var i=n[r];if(this.eventMatcher.matches(t,i,e)){i=this.context(i,e);if(i)return i}}},VI.prototype.context=function(e,t){var r,e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return r=c(c({},e.properties),{decision_reason:e.reason}),new LI(e.inAppMessage,e.message,t.user,ke.sanitize(r))},VI);function VI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}zI.prototype.open=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(zI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),[4,this.scriptLoader.load()];case 1:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(zI.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),r=this.context.user.hackleProperties.deviceType,[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),deviceType:r?String(r):null})];case 2:return e.sent(),t.classList.remove("".concat(zI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleEvent({type:"IMPRESSION"}),[3,4];case 3:return e.sent(),this.close(),[3,4];case 4:return[2]}})})},zI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(zI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},zI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(zI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},zI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},zI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},zI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},zI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",zI.CONTAINER_CLASS_NAME="hackle-iam";var jI=zI;function zI(e,t,r){var n=this;this.scriptLoader=e,this.context=t,this.ui=r,this.container=null,this.renderer=null,this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===zI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}BI.create=function(e){return new BI(e)},BI.prototype.create=function(e,t){return new jI(this.scriptLoader,e,t)};var HI=BI;function BI(e){this.scriptLoader=e}KI.prototype.load=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return window.HackleInAppMessageRenderer?[2]:(t=this.createScript(),document.head.appendChild(t),[4,this.waitForLoad(t)]);case 1:return[2,e.sent()]}})})},KI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},KI.prototype.waitForLoad=function(o){return new Promise(function(e,t){function r(){o.removeEventListener("error",i),o.removeEventListener("load",n)}var n=function(){r(),e(o)},i=function(e){r(),t(e.message)};o.addEventListener("load",n),o.addEventListener("error",i)})};var GI=KI;function KI(e){this.scriptUrl=e}YI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},YI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=qI.of(e,t,r);return this.targetMatcher.anyMatches(e,q0.create(),n.targets)};var JI=YI;function YI(e){this.targetMatcher=e}$I.of=function(e,t,r){return new $I(new J0("IN_APP_MESSAGE",r.id),e,t.user,t)};var qI=$I;function $I(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}WI.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var i=0,o=this.storage.get(t);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},WI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new ZI(new eO(i)))}return e.durationCap&&t.push(new ZI(new rO(e.durationCap))),t};var XI=WI;function WI(e){this.storage=e}QI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var ZI=QI;function QI(e){this.matchCount=0,this.predicate=e}Object.defineProperty(tO.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),tO.prototype.matches=function(e,t){e=e.user.identifiers[this.identifierCap.identifierType];if(a.isNullOrUndefined(e))return!1;t=t.identifiers[this.identifierCap.identifierType];return!a.isNullOrUndefined(t)&&e===t};var eO=tO;function tO(e){this.identifierCap=e}Object.defineProperty(nO.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),nO.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis};var rO=nO;function nO(e){this.durationCap=e}oO.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},oO.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var iO=oO;function oO(e){this.storage=e}aO.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var sO=aO;function aO(e){this.processors=e}cO.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},cO.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>cO.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-cO.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},cO.prototype.supports=function(e){return"IMPRESSION"===e.type},cO.IMPRESSION_MAX_SIZE=100;var uO=cO;function cO(e){this.impressionStorage=e}pO.prototype.process=function(e,t,r){},pO.prototype.supports=function(e){return"CLOSE"===e.type};var lO=pO;function pO(){}hO.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},hO.prototype.supports=function(e){return"ACTION"===e.type};var fO=hO;function hO(e){this.actionHandlerFactory=e}vO.prototype.handle=function(e,t){var r=this.clock.currentMillis(),n=(this.eventTracker.track(e.context,t,r),this.eventProcessorFactory.get(t));n&&n.process(e,t,r)};var dO=vO;function vO(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}mO.prototype.matches=function(e,t,r){return!!g0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var yO=mO;function mO(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}EO.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var gO=EO;function EO(e){this.handlers=e}bO.prototype.handle=function(e,t){e.close()},bO.prototype.supports=function(e){return"CLOSE"===e.type};var wO=bO;function bO(){}_O.prototype.handle=function(e,t){var r=tn.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},_O.prototype.supports=function(e){return"ACTION"===e.type};var TO=_O;function _O(e){this.eventHandler=e}OO.prototype.open=function(e){window.location.href=e.href};var IO=OO;function OO(){}NO.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var AO=NO;function NO(){}SO.prototype.open=function(e){window.open(e.href)};var RO=SO;function SO(){}CO.prototype.open=function(e){window.location.replace(e)};var xO=CO;function CO(){}function MO(e,t,r){return null===e||(!UO(t,kO)||r.current!==r.referrer)&&!UO(e,t)}var kO={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,gclid:void 0,fbclid:void 0},PO={current:void 0,referrer:void 0},UO=function(t,r){return Object.keys(kO).every(function(e){return t[e]===r[e]})},DO=(LO.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},kO),t),n=new mo,i=0,o=Object.entries(t);i<o.length;i++){var s=o[i],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userManager.toHackleUser(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},LO.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();MO(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},LO.prototype.onSessionEnded=function(e,t,r){},LO.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},LO);function LO(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}VO.prototype.get=function(){var e=this.storage.getItem(In);return e?JSON.parse(e):null},VO.prototype.set=function(e){this.storage.setItem(In,JSON.stringify(e))};var FO=VO;function VO(e){this.storage=e}zO.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},zO.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(i=Co.tryDecodeURIComponent(i))&&(t[o]=i)}return t},zO.getQueryParams=function(e){return"undefined"==typeof window?{}:new zO(window.location.search).getQueryParams(e)};var jO=zO;function zO(e){this.search=e}BO.extractDomain=function(e){var t=this.DOMAIN_MATCH_REGEX,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=this.SIMPLE_DOMAIN_MATCH_REGEX),e.match(t));return r?r[0]:e},BO.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,BO.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var HO=BO;function BO(){}KO.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},KO.prototype.params=function(e){return(a.isNullOrUndefined(e)?jO:new jO(e)).getQueryParams(KO.CAMPAIGN_QUERY_CONDITION)},KO.prototype.resolve=function(e){return{utm_campaign:e[JO],utm_content:e[YO],utm_id:e[qO],utm_medium:e[$O],utm_source:e[XO],utm_term:e[WO],gclid:e[ZO],fbclid:e[QO]}},KO.prototype.parseDomain=function(){if("undefined"==typeof window)return PO;return{current:HO.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,HO.extractDomain(e)}()}},KO.CAMPAIGN_QUERY_CONDITION=function(e,t){return vi.isNotEmptyString(t)};var GO=KO;function KO(){}var JO="utm_campaign",YO="utm_content",qO="utm_id",$O="utm_medium",XO="utm_source",WO="utm_term",ZO="gclid",QO="fbclid",eA=(tA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},tA.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,t="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:t})}catch(e){s.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},tA);function tA(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){e=r.determiner.determineTargetExposureOrNull(e);e&&r.send(e)},this.initialize()}nA.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!g0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==h.TRAFFIC_ALLOCATED?null:e};var rA=nA;function nA(e){this.workspaceFetcher=e}var iA={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://client-sdk.hackle.io",eventUrl:"https://event.hackle.io",monitoringUrl:"https://monitoring.hackle.io",cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.32.1",IAM_RENDERER_VERSION_HEADER:"0.0.6"},oA=(sA.config=function(e){return c(c({},iA),e)},sA.logging=function(e){s.initCounter(function(e){return hi.counter("log",{level:e})}),s.setLogLevel(Te.INFO),e.log_disabled?s.setLogLevel(Te.DISABLE):e.debug&&s.setLogLevel(Te.DEBUG)},sA.sdk=function(e,t){return s.log.debug("SDK key: ".concat(e)),e||s.log.error("invalid sdk key: '".concat(e,"' (expected: not null, not undefined and not empty string)")),{key:e,name:t.SDK_NAME_HEADER,version:t.SDK_VERSION_HEADER}},sA.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},sA.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},sA.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(s.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},sA);function sA(){}uA.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},uA.prototype.sync=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.sync())}))];case 1:return e.sent(),[2]}})})},uA.prototype.syncOnly=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(t=this.synchronizations.find(function(e){return e.type===r}))return[4,t.synchronizer.sync()];throw new Error("Unsupported SynchronizerType [".concat(r,"]"));case 1:return e.sent(),[2]}})})},uA.prototype.close=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.close())}))];case 1:return e.sent(),[2]}})})},uA.prototype.safe=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})};var aA=uA;function uA(){this.synchronizations=[]}lA.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},lA.prototype.syncOnly=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.syncOnly(r)];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},lA.prototype.start=function(){var e=this;-1!==this.intervalMillis&&null===this.pollingJob&&(this.pollingJob=this.scheduler.schedulePeriodically(this.intervalMillis,this.intervalMillis,function(){return e.sync()}))},lA.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},lA.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var cA=lA;function lA(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}fA.prototype.schedule=function(e,t){e=new hA(e,t);return e.start(),e},fA.prototype.schedulePeriodically=function(e,t,r){e=new vA(e,t,r);return e.start(),e};var pA=fA;function fA(){}dA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},dA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var hA=dA;function dA(e,t){this.delayMillis=e,this.task=t,this.timeout=null}yA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},yA.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},yA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var vA=yA;function yA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}gA.prototype.fetchIfModified=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},gA.prototype.createRequest=function(e){var t=mi.builder().url(this.url).method("GET");return null!==e&&t.addHeader(_i.IF_MODIFIED_SINCE,e),t.build()},gA.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Un.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Mi.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Mi.record("get.workspace",t,null),r;case 4:return[2]}})})},gA.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");return{config:JSON.parse(e.body),lastModified:e.headers.get(_i.LAST_MODIFIED)}};var mA=gA;function gA(e,t){this.url=e,this.transport=t}wA.prototype.fetch=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},wA.prototype.createRequest=function(e){e={identifiers:yt(e)},e=Ee.encodeURL(JSON.stringify(e));return mi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},wA.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Un.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Mi.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Mi.record("get.cohorts",t,null),r;case 4:return[2]}})})},wA.prototype.handleResponse=function(e){if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is null");e=JSON.parse(e.body);return V_.fromDto(e)};var EA=wA;function wA(e,t){this.url=e,this.transport=t}TA.prototype.getExperiments=function(){return Array.from(this.experiments.values())},TA.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},TA.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},TA.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},TA.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},TA.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},TA.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},TA.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},TA.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},TA.prototype.getContainerOrNull=function(e){return this.containers.get(e)},TA.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},TA.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},TA.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},TA.prototype.getAttributes=function(){return this.attributes},TA.from=function(e){return new TA(p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return ot.fromJson("FEATURE_FLAG",e)}),e.buckets.map(ut.fromJson),e.events.map(ft.fromJson),p.mapNotNullOrUndefined(e.segments,Mt.fromJson),e.containers.map(Pt.fromJson),e.parameterConfigurations.map(rt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Ft.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,dr.fromJson),e.workspace.attributes)};var bA=TA;function TA(e,t,r,n,i,o,s,a,u,c,l){this.experiments=p.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=p.associateBy(t,function(e){return e.key}),this.featureFlags=p.associateBy(r,function(e){return e.key}),this.buckets=p.associateBy(n,function(e){return e.id}),this.eventTypes=p.associateBy(i,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(s,function(e){return e.id}),this.parameterConfigurations=p.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(u,function(e){return e.key}),this.inAppMessages=p.associateBy(c,function(e){return e.key}),this.attributes=l}IA.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},IA.prototype.setWorkspace=function(e){try{this.workspace=bA.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},IA.prototype.get=function(){return this.workspace},IA.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.workspaceFetcher.fetchIfModified(this.lastModified)];case 1:return(t=e.sent())&&(this.setConfig(t),this.workspaceConfigStorage.set(t)),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},IA.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var _A=IA;function IA(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}AA.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},AA.prototype.dispatchEventsSynchronously=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.retryManager.add(r)];case 1:return e.sent(),[4,this.synchronousTransport.send(r)];case 2:return(t=e.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(r)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},AA.prototype.dispatchEvents=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.transport.send(r)];case 1:return(t=e.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(r)];case 2:return e.sent(),[2]}})})};var OA=AA;function AA(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}RA.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},RA.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof g0?g0.isExposureEvent(e)?t.push(e.toDto()):g0.isTrackEvent(e)?r.push(e.toDto()):g0.isRemoteConfigEvent(e)&&n.push(e.toDto()):g0.isExposureEventDto(e)?t.push(e):g0.isTrackEventDto(e)?r.push(e):g0.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return mi.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},RA.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Un.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Mi.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Mi.record("post.events",t,null),r;case 4:return[2]}})})};var NA=RA;function RA(e,t){this.url=e,this.transport=t}xA.prototype.add=function(e){return this.repository.add(e)},xA.prototype.delete=function(e){return this.repository.delete(e)},xA.prototype.flush=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return[4,this.repository.read()];case 1:return 0===(t=e.sent()).length?[2]:[4,this.transport.send(t)];case 2:return(r=e.sent()).isSuccessful()||r.isClientError()?[4,this.delete(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},xA.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"hidden":return}};var SA=xA;function xA(e,t){this.repository=e,this.transport=t}function CA(){this.listeners={}}CA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},CA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},CA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ne(kA,MA=CA);var MA,i=kA;function kA(){return null!==MA&&MA.apply(this,arguments)||this}Ne(DA,PA=i),DA.prototype.process=function(e){this.isEnqueueTarget(e)&&this.enqueue(e),this.emit("event",e)},DA.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},DA.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},DA.prototype.isPageViewEvent=function(e){return g0.isTrackEvent(e)&&"$page_view"===e.event.key},DA.prototype.isEnqueueTarget=function(e){return!(this.isPageViewEvent(e)&&!this.autoTrackPageView)},DA.prototype.flush=function(e){var t;void 0===e&&(e=!1),null!=(t=this.flushingJob)&&t.cancel(),0!==this.queue.length&&(this.eventDispatcher.dispatch(this.queue,e).catch(function(e){return s.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},DA.prototype.close=function(){this.flush(!0)};var PA,UA=DA;function DA(e,t,r,n,i){var o=PA.call(this)||this;return o.eventDispatcher=e,o.eventDispatchMaxSize=t,o.flushScheduler=r,o.flushIntervalMillis=n,o.autoTrackPageView=i,o.queue=[],o.flushingJob=null,o}FA.prototype.send=function(e){e=e.toBuilder().addHeader(cn,this.sdk.key).addHeader(ln,this.sdk.name).addHeader(pn,this.sdk.version).addHeader(fn,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var LA=FA;function FA(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}jA.intercept=function(e,t){return t instanceof LA?t:new LA(e,Le.instance,t)};var VA=jA;function jA(){}HA.create=function(){return new HA},HA.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,i=(s.options.timeoutMillis&&(n.timeout=s.options.timeoutMillis),n.open(s.method,s.url),n.onreadystatechange=function(){var e;n.readyState===n.DONE&&(0===n.status?r(new Error("Request Error")):(e=new bi(n.status,n.responseText,function(e){var t=_i.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})};var zA=HA;function HA(){}GA.create=function(){return new GA},GA.prototype.send=function(n){var i=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(bi.ok())})},GA.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(cn),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(ln,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(pn,"unknown")),e.headers.get(fn));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var BA=GA;function GA(){}JA.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var KA=JA;function JA(e){this.invocationResponseResolver=e}$A.prototype.invoke=function(e){if(null==(t=window._hackleApp)||!t.invoke)throw new Error("window._hackleApp.invoke is not implemented");var t=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)};var YA,qA=$A;function $A(e){this.invocationResponseResolver=e}(Hs=YA=YA||{}).prompt="prompt",Hs.function="function";WA.prototype.getInvocator=function(e,t){return e===YA.prompt?new KA(t):e===YA.function?new qA(t):null};var XA=WA;function WA(){}QA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},QA.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var ZA=QA;function QA(e,t,r,n){var i=this;this.userEventEmitter=e,this.determiner=t,this.redirector=r,this.core=n,this.onEvent=function(e){e=i.determiner.determineOrNull(e);e&&(i.core.flush(!0),i.redirector.redirect(e))},this.initialize()}var eN=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.event=n},tN=(rN.prototype.determineOrNull=function(e){if(!g0.isTrackEvent(e))return null;if("$page_view"!==e.event.key)return null;if(this.splitUrlRedirectedCookieStorage.alreadyRedirected())return this.splitUrlRedirectedCookieStorage.clear(),null;var t=this.workspaceFetcher.get();if(!t)return null;for(var r=0,n=t.getSplitUrlExperiments();r<n.length;r++){var i,o=n[r];if(this.splitUrlMatcher.matches(t,o,e))return i=this.core.experiment(o.key,e.user,"A"),new eN(t,o,i,e)}return null},rN);function rN(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}iN.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=oN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,q0.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,q0.create(),t.includeTargets))};var nN=iN;function iN(e){this.targetMatcher=e}sN.of=function(e,t){return new sN(new J0("SPLIT_URL",t.insertId),t.user,e)};var oN=sN;function sN(e,t,r){this.key=e,this.user=t,this.workspace=r}uN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var aN=uN;function uN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}lN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(lN.SPLIT_URL_CONFIG_KEY,"")),r=on.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},lN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},lN.prototype.resolveManualRedirectUrl=function(e,t){e=Co.tryParse(e);return e?this.decorateCampaign(e,t):null},lN.prototype.decorateCampaign=function(e,t){t=t.event.user.hackleProperties.queryParameter;if(vi.isNotEmptyString(t)){for(var t=this.campaignParser.parse(t),r=e,n=0,i=Object.entries(t);n<i.length;n++){var o=i[n],s=o[0],o=o[1];vi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},lN.SPLIT_URL_CONFIG_KEY="redirectUrl";var cN=lN;function lN(e){this.campaignParser=e}fN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return a.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},fN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},fN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var pN=fN;function fN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}dN.prototype.setNeedDispatch=function(e){this.needDispatch=e},dN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(dN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},dN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var hN=dN;function dN(){this.needDispatch=!0}yN.prototype.get=function(){var e=this.storage.getItem(Cn);if(a.isNullOrUndefined(e))return null;try{var t=JSON.parse(e);return this.sdk.version!==t.version?(this.clear(),null):t}catch(e){return this.clear(),null}},yN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(Cn,JSON.stringify(e))},yN.prototype.clear=function(){this.storage.removeItem(Cn)};var vN=yN;function yN(e,t){this.sdk=e,this.storage=t}gN.prototype.addListener=function(e){this.listeners.push(e)},gN.prototype.changeVisibility=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onVisibilityChanged(t,r)})};var mN=gN;function gN(e){void 0===e&&(e=Le.instance),this.clock=e,this.listeners=[]}wN.create=function(e,t,r){return void 0===r&&(r=Le.instance),new wN(new bN(r,e,t))},wN.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var EN=wN;function wN(e){this.limiter=e}TN.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},TN.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new _N(e+this.intervalMillis,this.limit)),this.currentScope};var bN=TN;function TN(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}IN.prototype.isExpired=function(e){return this.expirationTime<e},IN.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var _N=IN;function IN(e,t){this.expirationTime=e,this.token=t}AN.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var ON=AN;function AN(e){this.determiners=e}NN.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;xe.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache={});var t=this.cacheKey(e),e=this.clock.currentMillis(),r=this.cache[t];return void 0!==r&&e-r<=this.dedupIntervalMillis||(this.cache[t]=e,!1)};ip=NN;function NN(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}Ne(xN,RN=ip),xN.prototype.supports=function(e){return g0.isRemoteConfigEvent(e)},xN.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var RN,SN=xN;function xN(e,t){return void 0===t&&(t=Le.instance),RN.call(this,e,t)||this}Ne(kN,CN=ip),kN.prototype.supports=function(e){return g0.isExposureEvent(e)},kN.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var CN,MN=kN;function kN(e,t){return void 0===t&&(t=Le.instance),CN.call(this,e,t)||this}var PN=s.log,UN=null;function DN(e,t){t=oA.config(t);oA.logging(t);try{if((n=window)&&"_hackleApp"in n&&null!==n._hackleApp&&"object"==typeof n._hackleApp&&("getAppSdkKey"in n._hackleApp&&"function"==typeof n._hackleApp.getAppSdkKey&&("getInvocationType"in n._hackleApp&&"function"==typeof n._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){i=window._hackleApp.getInvocationType();var r=null===(o=(o=new XA).getInvocator(i,new So))?(Ho.error("Failed to get invocator with invocationType:".concat(i)),null):new Bo(new jo(o));if(r)return r}}catch(e){PN.error("Unexpected exception while check WebApp client: ".concat(e))}var n=oA.sdk(e,t);if(UN)return PN.debug("use already exists hackleClient"),UN;var i=new Uo,o=(i.initialize(),new tI),r=ko.getInstance({days:yn,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=oA.isBeaconSupported(),a=VA.intercept(n,zA.create()),u=VA.intercept(n,BA.create()),c=a,l=(s&&(c=u),new aA),p=new cA(l,new pA,oA.pollingIntervalMillis(t)),f=new vN(n,nI.postfix(o,"_".concat(e.slice(0,8)))),h=new mA(cI.clientFetch(t.sdkUrl,n.key),a),f=new _A(f,h),h=(l.add("workspace",f),new EA(cI.userCohorts(t.sdkUrl),a)),d=new GO,v=new q_(nI.postfix(r,"_".concat(e))),y=v.getUser(),m=t.user||null,g=new J_(Lo(),v,h,d,Le.instance,y,m),v=(l.add("cohort",g),new Q_(t.sessionTimeoutMillis,nI.postfix(r,"_".concat(e.slice(8))))),h=(g.addListener(v),new D_(o,"".concat(En,"_").concat(e),hn)),m=new NA(cI.clientDispatch(t.eventUrl),a),l=m,s=(s&&(l=new NA(cI.beaconDispatch(t.eventUrl,n.key),u)),new SA(h,m)),u=new OA(m,l,s),h=new ON([new SN(oA.dedupIntervalMillis(t)),new MN(oA.dedupIntervalMillis(t))]),m=new UA(u,hn,new pA,vn,t.auto_track_page_view),l=new C0(m,h,v,g),E=new hN,u=new ib(new oI(r,"".concat(On,"_").concat(e.slice(0,8)))),h=new ib(new oI(r,"".concat(An,"_").concat(e.slice(0,8)))),w=new pI(nI.prefix(o,"".concat(Nn,"_").concat(e.slice(0,8),"_"))),b=new iO(nI.prefix(o,"".concat(Rn,"_").concat(e.slice(0,8),"_"))),T=A_.create(f,l,[u,h],w),e=new DO(new FO(nI.postfix(r,"_".concat(e.slice(0,8)))),d,T,g),_=new S0(g,T),_=(v.addListener(e),v.addListener(_),new CI(T)),w=new hI([new vI,new mI(new IO),new EI(new IO),new bI(w,Le.instance),new _I(new AO),new OI(new AO),new NI(new RO),new SI(new RO)]),w=new sO([new uO(b),new fO(w),new lO]),_=new dO(Le.instance,_,w),w=new gO([new wO,new TO(_)]),I=new GI(cI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),I=new kI(HI.create(I),_,w),_=new yO(new JI(d_.get("targetMatcher")),new XI(b)),w=new FI(f,_,T),b=(new UI(m,w,I),new rA(f)),_=(new eA(m,b),new nN(d_.get("targetMatcher"))),w=new pN(r,Sn,{days:xn}),I=new tN(f,_,w,T),b=new aN(new cN(d),new xO,w,E),r=(new ZA(m,I,b,T),new aI(T,g,u,h)),d=(null==(f=t.devTool)?void 0:f.userExplorer)&&"function"==typeof(null==(_=t.devTool)?void 0:_.userExplorer),w=t.devTool&&d?{manager:t.devTool,userExplorer:r}:void 0,m=new Ri(cI.monitoring(t.monitoringUrl),a,c,new pA,dn),I=(hi.addRegistry(m),p.start(),EN.create(Mn,1)),O=new Io(T,p,v,g,I,w),A=(UN=O,new mN);A.addListener(l),A.addListener(s),A.addListener(v),A.addListener(m),A.addListener(i),window.addEventListener("pageshow",function(){return A.changeVisibility("visible")}),window.addEventListener("pagehide",function(){return A.changeVisibility("hidden")}),document.addEventListener("visibilitychange",function(){return A.changeVisibility(document.visibilityState)});return t.autoOpenDevTool&&(t.devTool?O.showUserExplorer():PN.error("DevTool is not provided")),b=Date.now(),u=g.currentUser,h=v.currentSessionId,(F_(y,u)?v.startNewSessionIfNeeded(u,b):v.startNewSession(y,u,b))===h&&e.startNewCampaignIfNeeded(u,b),A.changeVisibility("visible"),O.onReady(function(){(new x_).install(T,g);var e=O;function r(e){if("function"==typeof window.Event)return new Event(e);var t={bubbles:!1,cancelable:!1,detail:void 0},r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}try{history.pushState=function(t){return function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(r("locationchange")),e}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}}}(history.pushState),history.replaceState=function(t){return function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(r("locationchange")),e}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}}}(history.replaceState),window.addEventListener("popstate",function(){try{window.dispatchEvent(r("locationchange"))}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)PN.error(e);else try{PN.error(e)}catch(e){}}O.trackPageView(),E.dispatchDoneEventIfNeeded()}),O}var LN=function(e,t){return(LN=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)};var FN=function(){return(FN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function VN(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}jN.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},jN.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},jN.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};ga=jN;function jN(){this.listeners={}}HN.arePropertiesEqual=function(e,t){var r=HN.coerceUnknownToProperties(e),n=HN.coerceUnknownToProperties(t),e=Object.keys(r),t=Object.keys(n);return e.length===t.length&&e.every(function(e){return e in n&&r[e]===n[e]})},HN.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var zN=HN;function HN(){}GN.isUserEqual=function(e,t){return(null==e?void 0:e.id)===(null==t?void 0:t.id)&&(null==e?void 0:e.deviceId)===(null==t?void 0:t.deviceId)&&(null==e?void 0:e.userId)===(null==t?void 0:t.userId)&&zN.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&zN.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var BN=GN;function GN(){}var KN=function(n){var e=i,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function i(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=DN(e,FN(FN({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.32.1"})),r.getUser=r.getUser.bind(r),r.setUser=r.setUser.bind(r),r.setUserId=r.setUserId.bind(r),r.setDeviceId=r.setDeviceId.bind(r),r.setUserProperty=r.setUserProperty.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.resetUser=r.resetUser.bind(r),r.variation=r.variation.bind(r),r.variationDetail=r.variationDetail.bind(r),r.isFeatureOn=r.isFeatureOn.bind(r),r.featureFlagDetail=r.featureFlagDetail.bind(r),r.track=r.track.bind(r),r.trackPageView=r.trackPageView.bind(r),r.remoteConfig=r.remoteConfig.bind(r),r.onReady=r.onReady.bind(r),r.onInitialized=r.onInitialized.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),r.fetch=r.fetch.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return LN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},i.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},i.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},i.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},i.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},i.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},i.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},i.prototype.track=function(e,t){this.client.track(e,t||void 0)},i.prototype.trackPageView=function(e){this.client.trackPageView(FN(FN({},e),{user:(null==e?void 0:e.user)||void 0}))},i.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},i.prototype.onReady=function(e,t){this.client.onReady(e,t)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){BN.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},i.prototype.showUserExplorer=function(){this.client.showUserExplorer()},i.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},i.prototype.fetch=function(){return this.client.fetch()},i}(ga);var U={exports:{}},w={},JN=Object.getOwnPropertySymbols,YN=Object.prototype.hasOwnProperty,qN=Object.prototype.propertyIsEnumerable;var ya=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var o in r=Object(arguments[i]))YN.call(r,o)&&(n[o]=r[o]);if(JN)for(var s=JN(r),a=0;a<s.length;a++)qN.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},$N=ya,I="function"==typeof Symbol&&Symbol.for,XN=I?Symbol.for("react.element"):60103,WN=I?Symbol.for("react.portal"):60106,B=I?Symbol.for("react.fragment"):60107,mp=I?Symbol.for("react.strict_mode"):60108,m=I?Symbol.for("react.profiler"):60114,ZN=I?Symbol.for("react.provider"):60109,QN=I?Symbol.for("react.context"):60110,eR=I?Symbol.for("react.forward_ref"):60112,C=I?Symbol.for("react.suspense"):60113,tR=I?Symbol.for("react.memo"):60115,rR=I?Symbol.for("react.lazy"):60116,nR="function"==typeof Symbol&&Symbol.iterator;function iR(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var oR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sR={};function aR(e,t,r){this.props=e,this.context=t,this.refs=sR,this.updater=r||oR}function uR(){}function cR(e,t,r){this.props=e,this.context=t,this.refs=sR,this.updater=r||oR}aR.prototype.isReactComponent={},aR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(iR(85));this.updater.enqueueSetState(this,e,t,"setState")},aR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},uR.prototype=aR.prototype;var sa=cR.prototype=new uR,lR=(sa.constructor=cR,$N(sa,aR.prototype),sa.isPureReactComponent=!0,{current:null}),pR=Object.prototype.hasOwnProperty,fR={key:!0,ref:!0,__self:!0,__source:!0};function hR(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)pR.call(t,n)&&!fR.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(1===a)i.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===i[n]&&(i[n]=a[n]);return{$$typeof:XN,type:e,key:o,ref:s,props:i,_owner:lR.current}}function dR(e){return"object"==typeof e&&null!==e&&e.$$typeof===XN}var vR=/\/+/g,yR=[];function mR(e,t,r,n){var i;return yR.length?((i=yR.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function gR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,yR.length<10&&yR.push(e)}function ER(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case XN:case WN:o=!0}}if(o)return n(i,t,""===r?"."+wR(t,0):r),1;if(o=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+wR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=nR&&t[nR]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+wR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(iR(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function wR(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function bR(e,t){e.func.call(e.context,t,e.count++)}function TR(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?_R(e,n,r,function(e){return e}):null!=e&&(dR(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(vR,"$&/")+"/")+r,e={$$typeof:XN,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function _R(e,t,r,n,i){var o="";ER(e,TR,t=mR(t,o=null!=r?(""+r).replace(vR,"$&/")+"/":o,n,i)),gR(t)}var IR={current:null};function OR(){var e=IR.current;if(null===e)throw Error(iR(321));return e}var AR,NR,RR,e={ReactCurrentDispatcher:IR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:lR,IsSomeRendererActing:{current:!1},assign:$N},O=(w.Children={map:function(e,t,r){if(null==e)return e;var n=[];return _R(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;ER(e,bR,t=mR(null,null,t,r)),gR(t)},count:function(e){return ER(e,function(){return null},null)},toArray:function(e){var t=[];return _R(e,t,null,function(e){return e}),t},only:function(e){if(dR(e))return e;throw Error(iR(143))}},w.Component=aR,w.Fragment=B,w.Profiler=m,w.PureComponent=cR,w.StrictMode=mp,w.Suspense=C,w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=e,w.cloneElement=function(e,t,r){if(null==e)throw Error(iR(267,e));var n=$N({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(o=t.ref,s=lR.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)pR.call(t,a)&&!fR.hasOwnProperty(a)&&(n[a]=(void 0===t[a]&&void 0!==u?u:t)[a]);var a=arguments.length-2;if(1===a)n.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];n.children=u}return{$$typeof:XN,type:e.type,key:i,ref:o,props:n,_owner:s}},w.createContext=function(e,t){return(e={$$typeof:QN,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:ZN,_context:e},e.Consumer=e},w.createElement=hR,w.createFactory=function(e){var t=hR.bind(null,e);return t.type=e,t},w.createRef=function(){return{current:null}},w.forwardRef=function(e){return{$$typeof:eR,render:e}},w.isValidElement=dR,w.lazy=function(e){return{$$typeof:rR,_ctor:e,_status:-1,_result:null}},w.memo=function(e,t){return{$$typeof:tR,type:e,compare:void 0===t?null:t}},w.useCallback=function(e,t){return OR().useCallback(e,t)},w.useContext=function(e,t){return OR().useContext(e,t)},w.useDebugValue=function(){},w.useEffect=function(e,t){return OR().useEffect(e,t)},w.useImperativeHandle=function(e,t,r){return OR().useImperativeHandle(e,t,r)},w.useLayoutEffect=function(e,t){return OR().useLayoutEffect(e,t)},w.useMemo=function(e,t){return OR().useMemo(e,t)},w.useReducer=function(e,t,r){return OR().useReducer(e,t,r)},w.useRef=function(e){return OR().useRef(e)},w.useState=function(e){return OR().useState(e)},w.version="16.14.0",{}),Sc=Function.call.bind(Object.prototype.hasOwnProperty),SR=function(){};function xR(e,t,r,n,i){if("production"!==production)for(var o in e)if(RR(e,o)){var s,a;try{if("function"!=typeof e[o])throw(a=Error((n||"React class")+": "+r+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[o](t,o,n,r,null,AR)}catch(e){s=e}!s||s instanceof Error||SR((n||"React class")+": type specification of "+r+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in NR)&&(NR[s.message]=!0,o=i?i():"",SR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(AR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",NR={},RR=Sc,SR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),xR.resetWarningCache=function(){"production"!==production&&(NR={})},"production"!==production){var CR=ya,MR=xR,_="function"==typeof Symbol&&Symbol.for,kR=_?Symbol.for("react.element"):60103,PR=_?Symbol.for("react.portal"):60106,UR=_?Symbol.for("react.fragment"):60107,DR=_?Symbol.for("react.strict_mode"):60108,LR=_?Symbol.for("react.profiler"):60114,FR=_?Symbol.for("react.provider"):60109,VR=_?Symbol.for("react.context"):60110,jR=_?Symbol.for("react.concurrent_mode"):60111,zR=_?Symbol.for("react.forward_ref"):60112,HR=_?Symbol.for("react.suspense"):60113,BR=_?Symbol.for("react.suspense_list"):60120,GR=_?Symbol.for("react.memo"):60115,KR=_?Symbol.for("react.lazy"):60116,JR=_?Symbol.for("react.block"):60121,YR=_?Symbol.for("react.fundamental"):60117,qR=_?Symbol.for("react.responder"):60118,$R=_?Symbol.for("react.scope"):60119,XR="function"==typeof Symbol&&Symbol.iterator,WR="@@iterator";function ZR(e){if(null===e||"object"!=typeof e)return null;e=XR&&e[XR]||e[WR];return"function"==typeof e?e:null}var QR={current:null},eS={current:null},tS=/^(.*)[\\\/]/,rS=1;function nS(e){if(null==e)return null;if("number"==typeof e.tag&&cS("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case UR:return"Fragment";case PR:return"Portal";case LR:return"Profiler";case DR:return"StrictMode";case HR:return"Suspense";case BR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case VR:return"Context.Consumer";case FR:return"Context.Provider";case zR:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case GR:return nS(e.type);case JR:return nS(e.render);case KR:r=(t=e)._status===rS?t._result:null;if(r)return nS(r)}var t,r;return null}var iS={},oS=null;function sS(e){oS=e}iS.getCurrentStack=null,iS.getStackAddendum=function(){var e,t,r,n,i,o="",s=(oS&&(e=nS(oS.type),r=oS._owner,o+=(e=e,t=oS._source,r=r&&nS(r.type),i="",t?(n=(s=t.fileName).replace(tS,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(tS))&&(s=s[1])?s.replace(tS,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),iS.getCurrentStack);return s&&(o+=s()||""),o};var aS={ReactCurrentDispatcher:QR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:eS,IsSomeRendererActing:{current:!1},assign:CR};function uS(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];lS("warn",e,r)}function cS(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];lS("error",e,r)}function lS(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=aS.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var i=0,o="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(o)}catch(e){}}CR(aS,{ReactDebugCurrentFrame:iS,ReactComponentTreeHook:{}});var pS={};function fS(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;pS[r]||(cS("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),pS[r]=!0)}var hS={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){fS(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){fS(e,"replaceState")},enqueueSetState:function(e,t,r,n){fS(e,"setState")}},dS={};function vS(e,t,r){this.props=e,this.context=t,this.refs=dS,this.updater=r||hS}Object.freeze(dS),vS.prototype.isReactComponent={},vS.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},vS.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var yS,mS={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(yS in mS)mS.hasOwnProperty(yS)&&!function(e,t){Object.defineProperty(vS.prototype,e,{get:function(){uS("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(yS,mS[yS]);function gS(){}function ES(e,t,r){this.props=e,this.context=t,this.refs=dS,this.updater=r||hS}gS.prototype=vS.prototype,(_=ES.prototype=new gS).constructor=ES,CR(_,vS.prototype),_.isPureReactComponent=!0;var wS,bS,TS=Object.prototype.hasOwnProperty,_S={key:!0,ref:!0,__self:!0,__source:!0};function IS(e){if(TS.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function OS(e){if(TS.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var AS={},NS=function(e,t,r,n,i,o,s){e={$$typeof:kR,type:e,key:t,ref:r,props:s,_owner:o,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function RS(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in IS(t)&&(s=t.ref,"string"==typeof(c=t).ref&&eS.current&&c.__self&&eS.current.stateNode!==c.__self&&(p=nS(eS.current.type),AS[p]||(cS('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',nS(eS.current.type),c.ref),AS[p]=!0))),OS(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)TS.call(t,n)&&!_S.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,h=arguments.length-2;if(1==h)i.children=r;else if(1<h){for(var d=Array(h),v=0;v<h;v++)d[v]=arguments[v+2];Object.freeze&&Object.freeze(d),i.children=d}if(e&&e.defaultProps){var y=e.defaultProps;for(n in y)void 0===i[n]&&(i[n]=y[n])}function m(){bS||(bS=!0,cS("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",l))}function g(){wS||(wS=!0,cS("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(o||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,o&&(p=i,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=i,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),NS(e,o,s,a,u,eS.current,i)}function SS(e){return"object"==typeof e&&null!==e&&e.$$typeof===kR}var xS=".",CS=":",MS=!1,kS=/\/+/g;function PS(e){return(""+e).replace(kS,"$&/")}var US=10,DS=[];function LS(e,t,r,n){var i;return DS.length?((i=DS.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function FS(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,DS.length<US&&DS.push(e)}function VS(e,t,r){return null==e?0:function e(t,r,n,i){var o,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case kR:case PR:a=!0}}if(a)return n(i,t,""===r?xS+jS(t,0):r),1;var u=0,c=""===r?xS:r+CS;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+jS(o,l),n,i);else if("function"==typeof(r=ZR(t))){r===t.entries&&(MS||uS("Using Maps as children is deprecated and will be removed in a future major release. Consider converting children to an array of keyed ReactElements instead."),MS=!0);for(var p,f=r.call(t),h=0;!(p=f.next()).done;)u+=e(o=p.value,c+jS(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+iS.getStackAddendum(),s=""+t,Error("Objects are not valid as a React child (found: "+("[object Object]"==s?"object with keys {"+Object.keys(t).join(", ")+"}":s)+")."+r);return u}(e,"",t,r)}function jS(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function zS(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function HS(e,t,r){var n=e.result,i=e.keyPrefix,o=e.func,s=e.context,o=o.call(s,t,e.count++);Array.isArray(o)?BS(o,n,r,function(e){return e}):null!=o&&(SS(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":PS(o.key)+"/")+r,o=NS(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function BS(e,t,r,n,i){var o="",t=LS(t,o=null!=r?PS(r)+"/":o,n,i);VS(e,HS,t),FS(t)}function GS(e){return"string"==typeof e||"function"==typeof e||e===UR||e===jR||e===LR||e===DR||e===HR||e===BR||"object"==typeof e&&null!==e&&(e.$$typeof===KR||e.$$typeof===GR||e.$$typeof===FR||e.$$typeof===VR||e.$$typeof===zR||e.$$typeof===YR||e.$$typeof===qR||e.$$typeof===$R||e.$$typeof===JR)}function KS(){var e=QR.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");return e}function JS(){if(eS.current){var e=nS(eS.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var YS=!1,qS={};function $S(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=JS())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),qS[t=r]||(qS[t]=!0,r="",e&&e._owner&&e._owner!==eS.current&&(r=" It was passed a child from "+nS(e._owner.type)+"."),sS(e),cS('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',t,r),sS(null)))}function XS(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];SS(n)&&$S(n,t)}else if(SS(e))e._store&&(e._store.validated=!0);else if(e){var i=ZR(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)SS(o.value)&&$S(o.value,t)}}function WS(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=nS(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==zR&&t.$$typeof!==GR)return;r=t.propTypes}r?(sS(e),MR(r,e.props,"prop",n,iS.getStackAddendum),sS(null)):void 0===t.PropTypes||YS||(YS=!0,cS("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||cS("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ZS(e,t,r){var n,i=GS(e),t=(i||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||JS(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===kR?(s="<"+(nS(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,cS("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,n)),RS.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)XS(arguments[o],e);if(e===UR){var s=t;sS(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){cS("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&cS("Invalid attribute `ref` supplied to `React.Fragment`."),sS(null)}else WS(t);return t}var QS=!1;try{var ex=Object.freeze({}),tx=new Map([[ex,null]]),rx=new Set([ex]);tx.set(0,0),rx.add(0)}catch(e){}function nx(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,i,o=CR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in IS(t)&&(a=t.ref,l=eS.current),OS(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)TS.call(t,n)&&!_S.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var p=arguments.length-2;if(1==p)o.children=r;else if(1<p){for(var f=Array(p),h=0;h<p;h++)f[h]=arguments[h+2];o.children=f}return NS(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)XS(arguments[i],n.type);return WS(n),n}function ix(e){var t=ZS.bind(null,e);return t.type=e,QS||(QS=!0,uS("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return uS("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}_=ZS,O.Children={map:function(e,t,r){if(null==e)return e;var n=[];return BS(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=LS(null,null,t,r),VS(e,zS,t),FS(t)},count:function(e){return VS(e,function(){return null},null)},toArray:function(e){var t=[];return BS(e,t,null,function(e){return e}),t},only:function(e){if(SS(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},O.Component=vS,O.Fragment=UR,O.Profiler=LR,O.PureComponent=ES,O.StrictMode=DR,O.Suspense=HR,O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aS,O.cloneElement=nx,O.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&cS("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:VR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:FR,_context:r}),i=!1,t={$$typeof:VR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,cS("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(e){r.Provider=e}},_currentValue:{get:function(){return r._currentValue},set:function(e){r._currentValue=e}},_currentValue2:{get:function(){return r._currentValue2},set:function(e){r._currentValue2=e}},_threadCount:{get:function(){return r._threadCount},set:function(e){r._threadCount=e}},Consumer:{get:function(){return n||(n=!0,cS("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}}}),r.Consumer=t,r._currentRenderer=null,r._currentRenderer2=null,r},O.createElement=_,O.createFactory=ix,O.createRef=function(){var e={current:null};return Object.seal(e),e},O.forwardRef=function(e){return null!=e&&e.$$typeof===GR?cS("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?cS("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&cS("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null==e||null==e.defaultProps&&null==e.propTypes||cS("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:zR,render:e}},O.isValidElement=SS,O.lazy=function(e){var t,r,n={$$typeof:KR,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){cS("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){cS("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},O.memo=function(e,t){return GS(e)||cS("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:GR,type:e,compare:void 0===t?null:t}},O.useCallback=function(e,t){return KS().useCallback(e,t)},O.useContext=function(e,t){var r,n=KS();return void 0!==t&&cS("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context&&((r=e._context).Consumer===e?cS("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&cS("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},O.useDebugValue=function(e,t){return KS().useDebugValue(e,t)},O.useEffect=function(e,t){return KS().useEffect(e,t)},O.useImperativeHandle=function(e,t,r){return KS().useImperativeHandle(e,t,r)},O.useLayoutEffect=function(e,t){return KS().useLayoutEffect(e,t)},O.useMemo=function(e,t){return KS().useMemo(e,t)},O.useReducer=function(e,t,r){return KS().useReducer(e,t,r)},O.useRef=function(e){return KS().useRef(e)},O.useState=function(e){return KS().useState(e)},O.version="16.14.0"}"production"===production?U.exports=w:U.exports=O;var ox=U.exports,sx=U.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),su=sx.Consumer,ax=sx.Provider;var ux=s.log;function cx(e,t){e=lx(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function lx(e,t){void 0===t&&(t="A");var r=U.exports.useContext(sx),n=r.hackle,i=r.userVersion,o=r.initialized,s=U.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||Xe.of(t,h.EXCEPTION):Xe.of(t,h.SDK_NOT_READY)},[t,e,n,o]),r=VN(U.exports.useState(function(){return n?s():(ux.error("HackleClient is not existed"),Xe.of(t,h.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=VN(U.exports.useState(i),2),c=u[0],u=u[1];return hx(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function px(e){e=fx(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function fx(e){var t=U.exports.useContext(sx),r=t.hackle,n=t.userVersion,i=t.initialized,o=U.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||Ze.off(h.EXCEPTION):Ze.off(h.SDK_NOT_READY)},[e,r,i]),t=VN(U.exports.useState(function(){return r?o():(ux.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=VN(U.exports.useState(n),2),u=a[0],a=a[1];return hx(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function hx(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function dx(e){var t,r=e.experimentKey,e=e.children,n=(r=cx(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(U.exports.Children.forEach(e,function(e){U.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?U.exports.cloneElement(t,{variation:i}):null)}function vx(e){return e.variation,e=e.children,U.exports.createElement(U.exports.Fragment,null,e)}function yx(e){var t=(r=px(e.featureKey)).isLoading,r=r.isOn;return t?null:ox.createElement(ox.Fragment,null,e.children(r))}n.Bucket=ut,n.Cohort=nn,n.Container=Pt,n.ContainerGroup=Dt,n.CoreVersion=Jt,n.Decision=Xe,n.DecisionReason=h,n.EXPERIMENT_IMPLEMENTATION_TYPE=it,n.EmptyHackleRemoteConfig=et,n.EmptyParameterConfig=Ve,n.EventType=ft,n.Experiment=ot,n.FeatureFlagDecision=Ze,n.HackleContext=sx,n.HackleContextConsumer=su,n.HackleContextProvider=ax,n.HackleExperiment=dx,n.HackleFeature=yx,n.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(i=e.timeout)?3e3:i,i=void 0!==(i=e.supportSSR)&&i,e=e.children,o=VN(U.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return U.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),U.exports.useEffect(function(){function e(){a(function(e){return FN(FN({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),U.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return FN(FN({},e),{initialized:!0})})},function(){a(function(e){return FN(FN({},e),{initialized:!0})})}).catch(function(){a(function(e){return FN(FN({},e),{initialized:!0})})})},[t]),i||s.initialized?ox.createElement(ax,{value:s},e):null},n.HackleVariation=vx,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=pr,n.IAM_BEHAVIOR=lr,n.IAM_DISPLAY_TYPE=ar,n.IAM_HORIZONTAL_ALIGNMENT=hr,n.IAM_LAYOUT_TYPE=ur,n.IAM_ORIENTATION=cr,n.IAM_PLATFORM_TYPE=or,n.IAM_STATUS=ir,n.IAM_TIMEUNIT=sr,n.IAM_VERTICAL_ALIGNMENT=fr,n.IdentifierType=dt,n.IdentifiersBuilder=mt,n.InAppMessage=dr,n.InAppMessageAction=tn,n.InAppMessageAlignment=jr,n.InAppMessageBackground=en,n.InAppMessageButton=$r,n.InAppMessageButtonStyle=Qr,n.InAppMessageContext=kr,n.InAppMessageContextLayout=Fr,n.InAppMessageContextMessage=Dr,n.InAppMessageDecision=qe,n.InAppMessageDurationCap=Nr,n.InAppMessageEventFrequencyCap=_r,n.InAppMessageEventTrigger=wr,n.InAppMessageEventTriggerRule=br,n.InAppMessageExperimentContext=Ur,n.InAppMessageIdentifierCap=Or,n.InAppMessageImage=Hr,n.InAppMessagePeriodAlways=yr,n.InAppMessagePeriodCustom=gr,n.InAppMessagePositionalButton=Wr,n.InAppMessageTargetContext=Sr,n.InAppMessageText=Gr,n.InAppMessageTextAttribute=Jr,n.InAppMessageTextStyle=qr,n.InAppMessageUserOverride=Cr,n.Logger=s,n.MATCH_OPERATORS=Zt,n.MATCH_TYPES=Xt,n.MATCH_VALUE_TYPES=Wt,n.MetaVersion=qt,n.ParameterConfiguration=rt,n.PropertyOperations=Eo,n.PropertyOperationsBuilder=mo,n.RemoteConfigDecision=Je,n.RemoteConfigParameter=Ft,n.RemoteConfigParameterValue=Ht,n.RemoteConfigTargetRule=jt,n.SEGMENT_TYPES=tr,n.Segment=Mt,n.Slot=lt,n.SplitUrlConfig=on,n.SplitUrlTargets=an,n.TARGET_ACTION_TYPES=Qt,n.TARGET_KEY_TYPES=er,n.Target=wt,n.TargetAction=Rt,n.TargetCondition=Tt,n.TargetKey=It,n.TargetMatch=At,n.TargetRule=xt,n.TargetingType=rr,n.Variation=at,n.Version=Gt,n.createInstance=function(e,t){return new KN(e,t)},n.getUserId=Lo,n.removeUserId=Fo,n.resolveIdentifiers=yt,n.sanitizeUser=Et,n.setUserId=function(e){ko.getInstance().setItem(gn,e)},n.useFeature=function(e){var t=(n=U.exports.useContext(sx)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=VN(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&ux.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=VN(U.exports.useState(r),2))[0],n=n[1];return hx(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=U.exports.useContext(sx)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||Ze.off(h.EXCEPTION)},[e,t,n]),o=(s=VN(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&ux.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=VN(U.exports.useState(r),2))[0],n=n[1];return hx(a,r)||(n(r),s(i())),o},n.useLoadableFeature=px,n.useLoadableFeatureDetail=fx,n.useLoadableRemoteConfig=function(){var e=(o=U.exports.useContext(sx)).hackle,t=o.userVersion,r=o.initialized,n=U.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=VN(U.exports.useState(function(){return e||ux.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=VN(U.exports.useState(t),2))[0],a=a[1];return hx(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=cx,n.useLoadableVariationDetail=lx,n.useRemoteConfig=function(){var e=(r=U.exports.useContext(sx)).hackle,t=r.userVersion,r=r.initialized,n=U.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=VN(U.exports.useState(function(){return e||ux.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=VN(U.exports.useState(t),2))[0],r=r[1];return hx(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=U.exports.useContext(sx).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(ux.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=U.exports.useContext(sx)).hackle,n=a.userVersion,i=a.initialized,o=U.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=VN(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&ux.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=VN(U.exports.useState(n),2))[0],c=c[1];return hx(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=U.exports.useContext(sx)).hackle,n=i.userVersion,i=i.initialized,o=U.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||Xe.of(t,h.EXCEPTION)},[t,e,r,i]),s=(a=VN(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&ux.error("HackleClient is not existed"),Xe.of(t,h.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=VN(U.exports.useState(n),2))[0],i=i[1];return hx(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__esModule",{value:!0})});
|