apxor-qe 1.4.0 → 1.4.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.
@@ -203,7 +203,7 @@
203
203
  var toUpperCase = function toUpperCase(key) {
204
204
  return key.toUpperCase();
205
205
  };
206
- var qjgz = function qjgz(actual, expected, operator) {
206
+ var zuMV = function zuMV(actual, expected, operator) {
207
207
  switch (operator) {
208
208
  case "EQ":
209
209
  return actual === expected;
@@ -264,16 +264,16 @@
264
264
  var Audience = /*#__PURE__*/_createClass(function Audience() {
265
265
  var _this = this;
266
266
  _classCallCheck(this, Audience);
267
- _defineProperty(this, "pfyk", "ALL");
268
- _defineProperty(this, "oyin", []);
269
- _defineProperty(this, "Pifw", []);
267
+ _defineProperty(this, "upBe", "ALL");
268
+ _defineProperty(this, "qHve", []);
269
+ _defineProperty(this, "hfXD", []);
270
270
  _defineProperty(this, "parse", function () {
271
271
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
272
272
  try {
273
- _this.pfyk = config.audience.audience_type;
274
- _this.oyin = config.audience.attributes.user;
275
- _this.Pifw = config.audience.attributes.session;
276
- if (!Array.isArray(_this.oyin) || !Array.isArray(_this.Pifw)) {
273
+ _this.upBe = config.audience.audience_type;
274
+ _this.qHve = config.audience.attributes.user;
275
+ _this.hfXD = config.audience.attributes.session;
276
+ if (!Array.isArray(_this.qHve) || !Array.isArray(_this.hfXD)) {
277
277
  Logger.error("No attributes");
278
278
  return false;
279
279
  }
@@ -285,12 +285,12 @@
285
285
  });
286
286
  _defineProperty(this, "validate", function (user, session) {
287
287
  var status = true;
288
- if (_this.pfyk === "FTU") {
288
+ if (_this.upBe === "FTU") {
289
289
  status = Apxor.getController().getSessionInfo().is_first_session;
290
290
  }
291
- return status && _this.larY(user, _this.oyin) && _this.larY(session, _this.Pifw);
291
+ return status && _this.AYgA(user, _this.qHve) && _this.AYgA(session, _this.hfXD);
292
292
  });
293
- _defineProperty(this, "larY", function (attributes, expected) {
293
+ _defineProperty(this, "AYgA", function (attributes, expected) {
294
294
  var length = expected.length;
295
295
  var status = true;
296
296
  try {
@@ -320,7 +320,7 @@
320
320
  }
321
321
  var match = loggedValues.some(function (loggedValue) {
322
322
  return values.some(function (configValue) {
323
- return qjgz(loggedValue, configValue, operator);
323
+ return zuMV(loggedValue, configValue, operator);
324
324
  });
325
325
  });
326
326
  status = status && match;
@@ -342,37 +342,37 @@
342
342
  var Frequency = /*#__PURE__*/_createClass(function Frequency() {
343
343
  var _this = this;
344
344
  _classCallCheck(this, Frequency);
345
- _defineProperty(this, "kedV", 0);
346
- _defineProperty(this, "VSmt", 0);
347
- _defineProperty(this, "YTxk", "SESSION");
348
- _defineProperty(this, "zwPH", 0);
349
- _defineProperty(this, "gMHQ", 0);
350
- _defineProperty(this, "amzH", 0);
345
+ _defineProperty(this, "cyan", 0);
346
+ _defineProperty(this, "xUCG", 0);
347
+ _defineProperty(this, "TTrx", "SESSION");
348
+ _defineProperty(this, "dBjB", 0);
349
+ _defineProperty(this, "QeCL", 0);
350
+ _defineProperty(this, "voNY", 0);
351
351
  _defineProperty(this, "parse", function () {
352
352
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
353
353
  try {
354
- _this.kedV = config.frequency.count;
355
- if (_this.kedV === -1) {
356
- _this.kedV = 1000;
354
+ _this.cyan = config.frequency.count;
355
+ if (_this.cyan === -1) {
356
+ _this.cyan = 1000;
357
357
  }
358
- _this.amzH = _this.kedV;
359
- _this.VSmt = config.frequency.time_interval;
360
- _this.YTxk = config.frequency.validity;
361
- _this.gMHQ = config.frequency.ses_lmt;
358
+ _this.voNY = _this.cyan;
359
+ _this.xUCG = config.frequency.time_interval;
360
+ _this.TTrx = config.frequency.validity;
361
+ _this.QeCL = config.frequency.ses_lmt;
362
362
  _this._dayCount = config.frequency.day_lmt;
363
363
  // let data = Apxor.getController().getFromStorage(QE_STATE);
364
364
  // let qe_state = JSON.parse(decode(Apxor.getSiteId(), data));
365
365
  var qe_state = CE.getInstance().getQeState();
366
366
  if (!isDefined(qe_state) || !isDefined(qe_state[config._id])) return true;
367
- if (_this.YTxk === "SESSION") {
368
- _this.kedV = parseInt(_this.kedV) - parseInt(qe_state[config._id]["SESSION"]);
369
- if (_this.kedV <= 0) {
367
+ if (_this.TTrx === "SESSION") {
368
+ _this.cyan = parseInt(_this.cyan) - parseInt(qe_state[config._id]["SESSION"]);
369
+ if (_this.cyan <= 0) {
370
370
  console.warn("Max count limit reached for session:" + config._id);
371
371
  return false;
372
372
  }
373
- } else if (_this.YTxk === "OVERALL") {
374
- _this.kedV = parseInt(_this.kedV) - parseInt(qe_state[config._id]["OVERALL"]);
375
- if (_this.kedV <= 0) {
373
+ } else if (_this.TTrx === "OVERALL") {
374
+ _this.cyan = parseInt(_this.cyan) - parseInt(qe_state[config._id]["OVERALL"]);
375
+ if (_this.cyan <= 0) {
376
376
  console.warn("Max count limit reached for overall:" + config._id);
377
377
  return false;
378
378
  }
@@ -386,28 +386,28 @@
386
386
  }
387
387
  return true;
388
388
  });
389
- _defineProperty(this, "oDrA", function () {
390
- _this.kedV = _this.kedV - 1;
389
+ _defineProperty(this, "yGJs", function () {
390
+ _this.cyan = _this.cyan - 1;
391
391
  });
392
392
  _defineProperty(this, "getFrequencyCount", function () {
393
- return _this.kedV;
393
+ return _this.cyan;
394
394
  });
395
- _defineProperty(this, "XbPF", function () {
396
- if (_this.YTxk === "SESSION") {
397
- _this.kedV = _this.amzH;
395
+ _defineProperty(this, "NSSU", function () {
396
+ if (_this.TTrx === "SESSION") {
397
+ _this.cyan = _this.voNY;
398
398
  Logger$1.info("Campaign Limit reset");
399
399
  }
400
400
  });
401
401
  /**
402
- * @function WTEf
402
+ * @function HBeu
403
403
  * @description Validates if the campaign count is with in the limits set in the config.
404
404
  * @param {string} Config id
405
405
  * @returns {boolean} true - If the Campaign limits are not reached
406
406
  * false - Otherwise
407
407
  */
408
- _defineProperty(this, "WTEf", function (id) {
408
+ _defineProperty(this, "HBeu", function (id) {
409
409
  try {
410
- if (_this.kedV <= 0) {
410
+ if (_this.cyan <= 0) {
411
411
  return false;
412
412
  }
413
413
 
@@ -418,8 +418,8 @@
418
418
  if (!isDefined(qe_state) || !isDefined(qe_state[id])) return true;
419
419
 
420
420
  //If the config has a session count limit set
421
- if (_this.gMHQ !== 0) {
422
- var sessionCountInConfig = parseInt(_this.gMHQ);
421
+ if (_this.QeCL !== 0) {
422
+ var sessionCountInConfig = parseInt(_this.QeCL);
423
423
  var thisSessionCount = parseInt(qe_state[id]["SESSION"]);
424
424
  if (sessionCountInConfig - thisSessionCount <= 0) {
425
425
  return false;
@@ -446,14 +446,14 @@
446
446
  var Meta = /*#__PURE__*/_createClass(function Meta() {
447
447
  var _this = this;
448
448
  _classCallCheck(this, Meta);
449
- _defineProperty(this, "EDaN", "");
450
- _defineProperty(this, "pfyk", "");
449
+ _defineProperty(this, "dXou", "");
450
+ _defineProperty(this, "upBe", "");
451
451
  _defineProperty(this, "parse", function () {
452
452
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
453
453
  try {
454
454
  var _config$meta;
455
- _this.EDaN = config.meta.name;
456
- _this.pfyk = config.meta.type;
455
+ _this.dXou = config.meta.name;
456
+ _this.upBe = config.meta.type;
457
457
  _this._only_context = config.meta.only_context;
458
458
  _this._attr = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.attr) || {};
459
459
  } catch (error) {
@@ -468,11 +468,11 @@
468
468
  var Validity = /*#__PURE__*/_createClass(function Validity() {
469
469
  var _this = this;
470
470
  _classCallCheck(this, Validity);
471
- _defineProperty(this, "isju", -1);
472
- _defineProperty(this, "eexF", -1);
473
- _defineProperty(this, "Xmbz", -1);
474
- _defineProperty(this, "IRGG", -1);
475
- _defineProperty(this, "jPEb", false);
471
+ _defineProperty(this, "ZXIv", -1);
472
+ _defineProperty(this, "PYEw", -1);
473
+ _defineProperty(this, "gDYY", -1);
474
+ _defineProperty(this, "JWWv", -1);
475
+ _defineProperty(this, "WVbP", false);
476
476
  _defineProperty(this, "parse", function () {
477
477
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
478
478
  try {
@@ -480,17 +480,17 @@
480
480
  Logger$2.error("Not valid dates");
481
481
  return false;
482
482
  }
483
- _this.isju = Date.parse(config.validity.start_date);
484
- _this.eexF = Date.parse(config.validity.end_date);
483
+ _this.ZXIv = Date.parse(config.validity.start_date);
484
+ _this.PYEw = Date.parse(config.validity.end_date);
485
485
  if (isDefined(config.time_limits_in_day)) {
486
- _this.jPEb = config.time_limits_in_day;
487
- if (_this.jPEb && isDefined(config.time_limits)) {
486
+ _this.WVbP = config.time_limits_in_day;
487
+ if (_this.WVbP && isDefined(config.time_limits)) {
488
488
  var currentDate = new Date().toISOString().split("T")[0];
489
- _this.Xmbz = Date.parse(currentDate + "T" + config.time_limits.start_time + ".000Z");
490
- _this.IRGG = Date.parse(currentDate + "T" + config.time_limits.end_time + ".000Z");
489
+ _this.gDYY = Date.parse(currentDate + "T" + config.time_limits.start_time + ".000Z");
490
+ _this.JWWv = Date.parse(currentDate + "T" + config.time_limits.end_time + ".000Z");
491
491
 
492
492
  // If invalid format is passed, return false
493
- if (isNaN(_this.Xmbz) || isNaN(_this.IRGG)) {
493
+ if (isNaN(_this.gDYY) || isNaN(_this.JWWv)) {
494
494
  Logger$2.error("Not valid times");
495
495
  return false;
496
496
  }
@@ -504,8 +504,8 @@
504
504
  });
505
505
  _defineProperty(this, "validate", function () {
506
506
  var currentTime = Date.now();
507
- if (currentTime > _this.isju && currentTime < _this.eexF) {
508
- return !_this.jPEb || currentTime >= _this.Xmbz && currentTime <= _this.IRGG;
507
+ if (currentTime > _this.ZXIv && currentTime < _this.PYEw) {
508
+ return !_this.WVbP || currentTime >= _this.gDYY && currentTime <= _this.JWWv;
509
509
  }
510
510
  return false;
511
511
  });
@@ -514,13 +514,13 @@
514
514
  var Details = /*#__PURE__*/_createClass(function Details() {
515
515
  var _this = this;
516
516
  _classCallCheck(this, Details);
517
- _defineProperty(this, "EDaN", "");
518
- _defineProperty(this, "EpkX", {});
517
+ _defineProperty(this, "dXou", "");
518
+ _defineProperty(this, "PjLw", {});
519
519
  _defineProperty(this, "parse", function () {
520
520
  var details = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
521
521
  try {
522
- _this.EDaN = details.name;
523
- _this.EpkX = details.additional_info;
522
+ _this.dXou = details.name;
523
+ _this.PjLw = details.additional_info;
524
524
  } catch (error) {
525
525
  return false;
526
526
  }
@@ -531,14 +531,14 @@
531
531
  var Timebounds = /*#__PURE__*/_createClass(function Timebounds() {
532
532
  var _this = this;
533
533
  _classCallCheck(this, Timebounds);
534
- _defineProperty(this, "vQNe", 0);
535
- _defineProperty(this, "idSb", 0);
534
+ _defineProperty(this, "ubix", 0);
535
+ _defineProperty(this, "xTww", 0);
536
536
  _defineProperty(this, "parse", function () {
537
537
  var timeBounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
538
538
  try {
539
- _this.vQNe = Number(timeBounds.lower);
540
- _this.idSb = Number(timeBounds.upper);
541
- if (isNaN(_this.vQNe) || isNaN(_this.idSb)) {
539
+ _this.ubix = Number(timeBounds.lower);
540
+ _this.xTww = Number(timeBounds.upper);
541
+ if (isNaN(_this.ubix) || isNaN(_this.xTww)) {
542
542
  return false;
543
543
  }
544
544
  } catch (error) {
@@ -551,17 +551,17 @@
551
551
  var PreCondition = /*#__PURE__*/_createClass(function PreCondition() {
552
552
  var _this = this;
553
553
  _classCallCheck(this, PreCondition);
554
- _defineProperty(this, "dAXx", 0);
555
- _defineProperty(this, "QksQ", "");
556
- _defineProperty(this, "SmWY", "");
557
- _defineProperty(this, "SbdV", new Details());
558
- _defineProperty(this, "OuAR", new Timebounds());
554
+ _defineProperty(this, "wLrd", 0);
555
+ _defineProperty(this, "GwDz", "");
556
+ _defineProperty(this, "HJIQ", "");
557
+ _defineProperty(this, "LHnZ", new Details());
558
+ _defineProperty(this, "pZbN", new Timebounds());
559
559
  _defineProperty(this, "parse", function () {
560
560
  var precondition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
561
561
  try {
562
- _this.QksQ = precondition.event_type;
563
- _this.SmWY = precondition.activity;
564
- return _this.SbdV.parse(precondition.details) && _this.OuAR.parse(precondition.time_bounds);
562
+ _this.GwDz = precondition.event_type;
563
+ _this.HJIQ = precondition.activity;
564
+ return _this.LHnZ.parse(precondition.details) && _this.pZbN.parse(precondition.time_bounds);
565
565
  } catch (error) {
566
566
  return false;
567
567
  }
@@ -572,29 +572,29 @@
572
572
  var Condition = /*#__PURE__*/_createClass(function Condition() {
573
573
  var _this = this;
574
574
  _classCallCheck(this, Condition);
575
- _defineProperty(this, "dAXx", 0);
576
- _defineProperty(this, "kVOA", -1);
577
- _defineProperty(this, "kedV", 0);
578
- _defineProperty(this, "oakv", "");
579
- _defineProperty(this, "SmWY", "");
580
- _defineProperty(this, "QksQ", "");
581
- _defineProperty(this, "OuAR", new Timebounds());
582
- _defineProperty(this, "SbdV", new Details());
583
- _defineProperty(this, "YEhB", new PreCondition());
584
- _defineProperty(this, "yHRM", "AND");
585
- _defineProperty(this, "Pkry", false);
586
- _defineProperty(this, "pfyk", void 0);
575
+ _defineProperty(this, "wLrd", 0);
576
+ _defineProperty(this, "BvTW", -1);
577
+ _defineProperty(this, "cyan", 0);
578
+ _defineProperty(this, "FdOF", "");
579
+ _defineProperty(this, "HJIQ", "");
580
+ _defineProperty(this, "GwDz", "");
581
+ _defineProperty(this, "pZbN", new Timebounds());
582
+ _defineProperty(this, "LHnZ", new Details());
583
+ _defineProperty(this, "idDI", new PreCondition());
584
+ _defineProperty(this, "Sdoc", "AND");
585
+ _defineProperty(this, "LnGT", false);
586
+ _defineProperty(this, "upBe", void 0);
587
587
  _defineProperty(this, "parse", function () {
588
588
  var condition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
589
589
  try {
590
- _this.kVOA = condition.sequence;
591
- _this.kedV = condition.count_config.count;
592
- _this.oakv = condition.count_config.operator;
593
- _this.SmWY = condition.activity;
594
- _this.QksQ = condition.event_type;
595
- _this.yHRM = condition.combine_operator;
596
- _this.pfyk = condition.type;
597
- return _this.SbdV.parse(condition.details) && _this.YEhB.parse(condition.trigger) && _this.OuAR.parse(condition.time_bounds);
590
+ _this.BvTW = condition.sequence;
591
+ _this.cyan = condition.count_config.count;
592
+ _this.FdOF = condition.count_config.operator;
593
+ _this.HJIQ = condition.activity;
594
+ _this.GwDz = condition.event_type;
595
+ _this.Sdoc = condition.combine_operator;
596
+ _this.upBe = condition.type;
597
+ return _this.LHnZ.parse(condition.details) && _this.idDI.parse(condition.trigger) && _this.pZbN.parse(condition.time_bounds);
598
598
  } catch (error) {
599
599
  Logger$3.error(error);
600
600
  return false;
@@ -606,19 +606,19 @@
606
606
  var GoalEvent = /*#__PURE__*/_createClass(function GoalEvent() {
607
607
  var _this = this;
608
608
  _classCallCheck(this, GoalEvent);
609
- _defineProperty(this, "kedV", 0);
610
- _defineProperty(this, "oakv", "");
611
- _defineProperty(this, "QksQ", "");
612
- _defineProperty(this, "OuAR", new Timebounds());
613
- _defineProperty(this, "SbdV", new Details());
614
- _defineProperty(this, "yHRM", "AND");
609
+ _defineProperty(this, "cyan", 0);
610
+ _defineProperty(this, "FdOF", "");
611
+ _defineProperty(this, "GwDz", "");
612
+ _defineProperty(this, "pZbN", new Timebounds());
613
+ _defineProperty(this, "LHnZ", new Details());
614
+ _defineProperty(this, "Sdoc", "AND");
615
615
  _defineProperty(this, "parse", function (data) {
616
616
  try {
617
- _this.kedV = data.count_config.count;
618
- _this.oakv = data.count_config.operator;
619
- _this.QksQ = data.event_type;
620
- _this.yHRM = data.combine_operator;
621
- return _this.SbdV.parse(data.details) && _this.OuAR.parse(data.time_bounds);
617
+ _this.cyan = data.count_config.count;
618
+ _this.FdOF = data.count_config.operator;
619
+ _this.GwDz = data.event_type;
620
+ _this.Sdoc = data.combine_operator;
621
+ return _this.LHnZ.parse(data.details) && _this.pZbN.parse(data.time_bounds);
622
622
  } catch (error) {
623
623
  Logger$4.error(error);
624
624
  return false;
@@ -632,21 +632,21 @@
632
632
  function ConditionValidator() {
633
633
  var _this = this;
634
634
  _classCallCheck(this, ConditionValidator);
635
- _defineProperty(this, "XsTp", 0);
636
- _defineProperty(this, "jaGt", "");
637
- _defineProperty(this, "qXKr", new Condition());
638
- _defineProperty(this, "yIMt", new GoalEvent());
639
- _defineProperty(this, "gZba", false);
640
- _defineProperty(this, "HPUo", false);
641
- _defineProperty(this, "RIDN", 0);
642
- _defineProperty(this, "yHRM", "AND");
643
- _defineProperty(this, "mCal", "OR");
644
- _defineProperty(this, "fTSz", -1);
645
- _defineProperty(this, "eiXR", []);
646
- _defineProperty(this, "JfUj", {});
647
- _defineProperty(this, "rduQ", false);
635
+ _defineProperty(this, "AFha", 0);
636
+ _defineProperty(this, "xWwF", "");
637
+ _defineProperty(this, "ZXgH", new Condition());
638
+ _defineProperty(this, "AwpM", new GoalEvent());
639
+ _defineProperty(this, "CTgi", false);
640
+ _defineProperty(this, "dzHG", false);
641
+ _defineProperty(this, "ewWl", 0);
642
+ _defineProperty(this, "Sdoc", "AND");
643
+ _defineProperty(this, "gzxI", "OR");
644
+ _defineProperty(this, "Swao", -1);
645
+ _defineProperty(this, "SKdF", []);
646
+ _defineProperty(this, "ATJy", {});
647
+ _defineProperty(this, "qFlV", false);
648
648
  /**
649
- * If respectSequence is true, don't auto-OJSD to events except for the condition whose index is 0
649
+ * If respectSequence is true, don't auto-DGaq to events except for the condition whose index is 0
650
650
  *
651
651
  * @param condition
652
652
  * @param type
@@ -662,180 +662,180 @@
662
662
  var respectSequence = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
663
663
  var noKpiArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
664
664
  var flag = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "";
665
- _this.jaGt = id;
666
- _this.RIDN = index;
667
- _this.eiXR = noKpiArray;
665
+ _this.xWwF = id;
666
+ _this.ewWl = index;
667
+ _this.SKdF = noKpiArray;
668
668
  if (flag !== "termination" || flag === "") {
669
- var result = _this.qXKr.parse(condition);
669
+ var result = _this.ZXgH.parse(condition);
670
670
  if (result) {
671
- _this.yHRM = _this.qXKr.yHRM;
671
+ _this.Sdoc = _this.ZXgH.Sdoc;
672
672
 
673
673
  // FIXME: Why this code is written? Don't see any usecase
674
- if (_this.qXKr.Pkry) {
675
- var eventName = _this.qXKr.SbdV.EDaN;
674
+ if (_this.ZXgH.LnGT) {
675
+ var eventName = _this.ZXgH.LHnZ.dXou;
676
676
  if (eventName === "APX_PAGE_OPENED") {
677
- eventName = _this.qXKr.SbdV.EpkX["navigation_id"];
678
- eventName = isDefined(eventName) ? eventName : _this.qXKr.SbdV.EDaN;
677
+ eventName = _this.ZXgH.LHnZ.PjLw["navigation_id"];
678
+ eventName = isDefined(eventName) ? eventName : _this.ZXgH.LHnZ.dXou;
679
679
  }
680
- _this.fTSz = Apxor.getController().getEventCount(eventName);
681
- var count = _this.qXKr.kedV;
682
- var operator = _this.qXKr.oakv;
683
- _this.HPUo = _this.jjDO(_this.fTSz - 1, count, operator, false);
684
- _this.gZba = _this.HPUo;
685
- // If the condition is already satisfied and if it is page view, no need to OJSD
680
+ _this.Swao = Apxor.getController().getEventCount(eventName);
681
+ var count = _this.ZXgH.cyan;
682
+ var operator = _this.ZXgH.FdOF;
683
+ _this.dzHG = _this.TfGM(_this.Swao - 1, count, operator, false);
684
+ _this.CTgi = _this.dzHG;
685
+ // If the condition is already satisfied and if it is page view, no need to DGaq
686
686
  // This only applies for NAVIGATION_EVENTS
687
- if (_this.HPUo && _this.qXKr.SbdV.EDaN === "APX_PAGE_OPENED") {
687
+ if (_this.dzHG && _this.ZXgH.LHnZ.dXou === "APX_PAGE_OPENED") {
688
688
  return true;
689
689
  }
690
690
  }
691
691
  if (!respectSequence || index === 0) {
692
- _this.OJSD();
692
+ _this.DGaq();
693
693
  }
694
694
  return true;
695
695
  }
696
696
  } else {
697
- var _result = _this.yIMt.parse(condition);
698
- _this.mCal = _this.yIMt.yHRM;
699
- _this.IIJM();
697
+ var _result = _this.AwpM.parse(condition);
698
+ _this.gzxI = _this.AwpM.Sdoc;
699
+ _this.cvYj();
700
700
  return true;
701
701
  }
702
702
  return false;
703
703
  });
704
- _defineProperty(this, "OJSD", function () {
705
- var condition = _this.qXKr;
706
- var precondition = condition.YEhB;
704
+ _defineProperty(this, "DGaq", function () {
705
+ var condition = _this.ZXgH;
706
+ var precondition = condition.idDI;
707
707
  var ceInstance = CE.getInstance();
708
- if (precondition.QksQ === "app_start") {
709
- _this.gZba = true;
710
- ceInstance.registerForEvent(generateKey(condition.QksQ) + "___" + condition.SbdV.EDaN, _this.vJpn);
708
+ if (precondition.GwDz === "app_start") {
709
+ _this.CTgi = true;
710
+ ceInstance.registerForEvent(generateKey(condition.GwDz) + "___" + condition.LHnZ.dXou, _this.ZNEJ);
711
711
  } else {
712
- ceInstance.registerForEvent(generateKey(condition.QksQ) + "___" + precondition.SbdV.EDaN, _this.vJpn);
712
+ ceInstance.registerForEvent(generateKey(condition.GwDz) + "___" + precondition.LHnZ.dXou, _this.ZNEJ);
713
713
  }
714
714
  });
715
- _defineProperty(this, "IIJM", function () {
716
- var condition = _this.yIMt;
715
+ _defineProperty(this, "cvYj", function () {
716
+ var condition = _this.AwpM;
717
717
  var ceInstance = CE.getInstance();
718
- _this.gZba = true;
719
- ceInstance.registerForEvent(generateKey(condition.QksQ) + "___" + condition.SbdV.EDaN, _this.nTnW);
718
+ _this.CTgi = true;
719
+ ceInstance.registerForEvent(generateKey(condition.GwDz) + "___" + condition.LHnZ.dXou, _this.YBSM);
720
720
  });
721
- _defineProperty(this, "aZcq", function (type, name, time, additionalInfo) {
722
- var _this$qXKr;
721
+ _defineProperty(this, "Ijls", function (type, name, time, additionalInfo) {
722
+ var _this$ZXgH;
723
723
  var eventTime = Date.now();
724
- var time_differnce = (eventTime - _this.JfUj[name]) / 1000;
725
- var time_fromConfig = ((_this$qXKr = _this.qXKr) === null || _this$qXKr === void 0 || (_this$qXKr = _this$qXKr.SbdV) === null || _this$qXKr === void 0 || (_this$qXKr = _this$qXKr.EpkX) === null || _this$qXKr === void 0 ? void 0 : _this$qXKr.time) / 1000;
724
+ var time_differnce = (eventTime - _this.ATJy[name]) / 1000;
725
+ var time_fromConfig = ((_this$ZXgH = _this.ZXgH) === null || _this$ZXgH === void 0 || (_this$ZXgH = _this$ZXgH.LHnZ) === null || _this$ZXgH === void 0 || (_this$ZXgH = _this$ZXgH.PjLw) === null || _this$ZXgH === void 0 ? void 0 : _this$ZXgH.time) / 1000;
726
726
  if (time_fromConfig > time_differnce) {
727
727
  _this._displayCampaign(time);
728
728
  }
729
729
  });
730
- _defineProperty(this, "EfFk", function (type, name, time, additionalInfo) {
730
+ _defineProperty(this, "MKnM", function (type, name, time, additionalInfo) {
731
731
  var _this$_condition2, _this$_condition3;
732
- _this.rduQ = true;
732
+ _this.qFlV = true;
733
733
  var currentTime = Date.now();
734
- var eventName = (_this$_condition2 = _this.qXKr) === null || _this$_condition2 === void 0 || (_this$_condition2 = _this$_condition2.YEhB) === null || _this$_condition2 === void 0 ? void 0 : _this$_condition2.SbdV.EDaN;
735
- var eventTime = _this.JfUj[eventName];
734
+ var eventName = (_this$_condition2 = _this.ZXgH) === null || _this$_condition2 === void 0 || (_this$_condition2 = _this$_condition2.idDI) === null || _this$_condition2 === void 0 ? void 0 : _this$_condition2.LHnZ.dXou;
735
+ var eventTime = _this.ATJy[eventName];
736
736
  var time_differnce = (currentTime - eventTime) / 1000;
737
- var time_fromConfig = (_this$_condition3 = _this.qXKr) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.SbdV) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.EpkX) === null || _this$_condition3 === void 0 ? void 0 : _this$_condition3.time;
737
+ var time_fromConfig = (_this$_condition3 = _this.ZXgH) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.LHnZ) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.PjLw) === null || _this$_condition3 === void 0 ? void 0 : _this$_condition3.time;
738
738
  time_fromConfig = time_fromConfig / 1000;
739
739
  if (time_fromConfig > time_differnce) {
740
740
  _this._displayCampaign(time);
741
741
  }
742
742
  //unregister the event
743
743
  });
744
- _defineProperty(this, "vJpn", function (type, name, time, additionalInfo) {
744
+ _defineProperty(this, "ZNEJ", function (type, name, time, additionalInfo) {
745
745
  var ceInstance = CE.getInstance();
746
- if (!_this.gZba) {
746
+ if (!_this.CTgi) {
747
747
  // Validate Precondition
748
- _this.gZba = _this.alII(type, name, time, additionalInfo);
749
- if (_this.gZba) {
750
- var condition = _this.qXKr;
751
- var precondition = condition.YEhB;
752
- precondition.dAXx = time;
748
+ _this.CTgi = _this.cAeN(type, name, time, additionalInfo);
749
+ if (_this.CTgi) {
750
+ var condition = _this.ZXgH;
751
+ var precondition = condition.idDI;
752
+ precondition.wLrd = time;
753
753
  //events will be registred by its type activity event_type: "activity_time"
754
- if ((condition === null || condition === void 0 ? void 0 : condition.QksQ) === "activity_time") {
755
- var qXKr$SbdV, qXKr$_details2, qXKr$_details3;
756
- var event_time = condition === null || condition === void 0 || (qXKr$SbdV = condition.SbdV) === null || qXKr$SbdV === void 0 || (qXKr$SbdV = qXKr$SbdV.EpkX) === null || qXKr$SbdV === void 0 ? void 0 : qXKr$SbdV.time;
757
- if ((condition === null || condition === void 0 || (qXKr$_details2 = condition.SbdV) === null || qXKr$_details2 === void 0 || (qXKr$_details2 = qXKr$_details2.EpkX) === null || qXKr$_details2 === void 0 ? void 0 : qXKr$_details2.nkpi.length) > 0) {
754
+ if ((condition === null || condition === void 0 ? void 0 : condition.GwDz) === "activity_time") {
755
+ var ZXgH$LHnZ, ZXgH$_details2, ZXgH$_details3;
756
+ var event_time = condition === null || condition === void 0 || (ZXgH$LHnZ = condition.LHnZ) === null || ZXgH$LHnZ === void 0 || (ZXgH$LHnZ = ZXgH$LHnZ.PjLw) === null || ZXgH$LHnZ === void 0 ? void 0 : ZXgH$LHnZ.time;
757
+ if ((condition === null || condition === void 0 || (ZXgH$_details2 = condition.LHnZ) === null || ZXgH$_details2 === void 0 || (ZXgH$_details2 = ZXgH$_details2.PjLw) === null || ZXgH$_details2 === void 0 ? void 0 : ZXgH$_details2.nkpi.length) > 0) {
758
758
  setTimeout(function () {
759
- if (!_this.rduQ) {
760
- _this.HPUo = true;
761
- if (_this.HPUo) {
762
- _this.XsTp += 1;
763
- _this.HPUo = _this.jjDO(_this.XsTp, _this.qXKr.kedV, _this.qXKr.oakv);
764
- if (_this.HPUo) {
765
- _this.qXKr.dAXx = time;
766
- ceInstance.validate(_this.jaGt, _this.RIDN);
759
+ if (!_this.qFlV) {
760
+ _this.dzHG = true;
761
+ if (_this.dzHG) {
762
+ _this.AFha += 1;
763
+ _this.dzHG = _this.TfGM(_this.AFha, _this.ZXgH.cyan, _this.ZXgH.FdOF);
764
+ if (_this.dzHG) {
765
+ _this.ZXgH.wLrd = time;
766
+ ceInstance.validate(_this.xWwF, _this.ewWl);
767
767
  }
768
768
  }
769
769
  }
770
- condition.SbdV.EpkX.nkpi.map(function (nokpi) {
771
- ceInstance.unregisterFromEvent(toUpperCase(condition.SbdV.EpkX.et) + "___" + nokpi, _this);
770
+ condition.LHnZ.PjLw.nkpi.map(function (nokpi) {
771
+ ceInstance.unregisterFromEvent(toUpperCase(condition.LHnZ.PjLw.et) + "___" + nokpi, _this);
772
772
  });
773
773
  }, event_time);
774
- condition.SbdV.EpkX.nkpi.map(function (nokpi) {
775
- ceInstance.registerForEvent(toUpperCase(condition.SbdV.EpkX.et) + "___" + nokpi, _this.EfFk);
774
+ condition.LHnZ.PjLw.nkpi.map(function (nokpi) {
775
+ ceInstance.registerForEvent(toUpperCase(condition.LHnZ.PjLw.et) + "___" + nokpi, _this.MKnM);
776
776
  });
777
777
  }
778
778
  //it is for unregistering the events did case after completing the time imit
779
- if ((condition === null || condition === void 0 || (qXKr$_details3 = condition.SbdV) === null || qXKr$_details3 === void 0 || (qXKr$_details3 = qXKr$_details3.EpkX) === null || qXKr$_details3 === void 0 ? void 0 : qXKr$_details3.kpi.length) > 0) {
779
+ if ((condition === null || condition === void 0 || (ZXgH$_details3 = condition.LHnZ) === null || ZXgH$_details3 === void 0 || (ZXgH$_details3 = ZXgH$_details3.PjLw) === null || ZXgH$_details3 === void 0 ? void 0 : ZXgH$_details3.kpi.length) > 0) {
780
780
  setTimeout(function () {
781
- condition.SbdV.EpkX.kpi.map(function (kpi) {
782
- ceInstance.unregisterFromEvent(toUpperCase(condition.SbdV.EpkX.et) + "___" + kpi, _this);
781
+ condition.LHnZ.PjLw.kpi.map(function (kpi) {
782
+ ceInstance.unregisterFromEvent(toUpperCase(condition.LHnZ.PjLw.et) + "___" + kpi, _this);
783
783
  });
784
784
  }, event_time);
785
- condition.SbdV.EpkX.kpi.map(function (kpi) {
786
- if (kpi === condition.YEhB.SbdV.EDaN) {
785
+ condition.LHnZ.PjLw.kpi.map(function (kpi) {
786
+ if (kpi === condition.idDI.LHnZ.dXou) {
787
787
  //unregister the previous event
788
- ceInstance.unregisterFromEvent(generateKey(precondition.QksQ) + "___" + precondition.SbdV.EDaN, _this);
789
- ceInstance.registerForEvent(toUpperCase(condition.SbdV.EpkX.et) + "___" + kpi, _this.aZcq);
788
+ ceInstance.unregisterFromEvent(generateKey(precondition.GwDz) + "___" + precondition.LHnZ.dXou, _this);
789
+ ceInstance.registerForEvent(toUpperCase(condition.LHnZ.PjLw.et) + "___" + kpi, _this.Ijls);
790
790
  } else {
791
- ceInstance.registerForEvent(toUpperCase(condition.SbdV.EpkX.et) + "___" + kpi, _this.EfFk);
791
+ ceInstance.registerForEvent(toUpperCase(condition.LHnZ.PjLw.et) + "___" + kpi, _this.MKnM);
792
792
  }
793
793
  });
794
794
  }
795
795
  } else {
796
- ceInstance.unregisterFromEvent(generateKey(precondition.QksQ) + "___" + precondition.SbdV.EDaN, _this);
797
- ceInstance.registerForEvent(generateKey(condition.QksQ) + "___" + condition.SbdV.EDaN, _this);
796
+ ceInstance.unregisterFromEvent(generateKey(precondition.GwDz) + "___" + precondition.LHnZ.dXou, _this);
797
+ ceInstance.registerForEvent(generateKey(condition.GwDz) + "___" + condition.LHnZ.dXou, _this);
798
798
  }
799
- _this.JfUj[name] = Date.now();
799
+ _this.ATJy[name] = Date.now();
800
800
  }
801
801
  return;
802
802
  }
803
803
 
804
804
  // Validate Condition
805
- var validationStatus = generateKey(_this.qXKr.QksQ) === type && _this.oLnh(time - _this.qXKr.YEhB.dAXx, _this.qXKr.OuAR) && _this.qXKr.SbdV.EDaN === name && _this.MUef(_this.qXKr.SbdV.EpkX, additionalInfo);
805
+ var validationStatus = generateKey(_this.ZXgH.GwDz) === type && _this.gVIC(time - _this.ZXgH.idDI.wLrd, _this.ZXgH.pZbN) && _this.ZXgH.LHnZ.dXou === name && _this.XxaE(_this.ZXgH.LHnZ.PjLw, additionalInfo);
806
806
  if (validationStatus) {
807
- _this.XsTp += 1;
808
- _this.HPUo = _this.jjDO(_this.XsTp, _this.qXKr.kedV, _this.qXKr.oakv);
809
- if (_this.HPUo) {
810
- _this.qXKr.dAXx = time;
811
- ceInstance.validate(_this.jaGt, _this.RIDN);
807
+ _this.AFha += 1;
808
+ _this.dzHG = _this.TfGM(_this.AFha, _this.ZXgH.cyan, _this.ZXgH.FdOF);
809
+ if (_this.dzHG) {
810
+ _this.ZXgH.wLrd = time;
811
+ ceInstance.validate(_this.xWwF, _this.ewWl);
812
812
  }
813
813
  }
814
814
  });
815
- _defineProperty(this, "nTnW", function (type, name, time, additionalInfo) {
815
+ _defineProperty(this, "YBSM", function (type, name, time, additionalInfo) {
816
816
  var ceInstance = CE.getInstance();
817
- var validationStatus = generateKey(_this.yIMt.QksQ) === type && _this.oLnh(time, _this.yIMt.OuAR) && _this.yIMt.SbdV.EDaN === name && _this.MUef(_this.yIMt.SbdV.EpkX, additionalInfo);
817
+ var validationStatus = generateKey(_this.AwpM.GwDz) === type && _this.gVIC(time, _this.AwpM.pZbN) && _this.AwpM.LHnZ.dXou === name && _this.XxaE(_this.AwpM.LHnZ.PjLw, additionalInfo);
818
818
  if (validationStatus) {
819
- _this.XsTp += 1;
820
- _this.HPUo = _this.jjDO(_this.XsTp, _this.yIMt.kedV, _this.yIMt.oakv);
821
- if (_this.HPUo) {
822
- _this.yIMt.dAXx = time;
823
- ceInstance.validateForTermination(_this.jaGt, _this.RIDN);
819
+ _this.AFha += 1;
820
+ _this.dzHG = _this.TfGM(_this.AFha, _this.AwpM.cyan, _this.AwpM.FdOF);
821
+ if (_this.dzHG) {
822
+ _this.AwpM.wLrd = time;
823
+ ceInstance.validateForTermination(_this.xWwF, _this.ewWl);
824
824
  }
825
825
  }
826
826
  });
827
- _defineProperty(this, "alII", function (type, name, time, additionalInfo) {
828
- var precondition = _this.qXKr.YEhB;
829
- return generateKey(precondition.QksQ) === type && precondition.SbdV.EDaN === name && _this.oLnh(time, precondition.OuAR) && _this.MUef(precondition.SbdV.EpkX, additionalInfo);
827
+ _defineProperty(this, "cAeN", function (type, name, time, additionalInfo) {
828
+ var precondition = _this.ZXgH.idDI;
829
+ return generateKey(precondition.GwDz) === type && precondition.LHnZ.dXou === name && _this.gVIC(time, precondition.pZbN) && _this.XxaE(precondition.LHnZ.PjLw, additionalInfo);
830
830
  });
831
- _defineProperty(this, "oLnh", function (time, timeBounds) {
831
+ _defineProperty(this, "gVIC", function (time, timeBounds) {
832
832
  var currentTime = Math.ceil(time);
833
- return currentTime > timeBounds.vQNe && currentTime < timeBounds.idSb;
833
+ return currentTime > timeBounds.ubix && currentTime < timeBounds.xTww;
834
834
  });
835
- _defineProperty(this, "jjDO", function (current, required, operator) {
835
+ _defineProperty(this, "TfGM", function (current, required, operator) {
836
836
  var checkOld = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
837
- if (checkOld && _this.qXKr.Pkry) {
838
- current = current + _this.fTSz;
837
+ if (checkOld && _this.ZXgH.LnGT) {
838
+ current = current + _this.Swao;
839
839
  }
840
840
  switch (operator) {
841
841
  case "EQ":
@@ -852,7 +852,7 @@
852
852
  return false;
853
853
  }
854
854
  });
855
- _defineProperty(this, "MUef", function (expected, received) {
855
+ _defineProperty(this, "XxaE", function (expected, received) {
856
856
  var status = true;
857
857
  try {
858
858
  var _loop = function _loop() {
@@ -877,11 +877,11 @@
877
877
  loggedValues = [received[item]];
878
878
  }
879
879
  var match = loggedValues.some(function (loggedValue) {
880
- return qjgz(loggedValue, expectedValue, operator);
880
+ return zuMV(loggedValue, expectedValue, operator);
881
881
  });
882
882
  status = status && match;
883
883
  } else {
884
- status = status && qjgz(received[item], expected[item], "EQ");
884
+ status = status && zuMV(received[item], expected[item], "EQ");
885
885
  }
886
886
  },
887
887
  _ret;
@@ -900,13 +900,13 @@
900
900
  key: "_displayCampaign",
901
901
  value: function _displayCampaign(time) {
902
902
  var ceInstance = CE.getInstance();
903
- this.HPUo = true;
904
- if (this.HPUo) {
905
- this.XsTp += 1;
906
- this.HPUo = this.jjDO(this.XsTp, this.qXKr.kedV, this.qXKr.oakv);
907
- if (this.HPUo) {
908
- this.qXKr.dAXx = time;
909
- ceInstance.validate(this.jaGt, this.RIDN);
903
+ this.dzHG = true;
904
+ if (this.dzHG) {
905
+ this.AFha += 1;
906
+ this.dzHG = this.TfGM(this.AFha, this.ZXgH.cyan, this.ZXgH.FdOF);
907
+ if (this.dzHG) {
908
+ this.ZXgH.wLrd = time;
909
+ ceInstance.validate(this.xWwF, this.ewWl);
910
910
  }
911
911
  }
912
912
  }
@@ -923,20 +923,20 @@
923
923
  var OverallConfig = /*#__PURE__*/_createClass(function OverallConfig() {
924
924
  var _this = this;
925
925
  _classCallCheck(this, OverallConfig);
926
- _defineProperty(this, "kgNo", []);
926
+ _defineProperty(this, "PuiS", []);
927
927
  _defineProperty(this, "_ret_day", {});
928
- _defineProperty(this, "mequ", {});
929
- _defineProperty(this, "CRUL", false);
930
- _defineProperty(this, "mxWo", false);
928
+ _defineProperty(this, "KMnE", {});
929
+ _defineProperty(this, "TIdq", false);
930
+ _defineProperty(this, "BItf", false);
931
931
  _defineProperty(this, "parse", function () {
932
932
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
933
933
  try {
934
- _this.kgNo = config.overall_cfg.events;
934
+ _this.PuiS = config.overall_cfg.events;
935
935
  _this._ret_day = config.overall_cfg.ret_day;
936
- _this.mequ = config.overall_cfg.session;
937
- _this.CRUL = config.overall_cfg.toggleRetDay;
938
- _this.kgNo = config.overall_cfg.events;
939
- _this.mxWo = config.overall_cfg.toggleSession;
936
+ _this.KMnE = config.overall_cfg.session;
937
+ _this.TIdq = config.overall_cfg.toggleRetDay;
938
+ _this.PuiS = config.overall_cfg.events;
939
+ _this.BItf = config.overall_cfg.toggleSession;
940
940
  } catch (error) {
941
941
  Logger$6.error(error);
942
942
  return false;
@@ -946,10 +946,10 @@
946
946
  _defineProperty(this, "validate", function () {
947
947
  var retainedDays = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_DAYS));
948
948
  var retainedSession = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_SESSIONS));
949
- if (_this.CRUL && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
949
+ if (_this.TIdq && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
950
950
  return false;
951
951
  }
952
- if (_this.mxWo && !isNaN(retainedSession) && !(retainedSession >= _this.mequ.from && retainedSession <= _this.mequ.to)) {
952
+ if (_this.BItf && !isNaN(retainedSession) && !(retainedSession >= _this.KMnE.from && retainedSession <= _this.KMnE.to)) {
953
953
  return false;
954
954
  }
955
955
  try {
@@ -957,8 +957,8 @@
957
957
  var data = Apxor.getController().getFromStorage("_apx_lt_count");
958
958
  var siteid = Apxor.getSiteId();
959
959
  var LtCountObjDecoded = JSON.parse(new TextDecoder().decode(stringToArrayBuffer(decode(siteid, data))));
960
- for (var i = 0; i < _this.kgNo.length; i++) {
961
- var evName = _this.kgNo[i].name.replace("'", "").replace("’", "");
960
+ for (var i = 0; i < _this.PuiS.length; i++) {
961
+ var evName = _this.PuiS[i].name.replace("'", "").replace("’", "");
962
962
  if (LtCountObjDecoded[evName]) {
963
963
  return false;
964
964
  }
@@ -974,14 +974,14 @@
974
974
  var Attributes = /*#__PURE__*/_createClass(function Attributes() {
975
975
  var _this = this;
976
976
  _classCallCheck(this, Attributes);
977
- _defineProperty(this, "oyin", []);
978
- _defineProperty(this, "Pifw", []);
977
+ _defineProperty(this, "qHve", []);
978
+ _defineProperty(this, "hfXD", []);
979
979
  _defineProperty(this, "parse", function () {
980
980
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
981
981
  try {
982
- _this.oyin = config.attributes.user;
983
- _this.Pifw = config.attributes.session;
984
- if (!Array.isArray(_this.oyin) || !Array.isArray(_this.Pifw)) {
982
+ _this.qHve = config.attributes.user;
983
+ _this.hfXD = config.attributes.session;
984
+ if (!Array.isArray(_this.qHve) || !Array.isArray(_this.hfXD)) {
985
985
  Logger$7.error("No attributes");
986
986
  return false;
987
987
  }
@@ -992,9 +992,9 @@
992
992
  return true;
993
993
  });
994
994
  _defineProperty(this, "validate", function (user, session) {
995
- return _this.larY(user, _this.oyin) && _this.larY(session, _this.Pifw);
995
+ return _this.AYgA(user, _this.qHve) && _this.AYgA(session, _this.hfXD);
996
996
  });
997
- _defineProperty(this, "larY", function (attributes, expected) {
997
+ _defineProperty(this, "AYgA", function (attributes, expected) {
998
998
  var length = expected.length;
999
999
  var status = true;
1000
1000
  try {
@@ -1024,7 +1024,7 @@
1024
1024
  }
1025
1025
  var match = loggedValues.some(function (loggedValue) {
1026
1026
  return values.some(function (configValue) {
1027
- return qjgz(loggedValue, configValue, operator);
1027
+ return zuMV(loggedValue, configValue, operator);
1028
1028
  });
1029
1029
  });
1030
1030
  status = status && match;
@@ -1048,18 +1048,18 @@
1048
1048
  var TimeBasedTermination = /*#__PURE__*/_createClass(function TimeBasedTermination() {
1049
1049
  var _this = this;
1050
1050
  _classCallCheck(this, TimeBasedTermination);
1051
- _defineProperty(this, "NURV", Apxor.getController());
1051
+ _defineProperty(this, "mmqX", Apxor.getController());
1052
1052
  _defineProperty(this, "type", "");
1053
1053
  _defineProperty(this, "_duration_seconds", 0);
1054
- _defineProperty(this, "eUbV", 1);
1054
+ _defineProperty(this, "ebrV", 1);
1055
1055
  _defineProperty(this, "parse", function (config) {
1056
1056
  try {
1057
1057
  var _config$terminate_inf, _config$terminate_inf2, _config$terminate_inf3;
1058
- _this.pfyk = (_config$terminate_inf = config.terminate_info.time_based) === null || _config$terminate_inf === void 0 ? void 0 : _config$terminate_inf.type;
1058
+ _this.upBe = (_config$terminate_inf = config.terminate_info.time_based) === null || _config$terminate_inf === void 0 ? void 0 : _config$terminate_inf.type;
1059
1059
  _this._duration_seconds = (_config$terminate_inf2 = config.terminate_info) === null || _config$terminate_inf2 === void 0 ? void 0 : _config$terminate_inf2.time_based.duration_seconds;
1060
- _this.eUbV = (_config$terminate_inf3 = config.terminate_info.time_based) === null || _config$terminate_inf3 === void 0 ? void 0 : _config$terminate_inf3.days;
1061
- if (_this.qjgz(config._id)) {
1062
- _this.NURV.persistTerminationInfoLocally(config._id);
1060
+ _this.ebrV = (_config$terminate_inf3 = config.terminate_info.time_based) === null || _config$terminate_inf3 === void 0 ? void 0 : _config$terminate_inf3.days;
1061
+ if (_this.zuMV(config._id)) {
1062
+ _this.mmqX.persistTerminationInfoLocally(config._id);
1063
1063
  return false;
1064
1064
  }
1065
1065
  } catch (_unused) {
@@ -1067,16 +1067,16 @@
1067
1067
  }
1068
1068
  return true;
1069
1069
  });
1070
- _defineProperty(this, "qjgz", function (id) {
1070
+ _defineProperty(this, "zuMV", function (id) {
1071
1071
  var _Data$id;
1072
- var Data = JSON.parse(_this.NURV.getFromStorage(APX_TERMINATION_ID));
1072
+ var Data = JSON.parse(_this.mmqX.getFromStorage(APX_TERMINATION_ID));
1073
1073
  if (!Data[id] || !((_Data$id = Data[id]) !== null && _Data$id !== void 0 && _Data$id.startDate)) return false;
1074
1074
  var startDate = new Date(Data[id].startDate);
1075
1075
  var presentDate = new Date(getDateInMMDDYYYY());
1076
1076
  var diff = parseInt((presentDate - startDate) / (1000 * 60 * 60 * 24), 10);
1077
1077
  var currentTime = _getTime();
1078
- var Xmbz = Data[id].Xmbz;
1079
- return diff === _this.eUbV && currentTime.hours >= Xmbz.hours || diff > _this.eUbV || Data[id].goalAcheived;
1078
+ var gDYY = Data[id].gDYY;
1079
+ return diff === _this.ebrV && currentTime.hours >= gDYY.hours || diff > _this.ebrV || Data[id].goalAcheived;
1080
1080
  });
1081
1081
  });
1082
1082
 
@@ -1085,19 +1085,19 @@
1085
1085
  _classCallCheck(this, TerminationInfo);
1086
1086
  _defineProperty(this, "enable_goal_events", false);
1087
1087
  _defineProperty(this, "attributes", {});
1088
- _defineProperty(this, "WnkR", new Attributes());
1089
- _defineProperty(this, "jcBj", new TimeBasedTermination());
1088
+ _defineProperty(this, "KDkd", new Attributes());
1089
+ _defineProperty(this, "uNVj", new TimeBasedTermination());
1090
1090
  _defineProperty(this, "parse", function () {
1091
1091
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1092
1092
  try {
1093
1093
  var _config$terminate_inf, _config$terminate_inf2, _config$terminate_inf3;
1094
1094
  _this.enable_time_based = config === null || config === void 0 || (_config$terminate_inf = config.terminate_info) === null || _config$terminate_inf === void 0 ? void 0 : _config$terminate_inf.enable_time_based;
1095
- if (_this.enable_time_based && !_this.jcBj.parse(config)) {
1095
+ if (_this.enable_time_based && !_this.uNVj.parse(config)) {
1096
1096
  return false;
1097
1097
  }
1098
1098
  _this.enable_goal_events = config === null || config === void 0 || (_config$terminate_inf2 = config.terminate_info) === null || _config$terminate_inf2 === void 0 ? void 0 : _config$terminate_inf2.enable_goal_events;
1099
1099
  _this.enable_attributes = config === null || config === void 0 || (_config$terminate_inf3 = config.terminate_info) === null || _config$terminate_inf3 === void 0 ? void 0 : _config$terminate_inf3.enable_attributes;
1100
- if (_this.enable_attributes && !_this.WnkR.parse(config.terminate_info)) {
1100
+ if (_this.enable_attributes && !_this.KDkd.parse(config.terminate_info)) {
1101
1101
  return false;
1102
1102
  }
1103
1103
  } catch (error) {
@@ -1107,7 +1107,7 @@
1107
1107
  return true;
1108
1108
  });
1109
1109
  _defineProperty(this, "validate", function (user, session) {
1110
- return _this.WnkR.validate(user, session);
1110
+ return _this.KDkd.validate(user, session);
1111
1111
  });
1112
1112
  });
1113
1113
 
@@ -1115,17 +1115,17 @@
1115
1115
  var ConfigItem = /*#__PURE__*/_createClass(function ConfigItem() {
1116
1116
  var _this = this;
1117
1117
  _classCallCheck(this, ConfigItem);
1118
- _defineProperty(this, "oWeW", []);
1119
- _defineProperty(this, "bwHJ", []);
1120
- _defineProperty(this, "jaGt", "");
1121
- _defineProperty(this, "ylID", new Meta());
1122
- _defineProperty(this, "fGtu", new Audience());
1123
- _defineProperty(this, "YTxk", new Validity());
1124
- _defineProperty(this, "CWOw", new Frequency());
1125
- _defineProperty(this, "VUII", new OverallConfig());
1126
- _defineProperty(this, "xoSz", new TerminationInfo());
1127
- _defineProperty(this, "uZEl", false);
1128
- _defineProperty(this, "TYUY", []);
1118
+ _defineProperty(this, "hmOw", []);
1119
+ _defineProperty(this, "mlaS", []);
1120
+ _defineProperty(this, "xWwF", "");
1121
+ _defineProperty(this, "axSA", new Meta());
1122
+ _defineProperty(this, "oypC", new Audience());
1123
+ _defineProperty(this, "TTrx", new Validity());
1124
+ _defineProperty(this, "ihSD", new Frequency());
1125
+ _defineProperty(this, "KUHf", new OverallConfig());
1126
+ _defineProperty(this, "qNqv", new TerminationInfo());
1127
+ _defineProperty(this, "AKqc", false);
1128
+ _defineProperty(this, "NIKc", []);
1129
1129
  _defineProperty(this, "parse", function () {
1130
1130
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1131
1131
  try {
@@ -1142,7 +1142,7 @@
1142
1142
  }
1143
1143
 
1144
1144
  // If META, VALIDITY, FREQUENCY and AUDIENCE is not parsed properly, throw it out
1145
- if (!(_this.ylID.parse(config) && _this.YTxk.parse(config) && _this.CWOw.parse(config) && _this.fGtu.parse(config) && _this.VUII.parse(config) && _this.xoSz.parse(config))) {
1145
+ if (!(_this.axSA.parse(config) && _this.TTrx.parse(config) && _this.ihSD.parse(config) && _this.oypC.parse(config) && _this.KUHf.parse(config) && _this.qNqv.parse(config))) {
1146
1146
  return false;
1147
1147
  }
1148
1148
 
@@ -1151,9 +1151,9 @@
1151
1151
  Logger$8.error("No valid conditions", config.conditions);
1152
1152
  return false;
1153
1153
  }
1154
- _this.jaGt = config._id;
1155
- _this.uZEl = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
1156
- if (_this.uZEl) {
1154
+ _this.xWwF = config._id;
1155
+ _this.AKqc = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
1156
+ if (_this.AKqc) {
1157
1157
  // iff respectSequence is true, Sort the Conditions by their sequence order
1158
1158
  // We need to sort, if server sends them in orderless manner
1159
1159
  config.conditions.sort(function (prev, current) {
@@ -1165,17 +1165,17 @@
1165
1165
  var conditions = config.conditions;
1166
1166
  var length = conditions.length;
1167
1167
  for (var index = 0; index < length; index++) {
1168
- _this.TYUY = [];
1168
+ _this.NIKc = [];
1169
1169
  var condition = conditions[index];
1170
1170
  if (condition.type === "didn't") {
1171
- var qXKr$details;
1171
+ var ZXgH$details;
1172
1172
  var obj = {
1173
1173
  trigger_key: condition.trigger.details.name,
1174
- no_kpi_array: condition === null || condition === void 0 || (qXKr$details = condition.details) === null || qXKr$details === void 0 || (qXKr$details = qXKr$details.additional_info) === null || qXKr$details === void 0 ? void 0 : qXKr$details.nkpi,
1174
+ no_kpi_array: condition === null || condition === void 0 || (ZXgH$details = condition.details) === null || ZXgH$details === void 0 || (ZXgH$details = ZXgH$details.additional_info) === null || ZXgH$details === void 0 ? void 0 : ZXgH$details.nkpi,
1175
1175
  condition_id: condition === null || condition === void 0 ? void 0 : condition._id,
1176
1176
  time_bounds: condition.time_bounds.upper
1177
1177
  };
1178
- _this.TYUY = [].concat(_toConsumableArray(_this.TYUY), [obj]);
1178
+ _this.NIKc = [].concat(_toConsumableArray(_this.NIKc), [obj]);
1179
1179
  //this will be the key
1180
1180
  //when event occur check this array and then then check the time
1181
1181
  //check the time diffrence
@@ -1184,73 +1184,73 @@
1184
1184
  }
1185
1185
 
1186
1186
  var conditionValidator = new ConditionValidator();
1187
- if (conditionValidator.initialize(condition, _this.jaGt, index, _this.uZEl, _this.TYUY)) {
1188
- _this.oWeW.push(conditionValidator);
1187
+ if (conditionValidator.initialize(condition, _this.xWwF, index, _this.AKqc, _this.NIKc)) {
1188
+ _this.hmOw.push(conditionValidator);
1189
1189
  }
1190
1190
  }
1191
- if (_this.xoSz.enable_goal_events) {
1191
+ if (_this.qNqv.enable_goal_events) {
1192
1192
  var goal_events = config.terminate_info.goal_events.events;
1193
1193
  var goaleventslength = goal_events.length;
1194
1194
  for (var i = 0; i < goaleventslength; i++) {
1195
1195
  var _conditionValidator = new ConditionValidator();
1196
- if (_conditionValidator.initialize(goal_events[i], _this.jaGt, i, true, [], "termination")) {
1197
- _this.bwHJ.push(_conditionValidator);
1196
+ if (_conditionValidator.initialize(goal_events[i], _this.xWwF, i, true, [], "termination")) {
1197
+ _this.mlaS.push(_conditionValidator);
1198
1198
  }
1199
1199
  }
1200
1200
  }
1201
- return _this.oWeW.length > 0;
1201
+ return _this.hmOw.length > 0;
1202
1202
  } catch (error) {
1203
1203
  Logger$8.error(error);
1204
1204
  return false;
1205
1205
  }
1206
1206
  });
1207
- _defineProperty(this, "Adtv", function (index) {
1207
+ _defineProperty(this, "SslG", function (index) {
1208
1208
  if (index < 0) {
1209
1209
  return;
1210
1210
  }
1211
- if (_this.uZEl) {
1212
- var conditionValidator = _this.oWeW[index];
1213
- if (isDefined(conditionValidator) && conditionValidator.HPUo) {
1211
+ if (_this.AKqc) {
1212
+ var conditionValidator = _this.hmOw[index];
1213
+ if (isDefined(conditionValidator) && conditionValidator.dzHG) {
1214
1214
  // Check if previous validator is satisfied
1215
- var prevValidator = _this.oWeW[index - 1];
1216
- if (isDefined(prevValidator) && !prevValidator.HPUo) {
1215
+ var prevValidator = _this.hmOw[index - 1];
1216
+ if (isDefined(prevValidator) && !prevValidator.dzHG) {
1217
1217
  // TODO: If current index is satisfied before previous one, do something
1218
1218
  // either unregister all conditions or remove this item from ConfigLookup
1219
1219
  return;
1220
1220
  }
1221
- var nextValidator = _this.oWeW[index + 1];
1221
+ var nextValidator = _this.hmOw[index + 1];
1222
1222
  if (!isDefined(nextValidator)) {
1223
1223
  // It means this is the last condition
1224
1224
  // Validate all conditions
1225
- _this.BmHg();
1225
+ _this.wUEZ();
1226
1226
  } else {
1227
- nextValidator.OJSD();
1227
+ nextValidator.DGaq();
1228
1228
  }
1229
1229
  }
1230
1230
  } else {
1231
1231
  // Validate all conditions
1232
- _this.BmHg();
1232
+ _this.wUEZ();
1233
1233
  }
1234
1234
  });
1235
- _defineProperty(this, "RbFI", function (index) {
1235
+ _defineProperty(this, "uDmd", function (index) {
1236
1236
  if (index < 0) {
1237
1237
  return;
1238
1238
  }
1239
- _this.GuEG();
1239
+ _this.Fkcf();
1240
1240
  });
1241
- _defineProperty(this, "BmHg", function () {
1241
+ _defineProperty(this, "wUEZ", function () {
1242
1242
  // Check If Audience, Validity is satisfied or not
1243
1243
  var userAttributes = Apxor.getController().getUserAttributes();
1244
1244
  var sessionAttributes = Apxor.getController().getSessionAttributes();
1245
- if (!_this.YTxk.validate() || !_this.fGtu.validate(userAttributes, sessionAttributes) || !_this.VUII.validate()) {
1245
+ if (!_this.TTrx.validate() || !_this.oypC.validate(userAttributes, sessionAttributes) || !_this.KUHf.validate()) {
1246
1246
  return;
1247
1247
  }
1248
- var length = _this.oWeW.length;
1248
+ var length = _this.hmOw.length;
1249
1249
  var isSatisfied = length < 1;
1250
1250
  var combineOperator = "";
1251
1251
  for (var index = 0; index < length; index++) {
1252
- var validator = _this.oWeW[index];
1253
- var currentResult = validator.HPUo;
1252
+ var validator = _this.hmOw[index];
1253
+ var currentResult = validator.dzHG;
1254
1254
  if (combineOperator.trim() === "") {
1255
1255
  isSatisfied = currentResult;
1256
1256
  } else {
@@ -1263,39 +1263,39 @@
1263
1263
  break;
1264
1264
  }
1265
1265
  }
1266
- combineOperator = validator.yHRM;
1266
+ combineOperator = validator.Sdoc;
1267
1267
  }
1268
1268
  if (isSatisfied) {
1269
1269
  console.debug("onCondition satisfied");
1270
1270
  // Check if count reached it's maximum
1271
- if (!_this.CWOw.WTEf(_this.jaGt)) {
1272
- console.warn("Maximum limit reached", _this.jaGt);
1271
+ if (!_this.ihSD.HBeu(_this.xWwF)) {
1272
+ console.warn("Maximum limit reached", _this.xWwF);
1273
1273
  return;
1274
1274
  }
1275
- console.log("Dispatching event", _this.ylID.pfyk);
1276
- if (_this.ylID._only_context === true) {
1277
- Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.ylID._attr), {}, {
1278
- message_name: _this.ylID.EDaN,
1279
- id: _this.jaGt
1275
+ console.log("Dispatching event", _this.axSA.upBe);
1276
+ if (_this.axSA._only_context === true) {
1277
+ Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.axSA._attr), {}, {
1278
+ message_name: _this.axSA.dXou,
1279
+ id: _this.xWwF
1280
1280
  }));
1281
1281
  }
1282
1282
  // Emit event
1283
- Apxor.getController().dispatchEvent(_this.ylID.pfyk, {
1284
- name: _this.ylID.pfyk,
1283
+ Apxor.getController().dispatchEvent(_this.axSA.upBe, {
1284
+ name: _this.axSA.upBe,
1285
1285
  additional_info: {
1286
- uuid: _this.jaGt,
1287
- name: _this.ylID.EDaN
1286
+ uuid: _this.xWwF,
1287
+ name: _this.axSA.dXou
1288
1288
  }
1289
1289
  });
1290
1290
  }
1291
1291
  });
1292
- _defineProperty(this, "GuEG", function () {
1293
- var length = _this.bwHJ.length;
1292
+ _defineProperty(this, "Fkcf", function () {
1293
+ var length = _this.mlaS.length;
1294
1294
  var isSatisfied = length < 1;
1295
1295
  var combineOperator = "";
1296
1296
  for (var index = 0; index < length; index++) {
1297
- var validator = _this.bwHJ[index];
1298
- var currentResult = validator.HPUo;
1297
+ var validator = _this.mlaS[index];
1298
+ var currentResult = validator.dzHG;
1299
1299
  if (combineOperator.trim() === "") {
1300
1300
  isSatisfied = currentResult;
1301
1301
  } else {
@@ -1308,23 +1308,23 @@
1308
1308
  break;
1309
1309
  }
1310
1310
  }
1311
- combineOperator = validator.mCal;
1311
+ combineOperator = validator.gzxI;
1312
1312
  }
1313
1313
  if (isSatisfied) {
1314
- console.log("Dispatching event", _this.ylID.pfyk);
1315
- Apxor.getController().persistTerminationInfoLocally(_this.jaGt);
1316
- if (_this.ylID._only_context === true) {
1317
- Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.ylID._attr), {}, {
1318
- message_name: _this.ylID.EDaN,
1319
- id: _this.jaGt
1314
+ console.log("Dispatching event", _this.axSA.upBe);
1315
+ Apxor.getController().persistTerminationInfoLocally(_this.xWwF);
1316
+ if (_this.axSA._only_context === true) {
1317
+ Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.axSA._attr), {}, {
1318
+ message_name: _this.axSA.dXou,
1319
+ id: _this.xWwF
1320
1320
  }));
1321
1321
  }
1322
1322
  // Emit event
1323
- Apxor.getController().dispatchEvent(_this.ylID.pfyk, {
1324
- name: _this.ylID.pfyk,
1323
+ Apxor.getController().dispatchEvent(_this.axSA.upBe, {
1324
+ name: _this.axSA.upBe,
1325
1325
  additional_info: {
1326
- uuid: _this.jaGt,
1327
- name: _this.ylID.EDaN
1326
+ uuid: _this.xWwF,
1327
+ name: _this.axSA.dXou
1328
1328
  }
1329
1329
  });
1330
1330
  }
@@ -1332,23 +1332,23 @@
1332
1332
  _defineProperty(this, "validateForTerminationAttributes", function () {
1333
1333
  var userAttributes = Apxor.getController().getUserAttributes();
1334
1334
  var sessionAttributes = Apxor.getController().getSessionAttributes();
1335
- return _this.xoSz.validate(userAttributes, sessionAttributes);
1335
+ return _this.qNqv.validate(userAttributes, sessionAttributes);
1336
1336
  });
1337
- _defineProperty(this, "oDrA", function () {
1338
- _this.CWOw.oDrA();
1337
+ _defineProperty(this, "yGJs", function () {
1338
+ _this.ihSD.yGJs();
1339
1339
  });
1340
1340
  _defineProperty(this, "getFrequencyCount", function () {
1341
- return _this.CWOw.getFrequencyCount();
1341
+ return _this.ihSD.getFrequencyCount();
1342
1342
  });
1343
- _defineProperty(this, "XgXS", function () {
1344
- return _this.CWOw.XbPF();
1343
+ _defineProperty(this, "vtVj", function () {
1344
+ return _this.ihSD.NSSU();
1345
1345
  });
1346
1346
  });
1347
1347
 
1348
1348
  var ConfigLookup = /*#__PURE__*/_createClass(function ConfigLookup() {
1349
1349
  var _this = this;
1350
1350
  _classCallCheck(this, ConfigLookup);
1351
- _defineProperty(this, "IZYQ", {});
1351
+ _defineProperty(this, "aSMs", {});
1352
1352
  _defineProperty(this, "parse", function () {
1353
1353
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
1354
1354
  configs: []
@@ -1371,7 +1371,7 @@
1371
1371
  var configId = _config._id;
1372
1372
  var configItem = new ConfigItem();
1373
1373
  if (configItem.parse(_config)) {
1374
- _this.IZYQ[configId] = configItem;
1374
+ _this.aSMs[configId] = configItem;
1375
1375
  } else {
1376
1376
  console.warn("Failed to parse cfg", configId);
1377
1377
  }
@@ -1379,44 +1379,44 @@
1379
1379
  }
1380
1380
  });
1381
1381
  _defineProperty(this, "validate", function (id, index) {
1382
- if (_this.IZYQ[id]) {
1383
- var configItem = _this.IZYQ[id];
1384
- configItem.Adtv(index);
1382
+ if (_this.aSMs[id]) {
1383
+ var configItem = _this.aSMs[id];
1384
+ configItem.SslG(index);
1385
1385
  }
1386
1386
  });
1387
1387
  _defineProperty(this, "validateForTermination", function (id, index) {
1388
- if (_this.IZYQ[id]) {
1389
- var configItem = _this.IZYQ[id];
1390
- configItem.RbFI(index);
1388
+ if (_this.aSMs[id]) {
1389
+ var configItem = _this.aSMs[id];
1390
+ configItem.uDmd(index);
1391
1391
  }
1392
1392
  });
1393
1393
  _defineProperty(this, "validateForTerminationAttributes", function (id) {
1394
- if (_this.IZYQ[id]) {
1395
- var configItem = _this.IZYQ[id];
1394
+ if (_this.aSMs[id]) {
1395
+ var configItem = _this.aSMs[id];
1396
1396
  return configItem.validateForTerminationAttributes();
1397
1397
  }
1398
1398
  return false;
1399
1399
  });
1400
- _defineProperty(this, "oDrA", function (id) {
1401
- var campiagnConfig = _this.IZYQ[id];
1402
- campiagnConfig.oDrA();
1400
+ _defineProperty(this, "yGJs", function (id) {
1401
+ var campiagnConfig = _this.aSMs[id];
1402
+ campiagnConfig.yGJs();
1403
1403
  });
1404
1404
  _defineProperty(this, "getFrequencyCount", function (id) {
1405
- var campiagnConfig = _this.IZYQ[id];
1405
+ var campiagnConfig = _this.aSMs[id];
1406
1406
  return campiagnConfig.getFrequencyCount();
1407
1407
  });
1408
1408
  _defineProperty(this, "resetFrequencyCounts", function () {
1409
- var configs = _this.IZYQ;
1409
+ var configs = _this.aSMs;
1410
1410
  for (var configId in configs) {
1411
- configs[configId].XgXS();
1411
+ configs[configId].vtVj();
1412
1412
  }
1413
1413
  });
1414
- _defineProperty(this, "NveP", function (campaignId) {
1414
+ _defineProperty(this, "iSci", function (campaignId) {
1415
1415
  try {
1416
- if (_this.IZYQ) {
1417
- var configItem = _this.IZYQ[campaignId];
1418
- if (configItem && configItem.ylID) {
1419
- return configItem.ylID;
1416
+ if (_this.aSMs) {
1417
+ var configItem = _this.aSMs[campaignId];
1418
+ if (configItem && configItem.axSA) {
1419
+ return configItem.axSA;
1420
1420
  }
1421
1421
  }
1422
1422
  } catch (e) {
@@ -1432,42 +1432,42 @@
1432
1432
  var EventsListener = /*#__PURE__*/_createClass(function EventsListener() {
1433
1433
  var _this = this;
1434
1434
  _classCallCheck(this, EventsListener);
1435
- _defineProperty(this, "FDcv", {});
1436
- _defineProperty(this, "kJex", []);
1437
- _defineProperty(this, "qMxr", false);
1435
+ _defineProperty(this, "MqKW", {});
1436
+ _defineProperty(this, "PZUh", []);
1437
+ _defineProperty(this, "CrNj", false);
1438
1438
  _defineProperty(this, "initialize", function () {
1439
1439
  var controller = Apxor.getController();
1440
1440
  controller.registerForEvent(APP_EVENT, function (event) {
1441
- return _this.LtdS(event, "AE");
1441
+ return _this.Snah(event, "AE");
1442
1442
  });
1443
1443
  controller.registerForEvent(CLIENT_EVENT, function (event) {
1444
- return _this.LtdS(event, "CE");
1444
+ return _this.Snah(event, "CE");
1445
1445
  });
1446
1446
  });
1447
- _defineProperty(this, "zgeH", function () {
1447
+ _defineProperty(this, "hUlQ", function () {
1448
1448
  // Clear Buffer
1449
- for (var item in _this.kJex) {
1450
- _this.rqKD(item.event, item.key, item.type);
1449
+ for (var item in _this.PZUh) {
1450
+ _this.lMiM(item.event, item.key, item.type);
1451
1451
  }
1452
- _this.qMxr = true;
1452
+ _this.CrNj = true;
1453
1453
  });
1454
- _defineProperty(this, "Weok", function (event, callback) {
1454
+ _defineProperty(this, "colh", function (event, callback) {
1455
1455
  if (!isFunction(callback)) {
1456
1456
  return;
1457
1457
  }
1458
1458
  var listeners;
1459
- if (_this.FDcv[event]) {
1460
- listeners = _this.FDcv[event];
1459
+ if (_this.MqKW[event]) {
1460
+ listeners = _this.MqKW[event];
1461
1461
  } else {
1462
1462
  listeners = [];
1463
1463
  }
1464
1464
  listeners.push(callback);
1465
- _this.FDcv[event] = listeners;
1466
- Logger$9.debug("Listeners list: ", _this.FDcv);
1465
+ _this.MqKW[event] = listeners;
1466
+ Logger$9.debug("Listeners list: ", _this.MqKW);
1467
1467
  });
1468
1468
  _defineProperty(this, "unregisterFromEvent", function (event, callback) {
1469
- if (_this.FDcv[event]) {
1470
- var listeners = _this.FDcv[event];
1469
+ if (_this.MqKW[event]) {
1470
+ var listeners = _this.MqKW[event];
1471
1471
  var updatedListeners = [];
1472
1472
  for (var index = 0; index < listeners.length; index++) {
1473
1473
  var listener = listeners[index];
@@ -1475,25 +1475,25 @@
1475
1475
  updatedListeners.push(listener);
1476
1476
  }
1477
1477
  }
1478
- _this.FDcv[event] = updatedListeners;
1478
+ _this.MqKW[event] = updatedListeners;
1479
1479
  }
1480
1480
  });
1481
- _defineProperty(this, "LtdS", function (event) {
1481
+ _defineProperty(this, "Snah", function (event) {
1482
1482
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "AE";
1483
1483
  var key = type + "___" + event.name;
1484
- _this.rqKD(event, key, type);
1484
+ _this.lMiM(event, key, type);
1485
1485
  });
1486
- _defineProperty(this, "rqKD", function (event, key, type) {
1487
- if (!_this.qMxr) {
1488
- _this.kJex.push({
1486
+ _defineProperty(this, "lMiM", function (event, key, type) {
1487
+ if (!_this.CrNj) {
1488
+ _this.PZUh.push({
1489
1489
  event: event,
1490
1490
  key: key,
1491
1491
  type: type
1492
1492
  });
1493
1493
  } else {
1494
- Logger$9.debug("Notifying listeners for event: " + event + ", " + key, _this.FDcv);
1495
- if (_this.FDcv[key]) {
1496
- var listeners = _this.FDcv[key];
1494
+ Logger$9.debug("Notifying listeners for event: " + event + ", " + key, _this.MqKW);
1495
+ if (_this.MqKW[key]) {
1496
+ var listeners = _this.MqKW[key];
1497
1497
  var time = Apxor.getController().getSDKRunningTimeInSec();
1498
1498
  for (var index = 0; index < listeners.length; index++) {
1499
1499
  var listener = listeners[index];
@@ -1509,17 +1509,17 @@
1509
1509
  function CE() {
1510
1510
  var _this = this;
1511
1511
  _classCallCheck(this, CE);
1512
- _defineProperty(this, "EXbT", false);
1513
- _defineProperty(this, "OqkB", null);
1514
- _defineProperty(this, "wsiO", getDateInDDMMYYYY());
1515
- _defineProperty(this, "DGNj", new EventsListener());
1516
- _defineProperty(this, "nawG", Apxor.getSiteId());
1512
+ _defineProperty(this, "FyrB", false);
1513
+ _defineProperty(this, "EGlR", null);
1514
+ _defineProperty(this, "Emjp", getDateInDDMMYYYY());
1515
+ _defineProperty(this, "WpgE", new EventsListener());
1516
+ _defineProperty(this, "kKtz", Apxor.getSiteId());
1517
1517
  _defineProperty(this, "_qeState", {});
1518
1518
  _defineProperty(this, "getQeState", function () {
1519
1519
  try {
1520
1520
  var data = Apxor.getController().getFromStorage(QE_STATE);
1521
1521
  if (data) {
1522
- return JSON.parse(decode(_this.nawG, data));
1522
+ return JSON.parse(decode(_this.kKtz, data));
1523
1523
  } else {
1524
1524
  _this._qeState = {};
1525
1525
  return _this.setQeState();
@@ -1548,10 +1548,10 @@
1548
1548
  return _this._qeState;
1549
1549
  });
1550
1550
  _defineProperty(this, "initialize", function () {
1551
- if (!_this.EXbT) {
1552
- _this.EXbT = true;
1553
- _this.OqkB = new ConfigLookup();
1554
- _this.DGNj.initialize();
1551
+ if (!_this.FyrB) {
1552
+ _this.FyrB = true;
1553
+ _this.EGlR = new ConfigLookup();
1554
+ _this.WpgE.initialize();
1555
1555
  _this._qeState = _this.getQeState();
1556
1556
  Logger$a.info("QE Initialized..");
1557
1557
  }
@@ -1562,12 +1562,12 @@
1562
1562
  * @param config
1563
1563
  */
1564
1564
  _defineProperty(this, "parse", function (config) {
1565
- if (!_this.TrIj()) {
1565
+ if (!_this.lHre()) {
1566
1566
  Logger$a.warn("Must call init first. Unable to proceed");
1567
1567
  return;
1568
1568
  }
1569
- _this.OqkB.parse(config);
1570
- _this.DGNj.zgeH();
1569
+ _this.EGlR.parse(config);
1570
+ _this.WpgE.hUlQ();
1571
1571
  });
1572
1572
  /**
1573
1573
  * Validates all conditions for given config ID
@@ -1576,19 +1576,19 @@
1576
1576
  * @param index
1577
1577
  */
1578
1578
  _defineProperty(this, "validate", function (id, index) {
1579
- if (!_this.TrIj()) {
1579
+ if (!_this.lHre()) {
1580
1580
  return;
1581
1581
  }
1582
- _this.OqkB.validate(id, index);
1582
+ _this.EGlR.validate(id, index);
1583
1583
  });
1584
1584
  _defineProperty(this, "validateForTermination", function (id, index) {
1585
- if (!_this.TrIj()) {
1585
+ if (!_this.lHre()) {
1586
1586
  return;
1587
1587
  }
1588
- _this.OqkB.validateForTermination(id, index);
1588
+ _this.EGlR.validateForTermination(id, index);
1589
1589
  });
1590
1590
  _defineProperty(this, "validateForTerminationAttributes", function (user, session) {
1591
- return _this.OqkB.validateForTerminationAttributes(user, session);
1591
+ return _this.EGlR.validateForTerminationAttributes(user, session);
1592
1592
  });
1593
1593
  _defineProperty(this, "updateCount", function (id) {
1594
1594
  try {
@@ -1597,22 +1597,22 @@
1597
1597
  }
1598
1598
  _this.incrementFrequencies(id);
1599
1599
  _this.setQeState(id);
1600
- _this.OqkB.oDrA(id);
1600
+ _this.EGlR.yGJs(id);
1601
1601
  } catch (e) {
1602
1602
  console.log("Could not update the count config:".concat(e));
1603
1603
  }
1604
1604
  });
1605
1605
  _defineProperty(this, "resetFrequencyCounts", function () {
1606
- _this.OqkB.resetFrequencyCounts();
1606
+ _this.EGlR.resetFrequencyCounts();
1607
1607
  });
1608
1608
  _defineProperty(this, "getFrequencyCount", function (id) {
1609
- return _this.OqkB.getFrequencyCount(id);
1609
+ return _this.EGlR.getFrequencyCount(id);
1610
1610
  });
1611
1611
  _defineProperty(this, "registerForEvent", function (event, callback) {
1612
- _this.DGNj.Weok(event, callback);
1612
+ _this.WpgE.colh(event, callback);
1613
1613
  });
1614
1614
  _defineProperty(this, "unregisterFromEvent", function (event, callback) {
1615
- _this.DGNj.unregisterFromEvent(event, callback);
1615
+ _this.WpgE.unregisterFromEvent(event, callback);
1616
1616
  });
1617
1617
  /**
1618
1618
  * Fetches the config from Server
@@ -1625,14 +1625,14 @@
1625
1625
  _defineProperty(this, "fetch", function (type, validateUrl, apiUrl, callback) {
1626
1626
  Apxor.getController().fetchConfiguration(type, validateUrl, apiUrl, callback);
1627
1627
  });
1628
- _defineProperty(this, "TrIj", function () {
1629
- return _this.EXbT;
1628
+ _defineProperty(this, "lHre", function () {
1629
+ return _this.FyrB;
1630
1630
  });
1631
1631
  _defineProperty(this, "getCampaignMetaFromQueryEngine", function (campaignId) {
1632
- return _this.OqkB.NveP(campaignId);
1632
+ return _this.EGlR.iSci(campaignId);
1633
1633
  });
1634
- _defineProperty(this, "ZCjh", function () {
1635
- return _this.wsiO;
1634
+ _defineProperty(this, "rvWz", function () {
1635
+ return _this.Emjp;
1636
1636
  });
1637
1637
  if (!CE.instance) {
1638
1638
  CE.instance = this;
@@ -1656,7 +1656,7 @@
1656
1656
  OVERALL: 0,
1657
1657
  DATES: {}
1658
1658
  };
1659
- if (this.wsiO) this._qeState[id].DATES[this.wsiO] = 0;
1659
+ if (this.Emjp) this._qeState[id].DATES[this.Emjp] = 0;
1660
1660
  this.setQeState(id);
1661
1661
  }
1662
1662
  } catch (e) {
@@ -1675,12 +1675,12 @@
1675
1675
 
1676
1676
  // Increment the DATES count for this particular date by 1. If the date changes reset.
1677
1677
  var currentDate = getDateInDDMMYYYY();
1678
- if (currentDate !== this.wsiO || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
1679
- this.wsiO = currentDate;
1678
+ if (currentDate !== this.Emjp || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
1679
+ this.Emjp = currentDate;
1680
1680
  configFrequency.DATES = {};
1681
- configFrequency.DATES[this.wsiO] = 0;
1681
+ configFrequency.DATES[this.Emjp] = 0;
1682
1682
  }
1683
- configFrequency.DATES[this.wsiO] = configFrequency.DATES[this.wsiO] + 1;
1683
+ configFrequency.DATES[this.Emjp] = configFrequency.DATES[this.Emjp] + 1;
1684
1684
  }
1685
1685
  }], [{
1686
1686
  key: "getInstance",
@@ -1699,7 +1699,7 @@
1699
1699
 
1700
1700
  /* eslint-disable no-empty */
1701
1701
 
1702
- window.ceVersion = 140;
1702
+ window.ceVersion = 141;
1703
1703
  try {
1704
1704
  if (exports !== undefined || exports !== null) {
1705
1705
  exports["default"] = CE;