apxor-rtm-ui 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6679,7 +6679,7 @@
6679
6679
  var isWalkthrough = arguments.length > 8 ? arguments[8] : undefined;
6680
6680
  var uis = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : {};
6681
6681
  var index = arguments.length > 10 ? arguments[10] : undefined;
6682
- var fontMultiplier = arguments.length > 11 ? arguments[11] : undefined;
6682
+ var fontMultiplier = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : 1;
6683
6683
  var buttons = document.createElement("div");
6684
6684
  buttons.className = "".concat(position, "-buttons-container");
6685
6685
  buttons.style.zIndex = 99999999;
@@ -6769,6 +6769,7 @@
6769
6769
  numberedfont = (_numbered = numbered) === null || _numbered === void 0 ? void 0 : _numbered.font;
6770
6770
  }
6771
6771
  var justifyContent = "space-between";
6772
+ var fontMultiplier = buttons_css.fontMultiplier;
6772
6773
  buttons_css.forEach(function (button_css, index) {
6773
6774
  var _ref;
6774
6775
  var slot = button_css.slot,
@@ -6812,8 +6813,7 @@
6812
6813
  _button_css$gradient = button_css.gradient,
6813
6814
  gradient = _button_css$gradient === void 0 ? {} : _button_css$gradient,
6814
6815
  _button_css$custom_fo = button_css.custom_font,
6815
- custom_font = _button_css$custom_fo === void 0 ? "" : _button_css$custom_fo,
6816
- fontMultiplier = button_css.fontMultiplier;
6816
+ custom_font = _button_css$custom_fo === void 0 ? "" : _button_css$custom_fo;
6817
6817
  var gradient_direction, gradient_c1, gradient_c2;
6818
6818
  if (enable_gradient) {
6819
6819
  gradient_direction = gradient.direction || "to right";
@@ -6967,8 +6967,15 @@
6967
6967
  break;
6968
6968
  case "redirect":
6969
6969
  action = function action() {
6970
- ActionHandler.complete(true, "redirect");
6971
- window.Apxor.redirectTo("IN_APP", uuid, name, text, JSON.stringify(action_config));
6970
+ var _window$Apxor;
6971
+ if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
6972
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
6973
+ ActionHandler.complete(false, "redirect");
6974
+ window.Apxor.redirectTo(JSON.stringify(action_config));
6975
+ } else {
6976
+ ActionHandler.complete(true, "redirect");
6977
+ window.Apxor.redirectTo("IN_APP", uuid, name, text, JSON.stringify(action_config));
6978
+ }
6972
6979
  // if (redirectWithin || isExternal) {
6973
6980
  // window.open(url, redirectWithin ? "_self" : "_blank");
6974
6981
  // } else {
@@ -8000,7 +8007,7 @@
8000
8007
  scrollToView = _uiConfig$scrollToVie === void 0 ? true : _uiConfig$scrollToVie;
8001
8008
  var scrollTo = false;
8002
8009
  // 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.
8003
- if (dim_background) {
8010
+ if (dim_background && !isElementInViewport(getElementFromSelector(view_id))) {
8004
8011
  scrollTo = {
8005
8012
  behavior: "smooth",
8006
8013
  block: "center"
@@ -11457,6 +11464,7 @@
11457
11464
  modalOverlayMaskOpening: "tippyModalMaskOpening"
11458
11465
  };
11459
11466
  var createMask = function createMask(targetElement, elementHighlighterConfig) {
11467
+ var _screen;
11460
11468
  var containerElement = _createModalContainer$1();
11461
11469
  var defsElement = document.createElementNS(svgNS$1, "defs");
11462
11470
  var maskContainer = _createMaskContainer$1();
@@ -11470,7 +11478,7 @@
11470
11478
  //setAttributes(maskOpening, { "scroll-behavior": "smooth" });
11471
11479
  });
11472
11480
 
11473
- screen.orientation.addEventListener("change", function () {
11481
+ (_screen = screen) === null || _screen === void 0 || (_screen = _screen.orientation) === null || _screen === void 0 || _screen.addEventListener("change", function () {
11474
11482
  positionModalOpening$1(targetElement, maskOpening, maskOpeningBorderStyles, elementHighlighterConfig);
11475
11483
  });
11476
11484
  maskContainer.appendChild(maskRect);
@@ -13176,7 +13184,7 @@
13176
13184
  * @description Creates the styles for Marketing message.
13177
13185
  * @returns {string} css styles
13178
13186
  */
13179
- _defineProperty(this, "pxOH", function () {
13187
+ _defineProperty(this, "AccS", function () {
13180
13188
  if (!_this.enable_marketing) {
13181
13189
  return "";
13182
13190
  }
@@ -13195,7 +13203,7 @@
13195
13203
  * @private
13196
13204
  * @description Sets the marketing content at the end of the Inline
13197
13205
  */
13198
- _defineProperty(this, "fWiS", function () {
13206
+ _defineProperty(this, "LKpH", function () {
13199
13207
  if (_this.enable_marketing) {
13200
13208
  var marketingContainer = document.createElement("div");
13201
13209
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -13299,6 +13307,7 @@
13299
13307
  this.updateSkid = null;
13300
13308
  this.initial_data_placement = this.position.position;
13301
13309
  this.recent_placement = this.position.position;
13310
+ this.tippy_box_position = 0;
13302
13311
 
13303
13312
  //badge related config
13304
13313
  this.flag = true;
@@ -13756,7 +13765,7 @@
13756
13765
  if (apxor_tooltip_styles) {
13757
13766
  return;
13758
13767
  }
13759
- 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.pxOH(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
13768
+ 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.AccS(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
13760
13769
  var styleNode = document.createElement("style");
13761
13770
  styleNode.setAttribute("apx-tooltip-styles", "");
13762
13771
  styleNode.innerHTML = styles;
@@ -14377,63 +14386,69 @@
14377
14386
  if (this.enable_arrow) {
14378
14387
  switch (this.arrow.type) {
14379
14388
  case "round":
14380
- tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-12 + this.border.width, "px") : "-12px", ";\n ");
14389
+ this.tippy_box_position = this.enable_border ? 10 - this.border.width : 10;
14390
+ tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-10 + this.border.width, "px") : "-10px", ";\n ");
14381
14391
  tippyTopArrowStyle = "\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color, ";\n ");
14382
- tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-5 + this.border.width, "px") : "-5px", ";\n ");
14392
+ tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-10 + this.border.width, "px") : "-10px", ";\n ");
14383
14393
  tippyRightArrowStyle = "\n bottom:-10px;\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color, ";\n ");
14384
- tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-8 + this.border.width, "px") : "-8px", ";\n ");
14394
+ tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-10 + this.border.width, "px") : "-10px", ";\n ");
14385
14395
  tippyBottomArrowStyle = "\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color, ";\n ");
14386
- tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-15 + this.border.width, "px") : "-15px", ";\n ");
14396
+ tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-10 + this.border.width, "px") : "-10px", ";\n ");
14387
14397
  tippyLeftArrowStyle = "\n top:-50%;\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color, ";\n ");
14388
14398
  break;
14389
14399
  case "narrow":
14390
- tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-22 + this.border.width, "px") : "-22px", ";\n ");
14400
+ this.tippy_box_position = this.enable_border ? 16 - this.border.width : 16;
14401
+ tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-16 + this.border.width, "px") : "-16px", ";\n ");
14391
14402
  tippyTopArrowStyle = "\n border-width:18px 5px 0;\n ";
