apxor-rtm-ui 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6394,7 +6394,8 @@
6394
6394
  BOTTOM_RIGHT: "bottom-right",
6395
6395
  TOP_CENTER: "top-center",
6396
6396
  BOTTOM_CENTER: "bottom-center",
6397
- CENTER: "center"
6397
+ CENTER: "center",
6398
+ FULL_SCREEN: "full-screen"
6398
6399
  };
6399
6400
  var imgWrapperStyles = {
6400
6401
  "margin-left": "marginLeft",
@@ -6560,7 +6561,7 @@
6560
6561
  * @returns
6561
6562
  */
6562
6563
  var _setFontFaceAtRule = function _setFontFaceAtRule(font) {
6563
- if (!font.source || font.source === "url") {
6564
+ if (!font.source || font.source === "url" || font.source === "name") {
6564
6565
  return [font.family, ""];
6565
6566
  }
6566
6567
  var src;
@@ -7003,6 +7004,88 @@
7003
7004
  });
7004
7005
  return "\n div .".concat(position, "-buttons-container {\n width:100%;\n display: flex;\n flex-direction:").concat(button_direction === DIRECTION.VERTICAL && position === BUTTON_CONTAINER_POSITION.BOTTOM ? "column" : "row", ";\n justify-content:").concat(justifyContent, ";\n align-items:").concat(button_direction === DIRECTION.HORIZONTAL ? "center" : getButtonPosition(button_alignment), ";\n flex-wrap:wrap;\n }\n ").concat(buttons, "\n ");
7005
7006
  };
