apxor-rtm-ui 0.8.3 → 0.9.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.
- package/dist/apxor.rtm.js.bak +1689 -220
- package/dist/apxor.rtm.min.js +6 -6
- package/package.json +1 -1
package/dist/apxor.rtm.js.bak
CHANGED
|
@@ -7877,6 +7877,28 @@
|
|
|
7877
7877
|
var getSlotNumberByPosition = function getSlotNumberByPosition(position) {
|
|
7878
7878
|
if (position === "left") return 1;else if (position === "center") return 3;else return 5;
|
|
7879
7879
|
};
|
|
7880
|
+
var collapseSpaces = function collapseSpaces(text) {
|
|
7881
|
+
return text.replace(/\s+/g, " ");
|
|
7882
|
+
};
|
|
7883
|
+
var contentBasedSearch = function contentBasedSearch(element, type, op, content) {
|
|
7884
|
+
var _content;
|
|
7885
|
+
var innerText = element.innerText.trim().toLowerCase();
|
|
7886
|
+
innerText = collapseSpaces(innerText);
|
|
7887
|
+
content = (_content = content) === null || _content === void 0 ? void 0 : _content.trim().toLowerCase();
|
|
7888
|
+
content = collapseSpaces(content);
|
|
7889
|
+
if (type === "s") {
|
|
7890
|
+
switch (op) {
|
|
7891
|
+
case "CONTAINS":
|
|
7892
|
+
return innerText.includes(content);
|
|
7893
|
+
case "EQ":
|
|
7894
|
+
return innerText === content;
|
|
7895
|
+
default:
|
|
7896
|
+
return false;
|
|
7897
|
+
}
|
|
7898
|
+
} else {
|
|
7899
|
+
return false;
|
|
7900
|
+
}
|
|
7901
|
+
};
|
|
7880
7902
|
|
|
7881
7903
|
/**
|
|
7882
7904
|
* @function getElementFromSelector
|
|
@@ -7886,7 +7908,38 @@
|
|
|
7886
7908
|
*/
|
|
7887
7909
|
var getElementFromSelector = function getElementFromSelector(selector) {
|
|
7888
7910
|
var iframe_id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
7911
|
+
var find_config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
7912
|
+
var view_additional_info = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
7889
7913
|
// Given selector can be an ID.
|
|
7914
|
+
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
|
+
var _elements_list;
|
|
7916
|
+
var elements_list = document.querySelectorAll("[id=\"".concat(selector, "\"]"));
|
|
7917
|
+
if (elements_list.length === 0) {
|
|
7918
|
+
elements_list = document.querySelectorAll(selector);
|
|
7919
|
+
}
|
|
7920
|
+
if (((_elements_list = elements_list) === null || _elements_list === void 0 ? void 0 : _elements_list.length) > 0) {
|
|
7921
|
+
var element_satisfied_list = [];
|
|
7922
|
+
for (var i = 0; i < elements_list.length; i++) {
|
|
7923
|
+
var element_found_based_on_content = contentBasedSearch(elements_list[i], find_config.eval.t, find_config.eval.op, find_config.eval.val);
|
|
7924
|
+
if (element_found_based_on_content) {
|
|
7925
|
+
element_satisfied_list.push(elements_list[i]);
|
|
7926
|
+
element = element_satisfied_list[0];
|
|
7927
|
+
}
|
|
7928
|
+
}
|
|
7929
|
+
var content = view_additional_info === null || view_additional_info === void 0 ? void 0 : view_additional_info.content;
|
|
7930
|
+
} else {
|
|
7931
|
+
elements_list = document.querySelectorAll("*");
|
|
7932
|
+
for (var _i = 0; _i < elements_list.length; _i++) {
|
|
7933
|
+
var _element_found_based_on_content = contentBasedSearch(elements_list[_i], find_config.eval.t, find_config.eval.op, find_config.eval.val);
|
|
7934
|
+
if (_element_found_based_on_content) {
|
|
7935
|
+
element = elements_list[_i];
|
|
7936
|
+
}
|
|
7937
|
+
}
|
|
7938
|
+
}
|
|
7939
|
+
if (element) {
|
|
7940
|
+
return element;
|
|
7941
|
+
}
|
|
7942
|
+
}
|
|
7890
7943
|
var element = document.getElementById(selector);
|
|
7891
7944
|
if (!element) {
|
|
7892
7945
|
try {
|
|
@@ -12119,14 +12172,14 @@
|
|
|
12119
12172
|
_config$wait_interval,
|
|
12120
12173
|
_config$termination;
|
|
12121
12174
|
_classCallCheck(this, TemplateContent);
|
|
12122
|
-
_defineProperty(this, "
|
|
12175
|
+
_defineProperty(this, "YyDb", function () {
|
|
12123
12176
|
return new Promise(function (resolve, reject) {
|
|
12124
12177
|
try {
|
|
12125
|
-
var element = _this.
|
|
12178
|
+
var element = _this.tmRn(_this.layout);
|
|
12126
12179
|
var styleElement = document.createElement("style");
|
|
12127
12180
|
styleElement.innerHTML = _this.styleContent;
|
|
12128
12181
|
document.head.appendChild(styleElement);
|
|
12129
|
-
_this.
|
|
12182
|
+
_this.qYHJ();
|
|
12130
12183
|
try {
|
|
12131
12184
|
eval(_this.script);
|
|
12132
12185
|
} catch (e) {
|
|
@@ -12137,15 +12190,15 @@
|
|
|
12137
12190
|
}
|
|
12138
12191
|
_this.imageElements.forEach(function (img) {
|
|
12139
12192
|
img.addEventListener("error", function () {
|
|
12140
|
-
_this.
|
|
12193
|
+
_this.woit("provided image doesn't exists");
|
|
12141
12194
|
});
|
|
12142
12195
|
});
|
|
12143
12196
|
_this.intervalToCheckMediaLoadingStatus = setInterval(function () {
|
|
12144
12197
|
_this.wait_interval -= 1;
|
|
12145
12198
|
if (_this.wait_interval <= 0) {
|
|
12146
|
-
_this.
|
|
12199
|
+
_this.woit("provided media doesn't exists");
|
|
12147
12200
|
} else {
|
|
12148
|
-
if (_this.
|
|
12201
|
+
if (_this.xbQr() && _this.fqDl() && _this.uTAP()) {
|
|
12149
12202
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
12150
12203
|
resolve(element);
|
|
12151
12204
|
}
|
|
@@ -12159,7 +12212,7 @@
|
|
|
12159
12212
|
}
|
|
12160
12213
|
});
|
|
12161
12214
|
});
|
|
12162
|
-
_defineProperty(this, "
|
|
12215
|
+
_defineProperty(this, "woit", function (reason) {
|
|
12163
12216
|
var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
|
|
12164
12217
|
!_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
|
|
12165
12218
|
apx_nudge_name: _this.name,
|
|
@@ -12175,13 +12228,13 @@
|
|
|
12175
12228
|
_this.closeCallBack("cancel");
|
|
12176
12229
|
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
|
|
12177
12230
|
});
|
|
12178
|
-
_defineProperty(this, "
|
|
12231
|
+
_defineProperty(this, "qYHJ", function () {
|
|
12179
12232
|
var BuilderTemplatesStyles = document.createElement("style");
|
|
12180
12233
|
BuilderTemplatesStyles.innerHTML = _this.initialStyles;
|
|
12181
12234
|
BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
|
|
12182
12235
|
document.head.appendChild(BuilderTemplatesStyles);
|
|
12183
12236
|
});
|
|
12184
|
-
_defineProperty(this, "
|
|
12237
|
+
_defineProperty(this, "tmRn", function (config) {
|
|
12185
12238
|
var _window$Apxor3;
|
|
12186
12239
|
var element;
|
|
12187
12240
|
switch (config.type) {
|
|
@@ -12265,7 +12318,7 @@
|
|
|
12265
12318
|
if (config.type === "cta_button" || config.type === "button") {
|
|
12266
12319
|
reason = "cta-clicked";
|
|
12267
12320
|
}
|
|
12268
|
-
_this.
|
|
12321
|
+
_this.mPVm(e, "redirect", reason);
|
|
12269
12322
|
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) {
|
|
12270
12323
|
var _window4, _this$config8;
|
|
12271
12324
|
(_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);
|
|
@@ -12281,7 +12334,7 @@
|
|
|
12281
12334
|
} else if (config.type === "cta_button" || config.type === "button") {
|
|
12282
12335
|
reason = "cta-clicked";
|
|
12283
12336
|
}
|
|
12284
|
-
_this.
|
|
12337
|
+
_this.mPVm(e, "cancel", reason);
|
|
12285
12338
|
// window.Apxor.logActionEvent(
|
|
12286
12339
|
// "walk_through_cancelled",
|
|
12287
12340
|
// this.configId,
|
|
@@ -12300,7 +12353,7 @@
|
|
|
12300
12353
|
} else if (config.type === "cta_button" || config.type === "button") {
|
|
12301
12354
|
reason = "cta-clicked";
|
|
12302
12355
|
}
|
|
12303
|
-
_this.
|
|
12356
|
+
_this.mPVm(e, "dismiss", reason);
|
|
12304
12357
|
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) {
|
|
12305
12358
|
var _window5, _this$config10;
|
|
12306
12359
|
(_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);
|
|
@@ -12311,7 +12364,7 @@
|
|
|
12311
12364
|
element.onclick = function (e) {
|
|
12312
12365
|
e.stopPropagation();
|
|
12313
12366
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
12314
|
-
_this.
|
|
12367
|
+
_this.mPVm(e, "never");
|
|
12315
12368
|
};
|
|
12316
12369
|
break;
|
|
12317
12370
|
case "toggle-class":
|
|
@@ -12336,7 +12389,7 @@
|
|
|
12336
12389
|
tempInput.select();
|
|
12337
12390
|
document.execCommand("copy");
|
|
12338
12391
|
document.body.removeChild(tempInput);
|
|
12339
|
-
_this.
|
|
12392
|
+
_this.mPVm(e, "copy-content", "cta-clicked");
|
|
12340
12393
|
setTimeout(function () {
|
|
12341
12394
|
window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
|
|
12342
12395
|
}, 500);
|
|
@@ -12358,7 +12411,7 @@
|
|
|
12358
12411
|
}
|
|
12359
12412
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
12360
12413
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
12361
|
-
var childElement = _this.
|
|
12414
|
+
var childElement = _this.tmRn(childConfig);
|
|
12362
12415
|
element.appendChild(childElement);
|
|
12363
12416
|
});
|
|
12364
12417
|
}
|
|
@@ -12366,7 +12419,7 @@
|
|
|
12366
12419
|
// Process children
|
|
12367
12420
|
if (config.children && config.children.length > 0) {
|
|
12368
12421
|
config.children.forEach(function (childConfig) {
|
|
12369
|
-
var childElement = _this.
|
|
12422
|
+
var childElement = _this.tmRn(childConfig);
|
|
12370
12423
|
element.appendChild(childElement);
|
|
12371
12424
|
});
|
|
12372
12425
|
}
|
|
@@ -12393,7 +12446,7 @@
|
|
|
12393
12446
|
}
|
|
12394
12447
|
return element;
|
|
12395
12448
|
});
|
|
12396
|
-
_defineProperty(this, "
|
|
12449
|
+
_defineProperty(this, "mPVm", function (e, action) {
|
|
12397
12450
|
var _window$Apxor4, _this$config11, _this$config12, _window$Apxor5, _this$config13, _this$config14, _this$config15, _this$config16;
|
|
12398
12451
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
12399
12452
|
var additional_info = {
|
|
@@ -12422,7 +12475,7 @@
|
|
|
12422
12475
|
_this.closeCallBack(action);
|
|
12423
12476
|
}
|
|
12424
12477
|
});
|
|
12425
|
-
_defineProperty(this, "
|
|
12478
|
+
_defineProperty(this, "fqDl", function () {
|
|
12426
12479
|
//This logic is to make sure that image has loaded, it doesn't check whether image is broken
|
|
12427
12480
|
//refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
|
|
12428
12481
|
if (_this.imageElements.length === 0) return true;
|
|
@@ -12430,13 +12483,13 @@
|
|
|
12430
12483
|
return img.complete;
|
|
12431
12484
|
});
|
|
12432
12485
|
});
|
|
12433
|
-
_defineProperty(this, "
|
|
12486
|
+
_defineProperty(this, "uTAP", function () {
|
|
12434
12487
|
if (!_this.bgImageUrl) return true;
|
|
12435
12488
|
var img = new Image();
|
|
12436
12489
|
img.src = _this.bgImageUrl;
|
|
12437
12490
|
return img.complete;
|
|
12438
12491
|
});
|
|
12439
|
-
_defineProperty(this, "
|
|
12492
|
+
_defineProperty(this, "xbQr", function () {
|
|
12440
12493
|
if (_this.videoElements.length === 0) return true;
|
|
12441
12494
|
return _this.videoElements.every(function (video) {
|
|
12442
12495
|
return video.readyState >= 3;
|
|
@@ -12703,6 +12756,8 @@
|
|
|
12703
12756
|
_classCallCheck(this, Offset);
|
|
12704
12757
|
this.skid = getNumberOrDefault(data === null || data === void 0 ? void 0 : data.skid, 0);
|
|
12705
12758
|
this.distance = getNumberOrDefault(data === null || data === void 0 ? void 0 : data.distance, 0);
|
|
12759
|
+
this.x = getNumberOrDefault(data === null || data === void 0 ? void 0 : data.x, 0);
|
|
12760
|
+
this.y = getNumberOrDefault(data === null || data === void 0 ? void 0 : data.y, 0);
|
|
12706
12761
|
});
|
|
12707
12762
|
|
|
12708
12763
|
/**
|
|
@@ -12725,7 +12780,7 @@
|
|
|
12725
12780
|
var Position = /*#__PURE__*/_createClass(function Position() {
|
|
12726
12781
|
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12727
12782
|
_classCallCheck(this, Position);
|
|
12728
|
-
this.position = getStringOrDefault(data === null || data === void 0 ? void 0 : data.position, "top-left").toLowerCase();
|
|
12783
|
+
this.position = getStringOrDefault(convertThePositionCode(data === null || data === void 0 ? void 0 : data.position), "top-left").toLowerCase();
|
|
12729
12784
|
this.enable_offset = data.enable_offset;
|
|
12730
12785
|
this.offset = new Offset(data.offset);
|
|
12731
12786
|
});
|
|
@@ -13370,7 +13425,7 @@
|
|
|
13370
13425
|
case 0:
|
|
13371
13426
|
_context2.prev = 0;
|
|
13372
13427
|
_context2.next = 3;
|
|
13373
|
-
return this.templateContent.
|
|
13428
|
+
return this.templateContent.YyDb();
|
|
13374
13429
|
case 3:
|
|
13375
13430
|
this.inLineContainer = _context2.sent;
|
|
13376
13431
|
_context2.next = 9;
|
|
@@ -13894,6 +13949,7 @@
|
|
|
13894
13949
|
this.enable_border = data.enable_border;
|
|
13895
13950
|
this.border = new Border(data.border);
|
|
13896
13951
|
this.alignment = getStringOrDefault(data.alignment, CENTER);
|
|
13952
|
+
this.position = getStringOrDefault(data.position, "right");
|
|
13897
13953
|
}
|
|
13898
13954
|
_createClass(Icon, null, [{
|
|
13899
13955
|
key: "isEnabled",
|
|
@@ -14946,7 +15002,7 @@
|
|
|
14946
15002
|
* @description Creates the styles for Marketing message.
|
|
14947
15003
|
* @returns {string} css styles
|
|
14948
15004
|
*/
|
|
14949
|
-
_defineProperty(this, "
|
|
15005
|
+
_defineProperty(this, "fPEj", function () {
|
|
14950
15006
|
if (!_this.enable_marketing) {
|
|
14951
15007
|
return "";
|
|
14952
15008
|
}
|
|
@@ -14965,7 +15021,7 @@
|
|
|
14965
15021
|
* @private
|
|
14966
15022
|
* @description Sets the marketing content at the end of the Inline
|
|
14967
15023
|
*/
|
|
14968
|
-
_defineProperty(this, "
|
|
15024
|
+
_defineProperty(this, "VoOg", function () {
|
|
14969
15025
|
if (_this.enable_marketing) {
|
|
14970
15026
|
var marketingContainer = document.createElement("div");
|
|
14971
15027
|
marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
|
|
@@ -15006,6 +15062,8 @@
|
|
|
15006
15062
|
this.interactive_border = config.interactive_border || 10; // Determines the invisible border around the tippy that will prevent it from hiding if the cursorleft it
|
|
15007
15063
|
|
|
15008
15064
|
this.target = new Target$1(config.target);
|
|
15065
|
+
this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
|
|
15066
|
+
this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
|
|
15009
15067
|
this.elementHighlighter = new ElementHighlighter(config.highlighter);
|
|
15010
15068
|
this.direction = new Direction(config.direction);
|
|
15011
15069
|
this.position = new Position(config.position);
|
|
@@ -15192,7 +15250,7 @@
|
|
|
15192
15250
|
}, {
|
|
15193
15251
|
key: "_findTargetElement",
|
|
15194
15252
|
value: function _findTargetElement(targetFoundCallback) {
|
|
15195
|
-
this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id);
|
|
15253
|
+
this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id, this.find_config, this.view_additional_info);
|
|
15196
15254
|
if (!this.targetElement) {
|
|
15197
15255
|
if (this.target.enable_retry) {
|
|
15198
15256
|
console.info("Not found yet. Rechecking the DOM.");
|
|
@@ -15394,7 +15452,6 @@
|
|
|
15394
15452
|
_this5.scrollCompletelyInViewCount--;
|
|
15395
15453
|
var is_element_covered = isElementCovered(_this5.targetElement);
|
|
15396
15454
|
if (isElementCompletlyInView(_this5.targetElement) && !is_element_covered) {
|
|
15397
|
-
console.log("is completely in view");
|
|
15398
15455
|
targetReachedCallback();
|
|
15399
15456
|
isscrolled = true;
|
|
15400
15457
|
clearInterval(_this5.scrollCompletelyInViewCount);
|
|
@@ -15577,7 +15634,7 @@
|
|
|
15577
15634
|
if (apxor_tooltip_styles) {
|
|
15578
15635
|
return;
|
|
15579
15636
|
}
|
|
15580
|
-
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.
|
|
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, "");
|
|
15581
15638
|
var styleNode = document.createElement("style");
|
|
15582
15639
|
styleNode.setAttribute("apx-tooltip-styles", "");
|
|
15583
15640
|
styleNode.innerHTML = styles;
|
|
@@ -16387,7 +16444,7 @@
|
|
|
16387
16444
|
this._setCloseButton();
|
|
16388
16445
|
|
|
16389
16446
|
//Set the Marketing content
|
|
16390
|
-
this.
|
|
16447
|
+
this.VoOg();
|
|
16391
16448
|
}
|
|
16392
16449
|
|
|
16393
16450
|
/**
|
|
@@ -19282,7 +19339,7 @@
|
|
|
19282
19339
|
case 0:
|
|
19283
19340
|
_context2.prev = 0;
|
|
19284
19341
|
_context2.next = 3;
|
|
19285
|
-
return this.templateContent.
|
|
19342
|
+
return this.templateContent.YyDb();
|
|
19286
19343
|
case 3:
|
|
19287
19344
|
this.inAppContainer = _context2.sent;
|
|
19288
19345
|
this.inAppContainer.style.zIndex = 99999;
|
|
@@ -19481,7 +19538,7 @@
|
|
|
19481
19538
|
* @description Creates the styles for Marketing message.
|
|
19482
19539
|
* @returns {string} css styles
|
|
19483
19540
|
*/
|
|
19484
|
-
_defineProperty(this, "
|
|
19541
|
+
_defineProperty(this, "fPEj", function () {
|
|
19485
19542
|
if (!_this.enable_marketing) {
|
|
19486
19543
|
return "";
|
|
19487
19544
|
}
|
|
@@ -19527,7 +19584,7 @@
|
|
|
19527
19584
|
* @private
|
|
19528
19585
|
* @description Get the response for Form content in the InApp modal.
|
|
19529
19586
|
*/
|
|
19530
|
-
_defineProperty(this, "
|
|
19587
|
+
_defineProperty(this, "bINs", function (form_elements) {
|
|
19531
19588
|
var obj = {};
|
|
19532
19589
|
var callback = "";
|
|
19533
19590
|
form_elements.forEach(function (element) {
|
|
@@ -19567,7 +19624,7 @@
|
|
|
19567
19624
|
* @private
|
|
19568
19625
|
* @description Sets the marketing content at the end of the InApp
|
|
19569
19626
|
*/
|
|
19570
|
-
_defineProperty(this, "
|
|
19627
|
+
_defineProperty(this, "VoOg", function () {
|
|
19571
19628
|
if (_this.enable_marketing) {
|
|
19572
19629
|
var marketingContainer = document.createElement("div");
|
|
19573
19630
|
marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
|
|
@@ -19826,7 +19883,7 @@
|
|
|
19826
19883
|
}, {
|
|
19827
19884
|
key: "_setStyles",
|
|
19828
19885
|
value: function _setStyles() {
|
|
19829
|
-
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.
|
|
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, "");
|
|
19830
19887
|
var styleNode = document.createElement("style");
|
|
19831
19888
|
styleNode.setAttribute("id", "apxor-style-" + this.configId);
|
|
19832
19889
|
styleNode.innerHTML = styles;
|
|
@@ -20325,7 +20382,7 @@
|
|
|
20325
20382
|
this._setCloseButton();
|
|
20326
20383
|
|
|
20327
20384
|
//Set the Marketing content
|
|
20328
|
-
this.
|
|
20385
|
+
this.VoOg();
|
|
20329
20386
|
}
|
|
20330
20387
|
|
|
20331
20388
|
/**
|
|
@@ -20607,7 +20664,7 @@
|
|
|
20607
20664
|
var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
|
|
20608
20665
|
form.addEventListener("submit", function (e) {
|
|
20609
20666
|
e.preventDefault();
|
|
20610
|
-
var _this8$generateRespon = _this8.
|
|
20667
|
+
var _this8$generateRespon = _this8.bINs(_this8.form.elements),
|
|
20611
20668
|
obj = _this8$generateRespon.obj,
|
|
20612
20669
|
callback = _this8$generateRespon.callback;
|
|
20613
20670
|
var evalString = "(obj)=>" + callback + "(obj)";
|
|
@@ -20967,7 +21024,7 @@
|
|
|
20967
21024
|
};
|
|
20968
21025
|
} else {
|
|
20969
21026
|
// As the video player is hidden by default, unhide if the mode is not PIP.
|
|
20970
|
-
_this.
|
|
21027
|
+
_this.RFlT();
|
|
20971
21028
|
}
|
|
20972
21029
|
_this.showCallback();
|
|
20973
21030
|
} catch (e) {
|
|
@@ -20988,7 +21045,7 @@
|
|
|
20988
21045
|
* For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
|
|
20989
21046
|
* For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
|
|
20990
21047
|
*/
|
|
20991
|
-
_defineProperty(this, "
|
|
21048
|
+
_defineProperty(this, "DcxS", function () {
|
|
20992
21049
|
var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
|
|
20993
21050
|
width = _getHeightWidthFromRe.width,
|
|
20994
21051
|
height = _getHeightWidthFromRe.height;
|
|
@@ -21000,7 +21057,7 @@
|
|
|
21000
21057
|
* @private
|
|
21001
21058
|
* @description Removes the video player style element.
|
|
21002
21059
|
*/
|
|
21003
|
-
_defineProperty(this, "
|
|
21060
|
+
_defineProperty(this, "EHdv", function () {
|
|
21004
21061
|
var playerStyles = document.getElementById("apx-mpl-styles");
|
|
21005
21062
|
if (playerStyles) {
|
|
21006
21063
|
playerStyles.remove();
|
|
@@ -21011,7 +21068,7 @@
|
|
|
21011
21068
|
* @private
|
|
21012
21069
|
* @description Attach listeners on the video controls
|
|
21013
21070
|
*/
|
|
21014
|
-
_defineProperty(this, "
|
|
21071
|
+
_defineProperty(this, "MsLs", function () {
|
|
21015
21072
|
// Listener for the video end. Display the CTA's when the video ends.
|
|
21016
21073
|
_this.videoElement.addEventListener("ended", function () {
|
|
21017
21074
|
var ctaButtons = document.getElementById("apx-cta-btn");
|
|
@@ -21126,7 +21183,7 @@
|
|
|
21126
21183
|
* @private
|
|
21127
21184
|
* @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
21128
21185
|
*/
|
|
21129
|
-
_defineProperty(this, "
|
|
21186
|
+
_defineProperty(this, "drXm", function () {
|
|
21130
21187
|
var _this$terminationConf;
|
|
21131
21188
|
if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
|
|
21132
21189
|
// On Exit of the PIP,
|
|
@@ -21166,7 +21223,7 @@
|
|
|
21166
21223
|
* @private Sets the custom controls on the video player.
|
|
21167
21224
|
* PIP and close are the custom controls that are created and positions on the video.
|
|
21168
21225
|
*/
|
|
21169
|
-
_defineProperty(this, "
|
|
21226
|
+
_defineProperty(this, "iXXi", function () {
|
|
21170
21227
|
_this.enable_close_button;
|
|
21171
21228
|
if (_this.enable_close_button) {
|
|
21172
21229
|
var closeButton = document.createElement("span");
|
|
@@ -21213,21 +21270,21 @@
|
|
|
21213
21270
|
* @function hideVideoPlayer
|
|
21214
21271
|
* @description Sets the visibility of the video player to hidden.
|
|
21215
21272
|
*/
|
|
21216
|
-
_defineProperty(this, "
|
|
21273
|
+
_defineProperty(this, "sbcq", function () {
|
|
21217
21274
|
_this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
21218
21275
|
});
|
|
21219
21276
|
/**
|
|
21220
21277
|
* @function unhideVideoPlayer
|
|
21221
21278
|
* @description Unhides video player.
|
|
21222
21279
|
*/
|
|
21223
|
-
_defineProperty(this, "
|
|
21280
|
+
_defineProperty(this, "RFlT", function () {
|
|
21224
21281
|
_this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
21225
21282
|
});
|
|
21226
21283
|
/**
|
|
21227
21284
|
* @function getVideoElement
|
|
21228
21285
|
* @returns {HTMLElement} Video ekement
|
|
21229
21286
|
*/
|
|
21230
|
-
_defineProperty(this, "
|
|
21287
|
+
_defineProperty(this, "gkcW", function () {
|
|
21231
21288
|
return _this.videoElement;
|
|
21232
21289
|
});
|
|
21233
21290
|
this.videoPlayer = null;
|
|
@@ -21281,7 +21338,7 @@
|
|
|
21281
21338
|
this.videoPlayer.style.backgroundColor = this.bg_color;
|
|
21282
21339
|
|
|
21283
21340
|
// Video has a resolution, not deviating from the resolution set the height and width.
|
|
21284
|
-
this.
|
|
21341
|
+
this.DcxS();
|
|
21285
21342
|
//Generate the styles and add them to the document head.
|
|
21286
21343
|
this._setVideoPlayerStyles();
|
|
21287
21344
|
//Set the position of the video player with in the 5 possible positions.
|
|
@@ -21289,16 +21346,16 @@
|
|
|
21289
21346
|
//Create a video element,set the source and add to the container.
|
|
21290
21347
|
this._setPlayerContent();
|
|
21291
21348
|
//Set the listeners on the video control buttons.
|
|
21292
|
-
this.
|
|
21349
|
+
this.MsLs();
|
|
21293
21350
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
21294
|
-
this.
|
|
21351
|
+
this.drXm();
|
|
21295
21352
|
//Set the custom close and PIP controls. Not using the defaults from the html video element.
|
|
21296
21353
|
//Reason - We want to position them at the top right and left positions.
|
|
21297
|
-
this.
|
|
21354
|
+
this.iXXi();
|
|
21298
21355
|
//Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
|
|
21299
21356
|
this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
|
|
21300
21357
|
//Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
|
|
21301
|
-
this.
|
|
21358
|
+
this.sbcq();
|
|
21302
21359
|
//If the auto dismiss is enabled, sets the timeout to call the InApp close.
|
|
21303
21360
|
this._setAutoTerminate();
|
|
21304
21361
|
document.body.appendChild(this.videoPlayer);
|
|
@@ -21413,7 +21470,7 @@
|
|
|
21413
21470
|
}
|
|
21414
21471
|
}
|
|
21415
21472
|
this.videoPlayer.remove();
|
|
21416
|
-
this.
|
|
21473
|
+
this.EHdv();
|
|
21417
21474
|
if (closeButtonName !== "auto_dismiss") {
|
|
21418
21475
|
var _window$ApxorRTM9;
|
|
21419
21476
|
(_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_video_inapp_close_button_clicked", {
|
|
@@ -21483,7 +21540,7 @@
|
|
|
21483
21540
|
replayCount: _this3.replayCount
|
|
21484
21541
|
});
|
|
21485
21542
|
_this3.videoPlayer.remove();
|
|
21486
|
-
_this3.
|
|
21543
|
+
_this3.EHdv();
|
|
21487
21544
|
_this3.hideCallback();
|
|
21488
21545
|
} catch (e) {
|
|
21489
21546
|
console.log("Can't close the video player\n".concat(e));
|
|
@@ -21577,14 +21634,14 @@
|
|
|
21577
21634
|
try {
|
|
21578
21635
|
var _window;
|
|
21579
21636
|
(_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
|
|
21580
|
-
var element = _this.
|
|
21581
|
-
_this.
|
|
21637
|
+
var element = _this.LJbh(_this.layout);
|
|
21638
|
+
_this.RUIz();
|
|
21582
21639
|
window.onresize = function () {
|
|
21583
|
-
_this.
|
|
21640
|
+
_this.gwwj();
|
|
21584
21641
|
};
|
|
21585
21642
|
_this.imageElements.forEach(function (img) {
|
|
21586
21643
|
img.addEventListener("error", function () {
|
|
21587
|
-
_this.
|
|
21644
|
+
_this.woit("provided image doesn't exists");
|
|
21588
21645
|
});
|
|
21589
21646
|
});
|
|
21590
21647
|
var rootContainer = document.createElement("div");
|
|
@@ -21595,7 +21652,7 @@
|
|
|
21595
21652
|
var styleElement = document.createElement("style");
|
|
21596
21653
|
styleElement.innerHTML = _this.styleContent;
|
|
21597
21654
|
document.head.appendChild(styleElement);
|
|
21598
|
-
_this.
|
|
21655
|
+
_this.JoIM(_this.termination);
|
|
21599
21656
|
try {
|
|
21600
21657
|
eval(_this.script);
|
|
21601
21658
|
} catch (e) {
|
|
@@ -21606,10 +21663,10 @@
|
|
|
21606
21663
|
_this.intervalToCheckMediaLoadingStatus = setInterval(function () {
|
|
21607
21664
|
_this.wait_interval -= 1;
|
|
21608
21665
|
if (_this.wait_interval <= 0) {
|
|
21609
|
-
_this.
|
|
21666
|
+
_this.woit("provided media doesn't exists");
|
|
21610
21667
|
} else {
|
|
21611
|
-
if (_this.
|
|
21612
|
-
_this.
|
|
21668
|
+
if (_this.xbQr() && _this.fqDl() && _this.uTAP()) {
|
|
21669
|
+
_this.gwwj();
|
|
21613
21670
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
21614
21671
|
}
|
|
21615
21672
|
}
|
|
@@ -21620,7 +21677,7 @@
|
|
|
21620
21677
|
(_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));
|
|
21621
21678
|
}
|
|
21622
21679
|
});
|
|
21623
|
-
_defineProperty(this, "
|
|
21680
|
+
_defineProperty(this, "woit", function (reason) {
|
|
21624
21681
|
var _window$ApxorRTM, _window4;
|
|
21625
21682
|
!_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
|
|
21626
21683
|
apx_nudge_name: _this.name,
|
|
@@ -21634,13 +21691,13 @@
|
|
|
21634
21691
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
21635
21692
|
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
|
|
21636
21693
|
});
|
|
21637
|
-
_defineProperty(this, "
|
|
21694
|
+
_defineProperty(this, "RUIz", function () {
|
|
21638
21695
|
var EmbeddedCardsStyles = document.createElement("style");
|
|
21639
21696
|
EmbeddedCardsStyles.innerHTML = _this.initialStyles;
|
|
21640
21697
|
EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
|
|
21641
21698
|
document.head.appendChild(EmbeddedCardsStyles);
|
|
21642
21699
|
});
|
|
21643
|
-
_defineProperty(this, "
|
|
21700
|
+
_defineProperty(this, "LJbh", function (config) {
|
|
21644
21701
|
var _window$Apxor;
|
|
21645
21702
|
var element;
|
|
21646
21703
|
switch (config.type) {
|
|
@@ -21714,27 +21771,27 @@
|
|
|
21714
21771
|
element.onclick = function (e) {
|
|
21715
21772
|
e.stopPropagation();
|
|
21716
21773
|
window.Apxor.redirect(JSON.stringify(action));
|
|
21717
|
-
_this.
|
|
21774
|
+
_this.mPVm(e);
|
|
21718
21775
|
};
|
|
21719
21776
|
break;
|
|
21720
21777
|
case "show-video":
|
|
21721
21778
|
element.onclick = function (e) {
|
|
21722
21779
|
e.stopPropagation();
|
|
21723
21780
|
window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
|
|
21724
|
-
_this.
|
|
21781
|
+
_this.mPVm(e);
|
|
21725
21782
|
};
|
|
21726
21783
|
break;
|
|
21727
21784
|
case "cancel":
|
|
21728
21785
|
element.onclick = function (e) {
|
|
21729
21786
|
e.stopPropagation();
|
|
21730
|
-
_this.
|
|
21787
|
+
_this.mPVm(e);
|
|
21731
21788
|
window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
|
|
21732
21789
|
};
|
|
21733
21790
|
break;
|
|
21734
21791
|
case "dismiss":
|
|
21735
21792
|
element.onclick = function (e) {
|
|
21736
21793
|
e.stopPropagation();
|
|
21737
|
-
_this.
|
|
21794
|
+
_this.mPVm(e);
|
|
21738
21795
|
};
|
|
21739
21796
|
break;
|
|
21740
21797
|
case "never":
|
|
@@ -21742,7 +21799,7 @@
|
|
|
21742
21799
|
e.stopPropagation();
|
|
21743
21800
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
21744
21801
|
window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
|
|
21745
|
-
_this.
|
|
21802
|
+
_this.mPVm(e);
|
|
21746
21803
|
};
|
|
21747
21804
|
break;
|
|
21748
21805
|
case "toggle-class":
|
|
@@ -21767,7 +21824,7 @@
|
|
|
21767
21824
|
tempInput.select();
|
|
21768
21825
|
document.execCommand("copy");
|
|
21769
21826
|
document.body.removeChild(tempInput);
|
|
21770
|
-
_this.
|
|
21827
|
+
_this.mPVm(e);
|
|
21771
21828
|
};
|
|
21772
21829
|
break;
|
|
21773
21830
|
case "log-app-event":
|
|
@@ -21786,7 +21843,7 @@
|
|
|
21786
21843
|
}
|
|
21787
21844
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
21788
21845
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
21789
|
-
var childElement = _this.
|
|
21846
|
+
var childElement = _this.tmRn(childConfig);
|
|
21790
21847
|
element.appendChild(childElement);
|
|
21791
21848
|
});
|
|
21792
21849
|
}
|
|
@@ -21794,7 +21851,7 @@
|
|
|
21794
21851
|
// Process children
|
|
21795
21852
|
if (config.children && config.children.length > 0) {
|
|
21796
21853
|
config.children.forEach(function (childConfig) {
|
|
21797
|
-
var childElement = _this.
|
|
21854
|
+
var childElement = _this.LJbh(childConfig);
|
|
21798
21855
|
element.appendChild(childElement);
|
|
21799
21856
|
});
|
|
21800
21857
|
}
|
|
@@ -21820,7 +21877,7 @@
|
|
|
21820
21877
|
}
|
|
21821
21878
|
return element;
|
|
21822
21879
|
});
|
|
21823
|
-
_defineProperty(this, "
|
|
21880
|
+
_defineProperty(this, "mPVm", function (e) {
|
|
21824
21881
|
var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
|
|
21825
21882
|
var additional_info = {
|
|
21826
21883
|
apx_nudge_name: _this.name,
|
|
@@ -21837,7 +21894,7 @@
|
|
|
21837
21894
|
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_card_interaction", additional_info);
|
|
21838
21895
|
}
|
|
21839
21896
|
});
|
|
21840
|
-
_defineProperty(this, "
|
|
21897
|
+
_defineProperty(this, "JoIM", function (config) {
|
|
21841
21898
|
config.forEach(function (id) {
|
|
21842
21899
|
var element = document.getElementById(id);
|
|
21843
21900
|
if (element) {
|
|
@@ -21845,7 +21902,7 @@
|
|
|
21845
21902
|
}
|
|
21846
21903
|
});
|
|
21847
21904
|
});
|
|
21848
|
-
_defineProperty(this, "
|
|
21905
|
+
_defineProperty(this, "fqDl", function () {
|
|
21849
21906
|
//This logic is to make sure that image has loaded, it doesn't check whether image is broken
|
|
21850
21907
|
//refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
|
|
21851
21908
|
if (_this.imageElements.length === 0) return true;
|
|
@@ -21853,19 +21910,19 @@
|
|
|
21853
21910
|
return img.complete;
|
|
21854
21911
|
});
|
|
21855
21912
|
});
|
|
21856
|
-
_defineProperty(this, "
|
|
21913
|
+
_defineProperty(this, "xbQr", function () {
|
|
21857
21914
|
if (_this.videoElements.length === 0) return true;
|
|
21858
21915
|
return _this.videoElements.every(function (video) {
|
|
21859
21916
|
return video.readyState >= 3;
|
|
21860
21917
|
});
|
|
21861
21918
|
});
|
|
21862
|
-
_defineProperty(this, "
|
|
21919
|
+
_defineProperty(this, "uTAP", function () {
|
|
21863
21920
|
if (!_this.bgImageUrl) return true;
|
|
21864
21921
|
var img = new Image();
|
|
21865
21922
|
img.src = _this.bgImageUrl;
|
|
21866
21923
|
return img.complete;
|
|
21867
21924
|
});
|
|
21868
|
-
_defineProperty(this, "
|
|
21925
|
+
_defineProperty(this, "gwwj", function () {
|
|
21869
21926
|
var _window6, _window7;
|
|
21870
21927
|
var width = window.document.querySelector("html").offsetWidth;
|
|
21871
21928
|
var height = window.document.querySelector("html").offsetHeight;
|
|
@@ -21954,8 +22011,8 @@
|
|
|
21954
22011
|
_this.storyContainer.appendChild(currentElement);
|
|
21955
22012
|
_this.storyContainer.appendChild(slideDetails);
|
|
21956
22013
|
document.body.appendChild(_this.storyContainer);
|
|
21957
|
-
_this.
|
|
21958
|
-
_this.
|
|
22014
|
+
_this.Jmwb();
|
|
22015
|
+
_this.mKEK();
|
|
21959
22016
|
_this.progress = Array.from(document.querySelectorAll(".progress"));
|
|
21960
22017
|
var current_slide = document.querySelector(".slide-details");
|
|
21961
22018
|
var playNext = function playNext(e) {
|
|
@@ -22001,7 +22058,7 @@
|
|
|
22001
22058
|
_existingAbsoluteElements2.forEach(function (element) {
|
|
22002
22059
|
element.remove();
|
|
22003
22060
|
});
|
|
22004
|
-
// this.
|
|
22061
|
+
// this.uqKf();
|
|
22005
22062
|
var _currentSlideDetails = document.querySelector(".slide-details");
|
|
22006
22063
|
_currentSlideDetails.innerHTML = "";
|
|
22007
22064
|
_this.position = _this.position + 1;
|
|
@@ -22097,7 +22154,7 @@
|
|
|
22097
22154
|
absolute_header = document.createElement("div");
|
|
22098
22155
|
current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
|
|
22099
22156
|
var current_absolute_element;
|
|
22100
|
-
current_absolute_element = _this.
|
|
22157
|
+
current_absolute_element = _this.tmRn(current_element);
|
|
22101
22158
|
absolute_header.appendChild(current_absolute_element);
|
|
22102
22159
|
});
|
|
22103
22160
|
(_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
|
|
@@ -22157,7 +22214,7 @@
|
|
|
22157
22214
|
document.body.style.backgroundRepeat = "";
|
|
22158
22215
|
var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
|
|
22159
22216
|
delete updated_layout_without_absolute_elements["absolute_position_children"];
|
|
22160
|
-
element = _this.
|
|
22217
|
+
element = _this.tmRn(updated_layout_without_absolute_elements);
|
|
22161
22218
|
document.body.style.backgroundColor = current_slide_from_config.media_background_color;
|
|
22162
22219
|
document.body.style.margin = "0px";
|
|
22163
22220
|
}
|
|
@@ -22165,9 +22222,9 @@
|
|
|
22165
22222
|
current_slide.removeChild(current_slide.children[0]);
|
|
22166
22223
|
}
|
|
22167
22224
|
current_slide.appendChild(element);
|
|
22168
|
-
_this.
|
|
22225
|
+
_this.dioq();
|
|
22169
22226
|
window.intervalToCheckImgStatus = setInterval(function () {
|
|
22170
|
-
if (_this.
|
|
22227
|
+
if (_this.JdWy()) {
|
|
22171
22228
|
clearInterval(window.intervalToCheckImgStatus);
|
|
22172
22229
|
}
|
|
22173
22230
|
}, 500);
|
|
@@ -22195,7 +22252,7 @@
|
|
|
22195
22252
|
});
|
|
22196
22253
|
playNext();
|
|
22197
22254
|
});
|
|
22198
|
-
_defineProperty(this, "
|
|
22255
|
+
_defineProperty(this, "uqKf", function () {
|
|
22199
22256
|
document.body.classList.add("slide-right");
|
|
22200
22257
|
var animationEndCounter = 0;
|
|
22201
22258
|
var onAnimationEnd = function onAnimationEnd() {
|
|
@@ -22207,7 +22264,7 @@
|
|
|
22207
22264
|
};
|
|
22208
22265
|
document.body.addEventListener("animationend", onAnimationEnd);
|
|
22209
22266
|
});
|
|
22210
|
-
_defineProperty(this, "
|
|
22267
|
+
_defineProperty(this, "tmRn", function (config) {
|
|
22211
22268
|
var _window$Apxor4;
|
|
22212
22269
|
var element;
|
|
22213
22270
|
var startY;
|
|
@@ -22263,7 +22320,7 @@
|
|
|
22263
22320
|
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>";
|
|
22264
22321
|
element.id = "apx-mute-icon";
|
|
22265
22322
|
element.addEventListener("touchstart", function (event) {
|
|
22266
|
-
_this.
|
|
22323
|
+
_this.lCIW(event);
|
|
22267
22324
|
});
|
|
22268
22325
|
break;
|
|
22269
22326
|
case "copy_icon":
|
|
@@ -22457,7 +22514,7 @@
|
|
|
22457
22514
|
}
|
|
22458
22515
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
22459
22516
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
22460
|
-
var childElement = _this.
|
|
22517
|
+
var childElement = _this.tmRn(childConfig);
|
|
22461
22518
|
element.appendChild(childElement);
|
|
22462
22519
|
});
|
|
22463
22520
|
}
|
|
@@ -22465,7 +22522,7 @@
|
|
|
22465
22522
|
// Process children
|
|
22466
22523
|
if (config.children && config.children.length > 0) {
|
|
22467
22524
|
config.children.forEach(function (childConfig) {
|
|
22468
|
-
var childElement = _this.
|
|
22525
|
+
var childElement = _this.tmRn(childConfig);
|
|
22469
22526
|
element.appendChild(childElement);
|
|
22470
22527
|
});
|
|
22471
22528
|
}
|
|
@@ -22491,7 +22548,7 @@
|
|
|
22491
22548
|
}
|
|
22492
22549
|
return element;
|
|
22493
22550
|
});
|
|
22494
|
-
_defineProperty(this, "
|
|
22551
|
+
_defineProperty(this, "lCIW", function (event) {
|
|
22495
22552
|
var slide_details_to_be_deleted;
|
|
22496
22553
|
var mute_child_elements;
|
|
22497
22554
|
var unmute_child_elements;
|
|
@@ -22521,11 +22578,11 @@
|
|
|
22521
22578
|
}
|
|
22522
22579
|
// this.muteElement.addEventListener("touchstart", (event) => {
|
|
22523
22580
|
// event.stopPropagation();
|
|
22524
|
-
// this.
|
|
22581
|
+
// this.lCIW(event);
|
|
22525
22582
|
// });
|
|
22526
22583
|
}
|
|
22527
22584
|
});
|
|
22528
|
-
_defineProperty(this, "
|
|
22585
|
+
_defineProperty(this, "mKEK", function () {
|
|
22529
22586
|
var tapTimeout;
|
|
22530
22587
|
var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
|
|
22531
22588
|
var longPressDuration = 200;
|
|
@@ -22649,7 +22706,7 @@
|
|
|
22649
22706
|
event.target.dataset.touchStartTime = event.timeStamp;
|
|
22650
22707
|
});
|
|
22651
22708
|
});
|
|
22652
|
-
_defineProperty(this, "
|
|
22709
|
+
_defineProperty(this, "Jmwb", function () {
|
|
22653
22710
|
var startY, startX;
|
|
22654
22711
|
_this.storyContainer.addEventListener("touchstart", function (event) {
|
|
22655
22712
|
_this.swipeTouch = true;
|
|
@@ -22856,7 +22913,7 @@
|
|
|
22856
22913
|
}, 50);
|
|
22857
22914
|
});
|
|
22858
22915
|
});
|
|
22859
|
-
_defineProperty(this, "
|
|
22916
|
+
_defineProperty(this, "dioq", function () {
|
|
22860
22917
|
_this.loader.style.display = "block";
|
|
22861
22918
|
var progress = Array.from(document.querySelectorAll(".progress"));
|
|
22862
22919
|
var activeIndex = progress.findIndex(function (el) {
|
|
@@ -22872,7 +22929,7 @@
|
|
|
22872
22929
|
}
|
|
22873
22930
|
}
|
|
22874
22931
|
});
|
|
22875
|
-
_defineProperty(this, "
|
|
22932
|
+
_defineProperty(this, "XEwF", function () {
|
|
22876
22933
|
if (!_this.continueLoading) {
|
|
22877
22934
|
var slide_details_to_be_deleted = document.querySelector(".slide-details");
|
|
22878
22935
|
var childElements = slide_details_to_be_deleted.querySelectorAll("video");
|
|
@@ -22892,19 +22949,19 @@
|
|
|
22892
22949
|
_this.loader.style.display = "none";
|
|
22893
22950
|
}
|
|
22894
22951
|
});
|
|
22895
|
-
_defineProperty(this, "
|
|
22952
|
+
_defineProperty(this, "fqDl", function () {
|
|
22896
22953
|
if (_this.imageElements.length === 0) return true;
|
|
22897
22954
|
return _this.imageElements.every(function (img) {
|
|
22898
22955
|
return img.complete;
|
|
22899
22956
|
});
|
|
22900
22957
|
});
|
|
22901
|
-
_defineProperty(this, "
|
|
22958
|
+
_defineProperty(this, "xbQr", function () {
|
|
22902
22959
|
if (_this.videoElements.length === 0) return true;
|
|
22903
22960
|
return _this.videoElements.every(function (video) {
|
|
22904
22961
|
return video.readyState >= 3;
|
|
22905
22962
|
});
|
|
22906
22963
|
});
|
|
22907
|
-
_defineProperty(this, "
|
|
22964
|
+
_defineProperty(this, "JdWy", function () {
|
|
22908
22965
|
var bodyStyles = window.getComputedStyle(document.body);
|
|
22909
22966
|
var backgroundImage = bodyStyles.backgroundImage;
|
|
22910
22967
|
if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
|
|
@@ -22914,7 +22971,7 @@
|
|
|
22914
22971
|
var img = new Image();
|
|
22915
22972
|
img.src = imageUrl;
|
|
22916
22973
|
if (img.complete) {
|
|
22917
|
-
_this.
|
|
22974
|
+
_this.XEwF();
|
|
22918
22975
|
return true;
|
|
22919
22976
|
}
|
|
22920
22977
|
return false;
|
|
@@ -22922,21 +22979,21 @@
|
|
|
22922
22979
|
var slide_details_to_be_deleted = document.querySelector(".slide-details");
|
|
22923
22980
|
var childElements = slide_details_to_be_deleted.querySelectorAll("video");
|
|
22924
22981
|
if (childElements[0].readyState >= 3) {
|
|
22925
|
-
_this.
|
|
22982
|
+
_this.XEwF();
|
|
22926
22983
|
return true;
|
|
22927
22984
|
}
|
|
22928
22985
|
return false;
|
|
22929
22986
|
} else {
|
|
22930
22987
|
if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
|
|
22931
|
-
_this.
|
|
22988
|
+
_this.XEwF();
|
|
22932
22989
|
return true;
|
|
22933
|
-
} else if (_this.
|
|
22934
|
-
_this.
|
|
22990
|
+
} else if (_this.fqDl() && _this.xbQr()) {
|
|
22991
|
+
_this.XEwF();
|
|
22935
22992
|
return true;
|
|
22936
22993
|
}
|
|
22937
22994
|
}
|
|
22938
22995
|
});
|
|
22939
|
-
_defineProperty(this, "
|
|
22996
|
+
_defineProperty(this, "Ktty", function (event, startY, action) {
|
|
22940
22997
|
event.stopPropagation();
|
|
22941
22998
|
var endY = event.changedTouches[0].clientY;
|
|
22942
22999
|
var deltaY = startY - endY;
|
|
@@ -23031,7 +23088,7 @@
|
|
|
23031
23088
|
this.swipe_action;
|
|
23032
23089
|
this.continueLoading = false;
|
|
23033
23090
|
this.boundSwipeUpHandling = function (event) {
|
|
23034
|
-
return _this.
|
|
23091
|
+
return _this.Ktty(event, _this.startY, _this.swipe_action);
|
|
23035
23092
|
};
|
|
23036
23093
|
}
|
|
23037
23094
|
_createClass(Stories, [{
|
|
@@ -23094,7 +23151,7 @@
|
|
|
23094
23151
|
} else {
|
|
23095
23152
|
var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
|
|
23096
23153
|
// Move to the first slide of the next group
|
|
23097
|
-
// this.
|
|
23154
|
+
// this.uqKf();
|
|
23098
23155
|
this.position++;
|
|
23099
23156
|
this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
|
|
23100
23157
|
this.slides = this.config[this.position].slides;
|
|
@@ -23220,7 +23277,7 @@
|
|
|
23220
23277
|
if (activeIndex === 0) {
|
|
23221
23278
|
var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
|
|
23222
23279
|
// If at the first slide of the current group, move to the last slide of the previous group
|
|
23223
|
-
// this.
|
|
23280
|
+
// this.uqKf();
|
|
23224
23281
|
this.position--;
|
|
23225
23282
|
this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
|
|
23226
23283
|
this.slides = this.config[this.position].slides;
|
|
@@ -23407,25 +23464,25 @@
|
|
|
23407
23464
|
// Create custom content
|
|
23408
23465
|
var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
|
|
23409
23466
|
delete updated_layout_without_absolute_elements["absolute_position_children"];
|
|
23410
|
-
element = this.
|
|
23467
|
+
element = this.tmRn(updated_layout_without_absolute_elements);
|
|
23411
23468
|
}
|
|
23412
23469
|
// Append slide content to slide details container
|
|
23413
23470
|
|
|
23414
23471
|
document.body.style.backgroundColor = current_slide_from_config.media_background_color;
|
|
23415
23472
|
document.body.style.margin = "0px";
|
|
23416
23473
|
currentSlideDetails.appendChild(element);
|
|
23417
|
-
this.
|
|
23474
|
+
this.dioq();
|
|
23418
23475
|
|
|
23419
23476
|
// Handle absolute position children
|
|
23420
23477
|
if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
|
|
23421
23478
|
current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
|
|
23422
|
-
var childElement = _this2.
|
|
23479
|
+
var childElement = _this2.tmRn(childConfig);
|
|
23423
23480
|
// Append absolute position children to slide details container
|
|
23424
23481
|
currentSlideDetails.appendChild(childElement);
|
|
23425
23482
|
});
|
|
23426
23483
|
}
|
|
23427
23484
|
window.intervalToCheckImgStatus2 = setInterval(function () {
|
|
23428
|
-
if (_this2.
|
|
23485
|
+
if (_this2.JdWy()) {
|
|
23429
23486
|
clearInterval(window.intervalToCheckImgStatus2);
|
|
23430
23487
|
}
|
|
23431
23488
|
}, 500);
|
|
@@ -23469,19 +23526,1388 @@
|
|
|
23469
23526
|
return Stories;
|
|
23470
23527
|
}();
|
|
23471
23528
|
|
|
23529
|
+
/*
|
|
23530
|
+
"border": {
|
|
23531
|
+
"color": "#FF0000",
|
|
23532
|
+
"corners": {
|
|
23533
|
+
"top_left": 5,
|
|
23534
|
+
"top_right": 5,
|
|
23535
|
+
"bottom_right": 5,
|
|
23536
|
+
"bottom_left": 5
|
|
23537
|
+
},
|
|
23538
|
+
"width": {
|
|
23539
|
+
"top": 4,
|
|
23540
|
+
"left": 2,
|
|
23541
|
+
"right": 3,
|
|
23542
|
+
"bottom": 0
|
|
23543
|
+
}
|
|
23544
|
+
}
|
|
23545
|
+
*/
|
|
23546
|
+
var Badgeborder = /*#__PURE__*/_createClass(function Badgeborder() {
|
|
23547
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23548
|
+
_classCallCheck(this, Badgeborder);
|
|
23549
|
+
this.color = data.color;
|
|
23550
|
+
this.corners = data.corners;
|
|
23551
|
+
this.width = data.width;
|
|
23552
|
+
});
|
|
23553
|
+
|
|
23554
|
+
/*
|
|
23555
|
+
"shape": {
|
|
23556
|
+
"height": 10,
|
|
23557
|
+
"width": 10,
|
|
23558
|
+
"type": "circle/rectangle",
|
|
23559
|
+
"enable_border": true,
|
|
23560
|
+
"border": {
|
|
23561
|
+
"color": "#FF0000",
|
|
23562
|
+
"corners": {
|
|
23563
|
+
"top_left": 5,
|
|
23564
|
+
"top_right": 5,
|
|
23565
|
+
"bottom_right": 5,
|
|
23566
|
+
"bottom_left": 5
|
|
23567
|
+
},
|
|
23568
|
+
"width": {
|
|
23569
|
+
"top": 4,
|
|
23570
|
+
"left": 2,
|
|
23571
|
+
"right": 3,
|
|
23572
|
+
"bottom": 0
|
|
23573
|
+
}
|
|
23574
|
+
}
|
|
23575
|
+
}
|
|
23576
|
+
*/
|
|
23577
|
+
var Shape = /*#__PURE__*/_createClass(function Shape() {
|
|
23578
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23579
|
+
_classCallCheck(this, Shape);
|
|
23580
|
+
this.type = data.type;
|
|
23581
|
+
this.color = getColorOrDefault(data.color, "transparent");
|
|
23582
|
+
this.enable_gradient = data.enable_gradient;
|
|
23583
|
+
if (this.enable_gradient) this.gradient = new Gradient(data.gradient);
|
|
23584
|
+
this.enable_border = data.enable_border;
|
|
23585
|
+
if (this.enable_border) this.border = new Badgeborder(data.border);
|
|
23586
|
+
});
|
|
23587
|
+
|
|
23588
|
+
/*
|
|
23589
|
+
"background": {
|
|
23590
|
+
"enable_image": true,
|
|
23591
|
+
"image": {
|
|
23592
|
+
"type": "assets/url",
|
|
23593
|
+
"path": "",
|
|
23594
|
+
"width": 50,
|
|
23595
|
+
"height": 50
|
|
23596
|
+
},
|
|
23597
|
+
"color": "#00FF0000",
|
|
23598
|
+
"enable_gradient": "false",
|
|
23599
|
+
"gradient": {
|
|
23600
|
+
"colors": ["FF0000", "FF0000"],
|
|
23601
|
+
"direction": "to_right/to_left/to_top/to_bottom"
|
|
23602
|
+
},
|
|
23603
|
+
"shape": {
|
|
23604
|
+
"height": 10,
|
|
23605
|
+
"width": 10,
|
|
23606
|
+
"type": "circle/rectangle",
|
|
23607
|
+
"enable_border": true,
|
|
23608
|
+
"border": {
|
|
23609
|
+
"color": "#FF0000",
|
|
23610
|
+
"corners": {
|
|
23611
|
+
"top_left": 5,
|
|
23612
|
+
"top_right": 5,
|
|
23613
|
+
"bottom_right": 5,
|
|
23614
|
+
"bottom_left": 5
|
|
23615
|
+
},
|
|
23616
|
+
"width": {
|
|
23617
|
+
"top": 4,
|
|
23618
|
+
"left": 2,
|
|
23619
|
+
"right": 3,
|
|
23620
|
+
"bottom": 0
|
|
23621
|
+
}
|
|
23622
|
+
}
|
|
23623
|
+
}
|
|
23624
|
+
},
|
|
23625
|
+
*/
|
|
23626
|
+
var Badgebackground = /*#__PURE__*/_createClass(function Badgebackground() {
|
|
23627
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23628
|
+
_classCallCheck(this, Badgebackground);
|
|
23629
|
+
this.width = data.width;
|
|
23630
|
+
this.height = data.height;
|
|
23631
|
+
this.enable_image = data.enable_image;
|
|
23632
|
+
if (this.enable_image) this.image = new Image$1(data.image);
|
|
23633
|
+
this.shape = new Shape(data.shape);
|
|
23634
|
+
});
|
|
23635
|
+
|
|
23636
|
+
/*
|
|
23637
|
+
"content": [
|
|
23638
|
+
{
|
|
23639
|
+
"enable_label": true,
|
|
23640
|
+
"label": {
|
|
23641
|
+
"enable_margin": true,
|
|
23642
|
+
"margin": {
|
|
23643
|
+
"top": 5,
|
|
23644
|
+
"left": 5,
|
|
23645
|
+
"bottom": 5,
|
|
23646
|
+
"right": 5
|
|
23647
|
+
},
|
|
23648
|
+
"color": "#FF0000",
|
|
23649
|
+
"text": "123",
|
|
23650
|
+
"font": {
|
|
23651
|
+
"size": 20,
|
|
23652
|
+
"weight": "bold/normal",
|
|
23653
|
+
"style": "italic/normal",
|
|
23654
|
+
"family": "sans-serif"
|
|
23655
|
+
},
|
|
23656
|
+
"alignment": "left",
|
|
23657
|
+
"script": {
|
|
23658
|
+
"cmds": "e A;jz 1;e A;r \"Winner is: {}\",1;jmp L1;1:e A;r \"{} is not winner\",1;jmp L1;L1:",
|
|
23659
|
+
"vmap": {
|
|
23660
|
+
"A": {
|
|
23661
|
+
"t": "u",
|
|
23662
|
+
"n": "name",
|
|
23663
|
+
"def": "Tesla"
|
|
23664
|
+
}
|
|
23665
|
+
}
|
|
23666
|
+
},
|
|
23667
|
+
"is_dyn": true
|
|
23668
|
+
},
|
|
23669
|
+
"enable_icon": true,
|
|
23670
|
+
"icon": {
|
|
23671
|
+
"type": "Assets/URl",
|
|
23672
|
+
"path": "",
|
|
23673
|
+
"position": "left/right",
|
|
23674
|
+
"width": 50,
|
|
23675
|
+
"height": 50,
|
|
23676
|
+
"enable_margin": true,
|
|
23677
|
+
"margin": {
|
|
23678
|
+
"top": 5,
|
|
23679
|
+
"left": 5,
|
|
23680
|
+
"bottom": 5,
|
|
23681
|
+
"right": 5
|
|
23682
|
+
}
|
|
23683
|
+
}
|
|
23684
|
+
}
|
|
23685
|
+
],
|
|
23686
|
+
*/
|
|
23687
|
+
var Badgecontent = /*#__PURE__*/_createClass(function Badgecontent() {
|
|
23688
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23689
|
+
_classCallCheck(this, Badgecontent);
|
|
23690
|
+
this.enable_label = data.enable_label;
|
|
23691
|
+
if (this.enable_label) this.label = new Text(data.label);
|
|
23692
|
+
this.enable_icon = data.enable_icon;
|
|
23693
|
+
if (this.enable_icon) this.icon = new Icon(data.icon);
|
|
23694
|
+
});
|
|
23695
|
+
|
|
23696
|
+
var Autoscroll = /*#__PURE__*/_createClass(function Autoscroll() {
|
|
23697
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23698
|
+
_classCallCheck(this, Autoscroll);
|
|
23699
|
+
this.duration_millis = getNumberOrDefault(data.duration_millis, 2) / 1000;
|
|
23700
|
+
this.direction = getStringOrDefault(data.direction, "to_top");
|
|
23701
|
+
this.horizontal_gap = data === null || data === void 0 ? void 0 : data.horizontal_gap;
|
|
23702
|
+
});
|
|
23703
|
+
|
|
23704
|
+
/**
|
|
23705
|
+
* @constructor Animation
|
|
23706
|
+
* @example
|
|
23707
|
+
* Example of a Animation model is
|
|
23708
|
+
*
|
|
23709
|
+
* animation: {
|
|
23710
|
+
* type : "cycle",
|
|
23711
|
+
* duration : 10,
|
|
23712
|
+
* anim_function : "ease-in-out",
|
|
23713
|
+
* iteration_count : 2,
|
|
23714
|
+
* }
|
|
23715
|
+
*/
|
|
23716
|
+
var BadgeAnimation = /*#__PURE__*/function () {
|
|
23717
|
+
function BadgeAnimation() {
|
|
23718
|
+
var _data$shine, _data$shine2;
|
|
23719
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23720
|
+
_classCallCheck(this, BadgeAnimation);
|
|
23721
|
+
this.type = getStringOrDefault(data.type, "cycle");
|
|
23722
|
+
this.duration = getNumberOrDefault(data.duration, 1);
|
|
23723
|
+
this.delay_millis = getNumberOrDefault(data.delay_millis, 1000) / 1000;
|
|
23724
|
+
this.duration_millis = getNumberOrDefault(data.duration_millis, 1000) / 1000;
|
|
23725
|
+
this.inter_count = getNumberOrDefault(data.inter_count, 0);
|
|
23726
|
+
this.intra_count = getNumberOrDefault(data.intra_count, 0);
|
|
23727
|
+
switch (this.type) {
|
|
23728
|
+
case "fade":
|
|
23729
|
+
this.fade_opacity = getNumberOrDefault(data.fade.opacity, 50);
|
|
23730
|
+
break;
|
|
23731
|
+
case "ripple":
|
|
23732
|
+
this.rippleArea = getNumberOrDefault(data.ripple.area, 8);
|
|
23733
|
+
this.rippleColor = getColorOrDefault(data.ripple.color, "#FFFFFF");
|
|
23734
|
+
this.rippleCornerRadius = getNumberOrDefault(data.ripple.corner_radius, 8);
|
|
23735
|
+
this.rippleShape = getStringOrDefault(data.ripple.shape, "rectangle");
|
|
23736
|
+
break;
|
|
23737
|
+
case "shake":
|
|
23738
|
+
this.shakeDirection = getStringOrDefault(data.shake.direction, "horizontal");
|
|
23739
|
+
break;
|
|
23740
|
+
case "shine":
|
|
23741
|
+
this.shineDirection = getStringOrDefault(data.shine.direction, "to_bottom_right");
|
|
23742
|
+
this.shineColor = getColorOrDefault(data.shine.color, "#FFFFFF");
|
|
23743
|
+
this.lines_gap = data === null || data === void 0 || (_data$shine = data.shine) === null || _data$shine === void 0 ? void 0 : _data$shine.lines_gap;
|
|
23744
|
+
this.lines = data === null || data === void 0 || (_data$shine2 = data.shine) === null || _data$shine2 === void 0 ? void 0 : _data$shine2.lines;
|
|
23745
|
+
break;
|
|
23746
|
+
}
|
|
23747
|
+
this.anim_function = getStringOrDefault(data.anim_function, "ease-in-out");
|
|
23748
|
+
this.iteration_count = getNumberOrDefault(data.iteration_count, "infinite");
|
|
23749
|
+
}
|
|
23750
|
+
_createClass(BadgeAnimation, null, [{
|
|
23751
|
+
key: "isEnabled",
|
|
23752
|
+
value: function isEnabled(data) {
|
|
23753
|
+
if (isUndefined$1(data) || isNull(data) || isEmptyObject(data)) {
|
|
23754
|
+
return false;
|
|
23755
|
+
} else {
|
|
23756
|
+
return true;
|
|
23757
|
+
}
|
|
23758
|
+
}
|
|
23759
|
+
}]);
|
|
23760
|
+
return BadgeAnimation;
|
|
23761
|
+
}();
|
|
23762
|
+
|
|
23763
|
+
/*
|
|
23764
|
+
"badge": {
|
|
23765
|
+
"position": {
|
|
23766
|
+
"position": "TL/T/TR/L/C/R/BL/B/BR",
|
|
23767
|
+
"offset": {
|
|
23768
|
+
"x": 5,
|
|
23769
|
+
"y": 5
|
|
23770
|
+
}
|
|
23771
|
+
},
|
|
23772
|
+
"enable_background": true,
|
|
23773
|
+
"background": {
|
|
23774
|
+
"enable_image": true,
|
|
23775
|
+
"image": {
|
|
23776
|
+
"type": "assets/url",
|
|
23777
|
+
"path": "",
|
|
23778
|
+
"width": 50,
|
|
23779
|
+
"height": 50
|
|
23780
|
+
},
|
|
23781
|
+
"color": "#00FF0000",
|
|
23782
|
+
"enable_gradient": "false",
|
|
23783
|
+
"gradient": {
|
|
23784
|
+
"colors": ["FF0000", "FF0000"],
|
|
23785
|
+
"direction": "to_right/to_left/to_top/to_bottom"
|
|
23786
|
+
},
|
|
23787
|
+
"shape": {
|
|
23788
|
+
"height": 10,
|
|
23789
|
+
"width": 10,
|
|
23790
|
+
"type": "circle/rectangle",
|
|
23791
|
+
"enable_border": true,
|
|
23792
|
+
"border": {
|
|
23793
|
+
"color": "#FF0000",
|
|
23794
|
+
"corners": {
|
|
23795
|
+
"top_left": 5,
|
|
23796
|
+
"top_right": 5,
|
|
23797
|
+
"bottom_right": 5,
|
|
23798
|
+
"bottom_left": 5
|
|
23799
|
+
},
|
|
23800
|
+
"width": {
|
|
23801
|
+
"top": 4,
|
|
23802
|
+
"left": 2,
|
|
23803
|
+
"right": 3,
|
|
23804
|
+
"bottom": 0
|
|
23805
|
+
}
|
|
23806
|
+
}
|
|
23807
|
+
}
|
|
23808
|
+
},
|
|
23809
|
+
"content": [
|
|
23810
|
+
{
|
|
23811
|
+
"enable_label": true,
|
|
23812
|
+
"label": {
|
|
23813
|
+
"enable_margin": true,
|
|
23814
|
+
"margin": {
|
|
23815
|
+
"top": 5,
|
|
23816
|
+
"left": 5,
|
|
23817
|
+
"bottom": 5,
|
|
23818
|
+
"right": 5
|
|
23819
|
+
},
|
|
23820
|
+
"color": "#FF0000",
|
|
23821
|
+
"text": "123",
|
|
23822
|
+
"font": {
|
|
23823
|
+
"size": 20,
|
|
23824
|
+
"weight": "bold/normal",
|
|
23825
|
+
"style": "italic/normal",
|
|
23826
|
+
"family": "sans-serif"
|
|
23827
|
+
},
|
|
23828
|
+
"alignment": "left",
|
|
23829
|
+
"script": {
|
|
23830
|
+
"cmds": "e A;jz 1;e A;r \"Winner is: {}\",1;jmp L1;1:e A;r \"{} is not winner\",1;jmp L1;L1:",
|
|
23831
|
+
"vmap": {
|
|
23832
|
+
"A": {
|
|
23833
|
+
"t": "u",
|
|
23834
|
+
"n": "name",
|
|
23835
|
+
"def": "Tesla"
|
|
23836
|
+
}
|
|
23837
|
+
}
|
|
23838
|
+
},
|
|
23839
|
+
"is_dyn": true
|
|
23840
|
+
},
|
|
23841
|
+
"enable_icon": true,
|
|
23842
|
+
"icon": {
|
|
23843
|
+
"type": "Assets/URl",
|
|
23844
|
+
"path": "",
|
|
23845
|
+
"position": "left/right",
|
|
23846
|
+
"width": 50,
|
|
23847
|
+
"height": 50,
|
|
23848
|
+
"enable_margin": true,
|
|
23849
|
+
"margin": {
|
|
23850
|
+
"top": 5,
|
|
23851
|
+
"left": 5,
|
|
23852
|
+
"bottom": 5,
|
|
23853
|
+
"right": 5
|
|
23854
|
+
}
|
|
23855
|
+
}
|
|
23856
|
+
}
|
|
23857
|
+
],
|
|
23858
|
+
"enable_shadow": true,
|
|
23859
|
+
"shadow": {
|
|
23860
|
+
"color": "#FFFFFF",
|
|
23861
|
+
"offset_x": 2,
|
|
23862
|
+
"offset_y": 2,
|
|
23863
|
+
"spread_radius": 2
|
|
23864
|
+
},
|
|
23865
|
+
"enable_animation": true,
|
|
23866
|
+
"animation": {
|
|
23867
|
+
"type": "shine/ripple/fading/shake",
|
|
23868
|
+
"time": 5,
|
|
23869
|
+
"ripple_area": 8,
|
|
23870
|
+
"ripple_color": "#FFFFFF",
|
|
23871
|
+
"direction": "top_to_bottom/bottom_to_top",
|
|
23872
|
+
"fade_opacity": 50
|
|
23873
|
+
},
|
|
23874
|
+
"enable_textscroll": true,
|
|
23875
|
+
"textscroll": {
|
|
23876
|
+
"speed": 10,
|
|
23877
|
+
"direction": "left_to_right/right_to_left/bottom_to_top"
|
|
23878
|
+
}
|
|
23879
|
+
}
|
|
23880
|
+
*/
|
|
23881
|
+
var Badge = /*#__PURE__*/_createClass(function Badge(data) {
|
|
23882
|
+
var _data$auto_scroll,
|
|
23883
|
+
_this = this;
|
|
23884
|
+
_classCallCheck(this, Badge);
|
|
23885
|
+
this.position = new Position(data.position);
|
|
23886
|
+
this.enable_background = data.enable_background;
|
|
23887
|
+
if (this.enable_background) this.background = new Badgebackground(data.background);
|
|
23888
|
+
this.content = [];
|
|
23889
|
+
if (data !== null && data !== void 0 && data.content && data.content.length !== 0) if (data !== null && data !== void 0 && data.enable_auto_scroll && (data === null || data === void 0 || (_data$auto_scroll = data.auto_scroll) === null || _data$auto_scroll === void 0 ? void 0 : _data$auto_scroll.direction) === "to_bottom") {
|
|
23890
|
+
data.content.forEach(function (contentelement) {
|
|
23891
|
+
_this.content.unshift(new Badgecontent(contentelement));
|
|
23892
|
+
});
|
|
23893
|
+
} else {
|
|
23894
|
+
data.content.forEach(function (contentelement) {
|
|
23895
|
+
_this.content.push(new Badgecontent(contentelement));
|
|
23896
|
+
});
|
|
23897
|
+
}
|
|
23898
|
+
this.enable_shadow = data.enable_shadow;
|
|
23899
|
+
if (this.enable_shadow) this.shadow = new Shadow(data.shadow);
|
|
23900
|
+
this.enable_animation = data.enable_animation;
|
|
23901
|
+
this.animation = new BadgeAnimation(data.animation);
|
|
23902
|
+
this.enable_auto_scroll = data.enable_auto_scroll;
|
|
23903
|
+
if (this.enable_auto_scroll) this.auto_scroll = new Autoscroll(data.auto_scroll);
|
|
23904
|
+
this.tooltipShown = data.tooltipShown;
|
|
23905
|
+
});
|
|
23906
|
+
|
|
23907
|
+
var ApxorBadge = /*#__PURE__*/function () {
|
|
23908
|
+
/**
|
|
23909
|
+
* @class ApxorBadge
|
|
23910
|
+
* @param {JSON} config
|
|
23911
|
+
*/
|
|
23912
|
+
function ApxorBadge(config, terminationConfig, messageConfig, rtmInstance, showCallback) {
|
|
23913
|
+
var _this = this,
|
|
23914
|
+
_this$target$retry$ma,
|
|
23915
|
+
_this$target,
|
|
23916
|
+
_this$badge$animation,
|
|
23917
|
+
_this$badge$animation2,
|
|
23918
|
+
_this$badge$animation3;
|
|
23919
|
+
_classCallCheck(this, ApxorBadge);
|
|
23920
|
+
_defineProperty(this, "abJr", function () {
|
|
23921
|
+
var delayMillis = _this.delayMillis * 1000;
|
|
23922
|
+
_this.shakeAnimationRepeat(_this.interCount, delayMillis);
|
|
23923
|
+
});
|
|
23924
|
+
_defineProperty(this, "ySbr", function () {
|
|
23925
|
+
var delayMillis = _this.delayMillis * 1000;
|
|
23926
|
+
_this.fadeAnimationRepeat(_this.interCount, delayMillis);
|
|
23927
|
+
});
|
|
23928
|
+
_defineProperty(this, "nEhw", function () {
|
|
23929
|
+
var _this$targetElement;
|
|
23930
|
+
var delayMillis = _this.delayMillis * 1000;
|
|
23931
|
+
var finalStyles = ".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix, " {\n opacity:0;\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
23932
|
+
var newstyleNode1 = document.createElement("style");
|
|
23933
|
+
newstyleNode1.innerHTML = finalStyles;
|
|
23934
|
+
(_this$targetElement = _this.targetElement) === null || _this$targetElement === void 0 || _this$targetElement.appendChild(newstyleNode1);
|
|
23935
|
+
_this.rippleAnimationRepeat(_this.interCount, delayMillis);
|
|
23936
|
+
});
|
|
23937
|
+
_defineProperty(this, "Rfqe", function () {
|
|
23938
|
+
var delayMillis = _this.delayMillis * 1000;
|
|
23939
|
+
//let badgeContainerClass = `.apxor-badge-container-styles-${this.cssPostFix}`;
|
|
23940
|
+
//let badgeAnimationElement = document.querySelector(badgeContainerClass);
|
|
23941
|
+
//badgeAnimationElement.classList.add("finished");
|
|
23942
|
+
|
|
23943
|
+
_this.shineAnimationRepeat(_this.interCount, delayMillis);
|
|
23944
|
+
// let finalStyles =
|
|
23945
|
+
// `.apxor-badge-content-container-${this.cssPostFix}::before.finished {
|
|
23946
|
+
// display:none;
|
|
23947
|
+
// }`
|
|
23948
|
+
// .replaceAll("\n", "")
|
|
23949
|
+
// .replace(/[\s]{2,999}/g, "");
|
|
23950
|
+
// let newstyleNode1 = document.createElement("style");
|
|
23951
|
+
// newstyleNode1.innerHTML = finalStyles;
|
|
23952
|
+
// this.targetElement?.appendChild(newstyleNode1);
|
|
23953
|
+
});
|
|
23954
|
+
_defineProperty(this, "wXSj", function () {
|
|
23955
|
+
var elements = document.querySelectorAll(".apx-main-styles-".concat(_this.configId));
|
|
23956
|
+
elements === null || elements === void 0 || elements.forEach(function (ele) {
|
|
23957
|
+
ele === null || ele === void 0 || ele.remove();
|
|
23958
|
+
});
|
|
23959
|
+
var dummy_elements = document.querySelectorAll(".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix));
|
|
23960
|
+
dummy_elements === null || dummy_elements === void 0 || dummy_elements.forEach(function (ele) {
|
|
23961
|
+
ele === null || ele === void 0 || ele.remove();
|
|
23962
|
+
});
|
|
23963
|
+
_this.qgiQ();
|
|
23964
|
+
});
|
|
23965
|
+
_defineProperty(this, "qgiQ", function () {
|
|
23966
|
+
var targetWrapperElement = document.querySelector(".image-container-".concat(_this.configId));
|
|
23967
|
+
// Ensure the target element is the wrapper with class 'image-container'
|
|
23968
|
+
if (targetWrapperElement) {
|
|
23969
|
+
var imageElement = targetWrapperElement.querySelector("img"); // Get the image inside the wrapper
|
|
23970
|
+
|
|
23971
|
+
if (imageElement) {
|
|
23972
|
+
// Move the image out of the wrapper by inserting it before the wrapper
|
|
23973
|
+
targetWrapperElement.parentNode.insertBefore(imageElement, targetWrapperElement);
|
|
23974
|
+
|
|
23975
|
+
// Remove the wrapper div
|
|
23976
|
+
targetWrapperElement.remove();
|
|
23977
|
+
|
|
23978
|
+
// Update the target element to be the image itself
|
|
23979
|
+
_this.targetElement = imageElement;
|
|
23980
|
+
}
|
|
23981
|
+
}
|
|
23982
|
+
});
|
|
23983
|
+
/**
|
|
23984
|
+
* @function cssPath
|
|
23985
|
+
* @param {object} node
|
|
23986
|
+
* @param {boolean} optimized
|
|
23987
|
+
* @returns viewId
|
|
23988
|
+
*/
|
|
23989
|
+
_defineProperty(this, "dKzi", function (node, optimized) {
|
|
23990
|
+
if (node.nodeType !== Node.ELEMENT_NODE) return "";
|
|
23991
|
+
var steps = [];
|
|
23992
|
+
var contextNode = node;
|
|
23993
|
+
while (contextNode) {
|
|
23994
|
+
var step = _this.aFBg(contextNode, !!optimized, contextNode === node);
|
|
23995
|
+
if (!step) break; // Error - bail out early.
|
|
23996
|
+
steps.push(step);
|
|
23997
|
+
if (step.optimized) break;
|
|
23998
|
+
contextNode = contextNode.parentNode;
|
|
23999
|
+
}
|
|
24000
|
+
steps.reverse();
|
|
24001
|
+
return steps.join(" > ");
|
|
24002
|
+
});
|
|
24003
|
+
/**
|
|
24004
|
+
* @function _cssPathStep
|
|
24005
|
+
* @param {object} node
|
|
24006
|
+
* @param {boolean} optimized
|
|
24007
|
+
* @param {object} isTargetNode
|
|
24008
|
+
*/
|
|
24009
|
+
_defineProperty(this, "aFBg", function (node, optimized, isTargetNode) {
|
|
24010
|
+
if (node.nodeType !== Node.ELEMENT_NODE) return null;
|
|
24011
|
+
var id = node.getAttribute("id");
|
|
24012
|
+
if (optimized) {
|
|
24013
|
+
if (id) return new DOMNodePathStep(idSelector(id), true);
|
|
24014
|
+
var nodeNameLower = node.nodeName.toLowerCase();
|
|
24015
|
+
if (nodeNameLower === "body" || nodeNameLower === "head" || nodeNameLower === "html") return new DOMNodePathStep(node.nodeName.toLowerCase(), true);
|
|
24016
|
+
}
|
|
24017
|
+
var nodeName = node.nodeName.toLowerCase();
|
|
24018
|
+
if (id) return new DOMNodePathStep(nodeName.toLowerCase() + idSelector(id), true);
|
|
24019
|
+
var parent = node.parentNode;
|
|
24020
|
+
if (!parent || parent.nodeType === Node.DOCUMENT_NODE) return new DOMNodePathStep(nodeName.toLowerCase(), true);
|
|
24021
|
+
function prefixedElementClassNames(node) {
|
|
24022
|
+
var classAttribute = node.getAttribute("class");
|
|
24023
|
+
if (!classAttribute) return [];
|
|
24024
|
+
return classAttribute.split(/\s+/g).filter(Boolean).map(function (name) {
|
|
24025
|
+
// The prefix is required to store "__proto__" in a object-based map.
|
|
24026
|
+
return "$" + name;
|
|
24027
|
+
});
|
|
24028
|
+
}
|
|
24029
|
+
function idSelector(id) {
|
|
24030
|
+
return "#" + escapeIdentifierIfNeeded(id);
|
|
24031
|
+
}
|
|
24032
|
+
function escapeIdentifierIfNeeded(ident) {
|
|
24033
|
+
if (isCSSIdentifier(ident)) return ident;
|
|
24034
|
+
var shouldEscapeFirst = /^(?:[0-9]|-[0-9-]?)/.test(ident);
|
|
24035
|
+
var lastIndex = ident.length - 1;
|
|
24036
|
+
return ident.replace(/./g, function (c, i) {
|
|
24037
|
+
return shouldEscapeFirst && i === 0 || !isCSSIdentChar(c) ? escapeAsciiChar(c, i === lastIndex) : c;
|
|
24038
|
+
});
|
|
24039
|
+
}
|
|
24040
|
+
function escapeAsciiChar(c, isLast) {
|
|
24041
|
+
return "\\" + toHexByte(c) + (isLast ? "" : " ");
|
|
24042
|
+
}
|
|
24043
|
+
function toHexByte(c) {
|
|
24044
|
+
var hexByte = c.charCodeAt(0).toString(16);
|
|
24045
|
+
if (hexByte.length === 1) hexByte = "0" + hexByte;
|
|
24046
|
+
return hexByte;
|
|
24047
|
+
}
|
|
24048
|
+
function isCSSIdentChar(c) {
|
|
24049
|
+
if (/[a-zA-Z0-9_-]/.test(c)) return true;
|
|
24050
|
+
return c.charCodeAt(0) >= 0xa0;
|
|
24051
|
+
}
|
|
24052
|
+
function isCSSIdentifier(value) {
|
|
24053
|
+
return /^-?[a-zA-Z_][a-zA-Z0-9_-]*$/.test(value);
|
|
24054
|
+
}
|
|
24055
|
+
var prefixedOwnClassNamesArray = prefixedElementClassNames(node);
|
|
24056
|
+
var needsClassNames = false;
|
|
24057
|
+
var needsNthChild = false;
|
|
24058
|
+
var ownIndex = -1;
|
|
24059
|
+
var elementIndex = -1;
|
|
24060
|
+
var siblings = parent.children;
|
|
24061
|
+
for (var i = 0; (ownIndex === -1 || !needsNthChild) && i < siblings.length; ++i) {
|
|
24062
|
+
var sibling = siblings[i];
|
|
24063
|
+
if (sibling.nodeType !== Node.ELEMENT_NODE) continue;
|
|
24064
|
+
elementIndex += 1;
|
|
24065
|
+
if (sibling === node) {
|
|
24066
|
+
ownIndex = elementIndex;
|
|
24067
|
+
continue;
|
|
24068
|
+
}
|
|
24069
|
+
if (needsNthChild) continue;
|
|
24070
|
+
if (sibling.nodeName.toLowerCase() !== nodeName.toLowerCase()) continue;
|
|
24071
|
+
needsClassNames = true;
|
|
24072
|
+
var ownClassNames = new Set(prefixedOwnClassNamesArray);
|
|
24073
|
+
if (!ownClassNames.size) {
|
|
24074
|
+
needsNthChild = true;
|
|
24075
|
+
continue;
|
|
24076
|
+
}
|
|
24077
|
+
var siblingClassNamesArray = prefixedElementClassNames(sibling);
|
|
24078
|
+
for (var j = 0; j < siblingClassNamesArray.length; ++j) {
|
|
24079
|
+
var siblingClass = siblingClassNamesArray[j];
|
|
24080
|
+
if (!ownClassNames.has(siblingClass)) continue;
|
|
24081
|
+
ownClassNames["delete"](siblingClass);
|
|
24082
|
+
if (!ownClassNames.size) {
|
|
24083
|
+
needsNthChild = true;
|
|
24084
|
+
break;
|
|
24085
|
+
}
|
|
24086
|
+
}
|
|
24087
|
+
}
|
|
24088
|
+
var result = nodeName.toLowerCase();
|
|
24089
|
+
if (isTargetNode && nodeName.toLowerCase() === "input" && node.getAttribute("type") && !node.getAttribute("id") && !node.getAttribute("class")) result += '[type="' + node.getAttribute("type") + '"]';
|
|
24090
|
+
if (needsNthChild) {
|
|
24091
|
+
result += ":nth-child(" + (ownIndex + 1) + ")";
|
|
24092
|
+
} else if (needsClassNames) {
|
|
24093
|
+
// eslint-disable-next-line no-unused-vars
|
|
24094
|
+
for (var prefixedName in prefixedOwnClassNamesArray) result += "." + escapeIdentifierIfNeeded(prefixedOwnClassNamesArray[prefixedName].substr(1));
|
|
24095
|
+
}
|
|
24096
|
+
return new DOMNodePathStep(result, false);
|
|
24097
|
+
});
|
|
24098
|
+
this.uiConfig = config;
|
|
24099
|
+
this.rtmInstance = rtmInstance;
|
|
24100
|
+
this.configId = messageConfig.configId;
|
|
24101
|
+
this.name = messageConfig.configName;
|
|
24102
|
+
this.terminationConfig = terminationConfig;
|
|
24103
|
+
this.showCallback = showCallback;
|
|
24104
|
+
this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
|
|
24105
|
+
this.target = new Target$1(config.target);
|
|
24106
|
+
this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
|
|
24107
|
+
this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
|
|
24108
|
+
this.elementVisibilityRetries = (_this$target$retry$ma = (_this$target = this.target) === null || _this$target === void 0 || (_this$target = _this$target.retry) === null || _this$target === void 0 ? void 0 : _this$target.max_retries) !== null && _this$target$retry$ma !== void 0 ? _this$target$retry$ma : 0;
|
|
24109
|
+
this.badge = new Badge(config.badge);
|
|
24110
|
+
this.enable_marketing = config.enable_marketing;
|
|
24111
|
+
if (this.enable_marketing) this.marketing = new Marketing(config.marketing);
|
|
24112
|
+
this.intraCount = (_this$badge$animation = this.badge.animation) === null || _this$badge$animation === void 0 ? void 0 : _this$badge$animation.intra_count;
|
|
24113
|
+
this.interCount = (_this$badge$animation2 = this.badge.animation) === null || _this$badge$animation2 === void 0 ? void 0 : _this$badge$animation2.inter_count;
|
|
24114
|
+
this.delayMillis = (_this$badge$animation3 = this.badge.animation) === null || _this$badge$animation3 === void 0 ? void 0 : _this$badge$animation3.delay_millis;
|
|
24115
|
+
this.count = 1;
|
|
24116
|
+
this.shineWidth = 0;
|
|
24117
|
+
this.c = 1;
|
|
24118
|
+
this.badgeDummyContainer = null;
|
|
24119
|
+
this.contentLabelWidth = 0;
|
|
24120
|
+
this.contentIconWidth = 0;
|
|
24121
|
+
this.contentWidth = 0;
|
|
24122
|
+
this.labelElementDummy = null;
|
|
24123
|
+
this.iconElementdummy = null;
|
|
24124
|
+
this.targetClicked = false;
|
|
24125
|
+
this.zIndexValue = 1;
|
|
24126
|
+
this.zIndexValueminusOne = 1;
|
|
24127
|
+
this.contentZindexValue = 1;
|
|
24128
|
+
}
|
|
24129
|
+
_createClass(ApxorBadge, [{
|
|
24130
|
+
key: "HGOD",
|
|
24131
|
+
value: function createBadge() {
|
|
24132
|
+
var _this2 = this;
|
|
24133
|
+
var targetFoundCallback = function targetFoundCallback() {
|
|
24134
|
+
var _this2$targetElement;
|
|
24135
|
+
var style = window.getComputedStyle(_this2.targetElement);
|
|
24136
|
+
var zIndexValue = style.getPropertyValue("z-index");
|
|
24137
|
+
var zIndex = parseInt(zIndexValue, 10);
|
|
24138
|
+
(_this2$targetElement = _this2.targetElement) === null || _this2$targetElement === void 0 || _this2$targetElement.classList.add("apx-badge-target-style".concat(_this2.cssPostFix));
|
|
24139
|
+
_this2.zIndexValue = zIndex + 3;
|
|
24140
|
+
_this2.zIndexValueminusOne = zIndex + 1;
|
|
24141
|
+
_this2.contentZindexValue = zIndex + 5;
|
|
24142
|
+
if (isNaN(_this2.zIndex)) {
|
|
24143
|
+
_this2.zIndexValue = 999;
|
|
24144
|
+
_this2.zIndexValueminusOne = 998;
|
|
24145
|
+
_this2.contentZindexValue = 1000;
|
|
24146
|
+
}
|
|
24147
|
+
_this2._setBadgeStyles();
|
|
24148
|
+
_this2._setBadgeContent();
|
|
24149
|
+
_this2._setOnClickTerminationForBadges();
|
|
24150
|
+
_this2.showCallback();
|
|
24151
|
+
};
|
|
24152
|
+
var targetValidCallback = function targetValidCallback() {
|
|
24153
|
+
var isElementVisible = _this2._isElementVisible();
|
|
24154
|
+
if (isElementVisible) {
|
|
24155
|
+
targetFoundCallback();
|
|
24156
|
+
} else {
|
|
24157
|
+
_this2.target.retry.max_retries = _this2.elementVisibilityRetries;
|
|
24158
|
+
_this2._retryFindingTargetElement(true, targetFoundCallback);
|
|
24159
|
+
}
|
|
24160
|
+
};
|
|
24161
|
+
this._setTargetElement(targetValidCallback);
|
|
24162
|
+
}
|
|
24163
|
+
}, {
|
|
24164
|
+
key: "_setTargetElement",
|
|
24165
|
+
value: function _setTargetElement(targetValidCallback) {
|
|
24166
|
+
this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id, this.find_config, this.view_additional_info);
|
|
24167
|
+
if (this.targetElement && this.targetElement.tagName.toLowerCase() === "img") {
|
|
24168
|
+
var wrapperDiv = document.createElement("div");
|
|
24169
|
+
wrapperDiv.classList.add("image-container-".concat(this.configId));
|
|
24170
|
+
wrapperDiv.style.position = "relative";
|
|
24171
|
+
wrapperDiv.style.display = "inline-block";
|
|
24172
|
+
this.targetElement.parentNode.insertBefore(wrapperDiv, this.targetElement);
|
|
24173
|
+
wrapperDiv.appendChild(this.targetElement);
|
|
24174
|
+
this.targetElement = wrapperDiv;
|
|
24175
|
+
}
|
|
24176
|
+
if (!this.targetElement) {
|
|
24177
|
+
if (this.target.enable_retry) {
|
|
24178
|
+
this._retryFindingTargetElement(false, targetValidCallback);
|
|
24179
|
+
}
|
|
24180
|
+
} else {
|
|
24181
|
+
targetValidCallback();
|
|
24182
|
+
}
|
|
24183
|
+
}
|
|
24184
|
+
|
|
24185
|
+
/**
|
|
24186
|
+
* @function _isElementVisible
|
|
24187
|
+
* @private
|
|
24188
|
+
* @description Checks if the element has a visible height and width
|
|
24189
|
+
* @returns {boolean} true - If element is visible
|
|
24190
|
+
* false - If the element is not visible
|
|
24191
|
+
*/
|
|
24192
|
+
}, {
|
|
24193
|
+
key: "_isElementVisible",
|
|
24194
|
+
value: function _isElementVisible() {
|
|
24195
|
+
try {
|
|
24196
|
+
var rect = this.targetElement.getBoundingClientRect();
|
|
24197
|
+
if (rect.width === 0 || rect.height === 0) {
|
|
24198
|
+
return false;
|
|
24199
|
+
}
|
|
24200
|
+
} catch (e) {
|
|
24201
|
+
return false;
|
|
24202
|
+
}
|
|
24203
|
+
return true;
|
|
24204
|
+
}
|
|
24205
|
+
}, {
|
|
24206
|
+
key: "_retryFindingTargetElement",
|
|
24207
|
+
value: function _retryFindingTargetElement() {
|
|
24208
|
+
var _this3 = this;
|
|
24209
|
+
var elementVisibility = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
24210
|
+
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
24211
|
+
//After every find_interval check the DOM for target element.
|
|
24212
|
+
var elementRecheckIntervalId = setInterval(function () {
|
|
24213
|
+
_this3.targetElement = getElementFromSelector(_this3.target.id, _this3.target.frame_id, _this3.find_config, _this3.view_additional_info);
|
|
24214
|
+
if (!elementVisibility) {
|
|
24215
|
+
//If the element is found, stop checking the DOM.
|
|
24216
|
+
if (_this3.targetElement) {
|
|
24217
|
+
clearInterval(elementRecheckIntervalId);
|
|
24218
|
+
callback();
|
|
24219
|
+
} else {
|
|
24220
|
+
_this3.target.retry.max_retries = _this3.target.retry.max_retries - 1;
|
|
24221
|
+
// If the element is not found even after max interval, stop checking
|
|
24222
|
+
if (_this3.target.retry.max_retries <= 0) {
|
|
24223
|
+
clearInterval(elementRecheckIntervalId);
|
|
24224
|
+
console.warn("Element with selector:".concat(_this3.target.id, " not found."));
|
|
24225
|
+
}
|
|
24226
|
+
}
|
|
24227
|
+
} else {
|
|
24228
|
+
var isElementVisible = _this3._isElementVisible();
|
|
24229
|
+
if (isElementVisible) {
|
|
24230
|
+
clearInterval(elementRecheckIntervalId);
|
|
24231
|
+
callback();
|
|
24232
|
+
} else {
|
|
24233
|
+
_this3.target.retry.max_retries = _this3.target.retry.max_retries - 1;
|
|
24234
|
+
// If the element is not visible even after max interval, stop checking
|
|
24235
|
+
if (_this3.target.retry.max_retries <= 0) {
|
|
24236
|
+
clearInterval(elementRecheckIntervalId);
|
|
24237
|
+
}
|
|
24238
|
+
}
|
|
24239
|
+
}
|
|
24240
|
+
}, this.target.retry.interval);
|
|
24241
|
+
}
|
|
24242
|
+
}, {
|
|
24243
|
+
key: "_setBadgeStyles",
|
|
24244
|
+
value: function _setBadgeStyles() {
|
|
24245
|
+
var _this$targetElement2;
|
|
24246
|
+
var styles = "\n ".concat(this._gettargetStyles(), "\n ").concat(this._getBadgeContainerStyles(), "\n ").concat(this._getBadgeContentStyles(), "\n ").concat(this._getBadgeContentElementStyles(), "\n ").concat(this._getBadgeAnimationStyles(), "\n ").concat(this._getBadgeScrollStyles(), "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24247
|
+
var styleNode = document.createElement("style");
|
|
24248
|
+
styleNode.classList.add("apx-main-styles-".concat(this.configId));
|
|
24249
|
+
styleNode.innerHTML = styles;
|
|
24250
|
+
(_this$targetElement2 = this.targetElement) === null || _this$targetElement2 === void 0 || _this$targetElement2.appendChild(styleNode);
|
|
24251
|
+
}
|
|
24252
|
+
}, {
|
|
24253
|
+
key: "_gettargetStyles",
|
|
24254
|
+
value: function _gettargetStyles() {
|
|
24255
|
+
var targetcontainerstyles = "\n .apx-badge-target-style".concat(this.cssPostFix, "{\n position:relative;\n overflow:initial;\n }");
|
|
24256
|
+
return targetcontainerstyles;
|
|
24257
|
+
}
|
|
24258
|
+
}, {
|
|
24259
|
+
key: "_getBadgeContainerStyles",
|
|
24260
|
+
value: function _getBadgeContainerStyles() {
|
|
24261
|
+
var _this$badge$backgroun, _this$badge, _this$badge2, _this$badge3;
|
|
24262
|
+
var dimensionsForBadgeContainer = "";
|
|
24263
|
+
var widthOfBadge = this.badge.enable_background && this.badge.background.shape.enable_border ? this.badge.background.width + this.badge.background.shape.border.width.left + this.badge.background.shape.border.width.right : 0;
|
|
24264
|
+
var heightOfBadge = this.badge.enable_background && this.badge.background.shape.enable_border ? this.badge.background.height + this.badge.background.shape.border.width.top + this.badge.background.shape.border.width.bottom : 0;
|
|
24265
|
+
dimensionsForBadgeContainer = this.badge.enable_background ? "\n width:".concat(widthOfBadge, "px;\n height:").concat(heightOfBadge, "px;") : "\n width:auto;\n height:auto;";
|
|
24266
|
+
var positionForBadgeContainer = "";
|
|
24267
|
+
var offsetX = this.badge.position.offset.x;
|
|
24268
|
+
var offsetY = this.badge.position.offset.y;
|
|
24269
|
+
// Initialize position variables
|
|
24270
|
+
var topValue = "auto";
|
|
24271
|
+
var bottomValue = "auto";
|
|
24272
|
+
var leftValue = "auto";
|
|
24273
|
+
var rightValue = "auto";
|
|
24274
|
+
var badgeHeightBasedOnShape = this.badge.background.shape.type === "circle" ? this.badge.background.width : this.badge.background.height;
|
|
24275
|
+
switch (this.badge.position.position) {
|
|
24276
|
+
case "top-left":
|
|
24277
|
+
topValue = "-".concat(heightOfBadge / 2, "px");
|
|
24278
|
+
leftValue = "-".concat(widthOfBadge / 2, "px");
|
|
24279
|
+
break;
|
|
24280
|
+
case "top-center":
|
|
24281
|
+
case "top":
|
|
24282
|
+
topValue = "calc(".concat(offsetY, "px - ").concat(badgeHeightBasedOnShape / 2, "px + ").concat(-this.badge.background.shape.border.width.top, "px)");
|
|
24283
|
+
leftValue = "calc(50% - ".concat(this.badge.background.width / 2, "px + ").concat(offsetX, "px + ").concat(-this.badge.background.shape.border.width.left, "px)");
|
|
24284
|
+
break;
|
|
24285
|
+
case "top-right":
|
|
24286
|
+
topValue = "-".concat(heightOfBadge / 2, "px");
|
|
24287
|
+
rightValue = "-".concat(widthOfBadge / 2, "px");
|
|
24288
|
+
break;
|
|
24289
|
+
case "bottom-left":
|
|
24290
|
+
bottomValue = "-".concat(heightOfBadge / 2, "px");
|
|
24291
|
+
leftValue = "-".concat(widthOfBadge / 2, "px");
|
|
24292
|
+
break;
|
|
24293
|
+
case "bottom-center":
|
|
24294
|
+
case "bottom":
|
|
24295
|
+
bottomValue = "calc(".concat(-offsetY, "px - ").concat(badgeHeightBasedOnShape / 2, "px + ").concat(-this.badge.background.shape.border.width.bottom, "px)");
|
|
24296
|
+
leftValue = "calc(50% - ".concat(this.badge.background.width / 2, "px + ").concat(offsetX, "px + ").concat(-this.badge.background.shape.border.width.left, "px)");
|
|
24297
|
+
break;
|
|
24298
|
+
case "bottom-right":
|
|
24299
|
+
bottomValue = "-".concat(heightOfBadge / 2, "px");
|
|
24300
|
+
rightValue = "-".concat(widthOfBadge / 2, "px");
|
|
24301
|
+
break;
|
|
24302
|
+
case "center-left":
|
|
24303
|
+
case "left":
|
|
24304
|
+
topValue = "calc(50% - ".concat(badgeHeightBasedOnShape / 2, "px + ").concat(offsetY, "px + ").concat(-this.badge.background.shape.border.width.top, "px)");
|
|
24305
|
+
leftValue = "calc(".concat(offsetX, "px - ").concat(this.badge.background.width / 2, "px + ").concat(-this.badge.background.shape.border.width.left, "px)");
|
|
24306
|
+
break;
|
|
24307
|
+
case "center-right":
|
|
24308
|
+
case "right":
|
|
24309
|
+
topValue = "calc(50% - ".concat(badgeHeightBasedOnShape / 2, "px + ").concat(offsetY, "px + ").concat(-this.badge.background.shape.border.width.top, "px)");
|
|
24310
|
+
rightValue = "calc(".concat(-offsetX, "px - ").concat(this.badge.background.width / 2, "px + ").concat(-this.badge.background.shape.border.width.right, "px)");
|
|
24311
|
+
break;
|
|
24312
|
+
case "center":
|
|
24313
|
+
default:
|
|
24314
|
+
topValue = "calc(50% - ".concat(badgeHeightBasedOnShape / 2, "px + ").concat(offsetY, "px + ").concat(-this.badge.background.shape.border.width.top, "px)");
|
|
24315
|
+
leftValue = "calc(50% - ".concat(this.badge.background.width / 2, "px + ").concat(offsetX, "px + ").concat(-this.badge.background.shape.border.width.left, "px)");
|
|
24316
|
+
break;
|
|
24317
|
+
}
|
|
24318
|
+
|
|
24319
|
+
// Now set the CSS style string
|
|
24320
|
+
positionForBadgeContainer = "\n top: ".concat(topValue, ";\n bottom: ").concat(bottomValue, ";\n left: ").concat(leftValue, ";\n right: ").concat(rightValue, ";\n -webkit-transform: translate(").concat(offsetX, "px, ").concat(offsetY, "px);\n");
|
|
24321
|
+
var backgroundImageForBadgeContainer = "";
|
|
24322
|
+
if (this.badge.enable_background && this.badge.background.enable_image) {
|
|
24323
|
+
backgroundImageForBadgeContainer = "\n .apxor-badge-container-background-image".concat(this.cssPostFix, "{\n background-image: url('").concat(this.badge.background.image.path, "');\n background-repeat: no-repeat;\n background-size: 100% 100%;\n height: ").concat(this.badge.background.height, "px;\n width: ").concat(this.badge.background.width, "px;\n }");
|
|
24324
|
+
}
|
|
24325
|
+
var gradientForBadgeContainer = "";
|
|
24326
|
+
if (this.badge.enable_background && Object.keys(this.badge.background.shape).length !== 0 && this.badge.background.shape.enable_gradient) {
|
|
24327
|
+
gradientForBadgeContainer = "\n background-image:linear-gradient(".concat(this.badge.background.shape.gradient.direction, ", ").concat(this.badge.background.shape.gradient.colors[0], ", ").concat(this.badge.background.shape.gradient.colors[1], ");\n ");
|
|
24328
|
+
}
|
|
24329
|
+
var shapeOfBadgeContainer = "";
|
|
24330
|
+
if (this.badge.enable_background && (_this$badge$backgroun = this.badge.background) !== null && _this$badge$backgroun !== void 0 && _this$badge$backgroun.shape) {
|
|
24331
|
+
var badgeTypeStyles = "";
|
|
24332
|
+
if (!this.badge.background.enable_image) {
|
|
24333
|
+
if (this.badge.background.shape.type === "circle") {
|
|
24334
|
+
badgeTypeStyles = "\n border:".concat(this.badge.background.shape.border.width.top, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-radius:50%;\n background:").concat(this.badge.background.shape.color, ";");
|
|
24335
|
+
} else if (this.badge.background.shape.type === "rectangle") {
|
|
24336
|
+
badgeTypeStyles = "\n background:".concat(this.badge.background.shape.color, ";\n border-top:").concat(this.badge.background.shape.border.width.top, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-right:").concat(this.badge.background.shape.border.width.right, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-bottom:").concat(this.badge.background.shape.border.width.bottom, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-left:").concat(this.badge.background.shape.border.width.left, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-top-left-radius:").concat(this.badge.background.shape.border.corners.top_left, "px;\n border-top-right-radius:").concat(this.badge.background.shape.border.corners.top_right, "px;\n border-bottom-left-radius:").concat(this.badge.background.shape.border.corners.bottom_left, "px;\n border-bottom-right-radius:").concat(this.badge.background.shape.border.corners.bottom_right, "px;\n ");
|
|
24337
|
+
}
|
|
24338
|
+
}
|
|
24339
|
+
shapeOfBadgeContainer = "\n ".concat(badgeTypeStyles, "\n ");
|
|
24340
|
+
}
|
|
24341
|
+
var shadowForBadgeContainer = "";
|
|
24342
|
+
var rippleBorderRadius = ((_this$badge = this.badge) === null || _this$badge === void 0 || (_this$badge = _this$badge.animation) === null || _this$badge === void 0 ? void 0 : _this$badge.rippleShape) === "circle" ? "50%" : "".concat((_this$badge2 = this.badge) === null || _this$badge2 === void 0 || (_this$badge2 = _this$badge2.animation) === null || _this$badge2 === void 0 ? void 0 : _this$badge2.rippleCornerRadius, "px");
|
|
24343
|
+
if (this.badge.enable_shadow) {
|
|
24344
|
+
shadowForBadgeContainer = "\n box-shadow: ".concat(this.badge.shadow.offset_x, "px ").concat(this.badge.shadow.offset_y, "px ").concat(this.badge.shadow.blur_radius, "px ").concat(this.badge.shadow.spread_radius, "px ").concat(this.badge.shadow.color, ";\n ");
|
|
24345
|
+
}
|
|
24346
|
+
var badgeStyles = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n position:absolute;\n display:flex;\n align-items:center;\n overflow:hidden;\n ").concat(gradientForBadgeContainer, "\n ").concat(dimensionsForBadgeContainer, "\n ").concat(positionForBadgeContainer, "\n ").concat(shapeOfBadgeContainer, "\n ").concat(shadowForBadgeContainer, "\n z-index:").concat(this.zIndexValue, ";\n text-transform:none;\n }\n .apxor-badge-container-stylesdummy-").concat(this.cssPostFix, "{\n position:absolute;\n display:flex;\n z-index:").concat(this.zIndexValueminusOne, ";\n align-items:center;\n overflow:hidden;\n width:").concat(this.badge.background.width, "px;\n height:").concat(this.badge.background.height, "px;\n ").concat(positionForBadgeContainer, "\n ").concat(shadowForBadgeContainer, "\n text-transform:none;\n background:").concat((_this$badge3 = this.badge) === null || _this$badge3 === void 0 || (_this$badge3 = _this$badge3.animation) === null || _this$badge3 === void 0 ? void 0 : _this$badge3.rippleColor, ";\n border-radius:").concat(rippleBorderRadius, ";\n }\n ").concat(backgroundImageForBadgeContainer);
|
|
24347
|
+
return badgeStyles;
|
|
24348
|
+
}
|
|
24349
|
+
}, {
|
|
24350
|
+
key: "_getBadgeContentStyles",
|
|
24351
|
+
value: function _getBadgeContentStyles() {
|
|
24352
|
+
var contentScrollStyles = "";
|
|
24353
|
+
if (this.badge.enable_auto_scroll) {
|
|
24354
|
+
contentScrollStyles = this.badge.auto_scroll.direction === "to_right" || this.badge.auto_scroll.direction === "to_left" ? "display:flex;\n flex-direction:row;\n " : "";
|
|
24355
|
+
}
|
|
24356
|
+
var badgeContentStyles = "\n .apxor-badge-content-container-".concat(this.cssPostFix, "{\n position:relative;\n width:100%;\n height:100%;\n overflow:hidden;\n ").concat(contentScrollStyles, "\n }");
|
|
24357
|
+
return badgeContentStyles;
|
|
24358
|
+
}
|
|
24359
|
+
}, {
|
|
24360
|
+
key: "_getBadgeContentElementStyles",
|
|
24361
|
+
value: function _getBadgeContentElementStyles() {
|
|
24362
|
+
var _this$badge$backgroun2,
|
|
24363
|
+
_this4 = this;
|
|
24364
|
+
var badgeContentElementsstyles = "";
|
|
24365
|
+
var justifyContentValue = "";
|
|
24366
|
+
if (((_this$badge$backgroun2 = this.badge.background) === null || _this$badge$backgroun2 === void 0 ? void 0 : _this$badge$backgroun2.width) > this.contentWidth) {
|
|
24367
|
+
justifyContentValue = "center";
|
|
24368
|
+
} else {
|
|
24369
|
+
justifyContentValue = "left";
|
|
24370
|
+
}
|
|
24371
|
+
if (this.badge.content.length !== 0) {
|
|
24372
|
+
this.badge.content.forEach(function (content, ind) {
|
|
24373
|
+
badgeContentElementsstyles += "\n .apxor-badge-contentelement-".concat(ind, "-").concat(_this4.cssPostFix, "{\n width:100%;\n height:100%;\n display: flex;\n justify-content:").concat(justifyContentValue, ";\n align-items:center;\n }");
|
|
24374
|
+
if (content.enable_icon) {
|
|
24375
|
+
var marginForIcon = "";
|
|
24376
|
+
if (content.icon.enable_margin) {
|
|
24377
|
+
marginForIcon = "margin:".concat(content.icon.margin.top, "px ").concat(content.icon.margin.right, "px ").concat(content.icon.margin.bottom, "px ").concat(content.icon.margin.left, "px;");
|
|
24378
|
+
}
|
|
24379
|
+
var borderStylesForIcon = "";
|
|
24380
|
+
if (content.icon.enable_border) {
|
|
24381
|
+
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
|
+
}
|
|
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 }");
|
|
24384
|
+
}
|
|
24385
|
+
if (content.enable_label) {
|
|
24386
|
+
var marginForLabel = "";
|
|
24387
|
+
if (content.label.enable_margin) {
|
|
24388
|
+
marginForLabel = "margin:".concat(content.label.margin.top, "px ").concat(content.label.margin.right, "px ").concat(content.label.margin.bottom, "px ").concat(content.label.margin.left, "px;");
|
|
24389
|
+
}
|
|
24390
|
+
badgeContentElementsstyles += "\n .apxor-badge-".concat(ind, "-label-content-").concat(_this4.cssPostFix, "{\n text-align:").concat(content.label.alignment, ";\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n align-items:center;\n ").concat(marginForLabel, "\n }\n ");
|
|
24391
|
+
}
|
|
24392
|
+
});
|
|
24393
|
+
}
|
|
24394
|
+
return badgeContentElementsstyles;
|
|
24395
|
+
}
|
|
24396
|
+
}, {
|
|
24397
|
+
key: "_getBadgeAnimationStyles",
|
|
24398
|
+
value: function _getBadgeAnimationStyles() {
|
|
24399
|
+
var animationForBadgeContainer = "";
|
|
24400
|
+
var keyframeForAnimation = "";
|
|
24401
|
+
if (this.badge.enable_animation) {
|
|
24402
|
+
var _this$badge$animation4, _this$badge$animation6, _this$badge$animation8, _this$badge$animation10;
|
|
24403
|
+
if (((_this$badge$animation4 = this.badge.animation) === null || _this$badge$animation4 === void 0 ? void 0 : _this$badge$animation4.type) === "shake") {
|
|
24404
|
+
if (this.badge.animation.intra_count == 0) {
|
|
24405
|
+
animationForBadgeContainer = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s infinite;\n }");
|
|
24406
|
+
keyframeForAnimation = this.badge.animation.shakeDirection === "horizontal" ? "@keyframes badgeAnimation {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }" : "@keyframes badgeAnimation {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }";
|
|
24407
|
+
} else {
|
|
24408
|
+
var _this$badge$animation5;
|
|
24409
|
+
animationForBadgeContainer = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ").concat((_this$badge$animation5 = this.badge.animation) === null || _this$badge$animation5 === void 0 ? void 0 : _this$badge$animation5.intra_count, ";\n }");
|
|
24410
|
+
keyframeForAnimation = this.badge.animation.shakeDirection === "horizontal" ? "@keyframes badgeAnimation {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }" : "@keyframes badgeAnimation {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }";
|
|
24411
|
+
}
|
|
24412
|
+
}
|
|
24413
|
+
if (((_this$badge$animation6 = this.badge.animation) === null || _this$badge$animation6 === void 0 ? void 0 : _this$badge$animation6.type) === "fade") {
|
|
24414
|
+
if (this.badge.animation.intra_count == 0) {
|
|
24415
|
+
animationForBadgeContainer = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s infinite;\n }");
|
|
24416
|
+
keyframeForAnimation = "\n @keyframes badgeAnimation {\n 0% { opacity:1;}\n 50% { opacity:".concat(this.badge.animation.fade_opacity / 100, ";}\n 100% { opacity:1}\n }");
|
|
24417
|
+
} else {
|
|
24418
|
+
var _this$badge$animation7;
|
|
24419
|
+
animationForBadgeContainer = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ").concat((_this$badge$animation7 = this.badge.animation) === null || _this$badge$animation7 === void 0 ? void 0 : _this$badge$animation7.intra_count, ";\n }");
|
|
24420
|
+
keyframeForAnimation = "\n @keyframes badgeAnimation {\n 0% { opacity:1;}\n 50% { opacity:".concat(this.badge.animation.fade_opacity / 100, ";}\n 100% { opacity:1}\n }");
|
|
24421
|
+
}
|
|
24422
|
+
}
|
|
24423
|
+
if (((_this$badge$animation8 = this.badge.animation) === null || _this$badge$animation8 === void 0 ? void 0 : _this$badge$animation8.type) === "ripple") {
|
|
24424
|
+
var rippleAreahalf = this.badge.animation.rippleArea / 2;
|
|
24425
|
+
if (this.badge.animation.intra_count == 0) {
|
|
24426
|
+
animationForBadgeContainer = "\n .apxor-badge-container-stylesdummy-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ease-in-out;\n animation-iteration-count: infinite;\n \n }");
|
|
24427
|
+
keyframeForAnimation = "\n @keyframes badgeAnimation {\n 0% {\n box-shadow: 0 0 0 0 ".concat(this.badge.animation.rippleColor, ", 0 0 0 0 ").concat(this.badge.animation.rippleColor, ";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(rippleAreahalf, "px ").concat(this.badge.animation.rippleColor, ", 0 0 0 ").concat(this.badge.animation.rippleArea, "px ").concat(this.badge.animation.rippleColor, ";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(this.badge.animation.rippleColor, ", 0 0 0 0 ").concat(this.badge.animation.rippleColor, ";\n } \n }");
|
|
24428
|
+
} else {
|
|
24429
|
+
var _this$badge$animation9;
|
|
24430
|
+
animationForBadgeContainer = "\n .apxor-badge-container-stylesdummy-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ease-in-out;\n animation-iteration-count: ").concat((_this$badge$animation9 = this.badge.animation) === null || _this$badge$animation9 === void 0 ? void 0 : _this$badge$animation9.intra_count, ";\n }");
|
|
24431
|
+
keyframeForAnimation = "\n @keyframes badgeAnimation {\n 0% {\n box-shadow: 0 0 0 0 ".concat(this.badge.animation.rippleColor, ", 0 0 0 0 ").concat(this.badge.animation.rippleColor, ";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(rippleAreahalf, "px ").concat(this.badge.animation.rippleColor, ", 0 0 0 ").concat(this.badge.animation.rippleArea, "px ").concat(this.badge.animation.rippleColor, ";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(this.badge.animation.rippleColor, ", 0 0 0 0 ").concat(this.badge.animation.rippleColor, ";\n } \n }");
|
|
24432
|
+
}
|
|
24433
|
+
}
|
|
24434
|
+
if (((_this$badge$animation10 = this.badge.animation) === null || _this$badge$animation10 === void 0 ? void 0 : _this$badge$animation10.type) === "shine") {
|
|
24435
|
+
var _this$badge$animation11, _this$badge$animation12, _this$badge$animation13;
|
|
24436
|
+
var transformForMultipleDirection = "";
|
|
24437
|
+
var line1width = (_this$badge$animation11 = this.badge.animation) === null || _this$badge$animation11 === void 0 || (_this$badge$animation11 = _this$badge$animation11.lines[0]) === null || _this$badge$animation11 === void 0 ? void 0 : _this$badge$animation11.width;
|
|
24438
|
+
var line2width = (_this$badge$animation12 = (_this$badge$animation13 = this.badge.animation) === null || _this$badge$animation13 === void 0 || (_this$badge$animation13 = _this$badge$animation13.lines[1]) === null || _this$badge$animation13 === void 0 ? void 0 : _this$badge$animation13.width) !== null && _this$badge$animation12 !== void 0 ? _this$badge$animation12 : 0;
|
|
24439
|
+
var biggestLineWidth = Math.max(line1width, line2width);
|
|
24440
|
+
var animationStartLeft = this.badge.background.width + biggestLineWidth;
|
|
24441
|
+
var lines = this.badge.animation.lines;
|
|
24442
|
+
var lines_length = lines.length;
|
|
24443
|
+
var lines_total_width = 0;
|
|
24444
|
+
var lines_color = this.badge.animation.shineColor;
|
|
24445
|
+
if (lines_length === 1) {
|
|
24446
|
+
lines_total_width = this.badge.animation.lines[0].width;
|
|
24447
|
+
} else {
|
|
24448
|
+
lines_total_width = this.badge.animation.lines_gap + line1width + line2width;
|
|
24449
|
+
}
|
|
24450
|
+
switch (this.badge.animation.shineDirection) {
|
|
24451
|
+
case "to_bottom_right":
|
|
24452
|
+
transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;\n transform: skewx(-30deg)\n ");
|
|
24453
|
+
break;
|
|
24454
|
+
case "to_top_right":
|
|
24455
|
+
transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;\n transform: skewx(30deg)\n ");
|
|
24456
|
+
break;
|
|
24457
|
+
case "to_top_left":
|
|
24458
|
+
transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;\n transform: skewx(-30deg)\n ");
|
|
24459
|
+
break;
|
|
24460
|
+
case "to_bottom_left":
|
|
24461
|
+
transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;\n transform: skewx(30deg)\n ");
|
|
24462
|
+
break;
|
|
24463
|
+
}
|
|
24464
|
+
if (this.badge.animation.intra_count == 0) {
|
|
24465
|
+
animationForBadgeContainer = "\n .apxor-badge-content-container-".concat(this.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 z-index:").concat(this.contentZindexValue, ";\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s infinite;\n ").concat(transformForMultipleDirection, ";\n }");
|
|
24466
|
+
} else {
|
|
24467
|
+
var _this$badge$animation14;
|
|
24468
|
+
animationForBadgeContainer = "\n .apxor-badge-content-container-".concat(this.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(this.badge.animation.duration_millis, "s ").concat((_this$badge$animation14 = this.badge.animation) === null || _this$badge$animation14 === void 0 ? void 0 : _this$badge$animation14.intra_count, ";\n ").concat(transformForMultipleDirection, ";\n }");
|
|
24469
|
+
}
|
|
24470
|
+
keyframeForAnimation = this.badge.animation.shineDirection === "to_bottom_right" || this.badge.animation.shineDirection === "to_top_right" ? "@keyframes badgeAnimation {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }" : "@keyframes badgeAnimation {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }";
|
|
24471
|
+
}
|
|
24472
|
+
}
|
|
24473
|
+
var animationStyles = "\n ".concat(animationForBadgeContainer, "\n ").concat(keyframeForAnimation, "\n ");
|
|
24474
|
+
return animationStyles;
|
|
24475
|
+
}
|
|
24476
|
+
}, {
|
|
24477
|
+
key: "_getBadgeScrollStyles",
|
|
24478
|
+
value: function _getBadgeScrollStyles() {
|
|
24479
|
+
var badgeScrollstyles = "";
|
|
24480
|
+
if (this.badge.enable_auto_scroll) {
|
|
24481
|
+
if (this.badge.auto_scroll.direction === "to_top" || this.badge.auto_scroll.direction === "to_bottom") {
|
|
24482
|
+
badgeScrollstyles = "\n #apxor-scroll-option".concat(this.cssPostFix, "{\n width: inherit;\n height: inherit;\n animation: scrollAnimation ").concat(this.badge.auto_scroll.duration_millis, "s linear infinite;\n }");
|
|
24483
|
+
}
|
|
24484
|
+
if (this.badge.auto_scroll.direction === "to_left" || this.badge.auto_scroll.direction === "to_right") {
|
|
24485
|
+
badgeScrollstyles = "\n #apxor-scroll-option".concat(this.cssPostFix, "{\n width: inherit;\n height: inherit;\n animation: scrollText ").concat(this.badge.auto_scroll.duration_millis, "s linear infinite;\n }");
|
|
24486
|
+
}
|
|
24487
|
+
}
|
|
24488
|
+
return badgeScrollstyles;
|
|
24489
|
+
}
|
|
24490
|
+
}, {
|
|
24491
|
+
key: "_getBadgeScrollKeyFrameStyles",
|
|
24492
|
+
value: function _getBadgeScrollKeyFrameStyles(numberOfElement) {
|
|
24493
|
+
var _this$badge4, _this$badge$enable_au, _this$badge6, _this$targetElement3;
|
|
24494
|
+
var keyFrameStyles = "";
|
|
24495
|
+
var translateValue;
|
|
24496
|
+
var scrollRatio;
|
|
24497
|
+
var translateModifyingValue;
|
|
24498
|
+
scrollRatio = 1;
|
|
24499
|
+
if (((_this$badge4 = this.badge) === null || _this$badge4 === void 0 ? void 0 : _this$badge4.background.width) > this.contentWidth) {
|
|
24500
|
+
translateValue = "100%";
|
|
24501
|
+
} else {
|
|
24502
|
+
var _this$badge5;
|
|
24503
|
+
scrollRatio = this.contentWidth / ((_this$badge5 = this.badge) === null || _this$badge5 === void 0 || (_this$badge5 = _this$badge5.background) === null || _this$badge5 === void 0 ? void 0 : _this$badge5.width);
|
|
24504
|
+
translateModifyingValue = scrollRatio * 100;
|
|
24505
|
+
translateValue = "".concat(translateModifyingValue, "%");
|
|
24506
|
+
}
|
|
24507
|
+
if ((_this$badge$enable_au = !this.badge.enable_auto_scroll) !== null && _this$badge$enable_au !== void 0 ? _this$badge$enable_au : !((_this$badge6 = this.badge) !== null && _this$badge6 !== void 0 && _this$badge6.enable_animation)) {
|
|
24508
|
+
return;
|
|
24509
|
+
}
|
|
24510
|
+
switch (this.badge.auto_scroll.direction) {
|
|
24511
|
+
case "to_bottom":
|
|
24512
|
+
keyFrameStyles = "\n @keyframes scrollAnimation {\n 0% {\n transform: translateY(-".concat(numberOfElement * 100, "%);\n }\n 100% {\n transform: translateY(100%);\n }\n }\n ");
|
|
24513
|
+
break;
|
|
24514
|
+
case "to_top":
|
|
24515
|
+
keyFrameStyles = "\n @keyframes scrollAnimation {\n 0% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(-".concat(numberOfElement * 100, "%);\n }\n }\n ");
|
|
24516
|
+
break;
|
|
24517
|
+
case "to_left":
|
|
24518
|
+
keyFrameStyles = "\n @keyframes scrollText {\n from {\n transform: translate3d(100%, 0, 0);\n }\n to {\n transform: translate3d(-".concat(translateValue, ", 0, 0);\n }\n }\n ");
|
|
24519
|
+
break;
|
|
24520
|
+
case "to_right":
|
|
24521
|
+
keyFrameStyles = "\n @keyframes scrollText {\n from {\n transform: translate3d(-".concat(translateValue, ", 0, 0);\n }\n to {\n transform: translate3d(100%, 0, 0);\n }\n }\n ");
|
|
24522
|
+
break;
|
|
24523
|
+
}
|
|
24524
|
+
var keyFrameForScrollAnimation = "\n ".concat(keyFrameStyles, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24525
|
+
var styleNode = document.createElement("style");
|
|
24526
|
+
styleNode.innerHTML = keyFrameForScrollAnimation;
|
|
24527
|
+
(_this$targetElement3 = this.targetElement) === null || _this$targetElement3 === void 0 || _this$targetElement3.appendChild(styleNode);
|
|
24528
|
+
}
|
|
24529
|
+
}, {
|
|
24530
|
+
key: "_setBadgeContent",
|
|
24531
|
+
value: function _setBadgeContent() {
|
|
24532
|
+
this.createBadgeContainer();
|
|
24533
|
+
this.createBadgeContent();
|
|
24534
|
+
this.animationStop();
|
|
24535
|
+
}
|
|
24536
|
+
}, {
|
|
24537
|
+
key: "animationStop",
|
|
24538
|
+
value: function animationStop() {
|
|
24539
|
+
var _this$badge$animation15, _this$badge$animation16, _this$badge$animation17, _this$badge$animation18;
|
|
24540
|
+
var badgeContainerClass = ".apxor-badge-container-styles-".concat(this.cssPostFix);
|
|
24541
|
+
var badgeAnimationElement = document.querySelector(badgeContainerClass);
|
|
24542
|
+
var badgeContainerClassdummy = ".apxor-badge-container-stylesdummy-".concat(this.cssPostFix);
|
|
24543
|
+
var badgeAnimationElementdummy = document.querySelector(badgeContainerClassdummy);
|
|
24544
|
+
if (((_this$badge$animation15 = this.badge.animation) === null || _this$badge$animation15 === void 0 ? void 0 : _this$badge$animation15.type) === "shake" && this.badge.animation.intra_count != 0 && this.badge.enable_animation) {
|
|
24545
|
+
badgeAnimationElement.addEventListener("animationend", this.shakeAnimationRepeatFunction);
|
|
24546
|
+
} else if (((_this$badge$animation16 = this.badge.animation) === null || _this$badge$animation16 === void 0 ? void 0 : _this$badge$animation16.type) === "fade" && this.badge.animation.intra_count != 0 && this.badge.enable_animation) {
|
|
24547
|
+
badgeAnimationElement.addEventListener("animationend", this.fadeAnimationRepeatFunction);
|
|
24548
|
+
} else if (((_this$badge$animation17 = this.badge.animation) === null || _this$badge$animation17 === void 0 ? void 0 : _this$badge$animation17.type) === "ripple" && this.badge.animation.intra_count != 0 && this.badge.enable_animation) {
|
|
24549
|
+
badgeAnimationElementdummy.addEventListener("animationend", this.rippleAnimationRepeatFunction);
|
|
24550
|
+
} else if (((_this$badge$animation18 = this.badge.animation) === null || _this$badge$animation18 === void 0 ? void 0 : _this$badge$animation18.type) === "shine" && this.badge.animation.intra_count != 0 && this.badge.enable_animation) {
|
|
24551
|
+
badgeAnimationElement.addEventListener("animationend", this.shineAnimationRepeatFunction);
|
|
24552
|
+
}
|
|
24553
|
+
}
|
|
24554
|
+
}, {
|
|
24555
|
+
key: "shakeAnimationRepeat",
|
|
24556
|
+
value: function shakeAnimationRepeat(interCount, delayMillis) {
|
|
24557
|
+
var _this5 = this;
|
|
24558
|
+
var badgeContainerClass = ".apxor-badge-container-styles-".concat(this.cssPostFix);
|
|
24559
|
+
var badgeAnimationElement = document.querySelector(badgeContainerClass);
|
|
24560
|
+
if (interCount != 0) {
|
|
24561
|
+
if (this.count === interCount) {
|
|
24562
|
+
badgeAnimationElement.removeEventListener("animationend", this.shakeAnimationRepeatFunction);
|
|
24563
|
+
}
|
|
24564
|
+
}
|
|
24565
|
+
var repeatAnimation = function repeatAnimation() {
|
|
24566
|
+
if (_this5.count < interCount) {
|
|
24567
|
+
var _this5$badge$animatio, _this5$targetElement;
|
|
24568
|
+
var animationForBadgeContainernew = "";
|
|
24569
|
+
var keyframeForAnimationnew = "";
|
|
24570
|
+
animationForBadgeContainernew = "\n .apxor-badge-container-styles-".concat(_this5.cssPostFix, "{\n animation: badgeAnimation").concat(_this5.count, " ").concat(_this5.badge.animation.duration_millis, "s ").concat((_this5$badge$animatio = _this5.badge.animation) === null || _this5$badge$animatio === void 0 ? void 0 : _this5$badge$animatio.intra_count, ";\n }");
|
|
24571
|
+
keyframeForAnimationnew = _this5.badge.animation.shakeDirection === "horizontal" ? "@keyframes badgeAnimation".concat(_this5.count, " {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }") : "@keyframes badgeAnimation".concat(_this5.count, " {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }");
|
|
24572
|
+
var animationStyles = "\n ".concat(animationForBadgeContainernew, "\n ").concat(keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24573
|
+
var newstyleNode = document.createElement("style");
|
|
24574
|
+
newstyleNode.innerHTML = animationStyles;
|
|
24575
|
+
(_this5$targetElement = _this5.targetElement) === null || _this5$targetElement === void 0 || _this5$targetElement.appendChild(newstyleNode);
|
|
24576
|
+
if (_this5.badge.animation.inter_count != 0) {
|
|
24577
|
+
_this5.count = _this5.count + 1;
|
|
24578
|
+
}
|
|
24579
|
+
_this5.animationStop();
|
|
24580
|
+
} else if (interCount == 0) {
|
|
24581
|
+
var _this5$badge$animatio2, _this5$targetElement2;
|
|
24582
|
+
var _animationForBadgeContainernew = "";
|
|
24583
|
+
var _keyframeForAnimationnew = "";
|
|
24584
|
+
_animationForBadgeContainernew = "\n .apxor-badge-container-styles-".concat(_this5.cssPostFix, "{\n animation: badgeAnimation").concat(_this5.c, " ").concat(_this5.badge.animation.duration_millis, "s ").concat((_this5$badge$animatio2 = _this5.badge.animation) === null || _this5$badge$animatio2 === void 0 ? void 0 : _this5$badge$animatio2.intra_count, ";\n }");
|
|
24585
|
+
_keyframeForAnimationnew = _this5.badge.animation.shakeDirection === "horizontal" ? "@keyframes badgeAnimation".concat(_this5.c, " {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }") : "@keyframes badgeAnimation".concat(_this5.c, " {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }");
|
|
24586
|
+
var _animationStyles = "\n ".concat(_animationForBadgeContainernew, "\n ").concat(_keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24587
|
+
var newstyleNode1 = document.createElement("style");
|
|
24588
|
+
newstyleNode1.innerHTML = _animationStyles;
|
|
24589
|
+
(_this5$targetElement2 = _this5.targetElement) === null || _this5$targetElement2 === void 0 || _this5$targetElement2.appendChild(newstyleNode1);
|
|
24590
|
+
_this5.animationStop();
|
|
24591
|
+
_this5.c = _this5.c + 1;
|
|
24592
|
+
}
|
|
24593
|
+
};
|
|
24594
|
+
setTimeout(repeatAnimation, delayMillis);
|
|
24595
|
+
}
|
|
24596
|
+
}, {
|
|
24597
|
+
key: "fadeAnimationRepeat",
|
|
24598
|
+
value: function fadeAnimationRepeat(interCount, delayMillis) {
|
|
24599
|
+
var _this6 = this;
|
|
24600
|
+
var badgeContainerClass = ".apxor-badge-container-styles-".concat(this.cssPostFix);
|
|
24601
|
+
var badgeAnimationElement = document.querySelector(badgeContainerClass);
|
|
24602
|
+
if (interCount != 0) {
|
|
24603
|
+
if (this.count === interCount) {
|
|
24604
|
+
badgeAnimationElement.removeEventListener("animationend", this.fadeAnimationRepeatFunction);
|
|
24605
|
+
}
|
|
24606
|
+
}
|
|
24607
|
+
var repeatAnimation = function repeatAnimation() {
|
|
24608
|
+
if (_this6.count < interCount) {
|
|
24609
|
+
var _this6$badge$animatio, _this6$targetElement;
|
|
24610
|
+
var animationForBadgeContainernew = "";
|
|
24611
|
+
var keyframeForAnimationnew = "";
|
|
24612
|
+
animationForBadgeContainernew = "\n .apxor-badge-container-styles-".concat(_this6.cssPostFix, "{\n animation: badgeAnimation").concat(_this6.count, " ").concat(_this6.badge.animation.duration_millis, "s ").concat((_this6$badge$animatio = _this6.badge.animation) === null || _this6$badge$animatio === void 0 ? void 0 : _this6$badge$animatio.intra_count, ";\n }");
|
|
24613
|
+
keyframeForAnimationnew = "\n @keyframes badgeAnimation".concat(_this6.count, " {\n 0% { opacity:1;}\n 50% { opacity:").concat(_this6.badge.animation.fade_opacity / 100, ";}\n 100% { opacity:1}\n }");
|
|
24614
|
+
var animationStyles = "\n ".concat(animationForBadgeContainernew, "\n ").concat(keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24615
|
+
var newstyleNode = document.createElement("style");
|
|
24616
|
+
newstyleNode.innerHTML = animationStyles;
|
|
24617
|
+
(_this6$targetElement = _this6.targetElement) === null || _this6$targetElement === void 0 || _this6$targetElement.appendChild(newstyleNode);
|
|
24618
|
+
if (_this6.badge.animation.inter_count != 0) {
|
|
24619
|
+
_this6.count = _this6.count + 1;
|
|
24620
|
+
}
|
|
24621
|
+
_this6.animationStop();
|
|
24622
|
+
} else if (interCount == 0) {
|
|
24623
|
+
var _this6$badge$animatio2, _this6$targetElement2;
|
|
24624
|
+
var _animationForBadgeContainernew2 = "";
|
|
24625
|
+
var _keyframeForAnimationnew2 = "";
|
|
24626
|
+
_animationForBadgeContainernew2 = "\n .apxor-badge-container-styles-".concat(_this6.cssPostFix, "{\n animation: badgeAnimation").concat(_this6.c, " ").concat(_this6.badge.animation.duration_millis, "s ").concat((_this6$badge$animatio2 = _this6.badge.animation) === null || _this6$badge$animatio2 === void 0 ? void 0 : _this6$badge$animatio2.intra_count, ";\n }");
|
|
24627
|
+
_keyframeForAnimationnew2 = "\n @keyframes badgeAnimation".concat(_this6.c, " {\n 0% { opacity:1;}\n 50% { opacity:").concat(_this6.badge.animation.fade_opacity / 100, ";}\n 100% { opacity:1}\n }");
|
|
24628
|
+
var _animationStyles2 = "\n ".concat(_animationForBadgeContainernew2, "\n ").concat(_keyframeForAnimationnew2, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24629
|
+
var _newstyleNode = document.createElement("style");
|
|
24630
|
+
_newstyleNode.innerHTML = _animationStyles2;
|
|
24631
|
+
(_this6$targetElement2 = _this6.targetElement) === null || _this6$targetElement2 === void 0 || _this6$targetElement2.appendChild(_newstyleNode);
|
|
24632
|
+
_this6.c = _this6.c + 1;
|
|
24633
|
+
_this6.animationStop();
|
|
24634
|
+
}
|
|
24635
|
+
};
|
|
24636
|
+
setTimeout(repeatAnimation, delayMillis);
|
|
24637
|
+
}
|
|
24638
|
+
}, {
|
|
24639
|
+
key: "rippleAnimationRepeat",
|
|
24640
|
+
value: function rippleAnimationRepeat(interCount, delayMillis) {
|
|
24641
|
+
var _this7 = this;
|
|
24642
|
+
var badgeContainerClassdummy = ".apxor-badge-container-stylesdummy-".concat(this.cssPostFix);
|
|
24643
|
+
var badgeAnimationElementdummy = document.querySelector(badgeContainerClassdummy);
|
|
24644
|
+
if (interCount != 0) {
|
|
24645
|
+
if (this.count === interCount) {
|
|
24646
|
+
badgeAnimationElementdummy.removeEventListener("animationend", this.rippleAnimationRepeatFunction);
|
|
24647
|
+
}
|
|
24648
|
+
}
|
|
24649
|
+
var repeatAnimation = function repeatAnimation() {
|
|
24650
|
+
var rippleAreahalf = _this7.badge.animation.rippleArea / 2;
|
|
24651
|
+
if (_this7.count < interCount) {
|
|
24652
|
+
var _this7$badge$animatio, _this7$targetElement;
|
|
24653
|
+
var animationForBadgeContainernew = "";
|
|
24654
|
+
var keyframeForAnimationnew = "";
|
|
24655
|
+
animationForBadgeContainernew = "\n .apxor-badge-container-stylesdummy-".concat(_this7.cssPostFix, "{\n animation: badgeAnimation").concat(_this7.count, " ").concat(_this7.badge.animation.duration_millis, "s ease-in-out;\n animation-iteration-count: ").concat((_this7$badge$animatio = _this7.badge.animation) === null || _this7$badge$animatio === void 0 ? void 0 : _this7$badge$animatio.intra_count, ";\n opacity:1;\n }");
|
|
24656
|
+
keyframeForAnimationnew = "\n @keyframes badgeAnimation".concat(_this7.count, " {\n 0% {\n box-shadow: 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(rippleAreahalf, "px ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 ").concat(_this7.badge.animation.rippleArea, "px ").concat(_this7.badge.animation.rippleColor, ";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ";\n } \n }");
|
|
24657
|
+
var animationStyles = "\n ".concat(animationForBadgeContainernew, "\n ").concat(keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24658
|
+
var newstyleNode = document.createElement("style");
|
|
24659
|
+
newstyleNode.innerHTML = animationStyles;
|
|
24660
|
+
(_this7$targetElement = _this7.targetElement) === null || _this7$targetElement === void 0 || _this7$targetElement.appendChild(newstyleNode);
|
|
24661
|
+
if (_this7.badge.animation.inter_count != 0) {
|
|
24662
|
+
_this7.count = _this7.count + 1;
|
|
24663
|
+
}
|
|
24664
|
+
_this7.animationStop();
|
|
24665
|
+
} else if (interCount == 0) {
|
|
24666
|
+
var _this7$badge$animatio2, _this7$targetElement2;
|
|
24667
|
+
var _animationForBadgeContainernew3 = "";
|
|
24668
|
+
var _keyframeForAnimationnew3 = "";
|
|
24669
|
+
_animationForBadgeContainernew3 = "\n .apxor-badge-container-stylesdummy-".concat(_this7.cssPostFix, "{\n animation: badgeAnimation").concat(_this7.c, " ").concat(_this7.badge.animation.duration_millis, "s ease-in-out;\n animation-iteration-count: ").concat((_this7$badge$animatio2 = _this7.badge.animation) === null || _this7$badge$animatio2 === void 0 ? void 0 : _this7$badge$animatio2.intra_count, ";\n }");
|
|
24670
|
+
_keyframeForAnimationnew3 = "\n @keyframes badgeAnimation".concat(_this7.c, " {\n 0% {\n box-shadow: 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(rippleAreahalf, "px ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 ").concat(_this7.badge.animation.rippleArea, "px ").concat(_this7.badge.animation.rippleColor, ";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ";\n } \n }");
|
|
24671
|
+
var _animationStyles3 = "\n ".concat(_animationForBadgeContainernew3, "\n ").concat(_keyframeForAnimationnew3, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24672
|
+
var _newstyleNode2 = document.createElement("style");
|
|
24673
|
+
_newstyleNode2.innerHTML = _animationStyles3;
|
|
24674
|
+
(_this7$targetElement2 = _this7.targetElement) === null || _this7$targetElement2 === void 0 || _this7$targetElement2.appendChild(_newstyleNode2);
|
|
24675
|
+
_this7.c = _this7.c + 1;
|
|
24676
|
+
_this7.animationStop();
|
|
24677
|
+
}
|
|
24678
|
+
};
|
|
24679
|
+
setTimeout(repeatAnimation, delayMillis);
|
|
24680
|
+
}
|
|
24681
|
+
}, {
|
|
24682
|
+
key: "shineAnimationRepeat",
|
|
24683
|
+
value: function shineAnimationRepeat(interCount, delayMillis) {
|
|
24684
|
+
var _this$badge$animation19,
|
|
24685
|
+
_this$badge$animation20,
|
|
24686
|
+
_this8 = this;
|
|
24687
|
+
var line1width = (_this$badge$animation19 = this.badge.animation) === null || _this$badge$animation19 === void 0 || (_this$badge$animation19 = _this$badge$animation19.lines[0]) === null || _this$badge$animation19 === void 0 ? void 0 : _this$badge$animation19.width;
|
|
24688
|
+
var line2width = (_this$badge$animation20 = this.badge.animation) === null || _this$badge$animation20 === void 0 || (_this$badge$animation20 = _this$badge$animation20.lines[1]) === null || _this$badge$animation20 === void 0 ? void 0 : _this$badge$animation20.width;
|
|
24689
|
+
var biggestLineWidth = Math.max(line1width, line2width);
|
|
24690
|
+
var animationStartLeft = this.badge.background.width + biggestLineWidth;
|
|
24691
|
+
var badgeContainerClass = ".apxor-badge-container-styles-".concat(this.cssPostFix);
|
|
24692
|
+
var badgeAnimationElement = document.querySelector(badgeContainerClass);
|
|
24693
|
+
if (interCount != 0) {
|
|
24694
|
+
if (this.count === interCount) {
|
|
24695
|
+
badgeAnimationElement.removeEventListener("animationend", this.shineAnimationRepeatFunction);
|
|
24696
|
+
}
|
|
24697
|
+
}
|
|
24698
|
+
var repeatAnimation = function repeatAnimation() {
|
|
24699
|
+
var _this8$badge$animatio, _this8$badge$animatio2;
|
|
24700
|
+
var lines_length = _this8.badge.animation.lines.length;
|
|
24701
|
+
var lines_total_width = 0;
|
|
24702
|
+
var lines_color = _this8.badge.animation.shineColor;
|
|
24703
|
+
var line1width = (_this8$badge$animatio = _this8.badge.animation) === null || _this8$badge$animatio === void 0 || (_this8$badge$animatio = _this8$badge$animatio.lines[0]) === null || _this8$badge$animatio === void 0 ? void 0 : _this8$badge$animatio.width;
|
|
24704
|
+
var line2width = (_this8$badge$animatio2 = _this8.badge.animation) === null || _this8$badge$animatio2 === void 0 || (_this8$badge$animatio2 = _this8$badge$animatio2.lines[1]) === null || _this8$badge$animatio2 === void 0 ? void 0 : _this8$badge$animatio2.width;
|
|
24705
|
+
if (lines_length === 1) {
|
|
24706
|
+
lines_total_width = _this8.badge.animation.lines[0].width;
|
|
24707
|
+
} else {
|
|
24708
|
+
lines_total_width = _this8.badge.animation.lines_gap + line1width + line2width;
|
|
24709
|
+
}
|
|
24710
|
+
if (_this8.count < interCount) {
|
|
24711
|
+
var _this8$badge$animatio3, _this8$targetElement;
|
|
24712
|
+
var animationForBadgeContainernew = "";
|
|
24713
|
+
var keyframeForAnimationnew = "";
|
|
24714
|
+
var transformForMultipleDirection = "";
|
|
24715
|
+
switch (_this8.badge.animation.shineDirection) {
|
|
24716
|
+
case "to_bottom_right":
|
|
24717
|
+
transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;\n transform: skewx(-30deg)\n ");
|
|
24718
|
+
break;
|
|
24719
|
+
case "to_top_right":
|
|
24720
|
+
transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "pxx;\n transform: skewx(30deg)\n ");
|
|
24721
|
+
break;
|
|
24722
|
+
case "to_top_left":
|
|
24723
|
+
transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;\n transform: skewx(-30deg)\n ");
|
|
24724
|
+
break;
|
|
24725
|
+
case "to_bottom_left":
|
|
24726
|
+
transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;\n transform: skewx(30deg)\n ");
|
|
24727
|
+
break;
|
|
24728
|
+
}
|
|
24729
|
+
animationForBadgeContainernew = "\n .apxor-badge-content-container-".concat(_this8.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n background:transparent;\n z-index:").concat(_this8.contentZindexValue, ";\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.count, " ").concat(_this8.badge.animation.duration_millis, "s ").concat((_this8$badge$animatio3 = _this8.badge.animation) === null || _this8$badge$animatio3 === void 0 ? void 0 : _this8$badge$animatio3.intra_count, ";\n ").concat(transformForMultipleDirection, ";\n }");
|
|
24730
|
+
keyframeForAnimationnew = _this8.badge.animation.shineDirection === "to_bottom_right" || _this8.badge.animation.shineDirection === "to_top_right" ? "@keyframes badgeAnimation".concat(_this8.count, " {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }") : "@keyframes badgeAnimation".concat(_this8.count, " {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");
|
|
24731
|
+
var animationStyles = "\n ".concat(animationForBadgeContainernew, "\n ").concat(keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24732
|
+
var newstyleNode = document.createElement("style");
|
|
24733
|
+
newstyleNode.innerHTML = animationStyles;
|
|
24734
|
+
(_this8$targetElement = _this8.targetElement) === null || _this8$targetElement === void 0 || _this8$targetElement.appendChild(newstyleNode);
|
|
24735
|
+
if (_this8.badge.animation.inter_count != 0) {
|
|
24736
|
+
_this8.count = _this8.count + 1;
|
|
24737
|
+
}
|
|
24738
|
+
_this8.animationStop();
|
|
24739
|
+
} else if (interCount == 0) {
|
|
24740
|
+
var _this8$badge$animatio4, _this8$targetElement2;
|
|
24741
|
+
var _animationForBadgeContainernew4 = "";
|
|
24742
|
+
var _keyframeForAnimationnew4 = "";
|
|
24743
|
+
var _transformForMultipleDirection = "";
|
|
24744
|
+
switch (_this8.badge.animation.shineDirection) {
|
|
24745
|
+
case "to_bottom_right":
|
|
24746
|
+
_transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;;\n transform: skewx(-30deg)\n ");
|
|
24747
|
+
break;
|
|
24748
|
+
case "to_top_right":
|
|
24749
|
+
_transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;;\n transform: skewx(30deg)\n ");
|
|
24750
|
+
break;
|
|
24751
|
+
case "to_top_left":
|
|
24752
|
+
_transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;;\n transform: skewx(-30deg)\n ");
|
|
24753
|
+
break;
|
|
24754
|
+
case "to_bottom_left":
|
|
24755
|
+
_transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;;\n transform: skewx(30deg)\n ");
|
|
24756
|
+
break;
|
|
24757
|
+
}
|
|
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 }");
|
|
24759
|
+
_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
|
+
var _animationStyles4 = "\n ".concat(_animationForBadgeContainernew4, "\n ").concat(_keyframeForAnimationnew4, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24761
|
+
var _newstyleNode3 = document.createElement("style");
|
|
24762
|
+
_newstyleNode3.innerHTML = _animationStyles4;
|
|
24763
|
+
(_this8$targetElement2 = _this8.targetElement) === null || _this8$targetElement2 === void 0 || _this8$targetElement2.appendChild(_newstyleNode3);
|
|
24764
|
+
_this8.c = _this8.c + 1;
|
|
24765
|
+
_this8.animationStop();
|
|
24766
|
+
}
|
|
24767
|
+
};
|
|
24768
|
+
setTimeout(repeatAnimation, delayMillis);
|
|
24769
|
+
}
|
|
24770
|
+
}, {
|
|
24771
|
+
key: "createBadgeContainer",
|
|
24772
|
+
value: function createBadgeContainer() {
|
|
24773
|
+
this.badgeContainer = document.createElement("div");
|
|
24774
|
+
this.badgeDummyContainer = document.createElement("div");
|
|
24775
|
+
this.badgeContainer.id = "apxor-badge-container-".concat("-".concat(this.configId).replaceAll(" ", "").replace(/[^\w\s]/gi, ""));
|
|
24776
|
+
this.badgeContainer.classList.add("apxor-badge-container");
|
|
24777
|
+
this.badgeContainer.classList.add("apxor-badge-container-styles-".concat(this.cssPostFix));
|
|
24778
|
+
this.badgeDummyContainer.classList.add("apxor-badge-container");
|
|
24779
|
+
if (this.badge.enable_animation) {
|
|
24780
|
+
this.badgeDummyContainer.classList.add("apxor-badge-container-stylesdummy-".concat(this.cssPostFix));
|
|
24781
|
+
}
|
|
24782
|
+
if (this.badge.enable_background && this.badge.background.enable_image) {
|
|
24783
|
+
this.badgeContainer.classList.add("apxor-badge-container-background-image".concat(this.cssPostFix));
|
|
24784
|
+
}
|
|
24785
|
+
this.targetElement.appendChild(this.badgeContainer);
|
|
24786
|
+
this.targetElement.appendChild(this.badgeDummyContainer);
|
|
24787
|
+
}
|
|
24788
|
+
}, {
|
|
24789
|
+
key: "createBadgeContent",
|
|
24790
|
+
value: function createBadgeContent() {
|
|
24791
|
+
var _this$badge7,
|
|
24792
|
+
_this9 = this;
|
|
24793
|
+
this.badgeContent = document.createElement("div");
|
|
24794
|
+
this.badgeContent.classList.add("apxor-badge-content-container-".concat(this.cssPostFix));
|
|
24795
|
+
if ((_this$badge7 = this.badge) !== null && _this$badge7 !== void 0 && _this$badge7.content && this.badge.content.length !== 0) {
|
|
24796
|
+
this.badge.content.forEach(function (content, ind) {
|
|
24797
|
+
var _content$icon, _content$icon2;
|
|
24798
|
+
_this9.badgeContentElement = document.createElement("div");
|
|
24799
|
+
_this9.badgeContentElement.classList.add("apxor-badge-contentelement-".concat(ind, "-").concat(_this9.cssPostFix));
|
|
24800
|
+
_this9.badgeContentElement.setAttribute("id", "apxor-scroll-option".concat(_this9.cssPostFix));
|
|
24801
|
+
if (content.enable_icon && (_content$icon = content.icon) !== null && _content$icon !== void 0 && _content$icon.position && content.icon.position === "left") {
|
|
24802
|
+
var iconContainer = document.createElement("div");
|
|
24803
|
+
iconContainer.classList.add("apxor-badge-".concat(ind, "-icon-container").concat(_this9.cssPostFix));
|
|
24804
|
+
var iconElement = document.createElement("div");
|
|
24805
|
+
iconElement.classList.add("apxor-badge-".concat(ind, "-icon-content").concat(_this9.cssPostFix));
|
|
24806
|
+
iconContainer.appendChild(iconElement);
|
|
24807
|
+
_this9.iconElementdummy = iconContainer;
|
|
24808
|
+
_this9.badgeContentElement.appendChild(iconContainer);
|
|
24809
|
+
}
|
|
24810
|
+
if (content.enable_label) {
|
|
24811
|
+
var labelElement = document.createElement("div");
|
|
24812
|
+
labelElement.classList.add("apxor-badge-".concat(ind, "-label-content-").concat(_this9.cssPostFix));
|
|
24813
|
+
labelElement.appendChild(createNewTextElement(content.label, _this9.configId, "label-content-".concat(ind)));
|
|
24814
|
+
_this9.labelElementDummy = labelElement;
|
|
24815
|
+
_this9.badgeContentElement.appendChild(labelElement);
|
|
24816
|
+
}
|
|
24817
|
+
if (content.enable_icon && (_content$icon2 = content.icon) !== null && _content$icon2 !== void 0 && _content$icon2.position && content.icon.position === "right") {
|
|
24818
|
+
var _iconContainer = document.createElement("div");
|
|
24819
|
+
_iconContainer.classList.add("apxor-badge-".concat(ind, "-icon-container").concat(_this9.cssPostFix));
|
|
24820
|
+
var _iconElement = document.createElement("div");
|
|
24821
|
+
_iconElement.classList.add("apxor-badge-".concat(ind, "-icon-content").concat(_this9.cssPostFix));
|
|
24822
|
+
_iconContainer.appendChild(_iconElement);
|
|
24823
|
+
_this9.iconElementdummy = _iconContainer;
|
|
24824
|
+
_this9.badgeContentElement.appendChild(_iconContainer);
|
|
24825
|
+
}
|
|
24826
|
+
if (_this9.badge.enable_auto_scroll === true && ind == 0 && (_this9.badge.auto_scroll.direction === "to_left" || _this9.badge.auto_scroll.direction === "to_right")) {
|
|
24827
|
+
_this9.badgeContent.appendChild(_this9.badgeContentElement);
|
|
24828
|
+
} else {
|
|
24829
|
+
if (_this9.badge.enable_auto_scroll === true && ind === 0) {
|
|
24830
|
+
_this9.badgeContent.appendChild(_this9.badgeContentElement);
|
|
24831
|
+
} else if (_this9.badge.enable_auto_scroll === true && (_this9.badge.auto_scroll.direction === "to_top" || _this9.badge.auto_scroll.direction === "to_bottom")) {
|
|
24832
|
+
_this9.badgeContent.appendChild(_this9.badgeContentElement);
|
|
24833
|
+
} else if (_this9.badge.enable_auto_scroll === false) {
|
|
24834
|
+
_this9.badgeContent.appendChild(_this9.badgeContentElement);
|
|
24835
|
+
}
|
|
24836
|
+
}
|
|
24837
|
+
});
|
|
24838
|
+
this.badgeContainer.appendChild(this.badgeContent);
|
|
24839
|
+
if (this.badge.content[0].enable_label) {
|
|
24840
|
+
this.contentLabelWidth = this.labelElementDummy.getBoundingClientRect().width;
|
|
24841
|
+
}
|
|
24842
|
+
if (this.badge.content[0].enable_icon) {
|
|
24843
|
+
var _this$iconElementdumm;
|
|
24844
|
+
this.contentIconWidth = (_this$iconElementdumm = this.iconElementdummy) === null || _this$iconElementdumm === void 0 ? void 0 : _this$iconElementdumm.getBoundingClientRect().width;
|
|
24845
|
+
}
|
|
24846
|
+
this.contentWidth = this.contentLabelWidth + this.contentIconWidth;
|
|
24847
|
+
this._getBadgeScrollKeyFrameStyles(this.badge.content.length);
|
|
24848
|
+
}
|
|
24849
|
+
var contentElement = document.querySelector(".apxor-badge-contentelement-0-".concat(this.cssPostFix));
|
|
24850
|
+
if (this.badge.background.width > this.contentWidth) {
|
|
24851
|
+
contentElement.style.justifyContent = "center";
|
|
24852
|
+
} else {
|
|
24853
|
+
contentElement.style.justifyContent = "left";
|
|
24854
|
+
}
|
|
24855
|
+
}
|
|
24856
|
+
}, {
|
|
24857
|
+
key: "_setOnClickTerminationForBadges",
|
|
24858
|
+
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() {
|
|
24864
|
+
var _window$Apxor, _this10$targetElement;
|
|
24865
|
+
var badge = document.getElementsByClassName("apxor-badge-container-styles-".concat(_this10.cssPostFix));
|
|
24866
|
+
while (badge.length > 0) badge[0].remove();
|
|
24867
|
+
(_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || _window$Apxor.updateBadgeStatus("target_click", _this10.configId);
|
|
24868
|
+
_this10.targetClicked = true;
|
|
24869
|
+
(_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
|
+
}
|
|
24884
|
+
}
|
|
24885
|
+
}]);
|
|
24886
|
+
return ApxorBadge;
|
|
24887
|
+
}();
|
|
24888
|
+
var DOMNodePathStep = function DOMNodePathStep(value, optimized) {
|
|
24889
|
+
this.value = value;
|
|
24890
|
+
this.optimized = optimized || false;
|
|
24891
|
+
};
|
|
24892
|
+
DOMNodePathStep.prototype = {
|
|
24893
|
+
toString: function toString() {
|
|
24894
|
+
return this.value;
|
|
24895
|
+
}
|
|
24896
|
+
};
|
|
24897
|
+
|
|
23472
24898
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
23473
24899
|
var _this = this;
|
|
23474
24900
|
_classCallCheck(this, RTM);
|
|
23475
|
-
_defineProperty(this, "
|
|
24901
|
+
_defineProperty(this, "YRfU", {});
|
|
23476
24902
|
_defineProperty(this, "isShowingAction", false);
|
|
23477
24903
|
_defineProperty(this, "currentAction", null);
|
|
23478
|
-
_defineProperty(this, "
|
|
23479
|
-
_defineProperty(this, "version",
|
|
24904
|
+
_defineProperty(this, "HyJc", null);
|
|
24905
|
+
_defineProperty(this, "version", 91);
|
|
23480
24906
|
_defineProperty(this, "isInitialised", false);
|
|
23481
|
-
_defineProperty(this, "
|
|
23482
|
-
_defineProperty(this, "
|
|
24907
|
+
_defineProperty(this, "lbLW", {});
|
|
24908
|
+
_defineProperty(this, "etai", false);
|
|
23483
24909
|
_defineProperty(this, "_isShownECCalled", false);
|
|
23484
|
-
_defineProperty(this, "
|
|
24910
|
+
_defineProperty(this, "WLeB", function () {
|
|
23485
24911
|
_this.isInitialised = true;
|
|
23486
24912
|
var oldPushState = history.pushState;
|
|
23487
24913
|
history.pushState = function pushState() {
|
|
@@ -23505,19 +24931,19 @@
|
|
|
23505
24931
|
});
|
|
23506
24932
|
});
|
|
23507
24933
|
_defineProperty(this, "show", function (uiJson, duration, uuid, name) {
|
|
24934
|
+
var _window;
|
|
24935
|
+
(_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("logger show");
|
|
23508
24936
|
if (!_this.isInitialised) {
|
|
23509
|
-
_this.
|
|
24937
|
+
_this.WLeB();
|
|
23510
24938
|
}
|
|
23511
24939
|
window.addEventListener("pagehide", function () {
|
|
23512
24940
|
var _window$Apxor, _window$Apxor$pageUnl;
|
|
23513
24941
|
(_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || (_window$Apxor$pageUnl = _window$Apxor.pageUnloaded) === null || _window$Apxor$pageUnl === void 0 || _window$Apxor$pageUnl.call(_window$Apxor, uuid);
|
|
23514
24942
|
});
|
|
23515
24943
|
try {
|
|
23516
|
-
// console.log("Showing action for uuid:", uuid, uiJson, this.currentAction);
|
|
23517
24944
|
if (_this.currentAction !== null && _this.currentAction !== undefined) {
|
|
23518
|
-
var
|
|
23519
|
-
|
|
23520
|
-
(_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("An action already being shown");
|
|
24945
|
+
var _window2;
|
|
24946
|
+
(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.ApxorLogger) === null || _window2 === void 0 || _window2.error("An action already being shown");
|
|
23521
24947
|
return;
|
|
23522
24948
|
}
|
|
23523
24949
|
uiJson = uiJson.split("\n").join("\\n");
|
|
@@ -23533,7 +24959,7 @@
|
|
|
23533
24959
|
} else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
|
|
23534
24960
|
_this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
|
|
23535
24961
|
} else if (ui_config.display_type === "coach_mark_v2") {
|
|
23536
|
-
_this.
|
|
24962
|
+
_this.sYRk(ui_config, duration, uuid, name);
|
|
23537
24963
|
} else {
|
|
23538
24964
|
showCoachmarkWithDelay(_this, ui_config, {
|
|
23539
24965
|
configId: uuid,
|
|
@@ -23541,21 +24967,21 @@
|
|
|
23541
24967
|
}, terminationConfig, function () {
|
|
23542
24968
|
_this.isShowingAction = true;
|
|
23543
24969
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
23544
|
-
var
|
|
23545
|
-
(
|
|
24970
|
+
var _window3, _window3$updateFlag, _window4, _window4$updateCount;
|
|
24971
|
+
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$updateFlag = _window3.updateFlag) === null || _window3$updateFlag === void 0 || _window3$updateFlag.call(_window3, true);
|
|
23546
24972
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
23547
|
-
(
|
|
24973
|
+
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || (_window4$updateCount = _window4.updateCount) === null || _window4$updateCount === void 0 || _window4$updateCount.call(_window4, uuid);
|
|
23548
24974
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
23549
24975
|
setTimeout(function () {
|
|
23550
|
-
var
|
|
23551
|
-
(
|
|
24976
|
+
var _window5, _window5$logInternalE;
|
|
24977
|
+
(_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$logInternalE = _window5.logInternalEvent) === null || _window5$logInternalE === void 0 || _window5$logInternalE.call(_window5, "capt");
|
|
23552
24978
|
}, 500);
|
|
23553
24979
|
}
|
|
23554
24980
|
}
|
|
23555
24981
|
}, function (action) {
|
|
23556
|
-
var
|
|
24982
|
+
var _window6, _window6$updateFlag;
|
|
23557
24983
|
_this.isShowingAction = false;
|
|
23558
|
-
(
|
|
24984
|
+
(_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, false);
|
|
23559
24985
|
_this.currentAction = null;
|
|
23560
24986
|
if (window.Apxor && window.Apxor.logActionEvent && !(isDefined(action) && (action === "redirect" || action === "cancel"))) {
|
|
23561
24987
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
@@ -23565,13 +24991,28 @@
|
|
|
23565
24991
|
});
|
|
23566
24992
|
}
|
|
23567
24993
|
} catch (e) {
|
|
23568
|
-
var
|
|
24994
|
+
var _window7, _window7$updateFlag, _window8;
|
|
23569
24995
|
_this.isShowingAction = false;
|
|
23570
|
-
(
|
|
23571
|
-
|
|
23572
|
-
(_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.ApxorLogger) === null || _window7 === void 0 || _window7.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
|
|
24996
|
+
(_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);
|
|
24997
|
+
(_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.ApxorLogger) === null || _window8 === void 0 || _window8.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
|
|
23573
24998
|
}
|
|
23574
24999
|
});
|
|
25000
|
+
_defineProperty(this, "showBadge", function (uiJson, duration, uuid, name, terminationConfig) {
|
|
25001
|
+
if (!_this.isInitialised) {
|
|
25002
|
+
_this.WLeB();
|
|
25003
|
+
}
|
|
25004
|
+
window.addEventListener("pagehide", function () {
|
|
25005
|
+
var _window$Apxor2, _window$Apxor2$pageUn;
|
|
25006
|
+
(_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 || (_window$Apxor2$pageUn = _window$Apxor2.pageUnloaded) === null || _window$Apxor2$pageUn === void 0 || _window$Apxor2$pageUn.call(_window$Apxor2, uuid);
|
|
25007
|
+
});
|
|
25008
|
+
uiJson = uiJson.split("\n").join("\\n");
|
|
25009
|
+
var ui_config = JSON.parse(uiJson);
|
|
25010
|
+
if (name === "P" || name === "p") {
|
|
25011
|
+
_this.removeBadge(name, uuid);
|
|
25012
|
+
}
|
|
25013
|
+
var termination_config = JSON.parse(terminationConfig);
|
|
25014
|
+
_this.HGOD(ui_config, duration, uuid, name, termination_config);
|
|
25015
|
+
});
|
|
23575
25016
|
_defineProperty(this, "showInApp", function (config, duration, configId, name) {
|
|
23576
25017
|
try {
|
|
23577
25018
|
config = config.split("\n").join("\\n");
|
|
@@ -23581,16 +25022,16 @@
|
|
|
23581
25022
|
_this.createInAppModal(config, duration, configId, name, JSON.parse(config).action_class === "inapp_builder" ? "inapp_builder" : "modal");
|
|
23582
25023
|
}
|
|
23583
25024
|
} catch (e) {
|
|
23584
|
-
var _window$
|
|
23585
|
-
if (((_window$
|
|
23586
|
-
var _window8, _window8$updateFlag;
|
|
23587
|
-
(_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, "IN_APP");
|
|
23588
|
-
} else {
|
|
25025
|
+
var _window$Apxor3, _window11;
|
|
25026
|
+
if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
|
|
23589
25027
|
var _window9, _window9$updateFlag;
|
|
23590
|
-
(_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, "IN_APP"
|
|
25028
|
+
(_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, false, "IN_APP");
|
|
25029
|
+
} else {
|
|
25030
|
+
var _window10, _window10$updateFlag;
|
|
25031
|
+
(_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, "IN_APP", false);
|
|
23591
25032
|
}
|
|
23592
25033
|
console.error(e);
|
|
23593
|
-
(
|
|
25034
|
+
(_window11 = window) === null || _window11 === void 0 || (_window11 = _window11.ApxorLogger) === null || _window11 === void 0 || _window11.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
|
|
23594
25035
|
}
|
|
23595
25036
|
});
|
|
23596
25037
|
_defineProperty(this, "showEmbedCards", function (config, duration, configId, name) {
|
|
@@ -23602,7 +25043,7 @@
|
|
|
23602
25043
|
var ui_config = JSON.parse(config);
|
|
23603
25044
|
_this.createembedCards(ui_config, configId, name);
|
|
23604
25045
|
} catch (e) {
|
|
23605
|
-
var _window$ApxorRTM,
|
|
25046
|
+
var _window$ApxorRTM, _window12;
|
|
23606
25047
|
(_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
|
|
23607
25048
|
campaignName: name,
|
|
23608
25049
|
id: configId,
|
|
@@ -23611,13 +25052,13 @@
|
|
|
23611
25052
|
apx_reason: "".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message)
|
|
23612
25053
|
});
|
|
23613
25054
|
console.error(e);
|
|
23614
|
-
(
|
|
25055
|
+
(_window12 = window) === null || _window12 === void 0 || (_window12 = _window12.ApxorLogger) === null || _window12 === void 0 || _window12.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
|
|
23615
25056
|
}
|
|
23616
25057
|
});
|
|
23617
25058
|
_defineProperty(this, "createembedCards", function (config, configId, name) {
|
|
23618
25059
|
var cardsContainer = new EmbedCards(config, configId, name, function () {
|
|
23619
|
-
var
|
|
23620
|
-
(
|
|
25060
|
+
var _window13, _window$ApxorRTM2;
|
|
25061
|
+
(_window13 = window) === null || _window13 === void 0 || (_window13 = _window13.ApxorLogger) === null || _window13 === void 0 || _window13.debug("successfully showing the nudge");
|
|
23621
25062
|
(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", {
|
|
23622
25063
|
campaignName: name,
|
|
23623
25064
|
id: configId,
|
|
@@ -23625,8 +25066,8 @@
|
|
|
23625
25066
|
}));
|
|
23626
25067
|
_this._isShownECCalled = true;
|
|
23627
25068
|
}, function () {
|
|
23628
|
-
var
|
|
23629
|
-
(
|
|
25069
|
+
var _window14;
|
|
25070
|
+
(_window14 = window) === null || _window14 === void 0 || (_window14 = _window14.ApxorLogger) === null || _window14 === void 0 || _window14.debug("nudge dismissed");
|
|
23630
25071
|
});
|
|
23631
25072
|
cardsContainer.showEmbedCards();
|
|
23632
25073
|
});
|
|
@@ -23634,21 +25075,21 @@
|
|
|
23634
25075
|
try {
|
|
23635
25076
|
config = config.split("\n").join("\\n");
|
|
23636
25077
|
var ui_config = JSON.parse(config);
|
|
23637
|
-
_this.
|
|
25078
|
+
_this.fZFC(ui_config, configId, name, position, slidesSeenCount, view_id);
|
|
23638
25079
|
} catch (e) {
|
|
23639
|
-
var _window$
|
|
23640
|
-
if (((_window$
|
|
23641
|
-
var
|
|
23642
|
-
(
|
|
23643
|
-
(
|
|
25080
|
+
var _window$Apxor4;
|
|
25081
|
+
if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
|
|
25082
|
+
var _window15, _window15$logInternal, _window16, _window16$updateFlag;
|
|
25083
|
+
(_window15 = window) === null || _window15 === void 0 || (_window15 = _window15.Apxor) === null || _window15 === void 0 || (_window15$logInternal = _window15.logInternalEvent) === null || _window15$logInternal === void 0 || _window15$logInternal.call(_window15, "story_slides_closed");
|
|
25084
|
+
(_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, false, "IN_APP");
|
|
23644
25085
|
} else {
|
|
23645
|
-
var
|
|
23646
|
-
(
|
|
25086
|
+
var _window17, _window17$updateFlag;
|
|
25087
|
+
(_window17 = window) === null || _window17 === void 0 || (_window17 = _window17.Apxor) === null || _window17 === void 0 || (_window17$updateFlag = _window17.updateFlag) === null || _window17$updateFlag === void 0 || _window17$updateFlag.call(_window17, "IN_APP", false);
|
|
23647
25088
|
}
|
|
23648
25089
|
console.error(e);
|
|
23649
25090
|
}
|
|
23650
25091
|
});
|
|
23651
|
-
_defineProperty(this, "
|
|
25092
|
+
_defineProperty(this, "fZFC", function (config, configId, name, position, slidesSeenCount, view_id) {
|
|
23652
25093
|
var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
|
|
23653
25094
|
window.Apxor.logAppEvent("apx_nudge_shown", {
|
|
23654
25095
|
campaignName: name,
|
|
@@ -23659,16 +25100,15 @@
|
|
|
23659
25100
|
cardsContainer.showStories();
|
|
23660
25101
|
});
|
|
23661
25102
|
_defineProperty(this, "removeAll", function () {
|
|
23662
|
-
var
|
|
23663
|
-
(
|
|
25103
|
+
var _window18, _window18$updateFlag;
|
|
25104
|
+
(_window18 = window) === null || _window18 === void 0 || (_window18 = _window18.Apxor) === null || _window18 === void 0 || (_window18$updateFlag = _window18.updateFlag) === null || _window18$updateFlag === void 0 || _window18$updateFlag.call(_window18, false);
|
|
23664
25105
|
if (_this.currentAction !== null && _this.currentAction !== undefined) {
|
|
23665
25106
|
_this.isShowingAction = false;
|
|
23666
25107
|
try {
|
|
23667
|
-
var
|
|
25108
|
+
var _window19;
|
|
23668
25109
|
_this.currentAction();
|
|
23669
25110
|
_this.currentAction = null;
|
|
23670
|
-
|
|
23671
|
-
(_window18 = window) === null || _window18 === void 0 || (_window18 = _window18.ApxorLogger) === null || _window18 === void 0 || _window18.debug("Callback is called");
|
|
25111
|
+
(_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.ApxorLogger) === null || _window19 === void 0 || _window19.debug("Callback is called");
|
|
23672
25112
|
} catch (e) {}
|
|
23673
25113
|
}
|
|
23674
25114
|
});
|
|
@@ -23680,48 +25120,48 @@
|
|
|
23680
25120
|
var onShow = function onShow() {
|
|
23681
25121
|
_this.isShowingAction = true;
|
|
23682
25122
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
23683
|
-
var
|
|
23684
|
-
(
|
|
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);
|
|
23685
25125
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
23686
|
-
(
|
|
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);
|
|
23687
25127
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
23688
25128
|
setTimeout(function () {
|
|
23689
|
-
var
|
|
23690
|
-
(
|
|
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");
|
|
23691
25131
|
}, 500);
|
|
23692
25132
|
}
|
|
23693
25133
|
}
|
|
23694
25134
|
};
|
|
23695
25135
|
var onHide = function onHide(isCancelled) {
|
|
23696
|
-
var
|
|
25136
|
+
var _window23, _window23$updateFlag, _window24;
|
|
23697
25137
|
_this.isShowingAction = false;
|
|
23698
25138
|
_this.currentAction = null;
|
|
23699
|
-
_this.
|
|
23700
|
-
(
|
|
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);
|
|
23701
25141
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
23702
25142
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
23703
25143
|
}
|
|
23704
|
-
if (((
|
|
23705
|
-
var
|
|
23706
|
-
(
|
|
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();
|
|
23707
25147
|
}
|
|
23708
25148
|
};
|
|
23709
25149
|
if (action_class === "new-inline") {
|
|
23710
|
-
_this.
|
|
25150
|
+
_this.HyJc = new InLineTooltip(ui_config, [], [], terminationConfig, {
|
|
23711
25151
|
configId: uuid,
|
|
23712
25152
|
configName: name
|
|
23713
25153
|
}, _this, onShow, onHide, function () {}, false, 0);
|
|
23714
25154
|
} else if (action_class === "tooltip_builder") {
|
|
23715
|
-
_this.
|
|
25155
|
+
_this.HyJc = new NewInLineTooltip(ui_config, terminationConfig, {
|
|
23716
25156
|
configId: uuid,
|
|
23717
25157
|
configName: name
|
|
23718
25158
|
}, _this, onShow, onHide);
|
|
23719
25159
|
}
|
|
23720
25160
|
setTimeout(function () {
|
|
23721
|
-
_this.
|
|
25161
|
+
_this.HyJc.createNewTooltip();
|
|
23722
25162
|
}, ui_config.delay);
|
|
23723
25163
|
});
|
|
23724
|
-
_defineProperty(this, "
|
|
25164
|
+
_defineProperty(this, "sYRk", function (ui_config, duration, uuid, name) {
|
|
23725
25165
|
var terminationConfig = {};
|
|
23726
25166
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
23727
25167
|
terminationConfig["duration"] = duration;
|
|
@@ -23731,35 +25171,55 @@
|
|
|
23731
25171
|
}, _this, function () {
|
|
23732
25172
|
_this.isShowingAction = true;
|
|
23733
25173
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
23734
|
-
var
|
|
23735
|
-
(
|
|
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);
|
|
23736
25176
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
23737
25177
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
23738
25178
|
setTimeout(function () {
|
|
23739
|
-
var
|
|
23740
|
-
(
|
|
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");
|
|
23741
25181
|
}, 500);
|
|
23742
25182
|
}
|
|
23743
25183
|
}
|
|
23744
25184
|
}, function (isCancelled) {
|
|
23745
|
-
var
|
|
25185
|
+
var _window28, _window28$updateFlag, _window29;
|
|
23746
25186
|
_this.isShowingAction = false;
|
|
23747
25187
|
_this.currentAction = null;
|
|
23748
|
-
_this.
|
|
23749
|
-
(
|
|
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);
|
|
23750
25190
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
23751
25191
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
23752
25192
|
}
|
|
23753
|
-
if (((
|
|
23754
|
-
var
|
|
23755
|
-
(
|
|
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();
|
|
23756
25196
|
}
|
|
23757
25197
|
}, _this.stepperCallback, false, 0);
|
|
23758
25198
|
_this._currentCoachmark.createNewCoachMark();
|
|
23759
25199
|
});
|
|
25200
|
+
_defineProperty(this, "HGOD", function (ui_config, duration, uuid, name, terminationConfig) {
|
|
25201
|
+
_this._currentBadge = new ApxorBadge(ui_config, terminationConfig, {
|
|
25202
|
+
configId: uuid,
|
|
25203
|
+
configName: name
|
|
25204
|
+
}, _this, function () {
|
|
25205
|
+
// this.isShowingAction = true;
|
|
25206
|
+
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25207
|
+
var _window$Apxor5;
|
|
25208
|
+
(_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.updateBadgeStatus("show", uuid);
|
|
25209
|
+
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
25210
|
+
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");
|
|
25213
|
+
}, 500);
|
|
25214
|
+
}
|
|
25215
|
+
}
|
|
25216
|
+
});
|
|
25217
|
+
_this._currentBadge.wXSj();
|
|
25218
|
+
_this._currentBadge.HGOD();
|
|
25219
|
+
});
|
|
23760
25220
|
_defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
|
|
23761
|
-
if (_this.
|
|
23762
|
-
_this.
|
|
25221
|
+
if (_this.HyJc) {
|
|
25222
|
+
_this.HyJc.updateElementPositionOnScroll(top, left, height, width);
|
|
23763
25223
|
}
|
|
23764
25224
|
});
|
|
23765
25225
|
_defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
|
|
@@ -23776,15 +25236,15 @@
|
|
|
23776
25236
|
var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
|
|
23777
25237
|
_this.isShowingAction = true;
|
|
23778
25238
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
23779
|
-
var
|
|
23780
|
-
(
|
|
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);
|
|
23781
25241
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
23782
25242
|
}
|
|
23783
25243
|
}, function () {
|
|
23784
|
-
var
|
|
25244
|
+
var _window33, _window33$updateFlag;
|
|
23785
25245
|
_this.isShowingAction = false;
|
|
23786
25246
|
_this.currentAction = null;
|
|
23787
|
-
(
|
|
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);
|
|
23788
25248
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
23789
25249
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
23790
25250
|
}
|
|
@@ -23808,31 +25268,31 @@
|
|
|
23808
25268
|
terminationConfig["duration"] = duration;
|
|
23809
25269
|
var inappModal = null;
|
|
23810
25270
|
var onShow = function onShow() {
|
|
23811
|
-
var _window$
|
|
25271
|
+
var _window$Apxor6;
|
|
23812
25272
|
_this.isShowingAction = true;
|
|
23813
|
-
if (((_window$
|
|
23814
|
-
var
|
|
23815
|
-
(
|
|
25273
|
+
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");
|
|
23816
25276
|
} else {
|
|
23817
|
-
var
|
|
23818
|
-
(
|
|
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);
|
|
23819
25279
|
}
|
|
23820
25280
|
if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent) {
|
|
23821
25281
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
23822
25282
|
} else if (action_class === "inapp_builder") {
|
|
23823
|
-
var _window$ApxorRTM3, _window$
|
|
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;
|
|
23824
25284
|
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
|
|
23825
25285
|
apx_nudge_name: name,
|
|
23826
|
-
apx_nudge_id: ((_window$
|
|
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,
|
|
23827
25287
|
apx_template_name: "inapp",
|
|
23828
|
-
apx_step: ((_window$
|
|
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,
|
|
23829
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,
|
|
23830
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
|
|
23831
25291
|
});
|
|
23832
25292
|
}
|
|
23833
25293
|
};
|
|
23834
25294
|
var onHide = function onHide(backgroundDiv, action) {
|
|
23835
|
-
var _dialogContent$classL, _window$
|
|
25295
|
+
var _dialogContent$classL, _window$Apxor9;
|
|
23836
25296
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
23837
25297
|
var cssClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ".apx-dlg-c";
|
|
23838
25298
|
var closeListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
@@ -23844,26 +25304,26 @@
|
|
|
23844
25304
|
// setTimeout(() => {
|
|
23845
25305
|
backgroundDiv.remove();
|
|
23846
25306
|
_this.isShowingAction = false;
|
|
23847
|
-
if (((_window$
|
|
23848
|
-
var
|
|
23849
|
-
(
|
|
25307
|
+
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");
|
|
23850
25310
|
} else {
|
|
23851
|
-
var
|
|
23852
|
-
(
|
|
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);
|
|
23853
25313
|
}
|
|
23854
25314
|
_this.currentAction = null;
|
|
23855
25315
|
if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
|
|
23856
25316
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
23857
25317
|
} else if (action_class === "inapp_builder") {
|
|
23858
|
-
var
|
|
25318
|
+
var _window38;
|
|
23859
25319
|
if (!(action == "cancel" || action == "never")) {
|
|
23860
|
-
var _window$
|
|
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;
|
|
23861
25321
|
var additional_info = {
|
|
23862
25322
|
apx_nudge_name: name,
|
|
23863
|
-
apx_nudge_id: ((_window$
|
|
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,
|
|
23864
25324
|
apx_template_name: "inapp",
|
|
23865
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,
|
|
23866
|
-
apx_step: ((_window$
|
|
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
|
|
23867
25327
|
};
|
|
23868
25328
|
if (type != "") {
|
|
23869
25329
|
additional_info["apx_dismiss_type"] = type;
|
|
@@ -23871,17 +25331,17 @@
|
|
|
23871
25331
|
(_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_dismissed", additional_info);
|
|
23872
25332
|
}
|
|
23873
25333
|
if (action === "cancel") {
|
|
23874
|
-
var _window$
|
|
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;
|
|
23875
25335
|
var _additional_info = {
|
|
23876
25336
|
apx_nudge_name: name,
|
|
23877
|
-
apx_nudge_id: ((_window$
|
|
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,
|
|
23878
25338
|
apx_template_name: "inapp",
|
|
23879
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,
|
|
23880
|
-
apx_step: ((_window$
|
|
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
|
|
23881
25341
|
};
|
|
23882
25342
|
(_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_nudge_cancelled", _additional_info);
|
|
23883
25343
|
}
|
|
23884
|
-
(
|
|
25344
|
+
(_window38 = window) === null || _window38 === void 0 || (_window38 = _window38.ApxorInternals) === null || _window38 === void 0 || _window38.removeBuilderTemplate(configId);
|
|
23885
25345
|
}
|
|
23886
25346
|
};
|
|
23887
25347
|
if (action_class === "modal") {
|
|
@@ -23895,11 +25355,11 @@
|
|
|
23895
25355
|
}
|
|
23896
25356
|
});
|
|
23897
25357
|
_defineProperty(this, "showPlaceHolder", function () {
|
|
23898
|
-
var
|
|
23899
|
-
if (_this.
|
|
25358
|
+
var _window39;
|
|
25359
|
+
if (_this.etai) {
|
|
23900
25360
|
return;
|
|
23901
25361
|
}
|
|
23902
|
-
_this.
|
|
25362
|
+
_this.etai = true;
|
|
23903
25363
|
var ele = document.createElement("div");
|
|
23904
25364
|
ele.innerHTML = "place your immersive card here";
|
|
23905
25365
|
ele.style.backgroundColor = "#f5f5f5";
|
|
@@ -23909,7 +25369,7 @@
|
|
|
23909
25369
|
ele.style.padding = "12px";
|
|
23910
25370
|
ele.style.fontSize = "14px";
|
|
23911
25371
|
document.body.appendChild(ele);
|
|
23912
|
-
(
|
|
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);
|
|
23913
25373
|
});
|
|
23914
25374
|
_defineProperty(this, "pauseStories", function () {
|
|
23915
25375
|
var progress = Array.from(document.querySelectorAll(".progress"));
|
|
@@ -23948,8 +25408,8 @@
|
|
|
23948
25408
|
// survey_obj.createSurvey();
|
|
23949
25409
|
// };
|
|
23950
25410
|
_defineProperty(this, "logEvent", function (name, additional_info) {
|
|
23951
|
-
var _window$
|
|
23952
|
-
if (((_window$
|
|
25411
|
+
var _window$Apxor14;
|
|
25412
|
+
if (((_window$Apxor14 = window.Apxor) === null || _window$Apxor14 === void 0 ? void 0 : _window$Apxor14.platform) === "ios") {
|
|
23953
25413
|
window.Apxor.logAppEvent(name, additional_info);
|
|
23954
25414
|
} else {
|
|
23955
25415
|
window.Apxor.logAppEvent(name, JSON.stringify(additional_info));
|
|
@@ -23965,6 +25425,15 @@
|
|
|
23965
25425
|
}
|
|
23966
25426
|
}
|
|
23967
25427
|
});
|
|
25428
|
+
_defineProperty(this, "removeBadge", function (name, id) {
|
|
25429
|
+
var cssPostFix = "-".concat(id, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
|
|
25430
|
+
var badge = Array.from(document.getElementsByClassName("apxor-badge-container")).find(function (element) {
|
|
25431
|
+
return element.classList.contains("apxor-badge-container-styles-".concat(cssPostFix));
|
|
25432
|
+
});
|
|
25433
|
+
if (badge) {
|
|
25434
|
+
badge.remove();
|
|
25435
|
+
}
|
|
25436
|
+
});
|
|
23968
25437
|
});
|
|
23969
25438
|
|
|
23970
25439
|
/* eslint-disable no-empty */
|