@brndts/brndts-ads 1.14.6 → 1.14.8

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
@@ -70136,6 +70136,13 @@ var REGIONS = [
70136
70136
  h: 150,
70137
70137
  name: "Generic - 150x150",
70138
70138
  type: "medium-rectangle"
70139
+ },
70140
+ {
70141
+ id: 1014,
70142
+ w: 160,
70143
+ h: 600,
70144
+ name: "Generic - 160x600",
70145
+ type: "large-rectangle"
70139
70146
  }
70140
70147
  ];
70141
70148
  var RegionDefinitions = /*#__PURE__*/ function() {
@@ -81537,11 +81544,18 @@ var Backdrop = /*#__PURE__*/ function() {
81537
81544
  "use strict";
81538
81545
  function Backdrop(context) {
81539
81546
  _class_call_check(this, Backdrop);
81547
+ var _this_context_config_get_backdrop, _this_context_config_get;
81540
81548
  this.context = context;
81541
81549
  this.container = document.createElement("div");
81542
81550
  this.container.id = "BRNDTS_BKD";
81543
81551
  this.container.style.width = "100%";
81544
81552
  this.container.style.height = "100%";
81553
+ if ((_this_context_config_get = this.context.config.get("branding")) === null || _this_context_config_get === void 0 ? void 0 : (_this_context_config_get_backdrop = _this_context_config_get.backdrop) === null || _this_context_config_get_backdrop === void 0 ? void 0 : _this_context_config_get_backdrop.src) {
81554
+ var _this_context_config_get_backdrop1, _this_context_config_get1;
81555
+ this.container.style.backgroundImage = "url(".concat((_this_context_config_get1 = this.context.config.get("branding")) === null || _this_context_config_get1 === void 0 ? void 0 : (_this_context_config_get_backdrop1 = _this_context_config_get1.backdrop) === null || _this_context_config_get_backdrop1 === void 0 ? void 0 : _this_context_config_get_backdrop1.src, ")");
81556
+ this.container.style.backgroundSize = "cover";
81557
+ this.container.style.backgroundPosition = "center";
81558
+ }
81545
81559
  }
81546
81560
  _create_class(Backdrop, [
81547
81561
  {
@@ -81549,6 +81563,18 @@ var Backdrop = /*#__PURE__*/ function() {
81549
81563
  get: function get() {
81550
81564
  return this.container;
81551
81565
  }
81566
+ },
81567
+ {
81568
+ key: "show",
81569
+ value: function show() {
81570
+ this.container.style.opacity = "1";
81571
+ }
81572
+ },
81573
+ {
81574
+ key: "hide",
81575
+ value: function hide() {
81576
+ this.container.style.opacity = "0";
81577
+ }
81552
81578
  }
81553
81579
  ]);
81554
81580
  return Backdrop;
@@ -81852,7 +81878,7 @@ var Interface = /*#__PURE__*/ function(_import_events7_default) {
81852
81878
  {
81853
81879
  key: "wrapMedia",
81854
81880
  value: function wrapMedia() {
81855
- var _this_media_view_parentElement, _this_media_view;
81881
+ var _this_media_view_parentElement, _this_media_view, _this_context_config_get;
81856
81882
  if (((_this_media_view = this.media.view) === null || _this_media_view === void 0 ? void 0 : (_this_media_view_parentElement = _this_media_view.parentElement) === null || _this_media_view_parentElement === void 0 ? void 0 : _this_media_view_parentElement.id) === "BRNDTS") {
81857
81883
  this.context.elements.container = this.media.view.parentElement;
81858
81884
  }
@@ -81862,12 +81888,12 @@ var Interface = /*#__PURE__*/ function(_import_events7_default) {
81862
81888
  } else if (this.context.elements.container) {
81863
81889
  this.container = this.context.elements.container;
81864
81890
  }
81865
- var backdrop = new Backdrop(this.context);
81866
- var existingBackdrop = this.container.querySelector("#".concat(backdrop.view.id));
81891
+ this.backdrop = new Backdrop(this.context);
81892
+ var existingBackdrop = this.container.querySelector("#".concat(this.backdrop.view.id));
81867
81893
  if (existingBackdrop) {
81868
81894
  this.container.removeChild(existingBackdrop);
81869
81895
  }
81870
- this.container.firstChild ? this.container.insertBefore(backdrop.view, this.container.firstChild) : this.container.appendChild(backdrop.view);
81896
+ this.container.firstChild ? this.container.insertBefore(this.backdrop.view, this.container.firstChild) : this.container.appendChild(this.backdrop.view);
81871
81897
  this.migrateStyles();
81872
81898
  if (this.media.view) {
81873
81899
  this.media.view.style.position = "absolute";
@@ -81878,6 +81904,14 @@ var Interface = /*#__PURE__*/ function(_import_events7_default) {
81878
81904
  this.media.view.classList.toggle("transition");
81879
81905
  }
81880
81906
  this.container.dataset.brndts_d = this.context.device.device.type;
81907
+ if ((_this_context_config_get = this.context.config.get("branding")) === null || _this_context_config_get === void 0 ? void 0 : _this_context_config_get.colors) {
81908
+ var _this_context_config_get_colors, _this_context_config_get1;
81909
+ if ((_this_context_config_get1 = this.context.config.get("branding")) === null || _this_context_config_get1 === void 0 ? void 0 : (_this_context_config_get_colors = _this_context_config_get1.colors) === null || _this_context_config_get_colors === void 0 ? void 0 : _this_context_config_get_colors.primary) {
81910
+ var _this_context_config_get_colors1, _this_context_config_get2, _this_context_config_get_colors2, _this_context_config_get3, _this_context_config_get_colors3, _this_context_config_get4;
81911
+ this.container.style.setProperty("--brndts-primary-color", ((_this_context_config_get2 = this.context.config.get("branding")) === null || _this_context_config_get2 === void 0 ? void 0 : (_this_context_config_get_colors1 = _this_context_config_get2.colors) === null || _this_context_config_get_colors1 === void 0 ? void 0 : _this_context_config_get_colors1.primary) || "#024ab67a");
81912
+ this.container.style.setProperty("--brndts-secondary-color", ((_this_context_config_get3 = this.context.config.get("branding")) === null || _this_context_config_get3 === void 0 ? void 0 : (_this_context_config_get_colors2 = _this_context_config_get3.colors) === null || _this_context_config_get_colors2 === void 0 ? void 0 : _this_context_config_get_colors2.primary) || ((_this_context_config_get4 = this.context.config.get("branding")) === null || _this_context_config_get4 === void 0 ? void 0 : (_this_context_config_get_colors3 = _this_context_config_get4.colors) === null || _this_context_config_get_colors3 === void 0 ? void 0 : _this_context_config_get_colors3.primary) || "#26e29483");
81913
+ }
81914
+ }
81881
81915
  }
81882
81916
  },
81883
81917
  {
@@ -81986,12 +82020,32 @@ var TYPES = {
81986
82020
  [
81987
82021
  300,
81988
82022
  250
82023
+ ],
82024
+ [
82025
+ 250,
82026
+ 250
82027
+ ],
82028
+ [
82029
+ 200,
82030
+ 200
82031
+ ],
82032
+ [
82033
+ 180,
82034
+ 150
82035
+ ],
82036
+ [
82037
+ 150,
82038
+ 150
81989
82039
  ]
81990
82040
  ],
81991
82041
  "large-rectangle": [
81992
82042
  [
81993
82043
  300,
81994
82044
  600
82045
+ ],
82046
+ [
82047
+ 160,
82048
+ 600
81995
82049
  ]
81996
82050
  ],
81997
82051
  "billboard": [
@@ -82065,7 +82119,7 @@ var DefaultTemplate = /*#__PURE__*/ function() {
82065
82119
  height: plane.height - (this.margin.t + this.margin.b)
82066
82120
  }),
82067
82121
  name: "A",
82068
- maxSlots: 3
82122
+ maxSlots: 1
82069
82123
  });
82070
82124
  }
82071
82125
  if (plane.height - (cutout.y + cutout.height) > 0) {
@@ -82115,7 +82169,7 @@ var FullscreenTemplate = /*#__PURE__*/ function() {
82115
82169
  height: plane.height - (this.margin.t + this.margin.b)
82116
82170
  }),
82117
82171
  name: "A",
82118
- maxSlots: 3
82172
+ maxSlots: 1
82119
82173
  });
82120
82174
  }