14392
- tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-7 + this.border.width, "px") : "-7px", ";\n ");
14403
+ tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-16 + this.border.width, "px") : "-16px", ";\n ");
14393
14404
  tippyRightArrowStyle = "\n border-width:5px 18px 5px 0;\n ";
14394
- tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-11 + this.border.width, "px") : "-11px", ";\n ");
14405
+ tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-16 + this.border.width, "px") : "-16px", ";\n ");
14395
14406
  tippyBottomArrowStyle = "\n border-width:0 5px 18px;\n ";
14396
- tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-26 + this.border.width, "px") : "-26px", ";\n ");
14407
+ tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-16 + this.border.width, "px") : "-16px", ";\n ");
14397
14408
  tippyLeftArrowStyle = "\n border-width:5px 0 5px 18px;\n ";
14398
14409
  break;
14399
14410
  case "wide":
14400
- tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-22 + this.border.width, "px") : "-22px", ";\n ");
14411
+ this.tippy_box_position = this.enable_border ? 10 - this.border.width : 10;
14412
+ tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-16 + this.border.width, "px") : "-16px", ";\n ");
14401
14413
  tippyTopArrowStyle = "\n left:-50%;\n border-width:9px 18px 0;\n ";
14402
- tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(2 + this.border.width, "px") : "2px", ";\n ");
14414
+ tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-8 + this.border.width, "px") : "-8px", ";\n ");
14403
14415
  tippyRightArrowStyle = "\n top:-50%;\n border-width:18px 9px 18px 0;\n ";
14404
- tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(2 + this.border.width, "px") : "2px", ";\n ");
14416
+ tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-5 + this.border.width, "px") : "-5px", ";\n ");
14405
14417
  tippyBottomArrowStyle = "\n left:-50%;\n top:-8px;\n border-width:0 18px 9px;\n bottom:13px;\n ";
14406
- tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-26 + this.border.width, "px") : "-26px", ";\n ");
14418
+ tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-18 + this.border.width, "px") : "-18px", ";\n ");
14407
14419
  tippyLeftArrowStyle = "\n top:-50%;\n border-width:18px 0 18px 8px;\n ";
14408
14420
  break;
14409
14421
  case "large":
14410
- tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-19 + this.border.width, "px") : "-19px", ";\n ");
14422
+ this.tippy_box_position = this.enable_border ? 15 - this.border.width : 15;
14423
+ tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-15 + this.border.width, "px") : "-15px", ";\n ");
14411
14424
  tippyTopArrowStyle = "\n left:-50%;\n border-width:16px 16px 0;\n ";
14412
- tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-5 + this.border.width, "px") : "-5px", ";\n ");
14425
+ tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-15 + this.border.width, "px") : "-15px", ";\n ");
14413
14426
  tippyRightArrowStyle = "\n top:-50%;\n border-width:16px 16px 16px 0;\n ";
14414
- tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-9 + this.border.width, "px") : "-9px", ";\n ");
14427
+ tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-15 + this.border.width, "px") : "-15px", ";\n ");
14415
14428
  tippyBottomArrowStyle = "\n left:-50%;\n border-width:0 16px 16px;\n ";
14416
- tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-23 + this.border.width, "px") : "-23px", ";\n ");
14429
+ tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-15 + this.border.width, "px") : "-15px", ";\n ");
14417
14430
  tippyLeftArrowStyle = "\n top:-50%;\n border-width:16px 0 16px 16px;\n ";
14418
14431
  break;
14419
14432
  case "small":
14420
- tippyTopArrowAdjustment = "\n bottom:-12px;\n ";
14433
+ this.tippy_box_position = this.enable_border ? 6 - this.border.width : 6;
14434
+ tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-6 + this.border.width, "px") : "-6px", ";\n ");
14421
14435
  tippyTopArrowStyle = "\n left:-50%;\n border-width:16px 16px 0;\n ";
14422
- tippyRightArrowAdjustment = "\n left: 3px;\n ";
14436
+ tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-6 + this.border.width, "px") : "-6px", ";\n ");
14423
14437
  tippyRightArrowStyle = "\n top:-50%;\n border-width:16px 16px 16px 0;\n ";
14424
- tippyBottomArrowAdjustment = "\n top: -1px;\n ";
14438
+ tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-6 + this.border.width, "px") : "-6px", ";\n ");
14425
14439
  tippyBottomArrowStyle = "\n left:-50%;\n border-width:0 16px 16px;\n ";
14426
- tippyLeftArrowAdjustment = "\n right: -16px;\n ";
14440
+ tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-6 + this.border.width, "px") : "-6px", ";\n ");
14427
14441
  tippyLeftArrowStyle = "\n top:-50%;\n border-width:16px 0 16px 16px;\n ";
14428
14442
  break;
14429
14443
  default:
14430
- tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border && this.border.width > 5 ? "".concat(-15 + this.border.width - 5, "px") : "-15px", ";\n ");
14444
+ this.tippy_box_position = this.enable_border ? 11 - this.border.width : 11;
14445
+ tippyTopArrowAdjustment = "\n bottom:".concat(this.enable_border ? "".concat(-11 + this.border.width, "px") : "-11px", ";\n ");
14431
14446
  tippyTopArrowStyle = "\n left:-50%;\n border-width:16px 16px 0;\n ";
