@hackler/react-sdk 11.46.0 → 11.47.0
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/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 B(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 B(n)}var e="3.7.5",K="function"==typeof atob,t="function"==typeof btoa,G="function"==typeof Buffer;const z="function"==typeof TextDecoder?new TextDecoder:void 0,J="function"==typeof TextEncoder?new TextEncoder:void 0;const Y=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),W=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(Y),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)),Z=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Q=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var ee=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+=Y[r>>18&63]+Y[r>>12&63]+Y[r>>6&63]+Y[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const te=t?e=>btoa(e):G?e=>Buffer.from(e,"binary").toString("base64"):ee,re=G?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 te(n.join(""))},ne=(e,t=!1)=>t?Z(re(e)):re(e),ie=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))},oe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,se=e=>e.replace(oe,ie),ae=G?e=>Buffer.from(e,"utf8").toString("base64"):J?e=>re(J.encode(e)):e=>te(se(e)),ue=(e,t=!1)=>t?Z(ae(e)):ae(e);t=e=>ue(e,!0);const ce=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,pe=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))}},le=e=>e.replace(ce,pe);var r=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=W[t.charAt(e++)]<<18|W[t.charAt(e++)]<<12|(i=W[t.charAt(e++)])<<6|(o=W[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 fe=K?e=>atob(Q(e)):G?e=>Buffer.from(e,"base64").toString("binary"):r,he=G?e=>X(Buffer.from(e,"base64")):e=>X(fe(e).split("").map(e=>e.charCodeAt(0))),de=e=>he(ye(e)),ve=G?e=>Buffer.from(e,"base64").toString("utf8"):z?e=>z.decode(he(e)):e=>le(fe(e)),ye=e=>Q(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ge=e=>ve(ye(e));function me(){var e=(e,t)=>Object.defineProperty(String.prototype,e,we(t));e("fromBase64",function(){return ge(this)}),e("toBase64",function(e){return ue(this,e)}),e("toBase64URI",function(){return ue(this,!0)}),e("toBase64URL",function(){return ue(this,!0)}),e("toUint8Array",function(){return de(this)})}function Ee(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,we(t));e("toBase64",function(e){return ne(this,e)}),e("toBase64URI",function(){return ne(this,!0)}),e("toBase64URL",function(){return ne(this,!0)})}const we=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const be={version:e,VERSION:"3.7.5",atob:fe,atobPolyfill:r,btoa:te,btoaPolyfill:ee,fromBase64:ge,toBase64:ue,encode:ue,encodeURI:t,encodeURL:t,utob:se,btou:le,decode:ge,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:ne,toUint8Array:de,extendString:me,extendUint8Array:Ee,extendBuiltins:()=>{me(),Ee()}};Te.isNotNullOrUndefined=function(e){return null!=e},Te.isNullOrUndefined=function(e){return null==e},Te.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},Te.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var u=Te;function Te(){}_e.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);u.isNotNullOrUndefined(o)&&r.push(o)}return r},_e.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r},_e.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},_e.associate=function(e,t){return this.associateTo(e,new Map,t)},_e.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},_e.associateRecord=function(e,t){for(var r={},n=0,i=e;n<i.length;n++){var o=t(i[n]),s=o[0],o=o[1];r[s]=o}return r},_e.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},_e.sum=function(e,r){return e.reduce(function(e,t){return e+r(t)},0)};var f=_e;function _e(){}var Ne={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(Oe.setLogLevel=function(e){this.logLevel=e=void 0===e?Ne.INFO:e},Oe.initCounter=function(t){this.counters=f.associate(Object.keys(Ne),function(e){return[e,t(e)]})},Oe._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){}},Oe.increment=function(e){var t;null!=(t=null==(t=Oe.counters)?void 0:t.get(e))&&t.increment()},Oe.logLevel=Ne.INFO,Oe.log={error:function(e){Ne.ERROR<=Oe.logLevel&&(Oe._log("ERROR",e),Oe.increment("ERROR"))},warn:function(e){Ne.WARN<=Oe.logLevel&&(Oe._log("WARN",e),Oe.increment("WARN"))},info:function(e){Ne.INFO<=Oe.logLevel&&(Oe._log("INFO",e),Oe.increment("INFO"))},debug:function(e){Ne.DEBUG<=Oe.logLevel&&(Oe._log("DEBUG",e),Oe.increment("DEBUG"))}},Oe);function Oe(){}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 Se=function(e,t){return(Se=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 Pe(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}Se(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 a(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 p(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 Me=s.log,Ce=(xe.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},xe.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]})},xe.sanitize=function(e){var t={};if(u.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),u.isNullOrUndefined(i)?Me.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Me.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},xe.isValidType=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},xe.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},xe.MAX_IDENTIFIER_TYPE_LENGTH=128,xe.MAX_IDENTIFIER_VALUE_LENGTH=512,xe);function xe(){}var Ue=s.log,ke=(De.sanitize=function(e){var t={};if(u.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){Ue.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),u.isNullOrUndefined(i)?Ue.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):Ue.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},De.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},De.isValidKey=function(e){return u.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},De.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},De.isValidValue=function(e){return!u.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))},De.isValidElement=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},De.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},De.SYSTEM_PROPERTY_KEY_PREFIX="$",De.MAX_PROPERTIES_COUNT=128,De.MAX_PROPERTY_KEY_LENGTH=128,De.MAX_PROPERTY_VALUE_LENGTH=1024,De);function De(){}var Le=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],Fe=(i.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(i.C1/i.C0);case"milliseconds":return e/(i.C2/i.C0);case"seconds":return e/(i.C3/i.C0);case"minutes":return e/(i.C4/i.C0);case"hours":return e/(i.C5/i.C0);case"days":return e/(i.C6/i.C0)}},i.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C1/i.C0);case"milliseconds":return e/(i.C2/i.C1);case"microseconds":return e;case"seconds":return e/(i.C3/i.C1);case"minutes":return e/(i.C4/i.C1);case"hours":return e/(i.C5/i.C1);case"days":return e/(i.C6/i.C1)}},i.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C2/i.C0);case"microseconds":return e*(i.C2/i.C1);case"milliseconds":return e;case"seconds":return e/(i.C3/i.C2);case"minutes":return e/(i.C4/i.C2);case"hours":return e/(i.C5/i.C2);case"days":return e/(i.C6/i.C2)}},i.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C3/i.C0);case"microseconds":return e*(i.C3/i.C1);case"milliseconds":return e*(i.C3/i.C2);case"seconds":return e;case"minutes":return e/(i.C4/i.C3);case"hours":return e/(i.C5/i.C3);case"days":return e/(i.C6/i.C3)}},i.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C4/i.C0);case"microseconds":return e*(i.C4/i.C1);case"milliseconds":return e*(i.C4/i.C2);case"seconds":return e*(i.C4/i.C3);case"minutes":return e;case"hours":return e/(i.C5/i.C4);case"days":return e/(i.C6/i.C4)}},i.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C5/i.C0);case"microseconds":return e*(i.C5/i.C1);case"milliseconds":return e*(i.C5/i.C2);case"seconds":return e*(i.C5/i.C3);case"minutes":return e*(i.C5/i.C4);case"hours":return e;case"days":return e/(i.C6/i.C5)}},i.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C6/i.C0);case"microseconds":return e*(i.C6/i.C1);case"milliseconds":return e*(i.C6/i.C2);case"seconds":return e*(i.C6/i.C3);case"minutes":return e*(i.C6/i.C4);case"hours":return e*(i.C6/i.C5);case"days":return e}},i.C6=24*(i.C5=60*(i.C4=60*(i.C3=1e3*(i.C2=1e3*(i.C1=1e3*(i.C0=1)))))),i.converter={nanoseconds:i.nanosToUnit,microseconds:i.microsToUnit,milliseconds:i.millisToUnit,seconds:i.secondsToUnit,minutes:i.minutesToUnit,hours:i.hoursToUnit,days:i.daysToUnit},i);function i(){}je.prototype.tick=function(){return 1e3*Date.now()},je.prototype.currentMillis=function(){return Date.now()},je.instance=new je;var Ve=je;function je(){}He.prototype.get=function(e,t){return t};var Be=He;function He(){this.parameters={}}Ge.prototype.get=function(e,t){e=this.parameters[e];return!u.isNullOrUndefined(e)&&(u.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var Ke=Ge;function Ge(e){this.parameters=e}var ze="X-HACKLE-SDK-KEY",Je="X-HACKLE-SDK-NAME",Ye="X-HACKLE-SDK-VERSION",We="X-HACKLE-SDK-TIME",qe=100,$e=6e4,Xe=500,Ze=3650,Qe="_hackle_hid",et="_hackle_id",tt="hackle-repository-storage",rt="_hackle_session_id",nt="_hackle_last_event_ts",it="_hackle_uid",ot="_hackle_did",st="_hackle_mkt",at="hackle-manual-override_ab",ut="hackle-manual-override_ff",ct="hackle-iam-hide",pt="hackle-iam-impression",lt="hackle-split-url-redirected",ft=1/86400*3,ht="hackle-workspace-config",dt=6e4,vt=1e3,yt=s.log;function gt(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||yt.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function mt(e,t){if(!u.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=gt(e,i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r}}wt.of=function(e,t){return new wt(e,t)};var Et=wt;function wt(e,t){this.value=e,this.reason=t}Tt.prototype.isShow=function(){return u.isNotNullOrUndefined(this.inAppMessage)&&u.isNotNullOrUndefined(this.message)},Tt.of=function(e,t,r,n){return new Tt(t,r,e,n=void 0===n?{}:n)};var bt=Tt;function Tt(e,t,r,n){this.inAppMessage=e,this.message=t,this.reason=r,this.properties=n}Nt.of=function(e,t,r,n){return new Nt(e,t,r=void 0===r?new Be:r,n=void 0===n?void 0:n)},Object.defineProperty(Nt.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),Nt.prototype.get=function(e,t){return this.config.get(e,t)};var _t=Nt;function Nt(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}It.on=function(e,t,r){return new It(!0,e,t=void 0===t?new Be:t,r=void 0===r?void 0:r)},It.off=function(e,t,r){return new It(!1,e,t=void 0===t?new Be:t,r=void 0===r?void 0:r)},Object.defineProperty(It.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),It.prototype.get=function(e,t){return this.config.get(e,t)};var Ot=It;function It(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}St.prototype.get=function(e,t){return t};var At=St;function St(){}Object.defineProperty(Rt.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),Rt.fromJson=function(e){return new Rt(e.id,new Ke(f.associateRecord(e.parameters,function(e){return[e.key,e.value]})))},Rt.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var Pt=Rt;function Rt(e,t){this.id=e,this.config=t}o.SDK_NOT_READY="SDK_NOT_READY",o.EXCEPTION="EXCEPTION",o.INVALID_INPUT="INVALID_INPUT",o.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",o.TYPE_MISMATCH="TYPE_MISMATCH",o.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",o.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",o.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",o.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",o.OVERRIDDEN="OVERRIDDEN",o.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",o.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",o.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",o.VARIATION_DROPPED="VARIATION_DROPPED",o.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",o.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",o.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",o.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",o.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",o.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",o.TARGET_RULE_MATCH="TARGET_RULE_MATCH",o.DEFAULT_RULE="DEFAULT_RULE",o.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",o.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",o.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",o.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",o.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",o.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",o.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",o.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",o.IN_APP_MESSAGE_FREQUENCY_CAPPED="IN_APP_MESSAGE_FREQUENCY_CAPPED",o.EXPERIMENT_CONTROL_GROUP="EXPERIMENT_CONTROL_GROUP";var l=o;function o(){}var Mt=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],Ct=(xt.fromJson=function(e,t,r){var n=xt.experimentStatusOrNull(t.execution.status),i=t.variations.map(function(t){return new Ut(t.id,t.key,"DROPPED"===t.status,r.find(function(e){return e.id===t.parameterConfigurationId}))}),o=f.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),s=f.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return ir.fromJson(e,Rr.IDENTIFIER)}),a=f.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return Wt.fromJson(e,Rr.PROPERTY)}),u=Vn.fromJson(t.execution.targetUrls),c=gt(Mt,t.implementationType),p=f.mapNotNullOrUndefined(t.execution.targetRules,function(e){return ir.fromJson(e,Rr.PROPERTY)}),l=rr.fromJson(t.execution.defaultRule);return n&&c&&l&&new xt(t.id,t.key,e,t.identifierType,n,t.version,t.execution.version,i,o,s,a,u,p,l,t.containerId,c,t.winnerVariationId)},xt.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void yt.debug("Unsupported status [".concat(e,"]"))}},xt.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},xt.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},xt.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},xt);function xt(e,t,r,n,i,o,s,a,u,c,p,l,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=p,this.splitUrlTargets=l,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=v,this.winnerVariationId=y}Object.defineProperty(kt.prototype,"parameters",{get:function(){var e;return null!=(e=null==(e=this.config)?void 0:e.parameters)?e:{}},enumerable:!1,configurable:!0});var Ut=kt;function kt(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.config=n}Lt.fromJson=function(e){return new Lt(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new Ft(t,r,e)}))};var Dt=Lt;function Lt(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}Vt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var Ft=Vt;function Vt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}Bt.fromJson=function(e){return new Bt(e.id,e.key)};var jt=Bt;function Bt(e,t){this.id=e,this.key=t}Kt.ID="$id",Kt.USER="$userId",Kt.DEVICE="$deviceId",Kt.SESSION="$sessionId",Kt.HACKLE_DEVICE="$hackleDeviceId";var Ht=Kt;function Kt(){}function Gt(e){var t=new zt;return t.addIdentifiers(e.identifiers||{}),t.add(Ht.ID,e.id),t.add(Ht.DEVICE,e.deviceId),u.isNotNullOrUndefined(e.userId)&&t.add(Ht.USER,e.userId),t.build()}Jt.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},Jt.prototype.add=function(e,t){var r=Ce.sanitizeValue(t);return Ce.isValidType(e)&&r?this.identifiers[e]=t:yt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},Jt.prototype.build=function(){return this.identifiers};var zt=Jt;function Jt(){this.identifiers={}}function Yt(e){var t,r={};return r.id=null!=(t=Ce.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=Ce.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=Ce.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=ke.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=Ce.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}qt.fromJson=function(e,t){return new qt(f.mapNotNullOrUndefined(e.conditions,function(e){return $t.fromJson(e,t)}))},qt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var Wt=qt;function qt(e){this.conditions=e}Xt.fromJson=function(e,t){var r=Zt.fromJson(e.key);if(r&&t.supports(r.type))return(t=er.fromJson(e.match))&&new Xt(r,t)},Xt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var $t=Xt;function Xt(e,t){this.key=e,this.match=t}Qt.fromJson=function(e){var t=gt(Sr,e.type);return t&&new Qt(t,e.name)},Qt.prototype.toJson=function(){return{type:this.type,name:this.name}};var Zt=Qt;function Qt(e,t){this.type=e,this.name=t}tr.fromJson=function(e){var t=gt(Nr,e.type),r=gt(Ir,e.operator),n=gt(Or,e.valueType);return t&&r&&n&&new tr(t,r,n,e.values)},tr.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var er=tr;function tr(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}nr.fromJson=function(e){var t=gt(Ar,e.type);return t&&new nr(t,e.variationId,e.bucketId)};var rr=nr;function nr(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}or.fromJson=function(e,t){t=Wt.fromJson(e.target,t),e=rr.fromJson(e.action);return t&&e&&new or(t,e)};var ir=or;function or(e,t){this.target=e,this.action=t}ar.fromJson=function(e){var t=gt(Pr,e.type);return t&&new ar(e.id,e.key,t,f.mapNotNullOrUndefined(e.targets,function(e){return Wt.fromJson(e,Rr.SEGMENT)}))};var sr=ar;function ar(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}cr.fromJson=function(e){return new cr(e.id,e.bucketId,e.groups.map(function(e){return pr.fromJson(e)}))},cr.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var ur=cr;function cr(e,t,r){this.id=e,this.bucketId=t,this.groups=r}lr.fromJson=function(e){return new lr(e.id,e.experiments)};var pr=lr;function lr(e,t){this.id=e,this.experiments=t}hr.fromJson=function(e){var t=gt(Or,e.type),r=f.mapNotNullOrUndefined(e.targetRules,function(e){return dr.fromJson(e,Rr.PROPERTY)}),n=yr.fromJson(e.defaultValue);return t&&new hr(e.id,e.key,t,e.identifierType,r,n)};var fr=hr;function hr(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}vr.fromJson=function(e,t){t=Wt.fromJson(e.target,t);return t&&new vr(e.key,e.name,t,e.bucketId,yr.fromJson(e.value))};var dr=vr;function vr(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}gr.fromJson=function(e){return new gr(e.id,e.value)};var yr=gr;function gr(e,t){this.id=e,this.rawValue=t}Er.tryParse=function(e){if(e instanceof Er)return e;var t,r,n,i,e=Er.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 Er(new wr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),Tr.parse(i),Tr.parse(e))},Er.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Er.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Er.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Er.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Er.prototype.isLessThan=function(e){return this.compareTo(e)<0},Er.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Er.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 mr=Er;function Er(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}br.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var wr=br;function br(e,t,r){this.major=e,this.minor=t,this.patch=r}_r.parse=function(e){return e?new _r(e.split(".")):_r.EMPTY},_r.prototype.isEmpty=function(){return 0===this.identifiers.length},_r.prototype.isNotEmpty=function(){return!this.isEmpty()},_r.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},_r.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=_r.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},_r.compareIdentifiers=function(e,t){return _r.numericIdentifierRegExp.test(e)&&_r.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},_r.EMPTY=new _r([]),_r.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var Tr=_r;function _r(e){this.identifiers=e}var Nr=["MATCH","NOT_MATCH"],Or=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Ir=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE","EXISTS"],Ar=["VARIATION","BUCKET"],Sr=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"],Pr=["USER_ID","USER_PROPERTY"],Rr=(Mr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},Mr.IDENTIFIER=new Mr("SEGMENT"),Mr.PROPERTY=new Mr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Mr.SEGMENT=new Mr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Mr);function Mr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var Cr=["ACTIVE","DRAFT","PAUSE"],xr=["WEB","ANDROID","IOS"],Ur=["IMMEDIATE","CUSTOM"],kr=["MODAL","BANNER","BOTTOM_SHEET","NONE"],Dr=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE","NONE"],Lr=["VERTICAL","HORIZONTAL"],Fr=["CLICK"],Vr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],jr=["TOP","MIDDLE","BOTTOM"],Br=["LEFT","CENTER","RIGHT"],Hr=(Kr.fromJson=function(e){var t,r=gt(Cr,e.status);if(!u.isNullOrUndefined(r)){switch(gt(Ur,e.timeUnit)){case"IMMEDIATE":t=new Gr;break;case"CUSTOM":if(u.isNullOrUndefined(e.startEpochTimeMillis))return;if(u.isNullOrUndefined(e.endEpochTimeMillis))return;t=new Jr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=un.fromJson(e.messageContext);if(!u.isNullOrUndefined(o))return n=e.eventTriggerRules.map(qr.fromJson),i=Xr.fromJson(e.eventFrequencyCap),new Kr(e.id,e.key,r,t,new Wr(n,i),nn.fromJson(e.targetContext),o)}},Kr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},Kr);function Kr(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}zr.prototype.within=function(e){return!0};var Gr=zr;function zr(){this.type="IMMEDIATE"}Yr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var Jr=Yr;function Yr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var Wr=function(e,t){this.rules=e,this.frequencyCap=t},qr=($r.fromJson=function(e){return new $r(e.eventKey,f.mapNotNullOrUndefined(e.targets,function(e){return Wt.fromJson(e,Rr.PROPERTY)}))},$r);function $r(e,t){this.eventKey=e,this.targets=t}Zr.fromJson=function(e){return e?new Zr(e.identifiers.map(Qr.fromJson),tn.fromJson(e.duration)):null};var Xr=Zr;function Zr(e,t){this.identifierCaps=e,this.durationCap=t}en.fromJson=function(e){return new en(e.identifierType,e.countPerIdentifier)};var Qr=en;function en(e,t){this.identifierType=e,this.count=t}rn.fromJson=function(e){if(!e)return null;var t=gt(Le,e.durationUnit.timeUnit);return t?new rn(Fe.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var tn=rn;function rn(e,t){this.durationMillis=e,this.count=t}on.fromJson=function(e){return new on(e.overrides.map(sn.fromJson),f.mapNotNullOrUndefined(e.targets,function(e){return Wt.fromJson(e,Rr.PROPERTY)}))};var nn=on;function on(e,t){this.overrides=e,this.targets=t}an.fromJson=function(e){return new an(e.identifierType,e.identifiers)};var sn=an;function an(e,t){this.identifierType=e,this.identifiers=t}cn.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new pn(e.exposure.key)),mt(xr,e.platformTypes));if(!u.isNullOrUndefined(r)){var n=mt(Lr,e.orientations);if(!u.isNullOrUndefined(n)){var i=f.mapOrUndefined(e.messages,ln.fromJson);if(!u.isNullOrUndefined(i))return new cn(e.defaultLang,t,r,n,i)}}};var un=cn;function cn(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var pn=function(e){this.key=e},ln=(fn.fromJson=function(e){var t=hn.fromJson(e.layout);if(!u.isNullOrUndefined(t)){var r=f.mapOrUndefined(e.images,gn.fromJson);if(!u.isNullOrUndefined(r)){var n=void 0;if(!u.isNotNullOrUndefined(e.imageAutoScroll)||(n=En.fromJson(e.imageAutoScroll),!u.isNullOrUndefined(n))){var i=f.mapOrUndefined(e.buttons,In.fromJson);if(!u.isNullOrUndefined(i)){var o=void 0;if(!u.isNotNullOrUndefined(e.closeButton)||(o=In.fromJson2(e.closeButton),!u.isNullOrUndefined(o))){var s=f.mapOrUndefined(e.outerButtons,Sn.fromJson),a=f.mapOrUndefined(e.innerButtons,Sn.fromJson);if(!u.isNullOrUndefined(s)&&!u.isNullOrUndefined(a))return new fn(e.variationKey,e.lang,t,r,n,e.text?bn.fromJson(e.text):void 0,i,o,new Mn(e.background.color),e.action?Cn.fromJson(e.action):void 0,s,a)}}}}}},fn.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()}),imageAutoScroll:null!=(e=null==(e=this.imageAutoScroll)?void 0:e.toJson())?e:null,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()}),innerButtons:this.innerButtons.map(function(e){return e.toJson()})}},fn);function fn(e,t,r,n,i,o,s,a,u,c,p,l){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.imageAutoScroll=i,this.text=o,this.buttons=s,this.closeButton=a,this.background=u,this.action=c,this.outerButtons=p,this.innerButtons=l}dn.fromJson=function(e){var t=gt(Dr,e.layoutType),r=gt(kr,e.displayType);if(!u.isNullOrUndefined(r)&&!u.isNullOrUndefined(t))return new dn(r,t,e.alignment?vn.fromJson(e.alignment):void 0)};var hn=dn;function dn(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}yn.fromJson=function(e){var t=gt(Br,e.horizontal);if(!u.isNullOrUndefined(t)){e=gt(jr,e.vertical);if(!u.isNullOrUndefined(e))return new yn(t,e)}},yn.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var vn=yn;function yn(e,t){this.horizontal=e,this.vertical=t}mn.fromJson=function(e){var t=gt(Lr,e.orientation);if(!u.isNullOrUndefined(t)){var r=void 0;if(!u.isNotNullOrUndefined(e.action)||(r=Cn.fromJson(e.action),!u.isNullOrUndefined(r)))return new mn(t,e.imagePath,r)}},mn.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 gn=mn;function mn(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}wn.fromJson=function(e){var t=gt(Le,e.interval.timeUnit);if(t)return new wn(Fe.converter[t](e.interval.amount,"milliseconds"))},wn.prototype.toJson=function(){return{interval:{timeUnit:"milliseconds",amount:this.intervalMillis}}};var En=wn;function wn(e){this.intervalMillis=e}Tn.fromJson=function(e){return new Tn(_n.fromJson(e.title),_n.fromJson(e.body))},Tn.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 bn=Tn;function Tn(e,t){this.title=e,this.body=t}Nn.fromJson=function(e){return new Nn(e.text,new On(e.style.textColor))};var _n=Nn;function Nn(e,t){this.text=e,this.style=t}var On=function(e){this.color=e},In=(An.fromJson=function(e){var t=Cn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new An(e.text,new Rn(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},An.fromJson2=function(e){var t=Cn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new An("✕",new Rn(e.style.color,"#FFFFFF","#FFFFFF"),t)},An.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},An.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},An);function An(e,t,r){this.text=e,this.style=t,this.action=r}Pn.fromJson=function(e){var t=In.fromJson(e.button);if(!u.isNullOrUndefined(t)){e=vn.fromJson(e.alignment);if(!u.isNullOrUndefined(e))return new Pn(t,e)}},Pn.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}};var Sn=Pn;function Pn(e,t){this.button=e,this.alignment=t}var Rn=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Mn=function(e){this.color=e},Cn=(xn.fromJson=function(e){var t=gt(Fr,e.behavior);if(!u.isNullOrUndefined(t)){var r=gt(Vr,e.type);if(!u.isNullOrUndefined(r))return new xn(t,r,null!=(t=e.value)?t:void 0)}},xn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},xn);function xn(e,t,r){this.behavior=e,this.type=t,this.value=r}kn.fromJson=function(e){var t=e.type,e=e.value,r=this.linkActionTypes.some(function(e){return e===t}),n=this.closeActionTypes.some(function(e){return e===t}),i=this.tabTargetActionsTypes.some(function(e){return e===t}),o=this.windowTargetActionsTypes.some(function(e){return e===t});return new kn(r?"LINK":"CLOSE",n?{hideDurationMillis:"HIDDEN"===t?864e5:null}:void 0,r?{url:null!=e?e:"",target:o?"NEW_WINDOW":i?"NEW_TAB":"CURRENT",shouldCloseAfterLink:n}:void 0)},kn.fromInteraction=function(e){return"CLOSE"===e.type?new kn(e.type,{hideDurationMillis:null}):kn.fromJson(e.action)},kn.fromAction=function(e){return kn.fromJson(e.toJson())},kn.linkActionTypes=["LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE","WEB_LINK"],kn.closeActionTypes=["CLOSE","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW_AND_CLOSE"],kn.tabTargetActionsTypes=["LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE"],kn.windowTargetActionsTypes=["LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"];var Un=kn;function kn(e,t,r){this.type=e,this.close=t,this.link=r}var Dn=function(e){this.id=e},Ln=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Fn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new Fn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},Fn);function Fn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}jn.fromJson=function(e){if(null!==e)return new jn(f.mapNotNullOrUndefined(e.match,function(e){return Wt.fromJson(e,Rr.PROPERTY)}),f.mapNotNullOrUndefined(e.notMatch,function(e){return Wt.fromJson(e,Rr.PROPERTY)}))};var Vn=jn;function jn(e,t){this.includeTargets=e,this.excludeTargets=t}Hn.fromJson=function(e){return new Hn(e.eventKey,e.property,e.stats)},Hn.prototype.countWithinDays=function(t){return f.sum(this.stats.filter(function(e){return e.date>=t}),function(e){return e.count})};var Bn=Hn;function Hn(e,t,r){this.eventKey=e,this.property=t,this.stats=r}Gn.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},Gn.prototype.tag=function(e,t){return this._tags[e]=t,this},Gn.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})};var Kn=Gn;function Gn(e){this.name=e,this._tags={},this.name=e}Jn.start=function(e){return new Jn(e=void 0===e?Jn.defaultClock:e)},Jn.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Jn.defaultClock=new Ve;var zn=Jn;function Jn(e){this._clock=e,this.startTime=this._clock.tick()}Wn.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},Wn.prototype.tag=function(e,t){return this._tags[e]=t,this},Wn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Yn=Wn;function Wn(e){this.name=e,this._tags={}}$n.prototype.values=function(){return Array.from(this.data.values())},$n.prototype.keys=function(){return Array.from(this.data.keys())},$n.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},$n.prototype.has=function(e){return void 0!==this.get(e)},$n.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},$n.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},$n.prototype.forEach=function(e){this.data.forEach(e)},$n.prototype.filter=function(e){for(var t=new $n(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},$n.prototype.entries=function(){return Array.from(this.data.entries())};var qn=$n;function $n(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(Zn.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var Xn=Zn;function Zn(e,t){this.valueSupplier=t,this.field=e}function Qn(e,t){return e.name===t.name&&Ce.isEquals(e.tags,t.tags)}Object.defineProperty(ei.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),ei.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},ei.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},ei.prototype.counter=function(e,t){return void 0===t&&(t={}),new Yn(e).tags(t).register(this)},ei.prototype.timer=function(e,t){return void 0===t&&(t={}),new Kn(e).tags(t).register(this)},ei.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},ei.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},ei.prototype.close=function(){};K=ei;function ei(){this.id=H(),this.name="MetricRegistry",this._metrics=new qn(Qn)}Pe(ri,ti=K),ri.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.")))},ri.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},ri.prototype.close=function(){this.stop()};var ti,G=ri;function ri(e,t){var r=ti.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}ii.prototype.count=function(){return this.counterValue},ii.prototype.increment=function(e){this.counterValue+=null!=e?e:1},ii.prototype.measure=function(){return[new Xn("count",this.count.bind(this))]};var ni=ii;function ii(e){this.counterValue=0,this.id=e}si.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new ni(this.id),e},si.prototype.count=function(){return this.currentCounter.count()},si.prototype.increment=function(e){this.currentCounter.increment(e)},si.prototype.measure=function(){return[new Xn("count",this.count.bind(this))]};var oi=si;function si(e){this.id=e,this.currentCounter=new ni(e)}ui.prototype.count=function(){return this._count},ui.prototype.totalTime=function(e){return Fe.nanosToUnit(this._total,e)},ui.prototype.max=function(e){return Fe.nanosToUnit(this._max,e)},ui.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},ui.prototype.record=function(e,t){e<0||(t=Fe.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},ui.prototype.measure=function(){var e=this;return[new Xn("count",this.count.bind(this)),new Xn("total",function(){return e.totalTime("milliseconds")}),new Xn("max",function(){return e.max("milliseconds")}),new Xn("mean",function(){return e.mean("milliseconds")})]};var ai=ui;function ui(e){this._count=0,this._total=0,this._max=0,this.id=e}pi.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new ai(this.id),e},pi.prototype.count=function(){return this.currentTimer.count()},pi.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},pi.prototype.max=function(e){return this.currentTimer.max(e)},pi.prototype.record=function(e,t){this.currentTimer.record(e,t)},pi.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},pi.prototype.measure=function(){var e=this;return[new Xn("count",this.count.bind(this)),new Xn("total",function(){return e.totalTime("milliseconds")}),new Xn("max",function(){return e.max("milliseconds")}),new Xn("mean",function(){return e.mean("milliseconds")})]};var ci=pi;function pi(e){this.id=e,this.currentTimer=new ai(e)}Pe(fi,li=G),fi.prototype.createCounter=function(e){return new oi(e)},fi.prototype.createTimer=function(e){return new ci(e)},fi.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 li,e=fi;function fi(e,t){return li.call(this,e,t)||this}di.prototype.count=function(){return 0},di.prototype.increment=function(e){},di.prototype.measure=function(){return[new Xn("count",this.count.bind(this))]};var hi=di;function di(e){this.id=e}Object.defineProperty(yi.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),yi.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},yi.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},yi.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},yi.prototype.measure=function(){return[new Xn("count",this.count.bind(this))]};var vi=yi;function yi(e){this._counters=new qn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new hi(e)}mi.prototype.measure=function(){var e=this;return[new Xn("count",this.count.bind(this)),new Xn("total",function(){return e.totalTime("milliseconds")}),new Xn("max",function(){return e.max("milliseconds")}),new Xn("mean",function(){return e.mean("milliseconds")})]},mi.prototype.count=function(){return 0},mi.prototype.totalTime=function(e){return 0},mi.prototype.max=function(e){return 0},mi.prototype.mean=function(e){return 0},mi.prototype.record=function(e,t){};var gi=mi;function mi(e){this.id=e}Object.defineProperty(wi.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),wi.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},wi.prototype.max=function(e){return this.firstTimer.max(e)},wi.prototype.mean=function(e){return this.firstTimer.mean(e)},wi.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(wi.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),wi.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},wi.prototype.count=function(){return this.firstTimer.count()},wi.prototype.measure=function(){var e=this;return[new Xn("count",this.count.bind(this)),new Xn("total",function(){return e.totalTime("milliseconds")}),new Xn("max",function(){return e.max("milliseconds")}),new Xn("mean",function(){return e.mean("milliseconds")})]};var Ei=wi;function wi(e){this._timers=new qn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new gi(e)}Pe(Ti,bi=K),Ti.prototype.createCounter=function(e){e=new vi(e);return this.addRegistry(e),e},Ti.prototype.createTimer=function(e){e=new Ei(e);return this.addRegistry(e),e},Ti.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},Ti.prototype.add=function(r){r instanceof Ti||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)}))},Ti.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var bi,r=Ti;function Ti(){var e=null!==bi&&bi.apply(this,arguments)||this;return e.registries=new qn(function(e,t){return e.id===t.id}),e}Ni.counter=function(e,t){return Ni.globalRegistry.counter(e,t)},Ni.timer=function(e,t){return Ni.globalRegistry.timer(e,t)},Ni.addRegistry=function(e){Ni.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},Ni.globalRegistry=new r;var _i=Ni;function Ni(){}Ii.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},Ii.isNotEmptyString=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var Oi=Ii;function Ii(){}Si.builder=function(){return new Pi},Si.get=function(e){return Si.builder().url(e).build()},Si.prototype.toBuilder=function(){return new Pi(this)};var Ai=Si;function Si(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}Ri.prototype.url=function(e){return this._url=e,this},Ri.prototype.method=function(e){return this._method=e,this},Ri.prototype.body=function(e){return this._body=e,this},Ri.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},Ri.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},Ri.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new Ai(this._url,this._method,this._body,this._headers.build(),e)};var Pi=Ri;function Ri(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:xi.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}Ci.ok=function(e,t){return Ci.of(200,e,t)},Ci.of=function(e,t,r){return new Ci(e,null!=t?t:null,null!=r?r:xi.empty())},Ci.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},Ci.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},Ci.prototype.isNotModified=function(){return 304===this.statusCode};var Mi=Ci;function Ci(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Ui.empty=function(){return new Ui(new Map)},Ui.builder=function(){return new ki(new Map)},Ui.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(Oi.equalsIgnoreCase(i,e))return n}return null},Ui.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Ui.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},{})},Ui.prototype.toBuilder=function(){return new ki(this.headers)},Ui.IF_MODIFIED_SINCE="If-Modified-Since",Ui.LAST_MODIFIED="Last-Modified",Ui.ACCEPT_ENCODING="Accept-Encoding";var xi=Ui;function Ui(e){this.headers=e}Di.prototype.add=function(e,t){return this.headers.set(e,t),this},Di.prototype.build=function(){return new xi(this.headers)};var ki=Di;function Di(e){this.headers=e}Pe(Vi,Li=e),Vi.prototype.flushMetrics=function(e,t){var r=this;f.chunked(e.filter(this.isDispatchTarget.bind(this)),qe).forEach(function(e){r.dispatch(e,t)})},Vi.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Vi.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))})},Vi.prototype.createRequest=function(e){return Ai.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Vi.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Vi.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:u.fromMap(f.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Vi.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.publish(!0);case"visible":case"pageshow":case"blur":case"locationChange":case"focus":return}};var Li,Fi=Vi;function Vi(e,t,r,n,i){n=Li.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}Bi.experiment=function(e,t,r){t=_i.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Bi.featureFlag=function(e,t,r){t=_i.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Bi.remoteConfig=function(e,t,r){t=_i.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Bi.inAppMessage=function(e,t,r){t=_i.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var ji=Bi;function Bi(){}Ki.record=function(e,t,r){e=_i.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 Hi=Ki;function Ki(){}zi.decide=function(e,t,r,n){if(u.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)}},zi.decision=function(e,t,r,n,i){return u.isNullOrUndefined(t)?Et.of(n,l.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Gi=zi;function zi(){}var Ji=s.log,Yi=(Wi.prototype.get=function(t,r){var n,e=zn.start();try{n=this.decide(t,r)}catch(e){Ji.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Et.of(r,l.EXCEPTION)}return ji.remoteConfig(e,t,n),n.value},Wi.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Gi.decide(this.core,e,t,r)},Wi);function Wi(e,t,r){this.core=e,this.userManager=t,this.user=r}Xi.prototype.contains=function(e){return this._properties.has(e)},Xi.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},Xi.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)},Xi.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 u.isNullOrUndefined(r)||this._properties.set(e,r),this},Xi.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},Xi.prototype.build=function(){return this._properties};var qi,$i=Xi;function Xi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(ee=qi=qi||{}).SET="$set",ee.SET_ONCE="$setOnce",ee.UNSET="$unset",ee.INCREMENT="$increment",ee.APPEND="$append",ee.APPEND_ONCE="$appendOnce",ee.PREPEND="$prepend",ee.PREPEND_ONCE="$prependOnce",ee.REMOVE="$remove",ee.CLEAR_ALL="$clearAll";Qi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new $i).addProperties(e).addProperties(t).build()};var Zi=Qi;function Qi(){}to.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new $i).addProperties(e).addProperties(t,!0).build()};var eo=to;function to(){}no.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new $i).addProperties(e).remove(t).build()};var ro=no;function no(){}oo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new $i;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},oo.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var io=oo;function oo(){}so.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new $i;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},so.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},so.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},so.prototype.contains=function(e,t){return e.includes(t)},so.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Re([e],t,!0)},so.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=so;function so(){}Pe(co,ao=t),co.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var ao,uo=co;function co(){return null!==ao&&ao.apply(this,arguments)||this}Pe(fo,po=t),fo.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},fo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var po,lo=fo;function fo(){return null!==po&&po.apply(this,arguments)||this}Pe(yo,ho=t),yo.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var ho,vo=yo;function yo(){return null!==ho&&ho.apply(this,arguments)||this}Pe(Eo,go=t),Eo.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)},Eo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},Eo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var go,mo=Eo;function Eo(){return null!==go&&go.apply(this,arguments)||this}Pe(To,wo=t),To.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},To.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var wo,bo=To;function To(){return null!==wo&&wo.apply(this,arguments)||this}No.prototype.operate=function(e,t){return new Map};var _o=No;function No(){}Io.get=function(e){switch(e){case qi.SET:return new Zi;case qi.SET_ONCE:return new eo;case qi.UNSET:return new ro;case qi.INCREMENT:return new io;case qi.APPEND:return new uo;case qi.APPEND_ONCE:return new lo;case qi.PREPEND:return new vo;case qi.PREPEND_ONCE:return new mo;case qi.CLEAR_ALL:return new _o;case qi.REMOVE:return new bo}};var Oo=Io;function Io(){}So.prototype.set=function(e,t){return this.add(qi.SET,e,t)},So.prototype.setOnce=function(e,t){return this.add(qi.SET_ONCE,e,t)},So.prototype.unset=function(e){return this.add(qi.UNSET,e,"-")},So.prototype.increment=function(e,t){return this.add(qi.INCREMENT,e,t)},So.prototype.append=function(e,t){return this.add(qi.APPEND,e,t)},So.prototype.appendOnce=function(e,t){return this.add(qi.APPEND_ONCE,e,t)},So.prototype.prepend=function(e,t){return this.add(qi.PREPEND,e,t)},So.prototype.prependOnce=function(e,t){return this.add(qi.PREPEND_ONCE,e,t)},So.prototype.remove=function(e,t){return this.add(qi.REMOVE,e,t)},So.prototype.clearAll=function(){return this.add(qi.CLEAR_ALL,"clearAll","-")},So.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new Po(new Map(e))},So.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},So.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new $i);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var Ao=So;function So(){this.operations=new Map}Ro.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Oo.get(t).operate(r,e)}),r},Ro.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(u.fromMap(e))),r))}),i},Ro.prototype.toSecuredEvent=function(){var i={key:"$secured_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(u.fromMap(e))),r))}),i},Ro.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 Po=Ro;function Ro(e){this.operations=null!=e?e:new Map}Co.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 Mo=Co;function Co(){}Uo.prototype.isEquals=function(e){return this.url===e.url},Object.defineProperty(Uo.prototype,"pageTitle",{get:function(){return"undefined"==typeof window||"undefined"==typeof document?"":window.document.title},enumerable:!1,configurable:!0}),Uo.createWithCurrentPage=function(){return"undefined"==typeof window||"undefined"==typeof document?new Uo:new Uo(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol)},Uo.prototype.toProperties=function(){return{pagePath:this.pagePath,pageTitle:this.pageTitle,host:this.host,url:this.url,referrer:this.referrer,queryParameter:this.queryParameter,protocol:this.protocol.replace(":","")}};var xo=Uo;function Uo(e,t,r,n,i,o,s){void 0===t&&(t=""),void 0===r&&(r=""),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s=""),this.pagePath=e=void 0===e?"":e,this.host=t,this.hostname=r,this.url=n,this.referrer=i,this.queryParameter=o,this.protocol=s}Do.create=function(e){return new Do(e)},Do.prototype.getValue=function(){return this.value};var ko=Do;function Do(e){this.value=e}var Lo=s.log,Fo=(h.prototype.initialize=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Lo.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Lo.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Lo.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},h.prototype.getSessionId=function(){return this.sessionManager.sessionId},h.prototype.getUser=function(){return this.userManager.currentUser},h.prototype.setUser=function(e){try{var t=Yt(e);if(!t)return Lo.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Lo.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},h.prototype.setUserId=function(e){try{var t=void 0;if(u.isNullOrUndefined(e))t=this.userManager.setUserId(void 0);else{var r=Ce.sanitizeValue(e);if(!r)return Lo.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch(function(){})}catch(e){return Lo.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},h.prototype.setDeviceId=function(e){try{var t=Ce.sanitizeValue(e);if(!t)return Lo.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Lo.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},h.prototype.setUserProperty=function(e,t){e=(new Ao).set(e,t).build();return this.updateUserProperties(e)},h.prototype.setUserProperties=function(e){try{var t=ke.sanitize(e),r=new Ao;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 Lo.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},h.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),this.core.flush(!1),Promise.resolve()}catch(e){return Lo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},h.prototype.updatePushSubscriptions=function(e){try{var t=e.toEvent("$push_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Lo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},h.prototype.updateSmsSubscriptions=function(e){try{var t=e.toEvent("$sms_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Lo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},h.prototype.updateKakaoSubscriptions=function(e){try{var t=e.toEvent("$kakao_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Lo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},h.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new Ao).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch(function(){})}catch(e){return Lo.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},h.prototype.setPhoneNumber=function(e){try{if("string"!=typeof e)return Lo.error("Invalid value ".concat(e,": phoneNumber value type must be string.")),Promise.resolve();var t=ko.create(e),r=Ve.instance.currentMillis();return this.piiEventManager.setPhoneNumber(t,r),this.core.flush(!1),Promise.resolve()}catch(e){return Lo.error("Unexpected exception occurred while setting phone number: ".concat(e)),Promise.resolve()}},h.prototype.unsetPhoneNumber=function(){try{var e=Ve.instance.currentMillis();return this.piiEventManager.unsetPhoneNumber(e),this.core.flush(!1),Promise.resolve()}catch(e){return Lo.error("Unexpected exception occurred while unsetting phone number: ".concat(e)),Promise.resolve()}},h.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},h.prototype.variationDetail=function(r,n,e){var i=e||"A",e=zn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Lo.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),_t.of(i,l.EXCEPTION)}}(this);return ji.experiment(e,r,t),t},h.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},h.prototype.featureFlagDetail=function(r,n){var e=zn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Lo.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),Ot.off(l.EXCEPTION)}}(this);return ji.featureFlag(e,r,t),t},h.prototype.track=function(e,t){try{Lo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Lo.error("Unexpected exception while tracking event: ".concat(e))}},h.prototype.trackPageView=function(e){var t=xo.createWithCurrentPage();this.pageEventTracker.track(t)},h.prototype.remoteConfig=function(e){return new Yi(this.core,this.userManager,e)},h.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},h.prototype.getExperiment=function(t){try{return this.core.getExperiment(t)}catch(e){return void Lo.error('"Unexpected exception while get experiment['.concat(t,"]"))}},h.prototype.onInitialized=function(r){var n;return a(this,void 0,void 0,function(){var t;return p(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,Mo.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(),Lo.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},h.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},h.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Lo.debug("UserExplorer opened."),_i.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Lo.error("UserExplorer is not provided")},h.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Lo.warn("There is no active HackleDevtools.")},h.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},h.prototype.setInAppMessageListener=function(e){this.inAppMessageUi.setListener(e)},h.prototype.close=function(){Lo.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},h);function h(e,t,r,n,i,o,s,a,u){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.piiEventManager=i,this.fetchThrottler=o,this.pageEventTracker=s,this.inAppMessageUi=a,this.devTools=u,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.initialization=this.initialize()}var Vo=s.log,jo=(Bo.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user},browserProperties:this.browserPropertyProvider.getBrowserProperties()},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 Vo.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},Bo);function Bo(e,t,r){this.invocationProcessor=e,this.user=t,this.browserPropertyProvider=r}Ko.tryParse=function(e){try{return new URL(e)}catch(e){return}},Ko.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:Ko.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},Ko.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},Ko.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},Ko.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},Ko.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var Ho=Ko;function Ko(){}zo.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]:""},zo.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=Ho.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},zo.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},zo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=zo.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},zo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},zo.prototype.getOptions=function(){return this.options},zo.getInstance=function(e){return void 0===e&&(e={days:Ze,isCrossSubdomain:!0}),zo.storage=zo.storage?zo.storage:new zo(e)};var Go=zo;function zo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Yo.prototype.initialize=function(){Go.getInstance().getItem(Qe)||$o()},Yo.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return qo();case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var Jo=Yo;function Yo(){}function Wo(){var e=Go.getInstance(),t=e.getItem(et);if(t)return t;t=e.getItem(Qe);return t||$o()}function qo(){Go.getInstance().removeItem(et)}function $o(){var e=H();return Go.getInstance().setItem(Qe,e),e}var Xo,Zo=s.log;(G=Xo=Xo||{}).native="native",G.web_view_wrapper="web_view_wrapper";d.prototype.getSessionId=function(){try{var e={command:"getSessionId",browserProperties:this.browserPropertyProvider.getBrowserProperties()},t=this.invocationProcessor.process(e);return null!=t?t:Wo()}catch(e){return Zo.error("Unexpected exception while get sessionId: ".concat(e)),Wo()}},d.prototype.getUser=function(){var e;try{var t={command:"getUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},r=this.invocationProcessor.process(t);return null!=(e=Yt(r))?e:this.defaultUser()}catch(e){return Zo.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},d.prototype.setUser=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(!(t=Yt(n)))return Zo.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){Zo.error("Unexpected exception while set user: ".concat(e))}return[2]})})},d.prototype.setUserId=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(t=void 0,u.isNullOrUndefined(n))t=null;else if(!(t=Ce.sanitizeValue(n)))return Zo.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){Zo.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},d.prototype.setDeviceId=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(!(t=Ce.sanitizeValue(n)))return Zo.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){Zo.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},d.prototype.setUserProperty=function(r,n){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){Zo.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},d.prototype.setUserProperties=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{t=ke.sanitize(n),r=new Ao,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Zo.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},d.prototype.updateUserProperties=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){Zo.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},d.prototype.updatePushSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updatePushSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){Zo.error("Unexpected exception while update push subscriptions: ".concat(e))}return[2]})})},d.prototype.updateSmsSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updateSmsSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){Zo.error("Unexpected exception while update sms subscriptions: ".concat(e))}return[2]})})},d.prototype.updateKakaoSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updateKakaoSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){Zo.error("Unexpected exception while update Kakao subscriptions: ".concat(e))}return[2]})})},d.prototype.resetUser=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"resetUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){Zo.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},d.prototype.setPhoneNumber=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{if("string"!=typeof r)return Zo.error("Invalid type ".concat(r,": phoneNumber value must be string.")),[2,Promise.resolve()];t={command:"setPhoneNumber",parameters:{phoneNumber:r},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){Zo.error("Unexpected exception occurred while setting phone number: ".concat(e))}return[2]})})},d.prototype.unsetPhoneNumber=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"unsetPhoneNumber",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){Zo.error("Unexpected exception occurred while unsetting phone number: ".concat(e))}return[2]})})},d.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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return Zo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},d.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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return _t.of(o.variation,o.reason,new Ke(null!=(n=o.config.parameters)?n:{}))}catch(e){return Zo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),_t.of(r,l.EXCEPTION)}},d.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return Zo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},d.prototype.featureFlagDetail=function(t,e){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:t,user:this.convertUser(e)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new Ot(i.isOn,i.reason,new Ke(null!=(r=i.config.parameters)?r:{}),void 0)}catch(e){return Zo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),Ot.off(l.EXCEPTION)}},d.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)},browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(r)}catch(e){Zo.error("Unexpected exception while tracking event: ".concat(e))}},d.prototype.trackPageView=function(e){Zo.info("Web to app integration feature is not support 'trackPageView' method")},d.prototype.remoteConfig=function(e){return new jo(this.invocationProcessor,this.convertUser(e),this.browserPropertyProvider)},d.prototype.onReady=function(e,t){e()},d.prototype.showUserExplorer=function(){try{var e={command:"showUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){Zo.error("Unexpected exception while show userExplorer: ".concat(e))}},d.prototype.hideUserExplorer=function(){try{var e={command:"hideUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){Zo.error("Unexpected exception while hide userExplorer: ".concat(e))}},d.prototype.setInAppMessageListener=function(e){Zo.info("Web to app integration feature is not support 'setInAppMessageListener' method")},d.prototype.fetch=function(){return Promise.resolve()},d.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},d.prototype.close=function(){Zo.info("Web to app integration feature is not support 'close' method")},d.prototype.getExperiment=function(e){Zo.info("Web to app integration feature is not support 'getExperiment' method")},d.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},d.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=Yt(e))?e:void 0},d.prototype.defaultUser=function(){return{deviceId:Wo()}};var Qo=d;function d(e,t){this.invocationProcessor=e,this.browserPropertyProvider=t,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this)}v.prototype.getSessionId=function(){return this.browser.getSessionId()},v.prototype.getUser=function(){return this.browser.getUser()},v.prototype.syncUser=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return t=this.browser.getUser(),[4,this.app.setUser(t)];case 1:return e.sent(),[2]}})})},v.prototype.setUser=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUser(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.setUserId=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.setDeviceId=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setDeviceId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.setUserProperty=function(t,r){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperty(t,r)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.setUserProperties=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.updateUserProperties=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updateUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.updatePushSubscriptions=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updatePushSubscriptions(t)];case 1:return e.sent(),[2]}})})},v.prototype.updateSmsSubscriptions=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updateSmsSubscriptions(t)];case 1:return e.sent(),[2]}})})},v.prototype.updateKakaoSubscriptions=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updateKakaoSubscriptions(t)];case 1:return e.sent(),[2]}})})},v.prototype.resetUser=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.resetUser()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.setPhoneNumber=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setPhoneNumber(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.unsetPhoneNumber=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.unsetPhoneNumber()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.variation=function(e,t,r){return this.browser.variation(e,t,r=void 0===r?"A":r)},v.prototype.variationDetail=function(e,t,r){return this.browser.variationDetail(e,t,r=void 0===r?"A":r)},v.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},v.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},v.prototype.track=function(e,t){return this.browser.track(e,t)},v.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},v.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},v.prototype.onReady=function(e,t){this.browser.onReady(e,t)},v.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},v.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},v.prototype.fetch=function(){return this.browser.fetch()},v.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},v.prototype.close=function(){this.browser.close()},v.prototype.setInAppMessageListener=function(e){this.browser.setInAppMessageListener(e)},v.prototype.getExperiment=function(e){return this.browser.getExperiment(e)};var es=v;function v(e,t){this.browser=e,this.app=t,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this)}function ts(e){return e&&e.Math==Math&&e}function rs(e){try{return!!e()}catch(e){return!0}}function ns(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function is(e){return Ks(Hs(e),8,-1)}function os(e){if(null==e)throw Ys("Can't call method on "+e);return e}function ss(e){return Ws(qs(e))}function as(e){return"function"==typeof e}function us(e){return"object"==typeof e?null!==e:$s(e)}function cs(e,t){return arguments.length<2?(r=Xs[e],Zs(r)?r:void 0):Xs[e]&&Xs[e][t];var r}function ps(e){try{return aa(e)}catch(e){return"Object"}}function ls(e){if(ua(e))return e;throw pa(ca(e)+" is not a function")}function fs(e,t){return null==(e=e[t])?void 0:la(e)}function hs(t,r){try{ga(ya,t,{value:r,configurable:!0,writable:!0})}catch(e){ya[t]=r}return r}function ds(e){return Ta(ba(e))}function vs(e){return"Symbol("+(void 0===e?"":e)+")_"+Sa(++Ia+Aa,36)}function ys(e){var t;return Ra(Ua,e)&&(Ca||"string"==typeof Ua[e])||(t="Symbol."+e,Ca&&Ra(ka,e)?Ua[e]=ka[e]:Ua[e]=(xa&&Da?Da:La)(t)),Ua[e]}function gs(e){return e=za(e,"string"),Ja(e)?e:e+""}function ms(e){return Wa?Ya.createElement(e):{}}function Es(e){if(iu(e))return e;throw su(ou(e)+" is not an object")}function ws(e){return bu[e]||(bu[e]=wu(e))}function bs(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(ju(r)&&Hu(r,o,n),n.global)i?e[t]=r:Ku(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Bu.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Ts(e){return(e=+e)!=e||0==e?0:Ju(e)}function _s(e,t){return(e=Yu(e))<0?Wu(e+t,0):qu(e,t)}function Ns(e){return Zu(e.length)}function Os(a){return function(e,t,r){var n,i=Qu(e),o=tc(i),s=ec(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 Is(e,t){var r,n=nc(e),i=0,o=[];for(r in n)!rc(oc,r)&&rc(n,r)&&sc(o,r);for(;t.length>i;)!rc(n,r=t[i++])||~ic(o,r)||sc(o,r);return o}function As(e,t,r){for(var n=dc(t),i=yc.f,o=vc.f,s=0;s<n.length;s++){var a=n[s];hc(e,a)||r&&hc(r,a)||i(e,a,o(t,a))}}function Ss(e,t){return(e=bc[wc(e)])==_c||e!=Tc&&(mc(t)?gc(t):!!t)}function y(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?Nc:a?Nc[o]||Sc(o,{}):(Nc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=Oc(u,r))&&i.value:u[r],!Rc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;Pc(n,i)}(e.sham||i&&i.sham)&&Ic(n,"sham",!0),Ac(u,r,n,e)}}var Ps,Rs,Ms,Cs,xs,Us,ks,Ds,K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=ts("object"==typeof globalThis&&globalThis)||ts("object"==typeof window&&window)||ts("object"==typeof self&&self)||ts("object"==typeof K&&K)||function(){return this}()||Function("return this")(),e={},ee=!rs(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t=!rs(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Ls=Function.prototype.call,G=t?Ls.bind(Ls):function(){return Ls.apply(Ls,arguments)},K={},g={}.propertyIsEnumerable,Fs=Object.getOwnPropertyDescriptor,m=Fs&&!g.call({1:2},1),m=(K.f=m?function(e){e=Fs(this,e);return!!e&&e.enumerable}:g,t),g=Function.prototype,Vs=g.bind,js=g.call,Bs=m&&Vs.bind(js,js),g=m?function(e){return e&&Bs(e)}:function(e){return e&&function(){return js.apply(e,arguments)}},Vs=g,Hs=Vs({}.toString),Ks=Vs("".slice),m=rs,Gs=is,zs=Object,Js=g("".split),Vs=m(function(){return!zs("z").propertyIsEnumerable(0)})?function(e){return"String"==Gs(e)?Js(e,""):zs(e)}:zs,Ys=TypeError,Ws=Vs,qs=os,$s=as,Xs=r,Zs=as,m=g({}.isPrototypeOf),Qs=cs("navigator","userAgent")||"",ea=Qs,ta=r.process,E=r.Deno,ta=ta&&ta.versions||E&&E.version,E=ta&&ta.v8,ta=b=!(b=E?0<(w=E.split("."))[0]&&w[0]<4?1:+(w[0]+w[1]):b)&&ea&&(!(w=ea.match(/Edge\/(\d+)/))||74<=w[1])&&(w=ea.match(/Chrome\/(\d+)/))?+w[1]:b,ra=ta,E=rs,ea=!!Object.getOwnPropertySymbols&&!E(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ra&&ra<41}),w=ea&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,na=cs,ia=as,oa=m,sa=Object,b=w?function(e){return"symbol"==typeof e}:function(e){var t=na("Symbol");return ia(t)&&oa(t.prototype,sa(e))},aa=String,ua=as,ca=ps,pa=TypeError,la=ls,fa=G,ha=as,da=us,va=TypeError,E={exports:{}},ya=r,ga=Object.defineProperty,ma=hs,Ea="__core-js_shared__",ma=r[Ea]||ma(Ea,{}),wa=ma,ba=((E.exports=function(e,t){return wa[e]||(wa[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"}),os),Ta=Object,_a=ds,Na=g({}.hasOwnProperty),Ea=Object.hasOwn||function(e,t){return Na(_a(e),t)},Oa=g,Ia=0,Aa=Math.random(),Sa=Oa(1..toString),Oa=r,Pa=E.exports,Ra=Ea,Ma=vs,Ca=ea,xa=w,Ua=Pa("wks"),ka=Oa.Symbol,Da=ka&&ka.for,La=xa?ka:ka&&ka.withoutSetter||Ma,Fa=G,Va=us,ja=b,Ba=fs,Ha=function(e,t){var r,n;if("string"===t&&ha(r=e.toString)&&!da(n=fa(r,e)))return n;if(ha(r=e.valueOf)&&!da(n=fa(r,e)))return n;if("string"!==t&&ha(r=e.toString)&&!da(n=fa(r,e)))return n;throw va("Can't convert object to primitive value")},Ka=TypeError,Ga=ys("toPrimitive"),za=function(e,t){if(!Va(e)||ja(e))return e;var r=Ba(e,Ga);if(r){if(r=Fa(r,e,t=void 0===t?"default":t),!Va(r)||ja(r))return r;throw Ka("Can't convert object to primitive value")}return Ha(e,t=void 0===t?"number":t)},Ja=b,ea=us,Ya=r.document,Wa=ea(Ya)&&ea(Ya.createElement),qa=ms,w=!ee&&!rs(function(){return 7!=Object.defineProperty(qa("div"),"a",{get:function(){return 7}}).a}),$a=G,Xa=K,Za=ns,Qa=ss,eu=gs,tu=Ea,ru=w,nu=Object.getOwnPropertyDescriptor,Pa=(e.f=ee?nu:function(e,t){if(e=Qa(e),t=eu(t),ru)try{return nu(e,t)}catch(e){}if(tu(e,t))return Za(!$a(Xa.f,e,t),e[t])},{}),Oa=ee&&rs(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),iu=us,ou=String,su=TypeError,au=w,uu=Es,cu=gs,pu=TypeError,lu=Object.defineProperty,fu=Object.getOwnPropertyDescriptor,hu="enumerable",du="configurable",vu="writable",Ma=(Pa.f=ee?Oa?function(e,t,r){var n;return uu(e),t=cu(t),uu(r),"function"==typeof e&&"prototype"===t&&"value"in r&&vu in r&&!r[vu]&&((n=fu(e,t))&&n[vu]&&(e[t]=r.value,r={configurable:(du in r?r:n)[du],enumerable:(hu in r?r:n)[hu],writable:!1})),lu(e,t,r)}:lu:function(e,t,r){if(uu(e),t=cu(t),uu(r),au)try{return lu(e,t,r)}catch(e){}if("get"in r||"set"in r)throw pu("Accessors not supported");return"value"in r&&(e[t]=r.value),e},ee),yu=Pa,gu=ns,b=Ma?function(e,t,r){return yu.f(e,t,gu(1,r))}:function(e,t,r){return e[t]=r,e},ea={exports:{}},K=ee,w=Ea,Ma=Function.prototype,T=K&&Object.getOwnPropertyDescriptor,w=w(Ma,"name"),w={EXISTS:w,PROPER:w&&"something"===function(){}.name,CONFIGURABLE:w&&(!K||T(Ma,"name").configurable)},K=as,T=ma,mu=g(Function.toString),Ma=(K(T.inspectSource)||(T.inspectSource=function(e){return mu(e)}),T.inspectSource),K=as,T=Ma,Eu=r.WeakMap,K=K(Eu)&&/native code/.test(T(Eu)),T=E.exports,wu=vs,bu=T("keys"),Eu={},E=g,Tu=us,_u=b,Nu=Ea,T=ma,Ou=ws,Iu=Eu,Au="Object already initialized",Su=r.TypeError,Pu=r.WeakMap,K=(ks=K||T.state?(Ps=T.state||(T.state=new Pu),Rs=E(Ps.get),Ms=E(Ps.has),Cs=E(Ps.set),xs=function(e,t){if(Ms(Ps,e))throw new Su(Au);return t.facade=e,Cs(Ps,e,t),t},Us=function(e){return Rs(Ps,e)||{}},function(e){return Ms(Ps,e)}):(Iu[Ds=Ou("state")]=!0,xs=function(e,t){if(Nu(e,Ds))throw new Su(Au);return t.facade=e,_u(e,Ds,t),t},Us=function(e){return Nu(e,Ds)?e[Ds]:{}},function(e){return Nu(e,Ds)}),{set:xs,get:Us,has:ks,enforce:function(e){return ks(e)?Us(e):xs(e,{})},getterFor:function(t){return function(e){if(Tu(e)&&(e=Us(e)).type===t)return e;throw Su("Incompatible receiver, "+t+" required")}}}),T=rs,Ru=as,Mu=Ea,Cu=ee,xu=w.CONFIGURABLE,Uu=Ma,ku=K.enforce,Du=K.get,Lu=Object.defineProperty,Fu=Cu&&!T(function(){return 8!==Lu(function(){},"length",{value:8}).length}),Vu=String(String).split("String"),Pu=ea.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")||xu&&e.name!==t)&&(Cu?Lu(e,"name",{value:t,configurable:!0}):e.name=t),Fu&&r&&Mu(r,"arity")&&e.length!==r.arity&&Lu(e,"length",{value:r.arity});try{r&&Mu(r,"constructor")&&r.constructor?Cu&&Lu(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=ku(e);return Mu(r,"source")||(r.source=Vu.join("string"==typeof t?t:"")),e},ju=(Function.prototype.toString=Pu(function(){return Ru(this)&&Du(this).source||Uu(this)},"toString"),as),Bu=Pa,Hu=ea.exports,Ku=hs,E={},Gu=Math.ceil,zu=Math.floor,Ju=Math.trunc||function(e){e=+e;return(0<e?zu:Gu)(e)},Yu=Ts,Wu=Math.max,qu=Math.min,$u=Ts,Xu=Math.min,Zu=function(e){return 0<e?Xu($u(e),9007199254740991):0},Qu=ss,ec=_s,tc=Ns,Iu={includes:Os(!0),indexOf:Os(!1)},Ou=g,rc=Ea,nc=ss,ic=Iu.indexOf,oc=Eu,sc=Ou([].push),T=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ac=Is,uc=T.concat("length","prototype"),Pu=(E.f=Object.getOwnPropertyNames||function(e){return ac(e,uc)},{}),Ou=(Pu.f=Object.getOwnPropertySymbols,cs),cc=E,pc=Pu,lc=Es,fc=g([].concat),Pu=Ou("Reflect","ownKeys")||function(e){var t=cc.f(lc(e)),r=pc.f;return r?fc(t,r(e)):t},hc=Ea,dc=Pu,vc=e,yc=Pa,gc=rs,mc=as,Ec=/#|\.prototype\./,wc=Ss.normalize=function(e){return String(e).replace(Ec,".").toLowerCase()},bc=Ss.data={},Tc=Ss.NATIVE="N",_c=Ss.POLYFILL="P",Ou=Ss,Nc=r,Oc=e.f,Ic=b,Ac=bs,Sc=hs,Pc=As,Rc=Ou,Pu=!rs(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Mc=Ea,Cc=as,xc=ds,Uc=ws("IE_PROTO"),kc=Object,Dc=kc.prototype,Pu=Pu?kc.getPrototypeOf:function(e){e=xc(e);if(Mc(e,Uc))return e[Uc];var t=e.constructor;return Cc(t)&&e instanceof t?t.prototype:e instanceof kc?Dc:null},Lc=as,Fc=String,Vc=TypeError,jc=g,Bc=Es,Hc=function(e){if("object"==typeof e||Lc(e))return e;throw Vc("Can't set "+Fc(e)+" as a prototype")},Kc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=jc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Bc(e),Hc(t),n?r(e,t):e.__proto__=t,e}}():void 0),Gc={},zc=Is,Jc=T,_=Object.keys||function(e){return zc(e,Jc)},Yc=Pa,Wc=Es,qc=ss,$c=_;Gc.f=ee&&!Oa?Object.defineProperties:function(e,t){Wc(e);for(var r,n=qc(t),i=$c(t),o=i.length,s=0;s<o;)Yc.f(e,r=i[s++],n[r]);return e};function Xc(){}function Zc(e){e.write(Ep("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Qc(e,t){return Ap(e),void 0===t?e:Sp?Pp(e,t):function(){return e.apply(t,arguments)}}function ep(e){return void 0!==e&&(Rp.Array===e||Cp[Mp]===e)}function tp(e){if(null!=e)return Vp(e,Bp)||Vp(e,"@@iterator")||jp[Fp(e)]}function rp(e,t){if(t=arguments.length<2?Jp(e):t,Kp(t))return Gp(Hp(t,e));throw Yp(zp(e)+" is not iterable")}function np(e,t,r){var n,i;qp(e);try{if(!(n=$p(e,"return"))){if("throw"===t)throw r;return r}n=Wp(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return qp(n),r}function ip(e,t){this.stopped=e,this.result=t}function op(e,t,r){function n(e){return o&&sl(o,"normal",e),new ip(!0,e)}function i(e){return f?(Qp(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,p,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Xp(t,l);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=ol(e)))throw al(el(e)+" is not iterable");if(tl(r)){for(s=0,a=rl(e);s<a;s++)if((u=i(e[s]))&&nl(ul,u))return u;return new ip(!1)}o=il(e,r)}for(c=(h?e:o).next;!(p=Zp(c,o)).done;){try{u=i(p.value)}catch(e){sl(o,"throw",e)}if("object"==typeof u&&u&&nl(ul,u))return u}return new ip(!1)}function sp(e){if("Symbol"===cl(e))throw TypeError("Cannot convert a Symbol value to a string");return pl(e)}function ap(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=hl(Sl,this);return vl?r=vl(new Il,i?dl(this):Sl):(r=i?this:gl(Sl),ml(r,Ol,"Error")),void 0!==t&&ml(r,"message",_l(t)),Nl&&ml(r,"stack",wl(r.stack,1)),bl(r,n),Tl(e,Al,{that:i=[]}),ml(r,"errors",i),r}function up(e){Rl[Pl][e]=!0}var cp,pp,_=cs("document","documentElement"),lp=Es,fp=Gc,hp=T,Oa=Eu,dp=_,vp=ms,yp="prototype",gp="script",mp=ws("IE_PROTO"),Ep=function(e){return"<"+gp+">"+e+"</"+gp+">"},wp=function(){try{cp=new ActiveXObject("htmlfile")}catch(e){}wp="undefined"==typeof document||document.domain&&cp?Zc(cp):(e=vp("iframe"),t="java"+gp+":",e.style.display="none",dp.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(Ep("document.F=Object")),t.close(),t.F);for(var e,t,r=hp.length;r--;)delete wp[yp][hp[r]];return wp()},Gc=(Oa[mp]=!0,Object.create||function(e,t){var r;return null!==e?(Xc[yp]=lp(e),r=new Xc,Xc[yp]=null,r[mp]=e):r=wp(),void 0===t?r:fp.f(r,t)}),bp=Error,Tp=g("".replace),T=String(bp("zxcasd").stack),_p=/\n\s*at [^:]*:[^\n]*/,Np=_p.test(T),Op=us,Ip=b,Ap=ls,Sp=t,Pp=g(g.bind),Oa={},Rp=Oa,Mp=ys("iterator"),Cp=Array.prototype,T={},T=(T[ys("toStringTag")]="z","[object z]"===String(T)),N=T,xp=as,Up=is,kp=ys("toStringTag"),Dp=Object,Lp="Arguments"==Up(function(){return arguments}()),N=N?Up: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=Dp(e),kp))?t:Lp?Up(e):"Object"==(t=Up(e))&&xp(e.callee)?"Arguments":t},Fp=N,Vp=fs,jp=Oa,Bp=ys("iterator"),Hp=G,Kp=ls,Gp=Es,zp=ps,Jp=tp,Yp=TypeError,Wp=G,qp=Es,$p=fs,Xp=Qc,Zp=G,Qp=Es,el=ps,tl=ep,rl=Ns,nl=m,il=rp,ol=tp,sl=np,al=TypeError,ul=ip.prototype,cl=N,pl=String,ll=sp,fl=ns,O=!rs(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",fl(1,7)),7!==e.stack)}),I=y,hl=m,dl=Pu,vl=Kc,yl=As,gl=Gc,ml=b,El=ns,wl=function(e,t){if(Np&&"string"==typeof e&&!bp.prepareStackTrace)for(;t--;)e=Tp(e,_p,"");return e},bl=function(e,t){Op(t)&&"cause"in t&&Ip(e,"cause",t.cause)},Tl=op,_l=function(e,t){return void 0===e?arguments.length<2?"":t:ll(e)},Nl=O,Ol=ys("toStringTag"),Il=Error,Al=[].push,Sl=(vl?vl(ap,Il):yl(ap,Il,{name:!0}),ap.prototype=gl(Il.prototype,{constructor:El(1,ap),message:El(1,""),name:El(1,"AggregateError")})),O=(I({global:!0,constructor:!0,arity:2},{AggregateError:ap}),ys),yl=Gc,El=Pa.f,Pl=O("unscopables"),Rl=Array.prototype,I=(null==Rl[Pl]&&El(Rl,Pl,{configurable:!0,value:yl(null)}),rs),O=as,El=Pu,yl=bs,Ml=ys("iterator"),A=!1;[].keys&&("next"in(S=[].keys())?(El=El(El(S)))!==Object.prototype&&(pp=El):A=!0);function Cl(e,t,r){(e=e&&!r?e.prototype:e)&&!Ll(e,Fl)&&Dl(e,Fl,{configurable:!0,value:t})}function xl(){return this}function Ul(){return this}function kl(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!nf&&e in l)return l[e];switch(e){case"keys":case sf:case af:return function(){return new r(this,e)}}return function(){return new r(this)}}Yl(r,t,n);var u,c,n=t+" Iterator",p=!1,l=e.prototype,f=l[of]||l["@@iterator"]||i&&l[i],h=!nf&&f||a(i),d="Array"==t&&l.entries||f;if(d&&(d=Wl(d.call(new e)))!==Object.prototype&&d.next&&(Wl(d)!==rf&&(ql?ql(d,rf):Jl(d[of])||Zl(d,of,Ul)),$l(d,n,!0)),ef&&i==sf&&f&&f.name!==sf&&(tf?Xl(l,"name",sf):(p=!0,h=function(){return zl(f,this)})),i)if(u={values:a(sf),keys:o?h:a("keys"),entries:a(af)},s)for(c in u)!nf&&!p&&c in l||Zl(l,c,u[c]);else Gl({target:t,proto:!0,forced:nf||p},u);return l[of]!==h&&Zl(l,of,h,{name:i}),Ql[t]=h,u}O((pp=null==pp||I(function(){var e={};return pp[Ml].call(e)!==e})?{}:pp)[Ml])||yl(pp,Ml,function(){return this});var S={IteratorPrototype:pp,BUGGY_SAFARI_ITERATORS:A},Dl=Pa.f,Ll=Ea,Fl=ys("toStringTag"),Vl=S.IteratorPrototype,jl=Gc,Bl=ns,Hl=Cl,Kl=Oa,Gl=y,zl=G,Jl=as,Yl=function(e,t,r,n){t+=" Iterator";return e.prototype=jl(Vl,{next:Bl(+!n,r)}),Hl(e,t,!1),Kl[t]=xl,e},Wl=Pu,ql=Kc,$l=Cl,Xl=b,Zl=bs,El=ys,Ql=Oa,ef=w.PROPER,tf=w.CONFIGURABLE,rf=S.IteratorPrototype,nf=S.BUGGY_SAFARI_ITERATORS,of=El("iterator"),sf="values",af="entries",uf=ss,O=up,I=Oa,yl=K,A=Pa.f,w=kl,S=ee,cf="Array Iterator",pf=yl.set,lf=yl.getterFor(cf),El=w(Array,"Array",function(e,t){pf(this,{type:cf,target:uf(e),index:0,kind:t})},function(){var e=lf(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"),Oa=I.Arguments=I.Array;if(O("keys"),O("values"),O("entries"),S&&"values"!==Oa.name)try{A(Oa,"name",{value:"values"})}catch(e){}var ff=N;T||bs(Object.prototype,"toString",T?{}.toString:function(){return"[object "+ff(this)+"]"},{unsafe:!0});function hf(e){var e=bf(e),t=Tf.f;_f&&e&&!e[Nf]&&t(e,Nf,{configurable:!0,get:function(){return this}})}function df(e,t){if(Of(t,e))return e;throw If("Incorrect invocation")}function vf(){}function yf(e){if(!Af(e))return!1;try{return Mf(vf,Rf,e),!0}catch(e){return!1}}function gf(e){if(!Af(e))return!1;switch(Sf(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Uf||!!xf(Cf,Pf(e))}catch(e){return!0}}function mf(e,t){return void 0===(e=Ff(e).constructor)||null==(e=Ff(e)[jf])?t:Vf(e)}var Ef,wf,yl="process"==is(r.process),bf=cs,Tf=Pa,_f=ee,Nf=ys("species"),Of=m,If=TypeError,w=g,I=rs,Af=as,Sf=N,Pf=Ma,Rf=[],Mf=cs("Reflect","construct"),Cf=/^\s*(?:class|function)\b/,xf=w(Cf.exec),Uf=!Cf.exec(vf),O=(gf.sham=!0,!Mf||I(function(){var e;return yf(yf.call)||!yf(Object)||!yf(function(){e=!0})||e})?gf:yf),kf=O,Df=ps,Lf=TypeError,Ff=Es,Vf=function(e){if(kf(e))return e;throw Lf(Df(e)+" is not a constructor")},jf=ys("species"),S=Function.prototype,Bf=S.apply,Hf=S.call,A="object"==typeof Reflect&&Reflect.apply||(t?Hf.bind(Bf):function(){return Hf.apply(Bf,arguments)}),Oa=g([].slice),Kf=TypeError,T=/(?:ipad|iphone|ipod).*applewebkit/i.test(Qs),Gf=r,zf=A,m=Qc,Jf=as,Yf=Ea,N=rs,Wf=_,qf=Oa,$f=ms,Xf=function(e,t){if(e<t)throw Kf("Not enough arguments");return e},w=T,I=yl,S=Gf.setImmediate,t=Gf.clearImmediate,Zf=Gf.process,Qf=Gf.Dispatch,eh=Gf.Function,_=Gf.MessageChannel,th=Gf.String,rh=0,nh={},ih="onreadystatechange";try{Ef=Gf.location}catch(e){}function oh(e){return function(){Th(e)}}function sh(e){Th(e.data)}function ah(e){Gf.postMessage(th(e),Ef.protocol+"//"+Ef.host)}function uh(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function ch(){this.head=null,this.tail=null}function ph(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=kh(r),this.reject=kh(n)}function lh(e,t){var r,n,i,o,s=t.value,a=t.state==cd,u=a?e.ok:e.fail,c=e.resolve,p=e.reject,l=e.domain;try{u?(a||(t.rejection===fd&&(o=t,Fh(Gh,Lh,function(){var e=o.facade;Dh?nd.emit("rejectionHandled",e):vd(ud,e,o.value)})),t.rejection=ld),!0===u?r=s:(l&&l.enter(),r=u(s),l&&(l.exit(),i=!0)),r===e.promise?p(td("Promise-chain cycle")):(n=hd(r))?Fh(n,r,c,p):c(r)):p(s)}catch(e){l&&!i&&l.exit(),p(e)}}var fh,hh,dh,vh,yh,gh,mh,Eh,wh,bh,Th=function(e){var t;Yf(nh,e)&&(t=nh[e],delete nh[e],t())},_=(S&&t||(S=function(e){Xf(arguments.length,1);var t=Jf(e)?e:eh(e),r=qf(arguments,1);return nh[++rh]=function(){zf(t,void 0,r)},wf(rh),rh},t=function(e){delete nh[e]},I?wf=function(e){Zf.nextTick(oh(e))}:Qf&&Qf.now?wf=function(e){Qf.now(oh(e))}:_&&!w?(w=(I=new _).port2,I.port1.onmessage=sh,wf=m(w.postMessage,w)):Gf.addEventListener&&Jf(Gf.postMessage)&&!Gf.importScripts&&Ef&&"file:"!==Ef.protocol&&!N(ah)?(wf=ah,Gf.addEventListener("message",sh,!1)):wf=ih in $f("script")?function(e){Wf.appendChild($f("script"))[ih]=function(){Wf.removeChild(this),Th(e)}}:function(e){setTimeout(oh(e),0)}),{set:S,clear:t}),I=r,m=/ipad|iphone|ipod/i.test(Qs)&&void 0!==I.Pebble,w=/web0s(?!.*chrome)/i.test(Qs),N=r,S=Qc,t=e.f,_h=_.set,I=T,e=m,T=w,Nh=yl,m=N.MutationObserver||N.WebKitMutationObserver,w=N.document,Oh=N.process,P=N.Promise,t=t(N,"queueMicrotask"),t=t&&t.value,T=(t||(fh=function(){var e,t;for(Nh&&(e=Oh.domain)&&e.exit();hh;){t=hh.fn,hh=hh.next;try{t()}catch(e){throw hh?vh():dh=void 0,e}}dh=void 0,e&&e.enter()},vh=I||Nh||T||!m||!w?!e&&P&&P.resolve?((I=P.resolve(void 0)).constructor=P,mh=S(I.then,I),function(){mh(fh)}):Nh?function(){Oh.nextTick(fh)}:(_h=S(_h,N),function(){_h(fh)}):(yh=!0,gh=w.createTextNode(""),new m(fh).observe(gh,{characterData:!0}),function(){gh.data=yh=!yh})),t||function(e){e={fn:e,next:void 0};dh&&(dh.next=e),hh||(hh=e,vh()),dh=e}),Ih=r,e=(ch.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}},ch),P=r.Promise,I="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,S=!I&&!yl&&"object"==typeof window&&"object"==typeof document,N=r,Ah=P,w=as,m=Ou,Sh=Ma,t=ys,Ph=S,Rh=I,Mh=ta,Ch=(Ah&&Ah.prototype,t("species")),xh=!1,Uh=w(N.PromiseRejectionEvent),Ma={CONSTRUCTOR:m("Promise",function(){var e=Sh(Ah),t=e!==String(Ah);if(!t&&66===Mh)return!0;if(!Mh||Mh<51||!/native code/.test(e)){var e=new Ah(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Ch]=r,!(xh=e.then(function(){})instanceof r))return!0}return!t&&(Ph||Rh)&&!Uh}),REJECTION_EVENT:Uh,SUBCLASSING:xh},S={},kh=ls,I=(S.f=function(e){return new ph(e)},y),Dh=yl,Lh=r,Fh=G,t=bs,w=Kc,N=Cl,m=hf,Vh=ls,jh=as,Bh=us,Hh=df,Kh=mf,Gh=_.set,zh=T,Jh=function(e,t){var r=Ih.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},Yh=uh,Wh=e,_=K,T=P,e=S,qh="Promise",R=Ma.CONSTRUCTOR,$h=Ma.REJECTION_EVENT,M=Ma.SUBCLASSING,Xh=_.getterFor(qh),Zh=_.set,_=T&&T.prototype,Qh=T,ed=_,td=Lh.TypeError,rd=Lh.document,nd=Lh.process,id=e.f,od=id,sd=!!(rd&&rd.createEvent&&Lh.dispatchEvent),ad="unhandledrejection",ud="rejectionhandled",cd=1,pd=2,ld=1,fd=2,hd=function(e){var t;return!(!Bh(e)||!jh(t=e.then))&&t},dd=function(r,i){r.notified||(r.notified=!0,zh(function(){for(var e,n,t=r.reactions;e=t.get();)lh(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Fh(Gh,Lh,function(){var e=n.facade,t=n.value,r=yd(n);if(r&&(r=Yh(function(){Dh?nd.emit("unhandledRejection",t,e):vd(ad,e,t)}),n.rejection=Dh||yd(n)?fd:ld,r.error))throw r.value}))}))},vd=function(e,t,r){var n;sd?((n=rd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Lh.dispatchEvent(n)):n={promise:t,reason:r},!$h&&(t=Lh["on"+e])?t(n):e===ad&&Jh("Unhandled promise rejection",r)},yd=function(e){return e.rejection!==ld&&!e.parent},gd=function(t,r,n){return function(e){t(r,e,n)}},md=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=pd,dd(e,!0))},Ed=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw td("Promise can't be resolved itself");var n=hd(e);n?zh(function(){var t={done:!1};try{Fh(n,e,gd(Ed,t,r),gd(md,t,r))}catch(e){md(t,e,r)}}):(r.value=e,r.state=cd,dd(r,!1))}catch(e){md({done:!1},e,r)}}};if(R&&(ed=(Qh=function(e){Hh(this,ed),Vh(e),Fh(Eh,this);var t=Xh(this);try{e(gd(Ed,t),gd(md,t))}catch(e){md(t,e)}}).prototype,(Eh=function(e){Zh(this,{type:qh,done:!1,notified:!1,parent:!1,reactions:new Wh,rejection:!1,state:0,value:void 0})}).prototype=t(ed,"then",function(e,t){var r=Xh(this),n=id(Kh(this,Qh));return r.parent=!0,n.ok=!jh(e)||e,n.fail=jh(t)&&t,n.domain=Dh?nd.domain:void 0,0==r.state?r.reactions.add(n):zh(function(){lh(n,r)}),n.promise}),wh=function(){var e=new Eh,t=Xh(e);this.promise=e,this.resolve=gd(Ed,t),this.reject=gd(md,t)},e.f=id=function(e){return e===Qh||void 0===e?new wh:od(e)},jh(T)&&_!==Object.prototype)){bh=_.then,M||t(_,"then",function(e,t){var r=this;return new Qh(function(e,t){Fh(bh,r,e,t)}).then(e,t)},{unsafe:!0});try{delete _.constructor}catch(e){}w&&w(_,ed)}I({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:Qh}),N(Qh,qh,!1),m(qh);var wd=ys("iterator"),bd=!1;try{var Td=0,C={next:function(){return{done:!!Td++}},return:function(){bd=!0}};C[wd]=function(){return this},Array.from(C,function(){throw 2})}catch(e){}function _d(e,t){if(!t&&!bd)return!1;var r=!1;try{var n={};n[wd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var Nd=P,e=_d,T=Ma.CONSTRUCTOR||!e(function(e){Nd.all(e).then(void 0,function(){})}),Od=G,Id=ls,Ad=S,Sd=uh,Pd=op,M=(y({target:"Promise",stat:!0,forced:T},{all:function(e){var a=this,t=Ad.f(a),u=t.resolve,c=t.reject,r=Sd(function(){var n=Id(a.resolve),i=[],o=0,s=1;Pd(e,function(e){var t=o++,r=!1;s++,Od(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),t=P,w=cs,_=as,I=bs,R=t&&t.prototype;M({target:"Promise",proto:!0,forced:Ma.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),_(t)&&(N=w("Promise").prototype.catch,R.catch!==N&&I(R,"catch",N,{unsafe:!0}));var Rd=G,Md=ls,Cd=S,xd=uh,Ud=op;y({target:"Promise",stat:!0,forced:T},{race:function(e){var r=this,n=Cd.f(r),i=n.reject,t=xd(function(){var t=Md(r.resolve);Ud(e,function(e){Rd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function kd(e,t){return Fd(e),Vd(t)&&t.constructor===e?t:((0,(e=jd.f(e)).resolve)(t),e.promise)}var Dd=G,Ld=S,Fd=(y({target:"Promise",stat:!0,forced:Ma.CONSTRUCTOR},{reject:function(e){var t=Ld.f(this);return Dd(t.reject,void 0,e),t.promise}}),Es),Vd=us,jd=S,m=y,C=cs,e=Ma.CONSTRUCTOR,Bd=kd;C("Promise"),m({target:"Promise",stat:!0,forced:e},{resolve:function(e){return Bd(this,e)}});var Hd=G,Kd=ls,Gd=S,zd=uh,Jd=op;y({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Gd.f(a),u=t.resolve,r=t.reject,n=zd(function(){var n=Kd(a.resolve),i=[],o=0,s=1;Jd(e,function(e){var t=o++,r=!1;s++,Hd(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 Yd(i){return function(e,t){var r,e=av(uv(e)),t=sv(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=pv(e,t))<55296||56319<r||t+1===n||(n=pv(e,t+1))<56320||57343<n?i?cv(e,t):r:i?lv(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Wd=G,qd=ls,$d=cs,Xd=S,Zd=uh,Qd=op,ev="No one promise resolved",M=(y({target:"Promise",stat:!0},{any:function(e){var u=this,c=$d("AggregateError"),t=Xd.f(u),p=t.resolve,l=t.reject,r=Zd(function(){var n=qd(u.resolve),i=[],o=0,s=1,a=!1;Qd(e,function(e){var t=o++,r=!1;s++,Wd(n,u,e).then(function(e){r||a||(a=!0,p(e))},function(e){r||a||(r=!0,i[t]=e,--s||l(new c(i,ev)))})}),--s||l(new c(i,ev))});return r.error&&l(r.value),t.promise}}),y),_=P,t=rs,tv=cs,rv=as,nv=mf,iv=kd,w=bs,ov=_&&_.prototype,R=(M({target:"Promise",proto:!0,real:!0,forced:!!_&&t(function(){ov.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=nv(this,tv("Promise")),e=rv(t);return this.then(e?function(e){return iv(r,t()).then(function(){return e})}:t,e?function(e){return iv(r,t()).then(function(){throw e})}:t)}}),rv(_)&&(I=tv("Promise").prototype.finally,ov.finally!==I&&w(ov,"finally",I,{unsafe:!0})),g),sv=Ts,av=sp,uv=os,cv=R("".charAt),pv=R("".charCodeAt),lv=R("".slice),fv={codeAt:Yd(!1),charAt:Yd(!0)}.charAt,hv=sp,N=K,T=kl,dv="String Iterator",vv=N.set,yv=N.getterFor(dv);T(String,"String",function(e){vv(this,{type:dv,string:hv(e),index:0})},function(){var e=yv(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=fv(t,r),e.index+=t.length,{value:t,done:!1})});function gv(t,e){if(t){if(t[_v]!==Ov)try{Tv(t,_v,Ov)}catch(e){t[_v]=Ov}if(t[Nv]||Tv(t,Nv,e),wv[e])for(var r in bv)if(t[r]!==bv[r])try{Tv(t,r,bv[r])}catch(e){t[r]=bv[r]}}}var mv,Ma=r,C=Ma.Promise,m=ms("span").classList,e=m&&m.constructor&&m.constructor.prototype,P=e===Object.prototype?void 0:e,Ev=r,wv={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},M=P,bv=El,Tv=b,t=ys,_v=t("iterator"),Nv=t("toStringTag"),Ov=bv.values;for(mv in wv)gv(Ev[mv]&&Ev[mv].prototype,mv);gv(M,"DOMTokenList");var _,w,I=w=_=C,R,Iv=S,Av=uh,Sv=((R=y)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Iv.f(this),e=Av(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),Es),Pv=np,Rv=gs,Mv=Pa,Cv=ns,N,xv=Qc,Uv=G,kv=ds,Dv=function(t,e,r,n){try{return n?e(Sv(r)[0],r[1]):e(r)}catch(e){Pv(t,"throw",e)}},Lv=ep,Fv=O,Vv=Ns,jv=N=function(e,t,r){t=Rv(t);t in e?Mv.f(e,t,Cv(0,r)):e[t]=r},Bv=rp,Hv=tp,Kv=Array,T=y,m=function(e){var t,r,n,i,o,s,a=kv(e),e=Fv(this),u=arguments.length,c=1<u?arguments[1]:void 0,p=void 0!==c,u=(p&&(c=xv(c,2<u?arguments[2]:void 0)),Hv(a)),l=0;if(!u||this===Kv&&Lv(u))for(t=Vv(a),r=e?new this(t):Kv(t);l<t;l++)s=p?c(a[l],l):a[l],jv(r,l,s);else for(o=(i=Bv(a,u)).next,r=e?new this:[];!(n=Uv(o,i)).done;l++)s=p?Dv(i,c,[n.value,l],!0):n.value,jv(r,l,s);return r.length=l,r},e,P=!(e=_d)(function(e){Array.from(e)}),Gv=(T({target:"Array",stat:!0,forced:P},{from:m}),is),El=Array.isArray||function(e){return"Array"==Gv(e)},b,t,M=((b=y)({target:"Array",stat:!0},{isArray:t=El}),y),C=rs,zv=O,Jv=N,Yv=Array,_=C(function(){function e(){}return!(Yv.of.call(e)instanceof e)}),Wv=(M({target:"Array",stat:!0,forced:_},{of:function(){for(var e=0,t=arguments.length,r=new(zv(this)?this:Yv)(t);e<t;)Jv(r,e,arguments[e++]);return r.length=t,r}}),ds),qv=Ns,$v=Ts,w=up,Xv=(y({target:"Array",proto:!0},{at:function(e){var t=Wv(this),r=qv(t),e=$v(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),w("at"),TypeError),I=function(e){if(9007199254740991<e)throw Xv("Maximum allowed index exceeded");return e},Zv=El,Qv=O,ey=us,ty=ys("species"),ry=Array,ny=function(e){var t;return Zv(e)&&(t=e.constructor,(Qv(t)&&(t===ry||Zv(t.prototype))||ey(t)&&null===(t=t[ty]))&&(t=void 0)),void 0===t?ry:t},S=function(e,t){return new(ny(e))(0===t?0:t)},iy=rs,oy=ta,sy=ys("species"),R,e=y,T=rs,ay=El,uy=us,cy=ds,py=Ns,ly=I,fy=N,hy=S,P=R=function(t){return 51<=oy||!iy(function(){var e=[];return(e.constructor={})[sy]=function(){return{foo:1}},1!==e[t](Boolean).foo})},m=ta,dy=ys("isConcatSpreadable"),b=51<=m||!T(function(){var e=[];return e[dy]=!1,e.concat()[0]!==e}),t=P("concat"),vy=(e({target:"Array",proto:!0,arity:1,forced:!b||!t},{concat:function(e){for(var t,r,n,i=cy(this),o=hy(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!uy(e))return!1;var t=e[dy];return void 0!==t?!!t:ay(e)}(n=-1===a?i:arguments[a]))for(r=py(n),ly(s+r),t=0;t<r;t++,s++)t in n&&fy(o,s,n[t]);else ly(s+1),fy(o,s++,n);return o.length=s,o}}),ps),yy=TypeError,C,gy=ds,my=_s,Ey=Ns,wy=C=function(e,t){if(!delete e[t])throw yy("Cannot delete property "+vy(t)+" of "+vy(e))},by=Math.min,M=up,Ty=(y({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=gy(this),n=Ey(r),i=my(e,n),o=my(t,n),e=2<arguments.length?arguments[2]:void 0,s=by((void 0===e?n:my(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]:wy(r,i),i+=a,o+=a;return r}}),M("copyWithin"),Qc),_y=Vs,Ny=ds,Oy=Ns,Iy=S,Ay=g([].push),_,w={forEach:(_=function(f){var h=1==f,d=2==f,v=3==f,y=4==f,g=6==f,m=7==f,E=5==f||g;return function(e,t,r,n){for(var i,o,s=Ny(e),a=_y(s),u=Ty(t,r),c=Oy(a),p=0,t=n||Iy,l=h?t(e,c):d||m?t(e,0):void 0;p<c;p++)if((E||p in a)&&(o=u(i=a[p],p,s),f))if(h)l[p]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return p;case 2:Ay(l,i)}else switch(f){case 4:return!1;case 7:Ay(l,i)}return g?-1:v||y?y:l}})(0),map:_(1),filter:_(2),some:_(3),every:_(4),find:_(5),findIndex:_(6),filterReject:_(7)},Sy=rs,m=function(e,t){var r=[][e];return!!r&&Sy(function(){r.call(null,t||function(){return 1},1)})},T=y,Py=w.every,Ry=(T({target:"Array",proto:!0,forced:!m("every")},{every:function(e){return Py(this,e,1<arguments.length?arguments[1]:void 0)}}),ds),My=_s,Cy=Ns,P=up,e=(y({target:"Array",proto:!0},{fill:function(e){for(var t=Ry(this),r=Cy(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}}),P("fill"),y),xy=w.filter,b=(e({target:"Array",proto:!0,forced:!R("filter")},{filter:function(e){return xy(this,e,1<arguments.length?arguments[1]:void 0)}}),y),Uy=w.find,t=up,M,ky=!0,_=((M="find")in[]&&Array(1)[M](function(){ky=!1}),b({target:"Array",proto:!0,forced:ky},{find:function(e){return Uy(this,e,1<arguments.length?arguments[1]:void 0)}}),t(M),y),Dy=w.findIndex,T=up,P,Ly=!0,Fy=((P="findIndex")in[]&&Array(1)[P](function(){Ly=!1}),_({target:"Array",proto:!0,forced:Ly},{findIndex:function(e){return Dy(this,e,1<arguments.length?arguments[1]:void 0)}}),T(P),Qc),Vy=Vs,jy=ds,By=Ns,e,b={findLast:(e=function(u){var c=1==u;return function(e,t,r){for(var n,i=jy(e),o=Vy(i),s=Fy(t,r),a=By(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:e(1)},t=y,Hy=b.findLast,M=up,_=(t({target:"Array",proto:!0},{findLast:function(e){return Hy(this,e,1<arguments.length?arguments[1]:void 0)}}),M("findLast"),y),Ky=b.findLastIndex,T=up,Gy=(_({target:"Array",proto:!0},{findLastIndex:function(e){return Ky(this,e,1<arguments.length?arguments[1]:void 0)}}),T("findLastIndex"),El),zy=Ns,Jy=I,Yy=Qc,Wy=function(e,t,r,n,i,o,s,a){for(var u,c,p=i,l=0,f=!!s&&Yy(s,a);l<n;)l in r&&(u=f?f(r[l],l,t):r[l],0<o&&Gy(u)?(c=zy(u),p=Wy(e,t,u,c,p,o-1)-1):(Jy(p+1),e[p]=u),p++),l++;return p},P,qy=P=Wy,$y=ds,Xy=Ns,Zy=Ts,Qy=S;y({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=$y(this),r=Xy(t),n=Qy(t,0);return n.length=qy(n,t,t,r,0,void 0===e?1:Zy(e)),n}});function eg(c){return function(e,t,r,n){Ig(t);var i=Ag(e),o=Sg(i),s=Pg(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 Rg("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 tg(e,t,r){for(var n=Wg(e),i=Yg(t,n),o=Yg(void 0===r?n:r,n),s=$g(Xg(o-i,0)),a=0;i<o;i++,a++)qg(s,a,e[i]);return s.length=a,s}function rg(e,t){var r=e.length,n=Qg(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 p=e,l=rg(Zg(e,0,n),t),f=rg(Zg(e,n),t),h=t,d=l.length,v=f.length,y=0,g=0;y<d||g<v;)p[y+g]=y<d&&g<v?h(l[y],f[g])<=0?l[y++]:f[g++]:y<d?l[y++]:f[g++];return p}var ng=P,ig=ls,og=ds,sg=Ns,ag=S,ug=(y({target:"Array",proto:!0},{flatMap:function(e){var t,r=og(this),n=sg(r);return ig(e),(t=ag(r,0)).length=ng(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),w.forEach),e=m("forEach")?[].forEach:function(e){return ug(this,e,1<arguments.length?arguments[1]:void 0)},t=(y({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e}),y),cg=Iu.includes,M=up,b=(t({target:"Array",proto:!0,forced:rs(function(){return!Array(1).includes()})},{includes:function(e){return cg(this,e,1<arguments.length?arguments[1]:void 0)}}),M("includes"),y),_=g,pg=Iu.indexOf,T=m,lg=_([].indexOf),fg=!!lg&&1/lg([1],1,-0)<0,P=T("indexOf"),e=(b({target:"Array",proto:!0,forced:fg||!P},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return fg?lg(this,e,t)||0:pg(this,e,t)}}),y),t=Vs,hg=ss,M=m,dg=g([].join),Iu=t!=Object,_=M("join",","),vg=(e({target:"Array",proto:!0,forced:Iu||!_},{join:function(e){return dg(hg(this),void 0===e?",":e)}}),A),yg=ss,gg=Ts,mg=Ns,T=m,Eg=Math.min,wg=[].lastIndexOf,bg=!!wg&&1/[1].lastIndexOf(1,-0)<0,b=T("lastIndexOf"),P=bg||!b?function(e){if(bg)return vg(wg,this,arguments)||0;var t=yg(this),r=mg(t),n=r-1;for((n=1<arguments.length?Eg(n,gg(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:wg,t=(y({target:"Array",proto:!0,forced:P!==[].lastIndexOf},{lastIndexOf:P}),y),Tg=w.map,M=(t({target:"Array",proto:!0,forced:!R("map")},{map:function(e){return Tg(this,e,1<arguments.length?arguments[1]:void 0)}}),y),_g=ds,Ng=Ns,Og=I,e=rs(function(){return 4294967297!==[].push.call({length:4294967296},1)}),Iu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Ig=(M({target:"Array",proto:!0,arity:1,forced:e||Iu},{push:function(e){var t=_g(this),r=Ng(t),n=arguments.length;Og(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),ls),Ag=ds,Sg=Vs,Pg=Ns,Rg=TypeError,_={left:eg(!1),right:eg(!0)},A=y,Mg=_.left,T=ta,b=yl,P=(A({target:"Array",proto:!0,forced:!m("reduce")||!b&&79<T&&T<83},{reduce:function(e){var t=arguments.length;return Mg(this,e,t,1<t?arguments[1]:void 0)}}),y),Cg=_.right,t=ta,M=yl,e=(P({target:"Array",proto:!0,forced:!m("reduceRight")||!M&&79<t&&t<83},{reduceRight:function(e){return Cg(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),y),xg=El,Ug=g([].reverse),Iu=[1,2],A=(e({target:"Array",proto:!0,forced:String(Iu)===String(Iu.reverse())},{reverse:function(){return xg(this)&&(this.length=this.length),Ug(this)}}),y),kg=El,Dg=O,Lg=us,Fg=_s,Vg=Ns,jg=ss,Bg=N,b=ys,Hg=Oa,T=R("slice"),Kg=b("species"),Gg=Array,zg=Math.max,_=(A({target:"Array",proto:!0,forced:!T},{slice:function(e,t){var r,n,i,o=jg(this),s=Vg(o),a=Fg(e,s),u=Fg(void 0===t?s:t,s);if(kg(o)&&(r=o.constructor,(r=Dg(r)&&(r===Gg||kg(r.prototype))||Lg(r)&&null===(r=r[Kg])?void 0:r)===Gg||void 0===r))return Hg(o,a,u);for(n=new(void 0===r?Gg:r)(zg(u-a,0)),i=0;a<u;a++,i++)a in o&&Bg(n,i,o[a]);return n.length=i,n}}),y),Jg=w.some,Yg=(_({target:"Array",proto:!0,forced:!m("some")},{some:function(e){return Jg(this,e,1<arguments.length?arguments[1]:void 0)}}),_s),Wg=Ns,qg=N,$g=Array,Xg=Math.max,Zg=tg,Qg=Math.floor,yl=rg,P=Qs.match(/firefox\/(\d+)/i),M=!!P&&+P[1],t=/MSIE|Trident/.test(Qs),e=Qs.match(/AppleWebKit\/(\d+)\./),Iu=!!e&&+e[1],Oa=y,b=g,em=ls,tm=ds,rm=Ns,nm=C,im=sp,A=rs,om=yl,T=m,sm=M,am=t,um=ta,cm=Iu,pm=[],lm=b(pm.sort),fm=b(pm.push),_=A(function(){pm.sort(void 0)}),P=A(function(){pm.sort(null)}),Qs=T("sort"),hm=!A(function(){if(um)return um<70;if(!(sm&&3<sm)){if(am)return!0;if(cm)return cm<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++)pm.push({k:e+r,v:t})}for(pm.sort(function(e,t){return t.v-e.v}),r=0;r<pm.length;r++)e=pm[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});Oa({target:"Array",proto:!0,forced:_||!P||!Qs||!hm},{sort:function(e){void 0!==e&&em(e);var t=tm(this);if(hm)return void 0===e?lm(t):lm(t,e);for(var r,n,i=[],o=rm(t),s=0;s<o;s++)s in t&&fm(i,t[s]);for(om(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:im(e)>im(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)nm(t,s++);return t}});hf("Array");var e=y,dm=ds,vm=_s,ym=Ts,gm=Ns,mm=I,Em=S,wm=N,bm=C,yl=R("splice"),Tm=Math.max,_m=Math.min;e({target:"Array",proto:!0,forced:!yl},{splice:function(e,t){var r,n,i,o,s,a,u=dm(this),c=gm(u),p=vm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-p):(r=e-2,_m(Tm(ym(t),0),c-p)),mm(c+r-n),i=Em(u,n),o=0;o<n;o++)(s=p+o)in u&&wm(i,o,u[s]);if(r<(i.length=n)){for(o=p;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:bm(u,a);for(o=c;c-n+r<o;o--)bm(u,o-1)}else if(n<r)for(o=c-n;p<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:bm(u,a);for(o=0;o<r;o++)u[o+p]=arguments[o+2];return u.length=c-n+r,i}}),up("flat");up("flatMap");var M=y,Nm=ds,Om=Ns,Im=C,Am=I,t=1!==[].unshift(0),ta=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();M({target:"Array",proto:!0,arity:1,forced:t||ta},{unshift:function(e){var t=Nm(this),r=Om(t),n=arguments.length;if(n){Am(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:Im(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});Ma.Array;var Iu={exports:{}},b={},Sm=is,Pm=ss,Rm=E.f,Mm=tg,Cm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];b.f=function(e){if(!Cm||"Window"!=Sm(e))return Rm(Pm(e));try{return Rm(e)}catch(e){return Mm(Cm)}};function xm(e){zm(e,Xm,{value:{objectID:"O"+Zm++,weakData:{}}})}function Um(e,t,r){for(var n in t)gE(e,n,t[n],r);return e}function km(e,t){for(var r=0,n=RE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Dm(e,t,r,n){for(var i,o,s,a=xE(e),u=CE(a),c=ME(t,r),p=DE(null),l=kE(u),f=0;f<l;f++)s=u[f],(o=UE(c(s,f,a)))in p?VE(p[o],s):p[o]=[s];if(n&&(i=n(a))!==FE)for(o in p)p[o]=LE(i,p[o]);return p}var T=rs(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),A=rs,Lm=us,Fm=is,Vm=T,jm=Object.isExtensible,Oa=A(function(){jm(1)})||Vm?function(e){return!!Lm(e)&&((!Vm||"ArrayBuffer"!=Fm(e))&&(!jm||jm(e)))}:jm,_=!rs(function(){return Object.isExtensible(Object.preventExtensions({}))}),Bm=y,Hm=g,P=Eu,Km=us,Gm=Ea,zm=Pa.f,Jm=E,Ym=b,Wm=Oa,qm=_,$m=!1,Xm=vs("meta"),Zm=0,Qm=Iu.exports={enable:function(){Qm.enable=function(){},$m=!0;var i=Jm.f,o=Hm([].splice),e={};e[Xm]=1,i(e).length&&(Jm.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===Xm){o(t,r,1);break}return t},Bm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Ym.f}))},fastKey:function(e,t){if(!Km(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Gm(e,Xm)){if(!Wm(e))return"F";if(!t)return"E";xm(e)}return e[Xm].objectID},getWeakData:function(e,t){if(!Gm(e,Xm)){if(!Wm(e))return!0;if(!t)return!1;xm(e)}return e[Xm].weakData},onFreeze:function(e){return qm&&$m&&Wm(e)&&!Gm(e,Xm)&&xm(e),e}},eE=(P[Xm]=!0,as),tE=us,rE=Kc,nE=y,iE=r,oE=g,sE=Ou,aE=bs,uE=Iu.exports,cE=op,pE=df,lE=as,fE=us,hE=rs,dE=_d,vE=Cl,yE=function(e,t,r){return rE&&eE(t=t.constructor)&&t!==r&&tE(t=t.prototype)&&t!==r.prototype&&rE(e,t),e},gE=bs,mE=Pa.f,EE=Gc,wE=Um,bE=Qc,TE=df,_E=op,NE=kl,OE=hf,IE=ee,AE=Iu.exports.fastKey,SE=K.set,PE=K.getterFor,RE=(function(e,t,r){function n(e){var r=oE(h[e]);aE(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(p&&!fE(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return p&&!fE(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(p&&!fE(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"),p=-1!==e.indexOf("Weak"),l=c?"set":"add",f=iE[e],h=f&&f.prototype,d=f,v={};return sE(e,!lE(f)||!(p||h.forEach&&!hE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,l),uE.enable()):sE(e,!0)&&(o=(i=new d)[l](p?{}:-0,1)!=i,s=hE(function(){i.has(1)}),a=dE(function(e){new f(e)}),u=!p&&hE(function(){for(var e=new f,t=5;t--;)e[l](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){pE(e,h);e=yE(new f,e,d);return null!=t&&cE(t,e[l],{that:e,AS_ENTRIES:c}),e})).prototype=h).constructor=d),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(l),p&&h.clear&&delete h.clear),v[e]=d,nE({global:!0,constructor:!0,forced:d!=f},v),vE(d,e),p||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=AE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),IE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=AE(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){TE(e,a),SE(e,{type:r,index:EE(null),first:void 0,last:void 0,size:0}),IE||(e.size=0),null!=t&&_E(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=PE(r);return wE(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,IE?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),IE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=bE(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)}}),wE(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)}}),IE&&mE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=PE(t),o=PE(n);NE(e,t,function(e,t){SE(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),OE(t)}}),Ns),ME=Qc,CE=Vs,xE=ds,UE=gs,kE=Ns,DE=Gc,LE=km,FE=Array,VE=g([].push),jE=Dm,Qs=up;y({target:"Array",proto:!0},{group:function(e){return jE(this,e,1<arguments.length?arguments[1]:void 0)}}),Qs("group");var BE=Dm,N=up;y({target:"Array",proto:!0,forced:!m("groupBy")},{groupBy:function(e){return BE(this,e,1<arguments.length?arguments[1]:void 0)}}),N("groupBy");function HE(e){for(var t,r,n=zE(this),i=GE(n),o=KE(e,1<arguments.length?arguments[1]:void 0),s=new YE,a=JE(i),u=0;u<a;u++)t=o(r=i[u],u,n),qE(s,t)?XE(WE(s,t),r):$E(s,t,[r]);return s}var KE=Qc,R=g,GE=Vs,zE=ds,JE=Ns,YE=cs("Map"),e=YE.prototype,WE=R(e.get),qE=R(e.has),$E=R(e.set),XE=R([].push),yl=up,C=HE;y({target:"Array",proto:!0,name:"groupToMap",forced:!m("groupByToMap")},{groupByToMap:C}),yl("groupByToMap");function ZE(e){return nw[e].prototype}var M=up,QE=(y({target:"Array",proto:!0},{groupToMap:HE}),M("groupToMap"),Ns),ew=function(e,t){for(var r=QE(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},tw=ss,t=up,rw=Array,nw=(y({target:"Array",proto:!0},{toReversed:function(){return ew(tw(this),rw)}}),t("toReversed"),r),ta=y,iw=ls,ow=ss,sw=km,Ma=up,aw=Array,uw=g(ZE("Array").sort),T=(ta({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&iw(e);var t=ow(this),t=sw(aw,t);return uw(t,e)}}),Ma("toSorted"),y),A=up,cw=I,pw=Ns,lw=_s,fw=ss,hw=Ts,dw=Array,vw=Math.max,yw=Math.min,gw=(T({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=fw(this),a=pw(s),u=lw(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,yw(vw(hw(t),0),a-u)),i=cw(a+r-n),o=dw(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}}),A("toSpliced"),Ns),mw=Ts,Ew=RangeError,ww=function(e,t,r,n){var i=gw(e),r=mw(r),o=r<0?i+r:r;if(i<=o||o<0)throw Ew("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},bw=ss,Tw=Array;y({target:"Array",proto:!0},{with:function(e,t){return ww(bw(this),Tw,e,t)}});Eu=r,Ea=ma,E=as,b=Pu,Oa=bs,_="USE_FUNCTION_CONSTRUCTOR",P=ys("asyncIterator"),Kc=Eu.AsyncIterator,Ou=Ea.AsyncIteratorPrototype;if(Ou)Bb=Ou;else if(E(Kc))Bb=Kc.prototype;else if(Ea[_]||Eu[_])try{Cb=b(b(b(Function("return async function*(){}()")()))),b(Cb)===Object.prototype&&(Bb=Cb)}catch(e){}E((Bb=Bb||{})[P])||Oa(Bb,P,function(){return this});function _w(e,t,r){var n=e.done;Mw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function Nw(e){xw(this,{type:Cw,iterator:Pw(e),next:e.next})}function Ow(e){var f=0==e,h=1==e,d=2==e,v=3==e;return function(e,s,a){var e=Xw(e),u=$w("Promise"),c=e.iterator,t=e.next,p=0,l=void 0!==s;return!l&&f||Yw(s),new u(function(r,n){var i=function(e){Zw(c,n,e,n)},o=function(){try{if(f&&l)try{qw(p)}catch(e){i(e)}u.resolve(Ww(Jw(t,c))).then(function(e){try{if(Ww(e).done)f?(a.length=p,r(a)):r(!v&&(d||void 0));else{var t=e.value;try{l?u.resolve(f?s(t,p):s(t)).then(function(e){if(h)o();else if(d)e?o():Zw(c,r,!1,n);else if(f)try{a[p++]=e,o()}catch(e){i(e)}else e?Zw(c,r,v||t,n):o()},i):(a[p++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function Iw(e,t){if(!d0||!h0(e)||!d0(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 Aw(e,t,r){return r.get&&v0(r.get,t,{getter:!0}),r.set&&v0(r.set,t,{setter:!0}),y0.f(e,t,r)}var Sw=G,Pw=Es,Iu=Gc,Rw=fs,Qs=Um,N=K,Vs=Bb,Mw=cs("Promise"),Cw="AsyncFromSyncIterator",xw=N.set,Uw=N.getterFor(Cw),e=(Nw.prototype=Qs(Iu(Vs),{next:function(){var n=Uw(this);return new Mw(function(e,t){var r=Pw(Sw(n.next,n.iterator));_w(r,e,t)})},return:function(){var n=Uw(this).iterator;return new Mw(function(e,t){var r=Rw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=Pw(Sw(r,n));_w(r,e,t)})}}),Nw),kw=G,Dw=e,Lw=Es,Fw=rp,Vw=fs,jw=ys("asyncIterator"),Bw=ls,Hw=Es,Kw=G,Gw=cs,zw=fs,Jw=G,Yw=ls,Ww=Es,qw=I,$w=cs,Xw=function(e){return{iterator:e,next:Bw(Hw(e).next)}},Zw=function(e,t,r,n){try{var i=zw(e,"return");if(i)return Gw("Promise").resolve(Kw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},R={toArray:Ow(0),forEach:Ow(1),every:Ow(2),some:Ow(3),find:Ow(4)},Qw=Qc,e0=ds,t0=O,r0=function(e,t){t=arguments.length<2?Vw(e,jw):t;return t?Lw(kw(t,e)):new Dw(Fw(e))},n0=rp,i0=tp,o0=fs,m=ZE,s0=cs,C=ys,a0=e,u0=R.toArray,c0=C("asyncIterator"),p0=m("Array").values,yl=(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(s0("Promise"))(function(e){var t=e0(o),r=(void 0!==a&&(a=Qw(a,u)),o0(t,c0)),n=r?void 0:i0(t)||p0,i=t0(s)?new s:[],r=r?r0(t,r):new a0(n0(t,n));e(u0(r,a,i))})}}),y),l0=w.filterReject,M=up,t=(yl({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return l0(this,e,1<arguments.length?arguments[1]:void 0)}}),M("filterOut"),y),f0=w.filterReject,ta=up,Ma=(t({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return f0(this,e,1<arguments.length?arguments[1]:void 0)}}),ta("filterReject"),y),h0=El,d0=Object.isFrozen,v0=(Ma({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!Iw(e,!0))return!1;var t=e.raw;return t.length===e.length&&Iw(t,!1)}}),ea.exports),y0=Pa,T=up,g0=ds,m0=Ns;ee&&(Aw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=g0(this),t=m0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=g0(this),r=m0(t);return t[0==r?0:r-1]=e}}),T("lastItem"));var A=up,E0=ds,w0=Ns;ee&&(Aw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=E0(this),e=w0(e);return 0==e?0:e-1}}),A("lastIndex"));var r=g,b0=ls,T0=Ns,_0=ds,N0=S,O0=cs("Map"),ma=O0.prototype,I0=r(ma.forEach),A0=r(ma.has),S0=r(ma.set),P0=r([].push),Pu=up;y({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=_0(this),i=T0(n),o=N0(n,0),s=new O0,a=null!=e?b0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),A0(s,r)||S0(s,r,t);return I0(s,function(e){P0(o,e)}),o}}),Pu("uniqueBy");M0.exposure=function(e,t,r,n){return new x0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},M0.track=function(e,t,r,n){return new D0(n,r,e,t)},M0.remoteConfig=function(e,t,r,n){return new V0(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[Ht.ID],identifiers:this.user.identifiers,userProperties:ke.sanitize(this.user.properties),hackleProperties:ke.sanitize(this.user.hackleProperties)}};var R0=M0;function M0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Pe(U0,C0=R0),U0.prototype.copyWithUser=function(e){return new U0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},U0.prototype.toDto=function(){return c(c({},C0.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 C0,x0=U0;function U0(e,t,r,n,i,o,s,a){e=C0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Pe(L0,k0=R0),L0.prototype.copyWithUser=function(e){return new L0(this.timestamp,e,this.eventType,this.event,this.insertId)},L0.prototype.toDto=function(){return c(c({},k0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:ke.sanitize(this.event.properties)})};var k0,D0=L0;function L0(e,t,r,n,i){e=k0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Pe(j0,F0=R0),j0.prototype.copyWithUser=function(e){return new j0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},j0.prototype.toDto=function(){return c(c({},F0.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 F0,V0=j0;function j0(e,t,r,n,i,o,s){e=F0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}H0.isSessionEvent=function(e){return!!R0.isTrackEvent(e)&&(e.event.key===H0.SESSION_START_EVENT_NAME||e.event.key===H0.SESSION_END_EVENT_NAME)},H0.prototype.onSessionStarted=function(e,t,r){this.track(H0.SESSION_START_EVENT_NAME,e,t,r)},H0.prototype.onSessionEnded=function(e,t,r){this.track(H0.SESSION_END_EVENT_NAME,e,t,r)},H0.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)},H0.prototype.decorateSession=function(e,t){t=(new zt).add(Ht.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},H0.SESSION_START_EVENT_NAME="$session_start",H0.SESSION_END_EVENT_NAME="$session_end";var B0=H0;function H0(e,t){this.userManager=e,this.core=t}G0.prototype.process=function(e){var t;B0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=e.copyWithUser(e.user),t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[Ht.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[Ht.SESSION]=t.sessionId,e))})),this.delegate.process(t))},G0.prototype.flush=function(e){this.delegate.flush(e)},G0.prototype.close=function(){this.delegate.close()},G0.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.flush(!0);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var K0=G0;function G0(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}J0.toEvent=function(e){var t;return{key:J0.EVENT_KEY,properties:{level:J0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:J0._stacktrace(e)}}},J0._stacktrace=function(e){return u.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,J0.STACK_TRACK_LIMIT).join("\n")},J0.EVENT_KEY="$trace",J0.LEVEL_ERROR="error",J0.STACK_TRACK_LIMIT=30;var z0=J0;function J0(){}Y0.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)}};Ou=Y0;function Y0(){}q0.prototype.with=function(e){return new q0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},q0.of=function(e,t,r,n){return new q0(n,t.targetEvaluations,e.experiment,r.id,r.key,r.config)},q0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return u.isNotNullOrUndefined(n)?this.of(e,t,n,r):new q0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)};var W0=q0;function q0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}Pe(Z0,$0=Ou),Z0.prototype.supports=function(e){return void 0!==e.experiment},Z0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:W0.ofDefault(e,t,l.TRAFFIC_NOT_ALLOCATED)};var $0,X0=Z0;function Z0(e){var t=$0.call(this)||this;return t.evaluationFlowFactory=e,t}eb.of=function(e,t,r,n,i,o){return o.returnValue=ke.truncateStringValue(n),new eb(i,t.targetEvaluations,e.parameter,r,n,o)},eb.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var Q0=eb;function eb(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}Pe(nb,tb=Ou),nb.prototype.supports=function(e){return void 0!==e.parameter},nb.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=ke.truncateStringValue(e.defaultValue),u.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return Q0.ofDefault(e,t,l.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return u.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,l.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,l.DEFAULT_RULE,r)},nb.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?Q0.ofDefault(e,t,l.TYPE_MISMATCH,i):Q0.of(e,t,r.id,r.rawValue,n,i)};var tb,rb=nb;function nb(e){var t=tb.call(this)||this;return t.targetRuleDeterminer=e,t}ob.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var ib=ob;function ob(e,t){this.type=e,this.id=t}ab.create=function(){return new ab},Object.defineProperty(ab.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(ab.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(ab.prototype,"properties",{get:function(){return ke.sanitize(this._properties)},enumerable:!1,configurable:!0}),ab.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},ab.prototype.addRequest=function(e){this._stack.push(e)},ab.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},ab.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof W0&&e.experiment.id===t.id})},ab.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},ab.prototype.setProperty=function(e,t){this._properties[e]=t};var sb=ab;function ab(){this._stack=[],this._targetEvaluations=[],this._properties={}}cb.of=function(e,t,r,n){return new cb(e,t,r,n)},cb.by=function(e,t){return new cb(e.workspace,e.user,t,"A")},cb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var ub=cb;function cb(e,t,r,n){this.key=new ib("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}lb.of=function(e,t,r,n,i){return new lb(e,t,r,n,i)},lb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var pb=lb;function lb(e,t,r,n,i){this.key=new ib("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}fb.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();case"boolean":return e?"true":"false";default:return}},fb.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},fb.asBoolean=function(e){switch(typeof e){case"boolean":return e;case"string":switch(e){case"true":return!0;case"false":return!1;default:return}default:return}},fb.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var x=fb;function fb(){}db.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 hb=db;function db(e){this.storages=e}yb.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},yb.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return x.asNumber(e)},yb.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=x.asNumber(t),e=x.asNumber(e);u.isNullOrUndefined(t)||t<0||u.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},yb.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},yb.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},yb.prototype.clear=function(){this.listStorage.clear()};var vb=yb;function yb(e){this.listStorage=e}mb.prototype.add=function(e){this.evaluators.push(e)},mb.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(u.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)};var gb=mb;function mb(){this.evaluators=new Array}wb.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},wb.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},wb.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var Eb=wb;function wb(e){this.conditionMatcherFactory=e}Tb.prototype.decorate=function(e){return e};var bb=Tb;function Tb(){}Nb.prototype.decorate=function(e){return"string"==typeof e?Ho.decodeURIOrOriginal(e):e};var _b=Nb;function Nb(){}Ib.prototype.matches=function(e,t,r){void 0===r&&(r=new bb);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)},Ib.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)},Ib.prototype.singleMatches=function(e,t,r,n,i){e=i.decorate(e),t=t.values.map(i.decorate);return n.matches(r,e,t)},Ib.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},Ib.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var Ob=Ib;function Ib(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}Ab.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.inMatches(r,e)})};Kc=Ab;function Ab(){}Sb.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.containsMatches(r,e)})};Ea=Sb;function Sb(){}Pb.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.startsWithMatches(r,e)})};Eu=Pb;function Pb(){}Rb.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.endsWithMatches(r,e)})};_=Rb;function Rb(){}Mb.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanMatches(r,e)})};b=Mb;function Mb(){}xb.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanOrEqualMatches(r,e)})};var Cb=xb;function xb(){}Ub.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanMatches(r,e)})};E=Ub;function Ub(){}kb.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanOrEqualMatches(r,e)})};Oa=kb;function kb(){}Db.prototype.matches=function(e,t,r){return!u.isNullOrUndefined(t)};P=Db;function Db(){}Fb.prototype.getMatcher=function(e){switch(e){case"IN":return Fb.IN_MATCHER;case"CONTAINS":return Fb.CONTAINS_MATCHER;case"STARTS_WITH":return Fb.STARTS_WITH_MATCHER;case"ENDS_WITH":return Fb.ENDS_WITH_MATCHER;case"GT":return Fb.GT_MATCHER;case"GTE":return Fb.GTE_MATCHER;case"LT":return Fb.LT_MATCHER;case"LTE":return Fb.LTE_MATCHER;case"EXISTS":return Fb.EXISTS_MATCHER}},Fb.IN_MATCHER=new Kc,Fb.CONTAINS_MATCHER=new Ea,Fb.STARTS_WITH_MATCHER=new Eu,Fb.ENDS_WITH_MATCHER=new _,Fb.GT_MATCHER=new b,Fb.GTE_MATCHER=new Cb,Fb.LT_MATCHER=new E,Fb.LTE_MATCHER=new Oa,Fb.EXISTS_MATCHER=new P;var Lb=Fb;function Fb(){}Vb.prototype.inMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},Vb.prototype.containsMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.includes(t)},Vb.prototype.startsWithMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.startsWith(t)},Vb.prototype.endsWithMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.endsWith(t)},Vb.prototype.greaterThanMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<e},Vb.prototype.greaterThanOrEqualMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<=e},Vb.prototype.lessThanMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<t},Vb.prototype.lessThanOrEqualMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<=t};Gc=Vb;function Vb(){}jb.prototype.inMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},jb.prototype.containsMatches=function(e,t){return!1},jb.prototype.startsWithMatches=function(e,t){return!1},jb.prototype.endsWithMatches=function(e,t){return!1},jb.prototype.greaterThanMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<e},jb.prototype.greaterThanOrEqualMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<=e},jb.prototype.lessThanMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<t},jb.prototype.lessThanOrEqualMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<=t};K=jb;function jb(){}Hb.prototype.inMatches=function(e,t){e=x.asBoolean(e),t=x.asBoolean(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},Hb.prototype.containsMatches=function(e,t){return!1},Hb.prototype.startsWithMatches=function(e,t){return!1},Hb.prototype.endsWithMatches=function(e,t){return!1},Hb.prototype.greaterThanMatches=function(e,t){return!1},Hb.prototype.greaterThanOrEqualMatches=function(e,t){return!1},Hb.prototype.lessThanMatches=function(e,t){return!1},Hb.prototype.lessThanOrEqualMatches=function(e,t){return!1};var Bb=Hb;function Hb(){}Kb.prototype.inMatches=function(e,t){e=mr.tryParse(e),t=mr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isEqualTo(t)},Kb.prototype.containsMatches=function(e,t){return!1},Kb.prototype.startsWithMatches=function(e,t){return!1},Kb.prototype.endsWithMatches=function(e,t){return!1},Kb.prototype.greaterThanMatches=function(e,t){e=mr.tryParse(e),t=mr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isGreaterThan(t)},Kb.prototype.greaterThanOrEqualMatches=function(e,t){e=mr.tryParse(e),t=mr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isGreaterThanOrEqualTo(t)},Kb.prototype.lessThanMatches=function(e,t){e=mr.tryParse(e),t=mr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isLessThan(t)},Kb.prototype.lessThanOrEqualMatches=function(e,t){e=mr.tryParse(e),t=mr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isLessThanOrEqualTo(t)};N=Kb;function Kb(){}Gb.prototype.inMatches=function(e,t){e=Ho.tryParse(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&Ho.decodeURIOrOriginal(Ho.removePathnameTrailingSlash(e))===Ho.decodeURIOrOriginal(Ho.removePathnameTrailingSlash(t))},Gb.prototype.containsMatches=function(e,t){e=Ho.tryParse(e),t=x.asString(t);if(u.isNullOrUndefined(e)||u.isNullOrUndefined(t))return!1;e=Ho.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))},Gb.prototype.startsWithMatches=function(e,t){e=Ho.tryParse(e),t=x.asString(t);if(u.isNullOrUndefined(e)||u.isNullOrUndefined(t))return!1;e=Ho.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))},Gb.prototype.endsWithMatches=function(e,t){return!1},Gb.prototype.greaterThanMatches=function(e,t){return!1},Gb.prototype.greaterThanOrEqualMatches=function(e,t){return!1},Gb.prototype.lessThanMatches=function(e,t){return!1},Gb.prototype.lessThanOrEqualMatches=function(e,t){return!1};Qs=Gb;function Gb(){}zb.prototype.inMatches=function(e,t){return!1},zb.prototype.containsMatches=function(e,t){return!1},zb.prototype.startsWithMatches=function(e,t){return!1},zb.prototype.endsWithMatches=function(e,t){return!1},zb.prototype.greaterThanMatches=function(e,t){return!1},zb.prototype.greaterThanOrEqualMatches=function(e,t){return!1},zb.prototype.lessThanMatches=function(e,t){return!1},zb.prototype.lessThanOrEqualMatches=function(e,t){return!1};Iu=zb;function zb(){}Yb.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return Yb.STRING_MATCHER;case"NUMBER":return Yb.NUMBER_MATCHER;case"BOOLEAN":return Yb.BOOLEAN_MATCHER;case"VERSION":return Yb.VERSION_MATCHER;case"URL":return Yb.URL_MATCHER;case"NULL":case"UNKNOWN":return Yb.NULL_MATCHER}},Yb.STRING_MATCHER=new Gc,Yb.NUMBER_MATCHER=new K,Yb.BOOLEAN_MATCHER=new Bb,Yb.VERSION_MATCHER=new N,Yb.URL_MATCHER=new Qs,Yb.NULL_MATCHER=new Iu;var Jb=Yb;function Yb(){}qb.prototype.matches=function(e,t,r){var e=this.userValueResolver.resolveOrNull(e.user,r.key),n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},qb.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?_b:bb)};var Wb=qb;function qb(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}Xb.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];default:throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var $b=Xb;function Xb(){}Qb.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}},Qb.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 Zb=Qb;function Qb(e){this.segmentMatcher=e}tT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},tT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var eT=tT;function tT(e){this.userConditionMatcher=e}nT.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);default:throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var rT=nT;function nT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}iT.prototype.matches=function(e,t,r){var n=u.requiredNotNullOrUndefined(x.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(u.isNullOrUndefined(n))return!1;var i=null!=(i=t.getEvaluation(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},iT.prototype.evaluate=function(e,t,r){r=ub.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};Vs=iT;function iT(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Pe(aT,oT=Vs),aT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},aT.prototype.resolve=function(e,t){return e instanceof ub&&t.reason===l.TRAFFIC_ALLOCATED?t.with(l.TRAFFIC_ALLOCATED_BY_TARGETING):t},aT.prototype.evaluationMatches=function(e,t){return!!aT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},aT.AB_TEST_MATCHED_REASONS=[l.OVERRIDDEN,l.TRAFFIC_ALLOCATED,l.EXPERIMENT_COMPLETED,l.TRAFFIC_ALLOCATED_BY_TARGETING];var oT,sT=aT;function aT(e,t){return oT.call(this,e,t)||this}Pe(pT,uT=Vs),pT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},pT.prototype.resolve=function(e,t){return t},pT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var uT,cT=pT;function pT(e,t){return uT.call(this,e,t)||this}fT.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return this.valueOperatorMatcher.matches(e,r.match)},fT.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var lT=fT;function fT(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}dT.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,"]"))}},dT.prototype.properties=function(e){return R0.isTrackEvent(e)?e.event.properties:R0.isExposureEvent(e)||R0.isRemoteConfigEvent(e)?e.properties:void 0};var hT=dT;function dT(){}yT.prototype.matches=function(e,t,r){if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));e=null!=(e=null==(e=e.user.cohorts)?void 0:e.map(function(e){return e.id}))?e:[];return this.valueOperatorMatcher.matches(e,r.match)};var vT=yT;function yT(e){this.valueOperatorMatcher=e}mT.prototype.supports=function(e){return"NUMBER_OF_EVENTS_IN_DAYS"===e||"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"===e},mT.prototype.matches=function(e,t,r){var n,i=r.key.type;if(!this.supports(i))throw new Error("Unsupported TargetKeyType [".concat(i,"]"));var o=null!=(n=e.user.targetEvents)?n:[];switch(i){case"NUMBER_OF_EVENTS_IN_DAYS":return new bT(this.valueOperatorMatcher,this.clock).matches(e,o,r);case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return new NT(this.valueOperatorMatcher,this.clock).matches(e,o,r);default:return i}};var gT=mT;function mT(e,t){this.valueOperatorMatcher=e,this.clock=t}function ET(){}Pe(TT,wT=ET),TT.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-Fe.daysToUnit(i.days,"milliseconds"),t=t.filter(function(e){return n.expressionMatch(e,i)}),t=f.sum(t,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(t,r.match)},TT.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&null===e.property},TT.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var wT,bT=TT;function TT(e,t){var r=wT.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}Pe(OT,_T=ET),OT.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-Fe.daysToUnit(i.days,"milliseconds"),t=t.filter(function(e){return n.expressionMatch(e,i)}),t=f.sum(t,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(t,r.match)},OT.prototype.propertyMatch=function(e,t){return(null==e?void 0:e.type)===t.key.type&&e.key===t.key.name&&this.valueOperatorMatcher.matches(e.value,t.match)},OT.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&this.propertyMatch(e.property,t.propertyFilter)},OT.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var _T,NT=OT;function OT(e,t){var r=_T.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}AT.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;case"NUMBER_OF_EVENTS_IN_DAYS":case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return this.userTargetConditionMatcher;default:return e}};var IT=AT;function AT(e,t){var r=new Ob(new Jb,new Lb);this.userConditionMatcher=new Wb(new $b,r),this.eventConditionMatcher=new lT(new hT,r),this.segmentConditionMatcher=new Zb(new eT(this.userConditionMatcher)),this.experimentConditionMatcher=new rT(new sT(e,r),new cT(e,r)),this.cohortConditionMatcher=new vT(r),this.userTargetConditionMatcher=new gT(r,t)}PT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},PT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},PT.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 ST=PT;function PT(e){this.bucketer=e}var RT={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}},MT=(CT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},CT.prototype.calculateSlotNumber=function(e,t,r){r=RT.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},CT);function CT(){}UT.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},UT.end=function(){return new UT(void 0,void 0)},UT.decision=function(e,t){return new UT(e,t)},UT.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 xT=UT;function UT(e,t){this.flowEvaluator=e,this.nextFlow=t}DT.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 W0.of(e,t,n,l.OVERRIDDEN);case"FEATURE_FLAG":return W0.of(e,t,n,l.INDIVIDUAL_TARGET_MATCH)}};var kT=DT;function DT(e){this.overrideResolver=e}FT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?W0.ofDefault(e,t,l.EXPERIMENT_DRAFT):r.evaluate(e,t)};var LT=FT;function FT(){}jT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return W0.ofDefault(e,t,l.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return W0.ofDefault(e,t,l.FEATURE_FLAG_INACTIVE)}};var VT=jT;function jT(){}HT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return W0.of(e,t,r,l.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var BT=HT;function HT(){}GT.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):W0.ofDefault(e,t,l.NOT_IN_EXPERIMENT_TARGET)};var KT=GT;function GT(e){this.experimentTargetDeterminer=e}JT.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?W0.ofDefault(e,t,l.VARIATION_DROPPED):W0.of(e,t,n,l.TRAFFIC_ALLOCATED):W0.ofDefault(e,t,l.TRAFFIC_NOT_ALLOCATED)};var zT=JT;function JT(e){this.actionResolver=e}WT.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 W0.of(e,t,r,l.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var YT=WT;function WT(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}$T.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 W0.ofDefault(e,t,l.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return W0.of(e,t,n,l.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var qT=$T;function $T(e){this.actionResolver=e}ZT.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):W0.ofDefault(e,t,l.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var XT=ZT;function ZT(e){this.containerResolver=e}e_.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):W0.ofDefault(e,t,l.IDENTIFIER_NOT_FOUND)};var QT=e_;function e_(){}r_.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 t_=r_;function r_(e){this.targetMatcher=e}i_.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var n_=i_;function i_(e){this.targetMatcher=e}s_.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},s_.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},s_.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)}},s_.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 o_=s_;function s_(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}u_.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(u.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(u.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(u.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(u.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var a_=u_;function u_(e){this.bucketer=e}p_.of=function(e,t,r,n){return new p_(r,t.targetEvaluations,e.inAppMessage,n,t.properties)};var c_=p_;function p_(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n,this.properties=i}f_.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):c_.of(e,t,l.UNSUPPORTED_PLATFORM)};var l_=f_;function f_(){}d_.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),c_.of(e,t,l.OVERRIDDEN,n)):r.evaluate(e,t)};var h_=d_;function d_(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}y_.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?c_.of(e,t,l.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var v_=y_;function y_(){}m_.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?c_.of(e,t,l.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var g_=m_;function m_(){}w_.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):c_.of(e,t,l.NOT_IN_IN_APP_MESSAGE_PERIOD)};var E_=w_;function w_(){}T_.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?c_.of(e,t,l.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var b_=T_;function T_(e){this.hiddenMatcher=e}N_.prototype.evaluate=function(e,t,r){return this.targetMatcher.matches(e,t)?r.evaluate(e,t):c_.of(e,t,l.NOT_IN_IN_APP_MESSAGE_TARGET)};var __=N_;function N_(e){this.targetMatcher=e}I_.prototype.evaluate=function(e,t,r){return this.frequencyCapMatcher.matches(e,t)?c_.of(e,t,l.IN_APP_MESSAGE_FREQUENCY_CAPPED):r.evaluate(e,t)};var O_=I_;function I_(e){this.frequencyCapMatcher=e}S_.prototype.evaluate=function(e,t,r){return"NONE"===this.inAppMessageResolver.resolve(e,t).layout.displayType?c_.of(e,t,l.EXPERIMENT_CONTROL_GROUP):r.evaluate(e,t)};var A_=S_;function S_(e){this.inAppMessageResolver=e}R_.prototype.evaluate=function(e,t,r){var n=this.inAppMessageResolver.resolve(e,t);return c_.of(e,t,l.IN_APP_MESSAGE_TARGET,n)};var P_=R_;function R_(e){this.inAppMessageResolver=e}M_.prototype.evaluateInternal=function(e,t,r){r=ub.by(e,r),r=this.evaluator.evaluate(r,t),e=this.decorate(e,t,r);return t.addEvaluation(e),e},M_.prototype.evaluate=function(e,t,r){var n;return null!=(n=t.getEvaluation(r))?n:this.evaluateInternal(e,t,r)};G=M_;function M_(e){this.evaluator=e}x_.prototype.resolve=function(t,e){var r=this.experiment(t);if(u.isNullOrUndefined(r))return this.messageSelector.select(t.inAppMessage,function(e){return e.lang===t.inAppMessage.messageContext.defaultLang});var n=this.experimentEvaluator.evaluate(t,e,r);return this.messageSelector.select(t.inAppMessage,function(e){return e.lang===t.inAppMessage.messageContext.defaultLang&&n.variationKey===e.variationKey})},x_.prototype.experiment=function(e){var t=e.inAppMessage.messageContext.experimentContext;return null===t?null:u.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(t.key),function(){return"Experiment[".concat(t.key,"]")})};var C_=x_;function x_(e,t){this.experimentEvaluator=e,this.messageSelector=t}k_.prototype.select=function(e,t){t=e.messageContext.messages.find(t);return u.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.id,"]")})};var U_=k_;function k_(){}Pe(F_,D_=G),F_.prototype.decorate=function(e,t,r){return t.setProperty("experiment_id",r.experiment.id),t.setProperty("experiment_key",r.experiment.key),t.setProperty("variation_id",r.variationId),t.setProperty("variation_key",r.variationKey),t.setProperty("experiment_decision_reason",r.reason),r};var D_,L_=F_;function F_(e){var t=D_.call(this,e)||this;return t.evaluator=e,t}j_.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},j_.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(u.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(u.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return u.isNotNullOrUndefined(this.bucketer.bucketing(e,t))};var V_=j_;function j_(e,t){this.targetMatcher=e,this.bucketer=t}H_.get=function(e){return u.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},H_.getOrNull=function(e){return H_.instances.get(e)},H_.register=function(e,t){return H_.instances.set(e,t),t},H_.instances=new Map;var B_=H_;function H_(){}G_.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},G_.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!u.isNullOrUndefined(e)&&t.identifiers.includes(e)};var K_=G_;function G_(){}J_.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 z_=J_;function J_(e){this.targetMatcher=e}W_.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var Y_=W_;function W_(e){this.storage=e}$_.prototype.matches=function(e,t){var r=e.inAppMessage,n=e.user,e=e.timestamp;return this.isFrequencyCapped(r,n,e)},$_.prototype.isFrequencyCapped=function(e,t,r){if(!e.eventTrigger.frequencyCap)return!1;var n=this.createMatchContexts(e.eventTrigger.frequencyCap);if(0===n.length)return!1;for(var i=0,o=this.storage.get(e);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(t,r,s))return!0;return!1},$_.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new X_(new Q_(i)))}return e.durationCap&&t.push(new X_(new tN(e.durationCap))),t};var q_=$_;function $_(e){this.storage=e}Z_.prototype.matches=function(e,t,r){return this.predicate.matches(e,t,r)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var X_=Z_;function Z_(e){this.matchCount=0,this.predicate=e}Object.defineProperty(eN.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),eN.prototype.matches=function(e,t,r){e=e.identifiers[this.identifierCap.identifierType];if(u.isNullOrUndefined(e))return!1;r=r.identifiers[this.identifierCap.identifierType];return!u.isNullOrUndefined(r)&&e===r};var Q_=eN;function eN(e){this.identifierCap=e}Object.defineProperty(rN.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),rN.prototype.matches=function(e,t,r){return t-r.timestamp<=this.durationCap.durationMillis};var tN=rN;function rN(e){this.durationCap=e}iN.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},iN.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var nN=iN;function iN(e,t,r,n,i){var o=new MT,i=B_.register("targetMatcher",new Eb(new IT(e,i))),s=new ST(o),t=new o_(t,i,s),a=new a_(o),a=(this.abTestFlow=xT.of(new kT(t),new QT,new XT(a),new KT(new t_(i)),new LT,new VT,new BT,new zT(s)),this.featureFlagFlow=xT.of(new LT,new VT,new BT,new kT(t),new QT,new YT(new n_(i),s),new qT(s)),new C_(new L_(e),new U_));this.inAppMessageFlow=xT.of(new l_,new h_(new K_,a),new v_,new g_,new E_,new __(new z_(i)),new A_(a),new O_(new q_(n)),new b_(new Y_(r)),new P_(a)),this.remoteConfigParameterTargetRuleDeterminer=new V_(i,o)}sN.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={})[sN.ROOT_TYPE]=r.key.type,t[sN.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},sN.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof W0)return n[sN.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[sN.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[sN.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,R0.exposure(e.user,t,n,r);if(t instanceof Q0)return R0.remoteConfig(e.user,t,c(c({},n),t.properties),r);if(t instanceof c_)return null;throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},sN.ROOT_TYPE="$targetingRootType",sN.ROOT_ID="$targetingRootId",sN.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",sN.EXPERIMENT_VERSION_KEY="$experiment_version",sN.EXECUTION_VERSION_KEY="$execution_version";var oN=sN;function sN(e){this.clock=e}Pe(cN,aN=Ou),cN.prototype.supports=function(e){return void 0!==e.inAppMessage},cN.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:c_.of(e,t,l.NOT_IN_IN_APP_MESSAGE_TARGET)};var aN,uN=cN;function cN(e){var t=aN.call(this)||this;return t.evaluationFlowFactory=e,t}lN.of=function(e,t,r,n){return new lN(e,t,r,n)},lN.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var pN=lN;function lN(e,t,r,n){this.key=new ib("IN_APP_MESSAGE",r.id),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var fN=s.log,hN=(dN.create=function(e,t,r,n,i){var o=Ve.instance,s=new gb,r=new hb(r),r=new nN(s,r,n,i,o),n=new X0(r),i=new rb(r.remoteConfigParameterTargetRuleDeterminer),r=new uN(r);return s.add(n),s.add(i),new dN(n,i,r,e,new oN(o),t,new vN,o)},dN.prototype.getExperiment=function(e){if(e){var t=this.workspaceFetcher.get();if(t)return t.getExperimentOrNull(e)}else fN.error("experimentKey must not be empty")},dN.prototype.experiment=function(e,t,r){var n=this;if(!e)return fN.error("experimentKey must not be empty"),_t.of(r,l.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return fN.warn("SDK not ready."),_t.of(r,l.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return fN.warn("Experiment does not exist."),_t.of(r,l.EXPERIMENT_NOT_FOUND);i=ub.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},dN.prototype.experiments=function(r){var n=this,i=new qn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=ub.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},dN.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,sb.create()),t=null!=(t=e.config)?t:new Be;return[e,_t.of(e.variationKey,e.reason,t,e.experiment)]},dN.prototype.featureFlag=function(e,t){var r=this;if(!e)return fN.error("featureKey must not be empty"),Ot.off(l.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return fN.warn("SDK not ready."),Ot.off(l.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return fN.warn("FeatureFlag does not exist."),Ot.off(l.FEATURE_FLAG_NOT_FOUND);n=ub.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},dN.prototype.featureFlags=function(r){var n=this,i=new qn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=ub.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},dN.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,sb.create()),t=null!=(t=e.config)?t:new Be;return[e,"A"===e.variationKey?Ot.off(e.reason,t,e.experiment):Ot.on(e.reason,t,e.experiment)]},dN.prototype.inAppMessage=function(e,t){var r=this,n=this.workspaceFetcher.get();if(!n)return fN.warn("SDK not ready."),bt.of(l.SDK_NOT_READY);e=n.getInAppMessageOrNull(e);if(!e)return fN.warn("In app message does not exist."),bt.of(l.IN_APP_MESSAGE_NOT_FOUND);n=pN.of(n,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(n,sb.create());return this.eventFactory.create(n,t).forEach(function(e){return r.eventProcessor.process(e)}),bt.of(t.reason,t.inAppMessage,t.message,t.properties)},dN.prototype.tryInAppMessage=function(t,e){var r,n=zn.start();try{r=this.inAppMessage(t,e)}catch(e){fN.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=bt.of(l.EXCEPTION)}return ji.inAppMessage(n,t,r),r},dN.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?fN.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 jt(0,e.key),this.eventProcessor.process(R0.track(n,e,t,r))):fN.warn("Event key must be not null. or event key must be string type."):fN.warn("event must not be null.")},dN.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=z0.toEvent(e),this.flush(),this.track(e,t),this.flush())},dN.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},dN.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(u.isNullOrUndefined(o))return fN.warn("SDK not ready."),Et.of(n,l.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(u.isNullOrUndefined(e))return fN.warn("Remote config parameter does not exist."),Et.of(n,l.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=pb.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,sb.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Et.of(t.value,t.reason)},dN.prototype.close=function(){this.eventProcessor.close()},dN);function dN(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}yN.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},yN.prototype._isSameError=function(e,t){return!u.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var vN=yN;function yN(){}mN.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},mN.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var gN=mN;function mN(){this._installed=[],this._installations={onerror:bN,onunhandledrejection:TN}}var EN,wN=null;function bN(o,s){wN=window.onerror,window.onerror=function(e,t,r,n,i){u.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),wN&&wN.apply(this,arguments)}}function TN(r,n){EN=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()),EN&&EN.apply(this,arguments)}}NN.prototype.read=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},NN.prototype.save=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},NN.prototype.add=function(r){return a(this,void 0,void 0,function(){var t;return p(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]}})})},NN.prototype.delete=function(n){return a(this,void 0,void 0,function(){var t,r=this;return p(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]}})})},NN.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},NN.prototype.clear=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var _N=NN;function NN(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var ON=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},IN=(AN.builder=function(){return new SN},AN.empty=function(){return AN.builder().build()},AN.from=function(e){return new AN(e)},AN.fromDto=function(e){for(var t=AN.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 Dn(e)})})}return t.build()},Object.defineProperty(AN.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),AN.prototype.get=function(e){return this.cohorts.get(e)},AN.prototype.filterBy=function(e){var r=Gt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return AN.from(e)},AN.prototype.asArray=function(){return this.cohorts.values()},AN.prototype.asComparable=function(){return this.cohorts},AN.prototype.toBuilder=function(){return new SN(this)},AN);function AN(e){this.cohorts=e}PN.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},PN.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},PN.prototype.build=function(){return new IN(this.cohorts)};var SN=PN;function PN(e){this.cohorts=new qn(Ce.isEqual),e&&this.putAll(e)}var I="model",O="name",e="type",R="vendor",C="version",m="architecture",yl="console",M="mobile",w="tablet",t="smarttv",ta="wearable",RN=(U.parse=function(e){return{browser:U.getBrowser(e),cpu:U.getCPU(e),device:U.getDevice(e),engine:U.getEngine(e),os:U.getOS(e)}},U.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return U.mapper.rgx.call(t,e,U.regexes.browser),t.major=U.util.major(t.version),t},U.getCPU=function(e){var t={architecture:void 0};return U.mapper.rgx.call(t,e,U.regexes.cpu),t},U.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return U.mapper.rgx.call(t,e,U.regexes.device),t},U.getEngine=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.getOS=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.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,"")}},U.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[O,C],[/(opios)[\/\s]+([\w\.]+)/i],[[O,"Opera Mini"],C],[/\s(opr)\/([\w\.]+)/i],[[O,"Opera"],C],[/(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],[O,C],[/(konqueror)\/([\w\.]+)/i],[[O,"Konqueror"],C],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[O,"IE"],C],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[O,"Edge"],C],[/(yabrowser)\/([\w\.]+)/i],[[O,"Yandex"],C],[/(Avast)\/([\w\.]+)/i],[[O,"Avast Secure Browser"],C],[/(AVG)\/([\w\.]+)/i],[[O,"AVG Secure Browser"],C],[/(puffin)\/([\w\.]+)/i],[[O,"Puffin"],C],[/(focus)\/([\w\.]+)/i],[[O,"Firefox Focus"],C],[/(opt)\/([\w\.]+)/i],[[O,"Opera Touch"],C],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[O,"UCBrowser"],C],[/(comodo_dragon)\/([\w\.]+)/i],[[O,/_/g," "],C],[/(windowswechat qbcore)\/([\w\.]+)/i],[[O,"WeChat(Win) Desktop"],C],[/(micromessenger)\/([\w\.]+)/i],[[O,"WeChat"],C],[/(brave)\/([\w\.]+)/i],[[O,"Brave"],C],[/(whale)\/([\w\.]+)/i],[[O,"Whale"],C],[/(qqbrowserlite)\/([\w\.]+)/i],[O,C],[/(QQ)\/([\d\.]+)/i],[O,C],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[O,C],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[O,C],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[O,C],[/(MetaSr)[\/\s]?([\w\.]+)/i],[O],[/(LBBROWSER)/i],[O],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[C,[O,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[C,[O,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[O,C],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[C,[O,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[O,/(.+)/,"$1 WebView"],C],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[O,/(.+(?:g|us))(.+)/,"$1 $2"],C],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[O,"Chrome Mobile"],C],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[C,[O,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[O,"Sailfish Browser"],C],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[O,C],[/(dolfin)\/([\w\.]+)/i],[[O,"Dolphin"],C],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[O,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[O,"Opera Coast"],C],[/fxios\/([\w\.-]+)/i],[C,[O,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[C,[O,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[C,O],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[O,"GSA"],C],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[O,[C,(U.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],p=r=0;p<u.length&&!o;)if(o=u[p++].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(U.util.has(t[r][n],e))return"?"===r?void 0:r}else if(U.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(U.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],[O,C],[/(navigator|netscape)\/([\w\.-]+)/i],[[O,"Netscape"],C],[/(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],[O,C]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,U.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[m,/ower/,"",U.util.lowerize]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[m,U.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[I,R,[e,w]],[/applecoremedia\/[\w\.]+ \((ipad)/],[I,[R,"Apple"],[e,w]],[/(apple\s{0,1}tv)/i],[[I,"Apple TV"],[R,"Apple"],[e,t]],[/(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,I,[e,w]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[I,[R,"Amazon"],[e,w]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[I,U.mapper.str,U.maps.device.amazon.model],[R,"Amazon"],[e,M]],[/android.+aft([bms])\sbuild/i],[I,[R,"Amazon"],[e,t]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[I,R,[e,M]],[/\((ip[honed|\s\w*]+);/i],[I,[R,"Apple"],[e,M]],[/(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,I,[e,M]],[/\(bb10;\s(\w+)/i],[I,[R,"BlackBerry"],[e,M]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[I,[R,"Asus"],[e,w]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[I,"Xperia Tablet"],[e,w]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[I,[R,"Sony"],[e,M]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[R,I,[e,yl]],[/android.+;\s(shield)\sbuild/i],[I,[R,"Nvidia"],[e,yl]],[/(playstation\s[34portablevi]+)/i],[I,[R,"Sony"],[e,yl]],[/(sprint\s(\w+))/i],[[R,U.mapper.str,U.maps.device.sprint.vendor],[I,U.mapper.str,U.maps.device.sprint.model],[e,M]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[R,[I,/_/g," "],[e,M]],[/(nexus\s9)/i],[I,[R,"HTC"],[e,w]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[I,[R,"Huawei"],[e,M]],[/android.+(bah2?-a?[lw]\d{2})/i],[I,[R,"Huawei"],[e,w]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,I,[e,M]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[I,[R,"Microsoft"],[e,yl]],[/(kin\.[onetw]{3})/i],[[I,/\./g," "],[R,"Microsoft"],[e,M]],[/\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],[I,[R,"Motorola"],[e,M]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[I,[R,"Motorola"],[e,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[R,U.util.trim],[I,U.util.trim],[e,t]],[/hbbtv.+maple;(\d+)/i],[[I,/^/,"SmartTV"],[R,"Samsung"],[e,t]],[/\(dtv[\);].+(aquos)/i],[I,[R,"Sharp"],[e,t]],[/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"],I,[e,w]],[/smart-tv.+(samsung)/i],[R,[e,t],I],[/((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"],I,[e,M]],[/sie-(\w*)/i],[I,[R,"Siemens"],[e,M]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[R,"Nokia"],I,[e,M]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[I,[R,"Acer"],[e,w]],[/android.+([vl]k\-?\d{3})\s+build/i],[I,[R,"LG"],[e,w]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],I,[e,w]],[/(lg) netcast\.tv/i],[R,I,[e,t]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[I,[R,"LG"],[e,M]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[R,I,[e,w]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[I,[R,"Lenovo"],[e,w]],[/(lenovo)[_\s-]?([\w-]+)/i],[R,I,[e,M]],[/linux;.+((jolla));/i],[R,I,[e,M]],[/((pebble))app\/[\d\.]+\s/i],[R,I,[e,ta]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[R,I,[e,M]],[/crkey/i],[[I,"Chromecast"],[R,"Google"],[e,t]],[/android.+;\s(glass)\s\d/i],[I,[R,"Google"],[e,ta]],[/android.+;\s(pixel c)[\s)]/i],[I,[R,"Google"],[e,w]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[I,[R,"Google"],[e,M]],[/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],[[I,/_/g," "],[R,"Xiaomi"],[e,M]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[I,/_/g," "],[R,"Xiaomi"],[e,w]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[I,[R,"Meizu"],[e,M]],[/(mz)-([\w-]{2,})/i],[[R,"Meizu"],I,[e,M]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[I,[R,"OnePlus"],[e,M]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[I,[R,"RCA"],[e,w]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[I,[R,"Dell"],[e,w]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[I,[R,"Verizon"],[e,w]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],I,[e,w]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[I,[R,"NuVision"],[e,w]],[/android.+;\s(k88)\sbuild/i],[I,[R,"ZTE"],[e,w]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[I,[R,"Swiss"],[e,M]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[I,[R,"Swiss"],[e,w]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[I,[R,"Zeki"],[e,w]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],I,[e,w]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[I,[R,"Insignia"],[e,w]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[I,[R,"NextBook"],[e,w]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[R,"Voice"],I,[e,M]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[R,"LvTel"],I,[e,M]],[/android.+;\s(PH-1)\s/i],[I,[R,"Essential"],[e,M]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[I,[R,"Envizen"],[e,w]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,I,[e,w]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[I,[R,"MachSpeed"],[e,w]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,I,[e,w]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[I,[R,"Rotor"],[e,w]],[/android.+(KS(.+))\s+build/i],[I,[R,"Amazon"],[e,w]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,I,[e,w]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[e,U.util.lowerize],R,I],[/[\s\/\(](smart-?tv)[;\)]/i],[[e,t]],[/(android[\w\.\s\-]{0,9});.+build/i],[I,[R,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[C,[O,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[O,"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],[O,C],[/rv\:([\w\.]{1,9}).+(gecko)/i],[C,O]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[O,C],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[O,U.mapper.str,U.maps.os.windows],[C,U.mapper.str,U.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[O,"Windows"],[C,U.mapper.str,U.maps.os.windows.version]],[/\((bb)(10);/i],[[O,"BlackBerry"],C],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[O,C],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[O,"Symbian"],C],[/\((series40);/i],[O],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[O,"Firefox OS"],C],[/(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],[[O,"Linux"],C],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[O,"Chromium OS"],C],[/(sunos)\s?([\w\.\d]*)/i],[[O,"Solaris"],C],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[O,"Linux"],C],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[O,"iOS"],[C,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[O,"iOS"],[C,/_/g,"."]],[/(haiku)\s(\w+)/i],[O,C],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[C,/_/g,"."],[O,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[O,"Mac"],[C,/_/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],[O,C]]},U);function U(){}CN.generate=function(e,t){var r,n,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,i=RN.parse(e.navigator.userAgent).browser,o="";try{o=null!=(n=null==(r=screen.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:r[0])?n:""}catch(e){}return c({browserName:i.name||"",browserMajorVersion:i.major||"",browserVersion:i.version||"",orientation:o,userAgent:e.navigator.userAgent||""},t.toProperties())};var MN=CN;function CN(){}UN.generate=function(e){var t,r,n,i,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,o=RN.parse(e.navigator.userAgent),s=o.os,o=o.device,a=e.screen,e=(null==(e=e.navigator.languages)?void 0:e[0])||"",u=e.split("-")[0],c=(null!=(c=o.type)?c:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),p=s.name||"",l="";try{p=null!=(r=null==(t=p.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:p,orientation=null!=(i=null==(n=a.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",l=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{osName:p,osVersion:s.version||"",deviceModel:o.model||"",deviceType:c,deviceVendor:o.vendor||"",deviceBrand:o.vendor||"",screenWidth:a.width||"",screenHeight:a.height||"",locale:e,language:u,timeZone:l}};var xN=UN;function UN(){}DN.generate=function(e,t){t=null!=t?t:xo.createWithCurrentPage();return c(c({platform:"Web"},MN.generate(e,t)),xN.generate(e))};var kN=DN;function DN(){}FN.prototype.map=function(e){return new FN(e(this.previous),e(this.current))};var LN=FN;function FN(e,t){this.previous=e,this.current=t}jN.empty=function(){return this.from([])},jN.from=function(e){return new jN(e)},jN.fromDto=function(e){return this.from(e.events.map(function(e){return Bn.fromJson(e)}))},Object.defineProperty(jN.prototype,"rawEvents",{get:function(){return this.events},enumerable:!1,configurable:!0});var VN=jN;function jN(e){this.events=e}HN.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return zN.of(YN(e,this.hackleDeviceId),IN.empty(),VN.empty())},HN.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(HN.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),HN.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},HN.prototype.resolveContext=function(e){return void 0===e?this.context:("string"==typeof e?this.updateUser({id:e}):this.updateUser(e)).current},HN.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},HN.prototype.hackleUser=function(e){var t=(new zt).addIdentifiers(e.user.identifiers||{}).add(Ht.ID,e.user.id||this.hackleDeviceId).add(Ht.DEVICE,e.user.deviceId||this.hackleDeviceId).add(Ht.HACKLE_DEVICE,this.hackleDeviceId),t=(u.isNotNullOrUndefined(e.user.userId)&&t.add(Ht.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,targetEvents:e.targetEvents.rawEvents}},HN.prototype.hackleProperties=function(){return"undefined"!=typeof window?kN.generate(window,this.pageManager.currentPage):{}},HN.prototype.setUser=function(e){return this.updateUser(e).map(function(e){return e.user})},HN.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},HN.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},HN.prototype.updateUserProperties=function(e){return this.operateProperties(e).map(function(e){return e.user})},HN.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).map(function(e){return e.user})},HN.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},HN.prototype.saveUser=function(e){this.storage.saveUser(e)},HN.prototype.updateContext=function(e){var t=this.context,r=t.user,e=e(r),n=this.context.with(e);return this.context=n,ON(r,e)||(this.changeUser(r,e,this.clock.currentMillis()),this.saveUser(e)),new LN(t,n)},HN.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=YN(r,n.hackleDeviceId),ON(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},HN.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:u.fromMap(t)})})},HN.prototype.sync=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.syncCohort(),this.syncUserTarget()])];case 1:return e.sent(),[2]}})})},HN.prototype.syncIfNeeded=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return this.hasNewIdentifiers(t.previous,t.current)?[4,this.syncCohort()]:[3,2];case 1:e.sent(),e.label=2;case 2:return ON(t.previous,t.current)?[3,4]:[4,this.syncUserTarget()];case 3:e.sent(),e.label=4;case 4:return[2]}})})},HN.prototype.syncCohort=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.userCohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t,this.context.targetEvents),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},HN.prototype.syncUserTarget=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.userTargetFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(this.context.cohorts,t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync userTargets: ".concat(t)),[3,3];case 3:return[2]}})})},HN.prototype.hasNewIdentifiers=function(e,t){var r=Gt(e),e=Gt(t);return Object.entries(e).some(function(e){var t=e[0],e=e[1];return r[t]!==e})},HN.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return[2]})})};var BN=HN;function HN(e,t,r,n,i,o,s,a,u){this.hackleDeviceId=e,this.storage=t,this.userTargetFetcher=r,this.userCohortFetcher=n,this.campaignParser=i,this.pageManager=o,this.clock=s,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(a,u),this.storage.saveUser(this.context.user)}GN.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},GN.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(GN.prototype,"deviceId",{get:function(){return this.storage.getItem(ot)},enumerable:!1,configurable:!0}),Object.defineProperty(GN.prototype,"userId",{get:function(){return this.storage.getItem(it)},enumerable:!1,configurable:!0}),GN.prototype.setDeviceId=function(e){this.setId(ot,e)},GN.prototype.setUserId=function(e){this.setId(it,e)},GN.prototype.setId=function(e,t){u.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var KN=GN;function GN(e){this.storage=e}JN.of=function(e,t,r){return new JN(e,t.filterBy(e),r)},JN.prototype.with=function(e){return JN.of(e,this.cohorts.filterBy(e),this.targetEvents)},JN.prototype.update=function(e,t){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return JN.of(this.user,e,t)};var zN=JN;function JN(e,t,r){this.user=e,this.cohorts=t,this.targetEvents=r}var YN=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},WN=(Object.defineProperty(qN.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(qN.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:qN.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(qN.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),qN.prototype.addListener=function(e){this.sessionListeners.push(e)},qN.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},qN.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)},qN.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(nt,"".concat(e))},qN.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)})},qN.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},qN.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(rt,e)},qN.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(rt)},qN.prototype.loadLastEventTime=function(){var e=this.storage.getItem(nt);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},qN.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},qN.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.updateLastEventTime(t);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}},qN.EMPTY_SESSION_ID="0.ffffffff",qN);function qN(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}XN.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},XN.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},XN.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},XN.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var $N=XN;function XN(){this.storage=window.localStorage}QN.postfix=function(e,t){return new QN(e,function(e){return"".concat(e).concat(t)})},QN.prefix=function(e,t){return new QN(e,function(e){return"".concat(t).concat(e)})},QN.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},QN.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},QN.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var ZN=QN;function QN(e,t){this.delegate=e,this.transform=t}tO.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},tO.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},tO.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},tO.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}},tO.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[]}},tO.prototype.entries=function(){return this.getList().flatMap(Object.entries)},tO.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){}},tO.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]},tO.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){}},tO.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var eO=tO;function tO(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)}nO.prototype.currentUser=function(){return this.userManager.resolve()},nO.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},nO.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},nO.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},nO.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},nO.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},nO.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},nO.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},nO.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},nO.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},nO.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},nO.prototype.increment=function(e,t){_i.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var rO=nO;function nO(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}oO.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},oO.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},oO.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},oO.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},oO.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},oO.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},oO.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},oO.monitoring=function(e){return"".concat(e,"/metrics")},oO.userTargets=function(e){return"".concat(e,"/api/v1/user-targets")};var iO=oO;function oO(){}aO.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(u.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},aO.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},aO.prototype.key=function(e){return"".concat(e.key)};var sO=aO;function aO(e){this.storage=e}cO.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var uO=cO;function cO(e){this.handlers=e}lO.prototype.handle=function(e,t){e.close()},lO.prototype.supports=function(e){return"CLOSE"===e.type};var pO=lO;function lO(){}hO.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))}},hO.prototype.supports=function(e){return"WEB_LINK"===e.type};var fO=hO;function hO(e){this.urlHandler=e}vO.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))}},vO.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var dO=vO;function vO(e){this.urlHandler=e}gO.prototype.handle=function(e,t){var r;e.context.reason!==l.OVERRIDDEN&&(r=this.clock.currentMillis()+864e5,this.storage.put(e.context.inAppMessage,r)),e.close()},gO.prototype.supports=function(e){return"HIDDEN"===e.type};var yO=gO;function gO(e,t){this.storage=e,this.clock=t}EO.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))}},EO.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var mO=EO;function EO(e){this.urlHandler=e}bO.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))}},bO.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var wO=bO;function bO(e){this.urlHandler=e}_O.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))}},_O.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var TO=_O;function _O(e){this.urlHandler=e}OO.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))}},OO.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var NO=OO;function OO(e){this.urlHandler=e}AO.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},AO.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,in_app_message_display_type:t.message.layout.displayType,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,in_app_message_display_type:t.message.layout.displayType})};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,in_app_message_display_type:t.message.layout.displayType,action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.buttonText,image_url:r.imageUrl,image_order:r.imageOrder})};case"IMAGE_IMPRESSION":r=e;return{key:"$in_app_image_impression",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,in_app_message_display_type:t.message.layout.displayType,image_url:r.imageUrl,image_order:r.imageOrder})}}};var IO=AO;function AO(e){this.core=e}PO.prototype.setListener=function(e){this.inAppMessageListener=e},PO.prototype.present=function(r){return a(this,void 0,void 0,function(){var t;return p(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]),null===(t=this.messageViewFactory.create(r,this)))?[2]:[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 SO=PO;function PO(e,t,r,n){void 0===n&&(n=null),this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.inAppMessageListener=n,this.currentMessageView=null,this.opening=!1}MO.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},MO.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var RO=MO;function MO(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 CO=function(e,t,r,n,i){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n,this.reason=i},xO=(UO.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}}},UO.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 CO(e.inAppMessage,e.message,t.user,ke.sanitize(r),e.reason)},UO);function UO(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}DO.prototype.open=function(){var i,o;return a(this,void 0,void 0,function(){var t,r,n=this;return p(this,function(e){switch(e.label){case 0:if(!this.status.canOpen())return s.log.debug("InAppMessage is already opened. (key=".concat(this.context.inAppMessage.key,")")),[2];e.label=1;case 1:return e.trys.push([1,4,,5]),null!=(o=null==(i=this.ui.inAppMessageListener)?void 0:i.beforeInAppMessageOpen)&&o.call(i,this.context.inAppMessage),this.status.current="OPENING",window.addEventListener(DO.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.addEventListener(DO.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),[4,this.scriptLoader.load()];case 2:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(DO.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),r=this.renderTypeResolver.resolve(this.context),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),renderType:r})];case 3:return e.sent(),t.classList.remove("".concat(DO.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleInAppMessageLifecycle("OPEN",function(){var e,t;n.handleEvent({type:"IMPRESSION"}),n.status.current="OPENED",null!=(t=null==(e=n.ui.inAppMessageListener)?void 0:e.afterInAppMessageOpen)&&t.call(e,n.context.inAppMessage)},function(){s.log.warn("Failed to open inAppMessage with [Timeout expired.]"),n.destroy()}),[3,5];case 4:return e.sent(),this.destroy(),[3,5];case 5:return[2]}})})},DO.prototype.close=function(){var e,t,r=this;this.status.canClose()?(null!=(t=null==(e=this.ui.inAppMessageListener)?void 0:e.beforeInAppMessageClose)&&t.call(e,this.context.inAppMessage),this.status.current="CLOSING",this.handleInAppMessageLifecycle("CLOSE",function(){var e,t;r.handleEvent({type:"CLOSE"}),r.destroy(),null!=(t=null==(e=r.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r.context.inAppMessage)},function(){var e,t;s.log.warn("Failed to close inAppMessage with [Timeout expired.]"),r.destroy(),null!=(t=null==(e=r.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r.context.inAppMessage)})):s.log.debug("InAppMessage is already closed. (key=".concat(this.context.inAppMessage.key,")"))},DO.prototype.handleInAppMessageLifecycle=function(e,t,r){var n=this,i=this.lifecycleRegistry.register(e,t);window.dispatchEvent(new CustomEvent(DO.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE,{detail:{type:e,id:i}})),setTimeout(function(){void 0!==n.lifecycleRegistry.getAndRemove(e,i)&&r()},DO.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT)},DO.prototype.destroy=function(){var e;window.removeEventListener(DO.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.removeEventListener(DO.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null,this.status.current="CLOSED"},DO.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(DO.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},DO.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},DO.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},DO.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},DO.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",DO.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE="hackle-iam-lifecycle-start",DO.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE="hackle-iam-lifecycle-end",DO.CONTAINER_CLASS_NAME="hackle-iam",DO.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT=5e3;var kO=DO;function DO(e,t,r,n,i,o){var s=this;this.scriptLoader=e,this.context=t,this.ui=r,this.renderTypeResolver=n,this.status=i,this.lifecycleRegistry=o,this.container=null,this.renderer=null,this.resolveLifecycleEnd=function(e){var t;e instanceof CustomEvent&&("string"==typeof(t=e).detail.id&&["OPEN","CLOSE"].includes(t.detail.type))&&(e=(t=e.detail).id,t=t.type,null!=(t=s.lifecycleRegistry.getAndRemove(t,e))&&t())},this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===DO.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,s.handleInteraction(e))}}FO.prototype.isMobileOS=function(e){e=e.user.hackleProperties.osName;return"string"==typeof e&&Boolean(e.match(this.mobileOSRegex))},FO.prototype.isMobileDeviceType=function(e){e=e.user.hackleProperties.deviceType;return"string"==typeof e&&Boolean(e.match(this.mobileDeviceRegex))},FO.prototype.resolve=function(e){return this.isMobileOS(e)||this.isMobileDeviceType(e)?"mobile":"pc"};var LO=FO;function FO(){this.mobileOSRegex=/(iOS|Android|iPad|iPhone)/g,this.mobileDeviceRegex=/(mobile|phone|tablet)/g}jO.prototype.canOpen=function(){return"OPENED"!==this.current&&"OPENING"!==this.current},jO.prototype.canClose=function(){return"CLOSED"!==this.current&&"CLOSING"!==this.current};var VO=jO;function jO(e){this.current=e=void 0===e?"CLOSED":e}HO.prototype.resolveKey=function(e,t){return"".concat(e,"_").concat(t)},HO.prototype.register=function(e,t){var r=H(),e=this.resolveKey(e,r);return this.record[e]=t,r},HO.prototype.getAndRemove=function(e,t){var e=this.resolveKey(e,t),t=this.record,r=t[e],t=function(e,t){var r={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}(t,["symbol"==typeof e?e:e+""]);return this.record=t,r};var BO=HO;function HO(){this.record={}}GO.create=function(e){return new GO(e)},GO.prototype.create=function(e,t){var r=new LO,n=new VO,i=new BO;switch(e.message.layout.displayType){case"MODAL":case"BANNER":case"BOTTOM_SHEET":return new kO(this.scriptLoader,e,t,r,n,i);case"NONE":return null}};var KO=GO;function GO(e){this.scriptLoader=e}JO.prototype.load=function(){return a(this,void 0,void 0,function(){var t;return p(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()]}})})},JO.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},JO.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 zO=JO;function JO(e){this.scriptUrl=e}WO.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},WO.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=qO.of(e,t,r);return this.targetMatcher.anyMatches(e,sb.create(),n.targets)};var YO=WO;function WO(e){this.targetMatcher=e}$O.of=function(e,t,r){return new $O(new ib("IN_APP_MESSAGE",r.id),e,t.user,t)};var qO=$O;function $O(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}ZO.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return u.isNullOrUndefined(e)?[]:JSON.parse(e)},ZO.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var XO=ZO;function ZO(e){this.storage=e}eI.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var QO=eI;function eI(e){this.processors=e}rI.prototype.process=function(e,t,r){e.context.reason!==l.OVERRIDDEN&&this.saveImpression(e.context.inAppMessage,e.context.user,r)},rI.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>rI.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-rI.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},rI.prototype.supports=function(e){return"IMPRESSION"===e.type},rI.IMPRESSION_MAX_SIZE=100;var tI=rI;function rI(e){this.impressionStorage=e}iI.prototype.process=function(e,t,r){},iI.prototype.supports=function(e){return"CLOSE"===e.type};var nI=iI;function iI(){}sI.prototype.process=function(e,t,r){var n,i,o=this.actionHandlerFactory.get(t.action);!(null==(i=null==(n=e.ui.inAppMessageListener)?void 0:n.onInAppMessageClick)?void 0:i.call(n,e.context.inAppMessage,e,Un.fromAction(t.action)))&&e.status.canClose()&&null!=o&&o.handle(e,t.action)},sI.prototype.supports=function(e){return"ACTION"===e.type};var oI=sI;function sI(e){this.actionHandlerFactory=e}uI.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 aI=uI;function uI(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}pI.prototype.matches=function(e,t,r){return!!R0.isTrackEvent(r)&&this.ruleDeterminer.isTriggerTarget(e,t,r)};var cI=pI;function pI(e){this.ruleDeterminer=e}fI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var lI=fI;function fI(e){this.handlers=e}dI.prototype.handle=function(e,t){e.close()},dI.prototype.supports=function(e){return"CLOSE"===e.type};var hI=dI;function dI(){}yI.prototype.handle=function(e,t){t=this.eventOrNull(t);t&&this.eventHandler.handle(e,t)},yI.prototype.eventOrNull=function(e){var t=Cn.fromJson(e.action);return t?{type:"ACTION",action:t,area:e.area,buttonText:e.buttonText,imageUrl:e.imageUrl,imageOrder:e.imageOrder}:null},yI.prototype.supports=function(e){return"ACTION"===e.type};var vI=yI;function yI(e){this.eventHandler=e}mI.prototype.handle=function(e,t){t={type:"IMAGE_IMPRESSION",imageUrl:t.imageUrl,imageOrder:t.imageOrder};this.eventHandler.handle(e,t)},mI.prototype.supports=function(e){return"IMAGE_IMPRESSION"===e.type};var gI=mI;function mI(e){this.eventHandler=e}wI.prototype.open=function(e){window.location.href=e.href};var EI=wI;function wI(){}TI.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var bI=TI;function TI(){}NI.prototype.open=function(e){window.open(e.href)};var _I=NI;function NI(){}II.prototype.open=function(e){window.location.replace(e)};var OI=II;function II(){}function AI(e,t,r){return null===e||(!RI(t,SI)||r.current!==r.referrer)&&!RI(e,t)}var SI={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},PI={current:void 0,referrer:void 0},RI=function(t,r){return Object.keys(SI).every(function(e){return t[e]===r[e]})},MI=(CI.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},SI),t),n=new Ao,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)},CI.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();AI(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},CI.prototype.onSessionEnded=function(e,t,r){},CI.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},CI);function CI(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}UI.prototype.get=function(){var e=this.storage.getItem(st);return e?JSON.parse(e):null},UI.prototype.set=function(e){this.storage.setItem(st,JSON.stringify(e))};var xI=UI;function UI(e){this.storage=e}DI.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},DI.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=Ho.tryDecodeURIComponent(i))&&(t[o]=i)}return t};var kI=DI;function DI(e){this.search=e}FI.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},FI.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,FI.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var LI=FI;function FI(){}jI.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},jI.prototype.params=function(e){e=u.isNotNullOrUndefined(e)?e:this.pageManager.currentPage.queryParameter;return new kI(e).getQueryParams(jI.CAMPAIGN_QUERY_CONDITION)},jI.prototype.resolve=function(e){return{utm_campaign:e[BI],utm_content:e[HI],utm_id:e[KI],utm_medium:e[GI],utm_source:e[zI],utm_term:e[JI],gclid:e[YI],fbclid:e[WI]}},jI.prototype.parseDomain=function(){var t=this;if("undefined"==typeof window)return PI;return{current:LI.extractDomain(this.pageManager.currentPage.hostname),referrer:function(){var e=t.pageManager.currentPage.referrer;if(e)return e=new URL(e).hostname,LI.extractDomain(e)}()}},jI.CAMPAIGN_QUERY_CONDITION=function(e,t){return Oi.isNotEmptyString(t)};var VI=jI;function jI(e){this.pageManager=e}var BI="utm_campaign",HI="utm_content",KI="utm_id",GI="utm_medium",zI="utm_source",JI="utm_term",YI="gclid",WI="fbclid",qI=($I.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},$I.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))}},$I);function $I(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()}ZI.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!R0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==l.TRAFFIC_ALLOCATED?null:e};var XI=ZI;function ZI(e){this.workspaceFetcher=e}var QI={user:void 0,debug:!1,log_disabled:!1,automaticPageTracking:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://sdk-api.hackle.io",eventUrl:"https://event-api.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.46.0",IAM_RENDERER_VERSION_HEADER:"0.0.10"},eA=(tA.config=function(e){return c(c(c({},QI),e),{automaticPageTracking:tA.resolveAutomaticPageTracking(e)})},tA.resolveAutomaticPageTracking=function(e){return"boolean"!=typeof(null==e?void 0:e.automaticPageTracking)&&"boolean"!=typeof(null==e?void 0:e.auto_track_page_view)?QI.automaticPageTracking:!!e.automaticPageTracking||!!e.auto_track_page_view},tA.logging=function(e){s.initCounter(function(e){return _i.counter("log",{level:e})}),s.setLogLevel(Ne.INFO),e.log_disabled?s.setLogLevel(Ne.DISABLE):e.debug&&s.setLogLevel(Ne.DEBUG)},tA.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}},tA.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},tA.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,6e4)},tA.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},tA);function tA(){}nA.prototype.add=function(e){this.synchronizers.push(e)},nA.prototype.sync=function(){return a(this,void 0,void 0,function(){var t=this;return p(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.sync())}))];case 1:return e.sent(),[2]}})})},nA.prototype.close=function(){return a(this,void 0,void 0,function(){var t=this;return p(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.close())}))];case 1:return e.sent(),[2]}})})},nA.prototype.safe=function(r){return a(this,void 0,void 0,function(){var t;return p(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 rA=nA;function nA(){this.synchronizers=[]}oA.prototype.sync=function(){return a(this,void 0,void 0,function(){var t;return p(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]}})})},oA.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()}))},oA.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},oA.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var iA=oA;function oA(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}aA.prototype.schedule=function(e,t){e=new uA(e,t);return e.start(),e},aA.prototype.schedulePeriodically=function(e,t,r){var n;switch(this.scheduleType){case"setTimeout":n=new pA(e,t,r);break;case"setInterval":n=new fA(e,t,r)}return n.start(),n};var sA=aA;function aA(e){this.scheduleType=e}cA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},cA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var uA=cA;function cA(e,t){this.delayMillis=e,this.task=t,this.timeout=null}lA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},lA.prototype.run=function(){var e=this;try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},lA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var pA=lA;function lA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}hA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){e.run(),e.interval=setInterval(function(){return e.run()},e.intervalMillis)},this.delayMillis)},hA.prototype.run=function(){try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}},hA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.interval&&(clearInterval(this.interval),this.interval=null)};var fA=hA;function hA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null,this.interval=null}vA.prototype.fetchIfModified=function(r){return a(this,void 0,void 0,function(){var t;return p(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)]}})})},vA.prototype.createRequest=function(e){var t=Ai.builder().url(this.url).method("GET");return null!==e&&t.addHeader(xi.IF_MODIFIED_SINCE,e),t.build()},vA.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=zn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Hi.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Hi.record("get.workspace",t,null),r;case 4:return[2]}})})},vA.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(xi.LAST_MODIFIED)}};var dA=vA;function vA(e,t){this.url=e,this.transport=t}gA.prototype.fetch=function(r){return a(this,void 0,void 0,function(){var t;return p(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){e={identifiers:Gt(e)},e=be.encodeURL(JSON.stringify(e));return Ai.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},gA.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=zn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Hi.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Hi.record("get.cohorts",t,null),r;case 4:return[2]}})})},gA.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 IN.fromDto(e)};var yA=gA;function gA(e,t){this.url=e,this.transport=t}EA.prototype.fetch=function(r){return a(this,void 0,void 0,function(){var t;return p(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)]}})})},EA.prototype.createRequest=function(e){e={identifiers:Gt(e)},e=be.encodeURL(JSON.stringify(e));return Ai.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},EA.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=zn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Hi.record("get.user-targets",t,r),[2,r];case 3:throw r=e.sent(),Hi.record("get.user-targets",t,null),r;case 4:return[2]}})})},EA.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 VN.fromDto(e)};var mA=EA;function EA(e,t){this.url=e,this.transport=t}bA.prototype.getExperiments=function(){return Array.from(this.experiments.values())},bA.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},bA.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},bA.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},bA.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},bA.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},bA.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},bA.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},bA.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},bA.prototype.getContainerOrNull=function(e){return this.containers.get(e)},bA.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},bA.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},bA.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},bA.prototype.getAttributes=function(){return this.attributes},bA.from=function(e){var t=e.parameterConfigurations.map(Pt.fromJson),r=f.mapNotNullOrUndefined(e.experiments,function(e){return Ct.fromJson("AB_TEST",e,t)}),n=f.mapNotNullOrUndefined(e.experiments,function(e){return Ct.fromJson("AB_TEST",e,t)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),i=f.mapNotNullOrUndefined(e.featureFlags,function(e){return Ct.fromJson("FEATURE_FLAG",e,t)}),o=e.buckets.map(Dt.fromJson),s=e.events.map(jt.fromJson),a=f.mapNotNullOrUndefined(e.segments,sr.fromJson),u=e.containers.map(ur.fromJson),c=f.mapNotNullOrUndefined(e.remoteConfigParameters,fr.fromJson),p=f.mapNotNullOrUndefined(e.inAppMessages,Hr.fromJson),e=e.workspace.attributes;return new bA(r,n,i,o,s,a,u,t,c,p,e)};var wA=bA;function bA(e,t,r,n,i,o,s,a,u,c,p){this.experiments=f.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=f.associateBy(t,function(e){return e.key}),this.featureFlags=f.associateBy(r,function(e){return e.key}),this.buckets=f.associateBy(n,function(e){return e.id}),this.eventTypes=f.associateBy(i,function(e){return e.key}),this.segments=f.associateBy(o,function(e){return e.key}),this.containers=f.associateBy(s,function(e){return e.id}),this.parameterConfigurations=f.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=f.associateBy(u,function(e){return e.key}),this.inAppMessages=f.associateBy(c,function(e){return e.key}),this.attributes=p}_A.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},_A.prototype.setWorkspace=function(e){try{this.workspace=wA.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},_A.prototype.get=function(){return this.workspace},_A.prototype.sync=function(){return a(this,void 0,void 0,function(){var t;return p(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]}})})},_A.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return[2]})})};var TA=_A;function _A(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}OA.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},OA.prototype.dispatchEventsSynchronously=function(r){return a(this,void 0,void 0,function(){var t;return p(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]}})})},OA.prototype.dispatchEvents=function(r){return a(this,void 0,void 0,function(){var t;return p(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 NA=OA;function OA(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}AA.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},AA.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof R0?R0.isExposureEvent(e)?t.push(e.toDto()):R0.isTrackEvent(e)?r.push(e.toDto()):R0.isRemoteConfigEvent(e)&&n.push(e.toDto()):R0.isExposureEventDto(e)?t.push(e):R0.isTrackEventDto(e)?r.push(e):R0.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return Ai.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},AA.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=zn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Hi.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Hi.record("post.events",t,null),r;case 4:return[2]}})})};var IA=AA;function AA(e,t){this.url=e,this.transport=t}PA.prototype.add=function(e){return this.repository.add(e)},PA.prototype.delete=function(e){return this.repository.delete(e)},PA.prototype.flush=function(){return a(this,void 0,void 0,function(){var t,r;return p(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]}})})},PA.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"pageshow":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"blur":case"focus":case"hidden":case"locationChange":case"pagehide":return}};var SA=PA;function PA(e,t){this.repository=e,this.transport=t}function RA(){this.listeners={}}RA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},RA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},RA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Pe(CA,MA=RA);var MA,El=CA;function CA(){return null!==MA&&MA.apply(this,arguments)||this}Pe(kA,xA=El),kA.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},kA.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},kA.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},kA.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=[])},kA.prototype.close=function(){this.flush(!0)};var xA,UA=kA;function kA(e,t,r,n){var i=xA.call(this)||this;return i.eventDispatcher=e,i.eventDispatchMaxSize=t,i.flushScheduler=r,i.flushIntervalMillis=n,i.queue=[],i.flushingJob=null,i}LA.prototype.send=function(e){e=e.toBuilder().addHeader(ze,this.sdk.key).addHeader(Je,this.sdk.name).addHeader(Ye,this.sdk.version).addHeader(We,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var DA=LA;function LA(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}VA.intercept=function(e,t){return t instanceof DA?t:new DA(e,Ve.instance,t)};var FA=VA;function VA(){}BA.create=function(){return new BA},BA.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 Mi(n.status,n.responseText,function(e){var t=xi.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 jA=BA;function BA(){}KA.create=function(){return new KA},KA.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(Mi.ok())})},KA.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(ze),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(Je,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(Ye,"unknown")),e.headers.get(We));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var HA=KA;function KA(){}zA.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var GA=zA;function zA(e){this.invocationResponseResolver=e}WA.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 JA,YA=WA;function WA(e){this.invocationResponseResolver=e}(Ma=JA=JA||{}).prompt="prompt",Ma.function="function";$A.prototype.getInvocator=function(e,t){return e===JA.prompt?new GA(t):e===JA.function?new YA(t):null};var qA=$A;function $A(){}ZA.prototype.onPageStarted=function(e,t){var r=this.userManager.resolve(),r=this.determiner.determineOrNull(r);r&&(this.core.flush(!0),this.redirector.redirect(r))},ZA.prototype.onPageEnded=function(e,t){};var XA=ZA;function ZA(e,t,r,n){this.determiner=e,this.redirector=t,this.userManager=r,this.core=n}var QA=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.user=n},eS=(tS.prototype.determineOrNull=function(e){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,"A"),new QA(t,o,i,e)}return null},tS);function tS(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}nS.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=iS.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,sb.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,sb.create(),t.includeTargets))};var rS=nS;function nS(e){this.targetMatcher=e}oS.of=function(e,t){return new oS(new ib("SPLIT_URL",H()),t,e)};var iS=oS;function oS(e,t,r){this.key=e,this.user=t,this.workspace=r}aS.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var sS=aS;function aS(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}cS.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(cS.SPLIT_URL_CONFIG_KEY,"")),r=Ln.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},cS.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},cS.prototype.resolveManualRedirectUrl=function(e,t){e=Ho.tryParse(e);return e?this.decorateCampaign(e,t):null},cS.prototype.decorateCampaign=function(e,t){t=t.user.hackleProperties.queryParameter;if(Oi.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];Oi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},cS.SPLIT_URL_CONFIG_KEY="redirectUrl";var uS=cS;function cS(e){this.campaignParser=e}lS.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return u.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},lS.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},lS.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var pS=lS;function lS(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}hS.prototype.setNeedDispatch=function(e){this.needDispatch=e},hS.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(hS.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},hS.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var fS=hS;function hS(){this.needDispatch=!0}vS.prototype.get=function(){var e=this.storage.getItem(ht);if(u.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}},vS.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(ht,JSON.stringify(e))},vS.prototype.clear=function(){this.storage.removeItem(ht)};var dS=vS;function vS(e,t){this.sdk=e,this.storage=t}var yS=s.log,gS=(mS.prototype.install=function(e){void 0===e&&(e=null);try{var t=this.changeLifecycle.bind(this);window.addEventListener("pageshow",function(){return t("pageshow")}),window.addEventListener("pagehide",function(){return t("pagehide")}),document.addEventListener("visibilitychange",function(){return t(document.visibilityState)}),window.addEventListener("blur",function(){return t("blur")}),window.addEventListener("focus",function(){return t("focus")}),mS.isSafariBrowser(e)&&window.addEventListener("beforeunload",function(){return t("hidden")}),history.pushState=(n=history.pushState,function(){try{var e=n.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&yS.error(e)}}),history.replaceState=(r=history.replaceState,function(){try{var e=r.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&yS.error(e)}}),window.addEventListener("popstate",function(){try{t("locationChange")}catch(e){(e instanceof Error||"string"==typeof e)&&yS.error(e)}})}catch(e){(e instanceof Error||"string"==typeof e)&&yS.error(e)}var r,n},mS.prototype.addListener=function(e){this.listeners.push(e)},mS.prototype.initialize=function(){this._initialized=!0,this.changeLifecycle("pageshow")},mS.prototype.changeLifecycle=function(e){this._initialized&&this.publish(e)},mS.prototype.publish=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onLifecycleChanged(t,r)})},mS.isSafariBrowser=function(e){return!u.isNullOrUndefined(e)&&e.toLowerCase().includes("safari")},mS);function mS(e){void 0===e&&(e=Ve.instance),this.clock=e,this.listeners=[],this._initialized=!1}wS.create=function(e,t,r){return void 0===r&&(r=Ve.instance),new wS(new bS(r,e,t))},wS.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var ES=wS;function wS(e){this.limiter=e}TS.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},TS.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new _S(e+this.intervalMillis,this.limit)),this.currentScope};var bS=TS;function TS(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}NS.prototype.isExpired=function(e){return this.expirationTime<e},NS.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var _S=NS;function NS(e,t){this.expirationTime=e,this.token=t}IS.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var OS=IS;function IS(e){this.determiners=e}AS.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;Ce.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)};ea=AS;function AS(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}Pe(RS,SS=ea),RS.prototype.supports=function(e){return R0.isRemoteConfigEvent(e)},RS.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var SS,PS=RS;function RS(e,t){return void 0===t&&(t=Ve.instance),SS.call(this,e,t)||this}Pe(xS,MS=ea),xS.prototype.supports=function(e){return R0.isExposureEvent(e)},xS.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var MS,CS=xS;function xS(e,t){return void 0===t&&(t=Ve.instance),MS.call(this,e,t)||this}kS.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},kS.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 US=kS;function kS(){}LS.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters,browserProperties:e.browserProperties}}},LS.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var DS=LS;function LS(e){this.invocator=e}var FS=s.log,VS=(jS.prototype.onPageStarted=function(e,t){this.track(e,t)},jS.prototype.onPageEnded=function(e,t){},jS.prototype.track=function(e,t){FS.debug("tracking page view");var r,e={key:jS.PAGE_VIEW_EVENT_KEY,properties:((r={})[jS.PAGE_NAME_PROPERTY_KEY]=e.pageTitle,r)};this.core.track(e,this.userManager.resolve(),t)},jS.PAGE_VIEW_EVENT_KEY="$page_view",jS.PAGE_NAME_PROPERTY_KEY="$page_name",jS);function jS(e,t){this.core=e,this.userManager=t}Object.defineProperty(HS.prototype,"currentPage",{get:function(){var e;return null!=(e=this._currentPage)?e:xo.createWithCurrentPage()},enumerable:!1,configurable:!0}),HS.prototype.updatePage=function(e,t){var r=this._currentPage;r&&e.isEquals(r)||(r&&this.publishEnd(r,t),this._currentPage=e,this.publishStart(e,t))},HS.prototype.publishStart=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageStarted(e,t)},HS.prototype.publishEnd=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageEnded(e,t)},HS.prototype.onLifecycleChanged=function(e,t){switch(e){case"pageshow":case"locationChange":var r=xo.createWithCurrentPage();return this.updatePage(r,t);case"visible":case"pagehide":case"blur":case"focus":case"hidden":return}},HS.prototype.addListener=function(e){this.listeners.push(e)};var BS=HS;function HS(){this.listeners=[],this._currentPage=null}var KS=s.log,GS=(Object.defineProperty(zS.prototype,"lastEngagementTime",{get:function(){return this._lastEngagementTime},enumerable:!1,configurable:!0}),zS.prototype.startEngagement=function(e){KS.debug("startEngagement timestamp:".concat(e,", page:").concat(this.pageManager.currentPage.url)),this._lastEngagementTime=e},zS.prototype.endEngagement=function(e,t){var r;u.isNullOrUndefined(this._lastEngagementTime)||(r=this._lastEngagementTime,(r=(this._lastEngagementTime=t)-r)<this.minimumEngagementDurationMillis||this.publish({page:e,durationMillis:r},this.userManager.resolve(),t))},zS.prototype.publish=function(e,t,r){KS.debug("onEngagement timestamp:".concat(r,", page:").concat(this.pageManager.currentPage.url));for(var n=0,i=this.listeners;n<i.length;n++)i[n].onEngagement(e,t,r)},zS.prototype.onPageStarted=function(e,t){this.startEngagement(t)},zS.prototype.onPageEnded=function(e,t){this.endEngagement(e,t)},zS.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"focus":return this.startEngagement(t);case"pagehide":case"hidden":case"blur":return this.endEngagement(this.pageManager.currentPage,t);case"pageshow":case"locationChange":return}},zS.prototype.addListener=function(e){this.listeners.push(e)},zS);function zS(e,t,r){this.userManager=e,this.pageManager=t,this.minimumEngagementDurationMillis=r,this.listeners=[],this._lastEngagementTime=null}YS.prototype.onEngagement=function(e,t,r){var n,e={key:YS.ENGAGEMENT_EVENT_KEY,properties:((n={})[VS.PAGE_NAME_PROPERTY_KEY]=e.page.pageTitle,n[YS.ENGAGEMENT_TIME_PROPERTY_KEY]=e.durationMillis,n)};this.core.track(e,t,r)},YS.ENGAGEMENT_EVENT_KEY="$engagement",YS.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms";var JS=YS;function YS(e){this.core=e}qS.prototype.setPhoneNumber=function(e,t){e=(new Ao).set(qS.PHONE_NUMBER_PROPERTY_KEY,e.getValue()).build().toSecuredEvent();this.track(e,t)},qS.prototype.unsetPhoneNumber=function(e){var t=(new Ao).unset(qS.PHONE_NUMBER_PROPERTY_KEY).build().toSecuredEvent();this.track(t,e)},qS.prototype.track=function(e,t){var r=this.userManager.resolve();this.core.track(e,r,t)},qS.PHONE_NUMBER_PROPERTY_KEY="$phone_number";var WS=qS;function qS(e,t){this.core=e,this.userManager=t}XS.prototype.getBrowserProperties=function(){return MN.generate(window,xo.createWithCurrentPage())};var $S=XS;function XS(){}ZS.prototype.marketing=function(e){return this.operations.set("$marketing",e),this},ZS.prototype.information=function(e){return this.operations.set("$information",e),this},ZS.prototype.custom=function(e,t){return this.operations.set(e,t),this},ZS.prototype.build=function(){return new QS(this.operations)};Pa=ZS;function ZS(){this.operations=new Map}eP.prototype.toEvent=function(e){var r=new Ao;return this.operations.forEach(function(e,t){r.set(t,e)}),{key:e,properties:u.fromMap(this.operations)}},eP.prototype.toRecord=function(){var r={};return this.operations.forEach(function(e,t){r[t]=e}),r};var QS=eP;function eP(e){this.operations=e}n.HackleSubscriptionStatus=void 0,(T=n.HackleSubscriptionStatus||(n.HackleSubscriptionStatus={})).SUBSCRIBED="SUBSCRIBED",T.UNSUBSCRIBED="UNSUBSCRIBED",T.UNKNOWN="UNKNOWN";var tP=s.log,rP=null;function nP(e,t){var r,t=eA.config(t);eA.logging(t);try{if((r=window)&&"_hackleApp"in r&&null!==r._hackleApp&&"object"==typeof r._hackleApp&&("getAppSdkKey"in r._hackleApp&&"function"==typeof r._hackleApp.getAppSdkKey&&("getInvocationType"in r._hackleApp&&"function"==typeof r._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){var n=e,i=t,o=window._hackleApp;if(null===(a=(new qA).getInvocator(o.getInvocationType(),new US)))throw new Error("Failed to get invocator with invocationType:".concat(o.getInvocationType()));var s=new $S,a=new DS(a),a=new Qo(a,s);if(!o.getAppMode)return a;if((s=o.getAppMode().toLowerCase())===Xo.native)return a;if(s!==Xo.web_view_wrapper)throw new Error("Unsupported HackleAppMode: ".concat(s));return o=iP(n,i),(s=new es(o,a)).syncUser(),s}}catch(e){tP.error("Unexpected exception while check WebApp client: ".concat(e))}return iP(e,t)}function iP(e,t){var r=eA.sdk(e,t);if(rP)return tP.debug("use already exists hackleClient"),rP;var n=new Jo,i=(n.initialize(),new $N),o=Go.getInstance({days:Ze,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=eA.isBeaconSupported(),a=FA.intercept(r,jA.create()),u=FA.intercept(r,HA.create()),c=a,p=(s&&(c=u),new rA),l=new iA(p,new sA("setTimeout"),eA.pollingIntervalMillis(t)),f=new dS(r,ZN.postfix(i,"_".concat(e.slice(0,8)))),h=new dA(iO.clientFetch(t.sdkUrl,r.key),a),f=new TA(f,h),h=(p.add(f),new BS),d=new mA(iO.userTargets(t.sdkUrl),a),v=new yA(iO.userCohorts(t.sdkUrl),a),y=new VI(h),g=new KN(ZN.postfix(o,"_".concat(e))),m=g.getUser(),E=t.user||null,g=new BN(Wo(),g,d,v,y,h,Ve.instance,m,E),d=(p.add(g),new WN(t.sessionTimeoutMillis,ZN.postfix(o,"_".concat(e.slice(8))))),v=(g.addListener(d),new _N(i,"".concat(tt,"_").concat(e),qe)),E=new IA(iO.clientDispatch(t.eventUrl),a),p=E,s=(s&&(p=new IA(iO.beaconDispatch(t.eventUrl,r.key),u)),new SA(v,E)),r=new NA(E,p,s),u=new OS([new PS(eA.dedupIntervalMillis(t)),new CS(eA.dedupIntervalMillis(t))]),v=new UA(r,qe,new sA("setTimeout"),Xe),E=new K0(v,u,d,g),w=new fS,p=new vb(new eO(o,"".concat(at,"_").concat(e.slice(0,8)))),r=new vb(new eO(o,"".concat(ut,"_").concat(e.slice(0,8)))),u=new sO(ZN.prefix(i,"".concat(ct,"_").concat(e.slice(0,8),"_"))),i=new XO(ZN.prefix(i,"".concat(pt,"_").concat(e.slice(0,8),"_"))),b=hN.create(f,E,[p,r],u,i),T=new WS(b,g),e=new MI(new xI(ZN.postfix(o,"_".concat(e.slice(0,8)))),y,b,g),_=new B0(g,b),_=(d.addListener(e),d.addListener(_),new IO(b)),u=new uO([new pO,new fO(new EI),new dO(new EI),new yO(u,Ve.instance),new mO(new bI),new wO(new bI),new TO(new _I),new NO(new _I)]),i=new QO([new tI(i),new oI(u),new nI]),u=new aI(Ve.instance,_,i),_=new lI([new hI,new vI(u),new gI(u)]),i=new zO(iO.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),i=new SO(KO.create(i),u,_),u=new cI(new YO(B_.get("targetMatcher"))),_=new xO(f,u,b),u=(new RO(v,_,i),new XI(f)),_=(new qI(v,u),new GS(g,h,vt)),v=(h.addListener(_),new JS(b)),u=(_.addListener(v),new VS(b,g)),v=(t.automaticPageTracking&&h.addListener(u),new rS(B_.get("targetMatcher"))),o=new pS(o,lt,{days:ft}),f=new eS(f,v,o,b),v=new sS(new uS(y),new OI,o,w),y=new XA(f,v,g,b),o=(h.addListener(y),new rO(b,g,p,r)),y=(null==(f=t.devTool)?void 0:f.userExplorer)&&"function"==typeof(null==(v=t.devTool)?void 0:v.userExplorer),p=t.devTool&&y?{manager:t.devTool,userExplorer:o}:void 0,r=new Fi(iO.monitoring(t.monitoringUrl),a,c,new sA("setTimeout"),$e),N=(_i.addRegistry(r),new gS),f=(N.addListener(h),N.addListener(_),N.addListener(d),N.addListener(n),N.addListener(s),N.addListener(E),N.addListener(r),l.start(),ES.create(dt,1)),O=new Fo(b,l,d,g,T,f,u,i,p),v=(rP=O,(new gN).install(b,g),g.resolve().hackleProperties.browserName);return N.install("string"==typeof v?v:null),y=Date.now(),o=g.currentUser,a=d.currentSessionId,(ON(m,o)?d.startNewSessionIfNeeded(o,y):d.startNewSession(m,o,y))===a&&e.startNewCampaignIfNeeded(o,y),O.onReady(function(){t.autoOpenDevTool&&(t.devTool?O.showUserExplorer():tP.error("DevTool is not provided")),N.initialize(),w.dispatchDoneEventIfNeeded()}),O}var oP=function(e,t){return(oP=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 sP=function(){return(sP=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 aP(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 uP(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 cP(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}pP.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},pP.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},pP.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};ee=pP;function pP(){this.listeners={}}fP.arePropertiesEqual=function(e,t){var r=fP.coerceUnknownToProperties(e),n=fP.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]})},fP.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var lP=fP;function fP(){}dP.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)&&lP.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&lP.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var hP=dP;function dP(){}var vP=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=nP(e,sP(sP({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.46.0"})),r.getSessionId=r.getSessionId.bind(r),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.setUserProperties=r.setUserProperties.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.updatePushSubscriptions=r.updatePushSubscriptions.bind(r),r.updateSmsSubscriptions=r.updateSmsSubscriptions.bind(r),r.updateKakaoSubscriptions=r.updateKakaoSubscriptions.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.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),r.fetch=r.fetch.bind(r),r.close=r.close.bind(r),r.setInAppMessageListener=r.setInAppMessageListener.bind(r),r.getExperiment=r.getExperiment.bind(r),r.setPhoneNumber=r.setPhoneNumber.bind(r),r.unsetPhoneNumber=r.unsetPhoneNumber.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return oP(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getSessionId=function(){return this.client.getSessionId()},i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.setUser(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserId=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.setUserId(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setDeviceId=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.setDeviceId(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserProperty=function(t,r){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.setUserProperty(t,r),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserProperties=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.setUserProperties(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.updateUserProperties=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.updateUserProperties(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.updatePushSubscriptions=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.updatePushSubscriptions(t),[2]})})},i.prototype.updateSmsSubscriptions=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.updateSmsSubscriptions(t),[2]})})},i.prototype.updateKakaoSubscriptions=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.updateKakaoSubscriptions(t),[2]})})},i.prototype.resetUser=function(){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.resetUser(),this.emitUpdatedUser(this.getUser()),[2]})})},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(sP(sP({},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.getExperiment=function(e){return this.client.getExperiment(e)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){hP.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.prototype.setInAppMessageListener=function(e){this.client.setInAppMessageListener(e)},i.prototype.close=function(){this.client.close()},i.prototype.setPhoneNumber=function(t){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.setPhoneNumber(t),[2]})})},i.prototype.unsetPhoneNumber=function(){return aP(this,void 0,void 0,function(){return uP(this,function(e){return this.client.unsetPhoneNumber(),[2]})})},i}(ee);var k={exports:{}},A={},yP=Object.getOwnPropertySymbols,gP=Object.prototype.hasOwnProperty,mP=Object.prototype.propertyIsEnumerable;var g=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]))gP.call(r,o)&&(n[o]=r[o]);if(yP)for(var s=yP(r),a=0;a<s.length;a++)mP.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},EP=g,S="function"==typeof Symbol&&Symbol.for,wP=S?Symbol.for("react.element"):60103,bP=S?Symbol.for("react.portal"):60106,ma=S?Symbol.for("react.fragment"):60107,r=S?Symbol.for("react.strict_mode"):60108,Pu=S?Symbol.for("react.profiler"):60114,TP=S?Symbol.for("react.provider"):60109,_P=S?Symbol.for("react.context"):60110,NP=S?Symbol.for("react.forward_ref"):60112,Kc=S?Symbol.for("react.suspense"):60113,OP=S?Symbol.for("react.memo"):60115,IP=S?Symbol.for("react.lazy"):60116,AP="function"==typeof Symbol&&Symbol.iterator;function SP(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 PP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},RP={};function MP(e,t,r){this.props=e,this.context=t,this.refs=RP,this.updater=r||PP}function CP(){}function xP(e,t,r){this.props=e,this.context=t,this.refs=RP,this.updater=r||PP}MP.prototype.isReactComponent={},MP.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(SP(85));this.updater.enqueueSetState(this,e,t,"setState")},MP.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},CP.prototype=MP.prototype;var Ea=xP.prototype=new CP,UP=(Ea.constructor=xP,EP(Ea,MP.prototype),Ea.isPureReactComponent=!0,{current:null}),kP=Object.prototype.hasOwnProperty,DP={key:!0,ref:!0,__self:!0,__source:!0};function LP(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)kP.call(t,n)&&!DP.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:wP,type:e,key:o,ref:s,props:i,_owner:UP.current}}function FP(e){return"object"==typeof e&&null!==e&&e.$$typeof===wP}var VP=/\/+/g,jP=[];function BP(e,t,r,n){var i;return jP.length?((i=jP.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 HP(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,jP.length<10&&jP.push(e)}function KP(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 wP:case bP:o=!0}}if(o)return n(i,t,""===r?"."+GP(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+GP(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=AP&&t[AP]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+GP(a,s++),n,i);else if("object"===a)throw n=""+t,Error(SP(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function GP(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 zP(e,t){e.func.call(e.context,t,e.count++)}function JP(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?YP(e,n,r,function(e){return e}):null!=e&&(FP(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(VP,"$&/")+"/")+r,e={$$typeof:wP,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function YP(e,t,r,n,i){var o="";KP(e,JP,t=BP(t,o=null!=r?(""+r).replace(VP,"$&/")+"/":o,n,i)),HP(t)}var WP={current:null};function qP(){var e=WP.current;if(null===e)throw Error(SP(321));return e}var $P,XP,ZP,Eu={ReactCurrentDispatcher:WP,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:UP,IsSomeRendererActing:{current:!1},assign:EP},_=(A.Children={map:function(e,t,r){if(null==e)return e;var n=[];return YP(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;KP(e,zP,t=BP(null,null,t,r)),HP(t)},count:function(e){return KP(e,function(){return null},null)},toArray:function(e){var t=[];return YP(e,t,null,function(e){return e}),t},only:function(e){if(FP(e))return e;throw Error(SP(143))}},A.Component=MP,A.Fragment=ma,A.Profiler=Pu,A.PureComponent=xP,A.StrictMode=r,A.Suspense=Kc,A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Eu,A.cloneElement=function(e,t,r){if(null==e)throw Error(SP(267,e));var n=EP({},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=UP.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)kP.call(t,a)&&!DP.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:wP,type:e.type,key:i,ref:o,props:n,_owner:s}},A.createContext=function(e,t){return(e={$$typeof:_P,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:TP,_context:e},e.Consumer=e},A.createElement=LP,A.createFactory=function(e){var t=LP.bind(null,e);return t.type=e,t},A.createRef=function(){return{current:null}},A.forwardRef=function(e){return{$$typeof:NP,render:e}},A.isValidElement=FP,A.lazy=function(e){return{$$typeof:IP,_ctor:e,_status:-1,_result:null}},A.memo=function(e,t){return{$$typeof:OP,type:e,compare:void 0===t?null:t}},A.useCallback=function(e,t){return qP().useCallback(e,t)},A.useContext=function(e,t){return qP().useContext(e,t)},A.useDebugValue=function(){},A.useEffect=function(e,t){return qP().useEffect(e,t)},A.useImperativeHandle=function(e,t,r){return qP().useImperativeHandle(e,t,r)},A.useLayoutEffect=function(e,t){return qP().useLayoutEffect(e,t)},A.useMemo=function(e,t){return qP().useMemo(e,t)},A.useReducer=function(e,t,r){return qP().useReducer(e,t,r)},A.useRef=function(e){return qP().useRef(e)},A.useState=function(e){return qP().useState(e)},A.version="16.14.0",{}),b=Function.call.bind(Object.prototype.hasOwnProperty),QP=function(){};function eR(e,t,r,n,i){if("production"!==production)for(var o in e)if(ZP(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,$P)}catch(e){s=e}!s||s instanceof Error||QP((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 XP)&&(XP[s.message]=!0,o=i?i():"",QP("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&($P="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",XP={},ZP=b,QP=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),eR.resetWarningCache=function(){"production"!==production&&(XP={})},"production"!==production){var tR=g,rR=eR,E="function"==typeof Symbol&&Symbol.for,nR=E?Symbol.for("react.element"):60103,iR=E?Symbol.for("react.portal"):60106,oR=E?Symbol.for("react.fragment"):60107,sR=E?Symbol.for("react.strict_mode"):60108,aR=E?Symbol.for("react.profiler"):60114,uR=E?Symbol.for("react.provider"):60109,cR=E?Symbol.for("react.context"):60110,pR=E?Symbol.for("react.concurrent_mode"):60111,lR=E?Symbol.for("react.forward_ref"):60112,fR=E?Symbol.for("react.suspense"):60113,hR=E?Symbol.for("react.suspense_list"):60120,dR=E?Symbol.for("react.memo"):60115,vR=E?Symbol.for("react.lazy"):60116,yR=E?Symbol.for("react.block"):60121,gR=E?Symbol.for("react.fundamental"):60117,mR=E?Symbol.for("react.responder"):60118,ER=E?Symbol.for("react.scope"):60119,wR="function"==typeof Symbol&&Symbol.iterator,bR="@@iterator";function TR(e){if(null===e||"object"!=typeof e)return null;e=wR&&e[wR]||e[bR];return"function"==typeof e?e:null}var _R={current:null},NR={current:null},OR=/^(.*)[\\\/]/,IR=1;function AR(e){if(null==e)return null;if("number"==typeof e.tag&&xR("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 oR:return"Fragment";case iR:return"Portal";case aR:return"Profiler";case sR:return"StrictMode";case fR:return"Suspense";case hR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case cR:return"Context.Consumer";case uR:return"Context.Provider";case lR:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case dR:return AR(e.type);case yR:return AR(e.render);case vR:r=(t=e)._status===IR?t._result:null;if(r)return AR(r)}var t,r;return null}var SR={},PR=null;function RR(e){PR=e}SR.getCurrentStack=null,SR.getStackAddendum=function(){var e,t,r,n,i,o="",s=(PR&&(e=AR(PR.type),r=PR._owner,o+=(e=e,t=PR._source,r=r&&AR(r.type),i="",t?(n=(s=t.fileName).replace(OR,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(OR))&&(s=s[1])?s.replace(OR,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),SR.getCurrentStack);return s&&(o+=s()||""),o};var MR={ReactCurrentDispatcher:_R,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:NR,IsSomeRendererActing:{current:!1},assign:tR};function CR(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];UR("warn",e,r)}function xR(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];UR("error",e,r)}function UR(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=MR.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){}}tR(MR,{ReactDebugCurrentFrame:SR,ReactComponentTreeHook:{}});var kR={};function DR(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;kR[r]||(xR("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),kR[r]=!0)}var LR={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){DR(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){DR(e,"replaceState")},enqueueSetState:function(e,t,r,n){DR(e,"setState")}},FR={};function VR(e,t,r){this.props=e,this.context=t,this.refs=FR,this.updater=r||LR}Object.freeze(FR),VR.prototype.isReactComponent={},VR.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")},VR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var jR,BR={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(jR in BR)BR.hasOwnProperty(jR)&&!function(e,t){Object.defineProperty(VR.prototype,e,{get:function(){CR("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(jR,BR[jR]);function HR(){}function KR(e,t,r){this.props=e,this.context=t,this.refs=FR,this.updater=r||LR}HR.prototype=VR.prototype,(E=KR.prototype=new HR).constructor=KR,tR(E,VR.prototype),E.isPureReactComponent=!0;var GR,zR,JR=Object.prototype.hasOwnProperty,YR={key:!0,ref:!0,__self:!0,__source:!0};function WR(e){if(JR.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function qR(e){if(JR.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var $R={},XR=function(e,t,r,n,i,o,s){e={$$typeof:nR,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 ZR(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in WR(t)&&(s=t.ref,"string"==typeof(c=t).ref&&NR.current&&c.__self&&NR.current.stateNode!==c.__self&&(l=AR(NR.current.type),$R[l]||(xR('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',AR(NR.current.type),c.ref),$R[l]=!0))),qR(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)JR.call(t,n)&&!YR.hasOwnProperty(n)&&(i[n]=t[n]);var c,p,l,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 g(){zR||(zR=!0,xR("%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)",p))}function m(){GR||(GR=!0,xR("%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&&(l=i,f=c,m.isReactWarning=!0,Object.defineProperty(l,"key",{get:m,configurable:!0})),s&&(r=i,p=c,g.isReactWarning=!0,Object.defineProperty(r,"ref",{get:g,configurable:!0}))),XR(e,o,s,a,u,NR.current,i)}function QR(e){return"object"==typeof e&&null!==e&&e.$$typeof===nR}var eM=".",tM=":",rM=!1,nM=/\/+/g;function iM(e){return(""+e).replace(nM,"$&/")}var oM=10,sM=[];function aM(e,t,r,n){var i;return sM.length?((i=sM.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 uM(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,sM.length<oM&&sM.push(e)}function cM(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 nR:case iR:a=!0}}if(a)return n(i,t,""===r?eM+pM(t,0):r),1;var u=0,c=""===r?eM:r+tM;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(o=t[p],c+pM(o,p),n,i);else if("function"==typeof(r=TR(t))){r===t.entries&&(rM||CR("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."),rM=!0);for(var l,f=r.call(t),h=0;!(l=f.next()).done;)u+=e(o=l.value,c+pM(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+SR.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 pM(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 lM(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function fM(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)?hM(o,n,r,function(e){return e}):null!=o&&(QR(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":iM(o.key)+"/")+r,o=XR(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function hM(e,t,r,n,i){var o="",t=aM(t,o=null!=r?iM(r)+"/":o,n,i);cM(e,fM,t),uM(t)}function dM(e){return"string"==typeof e||"function"==typeof e||e===oR||e===pR||e===aR||e===sR||e===fR||e===hR||"object"==typeof e&&null!==e&&(e.$$typeof===vR||e.$$typeof===dR||e.$$typeof===uR||e.$$typeof===cR||e.$$typeof===lR||e.$$typeof===gR||e.$$typeof===mR||e.$$typeof===ER||e.$$typeof===yR)}function vM(){var e=_R.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 yM(){if(NR.current){var e=AR(NR.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var gM=!1,mM={};function EM(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=yM())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),mM[t=r]||(mM[t]=!0,r="",e&&e._owner&&e._owner!==NR.current&&(r=" It was passed a child from "+AR(e._owner.type)+"."),RR(e),xR('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),RR(null)))}function wM(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];QR(n)&&EM(n,t)}else if(QR(e))e._store&&(e._store.validated=!0);else if(e){var i=TR(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)QR(o.value)&&EM(o.value,t)}}function bM(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=AR(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==lR&&t.$$typeof!==dR)return;r=t.propTypes}r?(RR(e),rR(r,e.props,"prop",n,SR.getStackAddendum),RR(null)):void 0===t.PropTypes||gM||(gM=!0,xR("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||xR("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function TM(e,t,r){var n,i=dM(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+".":"")||yM(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===nR?(s="<"+(AR(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,xR("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)),ZR.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)wM(arguments[o],e);if(e===oR){var s=t;RR(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){xR("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&xR("Invalid attribute `ref` supplied to `React.Fragment`."),RR(null)}else bM(t);return t}var _M=!1;try{var NM=Object.freeze({}),OM=new Map([[NM,null]]),IM=new Set([NM]);OM.set(0,0),IM.add(0)}catch(e){}function AM(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=tR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,p=e._owner;if(null!=t)for(n in WR(t)&&(a=t.ref,p=NR.current),qR(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)JR.call(t,n)&&!YR.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var l=arguments.length-2;if(1==l)o.children=r;else if(1<l){for(var f=Array(l),h=0;h<l;h++)f[h]=arguments[h+2];o.children=f}return XR(e.type,s,a,u,c,p,o)}.apply(this,arguments),i=2;i<arguments.length;i++)wM(arguments[i],n.type);return bM(n),n}function SM(e){var t=TM.bind(null,e);return t.type=e,_M||(_M=!0,CR("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 CR("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}E=TM,_.Children={map:function(e,t,r){if(null==e)return e;var n=[];return hM(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=aM(null,null,t,r),cM(e,lM,t),uM(t)},count:function(e){return cM(e,function(){return null},null)},toArray:function(e){var t=[];return hM(e,t,null,function(e){return e}),t},only:function(e){if(QR(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},_.Component=VR,_.Fragment=oR,_.Profiler=aR,_.PureComponent=KR,_.StrictMode=sR,_.Suspense=fR,_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MR,_.cloneElement=AM,_.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&xR("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:cR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:uR,_context:r}),i=!1,t={$$typeof:cR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,xR("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,xR("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},_.createElement=E,_.createFactory=SM,_.createRef=function(){var e={current:null};return Object.seal(e),e},_.forwardRef=function(e){return null!=e&&e.$$typeof===dR?xR("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?xR("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&xR("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||xR("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:lR,render:e}},_.isValidElement=QR,_.lazy=function(e){var t,r,n={$$typeof:vR,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){xR("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){xR("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},_.memo=function(e,t){return dM(e)||xR("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:dR,type:e,compare:void 0===t?null:t}},_.useCallback=function(e,t){return vM().useCallback(e,t)},_.useContext=function(e,t){var r,n=vM();return void 0!==t&&xR("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?xR("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&&xR("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},_.useDebugValue=function(e,t){return vM().useDebugValue(e,t)},_.useEffect=function(e,t){return vM().useEffect(e,t)},_.useImperativeHandle=function(e,t,r){return vM().useImperativeHandle(e,t,r)},_.useLayoutEffect=function(e,t){return vM().useLayoutEffect(e,t)},_.useMemo=function(e,t){return vM().useMemo(e,t)},_.useReducer=function(e,t,r){return vM().useReducer(e,t,r)},_.useRef=function(e){return vM().useRef(e)},_.useState=function(e){return vM().useState(e)},_.version="16.14.0"}"production"===production?k.exports=A:k.exports=_;var PM=k.exports,RM=k.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),Oa=RM.Consumer,MM=RM.Provider;var CM=s.log;function xM(e,t){e=UM(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function UM(e,t){void 0===t&&(t="A");var r=k.exports.useContext(RM),n=r.hackle,i=r.userVersion,o=r.initialized,s=k.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||_t.of(t,l.EXCEPTION):_t.of(t,l.SDK_NOT_READY)},[t,e,n,o]),r=cP(k.exports.useState(function(){return n?s():(CM.error("HackleClient is not existed"),_t.of(t,l.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=cP(k.exports.useState(i),2),c=u[0],u=u[1];return LM(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function kM(e){e=DM(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function DM(e){var t=k.exports.useContext(RM),r=t.hackle,n=t.userVersion,i=t.initialized,o=k.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||Ot.off(l.EXCEPTION):Ot.off(l.SDK_NOT_READY)},[e,r,i]),t=cP(k.exports.useState(function(){return r?o():(CM.error("HackleClient is not existed"),Ot.off(l.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=cP(k.exports.useState(n),2),u=a[0],a=a[1];return LM(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function LM(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function FM(e){var t,r=e.experimentKey,e=e.children,n=(r=xM(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(k.exports.Children.forEach(e,function(e){k.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?k.exports.cloneElement(t,{variation:i}):null)}function VM(e){return e.variation,e=e.children,k.exports.createElement(k.exports.Fragment,null,e)}function jM(e){var t=(r=kM(e.featureKey)).isLoading,r=r.isOn;return t?null:PM.createElement(PM.Fragment,null,e.children(r))}n.Bucket=Dt,n.Cohort=Dn,n.Container=ur,n.ContainerGroup=pr,n.CoreVersion=wr,n.Decision=_t,n.DecisionReason=l,n.EXPERIMENT_IMPLEMENTATION_TYPE=Mt,n.EmptyHackleRemoteConfig=At,n.EmptyParameterConfig=Be,n.EventType=jt,n.Experiment=Ct,n.FeatureFlagDecision=Ot,n.HackleContext=RM,n.HackleContextConsumer=Oa,n.HackleContextProvider=MM,n.HackleExperiment=FM,n.HackleFeature=jM,n.HackleInAppMessageActionImpl=Un,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=cP(k.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return k.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),k.exports.useEffect(function(){function e(){a(function(e){return sP(sP({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),k.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return sP(sP({},e),{initialized:!0})})},function(){a(function(e){return sP(sP({},e),{initialized:!0})})}).catch(function(){a(function(e){return sP(sP({},e),{initialized:!0})})})},[t]),i||s.initialized?PM.createElement(MM,{value:s},e):null},n.HackleSubscriptionOperations=QS,n.HackleSubscriptionOperationsBuilder=Pa,n.HackleVariation=VM,n.IAM_ACTION_AREA=["BUTTON","IMAGE","MESSAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Vr,n.IAM_BEHAVIOR=Fr,n.IAM_DISPLAY_TYPE=kr,n.IAM_HORIZONTAL_ALIGNMENT=Br,n.IAM_LAYOUT_TYPE=Dr,n.IAM_ORIENTATION=Lr,n.IAM_PLATFORM_TYPE=xr,n.IAM_STATUS=Cr,n.IAM_TIMEUNIT=Ur,n.IAM_VERTICAL_ALIGNMENT=jr,n.IdentifierType=Ht,n.IdentifiersBuilder=zt,n.InAppMessage=Hr,n.InAppMessageAction=Cn,n.InAppMessageAlignment=vn,n.InAppMessageBackground=Mn,n.InAppMessageButton=In,n.InAppMessageButtonStyle=Rn,n.InAppMessageContext=un,n.InAppMessageContextLayout=hn,n.InAppMessageContextMessage=ln,n.InAppMessageDecision=bt,n.InAppMessageDurationCap=tn,n.InAppMessageEventFrequencyCap=Xr,n.InAppMessageEventTrigger=Wr,n.InAppMessageEventTriggerRule=qr,n.InAppMessageExperimentContext=pn,n.InAppMessageIdentifierCap=Qr,n.InAppMessageImage=gn,n.InAppMessageImageAutoScroll=En,n.InAppMessagePeriodAlways=Gr,n.InAppMessagePeriodCustom=Jr,n.InAppMessagePositionalButton=Sn,n.InAppMessageTargetContext=nn,n.InAppMessageText=bn,n.InAppMessageTextAttribute=_n,n.InAppMessageTextStyle=On,n.InAppMessageUserOverride=sn,n.Logger=s,n.MATCH_OPERATORS=Ir,n.MATCH_TYPES=Nr,n.MATCH_VALUE_TYPES=Or,n.MetaVersion=Tr,n.ParameterConfiguration=Pt,n.PropertyOperations=Po,n.PropertyOperationsBuilder=Ao,n.RemoteConfigDecision=Et,n.RemoteConfigParameter=fr,n.RemoteConfigParameterValue=yr,n.RemoteConfigTargetRule=dr,n.SEGMENT_TYPES=Pr,n.Segment=sr,n.Slot=Ft,n.SplitUrlConfig=Ln,n.SplitUrlTargets=Vn,n.TARGET_ACTION_TYPES=Ar,n.TARGET_KEY_TYPES=Sr,n.Target=Wt,n.TargetAction=rr,n.TargetCondition=$t,n.TargetKey=Zt,n.TargetMatch=er,n.TargetRule=ir,n.TargetingType=Rr,n.UserTargetEvent=Bn,n.Variation=Ut,n.Version=mr,n.createInstance=function(e,t){return new vP(e,t)},n.getUserId=Wo,n.removeUserId=qo,n.resolveIdentifiers=Gt,n.sanitizeUser=Yt,n.setUserId=function(e){Go.getInstance().setItem(et,e)},n.useFeature=function(e){var t=(n=k.exports.useContext(RM)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=cP(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&CM.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=cP(k.exports.useState(r),2))[0],n=n[1];return LM(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=k.exports.useContext(RM)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||Ot.off(l.EXCEPTION)},[e,t,n]),o=(s=cP(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&CM.error("HackleClient is not existed"),Ot.off(l.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=cP(k.exports.useState(r),2))[0],n=n[1];return LM(a,r)||(n(r),s(i())),o},n.useLoadableFeature=kM,n.useLoadableFeatureDetail=DM,n.useLoadableRemoteConfig=function(){var e=(o=k.exports.useContext(RM)).hackle,t=o.userVersion,r=o.initialized,n=k.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new At},[e,r]),i=(o=cP(k.exports.useState(function(){return e||CM.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=cP(k.exports.useState(t),2))[0],a=a[1];return LM(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=xM,n.useLoadableVariationDetail=UM,n.useRemoteConfig=function(){var e=(r=k.exports.useContext(RM)).hackle,t=r.userVersion,r=r.initialized,n=k.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new At},[e,r]),i=(o=cP(k.exports.useState(function(){return e||CM.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=cP(k.exports.useState(t),2))[0],r=r[1];return LM(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=k.exports.useContext(RM).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(CM.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=k.exports.useContext(RM)).hackle,n=a.userVersion,i=a.initialized,o=k.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=cP(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&CM.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=cP(k.exports.useState(n),2))[0],c=c[1];return LM(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=k.exports.useContext(RM)).hackle,n=i.userVersion,i=i.initialized,o=k.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||_t.of(t,l.EXCEPTION)},[t,e,r,i]),s=(a=cP(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&CM.error("HackleClient is not existed"),_t.of(t,l.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=cP(k.exports.useState(n),2))[0],i=i[1];return LM(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 B(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 K(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 B(n)}var e="3.7.5",H="function"==typeof atob,t="function"==typeof btoa,G="function"==typeof Buffer;const z="function"==typeof TextDecoder?new TextDecoder:void 0,J="function"==typeof TextEncoder?new TextEncoder:void 0;const q=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Y=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(q),W=/^(?:[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)),Z=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Q=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var ee=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+=q[r>>18&63]+q[r>>12&63]+q[r>>6&63]+q[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const te=t?e=>btoa(e):G?e=>Buffer.from(e,"binary").toString("base64"):ee,re=G?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 te(n.join(""))},ne=(e,t=!1)=>t?Z(re(e)):re(e),ie=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))},oe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,se=e=>e.replace(oe,ie),ae=G?e=>Buffer.from(e,"utf8").toString("base64"):J?e=>re(J.encode(e)):e=>te(se(e)),ue=(e,t=!1)=>t?Z(ae(e)):ae(e);t=e=>ue(e,!0);const ce=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,pe=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))}},le=e=>e.replace(ce,pe);var r=t=>{if(t=t.replace(/\s+/g,""),!W.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 fe=H?e=>atob(Q(e)):G?e=>Buffer.from(e,"base64").toString("binary"):r,he=G?e=>X(Buffer.from(e,"base64")):e=>X(fe(e).split("").map(e=>e.charCodeAt(0))),de=e=>he(ye(e)),ve=G?e=>Buffer.from(e,"base64").toString("utf8"):z?e=>z.decode(he(e)):e=>le(fe(e)),ye=e=>Q(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ge=e=>ve(ye(e));function me(){var e=(e,t)=>Object.defineProperty(String.prototype,e,we(t));e("fromBase64",function(){return ge(this)}),e("toBase64",function(e){return ue(this,e)}),e("toBase64URI",function(){return ue(this,!0)}),e("toBase64URL",function(){return ue(this,!0)}),e("toUint8Array",function(){return de(this)})}function Ee(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,we(t));e("toBase64",function(e){return ne(this,e)}),e("toBase64URI",function(){return ne(this,!0)}),e("toBase64URL",function(){return ne(this,!0)})}const we=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const be={version:e,VERSION:"3.7.5",atob:fe,atobPolyfill:r,btoa:te,btoaPolyfill:ee,fromBase64:ge,toBase64:ue,encode:ue,encodeURI:t,encodeURL:t,utob:se,btou:le,decode:ge,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:ne,toUint8Array:de,extendString:me,extendUint8Array:Ee,extendBuiltins:()=>{me(),Ee()}};Te.isNotNullOrUndefined=function(e){return null!=e},Te.isNullOrUndefined=function(e){return null==e},Te.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},Te.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var u=Te;function Te(){}_e.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);u.isNotNullOrUndefined(o)&&r.push(o)}return r},_e.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r},_e.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},_e.associate=function(e,t){return this.associateTo(e,new Map,t)},_e.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},_e.associateRecord=function(e,t){for(var r={},n=0,i=e;n<i.length;n++){var o=t(i[n]),s=o[0],o=o[1];r[s]=o}return r},_e.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},_e.sum=function(e,r){return e.reduce(function(e,t){return e+r(t)},0)};var f=_e;function _e(){}var Ie={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(Ae.setLogLevel=function(e){this.logLevel=e=void 0===e?Ie.INFO:e},Ae.initCounter=function(t){this.counters=f.associate(Object.keys(Ie),function(e){return[e,t(e)]})},Ae._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)Oe.log(e,r,t.message,t);else try{Oe.log(e,r,t)}catch(e){}},Ae.increment=function(e){var t;null!=(t=null==(t=Ae.counters)?void 0:t.get(e))&&t.increment()},Ae.logLevel=Ie.INFO,Ae.log={error:function(e){Ie.ERROR<=Ae.logLevel&&(Ae._log("ERROR",e),Ae.increment("ERROR"))},warn:function(e){Ie.WARN<=Ae.logLevel&&(Ae._log("WARN",e),Ae.increment("WARN"))},info:function(e){Ie.INFO<=Ae.logLevel&&(Ae._log("INFO",e),Ae.increment("INFO"))},debug:function(e){Ie.DEBUG<=Ae.logLevel&&(Ae._log("DEBUG",e),Ae.increment("DEBUG"))}},Ae);function Ae(){}Ne.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Oe=Ne;function Ne(){}var Se=function(e,t){return(Se=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 i(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}Se(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 a(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 p(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 Pe(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 Re=s.log,Me=(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(u.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),u.isNullOrUndefined(i)?Re.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Re.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!u.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 xe=s.log,Ue=(ke.sanitize=function(e){var t={};if(u.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){xe.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),u.isNullOrUndefined(i)?xe.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):xe.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},ke.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},ke.isValidKey=function(e){return u.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},ke.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},ke.isValidValue=function(e){return!u.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))},ke.isValidElement=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},ke.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},ke.SYSTEM_PROPERTY_KEY_PREFIX="$",ke.MAX_PROPERTIES_COUNT=128,ke.MAX_PROPERTY_KEY_LENGTH=128,ke.MAX_PROPERTY_VALUE_LENGTH=1024,ke);function ke(){}var De=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],Le=(o.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(o.C1/o.C0);case"milliseconds":return e/(o.C2/o.C0);case"seconds":return e/(o.C3/o.C0);case"minutes":return e/(o.C4/o.C0);case"hours":return e/(o.C5/o.C0);case"days":return e/(o.C6/o.C0)}},o.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C1/o.C0);case"milliseconds":return e/(o.C2/o.C1);case"microseconds":return e;case"seconds":return e/(o.C3/o.C1);case"minutes":return e/(o.C4/o.C1);case"hours":return e/(o.C5/o.C1);case"days":return e/(o.C6/o.C1)}},o.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C2/o.C0);case"microseconds":return e*(o.C2/o.C1);case"milliseconds":return e;case"seconds":return e/(o.C3/o.C2);case"minutes":return e/(o.C4/o.C2);case"hours":return e/(o.C5/o.C2);case"days":return e/(o.C6/o.C2)}},o.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C3/o.C0);case"microseconds":return e*(o.C3/o.C1);case"milliseconds":return e*(o.C3/o.C2);case"seconds":return e;case"minutes":return e/(o.C4/o.C3);case"hours":return e/(o.C5/o.C3);case"days":return e/(o.C6/o.C3)}},o.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C4/o.C0);case"microseconds":return e*(o.C4/o.C1);case"milliseconds":return e*(o.C4/o.C2);case"seconds":return e*(o.C4/o.C3);case"minutes":return e;case"hours":return e/(o.C5/o.C4);case"days":return e/(o.C6/o.C4)}},o.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C5/o.C0);case"microseconds":return e*(o.C5/o.C1);case"milliseconds":return e*(o.C5/o.C2);case"seconds":return e*(o.C5/o.C3);case"minutes":return e*(o.C5/o.C4);case"hours":return e;case"days":return e/(o.C6/o.C5)}},o.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C6/o.C0);case"microseconds":return e*(o.C6/o.C1);case"milliseconds":return e*(o.C6/o.C2);case"seconds":return e*(o.C6/o.C3);case"minutes":return e*(o.C6/o.C4);case"hours":return e*(o.C6/o.C5);case"days":return e}},o.C6=24*(o.C5=60*(o.C4=60*(o.C3=1e3*(o.C2=1e3*(o.C1=1e3*(o.C0=1)))))),o.converter={nanoseconds:o.nanosToUnit,microseconds:o.microsToUnit,milliseconds:o.millisToUnit,seconds:o.secondsToUnit,minutes:o.minutesToUnit,hours:o.hoursToUnit,days:o.daysToUnit},o);function o(){}Ve.prototype.tick=function(){return 1e3*Date.now()},Ve.prototype.currentMillis=function(){return Date.now()},Ve.instance=new Ve;var Fe=Ve;function Ve(){}Be.prototype.get=function(e,t){return t};var je=Be;function Be(){this.parameters={}}He.prototype.get=function(e,t){e=this.parameters[e];return!u.isNullOrUndefined(e)&&(u.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var Ke=He;function He(e){this.parameters=e}var Ge="X-HACKLE-SDK-KEY",ze="X-HACKLE-SDK-NAME",Je="X-HACKLE-SDK-VERSION",qe="X-HACKLE-SDK-TIME",Ye=100,We=6e4,$e=500,Xe=3650,Ze="_hackle_hid",Qe="_hackle_id",et="hackle-repository-storage",tt="_hackle_session_id",rt="_hackle_last_event_ts",nt="_hackle_uid",it="_hackle_did",ot="_hackle_mkt",st="hackle-manual-override_ab",at="hackle-manual-override_ff",ut="hackle-iam-hide",ct="hackle-iam-impression",pt="hackle-split-url-redirected",lt=1/86400*3,ft="hackle-workspace-config",ht=6e4,dt=1e3,vt="hackle-campaign-delay",yt=s.log;function gt(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||yt.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function mt(e,t){if(!u.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=gt(e,i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r}}wt.of=function(e,t){return new wt(e,t)};var Et=wt;function wt(e,t){this.value=e,this.reason=t}Tt.of=function(e,t,r,n){return new Tt(e,t,r=void 0===r?new je:r,n=void 0===n?void 0:n)},Object.defineProperty(Tt.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),Tt.prototype.get=function(e,t){return this.config.get(e,t)};var bt=Tt;function Tt(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}It.on=function(e,t,r){return new It(!0,e,t=void 0===t?new je:t,r=void 0===r?void 0:r)},It.off=function(e,t,r){return new It(!1,e,t=void 0===t?new je:t,r=void 0===r?void 0:r)},Object.defineProperty(It.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),It.prototype.get=function(e,t){return this.config.get(e,t)};var _t=It;function It(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}Ot.prototype.get=function(e,t){return t};var At=Ot;function Ot(){}Object.defineProperty(St.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),St.fromJson=function(e){return new St(e.id,new Ke(f.associateRecord(e.parameters,function(e){return[e.key,e.value]})))},St.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var Nt=St;function St(e,t){this.id=e,this.config=t}h.SDK_NOT_READY="SDK_NOT_READY",h.EXCEPTION="EXCEPTION",h.INVALID_INPUT="INVALID_INPUT",h.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",h.TYPE_MISMATCH="TYPE_MISMATCH",h.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",h.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",h.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",h.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",h.OVERRIDDEN="OVERRIDDEN",h.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",h.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",h.VARIATION_DROPPED="VARIATION_DROPPED",h.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",h.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",h.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",h.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",h.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",h.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",h.TARGET_RULE_MATCH="TARGET_RULE_MATCH",h.DEFAULT_RULE="DEFAULT_RULE",h.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",h.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",h.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",h.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",h.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",h.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",h.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",h.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",h.IN_APP_MESSAGE_FREQUENCY_CAPPED="IN_APP_MESSAGE_FREQUENCY_CAPPED",h.EXPERIMENT_CONTROL_GROUP="EXPERIMENT_CONTROL_GROUP";var l=h;function h(){}var Pt=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],Rt=(Mt.fromJson=function(e,t,r){var n=Mt.experimentStatusOrNull(t.execution.status),i=t.variations.map(function(t){return new Ct(t.id,t.key,"DROPPED"===t.status,r.find(function(e){return e.id===t.parameterConfigurationId}))}),o=f.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),s=f.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return rr.fromJson(e,Sr.IDENTIFIER)}),a=f.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return Jt.fromJson(e,Sr.PROPERTY)}),u=Hn.fromJson(t.execution.targetUrls),c=gt(Pt,t.implementationType),p=f.mapNotNullOrUndefined(t.execution.targetRules,function(e){return rr.fromJson(e,Sr.PROPERTY)}),l=er.fromJson(t.execution.defaultRule);return n&&c&&l&&new Mt(t.id,t.key,e,t.identifierType,n,t.version,t.execution.version,i,o,s,a,u,p,l,t.containerId,c,t.winnerVariationId)},Mt.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void yt.debug("Unsupported status [".concat(e,"]"))}},Mt.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},Mt.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},Mt.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},Mt);function Mt(e,t,r,n,i,o,s,a,u,c,p,l,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=p,this.splitUrlTargets=l,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=v,this.winnerVariationId=y}Object.defineProperty(xt.prototype,"parameters",{get:function(){var e;return null!=(e=null==(e=this.config)?void 0:e.parameters)?e:{}},enumerable:!1,configurable:!0});var Ct=xt;function xt(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.config=n}kt.fromJson=function(e){return new kt(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new Dt(t,r,e)}))};var Ut=kt;function kt(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}Lt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var Dt=Lt;function Lt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}Vt.fromJson=function(e){return new Vt(e.id,e.key)};var Ft=Vt;function Vt(e,t){this.id=e,this.key=t}Bt.ID="$id",Bt.USER="$userId",Bt.DEVICE="$deviceId",Bt.SESSION="$sessionId",Bt.HACKLE_DEVICE="$hackleDeviceId";var jt=Bt;function Bt(){}function Kt(e){var t=new Ht;return t.addIdentifiers(e.identifiers||{}),t.add(jt.ID,e.id),t.add(jt.DEVICE,e.deviceId),u.isNotNullOrUndefined(e.userId)&&t.add(jt.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=Me.sanitizeValue(t);return Me.isValidType(e)&&r?this.identifiers[e]=t:yt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},Gt.prototype.build=function(){return this.identifiers};var Ht=Gt;function Gt(){this.identifiers={}}function zt(e){var t,r={};return r.id=null!=(t=Me.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=Me.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=Me.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Ue.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=Me.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}qt.fromJson=function(e,t){return new qt(f.mapNotNullOrUndefined(e.conditions,function(e){return Yt.fromJson(e,t)}))},qt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var Jt=qt;function qt(e){this.conditions=e}Wt.fromJson=function(e,t){var r=$t.fromJson(e.key);if(r&&t.supports(r.type))return(t=Zt.fromJson(e.match))&&new Wt(r,t)},Wt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Yt=Wt;function Wt(e,t){this.key=e,this.match=t}Xt.fromJson=function(e){var t=gt(Or,e.type);return t&&new Xt(t,e.name)},Xt.prototype.toJson=function(){return{type:this.type,name:this.name}};var $t=Xt;function Xt(e,t){this.type=e,this.name=t}Qt.fromJson=function(e){var t=gt(Tr,e.type),r=gt(Ir,e.operator),n=gt(_r,e.valueType);return t&&r&&n&&new Qt(t,r,n,e.values)},Qt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var Zt=Qt;function Qt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}tr.fromJson=function(e){var t=gt(Ar,e.type);return t&&new tr(t,e.variationId,e.bucketId)};var er=tr;function tr(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}nr.fromJson=function(e,t){t=Jt.fromJson(e.target,t),e=er.fromJson(e.action);return t&&e&&new nr(t,e)};var rr=nr;function nr(e,t){this.target=e,this.action=t}or.fromJson=function(e){var t=gt(Nr,e.type);return t&&new or(e.id,e.key,t,f.mapNotNullOrUndefined(e.targets,function(e){return Jt.fromJson(e,Sr.SEGMENT)}))};var ir=or;function or(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}ar.fromJson=function(e){return new ar(e.id,e.bucketId,e.groups.map(function(e){return ur.fromJson(e)}))},ar.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var sr=ar;function ar(e,t,r){this.id=e,this.bucketId=t,this.groups=r}cr.fromJson=function(e){return new cr(e.id,e.experiments)};var ur=cr;function cr(e,t){this.id=e,this.experiments=t}lr.fromJson=function(e){var t=gt(_r,e.type),r=f.mapNotNullOrUndefined(e.targetRules,function(e){return fr.fromJson(e,Sr.PROPERTY)}),n=dr.fromJson(e.defaultValue);return t&&new lr(e.id,e.key,t,e.identifierType,r,n)};var pr=lr;function lr(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}hr.fromJson=function(e,t){t=Jt.fromJson(e.target,t);return t&&new hr(e.key,e.name,t,e.bucketId,dr.fromJson(e.value))};var fr=hr;function hr(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}vr.fromJson=function(e){return new vr(e.id,e.value)};var dr=vr;function vr(e,t){this.id=e,this.rawValue=t}gr.tryParse=function(e){if(e instanceof gr)return e;var t,r,n,i,e=gr.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 gr(new mr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),wr.parse(i),wr.parse(e))},gr.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},gr.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},gr.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},gr.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},gr.prototype.isLessThan=function(e){return this.compareTo(e)<0},gr.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},gr.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 yr=gr;function gr(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}Er.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var mr=Er;function Er(e,t,r){this.major=e,this.minor=t,this.patch=r}br.parse=function(e){return e?new br(e.split(".")):br.EMPTY},br.prototype.isEmpty=function(){return 0===this.identifiers.length},br.prototype.isNotEmpty=function(){return!this.isEmpty()},br.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},br.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=br.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},br.compareIdentifiers=function(e,t){return br.numericIdentifierRegExp.test(e)&&br.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},br.EMPTY=new br([]),br.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var wr=br;function br(e){this.identifiers=e}var Tr=["MATCH","NOT_MATCH"],_r=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Ir=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE","EXISTS"],Ar=["VARIATION","BUCKET"],Or=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"],Nr=["USER_ID","USER_PROPERTY"],Sr=(Pr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},Pr.IDENTIFIER=new Pr("SEGMENT"),Pr.PROPERTY=new Pr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Pr.SEGMENT=new Pr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Pr);function Pr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var Rr=["ACTIVE","DRAFT","PAUSE"],Mr=["WEB","ANDROID","IOS"],Cr=["IMMEDIATE","CUSTOM"],xr=["MODAL","BANNER","BOTTOM_SHEET","NONE"],Ur=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE","NONE"],kr=["VERTICAL","HORIZONTAL"],Dr=["CLICK"],Lr=["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"],Vr=["LEFT","CENTER","RIGHT"],jr=(Br.fromJson=function(e){var t,r=gt(Rr,e.status);if(!u.isNullOrUndefined(r)){switch(gt(Cr,e.timeUnit)){case"IMMEDIATE":t=new Kr;break;case"CUSTOM":if(u.isNullOrUndefined(e.startEpochTimeMillis))return;if(u.isNullOrUndefined(e.endEpochTimeMillis))return;t=new Gr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o,s,a=sn.fromJson(e.messageContext);if(!u.isNullOrUndefined(a))return n=e.eventTriggerRules.map(qr.fromJson),i=Wr.fromJson(e.eventFrequencyCap),o=null!=(o=e.eventTriggerDelay&&Dn.fromJson(e.eventTriggerDelay))?o:Dn.immediate(),s=Cn.fromJson(null!=(s=e.evaluateContext)?s:{atDeliverTime:!1}),new Br(e.id,e.key,r,t,new Jr(n,i,o),tn.fromJson(e.targetContext),a,s)}},Br.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},Br.prototype.toString=function(){return"InAppMessage(id=".concat(this.id,", key=").concat(this.key,", status=").concat(this.status,")")},Br);function Br(e,t,r,n,i,o,s,a){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s,this.evaluateContext=a}Hr.prototype.within=function(e){return!0};var Kr=Hr;function Hr(){this.type="IMMEDIATE"}zr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var Gr=zr;function zr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var Jr=function(e,t,r){this.rules=e,this.frequencyCap=t,this.delay=r},qr=(Yr.fromJson=function(e){return new Yr(e.eventKey,f.mapNotNullOrUndefined(e.targets,function(e){return Jt.fromJson(e,Sr.PROPERTY)}))},Yr);function Yr(e,t){this.eventKey=e,this.targets=t}$r.fromJson=function(e){return e?new $r(e.identifiers.map(Xr.fromJson),Qr.fromJson(e.duration)):null};var Wr=$r;function $r(e,t){this.identifierCaps=e,this.durationCap=t}Zr.fromJson=function(e){return new Zr(e.identifierType,e.countPerIdentifier)};var Xr=Zr;function Zr(e,t){this.identifierType=e,this.count=t}en.fromJson=function(e){if(!e)return null;var t=gt(De,e.durationUnit.timeUnit);return t?new en(Le.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Qr=en;function en(e,t){this.durationMillis=e,this.count=t}rn.fromJson=function(e){return new rn(e.overrides.map(nn.fromJson),f.mapNotNullOrUndefined(e.targets,function(e){return Jt.fromJson(e,Sr.PROPERTY)}))};var tn=rn;function rn(e,t){this.overrides=e,this.targets=t}on.fromJson=function(e){return new on(e.identifierType,e.identifiers)};var nn=on;function on(e,t){this.identifierType=e,this.identifiers=t}an.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new un(e.exposure.key)),mt(Mr,e.platformTypes));if(!u.isNullOrUndefined(r)){var n=mt(kr,e.orientations);if(!u.isNullOrUndefined(n)){var i=f.mapOrUndefined(e.messages,cn.fromJson);if(!u.isNullOrUndefined(i))return new an(e.defaultLang,t,r,n,i)}}};var sn=an;function an(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var un=function(e){this.key=e},cn=(pn.fromJson=function(e){var t=ln.fromJson(e.layout);if(!u.isNullOrUndefined(t)){var r=f.mapOrUndefined(e.images,vn.fromJson);if(!u.isNullOrUndefined(r)){var n=void 0;if(!u.isNotNullOrUndefined(e.imageAutoScroll)||(n=gn.fromJson(e.imageAutoScroll),!u.isNullOrUndefined(n))){var i=f.mapOrUndefined(e.buttons,In.fromJson);if(!u.isNullOrUndefined(i)){var o=void 0;if(!u.isNotNullOrUndefined(e.closeButton)||(o=In.fromJson2(e.closeButton),!u.isNullOrUndefined(o))){var s=f.mapOrUndefined(e.outerButtons,On.fromJson),a=f.mapOrUndefined(e.innerButtons,On.fromJson);if(!u.isNullOrUndefined(s)&&!u.isNullOrUndefined(a))return new pn(e.variationKey,e.lang,t,r,n,e.text?En.fromJson(e.text):void 0,i,o,new Pn(e.background.color),e.action?Rn.fromJson(e.action):void 0,s,a)}}}}}},pn.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()}),imageAutoScroll:null!=(e=null==(e=this.imageAutoScroll)?void 0:e.toJson())?e:null,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()}),innerButtons:this.innerButtons.map(function(e){return e.toJson()})}},pn);function pn(e,t,r,n,i,o,s,a,u,c,p,l){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.imageAutoScroll=i,this.text=o,this.buttons=s,this.closeButton=a,this.background=u,this.action=c,this.outerButtons=p,this.innerButtons=l}fn.fromJson=function(e){var t=gt(Ur,e.layoutType),r=gt(xr,e.displayType);if(!u.isNullOrUndefined(r)&&!u.isNullOrUndefined(t))return new fn(r,t,e.alignment?hn.fromJson(e.alignment):void 0)};var ln=fn;function fn(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}dn.fromJson=function(e){var t=gt(Vr,e.horizontal);if(!u.isNullOrUndefined(t)){e=gt(Fr,e.vertical);if(!u.isNullOrUndefined(e))return new dn(t,e)}},dn.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var hn=dn;function dn(e,t){this.horizontal=e,this.vertical=t}yn.fromJson=function(e){var t=gt(kr,e.orientation);if(!u.isNullOrUndefined(t)){var r=void 0;if(!u.isNotNullOrUndefined(e.action)||(r=Rn.fromJson(e.action),!u.isNullOrUndefined(r)))return new yn(t,e.imagePath,r)}},yn.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 vn=yn;function yn(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}mn.fromJson=function(e){var t=gt(De,e.interval.timeUnit);if(t)return new mn(Le.converter[t](e.interval.amount,"milliseconds"))},mn.prototype.toJson=function(){return{interval:{timeUnit:"milliseconds",amount:this.intervalMillis}}};var gn=mn;function mn(e){this.intervalMillis=e}wn.fromJson=function(e){return new wn(bn.fromJson(e.title),bn.fromJson(e.body))},wn.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 En=wn;function wn(e,t){this.title=e,this.body=t}Tn.fromJson=function(e){return new Tn(e.text,new _n(e.style.textColor))};var bn=Tn;function Tn(e,t){this.text=e,this.style=t}var _n=function(e){this.color=e},In=(An.fromJson=function(e){var t=Rn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new An(e.text,new Sn(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},An.fromJson2=function(e){var t=Rn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new An("✕",new Sn(e.style.color,"#FFFFFF","#FFFFFF"),t)},An.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},An.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},An);function An(e,t,r){this.text=e,this.style=t,this.action=r}Nn.fromJson=function(e){var t=In.fromJson(e.button);if(!u.isNullOrUndefined(t)){e=hn.fromJson(e.alignment);if(!u.isNullOrUndefined(e))return new Nn(t,e)}},Nn.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}};var On=Nn;function Nn(e,t){this.button=e,this.alignment=t}var Sn=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Pn=function(e){this.color=e},Rn=(Mn.fromJson=function(e){var t=gt(Dr,e.behavior);if(!u.isNullOrUndefined(t)){var r=gt(Lr,e.type);if(!u.isNullOrUndefined(r))return new Mn(t,r,null!=(t=e.value)?t:void 0)}},Mn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Mn);function Mn(e,t,r){this.behavior=e,this.type=t,this.value=r}xn.fromJson=function(e){return new xn(e.atDeliverTime)};var Cn=xn;function xn(e){this.atDeliverTime=e}kn.fromJson=function(e){var t=gt(De,e.duration.timeUnit);return u.isNullOrUndefined(t)?null:new kn(Le.converter[t](e.duration.amount,"milliseconds"))};var Un=kn;function kn(e){this.durationMillis=e}Ln.fromJson=function(e){var t=e.afterCondition&&Un.fromJson(e.afterCondition);return new Ln(e.type,t)},Ln.immediate=function(){return new Ln("IMMEDIATE",null)},Ln.prototype.deliverAt=function(e){var t=this.type;switch(t){case"IMMEDIATE":return e;case"AFTER":if(null===this.afterCondition)throw new Error("AfterCondition is required for AFTER delay type");return e+this.afterCondition.durationMillis;default:throw new Error("Unsupported delay type: ".concat(t))}};var Dn=Ln;function Ln(e,t){this.type=e,this.afterCondition=t}Vn.fromJson=function(e){var t=e.type,e=e.value,r=this.linkActionTypes.some(function(e){return e===t}),n=this.closeActionTypes.some(function(e){return e===t}),i=this.tabTargetActionsTypes.some(function(e){return e===t}),o=this.windowTargetActionsTypes.some(function(e){return e===t});return new Vn(r?"LINK":"CLOSE",n?{hideDurationMillis:"HIDDEN"===t?864e5:null}:void 0,r?{url:null!=e?e:"",target:o?"NEW_WINDOW":i?"NEW_TAB":"CURRENT",shouldCloseAfterLink:n}:void 0)},Vn.fromInteraction=function(e){return"CLOSE"===e.type?new Vn(e.type,{hideDurationMillis:null}):Vn.fromJson(e.action)},Vn.fromAction=function(e){return Vn.fromJson(e.toJson())},Vn.linkActionTypes=["LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE","WEB_LINK"],Vn.closeActionTypes=["CLOSE","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW_AND_CLOSE"],Vn.tabTargetActionsTypes=["LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE"],Vn.windowTargetActionsTypes=["LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"];var Fn=Vn;function Vn(e,t,r){this.type=e,this.close=t,this.link=r}var jn=function(e){this.id=e},Bn=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Kn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new Kn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},Kn);function Kn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}Gn.fromJson=function(e){if(null!==e)return new Gn(f.mapNotNullOrUndefined(e.match,function(e){return Jt.fromJson(e,Sr.PROPERTY)}),f.mapNotNullOrUndefined(e.notMatch,function(e){return Jt.fromJson(e,Sr.PROPERTY)}))};var Hn=Gn;function Gn(e,t){this.includeTargets=e,this.excludeTargets=t}Jn.fromJson=function(e){return new Jn(e.eventKey,e.property,e.stats)},Jn.prototype.countWithinDays=function(t){return f.sum(this.stats.filter(function(e){return e.date>=t}),function(e){return e.count})};var zn=Jn;function Jn(e,t,r){this.eventKey=e,this.property=t,this.stats=r}Yn.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},Yn.prototype.tag=function(e,t){return this._tags[e]=t,this},Yn.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})};var qn=Yn;function Yn(e){this.name=e,this._tags={},this.name=e}$n.start=function(e){return new $n(e=void 0===e?$n.defaultClock:e)},$n.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},$n.defaultClock=new Fe;var Wn=$n;function $n(e){this._clock=e,this.startTime=this._clock.tick()}Zn.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},Zn.prototype.tag=function(e,t){return this._tags[e]=t,this},Zn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Xn=Zn;function Zn(e){this.name=e,this._tags={}}ei.prototype.values=function(){return Array.from(this.data.values())},ei.prototype.keys=function(){return Array.from(this.data.keys())},ei.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},ei.prototype.has=function(e){return void 0!==this.get(e)},ei.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},ei.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},ei.prototype.forEach=function(e){this.data.forEach(e)},ei.prototype.filter=function(e){for(var t=new ei(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},ei.prototype.entries=function(){return Array.from(this.data.entries())};var Qn=ei;function ei(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(ri.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var ti=ri;function ri(e,t){this.valueSupplier=t,this.field=e}function ni(e,t){return e.name===t.name&&Me.isEquals(e.tags,t.tags)}Object.defineProperty(ii.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),ii.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},ii.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},ii.prototype.counter=function(e,t){return void 0===t&&(t={}),new Xn(e).tags(t).register(this)},ii.prototype.timer=function(e,t){return void 0===t&&(t={}),new qn(e).tags(t).register(this)},ii.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},ii.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},ii.prototype.close=function(){};H=ii;function ii(){this.id=K(),this.name="MetricRegistry",this._metrics=new Qn(ni)}i(si,oi=H),si.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.")))},si.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},si.prototype.close=function(){this.stop()};var oi,G=si;function si(e,t){var r=oi.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}ui.prototype.count=function(){return this.counterValue},ui.prototype.increment=function(e){this.counterValue+=null!=e?e:1},ui.prototype.measure=function(){return[new ti("count",this.count.bind(this))]};var ai=ui;function ui(e){this.counterValue=0,this.id=e}pi.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new ai(this.id),e},pi.prototype.count=function(){return this.currentCounter.count()},pi.prototype.increment=function(e){this.currentCounter.increment(e)},pi.prototype.measure=function(){return[new ti("count",this.count.bind(this))]};var ci=pi;function pi(e){this.id=e,this.currentCounter=new ai(e)}fi.prototype.count=function(){return this._count},fi.prototype.totalTime=function(e){return Le.nanosToUnit(this._total,e)},fi.prototype.max=function(e){return Le.nanosToUnit(this._max,e)},fi.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},fi.prototype.record=function(e,t){e<0||(t=Le.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},fi.prototype.measure=function(){var e=this;return[new ti("count",this.count.bind(this)),new ti("total",function(){return e.totalTime("milliseconds")}),new ti("max",function(){return e.max("milliseconds")}),new ti("mean",function(){return e.mean("milliseconds")})]};var li=fi;function fi(e){this._count=0,this._total=0,this._max=0,this.id=e}di.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new li(this.id),e},di.prototype.count=function(){return this.currentTimer.count()},di.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},di.prototype.max=function(e){return this.currentTimer.max(e)},di.prototype.record=function(e,t){this.currentTimer.record(e,t)},di.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},di.prototype.measure=function(){var e=this;return[new ti("count",this.count.bind(this)),new ti("total",function(){return e.totalTime("milliseconds")}),new ti("max",function(){return e.max("milliseconds")}),new ti("mean",function(){return e.mean("milliseconds")})]};var hi=di;function di(e){this.id=e,this.currentTimer=new li(e)}i(yi,vi=G),yi.prototype.createCounter=function(e){return new ci(e)},yi.prototype.createTimer=function(e){return new hi(e)},yi.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 vi,e=yi;function yi(e,t){return vi.call(this,e,t)||this}mi.prototype.count=function(){return 0},mi.prototype.increment=function(e){},mi.prototype.measure=function(){return[new ti("count",this.count.bind(this))]};var gi=mi;function mi(e){this.id=e}Object.defineProperty(wi.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),wi.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},wi.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},wi.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},wi.prototype.measure=function(){return[new ti("count",this.count.bind(this))]};var Ei=wi;function wi(e){this._counters=new Qn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new gi(e)}Ti.prototype.measure=function(){var e=this;return[new ti("count",this.count.bind(this)),new ti("total",function(){return e.totalTime("milliseconds")}),new ti("max",function(){return e.max("milliseconds")}),new ti("mean",function(){return e.mean("milliseconds")})]},Ti.prototype.count=function(){return 0},Ti.prototype.totalTime=function(e){return 0},Ti.prototype.max=function(e){return 0},Ti.prototype.mean=function(e){return 0},Ti.prototype.record=function(e,t){};var bi=Ti;function Ti(e){this.id=e}Object.defineProperty(Ii.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Ii.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Ii.prototype.max=function(e){return this.firstTimer.max(e)},Ii.prototype.mean=function(e){return this.firstTimer.mean(e)},Ii.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Ii.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Ii.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Ii.prototype.count=function(){return this.firstTimer.count()},Ii.prototype.measure=function(){var e=this;return[new ti("count",this.count.bind(this)),new ti("total",function(){return e.totalTime("milliseconds")}),new ti("max",function(){return e.max("milliseconds")}),new ti("mean",function(){return e.mean("milliseconds")})]};var _i=Ii;function Ii(e){this._timers=new Qn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new bi(e)}i(Oi,Ai=H),Oi.prototype.createCounter=function(e){e=new Ei(e);return this.addRegistry(e),e},Oi.prototype.createTimer=function(e){e=new _i(e);return this.addRegistry(e),e},Oi.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},Oi.prototype.add=function(r){r instanceof Oi||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)}))},Oi.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var Ai,r=Oi;function Oi(){var e=null!==Ai&&Ai.apply(this,arguments)||this;return e.registries=new Qn(function(e,t){return e.id===t.id}),e}Si.counter=function(e,t){return Si.globalRegistry.counter(e,t)},Si.timer=function(e,t){return Si.globalRegistry.timer(e,t)},Si.addRegistry=function(e){Si.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},Si.globalRegistry=new r;var Ni=Si;function Si(){}Ri.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},Ri.isNotEmptyString=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var Pi=Ri;function Ri(){}Ci.builder=function(){return new xi},Ci.get=function(e){return Ci.builder().url(e).build()},Ci.prototype.toBuilder=function(){return new xi(this)};var Mi=Ci;function Ci(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}Ui.prototype.url=function(e){return this._url=e,this},Ui.prototype.method=function(e){return this._method=e,this},Ui.prototype.body=function(e){return this._body=e,this},Ui.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},Ui.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},Ui.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 xi=Ui;function Ui(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:Li.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}Di.ok=function(e,t){return Di.of(200,e,t)},Di.of=function(e,t,r){return new Di(e,null!=t?t:null,null!=r?r:Li.empty())},Di.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},Di.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},Di.prototype.isNotModified=function(){return 304===this.statusCode};var ki=Di;function Di(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Fi.empty=function(){return new Fi(new Map)},Fi.builder=function(){return new Vi(new Map)},Fi.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(Pi.equalsIgnoreCase(i,e))return n}return null},Fi.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Fi.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},{})},Fi.prototype.toBuilder=function(){return new Vi(this.headers)},Fi.IF_MODIFIED_SINCE="If-Modified-Since",Fi.LAST_MODIFIED="Last-Modified",Fi.ACCEPT_ENCODING="Accept-Encoding";var Li=Fi;function Fi(e){this.headers=e}ji.prototype.add=function(e,t){return this.headers.set(e,t),this},ji.prototype.build=function(){return new Li(this.headers)};var Vi=ji;function ji(e){this.headers=e}i(Hi,Bi=e),Hi.prototype.flushMetrics=function(e,t){var r=this;f.chunked(e.filter(this.isDispatchTarget.bind(this)),Ye).forEach(function(e){r.dispatch(e,t)})},Hi.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Hi.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))})},Hi.prototype.createRequest=function(e){return Mi.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Hi.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Hi.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:u.fromMap(f.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Hi.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.publish(!0);case"visible":case"pageshow":case"blur":case"locationChange":case"focus":return}};var Bi,Ki=Hi;function Hi(e,t,r,n,i){n=Bi.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}zi.experiment=function(e,t,r){t=Ni.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},zi.featureFlag=function(e,t,r){t=Ni.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},zi.remoteConfig=function(e,t,r){t=Ni.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)};var Gi=zi;function zi(){}qi.record=function(e,t,r){e=Ni.timer("api.call",{operation:e,success:qi.success(r)});t.stop(e)},qi.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Ji=qi;function qi(){}Wi.decide=function(e,t,r,n){if(u.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)}},Wi.decision=function(e,t,r,n,i){return u.isNullOrUndefined(t)?Et.of(n,l.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Yi=Wi;function Wi(){}var $i=s.log,Xi=(Zi.prototype.get=function(t,r){var n,e=Wn.start();try{n=this.decide(t,r)}catch(e){$i.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Et.of(r,l.EXCEPTION)}return Gi.remoteConfig(e,t,n),n.value},Zi.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Yi.decide(this.core,e,t,r)},Zi);function Zi(e,t,r){this.core=e,this.userManager=t,this.user=r}to.prototype.contains=function(e){return this._properties.has(e)},to.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},to.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)},to.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=Ue.sanitizeValue(e,t);return u.isNullOrUndefined(r)||this._properties.set(e,r),this},to.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},to.prototype.build=function(){return this._properties};var Qi,eo=to;function to(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(ee=Qi=Qi||{}).SET="$set",ee.SET_ONCE="$setOnce",ee.UNSET="$unset",ee.INCREMENT="$increment",ee.APPEND="$append",ee.APPEND_ONCE="$appendOnce",ee.PREPEND="$prepend",ee.PREPEND_ONCE="$prependOnce",ee.REMOVE="$remove",ee.CLEAR_ALL="$clearAll";no.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new eo).addProperties(e).addProperties(t).build()};var ro=no;function no(){}oo.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new eo).addProperties(e).addProperties(t,!0).build()};var io=oo;function oo(){}ao.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new eo).addProperties(e).remove(t).build()};var so=ao;function ao(){}co.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new eo;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},co.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var uo=co;function co(){}po.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new eo;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},po.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},po.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},po.prototype.contains=function(e,t){return e.includes(t)},po.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Pe([e],t,!0)},po.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Pe(Pe([],e,!0),[t],!1)};t=po;function po(){}i(ho,lo=t),ho.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var lo,fo=ho;function ho(){return null!==lo&&lo.apply(this,arguments)||this}i(go,vo=t),go.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},go.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var vo,yo=go;function go(){return null!==vo&&vo.apply(this,arguments)||this}i(wo,mo=t),wo.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var mo,Eo=wo;function wo(){return null!==mo&&mo.apply(this,arguments)||this}i(_o,bo=t),_o.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)},_o.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},_o.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var bo,To=_o;function _o(){return null!==bo&&bo.apply(this,arguments)||this}i(Oo,Io=t),Oo.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},Oo.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var Io,Ao=Oo;function Oo(){return null!==Io&&Io.apply(this,arguments)||this}So.prototype.operate=function(e,t){return new Map};var No=So;function So(){}Ro.get=function(e){switch(e){case Qi.SET:return new ro;case Qi.SET_ONCE:return new io;case Qi.UNSET:return new so;case Qi.INCREMENT:return new uo;case Qi.APPEND:return new fo;case Qi.APPEND_ONCE:return new yo;case Qi.PREPEND:return new Eo;case Qi.PREPEND_ONCE:return new To;case Qi.CLEAR_ALL:return new No;case Qi.REMOVE:return new Ao}};var Po=Ro;function Ro(){}Co.prototype.set=function(e,t){return this.add(Qi.SET,e,t)},Co.prototype.setOnce=function(e,t){return this.add(Qi.SET_ONCE,e,t)},Co.prototype.unset=function(e){return this.add(Qi.UNSET,e,"-")},Co.prototype.increment=function(e,t){return this.add(Qi.INCREMENT,e,t)},Co.prototype.append=function(e,t){return this.add(Qi.APPEND,e,t)},Co.prototype.appendOnce=function(e,t){return this.add(Qi.APPEND_ONCE,e,t)},Co.prototype.prepend=function(e,t){return this.add(Qi.PREPEND,e,t)},Co.prototype.prependOnce=function(e,t){return this.add(Qi.PREPEND_ONCE,e,t)},Co.prototype.remove=function(e,t){return this.add(Qi.REMOVE,e,t)},Co.prototype.clearAll=function(){return this.add(Qi.CLEAR_ALL,"clearAll","-")},Co.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new xo(new Map(e))},Co.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},Co.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new eo);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var Mo=Co;function Co(){this.operations=new Map}Uo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Po.get(t).operate(r,e)}),r},Uo.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]),Ue.sanitize(u.fromMap(e))),r))}),i},Uo.prototype.toSecuredEvent=function(){var i={key:"$secured_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]),Ue.sanitize(u.fromMap(e))),r))}),i},Uo.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 xo=Uo;function Uo(e){this.operations=null!=e?e:new Map}Do.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 ko=Do;function Do(){}Fo.prototype.isEquals=function(e){return this.url===e.url},Object.defineProperty(Fo.prototype,"pageTitle",{get:function(){return"undefined"==typeof window||"undefined"==typeof document?"":window.document.title},enumerable:!1,configurable:!0}),Fo.createWithCurrentPage=function(){return"undefined"==typeof window||"undefined"==typeof document?new Fo:new Fo(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol)},Fo.prototype.toProperties=function(){return{pagePath:this.pagePath,pageTitle:this.pageTitle,host:this.host,url:this.url,referrer:this.referrer,queryParameter:this.queryParameter,protocol:this.protocol.replace(":","")}};var Lo=Fo;function Fo(e,t,r,n,i,o,s){void 0===t&&(t=""),void 0===r&&(r=""),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s=""),this.pagePath=e=void 0===e?"":e,this.host=t,this.hostname=r,this.url=n,this.referrer=i,this.queryParameter=o,this.protocol=s}jo.create=function(e){return new jo(e)},jo.prototype.getValue=function(){return this.value};var Vo=jo;function jo(e){this.value=e}var Bo=s.log,Ko=(d.prototype.initialize=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Bo.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Bo.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Bo.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},d.prototype.getSessionId=function(){return this.sessionManager.sessionId},d.prototype.getUser=function(){return this.userManager.currentUser},d.prototype.setUser=function(e){try{var t=zt(e);if(!t)return Bo.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Bo.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},d.prototype.setUserId=function(e){try{var t=void 0;if(u.isNullOrUndefined(e))t=this.userManager.setUserId(void 0);else{var r=Me.sanitizeValue(e);if(!r)return Bo.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch(function(){})}catch(e){return Bo.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},d.prototype.setDeviceId=function(e){try{var t=Me.sanitizeValue(e);if(!t)return Bo.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Bo.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},d.prototype.setUserProperty=function(e,t){e=(new Mo).set(e,t).build();return this.updateUserProperties(e)},d.prototype.setUserProperties=function(e){try{var t=Ue.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 Bo.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},d.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),this.core.flush(!1),Promise.resolve()}catch(e){return Bo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.updatePushSubscriptions=function(e){try{var t=e.toEvent("$push_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Bo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.updateSmsSubscriptions=function(e){try{var t=e.toEvent("$sms_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Bo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.updateKakaoSubscriptions=function(e){try{var t=e.toEvent("$kakao_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Bo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new Mo).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch(function(){})}catch(e){return Bo.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},d.prototype.setPhoneNumber=function(e){try{if("string"!=typeof e)return Bo.error("Invalid value ".concat(e,": phoneNumber value type must be string.")),Promise.resolve();var t=Vo.create(e),r=Fe.instance.currentMillis();return this.piiEventManager.setPhoneNumber(t,r),this.core.flush(!1),Promise.resolve()}catch(e){return Bo.error("Unexpected exception occurred while setting phone number: ".concat(e)),Promise.resolve()}},d.prototype.unsetPhoneNumber=function(){try{var e=Fe.instance.currentMillis();return this.piiEventManager.unsetPhoneNumber(e),this.core.flush(!1),Promise.resolve()}catch(e){return Bo.error("Unexpected exception occurred while unsetting phone number: ".concat(e)),Promise.resolve()}},d.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},d.prototype.variationDetail=function(r,n,e){var i=e||"A",e=Wn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Bo.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),bt.of(i,l.EXCEPTION)}}(this);return Gi.experiment(e,r,t),t},d.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},d.prototype.featureFlagDetail=function(r,n){var e=Wn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Bo.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),_t.off(l.EXCEPTION)}}(this);return Gi.featureFlag(e,r,t),t},d.prototype.track=function(e,t){try{Bo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Bo.error("Unexpected exception while tracking event: ".concat(e))}},d.prototype.trackPageView=function(e){var t=Lo.createWithCurrentPage();this.pageEventTracker.track(t)},d.prototype.remoteConfig=function(e){return new Xi(this.core,this.userManager,e)},d.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},d.prototype.getExperiment=function(t){try{return this.core.getExperiment(t)}catch(e){return void Bo.error('"Unexpected exception while get experiment['.concat(t,"]"))}},d.prototype.onInitialized=function(r){var n;return a(this,void 0,void 0,function(){var t;return p(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,ko.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(),Bo.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},d.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},d.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Bo.debug("UserExplorer opened."),Ni.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Bo.error("UserExplorer is not provided")},d.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Bo.warn("There is no active HackleDevtools.")},d.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},d.prototype.setInAppMessageListener=function(e){this.inAppMessageUi.setListener(e)},d.prototype.close=function(){Bo.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},d);function d(e,t,r,n,i,o,s,a,u){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.piiEventManager=i,this.fetchThrottler=o,this.pageEventTracker=s,this.inAppMessageUi=a,this.devTools=u,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.initialization=this.initialize()}var Ho=s.log,Go=(zo.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user},browserProperties:this.browserPropertyProvider.getBrowserProperties()},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 Ho.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},zo);function zo(e,t,r){this.invocationProcessor=e,this.user=t,this.browserPropertyProvider=r}qo.tryParse=function(e){try{return new URL(e)}catch(e){return}},qo.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:qo.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},qo.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},qo.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},qo.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},qo.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var Jo=qo;function qo(){}Wo.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]:""},Wo.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=Jo.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},Wo.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},Wo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Wo.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},Wo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Wo.prototype.getOptions=function(){return this.options},Wo.getInstance=function(e){return void 0===e&&(e={days:Xe,isCrossSubdomain:!0}),Wo.storage=Wo.storage?Wo.storage:new Wo(e)};var Yo=Wo;function Wo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Xo.prototype.initialize=function(){Yo.getInstance().getItem(Ze)||es()},Xo.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return Qo();case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var $o=Xo;function Xo(){}function Zo(){var e=Yo.getInstance(),t=e.getItem(Qe);if(t)return t;t=e.getItem(Ze);return t||es()}function Qo(){Yo.getInstance().removeItem(Qe)}function es(){var e=K();return Yo.getInstance().setItem(Ze,e),e}var ts,rs=s.log;(G=ts=ts||{}).native="native",G.web_view_wrapper="web_view_wrapper";v.prototype.getSessionId=function(){try{var e={command:"getSessionId",browserProperties:this.browserPropertyProvider.getBrowserProperties()},t=this.invocationProcessor.process(e);return null!=t?t:Zo()}catch(e){return rs.error("Unexpected exception while get sessionId: ".concat(e)),Zo()}},v.prototype.getUser=function(){var e;try{var t={command:"getUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},r=this.invocationProcessor.process(t);return null!=(e=zt(r))?e:this.defaultUser()}catch(e){return rs.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},v.prototype.setUser=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(!(t=zt(n)))return rs.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){rs.error("Unexpected exception while set user: ".concat(e))}return[2]})})},v.prototype.setUserId=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(t=void 0,u.isNullOrUndefined(n))t=null;else if(!(t=Me.sanitizeValue(n)))return rs.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){rs.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},v.prototype.setDeviceId=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(!(t=Me.sanitizeValue(n)))return rs.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){rs.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},v.prototype.setUserProperty=function(r,n){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rs.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},v.prototype.setUserProperties=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{t=Ue.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){rs.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},v.prototype.updateUserProperties=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rs.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},v.prototype.updatePushSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updatePushSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rs.error("Unexpected exception while update push subscriptions: ".concat(e))}return[2]})})},v.prototype.updateSmsSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updateSmsSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rs.error("Unexpected exception while update sms subscriptions: ".concat(e))}return[2]})})},v.prototype.updateKakaoSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updateKakaoSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rs.error("Unexpected exception while update Kakao subscriptions: ".concat(e))}return[2]})})},v.prototype.resetUser=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"resetUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rs.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},v.prototype.setPhoneNumber=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{if("string"!=typeof r)return rs.error("Invalid type ".concat(r,": phoneNumber value must be string.")),[2,Promise.resolve()];t={command:"setPhoneNumber",parameters:{phoneNumber:r},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rs.error("Unexpected exception occurred while setting phone number: ".concat(e))}return[2]})})},v.prototype.unsetPhoneNumber=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"unsetPhoneNumber",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rs.error("Unexpected exception occurred while unsetting phone number: ".concat(e))}return[2]})})},v.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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return rs.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},v.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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return bt.of(o.variation,o.reason,new Ke(null!=(n=o.config.parameters)?n:{}))}catch(e){return rs.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),bt.of(r,l.EXCEPTION)}},v.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return rs.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},v.prototype.featureFlagDetail=function(t,e){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:t,user:this.convertUser(e)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new _t(i.isOn,i.reason,new Ke(null!=(r=i.config.parameters)?r:{}),void 0)}catch(e){return rs.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),_t.off(l.EXCEPTION)}},v.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)},browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(r)}catch(e){rs.error("Unexpected exception while tracking event: ".concat(e))}},v.prototype.trackPageView=function(e){rs.info("Web to app integration feature is not support 'trackPageView' method")},v.prototype.remoteConfig=function(e){return new Go(this.invocationProcessor,this.convertUser(e),this.browserPropertyProvider)},v.prototype.onReady=function(e,t){e()},v.prototype.showUserExplorer=function(){try{var e={command:"showUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){rs.error("Unexpected exception while show userExplorer: ".concat(e))}},v.prototype.hideUserExplorer=function(){try{var e={command:"hideUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){rs.error("Unexpected exception while hide userExplorer: ".concat(e))}},v.prototype.setInAppMessageListener=function(e){rs.info("Web to app integration feature is not support 'setInAppMessageListener' method")},v.prototype.fetch=function(){return Promise.resolve()},v.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},v.prototype.close=function(){rs.info("Web to app integration feature is not support 'close' method")},v.prototype.getExperiment=function(e){rs.info("Web to app integration feature is not support 'getExperiment' method")},v.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},v.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=zt(e))?e:void 0},v.prototype.defaultUser=function(){return{deviceId:Zo()}};var ns=v;function v(e,t){this.invocationProcessor=e,this.browserPropertyProvider=t,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this)}y.prototype.getSessionId=function(){return this.browser.getSessionId()},y.prototype.getUser=function(){return this.browser.getUser()},y.prototype.syncUser=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return t=this.browser.getUser(),[4,this.app.setUser(t)];case 1:return e.sent(),[2]}})})},y.prototype.setUser=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUser(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.setUserId=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.setDeviceId=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setDeviceId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.setUserProperty=function(t,r){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperty(t,r)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.setUserProperties=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.updateUserProperties=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updateUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.updatePushSubscriptions=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updatePushSubscriptions(t)];case 1:return e.sent(),[2]}})})},y.prototype.updateSmsSubscriptions=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updateSmsSubscriptions(t)];case 1:return e.sent(),[2]}})})},y.prototype.updateKakaoSubscriptions=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updateKakaoSubscriptions(t)];case 1:return e.sent(),[2]}})})},y.prototype.resetUser=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.resetUser()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.setPhoneNumber=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setPhoneNumber(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.unsetPhoneNumber=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.unsetPhoneNumber()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},y.prototype.variation=function(e,t,r){return this.browser.variation(e,t,r=void 0===r?"A":r)},y.prototype.variationDetail=function(e,t,r){return this.browser.variationDetail(e,t,r=void 0===r?"A":r)},y.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},y.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},y.prototype.track=function(e,t){return this.browser.track(e,t)},y.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},y.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},y.prototype.onReady=function(e,t){this.browser.onReady(e,t)},y.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},y.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},y.prototype.fetch=function(){return this.browser.fetch()},y.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},y.prototype.close=function(){this.browser.close()},y.prototype.setInAppMessageListener=function(e){this.browser.setInAppMessageListener(e)},y.prototype.getExperiment=function(e){return this.browser.getExperiment(e)};var is=y;function y(e,t){this.browser=e,this.app=t,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this)}function os(e){return e&&e.Math==Math&&e}function ss(e){try{return!!e()}catch(e){return!0}}function as(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function us(e){return qs(Js(e),8,-1)}function cs(e){if(null==e)throw Xs("Can't call method on "+e);return e}function ps(e){return Zs(Qs(e))}function ls(e){return"function"==typeof e}function fs(e){return"object"==typeof e?null!==e:ea(e)}function hs(e,t){return arguments.length<2?(r=ta[e],ra(r)?r:void 0):ta[e]&&ta[e][t];var r}function ds(e){try{return fa(e)}catch(e){return"Object"}}function vs(e){if(ha(e))return e;throw va(da(e)+" is not a function")}function ys(e,t){return null==(e=e[t])?void 0:ya(e)}function gs(t,r){try{Ta(ba,t,{value:r,configurable:!0,writable:!0})}catch(e){ba[t]=r}return r}function ms(e){return Oa(Aa(e))}function Es(e){return"Symbol("+(void 0===e?"":e)+")_"+Ma(++Pa+Ra,36)}function ws(e){var t;return xa(La,e)&&(ka||"string"==typeof La[e])||(t="Symbol."+e,ka&&xa(Fa,e)?La[e]=Fa[e]:La[e]=(Da&&Va?Va:ja)(t)),La[e]}function bs(e){return e=Ya(e,"string"),Wa(e)?e:e+""}function Ts(e){return Xa?$a.createElement(e):{}}function _s(e){if(au(e))return e;throw cu(uu(e)+" is not an object")}function Is(e){return Iu[e]||(Iu[e]=_u(e))}function As(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(Hu(r)&&zu(r,o,n),n.global)i?e[t]=r:Ju(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Gu.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Os(e){return(e=+e)!=e||0==e?0:Wu(e)}function Ns(e,t){return(e=$u(e))<0?Xu(e+t,0):Zu(e,t)}function Ss(e){return tc(e.length)}function Ps(a){return function(e,t,r){var n,i=rc(e),o=ic(i),s=nc(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 Rs(e,t){var r,n=sc(e),i=0,o=[];for(r in n)!oc(uc,r)&&oc(n,r)&&cc(o,r);for(;t.length>i;)!oc(n,r=t[i++])||~ac(o,r)||cc(o,r);return o}function Ms(e,t,r){for(var n=gc(t),i=Ec.f,o=mc.f,s=0;s<n.length;s++){var a=n[s];yc(e,a)||r&&yc(r,a)||i(e,a,o(t,a))}}function Cs(e,t){return(e=Ic[_c(e)])==Oc||e!=Ac&&(bc(t)?wc(t):!!t)}function g(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?Nc:a?Nc[o]||Mc(o,{}):(Nc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=Sc(u,r))&&i.value:u[r],!xc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;Cc(n,i)}(e.sham||i&&i.sham)&&Pc(n,"sham",!0),Rc(u,r,n,e)}}var xs,Us,ks,Ds,Ls,Fs,Vs,js,H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=os("object"==typeof globalThis&&globalThis)||os("object"==typeof window&&window)||os("object"==typeof self&&self)||os("object"==typeof H&&H)||function(){return this}()||Function("return this")(),e={},ee=!ss(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t=!ss(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Bs=Function.prototype.call,G=t?Bs.bind(Bs):function(){return Bs.apply(Bs,arguments)},H={},m={}.propertyIsEnumerable,Ks=Object.getOwnPropertyDescriptor,E=Ks&&!m.call({1:2},1),E=(H.f=E?function(e){e=Ks(this,e);return!!e&&e.enumerable}:m,t),m=Function.prototype,Hs=m.bind,Gs=m.call,zs=E&&Hs.bind(Gs,Gs),m=E?function(e){return e&&zs(e)}:function(e){return e&&function(){return Gs.apply(e,arguments)}},Hs=m,Js=Hs({}.toString),qs=Hs("".slice),E=ss,Ys=us,Ws=Object,$s=m("".split),Hs=E(function(){return!Ws("z").propertyIsEnumerable(0)})?function(e){return"String"==Ys(e)?$s(e,""):Ws(e)}:Ws,Xs=TypeError,Zs=Hs,Qs=cs,ea=ls,ta=r,ra=ls,E=m({}.isPrototypeOf),na=hs("navigator","userAgent")||"",ia=na,oa=r.process,sa=r.Deno,oa=oa&&oa.versions||sa&&sa.version,sa=oa&&oa.v8,oa=b=!(b=sa?0<(w=sa.split("."))[0]&&w[0]<4?1:+(w[0]+w[1]):b)&&ia&&(!(w=ia.match(/Edge\/(\d+)/))||74<=w[1])&&(w=ia.match(/Chrome\/(\d+)/))?+w[1]:b,aa=oa,sa=ss,ia=!!Object.getOwnPropertySymbols&&!sa(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&aa&&aa<41}),w=ia&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ua=hs,ca=ls,pa=E,la=Object,b=w?function(e){return"symbol"==typeof e}:function(e){var t=ua("Symbol");return ca(t)&&pa(t.prototype,la(e))},fa=String,ha=ls,da=ds,va=TypeError,ya=vs,ga=G,ma=ls,Ea=fs,wa=TypeError,sa={exports:{}},ba=r,Ta=Object.defineProperty,T=gs,_a="__core-js_shared__",T=r[_a]||T(_a,{}),Ia=T,Aa=((sa.exports=function(e,t){return Ia[e]||(Ia[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"}),cs),Oa=Object,Na=ms,Sa=m({}.hasOwnProperty),_a=Object.hasOwn||function(e,t){return Sa(Na(e),t)},_=m,Pa=0,Ra=Math.random(),Ma=_(1..toString),_=r,Ca=sa.exports,xa=_a,Ua=Es,ka=ia,Da=w,La=Ca("wks"),Fa=_.Symbol,Va=Fa&&Fa.for,ja=Da?Fa:Fa&&Fa.withoutSetter||Ua,Ba=G,Ka=fs,Ha=b,Ga=ys,za=function(e,t){var r,n;if("string"===t&&ma(r=e.toString)&&!Ea(n=ga(r,e)))return n;if(ma(r=e.valueOf)&&!Ea(n=ga(r,e)))return n;if("string"!==t&&ma(r=e.toString)&&!Ea(n=ga(r,e)))return n;throw wa("Can't convert object to primitive value")},Ja=TypeError,qa=ws("toPrimitive"),Ya=function(e,t){if(!Ka(e)||Ha(e))return e;var r=Ga(e,qa);if(r){if(r=Ba(r,e,t=void 0===t?"default":t),!Ka(r)||Ha(r))return r;throw Ja("Can't convert object to primitive value")}return za(e,t=void 0===t?"number":t)},Wa=b,ia=fs,$a=r.document,Xa=ia($a)&&ia($a.createElement),Za=Ts,w=!ee&&!ss(function(){return 7!=Object.defineProperty(Za("div"),"a",{get:function(){return 7}}).a}),Qa=G,eu=H,tu=as,ru=ps,nu=bs,iu=_a,ou=w,su=Object.getOwnPropertyDescriptor,Ca=(e.f=ee?su:function(e,t){if(e=ru(e),t=nu(t),ou)try{return su(e,t)}catch(e){}if(iu(e,t))return tu(!Qa(eu.f,e,t),e[t])},{}),_=ee&&ss(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),au=fs,uu=String,cu=TypeError,pu=w,lu=_s,fu=bs,hu=TypeError,du=Object.defineProperty,vu=Object.getOwnPropertyDescriptor,yu="enumerable",gu="configurable",mu="writable",Ua=(Ca.f=ee?_?function(e,t,r){var n;return lu(e),t=fu(t),lu(r),"function"==typeof e&&"prototype"===t&&"value"in r&&mu in r&&!r[mu]&&((n=vu(e,t))&&n[mu]&&(e[t]=r.value,r={configurable:(gu in r?r:n)[gu],enumerable:(yu in r?r:n)[yu],writable:!1})),du(e,t,r)}:du:function(e,t,r){if(lu(e),t=fu(t),lu(r),pu)try{return du(e,t,r)}catch(e){}if("get"in r||"set"in r)throw hu("Accessors not supported");return"value"in r&&(e[t]=r.value),e},ee),Eu=Ca,wu=as,b=Ua?function(e,t,r){return Eu.f(e,t,wu(1,r))}:function(e,t,r){return e[t]=r,e},ia={exports:{}},H=ee,w=_a,Ua=Function.prototype,I=H&&Object.getOwnPropertyDescriptor,w=w(Ua,"name"),w={EXISTS:w,PROPER:w&&"something"===function(){}.name,CONFIGURABLE:w&&(!H||I(Ua,"name").configurable)},H=ls,I=T,bu=m(Function.toString),Ua=(H(I.inspectSource)||(I.inspectSource=function(e){return bu(e)}),I.inspectSource),H=ls,I=Ua,Tu=r.WeakMap,H=H(Tu)&&/native code/.test(I(Tu)),I=sa.exports,_u=Es,Iu=I("keys"),Tu={},sa=m,Au=fs,Ou=b,Nu=_a,I=T,Su=Is,Pu=Tu,Ru="Object already initialized",Mu=r.TypeError,Cu=r.WeakMap,H=(Vs=H||I.state?(xs=I.state||(I.state=new Cu),Us=sa(xs.get),ks=sa(xs.has),Ds=sa(xs.set),Ls=function(e,t){if(ks(xs,e))throw new Mu(Ru);return t.facade=e,Ds(xs,e,t),t},Fs=function(e){return Us(xs,e)||{}},function(e){return ks(xs,e)}):(Pu[js=Su("state")]=!0,Ls=function(e,t){if(Nu(e,js))throw new Mu(Ru);return t.facade=e,Ou(e,js,t),t},Fs=function(e){return Nu(e,js)?e[js]:{}},function(e){return Nu(e,js)}),{set:Ls,get:Fs,has:Vs,enforce:function(e){return Vs(e)?Fs(e):Ls(e,{})},getterFor:function(t){return function(e){if(Au(e)&&(e=Fs(e)).type===t)return e;throw Mu("Incompatible receiver, "+t+" required")}}}),I=ss,xu=ls,Uu=_a,ku=ee,Du=w.CONFIGURABLE,Lu=Ua,Fu=H.enforce,Vu=H.get,ju=Object.defineProperty,Bu=ku&&!I(function(){return 8!==ju(function(){},"length",{value:8}).length}),Ku=String(String).split("String"),Cu=ia.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),(!Uu(e,"name")||Du&&e.name!==t)&&(ku?ju(e,"name",{value:t,configurable:!0}):e.name=t),Bu&&r&&Uu(r,"arity")&&e.length!==r.arity&&ju(e,"length",{value:r.arity});try{r&&Uu(r,"constructor")&&r.constructor?ku&&ju(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=Fu(e);return Uu(r,"source")||(r.source=Ku.join("string"==typeof t?t:"")),e},Hu=(Function.prototype.toString=Cu(function(){return xu(this)&&Vu(this).source||Lu(this)},"toString"),ls),Gu=Ca,zu=ia.exports,Ju=gs,sa={},qu=Math.ceil,Yu=Math.floor,Wu=Math.trunc||function(e){e=+e;return(0<e?Yu:qu)(e)},$u=Os,Xu=Math.max,Zu=Math.min,Qu=Os,ec=Math.min,tc=function(e){return 0<e?ec(Qu(e),9007199254740991):0},rc=ps,nc=Ns,ic=Ss,Pu={includes:Ps(!0),indexOf:Ps(!1)},Su=m,oc=_a,sc=ps,ac=Pu.indexOf,uc=Tu,cc=Su([].push),I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],pc=Rs,lc=I.concat("length","prototype"),Cu=(sa.f=Object.getOwnPropertyNames||function(e){return pc(e,lc)},{}),Su=(Cu.f=Object.getOwnPropertySymbols,hs),fc=sa,hc=Cu,dc=_s,vc=m([].concat),Cu=Su("Reflect","ownKeys")||function(e){var t=fc.f(dc(e)),r=hc.f;return r?vc(t,r(e)):t},yc=_a,gc=Cu,mc=e,Ec=Ca,wc=ss,bc=ls,Tc=/#|\.prototype\./,_c=Cs.normalize=function(e){return String(e).replace(Tc,".").toLowerCase()},Ic=Cs.data={},Ac=Cs.NATIVE="N",Oc=Cs.POLYFILL="P",Su=Cs,Nc=r,Sc=e.f,Pc=b,Rc=As,Mc=gs,Cc=Ms,xc=Su,Cu=!ss(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Uc=_a,kc=ls,Dc=ms,Lc=Is("IE_PROTO"),Fc=Object,Vc=Fc.prototype,Cu=Cu?Fc.getPrototypeOf:function(e){e=Dc(e);if(Uc(e,Lc))return e[Lc];var t=e.constructor;return kc(t)&&e instanceof t?t.prototype:e instanceof Fc?Vc:null},jc=ls,Bc=String,Kc=TypeError,Hc=m,Gc=_s,zc=function(e){if("object"==typeof e||jc(e))return e;throw Kc("Can't set "+Bc(e)+" as a prototype")},Jc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Hc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Gc(e),zc(t),n?r(e,t):e.__proto__=t,e}}():void 0),A={},qc=Rs,Yc=I,O=Object.keys||function(e){return qc(e,Yc)},Wc=Ca,$c=_s,Xc=ps,Zc=O;A.f=ee&&!_?Object.defineProperties:function(e,t){$c(e);for(var r,n=Xc(t),i=Zc(t),o=i.length,s=0;s<o;)Wc.f(e,r=i[s++],n[r]);return e};function Qc(){}function ep(e){e.write(bp("")),e.close();var t=e.parentWindow.Object;return e=null,t}function tp(e,t){return Pp(e),void 0===t?e:Rp?Mp(e,t):function(){return e.apply(t,arguments)}}function rp(e){return void 0!==e&&(Cp.Array===e||Up[xp]===e)}function np(e){if(null!=e)return Kp(e,Gp)||Kp(e,"@@iterator")||Hp[Bp(e)]}function ip(e,t){if(t=arguments.length<2?Wp(e):t,Jp(t))return qp(zp(t,e));throw $p(Yp(e)+" is not iterable")}function op(e,t,r){var n,i;Zp(e);try{if(!(n=Qp(e,"return"))){if("throw"===t)throw r;return r}n=Xp(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Zp(n),r}function sp(e,t){this.stopped=e,this.result=t}function ap(e,t,r){function n(e){return o&&cl(o,"normal",e),new sp(!0,e)}function i(e){return f?(rl(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,p,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=el(t,l);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=ul(e)))throw pl(nl(e)+" is not iterable");if(il(r)){for(s=0,a=ol(e);s<a;s++)if((u=i(e[s]))&&sl(ll,u))return u;return new sp(!1)}o=al(e,r)}for(c=(h?e:o).next;!(p=tl(c,o)).done;){try{u=i(p.value)}catch(e){cl(o,"throw",e)}if("object"==typeof u&&u&&sl(ll,u))return u}return new sp(!1)}function up(e){if("Symbol"===fl(e))throw TypeError("Cannot convert a Symbol value to a string");return hl(e)}function cp(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=yl(Ml,this);return ml?r=ml(new Pl,i?gl(this):Ml):(r=i?this:wl(Ml),bl(r,Sl,"Error")),void 0!==t&&bl(r,"message",Ol(t)),Nl&&bl(r,"stack",_l(r.stack,1)),Il(r,n),Al(e,Rl,{that:i=[]}),bl(r,"errors",i),r}function pp(e){xl[Cl][e]=!0}var lp,fp,O=hs("document","documentElement"),hp=_s,dp=A,vp=I,_=Tu,yp=O,gp=Ts,mp="prototype",Ep="script",wp=Is("IE_PROTO"),bp=function(e){return"<"+Ep+">"+e+"</"+Ep+">"},Tp=function(){try{lp=new ActiveXObject("htmlfile")}catch(e){}Tp="undefined"==typeof document||document.domain&&lp?ep(lp):(e=gp("iframe"),t="java"+Ep+":",e.style.display="none",yp.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(bp("document.F=Object")),t.close(),t.F);for(var e,t,r=vp.length;r--;)delete Tp[mp][vp[r]];return Tp()},A=(_[wp]=!0,Object.create||function(e,t){var r;return null!==e?(Qc[mp]=hp(e),r=new Qc,Qc[mp]=null,r[wp]=e):r=Tp(),void 0===t?r:dp.f(r,t)}),_p=Error,Ip=m("".replace),I=String(_p("zxcasd").stack),Ap=/\n\s*at [^:]*:[^\n]*/,Op=Ap.test(I),Np=fs,Sp=b,Pp=vs,Rp=t,Mp=m(m.bind),_={},Cp=_,xp=ws("iterator"),Up=Array.prototype,I={},I=(I[ws("toStringTag")]="z","[object z]"===String(I)),kp=I,Dp=ls,Lp=us,Fp=ws("toStringTag"),Vp=Object,jp="Arguments"==Lp(function(){return arguments}()),kp=kp?Lp: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=Vp(e),Fp))?t:jp?Lp(e):"Object"==(t=Lp(e))&&Dp(e.callee)?"Arguments":t},Bp=kp,Kp=ys,Hp=_,Gp=ws("iterator"),zp=G,Jp=vs,qp=_s,Yp=ds,Wp=np,$p=TypeError,Xp=G,Zp=_s,Qp=ys,el=tp,tl=G,rl=_s,nl=ds,il=rp,ol=Ss,sl=E,al=ip,ul=np,cl=op,pl=TypeError,ll=sp.prototype,fl=kp,hl=String,dl=up,vl=as,N=!ss(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",vl(1,7)),7!==e.stack)}),S=g,yl=E,gl=Cu,ml=Jc,El=Ms,wl=A,bl=b,Tl=as,_l=function(e,t){if(Op&&"string"==typeof e&&!_p.prepareStackTrace)for(;t--;)e=Ip(e,Ap,"");return e},Il=function(e,t){Np(t)&&"cause"in t&&Sp(e,"cause",t.cause)},Al=ap,Ol=function(e,t){return void 0===e?arguments.length<2?"":t:dl(e)},Nl=N,Sl=ws("toStringTag"),Pl=Error,Rl=[].push,Ml=(ml?ml(cp,Pl):El(cp,Pl,{name:!0}),cp.prototype=wl(Pl.prototype,{constructor:Tl(1,cp),message:Tl(1,""),name:Tl(1,"AggregateError")})),N=(S({global:!0,constructor:!0,arity:2},{AggregateError:cp}),ws),El=A,Tl=Ca.f,Cl=N("unscopables"),xl=Array.prototype,S=(null==xl[Cl]&&Tl(xl,Cl,{configurable:!0,value:El(null)}),ss),N=ls,Tl=Cu,El=As,Ul=ws("iterator"),kl=!1;[].keys&&("next"in(jl=[].keys())?(Tl=Tl(Tl(jl)))!==Object.prototype&&(fp=Tl):kl=!0);function Dl(e,t,r){(e=e&&!r?e.prototype:e)&&!Kl(e,Hl)&&Bl(e,Hl,{configurable:!0,value:t})}function Ll(){return this}function Fl(){return this}function Vl(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!cf&&e in l)return l[e];switch(e){case"keys":case lf:case ff:return function(){return new r(this,e)}}return function(){return new r(this)}}Zl(r,t,n);var u,c,n=t+" Iterator",p=!1,l=e.prototype,f=l[pf]||l["@@iterator"]||i&&l[i],h=!cf&&f||a(i),d="Array"==t&&l.entries||f;if(d&&(d=Ql(d.call(new e)))!==Object.prototype&&d.next&&(Ql(d)!==uf&&(ef?ef(d,uf):Xl(d[pf])||nf(d,pf,Fl)),tf(d,n,!0)),sf&&i==lf&&f&&f.name!==lf&&(af?rf(l,"name",lf):(p=!0,h=function(){return $l(f,this)})),i)if(u={values:a(lf),keys:o?h:a("keys"),entries:a(ff)},s)for(c in u)!cf&&!p&&c in l||nf(l,c,u[c]);else Wl({target:t,proto:!0,forced:cf||p},u);return l[pf]!==h&&nf(l,pf,h,{name:i}),of[t]=h,u}N((fp=null==fp||S(function(){var e={};return fp[Ul].call(e)!==e})?{}:fp)[Ul])||El(fp,Ul,function(){return this});var jl={IteratorPrototype:fp,BUGGY_SAFARI_ITERATORS:kl},Bl=Ca.f,Kl=_a,Hl=ws("toStringTag"),Gl=jl.IteratorPrototype,zl=A,Jl=as,ql=Dl,Yl=_,Wl=g,$l=G,Xl=ls,Zl=function(e,t,r,n){t+=" Iterator";return e.prototype=zl(Gl,{next:Jl(+!n,r)}),ql(e,t,!1),Yl[t]=Ll,e},Ql=Cu,ef=Jc,tf=Dl,rf=b,nf=As,Tl=ws,of=_,sf=w.PROPER,af=w.CONFIGURABLE,uf=jl.IteratorPrototype,cf=jl.BUGGY_SAFARI_ITERATORS,pf=Tl("iterator"),lf="values",ff="entries",hf=ps,N=pp,S=_,El=H,kl=Ca.f,w=Vl,jl=ee,df="Array Iterator",vf=El.set,yf=El.getterFor(df),Tl=w(Array,"Array",function(e,t){vf(this,{type:df,target:hf(e),index:0,kind:t})},function(){var e=yf(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"),_=S.Arguments=S.Array;if(N("keys"),N("values"),N("entries"),jl&&"values"!==_.name)try{kl(_,"name",{value:"values"})}catch(e){}var gf=kp;I||As(Object.prototype,"toString",I?{}.toString:function(){return"[object "+gf(this)+"]"},{unsafe:!0});function mf(e){var e=Of(e),t=Nf.f;Sf&&e&&!e[Pf]&&t(e,Pf,{configurable:!0,get:function(){return this}})}function Ef(e,t){if(Rf(t,e))return e;throw Mf("Incorrect invocation")}function wf(){}function bf(e){if(!Cf(e))return!1;try{return Df(wf,kf,e),!0}catch(e){return!1}}function Tf(e){if(!Cf(e))return!1;switch(xf(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Vf||!!Ff(Lf,Uf(e))}catch(e){return!0}}function _f(e,t){return void 0===(e=Hf(e).constructor)||null==(e=Hf(e)[zf])?t:Gf(e)}var If,Af,El="process"==us(r.process),Of=hs,Nf=Ca,Sf=ee,Pf=ws("species"),Rf=E,Mf=TypeError,w=m,S=ss,Cf=ls,xf=kp,Uf=Ua,kf=[],Df=hs("Reflect","construct"),Lf=/^\s*(?:class|function)\b/,Ff=w(Lf.exec),Vf=!Lf.exec(wf),N=(Tf.sham=!0,!Df||S(function(){var e;return bf(bf.call)||!bf(Object)||!bf(function(){e=!0})||e})?Tf:bf),jf=N,Bf=ds,Kf=TypeError,Hf=_s,Gf=function(e){if(jf(e))return e;throw Kf(Bf(e)+" is not a constructor")},zf=ws("species"),jl=Function.prototype,Jf=jl.apply,qf=jl.call,kl="object"==typeof Reflect&&Reflect.apply||(t?qf.bind(Jf):function(){return qf.apply(Jf,arguments)}),_=m([].slice),Yf=TypeError,I=/(?:ipad|iphone|ipod).*applewebkit/i.test(na),Wf=r,$f=kl,E=tp,Xf=ls,Zf=_a,kp=ss,Qf=O,eh=_,th=Ts,rh=function(e,t){if(e<t)throw Yf("Not enough arguments");return e},w=I,S=El,jl=Wf.setImmediate,t=Wf.clearImmediate,nh=Wf.process,ih=Wf.Dispatch,oh=Wf.Function,O=Wf.MessageChannel,sh=Wf.String,ah=0,uh={},ch="onreadystatechange";try{If=Wf.location}catch(e){}function ph(e){return function(){Nh(e)}}function lh(e){Nh(e.data)}function fh(e){Wf.postMessage(sh(e),If.protocol+"//"+If.host)}function hh(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function dh(){this.head=null,this.tail=null}function vh(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=jh(r),this.reject=jh(n)}function yh(e,t){var r,n,i,o,s=t.value,a=t.state==dd,u=a?e.ok:e.fail,c=e.resolve,p=e.reject,l=e.domain;try{u?(a||(t.rejection===gd&&(o=t,Hh(Wh,Kh,function(){var e=o.facade;Bh?ud.emit("rejectionHandled",e):wd(hd,e,o.value)})),t.rejection=yd),!0===u?r=s:(l&&l.enter(),r=u(s),l&&(l.exit(),i=!0)),r===e.promise?p(sd("Promise-chain cycle")):(n=md(r))?Hh(n,r,c,p):c(r)):p(s)}catch(e){l&&!i&&l.exit(),p(e)}}var gh,mh,Eh,wh,bh,Th,_h,Ih,Ah,Oh,Nh=function(e){var t;Zf(uh,e)&&(t=uh[e],delete uh[e],t())},O=(jl&&t||(jl=function(e){rh(arguments.length,1);var t=Xf(e)?e:oh(e),r=eh(arguments,1);return uh[++ah]=function(){$f(t,void 0,r)},Af(ah),ah},t=function(e){delete uh[e]},S?Af=function(e){nh.nextTick(ph(e))}:ih&&ih.now?Af=function(e){ih.now(ph(e))}:O&&!w?(w=(S=new O).port2,S.port1.onmessage=lh,Af=E(w.postMessage,w)):Wf.addEventListener&&Xf(Wf.postMessage)&&!Wf.importScripts&&If&&"file:"!==If.protocol&&!kp(fh)?(Af=fh,Wf.addEventListener("message",lh,!1)):Af=ch in th("script")?function(e){Qf.appendChild(th("script"))[ch]=function(){Qf.removeChild(this),Nh(e)}}:function(e){setTimeout(ph(e),0)}),{set:jl,clear:t}),S=r,E=/ipad|iphone|ipod/i.test(na)&&void 0!==S.Pebble,w=/web0s(?!.*chrome)/i.test(na),kp=r,jl=tp,t=e.f,Sh=O.set,S=I,e=E,I=w,Ph=El,E=kp.MutationObserver||kp.WebKitMutationObserver,w=kp.document,Rh=kp.process,P=kp.Promise,t=t(kp,"queueMicrotask"),t=t&&t.value,I=(t||(gh=function(){var e,t;for(Ph&&(e=Rh.domain)&&e.exit();mh;){t=mh.fn,mh=mh.next;try{t()}catch(e){throw mh?wh():Eh=void 0,e}}Eh=void 0,e&&e.enter()},wh=S||Ph||I||!E||!w?!e&&P&&P.resolve?((S=P.resolve(void 0)).constructor=P,_h=jl(S.then,S),function(){_h(gh)}):Ph?function(){Rh.nextTick(gh)}:(Sh=jl(Sh,kp),function(){Sh(gh)}):(bh=!0,Th=w.createTextNode(""),new E(gh).observe(Th,{characterData:!0}),function(){Th.data=bh=!bh})),t||function(e){e={fn:e,next:void 0};Eh&&(Eh.next=e),mh||(mh=e,wh()),Eh=e}),Mh=r,e=(dh.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}},dh),P=r.Promise,S="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,jl=!S&&!El&&"object"==typeof window&&"object"==typeof document,kp=r,Ch=P,w=ls,E=Su,xh=Ua,t=ws,Uh=jl,kh=S,Dh=oa,Lh=(Ch&&Ch.prototype,t("species")),Fh=!1,Vh=w(kp.PromiseRejectionEvent),Ua={CONSTRUCTOR:E("Promise",function(){var e=xh(Ch),t=e!==String(Ch);if(!t&&66===Dh)return!0;if(!Dh||Dh<51||!/native code/.test(e)){var e=new Ch(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Lh]=r,!(Fh=e.then(function(){})instanceof r))return!0}return!t&&(Uh||kh)&&!Vh}),REJECTION_EVENT:Vh,SUBCLASSING:Fh},jl={},jh=vs,S=(jl.f=function(e){return new vh(e)},g),Bh=El,Kh=r,Hh=G,t=As,w=Jc,kp=Dl,E=mf,Gh=vs,zh=ls,Jh=fs,qh=Ef,Yh=_f,Wh=O.set,$h=I,Xh=function(e,t){var r=Mh.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},Zh=hh,Qh=e,O=H,I=P,e=jl,ed="Promise",R=Ua.CONSTRUCTOR,td=Ua.REJECTION_EVENT,M=Ua.SUBCLASSING,rd=O.getterFor(ed),nd=O.set,O=I&&I.prototype,id=I,od=O,sd=Kh.TypeError,ad=Kh.document,ud=Kh.process,cd=e.f,pd=cd,ld=!!(ad&&ad.createEvent&&Kh.dispatchEvent),fd="unhandledrejection",hd="rejectionhandled",dd=1,vd=2,yd=1,gd=2,md=function(e){var t;return!(!Jh(e)||!zh(t=e.then))&&t},Ed=function(r,i){r.notified||(r.notified=!0,$h(function(){for(var e,n,t=r.reactions;e=t.get();)yh(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Hh(Wh,Kh,function(){var e=n.facade,t=n.value,r=bd(n);if(r&&(r=Zh(function(){Bh?ud.emit("unhandledRejection",t,e):wd(fd,e,t)}),n.rejection=Bh||bd(n)?gd:yd,r.error))throw r.value}))}))},wd=function(e,t,r){var n;ld?((n=ad.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Kh.dispatchEvent(n)):n={promise:t,reason:r},!td&&(t=Kh["on"+e])?t(n):e===fd&&Xh("Unhandled promise rejection",r)},bd=function(e){return e.rejection!==yd&&!e.parent},Td=function(t,r,n){return function(e){t(r,e,n)}},_d=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=vd,Ed(e,!0))},Id=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw sd("Promise can't be resolved itself");var n=md(e);n?$h(function(){var t={done:!1};try{Hh(n,e,Td(Id,t,r),Td(_d,t,r))}catch(e){_d(t,e,r)}}):(r.value=e,r.state=dd,Ed(r,!1))}catch(e){_d({done:!1},e,r)}}};if(R&&(od=(id=function(e){qh(this,od),Gh(e),Hh(Ih,this);var t=rd(this);try{e(Td(Id,t),Td(_d,t))}catch(e){_d(t,e)}}).prototype,(Ih=function(e){nd(this,{type:ed,done:!1,notified:!1,parent:!1,reactions:new Qh,rejection:!1,state:0,value:void 0})}).prototype=t(od,"then",function(e,t){var r=rd(this),n=cd(Yh(this,id));return r.parent=!0,n.ok=!zh(e)||e,n.fail=zh(t)&&t,n.domain=Bh?ud.domain:void 0,0==r.state?r.reactions.add(n):$h(function(){yh(n,r)}),n.promise}),Ah=function(){var e=new Ih,t=rd(e);this.promise=e,this.resolve=Td(Id,t),this.reject=Td(_d,t)},e.f=cd=function(e){return e===id||void 0===e?new Ah:pd(e)},zh(I)&&O!==Object.prototype)){Oh=O.then,M||t(O,"then",function(e,t){var r=this;return new id(function(e,t){Hh(Oh,r,e,t)}).then(e,t)},{unsafe:!0});try{delete O.constructor}catch(e){}w&&w(O,od)}S({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:id}),kp(id,ed,!1),E(ed);var Ad=ws("iterator"),Od=!1;try{var Nd=0,C={next:function(){return{done:!!Nd++}},return:function(){Od=!0}};C[Ad]=function(){return this},Array.from(C,function(){throw 2})}catch(e){}function Sd(e,t){if(!t&&!Od)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 Pd=P,e=Sd,I=Ua.CONSTRUCTOR||!e(function(e){Pd.all(e).then(void 0,function(){})}),Rd=G,Md=vs,Cd=jl,xd=hh,Ud=ap,M=(g({target:"Promise",stat:!0,forced:I},{all:function(e){var a=this,t=Cd.f(a),u=t.resolve,c=t.reject,r=xd(function(){var n=Md(a.resolve),i=[],o=0,s=1;Ud(e,function(e){var t=o++,r=!1;s++,Rd(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}}),g),t=P,w=hs,O=ls,S=As,R=t&&t.prototype;M({target:"Promise",proto:!0,forced:Ua.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),O(t)&&(kp=w("Promise").prototype.catch,R.catch!==kp&&S(R,"catch",kp,{unsafe:!0}));var kd=G,Dd=vs,Ld=jl,Fd=hh,Vd=ap;g({target:"Promise",stat:!0,forced:I},{race:function(e){var r=this,n=Ld.f(r),i=n.reject,t=Fd(function(){var t=Dd(r.resolve);Vd(e,function(e){kd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function jd(e,t){return Hd(e),Gd(t)&&t.constructor===e?t:((0,(e=zd.f(e)).resolve)(t),e.promise)}var Bd=G,Kd=jl,Hd=(g({target:"Promise",stat:!0,forced:Ua.CONSTRUCTOR},{reject:function(e){var t=Kd.f(this);return Bd(t.reject,void 0,e),t.promise}}),_s),Gd=fs,zd=jl,E=g,C=hs,e=Ua.CONSTRUCTOR,Jd=jd;C("Promise"),E({target:"Promise",stat:!0,forced:e},{resolve:function(e){return Jd(this,e)}});var qd=G,Yd=vs,Wd=jl,$d=hh,Xd=ap;g({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Wd.f(a),u=t.resolve,r=t.reject,n=$d(function(){var n=Yd(a.resolve),i=[],o=0,s=1;Xd(e,function(e){var t=o++,r=!1;s++,qd(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 Zd(i){return function(e,t){var r,e=fv(hv(e)),t=lv(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=vv(e,t))<55296||56319<r||t+1===n||(n=vv(e,t+1))<56320||57343<n?i?dv(e,t):r:i?yv(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Qd=G,ev=vs,tv=hs,rv=jl,nv=hh,iv=ap,ov="No one promise resolved",M=(g({target:"Promise",stat:!0},{any:function(e){var u=this,c=tv("AggregateError"),t=rv.f(u),p=t.resolve,l=t.reject,r=nv(function(){var n=ev(u.resolve),i=[],o=0,s=1,a=!1;iv(e,function(e){var t=o++,r=!1;s++,Qd(n,u,e).then(function(e){r||a||(a=!0,p(e))},function(e){r||a||(r=!0,i[t]=e,--s||l(new c(i,ov)))})}),--s||l(new c(i,ov))});return r.error&&l(r.value),t.promise}}),g),O=P,t=ss,sv=hs,av=ls,uv=_f,cv=jd,w=As,pv=O&&O.prototype,R=(M({target:"Promise",proto:!0,real:!0,forced:!!O&&t(function(){pv.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=uv(this,sv("Promise")),e=av(t);return this.then(e?function(e){return cv(r,t()).then(function(){return e})}:t,e?function(e){return cv(r,t()).then(function(){throw e})}:t)}}),av(O)&&(S=sv("Promise").prototype.finally,pv.finally!==S&&w(pv,"finally",S,{unsafe:!0})),m),lv=Os,fv=up,hv=cs,dv=R("".charAt),vv=R("".charCodeAt),yv=R("".slice),gv={codeAt:Zd(!1),charAt:Zd(!0)}.charAt,mv=up,kp=H,I=Vl,Ev="String Iterator",wv=kp.set,bv=kp.getterFor(Ev);I(String,"String",function(e){wv(this,{type:Ev,string:mv(e),index:0})},function(){var e=bv(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=gv(t,r),e.index+=t.length,{value:t,done:!1})});function Tv(t,e){if(t){if(t[Sv]!==Rv)try{Nv(t,Sv,Rv)}catch(e){t[Sv]=Rv}if(t[Pv]||Nv(t,Pv,e),Av[e])for(var r in Ov)if(t[r]!==Ov[r])try{Nv(t,r,Ov[r])}catch(e){t[r]=Ov[r]}}}var _v,Ua=r,C=Ua.Promise,E=Ts("span").classList,e=E&&E.constructor&&E.constructor.prototype,P=e===Object.prototype?void 0:e,Iv=r,Av={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},M=P,Ov=Tl,Nv=b,t=ws,Sv=t("iterator"),Pv=t("toStringTag"),Rv=Ov.values;for(_v in Av)Tv(Iv[_v]&&Iv[_v].prototype,_v);Tv(M,"DOMTokenList");var O,w,S=w=O=C,R,Mv=jl,Cv=hh,xv=((R=g)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Mv.f(this),e=Cv(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),_s),Uv=op,kv=bs,Dv=Ca,Lv=as,kp,Fv=tp,Vv=G,jv=ms,Bv=function(t,e,r,n){try{return n?e(xv(r)[0],r[1]):e(r)}catch(e){Uv(t,"throw",e)}},Kv=rp,Hv=N,Gv=Ss,zv=kp=function(e,t,r){t=kv(t);t in e?Dv.f(e,t,Lv(0,r)):e[t]=r},Jv=ip,qv=np,Yv=Array,I=g,E=function(e){var t,r,n,i,o,s,a=jv(e),e=Hv(this),u=arguments.length,c=1<u?arguments[1]:void 0,p=void 0!==c,u=(p&&(c=Fv(c,2<u?arguments[2]:void 0)),qv(a)),l=0;if(!u||this===Yv&&Kv(u))for(t=Gv(a),r=e?new this(t):Yv(t);l<t;l++)s=p?c(a[l],l):a[l],zv(r,l,s);else for(o=(i=Jv(a,u)).next,r=e?new this:[];!(n=Vv(o,i)).done;l++)s=p?Bv(i,c,[n.value,l],!0):n.value,zv(r,l,s);return r.length=l,r},e,P=!(e=Sd)(function(e){Array.from(e)}),Wv=(I({target:"Array",stat:!0,forced:P},{from:E}),us),Tl=Array.isArray||function(e){return"Array"==Wv(e)},b,t,M=((b=g)({target:"Array",stat:!0},{isArray:t=Tl}),g),C=ss,$v=N,Xv=kp,Zv=Array,O=C(function(){function e(){}return!(Zv.of.call(e)instanceof e)}),Qv=(M({target:"Array",stat:!0,forced:O},{of:function(){for(var e=0,t=arguments.length,r=new($v(this)?this:Zv)(t);e<t;)Xv(r,e,arguments[e++]);return r.length=t,r}}),ms),ey=Ss,ty=Os,w=pp,ry=(g({target:"Array",proto:!0},{at:function(e){var t=Qv(this),r=ey(t),e=ty(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),w("at"),TypeError),S=function(e){if(9007199254740991<e)throw ry("Maximum allowed index exceeded");return e},ny=Tl,iy=N,oy=fs,sy=ws("species"),ay=Array,uy=function(e){var t;return ny(e)&&(t=e.constructor,(iy(t)&&(t===ay||ny(t.prototype))||oy(t)&&null===(t=t[sy]))&&(t=void 0)),void 0===t?ay:t},jl=function(e,t){return new(uy(e))(0===t?0:t)},cy=ss,py=oa,ly=ws("species"),R,e=g,I=ss,fy=Tl,hy=fs,dy=ms,vy=Ss,yy=S,gy=kp,my=jl,P=R=function(t){return 51<=py||!cy(function(){var e=[];return(e.constructor={})[ly]=function(){return{foo:1}},1!==e[t](Boolean).foo})},E=oa,Ey=ws("isConcatSpreadable"),b=51<=E||!I(function(){var e=[];return e[Ey]=!1,e.concat()[0]!==e}),t=P("concat"),wy=(e({target:"Array",proto:!0,arity:1,forced:!b||!t},{concat:function(e){for(var t,r,n,i=dy(this),o=my(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!hy(e))return!1;var t=e[Ey];return void 0!==t?!!t:fy(e)}(n=-1===a?i:arguments[a]))for(r=vy(n),yy(s+r),t=0;t<r;t++,s++)t in n&&gy(o,s,n[t]);else yy(s+1),gy(o,s++,n);return o.length=s,o}}),ds),by=TypeError,C,Ty=ms,_y=Ns,Iy=Ss,Ay=C=function(e,t){if(!delete e[t])throw by("Cannot delete property "+wy(t)+" of "+wy(e))},Oy=Math.min,M=pp,Ny=(g({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=Ty(this),n=Iy(r),i=_y(e,n),o=_y(t,n),e=2<arguments.length?arguments[2]:void 0,s=Oy((void 0===e?n:_y(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]:Ay(r,i),i+=a,o+=a;return r}}),M("copyWithin"),tp),Sy=Hs,Py=ms,Ry=Ss,My=jl,Cy=m([].push),O,w={forEach:(O=function(f){var h=1==f,d=2==f,v=3==f,y=4==f,g=6==f,m=7==f,E=5==f||g;return function(e,t,r,n){for(var i,o,s=Py(e),a=Sy(s),u=Ny(t,r),c=Ry(a),p=0,t=n||My,l=h?t(e,c):d||m?t(e,0):void 0;p<c;p++)if((E||p in a)&&(o=u(i=a[p],p,s),f))if(h)l[p]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return p;case 2:Cy(l,i)}else switch(f){case 4:return!1;case 7:Cy(l,i)}return g?-1:v||y?y:l}})(0),map:O(1),filter:O(2),some:O(3),every:O(4),find:O(5),findIndex:O(6),filterReject:O(7)},xy=ss,E=function(e,t){var r=[][e];return!!r&&xy(function(){r.call(null,t||function(){return 1},1)})},I=g,Uy=w.every,ky=(I({target:"Array",proto:!0,forced:!E("every")},{every:function(e){return Uy(this,e,1<arguments.length?arguments[1]:void 0)}}),ms),Dy=Ns,Ly=Ss,P=pp,e=(g({target:"Array",proto:!0},{fill:function(e){for(var t=ky(this),r=Ly(t),n=arguments.length,i=Dy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:Dy(n,r);i<o;)t[i++]=e;return t}}),P("fill"),g),Fy=w.filter,b=(e({target:"Array",proto:!0,forced:!R("filter")},{filter:function(e){return Fy(this,e,1<arguments.length?arguments[1]:void 0)}}),g),Vy=w.find,t=pp,M,jy=!0,O=((M="find")in[]&&Array(1)[M](function(){jy=!1}),b({target:"Array",proto:!0,forced:jy},{find:function(e){return Vy(this,e,1<arguments.length?arguments[1]:void 0)}}),t(M),g),By=w.findIndex,I=pp,P,Ky=!0,Hy=((P="findIndex")in[]&&Array(1)[P](function(){Ky=!1}),O({target:"Array",proto:!0,forced:Ky},{findIndex:function(e){return By(this,e,1<arguments.length?arguments[1]:void 0)}}),I(P),tp),Gy=Hs,zy=ms,Jy=Ss,e,b={findLast:(e=function(u){var c=1==u;return function(e,t,r){for(var n,i=zy(e),o=Gy(i),s=Hy(t,r),a=Jy(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:e(1)},t=g,qy=b.findLast,M=pp,O=(t({target:"Array",proto:!0},{findLast:function(e){return qy(this,e,1<arguments.length?arguments[1]:void 0)}}),M("findLast"),g),Yy=b.findLastIndex,I=pp,Wy=(O({target:"Array",proto:!0},{findLastIndex:function(e){return Yy(this,e,1<arguments.length?arguments[1]:void 0)}}),I("findLastIndex"),Tl),$y=Ss,Xy=S,Zy=tp,Qy=function(e,t,r,n,i,o,s,a){for(var u,c,p=i,l=0,f=!!s&&Zy(s,a);l<n;)l in r&&(u=f?f(r[l],l,t):r[l],0<o&&Wy(u)?(c=$y(u),p=Qy(e,t,u,c,p,o-1)-1):(Xy(p+1),e[p]=u),p++),l++;return p},P,eg=P=Qy,tg=ms,rg=Ss,ng=Os,ig=jl;g({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=tg(this),r=rg(t),n=ig(t,0);return n.length=eg(n,t,t,r,0,void 0===e?1:ng(e)),n}});function og(c){return function(e,t,r,n){Mg(t);var i=Cg(e),o=xg(i),s=Ug(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 kg("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 sg(e,t,r){for(var n=Qg(e),i=Zg(t,n),o=Zg(void 0===r?n:r,n),s=tm(rm(o-i,0)),a=0;i<o;i++,a++)em(s,a,e[i]);return s.length=a,s}function ag(e,t){var r=e.length,n=im(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 p=e,l=ag(nm(e,0,n),t),f=ag(nm(e,n),t),h=t,d=l.length,v=f.length,y=0,g=0;y<d||g<v;)p[y+g]=y<d&&g<v?h(l[y],f[g])<=0?l[y++]:f[g++]:y<d?l[y++]:f[g++];return p}var ug=P,cg=vs,pg=ms,lg=Ss,fg=jl,hg=(g({target:"Array",proto:!0},{flatMap:function(e){var t,r=pg(this),n=lg(r);return cg(e),(t=fg(r,0)).length=ug(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),w.forEach),e=E("forEach")?[].forEach:function(e){return hg(this,e,1<arguments.length?arguments[1]:void 0)},t=(g({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e}),g),dg=Pu.includes,M=pp,b=(t({target:"Array",proto:!0,forced:ss(function(){return!Array(1).includes()})},{includes:function(e){return dg(this,e,1<arguments.length?arguments[1]:void 0)}}),M("includes"),g),O=m,vg=Pu.indexOf,I=E,yg=O([].indexOf),gg=!!yg&&1/yg([1],1,-0)<0,P=I("indexOf"),e=(b({target:"Array",proto:!0,forced:gg||!P},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return gg?yg(this,e,t)||0:vg(this,e,t)}}),g),t=Hs,mg=ps,M=E,Eg=m([].join),Pu=t!=Object,O=M("join",","),wg=(e({target:"Array",proto:!0,forced:Pu||!O},{join:function(e){return Eg(mg(this),void 0===e?",":e)}}),kl),bg=ps,Tg=Os,_g=Ss,I=E,Ig=Math.min,Ag=[].lastIndexOf,Og=!!Ag&&1/[1].lastIndexOf(1,-0)<0,b=I("lastIndexOf"),P=Og||!b?function(e){if(Og)return wg(Ag,this,arguments)||0;var t=bg(this),r=_g(t),n=r-1;for((n=1<arguments.length?Ig(n,Tg(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Ag,t=(g({target:"Array",proto:!0,forced:P!==[].lastIndexOf},{lastIndexOf:P}),g),Ng=w.map,M=(t({target:"Array",proto:!0,forced:!R("map")},{map:function(e){return Ng(this,e,1<arguments.length?arguments[1]:void 0)}}),g),Sg=ms,Pg=Ss,Rg=S,e=ss(function(){return 4294967297!==[].push.call({length:4294967296},1)}),Pu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Mg=(M({target:"Array",proto:!0,arity:1,forced:e||Pu},{push:function(e){var t=Sg(this),r=Pg(t),n=arguments.length;Rg(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),vs),Cg=ms,xg=Hs,Ug=Ss,kg=TypeError,O={left:og(!1),right:og(!0)},kl=g,Dg=O.left,I=oa,b=El,P=(kl({target:"Array",proto:!0,forced:!E("reduce")||!b&&79<I&&I<83},{reduce:function(e){var t=arguments.length;return Dg(this,e,t,1<t?arguments[1]:void 0)}}),g),Lg=O.right,t=oa,M=El,e=(P({target:"Array",proto:!0,forced:!E("reduceRight")||!M&&79<t&&t<83},{reduceRight:function(e){return Lg(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),g),Fg=Tl,Vg=m([].reverse),Pu=[1,2],kl=(e({target:"Array",proto:!0,forced:String(Pu)===String(Pu.reverse())},{reverse:function(){return Fg(this)&&(this.length=this.length),Vg(this)}}),g),jg=Tl,Bg=N,Kg=fs,Hg=Ns,Gg=Ss,zg=ps,Jg=kp,b=ws,qg=_,I=R("slice"),Yg=b("species"),Wg=Array,$g=Math.max,O=(kl({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,n,i,o=zg(this),s=Gg(o),a=Hg(e,s),u=Hg(void 0===t?s:t,s);if(jg(o)&&(r=o.constructor,(r=Bg(r)&&(r===Wg||jg(r.prototype))||Kg(r)&&null===(r=r[Yg])?void 0:r)===Wg||void 0===r))return qg(o,a,u);for(n=new(void 0===r?Wg:r)($g(u-a,0)),i=0;a<u;a++,i++)a in o&&Jg(n,i,o[a]);return n.length=i,n}}),g),Xg=w.some,Zg=(O({target:"Array",proto:!0,forced:!E("some")},{some:function(e){return Xg(this,e,1<arguments.length?arguments[1]:void 0)}}),Ns),Qg=Ss,em=kp,tm=Array,rm=Math.max,nm=sg,im=Math.floor,El=ag,P=na.match(/firefox\/(\d+)/i),M=!!P&&+P[1],t=/MSIE|Trident/.test(na),e=na.match(/AppleWebKit\/(\d+)\./),Pu=!!e&&+e[1],_=g,b=m,om=vs,sm=ms,am=Ss,um=C,cm=up,kl=ss,pm=El,I=E,lm=M,fm=t,hm=oa,dm=Pu,vm=[],ym=b(vm.sort),gm=b(vm.push),O=kl(function(){vm.sort(void 0)}),P=kl(function(){vm.sort(null)}),na=I("sort"),mm=!kl(function(){if(hm)return hm<70;if(!(lm&&3<lm)){if(fm)return!0;if(dm)return dm<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++)vm.push({k:e+r,v:t})}for(vm.sort(function(e,t){return t.v-e.v}),r=0;r<vm.length;r++)e=vm[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});_({target:"Array",proto:!0,forced:O||!P||!na||!mm},{sort:function(e){void 0!==e&&om(e);var t=sm(this);if(mm)return void 0===e?ym(t):ym(t,e);for(var r,n,i=[],o=am(t),s=0;s<o;s++)s in t&&gm(i,t[s]);for(pm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:cm(e)>cm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)um(t,s++);return t}});mf("Array");var e=g,Em=ms,wm=Ns,bm=Os,Tm=Ss,_m=S,Im=jl,Am=kp,Om=C,El=R("splice"),Nm=Math.max,Sm=Math.min;e({target:"Array",proto:!0,forced:!El},{splice:function(e,t){var r,n,i,o,s,a,u=Em(this),c=Tm(u),p=wm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-p):(r=e-2,Sm(Nm(bm(t),0),c-p)),_m(c+r-n),i=Im(u,n),o=0;o<n;o++)(s=p+o)in u&&Am(i,o,u[s]);if(r<(i.length=n)){for(o=p;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:Om(u,a);for(o=c;c-n+r<o;o--)Om(u,o-1)}else if(n<r)for(o=c-n;p<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:Om(u,a);for(o=0;o<r;o++)u[o+p]=arguments[o+2];return u.length=c-n+r,i}}),pp("flat");pp("flatMap");var M=g,Pm=ms,Rm=Ss,Mm=C,Cm=S,t=1!==[].unshift(0),oa=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();M({target:"Array",proto:!0,arity:1,forced:t||oa},{unshift:function(e){var t=Pm(this),r=Rm(t),n=arguments.length;if(n){Cm(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:Mm(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});Ua.Array;var Pu={exports:{}},b={},xm=us,Um=ps,km=sa.f,Dm=sg,Lm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];b.f=function(e){if(!Lm||"Window"!=xm(e))return km(Um(e));try{return km(e)}catch(e){return Dm(Lm)}};function Fm(e){$m(e,rE,{value:{objectID:"O"+nE++,weakData:{}}})}function Vm(e,t,r){for(var n in t)TE(e,n,t[n],r);return e}function jm(e,t){for(var r=0,n=kE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Bm(e,t,r,n){for(var i,o,s,a=FE(e),u=LE(a),c=DE(t,r),p=BE(null),l=jE(u),f=0;f<l;f++)s=u[f],(o=VE(c(s,f,a)))in p?GE(p[o],s):p[o]=[s];if(n&&(i=n(a))!==HE)for(o in p)p[o]=KE(i,p[o]);return p}var I=ss(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),kl=ss,Km=fs,Hm=us,Gm=I,zm=Object.isExtensible,_=kl(function(){zm(1)})||Gm?function(e){return!!Km(e)&&((!Gm||"ArrayBuffer"!=Hm(e))&&(!zm||zm(e)))}:zm,O=!ss(function(){return Object.isExtensible(Object.preventExtensions({}))}),Jm=g,qm=m,P=Tu,Ym=fs,Wm=_a,$m=Ca.f,Xm=sa,Zm=b,Qm=_,eE=O,tE=!1,rE=Es("meta"),nE=0,iE=Pu.exports={enable:function(){iE.enable=function(){},tE=!0;var i=Xm.f,o=qm([].splice),e={};e[rE]=1,i(e).length&&(Xm.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===rE){o(t,r,1);break}return t},Jm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Zm.f}))},fastKey:function(e,t){if(!Ym(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Wm(e,rE)){if(!Qm(e))return"F";if(!t)return"E";Fm(e)}return e[rE].objectID},getWeakData:function(e,t){if(!Wm(e,rE)){if(!Qm(e))return!0;if(!t)return!1;Fm(e)}return e[rE].weakData},onFreeze:function(e){return eE&&tE&&Qm(e)&&!Wm(e,rE)&&Fm(e),e}},oE=(P[rE]=!0,ls),sE=fs,aE=Jc,uE=g,cE=r,pE=m,lE=Su,fE=As,hE=Pu.exports,dE=ap,vE=Ef,yE=ls,gE=fs,mE=ss,EE=Sd,wE=Dl,bE=function(e,t,r){return aE&&oE(t=t.constructor)&&t!==r&&sE(t=t.prototype)&&t!==r.prototype&&aE(e,t),e},TE=As,_E=Ca.f,IE=A,AE=Vm,OE=tp,NE=Ef,SE=ap,PE=Vl,RE=mf,ME=ee,CE=Pu.exports.fastKey,xE=H.set,UE=H.getterFor,kE=(function(e,t,r){function n(e){var r=pE(h[e]);fE(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(p&&!gE(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return p&&!gE(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(p&&!gE(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"),p=-1!==e.indexOf("Weak"),l=c?"set":"add",f=cE[e],h=f&&f.prototype,d=f,v={};return lE(e,!yE(f)||!(p||h.forEach&&!mE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,l),hE.enable()):lE(e,!0)&&(o=(i=new d)[l](p?{}:-0,1)!=i,s=mE(function(){i.has(1)}),a=EE(function(e){new f(e)}),u=!p&&mE(function(){for(var e=new f,t=5;t--;)e[l](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){vE(e,h);e=bE(new f,e,d);return null!=t&&dE(t,e[l],{that:e,AS_ENTRIES:c}),e})).prototype=h).constructor=d),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(l),p&&h.clear&&delete h.clear),v[e]=d,uE({global:!0,constructor:!0,forced:d!=f},v),wE(d,e),p||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=CE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),ME?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=CE(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){NE(e,a),xE(e,{type:r,index:IE(null),first:void 0,last:void 0,size:0}),ME||(e.size=0),null!=t&&SE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=UE(r);return AE(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,ME?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),ME?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=OE(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)}}),AE(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)}}),ME&&_E(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=UE(t),o=UE(n);PE(e,t,function(e,t){xE(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),RE(t)}}),Ss),DE=tp,LE=Hs,FE=ms,VE=bs,jE=Ss,BE=A,KE=jm,HE=Array,GE=m([].push),zE=Bm,na=pp;g({target:"Array",proto:!0},{group:function(e){return zE(this,e,1<arguments.length?arguments[1]:void 0)}}),na("group");var JE=Bm,kp=pp;g({target:"Array",proto:!0,forced:!E("groupBy")},{groupBy:function(e){return JE(this,e,1<arguments.length?arguments[1]:void 0)}}),kp("groupBy");function qE(e){for(var t,r,n=$E(this),i=WE(n),o=YE(e,1<arguments.length?arguments[1]:void 0),s=new ZE,a=XE(i),u=0;u<a;u++)t=o(r=i[u],u,n),ew(s,t)?rw(QE(s,t),r):tw(s,t,[r]);return s}var YE=tp,R=m,WE=Hs,$E=ms,XE=Ss,ZE=hs("Map"),e=ZE.prototype,QE=R(e.get),ew=R(e.has),tw=R(e.set),rw=R([].push),El=pp,C=qE;g({target:"Array",proto:!0,name:"groupToMap",forced:!E("groupByToMap")},{groupByToMap:C}),El("groupByToMap");function nw(e){return uw[e].prototype}var M=pp,iw=(g({target:"Array",proto:!0},{groupToMap:qE}),M("groupToMap"),Ss),ow=function(e,t){for(var r=iw(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},sw=ps,t=pp,aw=Array,uw=(g({target:"Array",proto:!0},{toReversed:function(){return ow(sw(this),aw)}}),t("toReversed"),r),oa=g,cw=vs,pw=ps,lw=jm,Ua=pp,fw=Array,hw=m(nw("Array").sort),I=(oa({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&cw(e);var t=pw(this),t=lw(fw,t);return hw(t,e)}}),Ua("toSorted"),g),kl=pp,dw=S,vw=Ss,yw=Ns,gw=ps,mw=Os,Ew=Array,ww=Math.max,bw=Math.min,Tw=(I({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=gw(this),a=vw(s),u=yw(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,bw(ww(mw(t),0),a-u)),i=dw(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}}),kl("toSpliced"),Ss),_w=Os,Iw=RangeError,Aw=function(e,t,r,n){var i=Tw(e),r=_w(r),o=r<0?i+r:r;if(i<=o||o<0)throw Iw("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},Ow=ps,Nw=Array;g({target:"Array",proto:!0},{with:function(e,t){return Aw(Ow(this),Nw,e,t)}});Tu=r,_a=T,sa=ls,b=Cu,_=As,O="USE_FUNCTION_CONSTRUCTOR",P=ws("asyncIterator"),Jc=Tu.AsyncIterator,Su=_a.AsyncIteratorPrototype;if(Su)RT=Su;else if(sa(Jc))RT=Jc.prototype;else if(_a[O]||Tu[O])try{bT=b(b(b(Function("return async function*(){}()")()))),b(bT)===Object.prototype&&(RT=bT)}catch(e){}sa((RT=RT||{})[P])||_(RT,P,function(){return this});function Sw(e,t,r){var n=e.done;Dw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function Pw(e){Fw(this,{type:Lw,iterator:Uw(e),next:e.next})}function Rw(e){var f=0==e,h=1==e,d=2==e,v=3==e;return function(e,s,a){var e=r0(e),u=t0("Promise"),c=e.iterator,t=e.next,p=0,l=void 0!==s;return!l&&f||Zw(s),new u(function(r,n){var i=function(e){n0(c,n,e,n)},o=function(){try{if(f&&l)try{e0(p)}catch(e){i(e)}u.resolve(Qw(Xw(t,c))).then(function(e){try{if(Qw(e).done)f?(a.length=p,r(a)):r(!v&&(d||void 0));else{var t=e.value;try{l?u.resolve(f?s(t,p):s(t)).then(function(e){if(h)o();else if(d)e?o():n0(c,r,!1,n);else if(f)try{a[p++]=e,o()}catch(e){i(e)}else e?n0(c,r,v||t,n):o()},i):(a[p++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function Mw(e,t){if(!E0||!m0(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 Cw(e,t,r){return r.get&&w0(r.get,t,{getter:!0}),r.set&&w0(r.set,t,{setter:!0}),b0.f(e,t,r)}var xw=G,Uw=_s,Pu=A,kw=ys,na=Vm,kp=H,Hs=RT,Dw=hs("Promise"),Lw="AsyncFromSyncIterator",Fw=kp.set,Vw=kp.getterFor(Lw),e=(Pw.prototype=na(Pu(Hs),{next:function(){var n=Vw(this);return new Dw(function(e,t){var r=Uw(xw(n.next,n.iterator));Sw(r,e,t)})},return:function(){var n=Vw(this).iterator;return new Dw(function(e,t){var r=kw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=Uw(xw(r,n));Sw(r,e,t)})}}),Pw),jw=G,Bw=e,Kw=_s,Hw=ip,Gw=ys,zw=ws("asyncIterator"),Jw=vs,qw=_s,Yw=G,Ww=hs,$w=ys,Xw=G,Zw=vs,Qw=_s,e0=S,t0=hs,r0=function(e){return{iterator:e,next:Jw(qw(e).next)}},n0=function(e,t,r,n){try{var i=$w(e,"return");if(i)return Ww("Promise").resolve(Yw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},R={toArray:Rw(0),forEach:Rw(1),every:Rw(2),some:Rw(3),find:Rw(4)},i0=tp,o0=ms,s0=N,a0=function(e,t){t=arguments.length<2?Gw(e,zw):t;return t?Kw(jw(t,e)):new Bw(Hw(e))},u0=ip,c0=np,p0=ys,E=nw,l0=hs,C=ws,f0=e,h0=R.toArray,d0=C("asyncIterator"),v0=E("Array").values,El=(g({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(l0("Promise"))(function(e){var t=o0(o),r=(void 0!==a&&(a=i0(a,u)),p0(t,d0)),n=r?void 0:c0(t)||v0,i=s0(s)?new s:[],r=r?a0(t,r):new f0(u0(t,n));e(h0(r,a,i))})}}),g),y0=w.filterReject,M=pp,t=(El({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return y0(this,e,1<arguments.length?arguments[1]:void 0)}}),M("filterOut"),g),g0=w.filterReject,oa=pp,Ua=(t({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return g0(this,e,1<arguments.length?arguments[1]:void 0)}}),oa("filterReject"),g),m0=Tl,E0=Object.isFrozen,w0=(Ua({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!Mw(e,!0))return!1;var t=e.raw;return t.length===e.length&&Mw(t,!1)}}),ia.exports),b0=Ca,I=pp,T0=ms,_0=Ss;ee&&(Cw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=T0(this),t=_0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=T0(this),r=_0(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var kl=pp,I0=ms,A0=Ss;ee&&(Cw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=I0(this),e=A0(e);return 0==e?0:e-1}}),kl("lastIndex"));var r=m,O0=vs,N0=Ss,S0=ms,P0=jl,R0=hs("Map"),T=R0.prototype,M0=r(T.forEach),C0=r(T.has),x0=r(T.set),U0=r([].push),Cu=pp;g({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=S0(this),i=N0(n),o=P0(n,0),s=new R0,a=null!=e?O0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),C0(s,r)||x0(s,r,t);return M0(s,function(e){U0(o,e)}),o}}),Cu("uniqueBy");D0.exposure=function(e,t,r,n){return new F0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},D0.track=function(e,t,r,n){return new B0(n,r,e,t)},D0.remoteConfig=function(e,t,r,n){return new G0(n,e,t.parameter,t.valueId,t.reason,r)},D0.isExposureEvent=function(e){return void 0!==e.experiment},D0.isTrackEvent=function(e){return void 0!==e.eventType},D0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},D0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},D0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},D0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},D0.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[jt.ID],identifiers:this.user.identifiers,userProperties:Ue.sanitize(this.user.properties),hackleProperties:Ue.sanitize(this.user.hackleProperties)}};var k0=D0;function D0(e,t,r){void 0===r&&(r=K()),this.timestamp=e,this.user=t,this.insertId=r}i(V0,L0=k0),V0.prototype.copyWithUser=function(e){return new V0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},V0.prototype.toDto=function(){return c(c({},L0.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 L0,F0=V0;function V0(e,t,r,n,i,o,s,a){e=L0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}i(K0,j0=k0),K0.prototype.copyWithUser=function(e){return new K0(this.timestamp,e,this.eventType,this.event,this.insertId)},K0.prototype.toDto=function(){return c(c({},j0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Ue.sanitize(this.event.properties)})};var j0,B0=K0;function K0(e,t,r,n,i){e=j0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}i(z0,H0=k0),z0.prototype.copyWithUser=function(e){return new z0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},z0.prototype.toDto=function(){return c(c({},H0.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Ue.sanitize(this.properties)})};var H0,G0=z0;function z0(e,t,r,n,i,o,s){e=H0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}q0.isSessionEvent=function(e){return!!k0.isTrackEvent(e)&&(e.event.key===q0.SESSION_START_EVENT_NAME||e.event.key===q0.SESSION_END_EVENT_NAME)},q0.prototype.onSessionStarted=function(e,t,r){this.track(q0.SESSION_START_EVENT_NAME,e,t,r)},q0.prototype.onSessionEnded=function(e,t,r){this.track(q0.SESSION_END_EVENT_NAME,e,t,r)},q0.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)},q0.prototype.decorateSession=function(e,t){t=(new Ht).add(jt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},q0.SESSION_START_EVENT_NAME="$session_start",q0.SESSION_END_EVENT_NAME="$session_end";var J0=q0;function q0(e,t){this.userManager=e,this.core=t}W0.prototype.process=function(e){var t;J0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=e.copyWithUser(e.user),t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[jt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[jt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},W0.prototype.flush=function(e){this.delegate.flush(e)},W0.prototype.close=function(){this.delegate.close()},W0.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.flush(!0);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var Y0=W0;function W0(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}X0.toEvent=function(e){var t;return{key:X0.EVENT_KEY,properties:{level:X0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:X0._stacktrace(e)}}},X0._stacktrace=function(e){return u.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,X0.STACK_TRACK_LIMIT).join("\n")},X0.EVENT_KEY="$trace",X0.LEVEL_ERROR="error",X0.STACK_TRACK_LIMIT=30;var $0=X0;function X0(){}Z0.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)}};Su=Z0;function Z0(){}eb.prototype.with=function(e){return new eb(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},eb.of=function(e,t,r,n){return new eb(n,t.targetEvaluations,e.experiment,r.id,r.key,r.config)},eb.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return u.isNotNullOrUndefined(n)?this.of(e,t,n,r):new eb(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)};var Q0=eb;function eb(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}i(nb,tb=Su),nb.prototype.supports=function(e){return void 0!==e.experiment},nb.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.experimentFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:Q0.ofDefault(e,t,l.TRAFFIC_NOT_ALLOCATED)};var tb,rb=nb;function nb(e){var t=tb.call(this)||this;return t.experimentFlowFactory=e,t}ob.of=function(e,t,r,n,i,o){return o.returnValue=Ue.truncateStringValue(n),new ob(i,t.targetEvaluations,e.parameter,r,n,o)},ob.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var ib=ob;function ob(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}i(ub,sb=Su),ub.prototype.supports=function(e){return void 0!==e.parameter},ub.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=Ue.truncateStringValue(e.defaultValue),u.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return ib.ofDefault(e,t,l.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return u.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,l.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,l.DEFAULT_RULE,r)},ub.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?ib.ofDefault(e,t,l.TYPE_MISMATCH,i):ib.of(e,t,r.id,r.rawValue,n,i)};var sb,ab=ub;function ub(e){var t=sb.call(this)||this;return t.targetRuleDeterminer=e,t}pb.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var cb=pb;function pb(e,t){this.type=e,this.id=t}fb.create=function(){return new fb},Object.defineProperty(fb.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(fb.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(fb.prototype,"properties",{get:function(){return Ue.sanitize(this._properties)},enumerable:!1,configurable:!0}),fb.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},fb.prototype.addRequest=function(e){this._stack.push(e)},fb.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},fb.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof Q0&&e.experiment.id===t.id})},fb.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},fb.prototype.setProperty=function(e,t){this._properties[e]=t},fb.prototype.get=function(e){var t=this.map.get(e);if(!t)return null;if(t instanceof e)return t;throw new Error("Context does not contain a value of type ".concat(e.name))},fb.prototype.set=function(e,t){this.map.set(e,t)};var lb=fb;function fb(){this._stack=[],this._targetEvaluations=[],this._properties={},this.map=new WeakMap}db.of=function(e,t,r,n){return new db(e,t,r,n)},db.by=function(e,t){return new db(e.workspace,e.user,t,"A")},db.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var hb=db;function db(e,t,r,n){this.key=new cb("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}yb.of=function(e,t,r,n,i){return new yb(e,t,r,n,i)},yb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var vb=yb;function yb(e,t,r,n,i){this.key=new cb("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}gb.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();case"boolean":return e?"true":"false";default:return}},gb.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},gb.asBoolean=function(e){switch(typeof e){case"boolean":return e;case"string":switch(e){case"true":return!0;case"false":return!1;default:return}default:return}},gb.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var x=gb;function gb(){}Eb.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 mb=Eb;function Eb(e){this.storages=e}bb.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},bb.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return x.asNumber(e)},bb.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=x.asNumber(t),e=x.asNumber(e);u.isNullOrUndefined(t)||t<0||u.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},bb.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},bb.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},bb.prototype.clear=function(){this.listStorage.clear()};var wb=bb;function bb(e){this.listStorage=e}_b.prototype.add=function(e){this.evaluators.push(e)},_b.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(u.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)};var Tb=_b;function _b(){this.evaluators=new Array}Ab.get=function(e){return u.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},Ab.getOrNull=function(e){return Ab.instances.get(e)},Ab.register=function(e,t){return Ab.instances.set(e,t),t},Ab.instances=new Map;var Ib=Ab;function Ab(){}Nb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},Nb.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(u.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(u.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return u.isNotNullOrUndefined(this.bucketer.bucketing(e,t))};var Ob=Nb;function Nb(e,t){this.targetMatcher=e,this.bucketer=t}Pb.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},Pb.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},Pb.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 Sb=Pb;function Pb(e){this.bucketer=e}Mb.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},Mb.end=function(){return new Mb(void 0,void 0)},Mb.decision=function(e,t){return new Mb(e,t)},Mb.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 Rb=Mb;function Mb(e,t){this.flowEvaluator=e,this.nextFlow=t}xb.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 Q0.of(e,t,n,l.OVERRIDDEN);case"FEATURE_FLAG":return Q0.of(e,t,n,l.INDIVIDUAL_TARGET_MATCH)}};var Cb=xb;function xb(e){this.overrideResolver=e}kb.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?Q0.ofDefault(e,t,l.EXPERIMENT_DRAFT):r.evaluate(e,t)};var Ub=kb;function kb(){}Lb.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return Q0.ofDefault(e,t,l.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return Q0.ofDefault(e,t,l.FEATURE_FLAG_INACTIVE)}};var Db=Lb;function Lb(){}Vb.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return Q0.of(e,t,r,l.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var Fb=Vb;function Vb(){}Bb.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):Q0.ofDefault(e,t,l.NOT_IN_EXPERIMENT_TARGET)};var jb=Bb;function Bb(e){this.experimentTargetDeterminer=e}Hb.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?Q0.ofDefault(e,t,l.VARIATION_DROPPED):Q0.of(e,t,n,l.TRAFFIC_ALLOCATED):Q0.ofDefault(e,t,l.TRAFFIC_NOT_ALLOCATED)};var Kb=Hb;function Hb(e){this.actionResolver=e}zb.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 Q0.of(e,t,r,l.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var Gb=zb;function zb(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}qb.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 Q0.ofDefault(e,t,l.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return Q0.of(e,t,n,l.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var Jb=qb;function qb(e){this.actionResolver=e}Wb.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):Q0.ofDefault(e,t,l.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var Yb=Wb;function Wb(e){this.containerResolver=e}Xb.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):Q0.ofDefault(e,t,l.IDENTIFIER_NOT_FOUND)};var $b=Xb;function Xb(){}Qb.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 Zb=Qb;function Qb(e){this.targetMatcher=e}tT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var eT=tT;function tT(e){this.targetMatcher=e}nT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},nT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},nT.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)}},nT.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 rT=nT;function nT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}oT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(u.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(u.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(u.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(u.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var iT=oT;function oT(e){this.bucketer=e}aT.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}};var sT=aT;function aT(e,t,r){var n=new Sb(t),e=new rT(e,r,n),t=new iT(t);this.abTestFlow=Rb.of(new Cb(e),new $b,new Yb(t),new jb(new Zb(r)),new Ub,new Db,new Fb,new Kb(n)),this.featureFlagFlow=Rb.of(new Ub,new Db,new Fb,new Cb(e),new $b,new Gb(new eT(r),n),new Jb(n))}cT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},cT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},cT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var uT=cT;function cT(e){this.conditionMatcherFactory=e}lT.prototype.decorate=function(e){return e};var pT=lT;function lT(){}hT.prototype.decorate=function(e){return"string"==typeof e?Jo.decodeURIOrOriginal(e):e};var fT=hT;function hT(){}vT.prototype.matches=function(e,t,r){void 0===r&&(r=new pT);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)},vT.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)},vT.prototype.singleMatches=function(e,t,r,n,i){e=i.decorate(e),t=t.values.map(i.decorate);return n.matches(r,e,t)},vT.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},vT.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var dT=vT;function vT(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}yT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.inMatches(r,e)})};Jc=yT;function yT(){}gT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.containsMatches(r,e)})};_a=gT;function gT(){}mT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.startsWithMatches(r,e)})};Tu=mT;function mT(){}ET.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.endsWithMatches(r,e)})};O=ET;function ET(){}wT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanMatches(r,e)})};b=wT;function wT(){}TT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanOrEqualMatches(r,e)})};var bT=TT;function TT(){}_T.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanMatches(r,e)})};sa=_T;function _T(){}IT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanOrEqualMatches(r,e)})};_=IT;function IT(){}AT.prototype.matches=function(e,t,r){return!u.isNullOrUndefined(t)};P=AT;function AT(){}NT.prototype.getMatcher=function(e){switch(e){case"IN":return NT.IN_MATCHER;case"CONTAINS":return NT.CONTAINS_MATCHER;case"STARTS_WITH":return NT.STARTS_WITH_MATCHER;case"ENDS_WITH":return NT.ENDS_WITH_MATCHER;case"GT":return NT.GT_MATCHER;case"GTE":return NT.GTE_MATCHER;case"LT":return NT.LT_MATCHER;case"LTE":return NT.LTE_MATCHER;case"EXISTS":return NT.EXISTS_MATCHER}},NT.IN_MATCHER=new Jc,NT.CONTAINS_MATCHER=new _a,NT.STARTS_WITH_MATCHER=new Tu,NT.ENDS_WITH_MATCHER=new O,NT.GT_MATCHER=new b,NT.GTE_MATCHER=new bT,NT.LT_MATCHER=new sa,NT.LTE_MATCHER=new _,NT.EXISTS_MATCHER=new P;var OT=NT;function NT(){}ST.prototype.inMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},ST.prototype.containsMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.includes(t)},ST.prototype.startsWithMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.startsWith(t)},ST.prototype.endsWithMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.endsWith(t)},ST.prototype.greaterThanMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<e},ST.prototype.greaterThanOrEqualMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<=e},ST.prototype.lessThanMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<t},ST.prototype.lessThanOrEqualMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<=t};A=ST;function ST(){}PT.prototype.inMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},PT.prototype.containsMatches=function(e,t){return!1},PT.prototype.startsWithMatches=function(e,t){return!1},PT.prototype.endsWithMatches=function(e,t){return!1},PT.prototype.greaterThanMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<e},PT.prototype.greaterThanOrEqualMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<=e},PT.prototype.lessThanMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<t},PT.prototype.lessThanOrEqualMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<=t};H=PT;function PT(){}MT.prototype.inMatches=function(e,t){e=x.asBoolean(e),t=x.asBoolean(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},MT.prototype.containsMatches=function(e,t){return!1},MT.prototype.startsWithMatches=function(e,t){return!1},MT.prototype.endsWithMatches=function(e,t){return!1},MT.prototype.greaterThanMatches=function(e,t){return!1},MT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},MT.prototype.lessThanMatches=function(e,t){return!1},MT.prototype.lessThanOrEqualMatches=function(e,t){return!1};var RT=MT;function MT(){}CT.prototype.inMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isEqualTo(t)},CT.prototype.containsMatches=function(e,t){return!1},CT.prototype.startsWithMatches=function(e,t){return!1},CT.prototype.endsWithMatches=function(e,t){return!1},CT.prototype.greaterThanMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isGreaterThan(t)},CT.prototype.greaterThanOrEqualMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isGreaterThanOrEqualTo(t)},CT.prototype.lessThanMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isLessThan(t)},CT.prototype.lessThanOrEqualMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isLessThanOrEqualTo(t)};kp=CT;function CT(){}xT.prototype.inMatches=function(e,t){e=Jo.tryParse(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&Jo.decodeURIOrOriginal(Jo.removePathnameTrailingSlash(e))===Jo.decodeURIOrOriginal(Jo.removePathnameTrailingSlash(t))},xT.prototype.containsMatches=function(e,t){e=Jo.tryParse(e),t=x.asString(t);if(u.isNullOrUndefined(e)||u.isNullOrUndefined(t))return!1;e=Jo.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))},xT.prototype.startsWithMatches=function(e,t){e=Jo.tryParse(e),t=x.asString(t);if(u.isNullOrUndefined(e)||u.isNullOrUndefined(t))return!1;e=Jo.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))},xT.prototype.endsWithMatches=function(e,t){return!1},xT.prototype.greaterThanMatches=function(e,t){return!1},xT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},xT.prototype.lessThanMatches=function(e,t){return!1},xT.prototype.lessThanOrEqualMatches=function(e,t){return!1};na=xT;function xT(){}UT.prototype.inMatches=function(e,t){return!1},UT.prototype.containsMatches=function(e,t){return!1},UT.prototype.startsWithMatches=function(e,t){return!1},UT.prototype.endsWithMatches=function(e,t){return!1},UT.prototype.greaterThanMatches=function(e,t){return!1},UT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},UT.prototype.lessThanMatches=function(e,t){return!1},UT.prototype.lessThanOrEqualMatches=function(e,t){return!1};Pu=UT;function UT(){}DT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return DT.STRING_MATCHER;case"NUMBER":return DT.NUMBER_MATCHER;case"BOOLEAN":return DT.BOOLEAN_MATCHER;case"VERSION":return DT.VERSION_MATCHER;case"URL":return DT.URL_MATCHER;case"NULL":case"UNKNOWN":return DT.NULL_MATCHER}},DT.STRING_MATCHER=new A,DT.NUMBER_MATCHER=new H,DT.BOOLEAN_MATCHER=new RT,DT.VERSION_MATCHER=new kp,DT.URL_MATCHER=new na,DT.NULL_MATCHER=new Pu;var kT=DT;function DT(){}FT.prototype.matches=function(e,t,r){var e=this.userValueResolver.resolveOrNull(e.user,r.key),n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},FT.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?fT:pT)};var LT=FT;function FT(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}jT.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];default:throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var VT=jT;function jT(){}KT.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}},KT.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 BT=KT;function KT(e){this.segmentMatcher=e}GT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},GT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var HT=GT;function GT(e){this.userConditionMatcher=e}zT.prototype.evaluateInternal=function(e,t,r){r=hb.by(e,r),r=this.evaluator.evaluate(r,t);if(!(r instanceof Q0))throw new Error("Unexpected evaluation [expected=ExperimentEvaluation, actual=".concat(r.constructor.name,"]"));e=this.resolve(e,t,r);return t.addEvaluation(e),e},zT.prototype.evaluate=function(e,t,r){var n;return null!=(n=t.getEvaluation(r))?n:this.evaluateInternal(e,t,r)};Hs=zT;function zT(e){this.evaluator=e}qT.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);default:throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var JT=qT;function qT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}i(WT,YT=Hs),WT.prototype.matches=function(e,t,r){var n=u.requiredNotNullOrUndefined(x.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(u.isNullOrUndefined(n))return!1;e=this.evaluate(e,t,n);return this.evaluationMatches(e,r)};var YT,G=WT;function WT(e,t){e=YT.call(this,e)||this;return e.valueOperatorMatcher=t,e}i(ZT,$T=G),ZT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},ZT.prototype.resolve=function(e,t,r){return r.reason===l.TRAFFIC_ALLOCATED?r.with(l.TRAFFIC_ALLOCATED_BY_TARGETING):r},ZT.prototype.evaluationMatches=function(e,t){return!!ZT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},ZT.AB_TEST_MATCHED_REASONS=[l.OVERRIDDEN,l.TRAFFIC_ALLOCATED,l.EXPERIMENT_COMPLETED,l.TRAFFIC_ALLOCATED_BY_TARGETING];var $T,XT=ZT;function ZT(e,t){return $T.call(this,e,t)||this}i(t_,QT=G),t_.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},t_.prototype.resolve=function(e,t,r){return r},t_.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var QT,e_=t_;function t_(e,t){return QT.call(this,e,t)||this}n_.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return this.valueOperatorMatcher.matches(e,r.match)},n_.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var r_=n_;function n_(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}o_.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,"]"))}},o_.prototype.properties=function(e){return k0.isTrackEvent(e)?e.event.properties:k0.isExposureEvent(e)||k0.isRemoteConfigEvent(e)?e.properties:void 0};var i_=o_;function o_(){}a_.prototype.matches=function(e,t,r){if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));e=null!=(e=null==(e=e.user.cohorts)?void 0:e.map(function(e){return e.id}))?e:[];return this.valueOperatorMatcher.matches(e,r.match)};var s_=a_;function a_(e){this.valueOperatorMatcher=e}c_.prototype.supports=function(e){return"NUMBER_OF_EVENTS_IN_DAYS"===e||"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"===e},c_.prototype.matches=function(e,t,r){var n,i=r.key.type;if(!this.supports(i))throw new Error("Unsupported TargetKeyType [".concat(i,"]"));var o=null!=(n=e.user.targetEvents)?n:[];switch(i){case"NUMBER_OF_EVENTS_IN_DAYS":return new f_(this.valueOperatorMatcher,this.clock).matches(e,o,r);case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return new v_(this.valueOperatorMatcher,this.clock).matches(e,o,r);default:return i}};var u_=c_;function c_(e,t){this.valueOperatorMatcher=e,this.clock=t}function p_(){}i(h_,l_=p_),h_.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-Le.daysToUnit(i.days,"milliseconds"),t=t.filter(function(e){return n.expressionMatch(e,i)}),t=f.sum(t,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(t,r.match)},h_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&null===e.property},h_.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var l_,f_=h_;function h_(e,t){var r=l_.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}i(y_,d_=p_),y_.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-Le.daysToUnit(i.days,"milliseconds"),t=t.filter(function(e){return n.expressionMatch(e,i)}),t=f.sum(t,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(t,r.match)},y_.prototype.propertyMatch=function(e,t){return(null==e?void 0:e.type)===t.key.type&&e.key===t.key.name&&this.valueOperatorMatcher.matches(e.value,t.match)},y_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&this.propertyMatch(e.property,t.propertyFilter)},y_.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var d_,v_=y_;function y_(e,t){var r=d_.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}m_.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;case"NUMBER_OF_EVENTS_IN_DAYS":case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return this.userTargetConditionMatcher;default:return e}};var g_=m_;function m_(e,t){var r=new dT(new kT,new OT);this.userConditionMatcher=new LT(new VT,r),this.eventConditionMatcher=new r_(new i_,r),this.segmentConditionMatcher=new BT(new HT(this.userConditionMatcher)),this.experimentConditionMatcher=new JT(new XT(e,r),new e_(e,r)),this.cohortConditionMatcher=new s_(r),this.userTargetConditionMatcher=new u_(r,t)}var E_={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}},w_=(b_.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},b_.prototype.calculateSlotNumber=function(e,t,r){r=E_.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},b_);function b_(){}var T_=s.log,__=(I_.create=function(e,t,r,n){var i=Fe.instance,o=Ib.register("delegatingEvaluator",new Tb),s=new w_,i=Ib.register("targetMatcher",new uT(new g_(o,i))),n=new mb(n),i=new Ob(i,s),n=new sT(n,s,Ib.get("targetMatcher")),s=new rb(n),n=new ab(i);return o.add(s),o.add(n),new I_(s,n,e,t,r,new A_)},I_.prototype.getExperiment=function(e){if(e){var t=this.workspaceFetcher.get();if(t)return t.getExperimentOrNull(e)}else T_.error("experimentKey must not be empty")},I_.prototype.experiment=function(e,t,r){var n=this;if(!e)return T_.error("experimentKey must not be empty"),bt.of(r,l.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return T_.warn("SDK not ready."),bt.of(r,l.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return T_.warn("Experiment does not exist."),bt.of(r,l.EXPERIMENT_NOT_FOUND);i=hb.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},I_.prototype.experiments=function(r){var n=this,i=new Qn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=hb.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},I_.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,lb.create()),t=null!=(t=e.config)?t:new je;return[e,bt.of(e.variationKey,e.reason,t,e.experiment)]},I_.prototype.featureFlag=function(e,t){var r=this;if(!e)return T_.error("featureKey must not be empty"),_t.off(l.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return T_.warn("SDK not ready."),_t.off(l.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return T_.warn("FeatureFlag does not exist."),_t.off(l.FEATURE_FLAG_NOT_FOUND);n=hb.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},I_.prototype.featureFlags=function(r){var n=this,i=new Qn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=hb.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},I_.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,lb.create()),t=null!=(t=e.config)?t:new je;return[e,"A"===e.variationKey?_t.off(e.reason,t,e.experiment):_t.on(e.reason,t,e.experiment)]},I_.prototype.inAppMessage=function(e,t,r){t=r.evaluate(e,t);return r.record(e,t),t},I_.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?T_.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(k0.track(n,e,t,r))):T_.warn("Event key must be not null. or event key must be string type."):T_.warn("event must not be null.")},I_.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=$0.toEvent(e),this.flush(),this.track(e,t),this.flush())},I_.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},I_.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(u.isNullOrUndefined(o))return T_.warn("SDK not ready."),Et.of(n,l.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(u.isNullOrUndefined(e))return T_.warn("Remote config parameter does not exist."),Et.of(n,l.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=vb.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,lb.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Et.of(t.value,t.reason)},I_.prototype.close=function(){this.eventProcessor.close()},I_);function I_(e,t,r,n,i,o){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.workspaceFetcher=r,this.eventFactory=n,this.eventProcessor=i,this.errorDedupDeterminer=o}O_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},O_.prototype._isSameError=function(e,t){return!u.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var A_=O_;function O_(){}S_.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},S_.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var N_=S_;function S_(){this._installed=[],this._installations={onerror:M_,onunhandledrejection:C_}}var P_,R_=null;function M_(o,s){R_=window.onerror,window.onerror=function(e,t,r,n,i){u.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),R_&&R_.apply(this,arguments)}}function C_(r,n){P_=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()),P_&&P_.apply(this,arguments)}}U_.prototype.read=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},U_.prototype.save=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},U_.prototype.add=function(r){return a(this,void 0,void 0,function(){var t;return p(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]}})})},U_.prototype.delete=function(n){return a(this,void 0,void 0,function(){var t,r=this;return p(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]}})})},U_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},U_.prototype.clear=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var x_=U_;function U_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var k_=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},D_=(L_.builder=function(){return new F_},L_.empty=function(){return L_.builder().build()},L_.from=function(e){return new L_(e)},L_.fromDto=function(e){for(var t=L_.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 jn(e)})})}return t.build()},Object.defineProperty(L_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),L_.prototype.get=function(e){return this.cohorts.get(e)},L_.prototype.filterBy=function(e){var r=Kt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return L_.from(e)},L_.prototype.asArray=function(){return this.cohorts.values()},L_.prototype.asComparable=function(){return this.cohorts},L_.prototype.toBuilder=function(){return new F_(this)},L_);function L_(e){this.cohorts=e}V_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},V_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},V_.prototype.build=function(){return new D_(this.cohorts)};var F_=V_;function V_(e){this.cohorts=new Qn(Me.isEqual),e&&this.putAll(e)}var S="model",N="name",e="type",R="vendor",C="version",E="architecture",El="console",M="mobile",w="tablet",t="smarttv",oa="wearable",j_=(U.parse=function(e){return{browser:U.getBrowser(e),cpu:U.getCPU(e),device:U.getDevice(e),engine:U.getEngine(e),os:U.getOS(e)}},U.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return U.mapper.rgx.call(t,e,U.regexes.browser),t.major=U.util.major(t.version),t},U.getCPU=function(e){var t={architecture:void 0};return U.mapper.rgx.call(t,e,U.regexes.cpu),t},U.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return U.mapper.rgx.call(t,e,U.regexes.device),t},U.getEngine=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.getOS=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.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,"")}},U.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[N,C],[/(opios)[\/\s]+([\w\.]+)/i],[[N,"Opera Mini"],C],[/\s(opr)\/([\w\.]+)/i],[[N,"Opera"],C],[/(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],[N,C],[/(konqueror)\/([\w\.]+)/i],[[N,"Konqueror"],C],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[N,"IE"],C],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[N,"Edge"],C],[/(yabrowser)\/([\w\.]+)/i],[[N,"Yandex"],C],[/(Avast)\/([\w\.]+)/i],[[N,"Avast Secure Browser"],C],[/(AVG)\/([\w\.]+)/i],[[N,"AVG Secure Browser"],C],[/(puffin)\/([\w\.]+)/i],[[N,"Puffin"],C],[/(focus)\/([\w\.]+)/i],[[N,"Firefox Focus"],C],[/(opt)\/([\w\.]+)/i],[[N,"Opera Touch"],C],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[N,"UCBrowser"],C],[/(comodo_dragon)\/([\w\.]+)/i],[[N,/_/g," "],C],[/(windowswechat qbcore)\/([\w\.]+)/i],[[N,"WeChat(Win) Desktop"],C],[/(micromessenger)\/([\w\.]+)/i],[[N,"WeChat"],C],[/(brave)\/([\w\.]+)/i],[[N,"Brave"],C],[/(whale)\/([\w\.]+)/i],[[N,"Whale"],C],[/(qqbrowserlite)\/([\w\.]+)/i],[N,C],[/(QQ)\/([\d\.]+)/i],[N,C],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[N,C],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[N,C],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[N,C],[/(MetaSr)[\/\s]?([\w\.]+)/i],[N],[/(LBBROWSER)/i],[N],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[C,[N,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[C,[N,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[N,C],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[C,[N,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[N,/(.+)/,"$1 WebView"],C],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[N,/(.+(?:g|us))(.+)/,"$1 $2"],C],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[N,"Chrome Mobile"],C],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[C,[N,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[N,"Sailfish Browser"],C],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[N,C],[/(dolfin)\/([\w\.]+)/i],[[N,"Dolphin"],C],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[N,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[N,"Opera Coast"],C],[/fxios\/([\w\.-]+)/i],[C,[N,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[C,[N,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[C,N],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[N,"GSA"],C],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[N,[C,(U.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],p=r=0;p<u.length&&!o;)if(o=u[p++].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(U.util.has(t[r][n],e))return"?"===r?void 0:r}else if(U.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(U.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],[N,C],[/(navigator|netscape)\/([\w\.-]+)/i],[[N,"Netscape"],C],[/(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],[N,C]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,U.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[E,/ower/,"",U.util.lowerize]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[E,U.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[S,R,[e,w]],[/applecoremedia\/[\w\.]+ \((ipad)/],[S,[R,"Apple"],[e,w]],[/(apple\s{0,1}tv)/i],[[S,"Apple TV"],[R,"Apple"],[e,t]],[/(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,S,[e,w]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[S,[R,"Amazon"],[e,w]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[S,U.mapper.str,U.maps.device.amazon.model],[R,"Amazon"],[e,M]],[/android.+aft([bms])\sbuild/i],[S,[R,"Amazon"],[e,t]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[S,R,[e,M]],[/\((ip[honed|\s\w*]+);/i],[S,[R,"Apple"],[e,M]],[/(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,S,[e,M]],[/\(bb10;\s(\w+)/i],[S,[R,"BlackBerry"],[e,M]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[S,[R,"Asus"],[e,w]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[S,"Xperia Tablet"],[e,w]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[S,[R,"Sony"],[e,M]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[R,S,[e,El]],[/android.+;\s(shield)\sbuild/i],[S,[R,"Nvidia"],[e,El]],[/(playstation\s[34portablevi]+)/i],[S,[R,"Sony"],[e,El]],[/(sprint\s(\w+))/i],[[R,U.mapper.str,U.maps.device.sprint.vendor],[S,U.mapper.str,U.maps.device.sprint.model],[e,M]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[R,[S,/_/g," "],[e,M]],[/(nexus\s9)/i],[S,[R,"HTC"],[e,w]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[S,[R,"Huawei"],[e,M]],[/android.+(bah2?-a?[lw]\d{2})/i],[S,[R,"Huawei"],[e,w]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,S,[e,M]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[S,[R,"Microsoft"],[e,El]],[/(kin\.[onetw]{3})/i],[[S,/\./g," "],[R,"Microsoft"],[e,M]],[/\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],[S,[R,"Motorola"],[e,M]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[S,[R,"Motorola"],[e,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[R,U.util.trim],[S,U.util.trim],[e,t]],[/hbbtv.+maple;(\d+)/i],[[S,/^/,"SmartTV"],[R,"Samsung"],[e,t]],[/\(dtv[\);].+(aquos)/i],[S,[R,"Sharp"],[e,t]],[/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"],S,[e,w]],[/smart-tv.+(samsung)/i],[R,[e,t],S],[/((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"],S,[e,M]],[/sie-(\w*)/i],[S,[R,"Siemens"],[e,M]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[R,"Nokia"],S,[e,M]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[S,[R,"Acer"],[e,w]],[/android.+([vl]k\-?\d{3})\s+build/i],[S,[R,"LG"],[e,w]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],S,[e,w]],[/(lg) netcast\.tv/i],[R,S,[e,t]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[S,[R,"LG"],[e,M]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[R,S,[e,w]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[S,[R,"Lenovo"],[e,w]],[/(lenovo)[_\s-]?([\w-]+)/i],[R,S,[e,M]],[/linux;.+((jolla));/i],[R,S,[e,M]],[/((pebble))app\/[\d\.]+\s/i],[R,S,[e,oa]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[R,S,[e,M]],[/crkey/i],[[S,"Chromecast"],[R,"Google"],[e,t]],[/android.+;\s(glass)\s\d/i],[S,[R,"Google"],[e,oa]],[/android.+;\s(pixel c)[\s)]/i],[S,[R,"Google"],[e,w]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[S,[R,"Google"],[e,M]],[/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],[[S,/_/g," "],[R,"Xiaomi"],[e,M]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[S,/_/g," "],[R,"Xiaomi"],[e,w]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[S,[R,"Meizu"],[e,M]],[/(mz)-([\w-]{2,})/i],[[R,"Meizu"],S,[e,M]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[S,[R,"OnePlus"],[e,M]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[S,[R,"RCA"],[e,w]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[S,[R,"Dell"],[e,w]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[S,[R,"Verizon"],[e,w]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],S,[e,w]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[S,[R,"NuVision"],[e,w]],[/android.+;\s(k88)\sbuild/i],[S,[R,"ZTE"],[e,w]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[S,[R,"Swiss"],[e,M]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[S,[R,"Swiss"],[e,w]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[S,[R,"Zeki"],[e,w]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],S,[e,w]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[S,[R,"Insignia"],[e,w]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[S,[R,"NextBook"],[e,w]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[R,"Voice"],S,[e,M]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[R,"LvTel"],S,[e,M]],[/android.+;\s(PH-1)\s/i],[S,[R,"Essential"],[e,M]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[S,[R,"Envizen"],[e,w]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,S,[e,w]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[S,[R,"MachSpeed"],[e,w]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,S,[e,w]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[S,[R,"Rotor"],[e,w]],[/android.+(KS(.+))\s+build/i],[S,[R,"Amazon"],[e,w]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,S,[e,w]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[e,U.util.lowerize],R,S],[/[\s\/\(](smart-?tv)[;\)]/i],[[e,t]],[/(android[\w\.\s\-]{0,9});.+build/i],[S,[R,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[C,[N,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[N,"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],[N,C],[/rv\:([\w\.]{1,9}).+(gecko)/i],[C,N]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[N,C],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[N,U.mapper.str,U.maps.os.windows],[C,U.mapper.str,U.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[N,"Windows"],[C,U.mapper.str,U.maps.os.windows.version]],[/\((bb)(10);/i],[[N,"BlackBerry"],C],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[N,C],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[N,"Symbian"],C],[/\((series40);/i],[N],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[N,"Firefox OS"],C],[/(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],[[N,"Linux"],C],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[N,"Chromium OS"],C],[/(sunos)\s?([\w\.\d]*)/i],[[N,"Solaris"],C],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[N,"Linux"],C],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[N,"iOS"],[C,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[N,"iOS"],[C,/_/g,"."]],[/(haiku)\s(\w+)/i],[N,C],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[C,/_/g,"."],[N,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[N,"Mac"],[C,/_/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],[N,C]]},U);function U(){}K_.generate=function(e,t){var r,n,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,i=j_.parse(e.navigator.userAgent).browser,o="";try{o=null!=(n=null==(r=screen.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:r[0])?n:""}catch(e){}return c({browserName:i.name||"",browserMajorVersion:i.major||"",browserVersion:i.version||"",orientation:o,userAgent:e.navigator.userAgent||""},t.toProperties())};var B_=K_;function K_(){}G_.generate=function(e){var t,r,n,i,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,o=j_.parse(e.navigator.userAgent),s=o.os,o=o.device,a=e.screen,e=(null==(e=e.navigator.languages)?void 0:e[0])||"",u=e.split("-")[0],c=(null!=(c=o.type)?c:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),p=s.name||"",l="";try{p=null!=(r=null==(t=p.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:p,orientation=null!=(i=null==(n=a.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",l=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{osName:p,osVersion:s.version||"",deviceModel:o.model||"",deviceType:c,deviceVendor:o.vendor||"",deviceBrand:o.vendor||"",screenWidth:a.width||"",screenHeight:a.height||"",locale:e,language:u,timeZone:l}};var H_=G_;function G_(){}J_.generate=function(e,t){t=null!=t?t:Lo.createWithCurrentPage();return c(c({platform:"Web"},B_.generate(e,t)),H_.generate(e))};var z_=J_;function J_(){}Y_.prototype.map=function(e){return new Y_(e(this.previous),e(this.current))};var q_=Y_;function Y_(e,t){this.previous=e,this.current=t}$_.empty=function(){return this.from([])},$_.from=function(e){return new $_(e)},$_.fromDto=function(e){return this.from(e.events.map(function(e){return zn.fromJson(e)}))},Object.defineProperty($_.prototype,"rawEvents",{get:function(){return this.events},enumerable:!1,configurable:!0});var W_=$_;function $_(e){this.events=e}Z_.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return tI.of(nI(e,this.hackleDeviceId),D_.empty(),W_.empty())},Z_.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(Z_.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),Z_.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},Z_.prototype.resolveContext=function(e){return void 0===e?this.context:("string"==typeof e?this.updateUser({id:e}):this.updateUser(e)).current},Z_.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},Z_.prototype.hackleUser=function(e){var t=(new Ht).addIdentifiers(e.user.identifiers||{}).add(jt.ID,e.user.id||this.hackleDeviceId).add(jt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(jt.HACKLE_DEVICE,this.hackleDeviceId),t=(u.isNotNullOrUndefined(e.user.userId)&&t.add(jt.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,targetEvents:e.targetEvents.rawEvents}},Z_.prototype.hackleProperties=function(){return"undefined"!=typeof window?z_.generate(window,this.pageManager.currentPage):{}},Z_.prototype.setUser=function(e){return this.updateUser(e).map(function(e){return e.user})},Z_.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},Z_.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},Z_.prototype.updateUserProperties=function(e){return this.operateProperties(e).map(function(e){return e.user})},Z_.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).map(function(e){return e.user})},Z_.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},Z_.prototype.saveUser=function(e){this.storage.saveUser(e)},Z_.prototype.updateContext=function(e){var t=this.context,r=t.user,e=e(r),n=this.context.with(e);return this.context=n,k_(r,e)||(this.changeUser(r,e,this.clock.currentMillis()),this.saveUser(e)),new q_(t,n)},Z_.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=nI(r,n.hackleDeviceId),k_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},Z_.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:u.fromMap(t)})})},Z_.prototype.sync=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.syncCohort(),this.syncUserTarget()])];case 1:return e.sent(),[2]}})})},Z_.prototype.syncIfNeeded=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return this.hasNewIdentifiers(t.previous,t.current)?[4,this.syncCohort()]:[3,2];case 1:e.sent(),e.label=2;case 2:return k_(t.previous,t.current)?[3,4]:[4,this.syncUserTarget()];case 3:e.sent(),e.label=4;case 4:return[2]}})})},Z_.prototype.syncCohort=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.userCohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t,this.context.targetEvents),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},Z_.prototype.syncUserTarget=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.userTargetFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(this.context.cohorts,t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync userTargets: ".concat(t)),[3,3];case 3:return[2]}})})},Z_.prototype.hasNewIdentifiers=function(e,t){var r=Kt(e),e=Kt(t);return Object.entries(e).some(function(e){var t=e[0],e=e[1];return r[t]!==e})},Z_.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return[2]})})};var X_=Z_;function Z_(e,t,r,n,i,o,s,a,u){this.hackleDeviceId=e,this.storage=t,this.userTargetFetcher=r,this.userCohortFetcher=n,this.campaignParser=i,this.pageManager=o,this.clock=s,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(a,u),this.storage.saveUser(this.context.user)}eI.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},eI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(eI.prototype,"deviceId",{get:function(){return this.storage.getItem(it)},enumerable:!1,configurable:!0}),Object.defineProperty(eI.prototype,"userId",{get:function(){return this.storage.getItem(nt)},enumerable:!1,configurable:!0}),eI.prototype.setDeviceId=function(e){this.setId(it,e)},eI.prototype.setUserId=function(e){this.setId(nt,e)},eI.prototype.setId=function(e,t){u.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var Q_=eI;function eI(e){this.storage=e}rI.of=function(e,t,r){return new rI(e,t.filterBy(e),r)},rI.prototype.with=function(e){return rI.of(e,this.cohorts.filterBy(e),this.targetEvents)},rI.prototype.update=function(e,t){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return rI.of(this.user,e,t)};var tI=rI;function rI(e,t,r){this.user=e,this.cohorts=t,this.targetEvents=r}var nI=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},iI=(Object.defineProperty(oI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(oI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:oI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(oI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),oI.prototype.addListener=function(e){this.sessionListeners.push(e)},oI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},oI.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)},oI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(rt,"".concat(e))},oI.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)})},oI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(K().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},oI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(tt,e)},oI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(tt)},oI.prototype.loadLastEventTime=function(){var e=this.storage.getItem(rt);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},oI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},oI.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.updateLastEventTime(t);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}},oI.EMPTY_SESSION_ID="0.ffffffff",oI);function oI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}aI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},aI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},aI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},aI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var sI=aI;function aI(){this.storage=window.localStorage}cI.postfix=function(e,t){return new cI(e,function(e){return"".concat(e).concat(t)})},cI.prefix=function(e,t){return new cI(e,function(e){return"".concat(t).concat(e)})},cI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},cI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},cI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var uI=cI;function cI(e,t){this.delegate=e,this.transform=t}lI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},lI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},lI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},lI.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}},lI.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[]}},lI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},lI.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){}},lI.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]},lI.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){}},lI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var pI=lI;function lI(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)}hI.prototype.currentUser=function(){return this.userManager.resolve()},hI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},hI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},hI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},hI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},hI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},hI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},hI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},hI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},hI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},hI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},hI.prototype.increment=function(e,t){Ni.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var fI=hI;function hI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}vI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},vI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},vI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},vI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},vI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},vI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},vI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},vI.monitoring=function(e){return"".concat(e,"/metrics")},vI.userTargets=function(e){return"".concat(e,"/api/v1/user-targets")};var dI=vI;function vI(){}gI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(u.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},gI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},gI.prototype.key=function(e){return"".concat(e.key)};var yI=gI;function gI(e){this.storage=e}EI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var mI=EI;function EI(e){this.handlers=e}bI.prototype.handle=function(e,t){e.close()},bI.prototype.supports=function(e){return"CLOSE"===e.type};var wI=bI;function bI(){}_I.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))}},_I.prototype.supports=function(e){return"WEB_LINK"===e.type};var TI=_I;function _I(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_AND_CLOSE"===e.type};var II=AI;function AI(e){this.urlHandler=e}NI.prototype.handle=function(e,t){var r;e.context.decisionReason!==l.OVERRIDDEN&&(r=this.clock.currentMillis()+864e5,this.storage.put(e.context.inAppMessage,r)),e.close()},NI.prototype.supports=function(e){return"HIDDEN"===e.type};var OI=NI;function NI(e,t){this.storage=e,this.clock=t}PI.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))}},PI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var SI=PI;function PI(e){this.urlHandler=e}MI.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))}},MI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var RI=MI;function MI(e){this.urlHandler=e}xI.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))}},xI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var CI=xI;function xI(e){this.urlHandler=e}kI.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))}},kI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var UI=kI;function kI(e){this.urlHandler=e}LI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},LI.prototype.commonProperties=function(e){return c(c({},e.properties),{in_app_message_id:e.inAppMessage.id,in_app_message_key:e.inAppMessage.key,in_app_message_display_type:e.message.layout.displayType,decision_reason:String(e.decisionReason)})},LI.prototype.createTrackEvent=function(e,t){switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c(c({},this.commonProperties(t)),{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:this.commonProperties(t)};case"ACTION":var r=e;return{key:"$in_app_action",properties:c(c({},this.commonProperties(t)),{action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.buttonText,image_url:r.imageUrl,image_order:r.imageOrder})};case"IMAGE_IMPRESSION":r=e;return{key:"$in_app_image_impression",properties:c(c({},this.commonProperties(t)),{image_url:r.imageUrl,image_order:r.imageOrder})}}};var DI=LI;function LI(e){this.core=e}VI.prototype.setListener=function(e){this.inAppMessageListener=e},VI.prototype.present=function(r){return a(this,void 0,void 0,function(){var t;return p(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]),null===(t=this.messageViewFactory.create(r,this)))?[2]:[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 FI=VI;function VI(e,t,r,n){void 0===n&&(n=null),this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.inAppMessageListener=n,this.currentMessageView=null,this.opening=!1}BI.prototype.open=function(){var i,o;return a(this,void 0,void 0,function(){var t,r,n=this;return p(this,function(e){switch(e.label){case 0:if(!this.status.canOpen())return s.log.debug("InAppMessage is already opened. (key=".concat(this.context.inAppMessage.key,")")),[2];e.label=1;case 1:return e.trys.push([1,4,,5]),null!=(o=null==(i=this.ui.inAppMessageListener)?void 0:i.beforeInAppMessageOpen)&&o.call(i,this.context.inAppMessage),this.status.current="OPENING",window.addEventListener(BI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.addEventListener(BI.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),[4,this.scriptLoader.load()];case 2:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(BI.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),r=this.renderTypeResolver.resolve(this.context),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),renderType:r})];case 3:return e.sent(),t.classList.remove("".concat(BI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleInAppMessageLifecycle("OPEN",function(){var e,t;n.handleEvent({type:"IMPRESSION"}),n.status.current="OPENED",null!=(t=null==(e=n.ui.inAppMessageListener)?void 0:e.afterInAppMessageOpen)&&t.call(e,n.context.inAppMessage)},function(){s.log.warn("Failed to open inAppMessage with [Timeout expired.]"),n.destroy()}),[3,5];case 4:return e.sent(),this.destroy(),[3,5];case 5:return[2]}})})},BI.prototype.close=function(){var e,t,r=this;this.status.canClose()?(null!=(t=null==(e=this.ui.inAppMessageListener)?void 0:e.beforeInAppMessageClose)&&t.call(e,this.context.inAppMessage),this.status.current="CLOSING",this.handleInAppMessageLifecycle("CLOSE",function(){var e,t;r.handleEvent({type:"CLOSE"}),r.destroy(),null!=(t=null==(e=r.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r.context.inAppMessage)},function(){var e,t;s.log.warn("Failed to close inAppMessage with [Timeout expired.]"),r.destroy(),null!=(t=null==(e=r.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r.context.inAppMessage)})):s.log.debug("InAppMessage is already closed. (key=".concat(this.context.inAppMessage.key,")"))},BI.prototype.handleInAppMessageLifecycle=function(e,t,r){var n=this,i=this.lifecycleRegistry.register(e,t);window.dispatchEvent(new CustomEvent(BI.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE,{detail:{type:e,id:i}})),setTimeout(function(){void 0!==n.lifecycleRegistry.getAndRemove(e,i)&&r()},BI.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT)},BI.prototype.destroy=function(){var e;window.removeEventListener(BI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.removeEventListener(BI.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null,this.status.current="CLOSED"},BI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(BI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},BI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},BI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},BI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},BI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",BI.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE="hackle-iam-lifecycle-start",BI.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE="hackle-iam-lifecycle-end",BI.CONTAINER_CLASS_NAME="hackle-iam",BI.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT=5e3;var jI=BI;function BI(e,t,r,n,i,o){var s=this;this.scriptLoader=e,this.context=t,this.ui=r,this.renderTypeResolver=n,this.status=i,this.lifecycleRegistry=o,this.container=null,this.renderer=null,this.resolveLifecycleEnd=function(e){var t;e instanceof CustomEvent&&("string"==typeof(t=e).detail.id&&["OPEN","CLOSE"].includes(t.detail.type))&&(e=(t=e.detail).id,t=t.type,null!=(t=s.lifecycleRegistry.getAndRemove(t,e))&&t())},this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===BI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,s.handleInteraction(e))}}HI.prototype.isMobileOS=function(e){e=e.user.hackleProperties.osName;return"string"==typeof e&&Boolean(e.match(this.mobileOSRegex))},HI.prototype.isMobileDeviceType=function(e){e=e.user.hackleProperties.deviceType;return"string"==typeof e&&Boolean(e.match(this.mobileDeviceRegex))},HI.prototype.resolve=function(e){return this.isMobileOS(e)||this.isMobileDeviceType(e)?"mobile":"pc"};var KI=HI;function HI(){this.mobileOSRegex=/(iOS|Android|iPad|iPhone)/g,this.mobileDeviceRegex=/(mobile|phone|tablet)/g}zI.prototype.canOpen=function(){return"OPENED"!==this.current&&"OPENING"!==this.current},zI.prototype.canClose=function(){return"CLOSED"!==this.current&&"CLOSING"!==this.current};var GI=zI;function zI(e){this.current=e=void 0===e?"CLOSED":e}qI.prototype.resolveKey=function(e,t){return"".concat(e,"_").concat(t)},qI.prototype.register=function(e,t){var r=K(),e=this.resolveKey(e,r);return this.record[e]=t,r},qI.prototype.getAndRemove=function(e,t){var e=this.resolveKey(e,t),t=this.record,r=t[e],t=function(e,t){var r={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}(t,["symbol"==typeof e?e:e+""]);return this.record=t,r};var JI=qI;function qI(){this.record={}}WI.create=function(e){return new WI(e)},WI.prototype.create=function(e,t){var r=new KI,n=new GI,i=new JI;switch(e.message.layout.displayType){case"MODAL":case"BANNER":case"BOTTOM_SHEET":return new jI(this.scriptLoader,e,t,r,n,i);case"NONE":return null}};var YI=WI;function WI(e){this.scriptLoader=e}XI.prototype.load=function(){return a(this,void 0,void 0,function(){var t;return p(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()]}})})},XI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},XI.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 $I=XI;function XI(e){this.scriptUrl=e}QI.prototype.matches=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},QI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=eA.of(e,t,r);return this.targetMatcher.anyMatches(e,lb.create(),n.targets)};var ZI=QI;function QI(e){this.targetMatcher=e}tA.of=function(e,t,r){return new tA(new cb("IN_APP_MESSAGE",r.id),e,t.user,t)};var eA=tA;function tA(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}nA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return u.isNullOrUndefined(e)?[]:JSON.parse(e)},nA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var rA=nA;function nA(e){this.storage=e}oA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var iA=oA;function oA(e){this.processors=e}aA.prototype.process=function(e,t,r){},aA.prototype.supports=function(e){return"IMPRESSION"===e.type};var sA=aA;function aA(){}cA.prototype.process=function(e,t,r){},cA.prototype.supports=function(e){return"CLOSE"===e.type};var uA=cA;function cA(){}lA.prototype.process=function(e,t,r){var n,i,o=this.actionHandlerFactory.get(t.action);!(null==(i=null==(n=e.ui.inAppMessageListener)?void 0:n.onInAppMessageClick)?void 0:i.call(n,e.context.inAppMessage,e,Fn.fromAction(t.action)))&&e.status.canClose()&&null!=o&&o.handle(e,t.action)},lA.prototype.supports=function(e){return"ACTION"===e.type};var pA=lA;function lA(e){this.actionHandlerFactory=e}hA.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 fA=hA;function hA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}vA.prototype.matches=function(e,t,r){return this.ruleMatcher.matches(e,t,r)};var dA=vA;function vA(e){this.ruleMatcher=e}gA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var yA=gA;function gA(e){this.handlers=e}EA.prototype.handle=function(e,t){e.close()},EA.prototype.supports=function(e){return"CLOSE"===e.type};var mA=EA;function EA(){}bA.prototype.handle=function(e,t){t=this.eventOrNull(t);t&&this.eventHandler.handle(e,t)},bA.prototype.eventOrNull=function(e){var t=Rn.fromJson(e.action);return t?{type:"ACTION",action:t,area:e.area,buttonText:e.buttonText,imageUrl:e.imageUrl,imageOrder:e.imageOrder}:null},bA.prototype.supports=function(e){return"ACTION"===e.type};var wA=bA;function bA(e){this.eventHandler=e}_A.prototype.handle=function(e,t){t={type:"IMAGE_IMPRESSION",imageUrl:t.imageUrl,imageOrder:t.imageOrder};this.eventHandler.handle(e,t)},_A.prototype.supports=function(e){return"IMAGE_IMPRESSION"===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(){}PA.prototype.open=function(e){window.open(e.href)};var SA=PA;function PA(){}MA.prototype.open=function(e){window.location.replace(e)};var RA=MA;function MA(){}function CA(e,t,r){return null===e||(!kA(t,xA)||r.current!==r.referrer)&&!kA(e,t)}var xA={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},UA={current:void 0,referrer:void 0},kA=function(t,r){return Object.keys(xA).every(function(e){return t[e]===r[e]})},DA=(LA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},xA),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();CA(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(ot);return e?JSON.parse(e):null},VA.prototype.set=function(e){this.storage.setItem(ot,JSON.stringify(e))};var FA=VA;function VA(e){this.storage=e}BA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},BA.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=Jo.tryDecodeURIComponent(i))&&(t[o]=i)}return t};var jA=BA;function BA(e){this.search=e}HA.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},HA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,HA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var KA=HA;function HA(){}zA.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},zA.prototype.params=function(e){e=u.isNotNullOrUndefined(e)?e:this.pageManager.currentPage.queryParameter;return new jA(e).getQueryParams(zA.CAMPAIGN_QUERY_CONDITION)},zA.prototype.resolve=function(e){return{utm_campaign:e[JA],utm_content:e[qA],utm_id:e[YA],utm_medium:e[WA],utm_source:e[$A],utm_term:e[XA],gclid:e[ZA],fbclid:e[QA]}},zA.prototype.parseDomain=function(){var t=this;if("undefined"==typeof window)return UA;return{current:KA.extractDomain(this.pageManager.currentPage.hostname),referrer:function(){var e=t.pageManager.currentPage.referrer;if(e)return e=new URL(e).hostname,KA.extractDomain(e)}()}},zA.CAMPAIGN_QUERY_CONDITION=function(e,t){return Pi.isNotEmptyString(t)};var GA=zA;function zA(e){this.pageManager=e}var JA="utm_campaign",qA="utm_content",YA="utm_id",WA="utm_medium",$A="utm_source",XA="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||!k0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==l.TRAFFIC_ALLOCATED?null:e};var rO=nO;function nO(e){this.workspaceFetcher=e}var iO={user:void 0,debug:!1,log_disabled:!1,automaticPageTracking:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://sdk-api.hackle.io",eventUrl:"https://event-api.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.47.0",IAM_RENDERER_VERSION_HEADER:"0.0.10"},oO=(sO.config=function(e){return c(c(c({},iO),e),{automaticPageTracking:sO.resolveAutomaticPageTracking(e)})},sO.resolveAutomaticPageTracking=function(e){return"boolean"!=typeof(null==e?void 0:e.automaticPageTracking)&&"boolean"!=typeof(null==e?void 0:e.auto_track_page_view)?iO.automaticPageTracking:!!e.automaticPageTracking||!!e.auto_track_page_view},sO.logging=function(e){s.initCounter(function(e){return Ni.counter("log",{level:e})}),s.setLogLevel(Ie.INFO),e.log_disabled?s.setLogLevel(Ie.DISABLE):e.debug&&s.setLogLevel(Ie.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,6e4)},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){this.synchronizers.push(e)},uO.prototype.sync=function(){return a(this,void 0,void 0,function(){var t=this;return p(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.sync())}))];case 1:return e.sent(),[2]}})})},uO.prototype.close=function(){return a(this,void 0,void 0,function(){var t=this;return p(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.close())}))];case 1:return e.sent(),[2]}})})},uO.prototype.safe=function(r){return a(this,void 0,void 0,function(){var t;return p(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.synchronizers=[]}pO.prototype.sync=function(){return a(this,void 0,void 0,function(){var t;return p(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]}})})},pO.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()}))},pO.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},pO.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var cO=pO;function pO(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){var n;switch(this.scheduleType){case"setTimeout":n=new vO(e,t,r);break;case"setInterval":n=new gO(e,t,r)}return n.start(),n};var lO=fO;function fO(e){this.scheduleType=e}dO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){try{e.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}finally{e.timeout=null}},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;try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}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}mO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){e.run(),e.interval=setInterval(function(){return e.run()},e.intervalMillis)},this.delayMillis)},mO.prototype.run=function(){try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}},mO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.interval&&(clearInterval(this.interval),this.interval=null)};var gO=mO;function mO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null,this.interval=null}wO.prototype.fetchIfModified=function(r){return a(this,void 0,void 0,function(){var t;return p(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){var t=Mi.builder().url(this.url).method("GET");return null!==e&&t.addHeader(Li.IF_MODIFIED_SINCE,e),t.build()},wO.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=Wn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ji.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Ji.record("get.workspace",t,null),r;case 4:return[2]}})})},wO.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(Li.LAST_MODIFIED)}};var EO=wO;function wO(e,t){this.url=e,this.transport=t}TO.prototype.fetch=function(r){return a(this,void 0,void 0,function(){var t;return p(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)]}})})},TO.prototype.createRequest=function(e){e={identifiers:Kt(e)},e=be.encodeURL(JSON.stringify(e));return Mi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},TO.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=Wn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ji.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Ji.record("get.cohorts",t,null),r;case 4:return[2]}})})},TO.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 D_.fromDto(e)};var bO=TO;function TO(e,t){this.url=e,this.transport=t}IO.prototype.fetch=function(r){return a(this,void 0,void 0,function(){var t;return p(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)]}})})},IO.prototype.createRequest=function(e){e={identifiers:Kt(e)},e=be.encodeURL(JSON.stringify(e));return Mi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},IO.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=Wn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ji.record("get.user-targets",t,r),[2,r];case 3:throw r=e.sent(),Ji.record("get.user-targets",t,null),r;case 4:return[2]}})})},IO.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 W_.fromDto(e)};var _O=IO;function IO(e,t){this.url=e,this.transport=t}OO.prototype.getExperiments=function(){return Array.from(this.experiments.values())},OO.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},OO.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},OO.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},OO.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},OO.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},OO.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},OO.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},OO.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},OO.prototype.getContainerOrNull=function(e){return this.containers.get(e)},OO.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},OO.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},OO.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},OO.prototype.getAttributes=function(){return this.attributes},OO.from=function(e){var t=e.parameterConfigurations.map(Nt.fromJson),r=f.mapNotNullOrUndefined(e.experiments,function(e){return Rt.fromJson("AB_TEST",e,t)}),n=f.mapNotNullOrUndefined(e.experiments,function(e){return Rt.fromJson("AB_TEST",e,t)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),i=f.mapNotNullOrUndefined(e.featureFlags,function(e){return Rt.fromJson("FEATURE_FLAG",e,t)}),o=e.buckets.map(Ut.fromJson),s=e.events.map(Ft.fromJson),a=f.mapNotNullOrUndefined(e.segments,ir.fromJson),u=e.containers.map(sr.fromJson),c=f.mapNotNullOrUndefined(e.remoteConfigParameters,pr.fromJson),p=f.mapNotNullOrUndefined(e.inAppMessages,jr.fromJson),e=e.workspace.attributes;return new OO(r,n,i,o,s,a,u,t,c,p,e)};var AO=OO;function OO(e,t,r,n,i,o,s,a,u,c,p){this.experiments=f.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=f.associateBy(t,function(e){return e.key}),this.featureFlags=f.associateBy(r,function(e){return e.key}),this.buckets=f.associateBy(n,function(e){return e.id}),this.eventTypes=f.associateBy(i,function(e){return e.key}),this.segments=f.associateBy(o,function(e){return e.key}),this.containers=f.associateBy(s,function(e){return e.id}),this.parameterConfigurations=f.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=f.associateBy(u,function(e){return e.key}),this.inAppMessages=f.associateBy(c,function(e){return e.key}),this.attributes=p}SO.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},SO.prototype.setWorkspace=function(e){try{this.workspace=AO.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},SO.prototype.get=function(){return this.workspace},SO.prototype.sync=function(){return a(this,void 0,void 0,function(){var t;return p(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]}})})},SO.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return[2]})})};var NO=SO;function SO(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}RO.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},RO.prototype.dispatchEventsSynchronously=function(r){return a(this,void 0,void 0,function(){var t;return p(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]}})})},RO.prototype.dispatchEvents=function(r){return a(this,void 0,void 0,function(){var t;return p(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 PO=RO;function RO(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}CO.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},CO.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof k0?k0.isExposureEvent(e)?t.push(e.toDto()):k0.isTrackEvent(e)?r.push(e.toDto()):k0.isRemoteConfigEvent(e)&&n.push(e.toDto()):k0.isExposureEventDto(e)?t.push(e):k0.isTrackEventDto(e)?r.push(e):k0.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()},CO.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=Wn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ji.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Ji.record("post.events",t,null),r;case 4:return[2]}})})};var MO=CO;function CO(e,t){this.url=e,this.transport=t}UO.prototype.add=function(e){return this.repository.add(e)},UO.prototype.delete=function(e){return this.repository.delete(e)},UO.prototype.flush=function(){return a(this,void 0,void 0,function(){var t,r;return p(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]}})})},UO.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"pageshow":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"blur":case"focus":case"hidden":case"locationChange":case"pagehide":return}};var xO=UO;function UO(e,t){this.repository=e,this.transport=t}function kO(){this.listeners={}}kO.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},kO.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},kO.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};i(LO,DO=kO);var DO,Tl=LO;function LO(){return null!==DO&&DO.apply(this,arguments)||this}i(jO,FO=Tl),jO.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},jO.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},jO.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},jO.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=[])},jO.prototype.close=function(){this.flush(!0)};var FO,VO=jO;function jO(e,t,r,n){var i=FO.call(this)||this;return i.eventDispatcher=e,i.eventDispatchMaxSize=t,i.flushScheduler=r,i.flushIntervalMillis=n,i.queue=[],i.flushingJob=null,i}KO.prototype.send=function(e){e=e.toBuilder().addHeader(Ge,this.sdk.key).addHeader(ze,this.sdk.name).addHeader(Je,this.sdk.version).addHeader(qe,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var BO=KO;function KO(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}GO.intercept=function(e,t){return t instanceof BO?t:new BO(e,Fe.instance,t)};var HO=GO;function GO(){}JO.create=function(){return new JO},JO.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 ki(n.status,n.responseText,function(e){var t=Li.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=JO;function JO(){}YO.create=function(){return new YO},YO.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(ki.ok())})},YO.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(Ge),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(ze,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(Je,"unknown")),e.headers.get(qe));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var qO=YO;function YO(){}$O.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var WO=$O;function $O(e){this.invocationResponseResolver=e}QO.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 XO,ZO=QO;function QO(e){this.invocationResponseResolver=e}(Ua=XO=XO||{}).prompt="prompt",Ua.function="function";tN.prototype.getInvocator=function(e,t){return e===XO.prompt?new WO(t):e===XO.function?new ZO(t):null};var eN=tN;function tN(){}nN.prototype.onPageStarted=function(e,t){var r=this.userManager.resolve(),r=this.determiner.determineOrNull(r);r&&(this.core.flush(!0),this.redirector.redirect(r))},nN.prototype.onPageEnded=function(e,t){};var rN=nN;function nN(e,t,r,n){this.determiner=e,this.redirector=t,this.userManager=r,this.core=n}var iN=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.user=n},oN=(sN.prototype.determineOrNull=function(e){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,"A"),new iN(t,o,i,e)}return null},sN);function sN(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}uN.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=cN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,lb.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,lb.create(),t.includeTargets))};var aN=uN;function uN(e){this.targetMatcher=e}pN.of=function(e,t){return new pN(new cb("SPLIT_URL",K()),t,e)};var cN=pN;function pN(e,t,r){this.key=e,this.user=t,this.workspace=r}fN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var lN=fN;function fN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}dN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(dN.SPLIT_URL_CONFIG_KEY,"")),r=Bn.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},dN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},dN.prototype.resolveManualRedirectUrl=function(e,t){e=Jo.tryParse(e);return e?this.decorateCampaign(e,t):null},dN.prototype.decorateCampaign=function(e,t){t=t.user.hackleProperties.queryParameter;if(Pi.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];Pi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},dN.SPLIT_URL_CONFIG_KEY="redirectUrl";var hN=dN;function dN(e){this.campaignParser=e}yN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return u.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},yN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},yN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var vN=yN;function yN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}mN.prototype.setNeedDispatch=function(e){this.needDispatch=e},mN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(mN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},mN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var gN=mN;function mN(){this.needDispatch=!0}wN.prototype.get=function(){var e=this.storage.getItem(ft);if(u.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}},wN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(ft,JSON.stringify(e))},wN.prototype.clear=function(){this.storage.removeItem(ft)};var EN=wN;function wN(e,t){this.sdk=e,this.storage=t}var bN=s.log,TN=(_N.prototype.install=function(e){void 0===e&&(e=null);try{var t=this.changeLifecycle.bind(this);window.addEventListener("pageshow",function(){return t("pageshow")}),window.addEventListener("pagehide",function(){return t("pagehide")}),document.addEventListener("visibilitychange",function(){return t(document.visibilityState)}),window.addEventListener("blur",function(){return t("blur")}),window.addEventListener("focus",function(){return t("focus")}),_N.isSafariBrowser(e)&&window.addEventListener("beforeunload",function(){return t("hidden")}),history.pushState=(n=history.pushState,function(){try{var e=n.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&bN.error(e)}}),history.replaceState=(r=history.replaceState,function(){try{var e=r.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&bN.error(e)}}),window.addEventListener("popstate",function(){try{t("locationChange")}catch(e){(e instanceof Error||"string"==typeof e)&&bN.error(e)}})}catch(e){(e instanceof Error||"string"==typeof e)&&bN.error(e)}var r,n},_N.prototype.addListener=function(e){this.listeners.push(e)},_N.prototype.initialize=function(){this._initialized=!0,this.changeLifecycle("pageshow")},_N.prototype.changeLifecycle=function(e){this._initialized&&this.publish(e)},_N.prototype.publish=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onLifecycleChanged(t,r)})},_N.isSafariBrowser=function(e){return!u.isNullOrUndefined(e)&&e.toLowerCase().includes("safari")},_N);function _N(e){void 0===e&&(e=Fe.instance),this.clock=e,this.listeners=[],this._initialized=!1}AN.create=function(e,t,r){return void 0===r&&(r=Fe.instance),new AN(new ON(r,e,t))},AN.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var IN=AN;function AN(e){this.limiter=e}NN.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},NN.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new SN(e+this.intervalMillis,this.limit)),this.currentScope};var ON=NN;function NN(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}PN.prototype.isExpired=function(e){return this.expirationTime<e},PN.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var SN=PN;function PN(e,t){this.expirationTime=e,this.token=t}MN.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var RN=MN;function MN(e){this.determiners=e}CN.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;Me.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)};ia=CN;function CN(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}i(kN,xN=ia),kN.prototype.supports=function(e){return k0.isRemoteConfigEvent(e)},kN.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var xN,UN=kN;function kN(e,t){return void 0===t&&(t=Fe.instance),xN.call(this,e,t)||this}i(FN,DN=ia),FN.prototype.supports=function(e){return k0.isExposureEvent(e)},FN.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var DN,LN=FN;function FN(e,t){return void 0===t&&(t=Fe.instance),DN.call(this,e,t)||this}jN.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},jN.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 VN=jN;function jN(){}KN.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters,browserProperties:e.browserProperties}}},KN.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var BN=KN;function KN(e){this.invocator=e}var HN=s.log,GN=(zN.prototype.onPageStarted=function(e,t){this.track(e,t)},zN.prototype.onPageEnded=function(e,t){},zN.prototype.track=function(e,t){HN.debug("tracking page view");var r,e={key:zN.PAGE_VIEW_EVENT_KEY,properties:((r={})[zN.PAGE_NAME_PROPERTY_KEY]=e.pageTitle,r)};this.core.track(e,this.userManager.resolve(),t)},zN.PAGE_VIEW_EVENT_KEY="$page_view",zN.PAGE_NAME_PROPERTY_KEY="$page_name",zN);function zN(e,t){this.core=e,this.userManager=t}Object.defineProperty(qN.prototype,"currentPage",{get:function(){var e;return null!=(e=this._currentPage)?e:Lo.createWithCurrentPage()},enumerable:!1,configurable:!0}),qN.prototype.updatePage=function(e,t){var r=this._currentPage;r&&e.isEquals(r)||(r&&this.publishEnd(r,t),this._currentPage=e,this.publishStart(e,t))},qN.prototype.publishStart=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageStarted(e,t)},qN.prototype.publishEnd=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageEnded(e,t)},qN.prototype.onLifecycleChanged=function(e,t){switch(e){case"pageshow":case"locationChange":var r=Lo.createWithCurrentPage();return this.updatePage(r,t);case"visible":case"pagehide":case"blur":case"focus":case"hidden":return}},qN.prototype.addListener=function(e){this.listeners.push(e)};var JN=qN;function qN(){this.listeners=[],this._currentPage=null}var YN=s.log,WN=(Object.defineProperty($N.prototype,"lastEngagementTime",{get:function(){return this._lastEngagementTime},enumerable:!1,configurable:!0}),$N.prototype.startEngagement=function(e){YN.debug("startEngagement timestamp:".concat(e,", page:").concat(this.pageManager.currentPage.url)),this._lastEngagementTime=e},$N.prototype.endEngagement=function(e,t){var r;u.isNullOrUndefined(this._lastEngagementTime)||(r=this._lastEngagementTime,(r=(this._lastEngagementTime=t)-r)<this.minimumEngagementDurationMillis||this.publish({page:e,durationMillis:r},this.userManager.resolve(),t))},$N.prototype.publish=function(e,t,r){YN.debug("onEngagement timestamp:".concat(r,", page:").concat(this.pageManager.currentPage.url));for(var n=0,i=this.listeners;n<i.length;n++)i[n].onEngagement(e,t,r)},$N.prototype.onPageStarted=function(e,t){this.startEngagement(t)},$N.prototype.onPageEnded=function(e,t){this.endEngagement(e,t)},$N.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"focus":return this.startEngagement(t);case"pagehide":case"hidden":case"blur":return this.endEngagement(this.pageManager.currentPage,t);case"pageshow":case"locationChange":return}},$N.prototype.addListener=function(e){this.listeners.push(e)},$N);function $N(e,t,r){this.userManager=e,this.pageManager=t,this.minimumEngagementDurationMillis=r,this.listeners=[],this._lastEngagementTime=null}ZN.prototype.onEngagement=function(e,t,r){var n,e={key:ZN.ENGAGEMENT_EVENT_KEY,properties:((n={})[GN.PAGE_NAME_PROPERTY_KEY]=e.page.pageTitle,n[ZN.ENGAGEMENT_TIME_PROPERTY_KEY]=e.durationMillis,n)};this.core.track(e,t,r)},ZN.ENGAGEMENT_EVENT_KEY="$engagement",ZN.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms";var XN=ZN;function ZN(e){this.core=e}eS.prototype.setPhoneNumber=function(e,t){e=(new Mo).set(eS.PHONE_NUMBER_PROPERTY_KEY,e.getValue()).build().toSecuredEvent();this.track(e,t)},eS.prototype.unsetPhoneNumber=function(e){var t=(new Mo).unset(eS.PHONE_NUMBER_PROPERTY_KEY).build().toSecuredEvent();this.track(t,e)},eS.prototype.track=function(e,t){var r=this.userManager.resolve();this.core.track(e,r,t)},eS.PHONE_NUMBER_PROPERTY_KEY="$phone_number";var QN=eS;function eS(e,t){this.core=e,this.userManager=t}rS.prototype.getBrowserProperties=function(){return B_.generate(window,Lo.createWithCurrentPage())};var tS=rS;function rS(){}Object.defineProperty(iS.prototype,"delayMillis",{get:function(){return this.schedule.time.deliverAt-this.requestedAt},enumerable:!1,configurable:!0}),iS.prototype.toString=function(){return"InAppMessageScheduleRequest(scheduleType=".concat(this.scheduleType,", requestedAt=").concat(this.requestedAt,")")};var nS=iS;function iS(e,t,r){this.schedule=e,this.scheduleType=t,this.requestedAt=r}sS.prototype.toRequest=function(e,t){return new nS(this,e,t)},sS.create=function(e){return new sS(K(),e.inAppMessage.key,e.event.user.identifiers,aS.of(e.inAppMessage,e.event.timestamp),e.reason,new cS(e.event.insertId,e.event.event))},sS.fromDelayStorageEntity=function(e,t){return new sS(e.schedule.dispatchId,e.schedule.inAppMessageKey,e.schedule.identifiers,new aS(t,e.schedule.time.deliverAt),e.schedule.reason,e.schedule.eventBasedContext)};var oS=sS;function sS(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessageKey=t,this.identifiers=r,this.time=n,this.reason=i,this.eventBasedContext=o}uS.prototype.delayMillis=function(e){return this.deliverAt-e},uS.of=function(e,t){return new uS(t,e.eventTrigger.delay.deliverAt(t))};var aS=uS;function uS(e,t){this.startedAt=e,this.deliverAt=t}var cS=function(e,t){this.insertId=e,this.event=t},pS=(lS.prototype.initialize=function(){var t=this;this.userEventEmitter.on("event",function(e){t.onEvent(e)})},lS.prototype.destroy=function(){var t=this;this.userEventEmitter.off("event",function(e){t.onEvent(e)})},lS.prototype.onEvent=function(e){this.triggerProcessor.process(e)},lS.prototype.onUserUpdated=function(e,t,r){e=Kt(e),t=Kt(t);this.resetProcessor.process({identifiers:e},{identifiers:t})},lS.prototype.loadDelaySchedule=function(){var r=this;this.delayStorage.values().forEach(function(e){var t=r.clock.currentMillis(),e=oS.fromDelayStorageEntity(e,t).toRequest("STORED",t);r.scheduleProcessor.process(e)})},lS);function lS(e,t,r,n,i,o){this.scheduleProcessor=e,this.delayStorage=t,this.triggerProcessor=r,this.resetProcessor=n,this.userEventEmitter=i,this.clock=o,this.initialize()}i(dS,fS=Hs),dS.prototype.resolve=function(e,t,r){return t.setProperty("experiment_id",r.experiment.id),t.setProperty("experiment_key",r.experiment.key),t.setProperty("variation_id",r.variationId),t.setProperty("variation_key",r.variationKey),t.setProperty("experiment_decision_reason",r.reason),r};var fS,hS=dS;function dS(e){return fS.call(this,e)||this}i(yS,vS=Su);var vS,Ca=yS;function yS(){return null!==vS&&vS.apply(this,arguments)||this}Object.defineProperty(mS.prototype,"inAppMessage",{get:function(){return this.request.inAppMessage},enumerable:!1,configurable:!0}),mS.of=function(e,t,r){return new mS(e,l.IN_APP_MESSAGE_TARGET,t.targetEvaluations,r,t.properties)};var gS=mS;function mS(e,t,r,n,i){this.request=e,this.reason=t,this.targetEvaluations=r,this.message=n,this.properties=i}Object.defineProperty(ES.prototype,"key",{get:function(){return new cb("IN_APP_MESSAGE",this.inAppMessage.id)},enumerable:!1,configurable:!0});I=ES;function ES(){}i(TS,wS=I),TS.of=function(e){return e instanceof TS?e:new TS(e.workspace,e.user,e.inAppMessage)},TS.prototype.toString=function(){return"InAppMessageLayoutRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var wS,bS=TS;function TS(e,t,r){var n=wS.call(this)||this;return n.workspace=e,n.user=t,n.inAppMessage=r,n}i(AS,_S=Ca),AS.prototype.supports=function(e){return e instanceof bS},AS.prototype.evaluateInternal=function(e,t){var r=e.inAppMessage.messageContext.experimentContext,r=null!==r?this.evaluateExperiment(e,t,r):this.evaluateDefault(e,t);return gS.of(e,t,r)},AS.prototype.evaluateDefault=function(e,t){var r=OS(e.inAppMessage.messageContext.defaultLang);return this.selector.select(e.inAppMessage,r)},AS.prototype.evaluateExperiment=function(e,t,r){var n,i=u.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[key=".concat(r.key,"]")}),t=this.experimentEvaluator.evaluate(e,t,i),o=OS(e.inAppMessage.messageContext.defaultLang),s=(n=t.variationKey,function(e){return n===e.variationKey});return this.selector.select(e.inAppMessage,function(e){return o(e)&&s(e)})},AS.prototype.record=function(e,t){this.eventRecorder.record(e,t)};var _S,IS=AS;function AS(e,t,r){var n=_S.call(this)||this;return n.experimentEvaluator=e,n.selector=t,n.eventRecorder=r,n}function OS(t){return function(e){return t===e.lang}}SS.prototype.select=function(e,t){t=e.messageContext.messages.find(t);return u.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.id,"]")})};var NS=SS;function SS(){}RS.prototype.record=function(e,t){if(e.reason!==l.OVERRIDDEN)try{this.doRecord(e)}catch(e){s.log.error("Failed to record InAppMessageImpression: ".concat(e))}},RS.prototype.doRecord=function(e){var t=this.storage.get(e.inAppMessage),r={identifiers:e.user.identifiers,timestamp:e.requestedAt},t=Pe(Pe([],t,!0),[r],!1),r=t.length>this.STORE_MAX_SIZE?t.length-this.STORE_MAX_SIZE:0,t=t.slice(r);this.storage.set(e.inAppMessage,t)};var PS=RS;function RS(e){this.storage=e,this.STORE_MAX_SIZE=100}CS.prototype.toString=function(){return"InAppMessagePresentResponse(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.context.inAppMessage,", displayType=").concat(this.context.message.layout.displayType,", layoutType=").concat(this.context.message.layout.layoutType,")")},CS.of=function(e,t){return new CS(e.dispatchId,t)};var MS=CS;function CS(e,t){this.dispatchId=e,this.context=t}US.prototype.toString=function(){return"InAppMessagePresentationContext(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.inAppMessage,", message=").concat(this.message,")")},US.of=function(e){return new US(e.dispatchId,e.inAppMessage,e.message,e.user,e.reason,e.properties)};var xS=US;function US(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessage=t,this.message=r,this.user=n,this.decisionReason=i,this.properties=o}DS.prototype.process=function(e){s.log.debug("InAppMessage Present Request: ".concat(e));var t=this.present(e);return this.recorder.record(e,t),s.log.debug("InAppMessage Present Response: ".concat(t)),t},DS.prototype.present=function(e){var t=xS.of(e);return this.presenter.present(t),MS.of(e,t)};var kS=DS;function DS(e,t){this.presenter=e,this.recorder=t}FS.prototype.isIdentifierChanged=function(e,t){var r=e[jt.USER],n=t[jt.USER];if(void 0!==r&&void 0!==n)return r!==n;r=e[jt.DEVICE],n=t[jt.DEVICE];return void 0!==r&&void 0!==n&&r!==n};var LS=FS;function FS(){}Object.defineProperty(jS.prototype,"listener",{get:function(){return this._listener},set:function(e){this._listener=e},enumerable:!1,configurable:!0}),jS.prototype.schedule=function(e){var t=this,r=this.scheduler.schedule(e.delayMillis,function(){return t.delayCommand(e)});return new BS(e,r)},jS.prototype.delayCommand=function(e){var t=this.clock.currentMillis(),e=e.schedule.toRequest("DELAYED",t);null!=(t=this.listener)&&t.onSchedule(e)};var VS=jS;function jS(e,t){this.clock=e,this.scheduler=t}KS.prototype.cancel=function(){this.job.cancel(),s.log.debug("InAppMessageDelay cancelled: ".concat(this.delay))};var BS=KS;function KS(e,t){this.delay=e,this.job=t}Object.defineProperty(GS.prototype,"delayMillis",{get:function(){return this.schedule.time.delayMillis(this.requestedAt)},enumerable:!1,configurable:!0}),GS.from=function(e){return new GS(e.schedule,e.requestedAt)},GS.prototype.toString=function(){return"InAppMessageDelay(dispatchId=".concat(this.schedule.dispatchId,", requestedAt=").concat(this.requestedAt,")")};var HS=GS;function GS(e,t){this.schedule=e,this.requestedAt=t}JS.prototype.registerAndDelay=function(e){return this.storage.set(e.schedule.inAppMessageKey,e.schedule.dispatchId,HS.from(e)),this.delay(e)},JS.prototype.delay=function(e){var t=HS.from(e),r=this.scheduler.schedule(t);return this.tasks.set(t.schedule.dispatchId,r),s.log.debug("InAppMessage Delay started: dispatchId=".concat(e.schedule.dispatchId)),t},JS.prototype.delete=function(e){var t=null!=(t=null==(t=this.tasks.get(e.schedule.dispatchId))?void 0:t.delay)?t:null;return t&&s.log.debug("InAppMessage Delay deleted: dispatchId=".concat(e.schedule.dispatchId)),this.tasks.delete(e.schedule.dispatchId),this.storage.remove(e.schedule.inAppMessageKey,e.schedule.dispatchId),t},JS.prototype.cancelAll=function(){var e=Array.from(this.tasks.values());return e.forEach(function(e){return e.cancel()}),this.tasks.clear(),this.storage.clear(),s.log.debug("InAppMessage Delay clear."),e.map(function(e){return e.delay})};var zS=JS;function JS(e,t,r){this.scheduler=e,this.tasks=t,this.storage=r}YS.prototype.toString=function(){return"InAppMessageDeliverResponse(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", code=").concat(this.code,")")},YS.of=function(e,t,r){return new YS(e.dispatchId,e.inAppMessageKey,t,r=void 0===r?null:r)};var qS=YS;function YS(e,t,r,n){this.dispatchId=e,this.inAppMessageKey=t,this.code=r,this.presentResponse=n}$S.prototype.toString=function(){return"InAppMessagePresentRequest(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.inAppMessage,", user=").concat(this.user.identifiers,", requestedAt=").concat(this.requestedAt,", reason=").concat(this.reason,", properties=").concat(this.properties,")")},$S.of=function(e,t,r,n,i){return new $S(e.dispatchId,t,i.message,r,e.requestedAt,n.reason,c(c({},e.properties),i.properties))};var WS=$S;function $S(e,t,r,n,i,o,s){this.dispatchId=e,this.inAppMessage=t,this.message=r,this.user=n,this.requestedAt=i,this.reason=o,this.properties=s}i(QS,XS=I),QS.prototype.toString=function(){return"InAppMessageEligibilityRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var XS,ZS=QS;function QS(e,t,r,n){var i=XS.call(this)||this;return i.workspace=e,i.user=t,i.inAppMessage=r,i.timestamp=n,i}tP.prototype.response=function(t){try{return this.deliver(t)}catch(e){return s.log.error("Failed to process InAppMessageDeliver: ".concat(e)),qS.of(t,"EXCEPTION")}},tP.prototype.process=function(e){s.log.debug("InAppMessage Deliver Request: ".concat(e));e=this.response(e);return s.log.debug("InAppMessage Deliver Response: ".concat(e)),e},tP.prototype.deliver=function(e){var t=this.workspaceFetcher.get();if(!t)return qS.of(e,"WORKSPACE_NOT_FOUND");var r=t.getInAppMessageOrNull(e.inAppMessageKey);if(!r)return qS.of(e,"IN_APP_MESSAGE_NOT_FOUND");var n=this.userManager.resolve();if(this.identifierChecker.isIdentifierChanged(e.identifiers,n.identifiers))return qS.of(e,"IDENTIFIER_CHANGED");var i=this.layoutResolver.resolve(t,r,n),t=new ZS(t,n,r,e.requestedAt),t=this.evaluateProcessor.process("DELIVER",t);if(!t.isEligible)return qS.of(e,"INELIGIBLE");r=WS.of(e,r,n,t,i),n=this.presentProcessor.process(r);return qS.of(e,"PRESENT",n)};var eP=tP;function tP(e,t,r,n,i,o){this.workspaceFetcher=e,this.userManager=t,this.identifierChecker=r,this.layoutResolver=n,this.evaluateProcessor=i,this.presentProcessor=o}nP.prototype.get=function(t){return u.requiredNotNullOrUndefined(this.schedulers.find(function(e){return e.supports(t)}),function(){return"Unsupported InAppMessageScheduleType[".concat(t,"]")})};var rP=nP;function nP(e){this.schedulers=e}oP.prototype.toString=function(){return"InAppMessageScheduleResponse(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", code=").concat(this.code,")")},oP.of=function(e,t,r,n){return new oP(e.schedule.dispatchId,e.schedule.inAppMessageKey,t,r=void 0===r?null:r,n=void 0===n?null:n)};var iP=oP;function oP(e,t,r,n,i){this.dispatchId=e,this.inAppMessageKey=t,this.code=r,this.deliverResponse=n,this.delay=i}aP.of=function(e){var t=(new eo).add("$trigger_event_insert_id",e.schedule.eventBasedContext.insertId).build();return new aP(e.schedule.dispatchId,e.schedule.inAppMessageKey,e.schedule.identifiers,e.requestedAt,e.schedule.reason,u.fromMap(t))},aP.prototype.toString=function(){return"InAppMessageDeliverRequest(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", identifiers=").concat(this.identifiers,", requestedAt=").concat(this.requestedAt,", reason=").concat(this.reason)};var sP=aP;function aP(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessageKey=t,this.identifiers=r,this.requestedAt=n,this.reason=i,this.properties=o}uP.prototype.schedule=function(e,t){switch(e){case"DELIVER":return this.deliver(t);case"DELAY":return this.delay(t);case"IGNORE":return this.ignore(t)}};ee=uP;function uP(){}i(lP,cP=ee),lP.prototype.supports=function(e){return"DELAYED"===e},lP.prototype.deliver=function(e){var t=this.delayManager.delete(e),t=(u.requiredNotNullOrUndefined(t,function(){return"InAppMessageDelay not found (inAppMessageKey=".concat(e.schedule.inAppMessageKey,")")}),sP.of(e)),t=this.deliverProcessor.process(t);return iP.of(e,"DELIVER",t)},lP.prototype.delay=function(e){var t=this.delayManager.delay(e);return iP.of(e,"DELAY",null,t)},lP.prototype.ignore=function(e){var t=this.delayManager.delete(e);return iP.of(e,"IGNORE",null,t)};var cP,pP=lP;function lP(e,t){var r=cP.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}i(dP,fP=ee),dP.prototype.supports=function(e){return"TRIGGERED"===e},dP.prototype.deliver=function(e){var t=sP.of(e),t=this.deliverProcessor.process(t);return iP.of(e,"DELIVER",t)},dP.prototype.delay=function(e){var t=this.delayManager.registerAndDelay(e);return iP.of(e,"DELAY",null,t)},dP.prototype.ignore=function(e){return iP.of(e,"IGNORE")};var fP,hP=dP;function dP(e,t){var r=fP.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}yP.prototype.process=function(e){s.log.debug("InAppMessage Schedule Request: ".concat(e));e=this.schedule(e);return s.log.debug("InAppMessage Schedule Response: ".concat(e)),e},yP.prototype.schedule=function(t){try{var e=this.actionDeterminer.determine(t);return this.schedulerFactory.get(t.scheduleType).schedule(e,t)}catch(e){return s.log.error("Failed to process InAppMessageSchedule: ".concat(e)),iP.of(t,"EXCEPTION")}},yP.prototype.onSchedule=function(e){this.process(e)};var vP=yP;function yP(e,t){this.actionDeterminer=e,this.schedulerFactory=t}mP.prototype.shouldIgnoreRequest=function(e){return"STORED"===e.scheduleType&&e.delayMillis<0},mP.prototype.determineAction=function(e){var t=e.delayMillis;if(0<t)return"DELAY";if(t>=this.DELIVER_DURATION_THRESHOLD_MILLIS)return"DELIVER";if(t<this.DELIVER_DURATION_THRESHOLD_MILLIS)return"IGNORE";throw new Error("InAppMessageScheduleAction cannot be determined (key=".concat(e.schedule.inAppMessageKey,")"))},mP.prototype.determine=function(e){if(this.shouldIgnoreRequest(e))return"IGNORE";var t=this.determineAction(e);return s.log.debug("InAppMessage ScheduleAction determined: action=".concat(t,", dispatchId=").concat(e.schedule.dispatchId)),t};var gP=mP;function mP(){this.DELIVER_DURATION_THRESHOLD_MILLIS=-1e4}wP.prototype.toString=function(){return"InAppMessageTrigger(inAppMessage=".concat(this.inAppMessage.toString(),", reason=").concat(this.reason,", insertId=").concat(this.event.insertId,", timestamp=").concat(this.event.timestamp,", event=").concat(this.event.event.key,")")};var EP=wP;function wP(e,t,r){this.inAppMessage=e,this.reason=t,this.event=r}TP.prototype.determine=function(e){var t=k0.isTrackEvent(e)?e:null;if(!t)return null;var r=this.workspaceFetcher.get();if(!r)return null;for(var n=0,i=r.getInAppMessages();n<i.length;n++){var o=i[n];if(this.eventMatcher.matches(r,o,t)){var s=this.evaluate(r,o,t);if(s.isEligible)return new EP(o,s.reason,t)}}return null},TP.prototype.evaluate=function(e,t,r){e=new ZS(e,r.user,t,r.timestamp);return this.evaluateProcessor.process("TRIGGER",e)};var bP=TP;function TP(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.evaluateProcessor=r}IP.prototype.handle=function(e){e=oS.create(e).toRequest("TRIGGERED",e.event.timestamp);this.scheduleProcessor.process(e)};var _P=IP;function IP(e){this.scheduleProcessor=e}OP.prototype.process=function(e){try{var t=this.determiner.determine(e);if(!t)return;s.log.debug("InAppMessage triggered: ".concat(t)),this.handler.handle(t)}catch(e){s.log.error("Failed to process InAppMessage event trigger: ".concat(e))}};var AP=OP;function OP(e,t){this.determiner=e,this.handler=t}SP.prototype.process=function(e,t){try{this.identifierChecker.isIdentifierChanged(Kt(e),Kt(t))&&this.delayManager.cancelAll()}catch(e){s.log.error("Failed to reset InAppMessage: ".concat(e))}};var NP=SP;function SP(e,t){this.identifierChecker=e,this.delayManager=t}RP.prototype.getDelayStorageItem=function(){var e=this.storage.getItem(this.storageKey);if(u.isNullOrUndefined(e))return null;try{return JSON.parse(e)}catch(e){return s.log.warn("Failed to get delay storage item: ".concat(e)),null}},RP.prototype.get=function(e,t){var r=this.getDelayStorageItem();return!u.isNullOrUndefined(r)&&null!=(e=null==(r=r[e])?void 0:r.find(function(e){return e.schedule.dispatchId===t}))?e:null},RP.prototype.set=function(e,t,r){var n=this.getDelayStorageItem();if(u.isNullOrUndefined(n))return s.log.debug("No delay storage item found. create new item"),void this.storage.setItem(this.storageKey,JSON.stringify(((i={})[e]=[r],i)));var i=null!=(i=n[e])?i:[];i.push(r),n[e]=i,this.storage.setItem(this.storageKey,JSON.stringify(n))},RP.prototype.remove=function(e,t){var r=this.getDelayStorageItem(),n=null==r?void 0:r[e];u.isNullOrUndefined(r)||u.isNullOrUndefined(n)?s.log.debug("No delay storage item found for ".concat(e,". do nothing")):(r[e]=n.filter(function(e){return e.schedule.dispatchId!==t}),0===r[e].length&&delete r[e],this.storage.setItem(this.storageKey,JSON.stringify(r)))},RP.prototype.values=function(){var e=this.getDelayStorageItem();return u.isNullOrUndefined(e)?(s.log.debug("No delay storage item found. do nothing"),[]):Object.values(e).flat()},RP.prototype.clear=function(){this.storage.removeItem(this.storageKey)};var PP=RP;function RP(e){this.storage=e,this.storageKey="iam-delay"}CP.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={})[CP.ROOT_TYPE]=r.key.type,t[CP.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},CP.prototype.createEvent=function(e,t,r,n){var i;return t instanceof Q0?(n[CP.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[CP.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[CP.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,k0.exposure(e.user,t,n,r)):t instanceof ib?k0.remoteConfig(e.user,t,c(c({},n),t.properties),r):null},CP.ROOT_TYPE="$targetingRootType",CP.ROOT_ID="$targetingRootId",CP.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",CP.EXPERIMENT_VERSION_KEY="$experiment_version",CP.EXECUTION_VERSION_KEY="$execution_version";var MP=CP;function CP(e){this.clock=e}UP.prototype.record=function(e,t){var r=this;this.eventFactory.create(e,t).forEach(function(e){r.eventProcessor.process(e)})};var xP=UP;function UP(e,t){this.eventFactory=e,this.eventProcessor=t}DP.eligible=function(e,t,r){return DP.of(e,t,r,!0)},DP.ineligible=function(e,t,r){return DP.of(e,t,r,!1)},DP.of=function(e,t,r,n){return new DP(String(r),t.targetEvaluations,e.inAppMessage,n,t.get(gS))};var kP=DP;function DP(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.isEligible=n,this.layoutEvaluation=i}FP.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):kP.ineligible(e,t,l.UNSUPPORTED_PLATFORM)};var LP=FP;function FP(){}jP.prototype.evaluate=function(e,t,r){return this.userOverrideMatcher.matches(e,t)?kP.eligible(e,t,l.OVERRIDDEN):r.evaluate(e,t)};var VP=jP;function jP(e){this.userOverrideMatcher=e}KP.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?kP.ineligible(e,t,l.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var BP=KP;function KP(){}GP.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?kP.ineligible(e,t,l.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var HP=GP;function GP(){}JP.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):kP.ineligible(e,t,l.NOT_IN_IN_APP_MESSAGE_PERIOD)};var zP=JP;function JP(){}YP.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?kP.ineligible(e,t,l.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var qP=YP;function YP(e){this.hiddenMatcher=e}$P.prototype.evaluate=function(e,t,r){return this.targetMatcher.matches(e,t)?r.evaluate(e,t):kP.ineligible(e,t,l.NOT_IN_IN_APP_MESSAGE_TARGET)};var WP=$P;function $P(e){this.targetMatcher=e}ZP.prototype.evaluate=function(e,t,r){return this.frequencyCapMatcher.matches(e,t)?kP.ineligible(e,t,l.IN_APP_MESSAGE_FREQUENCY_CAPPED):r.evaluate(e,t)};var XP=ZP;function ZP(e){this.frequencyCapMatcher=e}eR.prototype.evaluate=function(e,t,r){return kP.eligible(e,t,l.IN_APP_MESSAGE_TARGET)};var QP=eR;function eR(){}rR.prototype.evaluate=function(e,t,r){var n=bS.of(e),n=this.layoutEvaluator.evaluate(n,lb.create());return t.set(gS,n),r.evaluate(e,t)};var tR=rR;function rR(e){this.layoutEvaluator=e}iR.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},iR.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!u.isNullOrUndefined(e)&&t.identifiers.includes(e)};var nR=iR;function iR(){}sR.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 oR=sR;function sR(e){this.targetMatcher=e}uR.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var aR=uR;function uR(e){this.storage=e}pR.prototype.matches=function(e,t){var r=e.inAppMessage,n=e.user,e=e.timestamp;return this.isFrequencyCapped(r,n,e)},pR.prototype.isFrequencyCapped=function(e,t,r){if(!e.eventTrigger.frequencyCap)return!1;var n=this.createMatchContexts(e.eventTrigger.frequencyCap);if(0===n.length)return!1;for(var i=0,o=this.storage.get(e);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(t,r,s))return!0;return!1},pR.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new lR(new hR(i)))}return e.durationCap&&t.push(new lR(new vR(e.durationCap))),t};var cR=pR;function pR(e){this.storage=e}fR.prototype.matches=function(e,t,r){return this.predicate.matches(e,t,r)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var lR=fR;function fR(e){this.matchCount=0,this.predicate=e}Object.defineProperty(dR.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),dR.prototype.matches=function(e,t,r){e=e.identifiers[this.identifierCap.identifierType];if(u.isNullOrUndefined(e))return!1;r=r.identifiers[this.identifierCap.identifierType];return!u.isNullOrUndefined(r)&&e===r};var hR=dR;function dR(e){this.identifierCap=e}Object.defineProperty(yR.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),yR.prototype.matches=function(e,t,r){return t-r.timestamp<=this.durationCap.durationMillis};var vR=yR;function yR(e){this.durationCap=e}mR.prototype.getTriggerFlow=function(){return this.triggerFlow},mR.prototype.getDeliverFlow=function(e){return e?this.deliverReEvaluateFlow:this.deliverFlow};var gR=mR;function mR(e,t,r){this.layoutEvaluator=r;var r=Ib.get("targetMatcher"),r=[new LP,new VP(new nR),new BP,new HP,new zP,new WP(new oR(r))],n=[new tR(this.layoutEvaluator)],t=[new XP(new cR(t)),new qP(new aR(e))],e=[new QP];this.triggerFlow=Rb.of.apply(Rb,Pe(Pe(Pe(Pe([],r,!1),n,!1),t,!1),e,!1)),this.deliverFlow=Rb.of.apply(Rb,Pe(Pe([],t,!1),e,!1)),this.deliverReEvaluateFlow=Rb.of.apply(Rb,Pe(Pe(Pe([],r,!1),t,!1),e,!1))}i(bR,ER=Ca),bR.prototype.supports=function(e){return void 0!==e.inAppMessage},bR.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlow.evaluate(e,t))?r:kP.ineligible(e,t,l.NOT_IN_IN_APP_MESSAGE_TARGET)},bR.prototype.record=function(e,t){this.eventRecorder.record(e,t),t.isEligible||null===t.layoutEvaluation||this.eventRecorder.record(t.layoutEvaluation.request,t.layoutEvaluation)};var ER,wR=bR;function bR(e,t){var r=ER.call(this)||this;return r.evaluationFlow=e,r.eventRecorder=t,r}_R.prototype.process=function(e,t){e=this.resolveFlow(e,t),e=new wR(e,this.eventRecorder);return this.core.inAppMessage(t,lb.create(),e)},_R.prototype.resolveFlow=function(e,t){return"TRIGGER"===e?this.flowFactory.getTriggerFlow():this.flowFactory.getDeliverFlow(null!=(t=null==(e=t.inAppMessage.evaluateContext)?void 0:e.atDeliverTime)&&t)};var TR=_R;function _R(e,t,r){this.core=e,this.flowFactory=t,this.eventRecorder=r}AR.prototype.resolve=function(e,t,r){e=new bS(e,r,t);return this.core.inAppMessage(e,lb.create(),this.layoutEvaluator)};var IR=AR;function AR(e,t){this.core=e,this.layoutEvaluator=t}i(SR,OR=ee),SR.prototype.supports=function(e){return"STORED"===e},SR.prototype.deliver=function(e){var t=this.delayManager.delete(e),r=(u.requiredNotNullOrUndefined(t,function(){return"InAppMessageDelay not found (inAppMessageKey=".concat(e.schedule.inAppMessageKey,")")}),sP.of(e)),r=this.deliverProcessor.process(r);return iP.of(e,"DELIVER",r,t)},SR.prototype.delay=function(e){var t=this.delayManager.delay(e);return s.log.debug("StoredDelay is scheduled (inAppMessageKey=".concat(e.schedule.inAppMessageKey,", delayMillis=").concat(e.delayMillis.toLocaleString(),")")),iP.of(e,"DELAY",null,t)},SR.prototype.ignore=function(e){var t=this.delayManager.delete(e);return iP.of(e,"IGNORE",null,t)};var OR,NR=SR;function SR(e,t){var r=OR.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}PR.prototype.marketing=function(e){return this.operations.set("$marketing",e),this},PR.prototype.information=function(e){return this.operations.set("$information",e),this},PR.prototype.custom=function(e,t){return this.operations.set(e,t),this},PR.prototype.build=function(){return new RR(this.operations)};kl=PR;function PR(){this.operations=new Map}MR.prototype.toEvent=function(e){var r=new Mo;return this.operations.forEach(function(e,t){r.set(t,e)}),{key:e,properties:u.fromMap(this.operations)}},MR.prototype.toRecord=function(){var r={};return this.operations.forEach(function(e,t){r[t]=e}),r};var RR=MR;function MR(e){this.operations=e}n.HackleSubscriptionStatus=void 0,(m=n.HackleSubscriptionStatus||(n.HackleSubscriptionStatus={})).SUBSCRIBED="SUBSCRIBED",m.UNSUBSCRIBED="UNSUBSCRIBED",m.UNKNOWN="UNKNOWN";var CR=s.log,xR=null;function UR(e,t){var r,t=oO.config(t);oO.logging(t);try{if((r=window)&&"_hackleApp"in r&&null!==r._hackleApp&&"object"==typeof r._hackleApp&&("getAppSdkKey"in r._hackleApp&&"function"==typeof r._hackleApp.getAppSdkKey&&("getInvocationType"in r._hackleApp&&"function"==typeof r._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){var n=e,i=t,o=window._hackleApp;if(null===(a=(new eN).getInvocator(o.getInvocationType(),new VN)))throw new Error("Failed to get invocator with invocationType:".concat(o.getInvocationType()));var s=new tS,a=new BN(a),a=new ns(a,s);if(!o.getAppMode)return a;if((s=o.getAppMode().toLowerCase())===ts.native)return a;if(s!==ts.web_view_wrapper)throw new Error("Unsupported HackleAppMode: ".concat(s));return o=kR(n,i),(s=new is(o,a)).syncUser(),s}}catch(e){CR.error("Unexpected exception while check WebApp client: ".concat(e))}return kR(e,t)}function kR(e,t){var r=oO.sdk(e,t);if(xR)return CR.debug("use already exists hackleClient"),xR;var n=new $o,i=(n.initialize(),new sI),o=Yo.getInstance({days:Xe,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=oO.isBeaconSupported(),a=HO.intercept(r,zO.create()),u=HO.intercept(r,qO.create()),c=a,p=(s&&(c=u),new aO),l=new cO(p,new lO("setTimeout"),oO.pollingIntervalMillis(t)),f=new EN(r,uI.postfix(i,"_".concat(e.slice(0,8)))),h=new EO(dI.clientFetch(t.sdkUrl,r.key),a),f=new NO(f,h),h=(p.add(f),new JN),d=new _O(dI.userTargets(t.sdkUrl),a),v=new bO(dI.userCohorts(t.sdkUrl),a),y=new GA(h),g=new Q_(uI.postfix(o,"_".concat(e))),m=g.getUser(),E=t.user||null,g=new X_(Zo(),g,d,v,y,h,Fe.instance,m,E),d=(p.add(g),new iI(t.sessionTimeoutMillis,uI.postfix(o,"_".concat(e.slice(8))))),v=(g.addListener(d),new x_(i,"".concat(et,"_").concat(e),Ye)),E=new MO(dI.clientDispatch(t.eventUrl),a),p=E,s=(s&&(p=new MO(dI.beaconDispatch(t.eventUrl,r.key),u)),new xO(v,E)),r=new PO(E,p,s),u=new RN([new UN(oO.dedupIntervalMillis(t)),new LN(oO.dedupIntervalMillis(t))]),v=new VO(r,Ye,new lO("setTimeout"),$e),E=new Y0(v,u,d,g),w=new gN,p=new wb(new pI(o,"".concat(st,"_").concat(e.slice(0,8)))),r=new wb(new pI(o,"".concat(at,"_").concat(e.slice(0,8)))),u=new yI(uI.prefix(i,"".concat(ut,"_").concat(e.slice(0,8),"_"))),b=new rA(uI.prefix(i,"".concat(ct,"_").concat(e.slice(0,8),"_"))),T=new MP(Fe.instance),_=new xP(T,E),T=__.create(f,T,E,[p,r]),I=new QN(T,g),A=new DA(new FA(uI.postfix(o,"_".concat(e.slice(0,8)))),y,T,g),O=new J0(g,T),O=(d.addListener(A),d.addListener(O),new DI(T)),N=new mI([new wI,new TI(new IA),new II(new IA),new OI(u,Fe.instance),new SI(new OA),new RI(new OA),new CI(new SA),new UI(new SA)]),N=new iA([new sA,new pA(N),new uA]),O=new fA(Fe.instance,O,N),N=new yA([new mA,new wA(O),new TA(O)]),S=new $I(dI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),S=new FI(YI.create(S),O,N),O=Ib.get("delegatingEvaluator"),N=new IS(new hS(O),new NS,_),O=new PS(b),O=new kS(S,O),P=new LS,u=new gR(u,b,N),b=new IR(T,N),N=new VS(Fe.instance,new lO("setTimeout")),i=new PP(uI.prefix(i,"".concat(vt,"_").concat(e.slice(0,8),"_"))),e=new zS(N,new Map,i),u=new TR(T,u,_),_=new eP(f,g,P,b,u,O),b=[new pP(_,e),new hP(_,e),new NR(_,e)],O=new vP(new gP,new rP(b)),_=(N.listener=O,new dA(new ZI(Ib.get("targetMatcher")))),b=new bP(f,_,u),N=new _P(O),_=new AP(b,N),u=new NP(P,e),R=new pS(O,i,_,u,v,Fe.instance),b=(g.addListener(R),new rO(f)),N=(new eO(v,b),new WN(g,h,dt)),P=(h.addListener(N),new XN(T)),e=(N.addListener(P),new GN(T,g)),O=(t.automaticPageTracking&&h.addListener(e),new aN(Ib.get("targetMatcher"))),i=new vN(o,pt,{days:lt}),_=new oN(f,O,i,T),u=new lN(new hN(y),new RA,i,w),v=new rN(_,u,g,T),b=(h.addListener(v),new fI(T,g,p,r)),f=(null==(P=t.devTool)?void 0:P.userExplorer)&&"function"==typeof(null==(o=t.devTool)?void 0:o.userExplorer),O=t.devTool&&f?{manager:t.devTool,userExplorer:b}:void 0,y=new Ki(dI.monitoring(t.monitoringUrl),a,c,new lO("setTimeout"),We),M=(Ni.addRegistry(y),new TN),i=(M.addListener(h),M.addListener(N),M.addListener(d),M.addListener(n),M.addListener(s),M.addListener(E),M.addListener(y),l.start(),IN.create(ht,1)),C=new Ko(T,l,d,g,I,i,e,S,O),_=(xR=C,(new N_).install(T,g),g.resolve().hackleProperties.browserName);return M.install("string"==typeof _?_:null),u=Date.now(),v=g.currentUser,p=d.currentSessionId,(k_(m,v)?d.startNewSessionIfNeeded(v,u):d.startNewSession(m,v,u))===p&&A.startNewCampaignIfNeeded(v,u),C.onReady(function(){t.autoOpenDevTool&&(t.devTool?C.showUserExplorer():CR.error("DevTool is not provided")),M.initialize(),w.dispatchDoneEventIfNeeded(),R.loadDelaySchedule()}),C}var DR=function(e,t){return(DR=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 LR=function(){return(LR=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 FR(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 VR(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 jR(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}BR.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},BR.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},BR.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};jl=BR;function BR(){this.listeners={}}HR.arePropertiesEqual=function(e,t){var r=HR.coerceUnknownToProperties(e),n=HR.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]})},HR.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var KR=HR;function HR(){}zR.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)&&KR.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&KR.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var GR=zR;function zR(){}var JR=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=UR(e,LR(LR({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.47.0"})),r.getSessionId=r.getSessionId.bind(r),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.setUserProperties=r.setUserProperties.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.updatePushSubscriptions=r.updatePushSubscriptions.bind(r),r.updateSmsSubscriptions=r.updateSmsSubscriptions.bind(r),r.updateKakaoSubscriptions=r.updateKakaoSubscriptions.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.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),r.fetch=r.fetch.bind(r),r.close=r.close.bind(r),r.setInAppMessageListener=r.setInAppMessageListener.bind(r),r.getExperiment=r.getExperiment.bind(r),r.setPhoneNumber=r.setPhoneNumber.bind(r),r.unsetPhoneNumber=r.unsetPhoneNumber.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return DR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getSessionId=function(){return this.client.getSessionId()},i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.setUser(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserId=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.setUserId(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setDeviceId=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.setDeviceId(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserProperty=function(t,r){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.setUserProperty(t,r),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserProperties=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.setUserProperties(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.updateUserProperties=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.updateUserProperties(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.updatePushSubscriptions=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.updatePushSubscriptions(t),[2]})})},i.prototype.updateSmsSubscriptions=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.updateSmsSubscriptions(t),[2]})})},i.prototype.updateKakaoSubscriptions=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.updateKakaoSubscriptions(t),[2]})})},i.prototype.resetUser=function(){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.resetUser(),this.emitUpdatedUser(this.getUser()),[2]})})},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(LR(LR({},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.getExperiment=function(e){return this.client.getExperiment(e)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){GR.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.prototype.setInAppMessageListener=function(e){this.client.setInAppMessageListener(e)},i.prototype.close=function(){this.client.close()},i.prototype.setPhoneNumber=function(t){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.setPhoneNumber(t),[2]})})},i.prototype.unsetPhoneNumber=function(){return FR(this,void 0,void 0,function(){return VR(this,function(e){return this.client.unsetPhoneNumber(),[2]})})},i}(jl);var k={exports:{}},T={},qR=Object.getOwnPropertySymbols,YR=Object.prototype.hasOwnProperty,WR=Object.prototype.propertyIsEnumerable;var r=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]))YR.call(r,o)&&(n[o]=r[o]);if(qR)for(var s=qR(r),a=0;a<s.length;a++)WR.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},$R=r,Cu="function"==typeof Symbol&&Symbol.for,XR=Cu?Symbol.for("react.element"):60103,ZR=Cu?Symbol.for("react.portal"):60106,Jc=Cu?Symbol.for("react.fragment"):60107,_a=Cu?Symbol.for("react.strict_mode"):60108,Tu=Cu?Symbol.for("react.profiler"):60114,QR=Cu?Symbol.for("react.provider"):60109,eM=Cu?Symbol.for("react.context"):60110,tM=Cu?Symbol.for("react.forward_ref"):60112,O=Cu?Symbol.for("react.suspense"):60113,rM=Cu?Symbol.for("react.memo"):60115,nM=Cu?Symbol.for("react.lazy"):60116,iM="function"==typeof Symbol&&Symbol.iterator;function oM(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 sM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aM={};function uM(e,t,r){this.props=e,this.context=t,this.refs=aM,this.updater=r||sM}function cM(){}function pM(e,t,r){this.props=e,this.context=t,this.refs=aM,this.updater=r||sM}uM.prototype.isReactComponent={},uM.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(oM(85));this.updater.enqueueSetState(this,e,t,"setState")},uM.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},cM.prototype=uM.prototype;var b=pM.prototype=new cM,lM=(b.constructor=pM,$R(b,uM.prototype),b.isPureReactComponent=!0,{current:null}),fM=Object.prototype.hasOwnProperty,hM={key:!0,ref:!0,__self:!0,__source:!0};function dM(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)fM.call(t,n)&&!hM.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:XR,type:e,key:o,ref:s,props:i,_owner:lM.current}}function vM(e){return"object"==typeof e&&null!==e&&e.$$typeof===XR}var yM=/\/+/g,gM=[];function mM(e,t,r,n){var i;return gM.length?((i=gM.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 EM(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,gM.length<10&&gM.push(e)}function wM(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 XR:case ZR:o=!0}}if(o)return n(i,t,""===r?"."+bM(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+bM(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=iM&&t[iM]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+bM(a,s++),n,i);else if("object"===a)throw n=""+t,Error(oM(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function bM(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 TM(e,t){e.func.call(e.context,t,e.count++)}function _M(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?IM(e,n,r,function(e){return e}):null!=e&&(vM(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(yM,"$&/")+"/")+r,e={$$typeof:XR,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function IM(e,t,r,n,i){var o="";wM(e,_M,t=mM(t,o=null!=r?(""+r).replace(yM,"$&/")+"/":o,n,i)),EM(t)}var AM={current:null};function OM(){var e=AM.current;if(null===e)throw Error(oM(321));return e}var NM,SM,PM,sa={ReactCurrentDispatcher:AM,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:lM,IsSomeRendererActing:{current:!1},assign:$R},_=(T.Children={map:function(e,t,r){if(null==e)return e;var n=[];return IM(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;wM(e,TM,t=mM(null,null,t,r)),EM(t)},count:function(e){return wM(e,function(){return null},null)},toArray:function(e){var t=[];return IM(e,t,null,function(e){return e}),t},only:function(e){if(vM(e))return e;throw Error(oM(143))}},T.Component=uM,T.Fragment=Jc,T.Profiler=Tu,T.PureComponent=pM,T.StrictMode=_a,T.Suspense=O,T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sa,T.cloneElement=function(e,t,r){if(null==e)throw Error(oM(267,e));var n=$R({},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=lM.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)fM.call(t,a)&&!hM.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:XR,type:e.type,key:i,ref:o,props:n,_owner:s}},T.createContext=function(e,t){return(e={$$typeof:eM,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:QR,_context:e},e.Consumer=e},T.createElement=dM,T.createFactory=function(e){var t=dM.bind(null,e);return t.type=e,t},T.createRef=function(){return{current:null}},T.forwardRef=function(e){return{$$typeof:tM,render:e}},T.isValidElement=vM,T.lazy=function(e){return{$$typeof:nM,_ctor:e,_status:-1,_result:null}},T.memo=function(e,t){return{$$typeof:rM,type:e,compare:void 0===t?null:t}},T.useCallback=function(e,t){return OM().useCallback(e,t)},T.useContext=function(e,t){return OM().useContext(e,t)},T.useDebugValue=function(){},T.useEffect=function(e,t){return OM().useEffect(e,t)},T.useImperativeHandle=function(e,t,r){return OM().useImperativeHandle(e,t,r)},T.useLayoutEffect=function(e,t){return OM().useLayoutEffect(e,t)},T.useMemo=function(e,t){return OM().useMemo(e,t)},T.useReducer=function(e,t,r){return OM().useReducer(e,t,r)},T.useRef=function(e){return OM().useRef(e)},T.useState=function(e){return OM().useState(e)},T.version="16.14.0",{}),P=Function.call.bind(Object.prototype.hasOwnProperty),RM=function(){};function MM(e,t,r,n,i){if("production"!==production)for(var o in e)if(PM(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,NM)}catch(e){s=e}!s||s instanceof Error||RM((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 SM)&&(SM[s.message]=!0,o=i?i():"",RM("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(NM="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",SM={},PM=P,RM=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),MM.resetWarningCache=function(){"production"!==production&&(SM={})},"production"!==production){var CM=r,xM=MM,A="function"==typeof Symbol&&Symbol.for,UM=A?Symbol.for("react.element"):60103,kM=A?Symbol.for("react.portal"):60106,DM=A?Symbol.for("react.fragment"):60107,LM=A?Symbol.for("react.strict_mode"):60108,FM=A?Symbol.for("react.profiler"):60114,VM=A?Symbol.for("react.provider"):60109,jM=A?Symbol.for("react.context"):60110,BM=A?Symbol.for("react.concurrent_mode"):60111,KM=A?Symbol.for("react.forward_ref"):60112,HM=A?Symbol.for("react.suspense"):60113,GM=A?Symbol.for("react.suspense_list"):60120,zM=A?Symbol.for("react.memo"):60115,JM=A?Symbol.for("react.lazy"):60116,qM=A?Symbol.for("react.block"):60121,YM=A?Symbol.for("react.fundamental"):60117,WM=A?Symbol.for("react.responder"):60118,$M=A?Symbol.for("react.scope"):60119,XM="function"==typeof Symbol&&Symbol.iterator,ZM="@@iterator";function QM(e){if(null===e||"object"!=typeof e)return null;e=XM&&e[XM]||e[ZM];return"function"==typeof e?e:null}var eC={current:null},tC={current:null},rC=/^(.*)[\\\/]/,nC=1;function iC(e){if(null==e)return null;if("number"==typeof e.tag&&pC("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 DM:return"Fragment";case kM:return"Portal";case FM:return"Profiler";case LM:return"StrictMode";case HM:return"Suspense";case GM:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case jM:return"Context.Consumer";case VM:return"Context.Provider";case KM:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case zM:return iC(e.type);case qM:return iC(e.render);case JM:r=(t=e)._status===nC?t._result:null;if(r)return iC(r)}var t,r;return null}var oC={},sC=null;function aC(e){sC=e}oC.getCurrentStack=null,oC.getStackAddendum=function(){var e,t,r,n,i,o="",s=(sC&&(e=iC(sC.type),r=sC._owner,o+=(e=e,t=sC._source,r=r&&iC(r.type),i="",t?(n=(s=t.fileName).replace(rC,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(rC))&&(s=s[1])?s.replace(rC,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),oC.getCurrentStack);return s&&(o+=s()||""),o};var uC={ReactCurrentDispatcher:eC,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:tC,IsSomeRendererActing:{current:!1},assign:CM};function cC(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];lC("warn",e,r)}function pC(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];lC("error",e,r)}function lC(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=uC.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){}}CM(uC,{ReactDebugCurrentFrame:oC,ReactComponentTreeHook:{}});var fC={};function hC(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;fC[r]||(pC("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),fC[r]=!0)}var dC={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){hC(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){hC(e,"replaceState")},enqueueSetState:function(e,t,r,n){hC(e,"setState")}},vC={};function yC(e,t,r){this.props=e,this.context=t,this.refs=vC,this.updater=r||dC}Object.freeze(vC),yC.prototype.isReactComponent={},yC.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")},yC.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var gC,mC={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(gC in mC)mC.hasOwnProperty(gC)&&!function(e,t){Object.defineProperty(yC.prototype,e,{get:function(){cC("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(gC,mC[gC]);function EC(){}function wC(e,t,r){this.props=e,this.context=t,this.refs=vC,this.updater=r||dC}EC.prototype=yC.prototype,(A=wC.prototype=new EC).constructor=wC,CM(A,yC.prototype),A.isPureReactComponent=!0;var bC,TC,_C=Object.prototype.hasOwnProperty,IC={key:!0,ref:!0,__self:!0,__source:!0};function AC(e){if(_C.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function OC(e){if(_C.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var NC={},SC=function(e,t,r,n,i,o,s){e={$$typeof:UM,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 PC(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in AC(t)&&(s=t.ref,"string"==typeof(c=t).ref&&tC.current&&c.__self&&tC.current.stateNode!==c.__self&&(l=iC(tC.current.type),NC[l]||(pC('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',iC(tC.current.type),c.ref),NC[l]=!0))),OC(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)_C.call(t,n)&&!IC.hasOwnProperty(n)&&(i[n]=t[n]);var c,p,l,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 g(){TC||(TC=!0,pC("%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)",p))}function m(){bC||(bC=!0,pC("%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&&(l=i,f=c,m.isReactWarning=!0,Object.defineProperty(l,"key",{get:m,configurable:!0})),s&&(r=i,p=c,g.isReactWarning=!0,Object.defineProperty(r,"ref",{get:g,configurable:!0}))),SC(e,o,s,a,u,tC.current,i)}function RC(e){return"object"==typeof e&&null!==e&&e.$$typeof===UM}var MC=".",CC=":",xC=!1,UC=/\/+/g;function kC(e){return(""+e).replace(UC,"$&/")}var DC=10,LC=[];function FC(e,t,r,n){var i;return LC.length?((i=LC.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 VC(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,LC.length<DC&&LC.push(e)}function jC(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 UM:case kM:a=!0}}if(a)return n(i,t,""===r?MC+BC(t,0):r),1;var u=0,c=""===r?MC:r+CC;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(o=t[p],c+BC(o,p),n,i);else if("function"==typeof(r=QM(t))){r===t.entries&&(xC||cC("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."),xC=!0);for(var l,f=r.call(t),h=0;!(l=f.next()).done;)u+=e(o=l.value,c+BC(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+oC.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 BC(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 KC(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function HC(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)?GC(o,n,r,function(e){return e}):null!=o&&(RC(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":kC(o.key)+"/")+r,o=SC(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function GC(e,t,r,n,i){var o="",t=FC(t,o=null!=r?kC(r)+"/":o,n,i);jC(e,HC,t),VC(t)}function zC(e){return"string"==typeof e||"function"==typeof e||e===DM||e===BM||e===FM||e===LM||e===HM||e===GM||"object"==typeof e&&null!==e&&(e.$$typeof===JM||e.$$typeof===zM||e.$$typeof===VM||e.$$typeof===jM||e.$$typeof===KM||e.$$typeof===YM||e.$$typeof===WM||e.$$typeof===$M||e.$$typeof===qM)}function JC(){var e=eC.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 qC(){if(tC.current){var e=iC(tC.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var YC=!1,WC={};function $C(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=qC())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),WC[t=r]||(WC[t]=!0,r="",e&&e._owner&&e._owner!==tC.current&&(r=" It was passed a child from "+iC(e._owner.type)+"."),aC(e),pC('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),aC(null)))}function XC(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];RC(n)&&$C(n,t)}else if(RC(e))e._store&&(e._store.validated=!0);else if(e){var i=QM(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)RC(o.value)&&$C(o.value,t)}}function ZC(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=iC(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==KM&&t.$$typeof!==zM)return;r=t.propTypes}r?(aC(e),xM(r,e.props,"prop",n,oC.getStackAddendum),aC(null)):void 0===t.PropTypes||YC||(YC=!0,pC("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||pC("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function QC(e,t,r){var n,i=zC(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+".":"")||qC(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===UM?(s="<"+(iC(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,pC("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)),PC.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)XC(arguments[o],e);if(e===DM){var s=t;aC(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){pC("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&pC("Invalid attribute `ref` supplied to `React.Fragment`."),aC(null)}else ZC(t);return t}var ex=!1;try{var tx=Object.freeze({}),rx=new Map([[tx,null]]),nx=new Set([tx]);rx.set(0,0),nx.add(0)}catch(e){}function ix(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=CM({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,p=e._owner;if(null!=t)for(n in AC(t)&&(a=t.ref,p=tC.current),OC(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)_C.call(t,n)&&!IC.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var l=arguments.length-2;if(1==l)o.children=r;else if(1<l){for(var f=Array(l),h=0;h<l;h++)f[h]=arguments[h+2];o.children=f}return SC(e.type,s,a,u,c,p,o)}.apply(this,arguments),i=2;i<arguments.length;i++)XC(arguments[i],n.type);return ZC(n),n}function ox(e){var t=QC.bind(null,e);return t.type=e,ex||(ex=!0,cC("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 cC("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}A=QC,_.Children={map:function(e,t,r){if(null==e)return e;var n=[];return GC(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=FC(null,null,t,r),jC(e,KC,t),VC(t)},count:function(e){return jC(e,function(){return null},null)},toArray:function(e){var t=[];return GC(e,t,null,function(e){return e}),t},only:function(e){if(RC(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},_.Component=yC,_.Fragment=DM,_.Profiler=FM,_.PureComponent=wC,_.StrictMode=LM,_.Suspense=HM,_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uC,_.cloneElement=ix,_.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&pC("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:jM,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:VM,_context:r}),i=!1,t={$$typeof:jM,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,pC("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,pC("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},_.createElement=A,_.createFactory=ox,_.createRef=function(){var e={current:null};return Object.seal(e),e},_.forwardRef=function(e){return null!=e&&e.$$typeof===zM?pC("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?pC("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&pC("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||pC("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:KM,render:e}},_.isValidElement=RC,_.lazy=function(e){var t,r,n={$$typeof:JM,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){pC("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){pC("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},_.memo=function(e,t){return zC(e)||pC("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:zM,type:e,compare:void 0===t?null:t}},_.useCallback=function(e,t){return JC().useCallback(e,t)},_.useContext=function(e,t){var r,n=JC();return void 0!==t&&pC("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?pC("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&&pC("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},_.useDebugValue=function(e,t){return JC().useDebugValue(e,t)},_.useEffect=function(e,t){return JC().useEffect(e,t)},_.useImperativeHandle=function(e,t,r){return JC().useImperativeHandle(e,t,r)},_.useLayoutEffect=function(e,t){return JC().useLayoutEffect(e,t)},_.useMemo=function(e,t){return JC().useMemo(e,t)},_.useReducer=function(e,t,r){return JC().useReducer(e,t,r)},_.useRef=function(e){return JC().useRef(e)},_.useState=function(e){return JC().useState(e)},_.version="16.14.0"}"production"===production?k.exports=T:k.exports=_;var sx=k.exports,ax=k.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),H=ax.Consumer,ux=ax.Provider;var cx=s.log;function px(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=k.exports.useContext(ax),n=r.hackle,i=r.userVersion,o=r.initialized,s=k.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||bt.of(t,l.EXCEPTION):bt.of(t,l.SDK_NOT_READY)},[t,e,n,o]),r=jR(k.exports.useState(function(){return n?s():(cx.error("HackleClient is not existed"),bt.of(t,l.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=jR(k.exports.useState(i),2),c=u[0],u=u[1];return dx(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function fx(e){e=hx(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function hx(e){var t=k.exports.useContext(ax),r=t.hackle,n=t.userVersion,i=t.initialized,o=k.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||_t.off(l.EXCEPTION):_t.off(l.SDK_NOT_READY)},[e,r,i]),t=jR(k.exports.useState(function(){return r?o():(cx.error("HackleClient is not existed"),_t.off(l.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=jR(k.exports.useState(n),2),u=a[0],a=a[1];return dx(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function dx(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function vx(e){var t,r=e.experimentKey,e=e.children,n=(r=px(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(k.exports.Children.forEach(e,function(e){k.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?k.exports.cloneElement(t,{variation:i}):null)}function yx(e){return e.variation,e=e.children,k.exports.createElement(k.exports.Fragment,null,e)}function gx(e){var t=(r=fx(e.featureKey)).isLoading,r=r.isOn;return t?null:sx.createElement(sx.Fragment,null,e.children(r))}n.Bucket=Ut,n.Cohort=jn,n.Container=sr,n.ContainerGroup=ur,n.CoreVersion=mr,n.Decision=bt,n.DecisionReason=l,n.Delay=Dn,n.EXPERIMENT_IMPLEMENTATION_TYPE=Pt,n.EmptyHackleRemoteConfig=At,n.EmptyParameterConfig=je,n.EventType=Ft,n.Experiment=Rt,n.FeatureFlagDecision=_t,n.HackleContext=ax,n.HackleContextConsumer=H,n.HackleContextProvider=ux,n.HackleExperiment=vx,n.HackleFeature=gx,n.HackleInAppMessageActionImpl=Fn,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=jR(k.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return k.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),k.exports.useEffect(function(){function e(){a(function(e){return LR(LR({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),k.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return LR(LR({},e),{initialized:!0})})},function(){a(function(e){return LR(LR({},e),{initialized:!0})})}).catch(function(){a(function(e){return LR(LR({},e),{initialized:!0})})})},[t]),i||s.initialized?sx.createElement(ux,{value:s},e):null},n.HackleSubscriptionOperations=RR,n.HackleSubscriptionOperationsBuilder=kl,n.HackleVariation=yx,n.IAM_ACTION_AREA=["BUTTON","IMAGE","MESSAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Lr,n.IAM_BEHAVIOR=Dr,n.IAM_DISPLAY_TYPE=xr,n.IAM_HORIZONTAL_ALIGNMENT=Vr,n.IAM_LAYOUT_TYPE=Ur,n.IAM_ORIENTATION=kr,n.IAM_PLATFORM_TYPE=Mr,n.IAM_STATUS=Rr,n.IAM_TIMEUNIT=Cr,n.IAM_VERTICAL_ALIGNMENT=Fr,n.IdentifierType=jt,n.IdentifiersBuilder=Ht,n.InAppMessage=jr,n.InAppMessageAction=Rn,n.InAppMessageAfterCondition=Un,n.InAppMessageAlignment=hn,n.InAppMessageBackground=Pn,n.InAppMessageButton=In,n.InAppMessageButtonStyle=Sn,n.InAppMessageContext=sn,n.InAppMessageContextLayout=ln,n.InAppMessageContextMessage=cn,n.InAppMessageDurationCap=Qr,n.InAppMessageEvaluateContext=Cn,n.InAppMessageEventFrequencyCap=Wr,n.InAppMessageEventTrigger=Jr,n.InAppMessageEventTriggerRule=qr,n.InAppMessageExperimentContext=un,n.InAppMessageIdentifierCap=Xr,n.InAppMessageImage=vn,n.InAppMessageImageAutoScroll=gn,n.InAppMessagePeriodAlways=Kr,n.InAppMessagePeriodCustom=Gr,n.InAppMessagePositionalButton=On,n.InAppMessageTargetContext=tn,n.InAppMessageText=En,n.InAppMessageTextAttribute=bn,n.InAppMessageTextStyle=_n,n.InAppMessageUserOverride=nn,n.Logger=s,n.MATCH_OPERATORS=Ir,n.MATCH_TYPES=Tr,n.MATCH_VALUE_TYPES=_r,n.MetaVersion=wr,n.ParameterConfiguration=Nt,n.PropertyOperations=xo,n.PropertyOperationsBuilder=Mo,n.RemoteConfigDecision=Et,n.RemoteConfigParameter=pr,n.RemoteConfigParameterValue=dr,n.RemoteConfigTargetRule=fr,n.SEGMENT_TYPES=Nr,n.Segment=ir,n.Slot=Dt,n.SplitUrlConfig=Bn,n.SplitUrlTargets=Hn,n.TARGET_ACTION_TYPES=Ar,n.TARGET_KEY_TYPES=Or,n.Target=Jt,n.TargetAction=er,n.TargetCondition=Yt,n.TargetKey=$t,n.TargetMatch=Zt,n.TargetRule=rr,n.TargetingType=Sr,n.UserTargetEvent=zn,n.Variation=Ct,n.Version=yr,n.createInstance=function(e,t){return new JR(e,t)},n.getUserId=Zo,n.removeUserId=Qo,n.resolveIdentifiers=Kt,n.sanitizeUser=zt,n.setUserId=function(e){Yo.getInstance().setItem(Qe,e)},n.useFeature=function(e){var t=(n=k.exports.useContext(ax)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=jR(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&cx.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=jR(k.exports.useState(r),2))[0],n=n[1];return dx(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=k.exports.useContext(ax)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||_t.off(l.EXCEPTION)},[e,t,n]),o=(s=jR(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&cx.error("HackleClient is not existed"),_t.off(l.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=jR(k.exports.useState(r),2))[0],n=n[1];return dx(a,r)||(n(r),s(i())),o},n.useLoadableFeature=fx,n.useLoadableFeatureDetail=hx,n.useLoadableRemoteConfig=function(){var e=(o=k.exports.useContext(ax)).hackle,t=o.userVersion,r=o.initialized,n=k.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new At},[e,r]),i=(o=jR(k.exports.useState(function(){return e||cx.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=jR(k.exports.useState(t),2))[0],a=a[1];return dx(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=px,n.useLoadableVariationDetail=lx,n.useRemoteConfig=function(){var e=(r=k.exports.useContext(ax)).hackle,t=r.userVersion,r=r.initialized,n=k.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new At},[e,r]),i=(o=jR(k.exports.useState(function(){return e||cx.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=jR(k.exports.useState(t),2))[0],r=r[1];return dx(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=k.exports.useContext(ax).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(cx.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=k.exports.useContext(ax)).hackle,n=a.userVersion,i=a.initialized,o=k.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=jR(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&cx.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=jR(k.exports.useState(n),2))[0],c=c[1];return dx(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=k.exports.useContext(ax)).hackle,n=i.userVersion,i=i.initialized,o=k.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||bt.of(t,l.EXCEPTION)},[t,e,r,i]),s=(a=jR(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&cx.error("HackleClient is not existed"),bt.of(t,l.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=jR(k.exports.useState(n),2))[0],i=i[1];return dx(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__esModule",{value:!0})});
|