@brndts/brndts-ads 1.10.3 → 1.11.0

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/index.mjs CHANGED
@@ -67739,7 +67739,7 @@ var Config = /*#__PURE__*/ function() {
67739
67739
  {
67740
67740
  key: "getStrategyConfigs",
67741
67741
  value: function getStrategyConfigs(strategy) {
67742
- var _strategyConfig_settings_visibility_duration, _strategyConfig_settings_minimum_display_time, _strategyConfig_settings_cooldown_time;
67742
+ var _strategyConfig_settings_visibility_time, _strategyConfig_settings_minimum_display_time, _strategyConfig_settings_cooldown_time;
67743
67743
  var strategyConfig = this.strategies.find(function(s2) {
67744
67744
  return s2.code === strategy;
67745
67745
  });
@@ -67749,7 +67749,7 @@ var Config = /*#__PURE__*/ function() {
67749
67749
  return _object_spread_props(_object_spread({}, this.configs), {
67750
67750
  ads: _object_spread_props(_object_spread({}, this.configs.ads), {
67751
67751
  presentation: _object_spread_props(_object_spread({}, this.configs.ads.presentation), {
67752
- duration: (_strategyConfig_settings_visibility_duration = strategyConfig.settings.visibility_duration) === null || _strategyConfig_settings_visibility_duration === void 0 ? void 0 : _strategyConfig_settings_visibility_duration.value,
67752
+ duration: (_strategyConfig_settings_visibility_time = strategyConfig.settings.visibility_time) === null || _strategyConfig_settings_visibility_time === void 0 ? void 0 : _strategyConfig_settings_visibility_time.value,
67753
67753
  minDuration: (_strategyConfig_settings_minimum_display_time = strategyConfig.settings.minimum_display_time) === null || _strategyConfig_settings_minimum_display_time === void 0 ? void 0 : _strategyConfig_settings_minimum_display_time.value,
67754
67754
  cooldown: (_strategyConfig_settings_cooldown_time = strategyConfig.settings.cooldown_time) === null || _strategyConfig_settings_cooldown_time === void 0 ? void 0 : _strategyConfig_settings_cooldown_time.value
67755
67755
  })
@@ -69413,13 +69413,63 @@ var AffiliateProvider = /*#__PURE__*/ function(ContentProvider1) {
69413
69413
  },
69414
69414
  {
69415
69415
  key: "getAffiliate",
69416
- value: function getAffiliate(regionId, size) {
69416
+ value: function getAffiliate(regionId, size, adType, regionName) {
69417
69417
  var _this = this;
69418
69418
  if (!regionId) {
69419
+ if (adType && regionName) {
69420
+ var sizes = ContentProvider.adSizes[adType];
69421
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
69422
+ try {
69423
+ var _this1, _loop = function() {
69424
+ var _step_value = _sliced_to_array(_step.value, 2), width = _step_value[0], height = _step_value[1];
69425
+ var identifier = "".concat(width, "x").concat(height);
69426
+ var aff2 = _this1.manifest.filter(function(a) {
69427
+ return a.size.w === width && a.size.h === height;
69428
+ });
69429
+ if (!aff2.length) {
69430
+ return "continue";
69431
+ }
69432
+ if (!_this1.useByRegion[identifier]) {
69433
+ _this1.useByRegion[identifier] = /* @__PURE__ */ new Set();
69434
+ }
69435
+ if (_this1.useByRegion[identifier].size === aff2.length) {
69436
+ _this1.useByRegion[identifier].clear();
69437
+ }
69438
+ var unused2 = aff2.filter(function(a) {
69439
+ return !_this.useByRegion[identifier].has(a.id);
69440
+ });
69441
+ if (unused2.length) {
69442
+ var randomIndex2 = Math.floor(Math.random() * unused2.length);
69443
+ var selected = unused2[randomIndex2];
69444
+ _this1.useByRegion[identifier].add(selected.id);
69445
+ return {
69446
+ v: selected
69447
+ };
69448
+ }
69449
+ };
69450
+ for(var _iterator = sizes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
69451
+ var _ret = (_this1 = this, _loop());
69452
+ if (_type_of(_ret) === "object") return _ret.v;
69453
+ }
69454
+ } catch (err) {
69455
+ _didIteratorError = true;
69456
+ _iteratorError = err;
69457
+ } finally{
69458
+ try {
69459
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
69460
+ _iterator.return();
69461
+ }
69462
+ } finally{
69463
+ if (_didIteratorError) {
69464
+ throw _iteratorError;
69465
+ }
69466
+ }
69467
+ }
69468
+ }
69419
69469
  if ((size === null || size === void 0 ? void 0 : size.width) && (size === null || size === void 0 ? void 0 : size.height)) {
69420
69470
  var identifier = "".concat(size.width, "x").concat(size.height);
69421
69471
  var aff2 = this.manifest.filter(function(a) {
69422
- return a.size.w === size.width && a.size.h === size.height;
69472
+ return a.size.w === (size === null || size === void 0 ? void 0 : size.width) && a.size.h === size.height;
69423
69473
  });
69424
69474
  if (!aff2.length) {
69425
69475
  return null;
@@ -69474,7 +69524,10 @@ var AffiliateProvider = /*#__PURE__*/ function(ContentProvider1) {
69474
69524
  case 1:
69475
69525
  _state.sent();
69476
69526
  affiliate = null;
69477
- if (params.params.useRatio) {
69527
+ if (!affiliate && params.params.adType && params.params.regionName) {
69528
+ affiliate = this.getAffiliate(void 0, params.size, params.params.adType, params.params.regionName);
69529
+ }
69530
+ if (!affiliate && params.params.useRatio) {
69478
69531
  regionInfo = ContentProvider.approxRegionByRatio(params.size.width, params.size.height);
69479
69532
  if (regionInfo) {
69480
69533
  affiliate = this.getAffiliate("".concat(regionInfo.id), {
@@ -69729,15 +69782,22 @@ var PrebidJS = /*#__PURE__*/ function() {
69729
69782
  },
69730
69783
  {
69731
69784
  key: "defineSlot",
69732
- value: function defineSlot(options, slotId, containerId) {
69785
+ value: function defineSlot(options, slotId, containerId, adType) {
69733
69786
  var _window_pbjs;
69734
69787
  var unitDefinition = options.units.find(function(unit) {
69735
69788
  return unit.code === "".concat(slotId);
69736
69789
  });
69790
+ var sizes = [];
69737
69791
  if (!unitDefinition) {
69738
69792
  console.error("No unit definition found for slotId: ".concat(slotId));
69739
69793
  return;
69740
69794
  }
69795
+ if (adType) {
69796
+ sizes = ContentProvider.adSizes[adType];
69797
+ } else {
69798
+ var _unitDefinition_mediaTypes_banner;
69799
+ sizes = ((_unitDefinition_mediaTypes_banner = unitDefinition.mediaTypes.banner) === null || _unitDefinition_mediaTypes_banner === void 0 ? void 0 : _unitDefinition_mediaTypes_banner.sizes) || [];
69800
+ }
69741
69801
  if (!((_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.adUnits.some(function(defUnit) {
69742
69802
  return containerId === defUnit.code;
69743
69803
  }))) {
@@ -69747,6 +69807,11 @@ var PrebidJS = /*#__PURE__*/ function() {
69747
69807
  if ((_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.addAdUnits) {
69748
69808
  window.pbjs.addAdUnits([
69749
69809
  _object_spread_props(_object_spread({}, unitDefinition), {
69810
+ mediaTypes: _object_spread_props(_object_spread({}, unitDefinition.mediaTypes || {}), {
69811
+ banner: _object_spread_props(_object_spread({}, unitDefinition.mediaTypes.banner || {}), {
69812
+ sizes: sizes
69813
+ })
69814
+ }),
69750
69815
  code: containerId
69751
69816
  })
69752
69817
  ]);
@@ -69915,7 +69980,7 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
69915
69980
  key: "request",
69916
69981
  value: function request(params) {
69917
69982
  return _async_to_generator(function() {
69918
- var _this, regionId, regionInfo, regionInfo1;
69983
+ var _this, adType, regionId, regionInfo, regionInfo1;
69919
69984
  return _ts_generator(this, function(_state) {
69920
69985
  switch(_state.label){
69921
69986
  case 0:
@@ -69926,6 +69991,7 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
69926
69991
  ];
69927
69992
  case 1:
69928
69993
  _state.sent();
69994
+ adType = params.params.adType;
69929
69995
  regionId = params.params.regionId;
69930
69996
  if (params.params.useRatio) {
69931
69997
  regionInfo = ContentProvider.approxRegionByRatio(params.size.width, params.size.height);
@@ -69950,7 +70016,7 @@ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider1) {
69950
70016
  ];
69951
70017
  case 2:
69952
70018
  _state.sent();
69953
- PrebidJS.defineSlot(this.options, regionId, params.params.regionId);
70019
+ PrebidJS.defineSlot(this.options, regionId, params.params.regionId, adType);
69954
70020
  PrebidJS.request(regionId, params.params.regionId, function(bids) {
69955
70021
  return _this.processBids(params, bids);
69956
70022
  });
@@ -70224,18 +70290,25 @@ var PrebidGAM = /*#__PURE__*/ function() {
70224
70290
  },
70225
70291
  {
70226
70292
  key: "defineSlot",
70227
- value: function defineSlot(options, slotId, containerId) {
70228
- var _unitDefinition_mediaTypes_banner, _window_pbjs;
70293
+ value: function defineSlot(options, slotId, containerId, adType) {
70294
+ var adName = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "banner";
70295
+ var _window_pbjs;
70229
70296
  var gamNetworkId = _PrebidGAM.getProperGAMNetworkId(options);
70230
70297
  var unitDefinition = options.units.find(function(unit) {
70231
70298
  return unit.code === "".concat(slotId);
70232
70299
  });
70300
+ var sizes = [];
70233
70301
  if (!unitDefinition) {
70234
70302
  console.error("No unit definition found for slotId: ".concat(slotId));
70235
70303
  return;
70236
70304
  }
70237
- var sizes = ((_unitDefinition_mediaTypes_banner = unitDefinition.mediaTypes.banner) === null || _unitDefinition_mediaTypes_banner === void 0 ? void 0 : _unitDefinition_mediaTypes_banner.sizes) || [];
70238
- GPT.defineSlot("/".concat(gamNetworkId, "/banner"), sizes, "".concat(containerId));
70305
+ if (adType) {
70306
+ sizes = ContentProvider.adSizes[adType];
70307
+ } else {
70308
+ var _unitDefinition_mediaTypes_banner;
70309
+ sizes = ((_unitDefinition_mediaTypes_banner = unitDefinition.mediaTypes.banner) === null || _unitDefinition_mediaTypes_banner === void 0 ? void 0 : _unitDefinition_mediaTypes_banner.sizes) || [];
70310
+ }
70311
+ GPT.defineSlot("/".concat(gamNetworkId, "/").concat(adName), sizes, "".concat(containerId));
70239
70312
  if (!((_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.adUnits.some(function(defUnit) {
70240
70313
  return "".concat(containerId) === "".concat(defUnit.code);
70241
70314
  }))) {
@@ -70245,6 +70318,11 @@ var PrebidGAM = /*#__PURE__*/ function() {
70245
70318
  if ((_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.addAdUnits) {
70246
70319
  window.pbjs.addAdUnits([
70247
70320
  _object_spread_props(_object_spread({}, unitDefinition), {
70321
+ mediaTypes: _object_spread_props(_object_spread({}, unitDefinition.mediaTypes || {}), {
70322
+ banner: _object_spread_props(_object_spread({}, unitDefinition.mediaTypes.banner || {}), {
70323
+ sizes: sizes
70324
+ })
70325
+ }),
70248
70326
  code: "".concat(containerId)
70249
70327
  })
70250
70328
  ]);
@@ -70355,7 +70433,7 @@ var PrebidGAMProvider = /*#__PURE__*/ function(ContentProvider1) {
70355
70433
  key: "request",
70356
70434
  value: function request(params) {
70357
70435
  return _async_to_generator(function() {
70358
- var _this, regionId, regionInfo;
70436
+ var _this, adType, adName, regionId, regionInfo;
70359
70437
  return _ts_generator(this, function(_state) {
70360
70438
  switch(_state.label){
70361
70439
  case 0:
@@ -70366,6 +70444,8 @@ var PrebidGAMProvider = /*#__PURE__*/ function(ContentProvider1) {
70366
70444
  ];
70367
70445
  case 1:
70368
70446
  _state.sent();
70447
+ adType = params.params.adType;
70448
+ adName = params.params.regionName;
70369
70449
  regionId = params.params.regionId;
70370
70450
  if (params.params.useRatio) {
70371
70451
  regionInfo = ContentProvider.approxRegionByRatio(params.size.width, params.size.height);
@@ -70393,7 +70473,7 @@ var PrebidGAMProvider = /*#__PURE__*/ function(ContentProvider1) {
70393
70473
  ];
70394
70474
  case 2:
70395
70475
  _state.sent();
70396
- PrebidGAM.defineSlot(this.options, regionId, this.workingSlotId);
70476
+ PrebidGAM.defineSlot(this.options, regionId, this.workingSlotId, adType, adName);
70397
70477
  PrebidGAM.request(regionId, this.workingSlotId, function(content) {
70398
70478
  content.style.width = "".concat(regionInfo === null || regionInfo === void 0 ? void 0 : regionInfo.w, "px");
70399
70479
  content.style.height = "".concat(regionInfo === null || regionInfo === void 0 ? void 0 : regionInfo.h, "px");
@@ -71191,7 +71271,7 @@ var RegionDebugPlugin = /*#__PURE__*/ function() {
71191
71271
  // src/Ads/Regions/Region.ts
71192
71272
  var Region = /*#__PURE__*/ function() {
71193
71273
  "use strict";
71194
- function Region(id, regionDescriptor, planeDescriptor, deps) {
71274
+ function Region(id, regionDescriptor, planeDescriptor, options, deps) {
71195
71275
  var _this = this;
71196
71276
  _class_call_check(this, Region);
71197
71277
  this.onScreen = false;
@@ -71199,6 +71279,7 @@ var Region = /*#__PURE__*/ function() {
71199
71279
  this.plugins = [];
71200
71280
  this.id = id;
71201
71281
  this.regionDescriptor = regionDescriptor;
71282
+ this.options = options;
71202
71283
  this.contours = new RegionContours(regionDescriptor.contours);
71203
71284
  this.box = new RegionBox(regionDescriptor.box);
71204
71285
  this.plane = new Plane(planeDescriptor);
@@ -71641,7 +71722,7 @@ var Region = /*#__PURE__*/ function() {
71641
71722
  var StaticAdRegion = /*#__PURE__*/ function(Region) {
71642
71723
  "use strict";
71643
71724
  _inherits(StaticAdRegion, Region);
71644
- function StaticAdRegion(id, planeDescriptor, deps) {
71725
+ function StaticAdRegion(id, planeDescriptor, options, deps) {
71645
71726
  _class_call_check(this, StaticAdRegion);
71646
71727
  var _this;
71647
71728
  _this = _call_super(this, StaticAdRegion, [
@@ -71657,6 +71738,7 @@ var StaticAdRegion = /*#__PURE__*/ function(Region) {
71657
71738
  }
71658
71739
  },
71659
71740
  planeDescriptor,
71741
+ options,
71660
71742
  deps
71661
71743
  ]);
71662
71744
  _this.requestWithSize = true;
@@ -71674,12 +71756,15 @@ var StaticAdRegion = /*#__PURE__*/ function(Region) {
71674
71756
  value: function requestContent() {
71675
71757
  var box = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.box;
71676
71758
  if (this.deps.provider) {
71759
+ var _this_options_ad, _this_options, _this_options_ad1, _this_options1;
71677
71760
  this.deps.provider.request({
71678
71761
  size: {
71679
71762
  width: box.width(this.plane.size),
71680
71763
  height: box.height(this.plane.size)
71681
71764
  },
71682
71765
  params: {
71766
+ adType: (_this_options = this.options) === null || _this_options === void 0 ? void 0 : (_this_options_ad = _this_options.ad) === null || _this_options_ad === void 0 ? void 0 : _this_options_ad.type,
71767
+ regionName: (_this_options1 = this.options) === null || _this_options1 === void 0 ? void 0 : (_this_options_ad1 = _this_options1.ad) === null || _this_options_ad1 === void 0 ? void 0 : _this_options_ad1.name,
71683
71768
  useSize: true,
71684
71769
  regionId: this.id
71685
71770
  }
@@ -71765,26 +71850,58 @@ var StaticAdRegion = /*#__PURE__*/ function(Region) {
71765
71850
  return StaticAdRegion;
71766
71851
  }(Region);
71767
71852
  // src/Ads/StaticAds/StaticAds.ts
71853
+ function debounce2(func) {
71854
+ var timeout = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 100;
71855
+ var timer;
71856
+ return function() {
71857
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
71858
+ args[_key] = arguments[_key];
71859
+ }
71860
+ clearTimeout(timer);
71861
+ timer = setTimeout(function() {
71862
+ func.apply(void 0, _to_consumable_array(args));
71863
+ }, timeout);
71864
+ };
71865
+ }
71866
+ function isElementVisible(element) {
71867
+ if (!element) return false;
71868
+ if (!document.contains(element)) return false;
71869
+ var style = window.getComputedStyle(element);
71870
+ if (style.display === "none" || style.visibility === "hidden" || style.opacity === "0") {
71871
+ return false;
71872
+ }
71873
+ return true;
71874
+ }
71768
71875
  var StaticAds = /*#__PURE__*/ function() {
71769
71876
  "use strict";
71770
71877
  function StaticAds(context) {
71771
71878
  _class_call_check(this, StaticAds);
71772
71879
  this.regions = [];
71880
+ this.handlePageMutation = this.handlePageMutation.bind(this);
71773
71881
  this.context = context;
71774
71882
  this.recorderFactory = new RecorderFactory(this.context);
71883
+ this.observer = new MutationObserver(debounce2(this.handlePageMutation));
71775
71884
  }
71776
71885
  _create_class(StaticAds, [
71777
71886
  {
71778
- key: "start",
71779
- value: function start() {
71887
+ key: "handlePageMutation",
71888
+ value: function handlePageMutation() {
71889
+ this.handleRegions();
71890
+ }
71891
+ },
71892
+ {
71893
+ key: "handleRegions",
71894
+ value: function handleRegions() {
71780
71895
  var _this, _loop = function(index) {
71781
71896
  var element = elements2[index];
71782
71897
  var previousContent = _to_consumable_array(element.childNodes);
71783
71898
  var id = 500 + index;
71784
71899
  var size = null;
71900
+ var adType = void 0;
71901
+ var regionName = void 0;
71785
71902
  if (element.hasAttribute("data-b-t") && element.hasAttribute("data-b-n")) {
71786
- var adType = element.getAttribute("data-b-t");
71787
- var regionName = element.getAttribute("data-b-n");
71903
+ adType = element.getAttribute("data-b-t");
71904
+ regionName = element.getAttribute("data-b-n") || void 0;
71788
71905
  var sizes = ContentProvider.adSizes[adType];
71789
71906
  if (sizes && sizes.length > 0) {
71790
71907
  var _sizes_ = _sliced_to_array(sizes[0], 2), w2 = _sizes_[0], h = _sizes_[1];
@@ -71795,12 +71912,6 @@ var StaticAds = /*#__PURE__*/ function() {
71795
71912
  } else {
71796
71913
  _this.context.logger.error("Invalid attribute or no sizes found for adType: ".concat(adType, " and regionName: ").concat(regionName));
71797
71914
  }
71798
- } else if (element.hasAttribute("data-b-w") && element.hasAttribute("data-b-h")) {
71799
- size = {
71800
- width: Number(element.getAttribute("data-b-w")),
71801
- height: Number(element.getAttribute("data-b-h"))
71802
- };
71803
- _this.context.logger.warn("Using deprecated attributes data-b-w and data-b-h for element: ".concat(element.getAttribute("data-b-n")));
71804
71915
  }
71805
71916
  if (!size) {
71806
71917
  return "continue";
@@ -71843,6 +71954,11 @@ var StaticAds = /*#__PURE__*/ function() {
71843
71954
  }
71844
71955
  ];
71845
71956
  var newRegion = new StaticAdRegion(id, size, {
71957
+ ad: {
71958
+ type: adType,
71959
+ name: regionName
71960
+ }
71961
+ }, {
71846
71962
  provider: provider,
71847
71963
  plugins: plugins2,
71848
71964
  recorder: _this.recorderFactory.create()
@@ -71851,20 +71967,31 @@ var StaticAds = /*#__PURE__*/ function() {
71851
71967
  element.appendChild(newRegion.view);
71852
71968
  _this.regions.push(newRegion);
71853
71969
  };
71854
- this.context.logger.log("starting static ads");
71855
71970
  var selector = this.context.config.get("staticRegionsSelector");
71856
71971
  if (!selector) {
71857
71972
  return;
71858
71973
  }
71859
71974
  var elements2 = Array.from(document.querySelectorAll(selector)).filter(function(e2) {
71860
- return _instanceof(e2, HTMLElement) && (e2.hasAttribute("data-b-t") && e2.hasAttribute("data-b-n") || e2.hasAttribute("data-b-w") && e2.hasAttribute("data-b-h"));
71975
+ return _instanceof(e2, HTMLElement) && e2.hasAttribute("data-b-t") && e2.hasAttribute("data-b-n") && e2.querySelector('[class="BRNDTS_R"]') === null && isElementVisible(e2);
71861
71976
  });
71862
71977
  for(var index = 0; index < elements2.length; index++)_this = this, _loop(index);
71863
71978
  }
71864
71979
  },
71980
+ {
71981
+ key: "start",
71982
+ value: function start() {
71983
+ this.context.logger.log("starting static ads");
71984
+ this.handleRegions();
71985
+ this.observer.observe(document.body, {
71986
+ childList: true,
71987
+ subtree: true
71988
+ });
71989
+ }
71990
+ },
71865
71991
  {
71866
71992
  key: "destroy",
71867
71993
  value: function destroy() {
71994
+ this.observer.disconnect();
71868
71995
  this.context.logger.log("destroying static ads");
71869
71996
  this.regions.forEach(function(region) {
71870
71997
  region.destroy();
@@ -74684,12 +74811,13 @@ var MappedCollection = /*#__PURE__*/ function() {
74684
74811
  var AdRegion = /*#__PURE__*/ function(Region) {
74685
74812
  "use strict";
74686
74813
  _inherits(AdRegion, Region);
74687
- function AdRegion(regionDescriptor, planeDescriptor, deps) {
74814
+ function AdRegion(regionDescriptor, planeDescriptor, options, deps) {
74688
74815
  _class_call_check(this, AdRegion);
74689
74816
  return _call_super(this, AdRegion, [
74690
74817
  "".concat(regionDescriptor.id),
74691
74818
  regionDescriptor,
74692
74819
  planeDescriptor,
74820
+ options,
74693
74821
  deps
74694
74822
  ]);
74695
74823
  }
@@ -74713,12 +74841,13 @@ var AdRegion = /*#__PURE__*/ function(Region) {
74713
74841
  var AuxRegion = /*#__PURE__*/ function(Region) {
74714
74842
  "use strict";
74715
74843
  _inherits(AuxRegion, Region);
74716
- function AuxRegion(regionDescriptor, planeDescriptor, deps) {
74844
+ function AuxRegion(regionDescriptor, planeDescriptor, options, deps) {
74717
74845
  _class_call_check(this, AuxRegion);
74718
74846
  return _call_super(this, AuxRegion, [
74719
74847
  "".concat(regionDescriptor.id),
74720
74848
  regionDescriptor,
74721
74849
  planeDescriptor,
74850
+ options,
74722
74851
  _object_spread({}, deps)
74723
74852
  ]);
74724
74853
  }
@@ -74783,15 +74912,15 @@ var RegionFactory = /*#__PURE__*/ function() {
74783
74912
  },
74784
74913
  {
74785
74914
  key: "get",
74786
- value: function get(regionDescriptor, planeDescriptor, deps) {
74915
+ value: function get(regionDescriptor, planeDescriptor, options, deps) {
74787
74916
  if (regionDescriptor && planeDescriptor) {
74788
74917
  var _this_deps;
74789
74918
  if ((_this_deps = this.deps) === null || _this_deps === void 0 ? void 0 : _this_deps.debug) {
74790
- return new AuxRegion(regionDescriptor, planeDescriptor, _object_spread_props(_object_spread({}, this.deps || {}, deps || {}), {
74919
+ return new AuxRegion(regionDescriptor, planeDescriptor, options || {}, _object_spread_props(_object_spread({}, this.deps || {}, deps || {}), {
74791
74920
  plugins: this.getPluginForStrategy()
74792
74921
  }));
74793
74922
  } else {
74794
- return new AdRegion(regionDescriptor, planeDescriptor, _object_spread_props(_object_spread({}, this.deps || {}, deps || {}), {
74923
+ return new AdRegion(regionDescriptor, planeDescriptor, options || {}, _object_spread_props(_object_spread({}, this.deps || {}, deps || {}), {
74795
74924
  plugins: this.getPluginForStrategy()
74796
74925
  }));
74797
74926
  }
@@ -74962,7 +75091,7 @@ var RegionRenderer = /*#__PURE__*/ function() {
74962
75091
  }, {
74963
75092
  width: this.regionsContainerView.width,
74964
75093
  height: this.regionsContainerView.height
74965
- }, {
75094
+ }, {}, {
74966
75095
  provider: ContentProviderFactory.getProvider(this.context, this.context.config.get("ads").provider)
74967
75096
  });
74968
75097
  this.regionsData.push({
@@ -75039,7 +75168,7 @@ var RegionRenderer = /*#__PURE__*/ function() {
75039
75168
  var newRegion = this.regionFactory.get(diffRight[index1], {
75040
75169
  width: this.regionsContainerView.width,
75041
75170
  height: this.regionsContainerView.height
75042
- }, {
75171
+ }, {}, {
75043
75172
  provider: ContentProviderFactory.getProvider(this.context, this.context.config.get("ads").provider)
75044
75173
  });
75045
75174
  this.regionsObjects.push(newRegion);
@@ -79896,7 +80025,7 @@ var AuxElementsRenderer = /*#__PURE__*/ function() {
79896
80025
  }, {
79897
80026
  width: this.regionsContainerView.width,
79898
80027
  height: this.regionsContainerView.height
79899
- }, {
80028
+ }, {}, {
79900
80029
  provider: ContentProviderFactory.getProvider(this.context, this.context.config.get("ads").provider)
79901
80030
  });
79902
80031
  this.auxElementsData.push({
@@ -79958,7 +80087,7 @@ var AuxElementsRenderer = /*#__PURE__*/ function() {
79958
80087
  }), {
79959
80088
  width: this.regionsContainerView.width,
79960
80089
  height: this.regionsContainerView.height
79961
- }, {});
80090
+ }, {}, {});
79962
80091
  this.regionsObjects.push(oldRegion);
79963
80092
  this.regionsContainerView.append(oldRegion.view);
79964
80093
  }
@@ -80251,11 +80380,11 @@ var VideoAd = /*#__PURE__*/ function() {
80251
80380
  {
80252
80381
  key: "destroy",
80253
80382
  value: function destroy() {
80254
- var _this_adPresentationStrategy, _this_regionsRenderer, _this_videoRegions, _this_videoAdContext_interface;
80383
+ var _this_adPresentationStrategy, _this_regionsRenderer, _this_videoRegions, _this_videoAdContext_recorder, _this_videoAdContext_interface;
80255
80384
  (_this_adPresentationStrategy = this.adPresentationStrategy) === null || _this_adPresentationStrategy === void 0 ? void 0 : _this_adPresentationStrategy.destroy();
80256
80385
  (_this_regionsRenderer = this.regionsRenderer) === null || _this_regionsRenderer === void 0 ? void 0 : _this_regionsRenderer.destroy();
80257
80386
  (_this_videoRegions = this.videoRegions) === null || _this_videoRegions === void 0 ? void 0 : _this_videoRegions.destroy();
80258
- this.videoAdContext.recorder.destroy();
80387
+ (_this_videoAdContext_recorder = this.videoAdContext.recorder) === null || _this_videoAdContext_recorder === void 0 ? void 0 : _this_videoAdContext_recorder.destroy();
80259
80388
  (_this_videoAdContext_interface = this.videoAdContext.interface) === null || _this_videoAdContext_interface === void 0 ? void 0 : _this_videoAdContext_interface.destroy();
80260
80389
  }
80261
80390
  }