@letscooee/web-sdk 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ # 0.0.6
4
+
5
+ 1. Build: Upgrade TypeScript to 4.4.
6
+ 2. Fix: Convert \n to `<br>` in texts.
7
+
3
8
  # 0.0.5
4
9
 
5
10
  Supporting changes based on the in-app composer.
package/dist/constants.js CHANGED
@@ -8,8 +8,7 @@ var Constants = /** @class */ (function () {
8
8
  function Constants() {
9
9
  }
10
10
  Constants.API_URL = 'https://api.sdk.letscooee.com';
11
- Constants.SDK_VERSION = '0.0.4';
12
- Constants.SDK_VERSION_CODE = 4;
11
+ Constants.SDK_VERSION = require('../package.json').version;
13
12
  Constants.SDK_DEBUG = false;
14
13
  Constants.SDK = 'WEB';
15
14
  Constants.LOG_PREFIX = 'CooeeSDK';
@@ -30,6 +29,10 @@ var Constants = /** @class */ (function () {
30
29
  // endregion
31
30
  Constants.IDLE_TIME_IN_SECONDS = 30 * 60;
32
31
  Constants.IN_APP_CONTAINER_NAME = 'cooee-wrapper';
32
+ (function () {
33
+ var rawCode = Constants.SDK_VERSION.split('.').map(function (item) { return item.padStart(2, '0'); }).join('');
34
+ Constants.SDK_VERSION_CODE = parseInt(rawCode, 10);
35
+ })();
33
36
  return Constants;
34
37
  }());
35
38
  export { Constants };
@@ -40,8 +40,10 @@ var Border = /** @class */ (function () {
40
40
  return Border;
41
41
  }());
42
42
  export { Border };
43
+ /* eslint-disable no-unused-vars */
43
44
  export var BorderStyle;
44
45
  (function (BorderStyle) {
45
46
  BorderStyle[BorderStyle["SOLID"] = 1] = "SOLID";
46
47
  BorderStyle[BorderStyle["DASHED"] = 2] = "DASHED";
47
48
  })(BorderStyle || (BorderStyle = {}));
49
+ /* eslint-enable no-unused-vars */
@@ -39,6 +39,7 @@ var BaseElement = /** @class */ (function () {
39
39
  return BaseElement;
40
40
  }());
41
41
  export { BaseElement };
42
+ /* eslint-disable no-unused-vars */
42
43
  export var ElementType;
43
44
  (function (ElementType) {
44
45
  ElementType[ElementType["IMAGE"] = 1] = "IMAGE";
@@ -46,3 +47,4 @@ export var ElementType;
46
47
  ElementType[ElementType["BUTTON"] = 3] = "BUTTON";
47
48
  ElementType[ElementType["SHAPE"] = 100] = "SHAPE";
48
49
  })(ElementType || (ElementType = {}));
50
+ /* eslint-disable no-unused-vars */
@@ -64,6 +64,7 @@ var TextPart = /** @class */ (function () {
64
64
  return TextPart;
65
65
  }());
66
66
  export { TextPart };
67
+ /* eslint-disable no-unused-vars */
67
68
  export var TextAlign;
68
69
  (function (TextAlign) {
69
70
  TextAlign[TextAlign["START"] = 0] = "START";
@@ -77,3 +78,4 @@ export var TextScript;
77
78
  TextScript[TextScript["SUPER"] = 1] = "SUPER";
78
79
  TextScript[TextScript["SUB"] = 2] = "SUB";
79
80
  })(TextScript || (TextScript = {}));
81
+ /* eslint-enable no-unused-vars */
@@ -10,9 +10,6 @@ import { Container } from '../models/trigger/inapp/container';
10
10
  * @version 0.0.5
11
11
  */
12
12
  var BlockProcessor = /** @class */ (function () {
13
- /**
14
- * Constructor
15
- */
16
13
  function BlockProcessor(parentHTMLEl, inappElement) {
17
14
  this.screenWidth = 0;
18
15
  this.screenHeight = 0;
@@ -31,12 +31,13 @@ var ContainerRenderer = /** @class */ (function (_super) {
31
31
  }
32
32
  /**
33
33
  * Render group element from layers list in {@link InAppTrigger} block.
34
+ * @return The instance of this renderer.
34
35
  */
35
36
  ContainerRenderer.prototype.render = function () {
36
37
  _super.prototype.render.call(this);
37
38
  this.renderer.setStyle(this.inappHTMLEl, 'position', 'relative');
38
- /*this.renderer.setStyle(this.inappHTMLEl, 'width', '100%');
39
- this.renderer.setStyle(this.inappHTMLEl, 'height', '100%');*/
39
+ /* this.renderer.setStyle(this.inappHTMLEl, 'width', '100%');
40
+ this.renderer.setStyle(this.inappHTMLEl, 'height', '100%'); */
40
41
  return this;
41
42
  };
42
43
  return ContainerRenderer;
@@ -35,8 +35,9 @@ var TextRenderer = /** @class */ (function (_super) {
35
35
  var _this = this;
36
36
  var _a;
37
37
  (_a = this.inappElement.parts) === null || _a === void 0 ? void 0 : _a.forEach(function (partData) {
38
+ var _a, _b;
38
39
  var newPartElement = _this.renderer.createElement('span');
39
- newPartElement.innerHTML = partData.txt;
40
+ newPartElement.innerHTML = (_b = (_a = partData.txt) === null || _a === void 0 ? void 0 : _a.toString()) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, '<br />');
40
41
  _this.processPart(newPartElement, partData);
41
42
  _this.renderer.appendChild(_this.inappHTMLEl, newPartElement);
42
43
  });
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see sdk-preview.min.js.LICENSE.txt */
2
- !function(){var t={489:function(t){for(var e=Math.floor(16777215*Math.random()),n=u.index=parseInt(16777215*Math.random(),10),r=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,i=function(t){return!(null==t||!t.constructor||"function"!=typeof t.constructor.isBuffer||!t.constructor.isBuffer(t))},o=[],s=0;s<256;s++)o[s]=(s<=15?"0":"")+s.toString(16);var a=new RegExp("^[0-9a-fA-F]{24}$"),c=[];for(s=0;s<10;)c[48+s]=s++;for(;s<16;)c[55+s]=c[87+s]=s++;function u(t){if(!(this instanceof u))return new u(t);if(t&&(t instanceof u||"ObjectID"===t._bsontype))return t;if(this._bsontype="ObjectID",null!=t&&"number"!=typeof t){var e=u.isValid(t);if(!e&&null!=t)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&"string"==typeof t&&24===t.length)return u.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&"function"==typeof t.toHexString)return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t}else this.id=this.generate(t)}t.exports=u,u.default=u,u.createFromTime=function(t){return new u((8,(8===(e=(e=t=parseInt(t,10)%4294967295).toString(16)).length?e:"00000000".substring(e.length,8)+e)+"0000000000000000"));var e},u.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",n=0;n<24;)e+=String.fromCharCode(c[t.charCodeAt(n++)]<<4|c[t.charCodeAt(n++)]);return new u(e)},u.isValid=function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&a.test(t):t instanceof u||!!i(t)||"function"==typeof t.toHexString&&(t.id instanceof _Buffer||"string"==typeof t.id)&&(12===t.id.length||24===t.id.length&&a.test(t.id))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=o[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof u?this.toString()===t.toString():"string"==typeof t&&u.isValid(t)&&12===t.length&&i(this.id)?t===this.id.toString("binary"):"string"==typeof t&&u.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&u.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof u||t.toHexString))&&t.toHexString()===this.toHexString()},getTimestamp:function(){var t,e=new Date;return t=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,e.setTime(1e3*Math.floor(t)),e},generate:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var i=n=(n+1)%16777215;return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,r>>8&255,255&r,i>>16&255,i>>8&255,255&i)}};var l=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[l]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},238:function(t,e,n){var r;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",p="name",h="type",f="vendor",d="version",b="architecture",y="console",v="mobile",g="tablet",w="smarttv",m="wearable",S="embedded",E={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return typeof t===u&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===a?t:t.substring(0,255)}},T={rgx:function(t,e){for(var n,r,i,a,u,l,p=0;p<e.length&&!u;){var h=e[p],f=e[p+1];for(n=r=0;n<h.length&&!u;)if(u=h[n++].exec(t))for(i=0;i<f.length;i++)l=u[++r],typeof(a=f[i])===c&&a.length>0?2==a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},str:function(t,e){for(var n in e)if(typeof e[n]===c&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(E.has(e[n][r],t))return"?"===n?o:n}else if(E.has(e[n],t))return"?"===n?o:n;return t}},_={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","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},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"}}}},A={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[p,d],[/opios[\/\s]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[p,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[p,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[p,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[p],[/;fbav\/([\w\.]+);/i],[d,[p,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[p,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[p,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[p,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,p],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[p,[d,T.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[p,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(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,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+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],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[b,/ower/,"",E.lowerize]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,E.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[l,[f,"Samsung"],[h,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[f,"Samsung"],[h,v]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[f,"Apple"],[h,v]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,"Apple"],[h,g]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[l,[f,"Huawei"],[h,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[f,"Huawei"],[h,v]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[f,"Xiaomi"],[h,v]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[f,"Xiaomi"],[h,g]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[f,"OPPO"],[h,v]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[f,"Vivo"],[h,v]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[f,"Realme"],[h,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[l,[f,"Motorola"],[h,v]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[h,g]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[f,"LG"],[h,g]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[l,[f,"LG"],[h,v]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[l,[f,"Lenovo"],[h,g]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[l,/_/g," "],[f,"Nokia"],[h,v]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[f,"Google"],[h,g]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[f,"Google"],[h,v]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[h,v]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[f,"Sony"],[h,g]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[f,"Amazon"],[h,g]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[f,"Amazon"],[h,v]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,f,[h,g]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[h,v]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[l,[f,"ASUS"],[h,g]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[f,"ASUS"],[h,v]],[/(nexus\s9)/i],[l,[f,"HTC"],[h,g]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[h,v]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[h,g]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[f,"Meizu"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[h,v]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,l,[h,g]],[/\s(surface\sduo)\s/i],[l,[f,"Microsoft"],[h,g]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[l,[f,"Fairphone"],[h,v]],[/\s(u304aa)\sbuild/i],[l,[f,"AT&T"],[h,v]],[/sie-(\w*)/i],[l,[f,"Siemens"],[h,v]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[f,"RCA"],[h,g]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[f,"Dell"],[h,g]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[f,"Verizon"],[h,g]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[f,"Barnes & Noble"],[h,g]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[f,"NuVision"],[h,g]],[/;\s(k88)\sbuild/i],[l,[f,"ZTE"],[h,g]],[/;\s(nx\d{3}j)\sbuild/i],[l,[f,"ZTE"],[h,v]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[f,"Swiss"],[h,v]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[f,"Swiss"],[h,g]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[f,"Zeki"],[h,g]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[h,g]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[h,g]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[f,"NextBook"],[h,g]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],l,[h,v]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],l,[h,v]],[/;\s(ph-1)\s/i],[l,[f,"Essential"],[h,v]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[f,"Envizen"],[h,g]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[f,"MachSpeed"],[h,g]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[f,"Rotor"],[h,g]],[/(shield[\w\s]+)\sbuild/i],[l,[f,"Nvidia"],[h,g]],[/(sprint)\s(\w+)/i],[f,l,[h,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[h,v]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,"Zebra"],[h,g]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,"Zebra"],[h,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,l,[h,y]],[/droid.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[h,y]],[/(playstation\s[345portablevi]+)/i],[l,[f,"Sony"],[h,y]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[f,"Microsoft"],[h,y]],[/smart-tv.+(samsung)/i],[f,[h,w]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[h,w]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[h,w]],[/(apple)\s?tv/i],[f,[l,"Apple TV"],[h,w]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[h,w]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[f,"Amazon"],[h,w]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[h,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,E.trim],[l,E.trim],[h,w]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,w]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[h,m]],[/droid.+;\s(glass)\s\d/i],[l,[f,"Google"],[h,m]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[f,"Zebra"],[h,m]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,v]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,E.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]],[/(phone)/i],[[h,v]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[p,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[p,[d,T.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[p,"Windows"],[d,T.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[p,d],[/(sunos)\s?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?: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],[p,d]]},I=function(t,e){if("object"==typeof t&&(e=t,t=o),!(this instanceof I))return new I(t,e).getResult();var n=t||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?E.extend(A,e):A;return this.getBrowser=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.browser),t.major=E.major(t.version),t},this.getCPU=function(){var t={architecture:o};return T.rgx.call(t,n,r.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return T.rgx.call(t,n,r.device),t},this.getEngine=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.engine),t},this.getOS=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n=typeof t===u&&t.length>255?E.trim(t,255):t,this},this.setUA(n),this};I.VERSION="0.7.28",I.BROWSER={NAME:p,MAJOR:"major",VERSION:d},I.CPU={ARCHITECTURE:b},I.DEVICE={MODEL:l,VENDOR:f,TYPE:h,CONSOLE:y,MOBILE:v,SMARTTV:w,TABLET:g,WEARABLE:m,EMBEDDED:S},I.ENGINE={NAME:p,VERSION:d},I.OS={NAME:p,VERSION:d},typeof e!==a?(t.exports&&(e=t.exports=I),e.UAParser=I):(r=function(){return I}.call(e,n,e,t))===o||(t.exports=r);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var O=new I;x.ua=O.getResult(),x.ua.get=function(){return O.getUA()},x.ua.set=function(t){O.setUA(t);var e=O.getResult();for(var n in e)x.ua[n]=e[n]}}}("object"==typeof window?window:this)}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};!function(){"use strict";n.d(r,{default:function(){return Qt}});var t=function(){function t(){}return t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION="0.0.4",t.SDK_VERSION_CODE=4,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_USER_ID="uid",t.STORAGE_SDK_TOKEN="st",t.STORAGE_DEVICE_UUID="uuid",t.STORAGE_SESSION_ID="sid",t.STORAGE_SESSION_NUMBER="sn",t.STORAGE_SESSION_START_TIME="sst",t.STORAGE_SESSION_START_EVENT_SENT="sses",t.STORAGE_FIRST_TIME_LAUNCH="ifl",t.STORAGE_LAST_ACTIVE="la",t.STORAGE_TRIGGER_START_TIME="tst",t.STORAGE_ACTIVE_TRIGGER_ID="atid",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_CONTAINER_NAME="cooee-wrapper",t}(),e=function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},i=function(){function n(){}return n.l=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.log.apply(console,e([t.LOG_PREFIX,":"],n))},n.e=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.error.apply(console,e([t.LOG_PREFIX,":"],n))},n.w=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.warn.apply(console,e([t.LOG_PREFIX,":"],n))},n}(),o=function(){function t(t){t.s&&(this.s=new u(t.s)),t.g&&(this.g=new h(t.g)),this.i=t.i}return Object.defineProperty(t.prototype,"solid",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glossy",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"img",{get:function(){return this.i},enumerable:!1,configurable:!0}),t}();const s=new RegExp("[^#a-f\\d]","gi"),a=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var c,u=function(){function t(t){this.a=100,this.h=t.h,this.a=t.a,this.g=t.g}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grad",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){if(!this.hex)return"";try{return function(t,e={}){if("string"!=typeof t||s.test(t)||!a.test(t))throw new TypeError("Expected a valid hex string");let n=1;8===(t=t.replace(/^#/,"")).length&&(n=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(n=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const r=Number.parseInt(t,16),i=r>>16,o=r>>8&255,c=255&r,u="number"==typeof e.alpha?e.alpha:n;return"array"===e.format?[i,o,c,u]:"css"===e.format?`rgb(${i} ${o} ${c}${1===u?"":` / ${Number((100*u).toFixed(2))}%`})`:{red:i,green:o,blue:c,alpha:u}}(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}},enumerable:!1,configurable:!0}),t.prototype.getAlpha=function(){var t;return(null!==(t=this.a)&&void 0!==t?t:100)/100},t}(),l=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){var t;return c[null!==(t=this.s)&&void 0!==t?t:c.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(c||(c={}));var p,h=function(){function t(t){this.r=t.r,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),t}(),f=(Object.defineProperty(function(){}.prototype,"rotate",{get:function(){return this.rot},enumerable:!1,configurable:!0}),function(){function t(t){this.t=t.t,t.bg&&(this.bg=new o(t.bg)),t.br&&(this.br=new l(t.br)),this.clc=t.clc,this.shd=t.shd,this.spc=t.spc,this.trf=t.trf,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y}return Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return p[this.t]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"click",{get:function(){return this.clc},enumerable:!1,configurable:!0}),t}());!function(t){t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.SHAPE=100]="SHAPE"}(p||(p={}));var d,b,y=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(t){function e(e){return t.call(this,e)||this}return y(e,t),e}(f),g=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(t){function e(e){var n=t.call(this,e)||this;return n.src=e.src,n}return g(e,t),e}(f),m=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(t){function e(e){var n=t.call(this,e)||this;return n.alg=d.START,n.prs=e.prs,n.alg=e.alg,e.f&&(n.f=e.f),e.c&&(n.c=new u(e.c)),n}return m(e,t),Object.defineProperty(e.prototype,"parts",{get:function(){return this.prs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.f},enumerable:!1,configurable:!0}),e}(f);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(d||(d={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(b||(b={}));var E=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(t){function e(e){return t.call(this,e)||this}return E(e,t),e}(f),_=function(t){var e=this;this.elems=[],this.cont=new T(t.cont),t.elems.forEach((function(t){t.t===p.IMAGE?e.elems.push(new w(t)):t.t===p.TEXT||t.t===p.BUTTON?e.elems.push(new S(t)):t.t===p.SHAPE&&e.elems.push(new v(t))}))},A=function(t){this.duration=0,this.id=t.id,this.duration=t.duration,this.version=t.version,this.engagementID=t.engagementID,this.internal=t.internal,this.pn=t.pn,this.ian=new _(t.ian)},I=function(){function t(){}return t.getString=function(e,n){return t.LOCAL_STORAGE.getItem(e)||n},t.setString=function(e,n){n||(n=""),t.LOCAL_STORAGE.setItem(e,n)},t.getNumber=function(e,n){return+t.getString(e,"")||n},t.setNumber=function(e,n){t.setString(e,n.toString())},t.getBoolean=function(t,e){var n=this.LOCAL_STORAGE.getItem(t);return n?JSON.parse(n):e},t.setBoolean=function(e,n){t.setString(e,JSON.stringify(n))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),x=function(){function t(){this.doc=document}return t.prototype.getWidth=function(){return document.documentElement.clientWidth},t.prototype.getHeight=function(){return document.documentElement.clientHeight},t.prototype.createElement=function(t){return this.doc.createElement(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.setStyle=function(t,e,n){e&&(n?t.style.setProperty(e,n):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},t.prototype.getElementById=function(t){return this.doc.getElementById(t)},t}(),O=n(238),k=n.n(O),N=n(489),C=n.n(N),D=function(){function e(){this.inInactive=!0,this.lastEnterActive=new Date,this.lastEnterInactive=null,this.isDebug=!1}return e.getInstance=function(){return this.INSTANCE},e.prototype.getWebAppVersion=function(){var t;return null!==(t=this.webAppVersion)&&void 0!==t?t:"0.0.1+1"},e.prototype.setWebAppVersion=function(t){this.webAppVersion=t},e.prototype.isDebugWebApp=function(){return this.isDebug},e.prototype.setDebugWebApp=function(t){this.isDebug=t},e.prototype.isInactive=function(){return this.inInactive},e.prototype.setInactive=function(){this.inInactive=!0,this.lastEnterInactive=new Date,I.setNumber(t.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime())},e.prototype.setActive=function(){this.inInactive=!1,this.lastEnterActive=new Date},e.prototype.isFirstActive=function(){return null==this.lastEnterInactive},e.prototype.getLastEnterInactive=function(){return this.lastEnterInactive},e.prototype.getTimeForActiveInSeconds=function(){var t,e;return((null===(t=this.lastEnterInactive)||void 0===t?void 0:t.getTime())-(null===(e=this.lastEnterActive)||void 0===e?void 0:e.getTime()))/1e3},e.prototype.getTimeForInactiveInSeconds=function(){return null==this.lastEnterInactive?0:((new Date).getTime()-this.lastEnterInactive.getTime())/1e3},e.INSTANCE=new e,e}(),P=function(){function e(){}return e.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new e),this.INSTANCE},e.prototype.getCurrentSessionID=function(){return this.currentSessionID||null},e.prototype.isNewSessionRequired=function(){if(!I.getString(t.STORAGE_SESSION_ID,""))return!0;var e=I.getNumber(t.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-e)/1e3>t.IDLE_TIME_IN_SECONDS},e.prototype.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},e.prototype.startNewSession=function(){this.currentSessionID||(I.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1),this.currentSessionStartTime=new Date,this.currentSessionID=(new(C())).toHexString(),I.setNumber(t.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),I.setString(t.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber())},e.prototype.bumpSessionNumber=function(){this.currentSessionNumber=I.getNumber(t.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,I.setNumber(t.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},e.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},e.prototype.getTotalDurationInSeconds=function(){if(D.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},e.prototype.conclude=function(){var t={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Ht.getInstance().concludeSession(t),this.destroySession()},e.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,I.remove(t.STORAGE_SESSION_ID),I.remove(t.STORAGE_SESSION_START_TIME)},e.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(I.getNumber(t.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=I.getString(t.STORAGE_SESSION_ID,""),this.currentSessionNumber=I.getNumber(t.STORAGE_SESSION_NUMBER,0)},e.prototype.getLastActive=function(){return I.getNumber(t.STORAGE_LAST_ACTIVE,0)},e}(),R=function(t,e){void 0===e&&(e={}),this.name=t,this.properties=e,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.occurred=(new Date).toISOString()},M=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},L=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},H=function(){function e(){this.runtimeData=D.getInstance(),this.apiToken="",this.userID=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.doHTTP=function(e,n,r,i){return M(this,void 0,void 0,(function(){var o;return L(this,(function(s){switch(s.label){case 0:return n.startsWith("http")||(n=t.API_URL+n),[4,fetch(n,{method:e,body:JSON.stringify(r),headers:i})];case 1:if(!(o=s.sent()).ok)throw o;return[2,o.json()]}}))}))},e.prototype.registerDevice=function(t){return M(this,void 0,void 0,(function(){return L(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",t,this.getDefaultHeaders())]}))}))},e.prototype.sendEvent=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/event/track",t,e).then((function(e){i.l("Sent",t.name),e.triggerData&&(new Yt).render(e.triggerData)})).catch((function(t){i.e("Error sending event",t)}))},e.prototype.updateUserData=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/user/update",t,e).then((function(){i.l("Updated user profile")})).catch((function(t){i.e("Error saving user profile",t)}))},e.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/session/conclude",t,e).then((function(t){i.l("Conclude Session",t)})).catch((function(t){i.e(t)}))},e.prototype.getDefaultHeaders=function(){var e=new Headers;return e.set("sdk-version",t.SDK_VERSION),e.set("sdk-version-code",t.SDK_VERSION_CODE.toString()),e.set("app-version",this.runtimeData.getWebAppVersion()),e.set("user-id",this.userID),t.SDK_DEBUG&&e.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&e.set("app-debug",String(1)),e},e.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},e.prototype.setUserId=function(t){this.userID=null!=t?t:""},e.INSTANCE=new e,e}(),G=function(e,n,r,i){this.appID=e,this.appSecret=n,this.uuid=r,this.props=i,this.sdk=t.SDK},B=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},j=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},U=function(){function t(){this.parser=new(k()),this.result={}}return t.prototype.get=function(){return B(this,void 0,void 0,(function(){var t;return j(this,(function(e){switch(e.label){case 0:return t=this.result,this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),[4,this.getBatteryInfo()];case 1:return e.sent(),[4,this.getLocation()];case 2:return e.sent(),t.locale=navigator.language,t.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},t.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},t.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},t.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},t.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},[2,t]}}))}))},t.prototype.getDeviceMemory=function(){var t=navigator;if(t.deviceMemory){var e=t.deviceMemory;this.result.mem={tot:1024*e}}},t.prototype.getNetworkType=function(){var t=navigator,e=t.connection||t.mozConnection||t.webkitConnection;(null==e?void 0:e.effectiveType)&&(this.result.net={type:e.effectiveType})},t.prototype.getOrientation=function(){var t,e=null===(t=screen.orientation)||void 0===t?void 0:t.type;e&&(this.result.orientation=e)},t.prototype.getDPI=function(){var t=document.createElement("div");t.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(t);var e=window.devicePixelRatio||1,n=t.offsetWidth*e;return document.body.removeChild(t),n},t.prototype.getLocation=function(){return B(this,void 0,void 0,(function(){var t=this;return j(this,(function(e){switch(e.label){case 0:return navigator.geolocation&&navigator.permissions?[4,navigator.permissions.query({name:"geolocation"})]:[2];case 1:return"granted"!=e.sent().state?[2]:[2,new Promise((function(e){navigator.geolocation.getCurrentPosition((function(n){t.result.coords=[n.coords.latitude,n.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return B(this,void 0,void 0,(function(){var t;return j(this,(function(e){switch(e.label){case 0:if(!("getBattery"in navigator))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.getBattery()];case 2:return t=e.sent(),this.result.bat={l:100*t.level,c:t.charging},[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},t}(),F=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},z=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},V=function(){function e(){this.apiService=H.getInstance(),this.sdkToken="",this.userID="",this.appID="",this.appSecret=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.init=function(t,e){return this.appID=t,this.appSecret=e,this.acquireSDKToken()},e.prototype.hasToken=function(){return!!I.getString(t.STORAGE_SDK_TOKEN,"")},e.prototype.getUserID=function(){return this.userID},e.prototype.populateUserDataFromStorage=function(){return F(this,void 0,void 0,(function(){return z(this,(function(e){return this.sdkToken=I.getString(t.STORAGE_SDK_TOKEN,""),this.sdkToken||i.l("No SDK token found in local storage"),this.userID=I.getString(t.STORAGE_USER_ID,""),this.userID||i.l("No user ID found in local storage"),this.updateAPIClient(),[2]}))}))},e.prototype.updateAPIClient=function(){i.l("SDK Token:",this.sdkToken),i.l("User ID:",this.userID),this.apiService.setAPIToken(this.sdkToken),this.apiService.setUserId(this.userID)},e.prototype.acquireSDKToken=function(){return F(this,void 0,void 0,(function(){return z(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(i.l("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},e.prototype.getSDKTokenFromServer=function(){return F(this,void 0,void 0,(function(){var t,e,n,r;return z(this,(function(o){switch(o.label){case 0:return[4,this.getUserAuthRequest()];case 1:t=o.sent(),e=this.apiService.registerDevice(t),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,e];case 3:return n=o.sent(),i.l("Register Device Response",n),this.saveUserDataInStorage(n),[3,5];case 4:throw r=o.sent(),i.e(r),r;case 5:return[2]}}))}))},e.prototype.saveUserDataInStorage=function(e){this.sdkToken=e.sdkToken,this.userID=e.id,this.updateAPIClient(),I.setString(t.STORAGE_SDK_TOKEN,this.sdkToken),I.setString(t.STORAGE_USER_ID,this.userID)},e.prototype.getUserAuthRequest=function(){return F(this,void 0,void 0,(function(){var t;return z(this,(function(e){switch(e.label){case 0:return[4,(new U).get()];case 1:return t=e.sent(),[2,new G(this.appID,this.appSecret,this.getOrCreateUUID(),t)]}}))}))},e.prototype.getOrCreateUUID=function(){var e=I.getString(t.STORAGE_DEVICE_UUID,"");return e||(e=(new(C())).toHexString(),I.setString(t.STORAGE_DEVICE_UUID,e)),e},e.INSTANCE=new e,e}(),W=function(t,e){return(W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}W(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function K(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function X(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}function J(t){return"function"==typeof t}function Z(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Object.create,Object.create;var Y=Z((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Q(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var tt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=K(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(J(c))try{c()}catch(t){i=t instanceof Y?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=K(u),p=l.next();!p.done;p=l.next()){var h=p.value;try{rt(h)}catch(t){i=null!=i?i:[],t instanceof Y?i=X(X([],$(i)),$(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new Y(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)rt(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Q(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&Q(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),et=tt.EMPTY;function nt(t){return t instanceof tt||t&&"closed"in t&&J(t.remove)&&J(t.add)&&J(t.unsubscribe)}function rt(t){J(t)?t():t.unsubscribe()}var it=null,ot=null,st=void 0,at=!1,ct=!1,ut={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ut.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,X([],$(t)))},clearTimeout:function(t){var e=ut.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function lt(t){ut.setTimeout((function(){if(!it)throw t;it(t)}))}function pt(){}var ht=ft("C",void 0,void 0);function ft(t,e,n){return{kind:t,value:e,error:n}}var dt=null;function bt(t){if(at){var e=!dt;if(e&&(dt={errorThrown:!1,error:null}),t(),e){var n=dt,r=n.errorThrown,i=n.error;if(dt=null,r)throw i}}else t()}function yt(t){at&&dt&&(dt.errorThrown=!0,dt.error=t)}var vt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,nt(e)&&e.add(n)):n.destination=Et,n}return q(e,t),e.create=function(t,e,n){return new gt(t,e,n)},e.prototype.next=function(t){this.isStopped?St(function(t){return ft("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?St(ft("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?St(ht,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(tt),gt=function(t){function e(e,n,r){var i,o=t.call(this)||this;if(J(e))i=e;else if(e){var s;i=e.next,n=e.error,r=e.complete,o&&ct?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return o.destination={next:i?wt(i):pt,error:wt(null!=n?n:mt),complete:r?wt(r):pt},o}return q(e,t),e}(vt);function wt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,X([],$(e)))}catch(t){at?yt(t):lt(t)}}}function mt(t){throw t}function St(t,e){var n=ot;n&&ut.setTimeout((function(){return n(t,e)}))}var Et={closed:!0,next:pt,error:mt,complete:pt},Tt="function"==typeof Symbol&&Symbol.observable||"@@observable";function _t(t){return t}function At(t){return 0===t.length?_t:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var It=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof vt||function(t){return t&&J(t.next)&&J(t.error)&&J(t.complete)}(r)&&nt(r)?t:new gt(t,e,n);return bt((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=xt(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==i||i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Tt]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return At(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=xt(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function xt(t){var e;return null!==(e=null!=t?t:st)&&void 0!==e?e:Promise}var Ot,kt=Z((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Nt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return q(e,t),e.prototype.lift=function(t){var e=new Ct(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new kt},e.prototype.next=function(t){var e=this;bt((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=K(i),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;bt((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;bt((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=e.hasError,r=e.isStopped,i=e.observers;return n||r?et:(i.push(t),new tt((function(){return Q(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new It;return t.source=this,t},e.create=function(t,e){return new Ct(t,e)},e}(It),Ct=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return q(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:et},e}(Nt),Dt={now:function(){return(Dt.delegate||Date).now()},delegate:void 0},Pt=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Dt);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return q(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}},e}(Nt),Rt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},Mt=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Lt=function(){function e(){this.sessionManager=P.getInstance(),this.safeHttpCallService=Ht.getInstance(),this.userAuthService=V.getInstance()}return e.prototype.init=function(t,n){var r=this;this.userAuthService.init(t,n).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){r.init(t,n)}),3e4)})),this.execute()},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),I.getBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1)||(I.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!0),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():this.sendSuccessiveLaunchEvent())},e.prototype.isAppFirstTimeLaunch=function(){return!!I.getBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!0)&&(I.setBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Rt(this,void 0,void 0,(function(){var t,e;return Mt(this,(function(n){switch(n.label){case 0:return t=new R("CE Web Installed",{}),e=t,[4,(new U).get()];case 1:return e.deviceProps=n.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Rt(this,void 0,void 0,(function(){var t,e;return Mt(this,(function(n){switch(n.label){case 0:return t=new R("CE Web Launched",{}),e=t,[4,(new U).get()];case 1:return e.deviceProps=n.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.replaySubject=new Pt(1),e}(),Ht=function(){function t(){this.sessionManager=P.getInstance(),this.httpApiService=H.getInstance()}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.sendEvent=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.addEventVariable(t),e.httpApiService.sendEvent(t)}))},t.prototype.updateProfile=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},t.prototype.concludeSession=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},t.prototype.addEventVariable=function(t){t.screenName=location.pathname,t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber()},t}();!function(t){t.Location="LOCATION",t.Push="PUSH",t.Camera="CAMERA"}(Ot||(Ot={}));var Gt=function(){function e(t){this.action=t,this.apiService=Ht.getInstance()}return e.prototype.execute=function(){this.externalAction(),this.iabAction(),this.upAction(),this.kvAction(),this.prompt(),this.closeAction(),this.shareAction()},e.prototype.externalAction=function(){var t;this.action.ext&&(null===(t=window.open(this.action.ext.u,"_blank"))||void 0===t||t.focus())},e.prototype.iabAction=function(){this.action.iab&&(new Xt).render(this.action.iab.u)},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(){this.action.kv&&document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:this.action.kv}))},e.prototype.prompt=function(){var t=this.action.prompt;t&&(t===Ot.Location&&this.promptLocationPermission(),t===Ot.Push&&this.promptPushNotificationPermission(),t===Ot.Camera&&this.promptCameraPermission())},e.prototype.closeAction=function(){if(this.action.close){(new $t).removeInApp();var e=I.getNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),n={triggerID:I.getString(t.STORAGE_ACTIVE_TRIGGER_ID,""),"Close Behaviour":"CTA",Duration:((new Date).getTime()-e)/1e3};this.apiService.sendEvent(new R("CE Trigger Closed",n)),I.remove(t.STORAGE_TRIGGER_START_TIME),I.remove(t.STORAGE_ACTIVE_TRIGGER_ID)}},e.prototype.shareAction=function(){this.action.share&&(navigator.share?navigator.share({text:this.action.share.text,title:"Share"}).then((function(t){return console.log(t)})).catch((function(t){return console.error(t)})):i.w("Navigator.share is not compatible with this browser"))},e.prototype.promptLocationPermission=function(){var t=this;navigator.geolocation&&navigator.permissions&&navigator.geolocation.getCurrentPosition((function(e){t.apiService.updateProfile({coords:[e.coords.latitude,e.coords.longitude]}),t.sendPermissionData()}))},e.prototype.promptPushNotificationPermission=function(){var t=this;"Notification"in window?"default"===Notification.permission?Notification.requestPermission().then((function(){t.sendPermissionData()})):this.apiService.updateProfile({pnPerm:Notification.permission}):i.w("This browser does not support desktop notification")},e.prototype.promptCameraPermission=function(){var t=this;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally((function(){t.sendPermissionData()}))},e.prototype.checkPermission=function(t){return navigator.permissions.query({name:t}).then((function(t){return t.state.toString()}))},e.prototype.checkAllPermission=function(){return t=this,e=void 0,r=function(){var t,e,n;return function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(r){switch(r.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=r.sent(),[4,this.checkPermission("geolocation")];case 2:return e=r.sent(),n=Notification.permission,[2,{camera:t,location:e,notification:n}]}}))},new((n=void 0)||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}));var t,e,n,r},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateProfile({perm:e})}))},e}(),Bt=function(){function e(e,n){var r,i;this.screenWidth=0,this.screenHeight=0,this.scalingFactor=(r=document.documentElement.clientWidth)<(i=document.documentElement.clientHeight)?r/Math.min(t.CANVAS_WIDTH,t.CANVAS_HEIGHT):i/Math.max(t.CANVAS_WIDTH,t.CANVAS_HEIGHT),this.parentHTMLEl=e,this.inappElement=n,this.renderer=new x,this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return e.prototype.getHTMLElement=function(){return this.inappHTMLEl},e.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},e.prototype.processCommonBlocks=function(){this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"overflow","visible"),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},e.prototype.processWidthAndHeight=function(){this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.getSizePx(this.inappElement.h))},e.prototype.getSizePx=function(t){return t*this.scalingFactor+"px"},e.prototype.processPositionBlock=function(){this.inappElement.x&&(this.renderer.setStyle(this.inappHTMLEl,"position","absolute"),this.inappElement.x&&this.renderer.setStyle(this.inappHTMLEl,"top",this.getSizePx(this.inappElement.y)),this.inappElement.y&&this.renderer.setStyle(this.inappHTMLEl,"left",this.getSizePx(this.inappElement.x)))},e.prototype.processBorderBlock=function(){var t,e=this.inappElement.br;e&&(e.radius&&e.radius>0&&this.renderer.setStyle(this.inappHTMLEl,"border-radius",this.getSizePx(e.radius)),e.width&&e.width>0&&(this.renderer.setStyle(this.inappHTMLEl,"border-width",this.getSizePx(e.width)),this.renderer.setStyle(this.inappHTMLEl,"border-style",null===(t=e.style)||void 0===t?void 0:t.toLowerCase()),e.color?this.processColourBlock(e.color,"border-color"):this.renderer.setStyle(this.inappHTMLEl,"border-color","black")))},e.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(t.p&&this.renderer.setStyle(this.inappHTMLEl,"padding",this.getSizePx(t.p)),t.pt&&this.renderer.setStyle(this.inappHTMLEl,"padding-top",this.getSizePx(t.pt)),t.pb&&this.renderer.setStyle(this.inappHTMLEl,"padding-bottom",this.getSizePx(t.pb)),t.pl&&this.renderer.setStyle(this.inappHTMLEl,"padding-left",this.getSizePx(t.pl)),t.pr&&this.renderer.setStyle(this.inappHTMLEl,"padding-right",this.getSizePx(t.pr)),this.renderer.setStyle(this.inappHTMLEl,"margin","0 !important"))},e.prototype.processTransformBlock=function(){var t=this.inappElement.trf;t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate("+t.rotate+"deg)")},e.prototype.registerAction=function(){var t=this.inappElement.clc;t&&this.inappHTMLEl.addEventListener("click",(function(){new Gt(t).execute()}))},e.prototype.processBackgroundBlock=function(){var t,e=this.inappElement.bg;if(e){var n=this.inappHTMLEl;this.inappElement instanceof T&&(n=n.parentElement);var r="";if((null===(t=(new(k())).getBrowser().name)||void 0===t?void 0:t.toLowerCase().includes("safari"))&&(r="-webkit-"),e.glossy)this.renderer.setStyle(n,r+"backdrop-filter","blur("+e.glossy.radius+"px)"),e.glossy.color&&this.processColourBlock(e.glossy.color,"background",n);else if(e.solid)e.solid.grad?this.processGradient(e.solid.grad,"background"):e.solid.hex&&this.renderer.setStyle(n,"background",e.solid.rgba);else if(e.img){if(!e.img.src)return;var i='url("'+e.img.src+'") no-repeat center';this.renderer.setStyle(n,"background",i),this.renderer.setStyle(n,"background-size","cover"),e.img.a&&this.renderer.setStyle(n,r+"backdrop-filter","opacity("+e.img.a+")")}}},e.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var n="linear-gradient("+t.ang+"deg, "+t.c1+", "+t.c2;t.c3&&(n+=", "+t.c3),t.c4&&(n+=", "+t.c4),t.c5&&(n+=", "+t.c5);var r=n+=")";this.renderer.setStyle(this.inappHTMLEl,e,r)}},e.prototype.processColourBlock=function(t,e,n){void 0===e&&(e="color"),void 0===n&&(n=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(n,e,t.rgba))},e}(),jt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(t){function e(e,n){return t.call(this,e,n)||this}return jt(e,t),e.prototype.processCommonBlocks=function(){t.prototype.processCommonBlocks.call(this),this.processFontBlock(),this.processColourBlock(this.inappElement.color),this.processAlignment()},e.prototype.processFontBlock=function(){var t=this.inappElement.font;t&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(t.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",t.ff),this.renderer.setStyle(this.inappHTMLEl,"line-height",t.lh))},e.prototype.processPart=function(t,e){var n,r=[];e.u&&r.push("underline"),e.st&&r.push("line-through"),r.length||r.push("normal"),this.renderer.setStyle(t,"font-weight",e.b?"bold":"normal"),this.renderer.setStyle(t,"font-style",e.i?"italic":"normal"),this.renderer.setStyle(t,"text-decoration",r.join(" ")),this.renderer.setStyle(t,"color",null!==(n=e.c)&&void 0!==n?n:"inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=d[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(Bt),Ft=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return Ft(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var n=e.renderer.createElement("span");n.innerHTML=t.txt,e.processPart(n,t),e.renderer.appendChild(e.inappHTMLEl,n)})),this.processCommonBlocks()},e}(Ut),Vt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return Vt(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(Bt),qt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("img"),r.insertElement(),r}return qt(e,t),e.prototype.render=function(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","100%"),this.renderer.setStyle(this.inappHTMLEl,"max-height","100%"),this.renderer.setStyle(this.inappHTMLEl,"display","block"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()},e}(Bt),$t=function(){function e(){this.renderer=new x}return e.prototype.render=function(){this.removeInApp();var e=this.renderer.createElement("div");return e.id=t.IN_APP_CONTAINER_NAME,e.classList.add(t.IN_APP_CONTAINER_NAME),this.renderer.setStyle(e,"z-index","10000000"),this.renderer.setStyle(e,"position","fixed"),this.renderer.setStyle(e,"top","0"),this.renderer.setStyle(e,"left","0"),this.renderer.setStyle(e,"width","100%"),this.renderer.setStyle(e,"height","100%"),this.renderer.setStyle(e,"display","flex"),this.renderer.setStyle(e,"justify-content","center"),this.renderer.setStyle(e,"align-items","center"),this.renderer.appendChild(document.body,e),e},e.prototype.removeInApp=function(){var e=document.getElementById(t.IN_APP_CONTAINER_NAME);e&&e.parentElement.removeChild(e)},e}(),Xt=function(){function e(){this.renderer=new x}return e.prototype.render=function(e){var n=this.renderer.getElementById(t.IN_APP_CONTAINER_NAME),r=this.createIFrameContainer();return this.createIFrameElement(r,e),this.createAnchorElement(n,r),this.renderer.appendChild(n,r),r},e.prototype.createIFrameContainer=function(){var t=this.renderer.createElement("div");return this.renderer.setAttribute(t,"class","iframe-container"),this.renderer.setAttribute(t,"id","iframe-container"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"top","0px"),this.renderer.setStyle(t,"left","0px"),t},e.prototype.createIFrameElement=function(t,e){var n=this.renderer.createElement("iframe");return this.renderer.setStyle(n,"width","100%"),this.renderer.setStyle(n,"height","100%"),this.renderer.setAttribute(n,"src",e),this.renderer.setAttribute(n,"frameBorder","0"),this.renderer.appendChild(t,n),n},e.prototype.createAnchorElement=function(t,e){var n=this.renderer.createElement("a");return this.renderer.setStyle(n,"position","absolute"),this.renderer.setStyle(n,"top","0px"),this.renderer.setStyle(n,"right","0px"),n.href="#",n.innerHTML="Close",n.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,n),n},e}(),Jt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappElement.w=1080,r.inappElement.h=1920,r}return Jt(e,t),e.prototype.render=function(){return t.prototype.render.call(this),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this},e}(Wt),Yt=function(){function e(){this.rootContainer=(new $t).render()}return e.prototype.render=function(e){e=new A(e),this.ian=e.ian;try{this.renderContainer(),I.setNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),I.setString(t.STORAGE_ACTIVE_TRIGGER_ID,e.id)}catch(t){i.e(t)}},e.prototype.renderElement=function(t,e){e instanceof S?new zt(t,e).render():e instanceof w?new Kt(t,e).render():e instanceof v?new Wt(t,e).render():i.e("Unsupported element type- "+e.type)},e.prototype.renderContainer=function(){var t,e,n=this,r=null===(t=this.ian)||void 0===t?void 0:t.cont;if(r){var i=new Zt(this.rootContainer,r).render().getHTMLElement();null===(e=this.ian.elems)||void 0===e||e.forEach((function(t){n.renderElement(i,t)}))}},e}(),Qt=Yt}(),CooeePreview=r.default}();
2
+ !function(){var t={489:function(t){for(var e=Math.floor(16777215*Math.random()),n=u.index=parseInt(16777215*Math.random(),10),r=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,i=function(t){return!(null==t||!t.constructor||"function"!=typeof t.constructor.isBuffer||!t.constructor.isBuffer(t))},o=[],s=0;s<256;s++)o[s]=(s<=15?"0":"")+s.toString(16);var a=new RegExp("^[0-9a-fA-F]{24}$"),c=[];for(s=0;s<10;)c[48+s]=s++;for(;s<16;)c[55+s]=c[87+s]=s++;function u(t){if(!(this instanceof u))return new u(t);if(t&&(t instanceof u||"ObjectID"===t._bsontype))return t;if(this._bsontype="ObjectID",null!=t&&"number"!=typeof t){var e=u.isValid(t);if(!e&&null!=t)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&"string"==typeof t&&24===t.length)return u.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&"function"==typeof t.toHexString)return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t}else this.id=this.generate(t)}t.exports=u,u.default=u,u.createFromTime=function(t){return new u((8,(8===(e=(e=t=parseInt(t,10)%4294967295).toString(16)).length?e:"00000000".substring(e.length,8)+e)+"0000000000000000"));var e},u.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",n=0;n<24;)e+=String.fromCharCode(c[t.charCodeAt(n++)]<<4|c[t.charCodeAt(n++)]);return new u(e)},u.isValid=function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&a.test(t):t instanceof u||!!i(t)||"function"==typeof t.toHexString&&(t.id instanceof _Buffer||"string"==typeof t.id)&&(12===t.id.length||24===t.id.length&&a.test(t.id))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=o[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof u?this.toString()===t.toString():"string"==typeof t&&u.isValid(t)&&12===t.length&&i(this.id)?t===this.id.toString("binary"):"string"==typeof t&&u.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&u.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof u||t.toHexString))&&t.toHexString()===this.toHexString()},getTimestamp:function(){var t,e=new Date;return t=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,e.setTime(1e3*Math.floor(t)),e},generate:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var i=n=(n+1)%16777215;return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,r>>8&255,255&r,i>>16&255,i>>8&255,255&i)}};var l=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[l]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},238:function(t,e,n){var r;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",p="name",h="type",f="vendor",d="version",b="architecture",y="console",v="mobile",g="tablet",w="smarttv",m="wearable",S="embedded",E={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return typeof t===u&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===a?t:t.substring(0,255)}},T={rgx:function(t,e){for(var n,r,i,a,u,l,p=0;p<e.length&&!u;){var h=e[p],f=e[p+1];for(n=r=0;n<h.length&&!u;)if(u=h[n++].exec(t))for(i=0;i<f.length;i++)l=u[++r],typeof(a=f[i])===c&&a.length>0?2==a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},str:function(t,e){for(var n in e)if(typeof e[n]===c&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(E.has(e[n][r],t))return"?"===n?o:n}else if(E.has(e[n],t))return"?"===n?o:n;return t}},_={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","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},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"}}}},A={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[p,d],[/opios[\/\s]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[p,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[p,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[p,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[p],[/;fbav\/([\w\.]+);/i],[d,[p,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[p,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[p,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[p,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,p],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[p,[d,T.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[p,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(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,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+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],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[b,/ower/,"",E.lowerize]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,E.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[l,[f,"Samsung"],[h,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[f,"Samsung"],[h,v]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[f,"Apple"],[h,v]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,"Apple"],[h,g]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[l,[f,"Huawei"],[h,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[f,"Huawei"],[h,v]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[f,"Xiaomi"],[h,v]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[f,"Xiaomi"],[h,g]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[f,"OPPO"],[h,v]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[f,"Vivo"],[h,v]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[f,"Realme"],[h,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[l,[f,"Motorola"],[h,v]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[h,g]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[f,"LG"],[h,g]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[l,[f,"LG"],[h,v]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[l,[f,"Lenovo"],[h,g]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[l,/_/g," "],[f,"Nokia"],[h,v]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[f,"Google"],[h,g]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[f,"Google"],[h,v]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[h,v]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[f,"Sony"],[h,g]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[f,"Amazon"],[h,g]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[f,"Amazon"],[h,v]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,f,[h,g]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[h,v]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[l,[f,"ASUS"],[h,g]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[f,"ASUS"],[h,v]],[/(nexus\s9)/i],[l,[f,"HTC"],[h,g]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[h,v]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[h,g]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[f,"Meizu"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[h,v]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,l,[h,g]],[/\s(surface\sduo)\s/i],[l,[f,"Microsoft"],[h,g]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[l,[f,"Fairphone"],[h,v]],[/\s(u304aa)\sbuild/i],[l,[f,"AT&T"],[h,v]],[/sie-(\w*)/i],[l,[f,"Siemens"],[h,v]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[f,"RCA"],[h,g]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[f,"Dell"],[h,g]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[f,"Verizon"],[h,g]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[f,"Barnes & Noble"],[h,g]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[f,"NuVision"],[h,g]],[/;\s(k88)\sbuild/i],[l,[f,"ZTE"],[h,g]],[/;\s(nx\d{3}j)\sbuild/i],[l,[f,"ZTE"],[h,v]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[f,"Swiss"],[h,v]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[f,"Swiss"],[h,g]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[f,"Zeki"],[h,g]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[h,g]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[h,g]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[f,"NextBook"],[h,g]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],l,[h,v]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],l,[h,v]],[/;\s(ph-1)\s/i],[l,[f,"Essential"],[h,v]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[f,"Envizen"],[h,g]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[f,"MachSpeed"],[h,g]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[f,"Rotor"],[h,g]],[/(shield[\w\s]+)\sbuild/i],[l,[f,"Nvidia"],[h,g]],[/(sprint)\s(\w+)/i],[f,l,[h,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[h,v]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,"Zebra"],[h,g]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,"Zebra"],[h,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,l,[h,y]],[/droid.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[h,y]],[/(playstation\s[345portablevi]+)/i],[l,[f,"Sony"],[h,y]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[f,"Microsoft"],[h,y]],[/smart-tv.+(samsung)/i],[f,[h,w]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[h,w]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[h,w]],[/(apple)\s?tv/i],[f,[l,"Apple TV"],[h,w]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[h,w]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[f,"Amazon"],[h,w]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[h,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,E.trim],[l,E.trim],[h,w]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,w]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[h,m]],[/droid.+;\s(glass)\s\d/i],[l,[f,"Google"],[h,m]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[f,"Zebra"],[h,m]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,v]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,E.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]],[/(phone)/i],[[h,v]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[p,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[p,[d,T.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[p,"Windows"],[d,T.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[p,d],[/(sunos)\s?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?: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],[p,d]]},I=function(t,e){if("object"==typeof t&&(e=t,t=o),!(this instanceof I))return new I(t,e).getResult();var n=t||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?E.extend(A,e):A;return this.getBrowser=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.browser),t.major=E.major(t.version),t},this.getCPU=function(){var t={architecture:o};return T.rgx.call(t,n,r.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return T.rgx.call(t,n,r.device),t},this.getEngine=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.engine),t},this.getOS=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n=typeof t===u&&t.length>255?E.trim(t,255):t,this},this.setUA(n),this};I.VERSION="0.7.28",I.BROWSER={NAME:p,MAJOR:"major",VERSION:d},I.CPU={ARCHITECTURE:b},I.DEVICE={MODEL:l,VENDOR:f,TYPE:h,CONSOLE:y,MOBILE:v,SMARTTV:w,TABLET:g,WEARABLE:m,EMBEDDED:S},I.ENGINE={NAME:p,VERSION:d},I.OS={NAME:p,VERSION:d},typeof e!==a?(t.exports&&(e=t.exports=I),e.UAParser=I):(r=function(){return I}.call(e,n,e,t))===o||(t.exports=r);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var O=new I;x.ua=O.getResult(),x.ua.get=function(){return O.getUA()},x.ua.set=function(t){O.setUA(t);var e=O.getResult();for(var n in e)x.ua[n]=e[n]}}}("object"==typeof window?window:this)},306:function(t){"use strict";t.exports={i8:"0.0.6"}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};!function(){"use strict";n.d(r,{default:function(){return Qt}});var t=function(){function t(){}var e;return t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION=n(306).i8,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_USER_ID="uid",t.STORAGE_SDK_TOKEN="st",t.STORAGE_DEVICE_UUID="uuid",t.STORAGE_SESSION_ID="sid",t.STORAGE_SESSION_NUMBER="sn",t.STORAGE_SESSION_START_TIME="sst",t.STORAGE_SESSION_START_EVENT_SENT="sses",t.STORAGE_FIRST_TIME_LAUNCH="ifl",t.STORAGE_LAST_ACTIVE="la",t.STORAGE_TRIGGER_START_TIME="tst",t.STORAGE_ACTIVE_TRIGGER_ID="atid",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_CONTAINER_NAME="cooee-wrapper",e=t.SDK_VERSION.split(".").map((function(t){return t.padStart(2,"0")})).join(""),t.SDK_VERSION_CODE=parseInt(e,10),t}(),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},i=function(){function n(){}return n.l=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.log.apply(console,e([t.LOG_PREFIX,":"],n,!1))},n.e=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.error.apply(console,e([t.LOG_PREFIX,":"],n,!1))},n.w=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.warn.apply(console,e([t.LOG_PREFIX,":"],n,!1))},n}(),o=function(){function t(t){t.s&&(this.s=new u(t.s)),t.g&&(this.g=new h(t.g)),this.i=t.i}return Object.defineProperty(t.prototype,"solid",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glossy",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"img",{get:function(){return this.i},enumerable:!1,configurable:!0}),t}();const s=new RegExp("[^#a-f\\d]","gi"),a=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var c,u=function(){function t(t){this.a=100,this.h=t.h,this.a=t.a,this.g=t.g}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grad",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){if(!this.hex)return"";try{return function(t,e={}){if("string"!=typeof t||s.test(t)||!a.test(t))throw new TypeError("Expected a valid hex string");let n=1;8===(t=t.replace(/^#/,"")).length&&(n=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(n=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const r=Number.parseInt(t,16),i=r>>16,o=r>>8&255,c=255&r,u="number"==typeof e.alpha?e.alpha:n;return"array"===e.format?[i,o,c,u]:"css"===e.format?`rgb(${i} ${o} ${c}${1===u?"":` / ${Number((100*u).toFixed(2))}%`})`:{red:i,green:o,blue:c,alpha:u}}(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}},enumerable:!1,configurable:!0}),t.prototype.getAlpha=function(){var t;return(null!==(t=this.a)&&void 0!==t?t:100)/100},t}(),l=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){var t;return c[null!==(t=this.s)&&void 0!==t?t:c.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(c||(c={}));var p,h=function(){function t(t){this.r=t.r,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),t}(),f=(Object.defineProperty(function(){}.prototype,"rotate",{get:function(){return this.rot},enumerable:!1,configurable:!0}),function(){function t(t){this.t=t.t,t.bg&&(this.bg=new o(t.bg)),t.br&&(this.br=new l(t.br)),this.clc=t.clc,this.shd=t.shd,this.spc=t.spc,this.trf=t.trf,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y}return Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return p[this.t]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"click",{get:function(){return this.clc},enumerable:!1,configurable:!0}),t}());!function(t){t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.SHAPE=100]="SHAPE"}(p||(p={}));var d,b,y=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(t){function e(e){return t.call(this,e)||this}return y(e,t),e}(f),g=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(t){function e(e){var n=t.call(this,e)||this;return n.src=e.src,n}return g(e,t),e}(f),m=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(t){function e(e){var n=t.call(this,e)||this;return n.alg=d.START,n.prs=e.prs,n.alg=e.alg,e.f&&(n.f=e.f),e.c&&(n.c=new u(e.c)),n}return m(e,t),Object.defineProperty(e.prototype,"parts",{get:function(){return this.prs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.f},enumerable:!1,configurable:!0}),e}(f);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(d||(d={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(b||(b={}));var E=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(t){function e(e){return t.call(this,e)||this}return E(e,t),e}(f),_=function(t){var e=this;this.elems=[],this.cont=new T(t.cont),t.elems.forEach((function(t){t.t===p.IMAGE?e.elems.push(new w(t)):t.t===p.TEXT||t.t===p.BUTTON?e.elems.push(new S(t)):t.t===p.SHAPE&&e.elems.push(new v(t))}))},A=function(t){this.duration=0,this.id=t.id,this.duration=t.duration,this.version=t.version,this.engagementID=t.engagementID,this.internal=t.internal,this.pn=t.pn,this.ian=new _(t.ian)},I=function(){function t(){}return t.getString=function(e,n){return t.LOCAL_STORAGE.getItem(e)||n},t.setString=function(e,n){n||(n=""),t.LOCAL_STORAGE.setItem(e,n)},t.getNumber=function(e,n){return+t.getString(e,"")||n},t.setNumber=function(e,n){t.setString(e,n.toString())},t.getBoolean=function(t,e){var n=this.LOCAL_STORAGE.getItem(t);return n?JSON.parse(n):e},t.setBoolean=function(e,n){t.setString(e,JSON.stringify(n))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),x=function(){function t(){this.doc=document}return t.prototype.getWidth=function(){return document.documentElement.clientWidth},t.prototype.getHeight=function(){return document.documentElement.clientHeight},t.prototype.createElement=function(t){return this.doc.createElement(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.setStyle=function(t,e,n){e&&(n?t.style.setProperty(e,n):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},t.prototype.getElementById=function(t){return this.doc.getElementById(t)},t}(),O=n(238),k=n.n(O),N=n(489),C=n.n(N),D=function(){function e(){this.inInactive=!0,this.lastEnterActive=new Date,this.lastEnterInactive=null,this.isDebug=!1}return e.getInstance=function(){return this.INSTANCE},e.prototype.getWebAppVersion=function(){var t;return null!==(t=this.webAppVersion)&&void 0!==t?t:"0.0.1+1"},e.prototype.setWebAppVersion=function(t){this.webAppVersion=t},e.prototype.isDebugWebApp=function(){return this.isDebug},e.prototype.setDebugWebApp=function(t){this.isDebug=t},e.prototype.isInactive=function(){return this.inInactive},e.prototype.setInactive=function(){this.inInactive=!0,this.lastEnterInactive=new Date,I.setNumber(t.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime())},e.prototype.setActive=function(){this.inInactive=!1,this.lastEnterActive=new Date},e.prototype.isFirstActive=function(){return null==this.lastEnterInactive},e.prototype.getLastEnterInactive=function(){return this.lastEnterInactive},e.prototype.getTimeForActiveInSeconds=function(){var t,e;return((null===(t=this.lastEnterInactive)||void 0===t?void 0:t.getTime())-(null===(e=this.lastEnterActive)||void 0===e?void 0:e.getTime()))/1e3},e.prototype.getTimeForInactiveInSeconds=function(){return null==this.lastEnterInactive?0:((new Date).getTime()-this.lastEnterInactive.getTime())/1e3},e.INSTANCE=new e,e}(),P=function(){function e(){}return e.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new e),this.INSTANCE},e.prototype.getCurrentSessionID=function(){return this.currentSessionID||null},e.prototype.isNewSessionRequired=function(){if(!I.getString(t.STORAGE_SESSION_ID,""))return!0;var e=I.getNumber(t.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-e)/1e3>t.IDLE_TIME_IN_SECONDS},e.prototype.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},e.prototype.startNewSession=function(){this.currentSessionID||(I.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1),this.currentSessionStartTime=new Date,this.currentSessionID=(new(C())).toHexString(),I.setNumber(t.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),I.setString(t.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber())},e.prototype.bumpSessionNumber=function(){this.currentSessionNumber=I.getNumber(t.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,I.setNumber(t.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},e.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},e.prototype.getTotalDurationInSeconds=function(){if(D.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},e.prototype.conclude=function(){var t={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Ht.getInstance().concludeSession(t),this.destroySession()},e.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,I.remove(t.STORAGE_SESSION_ID),I.remove(t.STORAGE_SESSION_START_TIME)},e.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(I.getNumber(t.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=I.getString(t.STORAGE_SESSION_ID,""),this.currentSessionNumber=I.getNumber(t.STORAGE_SESSION_NUMBER,0)},e.prototype.getLastActive=function(){return I.getNumber(t.STORAGE_LAST_ACTIVE,0)},e}(),R=function(t,e){void 0===e&&(e={}),this.name=t,this.properties=e,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.occurred=(new Date).toISOString()},M=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},L=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},H=function(){function e(){this.runtimeData=D.getInstance(),this.apiToken="",this.userID=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.doHTTP=function(e,n,r,i){return M(this,void 0,void 0,(function(){var o;return L(this,(function(s){switch(s.label){case 0:return n.startsWith("http")||(n=t.API_URL+n),[4,fetch(n,{method:e,body:JSON.stringify(r),headers:i})];case 1:if(!(o=s.sent()).ok)throw o;return[2,o.json()]}}))}))},e.prototype.registerDevice=function(t){return M(this,void 0,void 0,(function(){return L(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",t,this.getDefaultHeaders())]}))}))},e.prototype.sendEvent=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/event/track",t,e).then((function(e){i.l("Sent",t.name),e.triggerData&&(new Yt).render(e.triggerData)})).catch((function(t){i.e("Error sending event",t)}))},e.prototype.updateUserData=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/user/update",t,e).then((function(){i.l("Updated user profile")})).catch((function(t){i.e("Error saving user profile",t)}))},e.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/session/conclude",t,e).then((function(t){i.l("Conclude Session",t)})).catch((function(t){i.e(t)}))},e.prototype.getDefaultHeaders=function(){var e=new Headers;return e.set("sdk-version",t.SDK_VERSION),e.set("sdk-version-code",t.SDK_VERSION_CODE.toString()),e.set("app-version",this.runtimeData.getWebAppVersion()),e.set("user-id",this.userID),t.SDK_DEBUG&&e.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&e.set("app-debug",String(1)),e},e.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},e.prototype.setUserId=function(t){this.userID=null!=t?t:""},e.INSTANCE=new e,e}(),G=function(e,n,r,i){this.appID=e,this.appSecret=n,this.uuid=r,this.props=i,this.sdk=t.SDK},j=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},B=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},U=function(){function t(){this.parser=new(k()),this.result={}}return t.prototype.get=function(){return j(this,void 0,void 0,(function(){var t;return B(this,(function(e){switch(e.label){case 0:return t=this.result,this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),[4,this.getBatteryInfo()];case 1:return e.sent(),[4,this.getLocation()];case 2:return e.sent(),t.locale=navigator.language,t.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},t.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},t.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},t.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},t.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},[2,t]}}))}))},t.prototype.getDeviceMemory=function(){var t=navigator;if(t.deviceMemory){var e=t.deviceMemory;this.result.mem={tot:1024*e}}},t.prototype.getNetworkType=function(){var t=navigator,e=t.connection||t.mozConnection||t.webkitConnection;(null==e?void 0:e.effectiveType)&&(this.result.net={type:e.effectiveType})},t.prototype.getOrientation=function(){var t,e=null===(t=screen.orientation)||void 0===t?void 0:t.type;e&&(this.result.orientation=e)},t.prototype.getDPI=function(){var t=document.createElement("div");t.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(t);var e=window.devicePixelRatio||1,n=t.offsetWidth*e;return document.body.removeChild(t),n},t.prototype.getLocation=function(){return j(this,void 0,void 0,(function(){var t=this;return B(this,(function(e){switch(e.label){case 0:return navigator.geolocation&&navigator.permissions?[4,navigator.permissions.query({name:"geolocation"})]:[2];case 1:return"granted"!=e.sent().state?[2]:[2,new Promise((function(e){navigator.geolocation.getCurrentPosition((function(n){t.result.coords=[n.coords.latitude,n.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return j(this,void 0,void 0,(function(){var t;return B(this,(function(e){switch(e.label){case 0:if(!("getBattery"in navigator))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.getBattery()];case 2:return t=e.sent(),this.result.bat={l:100*t.level,c:t.charging},[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},t}(),F=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},z=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},V=function(){function e(){this.apiService=H.getInstance(),this.sdkToken="",this.userID="",this.appID="",this.appSecret=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.init=function(t,e){return this.appID=t,this.appSecret=e,this.acquireSDKToken()},e.prototype.hasToken=function(){return!!I.getString(t.STORAGE_SDK_TOKEN,"")},e.prototype.getUserID=function(){return this.userID},e.prototype.populateUserDataFromStorage=function(){return F(this,void 0,void 0,(function(){return z(this,(function(e){return this.sdkToken=I.getString(t.STORAGE_SDK_TOKEN,""),this.sdkToken||i.l("No SDK token found in local storage"),this.userID=I.getString(t.STORAGE_USER_ID,""),this.userID||i.l("No user ID found in local storage"),this.updateAPIClient(),[2]}))}))},e.prototype.updateAPIClient=function(){i.l("SDK Token:",this.sdkToken),i.l("User ID:",this.userID),this.apiService.setAPIToken(this.sdkToken),this.apiService.setUserId(this.userID)},e.prototype.acquireSDKToken=function(){return F(this,void 0,void 0,(function(){return z(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(i.l("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},e.prototype.getSDKTokenFromServer=function(){return F(this,void 0,void 0,(function(){var t,e,n,r;return z(this,(function(o){switch(o.label){case 0:return[4,this.getUserAuthRequest()];case 1:t=o.sent(),e=this.apiService.registerDevice(t),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,e];case 3:return n=o.sent(),i.l("Register Device Response",n),this.saveUserDataInStorage(n),[3,5];case 4:throw r=o.sent(),i.e(r),r;case 5:return[2]}}))}))},e.prototype.saveUserDataInStorage=function(e){this.sdkToken=e.sdkToken,this.userID=e.id,this.updateAPIClient(),I.setString(t.STORAGE_SDK_TOKEN,this.sdkToken),I.setString(t.STORAGE_USER_ID,this.userID)},e.prototype.getUserAuthRequest=function(){return F(this,void 0,void 0,(function(){var t;return z(this,(function(e){switch(e.label){case 0:return[4,(new U).get()];case 1:return t=e.sent(),[2,new G(this.appID,this.appSecret,this.getOrCreateUUID(),t)]}}))}))},e.prototype.getOrCreateUUID=function(){var e=I.getString(t.STORAGE_DEVICE_UUID,"");return e||(e=(new(C())).toHexString(),I.setString(t.STORAGE_DEVICE_UUID,e)),e},e.INSTANCE=new e,e}(),W=function(t,e){return(W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}W(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function K(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function X(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}function J(t){return"function"==typeof t}function Z(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Object.create,Object.create;var Y=Z((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Q(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var tt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=K(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(J(c))try{c()}catch(t){i=t instanceof Y?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=K(u),p=l.next();!p.done;p=l.next()){var h=p.value;try{rt(h)}catch(t){i=null!=i?i:[],t instanceof Y?i=X(X([],$(i)),$(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new Y(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)rt(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Q(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&Q(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),et=tt.EMPTY;function nt(t){return t instanceof tt||t&&"closed"in t&&J(t.remove)&&J(t.add)&&J(t.unsubscribe)}function rt(t){J(t)?t():t.unsubscribe()}var it=null,ot=null,st=void 0,at=!1,ct=!1,ut={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ut.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,X([],$(t)))},clearTimeout:function(t){var e=ut.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function lt(t){ut.setTimeout((function(){if(!it)throw t;it(t)}))}function pt(){}var ht=ft("C",void 0,void 0);function ft(t,e,n){return{kind:t,value:e,error:n}}var dt=null;function bt(t){if(at){var e=!dt;if(e&&(dt={errorThrown:!1,error:null}),t(),e){var n=dt,r=n.errorThrown,i=n.error;if(dt=null,r)throw i}}else t()}function yt(t){at&&dt&&(dt.errorThrown=!0,dt.error=t)}var vt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,nt(e)&&e.add(n)):n.destination=Et,n}return q(e,t),e.create=function(t,e,n){return new gt(t,e,n)},e.prototype.next=function(t){this.isStopped?St(function(t){return ft("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?St(ft("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?St(ht,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(tt),gt=function(t){function e(e,n,r){var i,o=t.call(this)||this;if(J(e))i=e;else if(e){var s;i=e.next,n=e.error,r=e.complete,o&&ct?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return o.destination={next:i?wt(i):pt,error:wt(null!=n?n:mt),complete:r?wt(r):pt},o}return q(e,t),e}(vt);function wt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,X([],$(e)))}catch(t){at?yt(t):lt(t)}}}function mt(t){throw t}function St(t,e){var n=ot;n&&ut.setTimeout((function(){return n(t,e)}))}var Et={closed:!0,next:pt,error:mt,complete:pt},Tt="function"==typeof Symbol&&Symbol.observable||"@@observable";function _t(t){return t}function At(t){return 0===t.length?_t:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var It=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof vt||function(t){return t&&J(t.next)&&J(t.error)&&J(t.complete)}(r)&&nt(r)?t:new gt(t,e,n);return bt((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=xt(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==i||i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Tt]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return At(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=xt(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function xt(t){var e;return null!==(e=null!=t?t:st)&&void 0!==e?e:Promise}var Ot,kt=Z((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Nt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return q(e,t),e.prototype.lift=function(t){var e=new Ct(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new kt},e.prototype.next=function(t){var e=this;bt((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=K(i),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;bt((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;bt((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=e.hasError,r=e.isStopped,i=e.observers;return n||r?et:(i.push(t),new tt((function(){return Q(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new It;return t.source=this,t},e.create=function(t,e){return new Ct(t,e)},e}(It),Ct=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return q(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:et},e}(Nt),Dt={now:function(){return(Dt.delegate||Date).now()},delegate:void 0},Pt=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Dt);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return q(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}},e}(Nt),Rt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},Mt=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Lt=function(){function e(){this.sessionManager=P.getInstance(),this.safeHttpCallService=Ht.getInstance(),this.userAuthService=V.getInstance()}return e.prototype.init=function(t,n){var r=this;this.userAuthService.init(t,n).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){r.init(t,n)}),3e4)})),this.execute()},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),I.getBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1)||(I.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!0),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():this.sendSuccessiveLaunchEvent())},e.prototype.isAppFirstTimeLaunch=function(){return!!I.getBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!0)&&(I.setBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Rt(this,void 0,void 0,(function(){var t,e;return Mt(this,(function(n){switch(n.label){case 0:return t=new R("CE Web Installed",{}),e=t,[4,(new U).get()];case 1:return e.deviceProps=n.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Rt(this,void 0,void 0,(function(){var t,e;return Mt(this,(function(n){switch(n.label){case 0:return t=new R("CE Web Launched",{}),e=t,[4,(new U).get()];case 1:return e.deviceProps=n.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.replaySubject=new Pt(1),e}(),Ht=function(){function t(){this.sessionManager=P.getInstance(),this.httpApiService=H.getInstance()}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.sendEvent=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.addEventVariable(t),e.httpApiService.sendEvent(t)}))},t.prototype.updateProfile=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},t.prototype.concludeSession=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},t.prototype.addEventVariable=function(t){t.screenName=location.pathname,t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber()},t}();!function(t){t.Location="LOCATION",t.Push="PUSH",t.Camera="CAMERA"}(Ot||(Ot={}));var Gt=function(){function e(t){this.action=t,this.apiService=Ht.getInstance()}return e.prototype.execute=function(){this.externalAction(),this.iabAction(),this.upAction(),this.kvAction(),this.prompt(),this.closeAction(),this.shareAction()},e.prototype.externalAction=function(){var t;this.action.ext&&(null===(t=window.open(this.action.ext.u,"_blank"))||void 0===t||t.focus())},e.prototype.iabAction=function(){this.action.iab&&(new Xt).render(this.action.iab.u)},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(){this.action.kv&&document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:this.action.kv}))},e.prototype.prompt=function(){var t=this.action.prompt;t&&(t===Ot.Location&&this.promptLocationPermission(),t===Ot.Push&&this.promptPushNotificationPermission(),t===Ot.Camera&&this.promptCameraPermission())},e.prototype.closeAction=function(){if(this.action.close){(new $t).removeInApp();var e=I.getNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),n={triggerID:I.getString(t.STORAGE_ACTIVE_TRIGGER_ID,""),"Close Behaviour":"CTA",Duration:((new Date).getTime()-e)/1e3};this.apiService.sendEvent(new R("CE Trigger Closed",n)),I.remove(t.STORAGE_TRIGGER_START_TIME),I.remove(t.STORAGE_ACTIVE_TRIGGER_ID)}},e.prototype.shareAction=function(){this.action.share&&(navigator.share?navigator.share({text:this.action.share.text,title:"Share"}).then((function(t){return console.log(t)})).catch((function(t){return console.error(t)})):i.w("Navigator.share is not compatible with this browser"))},e.prototype.promptLocationPermission=function(){var t=this;navigator.geolocation&&navigator.permissions&&navigator.geolocation.getCurrentPosition((function(e){t.apiService.updateProfile({coords:[e.coords.latitude,e.coords.longitude]}),t.sendPermissionData()}))},e.prototype.promptPushNotificationPermission=function(){var t=this;"Notification"in window?"default"===Notification.permission?Notification.requestPermission().then((function(){t.sendPermissionData()})):this.apiService.updateProfile({pnPerm:Notification.permission}):i.w("This browser does not support desktop notification")},e.prototype.promptCameraPermission=function(){var t=this;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally((function(){t.sendPermissionData()}))},e.prototype.checkPermission=function(t){return navigator.permissions.query({name:t}).then((function(t){return t.state.toString()}))},e.prototype.checkAllPermission=function(){return t=this,e=void 0,r=function(){var t,e,n;return function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(r){switch(r.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=r.sent(),[4,this.checkPermission("geolocation")];case 2:return e=r.sent(),n=Notification.permission,[2,{camera:t,location:e,notification:n}]}}))},new((n=void 0)||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}));var t,e,n,r},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateProfile({perm:e})}))},e}(),jt=function(){function e(e,n){var r,i;this.screenWidth=0,this.screenHeight=0,this.scalingFactor=(r=document.documentElement.clientWidth)<(i=document.documentElement.clientHeight)?r/Math.min(t.CANVAS_WIDTH,t.CANVAS_HEIGHT):i/Math.max(t.CANVAS_WIDTH,t.CANVAS_HEIGHT),this.parentHTMLEl=e,this.inappElement=n,this.renderer=new x,this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return e.prototype.getHTMLElement=function(){return this.inappHTMLEl},e.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},e.prototype.processCommonBlocks=function(){this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"overflow","visible"),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},e.prototype.processWidthAndHeight=function(){this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.getSizePx(this.inappElement.h))},e.prototype.getSizePx=function(t){return t*this.scalingFactor+"px"},e.prototype.processPositionBlock=function(){this.inappElement.x&&(this.renderer.setStyle(this.inappHTMLEl,"position","absolute"),this.inappElement.x&&this.renderer.setStyle(this.inappHTMLEl,"top",this.getSizePx(this.inappElement.y)),this.inappElement.y&&this.renderer.setStyle(this.inappHTMLEl,"left",this.getSizePx(this.inappElement.x)))},e.prototype.processBorderBlock=function(){var t,e=this.inappElement.br;e&&(e.radius&&e.radius>0&&this.renderer.setStyle(this.inappHTMLEl,"border-radius",this.getSizePx(e.radius)),e.width&&e.width>0&&(this.renderer.setStyle(this.inappHTMLEl,"border-width",this.getSizePx(e.width)),this.renderer.setStyle(this.inappHTMLEl,"border-style",null===(t=e.style)||void 0===t?void 0:t.toLowerCase()),e.color?this.processColourBlock(e.color,"border-color"):this.renderer.setStyle(this.inappHTMLEl,"border-color","black")))},e.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(t.p&&this.renderer.setStyle(this.inappHTMLEl,"padding",this.getSizePx(t.p)),t.pt&&this.renderer.setStyle(this.inappHTMLEl,"padding-top",this.getSizePx(t.pt)),t.pb&&this.renderer.setStyle(this.inappHTMLEl,"padding-bottom",this.getSizePx(t.pb)),t.pl&&this.renderer.setStyle(this.inappHTMLEl,"padding-left",this.getSizePx(t.pl)),t.pr&&this.renderer.setStyle(this.inappHTMLEl,"padding-right",this.getSizePx(t.pr)),this.renderer.setStyle(this.inappHTMLEl,"margin","0 !important"))},e.prototype.processTransformBlock=function(){var t=this.inappElement.trf;t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate("+t.rotate+"deg)")},e.prototype.registerAction=function(){var t=this.inappElement.clc;t&&this.inappHTMLEl.addEventListener("click",(function(){new Gt(t).execute()}))},e.prototype.processBackgroundBlock=function(){var t,e=this.inappElement.bg;if(e){var n=this.inappHTMLEl;this.inappElement instanceof T&&(n=n.parentElement);var r="";if((null===(t=(new(k())).getBrowser().name)||void 0===t?void 0:t.toLowerCase().includes("safari"))&&(r="-webkit-"),e.glossy)this.renderer.setStyle(n,r+"backdrop-filter","blur("+e.glossy.radius+"px)"),e.glossy.color&&this.processColourBlock(e.glossy.color,"background",n);else if(e.solid)e.solid.grad?this.processGradient(e.solid.grad,"background"):e.solid.hex&&this.renderer.setStyle(n,"background",e.solid.rgba);else if(e.img){if(!e.img.src)return;var i='url("'+e.img.src+'") no-repeat center';this.renderer.setStyle(n,"background",i),this.renderer.setStyle(n,"background-size","cover"),e.img.a&&this.renderer.setStyle(n,r+"backdrop-filter","opacity("+e.img.a+")")}}},e.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var n="linear-gradient("+t.ang+"deg, "+t.c1+", "+t.c2;t.c3&&(n+=", "+t.c3),t.c4&&(n+=", "+t.c4),t.c5&&(n+=", "+t.c5);var r=n+=")";this.renderer.setStyle(this.inappHTMLEl,e,r)}},e.prototype.processColourBlock=function(t,e,n){void 0===e&&(e="color"),void 0===n&&(n=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(n,e,t.rgba))},e}(),Bt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(t){function e(e,n){return t.call(this,e,n)||this}return Bt(e,t),e.prototype.processCommonBlocks=function(){t.prototype.processCommonBlocks.call(this),this.processFontBlock(),this.processColourBlock(this.inappElement.color),this.processAlignment()},e.prototype.processFontBlock=function(){var t=this.inappElement.font;t&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(t.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",t.ff),this.renderer.setStyle(this.inappHTMLEl,"line-height",t.lh))},e.prototype.processPart=function(t,e){var n,r=[];e.u&&r.push("underline"),e.st&&r.push("line-through"),r.length||r.push("normal"),this.renderer.setStyle(t,"font-weight",e.b?"bold":"normal"),this.renderer.setStyle(t,"font-style",e.i?"italic":"normal"),this.renderer.setStyle(t,"text-decoration",r.join(" ")),this.renderer.setStyle(t,"color",null!==(n=e.c)&&void 0!==n?n:"inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=d[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(jt),Ft=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return Ft(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var n,r,i=e.renderer.createElement("span");i.innerHTML=null===(r=null===(n=t.txt)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.replace(/\n/g,"<br />"),e.processPart(i,t),e.renderer.appendChild(e.inappHTMLEl,i)})),this.processCommonBlocks()},e}(Ut),Vt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return Vt(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(jt),qt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("img"),r.insertElement(),r}return qt(e,t),e.prototype.render=function(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","100%"),this.renderer.setStyle(this.inappHTMLEl,"max-height","100%"),this.renderer.setStyle(this.inappHTMLEl,"display","block"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()},e}(jt),$t=function(){function e(){this.renderer=new x}return e.prototype.render=function(){this.removeInApp();var e=this.renderer.createElement("div");return e.id=t.IN_APP_CONTAINER_NAME,e.classList.add(t.IN_APP_CONTAINER_NAME),this.renderer.setStyle(e,"z-index","10000000"),this.renderer.setStyle(e,"position","fixed"),this.renderer.setStyle(e,"top","0"),this.renderer.setStyle(e,"left","0"),this.renderer.setStyle(e,"width","100%"),this.renderer.setStyle(e,"height","100%"),this.renderer.setStyle(e,"display","flex"),this.renderer.setStyle(e,"justify-content","center"),this.renderer.setStyle(e,"align-items","center"),this.renderer.appendChild(document.body,e),e},e.prototype.removeInApp=function(){var e=document.getElementById(t.IN_APP_CONTAINER_NAME);e&&e.parentElement.removeChild(e)},e}(),Xt=function(){function e(){this.renderer=new x}return e.prototype.render=function(e){var n=this.renderer.getElementById(t.IN_APP_CONTAINER_NAME),r=this.createIFrameContainer();return this.createIFrameElement(r,e),this.createAnchorElement(n,r),this.renderer.appendChild(n,r),r},e.prototype.createIFrameContainer=function(){var t=this.renderer.createElement("div");return this.renderer.setAttribute(t,"class","iframe-container"),this.renderer.setAttribute(t,"id","iframe-container"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"top","0px"),this.renderer.setStyle(t,"left","0px"),t},e.prototype.createIFrameElement=function(t,e){var n=this.renderer.createElement("iframe");return this.renderer.setStyle(n,"width","100%"),this.renderer.setStyle(n,"height","100%"),this.renderer.setAttribute(n,"src",e),this.renderer.setAttribute(n,"frameBorder","0"),this.renderer.appendChild(t,n),n},e.prototype.createAnchorElement=function(t,e){var n=this.renderer.createElement("a");return this.renderer.setStyle(n,"position","absolute"),this.renderer.setStyle(n,"top","0px"),this.renderer.setStyle(n,"right","0px"),n.href="#",n.innerHTML="Close",n.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,n),n},e}(),Jt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappElement.w=1080,r.inappElement.h=1920,r}return Jt(e,t),e.prototype.render=function(){return t.prototype.render.call(this),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this},e}(Wt),Yt=function(){function e(){this.rootContainer=(new $t).render()}return e.prototype.render=function(e){e=new A(e),this.ian=e.ian;try{this.renderContainer(),I.setNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),I.setString(t.STORAGE_ACTIVE_TRIGGER_ID,e.id)}catch(t){i.e(t)}},e.prototype.renderElement=function(t,e){e instanceof S?new zt(t,e).render():e instanceof w?new Kt(t,e).render():e instanceof v?new Wt(t,e).render():i.e("Unsupported element type- "+e.type)},e.prototype.renderContainer=function(){var t,e,n=this,r=null===(t=this.ian)||void 0===t?void 0:t.cont;if(r){var i=new Zt(this.rootContainer,r).render().getHTMLElement();null===(e=this.ian.elems)||void 0===e||e.forEach((function(t){n.renderElement(i,t)}))}},e}(),Qt=Yt}(),CooeePreview=r.default}();
package/dist/sdk.min.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see sdk.min.js.LICENSE.txt */
2
- !function(){var t={489:function(t){for(var e=Math.floor(16777215*Math.random()),n=u.index=parseInt(16777215*Math.random(),10),r=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,i=function(t){return!(null==t||!t.constructor||"function"!=typeof t.constructor.isBuffer||!t.constructor.isBuffer(t))},o=[],s=0;s<256;s++)o[s]=(s<=15?"0":"")+s.toString(16);var a=new RegExp("^[0-9a-fA-F]{24}$"),c=[];for(s=0;s<10;)c[48+s]=s++;for(;s<16;)c[55+s]=c[87+s]=s++;function u(t){if(!(this instanceof u))return new u(t);if(t&&(t instanceof u||"ObjectID"===t._bsontype))return t;if(this._bsontype="ObjectID",null!=t&&"number"!=typeof t){var e=u.isValid(t);if(!e&&null!=t)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&"string"==typeof t&&24===t.length)return u.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&"function"==typeof t.toHexString)return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t}else this.id=this.generate(t)}t.exports=u,u.default=u,u.createFromTime=function(t){return new u((8,(8===(e=(e=t=parseInt(t,10)%4294967295).toString(16)).length?e:"00000000".substring(e.length,8)+e)+"0000000000000000"));var e},u.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",n=0;n<24;)e+=String.fromCharCode(c[t.charCodeAt(n++)]<<4|c[t.charCodeAt(n++)]);return new u(e)},u.isValid=function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&a.test(t):t instanceof u||!!i(t)||"function"==typeof t.toHexString&&(t.id instanceof _Buffer||"string"==typeof t.id)&&(12===t.id.length||24===t.id.length&&a.test(t.id))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=o[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof u?this.toString()===t.toString():"string"==typeof t&&u.isValid(t)&&12===t.length&&i(this.id)?t===this.id.toString("binary"):"string"==typeof t&&u.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&u.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof u||t.toHexString))&&t.toHexString()===this.toHexString()},getTimestamp:function(){var t,e=new Date;return t=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,e.setTime(1e3*Math.floor(t)),e},generate:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var i=n=(n+1)%16777215;return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,r>>8&255,255&r,i>>16&255,i>>8&255,255&i)}};var l=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[l]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},238:function(t,e,n){var r;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",p="name",h="type",f="vendor",d="version",b="architecture",v="console",y="mobile",w="tablet",g="smarttv",m="wearable",S="embedded",E={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return typeof t===u&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===a?t:t.substring(0,255)}},T={rgx:function(t,e){for(var n,r,i,a,u,l,p=0;p<e.length&&!u;){var h=e[p],f=e[p+1];for(n=r=0;n<h.length&&!u;)if(u=h[n++].exec(t))for(i=0;i<f.length;i++)l=u[++r],typeof(a=f[i])===c&&a.length>0?2==a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},str:function(t,e){for(var n in e)if(typeof e[n]===c&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(E.has(e[n][r],t))return"?"===n?o:n}else if(E.has(e[n],t))return"?"===n?o:n;return t}},_={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","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},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"}}}},A={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[p,d],[/opios[\/\s]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[p,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[p,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[p,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[p],[/;fbav\/([\w\.]+);/i],[d,[p,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[p,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[p,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[p,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,p],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[p,[d,T.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[p,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(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,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+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],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[b,/ower/,"",E.lowerize]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,E.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[l,[f,"Samsung"],[h,w]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[f,"Samsung"],[h,y]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[f,"Apple"],[h,y]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,"Apple"],[h,w]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[l,[f,"Huawei"],[h,w]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[f,"Huawei"],[h,y]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[f,"Xiaomi"],[h,y]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[f,"Xiaomi"],[h,w]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[f,"OPPO"],[h,y]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[f,"Vivo"],[h,y]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[f,"Realme"],[h,y]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[l,[f,"Motorola"],[h,y]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[h,w]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[f,"LG"],[h,w]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[l,[f,"LG"],[h,y]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[l,[f,"Lenovo"],[h,w]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[l,/_/g," "],[f,"Nokia"],[h,y]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[f,"Google"],[h,w]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[f,"Google"],[h,y]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[h,y]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[f,"Sony"],[h,w]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[h,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[f,"Amazon"],[h,w]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[f,"Amazon"],[h,y]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,f,[h,w]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[h,y]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[l,[f,"ASUS"],[h,w]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[f,"ASUS"],[h,y]],[/(nexus\s9)/i],[l,[f,"HTC"],[h,w]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[h,y]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[h,w]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[f,"Meizu"],[h,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[h,y]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,l,[h,w]],[/\s(surface\sduo)\s/i],[l,[f,"Microsoft"],[h,w]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[l,[f,"Fairphone"],[h,y]],[/\s(u304aa)\sbuild/i],[l,[f,"AT&T"],[h,y]],[/sie-(\w*)/i],[l,[f,"Siemens"],[h,y]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[f,"RCA"],[h,w]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[f,"Dell"],[h,w]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[f,"Verizon"],[h,w]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[f,"Barnes & Noble"],[h,w]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[f,"NuVision"],[h,w]],[/;\s(k88)\sbuild/i],[l,[f,"ZTE"],[h,w]],[/;\s(nx\d{3}j)\sbuild/i],[l,[f,"ZTE"],[h,y]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[f,"Swiss"],[h,y]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[f,"Swiss"],[h,w]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[f,"Zeki"],[h,w]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[h,w]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[h,w]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[f,"NextBook"],[h,w]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],l,[h,y]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],l,[h,y]],[/;\s(ph-1)\s/i],[l,[f,"Essential"],[h,y]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[f,"Envizen"],[h,w]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[f,"MachSpeed"],[h,w]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[f,"Rotor"],[h,w]],[/(shield[\w\s]+)\sbuild/i],[l,[f,"Nvidia"],[h,w]],[/(sprint)\s(\w+)/i],[f,l,[h,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[h,y]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,"Zebra"],[h,w]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,"Zebra"],[h,y]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,l,[h,v]],[/droid.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[h,v]],[/(playstation\s[345portablevi]+)/i],[l,[f,"Sony"],[h,v]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[f,"Microsoft"],[h,v]],[/smart-tv.+(samsung)/i],[f,[h,g]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[h,g]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[h,g]],[/(apple)\s?tv/i],[f,[l,"Apple TV"],[h,g]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[h,g]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[f,"Amazon"],[h,g]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[h,g]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,E.trim],[l,E.trim],[h,g]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,g]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[h,m]],[/droid.+;\s(glass)\s\d/i],[l,[f,"Google"],[h,m]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[f,"Zebra"],[h,m]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,y]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,w]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,E.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]],[/(phone)/i],[[h,y]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[p,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[p,[d,T.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[p,"Windows"],[d,T.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[p,d],[/(sunos)\s?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?: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],[p,d]]},I=function(t,e){if("object"==typeof t&&(e=t,t=o),!(this instanceof I))return new I(t,e).getResult();var n=t||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?E.extend(A,e):A;return this.getBrowser=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.browser),t.major=E.major(t.version),t},this.getCPU=function(){var t={architecture:o};return T.rgx.call(t,n,r.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return T.rgx.call(t,n,r.device),t},this.getEngine=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.engine),t},this.getOS=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n=typeof t===u&&t.length>255?E.trim(t,255):t,this},this.setUA(n),this};I.VERSION="0.7.28",I.BROWSER={NAME:p,MAJOR:"major",VERSION:d},I.CPU={ARCHITECTURE:b},I.DEVICE={MODEL:l,VENDOR:f,TYPE:h,CONSOLE:v,MOBILE:y,SMARTTV:g,TABLET:w,WEARABLE:m,EMBEDDED:S},I.ENGINE={NAME:p,VERSION:d},I.OS={NAME:p,VERSION:d},typeof e!==a?(t.exports&&(e=t.exports=I),e.UAParser=I):(r=function(){return I}.call(e,n,e,t))===o||(t.exports=r);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var O=new I;x.ua=O.getResult(),x.ua.get=function(){return O.getUA()},x.ua.set=function(t){O.setUA(t);var e=O.getResult();for(var n in e)x.ua[n]=e[n]}}}("object"==typeof window?window:this)}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};!function(){"use strict";n.d(r,{default:function(){return se}});var t=function(t,e){void 0===e&&(e={}),this.name=t,this.properties=e,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.occurred=(new Date).toISOString()},e=n(489),i=n.n(e),o=function(){function t(){}return t.getString=function(e,n){return t.LOCAL_STORAGE.getItem(e)||n},t.setString=function(e,n){n||(n=""),t.LOCAL_STORAGE.setItem(e,n)},t.getNumber=function(e,n){return+t.getString(e,"")||n},t.setNumber=function(e,n){t.setString(e,n.toString())},t.getBoolean=function(t,e){var n=this.LOCAL_STORAGE.getItem(t);return n?JSON.parse(n):e},t.setBoolean=function(e,n){t.setString(e,JSON.stringify(n))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),s=function(){function t(){}return t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION="0.0.4",t.SDK_VERSION_CODE=4,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_USER_ID="uid",t.STORAGE_SDK_TOKEN="st",t.STORAGE_DEVICE_UUID="uuid",t.STORAGE_SESSION_ID="sid",t.STORAGE_SESSION_NUMBER="sn",t.STORAGE_SESSION_START_TIME="sst",t.STORAGE_SESSION_START_EVENT_SENT="sses",t.STORAGE_FIRST_TIME_LAUNCH="ifl",t.STORAGE_LAST_ACTIVE="la",t.STORAGE_TRIGGER_START_TIME="tst",t.STORAGE_ACTIVE_TRIGGER_ID="atid",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_CONTAINER_NAME="cooee-wrapper",t}(),a=function(){function t(){this.inInactive=!0,this.lastEnterActive=new Date,this.lastEnterInactive=null,this.isDebug=!1}return t.getInstance=function(){return this.INSTANCE},t.prototype.getWebAppVersion=function(){var t;return null!==(t=this.webAppVersion)&&void 0!==t?t:"0.0.1+1"},t.prototype.setWebAppVersion=function(t){this.webAppVersion=t},t.prototype.isDebugWebApp=function(){return this.isDebug},t.prototype.setDebugWebApp=function(t){this.isDebug=t},t.prototype.isInactive=function(){return this.inInactive},t.prototype.setInactive=function(){this.inInactive=!0,this.lastEnterInactive=new Date,o.setNumber(s.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime())},t.prototype.setActive=function(){this.inInactive=!1,this.lastEnterActive=new Date},t.prototype.isFirstActive=function(){return null==this.lastEnterInactive},t.prototype.getLastEnterInactive=function(){return this.lastEnterInactive},t.prototype.getTimeForActiveInSeconds=function(){var t,e;return((null===(t=this.lastEnterInactive)||void 0===t?void 0:t.getTime())-(null===(e=this.lastEnterActive)||void 0===e?void 0:e.getTime()))/1e3},t.prototype.getTimeForInactiveInSeconds=function(){return null==this.lastEnterInactive?0:((new Date).getTime()-this.lastEnterInactive.getTime())/1e3},t.INSTANCE=new t,t}(),c=function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},u=function(){function t(){}return t.l=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.log.apply(console,c([s.LOG_PREFIX,":"],t))},t.e=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.error.apply(console,c([s.LOG_PREFIX,":"],t))},t.w=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.warn.apply(console,c([s.LOG_PREFIX,":"],t))},t}(),l=function(){function t(t){t.s&&(this.s=new d(t.s)),t.g&&(this.g=new y(t.g)),this.i=t.i}return Object.defineProperty(t.prototype,"solid",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glossy",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"img",{get:function(){return this.i},enumerable:!1,configurable:!0}),t}();const p=new RegExp("[^#a-f\\d]","gi"),h=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var f,d=function(){function t(t){this.a=100,this.h=t.h,this.a=t.a,this.g=t.g}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grad",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){if(!this.hex)return"";try{return function(t,e={}){if("string"!=typeof t||p.test(t)||!h.test(t))throw new TypeError("Expected a valid hex string");let n=1;8===(t=t.replace(/^#/,"")).length&&(n=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(n=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const r=Number.parseInt(t,16),i=r>>16,o=r>>8&255,s=255&r,a="number"==typeof e.alpha?e.alpha:n;return"array"===e.format?[i,o,s,a]:"css"===e.format?`rgb(${i} ${o} ${s}${1===a?"":` / ${Number((100*a).toFixed(2))}%`})`:{red:i,green:o,blue:s,alpha:a}}(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}},enumerable:!1,configurable:!0}),t.prototype.getAlpha=function(){var t;return(null!==(t=this.a)&&void 0!==t?t:100)/100},t}(),b=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new d(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){var t;return f[null!==(t=this.s)&&void 0!==t?t:f.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(f||(f={}));var v,y=function(){function t(t){this.r=t.r,t.c&&(this.c=new d(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),t}(),w=(Object.defineProperty(function(){}.prototype,"rotate",{get:function(){return this.rot},enumerable:!1,configurable:!0}),function(){function t(t){this.t=t.t,t.bg&&(this.bg=new l(t.bg)),t.br&&(this.br=new b(t.br)),this.clc=t.clc,this.shd=t.shd,this.spc=t.spc,this.trf=t.trf,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y}return Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return v[this.t]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"click",{get:function(){return this.clc},enumerable:!1,configurable:!0}),t}());!function(t){t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.SHAPE=100]="SHAPE"}(v||(v={}));var g,m,S=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(t){function e(e){return t.call(this,e)||this}return S(e,t),e}(w),T=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(t){function e(e){var n=t.call(this,e)||this;return n.src=e.src,n}return T(e,t),e}(w),A=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(t){function e(e){var n=t.call(this,e)||this;return n.alg=g.START,n.prs=e.prs,n.alg=e.alg,e.f&&(n.f=e.f),e.c&&(n.c=new d(e.c)),n}return A(e,t),Object.defineProperty(e.prototype,"parts",{get:function(){return this.prs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.f},enumerable:!1,configurable:!0}),e}(w);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(g||(g={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(m||(m={}));var x,O=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(t){function e(e){return t.call(this,e)||this}return O(e,t),e}(w),D=function(t){var e=this;this.elems=[],this.cont=new N(t.cont),t.elems.forEach((function(t){t.t===v.IMAGE?e.elems.push(new _(t)):t.t===v.TEXT||t.t===v.BUTTON?e.elems.push(new I(t)):t.t===v.SHAPE&&e.elems.push(new E(t))}))},k=function(t){this.duration=0,this.id=t.id,this.duration=t.duration,this.version=t.version,this.engagementID=t.engagementID,this.internal=t.internal,this.pn=t.pn,this.ian=new D(t.ian)},C=function(){function t(){this.doc=document}return t.prototype.getWidth=function(){return document.documentElement.clientWidth},t.prototype.getHeight=function(){return document.documentElement.clientHeight},t.prototype.createElement=function(t){return this.doc.createElement(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.setStyle=function(t,e,n){e&&(n?t.style.setProperty(e,n):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},t.prototype.getElementById=function(t){return this.doc.getElementById(t)},t}(),P=n(238),R=n.n(P);!function(t){t.Location="LOCATION",t.Push="PUSH",t.Camera="CAMERA"}(x||(x={}));var M=function(){function e(t){this.action=t,this.apiService=Q.getInstance()}return e.prototype.execute=function(){this.externalAction(),this.iabAction(),this.upAction(),this.kvAction(),this.prompt(),this.closeAction(),this.shareAction()},e.prototype.externalAction=function(){var t;this.action.ext&&(null===(t=window.open(this.action.ext.u,"_blank"))||void 0===t||t.focus())},e.prototype.iabAction=function(){this.action.iab&&(new W).render(this.action.iab.u)},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(){this.action.kv&&document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:this.action.kv}))},e.prototype.prompt=function(){var t=this.action.prompt;t&&(t===x.Location&&this.promptLocationPermission(),t===x.Push&&this.promptPushNotificationPermission(),t===x.Camera&&this.promptCameraPermission())},e.prototype.closeAction=function(){if(this.action.close){(new K).removeInApp();var e=o.getNumber(s.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),n={triggerID:o.getString(s.STORAGE_ACTIVE_TRIGGER_ID,""),"Close Behaviour":"CTA",Duration:((new Date).getTime()-e)/1e3};this.apiService.sendEvent(new t("CE Trigger Closed",n)),o.remove(s.STORAGE_TRIGGER_START_TIME),o.remove(s.STORAGE_ACTIVE_TRIGGER_ID)}},e.prototype.shareAction=function(){this.action.share&&(navigator.share?navigator.share({text:this.action.share.text,title:"Share"}).then((function(t){return console.log(t)})).catch((function(t){return console.error(t)})):u.w("Navigator.share is not compatible with this browser"))},e.prototype.promptLocationPermission=function(){var t=this;navigator.geolocation&&navigator.permissions&&navigator.geolocation.getCurrentPosition((function(e){t.apiService.updateProfile({coords:[e.coords.latitude,e.coords.longitude]}),t.sendPermissionData()}))},e.prototype.promptPushNotificationPermission=function(){var t=this;"Notification"in window?"default"===Notification.permission?Notification.requestPermission().then((function(){t.sendPermissionData()})):this.apiService.updateProfile({pnPerm:Notification.permission}):u.w("This browser does not support desktop notification")},e.prototype.promptCameraPermission=function(){var t=this;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally((function(){t.sendPermissionData()}))},e.prototype.checkPermission=function(t){return navigator.permissions.query({name:t}).then((function(t){return t.state.toString()}))},e.prototype.checkAllPermission=function(){return t=this,e=void 0,r=function(){var t,e,n;return function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(r){switch(r.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=r.sent(),[4,this.checkPermission("geolocation")];case 2:return e=r.sent(),n=Notification.permission,[2,{camera:t,location:e,notification:n}]}}))},new((n=void 0)||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}));var t,e,n,r},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateProfile({perm:e})}))},e}(),L=function(){function t(t,e){var n,r;this.screenWidth=0,this.screenHeight=0,this.scalingFactor=(n=document.documentElement.clientWidth)<(r=document.documentElement.clientHeight)?n/Math.min(s.CANVAS_WIDTH,s.CANVAS_HEIGHT):r/Math.max(s.CANVAS_WIDTH,s.CANVAS_HEIGHT),this.parentHTMLEl=t,this.inappElement=e,this.renderer=new C,this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return t.prototype.getHTMLElement=function(){return this.inappHTMLEl},t.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},t.prototype.processCommonBlocks=function(){this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"overflow","visible"),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},t.prototype.processWidthAndHeight=function(){this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.getSizePx(this.inappElement.h))},t.prototype.getSizePx=function(t){return t*this.scalingFactor+"px"},t.prototype.processPositionBlock=function(){this.inappElement.x&&(this.renderer.setStyle(this.inappHTMLEl,"position","absolute"),this.inappElement.x&&this.renderer.setStyle(this.inappHTMLEl,"top",this.getSizePx(this.inappElement.y)),this.inappElement.y&&this.renderer.setStyle(this.inappHTMLEl,"left",this.getSizePx(this.inappElement.x)))},t.prototype.processBorderBlock=function(){var t,e=this.inappElement.br;e&&(e.radius&&e.radius>0&&this.renderer.setStyle(this.inappHTMLEl,"border-radius",this.getSizePx(e.radius)),e.width&&e.width>0&&(this.renderer.setStyle(this.inappHTMLEl,"border-width",this.getSizePx(e.width)),this.renderer.setStyle(this.inappHTMLEl,"border-style",null===(t=e.style)||void 0===t?void 0:t.toLowerCase()),e.color?this.processColourBlock(e.color,"border-color"):this.renderer.setStyle(this.inappHTMLEl,"border-color","black")))},t.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(t.p&&this.renderer.setStyle(this.inappHTMLEl,"padding",this.getSizePx(t.p)),t.pt&&this.renderer.setStyle(this.inappHTMLEl,"padding-top",this.getSizePx(t.pt)),t.pb&&this.renderer.setStyle(this.inappHTMLEl,"padding-bottom",this.getSizePx(t.pb)),t.pl&&this.renderer.setStyle(this.inappHTMLEl,"padding-left",this.getSizePx(t.pl)),t.pr&&this.renderer.setStyle(this.inappHTMLEl,"padding-right",this.getSizePx(t.pr)),this.renderer.setStyle(this.inappHTMLEl,"margin","0 !important"))},t.prototype.processTransformBlock=function(){var t=this.inappElement.trf;t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate("+t.rotate+"deg)")},t.prototype.registerAction=function(){var t=this.inappElement.clc;t&&this.inappHTMLEl.addEventListener("click",(function(){new M(t).execute()}))},t.prototype.processBackgroundBlock=function(){var t,e=this.inappElement.bg;if(e){var n=this.inappHTMLEl;this.inappElement instanceof N&&(n=n.parentElement);var r="";if((null===(t=(new(R())).getBrowser().name)||void 0===t?void 0:t.toLowerCase().includes("safari"))&&(r="-webkit-"),e.glossy)this.renderer.setStyle(n,r+"backdrop-filter","blur("+e.glossy.radius+"px)"),e.glossy.color&&this.processColourBlock(e.glossy.color,"background",n);else if(e.solid)e.solid.grad?this.processGradient(e.solid.grad,"background"):e.solid.hex&&this.renderer.setStyle(n,"background",e.solid.rgba);else if(e.img){if(!e.img.src)return;var i='url("'+e.img.src+'") no-repeat center';this.renderer.setStyle(n,"background",i),this.renderer.setStyle(n,"background-size","cover"),e.img.a&&this.renderer.setStyle(n,r+"backdrop-filter","opacity("+e.img.a+")")}}},t.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var n="linear-gradient("+t.ang+"deg, "+t.c1+", "+t.c2;t.c3&&(n+=", "+t.c3),t.c4&&(n+=", "+t.c4),t.c5&&(n+=", "+t.c5);var r=n+=")";this.renderer.setStyle(this.inappHTMLEl,e,r)}},t.prototype.processColourBlock=function(t,e,n){void 0===e&&(e="color"),void 0===n&&(n=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(n,e,t.rgba))},t}(),H=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(t){function e(e,n){return t.call(this,e,n)||this}return H(e,t),e.prototype.processCommonBlocks=function(){t.prototype.processCommonBlocks.call(this),this.processFontBlock(),this.processColourBlock(this.inappElement.color),this.processAlignment()},e.prototype.processFontBlock=function(){var t=this.inappElement.font;t&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(t.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",t.ff),this.renderer.setStyle(this.inappHTMLEl,"line-height",t.lh))},e.prototype.processPart=function(t,e){var n,r=[];e.u&&r.push("underline"),e.st&&r.push("line-through"),r.length||r.push("normal"),this.renderer.setStyle(t,"font-weight",e.b?"bold":"normal"),this.renderer.setStyle(t,"font-style",e.i?"italic":"normal"),this.renderer.setStyle(t,"text-decoration",r.join(" ")),this.renderer.setStyle(t,"color",null!==(n=e.c)&&void 0!==n?n:"inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=g[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(L),G=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return G(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var n=e.renderer.createElement("span");n.innerHTML=t.txt,e.processPart(n,t),e.renderer.appendChild(e.inappHTMLEl,n)})),this.processCommonBlocks()},e}(j),U=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),V=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return U(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(L),F=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("img"),r.insertElement(),r}return F(e,t),e.prototype.render=function(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","100%"),this.renderer.setStyle(this.inappHTMLEl,"max-height","100%"),this.renderer.setStyle(this.inappHTMLEl,"display","block"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()},e}(L),K=function(){function t(){this.renderer=new C}return t.prototype.render=function(){this.removeInApp();var t=this.renderer.createElement("div");return t.id=s.IN_APP_CONTAINER_NAME,t.classList.add(s.IN_APP_CONTAINER_NAME),this.renderer.setStyle(t,"z-index","10000000"),this.renderer.setStyle(t,"position","fixed"),this.renderer.setStyle(t,"top","0"),this.renderer.setStyle(t,"left","0"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"display","flex"),this.renderer.setStyle(t,"justify-content","center"),this.renderer.setStyle(t,"align-items","center"),this.renderer.appendChild(document.body,t),t},t.prototype.removeInApp=function(){var t=document.getElementById(s.IN_APP_CONTAINER_NAME);t&&t.parentElement.removeChild(t)},t}(),W=function(){function t(){this.renderer=new C}return t.prototype.render=function(t){var e=this.renderer.getElementById(s.IN_APP_CONTAINER_NAME),n=this.createIFrameContainer();return this.createIFrameElement(n,t),this.createAnchorElement(e,n),this.renderer.appendChild(e,n),n},t.prototype.createIFrameContainer=function(){var t=this.renderer.createElement("div");return this.renderer.setAttribute(t,"class","iframe-container"),this.renderer.setAttribute(t,"id","iframe-container"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"top","0px"),this.renderer.setStyle(t,"left","0px"),t},t.prototype.createIFrameElement=function(t,e){var n=this.renderer.createElement("iframe");return this.renderer.setStyle(n,"width","100%"),this.renderer.setStyle(n,"height","100%"),this.renderer.setAttribute(n,"src",e),this.renderer.setAttribute(n,"frameBorder","0"),this.renderer.appendChild(t,n),n},t.prototype.createAnchorElement=function(t,e){var n=this.renderer.createElement("a");return this.renderer.setStyle(n,"position","absolute"),this.renderer.setStyle(n,"top","0px"),this.renderer.setStyle(n,"right","0px"),n.href="#",n.innerHTML="Close",n.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,n),n},t}(),q=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappElement.w=1080,r.inappElement.h=1920,r}return q(e,t),e.prototype.render=function(){return t.prototype.render.call(this),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this},e}(V),X=function(){function t(){this.rootContainer=(new K).render()}return t.prototype.render=function(t){t=new k(t),this.ian=t.ian;try{this.renderContainer(),o.setNumber(s.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),o.setString(s.STORAGE_ACTIVE_TRIGGER_ID,t.id)}catch(t){u.e(t)}},t.prototype.renderElement=function(t,e){e instanceof I?new B(t,e).render():e instanceof _?new z(t,e).render():e instanceof E?new V(t,e).render():u.e("Unsupported element type- "+e.type)},t.prototype.renderContainer=function(){var t,e,n=this,r=null===(t=this.ian)||void 0===t?void 0:t.cont;if(r){var i=new $(this.rootContainer,r).render().getHTMLElement();null===(e=this.ian.elems)||void 0===e||e.forEach((function(t){n.renderElement(i,t)}))}},t}(),J=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},Z=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Y=function(){function t(){this.runtimeData=a.getInstance(),this.apiToken="",this.userID=""}return t.getInstance=function(){return this.INSTANCE},t.prototype.doHTTP=function(t,e,n,r){return J(this,void 0,void 0,(function(){var i;return Z(this,(function(o){switch(o.label){case 0:return e.startsWith("http")||(e=s.API_URL+e),[4,fetch(e,{method:t,body:JSON.stringify(n),headers:r})];case 1:if(!(i=o.sent()).ok)throw i;return[2,i.json()]}}))}))},t.prototype.registerDevice=function(t){return J(this,void 0,void 0,(function(){return Z(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",t,this.getDefaultHeaders())]}))}))},t.prototype.sendEvent=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/event/track",t,e).then((function(e){u.l("Sent",t.name),e.triggerData&&(new X).render(e.triggerData)})).catch((function(t){u.e("Error sending event",t)}))},t.prototype.updateUserData=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/user/update",t,e).then((function(){u.l("Updated user profile")})).catch((function(t){u.e("Error saving user profile",t)}))},t.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/session/conclude",t,e).then((function(t){u.l("Conclude Session",t)})).catch((function(t){u.e(t)}))},t.prototype.getDefaultHeaders=function(){var t=new Headers;return t.set("sdk-version",s.SDK_VERSION),t.set("sdk-version-code",s.SDK_VERSION_CODE.toString()),t.set("app-version",this.runtimeData.getWebAppVersion()),t.set("user-id",this.userID),s.SDK_DEBUG&&t.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&t.set("app-debug",String(1)),t},t.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},t.prototype.setUserId=function(t){this.userID=null!=t?t:""},t.INSTANCE=new t,t}(),Q=function(){function t(){this.sessionManager=tt.getInstance(),this.httpApiService=Y.getInstance()}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.sendEvent=function(t){var e=this;Yt.replaySubject.subscribe((function(){e.addEventVariable(t),e.httpApiService.sendEvent(t)}))},t.prototype.updateProfile=function(t){var e=this;Yt.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},t.prototype.concludeSession=function(t){var e=this;Yt.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},t.prototype.addEventVariable=function(t){t.screenName=location.pathname,t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber()},t}(),tt=function(){function t(){}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.getCurrentSessionID=function(){return this.currentSessionID||null},t.prototype.isNewSessionRequired=function(){if(!o.getString(s.STORAGE_SESSION_ID,""))return!0;var t=o.getNumber(s.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-t)/1e3>s.IDLE_TIME_IN_SECONDS},t.prototype.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},t.prototype.startNewSession=function(){this.currentSessionID||(o.setBoolean(s.STORAGE_SESSION_START_EVENT_SENT,!1),this.currentSessionStartTime=new Date,this.currentSessionID=(new(i())).toHexString(),o.setNumber(s.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),o.setString(s.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber())},t.prototype.bumpSessionNumber=function(){this.currentSessionNumber=o.getNumber(s.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,o.setNumber(s.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},t.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},t.prototype.getTotalDurationInSeconds=function(){if(a.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},t.prototype.conclude=function(){var t={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Q.getInstance().concludeSession(t),this.destroySession()},t.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,o.remove(s.STORAGE_SESSION_ID),o.remove(s.STORAGE_SESSION_START_TIME)},t.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(o.getNumber(s.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=o.getString(s.STORAGE_SESSION_ID,""),this.currentSessionNumber=o.getNumber(s.STORAGE_SESSION_NUMBER,0)},t.prototype.getLastActive=function(){return o.getNumber(s.STORAGE_LAST_ACTIVE,0)},t}(),et=function(t,e,n,r){this.appID=t,this.appSecret=e,this.uuid=n,this.props=r,this.sdk=s.SDK},nt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},rt=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},it=function(){function t(){this.parser=new(R()),this.result={}}return t.prototype.get=function(){return nt(this,void 0,void 0,(function(){var t;return rt(this,(function(e){switch(e.label){case 0:return t=this.result,this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),[4,this.getBatteryInfo()];case 1:return e.sent(),[4,this.getLocation()];case 2:return e.sent(),t.locale=navigator.language,t.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},t.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},t.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},t.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},t.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},[2,t]}}))}))},t.prototype.getDeviceMemory=function(){var t=navigator;if(t.deviceMemory){var e=t.deviceMemory;this.result.mem={tot:1024*e}}},t.prototype.getNetworkType=function(){var t=navigator,e=t.connection||t.mozConnection||t.webkitConnection;(null==e?void 0:e.effectiveType)&&(this.result.net={type:e.effectiveType})},t.prototype.getOrientation=function(){var t,e=null===(t=screen.orientation)||void 0===t?void 0:t.type;e&&(this.result.orientation=e)},t.prototype.getDPI=function(){var t=document.createElement("div");t.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(t);var e=window.devicePixelRatio||1,n=t.offsetWidth*e;return document.body.removeChild(t),n},t.prototype.getLocation=function(){return nt(this,void 0,void 0,(function(){var t=this;return rt(this,(function(e){switch(e.label){case 0:return navigator.geolocation&&navigator.permissions?[4,navigator.permissions.query({name:"geolocation"})]:[2];case 1:return"granted"!=e.sent().state?[2]:[2,new Promise((function(e){navigator.geolocation.getCurrentPosition((function(n){t.result.coords=[n.coords.latitude,n.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return nt(this,void 0,void 0,(function(){var t;return rt(this,(function(e){switch(e.label){case 0:if(!("getBattery"in navigator))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.getBattery()];case 2:return t=e.sent(),this.result.bat={l:100*t.level,c:t.charging},[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},t}(),ot=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},st=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},at=function(){function t(){this.apiService=Y.getInstance(),this.sdkToken="",this.userID="",this.appID="",this.appSecret=""}return t.getInstance=function(){return this.INSTANCE},t.prototype.init=function(t,e){return this.appID=t,this.appSecret=e,this.acquireSDKToken()},t.prototype.hasToken=function(){return!!o.getString(s.STORAGE_SDK_TOKEN,"")},t.prototype.getUserID=function(){return this.userID},t.prototype.populateUserDataFromStorage=function(){return ot(this,void 0,void 0,(function(){return st(this,(function(t){return this.sdkToken=o.getString(s.STORAGE_SDK_TOKEN,""),this.sdkToken||u.l("No SDK token found in local storage"),this.userID=o.getString(s.STORAGE_USER_ID,""),this.userID||u.l("No user ID found in local storage"),this.updateAPIClient(),[2]}))}))},t.prototype.updateAPIClient=function(){u.l("SDK Token:",this.sdkToken),u.l("User ID:",this.userID),this.apiService.setAPIToken(this.sdkToken),this.apiService.setUserId(this.userID)},t.prototype.acquireSDKToken=function(){return ot(this,void 0,void 0,(function(){return st(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(u.l("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},t.prototype.getSDKTokenFromServer=function(){return ot(this,void 0,void 0,(function(){var t,e,n,r;return st(this,(function(i){switch(i.label){case 0:return[4,this.getUserAuthRequest()];case 1:t=i.sent(),e=this.apiService.registerDevice(t),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e];case 3:return n=i.sent(),u.l("Register Device Response",n),this.saveUserDataInStorage(n),[3,5];case 4:throw r=i.sent(),u.e(r),r;case 5:return[2]}}))}))},t.prototype.saveUserDataInStorage=function(t){this.sdkToken=t.sdkToken,this.userID=t.id,this.updateAPIClient(),o.setString(s.STORAGE_SDK_TOKEN,this.sdkToken),o.setString(s.STORAGE_USER_ID,this.userID)},t.prototype.getUserAuthRequest=function(){return ot(this,void 0,void 0,(function(){var t;return st(this,(function(e){switch(e.label){case 0:return[4,(new it).get()];case 1:return t=e.sent(),[2,new et(this.appID,this.appSecret,this.getOrCreateUUID(),t)]}}))}))},t.prototype.getOrCreateUUID=function(){var t=o.getString(s.STORAGE_DEVICE_UUID,"");return t||(t=(new(i())).toHexString(),o.setString(s.STORAGE_DEVICE_UUID,t)),t},t.INSTANCE=new t,t}(),ct=function(t,e){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function ut(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ct(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function lt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function ht(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}function ft(t){return"function"==typeof t}function dt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Object.create,Object.create;var bt=dt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function vt(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var yt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=lt(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(ft(c))try{c()}catch(t){i=t instanceof bt?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=lt(u),p=l.next();!p.done;p=l.next()){var h=p.value;try{mt(h)}catch(t){i=null!=i?i:[],t instanceof bt?i=ht(ht([],pt(i)),pt(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new bt(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)mt(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&vt(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&vt(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),wt=yt.EMPTY;function gt(t){return t instanceof yt||t&&"closed"in t&&ft(t.remove)&&ft(t.add)&&ft(t.unsubscribe)}function mt(t){ft(t)?t():t.unsubscribe()}var St=null,Et=null,Tt=void 0,_t=!1,At=!1,It={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=It.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,ht([],pt(t)))},clearTimeout:function(t){var e=It.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function xt(t){It.setTimeout((function(){if(!St)throw t;St(t)}))}function Ot(){}var Nt=Dt("C",void 0,void 0);function Dt(t,e,n){return{kind:t,value:e,error:n}}var kt=null;function Ct(t){if(_t){var e=!kt;if(e&&(kt={errorThrown:!1,error:null}),t(),e){var n=kt,r=n.errorThrown,i=n.error;if(kt=null,r)throw i}}else t()}function Pt(t){_t&&kt&&(kt.errorThrown=!0,kt.error=t)}var Rt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,gt(e)&&e.add(n)):n.destination=Gt,n}return ut(e,t),e.create=function(t,e,n){return new Mt(t,e,n)},e.prototype.next=function(t){this.isStopped?jt(function(t){return Dt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?jt(Dt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?jt(Nt,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(yt),Mt=function(t){function e(e,n,r){var i,o=t.call(this)||this;if(ft(e))i=e;else if(e){var s;i=e.next,n=e.error,r=e.complete,o&&At?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return o.destination={next:i?Lt(i):Ot,error:Lt(null!=n?n:Ht),complete:r?Lt(r):Ot},o}return ut(e,t),e}(Rt);function Lt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,ht([],pt(e)))}catch(t){_t?Pt(t):xt(t)}}}function Ht(t){throw t}function jt(t,e){var n=Et;n&&It.setTimeout((function(){return n(t,e)}))}var Gt={closed:!0,next:Ot,error:Ht,complete:Ot},Bt="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ut(t){return t}function Vt(t){return 0===t.length?Ut:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Ft=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof Rt||function(t){return t&&ft(t.next)&&ft(t.error)&&ft(t.complete)}(r)&&gt(r)?t:new Mt(t,e,n);return Ct((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=zt(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==i||i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Bt]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Vt(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=zt(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function zt(t){var e;return null!==(e=null!=t?t:Tt)&&void 0!==e?e:Promise}var Kt=dt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Wt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return ut(e,t),e.prototype.lift=function(t){var e=new qt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Kt},e.prototype.next=function(t){var e=this;Ct((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=lt(i),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Ct((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Ct((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=e.hasError,r=e.isStopped,i=e.observers;return n||r?wt:(i.push(t),new yt((function(){return vt(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new Ft;return t.source=this,t},e.create=function(t,e){return new qt(t,e)},e}(Ft),qt=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return ut(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:wt},e}(Wt),$t={now:function(){return($t.delegate||Date).now()},delegate:void 0},Xt=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=$t);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return ut(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}},e}(Wt),Jt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},Zt=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Yt=function(){function e(){this.sessionManager=tt.getInstance(),this.safeHttpCallService=Q.getInstance(),this.userAuthService=at.getInstance()}return e.prototype.init=function(t,n){var r=this;this.userAuthService.init(t,n).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){r.init(t,n)}),3e4)})),this.execute()},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),o.getBoolean(s.STORAGE_SESSION_START_EVENT_SENT,!1)||(o.setBoolean(s.STORAGE_SESSION_START_EVENT_SENT,!0),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():this.sendSuccessiveLaunchEvent())},e.prototype.isAppFirstTimeLaunch=function(){return!!o.getBoolean(s.STORAGE_FIRST_TIME_LAUNCH,!0)&&(o.setBoolean(s.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Jt(this,void 0,void 0,(function(){var e,n;return Zt(this,(function(r){switch(r.label){case 0:return e=new t("CE Web Installed",{}),n=e,[4,(new it).get()];case 1:return n.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(e),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Jt(this,void 0,void 0,(function(){var e,n;return Zt(this,(function(r){switch(r.label){case 0:return e=new t("CE Web Launched",{}),n=e,[4,(new it).get()];case 1:return n.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(e),[2]}}))}))},e.replaySubject=new Xt(1),e}(),Qt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},te=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},ee=function(){function e(){this.apiService=Q.getInstance(),this.runtimeData=a.getInstance()}return e.prototype.listen=function(){var t=this;document.onvisibilitychange=function(){"visible"===document.visibilityState?t.onVisible():"hidden"===document.visibilityState&&t.onHidden()}},e.prototype.onVisible=function(){return Qt(this,void 0,void 0,(function(){var n,r,i,o;return te(this,(function(a){switch(a.label){case 0:return this.runtimeData.setActive(),(n=this.runtimeData.getTimeForInactiveInSeconds())>s.IDLE_TIME_IN_SECONDS&&(tt.getInstance().conclude(),(new Yt).execute()),(r={})[e.INACTIVE_DURATION]=n,i=new t("CE Web Active",r),o=i,[4,(new it).get()];case 1:return o.deviceProps=a.sent(),this.apiService.sendEvent(i),[2]}}))}))},e.prototype.onHidden=function(){return Qt(this,void 0,void 0,(function(){var n,r;return te(this,(function(i){return this.runtimeData.setInactive(),n=this.runtimeData.getTimeForActiveInSeconds(),(r={})[e.ACTIVE_DURATION]=n,this.apiService.sendEvent(new t("CE Web Inactive",r)),[2]}))}))},e.ACTIVE_DURATION="aDur",e.INACTIVE_DURATION="iaDur",e}(),ne=function(){function e(){this.apiService=Q.getInstance()}return e.prototype.listen=function(){var e=this;window.onpageshow=function(){e.apiService.sendEvent(new t("CE Screen View",{screenName:location.pathname}))}},e}(),re=function(){function t(){this.existingSDKObject=window.CooeeSDK}return t.prototype.meddle=function(){var t,e,n;this.existingSDKObject||(this.existingSDKObject=window.CooeeSDK={events:[],profile:[],account:[]}),this.existingSDKObject.account=null!==(t=this.existingSDKObject.account)&&void 0!==t?t:[],this.existingSDKObject.profile=null!==(e=this.existingSDKObject.profile)&&void 0!==e?e:[],this.existingSDKObject.events=null!==(n=this.existingSDKObject.events)&&void 0!==n?n:[],this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.existingSDKObject.account.forEach(this.processAccount),this.existingSDKObject.events.forEach(this.processEvent),this.existingSDKObject.profile.forEach(this.processProfile)},t.prototype.overwritePush=function(t,e){Object.defineProperty(t,"push",{enumerable:!1,configurable:!1,writable:!1,value:e})},t.prototype.meddleAccount=function(){var t=this;this.overwritePush(this.existingSDKObject.account,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.processAccount(e[0])}))},t.prototype.meddleEvents=function(){var t=this;this.overwritePush(this.existingSDKObject.events,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.processEvent(e[0])}))},t.prototype.meddleProfile=function(){var t=this;this.overwritePush(this.existingSDKObject.profile,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.processProfile(e[0])}))},t.prototype.processAccount=function(t){if(t){var e=Object.keys(t);e.includes("appID")?oe.init(t.appID,t.appSecret):e.includes("appVersion")?oe.setWebAppVersion(t.appVersion):e.includes("debug")&&oe.setDebug(t.debug)}},t.prototype.processEvent=function(t){t&&oe.sendEvent(t[0],t[1])},t.prototype.processProfile=function(t){t&&oe.updateProfile(t)},t}(),ie=function(){function t(){}return t.prototype.init=function(){(new ee).listen(),(new ne).listen(),(new re).meddle()},t}(),oe=function(){function e(){this.runtimeData=a.getInstance(),this.safeHttpCallService=Q.getInstance(),this.newSessionExecutor=new Yt}return e.init=function(t,e){this.INSTANCE.newSessionExecutor.init(t,e)},e.setWebAppVersion=function(t){this.INSTANCE.runtimeData.setWebAppVersion(t)},e.setDebug=function(t){this.INSTANCE.runtimeData.setDebugWebApp(t)},e.sendEvent=function(e,n){for(var r in n)if(r.length>3&&r.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");this.INSTANCE.safeHttpCallService.sendEvent(new t(e,n))},e.updateProfile=function(t){for(var e in t)if(e.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");this.INSTANCE.safeHttpCallService.updateProfile(t)},e.INSTANCE=new e,e}();(new ie).init();var se=oe}();var i=CooeeSDK="undefined"==typeof CooeeSDK?{}:CooeeSDK,o=r.default;for(var s in o)i[s]=o[s];o.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})}();
2
+ !function(){var t={489:function(t){for(var e=Math.floor(16777215*Math.random()),n=u.index=parseInt(16777215*Math.random(),10),r=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,i=function(t){return!(null==t||!t.constructor||"function"!=typeof t.constructor.isBuffer||!t.constructor.isBuffer(t))},o=[],s=0;s<256;s++)o[s]=(s<=15?"0":"")+s.toString(16);var a=new RegExp("^[0-9a-fA-F]{24}$"),c=[];for(s=0;s<10;)c[48+s]=s++;for(;s<16;)c[55+s]=c[87+s]=s++;function u(t){if(!(this instanceof u))return new u(t);if(t&&(t instanceof u||"ObjectID"===t._bsontype))return t;if(this._bsontype="ObjectID",null!=t&&"number"!=typeof t){var e=u.isValid(t);if(!e&&null!=t)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&"string"==typeof t&&24===t.length)return u.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&"function"==typeof t.toHexString)return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t}else this.id=this.generate(t)}t.exports=u,u.default=u,u.createFromTime=function(t){return new u((8,(8===(e=(e=t=parseInt(t,10)%4294967295).toString(16)).length?e:"00000000".substring(e.length,8)+e)+"0000000000000000"));var e},u.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",n=0;n<24;)e+=String.fromCharCode(c[t.charCodeAt(n++)]<<4|c[t.charCodeAt(n++)]);return new u(e)},u.isValid=function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&a.test(t):t instanceof u||!!i(t)||"function"==typeof t.toHexString&&(t.id instanceof _Buffer||"string"==typeof t.id)&&(12===t.id.length||24===t.id.length&&a.test(t.id))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=o[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof u?this.toString()===t.toString():"string"==typeof t&&u.isValid(t)&&12===t.length&&i(this.id)?t===this.id.toString("binary"):"string"==typeof t&&u.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&u.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof u||t.toHexString))&&t.toHexString()===this.toHexString()},getTimestamp:function(){var t,e=new Date;return t=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,e.setTime(1e3*Math.floor(t)),e},generate:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var i=n=(n+1)%16777215;return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,r>>8&255,255&r,i>>16&255,i>>8&255,255&i)}};var l=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[l]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},238:function(t,e,n){var r;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",p="name",h="type",f="vendor",d="version",b="architecture",v="console",y="mobile",g="tablet",w="smarttv",m="wearable",S="embedded",E={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return typeof t===u&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===a?t:t.substring(0,255)}},T={rgx:function(t,e){for(var n,r,i,a,u,l,p=0;p<e.length&&!u;){var h=e[p],f=e[p+1];for(n=r=0;n<h.length&&!u;)if(u=h[n++].exec(t))for(i=0;i<f.length;i++)l=u[++r],typeof(a=f[i])===c&&a.length>0?2==a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},str:function(t,e){for(var n in e)if(typeof e[n]===c&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(E.has(e[n][r],t))return"?"===n?o:n}else if(E.has(e[n],t))return"?"===n?o:n;return t}},_={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","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},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"}}}},A={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[p,d],[/opios[\/\s]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[p,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[p,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[p,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[p],[/;fbav\/([\w\.]+);/i],[d,[p,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[p,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[p,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[p,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,p],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[p,[d,T.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[p,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(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,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+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],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[b,/ower/,"",E.lowerize]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,E.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[l,[f,"Samsung"],[h,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[f,"Samsung"],[h,y]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[f,"Apple"],[h,y]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,"Apple"],[h,g]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[l,[f,"Huawei"],[h,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[f,"Huawei"],[h,y]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[f,"Xiaomi"],[h,y]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[f,"Xiaomi"],[h,g]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[f,"OPPO"],[h,y]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[f,"Vivo"],[h,y]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[f,"Realme"],[h,y]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[l,[f,"Motorola"],[h,y]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[h,g]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[f,"LG"],[h,g]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[l,[f,"LG"],[h,y]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[l,[f,"Lenovo"],[h,g]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[l,/_/g," "],[f,"Nokia"],[h,y]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[f,"Google"],[h,g]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[f,"Google"],[h,y]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[h,y]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[f,"Sony"],[h,g]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[h,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[f,"Amazon"],[h,g]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[f,"Amazon"],[h,y]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,f,[h,g]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[h,y]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[l,[f,"ASUS"],[h,g]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[f,"ASUS"],[h,y]],[/(nexus\s9)/i],[l,[f,"HTC"],[h,g]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[h,y]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[h,g]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[f,"Meizu"],[h,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[h,y]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,l,[h,g]],[/\s(surface\sduo)\s/i],[l,[f,"Microsoft"],[h,g]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[l,[f,"Fairphone"],[h,y]],[/\s(u304aa)\sbuild/i],[l,[f,"AT&T"],[h,y]],[/sie-(\w*)/i],[l,[f,"Siemens"],[h,y]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[f,"RCA"],[h,g]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[f,"Dell"],[h,g]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[f,"Verizon"],[h,g]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[f,"Barnes & Noble"],[h,g]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[f,"NuVision"],[h,g]],[/;\s(k88)\sbuild/i],[l,[f,"ZTE"],[h,g]],[/;\s(nx\d{3}j)\sbuild/i],[l,[f,"ZTE"],[h,y]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[f,"Swiss"],[h,y]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[f,"Swiss"],[h,g]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[f,"Zeki"],[h,g]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[h,g]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[h,g]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[f,"NextBook"],[h,g]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],l,[h,y]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],l,[h,y]],[/;\s(ph-1)\s/i],[l,[f,"Essential"],[h,y]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[f,"Envizen"],[h,g]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[f,"MachSpeed"],[h,g]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[f,"Rotor"],[h,g]],[/(shield[\w\s]+)\sbuild/i],[l,[f,"Nvidia"],[h,g]],[/(sprint)\s(\w+)/i],[f,l,[h,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[h,y]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,"Zebra"],[h,g]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,"Zebra"],[h,y]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,l,[h,v]],[/droid.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[h,v]],[/(playstation\s[345portablevi]+)/i],[l,[f,"Sony"],[h,v]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[f,"Microsoft"],[h,v]],[/smart-tv.+(samsung)/i],[f,[h,w]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[h,w]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[h,w]],[/(apple)\s?tv/i],[f,[l,"Apple TV"],[h,w]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[h,w]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[f,"Amazon"],[h,w]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[h,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,E.trim],[l,E.trim],[h,w]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,w]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[h,m]],[/droid.+;\s(glass)\s\d/i],[l,[f,"Google"],[h,m]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[f,"Zebra"],[h,m]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,y]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,E.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]],[/(phone)/i],[[h,y]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[p,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[p,[d,T.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[p,"Windows"],[d,T.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[p,d],[/(sunos)\s?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?: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],[p,d]]},I=function(t,e){if("object"==typeof t&&(e=t,t=o),!(this instanceof I))return new I(t,e).getResult();var n=t||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?E.extend(A,e):A;return this.getBrowser=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.browser),t.major=E.major(t.version),t},this.getCPU=function(){var t={architecture:o};return T.rgx.call(t,n,r.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return T.rgx.call(t,n,r.device),t},this.getEngine=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.engine),t},this.getOS=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n=typeof t===u&&t.length>255?E.trim(t,255):t,this},this.setUA(n),this};I.VERSION="0.7.28",I.BROWSER={NAME:p,MAJOR:"major",VERSION:d},I.CPU={ARCHITECTURE:b},I.DEVICE={MODEL:l,VENDOR:f,TYPE:h,CONSOLE:v,MOBILE:y,SMARTTV:w,TABLET:g,WEARABLE:m,EMBEDDED:S},I.ENGINE={NAME:p,VERSION:d},I.OS={NAME:p,VERSION:d},typeof e!==a?(t.exports&&(e=t.exports=I),e.UAParser=I):(r=function(){return I}.call(e,n,e,t))===o||(t.exports=r);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var O=new I;x.ua=O.getResult(),x.ua.get=function(){return O.getUA()},x.ua.set=function(t){O.setUA(t);var e=O.getResult();for(var n in e)x.ua[n]=e[n]}}}("object"==typeof window?window:this)},306:function(t){"use strict";t.exports={i8:"0.0.6"}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};!function(){"use strict";n.d(r,{default:function(){return se}});var t=function(t,e){void 0===e&&(e={}),this.name=t,this.properties=e,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.occurred=(new Date).toISOString()},e=n(489),i=n.n(e),o=function(){function t(){}return t.getString=function(e,n){return t.LOCAL_STORAGE.getItem(e)||n},t.setString=function(e,n){n||(n=""),t.LOCAL_STORAGE.setItem(e,n)},t.getNumber=function(e,n){return+t.getString(e,"")||n},t.setNumber=function(e,n){t.setString(e,n.toString())},t.getBoolean=function(t,e){var n=this.LOCAL_STORAGE.getItem(t);return n?JSON.parse(n):e},t.setBoolean=function(e,n){t.setString(e,JSON.stringify(n))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),s=function(){function t(){}var e;return t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION=n(306).i8,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_USER_ID="uid",t.STORAGE_SDK_TOKEN="st",t.STORAGE_DEVICE_UUID="uuid",t.STORAGE_SESSION_ID="sid",t.STORAGE_SESSION_NUMBER="sn",t.STORAGE_SESSION_START_TIME="sst",t.STORAGE_SESSION_START_EVENT_SENT="sses",t.STORAGE_FIRST_TIME_LAUNCH="ifl",t.STORAGE_LAST_ACTIVE="la",t.STORAGE_TRIGGER_START_TIME="tst",t.STORAGE_ACTIVE_TRIGGER_ID="atid",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_CONTAINER_NAME="cooee-wrapper",e=t.SDK_VERSION.split(".").map((function(t){return t.padStart(2,"0")})).join(""),t.SDK_VERSION_CODE=parseInt(e,10),t}(),a=function(){function t(){this.inInactive=!0,this.lastEnterActive=new Date,this.lastEnterInactive=null,this.isDebug=!1}return t.getInstance=function(){return this.INSTANCE},t.prototype.getWebAppVersion=function(){var t;return null!==(t=this.webAppVersion)&&void 0!==t?t:"0.0.1+1"},t.prototype.setWebAppVersion=function(t){this.webAppVersion=t},t.prototype.isDebugWebApp=function(){return this.isDebug},t.prototype.setDebugWebApp=function(t){this.isDebug=t},t.prototype.isInactive=function(){return this.inInactive},t.prototype.setInactive=function(){this.inInactive=!0,this.lastEnterInactive=new Date,o.setNumber(s.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime())},t.prototype.setActive=function(){this.inInactive=!1,this.lastEnterActive=new Date},t.prototype.isFirstActive=function(){return null==this.lastEnterInactive},t.prototype.getLastEnterInactive=function(){return this.lastEnterInactive},t.prototype.getTimeForActiveInSeconds=function(){var t,e;return((null===(t=this.lastEnterInactive)||void 0===t?void 0:t.getTime())-(null===(e=this.lastEnterActive)||void 0===e?void 0:e.getTime()))/1e3},t.prototype.getTimeForInactiveInSeconds=function(){return null==this.lastEnterInactive?0:((new Date).getTime()-this.lastEnterInactive.getTime())/1e3},t.INSTANCE=new t,t}(),c=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},u=function(){function t(){}return t.l=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.log.apply(console,c([s.LOG_PREFIX,":"],t,!1))},t.e=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.error.apply(console,c([s.LOG_PREFIX,":"],t,!1))},t.w=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.warn.apply(console,c([s.LOG_PREFIX,":"],t,!1))},t}(),l=function(){function t(t){t.s&&(this.s=new d(t.s)),t.g&&(this.g=new y(t.g)),this.i=t.i}return Object.defineProperty(t.prototype,"solid",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glossy",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"img",{get:function(){return this.i},enumerable:!1,configurable:!0}),t}();const p=new RegExp("[^#a-f\\d]","gi"),h=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var f,d=function(){function t(t){this.a=100,this.h=t.h,this.a=t.a,this.g=t.g}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grad",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){if(!this.hex)return"";try{return function(t,e={}){if("string"!=typeof t||p.test(t)||!h.test(t))throw new TypeError("Expected a valid hex string");let n=1;8===(t=t.replace(/^#/,"")).length&&(n=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(n=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const r=Number.parseInt(t,16),i=r>>16,o=r>>8&255,s=255&r,a="number"==typeof e.alpha?e.alpha:n;return"array"===e.format?[i,o,s,a]:"css"===e.format?`rgb(${i} ${o} ${s}${1===a?"":` / ${Number((100*a).toFixed(2))}%`})`:{red:i,green:o,blue:s,alpha:a}}(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}},enumerable:!1,configurable:!0}),t.prototype.getAlpha=function(){var t;return(null!==(t=this.a)&&void 0!==t?t:100)/100},t}(),b=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new d(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){var t;return f[null!==(t=this.s)&&void 0!==t?t:f.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(f||(f={}));var v,y=function(){function t(t){this.r=t.r,t.c&&(this.c=new d(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),t}(),g=(Object.defineProperty(function(){}.prototype,"rotate",{get:function(){return this.rot},enumerable:!1,configurable:!0}),function(){function t(t){this.t=t.t,t.bg&&(this.bg=new l(t.bg)),t.br&&(this.br=new b(t.br)),this.clc=t.clc,this.shd=t.shd,this.spc=t.spc,this.trf=t.trf,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y}return Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return v[this.t]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"click",{get:function(){return this.clc},enumerable:!1,configurable:!0}),t}());!function(t){t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.SHAPE=100]="SHAPE"}(v||(v={}));var w,m,S=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(t){function e(e){return t.call(this,e)||this}return S(e,t),e}(g),T=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(t){function e(e){var n=t.call(this,e)||this;return n.src=e.src,n}return T(e,t),e}(g),A=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(t){function e(e){var n=t.call(this,e)||this;return n.alg=w.START,n.prs=e.prs,n.alg=e.alg,e.f&&(n.f=e.f),e.c&&(n.c=new d(e.c)),n}return A(e,t),Object.defineProperty(e.prototype,"parts",{get:function(){return this.prs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.f},enumerable:!1,configurable:!0}),e}(g);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(w||(w={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(m||(m={}));var x,O=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(t){function e(e){return t.call(this,e)||this}return O(e,t),e}(g),D=function(t){var e=this;this.elems=[],this.cont=new N(t.cont),t.elems.forEach((function(t){t.t===v.IMAGE?e.elems.push(new _(t)):t.t===v.TEXT||t.t===v.BUTTON?e.elems.push(new I(t)):t.t===v.SHAPE&&e.elems.push(new E(t))}))},k=function(t){this.duration=0,this.id=t.id,this.duration=t.duration,this.version=t.version,this.engagementID=t.engagementID,this.internal=t.internal,this.pn=t.pn,this.ian=new D(t.ian)},C=function(){function t(){this.doc=document}return t.prototype.getWidth=function(){return document.documentElement.clientWidth},t.prototype.getHeight=function(){return document.documentElement.clientHeight},t.prototype.createElement=function(t){return this.doc.createElement(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.setStyle=function(t,e,n){e&&(n?t.style.setProperty(e,n):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},t.prototype.getElementById=function(t){return this.doc.getElementById(t)},t}(),P=n(238),R=n.n(P);!function(t){t.Location="LOCATION",t.Push="PUSH",t.Camera="CAMERA"}(x||(x={}));var M=function(){function e(t){this.action=t,this.apiService=Q.getInstance()}return e.prototype.execute=function(){this.externalAction(),this.iabAction(),this.upAction(),this.kvAction(),this.prompt(),this.closeAction(),this.shareAction()},e.prototype.externalAction=function(){var t;this.action.ext&&(null===(t=window.open(this.action.ext.u,"_blank"))||void 0===t||t.focus())},e.prototype.iabAction=function(){this.action.iab&&(new W).render(this.action.iab.u)},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(){this.action.kv&&document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:this.action.kv}))},e.prototype.prompt=function(){var t=this.action.prompt;t&&(t===x.Location&&this.promptLocationPermission(),t===x.Push&&this.promptPushNotificationPermission(),t===x.Camera&&this.promptCameraPermission())},e.prototype.closeAction=function(){if(this.action.close){(new K).removeInApp();var e=o.getNumber(s.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),n={triggerID:o.getString(s.STORAGE_ACTIVE_TRIGGER_ID,""),"Close Behaviour":"CTA",Duration:((new Date).getTime()-e)/1e3};this.apiService.sendEvent(new t("CE Trigger Closed",n)),o.remove(s.STORAGE_TRIGGER_START_TIME),o.remove(s.STORAGE_ACTIVE_TRIGGER_ID)}},e.prototype.shareAction=function(){this.action.share&&(navigator.share?navigator.share({text:this.action.share.text,title:"Share"}).then((function(t){return console.log(t)})).catch((function(t){return console.error(t)})):u.w("Navigator.share is not compatible with this browser"))},e.prototype.promptLocationPermission=function(){var t=this;navigator.geolocation&&navigator.permissions&&navigator.geolocation.getCurrentPosition((function(e){t.apiService.updateProfile({coords:[e.coords.latitude,e.coords.longitude]}),t.sendPermissionData()}))},e.prototype.promptPushNotificationPermission=function(){var t=this;"Notification"in window?"default"===Notification.permission?Notification.requestPermission().then((function(){t.sendPermissionData()})):this.apiService.updateProfile({pnPerm:Notification.permission}):u.w("This browser does not support desktop notification")},e.prototype.promptCameraPermission=function(){var t=this;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally((function(){t.sendPermissionData()}))},e.prototype.checkPermission=function(t){return navigator.permissions.query({name:t}).then((function(t){return t.state.toString()}))},e.prototype.checkAllPermission=function(){return t=this,e=void 0,r=function(){var t,e,n;return function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(r){switch(r.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=r.sent(),[4,this.checkPermission("geolocation")];case 2:return e=r.sent(),n=Notification.permission,[2,{camera:t,location:e,notification:n}]}}))},new((n=void 0)||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}));var t,e,n,r},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateProfile({perm:e})}))},e}(),L=function(){function t(t,e){var n,r;this.screenWidth=0,this.screenHeight=0,this.scalingFactor=(n=document.documentElement.clientWidth)<(r=document.documentElement.clientHeight)?n/Math.min(s.CANVAS_WIDTH,s.CANVAS_HEIGHT):r/Math.max(s.CANVAS_WIDTH,s.CANVAS_HEIGHT),this.parentHTMLEl=t,this.inappElement=e,this.renderer=new C,this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return t.prototype.getHTMLElement=function(){return this.inappHTMLEl},t.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},t.prototype.processCommonBlocks=function(){this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"overflow","visible"),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},t.prototype.processWidthAndHeight=function(){this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.getSizePx(this.inappElement.h))},t.prototype.getSizePx=function(t){return t*this.scalingFactor+"px"},t.prototype.processPositionBlock=function(){this.inappElement.x&&(this.renderer.setStyle(this.inappHTMLEl,"position","absolute"),this.inappElement.x&&this.renderer.setStyle(this.inappHTMLEl,"top",this.getSizePx(this.inappElement.y)),this.inappElement.y&&this.renderer.setStyle(this.inappHTMLEl,"left",this.getSizePx(this.inappElement.x)))},t.prototype.processBorderBlock=function(){var t,e=this.inappElement.br;e&&(e.radius&&e.radius>0&&this.renderer.setStyle(this.inappHTMLEl,"border-radius",this.getSizePx(e.radius)),e.width&&e.width>0&&(this.renderer.setStyle(this.inappHTMLEl,"border-width",this.getSizePx(e.width)),this.renderer.setStyle(this.inappHTMLEl,"border-style",null===(t=e.style)||void 0===t?void 0:t.toLowerCase()),e.color?this.processColourBlock(e.color,"border-color"):this.renderer.setStyle(this.inappHTMLEl,"border-color","black")))},t.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(t.p&&this.renderer.setStyle(this.inappHTMLEl,"padding",this.getSizePx(t.p)),t.pt&&this.renderer.setStyle(this.inappHTMLEl,"padding-top",this.getSizePx(t.pt)),t.pb&&this.renderer.setStyle(this.inappHTMLEl,"padding-bottom",this.getSizePx(t.pb)),t.pl&&this.renderer.setStyle(this.inappHTMLEl,"padding-left",this.getSizePx(t.pl)),t.pr&&this.renderer.setStyle(this.inappHTMLEl,"padding-right",this.getSizePx(t.pr)),this.renderer.setStyle(this.inappHTMLEl,"margin","0 !important"))},t.prototype.processTransformBlock=function(){var t=this.inappElement.trf;t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate("+t.rotate+"deg)")},t.prototype.registerAction=function(){var t=this.inappElement.clc;t&&this.inappHTMLEl.addEventListener("click",(function(){new M(t).execute()}))},t.prototype.processBackgroundBlock=function(){var t,e=this.inappElement.bg;if(e){var n=this.inappHTMLEl;this.inappElement instanceof N&&(n=n.parentElement);var r="";if((null===(t=(new(R())).getBrowser().name)||void 0===t?void 0:t.toLowerCase().includes("safari"))&&(r="-webkit-"),e.glossy)this.renderer.setStyle(n,r+"backdrop-filter","blur("+e.glossy.radius+"px)"),e.glossy.color&&this.processColourBlock(e.glossy.color,"background",n);else if(e.solid)e.solid.grad?this.processGradient(e.solid.grad,"background"):e.solid.hex&&this.renderer.setStyle(n,"background",e.solid.rgba);else if(e.img){if(!e.img.src)return;var i='url("'+e.img.src+'") no-repeat center';this.renderer.setStyle(n,"background",i),this.renderer.setStyle(n,"background-size","cover"),e.img.a&&this.renderer.setStyle(n,r+"backdrop-filter","opacity("+e.img.a+")")}}},t.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var n="linear-gradient("+t.ang+"deg, "+t.c1+", "+t.c2;t.c3&&(n+=", "+t.c3),t.c4&&(n+=", "+t.c4),t.c5&&(n+=", "+t.c5);var r=n+=")";this.renderer.setStyle(this.inappHTMLEl,e,r)}},t.prototype.processColourBlock=function(t,e,n){void 0===e&&(e="color"),void 0===n&&(n=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(n,e,t.rgba))},t}(),H=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(t){function e(e,n){return t.call(this,e,n)||this}return H(e,t),e.prototype.processCommonBlocks=function(){t.prototype.processCommonBlocks.call(this),this.processFontBlock(),this.processColourBlock(this.inappElement.color),this.processAlignment()},e.prototype.processFontBlock=function(){var t=this.inappElement.font;t&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(t.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",t.ff),this.renderer.setStyle(this.inappHTMLEl,"line-height",t.lh))},e.prototype.processPart=function(t,e){var n,r=[];e.u&&r.push("underline"),e.st&&r.push("line-through"),r.length||r.push("normal"),this.renderer.setStyle(t,"font-weight",e.b?"bold":"normal"),this.renderer.setStyle(t,"font-style",e.i?"italic":"normal"),this.renderer.setStyle(t,"text-decoration",r.join(" ")),this.renderer.setStyle(t,"color",null!==(n=e.c)&&void 0!==n?n:"inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=w[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(L),G=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return G(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var n,r,i=e.renderer.createElement("span");i.innerHTML=null===(r=null===(n=t.txt)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.replace(/\n/g,"<br />"),e.processPart(i,t),e.renderer.appendChild(e.inappHTMLEl,i)})),this.processCommonBlocks()},e}(j),U=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),V=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return U(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(L),F=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("img"),r.insertElement(),r}return F(e,t),e.prototype.render=function(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","100%"),this.renderer.setStyle(this.inappHTMLEl,"max-height","100%"),this.renderer.setStyle(this.inappHTMLEl,"display","block"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()},e}(L),K=function(){function t(){this.renderer=new C}return t.prototype.render=function(){this.removeInApp();var t=this.renderer.createElement("div");return t.id=s.IN_APP_CONTAINER_NAME,t.classList.add(s.IN_APP_CONTAINER_NAME),this.renderer.setStyle(t,"z-index","10000000"),this.renderer.setStyle(t,"position","fixed"),this.renderer.setStyle(t,"top","0"),this.renderer.setStyle(t,"left","0"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"display","flex"),this.renderer.setStyle(t,"justify-content","center"),this.renderer.setStyle(t,"align-items","center"),this.renderer.appendChild(document.body,t),t},t.prototype.removeInApp=function(){var t=document.getElementById(s.IN_APP_CONTAINER_NAME);t&&t.parentElement.removeChild(t)},t}(),W=function(){function t(){this.renderer=new C}return t.prototype.render=function(t){var e=this.renderer.getElementById(s.IN_APP_CONTAINER_NAME),n=this.createIFrameContainer();return this.createIFrameElement(n,t),this.createAnchorElement(e,n),this.renderer.appendChild(e,n),n},t.prototype.createIFrameContainer=function(){var t=this.renderer.createElement("div");return this.renderer.setAttribute(t,"class","iframe-container"),this.renderer.setAttribute(t,"id","iframe-container"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"top","0px"),this.renderer.setStyle(t,"left","0px"),t},t.prototype.createIFrameElement=function(t,e){var n=this.renderer.createElement("iframe");return this.renderer.setStyle(n,"width","100%"),this.renderer.setStyle(n,"height","100%"),this.renderer.setAttribute(n,"src",e),this.renderer.setAttribute(n,"frameBorder","0"),this.renderer.appendChild(t,n),n},t.prototype.createAnchorElement=function(t,e){var n=this.renderer.createElement("a");return this.renderer.setStyle(n,"position","absolute"),this.renderer.setStyle(n,"top","0px"),this.renderer.setStyle(n,"right","0px"),n.href="#",n.innerHTML="Close",n.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,n),n},t}(),q=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappElement.w=1080,r.inappElement.h=1920,r}return q(e,t),e.prototype.render=function(){return t.prototype.render.call(this),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this},e}(V),X=function(){function t(){this.rootContainer=(new K).render()}return t.prototype.render=function(t){t=new k(t),this.ian=t.ian;try{this.renderContainer(),o.setNumber(s.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),o.setString(s.STORAGE_ACTIVE_TRIGGER_ID,t.id)}catch(t){u.e(t)}},t.prototype.renderElement=function(t,e){e instanceof I?new B(t,e).render():e instanceof _?new z(t,e).render():e instanceof E?new V(t,e).render():u.e("Unsupported element type- "+e.type)},t.prototype.renderContainer=function(){var t,e,n=this,r=null===(t=this.ian)||void 0===t?void 0:t.cont;if(r){var i=new $(this.rootContainer,r).render().getHTMLElement();null===(e=this.ian.elems)||void 0===e||e.forEach((function(t){n.renderElement(i,t)}))}},t}(),J=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},Z=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Y=function(){function t(){this.runtimeData=a.getInstance(),this.apiToken="",this.userID=""}return t.getInstance=function(){return this.INSTANCE},t.prototype.doHTTP=function(t,e,n,r){return J(this,void 0,void 0,(function(){var i;return Z(this,(function(o){switch(o.label){case 0:return e.startsWith("http")||(e=s.API_URL+e),[4,fetch(e,{method:t,body:JSON.stringify(n),headers:r})];case 1:if(!(i=o.sent()).ok)throw i;return[2,i.json()]}}))}))},t.prototype.registerDevice=function(t){return J(this,void 0,void 0,(function(){return Z(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",t,this.getDefaultHeaders())]}))}))},t.prototype.sendEvent=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/event/track",t,e).then((function(e){u.l("Sent",t.name),e.triggerData&&(new X).render(e.triggerData)})).catch((function(t){u.e("Error sending event",t)}))},t.prototype.updateUserData=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/user/update",t,e).then((function(){u.l("Updated user profile")})).catch((function(t){u.e("Error saving user profile",t)}))},t.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/session/conclude",t,e).then((function(t){u.l("Conclude Session",t)})).catch((function(t){u.e(t)}))},t.prototype.getDefaultHeaders=function(){var t=new Headers;return t.set("sdk-version",s.SDK_VERSION),t.set("sdk-version-code",s.SDK_VERSION_CODE.toString()),t.set("app-version",this.runtimeData.getWebAppVersion()),t.set("user-id",this.userID),s.SDK_DEBUG&&t.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&t.set("app-debug",String(1)),t},t.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},t.prototype.setUserId=function(t){this.userID=null!=t?t:""},t.INSTANCE=new t,t}(),Q=function(){function t(){this.sessionManager=tt.getInstance(),this.httpApiService=Y.getInstance()}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.sendEvent=function(t){var e=this;Yt.replaySubject.subscribe((function(){e.addEventVariable(t),e.httpApiService.sendEvent(t)}))},t.prototype.updateProfile=function(t){var e=this;Yt.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},t.prototype.concludeSession=function(t){var e=this;Yt.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},t.prototype.addEventVariable=function(t){t.screenName=location.pathname,t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber()},t}(),tt=function(){function t(){}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.getCurrentSessionID=function(){return this.currentSessionID||null},t.prototype.isNewSessionRequired=function(){if(!o.getString(s.STORAGE_SESSION_ID,""))return!0;var t=o.getNumber(s.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-t)/1e3>s.IDLE_TIME_IN_SECONDS},t.prototype.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},t.prototype.startNewSession=function(){this.currentSessionID||(o.setBoolean(s.STORAGE_SESSION_START_EVENT_SENT,!1),this.currentSessionStartTime=new Date,this.currentSessionID=(new(i())).toHexString(),o.setNumber(s.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),o.setString(s.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber())},t.prototype.bumpSessionNumber=function(){this.currentSessionNumber=o.getNumber(s.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,o.setNumber(s.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},t.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},t.prototype.getTotalDurationInSeconds=function(){if(a.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},t.prototype.conclude=function(){var t={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Q.getInstance().concludeSession(t),this.destroySession()},t.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,o.remove(s.STORAGE_SESSION_ID),o.remove(s.STORAGE_SESSION_START_TIME)},t.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(o.getNumber(s.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=o.getString(s.STORAGE_SESSION_ID,""),this.currentSessionNumber=o.getNumber(s.STORAGE_SESSION_NUMBER,0)},t.prototype.getLastActive=function(){return o.getNumber(s.STORAGE_LAST_ACTIVE,0)},t}(),et=function(t,e,n,r){this.appID=t,this.appSecret=e,this.uuid=n,this.props=r,this.sdk=s.SDK},nt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},rt=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},it=function(){function t(){this.parser=new(R()),this.result={}}return t.prototype.get=function(){return nt(this,void 0,void 0,(function(){var t;return rt(this,(function(e){switch(e.label){case 0:return t=this.result,this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),[4,this.getBatteryInfo()];case 1:return e.sent(),[4,this.getLocation()];case 2:return e.sent(),t.locale=navigator.language,t.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},t.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},t.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},t.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},t.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},[2,t]}}))}))},t.prototype.getDeviceMemory=function(){var t=navigator;if(t.deviceMemory){var e=t.deviceMemory;this.result.mem={tot:1024*e}}},t.prototype.getNetworkType=function(){var t=navigator,e=t.connection||t.mozConnection||t.webkitConnection;(null==e?void 0:e.effectiveType)&&(this.result.net={type:e.effectiveType})},t.prototype.getOrientation=function(){var t,e=null===(t=screen.orientation)||void 0===t?void 0:t.type;e&&(this.result.orientation=e)},t.prototype.getDPI=function(){var t=document.createElement("div");t.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(t);var e=window.devicePixelRatio||1,n=t.offsetWidth*e;return document.body.removeChild(t),n},t.prototype.getLocation=function(){return nt(this,void 0,void 0,(function(){var t=this;return rt(this,(function(e){switch(e.label){case 0:return navigator.geolocation&&navigator.permissions?[4,navigator.permissions.query({name:"geolocation"})]:[2];case 1:return"granted"!=e.sent().state?[2]:[2,new Promise((function(e){navigator.geolocation.getCurrentPosition((function(n){t.result.coords=[n.coords.latitude,n.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return nt(this,void 0,void 0,(function(){var t;return rt(this,(function(e){switch(e.label){case 0:if(!("getBattery"in navigator))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.getBattery()];case 2:return t=e.sent(),this.result.bat={l:100*t.level,c:t.charging},[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},t}(),ot=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},st=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},at=function(){function t(){this.apiService=Y.getInstance(),this.sdkToken="",this.userID="",this.appID="",this.appSecret=""}return t.getInstance=function(){return this.INSTANCE},t.prototype.init=function(t,e){return this.appID=t,this.appSecret=e,this.acquireSDKToken()},t.prototype.hasToken=function(){return!!o.getString(s.STORAGE_SDK_TOKEN,"")},t.prototype.getUserID=function(){return this.userID},t.prototype.populateUserDataFromStorage=function(){return ot(this,void 0,void 0,(function(){return st(this,(function(t){return this.sdkToken=o.getString(s.STORAGE_SDK_TOKEN,""),this.sdkToken||u.l("No SDK token found in local storage"),this.userID=o.getString(s.STORAGE_USER_ID,""),this.userID||u.l("No user ID found in local storage"),this.updateAPIClient(),[2]}))}))},t.prototype.updateAPIClient=function(){u.l("SDK Token:",this.sdkToken),u.l("User ID:",this.userID),this.apiService.setAPIToken(this.sdkToken),this.apiService.setUserId(this.userID)},t.prototype.acquireSDKToken=function(){return ot(this,void 0,void 0,(function(){return st(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(u.l("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},t.prototype.getSDKTokenFromServer=function(){return ot(this,void 0,void 0,(function(){var t,e,n,r;return st(this,(function(i){switch(i.label){case 0:return[4,this.getUserAuthRequest()];case 1:t=i.sent(),e=this.apiService.registerDevice(t),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e];case 3:return n=i.sent(),u.l("Register Device Response",n),this.saveUserDataInStorage(n),[3,5];case 4:throw r=i.sent(),u.e(r),r;case 5:return[2]}}))}))},t.prototype.saveUserDataInStorage=function(t){this.sdkToken=t.sdkToken,this.userID=t.id,this.updateAPIClient(),o.setString(s.STORAGE_SDK_TOKEN,this.sdkToken),o.setString(s.STORAGE_USER_ID,this.userID)},t.prototype.getUserAuthRequest=function(){return ot(this,void 0,void 0,(function(){var t;return st(this,(function(e){switch(e.label){case 0:return[4,(new it).get()];case 1:return t=e.sent(),[2,new et(this.appID,this.appSecret,this.getOrCreateUUID(),t)]}}))}))},t.prototype.getOrCreateUUID=function(){var t=o.getString(s.STORAGE_DEVICE_UUID,"");return t||(t=(new(i())).toHexString(),o.setString(s.STORAGE_DEVICE_UUID,t)),t},t.INSTANCE=new t,t}(),ct=function(t,e){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function ut(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ct(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function lt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function ht(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}function ft(t){return"function"==typeof t}function dt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Object.create,Object.create;var bt=dt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function vt(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var yt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=lt(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(ft(c))try{c()}catch(t){i=t instanceof bt?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=lt(u),p=l.next();!p.done;p=l.next()){var h=p.value;try{mt(h)}catch(t){i=null!=i?i:[],t instanceof bt?i=ht(ht([],pt(i)),pt(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new bt(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)mt(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&vt(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&vt(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),gt=yt.EMPTY;function wt(t){return t instanceof yt||t&&"closed"in t&&ft(t.remove)&&ft(t.add)&&ft(t.unsubscribe)}function mt(t){ft(t)?t():t.unsubscribe()}var St=null,Et=null,Tt=void 0,_t=!1,At=!1,It={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=It.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,ht([],pt(t)))},clearTimeout:function(t){var e=It.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function xt(t){It.setTimeout((function(){if(!St)throw t;St(t)}))}function Ot(){}var Nt=Dt("C",void 0,void 0);function Dt(t,e,n){return{kind:t,value:e,error:n}}var kt=null;function Ct(t){if(_t){var e=!kt;if(e&&(kt={errorThrown:!1,error:null}),t(),e){var n=kt,r=n.errorThrown,i=n.error;if(kt=null,r)throw i}}else t()}function Pt(t){_t&&kt&&(kt.errorThrown=!0,kt.error=t)}var Rt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,wt(e)&&e.add(n)):n.destination=Gt,n}return ut(e,t),e.create=function(t,e,n){return new Mt(t,e,n)},e.prototype.next=function(t){this.isStopped?jt(function(t){return Dt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?jt(Dt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?jt(Nt,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(yt),Mt=function(t){function e(e,n,r){var i,o=t.call(this)||this;if(ft(e))i=e;else if(e){var s;i=e.next,n=e.error,r=e.complete,o&&At?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return o.destination={next:i?Lt(i):Ot,error:Lt(null!=n?n:Ht),complete:r?Lt(r):Ot},o}return ut(e,t),e}(Rt);function Lt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,ht([],pt(e)))}catch(t){_t?Pt(t):xt(t)}}}function Ht(t){throw t}function jt(t,e){var n=Et;n&&It.setTimeout((function(){return n(t,e)}))}var Gt={closed:!0,next:Ot,error:Ht,complete:Ot},Bt="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ut(t){return t}function Vt(t){return 0===t.length?Ut:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Ft=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof Rt||function(t){return t&&ft(t.next)&&ft(t.error)&&ft(t.complete)}(r)&&wt(r)?t:new Mt(t,e,n);return Ct((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=zt(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==i||i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Bt]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Vt(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=zt(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function zt(t){var e;return null!==(e=null!=t?t:Tt)&&void 0!==e?e:Promise}var Kt=dt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Wt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return ut(e,t),e.prototype.lift=function(t){var e=new qt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Kt},e.prototype.next=function(t){var e=this;Ct((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=lt(i),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Ct((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Ct((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=e.hasError,r=e.isStopped,i=e.observers;return n||r?gt:(i.push(t),new yt((function(){return vt(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new Ft;return t.source=this,t},e.create=function(t,e){return new qt(t,e)},e}(Ft),qt=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return ut(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:gt},e}(Wt),$t={now:function(){return($t.delegate||Date).now()},delegate:void 0},Xt=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=$t);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return ut(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}},e}(Wt),Jt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},Zt=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Yt=function(){function e(){this.sessionManager=tt.getInstance(),this.safeHttpCallService=Q.getInstance(),this.userAuthService=at.getInstance()}return e.prototype.init=function(t,n){var r=this;this.userAuthService.init(t,n).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){r.init(t,n)}),3e4)})),this.execute()},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),o.getBoolean(s.STORAGE_SESSION_START_EVENT_SENT,!1)||(o.setBoolean(s.STORAGE_SESSION_START_EVENT_SENT,!0),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():this.sendSuccessiveLaunchEvent())},e.prototype.isAppFirstTimeLaunch=function(){return!!o.getBoolean(s.STORAGE_FIRST_TIME_LAUNCH,!0)&&(o.setBoolean(s.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Jt(this,void 0,void 0,(function(){var e,n;return Zt(this,(function(r){switch(r.label){case 0:return e=new t("CE Web Installed",{}),n=e,[4,(new it).get()];case 1:return n.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(e),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Jt(this,void 0,void 0,(function(){var e,n;return Zt(this,(function(r){switch(r.label){case 0:return e=new t("CE Web Launched",{}),n=e,[4,(new it).get()];case 1:return n.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(e),[2]}}))}))},e.replaySubject=new Xt(1),e}(),Qt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},te=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},ee=function(){function e(){this.apiService=Q.getInstance(),this.runtimeData=a.getInstance()}return e.prototype.listen=function(){var t=this;document.onvisibilitychange=function(){"visible"===document.visibilityState?t.onVisible():"hidden"===document.visibilityState&&t.onHidden()}},e.prototype.onVisible=function(){return Qt(this,void 0,void 0,(function(){var n,r,i,o;return te(this,(function(a){switch(a.label){case 0:return this.runtimeData.setActive(),(n=this.runtimeData.getTimeForInactiveInSeconds())>s.IDLE_TIME_IN_SECONDS&&(tt.getInstance().conclude(),(new Yt).execute()),(r={})[e.INACTIVE_DURATION]=n,i=new t("CE Web Active",r),o=i,[4,(new it).get()];case 1:return o.deviceProps=a.sent(),this.apiService.sendEvent(i),[2]}}))}))},e.prototype.onHidden=function(){return Qt(this,void 0,void 0,(function(){var n,r;return te(this,(function(i){return this.runtimeData.setInactive(),n=this.runtimeData.getTimeForActiveInSeconds(),(r={})[e.ACTIVE_DURATION]=n,this.apiService.sendEvent(new t("CE Web Inactive",r)),[2]}))}))},e.ACTIVE_DURATION="aDur",e.INACTIVE_DURATION="iaDur",e}(),ne=function(){function e(){this.apiService=Q.getInstance()}return e.prototype.listen=function(){var e=this;window.onpageshow=function(){e.apiService.sendEvent(new t("CE Screen View",{screenName:location.pathname}))}},e}(),re=function(){function t(){this.existingSDKObject=window.CooeeSDK}return t.prototype.meddle=function(){var t,e,n;this.existingSDKObject||(this.existingSDKObject=window.CooeeSDK={events:[],profile:[],account:[]}),this.existingSDKObject.account=null!==(t=this.existingSDKObject.account)&&void 0!==t?t:[],this.existingSDKObject.profile=null!==(e=this.existingSDKObject.profile)&&void 0!==e?e:[],this.existingSDKObject.events=null!==(n=this.existingSDKObject.events)&&void 0!==n?n:[],this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.existingSDKObject.account.forEach(this.processAccount),this.existingSDKObject.events.forEach(this.processEvent),this.existingSDKObject.profile.forEach(this.processProfile)},t.prototype.overwritePush=function(t,e){Object.defineProperty(t,"push",{enumerable:!1,configurable:!1,writable:!1,value:e})},t.prototype.meddleAccount=function(){var t=this;this.overwritePush(this.existingSDKObject.account,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.processAccount(e[0])}))},t.prototype.meddleEvents=function(){var t=this;this.overwritePush(this.existingSDKObject.events,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.processEvent(e[0])}))},t.prototype.meddleProfile=function(){var t=this;this.overwritePush(this.existingSDKObject.profile,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.processProfile(e[0])}))},t.prototype.processAccount=function(t){if(t){var e=Object.keys(t);e.includes("appID")?oe.init(t.appID,t.appSecret):e.includes("appVersion")?oe.setWebAppVersion(t.appVersion):e.includes("debug")&&oe.setDebug(t.debug)}},t.prototype.processEvent=function(t){t&&oe.sendEvent(t[0],t[1])},t.prototype.processProfile=function(t){t&&oe.updateProfile(t)},t}(),ie=function(){function t(){}return t.prototype.init=function(){(new ee).listen(),(new ne).listen(),(new re).meddle()},t}(),oe=function(){function e(){this.runtimeData=a.getInstance(),this.safeHttpCallService=Q.getInstance(),this.newSessionExecutor=new Yt}return e.init=function(t,e){this.INSTANCE.newSessionExecutor.init(t,e)},e.setWebAppVersion=function(t){this.INSTANCE.runtimeData.setWebAppVersion(t)},e.setDebug=function(t){this.INSTANCE.runtimeData.setDebugWebApp(t)},e.sendEvent=function(e,n){for(var r in n)if(r.length>3&&r.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");this.INSTANCE.safeHttpCallService.sendEvent(new t(e,n))},e.updateProfile=function(t){for(var e in t)if(e.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");this.INSTANCE.safeHttpCallService.updateProfile(t)},e.INSTANCE=new e,e}();(new ie).init();var se=oe}();var i=CooeeSDK="undefined"==typeof CooeeSDK?{}:CooeeSDK,o=r.default;for(var s in o)i[s]=o[s];o.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})}();
package/dist/utils/log.js CHANGED
@@ -1,7 +1,11 @@
1
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
2
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3
- to[j] = from[i];
4
- return to;
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
5
9
  };