14432
- tippyRightArrowAdjustment = "\n left:".concat(this.enable_border && this.border.width > 5 ? "".concat(-1 + this.border.width - 5, "px") : "-1px", ";\n ");
14447
+ tippyRightArrowAdjustment = "\n left:".concat(this.enable_border ? "".concat(-11 + this.border.width, "px") : "-11px", ";\n ");
14433
14448
  tippyRightArrowStyle = "\n top:-50%;\n border-width:16px 16px 16px 0;\n ";
14434
- tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border && this.border.width > 5 ? "".concat(-5 + this.border.width - 5, "px") : "-5px", ";\n ");
14449
+ tippyBottomArrowAdjustment = "\n top:".concat(this.enable_border ? "".concat(-11 + this.border.width, "px") : "-11px", ";\n ");
14435
14450
  tippyBottomArrowStyle = "\n left:-50%;\n border-width:0 16px 16px;\n ";
14436
- tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border && this.border.width > 4 ? "".concat(-20 + this.border.width - 4, "px") : "-20px", ";\n ");
14451
+ tippyLeftArrowAdjustment = "\n right:".concat(this.enable_border ? "".concat(-11 + this.border.width, "px") : "-11px", ";\n ");
14437
14452
  tippyLeftArrowStyle = "\n top:-50%;\n border-width:16px 0 16px 16px;\n ";
14438
14453
  break;
14439
14454
  }
@@ -14466,7 +14481,8 @@
14466
14481
  animationStyles = "\n @-webkit-keyframes ".concat(this.animation.type, " {\n 0% { transform: ").concat(translateDir(this.position.position, 0), "; }\n 50% { transform: ").concat(translateDir(this.position.position, 50), "; }\n 100% { transform: ").concat(translateDir(this.position.position, 100), "; }\n }\n \n @keyframes ").concat(this.animation.type, " {\n 0% { transform: ").concat(translateDir(this.position.position, 0), "; }\n 50% { transform: ").concat(translateDir(this.position.position, 50), "; }\n 100% { transform: ").concat(translateDir(this.position.position, 100), "; }\n }\n \n .tippy-box {\n animation-name: ").concat(this.animation.type, ";\n animation-duration: ").concat(this.animation.duration, "ms;\n animation-timing-function: ").concat(this.animation.anim_function, ";\n animation-iteration-count: ").concat(this.animation.iteration_count, ";\n }\n ");
14467
14482
  }
14468
14483
  // Do not modify these. These tippy styles.
14469
- var tippyStyles = "\n .tippy-box[data-animation=\"fade\"][data-state=hidden]{\n opacity:0;\n } \n [data-tippy-root] {\n width:".concat(this.inline_width, ";\n max-width:calc(100vw - ").concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.width : 0, "px);\n } \n .tippy-box { \n width:").concat(this.inline_width, ";\n position:relative;\n line-height:1.4;\n white-space:normal;\n outline:0;\n transition-property:transform,visibility,opacity;\n } \n .tippy-box[data-placement^=top] > .tippy-arrow {\n ").concat(tippyTopArrowAdjustment, "\n } \n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n ").concat(tippyTopArrowStyle, "\n border-top-color:initial;\n transform-origin:center top;\n } \n .tippy-box[data-placement^=bottom] > .tippy-arrow {\n ").concat(tippyBottomArrowAdjustment, "\n } \n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n ").concat(tippyBottomArrowStyle, "\n border-bottom-color:initial;\n transform-origin:center bottom;\n } \n .tippy-box[data-placement^=left] > .tippy-arrow {\n ").concat(tippyLeftArrowAdjustment, "\n } \n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n ").concat(tippyLeftArrowStyle, "\n border-left-color:initial;\n transform-origin:center left;\n } \n .tippy-box[data-placement^=right] > .tippy-arrow {\n ").concat(tippyRightArrowAdjustment, "\n } \n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n ").concat(tippyRightArrowStyle, "\n border-right-color:initial;\n transform-origin:center right;\n } \n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)\n } \n .tippy-arrow {\n z-index:9999;\n width:18px;\n height:18px;\n color:").concat(this.enable_arrow ? this.arrow.color : "transparent", ";\n opacity:0;\n visibility:hidden;\n } \n .tippy-arrow.open {\n opacity:1;\n visibility:visible;\n }\n .tippy-arrow:before{ \n transform: scale(").concat(this.fontMultiplier, ");\n content:\"\";\n position:absolute;\n border-color:transparent;\n border-style:").concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.style : "solid", ";\n } \n .tippy-content {\n width:").concat(this.inline_width, ";\n padding: 0.3125rem 0.5625rem;\n position:relative;\n z-index:9998;\n } \n ").concat(animationStyles, "\n ");
14484
+ var tippyStyles = "\n .tippy-box[data-animation=\"fade\"][data-state=hidden]{\n opacity:0;\n } \n [data-tippy-root] {\n width:".concat(this.inline_width, ";\n max-width:calc(100vw - ").concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.width : 0, "px);\n } \n .tippy-box { \n width:").concat(this.inline_width, ";\n position:relative;\n line-height:1.4;\n white-space:normal;\n outline:0;\n transition-property:transform,visibility,opacity;\n } \n .tippy-box[data-placement^=top] > .tippy-arrow {\n ").concat(tippyTopArrowAdjustment, "\n } \n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n ").concat(tippyTopArrowStyle, "\n border-top-color:initial;\n transform-origin:center top;\n } \n .tippy-box[data-placement^=bottom] > .tippy-arrow {\n ").concat(tippyBottomArrowAdjustment, "\n } \n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n ").concat(tippyBottomArrowStyle, "\n border-bottom-color:initial;\n transform-origin:center bottom;\n } \n .tippy-box[data-placement^=left] > .tippy-arrow {\n ").concat(tippyLeftArrowAdjustment, "\n } \n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n ").concat(tippyLeftArrowStyle, "\n border-left-color:initial;\n transform-origin:center left;\n } \n .tippy-box[data-placement^=right] > .tippy-arrow {\n ").concat(tippyRightArrowAdjustment, "\n } \n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n ").concat(tippyRightArrowStyle, "\n border-right-color:initial;\n transform-origin:center right;\n } \n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)\n } \n .tippy-arrow {\n z-index:9999;\n width:18px;\n height:18px;\n color:").concat(this.enable_arrow ? this.arrow.color : "transparent", ";\n opacity:0;\n visibility:hidden;\n } \n .tippy-arrow.open {\n opacity:1;\n visibility:visible;\n }\n .tippy-arrow:before{ \n transform: scale(").concat(this.fontMultiplier, ");\n content:\"\";\n position:absolute;\n border-color:transparent;\n border-style:").concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.style : "solid", ";\n } \n .tippy-content {\n width:").concat(this.inline_width, ";\n position:relative;\n z-index:9998;\n } \n ").concat(animationStyles, "\n ");
14485
+ //padding: 0.3125rem 0.5625rem; causing arrow distortion
14470
14486
  var tippyTheme = "\n ".concat(tippyStyles, "\n ");
