apxor-rtm-ui 0.9.1 → 0.9.3

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.
@@ -7910,6 +7910,7 @@
7910
7910
  var iframe_id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
7911
7911
  var find_config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
7912
7912
  var view_additional_info = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
7913
+ var element = null;
7913
7914
  // Given selector can be an ID.
7914
7915
  if (Object.keys(view_additional_info).length > 0 && Object.keys(find_config).length > 0 && (find_config === null || find_config === void 0 ? void 0 : find_config.search_criteria[0]) == "content") {
7915
7916
  var _elements_list;
@@ -7939,27 +7940,29 @@
7939
7940
  if (element) {
7940
7941
  return element;
7941
7942
  }
7942
- }
7943
- var element = document.getElementById(selector);
7944
- if (!element) {
7945
- try {
7946
- element = document.querySelector(selector);
7947
- } catch (e) {
7948
- //If there is an exception, it means it is not a valid selector.
7949
- console.error("Error finding element in DOM:" + e);
7943
+ } else {
7944
+ element = document.getElementById(selector);
7945
+ if (!element) {
7946
+ try {
7947
+ element = document.querySelector(selector);
7948
+ } catch (e) {
7949
+ //If there is an exception, it means it is not a valid selector.
7950
+ console.error("Error finding element in DOM:" + e);
7951
+ }
7952
+ }
7953
+ // If no element is found till now, it means it is neither an ID nor a valid css selector. It could be an XPath.
7954
+ if (!element) {
7955
+ element = getElementByXPath(selector);
7950
7956
  }
7951
- }
7952
- // If no element is found till now, it means it is neither an ID nor a valid css selector. It could be an XPath.
7953
- if (!element) {
7954
- element = getElementByXPath(selector);
7955
- }
7956
7957
 
7957
- // If no element is found, it means the selector is not an ID. It could be a css selector
7958
- if (!element && iframe_id.length > 0) {
7959
- var _document$getElementB;
7960
- element = (_document$getElementB = document.getElementById(iframe_id)) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.contentWindow) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.document) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.querySelector(selector);
7958
+ // If no element is found, it means the selector is not an ID. It could be a css selector
7959
+ if (!element && iframe_id.length > 0) {
7960
+ var _document$getElementB;
7961
+ element = (_document$getElementB = document.getElementById(iframe_id)) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.contentWindow) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.document) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.querySelector(selector);
7962
+ }
7963
+ return element;
7961
7964
  }
7962
- return element;
7965
+ return null;
7963
7966
  };
7964
7967
  var getElementByXPath = function getElementByXPath(path) {
7965
7968
  var index = path.indexOf("svg");
@@ -8074,7 +8077,12 @@
8074
8077
  break;
8075
8078
  case "redirect":
8076
8079
  action = function action() {
8077
- window.Apxor.redirectTo(uuid, name, text, action_config_str);
8080
+ var _window$Apxor3;
8081
+ if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
8082
+ window.Apxor.redirectTo(action_config_str);
8083
+ } else {
8084
+ window.Apxor.redirectTo(uuid, name, text, action_config_str);
8085
+ }
8078
8086
  ActionHandler.complete(_action);
8079
8087
  };
8080
8088
  break;
@@ -8298,7 +8306,9 @@
8298
8306
  _uiConfig$set_font_to = uiConfig.set_font_to_scale,
8299
8307
  set_font_to_scale = _uiConfig$set_font_to === void 0 ? false : _uiConfig$set_font_to,
8300
8308
  _uiConfig$is_preview = uiConfig.is_preview,
8301
- is_preview = _uiConfig$is_preview === void 0 ? false : _uiConfig$is_preview;
8309
+ is_preview = _uiConfig$is_preview === void 0 ? false : _uiConfig$is_preview,
8310
+ _uiConfig$additional_ = uiConfig.additional_info,
8311
+ additional_info = _uiConfig$additional_ === void 0 ? {} : _uiConfig$additional_;
8302
8312
  var dismissOnScroll;
8303
8313
  var configId = messageConfig.configId,
8304
8314
  configName = messageConfig.configName;
@@ -8323,44 +8333,75 @@
8323
8333
  var action_config = (button_config === null || button_config === void 0 ? void 0 : button_config.action_config) || {};
8324
8334
  var action_config_str = JSON.stringify(action_config);
8325
8335
  var url = (_button_config$action3 = button_config === null || button_config === void 0 || (_button_config$action4 = button_config.action_config) === null || _button_config$action4 === void 0 ? void 0 : _button_config$action4.url) !== null && _button_config$action3 !== void 0 ? _button_config$action3 : "";