7007
+ var setImgAction = function setImgAction(action_config, ActionHandler, uuid, name) {
7008
+ var configType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : EVENT_PREFIX.INAPP;
7009
+ var action = function action() {};
7010
+ var _action = action_config === null || action_config === void 0 ? void 0 : action_config.action;
7011
+ try {
7012
+ switch (_action) {
7013
+ case "done":
7014
+ case "dismiss":
7015
+ action = function action() {
7016
+ ActionHandler.complete(false, "dismiss");
7017
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7018
+ };
7019
+ break;
7020
+ case "redirect":
7021
+ action = function action() {
7022
+ var _window$Apxor;
7023
+ if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
7024
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7025
+ ActionHandler.complete(false, "redirect");
7026
+ window.Apxor.redirectTo(JSON.stringify(action_config));
7027
+ var type = configType.toLowerCase();
7028
+ window.Apxor.logActionEvent("".concat(type, "dismissed"), uuid, name);
7029
+ } else {
7030
+ ActionHandler.complete(true, "redirect");
7031
+ window.Apxor.redirectTo("IN_APP", uuid, name, "img", JSON.stringify(action_config));
7032
+ }
7033
+ // if (redirectWithin || isExternal) {
7034
+ // window.open(url, redirectWithin ? "_self" : "_blank");
7035
+ // } else {
7036
+ // rtmInstance.logClientEvent("REDIRECT", { url });
7037
+ // }
7038
+ };
7039
+
7040
+ break;
7041
+ case "cancel":
7042
+ action = function action() {
7043
+ ActionHandler.cancel(true, "cancel");
7044
+ ActionHandler._isCancelled = true;
7045
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7046
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7047
+ };
7048
+ break;
7049
+ // case "submit":
7050
+ // action = () => {
7051
+ // ActionHandler.complete(false, "submit");
7052
+ // window.Apxor.logActionEvent(
7053
+ // configType + "img" + "_Clicked",
7054
+ // uuid,
7055
+ // name
7056
+ // );
7057
+ // };
7058
+ // break;
7059
+ // case "skip":
7060
+ // action = () => {
7061
+ // ActionHandler.complete(false, "skip");
7062
+ // window.Apxor.logActionEvent(
7063
+ // configType + "img" + "_Clicked",
7064
+ // uuid,
7065
+ // name
7066
+ // );
7067
+ // };
7068
+ // break;
7069
+ case "never":
7070
+ action = function action() {
7071
+ ActionHandler.cancel(true, "cancel");
7072
+ ActionHandler._isCancelled = true;
7073
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7074
+ window.Apxor.neverShow(uuid, name, "IN_APP");
7075
+ window.Apxor.logActionEvent("never_show_clicked", uuid, name);
7076
+ };
7077
+ break;
7078
+ default:
7079
+ action = function action() {
7080
+ ActionHandler.cancel(false, "cancel");
7081
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7082
+ };
7083
+ }
7084
+ } catch (e) {
7085
+ console.error("Error setting actions on the image:" + e);
7086
+ }
7087
+ return action;
7088
+ };
7006
7089
  var generateButtonsFromConfig = function generateButtonsFromConfig() {
7007
7090
  var buttons_config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
7008
7091
  var ActionHandler = arguments.length > 1 ? arguments[1] : undefined;
@@ -7095,8 +7178,8 @@
7095
7178
  break;
7096
7179
  case "redirect":
7097
7180
  action = function action() {
7098
- var _window$Apxor;
7099
- if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
7181
+ var _window$Apxor2;
7182
+ if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
7100
7183
  window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7101
7184
  ActionHandler.complete(false, "redirect");
7102
7185
  window.Apxor.redirectTo(JSON.stringify(action_config));
@@ -11677,8 +11760,8 @@
11677
11760
  var _this = this,
11678
11761
  _config$termination;
11679
11762
  _classCallCheck(this, TemplateContent);
11680
- _defineProperty(this, "icGM", function () {
11681
- var element = _this.rjYg(_this.layout);
11763
+ _defineProperty(this, "KyAi", function () {
11764
+ var element = _this.HjRo(_this.layout);
11682
11765
  //document.body.appendChild(element);
11683
11766
  var tooltipStyles = document.createElement("style");
11684
11767
  tooltipStyles.innerHTML = _this.initialStyles;
@@ -11694,7 +11777,7 @@
11694
11777
  }
11695
11778
  return element;
11696
11779
  });
11697
- _defineProperty(this, "rjYg", function (config) {
11780
+ _defineProperty(this, "HjRo", function (config) {
11698
11781
  var _window$Apxor;
11699
11782
  var element;
11700
11783
  switch (config.type) {
@@ -11825,7 +11908,7 @@
11825
11908
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
11826
11909
  element.style.position = "relative";
11827
11910
  config.absolute_position_children.forEach(function (childConfig) {
11828
- var childElement = _this.rjYg(childConfig);
11911
+ var childElement = _this.HjRo(childConfig);
11829
11912
  childElement.style.position = "absolute";
11830
11913
  for (var _prop in childConfig.offset) {
11831
11914
  childElement.style[_prop] = childConfig.offset[_prop];
@@ -11843,7 +11926,7 @@
11843
11926
  // }
11844
11927
 
11845
11928
  config.children.forEach(function (childConfig) {
11846
- var childElement = _this.rjYg(childConfig);
11929
+ var childElement = _this.HjRo(childConfig);
11847
11930
  element.appendChild(childElement);
11848
11931
  });
11849
11932
  }
@@ -12746,7 +12829,7 @@
12746
12829
  }, {
12747
12830
  key: "_setInLineContent",
12748
12831
  value: function _setInLineContent() {
12749
- this.inLineContainer = this.templateContent.icGM();
12832
+ this.inLineContainer = this.templateContent.KyAi();
12750
12833
  }
12751
12834
  }, {
12752
12835
  key: "_setObservors",
@@ -13313,6 +13396,8 @@
13313
13396
  this.background_image = new BackgroundImage(data.background_image);
13314
13397
  this.enable_border = data.enable_border;
13315
13398
  this.border = new Border(data.border);
13399
+ this.enable_action = data === null || data === void 0 ? void 0 : data.enable_action;
13400
+ if (this.enable_action) this.action = data === null || data === void 0 ? void 0 : data.action;
13316
13401
  }
13317
13402
  _createClass(Image, null, [{
13318
13403
  key: "isEnabled",
@@ -14294,7 +14379,7 @@
14294
14379
  * @description Creates the styles for Marketing message.
14295
14380
  * @returns {string} css styles
14296
14381
  */
14297
- _defineProperty(this, "Bexb", function () {
14382
+ _defineProperty(this, "VrCy", function () {
14298
14383
  if (!_this.enable_marketing) {
14299
14384
  return "";
14300
14385
  }
@@ -14313,7 +14398,7 @@
14313
14398
  * @private
14314
14399
  * @description Sets the marketing content at the end of the Inline
14315
14400
  */
14316
- _defineProperty(this, "HBbG", function () {
14401
+ _defineProperty(this, "wQRV", function () {
14317
14402
  if (_this.enable_marketing) {
14318
14403
  var marketingContainer = document.createElement("div");
14319
14404
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -14793,12 +14878,16 @@
14793
14878
  this._setDimenstionFromResolution(this.video.width, this.video.height, scale, calculateFromHeight);
14794
14879
  }
14795
14880
  } else if (this.enable_icon) {
14796
- if (this.direction.nudge === DIRECTION.VERTICAL) {
14797
- this.inline_width = "".concat(this.getPixelsFromPercentage(this.width, false), "px");
14798
- } else {
14799
- //this.inline_height = `${this.height}%`;
14800
- this.min_width = "".concat(this.getPixelsFromPercentage(this.width, false), "px");
14801
- }
14881
+ this.inline_width = "".concat(this.getPixelsFromPercentage(this.width, false), "px");
14882
+ // if (this.direction.nudge === DIRECTION.VERTICAL) {
14883
+ // this.inline_width = `${this.getPixelsFromPercentage(
14884
+ // this.width,
14885
+ // false
14886
+ // )}px`;
14887
+ // } else {
14888
+ // //this.inline_height = `${this.height}%`;
14889
+ // this.min_width = `${this.getPixelsFromPercentage(this.width, false)}px`;
14890
+ // }
14802
14891
  } else {
14803
14892
  if (this.direction.nudge === DIRECTION.VERTICAL) {
14804
14893
  this.inline_width = "".concat(this.getPixelsFromPercentage(this.width, false), "px");
@@ -14915,7 +15004,7 @@
14915
15004
  if (apxor_tooltip_styles) {
14916
15005
  return;
14917
15006
  }
14918
- var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.Bexb(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15007
+ var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.VrCy(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
14919
15008
  var styleNode = document.createElement("style");
14920
15009
  styleNode.setAttribute("apx-tooltip-styles", "");
14921
15010
  styleNode.innerHTML = styles;
@@ -15725,7 +15814,7 @@
15725
15814
  this._setCloseButton();
15726
15815
 
15727
15816
  //Set the Marketing content
15728
- this.HBbG();
15817
+ this.wQRV();
15729
15818
  }
15730
15819
 
15731
15820
  /**
@@ -18570,7 +18659,7 @@
18570
18659
  }, {
18571
18660
  key: "_setInAppModalContent",
18572
18661
  value: function _setInAppModalContent() {
18573
- this.inAppContainer = this.templateContent.icGM();
18662
+ this.inAppContainer = this.templateContent.KyAi();
18574
18663
  this.inAppContainer.style.zIndex = 99999;
18575
18664
  this.overlayElement.appendChild(this.inAppContainer);
18576
18665
  }
@@ -18718,7 +18807,7 @@
18718
18807
  * @description Creates the styles for Marketing message.
18719
18808
  * @returns {string} css styles
18720
18809
  */
18721
- _defineProperty(this, "Bexb", function () {
18810
+ _defineProperty(this, "VrCy", function () {
18722
18811
  if (!_this.enable_marketing) {
18723
18812
  return "";
18724
18813
  }
@@ -18764,7 +18853,7 @@
18764
18853
  * @private
18765
18854
  * @description Get the response for Form content in the InApp modal.
18766
18855
  */
18767
- _defineProperty(this, "zoJq", function (form_elements) {
18856
+ _defineProperty(this, "UrBX", function (form_elements) {
18768
18857
  var obj = {};
18769
18858
  var callback = "";
18770
18859
  form_elements.forEach(function (element) {
@@ -18804,7 +18893,7 @@
18804
18893
  * @private
18805
18894
  * @description Sets the marketing content at the end of the InApp
18806
18895
  */
18807
- _defineProperty(this, "HBbG", function () {
18896
+ _defineProperty(this, "wQRV", function () {
18808
18897
  if (_this.enable_marketing) {
18809
18898
  var marketingContainer = document.createElement("div");
18810
18899
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -19057,7 +19146,7 @@
19057
19146
  }, {
19058
19147
  key: "_setStyles",
19059
19148
  value: function _setStyles() {
19060
- var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInAppContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInAppMediaContainerStyles(), "\n ").concat(this._getInAppNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getFormStyles(), "\n ").concat(this._getInAppButtonContainerStyles(), "\n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.Bexb(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19149
+ var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInAppContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInAppMediaContainerStyles(), "\n ").concat(this._getInAppNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getFormStyles(), "\n ").concat(this._getInAppButtonContainerStyles(), "\n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.VrCy(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19061
19150
  var styleNode = document.createElement("style");
19062
19151
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
19063
19152
  styleNode.innerHTML = styles;
@@ -19147,6 +19236,9 @@
19147
19236
  case INAPP_POSITION.CENTER:
19148
19237
  positionStylesForContainer = "\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n ";
19149
19238
  break;
19239
+ case INAPP_POSITION.FULL_SCREEN:
19240
+ positionStylesForContainer = "\n top: 0px;\n left: 0px;\n ";
19241
+ break;
19150
19242
  default:
19151
19243
  positionStylesForContainer = "\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n ";
19152
19244
  break;
@@ -19175,7 +19267,7 @@
19175
19267
  flexStylesForContainer = " ".concat(flexStylesForContainer, "\n justify-content:space-evenly;\n align-items:center;\n display:flex;\n ");
19176
19268
  var maxWidth = "",
19177
19269
  maxHeight = "",
19178
- margin = "margin: auto";
19270
+ margin = "margin: auto;";
19179
19271
  if (this.direction.nudge === DIRECTION.HORIZONTAL) {
19180
19272
  if (!(this.enable_image || this.enable_video || this.enable_icon)) {
19181
19273
  maxWidth = "max-width: ".concat(this.max_width);
@@ -19193,7 +19285,7 @@
19193
19285
  }
19194
19286
  //justify-content: space-evenly;
19195
19287
  //align-items:stretch
19196
- var inappContainerStyles = "\n .apx-inapp-container".concat(this.cssPostFix, " {\n height:").concat(this.inapp_height, ";\n width:").concat(this.inapp_width, ";\n background-color:").concat(this.background_color, ";\n z-index:9999;\n opacity:0;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:fixed;\n visibility:hidden;\n\n ").concat(minWidthStyle, "\n ").concat(flexStylesForContainer, "\n ").concat(paddingStylesForContainer, "\n ").concat(borderStylesForContainer, "\n ").concat(gradientStylesForContainer, "\n ").concat(shadowStylesForContainer, "\n ").concat(positionStylesForContainer, "\n ").concat(maxWidth, "\n ").concat(maxHeight, "\n ").concat(margin, "\n }\n \n .apx-inapp-container").concat(this.cssPostFix, ".open{\n opacity:1;\n visibility:visible;\n }\n ");
19288
+ var inappContainerStyles = "\n .apx-inapp-container".concat(this.cssPostFix, " {\n height:").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "100%" : this.inapp_height, ";\n width:").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "100%" : this.inapp_width, ";\n background-color:").concat(this.background_color, ";\n z-index:9999;\n opacity:0;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:fixed;\n visibility:hidden;\n\n ").concat(minWidthStyle, "\n ").concat(flexStylesForContainer, "\n ").concat(paddingStylesForContainer, "\n ").concat(borderStylesForContainer, "\n ").concat(gradientStylesForContainer, "\n ").concat(shadowStylesForContainer, "\n ").concat(positionStylesForContainer, "\n ").concat(maxWidth, "\n ").concat(maxHeight, "\n ").concat(margin, "\n ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "box-sizing: border-box" : "", "\n }\n \n .apx-inapp-container").concat(this.cssPostFix, ".open{\n opacity:1;\n visibility:visible;\n }\n ");
19197
19289
  return inappContainerStyles;
19198
19290
  }
19199
19291
 
@@ -19246,7 +19338,7 @@
19246
19338
  }, {
19247
19339
  key: "_getInAppMediaContainerStyles",
19248
19340
  value: function _getInAppMediaContainerStyles() {
19249
- var inappMediaContainerStyles = "\n .apx-inapp-media-container".concat(this.cssPostFix, "{\n ").concat(this.enable_icon ? "align-self:".concat(this.icon.alignment, ";") : "", "\n ").concat(this.enable_image || this.enable_video ? "display:flex;" : "", "\n }");
19341
+ var inappMediaContainerStyles = "\n .apx-inapp-media-container".concat(this.cssPostFix, "{\n ").concat(this.enable_icon ? "align-self:".concat(this.icon.alignment, ";") : "", "\n ").concat(this.enable_image || this.enable_video ? "display:flex;" : "", "\n ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN && (this.enable_image || this.enable_video) ? "flex-grow:1" : "", "\n }");
19250
19342
  return inappMediaContainerStyles;
19251
19343
  }
19252
19344
 
@@ -19423,7 +19515,7 @@
19423
19515
  if (this.image.enable_border) {
19424
19516
  imageBorderStyles = "\n border-radius:".concat(this.image.border.radius, "%;\n border:").concat(this.image.border.width, "px ").concat(this.image.border.style, " ").concat(this.image.border.color, ";\n ");
19425
19517
  }
19426
- imageStyles = "\n .apx-inapp-image".concat(this.cssPostFix, "{\n height: ").concat(this.media_height, ";\n width: ").concat(this.media_width, ";\n ").concat(imageBorderStyles, "\n }\n ");
19518
+ imageStyles = "\n .apx-inapp-image".concat(this.cssPostFix, "{\n height: ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "100%" : this.media_height, ";\n width: ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "100%" : this.media_width, ";\n ").concat(imageBorderStyles, "\n ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "box-sizing: border-box;" : "", "\n }\n ");
19427
19519
  }
19428
19520
  }
19429
19521
  return imageStyles;
@@ -19534,7 +19626,7 @@
19534
19626
  this._setCloseButton();
19535
19627
 
19536
19628
  //Set the Marketing content
19537
- this.HBbG();
19629
+ this.wQRV();
19538
19630
  }
19539
19631
 
19540
19632
  /**
@@ -19577,15 +19669,42 @@
19577
19669
  }, {
19578
19670
  key: "_setImageOptions",
19579
19671
  value: function _setImageOptions() {
19672
+ var _this4 = this;
19580
19673
  if (this.enable_image) {
19674
+ var action;
19675
+ if (this.image.enable_action) {
19676
+ var overlay = this.overlayElement;
19677
+ var actionCallback = function actionCallback(isCancelled, action) {
19678
+ clearTimeout(_this4.terminationTimeoutId);
19679
+ _this4.closeCallback(overlay, action, "new-inline".concat(_this4.cssPostFix), _this4.closeListener, _this4.redirectionListener);
19680
+ };
19681
+ var next_Callback = function next_Callback(id, action) {
19682
+ actionCallback(false, "next");
19683
+ _this4.stepperCallBack(id, action);
19684
+ };
19685
+ var prev_Callback = function prev_Callback(id, action) {
19686
+ actionCallback(false, "prev");
19687
+ _this4.stepperCallBack(id, action);
19688
+ };
19689
+ var actionHandler = {
19690
+ next: next_Callback,
19691
+ prev: prev_Callback,
19692
+ complete: actionCallback,
19693
+ cancel: actionCallback,
19694
+ _isCancelled: false,
19695
+ action: ""
19696
+ };
19697
+ action = setImgAction(this.image.action, actionHandler, this.configId, this.name);
19698
+ }
19581
19699
  if (this.image.enable_background_image) {
19582
19700
  this.inAppContainer.classList.add("apx-inapp-image".concat(this.cssPostFix));
19583
19701
  } else {
19584
- //const imgDiv = document.createElement("div");
19585
19702
  var imgElement = document.createElement("img");
19586
19703
  imgElement.src = this.image.path;
19587
19704
  imgElement.classList.add("apx-inapp-image".concat(this.cssPostFix));
19588
- //imgDiv.appendChild(imgElement);
19705
+ if (this.image.enable_action) imgElement.onclick = function () {
19706
+ return action();
19707
+ };
19589
19708
  this.mediaContainer.appendChild(imgElement);
19590
19709
  }
19591
19710
  }
@@ -19725,7 +19844,7 @@
19725
19844
  * @description Sets the form content in the InApp modal.
19726
19845
  */
19727
19846
  function _setFormContent() {
19728
- var _this4 = this;
19847
+ var _this5 = this;
19729
19848
  if (this.enable_form) {
19730
19849
  var _this$form$elements;
19731
19850
  var formContainer = document.createElement("form");
@@ -19739,14 +19858,14 @@
19739
19858
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
19740
19859
  form.addEventListener("submit", function (e) {
19741
19860
  e.preventDefault();
19742
- var _this4$generateRespon = _this4.zoJq(_this4.form.elements),
19743
- obj = _this4$generateRespon.obj,
19744
- callback = _this4$generateRespon.callback;
19861
+ var _this5$generateRespon = _this5.UrBX(_this5.form.elements),
19862
+ obj = _this5$generateRespon.obj,
19863
+ callback = _this5$generateRespon.callback;
19745
19864
  var evalString = "(obj)=>" + callback + "(obj)";
19746
19865
  var evalFunction = eval(evalString);
19747
19866
  evalFunction(obj);
19748
- clearTimeout(_this4.terminationTimeoutId);
19749
- _this4.closeCallback(_this4.overlayElement, "dismiss", ".apx-inapp-container".concat(_this4.cssPostFix), _this4.closeListener, _this4.redirectionListener);
19867
+ clearTimeout(_this5.terminationTimeoutId);
19868
+ _this5.closeCallback(_this5.overlayElement, "dismiss", ".apx-inapp-container".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
19750
19869
  });
19751
19870
  }
19752
19871
  }
@@ -19846,23 +19965,23 @@
19846
19965
  }, {
19847
19966
  key: "_setButtons",
19848
19967
  value: function _setButtons(position) {
19849
- var _this5 = this;
19968
+ var _this6 = this;
19850
19969
  if (!this.enable_buttons) {
19851
19970
  return;
19852
19971
  }
19853
19972
  if (position === BUTTON_CONTAINER_POSITION.TOP && this.buttons.enable_top || position === BUTTON_CONTAINER_POSITION.CENTER && this.buttons.enable_center || position === BUTTON_CONTAINER_POSITION.BOTTOM && this.buttons.enable_bottom) {
19854
19973
  var overlay = this.overlayElement;
19855
19974
  var actionCallback = function actionCallback(isCancelled, action) {
19856
- clearTimeout(_this5.terminationTimeoutId);
19857
- _this5.closeCallback(overlay, action, "new-inline".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
19975
+ clearTimeout(_this6.terminationTimeoutId);
19976
+ _this6.closeCallback(overlay, action, "new-inline".concat(_this6.cssPostFix), _this6.closeListener, _this6.redirectionListener);
19858
19977
  };
19859
19978
  var next_Callback = function next_Callback(id, action) {
19860
19979
  actionCallback(false, "next");
19861
- _this5.stepperCallBack(id, action);
19980
+ _this6.stepperCallBack(id, action);
19862
19981
  };
19863
19982
  var prev_Callback = function prev_Callback(id, action) {
19864
19983
  actionCallback(false, "prev");
19865
- _this5.stepperCallBack(id, action);
19984
+ _this6.stepperCallBack(id, action);
19866
19985
  };
19867
19986
  var actionHandler = {
19868
19987
  next: next_Callback,
@@ -19904,7 +20023,7 @@
19904
20023
  }, {
19905
20024
  key: "_setCloseButton",
19906
20025
  value: function _setCloseButton() {
19907
- var _this6 = this;
20026
+ var _this7 = this;
19908
20027
  if (this.enable_close_button) {
19909
20028
  var closeButton = document.createElement("span");
19910
20029
  // Close button SVG is decided based on the type of the button in the config.
@@ -19921,13 +20040,13 @@
19921
20040
  }
19922
20041
  closeButton.classList.add("apx-inapp-close".concat(this.cssPostFix));
19923
20042
  closeButton.addEventListener("click", function () {
19924
- if (_this6.close_button.action === "dismiss") {
19925
- window.Apxor.logActionEvent(EVENT_PREFIX.INAPP + "InAppXIconClicked" + "_Clicked", _this6.configId, _this6.name);
19926
- } else if (_this6.close_button.action === "cancel") {
19927
- window.Apxor.logActionEvent("walk_through_cancelled", _this6.configId, _this6.name);
20043
+ if (_this7.close_button.action === "dismiss") {
20044
+ window.Apxor.logActionEvent(EVENT_PREFIX.INAPP + "InAppXIconClicked" + "_Clicked", _this7.configId, _this7.name);
20045
+ } else if (_this7.close_button.action === "cancel") {
20046
+ window.Apxor.logActionEvent("walk_through_cancelled", _this7.configId, _this7.name);
19928
20047
  }
19929
- clearTimeout(_this6.terminationTimeoutId);
19930
- _this6.closeCallback(_this6.overlayElement, _this6.close_button.action, ".apx-inapp-container".concat(_this6.cssPostFix), _this6.closeListener, _this6.redirectionListener);
20048
+ clearTimeout(_this7.terminationTimeoutId);
20049
+ _this7.closeCallback(_this7.overlayElement, _this7.close_button.action, ".apx-inapp-container".concat(_this7.cssPostFix), _this7.closeListener, _this7.redirectionListener);
19931
20050
  });
19932
20051
  this.direction.non_media === DIRECTION.VERTICAL || this.direction.nudge === DIRECTION.VERTICAL ? this.inAppContainer.appendChild(closeButton) : this.buttonContainer.appendChild(closeButton);
19933
20052
  }
@@ -19941,10 +20060,10 @@
19941
20060
  * @description If the auto dismiss is enabled, sets the timeout to call the InApp close.
19942
20061
  */
19943
20062
  function _setAutoTerminate() {
19944
- var _this7 = this;
20063
+ var _this8 = this;
19945
20064
  if (this.terminationConfig.auto_dismiss === true) {
19946
20065
  this.terminationTimeoutId = window.setTimeout(function () {
19947
- _this7.closeCallback(_this7.overlayElement, "dismiss", ".apx-inapp-container".concat(_this7.cssPostFix), _this7.closeListener, _this7.redirectionListener);
20066
+ _this8.closeCallback(_this8.overlayElement, "dismiss", ".apx-inapp-container".concat(_this8.cssPostFix), _this8.closeListener, _this8.redirectionListener);
19948
20067
  }, this.terminationConfig.duration);
19949
20068
  }
19950
20069
  }
@@ -20097,7 +20216,7 @@
20097
20216
  };
20098
20217
  } else {
20099
20218
  // As the video player is hidden by default, unhide if the mode is not PIP.
20100
- _this.sVSe();
20219
+ _this.lZpS();
20101
20220
  }
20102
20221
  _this.showCallback();
20103
20222
  } catch (e) {
@@ -20118,7 +20237,7 @@
20118
20237
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
20119
20238
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
20120
20239
  */
20121
- _defineProperty(this, "prNI", function () {
20240
+ _defineProperty(this, "Bntg", function () {
20122
20241
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
20123
20242
  width = _getHeightWidthFromRe.width,
20124
20243
  height = _getHeightWidthFromRe.height;
@@ -20130,7 +20249,7 @@
20130
20249
  * @private
20131
20250
  * @description Removes the video player style element.
20132
20251
  */
20133
- _defineProperty(this, "RLKV", function () {
20252
+ _defineProperty(this, "mCTB", function () {
20134
20253
  var playerStyles = document.getElementById("apx-mpl-styles");
20135
20254
  if (playerStyles) {
20136
20255
  playerStyles.remove();
@@ -20141,7 +20260,7 @@
20141
20260
  * @private
20142
20261
  * @description Attach listeners on the video controls
20143
20262
  */
20144
- _defineProperty(this, "noqy", function () {
20263
+ _defineProperty(this, "vJMI", function () {
20145
20264
  // Listener for the video end. Display the CTA's when the video ends.
20146
20265
  _this.videoElement.addEventListener("ended", function () {
20147
20266
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -20256,7 +20375,7 @@
20256
20375
  * @private
20257
20376
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
20258
20377
  */
20259
- _defineProperty(this, "xxeD", function () {
20378
+ _defineProperty(this, "sHYh", function () {
20260
20379
  var _this$terminationConf;
20261
20380
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
20262
20381
  // On Exit of the PIP,
@@ -20296,7 +20415,7 @@
20296
20415
  * @private Sets the custom controls on the video player.
20297
20416
  * PIP and close are the custom controls that are created and positions on the video.
20298
20417
  */
20299
- _defineProperty(this, "mztc", function () {
20418
+ _defineProperty(this, "WaDM", function () {
20300
20419
  _this.enable_close_button;
20301
20420
  if (_this.enable_close_button) {
20302
20421
  var closeButton = document.createElement("span");
@@ -20343,21 +20462,21 @@
20343
20462
  * @function hideVideoPlayer
20344
20463
  * @description Sets the visibility of the video player to hidden.
20345
20464
  */
20346
- _defineProperty(this, "wKGa", function () {
20465
+ _defineProperty(this, "TNFE", function () {
20347
20466
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
20348
20467
  });
20349
20468
  /**
20350
20469
  * @function unhideVideoPlayer
20351
20470
  * @description Unhides video player.
20352
20471
  */
20353
- _defineProperty(this, "sVSe", function () {
20472
+ _defineProperty(this, "lZpS", function () {
20354
20473
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
20355
20474
  });
20356
20475
  /**
20357
20476
  * @function getVideoElement
20358
20477
  * @returns {HTMLElement} Video ekement
20359
20478
  */
20360
- _defineProperty(this, "HjnS", function () {
20479
+ _defineProperty(this, "FXhx", function () {
20361
20480
  return _this.videoElement;
20362
20481
  });
20363
20482
  this.videoPlayer = null;
@@ -20409,7 +20528,7 @@
20409
20528
  this.videoPlayer.style.backgroundColor = this.bg_color;
20410
20529
 
20411
20530
  // Video has a resolution, not deviating from the resolution set the height and width.
20412
- this.prNI();
20531
+ this.Bntg();
20413
20532
  //Generate the styles and add them to the document head.
20414
20533
  this._setVideoPlayerStyles();
20415
20534
  //Set the position of the video player with in the 5 possible positions.
@@ -20417,16 +20536,16 @@
20417
20536
  //Create a video element,set the source and add to the container.
20418
20537
  this._setPlayerContent();
20419
20538
  //Set the listeners on the video control buttons.
20420
- this.noqy();
20539
+ this.vJMI();
20421
20540
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
20422
- this.xxeD();
20541
+ this.sHYh();
20423
20542
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
20424
20543
  //Reason - We want to position them at the top right and left positions.
20425
- this.mztc();
20544
+ this.WaDM();
20426
20545
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
20427
20546
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
20428
20547
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
20429
- this.wKGa();
20548
+ this.TNFE();
20430
20549
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
20431
20550
  this._setAutoTerminate();
20432
20551
  document.body.appendChild(this.videoPlayer);
@@ -20541,7 +20660,7 @@
20541
20660
  }
20542
20661
  }
20543
20662
  this.videoPlayer.remove();
20544
- this.RLKV();
20663
+ this.mCTB();
20545
20664
  if (closeButtonName !== "auto_dismiss") {
20546
20665
  var _window$ApxorRTM9;
20547
20666
  (_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_video_inapp_close_button_clicked", {
@@ -20611,7 +20730,7 @@
20611
20730
  replayCount: _this3.replayCount
20612
20731
  });
20613
20732
  _this3.videoPlayer.remove();
20614
- _this3.RLKV();
20733
+ _this3.mCTB();
20615
20734
  _this3.hideCallback();
20616
20735
  } catch (e) {
20617
20736
  console.log("Can't close the video player\n".concat(e));
@@ -20705,14 +20824,14 @@
20705
20824
  try {
20706
20825
  var _window;
20707
20826
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
20708
- var element = _this.gwsi(_this.layout);
20709
- _this.QePi();
20827
+ var element = _this.VvNT(_this.layout);
20828
+ _this.XCRi();
20710
20829
  window.onresize = function () {
20711
- _this.kpwr();
20830
+ _this.NiOI();
20712
20831
  };
20713
20832
  _this.imageElements.forEach(function (img) {
20714
20833
  img.addEventListener("error", function () {
20715
- _this.qgiL("provided image doesn't exists");
20834
+ _this.YaYk("provided image doesn't exists");
20716
20835
  });
20717
20836
  });
20718
20837
  var rootContainer = document.createElement("div");
@@ -20723,7 +20842,7 @@
20723
20842
  var styleElement = document.createElement("style");
20724
20843
  styleElement.innerHTML = _this.styleContent;
20725
20844
  document.head.appendChild(styleElement);
20726
- _this.ZuMk(_this.termination);
20845
+ _this.SafO(_this.termination);
20727
20846
  try {
20728
20847
  eval(_this.script);
20729
20848
  } catch (e) {
@@ -20734,10 +20853,10 @@
20734
20853
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
20735
20854
  _this.wait_interval -= 1;
20736
20855
  if (_this.wait_interval <= 0) {
20737
- _this.qgiL("provided media doesn't exists");
20856
+ _this.YaYk("provided media doesn't exists");
20738
20857
  } else {
20739
- if (_this.FfdR() && _this.iFKD()) {
20740
- _this.kpwr();
20858
+ if (_this.PXQj() && _this.DZYh()) {
20859
+ _this.NiOI();
20741
20860
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
20742
20861
  }
20743
20862
  }
@@ -20748,7 +20867,7 @@
20748
20867
  (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorLogger) === null || _window3 === void 0 || _window3.error("failed while creating embed card with error: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
20749
20868
  }
20750
20869
  });
20751
- _defineProperty(this, "qgiL", function (reason) {
20870
+ _defineProperty(this, "YaYk", function (reason) {
20752
20871
  var _window$ApxorRTM, _window4;
20753
20872
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
20754
20873
  campaignName: _this.name,
@@ -20762,13 +20881,13 @@
20762
20881
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
20763
20882
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
20764
20883
  });
20765
- _defineProperty(this, "QePi", function () {
20884
+ _defineProperty(this, "XCRi", function () {
20766
20885
  var EmbeddedCardsStyles = document.createElement("style");
20767
20886
  EmbeddedCardsStyles.innerHTML = _this.initialStyles;
20768
20887
  EmbeddedCardsStyles.setAttribute("apx-tooltip-styles", "");
20769
20888
  document.head.appendChild(EmbeddedCardsStyles);
20770
20889
  });
20771
- _defineProperty(this, "gwsi", function (config) {
20890
+ _defineProperty(this, "VvNT", function (config) {
20772
20891
  var _window$Apxor;
20773
20892
  var element;
20774
20893
  switch (config.type) {
@@ -20960,7 +21079,7 @@
20960
21079
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
20961
21080
  element.style.position = "relative";
20962
21081
  config.absolute_position_children.forEach(function (childConfig) {
20963
- var childElement = _this.rjYg(childConfig);
21082
+ var childElement = _this.HjRo(childConfig);
20964
21083
  childElement.style.position = "absolute";
20965
21084
  for (var _prop in childConfig.offset) {
20966
21085
  childElement.style[_prop] = childConfig.offset[_prop];
@@ -20978,7 +21097,7 @@
20978
21097
  // }
20979
21098
 
20980
21099
  config.children.forEach(function (childConfig) {
20981
- var childElement = _this.gwsi(childConfig);
21100
+ var childElement = _this.VvNT(childConfig);
20982
21101
  element.appendChild(childElement);
20983
21102
  });
20984
21103
  }
@@ -21004,7 +21123,7 @@
21004
21123
  }
21005
21124
  return element;
21006
21125
  });
21007
- _defineProperty(this, "ZuMk", function (config) {
21126
+ _defineProperty(this, "SafO", function (config) {
21008
21127
  config.forEach(function (id) {
21009
21128
  var element = document.getElementById(id);
21010
21129
  if (element) {
@@ -21012,7 +21131,7 @@
21012
21131
  }
21013
21132
  });
21014
21133
  });
21015
- _defineProperty(this, "iFKD", function () {
21134
+ _defineProperty(this, "DZYh", function () {
21016
21135
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
21017
21136
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
21018
21137
  if (_this.imageElements.length === 0) return true;
@@ -21020,13 +21139,13 @@
21020
21139
  return img.complete;
21021
21140
  });
21022
21141
  });
21023
- _defineProperty(this, "FfdR", function () {
21142
+ _defineProperty(this, "PXQj", function () {
21024
21143
  if (_this.videoElements.length === 0) return true;
21025
21144
  return _this.videoElements.every(function (video) {
21026
21145
  return video.readyState >= 3;
21027
21146
  });
21028
21147
  });
21029
- _defineProperty(this, "kpwr", function () {
21148
+ _defineProperty(this, "NiOI", function () {
21030
21149
  var _window6, _window7;
21031
21150
  var width = window.document.querySelector("html").offsetWidth;
21032
21151
  var height = window.document.querySelector("html").offsetHeight;
@@ -21114,8 +21233,8 @@
21114
21233
  _this.storyContainer.appendChild(currentElement);
21115
21234
  _this.storyContainer.appendChild(slideDetails);
21116
21235
  document.body.appendChild(_this.storyContainer);
21117
- _this.xLnm();
21118
- _this.UIoc();
21236
+ _this.UhcC();
21237
+ _this.yUQd();
21119
21238
  _this.progress = Array.from(document.querySelectorAll(".progress"));
21120
21239
  var current_slide = document.querySelector(".slide-details");
21121
21240
  var playNext = function playNext(e) {
@@ -21161,7 +21280,7 @@
21161
21280
  _existingAbsoluteElements2.forEach(function (element) {
21162
21281
  element.remove();
21163
21282
  });
21164
- // this.tdcD();
21283
+ // this.Voll();
21165
21284
  var _currentSlideDetails = document.querySelector(".slide-details");
21166
21285
  _currentSlideDetails.innerHTML = "";
21167
21286
  _this.position = _this.position + 1;
@@ -21257,7 +21376,7 @@
21257
21376
  absolute_header = document.createElement("div");
21258
21377
  current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
21259
21378
  var current_absolute_element;
21260
- current_absolute_element = _this.rjYg(current_element);
21379
+ current_absolute_element = _this.HjRo(current_element);
21261
21380
  absolute_header.appendChild(current_absolute_element);
21262
21381
  });
21263
21382
  (_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
@@ -21318,7 +21437,7 @@
21318
21437
  document.body.style.backgroundRepeat = "";
21319
21438
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
21320
21439
  delete updated_layout_without_absolute_elements["absolute_position_children"];
21321
- element = _this.rjYg(updated_layout_without_absolute_elements);
21440
+ element = _this.HjRo(updated_layout_without_absolute_elements);
21322
21441
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
21323
21442
  document.body.style.margin = "0px";
21324
21443
  }
@@ -21326,9 +21445,9 @@
21326
21445
  current_slide.removeChild(current_slide.children[0]);
21327
21446
  }
21328
21447
  current_slide.appendChild(element);
21329
- _this.IdEJ();
21448
+ _this.Jwju();
21330
21449
  window.intervalToCheckImgStatus = setInterval(function () {
21331
- if (_this.whhd()) {
21450
+ if (_this.rnGL()) {
21332
21451
  clearInterval(window.intervalToCheckImgStatus);
21333
21452
  }
21334
21453
  }, 500);
@@ -21356,7 +21475,7 @@
21356
21475
  });
21357
21476
  playNext();
21358
21477
  });
21359
- _defineProperty(this, "tdcD", function () {
21478
+ _defineProperty(this, "Voll", function () {
21360
21479
  document.body.classList.add("slide-right");
21361
21480
  var animationEndCounter = 0;
21362
21481
  var onAnimationEnd = function onAnimationEnd() {
@@ -21368,7 +21487,7 @@
21368
21487
  };
21369
21488
  document.body.addEventListener("animationend", onAnimationEnd);
21370
21489
  });
21371
- _defineProperty(this, "rjYg", function (config) {
21490
+ _defineProperty(this, "HjRo", function (config) {
21372
21491
  var _window$Apxor3;
21373
21492
  var element;
21374
21493
  var startY;
@@ -21424,7 +21543,7 @@
21424
21543
  element.innerHTML = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 25 25\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12.375 4L10.1979 6.17708L7.92708 9.20833H3V15.4583H7.16667L12.375 20.6667V4Z\" fill=\"currentColor\" />\n <path d=\"M14.4905 20.2167C18.9193 20.2167 22.5095 16.6265 22.5095 12.1977C22.5095 7.76894 18.9193 4.17871 14.4905 4.17871\" stroke=\"currentColor\" fill =\"transparent\" stroke-width=\"1.782\"/>\n <path d=\"M14.4905 15.7618C16.4588 15.7618 18.0545 14.1661 18.0545 12.1978C18.0545 10.2294 16.4588 8.63379 14.4905 8.63379\" stroke=\"currentColor\" fill=\"transparent\" stroke-width=\"1.782\"/>\n </svg>";
21425
21544
  element.id = "apx-mute-icon";
21426
21545
  element.addEventListener("touchstart", function (event) {
21427
- _this.dmyU(event);
21546
+ _this.CfIa(event);
21428
21547
  });
21429
21548
  break;
21430
21549
  case "copy_icon":
@@ -21618,7 +21737,7 @@
21618
21737
  }
21619
21738
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
21620
21739
  config.absolute_position_children.forEach(function (childConfig) {
21621
- var childElement = _this.rjYg(childConfig);
21740
+ var childElement = _this.HjRo(childConfig);
21622
21741
  element.appendChild(childElement);
21623
21742
  });
21624
21743
  }
@@ -21626,7 +21745,7 @@
21626
21745
  // Process children
21627
21746
  if (config.children && config.children.length > 0) {
21628
21747
  config.children.forEach(function (childConfig) {
21629
- var childElement = _this.rjYg(childConfig);
21748
+ var childElement = _this.HjRo(childConfig);
21630
21749
  element.appendChild(childElement);
21631
21750
  });
21632
21751
  }
@@ -21653,7 +21772,7 @@
21653
21772
  }
21654
21773
  return element;
21655
21774
  });
21656
- _defineProperty(this, "dmyU", function (event) {
21775
+ _defineProperty(this, "CfIa", function (event) {
21657
21776
  var slide_details_to_be_deleted;
21658
21777
  var mute_child_elements;
21659
21778
  var unmute_child_elements;
@@ -21683,11 +21802,11 @@
21683
21802
  }
21684
21803
  // this.muteElement.addEventListener("touchstart", (event) => {
21685
21804
  // event.stopPropagation();
21686
- // this.dmyU(event);
21805
+ // this.CfIa(event);
21687
21806
  // });
21688
21807
  }
21689
21808
  });
21690
- _defineProperty(this, "UIoc", function () {
21809
+ _defineProperty(this, "yUQd", function () {
21691
21810
  var tapTimeout;
21692
21811
  var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
21693
21812
  var longPressDuration = 200;
@@ -21811,7 +21930,7 @@
21811
21930
  event.target.dataset.touchStartTime = event.timeStamp;
21812
21931
  });
21813
21932
  });
21814
- _defineProperty(this, "xLnm", function () {
21933
+ _defineProperty(this, "UhcC", function () {
21815
21934
  var startY, startX;
21816
21935
  _this.storyContainer.addEventListener("touchstart", function (event) {
21817
21936
  _this.swipeTouch = true;
@@ -22018,7 +22137,7 @@
22018
22137
  }, 50);
22019
22138
  });
22020
22139
  });
22021
- _defineProperty(this, "IdEJ", function () {
22140
+ _defineProperty(this, "Jwju", function () {
22022
22141
  _this.loader.style.display = "block";
22023
22142
  var progress = Array.from(document.querySelectorAll(".progress"));
22024
22143
  var activeIndex = progress.findIndex(function (el) {
@@ -22034,7 +22153,7 @@
22034
22153
  }
22035
22154
  }
22036
22155
  });
22037
- _defineProperty(this, "UUjl", function () {
22156
+ _defineProperty(this, "vCTl", function () {
22038
22157
  if (!_this.continueLoading) {
22039
22158
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22040
22159
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
@@ -22054,19 +22173,19 @@
22054
22173
  _this.loader.style.display = "none";
22055
22174
  }
22056
22175
  });
22057
- _defineProperty(this, "iFKD", function () {
22176
+ _defineProperty(this, "DZYh", function () {
22058
22177
  if (_this.imageElements.length === 0) return true;
22059
22178
  return _this.imageElements.every(function (img) {
22060
22179
  return img.complete;
22061
22180
  });
22062
22181
  });
22063
- _defineProperty(this, "FfdR", function () {
22182
+ _defineProperty(this, "PXQj", function () {
22064
22183
  if (_this.videoElements.length === 0) return true;
22065
22184
  return _this.videoElements.every(function (video) {
22066
22185
  return video.readyState >= 3;
22067
22186
  });
22068
22187
  });
22069
- _defineProperty(this, "whhd", function () {
22188
+ _defineProperty(this, "rnGL", function () {
22070
22189
  var bodyStyles = window.getComputedStyle(document.body);
22071
22190
  var backgroundImage = bodyStyles.backgroundImage;
22072
22191
  if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
@@ -22076,7 +22195,7 @@
22076
22195
  var img = new Image();
22077
22196
  img.src = imageUrl;
22078
22197
  if (img.complete) {
22079
- _this.UUjl();
22198
+ _this.vCTl();
22080
22199
  return true;
22081
22200
  }
22082
22201
  return false;
@@ -22084,21 +22203,21 @@
22084
22203
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22085
22204
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
22086
22205
  if (childElements[0].readyState >= 3) {
22087
- _this.UUjl();
22206
+ _this.vCTl();
22088
22207
  return true;
22089
22208
  }
22090
22209
  return false;
22091
22210
  } else {
22092
22211
  if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
22093
- _this.UUjl();
22212
+ _this.vCTl();
22094
22213
  return true;
22095
- } else if (_this.iFKD() && _this.FfdR()) {
22096
- _this.UUjl();
22214
+ } else if (_this.DZYh() && _this.PXQj()) {
22215
+ _this.vCTl();
22097
22216
  return true;
22098
22217
  }
22099
22218
  }
22100
22219
  });
22101
- _defineProperty(this, "odfH", function (event, startY, action) {
22220
+ _defineProperty(this, "tBkX", function (event, startY, action) {
22102
22221
  event.stopPropagation();
22103
22222
  var endY = event.changedTouches[0].clientY;
22104
22223
  var deltaY = startY - endY;
@@ -22186,7 +22305,7 @@
22186
22305
  this.swipe_action;
22187
22306
  this.continueLoading = false;
22188
22307
  this.boundSwipeUpHandling = function (event) {
22189
- return _this.odfH(event, _this.startY, _this.swipe_action);
22308
+ return _this.tBkX(event, _this.startY, _this.swipe_action);
22190
22309
  };
22191
22310
  }
22192
22311
  _createClass(Stories, [{
@@ -22249,7 +22368,7 @@
22249
22368
  } else {
22250
22369
  var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
22251
22370
  // Move to the first slide of the next group
22252
- // this.tdcD();
22371
+ // this.Voll();
22253
22372
  this.position++;
22254
22373
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
22255
22374
  this.slides = this.config[this.position].slides;
@@ -22375,7 +22494,7 @@
22375
22494
  if (activeIndex === 0) {
22376
22495
  var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
22377
22496
  // If at the first slide of the current group, move to the last slide of the previous group
22378
- // this.tdcD();
22497
+ // this.Voll();
22379
22498
  this.position--;
22380
22499
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
22381
22500
  this.slides = this.config[this.position].slides;
@@ -22564,25 +22683,25 @@
22564
22683
  // Create custom content
22565
22684
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
22566
22685
  delete updated_layout_without_absolute_elements["absolute_position_children"];
22567
- element = this.rjYg(updated_layout_without_absolute_elements);
22686
+ element = this.HjRo(updated_layout_without_absolute_elements);
22568
22687
  }
22569
22688
  // Append slide content to slide details container
22570
22689
 
22571
22690
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
22572
22691
  document.body.style.margin = "0px";
22573
22692
  currentSlideDetails.appendChild(element);
22574
- this.IdEJ();
22693
+ this.Jwju();
22575
22694
 
22576
22695
  // Handle absolute position children
22577
22696
  if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
22578
22697
  current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
22579
- var childElement = _this2.rjYg(childConfig);
22698
+ var childElement = _this2.HjRo(childConfig);
22580
22699
  // Append absolute position children to slide details container
22581
22700
  currentSlideDetails.appendChild(childElement);
22582
22701
  });
22583
22702
  }
22584
22703
  window.intervalToCheckImgStatus2 = setInterval(function () {
22585
- if (_this2.whhd()) {
22704
+ if (_this2.rnGL()) {
22586
22705
  clearInterval(window.intervalToCheckImgStatus2);
22587
22706
  }
22588
22707
  }, 500);
@@ -22629,16 +22748,16 @@
22629
22748
  var RTM = /*#__PURE__*/_createClass(function RTM() {
22630
22749
  var _this = this;
22631
22750
  _classCallCheck(this, RTM);
22632
- _defineProperty(this, "zCgG", {});
22751
+ _defineProperty(this, "RxKq", {});
22633
22752
  _defineProperty(this, "isShowingAction", false);
22634
22753
  _defineProperty(this, "currentAction", null);
22635
- _defineProperty(this, "mgMJ", null);
22636
- _defineProperty(this, "version", 70);
22754
+ _defineProperty(this, "sOOz", null);
22755
+ _defineProperty(this, "version", 71);
22637
22756
  _defineProperty(this, "isInitialised", false);
22638
- _defineProperty(this, "tPDI", {});
22639
- _defineProperty(this, "yqcV", false);
22757
+ _defineProperty(this, "jkaK", {});
22758
+ _defineProperty(this, "pNeK", false);
22640
22759
  _defineProperty(this, "_isShownECCalled", false);
22641
- _defineProperty(this, "cNcz", function () {
22760
+ _defineProperty(this, "BYKy", function () {
22642
22761
  _this.isInitialised = true;
22643
22762
  var oldPushState = history.pushState;
22644
22763
  history.pushState = function pushState() {
@@ -22663,7 +22782,7 @@
22663
22782
  });
22664
22783
  _defineProperty(this, "show", function (uiJson, duration, uuid, name) {
22665
22784
  if (!_this.isInitialised) {
22666
- _this.cNcz();
22785
+ _this.BYKy();
22667
22786
  }
22668
22787
  window.addEventListener("pagehide", function () {
22669
22788
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -22690,7 +22809,7 @@
22690
22809
  } else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
22691
22810
  _this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
22692
22811
  } else if (ui_config.display_type === "coach_mark_v2") {
22693
- _this.CDCV(ui_config, duration, uuid, name);
22812
+ _this.iGMR(ui_config, duration, uuid, name);
22694
22813
  } else {
22695
22814
  showCoachmarkWithDelay(_this, ui_config, {
22696
22815
  configId: uuid,
@@ -22791,7 +22910,7 @@
22791
22910
  try {
22792
22911
  config = config.split("\n").join("\\n");
22793
22912
  var ui_config = JSON.parse(config);
22794
- _this.nzCu(ui_config, configId, name, position, slidesSeenCount, view_id);
22913
+ _this.jQXU(ui_config, configId, name, position, slidesSeenCount, view_id);
22795
22914
  } catch (e) {
22796
22915
  var _window$Apxor3;
22797
22916
  if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
@@ -22805,7 +22924,7 @@
22805
22924
  console.error(e);
22806
22925
  }
22807
22926
  });
22808
- _defineProperty(this, "nzCu", function (config, configId, name, position, slidesSeenCount, view_id) {
22927
+ _defineProperty(this, "jQXU", function (config, configId, name, position, slidesSeenCount, view_id) {
22809
22928
  var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
22810
22929
  window.Apxor.logAppEvent("apx_nudge_shown", {
22811
22930
  campaignName: name,
@@ -22853,7 +22972,7 @@
22853
22972
  var _window22, _window22$updateFlag, _window23;
22854
22973
  _this.isShowingAction = false;
22855
22974
  _this.currentAction = null;
22856
- _this.mgMJ = null;
22975
+ _this.sOOz = null;
22857
22976
  (_window22 = window) === null || _window22 === void 0 || (_window22 = _window22.Apxor) === null || _window22 === void 0 || (_window22$updateFlag = _window22.updateFlag) === null || _window22$updateFlag === void 0 || _window22$updateFlag.call(_window22, false);
22858
22977
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
22859
22978
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -22864,21 +22983,21 @@
22864
22983
  }
22865
22984
  };
22866
22985
  if (action_class === "new-inline") {
22867
- _this.mgMJ = new InLineTooltip(ui_config, [], [], terminationConfig, {
22986
+ _this.sOOz = new InLineTooltip(ui_config, [], [], terminationConfig, {
22868
22987
  configId: uuid,
22869
22988
  configName: name
22870
22989
  }, _this, onShow, onHide, function () {}, false, 0);
22871
22990
  } else if (action_class === "tooltip_builder") {
22872
- _this.mgMJ = new NewInLineTooltip(ui_config, terminationConfig, {
22991
+ _this.sOOz = new NewInLineTooltip(ui_config, terminationConfig, {
22873
22992
  configId: uuid,
22874
22993
  configName: name
22875
22994
  }, _this, onShow, onHide);
22876
22995
  }
22877
22996
  setTimeout(function () {
22878
- _this.mgMJ.createNewTooltip();
22997
+ _this.sOOz.createNewTooltip();
22879
22998
  }, ui_config.delay);
22880
22999
  });
22881
- _defineProperty(this, "CDCV", function (ui_config, duration, uuid, name) {
23000
+ _defineProperty(this, "iGMR", function (ui_config, duration, uuid, name) {
22882
23001
  var terminationConfig = {};
22883
23002
  terminationConfig["auto_dismiss"] = duration > 0;
22884
23003
  terminationConfig["duration"] = duration;
@@ -22902,7 +23021,7 @@
22902
23021
  var _window27, _window27$updateFlag, _window28;
22903
23022
  _this.isShowingAction = false;
22904
23023
  _this.currentAction = null;
22905
- _this.mgMJ = null;
23024
+ _this.sOOz = null;
22906
23025
  (_window27 = window) === null || _window27 === void 0 || (_window27 = _window27.Apxor) === null || _window27 === void 0 || (_window27$updateFlag = _window27.updateFlag) === null || _window27$updateFlag === void 0 || _window27$updateFlag.call(_window27, false);
22907
23026
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
22908
23027
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -22915,8 +23034,8 @@
22915
23034
  _this._currentCoachmark.createNewCoachMark();
22916
23035
  });
22917
23036
  _defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
22918
- if (_this.mgMJ) {
22919
- _this.mgMJ.updateElementPositionOnScroll(top, left, height, width);
23037
+ if (_this.sOOz) {
23038
+ _this.sOOz.updateElementPositionOnScroll(top, left, height, width);
22920
23039
  }
22921
23040
  });
22922
23041
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -23011,10 +23130,10 @@
23011
23130
  });
23012
23131
  _defineProperty(this, "showPlaceHolder", function () {
23013
23132
  var _window36;
23014
- if (_this.yqcV) {
23133
+ if (_this.pNeK) {
23015
23134
  return;
23016
23135
  }
23017
- _this.yqcV = true;
23136
+ _this.pNeK = true;
23018
23137
  var ele = document.createElement("div");
23019
23138
  ele.innerHTML = "place your immersive card here";
23020
23139
  ele.style.backgroundColor = "#f5f5f5";