14471
14487
  return tippyTheme;
14472
14488
  //transition:all .5s cubic-bezier(.96,.23,.07,.8); // declaration in .tippy-arrow
@@ -14559,7 +14575,7 @@
14559
14575
  this._setCloseButton();
14560
14576
 
14561
14577
  //Set the Marketing content
14562
- this.fWiS();
14578
+ this.LKpH();
14563
14579
  }
14564
14580
 
14565
14581
  /**
@@ -14654,12 +14670,16 @@
14654
14670
  videoDiv.innerHTML = "".concat(this.video.embed.html);
14655
14671
  this.mediaContainer.appendChild(videoDiv);
14656
14672
  } else {
14673
+ var _window$Apxor;
14657
14674
  var videoElement = document.createElement("video");
14658
14675
  videoElement.classList.add("apx-inline-video".concat(this.cssPostFix));
14659
- videoElement.controlsList = "noplaybackrate nodownload";
14660
- videoElement.disablePictureInPicture = true;
14676
+ videoElement.controlsList = "noplaybackrate nodownload nofullscreen";
14661
14677
  videoElement.controls = true;
14678
+ videoElement.disablePictureInPicture = true;
14662
14679
  videoElement.autoplay = true;
14680
+ if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
14681
+ videoElement.playsInline = true;
14682
+ }
14663
14683
  videoElement.muted = !this.video.enable_audio;
14664
14684
  var sourceElement = document.createElement("source");
14665
14685
  //Set the video tag attributes
@@ -14913,12 +14933,12 @@
14913
14933
  var closeButton = document.createElement("span");
14914
14934
  // Close button SVG is decided based on the type of the button in the config.
14915
14935
  if (this.close_button.type === CLOSE_BUTTON_STYLE.NORMAL) {
14916
- closeButton.innerHTML = getCloseSVG(this.close_button.width, this.close_button.height, this.close_button.color);
14936
+ closeButton.innerHTML = getCloseSVG(this.close_button.width * this.fontMultiplier, this.close_button.height * this.fontMultiplier, this.close_button.color);
14917
14937
  } else if (this.close_button.type === CLOSE_BUTTON_STYLE.FILL) {
14918
14938
  if (this.close_button.shape === "circle") {
14919
- closeButton.innerHTML = getCloseWithCircleSVG(this.close_button.width, this.close_button.height, this.close_button.fill_color, this.close_button.color);
14939
+ closeButton.innerHTML = getCloseWithCircleSVG(this.close_button.width * this.fontMultiplier, this.close_button.height * this.fontMultiplier, this.close_button.fill_color, this.close_button.color);
14920
14940
  } else {
14921
- closeButton.innerHTML = getCloseWithRectangleSVG(this.close_button.width, this.close_button.height, this.close_button.fill_color, this.close_button.color);
14941
+ closeButton.innerHTML = getCloseWithRectangleSVG(this.close_button.width * this.fontMultiplier, this.close_button.height * this.fontMultiplier, this.close_button.fill_color, this.close_button.color);
14922
14942
  }
14923
14943
  } else {
14924
14944
  closeButton.innerHTML = "<img src=\"".concat(this.close_button.path, "\" width=\"").concat(this.close_button.width, "px\" height=\"").concat(this.close_button.height, "px\"></img>");
@@ -15249,22 +15269,49 @@
15249
15269
  var tippyStyleElementContent = document.querySelector("[apx-tooltip-styles]").innerHTML;
15250
15270
  //const tippyContent = document.querySelector(".tippy-content");
15251
15271
  var placement = tippyBox.getAttribute("data-placement");
15252
- var rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize);
15272
+ // var rootFontSize = parseFloat(
15273
+ // window.getComputedStyle(document.documentElement).fontSize
15274
+ // );
15275
+ _this12.tippy_box_position = _this12.enable_animation ? _this12.tippy_box_position - 10 : _this12.tippy_box_position;
15276
+ _this12.tippy_box_position = _this12.set_font_to_scale && _this12.fontMultiplier > 1 ? _this12.tippy_box_position + 26 : _this12.tippy_box_position;
15253
15277
  if (placement === "left" || placement === "right") {
15254
15278
  tippyRoot.style.top = "".concat(_this12.position.offset.skid, "px");
15255
- if (_this12.initial_data_placement !== placement) {
15256
- tippyRoot.style.left = placement === "left" ? "".concat(-0.3125 * 2 * rootFontSize - (_this12.enable_animation ? 16 : 0), "px") : "".concat(0.3125 * 2 * rootFontSize + (_this12.enable_animation ? 10 : 0), "px");
15257
- }
15279
+ tippyRoot.style.left = "".concat(placement === "left" ? -_this12.tippy_box_position : _this12.tippy_box_position, "px");
15280
+ // if (this.initial_data_placement !== placement) {
15281
+ // tippyRoot.style.left =
15282
+ // placement === "left"
15283
+ // ? `${
15284
+ // -0.3125 * 2 * rootFontSize -
15285
+ // (this.enable_animation ? 16 : 0)
15286
+ // }px`
15287
+ // : `${
15288
+ // 0.3125 * 2 * rootFontSize +
15289
+ // (this.enable_animation ? 10 : 0)
15290
+ // }px`;
15291
+ // }
15258
15292
  } else if (placement === "top" || placement === "bottom") {
15259
15293
  tippyRoot.style.left = "".concat(_this12.position.offset.skid, "px");
15260
- if (_this12.initial_data_placement !== placement) {
15261
- tippyRoot.style.top = placement === "top" ? "".concat(-0.5625 * 2 * rootFontSize - (_this12.enable_animation ? 16 : 0), "px") : "".concat(0.5625 * 2 * rootFontSize + (_this12.enable_animation ? 10 : 0), "px");
15262
- }
15294
+ tippyRoot.style.top = "".concat(placement === "bottom" ? _this12.tippy_box_position : -_this12.tippy_box_position, "px");
15295
+ // if (this.initial_data_placement !== placement) {
15296
+ // tippyRoot.style.top =
15297
+ // placement === "top"
15298
+ // ? `${
15299
+ // -0.5625 * 2 * rootFontSize -
15300
+ // (this.enable_animation ? 16 : 0)
15301
+ // }px`
15302
+ // : `${
15303
+ // 0.5625 * 2 * rootFontSize +
15304
+ // (this.enable_animation ? 10 : 0)
15305
+ // }px`;
15306
+ // }
15263
15307
  }
15308
+
15264
15309
  if (_this12.recent_placement !== placement) {
15265
- tippyStyleElementContent = tippyStyleElementContent.replace("@-webkit-keyframes ".concat(_this12.animation.type, " {\n 0% { transform: ").concat(translateDir(_this12.recent_placement, 0), "; }\n 50% { transform: ").concat(translateDir(_this12.recent_placement, 50), "; }\n 100% { transform: ").concat(translateDir(_this12.recent_placement, 100), "; }\n }\n \n @keyframes ").concat(_this12.animation.type, " {\n 0% { transform: ").concat(translateDir(_this12.recent_placement, 0), "; }\n 50% { transform: ").concat(translateDir(_this12.recent_placement, 50), "; }\n 100% { transform: ").concat(translateDir(_this12.recent_placement, 100), "; }\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, ""), "@-webkit-keyframes ".concat(_this12.animation.type, " {\n 0% { transform: ").concat(translateDir(placement, 0), "; }\n 50% { transform: ").concat(translateDir(placement, 50), "; }\n 100% { transform: ").concat(translateDir(placement, 100), "; }\n }\n \n @keyframes ").concat(_this12.animation.type, " {\n 0% { transform: ").concat(translateDir(placement, 0), "; }\n 50% { transform: ").concat(translateDir(placement, 50), "; }\n 100% { transform: ").concat(translateDir(placement, 100), "; }\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, ""));
15266
- document.querySelector("[apx-tooltip-styles]").innerHTML = tippyStyleElementContent;
15267
- _this12.recent_placement = placement;
15310
+ if (_this12.enable_animation) {
15311
+ tippyStyleElementContent = tippyStyleElementContent.replace("@-webkit-keyframes ".concat(_this12.animation.type, " {\n 0% { transform: ").concat(translateDir(_this12.recent_placement, 0), "; }\n 50% { transform: ").concat(translateDir(_this12.recent_placement, 50), "; }\n 100% { transform: ").concat(translateDir(_this12.recent_placement, 100), "; }\n }\n \n @keyframes ").concat(_this12.animation.type, " {\n 0% { transform: ").concat(translateDir(_this12.recent_placement, 0), "; }\n 50% { transform: ").concat(translateDir(_this12.recent_placement, 50), "; }\n 100% { transform: ").concat(translateDir(_this12.recent_placement, 100), "; }\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, ""), "@-webkit-keyframes ".concat(_this12.animation.type, " {\n 0% { transform: ").concat(translateDir(placement, 0), "; }\n 50% { transform: ").concat(translateDir(placement, 50), "; }\n 100% { transform: ").concat(translateDir(placement, 100), "; }\n }\n \n @keyframes ").concat(_this12.animation.type, " {\n 0% { transform: ").concat(translateDir(placement, 0), "; }\n 50% { transform: ").concat(translateDir(placement, 50), "; }\n 100% { transform: ").concat(translateDir(placement, 100), "; }\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, ""));
15312
+ document.querySelector("[apx-tooltip-styles]").innerHTML = tippyStyleElementContent;
15313
+ _this12.recent_placement = placement;
15314
+ }
15268
15315
  }
15269
15316
  };
15270
15317
  _this12.updateSkid();
@@ -15522,7 +15569,7 @@
15522
15569
  * @description Creates the styles for Marketing message.
15523
15570
  * @returns {string} css styles
15524
15571
  */