82121
82175
  if (plane.height - (cutout.y + cutout.height) > 0) {
@@ -82261,8 +82315,13 @@ var RegionPacker = /*#__PURE__*/ function(_import_events8_default) {
82261
82315
  for(var _iterator = this.areas[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
82262
82316
  var region = _step.value;
82263
82317
  var _packed;
82264
- this.packedByArea[region.name] = this.fillRegion(_object_spread({}, region));
82265
- (_packed = packed).push.apply(_packed, _to_consumable_array(this.packedByArea[region.name]));
82318
+ var regionSlots = this.fillRegion(_object_spread({}, region));
82319
+ this.packedByArea[region.name] = regionSlots;
82320
+ (_packed = packed).push.apply(_packed, _to_consumable_array(regionSlots));
82321
+ if (regionSlots.length > 0) {
82322
+ updated = true;
82323
+ break;
82324
+ }
82266
82325
  }
82267
82326
  } catch (err) {
82268
82327
  _didIteratorError = true;
@@ -82496,12 +82555,16 @@ var BasicAdRegion = /*#__PURE__*/ function(Region) {
82496
82555
  },
82497
82556
  {
82498
82557
  key: "updateVisibility",
82499
- value: function updateVisibility(value2) {}
82558
+ value: function updateVisibility(value2) {
82559
+ var _this_deps_recorder;
82560
+ (_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.displayStateChanged(this);
82561
+ }
82500
82562
  },
82501
82563
  {
82502
82564
  key: "hideRegion",
82503
82565
  value: function hideRegion() {
82504
82566
  return _async_to_generator(function() {
82567
+ var _this_deps_recorder;
82505
82568
  return _ts_generator(this, function(_state) {
82506
82569
  switch(_state.label){
82507
82570
  case 0:
@@ -82520,6 +82583,7 @@ var BasicAdRegion = /*#__PURE__*/ function(Region) {
82520
82583
  this.applyPlugins("afterHide");
82521
82584
  this.visible = false;
82522
82585
  this.hidden.resolve(true);
82586
+ (_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.presentationStateChanged(this, true);
82523
82587
  return [
82524
82588
  2
82525
82589
  ];
@@ -83070,7 +83134,10 @@ var MediaElementSizeController = /*#__PURE__*/ function(_import_events9_default)
83070
83134
  y: 0
83071
83135
  };
83072
83136
  _this.sizePercentage = 100;
83073
- _this.positionOffset = 0;
83137
+ _this.positionOffset = {
83138
+ x: 0,
83139
+ y: 0
83140
+ };
83074
83141
  _this.context = context;
83075
83142
  if (_this.context.media.view) {
83076
83143
  _this.context.media.view.style.setProperty("transition", "width 0.5s ease, height 0.5s ease");
@@ -83090,17 +83157,18 @@ var MediaElementSizeController = /*#__PURE__*/ function(_import_events9_default)
83090
83157
  {
83091
83158
  key: "expectedDimensions",
83092
83159
  value: function expectedDimensions(percentage) {
83093
- var position = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
83160
+ var position = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
83161
+ x: 0,
83162
+ y: 0
83163
+ };
83094
83164
  if (this.context.media.view) {
83095
83165
  var _this_context_elements_container, _this_context_elements_container1, _this_context_elements_container2, _this_context_elements_container3;
83096
83166
  this.sizePercentage = percentage;
83097
83167
  this.positionOffset = position;
83098
83168
  var size = adjustSizeWithAspectRatio((((_this_context_elements_container = this.context.elements.container) === null || _this_context_elements_container === void 0 ? void 0 : _this_context_elements_container.getBoundingClientRect().width) || 0) * (percentage / 100), (((_this_context_elements_container1 = this.context.elements.container) === null || _this_context_elements_container1 === void 0 ? void 0 : _this_context_elements_container1.getBoundingClientRect().height) || 0) * (percentage / 100), this.context.media.aspectRatio);
83099
- var adjustedPosition = adjustSizeWithAspectRatio((((_this_context_elements_container2 = this.context.elements.container) === null || _this_context_elements_container2 === void 0 ? void 0 : _this_context_elements_container2.getBoundingClientRect().width) || 0) * (position / 100), (((_this_context_elements_container3 = this.context.elements.container) === null || _this_context_elements_container3 === void 0 ? void 0 : _this_context_elements_container3.getBoundingClientRect().height) || 0) * (position / 100), this.context.media.aspectRatio);
83100
- var marginValue = Math.min(adjustedPosition.width, adjustedPosition.height);
83101
83169
  var newPosition = {
83102
- x: marginValue,
83103
- y: marginValue
83170
+ x: (((_this_context_elements_container2 = this.context.elements.container) === null || _this_context_elements_container2 === void 0 ? void 0 : _this_context_elements_container2.getBoundingClientRect().width) || 0) * (position.x / 100),
83171
+ y: (((_this_context_elements_container3 = this.context.elements.container) === null || _this_context_elements_container3 === void 0 ? void 0 : _this_context_elements_container3.getBoundingClientRect().height) || 0) * (position.y / 100)
83104
83172
  };
83105
83173
  return {
83106
83174
  size: size,
@@ -83113,7 +83181,10 @@ var MediaElementSizeController = /*#__PURE__*/ function(_import_events9_default)
83113
83181
  {
83114
83182
  key: "reduceSizeByPercentage",
83115
83183
  value: function reduceSizeByPercentage(percentage) {
83116
- var position = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
83184
+ var position = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
83185
+ x: 0,
83186
+ y: 0
83187
+ };
83117
83188
  var updated = false;
83118
83189
  if (this.context.media.view) {
83119
83190
  var _this_context_elements_container, _this_context_elements_container1, _this_context_elements_container2, _this_context_elements_container3;
@@ -83127,15 +83198,17 @@ var MediaElementSizeController = /*#__PURE__*/ function(_import_events9_default)
83127
83198
  this.context.media.setSize(this.size.width, this.size.height);
83128
83199
  updated = true;
83129
83200
  }
83130
- var adjustedPosition = adjustSizeWithAspectRatio((((_this_context_elements_container2 = this.context.elements.container) === null || _this_context_elements_container2 === void 0 ? void 0 : _this_context_elements_container2.getBoundingClientRect().width) || 0) * (position / 100), (((_this_context_elements_container3 = this.context.elements.container) === null || _this_context_elements_container3 === void 0 ? void 0 : _this_context_elements_container3.getBoundingClientRect().height) || 0) * (position / 100), this.context.media.aspectRatio);
83131
- var marginValue = Math.min(adjustedPosition.width, adjustedPosition.height);
83132
- if (this.position.x !== marginValue || this.position.y !== marginValue) {
83201
+ var adjustedPosition = {
83202
+ width: (((_this_context_elements_container2 = this.context.elements.container) === null || _this_context_elements_container2 === void 0 ? void 0 : _this_context_elements_container2.getBoundingClientRect().width) || 0) * (position.x / 100),
83203
+ height: (((_this_context_elements_container3 = this.context.elements.container) === null || _this_context_elements_container3 === void 0 ? void 0 : _this_context_elements_container3.getBoundingClientRect().height) || 0) * (position.y / 100)
83204
+ };
83205
+ if (this.position.x !== adjustedPosition.width || this.position.y !== adjustedPosition.height) {
83133
83206
  var _this_context_interface;
83134
- this.position.x = marginValue;
83135
- this.position.y = marginValue;
83207
+ this.position.x = adjustedPosition.width;
83208
+ this.position.y = adjustedPosition.height;
83136
83209
  this.context.media.view.style.left = "".concat(this.position.x, "px");
83137
83210
  this.context.media.view.style.top = "".concat(this.position.y, "px");
83138
- (_this_context_interface = this.context.interface) === null || _this_context_interface === void 0 ? void 0 : _this_context_interface.updatePosition(marginValue, marginValue);
83211
+ (_this_context_interface = this.context.interface) === null || _this_context_interface === void 0 ? void 0 : _this_context_interface.updatePosition(this.position.y, this.position.x);
83139
83212
  updated = true;
83140
83213
  }
83141
83214
  }
@@ -83148,7 +83221,10 @@ var MediaElementSizeController = /*#__PURE__*/ function(_import_events9_default)
83148
83221
  {
83149
83222
  key: "update",
83150
83223
  value: function update(percentage) {
83151
- var position = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
83224
+ var position = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
83225
+ x: 0,
83226
+ y: 0
83227
+ };
83152
83228
  if (!this.isResized) {
83153
83229
  return this.restore();
83154
83230
  }
@@ -83165,15 +83241,17 @@ var MediaElementSizeController = /*#__PURE__*/ function(_import_events9_default)
83165
83241
  this.context.media.setSize(this.size.width, this.size.height);
83166
83242
  updated = true;
83167
83243
  }
83168
- var adjustedPosition = adjustSizeWithAspectRatio((((_this_context_elements_container2 = this.context.elements.container) === null || _this_context_elements_container2 === void 0 ? void 0 : _this_context_elements_container2.getBoundingClientRect().width) || 0) * (this.positionOffset / 100), (((_this_context_elements_container3 = this.context.elements.container) === null || _this_context_elements_container3 === void 0 ? void 0 : _this_context_elements_container3.getBoundingClientRect().height) || 0) * (this.positionOffset / 100), this.context.media.aspectRatio);
83169
- var marginValue = Math.min(adjustedPosition.width, adjustedPosition.height);
83170
- if (this.position.x !== marginValue || this.position.y !== marginValue) {
83244
+ var adjustedPosition = {
83245
+ width: (((_this_context_elements_container2 = this.context.elements.container) === null || _this_context_elements_container2 === void 0 ? void 0 : _this_context_elements_container2.getBoundingClientRect().width) || 0) * (position.x / 100),
83246
+ height: (((_this_context_elements_container3 = this.context.elements.container) === null || _this_context_elements_container3 === void 0 ? void 0 : _this_context_elements_container3.getBoundingClientRect().height) || 0) * (position.y / 100)
83247
+ };
83248
+ if (this.position.x !== adjustedPosition.width || this.position.y !== adjustedPosition.height) {
83171
83249
  var _this_context_interface;
83172
- this.position.x = marginValue;
83173
- this.position.y = marginValue;
83250
+ this.position.x = adjustedPosition.width;
83251
+ this.position.y = adjustedPosition.height;
83174
83252
  this.context.media.view.style.left = "".concat(this.position.x, "px");
83175
83253
  this.context.media.view.style.top = "".concat(this.position.y, "px");
83176
- (_this_context_interface = this.context.interface) === null || _this_context_interface === void 0 ? void 0 : _this_context_interface.updatePosition(marginValue, marginValue);
83254
+ (_this_context_interface = this.context.interface) === null || _this_context_interface === void 0 ? void 0 : _this_context_interface.updatePosition(this.position.y, this.position.x);
83177
83255
  updated = true;
83178
83256
  }
83179
83257
  }
@@ -83198,7 +83276,10 @@ var MediaElementSizeController = /*#__PURE__*/ function(_import_events9_default)
83198
83276
  y: 0
83199
83277
  };
83200
83278
  this.sizePercentage = 100;
83201
- this.positionOffset = 0;
83279
+ this.positionOffset = {
83280
+ x: 0,
83281
+ y: 0
83282
+ };
83202
83283
  if (size.width !== this.size.width || size.height !== this.size.height) {
83203
83284
  this.size = size;
83204
83285
  this.context.media.setSize(this.size.width, this.size.height);
@@ -83274,7 +83355,13 @@ var BasicPresentationMode = /*#__PURE__*/ function() {
83274
83355
  this.adPresentationStrategy = PresentationStrategyFactory.get(this.context.config);
83275
83356
  (_this_adPresentationStrategy = this.adPresentationStrategy) === null || _this_adPresentationStrategy === void 0 ? void 0 : _this_adPresentationStrategy.on("presentation", function() {
83276
83357
  var _this_mediaElementSizeController;
83277
- var expected = (_this_mediaElementSizeController = _this.mediaElementSizeController) === null || _this_mediaElementSizeController === void 0 ? void 0 : _this_mediaElementSizeController.expectedDimensions(70, _this.context.store.getState().fullscreen ? 10 : 0);
83358
+ var expected = (_this_mediaElementSizeController = _this.mediaElementSizeController) === null || _this_mediaElementSizeController === void 0 ? void 0 : _this_mediaElementSizeController.expectedDimensions(70, _this.context.store.getState().fullscreen ? {
83359
+ x: 10,
83360
+ y: 10
83361
+ } : {
83362
+ x: 0,
83363
+ y: 10
83364
+ });
83278
83365
  _this.packer.setCutout({
83279
83366
  x: (expected === null || expected === void 0 ? void 0 : expected.position.x) || 0,
83280
83367
  y: (expected === null || expected === void 0 ? void 0 : expected.position.y) || 0,
@@ -83283,19 +83370,27 @@ var BasicPresentationMode = /*#__PURE__*/ function() {
83283
83370
  }, _this.context.store.getState().fullscreen ? "fullscreen" : "default");
83284
83371
  _this.packer.pack();
83285
83372
  if (_this.packer.packed.length > 0) {
83286
- var _this_adPresentationStrategy, _this_regionsRenderer, _this_regionsRenderer1, _this_mediaElementSizeController1;
83373
+ var _this_context_interface_backdrop, _this_context_interface, _this_adPresentationStrategy, _this_regionsRenderer, _this_regionsRenderer1, _this_mediaElementSizeController1;
83374
+ (_this_context_interface = _this.context.interface) === null || _this_context_interface === void 0 ? void 0 : (_this_context_interface_backdrop = _this_context_interface.backdrop) === null || _this_context_interface_backdrop === void 0 ? void 0 : _this_context_interface_backdrop.show();
83287
83375
  (_this_adPresentationStrategy = _this.adPresentationStrategy) === null || _this_adPresentationStrategy === void 0 ? void 0 : _this_adPresentationStrategy.startedPresentation();
83288
83376
  (_this_regionsRenderer = _this.regionsRenderer) === null || _this_regionsRenderer === void 0 ? void 0 : _this_regionsRenderer.addAreas(_this.packer.areas);
83289
83377
  (_this_regionsRenderer1 = _this.regionsRenderer) === null || _this_regionsRenderer1 === void 0 ? void 0 : _this_regionsRenderer1.render(_this.packer.packed);
83290
- (_this_mediaElementSizeController1 = _this.mediaElementSizeController) === null || _this_mediaElementSizeController1 === void 0 ? void 0 : _this_mediaElementSizeController1.reduceSizeByPercentage(70, _this.context.store.getState().fullscreen ? 10 : 0);
83378
+ (_this_mediaElementSizeController1 = _this.mediaElementSizeController) === null || _this_mediaElementSizeController1 === void 0 ? void 0 : _this_mediaElementSizeController1.reduceSizeByPercentage(70, _this.context.store.getState().fullscreen ? {
83379
+ x: 10,
83380
+ y: 10
83381
+ } : {
83382
+ x: 0,
83383
+ y: 10
83384
+ });
83291
83385
  }
83292
83386
  }).on("pace", function() {}).on("cooldown", function() {
83293
83387
  var _this_regionsRenderer;
83294
83388
  (_this_regionsRenderer = _this.regionsRenderer) === null || _this_regionsRenderer === void 0 ? void 0 : _this_regionsRenderer.clear();
83295
83389
  _this.packer.reset();
83296
83390
  setTimeout(function() {
83297
- var _this_mediaElementSizeController;
83391
+ var _this_mediaElementSizeController, _this_context_interface_backdrop, _this_context_interface;
83298
83392
  (_this_mediaElementSizeController = _this.mediaElementSizeController) === null || _this_mediaElementSizeController === void 0 ? void 0 : _this_mediaElementSizeController.restore();
83393
+ (_this_context_interface = _this.context.interface) === null || _this_context_interface === void 0 ? void 0 : (_this_context_interface_backdrop = _this_context_interface.backdrop) === null || _this_context_interface_backdrop === void 0 ? void 0 : _this_context_interface_backdrop.hide();
83299
83394
  }, 500);
83300
83395
  });
83301
83396
  this.resizeObserver = new ResizeObserver(function() {
@@ -83324,7 +83419,13 @@ var BasicPresentationMode = /*#__PURE__*/ function() {
83324
83419
  var fullscreen = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
83325
83420
  var _this_context_elements_container, _this_context_elements_container1, _this_regionsRenderer, _this_mediaElementSizeController;
83326
83421
  (_this_regionsRenderer = this.regionsRenderer) === null || _this_regionsRenderer === void 0 ? void 0 : _this_regionsRenderer.updateSize(((_this_context_elements_container = this.context.elements.container) === null || _this_context_elements_container === void 0 ? void 0 : _this_context_elements_container.getBoundingClientRect().width) || 0, ((_this_context_elements_container1 = this.context.elements.container) === null || _this_context_elements_container1 === void 0 ? void 0 : _this_context_elements_container1.getBoundingClientRect().height) || 0, this.context.media.aspectRatio);
83327
- var updatedMediaSize = (_this_mediaElementSizeController = this.mediaElementSizeController) === null || _this_mediaElementSizeController === void 0 ? void 0 : _this_mediaElementSizeController.update(70, fullscreen ? 10 : 0);
83422
+ var updatedMediaSize = (_this_mediaElementSizeController = this.mediaElementSizeController) === null || _this_mediaElementSizeController === void 0 ? void 0 : _this_mediaElementSizeController.update(70, fullscreen ? {
83423
+ x: 10,
83424
+ y: 10
83425
+ } : {
83426
+ x: 0,
83427
+ y: 10
83428
+ });
83328
83429
  if (updatedMediaSize) {
83329
83430
  var _this_mediaElementSizeController1, _this_mediaElementSizeController2, _this_mediaElementSizeController3, _this_mediaElementSizeController4;
83330
83431
  this.packer.setCutout({
@@ -83335,13 +83436,15 @@ var BasicPresentationMode = /*#__PURE__*/ function() {
83335
83436
  }, fullscreen ? "fullscreen" : "default");
83336
83437
  this.packer.repack();
83337
83438
  if (this.packer.packed.length > 0) {
83338
- var _this_regionsRenderer1, _this_regionsRenderer2;
83439
+ var _this_context_interface_backdrop, _this_context_interface, _this_regionsRenderer1, _this_regionsRenderer2;
83440
+ (_this_context_interface = this.context.interface) === null || _this_context_interface === void 0 ? void 0 : (_this_context_interface_backdrop = _this_context_interface.backdrop) === null || _this_context_interface_backdrop === void 0 ? void 0 : _this_context_interface_backdrop.show();
83339
83441
  (_this_regionsRenderer1 = this.regionsRenderer) === null || _this_regionsRenderer1 === void 0 ? void 0 : _this_regionsRenderer1.addAreas(this.packer.areas);
83340
83442
  (_this_regionsRenderer2 = this.regionsRenderer) === null || _this_regionsRenderer2 === void 0 ? void 0 : _this_regionsRenderer2.render(this.packer.packed);
83341
83443
  } else {
83342
- var _this_regionsRenderer3, _this_mediaElementSizeController5;
83444
+ var _this_regionsRenderer3, _this_mediaElementSizeController5, _this_context_interface_backdrop1, _this_context_interface1;
83343
83445
  (_this_regionsRenderer3 = this.regionsRenderer) === null || _this_regionsRenderer3 === void 0 ? void 0 : _this_regionsRenderer3.clear();
83344
83446
  (_this_mediaElementSizeController5 = this.mediaElementSizeController) === null || _this_mediaElementSizeController5 === void 0 ? void 0 : _this_mediaElementSizeController5.restore();
83447
+ (_this_context_interface1 = this.context.interface) === null || _this_context_interface1 === void 0 ? void 0 : (_this_context_interface_backdrop1 = _this_context_interface1.backdrop) === null || _this_context_interface_backdrop1 === void 0 ? void 0 : _this_context_interface_backdrop1.hide();
83345
83448
  }
83346
83449
  }
83347
83450
  }
@@ -83372,9 +83475,10 @@ var BasicPresentationMode = /*#__PURE__*/ function() {
83372
83475
  {
83373
83476
  key: "stop",
83374
83477
  value: function stop() {
83375
- var _this_adPresentationStrategy, _this_regionsRenderer;
83478
+ var _this_adPresentationStrategy, _this_regionsRenderer, _this_context_interface_backdrop, _this_context_interface;
83376
83479
  (_this_adPresentationStrategy = this.adPresentationStrategy) === null || _this_adPresentationStrategy === void 0 ? void 0 : _this_adPresentationStrategy.stop();
83377
83480
  (_this_regionsRenderer = this.regionsRenderer) === null || _this_regionsRenderer === void 0 ? void 0 : _this_regionsRenderer.clear();
83481
+ (_this_context_interface = this.context.interface) === null || _this_context_interface === void 0 ? void 0 : (_this_context_interface_backdrop = _this_context_interface.backdrop) === null || _this_context_interface_backdrop === void 0 ? void 0 : _this_context_interface_backdrop.hide();
83378
83482
  }
83379
83483
  },
83380
83484
  {