8336
+ var logBtnClickEvent = function logBtnClickEvent() {
8337
+ if (additional_info.version && additional_info.version === 4) {
8338
+ var _window$Apxor, _additional_info$apx_, _window$Apxor2;
8339
+ (_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || _window$Apxor.logAppEvent("apx_nudge_CTA_clicked", {
8340
+ apx_nudge_name: configName,
8341
+ apx_nudge_id: configId,
8342
+ apx_cta_name: button_text,
8343
+ apx_variant_code: (_additional_info$apx_ = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_ !== void 0 ? _additional_info$apx_ : "",
8344
+ apx_step: ((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios" ? additional_info !== null && additional_info !== void 0 && additional_info.is_preview ? 1 : additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step : additional_info !== null && additional_info !== void 0 && additional_info.is_preview ? 1 : additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step
8345
+ });
8346
+ } else {
8347
+ window.Apxor.logActionEvent("inline_".concat(button_text, "_Clicked"), configId, configName);
8348
+ }
8349
+ };
8326
8350
  switch (_action) {
8327
8351
  case "done":
8328
8352
  case "dismiss":
8329
8353
  action = function action() {
8330
- window.Apxor.logActionEvent("inline_".concat(button_text, "_Clicked"), configId, configName);
8354
+ logBtnClickEvent();
8331
8355
  ApxorWalkthroughTour.complete();
8332
8356
  };
8333
8357
  break;
8334
8358
  case "next":
8335
8359
  action = function action() {
8336
- window.Apxor.logActionEvent("inline_".concat(button_text, "_Clicked"), configId, configName);
8360
+ logBtnClickEvent();
8337
8361
  ApxorWalkthroughTour.complete();
8338
8362
  };
8339
8363
  break;
8340
8364
  case "prev":
8341
8365
  action = function action() {
8342
- window.Apxor.logActionEvent("inline_".concat(button_text, "_Clicked"), configId, configName);
8366
+ logBtnClickEvent();
8343
8367
  ApxorWalkthroughTour.complete();
8344
8368
  };
8345
8369
  break;
8346
8370
  case "redirect":
8347
8371
  action = function action() {
8372
+ var _window$Apxor3;
8348
8373
  buttonAction = "redirect";
8374
+ if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
8375
+ window.Apxor.redirectTo(JSON.stringify(action_config));
8376
+ } else {
8377
+ window.Apxor.redirectTo(configId, configName, button_text, action_config_str);
8378
+ }
8379
+ logBtnClickEvent();
8349
8380
  ApxorWalkthroughTour.complete();
8350
- window.Apxor.redirectTo(configId, configName, button_text, action_config_str);
8351
8381
  };
8352
8382
  break;
8353
8383
  case "cancel":
8354
8384
  action = function action() {
8355
8385
  buttonAction = "cancel";
8356
- window.Apxor.logActionEvent("inline_".concat(button_text, "_Clicked"), configId, configName);
8386
+ logBtnClickEvent();
8357
8387
  ApxorWalkthroughTour.complete();
8358
8388
  window.Apxor.logActionEvent("walk_through_cancelled", configId, configName);
8359
8389
  };
8360
8390
  break;
8391
+ case "never":
8392
+ action = function action() {
8393
+ var _window$Apxor4, _window$Apxor5;
8394
+ buttonAction = "never";
8395
+ logBtnClickEvent();
8396
+ ApxorWalkthroughTour.complete();
8397
+ window.Apxor.logActionEvent("never_show_clicked", configId, configName);
8398
+ (_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 || _window$Apxor4.neverShow(configId, configName, "WEB_INLINE");
8399
+ (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.updateFlag(false);
8400
+ };
8401
+ break;
8361
8402
  default:
8362
8403
  action = function action() {
8363
- window.Apxor.logActionEvent("inline_" + text + "_Clicked", configId, configName);
8404
+ logBtnClickEvent();
8364
8405
  ApxorWalkthroughTour.cancel();
8365
8406
  };
8366
8407
  }
@@ -8594,8 +8635,52 @@
8594
8635
  }
8595
8636
  styleDiv === null || styleDiv === void 0 || (_styleDiv$parentNode = styleDiv.parentNode) === null || _styleDiv$parentNode === void 0 || _styleDiv$parentNode.removeChild(styleDiv);
8596
8637
  (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || _window2.updateFlag(false);
8597
- if (!(buttonAction !== null && (buttonAction === "redirect" || buttonAction === "cancel"))) {
8598
- window.Apxor.logActionEvent("inline_dismissed", configId, configName);
8638
+ if (buttonAction !== null) {
8639
+ // when btn is click, loggging event based on button action
8640
+ if (buttonAction !== "redirect" || buttonAction !== "never" || buttonAction !== "cancel") {
8641
+ if (additional_info.version && additional_info.version === 4) {
8642
+ var _window$Apxor6, _additional_info$apx_2, _additional_info$apx_3;
8643
+ (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 || _window$Apxor6.logAppEvent("apx_nudge_dismissed", {
8644
+ apx_nudge_id: configId,
8645
+ apx_nudge_name: configName,
8646
+ apx_step: (_additional_info$apx_2 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_2 !== void 0 ? _additional_info$apx_2 : 1,
8647
+ apx_termination_type: buttonAction + " Clicked",
8648
+ apx_variant_code: (_additional_info$apx_3 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_3 !== void 0 ? _additional_info$apx_3 : ""
8649
+ });
8650
+ } else {
8651
+ window.Apxor.logActionEvent("inline_dismissed", configId, configName);
8652
+ }
8653
+ }
8654
+
8655
+ // logging nudge_terminated event when button action is never show
8656
+ if (buttonAction === "never") {
8657
+ if (additional_info.version && additional_info.version === 4) {
8658
+ var _window$Apxor7, _additional_info$apx_4, _additional_info$apx_5;
8659
+ (_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 || _window$Apxor7.logAppEvent("apx_nudge_terminated", {
8660
+ apx_nudge_id: configId,
8661
+ apx_nudge_name: configName,
8662
+ apx_step: (_additional_info$apx_4 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_4 !== void 0 ? _additional_info$apx_4 : 1,
8663
+ apx_termination_type: buttonAction + " Clicked",
8664
+ apx_variant_code: (_additional_info$apx_5 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_5 !== void 0 ? _additional_info$apx_5 : ""
8665
+ });
8666
+ } else {
8667
+ window.Apxor.logActionEvent("inline_dismissed", configId, configName);
8668
+ }
8669
+ }
8670
+ } else {
8671
+ // when btn is not clicked, logging dismiss event
8672
+ if (additional_info.version && additional_info.version === 4) {
8673
+ var _window$Apxor8, _additional_info$apx_6, _additional_info$apx_7;
8674
+ (_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 || _window$Apxor8.logAppEvent("apx_nudge_dismissed", {
8675
+ apx_nudge_id: configId,
8676
+ apx_nudge_name: configName,
8677
+ apx_step: (_additional_info$apx_6 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_6 !== void 0 ? _additional_info$apx_6 : 1,
8678
+ apx_termination_type: buttonAction + " Clicked",
8679
+ apx_variant_code: (_additional_info$apx_7 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_7 !== void 0 ? _additional_info$apx_7 : ""
8680
+ });
8681
+ } else {
8682
+ window.Apxor.logActionEvent("inline_dismissed", configId, configName);
8683
+ }
8599
8684
  }
8600
8685
  rtmInstance.isShowingAction = false;
8601
8686
  rtmInstance.currentAction = null;
@@ -8685,10 +8770,21 @@
8685
8770
  onShow: function onShow() {
8686
8771
  var _window5, _window5$updateFlag;
8687
8772
  (_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$updateFlag = _window5.updateFlag) === null || _window5$updateFlag === void 0 || _window5$updateFlag.call(_window5, true);
8688
- window.Apxor.logActionEvent("inline_shown", configId, configName);
8773
+ if (additional_info.version && additional_info.version === 4) {
8774
+ var _window6, _additional_info$apx_8, _additional_info$apx_9, _additional_info$apx_10;
8775
+ (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || _window6.logAppEvent("apx_nudge_shown", {
8776
+ apx_nudge_id: messageConfig.configId,
8777
+ apx_nudge_name: messageConfig.configName,
8778
+ apx_step: (_additional_info$apx_8 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_8 !== void 0 ? _additional_info$apx_8 : 1,
8779
+ apx_variant_code: (_additional_info$apx_9 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_9 !== void 0 ? _additional_info$apx_9 : "",
8780
+ apx_screen_name: (_additional_info$apx_10 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_screen_name) !== null && _additional_info$apx_10 !== void 0 ? _additional_info$apx_10 : ""
8781
+ });
8782
+ } else {
8783
+ window.Apxor.logActionEvent("inline_shown", configId, configName);
8784
+ }
8689
8785
  if (is_preview) setTimeout(function () {
8690
- var _window6, _window6$logInternalE;
8691
- (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$logInternalE = _window6.logInternalEvent) === null || _window6$logInternalE === void 0 || _window6$logInternalE.call(_window6, "capt");
8786
+ var _window7, _window7$logInternalE;
8787
+ (_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.Apxor) === null || _window7 === void 0 || (_window7$logInternalE = _window7.logInternalEvent) === null || _window7$logInternalE === void 0 || _window7$logInternalE.call(_window7, "capt");
8692
8788
  }, 500);
8693
8789
  window.Apxor.updateCount(configId);
8694
8790
  rtmInstance.isShowingAction = true;
@@ -8715,7 +8811,9 @@
8715
8811
  _uiConfig$max_find_in = uiConfig.max_find_interval,
8716
8812
  max_find_interval = _uiConfig$max_find_in === void 0 ? 10000 : _uiConfig$max_find_in,
8717
8813
  _uiConfig$scrollToVie = uiConfig.scrollToView,
8718
- scrollToView = _uiConfig$scrollToVie === void 0 ? true : _uiConfig$scrollToVie;
8814
+ scrollToView = _uiConfig$scrollToVie === void 0 ? true : _uiConfig$scrollToVie,
8815
+ _uiConfig$additional_2 = uiConfig.additional_info,
8816
+ additional_info = _uiConfig$additional_2 === void 0 ? {} : _uiConfig$additional_2;
8719
8817
  var scrollTo = false;
8720
8818
  // when dim-dim_background is true and scrollToView is false and element is not in viewport then a black mask is applied to the webview and scrolling behaviour doesn't work, to resolve it the below case is written.
8721
8819
  if (dim_background && !isElementInViewport(getElementFromSelector(view_id))) {
@@ -8785,8 +8883,15 @@
8785
8883
  var currentTime = new Date();
8786
8884
  // If the element is not found even after 10sec, stop checking
8787
8885
  if (currentTime - recheckStartedAt > max_find_interval) {
8886
+ var _window8, _additional_info$apx_11;
8788
8887
  clearInterval(elementRecheckIntervalId);
8789
8888
  console.warn("Element with id:".concat(view_id, " not found."));
8889
+ (_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.Apxor) === null || _window8 === void 0 || _window8.logAppEvent("apx_nudge_not_shown", {
8890
+ apx_nudge_id: messageConfig.configId,
8891
+ apx_nudge_name: messageConfig.configName,
8892
+ apx_reason: "View not found",
8893
+ apx_step: (_additional_info$apx_11 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_11 !== void 0 ? _additional_info$apx_11 : 1
8894
+ });
8790
8895
  }
8791
8896
  }
8792
8897
  }, find_interval);
@@ -8798,6 +8903,14 @@
8798
8903
  if (find_interval) {
8799
8904
  console.warn("Rechecking");
8800
8905
  recheckViewElementAndAddStep(view_id);
8906
+ } else {
8907
+ var _window9, _additional_info$apx_12;
8908
+ (_window9 = window) === null || _window9 === void 0 || (_window9 = _window9.Apxor) === null || _window9 === void 0 || _window9.logAppEvent("apx_nudge_not_shown", {
8909
+ apx_nudge_id: messageConfig.configId,
8910
+ apx_nudge_name: messageConfig.configName,
8911
+ apx_reason: "View not found",
8912
+ apx_step: (_additional_info$apx_12 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_12 !== void 0 ? _additional_info$apx_12 : 1
8913
+ });
8801
8914
  }
8802
8915
  } else {
8803
8916
  checkViewPortAndAddStep(element);
@@ -8809,7 +8922,18 @@
8809
8922
  }, delay + terminationConfig["duration"]);
8810
8923
  }
8811
8924
  var dismiss_callback = function dismiss_callback() {
8812
- window.Apxor.logActionEvent("inline_dismissed", messageConfig.configId, messageConfig.configName);
8925
+ if (additional_info.version && additional_info.version === 4) {
8926
+ var _window10, _additional_info$apx_13, _additional_info$apx_14;
8927
+ (_window10 = window) === null || _window10 === void 0 || (_window10 = _window10.Apxor) === null || _window10 === void 0 || _window10.logAppEvent("apx_nudge_terminated", {
8928
+ apx_nudge_id: messageConfig.configId,
8929
+ apx_nudge_name: messageConfig.configName,
8930
+ apx_step: (_additional_info$apx_13 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_13 !== void 0 ? _additional_info$apx_13 : 1,
8931
+ apx_termination_type: buttonAction + " Clicked",
8932
+ apx_variant_code: (_additional_info$apx_14 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_14 !== void 0 ? _additional_info$apx_14 : ""
8933
+ });
8934
+ } else {
8935
+ window.Apxor.logActionEvent("inline_dismissed", messageConfig.configId, messageConfig.configName);
8936
+ }
8813
8937
  ApxorWalkthroughTour.complete();
8814
8938
  };
8815
8939
  return dismiss_callback;
@@ -12172,14 +12296,14 @@
12172
12296
  _config$wait_interval,
12173
12297
  _config$termination;
12174
12298
  _classCallCheck(this, TemplateContent);
12175
- _defineProperty(this, "YyDb", function () {
12299
+ _defineProperty(this, "tclX", function () {
12176
12300
  return new Promise(function (resolve, reject) {
12177
12301
  try {
12178
- var element = _this.tmRn(_this.layout);
12302
+ var element = _this.JssF(_this.layout);
12179
12303
  var styleElement = document.createElement("style");
12180
12304
  styleElement.innerHTML = _this.styleContent;
12181
12305
  document.head.appendChild(styleElement);
12182
- _this.qYHJ();
12306
+ _this.jTYU();
12183
12307
  try {
12184
12308
  eval(_this.script);
12185
12309
  } catch (e) {
@@ -12190,15 +12314,15 @@
12190
12314
  }
12191
12315
  _this.imageElements.forEach(function (img) {
12192
12316
  img.addEventListener("error", function () {
12193
- _this.woit("provided image doesn't exists");
12317
+ _this.ayPc("provided image doesn't exists");
12194
12318
  });
12195
12319
  });
12196
12320
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
12197
12321
  _this.wait_interval -= 1;
12198
12322
  if (_this.wait_interval <= 0) {
12199
- _this.woit("provided media doesn't exists");
12323
+ _this.ayPc("provided media doesn't exists");
12200
12324
  } else {
12201
- if (_this.xbQr() && _this.fqDl() && _this.uTAP()) {
12325
+ if (_this.XUBL() && _this.kxrF() && _this.sSIh()) {
12202
12326
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
12203
12327
  resolve(element);
12204
12328
  }
@@ -12212,7 +12336,7 @@
12212
12336
  }
12213
12337
  });
12214
12338
  });
12215
- _defineProperty(this, "woit", function (reason) {
12339
+ _defineProperty(this, "ayPc", function (reason) {
12216
12340
  var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
12217
12341
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
12218
12342
  apx_nudge_name: _this.name,
@@ -12228,13 +12352,13 @@
12228
12352
  _this.closeCallBack("cancel");
12229
12353
  (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
12230
12354
  });
12231
- _defineProperty(this, "qYHJ", function () {
12355
+ _defineProperty(this, "jTYU", function () {
12232
12356
  var BuilderTemplatesStyles = document.createElement("style");
12233
12357
  BuilderTemplatesStyles.innerHTML = _this.initialStyles;
12234
12358
  BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
12235
12359
  document.head.appendChild(BuilderTemplatesStyles);
12236
12360
  });
12237
- _defineProperty(this, "tmRn", function (config) {
12361
+ _defineProperty(this, "JssF", function (config) {
12238
12362
  var _window$Apxor3;
12239
12363
  var element;
12240
12364
  switch (config.type) {
@@ -12299,7 +12423,9 @@
12299
12423
  }
12300
12424
  styles = ".".concat(config._id, " {\n ").concat(objectToCSS(layoutStyleObject), "\n }\n ");
12301
12425
  } else {
12302
- styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
12426
+ var _config$properties$cu, _config$properties3;
12427
+ // custom_font_face
12428
+ styles = "".concat((_config$properties$cu = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 || (_config$properties3 = _config$properties3.custom_font) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.font_face) !== null && _config$properties$cu !== void 0 ? _config$properties$cu : "", ".").concat(config._id, " {\n ").concat(config.css, "\n }\n ");
12303
12429
  }
12304
12430
  _this.initialStyles += styles;
12305
12431
  }
@@ -12318,7 +12444,7 @@
12318
12444
  if (config.type === "cta_button" || config.type === "button") {
12319
12445
  reason = "cta-clicked";
12320
12446
  }
12321
- _this.mPVm(e, "redirect", reason);
12447
+ _this.dGod(e, "redirect", reason);
12322
12448
  if ((_this$config7 = _this.config) !== null && _this$config7 !== void 0 && (_this$config7 = _this$config7.additional_info) !== null && _this$config7 !== void 0 && _this$config7.apx_step) {
12323
12449
  var _window4, _this$config8;
12324
12450
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || _window4.triggerNextStep(_this.configId, ((_this$config8 = _this.config) === null || _this$config8 === void 0 || (_this$config8 = _this$config8.additional_info) === null || _this$config8 === void 0 ? void 0 : _this$config8.apx_step) + 1);
@@ -12334,7 +12460,7 @@
12334
12460
  } else if (config.type === "cta_button" || config.type === "button") {
12335
12461
  reason = "cta-clicked";
12336
12462
  }
12337
- _this.mPVm(e, "cancel", reason);
12463
+ _this.dGod(e, "cancel", reason);
12338
12464
  // window.Apxor.logActionEvent(
12339
12465
  // "walk_through_cancelled",
12340
12466
  // this.configId,
@@ -12353,7 +12479,7 @@
12353
12479
  } else if (config.type === "cta_button" || config.type === "button") {
12354
12480
  reason = "cta-clicked";
12355
12481
  }
12356
- _this.mPVm(e, "dismiss", reason);
12482
+ _this.dGod(e, "dismiss", reason);
12357
12483
  if ((_this$config9 = _this.config) !== null && _this$config9 !== void 0 && (_this$config9 = _this$config9.additional_info) !== null && _this$config9 !== void 0 && _this$config9.apx_step) {
12358
12484
  var _window5, _this$config10;
12359
12485
  (_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || _window5.triggerNextStep(_this.configId, ((_this$config10 = _this.config) === null || _this$config10 === void 0 || (_this$config10 = _this$config10.additional_info) === null || _this$config10 === void 0 ? void 0 : _this$config10.apx_step) + 1);
@@ -12364,7 +12490,7 @@
12364
12490
  element.onclick = function (e) {
12365
12491
  e.stopPropagation();
12366
12492
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
12367
- _this.mPVm(e, "never");
12493
+ _this.dGod(e, "never");
12368
12494
  };
12369
12495
  break;
12370
12496
  case "toggle-class":
@@ -12389,7 +12515,7 @@
12389
12515
  tempInput.select();
12390
12516
  document.execCommand("copy");
12391
12517
  document.body.removeChild(tempInput);
12392
- _this.mPVm(e, "copy-content", "cta-clicked");
12518
+ _this.dGod(e, "copy-content", "cta-clicked");
12393
12519
  setTimeout(function () {
12394
12520
  window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
12395
12521
  }, 500);
@@ -12411,7 +12537,7 @@
12411
12537
  }
12412
12538
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
12413
12539
  config.absolute_position_children.forEach(function (childConfig) {
12414
- var childElement = _this.tmRn(childConfig);
12540
+ var childElement = _this.JssF(childConfig);
12415
12541
  element.appendChild(childElement);
12416
12542
  });
12417
12543
  }
@@ -12419,14 +12545,14 @@
12419
12545
  // Process children
12420
12546
  if (config.children && config.children.length > 0) {
12421
12547
  config.children.forEach(function (childConfig) {
12422
- var childElement = _this.tmRn(childConfig);
12548
+ var childElement = _this.JssF(childConfig);
12423
12549
  element.appendChild(childElement);
12424
12550
  });
12425
12551
  }
12426
12552
  if (config.type === "img") {
12427
- var _config$properties3, _config$properties4, _window6, _window6$getFilePath;
12428
- var src = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.src;
12429
- var format = config === null || config === void 0 || (_config$properties4 = config.properties) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.format;
12553
+ var _config$properties4, _config$properties5, _window6, _window6$getFilePath;
12554
+ var src = config === null || config === void 0 || (_config$properties4 = config.properties) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.src;
12555
+ var format = config === null || config === void 0 || (_config$properties5 = config.properties) === null || _config$properties5 === void 0 ? void 0 : _config$properties5.format;
12430
12556
  element["src"] = src && format ? ((_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$getFilePath = _window6.getFilePath) === null || _window6$getFilePath === void 0 ? void 0 : _window6$getFilePath.call(_window6, _this.configId, src, format)) || src : src;
12431
12557
  _this.imageElements.push(element);
12432
12558
  var imgWrapper = document.createElement("div");
@@ -12446,7 +12572,7 @@
12446
12572
  }
12447
12573
  return element;
12448
12574
  });
12449
- _defineProperty(this, "mPVm", function (e, action) {
12575
+ _defineProperty(this, "dGod", function (e, action) {
12450
12576
  var _window$Apxor4, _this$config11, _this$config12, _window$Apxor5, _this$config13, _this$config14, _this$config15, _this$config16;
12451
12577
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
12452
12578
  var additional_info = {
@@ -12475,7 +12601,7 @@
12475
12601
  _this.closeCallBack(action);
12476
12602
  }
12477
12603
  });
12478
- _defineProperty(this, "fqDl", function () {
12604
+ _defineProperty(this, "kxrF", function () {
12479
12605
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
12480
12606
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
12481
12607
  if (_this.imageElements.length === 0) return true;
@@ -12483,13 +12609,13 @@
12483
12609
  return img.complete;
12484
12610
  });
12485
12611
  });
12486
- _defineProperty(this, "uTAP", function () {
12612
+ _defineProperty(this, "sSIh", function () {
12487
12613
  if (!_this.bgImageUrl) return true;
12488
12614
  var img = new Image();
12489
12615
  img.src = _this.bgImageUrl;
12490
12616
  return img.complete;
12491
12617
  });
12492
- _defineProperty(this, "xbQr", function () {
12618
+ _defineProperty(this, "XUBL", function () {
12493
12619
  if (_this.videoElements.length === 0) return true;
12494
12620
  return _this.videoElements.every(function (video) {
12495
12621
  return video.readyState >= 3;
@@ -13006,7 +13132,8 @@
13006
13132
  // Read name and id of the config
13007
13133
  this.configId = messageConfig.configId;
13008
13134
  this.name = messageConfig.configName;
13009
- this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
13135
+ // Replace spaces with empty then all special characters except "-"
13136
+ this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
13010
13137
  this.showCallback = showCallback;
13011
13138
  this.closeCallback = hideCallback;
13012
13139
  this.targetDeletionObserver = null;
@@ -13025,6 +13152,8 @@
13025
13152
  this.interactive_border = config.interactive_border || 10; // Determines the invisible border around the tippy that will prevent it from hiding if the cursorleft it
13026
13153
 
13027
13154
  this.target = new Target$1(config.target);
13155
+ this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
13156
+ this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
13028
13157
  this.elementHighlighter = new ElementHighlighter(config.highlighter);
13029
13158
  this.position = new Position(config.position);
13030
13159
  this.enable_dismiss_actions = config.enable_dismiss_actions;
@@ -13311,7 +13440,7 @@
13311
13440
  }, {
13312
13441
  key: "_findTargetElement",
13313
13442
  value: function _findTargetElement(targetFoundCallback) {
13314
- this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id);
13443
+ this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id, this.find_config, this.view_additional_info);
13315
13444
  if (!this.targetElement) {
13316
13445
  if (this.target.enable_retry) {
13317
13446
  console.info("Not found yet. Rechecking the DOM.");
@@ -13330,7 +13459,7 @@
13330
13459
  var _this3 = this;
13331
13460
  //After every find_interval check the DOM for target element.
13332
13461
  var elementRecheckIntervalId = setInterval(function () {
13333
- _this3.targetElement = getElementFromSelector(_this3.target.id, _this3.target.frame_id);
13462
+ _this3.targetElement = getElementFromSelector(_this3.target.id, _this3.target.frame_id, _this3.find_config, _this3.view_additional_info);
13334
13463
  //If the element is found, stop checking the DOM.
13335
13464
  if (_this3.targetElement) {
13336
13465
  clearInterval(elementRecheckIntervalId);
@@ -13425,7 +13554,7 @@
13425
13554
  case 0:
13426
13555
  _context2.prev = 0;
13427
13556
  _context2.next = 3;
13428
- return this.templateContent.YyDb();
13557
+ return this.templateContent.tclX();
13429
13558
  case 3:
13430
13559
  this.inLineContainer = _context2.sent;
13431
13560
  _context2.next = 9;
@@ -15002,7 +15131,7 @@
15002
15131
  * @description Creates the styles for Marketing message.
15003
15132
  * @returns {string} css styles
15004
15133
  */
15005
- _defineProperty(this, "fPEj", function () {
15134
+ _defineProperty(this, "nqOV", function () {
15006
15135
  if (!_this.enable_marketing) {
15007
15136
  return "";
15008
15137
  }
@@ -15021,7 +15150,7 @@
15021
15150
  * @private
15022
15151
  * @description Sets the marketing content at the end of the Inline
15023
15152
  */
15024
- _defineProperty(this, "VoOg", function () {
15153
+ _defineProperty(this, "BHya", function () {
15025
15154
  if (_this.enable_marketing) {
15026
15155
  var marketingContainer = document.createElement("div");
15027
15156
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -15042,7 +15171,8 @@
15042
15171
  // Read name and id of the config
15043
15172
  this.configId = messageConfig.configId;
15044
15173
  this.name = messageConfig.configName;
15045
- this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
15174
+ // Replace spaces with empty then all special characters except "-"
15175
+ this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
15046
15176
  this.showCallback = showCallback;
15047
15177
  this.closeCallback = hideCallback;
15048
15178
  this.stepperCallBack = stepperCallBack;
@@ -15277,7 +15407,7 @@
15277
15407
  var _this4 = this;
15278
15408
  //After every find_interval check the DOM for target element.
15279
15409
  var elementRecheckIntervalId = setInterval(function () {
15280
- _this4.targetElement = getElementFromSelector(_this4.target.id, _this4.target.frame_id);
15410
+ _this4.targetElement = getElementFromSelector(_this4.target.id, _this4.target.frame_id, _this4.find_config, _this4.view_additional_info);
15281
15411
  //If the element is found, stop checking the DOM.
15282
15412
  if (_this4.targetElement) {
15283
15413
  clearInterval(elementRecheckIntervalId);
@@ -15634,7 +15764,7 @@
15634
15764
  if (apxor_tooltip_styles) {
15635
15765
  return;
15636
15766
  }
15637
- 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.fPEj(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15767
+ 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.nqOV(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15638
15768
  var styleNode = document.createElement("style");
15639
15769
  styleNode.setAttribute("apx-tooltip-styles", "");
15640
15770
  styleNode.innerHTML = styles;
@@ -16444,7 +16574,7 @@
16444
16574
  this._setCloseButton();
16445
16575
 
16446
16576
  //Set the Marketing content
16447
- this.VoOg();
16577
+ this.BHya();
16448
16578
  }
16449
16579
 
16450
16580
  /**
@@ -17702,7 +17832,8 @@
17702
17832
  // Read name and id of the config
17703
17833
  this.configId = messageConfig.configId;
17704
17834
  this.name = messageConfig.configName;
17705
- this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
17835
+ // Replace spaces with empty then all special characters except "-"
17836
+ this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
17706
17837
  this.showCallback = showCallback;
17707
17838
  this.closeCallback = hideCallback;
17708
17839
  this.stepperCallBack = stepperCallBack;
@@ -19216,7 +19347,8 @@
19216
19347
  this.name = name;
19217
19348
  this.terminationConfig = terminationConfig;
19218
19349
  this.terminationTimeoutId = null;
19219
- this.cssPostFix = "-".concat(configId, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
19350
+ // Replace spaces with empty then all special characters except "-"
19351
+ this.cssPostFix = "-".concat(configId, "-").concat(name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
19220
19352
 
19221
19353
  //this.height = config.height || 50; // Mostly auto. But for scrollable templates, should be the pixels.
19222
19354
 
@@ -19339,7 +19471,7 @@
19339
19471
  case 0:
19340
19472
  _context2.prev = 0;
19341
19473
  _context2.next = 3;
19342
- return this.templateContent.YyDb();
19474
+ return this.templateContent.tclX();
19343
19475
  case 3:
19344
19476
  this.inAppContainer = _context2.sent;
19345
19477
  this.inAppContainer.style.zIndex = 99999;
@@ -19538,7 +19670,7 @@
19538
19670
  * @description Creates the styles for Marketing message.
19539
19671
  * @returns {string} css styles
19540
19672
  */
19541
- _defineProperty(this, "fPEj", function () {
19673
+ _defineProperty(this, "nqOV", function () {
19542
19674
  if (!_this.enable_marketing) {
19543
19675
  return "";
19544
19676
  }
@@ -19584,7 +19716,7 @@
19584
19716
  * @private
19585
19717
  * @description Get the response for Form content in the InApp modal.
19586
19718
  */
19587
- _defineProperty(this, "bINs", function (form_elements) {
19719
+ _defineProperty(this, "VNyc", function (form_elements) {
19588
19720
  var obj = {};
19589
19721
  var callback = "";
19590
19722
  form_elements.forEach(function (element) {
@@ -19624,7 +19756,7 @@
19624
19756
  * @private
19625
19757
  * @description Sets the marketing content at the end of the InApp
19626
19758
  */
19627
- _defineProperty(this, "VoOg", function () {
19759
+ _defineProperty(this, "BHya", function () {
19628
19760
  if (_this.enable_marketing) {
19629
19761
  var marketingContainer = document.createElement("div");
19630
19762
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -19639,7 +19771,8 @@
19639
19771
  this.terminationTimeoutId = null;
19640
19772
  this.isWalkthrough = isWalkthrough;
19641
19773
  this.config = config;
19642
- this.cssPostFix = "-".concat(configId, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
19774
+ // Replace spaces with empty then all special characters except "-"
19775
+ this.cssPostFix = "-".concat(configId, "-").concat(name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
19643
19776
  this.delay = config.delay || 0;
19644
19777
  this.background_color = config.bg_color || COLORS.WHITE;
19645
19778
  this.width = config.width || 50; // Scale of the screen
@@ -19883,7 +20016,7 @@
19883
20016
  }, {
19884
20017
  key: "_setStyles",
19885
20018
  value: function _setStyles() {
19886
- 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.fPEj(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
20019
+ 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.nqOV(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19887
20020
  var styleNode = document.createElement("style");
19888
20021
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
19889
20022
  styleNode.innerHTML = styles;
@@ -20247,19 +20380,14 @@
20247
20380
  var imagePath;
20248
20381
  if (this.enable_image) {
20249
20382
  if (this.enable_download_files) {
20250
- var _this$download_files;
20383
+ var _this$download_files, _window, _window$getFilePath;
20251
20384
  var format = "";
20252
20385
  (_this$download_files = this.download_files) === null || _this$download_files === void 0 || _this$download_files.forEach(function (file) {
20253
20386
  if ((file === null || file === void 0 ? void 0 : file.url) === _this4.image.path) {
20254
20387
  format = file.format;
20255
20388
  }
20256
20389
  });
20257
- if (format != "") {
20258
- var _window, _window$getFilePath;
20259
- imagePath = this.image.path && format ? ((_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || (_window$getFilePath = _window.getFilePath) === null || _window$getFilePath === void 0 ? void 0 : _window$getFilePath.call(_window, this.configId, this.image.path, format)) || this.image.path : this.image.path;
20260
- } else {
20261
- imagePath = this.image.path;
20262
- }
20390
+ imagePath = this.image.path && format ? ((_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || (_window$getFilePath = _window.getFilePath) === null || _window$getFilePath === void 0 ? void 0 : _window$getFilePath.call(_window, this.configId, this.image.path, format)) || this.image.path : this.image.path;
20263
20391
  } else {
20264
20392
  imagePath = this.image.path;
20265
20393
  }
@@ -20382,7 +20510,7 @@
20382
20510
  this._setCloseButton();
20383
20511
 
20384
20512
  //Set the Marketing content
20385
- this.VoOg();
20513
+ this.BHya();
20386
20514
  }
20387
20515
 
20388
20516
  /**
@@ -20432,7 +20560,7 @@
20432
20560
  var overlay = this.overlayElement;
20433
20561
  var actionCallback = function actionCallback(isCancelled, action) {
20434
20562
  clearTimeout(_this5.terminationTimeoutId);
20435
- _this5.closeCallback(overlay, action, "new-inline".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
20563
+ _this5.closeCallback(overlay, action, "", ".apx-inapp-container".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
20436
20564
  };
20437
20565
  var next_Callback = function next_Callback(id, action) {
20438
20566
  actionCallback(false, "next");
@@ -20457,19 +20585,14 @@
20457
20585
  } else {
20458
20586
  var imgElement = document.createElement("img");
20459
20587
  if (this.enable_download_files) {
20460
- var _this$download_files2;
20588
+ var _this$download_files2, _window2, _window2$getFilePath;
20461
20589
  var format = "";
20462
20590
  (_this$download_files2 = this.download_files) === null || _this$download_files2 === void 0 || _this$download_files2.forEach(function (file) {
20463
20591
  if ((file === null || file === void 0 ? void 0 : file.url) === _this5.image.path) {
20464
20592
  format = file.format;
20465
20593
  }
20466
20594
  });
20467
- if (format != "") {
20468
- var _window2, _window2$getFilePath;
20469
- imgElement.src = this.image.path && format ? ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || (_window2$getFilePath = _window2.getFilePath) === null || _window2$getFilePath === void 0 ? void 0 : _window2$getFilePath.call(_window2, this.configId, this.image.path, format)) || this.image.path : this.image.path;
20470
- } else {
20471
- imgElement.src = this.image.path;
20472
- }
20595
+ imgElement.src = this.image.path && format ? ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || (_window2$getFilePath = _window2.getFilePath) === null || _window2$getFilePath === void 0 ? void 0 : _window2$getFilePath.call(_window2, this.configId, this.image.path, format)) || this.image.path : this.image.path;
20473
20596
  } else {
20474
20597
  imgElement.src = this.image.path;
20475
20598
  }
@@ -20532,19 +20655,14 @@
20532
20655
  iconDiv.classList.add("apx-inapp-icon-container".concat(this.cssPostFix));
20533
20656
  var iconElement = document.createElement("img");
20534
20657
  if (this.enable_download_files) {
20535
- var _this$download_files3;
20658
+ var _this$download_files3, _window3, _window3$getFilePath;
20536
20659
  var format = "";
20537
20660
  (_this$download_files3 = this.download_files) === null || _this$download_files3 === void 0 || _this$download_files3.forEach(function (file) {
20538
20661
  if ((file === null || file === void 0 ? void 0 : file.url) === _this6.icon.path) {
20539
20662
  format = file.format;
20540
20663
  }
20541
20664
  });
20542
- if (format != "") {
20543
- var _window3, _window3$getFilePath;
20544
- iconElement.src = this.icon.path && format ? ((_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$getFilePath = _window3.getFilePath) === null || _window3$getFilePath === void 0 ? void 0 : _window3$getFilePath.call(_window3, this.configId, iconElement.src, format)) || this.icon.path : this.icon.path;
20545
- } else {
20546
- iconElement.src = this.icon.path;
20547
- }
20665
+ iconElement.src = this.icon.path && format ? ((_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$getFilePath = _window3.getFilePath) === null || _window3$getFilePath === void 0 ? void 0 : _window3$getFilePath.call(_window3, this.configId, this.icon.path, format)) || this.icon.path : this.icon.path;
20548
20666
  } else {
20549
20667
  iconElement.src = this.icon.path;
20550
20668
  }
@@ -20664,7 +20782,7 @@
20664
20782
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
20665
20783
  form.addEventListener("submit", function (e) {
20666
20784
  e.preventDefault();
20667
- var _this8$generateRespon = _this8.bINs(_this8.form.elements),
20785
+ var _this8$generateRespon = _this8.VNyc(_this8.form.elements),
20668
20786
  obj = _this8$generateRespon.obj,
20669
20787
  callback = _this8$generateRespon.callback;
20670
20788
  var evalString = "(obj)=>" + callback + "(obj)";
@@ -20779,7 +20897,7 @@
20779
20897
  var overlay = this.overlayElement;
20780
20898
  var actionCallback = function actionCallback(isCancelled, action) {
20781
20899
  clearTimeout(_this9.terminationTimeoutId);
20782
- _this9.closeCallback(overlay, action, "", "new-inline".concat(_this9.cssPostFix), _this9.closeListener, _this9.redirectionListener);
20900
+ _this9.closeCallback(overlay, action, "", ".apx-inapp-container".concat(_this9.cssPostFix), _this9.closeListener, _this9.redirectionListener);
20783
20901
  };
20784
20902
  var next_Callback = function next_Callback(id, action) {
20785
20903
  actionCallback(false, "next");
@@ -21024,7 +21142,7 @@
21024
21142
  };
21025
21143
  } else {
21026
21144
  // As the video player is hidden by default, unhide if the mode is not PIP.
21027
- _this.RFlT();
21145
+ _this.qkwF();
21028
21146
  }
21029
21147
  _this.showCallback();
21030
21148
  } catch (e) {
@@ -21045,7 +21163,7 @@
21045
21163
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
21046
21164
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
21047
21165
  */
21048
- _defineProperty(this, "DcxS", function () {
21166
+ _defineProperty(this, "FVBl", function () {
21049
21167
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
21050
21168
  width = _getHeightWidthFromRe.width,
21051
21169
  height = _getHeightWidthFromRe.height;
@@ -21057,7 +21175,7 @@
21057
21175
  * @private
21058
21176
  * @description Removes the video player style element.
21059
21177
  */
21060
- _defineProperty(this, "EHdv", function () {
21178
+ _defineProperty(this, "Vbqc", function () {
21061
21179
  var playerStyles = document.getElementById("apx-mpl-styles");
21062
21180
  if (playerStyles) {
21063
21181
  playerStyles.remove();
@@ -21068,7 +21186,7 @@
21068
21186
  * @private
21069
21187
  * @description Attach listeners on the video controls
21070
21188
  */
21071
- _defineProperty(this, "MsLs", function () {
21189
+ _defineProperty(this, "zTef", function () {
21072
21190
  // Listener for the video end. Display the CTA's when the video ends.
21073
21191
  _this.videoElement.addEventListener("ended", function () {
21074
21192
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -21088,7 +21206,6 @@
21088
21206
  // If the play button is clicked again, the CTA buttons should be removed.
21089
21207
  _this.videoElement.addEventListener("play", function () {
21090
21208
  if (!_this.inAppShown) {
21091
- var _window$ApxorRTM5;
21092
21209
  // Initialize the fields to keep the track of aditional info required for logging events.
21093
21210
  _this.minimisedCount = 0;
21094
21211
  _this.maximisedCount = 0;
@@ -21100,17 +21217,6 @@
21100
21217
  _this.slotStartTime = 0; // to tract the start time of the minimize and maximize time slot.
21101
21218
  _this.slotStartTimeVolumeChange = 0; // to track the start time of the volume change time slot.
21102
21219
 
21103
- (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("inapp_shown", {
21104
- message_name: _this.name,
21105
- visibleScreen: location.pathname,
21106
- inappType: "PIP Inapp",
21107
- autoReplay: _this.videoElement.loop ? "On" : "Off",
21108
- defaultSound: _this.videoElement.muted ? "Mute" : "Unmute",
21109
- id: _this.configId,
21110
- videoDuration: Math.round(_this.videoElement.duration),
21111
- videoResolution: "".concat(_this.videoElement.videoWidth, "x").concat(_this.videoElement.videoHeight),
21112
- videoConfiguration: "Streaming"
21113
- });
21114
21220
  _this.inAppShown = true;
21115
21221
  }
21116
21222
  if (_this.videoElement.currentTime === 0 || _this.videoElement.currentTime === _this.videoElement.duration) {
@@ -21127,14 +21233,14 @@
21127
21233
  _this.videoElement.addEventListener("fullscreenchange", function () {
21128
21234
  _this.slotEndTime = _this.videoElement.currentTime;
21129
21235
  if (document.fullscreenElement) {
21130
- var _window$ApxorRTM6;
21236
+ var _window$ApxorRTM5;
21131
21237
  _this.maximisedCount++;
21132
21238
  _this.durationMinimised = Math.round(_this.slotEndTime) - Math.round(_this.slotStartTime);
21133
21239
  if (_this.videoElement.currentTime !== _this.videoElement.duration) {
21134
21240
  _this.totalDurationMinimised += _this.durationMinimised;
21135
21241
  _this.durationMinimisedSlots.push("".concat(Math.round(_this.slotStartTime), "-").concat(Math.round(_this.slotEndTime)));
21136
21242
  }
21137
- (_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_video_inapp_maximised", {
21243
+ (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_video_inapp_maximised", {
21138
21244
  message_name: _this.name,
21139
21245
  durationMinimised: _this.durationMinimised,
21140
21246
  durationSlotMinimised: "".concat(Math.round(_this.slotStartTime), "-").concat(Math.round(_this.slotEndTime)),
@@ -21144,14 +21250,14 @@
21144
21250
  maximisedCount: _this.maximisedCount
21145
21251
  });
21146
21252
  } else {
21147
- var _window$ApxorRTM7;
21253
+ var _window$ApxorRTM6;
21148
21254
  _this.durationMaximised = Math.round(_this.slotEndTime) - Math.round(_this.slotStartTime);
21149
21255
  _this.minimisedCount++;
21150
21256
  if (_this.videoElement.currentTime !== _this.videoElement.duration) {
21151
21257
  _this.totalDurationMaximised += _this.durationMaximised;
21152
21258
  _this.durationMaximisedSlots.push("".concat(Math.round(_this.slotStartTime), "-").concat(Math.round(_this.slotEndTime)));
21153
21259
  }
21154
- (_window$ApxorRTM7 = window.ApxorRTM) === null || _window$ApxorRTM7 === void 0 || _window$ApxorRTM7.logEvent("apx_video_inapp_minimised", {
21260
+ (_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_video_inapp_minimised", {
21155
21261
  message_name: _this.name,
21156
21262
  durationMaximised: _this.durationMaximised,
21157
21263
  durationSlotMaximised: "".concat(Math.round(_this.slotStartTime), "-").concat(Math.round(_this.slotEndTime)),
@@ -21165,9 +21271,9 @@
21165
21271
  });
21166
21272
  _this.videoElement.addEventListener("volumechange", function () {
21167
21273
  if (!isNaN(_this.slotStartTimeVolumeChange)) {
21168
- var _window$ApxorRTM8;
21274
+ var _window$ApxorRTM7;
21169
21275
  _this.volumeClickedCount++;
21170
- (_window$ApxorRTM8 = window.ApxorRTM) === null || _window$ApxorRTM8 === void 0 || _window$ApxorRTM8.logEvent("apx_video_inapp_volume_button_clicked", {
21276
+ (_window$ApxorRTM7 = window.ApxorRTM) === null || _window$ApxorRTM7 === void 0 || _window$ApxorRTM7.logEvent("apx_video_inapp_volume_button_clicked", {
21171
21277
  message_name: _this.name,
21172
21278
  id: _this.configId,
21173
21279
  actionPerformed: _this.videoElement.muted ? "mute" : "unmute",
@@ -21183,7 +21289,7 @@
21183
21289
  * @private
21184
21290
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21185
21291
  */
21186
- _defineProperty(this, "drXm", function () {
21292
+ _defineProperty(this, "pAjc", function () {
21187
21293
  var _this$terminationConf;
21188
21294
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
21189
21295
  // On Exit of the PIP,
@@ -21223,7 +21329,7 @@
21223
21329
  * @private Sets the custom controls on the video player.
21224
21330
  * PIP and close are the custom controls that are created and positions on the video.
21225
21331
  */
21226
- _defineProperty(this, "iXXi", function () {
21332
+ _defineProperty(this, "EVzk", function () {
21227
21333
  _this.enable_close_button;
21228
21334
  if (_this.enable_close_button) {
21229
21335
  var closeButton = document.createElement("span");
@@ -21270,21 +21376,21 @@
21270
21376
  * @function hideVideoPlayer
21271
21377
  * @description Sets the visibility of the video player to hidden.
21272
21378
  */
21273
- _defineProperty(this, "sbcq", function () {
21379
+ _defineProperty(this, "lKkb", function () {
21274
21380
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
21275
21381
  });
21276
21382
  /**
21277
21383
  * @function unhideVideoPlayer
21278
21384
  * @description Unhides video player.
21279
21385
  */
21280
- _defineProperty(this, "RFlT", function () {
21386
+ _defineProperty(this, "qkwF", function () {
21281
21387
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
21282
21388
  });
21283
21389
  /**
21284
21390
  * @function getVideoElement
21285
21391
  * @returns {HTMLElement} Video ekement
21286
21392
  */
21287
- _defineProperty(this, "gkcW", function () {
21393
+ _defineProperty(this, "CVxJ", function () {
21288
21394
  return _this.videoElement;
21289
21395
  });
21290
21396
  this.videoPlayer = null;
@@ -21297,7 +21403,8 @@
21297
21403
  this.configId = configId;
21298
21404
  this.config = config;
21299
21405
  this.name = name || "VideoPlayer";
21300
- this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
21406
+ // Replace spaces with empty then all special characters except "-"
21407
+ this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
21301
21408
  this.replayCount = 0;
21302
21409
  this.inAppShown = false; // This boolean restricts the "inapp_shown" event from logging multiple times.
21303
21410
 
@@ -21338,7 +21445,7 @@
21338
21445
  this.videoPlayer.style.backgroundColor = this.bg_color;
21339
21446
 
21340
21447
  // Video has a resolution, not deviating from the resolution set the height and width.
21341
- this.DcxS();
21448
+ this.FVBl();
21342
21449
  //Generate the styles and add them to the document head.
21343
21450
  this._setVideoPlayerStyles();
21344
21451
  //Set the position of the video player with in the 5 possible positions.
@@ -21346,16 +21453,16 @@
21346
21453
  //Create a video element,set the source and add to the container.
21347
21454
  this._setPlayerContent();
21348
21455
  //Set the listeners on the video control buttons.
21349
- this.MsLs();
21456
+ this.zTef();
21350
21457
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21351
- this.drXm();
21458
+ this.pAjc();
21352
21459
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
21353
21460
  //Reason - We want to position them at the top right and left positions.
21354
- this.iXXi();
21461
+ this.EVzk();
21355
21462
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
21356
21463
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
21357
21464
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
21358
- this.sbcq();
21465
+ this.lKkb();
21359
21466
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
21360
21467
  this._setAutoTerminate();
21361
21468
  document.body.appendChild(this.videoPlayer);
@@ -21459,7 +21566,7 @@
21459
21566
  function _onClose() {
21460
21567
  var closeButtonName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "web_minimise_x_clicked";
21461
21568
  try {
21462
- var _window$ApxorRTM10;
21569
+ var _window$ApxorRTM9;
21463
21570
  if (this.inAppShown) {
21464
21571
  if (!document.fullscreenElement) {
21465
21572
  this.totalDurationMinimised += Math.round(this.videoElement.currentTime) - Math.round(this.slotStartTime);
@@ -21470,10 +21577,10 @@
21470
21577
  }
21471
21578
  }
21472
21579
  this.videoPlayer.remove();
21473
- this.EHdv();
21580
+ this.Vbqc();
21474
21581
  if (closeButtonName !== "auto_dismiss") {
21475
- var _window$ApxorRTM9;
21476
- (_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_video_inapp_close_button_clicked", {
21582
+ var _window$ApxorRTM8;
21583
+ (_window$ApxorRTM8 = window.ApxorRTM) === null || _window$ApxorRTM8 === void 0 || _window$ApxorRTM8.logEvent("apx_video_inapp_close_button_clicked", {
21477
21584
  message_name: this.name,
21478
21585
  id: this.configId,
21479
21586
  totalDurationWatchedSlot: "0-".concat(Math.round(this.videoElement.currentTime)),
@@ -21481,7 +21588,7 @@
21481
21588
  closeButtonName: closeButtonName
21482
21589
  });
21483
21590
  }
21484
- (_window$ApxorRTM10 = window.ApxorRTM) === null || _window$ApxorRTM10 === void 0 || _window$ApxorRTM10.logEvent("apx_inapp_dismissed", {
21591
+ (_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_inapp_dismissed", {
21485
21592
  campaignName: this.name,
21486
21593
  id: this.configId,
21487
21594
  totalDurationWatched: Math.round(this.videoElement.currentTime),
@@ -21519,7 +21626,7 @@
21519
21626
  if (this.buttons.enable_top || this.buttons.enable_center || this.buttons.enable_bottom) {
21520
21627
  var removeCallback = function removeCallback(isCancel, action, index) {
21521
21628
  try {
21522
- var _window$ApxorRTM11;
21629
+ var _window$ApxorRTM10;
21523
21630
  var button;
21524
21631
  if (_this3.buttons.enable_top && _this3.buttons.top.length > 0) {
21525
21632
  button = _this3.buttons.top;
@@ -21530,7 +21637,7 @@
21530
21637
  if (_this3.buttons.enable_bottom && _this3.buttons.bottom.length) {
21531
21638
  button = _this3.buttons.bottom;
21532
21639
  }
21533
- (_window$ApxorRTM11 = window.ApxorRTM) === null || _window$ApxorRTM11 === void 0 || _window$ApxorRTM11.logEvent("apx_video_inapp_button_clicked", {
21640
+ (_window$ApxorRTM10 = window.ApxorRTM) === null || _window$ApxorRTM10 === void 0 || _window$ApxorRTM10.logEvent("apx_video_inapp_button_clicked", {
21534
21641
  buttonName: button.at(index).text.text,
21535
21642
  redirection: button.at(index).action.type,
21536
21643
  totalDurationWatched: Math.round(_this3.videoElement.currentTime),
@@ -21540,7 +21647,7 @@
21540
21647
  replayCount: _this3.replayCount
21541
21648
  });
21542
21649
  _this3.videoPlayer.remove();
21543
- _this3.EHdv();
21650
+ _this3.Vbqc();
21544
21651
  _this3.hideCallback();
21545
21652
  } catch (e) {
21546
21653
  console.log("Can't close the video player\n".concat(e));
@@ -21634,14 +21741,14 @@
21634
21741
  try {
21635
21742
  var _window;
21636
21743
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
21637
- var element = _this.LJbh(_this.layout);
21638
- _this.RUIz();
21744
+ var element = _this.THPB(_this.layout);
21745
+ _this.vIRY();
21639
21746
  window.onresize = function () {
21640
- _this.gwwj();
21747
+ _this.hRVV();
21641
21748
  };
21642
21749
  _this.imageElements.forEach(function (img) {
21643
21750
  img.addEventListener("error", function () {
21644
- _this.woit("provided image doesn't exists");
21751
+ _this.ayPc("provided image doesn't exists");
21645
21752
  });
21646
21753
  });
21647
21754
  var rootContainer = document.createElement("div");
@@ -21652,7 +21759,7 @@
21652
21759
  var styleElement = document.createElement("style");
21653
21760
  styleElement.innerHTML = _this.styleContent;
21654
21761
  document.head.appendChild(styleElement);
21655
- _this.JoIM(_this.termination);
21762
+ _this.KGpF(_this.termination);
21656
21763
  try {
21657
21764
  eval(_this.script);
21658
21765
  } catch (e) {
@@ -21663,10 +21770,10 @@
21663
21770
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
21664
21771
  _this.wait_interval -= 1;
21665
21772
  if (_this.wait_interval <= 0) {
21666
- _this.woit("provided media doesn't exists");
21773
+ _this.ayPc("provided media doesn't exists");
21667
21774
  } else {
21668
- if (_this.xbQr() && _this.fqDl() && _this.uTAP()) {
21669
- _this.gwwj();
21775
+ if (_this.XUBL() && _this.kxrF() && _this.sSIh()) {
21776
+ _this.hRVV();
21670
21777
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
21671
21778
  }
21672
21779
  }
@@ -21677,9 +21784,9 @@
21677
21784
  (_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));
21678
21785
  }
21679
21786
  });
21680
- _defineProperty(this, "woit", function (reason) {
21681
- var _window$ApxorRTM, _window4;
21682
- !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
21787
+ _defineProperty(this, "ayPc", function (reason) {
21788
+ var _window$Apxor, _window4;
21789
+ !_this.loggedNudgeNotShownEvent && ((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.logAppEvent("apx_nudge_not_shown", {
21683
21790
  apx_nudge_name: _this.name,
21684
21791
  apx_nudge_id: _this.configId,
21685
21792
  apx_template_time: "embed-card",
@@ -21691,14 +21798,14 @@
21691
21798
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
21692
21799
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
21693
21800
  });
21694
- _defineProperty(this, "RUIz", function () {
21801
+ _defineProperty(this, "vIRY", function () {
21695
21802
  var EmbeddedCardsStyles = document.createElement("style");
21696
21803
  EmbeddedCardsStyles.innerHTML = _this.initialStyles;
21697
21804
  EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
21698
21805
  document.head.appendChild(EmbeddedCardsStyles);
21699
21806
  });
21700
- _defineProperty(this, "LJbh", function (config) {
21701
- var _window$Apxor;
21807
+ _defineProperty(this, "THPB", function (config) {
21808
+ var _window$Apxor2;
21702
21809
  var element;
21703
21810
  switch (config.type) {
21704
21811
  case "cell":
@@ -21715,7 +21822,7 @@
21715
21822
  element.muted = true;
21716
21823
  element.disablePictureInPicture = true;
21717
21824
  element.autoplay = true;
21718
- if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
21825
+ if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
21719
21826
  element.playsInline = true;
21720
21827
  }
21721
21828
  break;
@@ -21739,6 +21846,10 @@
21739
21846
  element.appendChild(sourceElement);
21740
21847
  continue;
21741
21848
  }
21849
+ if (prop === "card_name") {
21850
+ var _element, _element$setAttribute, _element2, _config$properties$pr;
21851
+ (_element = element) === null || _element === void 0 || (_element$setAttribute = (_element2 = _element).setAttribute) === null || _element$setAttribute === void 0 || _element$setAttribute.call(_element2, prop, (_config$properties$pr = config.properties[prop]) !== null && _config$properties$pr !== void 0 ? _config$properties$pr : "");
21852
+ }
21742
21853
  element[prop] = config.properties[prop];
21743
21854
  }
21744
21855
  }
@@ -21758,7 +21869,9 @@
21758
21869
  }
21759
21870
  styles = ".".concat(config._id, " {\n ").concat(objectToCSS(layoutStyleObject), "\n }\n ");
21760
21871
  } else {
21761
- styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
21872
+ var _config$properties$cu, _config$properties3;
21873
+ // custom_font_face
21874
+ styles = "".concat((_config$properties$cu = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 || (_config$properties3 = _config$properties3.custom_font) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.font_face) !== null && _config$properties$cu !== void 0 ? _config$properties$cu : "", ".").concat(config._id, " {\n ").concat(config.css, "\n }\n ");
21762
21875
  }
21763
21876
  _this.initialStyles += styles;
21764
21877
  }
@@ -21771,35 +21884,40 @@
21771
21884
  element.onclick = function (e) {
21772
21885
  e.stopPropagation();
21773
21886
  window.Apxor.redirect(JSON.stringify(action));
21774
- _this.mPVm(e);
21887
+ _this.dGod(e);
21775
21888
  };
21776
21889
  break;
21777
21890
  case "show-video":
21778
21891
  element.onclick = function (e) {
21779
21892
  e.stopPropagation();
21780
21893
  window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
21781
- _this.mPVm(e);
21894
+ _this.dGod(e);
21782
21895
  };
21783
21896
  break;
21784
21897
  case "cancel":
21785
21898
  element.onclick = function (e) {
21786
21899
  e.stopPropagation();
21787
- _this.mPVm(e);
21900
+ _this.dGod(e);
21788
21901
  window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
21789
21902
  };
21790
21903
  break;
21791
21904
  case "dismiss":
21792
21905
  element.onclick = function (e) {
21793
21906
  e.stopPropagation();
21794
- _this.mPVm(e);
21907
+ _this.dGod(e);
21795
21908
  };
21796
21909
  break;
21797
21910
  case "never":
21798
21911
  element.onclick = function (e) {
21912
+ var _window$Apxor3;
21799
21913
  e.stopPropagation();
21800
21914
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
21801
- window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
21802
- _this.mPVm(e);
21915
+ (_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 || _window$Apxor3.logAppEvent("apx_nudge_terminated", {
21916
+ apx_nudge_name: _this.name,
21917
+ apx_nudge_id: _this.configId,
21918
+ apx_termination_type: "never-show"
21919
+ });
21920
+ _this.dGod(e);
21803
21921
  };
21804
21922
  break;
21805
21923
  case "toggle-class":
@@ -21824,7 +21942,7 @@
21824
21942
  tempInput.select();
21825
21943
  document.execCommand("copy");
21826
21944
  document.body.removeChild(tempInput);
21827
- _this.mPVm(e);
21945
+ _this.dGod(e);
21828
21946
  };
21829
21947
  break;
21830
21948
  case "log-app-event":
@@ -21843,7 +21961,7 @@
21843
21961
  }
21844
21962
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
21845
21963
  config.absolute_position_children.forEach(function (childConfig) {
21846
- var childElement = _this.tmRn(childConfig);
21964
+ var childElement = _this.JssF(childConfig);
21847
21965
  element.appendChild(childElement);
21848
21966
  });
21849
21967
  }
@@ -21851,14 +21969,14 @@
21851
21969
  // Process children
21852
21970
  if (config.children && config.children.length > 0) {
21853
21971
  config.children.forEach(function (childConfig) {
21854
- var childElement = _this.LJbh(childConfig);
21972
+ var childElement = _this.THPB(childConfig);
21855
21973
  element.appendChild(childElement);
21856
21974
  });
21857
21975
  }
21858
21976
  if (config.type === "img") {
21859
- var _config$properties3, _config$properties4, _window5, _window5$getFilePath;
21860
- var src = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.src;
21861
- var format = config === null || config === void 0 || (_config$properties4 = config.properties) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.format;
21977
+ var _config$properties4, _config$properties5, _window5, _window5$getFilePath;
21978
+ var src = config === null || config === void 0 || (_config$properties4 = config.properties) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.src;
21979
+ var format = config === null || config === void 0 || (_config$properties5 = config.properties) === null || _config$properties5 === void 0 ? void 0 : _config$properties5.format;
21862
21980
  element["src"] = src && format ? ((_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$getFilePath = _window5.getFilePath) === null || _window5$getFilePath === void 0 ? void 0 : _window5$getFilePath.call(_window5, _this.configId, src, format)) || src : src;
21863
21981
  _this.imageElements.push(element);
21864
21982
  var imgWrapper = document.createElement("div");
@@ -21877,7 +21995,7 @@
21877
21995
  }
21878
21996
  return element;
21879
21997
  });
21880
- _defineProperty(this, "mPVm", function (e) {
21998
+ _defineProperty(this, "dGod", function (e) {
21881
21999
  var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
21882
22000
  var additional_info = {
21883
22001
  apx_nudge_name: _this.name,
@@ -21886,15 +22004,15 @@
21886
22004
  apx_template_name: "embed-card"
21887
22005
  };
21888
22006
  if (e.target.tagName === "BUTTON") {
21889
- var _e$target$innerHTML, _e$target2, _window$ApxorRTM2;
22007
+ var _e$target$innerHTML, _e$target2, _window$Apxor4;
21890
22008
  additional_info["apx_cta_text"] = (_e$target$innerHTML = e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.innerHTML) !== null && _e$target$innerHTML !== void 0 ? _e$target$innerHTML : "";
21891
- (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_card_CTA_clicked", additional_info);
22009
+ (_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 || _window$Apxor4.logAppEvent("apx_card_CTA_clicked", additional_info);
21892
22010
  } else {
21893
- var _window$ApxorRTM3;
21894
- (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_card_interaction", additional_info);
22011
+ var _window$Apxor5;
22012
+ (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.logAppEvent("apx_card_interaction", additional_info);
21895
22013
  }
21896
22014
  });
21897
- _defineProperty(this, "JoIM", function (config) {
22015
+ _defineProperty(this, "KGpF", function (config) {
21898
22016
  config.forEach(function (id) {
21899
22017
  var element = document.getElementById(id);
21900
22018
  if (element) {
@@ -21902,7 +22020,7 @@
21902
22020
  }
21903
22021
  });
21904
22022
  });
21905
- _defineProperty(this, "fqDl", function () {
22023
+ _defineProperty(this, "kxrF", function () {
21906
22024
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
21907
22025
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
21908
22026
  if (_this.imageElements.length === 0) return true;
@@ -21910,19 +22028,19 @@
21910
22028
  return img.complete;
21911
22029
  });
21912
22030
  });
21913
- _defineProperty(this, "xbQr", function () {
22031
+ _defineProperty(this, "XUBL", function () {
21914
22032
  if (_this.videoElements.length === 0) return true;
21915
22033
  return _this.videoElements.every(function (video) {
21916
22034
  return video.readyState >= 3;
21917
22035
  });
21918
22036
  });
21919
- _defineProperty(this, "uTAP", function () {
22037
+ _defineProperty(this, "sSIh", function () {
21920
22038
  if (!_this.bgImageUrl) return true;
21921
22039
  var img = new Image();
21922
22040
  img.src = _this.bgImageUrl;
21923
22041
  return img.complete;
21924
22042
  });
21925
- _defineProperty(this, "gwwj", function () {
22043
+ _defineProperty(this, "hRVV", function () {
21926
22044
  var _window6, _window7;
21927
22045
  var width = window.document.querySelector("html").offsetWidth;
21928
22046
  var height = window.document.querySelector("html").offsetHeight;
@@ -22011,8 +22129,8 @@
22011
22129
  _this.storyContainer.appendChild(currentElement);
22012
22130
  _this.storyContainer.appendChild(slideDetails);
22013
22131
  document.body.appendChild(_this.storyContainer);
22014
- _this.Jmwb();
22015
- _this.mKEK();
22132
+ _this.QWQi();
22133
+ _this.Hxdq();
22016
22134
  _this.progress = Array.from(document.querySelectorAll(".progress"));
22017
22135
  var current_slide = document.querySelector(".slide-details");
22018
22136
  var playNext = function playNext(e) {
@@ -22058,7 +22176,7 @@
22058
22176
  _existingAbsoluteElements2.forEach(function (element) {
22059
22177
  element.remove();
22060
22178
  });
22061
- // this.uqKf();
22179
+ // this.pZHH();
22062
22180
  var _currentSlideDetails = document.querySelector(".slide-details");
22063
22181
  _currentSlideDetails.innerHTML = "";
22064
22182
  _this.position = _this.position + 1;
@@ -22154,7 +22272,7 @@
22154
22272
  absolute_header = document.createElement("div");
22155
22273
  current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
22156
22274
  var current_absolute_element;
22157
- current_absolute_element = _this.tmRn(current_element);
22275
+ current_absolute_element = _this.JssF(current_element);
22158
22276
  absolute_header.appendChild(current_absolute_element);
22159
22277
  });
22160
22278
  (_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
@@ -22163,12 +22281,12 @@
22163
22281
  if (current_slide_from_config.media_type === "image") {
22164
22282
  var _window$Apxor;
22165
22283
  element = document.createElement("div");
22166
- var image_src;
22284
+ var imageSrc;
22167
22285
  if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) != "ios") {
22168
22286
  var _window$Apxor2;
22169
- image_src = (_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.getFilePathForStories(_this.config[_this.position].id, current_slide_from_config.media_url);
22170
- if (image_src && image_src != "") {
22171
- document.body.style.backgroundImage = "url(".concat(image_src, ")");
22287
+ imageSrc = (_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.getFilePathForStories(_this.config[_this.position].id, current_slide_from_config.media_url);
22288
+ if (imageSrc && imageSrc != "") {
22289
+ document.body.style.backgroundImage = "url(".concat(imageSrc, ")");
22172
22290
  document.body.style.backgroundSize = "100% auto";
22173
22291
  document.body.style.backgroundPosition = "center";
22174
22292
  document.body.style.backgroundRepeat = "no-repeat";
@@ -22214,7 +22332,7 @@
22214
22332
  document.body.style.backgroundRepeat = "";
22215
22333
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
22216
22334
  delete updated_layout_without_absolute_elements["absolute_position_children"];
22217
- element = _this.tmRn(updated_layout_without_absolute_elements);
22335
+ element = _this.JssF(updated_layout_without_absolute_elements);
22218
22336
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
22219
22337
  document.body.style.margin = "0px";
22220
22338
  }
@@ -22222,9 +22340,9 @@
22222
22340
  current_slide.removeChild(current_slide.children[0]);
22223
22341
  }
22224
22342
  current_slide.appendChild(element);
22225
- _this.dioq();
22343
+ _this.lJjJ();
22226
22344
  window.intervalToCheckImgStatus = setInterval(function () {
22227
- if (_this.JdWy()) {
22345
+ if (_this.Aayi()) {
22228
22346
  clearInterval(window.intervalToCheckImgStatus);
22229
22347
  }
22230
22348
  }, 500);
@@ -22252,7 +22370,7 @@
22252
22370
  });
22253
22371
  playNext();
22254
22372
  });
22255
- _defineProperty(this, "uqKf", function () {
22373
+ _defineProperty(this, "pZHH", function () {
22256
22374
  document.body.classList.add("slide-right");
22257
22375
  var animationEndCounter = 0;
22258
22376
  var onAnimationEnd = function onAnimationEnd() {
@@ -22264,13 +22382,15 @@
22264
22382
  };
22265
22383
  document.body.addEventListener("animationend", onAnimationEnd);
22266
22384
  });
22267
- _defineProperty(this, "tmRn", function (config) {
22385
+ _defineProperty(this, "JssF", function (config) {
22268
22386
  var _window$Apxor4;
22269
22387
  var element;
22388
+ var explicit_styles = "";
22270
22389
  var startY;
22271
22390
  var progress_bar;
22272
22391
  var slide_header;
22273
22392
  var slide_details;
22393
+ var ElementStyles = document.createElement("style");
22274
22394
  switch (config.type) {
22275
22395
  case "cell":
22276
22396
  case "text":
@@ -22320,7 +22440,7 @@
22320
22440
  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>";
22321
22441
  element.id = "apx-mute-icon";
22322
22442
  element.addEventListener("touchstart", function (event) {
22323
- _this.lCIW(event);
22443
+ _this.HChJ(event);
22324
22444
  });
22325
22445
  break;
22326
22446
  case "copy_icon":
@@ -22378,7 +22498,12 @@
22378
22498
  styles = objectToCSS(imgStyleObject);
22379
22499
  element.style = styles;
22380
22500
  } else {
22501
+ var _config$properties3;
22381
22502
  element.style = config.css;
22503
+ if (config !== null && config !== void 0 && (_config$properties3 = config.properties) !== null && _config$properties3 !== void 0 && _config$properties3.custom_font) {
22504
+ var _config$properties$cu, _config$properties4;
22505
+ explicit_styles = "".concat((_config$properties$cu = (_config$properties4 = config.properties) === null || _config$properties4 === void 0 || (_config$properties4 = _config$properties4.custom_font) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.font_face) !== null && _config$properties$cu !== void 0 ? _config$properties$cu : "");
22506
+ }
22382
22507
  }
22383
22508
  }
22384
22509
  if (config.enable_actions && config.actions.length > 0) {
@@ -22514,7 +22639,7 @@
22514
22639
  }
22515
22640
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
22516
22641
  config.absolute_position_children.forEach(function (childConfig) {
22517
- var childElement = _this.tmRn(childConfig);
22642
+ var childElement = _this.JssF(childConfig);
22518
22643
  element.appendChild(childElement);
22519
22644
  });
22520
22645
  }
@@ -22522,13 +22647,13 @@
22522
22647
  // Process children
22523
22648
  if (config.children && config.children.length > 0) {
22524
22649
  config.children.forEach(function (childConfig) {
22525
- var childElement = _this.tmRn(childConfig);
22650
+ var childElement = _this.JssF(childConfig);
22526
22651
  element.appendChild(childElement);
22527
22652
  });
22528
22653
  }
22529
22654
  if (config.type === "img") {
22530
- var _config$properties3, _window5, _window5$getFilePathF;
22531
- var src = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.src;
22655
+ var _config$properties5, _window5, _window5$getFilePathF;
22656
+ var src = config === null || config === void 0 || (_config$properties5 = config.properties) === null || _config$properties5 === void 0 ? void 0 : _config$properties5.src;
22532
22657
  element["src"] = src ? ((_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$getFilePathF = _window5.getFilePathForStories) === null || _window5$getFilePathF === void 0 ? void 0 : _window5$getFilePathF.call(_window5, _this.config[_this.position].id, src)) || src : src;
22533
22658
  _this.imageElements.push(element);
22534
22659
  var imgWrapper = document.createElement("div");
@@ -22546,9 +22671,11 @@
22546
22671
  } else if (config.type === "video") {
22547
22672
  _this.videoElements.push(element);
22548
22673
  }
22674
+ ElementStyles.innerHTML = explicit_styles;
22675
+ element.appendChild(ElementStyles);
22549
22676
  return element;
22550
22677
  });
22551
- _defineProperty(this, "lCIW", function (event) {
22678
+ _defineProperty(this, "HChJ", function (event) {
22552
22679
  var slide_details_to_be_deleted;
22553
22680
  var mute_child_elements;
22554
22681
  var unmute_child_elements;
@@ -22578,11 +22705,11 @@
22578
22705
  }
22579
22706
  // this.muteElement.addEventListener("touchstart", (event) => {
22580
22707
  // event.stopPropagation();
22581
- // this.lCIW(event);
22708
+ // this.HChJ(event);
22582
22709
  // });
22583
22710
  }
22584
22711
  });
22585
- _defineProperty(this, "mKEK", function () {
22712
+ _defineProperty(this, "Hxdq", function () {
22586
22713
  var tapTimeout;
22587
22714
  var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
22588
22715
  var longPressDuration = 200;
@@ -22706,7 +22833,7 @@
22706
22833
  event.target.dataset.touchStartTime = event.timeStamp;
22707
22834
  });
22708
22835
  });
22709
- _defineProperty(this, "Jmwb", function () {
22836
+ _defineProperty(this, "QWQi", function () {
22710
22837
  var startY, startX;
22711
22838
  _this.storyContainer.addEventListener("touchstart", function (event) {
22712
22839
  _this.swipeTouch = true;
@@ -22913,7 +23040,7 @@
22913
23040
  }, 50);
22914
23041
  });
22915
23042
  });
22916
- _defineProperty(this, "dioq", function () {
23043
+ _defineProperty(this, "lJjJ", function () {
22917
23044
  _this.loader.style.display = "block";
22918
23045
  var progress = Array.from(document.querySelectorAll(".progress"));
22919
23046
  var activeIndex = progress.findIndex(function (el) {
@@ -22929,7 +23056,7 @@
22929
23056
  }
22930
23057
  }
22931
23058
  });
22932
- _defineProperty(this, "XEwF", function () {
23059
+ _defineProperty(this, "ofzx", function () {
22933
23060
  if (!_this.continueLoading) {
22934
23061
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22935
23062
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
@@ -22949,19 +23076,19 @@
22949
23076
  _this.loader.style.display = "none";
22950
23077
  }
22951
23078
  });
22952
- _defineProperty(this, "fqDl", function () {
23079
+ _defineProperty(this, "kxrF", function () {
22953
23080
  if (_this.imageElements.length === 0) return true;
22954
23081
  return _this.imageElements.every(function (img) {
22955
23082
  return img.complete;
22956
23083
  });
22957
23084
  });
22958
- _defineProperty(this, "xbQr", function () {
23085
+ _defineProperty(this, "XUBL", function () {
22959
23086
  if (_this.videoElements.length === 0) return true;
22960
23087
  return _this.videoElements.every(function (video) {
22961
23088
  return video.readyState >= 3;
22962
23089
  });
22963
23090
  });
22964
- _defineProperty(this, "JdWy", function () {
23091
+ _defineProperty(this, "Aayi", function () {
22965
23092
  var bodyStyles = window.getComputedStyle(document.body);
22966
23093
  var backgroundImage = bodyStyles.backgroundImage;
22967
23094
  if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
@@ -22971,7 +23098,7 @@
22971
23098
  var img = new Image();
22972
23099
  img.src = imageUrl;
22973
23100
  if (img.complete) {
22974
- _this.XEwF();
23101
+ _this.ofzx();
22975
23102
  return true;
22976
23103
  }
22977
23104
  return false;
@@ -22979,21 +23106,21 @@
22979
23106
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22980
23107
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
22981
23108
  if (childElements[0].readyState >= 3) {
22982
- _this.XEwF();
23109
+ _this.ofzx();
22983
23110
  return true;
22984
23111
  }
22985
23112
  return false;
22986
23113
  } else {
22987
23114
  if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
22988
- _this.XEwF();
23115
+ _this.ofzx();
22989
23116
  return true;
22990
- } else if (_this.fqDl() && _this.xbQr()) {
22991
- _this.XEwF();
23117
+ } else if (_this.kxrF() && _this.XUBL()) {
23118
+ _this.ofzx();
22992
23119
  return true;
22993
23120
  }
22994
23121
  }
22995
23122
  });
22996
- _defineProperty(this, "Ktty", function (event, startY, action) {
23123
+ _defineProperty(this, "jJUR", function (event, startY, action) {
22997
23124
  event.stopPropagation();
22998
23125
  var endY = event.changedTouches[0].clientY;
22999
23126
  var deltaY = startY - endY;
@@ -23088,7 +23215,7 @@
23088
23215
  this.swipe_action;
23089
23216
  this.continueLoading = false;
23090
23217
  this.boundSwipeUpHandling = function (event) {
23091
- return _this.Ktty(event, _this.startY, _this.swipe_action);
23218
+ return _this.jJUR(event, _this.startY, _this.swipe_action);
23092
23219
  };
23093
23220
  }
23094
23221
  _createClass(Stories, [{
@@ -23151,7 +23278,7 @@
23151
23278
  } else {
23152
23279
  var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
23153
23280
  // Move to the first slide of the next group
23154
- // this.uqKf();
23281
+ // this.pZHH();
23155
23282
  this.position++;
23156
23283
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
23157
23284
  this.slides = this.config[this.position].slides;
@@ -23277,7 +23404,7 @@
23277
23404
  if (activeIndex === 0) {
23278
23405
  var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
23279
23406
  // If at the first slide of the current group, move to the last slide of the previous group
23280
- // this.uqKf();
23407
+ // this.pZHH();
23281
23408
  this.position--;
23282
23409
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
23283
23410
  this.slides = this.config[this.position].slides;
@@ -23407,12 +23534,12 @@
23407
23534
  if ((current_slide_from_config === null || current_slide_from_config === void 0 ? void 0 : current_slide_from_config.media_type) === "image") {
23408
23535
  var _window$Apxor5;
23409
23536
  element = document.createElement("div");
23410
- var image_src;
23537
+ var imageSrc;
23411
23538
  if (((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) != "ios") {
23412
23539
  var _window$Apxor6;
23413
- image_src = (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.getFilePathForStories(this.config[this.position].id, current_slide_from_config.media_url);
23414
- if (image_src && image_src != "") {
23415
- document.body.style.backgroundImage = "url(".concat(image_src, ")");
23540
+ imageSrc = (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.getFilePathForStories(this.config[this.position].id, current_slide_from_config.media_url);
23541
+ if (imageSrc && imageSrc != "") {
23542
+ document.body.style.backgroundImage = "url(".concat(imageSrc, ")");
23416
23543
  document.body.style.backgroundSize = "100% auto";
23417
23544
  document.body.style.backgroundPosition = "center";
23418
23545
  document.body.style.backgroundRepeat = "no-repeat";
@@ -23464,25 +23591,25 @@
23464
23591
  // Create custom content
23465
23592
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
23466
23593
  delete updated_layout_without_absolute_elements["absolute_position_children"];
23467
- element = this.tmRn(updated_layout_without_absolute_elements);
23594
+ element = this.JssF(updated_layout_without_absolute_elements);
23468
23595
  }
23469
23596
  // Append slide content to slide details container
23470
23597
 
23471
23598
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23472
23599
  document.body.style.margin = "0px";
23473
23600
  currentSlideDetails.appendChild(element);
23474
- this.dioq();
23601
+ this.lJjJ();
23475
23602
 
23476
23603
  // Handle absolute position children
23477
23604
  if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
23478
23605
  current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
23479
- var childElement = _this2.tmRn(childConfig);
23606
+ var childElement = _this2.JssF(childConfig);
23480
23607
  // Append absolute position children to slide details container
23481
23608
  currentSlideDetails.appendChild(childElement);
23482
23609
  });
23483
23610
  }
23484
23611
  window.intervalToCheckImgStatus2 = setInterval(function () {
23485
- if (_this2.JdWy()) {
23612
+ if (_this2.Aayi()) {
23486
23613
  clearInterval(window.intervalToCheckImgStatus2);
23487
23614
  }
23488
23615
  }, 500);
@@ -23917,15 +24044,15 @@
23917
24044
  _this$badge$animation2,
23918
24045
  _this$badge$animation3;
23919
24046
  _classCallCheck(this, ApxorBadge);
23920
- _defineProperty(this, "abJr", function () {
24047
+ _defineProperty(this, "nJJY", function () {
23921
24048
  var delayMillis = _this.delayMillis * 1000;
23922
24049
  _this.shakeAnimationRepeat(_this.interCount, delayMillis);
23923
24050
  });
23924
- _defineProperty(this, "ySbr", function () {
24051
+ _defineProperty(this, "PfNh", function () {
23925
24052
  var delayMillis = _this.delayMillis * 1000;
23926
24053
  _this.fadeAnimationRepeat(_this.interCount, delayMillis);
23927
24054
  });
23928
- _defineProperty(this, "nEhw", function () {
24055
+ _defineProperty(this, "UIWW", function () {
23929
24056
  var _this$targetElement;
23930
24057
  var delayMillis = _this.delayMillis * 1000;
23931
24058
  var finalStyles = ".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix, " {\n opacity:0;\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
@@ -23934,7 +24061,7 @@
23934
24061
  (_this$targetElement = _this.targetElement) === null || _this$targetElement === void 0 || _this$targetElement.appendChild(newstyleNode1);
23935
24062
  _this.rippleAnimationRepeat(_this.interCount, delayMillis);
23936
24063
  });
23937
- _defineProperty(this, "Rfqe", function () {
24064
+ _defineProperty(this, "xisV", function () {
23938
24065
  var delayMillis = _this.delayMillis * 1000;
23939
24066
  //let badgeContainerClass = `.apxor-badge-container-styles-${this.cssPostFix}`;
23940
24067
  //let badgeAnimationElement = document.querySelector(badgeContainerClass);
@@ -23951,7 +24078,7 @@
23951
24078
  // newstyleNode1.innerHTML = finalStyles;
23952
24079
  // this.targetElement?.appendChild(newstyleNode1);
23953
24080
  });
23954
- _defineProperty(this, "wXSj", function () {
24081
+ _defineProperty(this, "iuYq", function () {
23955
24082
  var elements = document.querySelectorAll(".apx-main-styles-".concat(_this.configId));
23956
24083
  elements === null || elements === void 0 || elements.forEach(function (ele) {
23957
24084
  ele === null || ele === void 0 || ele.remove();
@@ -23960,9 +24087,9 @@
23960
24087
  dummy_elements === null || dummy_elements === void 0 || dummy_elements.forEach(function (ele) {
23961
24088
  ele === null || ele === void 0 || ele.remove();
23962
24089
  });
23963
- _this.qgiQ();
24090
+ _this.moVg();
23964
24091
  });
23965
- _defineProperty(this, "qgiQ", function () {
24092
+ _defineProperty(this, "moVg", function () {
23966
24093
  var targetWrapperElement = document.querySelector(".image-container-".concat(_this.configId));
23967
24094
  // Ensure the target element is the wrapper with class 'image-container'
23968
24095
  if (targetWrapperElement) {
@@ -23986,12 +24113,12 @@
23986
24113
  * @param {boolean} optimized
23987
24114
  * @returns viewId
23988
24115
  */
23989
- _defineProperty(this, "dKzi", function (node, optimized) {
24116
+ _defineProperty(this, "xuge", function (node, optimized) {
23990
24117
  if (node.nodeType !== Node.ELEMENT_NODE) return "";
23991
24118
  var steps = [];
23992
24119
  var contextNode = node;
23993
24120
  while (contextNode) {
23994
- var step = _this.aFBg(contextNode, !!optimized, contextNode === node);
24121
+ var step = _this.DnjD(contextNode, !!optimized, contextNode === node);
23995
24122
  if (!step) break; // Error - bail out early.
23996
24123
  steps.push(step);
23997
24124
  if (step.optimized) break;
@@ -24006,7 +24133,7 @@
24006
24133
  * @param {boolean} optimized
24007
24134
  * @param {object} isTargetNode
24008
24135
  */
24009
- _defineProperty(this, "aFBg", function (node, optimized, isTargetNode) {
24136
+ _defineProperty(this, "DnjD", function (node, optimized, isTargetNode) {
24010
24137
  if (node.nodeType !== Node.ELEMENT_NODE) return null;
24011
24138
  var id = node.getAttribute("id");
24012
24139
  if (optimized) {
@@ -24101,7 +24228,8 @@
24101
24228
  this.name = messageConfig.configName;
24102
24229
  this.terminationConfig = terminationConfig;
24103
24230
  this.showCallback = showCallback;
24104
- this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
24231
+ // Replace spaces with empty then all special characters except "-"
24232
+ this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
24105
24233
  this.target = new Target$1(config.target);
24106
24234
  this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
24107
24235
  this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
@@ -24127,7 +24255,7 @@
24127
24255
  this.contentZindexValue = 1;
24128
24256
  }
24129
24257
  _createClass(ApxorBadge, [{
24130
- key: "HGOD",
24258
+ key: "euPP",
24131
24259
  value: function createBadge() {
24132
24260
  var _this2 = this;
24133
24261
  var targetFoundCallback = function targetFoundCallback() {
@@ -24218,10 +24346,18 @@
24218
24346
  callback();
24219
24347
  } else {
24220
24348
  _this3.target.retry.max_retries = _this3.target.retry.max_retries - 1;
24221
- // If the element is not found even after max interval, stop checking
24349
+ // If the element is not found even after max interval, stop checking and log "apx_nudge_not_shown" event
24222
24350
  if (_this3.target.retry.max_retries <= 0) {
24351
+ var _window;
24223
24352
  clearInterval(elementRecheckIntervalId);
24224
24353
  console.warn("Element with selector:".concat(_this3.target.id, " not found."));
24354
+ (_window = window) === null || _window === void 0 || (_window = _window.ApxorRTM) === null || _window === void 0 || _window.logEvent("apx_nudge_not_shown", {
24355
+ apx_nudge_type: "campaign",
24356
+ apx_nudge_id: _this3.configId,
24357
+ apx_nudge_name: _this3.name,
24358
+ apx_notshown_type: "error",
24359
+ apx_reason: "View not found"
24360
+ });
24225
24361
  }
24226
24362
  }
24227
24363
  } else {
@@ -24231,9 +24367,17 @@
24231
24367
  callback();
24232
24368
  } else {
24233
24369
  _this3.target.retry.max_retries = _this3.target.retry.max_retries - 1;
24234
- // If the element is not visible even after max interval, stop checking
24370
+ // If the element is not visible even after max interval, stop checking and log "apx_nudge_not_shown" event
24235
24371
  if (_this3.target.retry.max_retries <= 0) {
24372
+ var _window2;
24236
24373
  clearInterval(elementRecheckIntervalId);
24374
+ (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.ApxorRTM) === null || _window2 === void 0 || _window2.logEvent("apx_nudge_not_shown", {
24375
+ apx_nudge_type: "campaign",
24376
+ apx_nudge_id: _this3.configId,
24377
+ apx_nudge_name: _this3.name,
24378
+ apx_notshown_type: "error",
24379
+ apx_reason: "View not found"
24380
+ });
24237
24381
  }
24238
24382
  }
24239
24383
  }
@@ -24380,7 +24524,7 @@
24380
24524
  if (content.icon.enable_border) {
24381
24525
  borderStylesForIcon = "\n border-radius:".concat(content.icon.border.radius, "%;\n border:").concat(content.icon.border.width, "px ").concat(content.icon.border.style, " ").concat(content.icon.border.color, ";\n ");
24382
24526
  }
24383
- badgeContentElementsstyles += "\n .apxor-badge-".concat(ind, "-icon-container").concat(_this4.cssPostFix, "{\n width:auto;\n height:auto;\n display: flex;\n justify-content:center;\n align-items:center;\n }\n .apxor-badge-").concat(ind, "-icon-content").concat(_this4.cssPostFix, " {\n position:relative;\n background:url('").concat(content.icon.path, "') no-repeat center;\n background-size:cover;\n display:inline-block;\n height: ").concat(content.icon.height, "px;\n width: ").concat(content.icon.width, "px;\n ").concat(marginForIcon, "\n ").concat(borderStylesForIcon, "\n }");
24527
+ badgeContentElementsstyles += "\n .apxor-badge-".concat(ind, "-icon-container").concat(_this4.cssPostFix, "{\n width:auto;\n height:auto;\n display: flex;\n justify-content:center;\n align-items:center;\n }\n .apxor-badge-").concat(ind, "-icon-content").concat(_this4.cssPostFix, " {\n position:relative;\n background-image: url('").concat(content.icon.path, "');\n background-repeat: no-repeat;\n background-position: center;\n background-size:cover;\n display:inline-block;\n height: ").concat(content.icon.height, "px;\n width: ").concat(content.icon.width, "px;\n ").concat(marginForIcon, "\n ").concat(borderStylesForIcon, "\n }");
24384
24528
  }
24385
24529
  if (content.enable_label) {
24386
24530
  var marginForLabel = "";
@@ -24755,7 +24899,7 @@
24755
24899
  _transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;;\n transform: skewx(30deg)\n ");
24756
24900
  break;
24757
24901
  }
24758
- _animationForBadgeContainernew4 = "\n .apxor-badge-content-container-".concat(_this8.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n background:transparent;\n width:").concat(lines_total_width, "px;\n ").concat(lines_length === 1 ? "border-left: ".concat(line1width, "px solid ").concat(lines_color, ";") : "border-left: ".concat(line1width, "px solid ").concat(lines_color, "; border-right: ").concat(line2width, "px solid ").concat(lines_color, ";"), "\n height:100%;\n animation: badgeAnimation").concat(_this8.c, " ").concat(_this8.badge.animation.duration_millis, "s ").concat((_this8$badge$animatio4 = _this8.badge.animation) === null || _this8$badge$animatio4 === void 0 ? void 0 : _this8$badge$animatio4.intra_count, ";\n ").concat(_transformForMultipleDirection, ";\n }");
24902
+ _animationForBadgeContainernew4 = "\n .apxor-badge-content-container-".concat(_this8.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n width:").concat(lines_total_width, "px;\n ").concat(lines_length === 1 ? "border-left: ".concat(line1width, "px solid ").concat(lines_color, ";") : "border-left: ".concat(line1width, "px solid ").concat(lines_color, "; border-right: ").concat(line2width, "px solid ").concat(lines_color, ";"), "\n height:100%;\n animation: badgeAnimation").concat(_this8.c, " ").concat(_this8.badge.animation.duration_millis, "s ").concat((_this8$badge$animatio4 = _this8.badge.animation) === null || _this8$badge$animatio4 === void 0 ? void 0 : _this8$badge$animatio4.intra_count, ";\n ").concat(_transformForMultipleDirection, ";\n }");
24759
24903
  _keyframeForAnimationnew4 = _this8.badge.animation.shineDirection === "to_bottom_right" || _this8.badge.animation.shineDirection === "to_top_right" ? "@keyframes badgeAnimation".concat(_this8.c, " {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }") : "@keyframes badgeAnimation".concat(_this8.c, " {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");
24760
24904
  var _animationStyles4 = "\n ".concat(_animationForBadgeContainernew4, "\n ").concat(_keyframeForAnimationnew4, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24761
24905
  var _newstyleNode3 = document.createElement("style");
@@ -24856,31 +25000,61 @@
24856
25000
  }, {
24857
25001
  key: "_setOnClickTerminationForBadges",
24858
25002
  value: function _setOnClickTerminationForBadges() {
24859
- var _this$terminationConf,
24860
- _this$terminationConf2,
24861
- _this10 = this;
24862
- if ((_this$terminationConf = this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.enable_touch && Object(this.terminationConfig.touch).length !== 0 && this.terminationConfig.touch.enable_user_interaction && (_this$terminationConf2 = this.terminationConfig.touch) !== null && _this$terminationConf2 !== void 0 && _this$terminationConf2.target_view) {
24863
- var onclickCallBack = function onclickCallBack() {
25003
+ var _this10 = this;
25004
+ var onclickCallBack = function onclickCallBack() {
25005
+ var _this10$terminationCo, _this10$terminationCo2;
25006
+ // Log the events based on the campaign version
25007
+ if (_this10.uiConfig.additional_info && _this10.uiConfig.additional_info.version && _this10.uiConfig.additional_info.version === 4) {
25008
+ var _window3, _this10$uiConfig$addi, _this10$uiConfig, _this10$uiConfig$addi2, _this10$uiConfig2;
25009
+ (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorRTM) === null || _window3 === void 0 || _window3.logEvent("apx_nudge_target_clicked", {
25010
+ apx_nudge_id: _this10.configId,
25011
+ apx_nudge_name: _this10.name,
25012
+ apx_template_name: "badge",
25013
+ apx_step: (_this10$uiConfig$addi = (_this10$uiConfig = _this10.uiConfig) === null || _this10$uiConfig === void 0 || (_this10$uiConfig = _this10$uiConfig.additional_info) === null || _this10$uiConfig === void 0 ? void 0 : _this10$uiConfig.apx_step) !== null && _this10$uiConfig$addi !== void 0 ? _this10$uiConfig$addi : 1,
25014
+ apx_variant_code: (_this10$uiConfig$addi2 = (_this10$uiConfig2 = _this10.uiConfig) === null || _this10$uiConfig2 === void 0 || (_this10$uiConfig2 = _this10$uiConfig2.additional_info) === null || _this10$uiConfig2 === void 0 ? void 0 : _this10$uiConfig2.apx_variant_code) !== null && _this10$uiConfig$addi2 !== void 0 ? _this10$uiConfig$addi2 : ""
25015
+ });
25016
+ } else {
25017
+ var _window$ApxorRTM;
25018
+ (_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent("InlineTargetViewClicked", {
25019
+ id: _this10.configId,
25020
+ message_name: _this10.name,
25021
+ apx_message_step: 1
25022
+ });
25023
+ }
25024
+
25025
+ // Remove the Badge when touch termination is enabled with logging the event
25026
+ if ((_this10$terminationCo = _this10.terminationConfig) !== null && _this10$terminationCo !== void 0 && _this10$terminationCo.enable_touch && Object(_this10.terminationConfig.touch).length !== 0 && _this10.terminationConfig.touch.enable_user_interaction && (_this10$terminationCo2 = _this10.terminationConfig.touch) !== null && _this10$terminationCo2 !== void 0 && _this10$terminationCo2.target_view) {
24864
25027
  var _window$Apxor, _this10$targetElement;
24865
25028
  var badge = document.getElementsByClassName("apxor-badge-container-styles-".concat(_this10.cssPostFix));
24866
25029
  while (badge.length > 0) badge[0].remove();
25030
+ // Update badge status (nudge_shown event is handled by this operation)
24867
25031
  (_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || _window$Apxor.updateBadgeStatus("target_click", _this10.configId);
24868
25032
  _this10.targetClicked = true;
24869
25033
  (_this10$targetElement = _this10.targetElement) === null || _this10$targetElement === void 0 || _this10$targetElement.classList.remove("apx-badge-target-style".concat(_this10.cssPostFix));
24870
- window.Apxor.logAppEvent("InlineTargetViewClicked", {
24871
- id: _this10.configId,
24872
- message_name: _this10.name,
24873
- apx_message_step: 1
24874
- });
24875
- window.Apxor.logAppEvent("inline_dismissed", {
24876
- id: _this10.configId,
24877
- message_name: _this10.name,
24878
- apx_reason: "InlineTargetViewClicked"
24879
- });
24880
- _this10.targetElement.removeEventListener("click", onclickCallBack);
24881
- };
24882
- this.targetElement.addEventListener("click", onclickCallBack);
24883
- }
25034
+
25035
+ // Log the events based on the campaign version
25036
+ if (_this10.uiConfig.additional_info && _this10.uiConfig.additional_info.version && _this10.uiConfig.additional_info.version === 4) {
25037
+ var _window4, _this10$uiConfig$addi3, _this10$uiConfig3, _this10$uiConfig$addi4, _this10$uiConfig4;
25038
+ (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorRTM) === null || _window4 === void 0 || _window4.logEvent("apx_nudge_terminated", {
25039
+ apx_nudge_id: _this10.configId,
25040
+ apx_nudge_name: _this10.name,
25041
+ apx_template_name: "badge",
25042
+ apx_step: (_this10$uiConfig$addi3 = (_this10$uiConfig3 = _this10.uiConfig) === null || _this10$uiConfig3 === void 0 || (_this10$uiConfig3 = _this10$uiConfig3.additional_info) === null || _this10$uiConfig3 === void 0 ? void 0 : _this10$uiConfig3.apx_step) !== null && _this10$uiConfig$addi3 !== void 0 ? _this10$uiConfig$addi3 : 1,
25043
+ apx_termination_type: "Target Element Clicked",
25044
+ apx_variant_code: (_this10$uiConfig$addi4 = (_this10$uiConfig4 = _this10.uiConfig) === null || _this10$uiConfig4 === void 0 || (_this10$uiConfig4 = _this10$uiConfig4.additional_info) === null || _this10$uiConfig4 === void 0 ? void 0 : _this10$uiConfig4.apx_variant_code) !== null && _this10$uiConfig$addi4 !== void 0 ? _this10$uiConfig$addi4 : ""
25045
+ });
25046
+ } else {
25047
+ var _window$ApxorRTM2;
25048
+ (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("inline_dismissed", {
25049
+ id: _this10.configId,
25050
+ message_name: _this10.name,
25051
+ apx_reason: "InlineTargetViewClicked"
25052
+ });
25053
+ }
25054
+ }
25055
+ _this10.targetElement.removeEventListener("click", onclickCallBack);
25056
+ };
25057
+ this.targetElement.addEventListener("click", onclickCallBack);
24884
25058
  }
24885
25059
  }]);
24886
25060
  return ApxorBadge;
@@ -24898,16 +25072,16 @@
24898
25072
  var RTM = /*#__PURE__*/_createClass(function RTM() {
24899
25073
  var _this = this;
24900
25074
  _classCallCheck(this, RTM);
24901
- _defineProperty(this, "YRfU", {});
25075
+ _defineProperty(this, "tdGc", {});
24902
25076
  _defineProperty(this, "isShowingAction", false);
24903
25077
  _defineProperty(this, "currentAction", null);
24904
- _defineProperty(this, "HyJc", null);
24905
- _defineProperty(this, "version", 91);
25078
+ _defineProperty(this, "ThXo", null);
25079
+ _defineProperty(this, "version", 93);
24906
25080
  _defineProperty(this, "isInitialised", false);
24907
- _defineProperty(this, "lbLW", {});
24908
- _defineProperty(this, "etai", false);
25081
+ _defineProperty(this, "MSgZ", {});
25082
+ _defineProperty(this, "gkkE", false);
24909
25083
  _defineProperty(this, "_isShownECCalled", false);
24910
- _defineProperty(this, "WLeB", function () {
25084
+ _defineProperty(this, "DvMV", function () {
24911
25085
  _this.isInitialised = true;
24912
25086
  var oldPushState = history.pushState;
24913
25087
  history.pushState = function pushState() {
@@ -24934,7 +25108,7 @@
24934
25108
  var _window;
24935
25109
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("logger show");
24936
25110
  if (!_this.isInitialised) {
24937
- _this.WLeB();
25111
+ _this.DvMV();
24938
25112
  }
24939
25113
  window.addEventListener("pagehide", function () {
24940
25114
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -24959,7 +25133,7 @@
24959
25133
  } else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
24960
25134
  _this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
24961
25135
  } else if (ui_config.display_type === "coach_mark_v2") {
24962
- _this.sYRk(ui_config, duration, uuid, name);
25136
+ _this.FxIS(ui_config, duration, uuid, name);
24963
25137
  } else {
24964
25138
  showCoachmarkWithDelay(_this, ui_config, {
24965
25139
  configId: uuid,
@@ -24999,7 +25173,7 @@
24999
25173
  });
25000
25174
  _defineProperty(this, "showBadge", function (uiJson, duration, uuid, name, terminationConfig) {
25001
25175
  if (!_this.isInitialised) {
25002
- _this.WLeB();
25176
+ _this.DvMV();
25003
25177
  }
25004
25178
  window.addEventListener("pagehide", function () {
25005
25179
  var _window$Apxor2, _window$Apxor2$pageUn;
@@ -25011,7 +25185,7 @@
25011
25185
  _this.removeBadge(name, uuid);
25012
25186
  }
25013
25187
  var termination_config = JSON.parse(terminationConfig);
25014
- _this.HGOD(ui_config, duration, uuid, name, termination_config);
25188
+ _this.euPP(ui_config, duration, uuid, name, termination_config);
25015
25189
  });
25016
25190
  _defineProperty(this, "showInApp", function (config, duration, configId, name) {
25017
25191
  try {
@@ -25057,12 +25231,14 @@
25057
25231
  });
25058
25232
  _defineProperty(this, "createembedCards", function (config, configId, name) {
25059
25233
  var cardsContainer = new EmbedCards(config, configId, name, function () {
25060
- var _window13, _window$ApxorRTM2;
25234
+ var _window13, _window$ApxorRTM2, _config$additional_in, _config$additional_in2;
25061
25235
  (_window13 = window) === null || _window13 === void 0 || (_window13 = _window13.ApxorLogger) === null || _window13 === void 0 || _window13.debug("successfully showing the nudge");
25062
25236
  (config === null || config === void 0 ? void 0 : config.initialRender) && ((_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 ? void 0 : _window$ApxorRTM2.logEvent("apx_nudge_shown", {
25063
- campaignName: name,
25064
- id: configId,
25065
- apx_template_name: "embed-card"
25237
+ apx_nudge_name: name,
25238
+ apx_nudge_id: configId,
25239
+ apx_template_name: "embed-card",
25240
+ apx_screen_name: config === null || config === void 0 || (_config$additional_in = config.additional_info) === null || _config$additional_in === void 0 ? void 0 : _config$additional_in.apx_screen_name,
25241
+ apx_variant_code: config === null || config === void 0 || (_config$additional_in2 = config.additional_info) === null || _config$additional_in2 === void 0 ? void 0 : _config$additional_in2.apx_variant_code
25066
25242
  }));
25067
25243
  _this._isShownECCalled = true;
25068
25244
  }, function () {
@@ -25075,7 +25251,7 @@
25075
25251
  try {
25076
25252
  config = config.split("\n").join("\\n");
25077
25253
  var ui_config = JSON.parse(config);
25078
- _this.fZFC(ui_config, configId, name, position, slidesSeenCount, view_id);
25254
+ _this.NaBI(ui_config, configId, name, position, slidesSeenCount, view_id);
25079
25255
  } catch (e) {
25080
25256
  var _window$Apxor4;
25081
25257
  if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
@@ -25089,12 +25265,16 @@
25089
25265
  console.error(e);
25090
25266
  }
25091
25267
  });
25092
- _defineProperty(this, "fZFC", function (config, configId, name, position, slidesSeenCount, view_id) {
25268
+ _defineProperty(this, "NaBI", function (config, configId, name, position, slidesSeenCount, view_id) {
25093
25269
  var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
25094
- window.Apxor.logAppEvent("apx_nudge_shown", {
25095
- campaignName: name,
25096
- id: configId,
25097
- apx_template_name: "stories"
25270
+ var _window$ApxorRTM3, _config$additional_in3, _config$additional_in4;
25271
+ (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
25272
+ apx_nudge_name: name,
25273
+ apx_nudge_id: configId,
25274
+ apx_template_name: "stories",
25275
+ apx_step: position !== null && position !== void 0 ? position : 0,
25276
+ apx_screen_name: config === null || config === void 0 || (_config$additional_in3 = config.additional_info) === null || _config$additional_in3 === void 0 ? void 0 : _config$additional_in3.apx_screen_name,
25277
+ apx_variant_code: config === null || config === void 0 || (_config$additional_in4 = config.additional_info) === null || _config$additional_in4 === void 0 ? void 0 : _config$additional_in4.apx_variant_code
25098
25278
  });
25099
25279
  }, function () {});
25100
25280
  cardsContainer.showStories();
@@ -25105,10 +25285,8 @@
25105
25285
  if (_this.currentAction !== null && _this.currentAction !== undefined) {
25106
25286
  _this.isShowingAction = false;
25107
25287
  try {
25108
- var _window19;
25109
25288
  _this.currentAction();
25110
25289
  _this.currentAction = null;
25111
- (_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.ApxorLogger) === null || _window19 === void 0 || _window19.debug("Callback is called");
25112
25290
  } catch (e) {}
25113
25291
  }
25114
25292
  });
@@ -25120,48 +25298,48 @@
25120
25298
  var onShow = function onShow() {
25121
25299
  _this.isShowingAction = true;
25122
25300
  if (window.Apxor && window.Apxor.logActionEvent) {
25123
- var _window20, _window20$updateFlag, _window21, _window21$updateCount;
25124
- (_window20 = window) === null || _window20 === void 0 || (_window20 = _window20.Apxor) === null || _window20 === void 0 || (_window20$updateFlag = _window20.updateFlag) === null || _window20$updateFlag === void 0 || _window20$updateFlag.call(_window20, true);
25301
+ var _window19, _window19$updateFlag, _window20, _window20$updateCount;
25302
+ (_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.Apxor) === null || _window19 === void 0 || (_window19$updateFlag = _window19.updateFlag) === null || _window19$updateFlag === void 0 || _window19$updateFlag.call(_window19, true);
25125
25303
  window.Apxor.logActionEvent("inline_shown", uuid, name);
25126
- (_window21 = window) === null || _window21 === void 0 || (_window21 = _window21.Apxor) === null || _window21 === void 0 || (_window21$updateCount = _window21.updateCount) === null || _window21$updateCount === void 0 || _window21$updateCount.call(_window21, uuid);
25304
+ (_window20 = window) === null || _window20 === void 0 || (_window20 = _window20.Apxor) === null || _window20 === void 0 || (_window20$updateCount = _window20.updateCount) === null || _window20$updateCount === void 0 || _window20$updateCount.call(_window20, uuid);
25127
25305
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
25128
25306
  setTimeout(function () {
25129
- var _window22, _window22$logInternal;
25130
- (_window22 = window) === null || _window22 === void 0 || (_window22 = _window22.Apxor) === null || _window22 === void 0 || (_window22$logInternal = _window22.logInternalEvent) === null || _window22$logInternal === void 0 || _window22$logInternal.call(_window22, "capt");
25307
+ var _window21, _window21$logInternal;
25308
+ (_window21 = window) === null || _window21 === void 0 || (_window21 = _window21.Apxor) === null || _window21 === void 0 || (_window21$logInternal = _window21.logInternalEvent) === null || _window21$logInternal === void 0 || _window21$logInternal.call(_window21, "capt");
25131
25309
  }, 500);
25132
25310
  }
25133
25311
  }
25134
25312
  };
25135
25313
  var onHide = function onHide(isCancelled) {
25136
- var _window23, _window23$updateFlag, _window24;
25314
+ var _window22, _window22$updateFlag, _window23;
25137
25315
  _this.isShowingAction = false;
25138
25316
  _this.currentAction = null;
25139
- _this.HyJc = null;
25140
- (_window23 = window) === null || _window23 === void 0 || (_window23 = _window23.Apxor) === null || _window23 === void 0 || (_window23$updateFlag = _window23.updateFlag) === null || _window23$updateFlag === void 0 || _window23$updateFlag.call(_window23, false);
25317
+ _this.ThXo = null;
25318
+ (_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);
25141
25319
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
25142
25320
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
25143
25321
  }
25144
- if (((_window24 = window) === null || _window24 === void 0 || (_window24 = _window24.ApxorWebView) === null || _window24 === void 0 ? void 0 : _window24.getLayoutType()) === "web-inline") {
25145
- var _window25;
25146
- (_window25 = window) === null || _window25 === void 0 || (_window25 = _window25.ApxorWebView) === null || _window25 === void 0 || _window25.removeWebView();
25322
+ if (((_window23 = window) === null || _window23 === void 0 || (_window23 = _window23.ApxorWebView) === null || _window23 === void 0 ? void 0 : _window23.getLayoutType()) === "web-inline") {
25323
+ var _window24;
25324
+ (_window24 = window) === null || _window24 === void 0 || (_window24 = _window24.ApxorWebView) === null || _window24 === void 0 || _window24.removeWebView();
25147
25325
  }
25148
25326
  };
25149
25327
  if (action_class === "new-inline") {
25150
- _this.HyJc = new InLineTooltip(ui_config, [], [], terminationConfig, {
25328
+ _this.ThXo = new InLineTooltip(ui_config, [], [], terminationConfig, {
25151
25329
  configId: uuid,
25152
25330
  configName: name
25153
25331
  }, _this, onShow, onHide, function () {}, false, 0);
25154
25332
  } else if (action_class === "tooltip_builder") {
25155
- _this.HyJc = new NewInLineTooltip(ui_config, terminationConfig, {
25333
+ _this.ThXo = new NewInLineTooltip(ui_config, terminationConfig, {
25156
25334
  configId: uuid,
25157
25335
  configName: name
25158
25336
  }, _this, onShow, onHide);
25159
25337
  }
25160
25338
  setTimeout(function () {
25161
- _this.HyJc.createNewTooltip();
25339
+ _this.ThXo.createNewTooltip();
25162
25340
  }, ui_config.delay);
25163
25341
  });
25164
- _defineProperty(this, "sYRk", function (ui_config, duration, uuid, name) {
25342
+ _defineProperty(this, "FxIS", function (ui_config, duration, uuid, name) {
25165
25343
  var terminationConfig = {};
25166
25344
  terminationConfig["auto_dismiss"] = duration > 0;
25167
25345
  terminationConfig["duration"] = duration;
@@ -25171,33 +25349,33 @@
25171
25349
  }, _this, function () {
25172
25350
  _this.isShowingAction = true;
25173
25351
  if (window.Apxor && window.Apxor.logActionEvent) {
25174
- var _window26, _window26$updateFlag;
25175
- (_window26 = window) === null || _window26 === void 0 || (_window26 = _window26.Apxor) === null || _window26 === void 0 || (_window26$updateFlag = _window26.updateFlag) === null || _window26$updateFlag === void 0 || _window26$updateFlag.call(_window26, true);
25352
+ var _window25, _window25$updateFlag;
25353
+ (_window25 = window) === null || _window25 === void 0 || (_window25 = _window25.Apxor) === null || _window25 === void 0 || (_window25$updateFlag = _window25.updateFlag) === null || _window25$updateFlag === void 0 || _window25$updateFlag.call(_window25, true);
25176
25354
  window.Apxor.logActionEvent("inline_shown", uuid, name);
25177
25355
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
25178
25356
  setTimeout(function () {
25179
- var _window27, _window27$logInternal;
25180
- (_window27 = window) === null || _window27 === void 0 || (_window27 = _window27.Apxor) === null || _window27 === void 0 || (_window27$logInternal = _window27.logInternalEvent) === null || _window27$logInternal === void 0 || _window27$logInternal.call(_window27, "capt");
25357
+ var _window26, _window26$logInternal;
25358
+ (_window26 = window) === null || _window26 === void 0 || (_window26 = _window26.Apxor) === null || _window26 === void 0 || (_window26$logInternal = _window26.logInternalEvent) === null || _window26$logInternal === void 0 || _window26$logInternal.call(_window26, "capt");
25181
25359
  }, 500);
25182
25360
  }
25183
25361
  }
25184
25362
  }, function (isCancelled) {
25185
- var _window28, _window28$updateFlag, _window29;
25363
+ var _window27, _window27$updateFlag, _window28;
25186
25364
  _this.isShowingAction = false;
25187
25365
  _this.currentAction = null;
25188
- _this.HyJc = null;
25189
- (_window28 = window) === null || _window28 === void 0 || (_window28 = _window28.Apxor) === null || _window28 === void 0 || (_window28$updateFlag = _window28.updateFlag) === null || _window28$updateFlag === void 0 || _window28$updateFlag.call(_window28, false);
25366
+ _this.ThXo = null;
25367
+ (_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);
25190
25368
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
25191
25369
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
25192
25370
  }
25193
- if (((_window29 = window) === null || _window29 === void 0 || (_window29 = _window29.ApxorWebView) === null || _window29 === void 0 ? void 0 : _window29.getLayoutType()) === "web-inline") {
25194
- var _window30;
25195
- (_window30 = window) === null || _window30 === void 0 || (_window30 = _window30.ApxorWebView) === null || _window30 === void 0 || _window30.removeWebView();
25371
+ if (((_window28 = window) === null || _window28 === void 0 || (_window28 = _window28.ApxorWebView) === null || _window28 === void 0 ? void 0 : _window28.getLayoutType()) === "web-inline") {
25372
+ var _window29;
25373
+ (_window29 = window) === null || _window29 === void 0 || (_window29 = _window29.ApxorWebView) === null || _window29 === void 0 || _window29.removeWebView();
25196
25374
  }
25197
25375
  }, _this.stepperCallback, false, 0);
25198
25376
  _this._currentCoachmark.createNewCoachMark();
25199
25377
  });
25200
- _defineProperty(this, "HGOD", function (ui_config, duration, uuid, name, terminationConfig) {
25378
+ _defineProperty(this, "euPP", function (ui_config, duration, uuid, name, terminationConfig) {
25201
25379
  _this._currentBadge = new ApxorBadge(ui_config, terminationConfig, {
25202
25380
  configId: uuid,
25203
25381
  configName: name
@@ -25208,18 +25386,18 @@
25208
25386
  (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.updateBadgeStatus("show", uuid);
25209
25387
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
25210
25388
  setTimeout(function () {
25211
- var _window31, _window31$logInternal;
25212
- (_window31 = window) === null || _window31 === void 0 || (_window31 = _window31.Apxor) === null || _window31 === void 0 || (_window31$logInternal = _window31.logInternalEvent) === null || _window31$logInternal === void 0 || _window31$logInternal.call(_window31, "capt");
25389
+ var _window30, _window30$logInternal;
25390
+ (_window30 = window) === null || _window30 === void 0 || (_window30 = _window30.Apxor) === null || _window30 === void 0 || (_window30$logInternal = _window30.logInternalEvent) === null || _window30$logInternal === void 0 || _window30$logInternal.call(_window30, "capt");
25213
25391
  }, 500);
25214
25392
  }
25215
25393
  }
25216
25394
  });
25217
- _this._currentBadge.wXSj();
25218
- _this._currentBadge.HGOD();
25395
+ _this._currentBadge.iuYq();
25396
+ _this._currentBadge.euPP();
25219
25397
  });
25220
25398
  _defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
25221
- if (_this.HyJc) {
25222
- _this.HyJc.updateElementPositionOnScroll(top, left, height, width);
25399
+ if (_this.ThXo) {
25400
+ _this.ThXo.updateElementPositionOnScroll(top, left, height, width);
25223
25401
  }
25224
25402
  });
25225
25403
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -25236,15 +25414,15 @@
25236
25414
  var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
25237
25415
  _this.isShowingAction = true;
25238
25416
  if (window.Apxor && window.Apxor.logActionEvent) {
25239
- var _window32, _window32$updateFlag;
25240
- (_window32 = window) === null || _window32 === void 0 || (_window32 = _window32.Apxor) === null || _window32 === void 0 || (_window32$updateFlag = _window32.updateFlag) === null || _window32$updateFlag === void 0 || _window32$updateFlag.call(_window32, true);
25417
+ var _window31, _window31$updateFlag;
25418
+ (_window31 = window) === null || _window31 === void 0 || (_window31 = _window31.Apxor) === null || _window31 === void 0 || (_window31$updateFlag = _window31.updateFlag) === null || _window31$updateFlag === void 0 || _window31$updateFlag.call(_window31, true);
25241
25419
  window.Apxor.logActionEvent("inapp_shown", configId, name);
25242
25420
  }
25243
25421
  }, function () {
25244
- var _window33, _window33$updateFlag;
25422
+ var _window32, _window32$updateFlag;
25245
25423
  _this.isShowingAction = false;
25246
25424
  _this.currentAction = null;
25247
- (_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.Apxor) === null || _window33 === void 0 || (_window33$updateFlag = _window33.updateFlag) === null || _window33$updateFlag === void 0 || _window33$updateFlag.call(_window33, false);
25425
+ (_window32 = window) === null || _window32 === void 0 || (_window32 = _window32.Apxor) === null || _window32 === void 0 || (_window32$updateFlag = _window32.updateFlag) === null || _window32$updateFlag === void 0 || _window32$updateFlag.call(_window32, false);
25248
25426
  if (window.Apxor && window.Apxor.logActionEvent) {
25249
25427
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);
25250
25428
  }
@@ -25271,23 +25449,23 @@
25271
25449
  var _window$Apxor6;
25272
25450
  _this.isShowingAction = true;
25273
25451
  if (((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.platform) === "ios") {
25274
- var _window34, _window34$updateFlag;
25275
- (_window34 = window) === null || _window34 === void 0 || (_window34 = _window34.Apxor) === null || _window34 === void 0 || (_window34$updateFlag = _window34.updateFlag) === null || _window34$updateFlag === void 0 || _window34$updateFlag.call(_window34, true, "IN_APP");
25452
+ var _window33, _window33$updateFlag;
25453
+ (_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.Apxor) === null || _window33 === void 0 || (_window33$updateFlag = _window33.updateFlag) === null || _window33$updateFlag === void 0 || _window33$updateFlag.call(_window33, true, "IN_APP");
25276
25454
  } else {
25277
- var _window35, _window35$updateFlag;
25278
- (_window35 = window) === null || _window35 === void 0 || (_window35 = _window35.Apxor) === null || _window35 === void 0 || (_window35$updateFlag = _window35.updateFlag) === null || _window35$updateFlag === void 0 || _window35$updateFlag.call(_window35, "IN_APP", true);
25455
+ var _window34, _window34$updateFlag;
25456
+ (_window34 = window) === null || _window34 === void 0 || (_window34 = _window34.Apxor) === null || _window34 === void 0 || (_window34$updateFlag = _window34.updateFlag) === null || _window34$updateFlag === void 0 || _window34$updateFlag.call(_window34, "IN_APP", true);
25279
25457
  }
25280
25458
  if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent) {
25281
25459
  window.Apxor.logActionEvent("inapp_shown", configId, name);
25282
25460
  } else if (action_class === "inapp_builder") {
25283
- var _window$ApxorRTM3, _window$Apxor7, _config$additional_in, _window$Apxor8, _config$additional_in2, _config$additional_in3, _config$additional_in4, _config$additional_in5, _config$additional_in6, _config$additional_in7;
25284
- (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
25461
+ var _window$ApxorRTM4, _window$Apxor7, _config$additional_in5, _window$Apxor8, _config$additional_in6, _config$additional_in7, _config$additional_in8, _config$additional_in9, _config$additional_in10, _config$additional_in11;
25462
+ (_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_shown", {
25285
25463
  apx_nudge_name: name,
25286
- apx_nudge_id: ((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in = config.additional_info) === null || _config$additional_in === void 0 ? void 0 : _config$additional_in.id : configId,
25464
+ apx_nudge_id: ((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in5 = config.additional_info) === null || _config$additional_in5 === void 0 ? void 0 : _config$additional_in5.id : configId,
25287
25465
  apx_template_name: "inapp",
25288
- apx_step: ((_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 ? void 0 : _window$Apxor8.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in2 = config.additional_info) !== null && _config$additional_in2 !== void 0 && _config$additional_in2.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in3 = config.additional_info) === null || _config$additional_in3 === void 0 ? void 0 : _config$additional_in3.apx_step : config !== null && config !== void 0 && (_config$additional_in4 = config.additional_info) !== null && _config$additional_in4 !== void 0 && _config$additional_in4.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in5 = config.additional_info) === null || _config$additional_in5 === void 0 ? void 0 : _config$additional_in5.apx_step,
25289
- apx_screen_name: config === null || config === void 0 || (_config$additional_in6 = config.additional_info) === null || _config$additional_in6 === void 0 ? void 0 : _config$additional_in6.apx_screen_name,
25290
- apx_variant_code: config === null || config === void 0 || (_config$additional_in7 = config.additional_info) === null || _config$additional_in7 === void 0 ? void 0 : _config$additional_in7.apx_variant_code
25466
+ apx_step: ((_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 ? void 0 : _window$Apxor8.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in6 = config.additional_info) !== null && _config$additional_in6 !== void 0 && _config$additional_in6.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in7 = config.additional_info) === null || _config$additional_in7 === void 0 ? void 0 : _config$additional_in7.apx_step : config !== null && config !== void 0 && (_config$additional_in8 = config.additional_info) !== null && _config$additional_in8 !== void 0 && _config$additional_in8.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in9 = config.additional_info) === null || _config$additional_in9 === void 0 ? void 0 : _config$additional_in9.apx_step,
25467
+ apx_screen_name: config === null || config === void 0 || (_config$additional_in10 = config.additional_info) === null || _config$additional_in10 === void 0 ? void 0 : _config$additional_in10.apx_screen_name,
25468
+ apx_variant_code: config === null || config === void 0 || (_config$additional_in11 = config.additional_info) === null || _config$additional_in11 === void 0 ? void 0 : _config$additional_in11.apx_variant_code
25291
25469
  });
25292
25470
  }
25293
25471
  };
@@ -25305,43 +25483,43 @@
25305
25483
  backgroundDiv.remove();
25306
25484
  _this.isShowingAction = false;
25307
25485
  if (((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios") {
25308
- var _window36, _window36$updateFlag;
25309
- (_window36 = window) === null || _window36 === void 0 || (_window36 = _window36.Apxor) === null || _window36 === void 0 || (_window36$updateFlag = _window36.updateFlag) === null || _window36$updateFlag === void 0 || _window36$updateFlag.call(_window36, false, "IN_APP");
25486
+ var _window35, _window35$updateFlag;
25487
+ (_window35 = window) === null || _window35 === void 0 || (_window35 = _window35.Apxor) === null || _window35 === void 0 || (_window35$updateFlag = _window35.updateFlag) === null || _window35$updateFlag === void 0 || _window35$updateFlag.call(_window35, false, "IN_APP");
25310
25488
  } else {
25311
- var _window37, _window37$updateFlag;
25312
- (_window37 = window) === null || _window37 === void 0 || (_window37 = _window37.Apxor) === null || _window37 === void 0 || (_window37$updateFlag = _window37.updateFlag) === null || _window37$updateFlag === void 0 || _window37$updateFlag.call(_window37, "IN_APP", false);
25489
+ var _window36, _window36$updateFlag;
25490
+ (_window36 = window) === null || _window36 === void 0 || (_window36 = _window36.Apxor) === null || _window36 === void 0 || (_window36$updateFlag = _window36.updateFlag) === null || _window36$updateFlag === void 0 || _window36$updateFlag.call(_window36, "IN_APP", false);
25313
25491
  }
25314
25492
  _this.currentAction = null;
25315
25493
  if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
25316
25494
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);
25317
25495
  } else if (action_class === "inapp_builder") {
25318
- var _window38;
25496
+ var _window37;
25319
25497
  if (!(action == "cancel" || action == "never")) {
25320
- var _window$Apxor10, _config$additional_in8, _config$additional_in9, _window$Apxor11, _config$additional_in10, _config$additional_in11, _config$additional_in12, _config$additional_in13, _window$ApxorRTM4;
25498
+ var _window$Apxor10, _config$additional_in12, _config$additional_in13, _window$Apxor11, _config$additional_in14, _config$additional_in15, _config$additional_in16, _config$additional_in17, _window$ApxorRTM5;
25321
25499
  var additional_info = {
25322
25500
  apx_nudge_name: name,
25323
- apx_nudge_id: ((_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 ? void 0 : _window$Apxor10.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in8 = config.additional_info) === null || _config$additional_in8 === void 0 ? void 0 : _config$additional_in8.id : configId,
25501
+ apx_nudge_id: ((_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 ? void 0 : _window$Apxor10.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in12 = config.additional_info) === null || _config$additional_in12 === void 0 ? void 0 : _config$additional_in12.id : configId,
25324
25502
  apx_template_name: "inapp",
25325
- apx_variant_code: config === null || config === void 0 || (_config$additional_in9 = config.additional_info) === null || _config$additional_in9 === void 0 ? void 0 : _config$additional_in9.apx_variant_code,
25326
- apx_step: ((_window$Apxor11 = window.Apxor) === null || _window$Apxor11 === void 0 ? void 0 : _window$Apxor11.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in10 = config.additional_info) !== null && _config$additional_in10 !== void 0 && _config$additional_in10.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in11 = config.additional_info) === null || _config$additional_in11 === void 0 ? void 0 : _config$additional_in11.apx_step : config !== null && config !== void 0 && (_config$additional_in12 = config.additional_info) !== null && _config$additional_in12 !== void 0 && _config$additional_in12.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in13 = config.additional_info) === null || _config$additional_in13 === void 0 ? void 0 : _config$additional_in13.apx_step
25503
+ apx_variant_code: config === null || config === void 0 || (_config$additional_in13 = config.additional_info) === null || _config$additional_in13 === void 0 ? void 0 : _config$additional_in13.apx_variant_code,
25504
+ apx_step: ((_window$Apxor11 = window.Apxor) === null || _window$Apxor11 === void 0 ? void 0 : _window$Apxor11.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in14 = config.additional_info) !== null && _config$additional_in14 !== void 0 && _config$additional_in14.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in15 = config.additional_info) === null || _config$additional_in15 === void 0 ? void 0 : _config$additional_in15.apx_step : config !== null && config !== void 0 && (_config$additional_in16 = config.additional_info) !== null && _config$additional_in16 !== void 0 && _config$additional_in16.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in17 = config.additional_info) === null || _config$additional_in17 === void 0 ? void 0 : _config$additional_in17.apx_step
25327
25505
  };
25328
25506
  if (type != "") {
25329
25507
  additional_info["apx_dismiss_type"] = type;
25330
25508
  }
25331
- (_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_dismissed", additional_info);
25509
+ (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_nudge_dismissed", additional_info);
25332
25510
  }
25333
25511
  if (action === "cancel") {
25334
- var _window$Apxor12, _config$additional_in14, _config$additional_in15, _window$Apxor13, _config$additional_in16, _config$additional_in17, _config$additional_in18, _config$additional_in19, _window$ApxorRTM5;
25512
+ var _window$Apxor12, _config$additional_in18, _config$additional_in19, _window$Apxor13, _config$additional_in20, _config$additional_in21, _config$additional_in22, _config$additional_in23, _window$ApxorRTM6;
25335
25513
  var _additional_info = {
25336
25514
  apx_nudge_name: name,
25337
- apx_nudge_id: ((_window$Apxor12 = window.Apxor) === null || _window$Apxor12 === void 0 ? void 0 : _window$Apxor12.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in14 = config.additional_info) === null || _config$additional_in14 === void 0 ? void 0 : _config$additional_in14.id : configId,
25515
+ apx_nudge_id: ((_window$Apxor12 = window.Apxor) === null || _window$Apxor12 === void 0 ? void 0 : _window$Apxor12.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in18 = config.additional_info) === null || _config$additional_in18 === void 0 ? void 0 : _config$additional_in18.id : configId,
25338
25516
  apx_template_name: "inapp",
25339
- apx_variant_code: config === null || config === void 0 || (_config$additional_in15 = config.additional_info) === null || _config$additional_in15 === void 0 ? void 0 : _config$additional_in15.apx_variant_code,
25340
- apx_step: ((_window$Apxor13 = window.Apxor) === null || _window$Apxor13 === void 0 ? void 0 : _window$Apxor13.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in16 = config.additional_info) !== null && _config$additional_in16 !== void 0 && _config$additional_in16.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in17 = config.additional_info) === null || _config$additional_in17 === void 0 ? void 0 : _config$additional_in17.apx_step : config !== null && config !== void 0 && (_config$additional_in18 = config.additional_info) !== null && _config$additional_in18 !== void 0 && _config$additional_in18.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in19 = config.additional_info) === null || _config$additional_in19 === void 0 ? void 0 : _config$additional_in19.apx_step
25517
+ apx_variant_code: config === null || config === void 0 || (_config$additional_in19 = config.additional_info) === null || _config$additional_in19 === void 0 ? void 0 : _config$additional_in19.apx_variant_code,
25518
+ apx_step: ((_window$Apxor13 = window.Apxor) === null || _window$Apxor13 === void 0 ? void 0 : _window$Apxor13.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in20 = config.additional_info) !== null && _config$additional_in20 !== void 0 && _config$additional_in20.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in21 = config.additional_info) === null || _config$additional_in21 === void 0 ? void 0 : _config$additional_in21.apx_step : config !== null && config !== void 0 && (_config$additional_in22 = config.additional_info) !== null && _config$additional_in22 !== void 0 && _config$additional_in22.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in23 = config.additional_info) === null || _config$additional_in23 === void 0 ? void 0 : _config$additional_in23.apx_step
25341
25519
  };
25342
- (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_nudge_cancelled", _additional_info);
25520
+ (_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_nudge_cancelled", _additional_info);
25343
25521
  }
25344
- (_window38 = window) === null || _window38 === void 0 || (_window38 = _window38.ApxorInternals) === null || _window38 === void 0 || _window38.removeBuilderTemplate(configId);
25522
+ (_window37 = window) === null || _window37 === void 0 || (_window37 = _window37.ApxorInternals) === null || _window37 === void 0 || _window37.removeBuilderTemplate(configId);
25345
25523
  }
25346
25524
  };
25347
25525
  if (action_class === "modal") {
@@ -25349,17 +25527,15 @@
25349
25527
  inappModal.createInAppModal();
25350
25528
  } else if (action_class === "inapp_builder") {
25351
25529
  inappModal = new NewModalInApp(config, terminationConfig, configId, name, onShow, onHide);
25352
- setTimeout(function () {
25353
- inappModal.createInAppModal();
25354
- }, config === null || config === void 0 ? void 0 : config.delay);
25530
+ inappModal.createInAppModal();
25355
25531
  }
25356
25532
  });
25357
25533
  _defineProperty(this, "showPlaceHolder", function () {
25358
- var _window39;
25359
- if (_this.etai) {
25534
+ var _window38;
25535
+ if (_this.gkkE) {
25360
25536
  return;
25361
25537
  }
25362
- _this.etai = true;
25538
+ _this.gkkE = true;
25363
25539
  var ele = document.createElement("div");
25364
25540
  ele.innerHTML = "place your immersive card here";
25365
25541
  ele.style.backgroundColor = "#f5f5f5";
@@ -25369,7 +25545,7 @@
25369
25545
  ele.style.padding = "12px";
25370
25546
  ele.style.fontSize = "14px";
25371
25547
  document.body.appendChild(ele);
25372
- (_window39 = window) === null || _window39 === void 0 || (_window39 = _window39.ApxorWidget) === null || _window39 === void 0 || _window39.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
25548
+ (_window38 = window) === null || _window38 === void 0 || (_window38 = _window38.ApxorWidget) === null || _window38 === void 0 || _window38.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
25373
25549
  });
25374
25550
  _defineProperty(this, "pauseStories", function () {
25375
25551
  var progress = Array.from(document.querySelectorAll(".progress"));
@@ -25426,7 +25602,7 @@
25426
25602
  }
25427
25603
  });
25428
25604
  _defineProperty(this, "removeBadge", function (name, id) {
25429
- var cssPostFix = "-".concat(id, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
25605
+ var cssPostFix = "-".concat(id, "-").concat(name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
25430
25606
  var badge = Array.from(document.getElementsByClassName("apxor-badge-container")).find(function (element) {
25431
25607
  return element.classList.contains("apxor-badge-container-styles-".concat(cssPostFix));
25432
25608
  });