15525
- _defineProperty(this, "pxOH", function () {
15572
+ _defineProperty(this, "AccS", function () {
15526
15573
  if (!_this.enable_marketing) {
15527
15574
  return "";
15528
15575
  }
@@ -15568,7 +15615,7 @@
15568
15615
  * @private
15569
15616
  * @description Get the response for Form content in the InApp modal.
15570
15617
  */
15571
- _defineProperty(this, "Bdvl", function (form_elements) {
15618
+ _defineProperty(this, "arrC", function (form_elements) {
15572
15619
  var obj = {};
15573
15620
  var callback = "";
15574
15621
  form_elements.forEach(function (element) {
@@ -15608,7 +15655,7 @@
15608
15655
  * @private
15609
15656
  * @description Sets the marketing content at the end of the InApp
15610
15657
  */
15611
- _defineProperty(this, "fWiS", function () {
15658
+ _defineProperty(this, "LKpH", function () {
15612
15659
  if (_this.enable_marketing) {
15613
15660
  var marketingContainer = document.createElement("div");
15614
15661
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -15861,7 +15908,7 @@
15861
15908
  }, {
15862
15909
  key: "_setStyles",
15863
15910
  value: function _setStyles() {
15864
- 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.pxOH(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15911
+ 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.AccS(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15865
15912
  var styleNode = document.createElement("style");
15866
15913
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
15867
15914
  styleNode.innerHTML = styles;
@@ -16338,7 +16385,7 @@
16338
16385
  this._setCloseButton();
16339
16386
 
16340
16387
  //Set the Marketing content
16341
- this.fWiS();
16388
+ this.LKpH();
16342
16389
  }
16343
16390
 
16344
16391
  /**
@@ -16410,12 +16457,16 @@
16410
16457
  videoDiv.innerHTML = "".concat(this.video.embed.html);
16411
16458
  this.mediaContainer.appendChild(videoDiv);
16412
16459
  } else {
16460
+ var _window$Apxor;
16413
16461
  var videoElement = document.createElement("video");
16414
16462
  videoElement.classList.add("apx-inapp-video".concat(this.cssPostFix));
16415
- videoElement.controlsList = "noplaybackrate nodownload";
16416
- videoElement.disablePictureInPicture = true;
16463
+ videoElement.controlsList = "noplaybackrate nodownload nofullscreen";
16417
16464
  videoElement.controls = true;
16465
+ videoElement.disablePictureInPicture = true;
16418
16466
  videoElement.autoplay = true;
16467
+ if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
16468
+ videoElement.playsInline = true;
16469
+ }
16419
16470
  videoElement.muted = !this.video.enable_audio;
16420
16471
  var sourceElement = document.createElement("source");
16421
16472
  //Set the video tag attributes
@@ -16539,7 +16590,7 @@
16539
16590
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
16540
16591
  form.addEventListener("submit", function (e) {
16541
16592
  e.preventDefault();
16542
- var _this4$generateRespon = _this4.Bdvl(_this4.form.elements),
16593
+ var _this4$generateRespon = _this4.arrC(_this4.form.elements),
16543
16594
  obj = _this4$generateRespon.obj,
16544
16595
  callback = _this4$generateRespon.callback;
16545
16596
  var evalString = "(obj)=>" + callback + "(obj)";
@@ -16852,7 +16903,7 @@
16852
16903
  * @function showVideoInApp
16853
16904
  * @description Shows the video InApp with the configured mode.
16854
16905
  */
16855
- _defineProperty(this, "UOWB", function () {
16906
+ _defineProperty(this, "CXVQ", function () {
16856
16907
  _this.createPlayer();
16857
16908
  try {
16858
16909
  // In PIP mode, only after the video metadata is loaded, show the PIP.
@@ -16894,7 +16945,7 @@
16894
16945
  };
16895
16946
  } else {
16896
16947
  // As the video player is hidden by default, unhide if the mode is not PIP.
16897
- _this.VXvG();
16948
+ _this.ZtjN();
16898
16949
  }
16899
16950
  _this.showCallback();
16900
16951
  } catch (e) {
@@ -16914,7 +16965,7 @@
16914
16965
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
16915
16966
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
16916
16967
  */
16917
- _defineProperty(this, "zliy", function () {
16968
+ _defineProperty(this, "uwcj", function () {
16918
16969
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
16919
16970
  width = _getHeightWidthFromRe.width,
16920
16971
  height = _getHeightWidthFromRe.height;
@@ -16926,7 +16977,7 @@
16926
16977
  * @private
16927
16978
  * @description Removes the video player style element.
16928
16979
  */
16929
- _defineProperty(this, "zwkt", function () {
16980
+ _defineProperty(this, "uSCp", function () {
16930
16981
  var playerStyles = document.getElementById("apx-mpl-styles");
16931
16982
  if (playerStyles) {
16932
16983
  playerStyles.remove();
@@ -16937,7 +16988,7 @@
16937
16988
  * @private
16938
16989
  * @description Attach listeners on the video controls
16939
16990
  */
16940
- _defineProperty(this, "Tazp", function () {
16991
+ _defineProperty(this, "tFVB", function () {
16941
16992
  // Listener for the video end. Display the CTA's when the video ends.
16942
16993
  _this.videoElement.addEventListener("ended", function () {
16943
16994
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -17048,7 +17099,7 @@
17048
17099
  * @private
17049
17100
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
17050
17101
  */
17051
- _defineProperty(this, "hitN", function () {
17102
+ _defineProperty(this, "SbsY", function () {
17052
17103
  var _this$terminationConf;
17053
17104
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
17054
17105
  // On Exit of the PIP,
@@ -17088,7 +17139,7 @@
17088
17139
  * @private Sets the custom controls on the video player.
17089
17140
  * PIP and close are the custom controls that are created and positions on the video.
17090
17141
  */
17091
- _defineProperty(this, "FDtb", function () {
17142
+ _defineProperty(this, "NmxX", function () {
17092
17143
  _this.enable_close_button;
17093
17144
  if (_this.enable_close_button) {
17094
17145
  var closeButton = document.createElement("span");
@@ -17135,21 +17186,21 @@
17135
17186
  * @function hideVideoPlayer
17136
17187
  * @description Sets the visibility of the video player to hidden.
17137
17188
  */
17138
- _defineProperty(this, "EILB", function () {
17189
+ _defineProperty(this, "SJeU", function () {
17139
17190
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
17140
17191
  });
17141
17192
  /**
17142
17193
  * @function unhideVideoPlayer
17143
17194
  * @description Unhides video player.
17144
17195
  */
17145
- _defineProperty(this, "VXvG", function () {
17196
+ _defineProperty(this, "ZtjN", function () {
17146
17197
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
17147
17198
  });
17148
17199
  /**
17149
17200
  * @function getVideoElement
17150
17201
  * @returns {HTMLElement} Video ekement
17151
17202
  */
17152
- _defineProperty(this, "rWQg", function () {
17203
+ _defineProperty(this, "hjZT", function () {
17153
17204
  return _this.videoElement;
17154
17205
  });
17155
17206
  this.videoPlayer = null;
@@ -17201,7 +17252,7 @@
17201
17252
  this.videoPlayer.style.backgroundColor = this.bg_color;
17202
17253
 
17203
17254
  // Video has a resolution, not deviating from the resolution set the height and width.
17204
- this.zliy();
17255
+ this.uwcj();
17205
17256
  //Generate the styles and add them to the document head.
17206
17257
  this._setVideoPlayerStyles();
17207
17258
  //Set the position of the video player with in the 5 possible positions.
@@ -17209,16 +17260,16 @@
17209
17260
  //Create a video element,set the source and add to the container.
17210
17261
  this._setPlayerContent();
17211
17262
  //Set the listeners on the video control buttons.
17212
- this.Tazp();
17263
+ this.tFVB();
17213
17264
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
17214
- this.hitN();
17265
+ this.SbsY();
17215
17266
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
17216
17267
  //Reason - We want to position them at the top right and left positions.
17217
- this.FDtb();
17268
+ this.NmxX();
17218
17269
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
17219
17270
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
17220
17271
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
17221
- this.EILB();
17272
+ this.SJeU();
17222
17273
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
17223
17274
  this._setAutoTerminate();
17224
17275
  document.body.appendChild(this.videoPlayer);
@@ -17284,6 +17335,7 @@
17284
17335
  }, {
17285
17336
  key: "_setPlayerContent",
17286
17337
  value: function _setPlayerContent() {
17338
+ var _window$Apxor;
17287
17339
  // Create video element
17288
17340
  this.videoElement = document.createElement("video");
17289
17341
  this.videoElement.width = this.width;
@@ -17291,6 +17343,9 @@
17291
17343
  this.videoElement.style.objectFit = "fill";
17292
17344
  this.videoElement.controlsList = "nodownload";
17293
17345
  this.videoElement.controls = true;
17346
+ if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
17347
+ this.videoElement.playsInline = true;
17348
+ }
17294
17349
  // By default disable the PIP. This is a hack to remove the default PIP option.
17295
17350
  // We want to have our own PIP button. On click of that button PIP will be enabled.
17296
17351
  this.videoElement.disablePictureInPicture = true;
@@ -17328,7 +17383,7 @@
17328
17383
  }
17329
17384
  }
17330
17385
  this.videoPlayer.remove();
17331
- this.zwkt();
17386
+ this.uSCp();
17332
17387
  if (closeButtonName !== "auto_dismiss") {
17333
17388
  window.Apxor.logAppEvent("apx_video_inapp_close_button_clicked", {
17334
17389
  message_name: this.name,
@@ -17396,7 +17451,7 @@
17396
17451
  replayCount: _this3.replayCount
17397
17452
  });
17398
17453
  _this3.videoPlayer.remove();
17399
- _this3.zwkt();
17454
+ _this3.uSCp();
17400
17455
  _this3.hideCallback();
17401
17456
  } catch (e) {
17402
17457
  console.log("Can't close the video player\n".concat(e));
@@ -17484,14 +17539,14 @@
17484
17539
  var RTM = /*#__PURE__*/_createClass(function RTM() {
17485
17540
  var _this = this;
17486
17541
  _classCallCheck(this, RTM);
17487
- _defineProperty(this, "Ihbh", {});
17542
+ _defineProperty(this, "Lbzn", {});
17488
17543
  _defineProperty(this, "isShowingAction", false);
17489
17544
  _defineProperty(this, "currentAction", null);
17490
- _defineProperty(this, "SzQk", null);
17491
- _defineProperty(this, "version", 41);
17545
+ _defineProperty(this, "slkw", null);
17546
+ _defineProperty(this, "version", 51);
17492
17547
  _defineProperty(this, "isInitialised", false);
17493
17548
  _defineProperty(this, "_eventsInDynamicText", {});
17494
- _defineProperty(this, "WXYo", function () {
17549
+ _defineProperty(this, "YILU", function () {
17495
17550
  _this.isInitialised = true;
17496
17551
  var oldPushState = history.pushState;
17497
17552
  history.pushState = function pushState() {
@@ -17516,7 +17571,7 @@
17516
17571
  });
17517
17572
  _defineProperty(this, "show", function (uiJson, duration, uuid, name) {
17518
17573
  if (!_this.isInitialised) {
17519
- _this.WXYo();
17574
+ _this.YILU();
17520
17575
  }
17521
17576
  window.addEventListener("pagehide", function () {
17522
17577
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -17528,6 +17583,7 @@
17528
17583
  console.error("An action already being shown");
17529
17584
  return;
17530
17585
  }
17586
+ uiJson = uiJson.split("\n").join("\\n");
17531
17587
  var ui_config = JSON.parse(uiJson);
17532
17588
  var terminationConfig = {};
17533
17589
  terminationConfig["auto_dismiss"] = duration > 0;
@@ -17576,15 +17632,28 @@
17576
17632
  }
17577
17633
  });
17578
17634
  _defineProperty(this, "showInApp", function (config, duration, configId, name) {
17579
- if (JSON.parse(config).layout_type === "videos") {
17580
- _this.createInAppVideo(config, duration, configId, name);
17581
- } else if (JSON.parse(config).layout_type === "modal") {
17582
- _this.createInAppModal(config, duration, configId, name);
17635
+ try {
17636
+ config = config.split("\n").join("\\n");
17637
+ if (JSON.parse(config).layout_type === "videos") {
17638
+ _this.createInAppVideo(config, duration, configId, name);
17639
+ } else if (JSON.parse(config).layout_type === "modal") {
17640
+ _this.createInAppModal(config, duration, configId, name);
17641
+ }
17642
+ } catch (e) {
17643
+ var _window$Apxor2;
17644
+ if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
17645
+ var _window5, _window5$updateFlag;
17646
+ (_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, false, "IN_APP");
17647
+ } else {
17648
+ var _window6, _window6$updateFlag;
17649
+ (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$updateFlag = _window6.updateFlag) === null || _window6$updateFlag === void 0 || _window6$updateFlag.call(_window6, "IN_APP", false);
17650
+ }
17651
+ console.error(e);
17583
17652
  }
17584
17653
  });
17585
17654
  _defineProperty(this, "removeAll", function () {
17586
- var _window5, _window5$updateFlag;
17587
- (_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, false);
17655
+ var _window7, _window7$updateFlag;
17656
+ (_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.Apxor) === null || _window7 === void 0 || (_window7$updateFlag = _window7.updateFlag) === null || _window7$updateFlag === void 0 || _window7$updateFlag.call(_window7, false);
17588
17657
  if (_this.currentAction !== null && _this.currentAction !== undefined) {
17589
17658
  _this.isShowingAction = false;
17590
17659
  try {
@@ -17598,34 +17667,34 @@
17598
17667
  var terminationConfig = {};
17599
17668
  terminationConfig["auto_dismiss"] = duration > 0;
17600
17669
  terminationConfig["duration"] = duration;
17601
- _this.SzQk = new InLineTooltip(ui_config, [], [], terminationConfig, {
17670
+ _this.slkw = new InLineTooltip(ui_config, [], [], terminationConfig, {
17602
17671
  configId: uuid,
17603
17672
  configName: name
17604
17673
  }, _this, function () {
17605
17674
  _this.isShowingAction = true;
17606
17675
  if (window.Apxor && window.Apxor.logActionEvent) {
17607
- var _window6, _window6$updateFlag;
17608
- (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$updateFlag = _window6.updateFlag) === null || _window6$updateFlag === void 0 || _window6$updateFlag.call(_window6, true);
17676
+ var _window8, _window8$updateFlag;
17677
+ (_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.Apxor) === null || _window8 === void 0 || (_window8$updateFlag = _window8.updateFlag) === null || _window8$updateFlag === void 0 || _window8$updateFlag.call(_window8, true);
17609
17678
  window.Apxor.logActionEvent("inline_shown", uuid, name);
17610
17679
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
17611
17680
  setTimeout(function () {
17612
- var _window7, _window7$logInternalE;
17613
- (_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");
17681
+ var _window9, _window9$logInternalE;
17682
+ (_window9 = window) === null || _window9 === void 0 || (_window9 = _window9.Apxor) === null || _window9 === void 0 || (_window9$logInternalE = _window9.logInternalEvent) === null || _window9$logInternalE === void 0 || _window9$logInternalE.call(_window9, "capt");
17614
17683
  }, 500);
17615
17684
  }
17616
17685
  }
17617
17686
  }, function (isCancelled) {
17618
- var _window8, _window8$updateFlag;
17687
+ var _window10, _window10$updateFlag;
17619
17688
  _this.isShowingAction = false;
17620
17689
  _this.currentAction = null;
17621
- _this.SzQk = null;
17622
- (_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.Apxor) === null || _window8 === void 0 || (_window8$updateFlag = _window8.updateFlag) === null || _window8$updateFlag === void 0 || _window8$updateFlag.call(_window8, false);
17690
+ _this.slkw = null;
17691
+ (_window10 = window) === null || _window10 === void 0 || (_window10 = _window10.Apxor) === null || _window10 === void 0 || (_window10$updateFlag = _window10.updateFlag) === null || _window10$updateFlag === void 0 || _window10$updateFlag.call(_window10, false);
17623
17692
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
17624
17693
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
17625
17694
  }
17626
17695
  }, function () {}, false, 0);
17627
17696
  setTimeout(function () {
17628
- _this.SzQk.createNewTooltip();
17697
+ _this.slkw.createNewTooltip();
17629
17698
  }, ui_config.delay);
17630
17699
  });
17631
17700
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -17642,20 +17711,20 @@
17642
17711
  var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
17643
17712
  _this.isShowingAction = true;
17644
17713
  if (window.Apxor && window.Apxor.logActionEvent) {
17645
- var _window9, _window9$updateFlag;
17646
- (_window9 = window) === null || _window9 === void 0 || (_window9 = _window9.Apxor) === null || _window9 === void 0 || (_window9$updateFlag = _window9.updateFlag) === null || _window9$updateFlag === void 0 || _window9$updateFlag.call(_window9, true);
17714
+ var _window11, _window11$updateFlag;
17715
+ (_window11 = window) === null || _window11 === void 0 || (_window11 = _window11.Apxor) === null || _window11 === void 0 || (_window11$updateFlag = _window11.updateFlag) === null || _window11$updateFlag === void 0 || _window11$updateFlag.call(_window11, true);
17647
17716
  window.Apxor.logActionEvent("inapp_shown", configId, name);
17648
17717
  }
17649
17718
  }, function () {
17650
- var _window10, _window10$updateFlag;
17719
+ var _window12, _window12$updateFlag;
17651
17720
  _this.isShowingAction = false;
17652
17721
  _this.currentAction = null;
17653
- (_window10 = window) === null || _window10 === void 0 || (_window10 = _window10.Apxor) === null || _window10 === void 0 || (_window10$updateFlag = _window10.updateFlag) === null || _window10$updateFlag === void 0 || _window10$updateFlag.call(_window10, false);
17722
+ (_window12 = window) === null || _window12 === void 0 || (_window12 = _window12.Apxor) === null || _window12 === void 0 || (_window12$updateFlag = _window12.updateFlag) === null || _window12$updateFlag === void 0 || _window12$updateFlag.call(_window12, false);
17654
17723
  if (window.Apxor && window.Apxor.logActionEvent) {
17655
17724
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);
17656
17725
  }
17657
17726
  });
17658
- VideoInAppInstance.UOWB();
17727
+ VideoInAppInstance.CXVQ();
17659
17728
  });
17660
17729
  /**
17661
17730
  * Creates a modal for the given config and displays it.
@@ -17674,12 +17743,18 @@
17674
17743
  var inappModal = new ModalInApp(config, terminationConfig, configId, name, function () {
17675
17744
  _this.isShowingAction = true;
17676
17745
  if (window.Apxor && window.Apxor.logActionEvent) {
17677
- var _window11, _window11$updateFlag;
17678
- (_window11 = window) === null || _window11 === void 0 || (_window11 = _window11.Apxor) === null || _window11 === void 0 || (_window11$updateFlag = _window11.updateFlag) === null || _window11$updateFlag === void 0 || _window11$updateFlag.call(_window11, "IN_APP", true);
17746
+ var _window$Apxor3;
17747
+ if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
17748
+ var _window13, _window13$updateFlag;
17749
+ (_window13 = window) === null || _window13 === void 0 || (_window13 = _window13.Apxor) === null || _window13 === void 0 || (_window13$updateFlag = _window13.updateFlag) === null || _window13$updateFlag === void 0 || _window13$updateFlag.call(_window13, true, "IN_APP");
17750
+ } else {
17751
+ var _window14, _window14$updateFlag;
17752
+ (_window14 = window) === null || _window14 === void 0 || (_window14 = _window14.Apxor) === null || _window14 === void 0 || (_window14$updateFlag = _window14.updateFlag) === null || _window14$updateFlag === void 0 || _window14$updateFlag.call(_window14, "IN_APP", true);
17753
+ }
17679
17754
  window.Apxor.logActionEvent("inapp_shown", configId, name);
17680
17755
  }
17681
17756
  }, function (backgroundDiv, action) {
17682
- var _dialogContent$classL, _window12, _window12$updateFlag;
17757
+ var _dialogContent$classL, _window$Apxor4;
17683
17758
  var cssClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ".apx-dlg-c";
17684
17759
  var closeListener = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
17685
17760
  var redirectionListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
@@ -17690,7 +17765,13 @@
17690
17765
  // setTimeout(() => {
17691
17766
  backgroundDiv.remove();
17692
17767
  _this.isShowingAction = false;
17693
- (_window12 = window) === null || _window12 === void 0 || (_window12 = _window12.Apxor) === null || _window12 === void 0 || (_window12$updateFlag = _window12.updateFlag) === null || _window12$updateFlag === void 0 || _window12$updateFlag.call(_window12, "IN_APP", false);
17768
+ if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
17769
+ var _window15, _window15$updateFlag;
17770
+ (_window15 = window) === null || _window15 === void 0 || (_window15 = _window15.Apxor) === null || _window15 === void 0 || (_window15$updateFlag = _window15.updateFlag) === null || _window15$updateFlag === void 0 || _window15$updateFlag.call(_window15, false, "IN_APP");
17771
+ } else {
17772
+ var _window16, _window16$updateFlag;
17773
+ (_window16 = window) === null || _window16 === void 0 || (_window16 = _window16.Apxor) === null || _window16 === void 0 || (_window16$updateFlag = _window16.updateFlag) === null || _window16$updateFlag === void 0 || _window16$updateFlag.call(_window16, "IN_APP", false);
17774
+ }
17694
17775
  _this.currentAction = null;
17695
17776
  if (window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
17696
17777
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);