6
10
  import { Constants } from '../constants';
7
11
  /**
@@ -23,7 +27,7 @@ var Log = /** @class */ (function () {
23
27
  for (var _i = 0; _i < arguments.length; _i++) {
24
28
  messages[_i] = arguments[_i];
25
29
  }
26
- console.log.apply(console, __spreadArray([Constants.LOG_PREFIX, ':'], messages));
30
+ console.log.apply(console, __spreadArray([Constants.LOG_PREFIX, ':'], messages, false));
27
31
  };
28
32
  /**
29
33
  * Log error messages.
@@ -35,7 +39,7 @@ var Log = /** @class */ (function () {
35
39
  for (var _i = 0; _i < arguments.length; _i++) {
36
40
  messages[_i] = arguments[_i];
37
41
  }
38
- console.error.apply(console, __spreadArray([Constants.LOG_PREFIX, ':'], messages));
42
+ console.error.apply(console, __spreadArray([Constants.LOG_PREFIX, ':'], messages, false));
39
43
  };
40
44
  /**
41
45
  * Log warning messages.
@@ -47,7 +51,7 @@ var Log = /** @class */ (function () {
47
51
  for (var _i = 0; _i < arguments.length; _i++) {
48
52
  messages[_i] = arguments[_i];
49
53
  }
50
- console.warn.apply(console, __spreadArray([Constants.LOG_PREFIX, ':'], messages));
54
+ console.warn.apply(console, __spreadArray([Constants.LOG_PREFIX, ':'], messages, false));
51
55
  };
52
56
  return Log;
53
57
  }());
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@letscooee/web-sdk",
3
3
  "description": "Hyperpersonalised Mobile/Web App Re-Engagement via Machine Learning",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "scripts": {
6
6
  "lint": "eslint 'src/**'",
7
7
  "prepare": "npm run build",
@@ -36,7 +36,7 @@
36
36
  "eslint": "^7.32.0",
37
37
  "eslint-config-google": "^0.14.0",
38
38
  "ts-loader": "^9.2.4",
39
- "typescript": "^4.3.5",
39
+ "typescript": "^4.4.4",
40
40
  "webpack": "^5.47.1",
41
41
  "webpack-cli": "^4.7.2",
42
42
  "webpack-dev-server": "^4.1.1"