@brndts/brndts-ads 1.14.4 → 1.14.5

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.js CHANGED
@@ -468,13 +468,13 @@ var __toCommonJS = function(mod) {
468
468
  var require_events = __commonJS({
469
469
  "node_modules/events/events.js": function(exports, module2) {
470
470
  "use strict";
471
- var R = (typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" ? Reflect : null;
472
- var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
471
+ var R2 = (typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" ? Reflect : null;
472
+ var ReflectApply = R2 && typeof R2.apply === "function" ? R2.apply : function ReflectApply2(target, receiver, args) {
473
473
  return Function.prototype.apply.call(target, receiver, args);
474
474
  };
475
475
  var ReflectOwnKeys;
476
- if (R && typeof R.ownKeys === "function") {
477
- ReflectOwnKeys = R.ownKeys;
476
+ if (R2 && typeof R2.ownKeys === "function") {
477
+ ReflectOwnKeys = R2.ownKeys;
478
478
  } else if (Object.getOwnPropertySymbols) {
479
479
  ReflectOwnKeys = function ReflectOwnKeys2(target) {
480
480
  return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
@@ -68506,7 +68506,7 @@ var RegionContent = /*#__PURE__*/ function() {
68506
68506
  {
68507
68507
  key: "renderSandboxedContent",
68508
68508
  value: function renderSandboxedContent() {
68509
- var _iframe_contentWindow, _this_content_extra_sz, _this_content_extra, _this_content, _this_content_extra_sz1, _this_content_extra1, _this_content1;
68509
+ var _this_content_extra_sz, _this_content_extra, _this_content, _this_content_extra_sz1, _this_content_extra1, _this_content1, _this_content_extra_sz2, _this_content_extra2, _this_content2, _this_content_extra_sz3, _this_content_extra3, _this_content3, _iframe_contentWindow;
68510
68510
  var iframe = document.createElement("iframe");
68511
68511
  iframe.name = "prebid_ads_iframe_".concat(this.id);
68512
68512
  iframe.title = "3rd party ad content";
@@ -68523,15 +68523,19 @@ var RegionContent = /*#__PURE__*/ function() {
68523
68523
  iframe.style.border = "0";
68524
68524
  iframe.style.margin = "0";
68525
68525
  iframe.style.overflow = "hidden";
68526
- iframe.style.width = "100%";
68527
- iframe.style.height = "100%";
68526
+ iframe.style.width = "".concat(((_this_content = this.content) === null || _this_content === void 0 ? void 0 : (_this_content_extra = _this_content.extra) === null || _this_content_extra === void 0 ? void 0 : (_this_content_extra_sz = _this_content_extra.sz) === null || _this_content_extra_sz === void 0 ? void 0 : _this_content_extra_sz.w) ? this.content.extra.sz.w + "px" : "100%", ";");
68527
+ iframe.style.height = "".concat(((_this_content1 = this.content) === null || _this_content1 === void 0 ? void 0 : (_this_content_extra1 = _this_content1.extra) === null || _this_content_extra1 === void 0 ? void 0 : (_this_content_extra_sz1 = _this_content_extra1.sz) === null || _this_content_extra_sz1 === void 0 ? void 0 : _this_content_extra_sz1.h) ? this.content.extra.sz.h + "px" : "100%", ";");
68528
+ iframe.width = "".concat(((_this_content2 = this.content) === null || _this_content2 === void 0 ? void 0 : (_this_content_extra2 = _this_content2.extra) === null || _this_content_extra2 === void 0 ? void 0 : (_this_content_extra_sz2 = _this_content_extra2.sz) === null || _this_content_extra_sz2 === void 0 ? void 0 : _this_content_extra_sz2.w) ? this.content.extra.sz.w : "100%", ";");
68529
+ iframe.height = "".concat(((_this_content3 = this.content) === null || _this_content3 === void 0 ? void 0 : (_this_content_extra3 = _this_content3.extra) === null || _this_content_extra3 === void 0 ? void 0 : (_this_content_extra_sz3 = _this_content_extra3.sz) === null || _this_content_extra_sz3 === void 0 ? void 0 : _this_content_extra_sz3.h) ? this.content.extra.sz.h : "100%", ";");
68530
+ var scale = this.getScaleValue();
68531
+ iframe.style.transform = "scale(".concat(scale.x, ", ").concat(scale.y, ")");
68532
+ iframe.style.transformOrigin = "top left";
68528
68533
  this.container.appendChild(iframe);
68529
68534
  var iframeDoc = (_iframe_contentWindow = iframe.contentWindow) === null || _iframe_contentWindow === void 0 ? void 0 : _iframe_contentWindow.document;
68530
68535
  if (!iframeDoc) return;
68531
68536
  var stringContent = this.content.asStr;
68532
- var scale = this.getScaleValue();
68533
68537
  iframeDoc.open();
68534
- iframeDoc.write('\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <style>\n\n html, body {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n }\n .ad-container {\n width: '.concat(((_this_content = this.content) === null || _this_content === void 0 ? void 0 : (_this_content_extra = _this_content.extra) === null || _this_content_extra === void 0 ? void 0 : (_this_content_extra_sz = _this_content_extra.sz) === null || _this_content_extra_sz === void 0 ? void 0 : _this_content_extra_sz.w) ? this.content.extra.sz.w + "px" : "100%", ";\n height: ").concat(((_this_content1 = this.content) === null || _this_content1 === void 0 ? void 0 : (_this_content_extra1 = _this_content1.extra) === null || _this_content_extra1 === void 0 ? void 0 : (_this_content_extra_sz1 = _this_content_extra1.sz) === null || _this_content_extra_sz1 === void 0 ? void 0 : _this_content_extra_sz1.h) ? this.content.extra.sz.h + "px" : "100%", ";\n transform: scale(").concat(scale.x, ", ").concat(scale.y, ');\n transform-origin: top left;\n }\n .ad-container > * {\n padding: 0 !important;\n }\n </style>\n </head>\n <body>\n <div class="ad-container">').concat(stringContent, "</div>\n </body>\n </html>\n "));
68538
+ iframeDoc.write('\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <style>\n\n html, body {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n }\n .ad-container > * {\n padding: 0 !important;\n }\n </style>\n </head>\n <body>\n <div class="ad-container">'.concat(stringContent, "</div>\n </body>\n </html>\n "));
68535
68539
  iframeDoc.close();
68536
68540
  }
68537
68541
  },
@@ -71569,29 +71573,125 @@ var PrebidConfigBuilder = /*#__PURE__*/ function() {
71569
71573
  {
71570
71574
  key: "addConsent",
71571
71575
  value: function addConsent(consent) {
71572
- if (// @ts-expect-error
71573
- window.__tcfapi !== void 0 && // @ts-expect-error
71574
- typeof window.__tcfapi === "function") {
71575
- this.config.consentManagement = {
71576
+ var hasTcfCmp = typeof window.__tcfapi === "function";
71577
+ var hasGppCmp = typeof window.__gpp === "function";
71578
+ var cm = {};
71579
+ if (hasTcfCmp) {
71580
+ cm.gdpr = {
71576
71581
  cmpApi: "iab",
71577
71582
  timeout: 8e3,
71578
- allowAuctionWithoutConsent: true,
71579
- defaultGdprScope: true
71583
+ defaultGdprScope: true,
71584
+ rules: [
71585
+ {
71586
+ purpose: "basicAds",
71587
+ enforcePurpose: true,
71588
+ enforceVendor: true,
71589
+ softVendorExceptions: [
71590
+ "valuad",
71591
+ "improvedigital"
71592
+ ]
71593
+ },
71594
+ {
71595
+ purpose: "storage",
71596
+ enforcePurpose: true,
71597
+ enforceVendor: true,
71598
+ softVendorExceptions: [
71599
+ "valuad",
71600
+ "improvedigital"
71601
+ ]
71602
+ },
71603
+ // add P4 so UFPD can flow when CMP gives consent
71604
+ {
71605
+ purpose: "personalizedAds",
71606
+ enforcePurpose: true,
71607
+ enforceVendor: true
71608
+ },
71609
+ {
71610
+ purpose: "measurement",
71611
+ enforcePurpose: true,
71612
+ enforceVendor: true
71613
+ }
71614
+ ]
71580
71615
  };
71581
71616
  } else {
71582
- this.config.consentManagement = {
71617
+ var _gdpr_purpose_consents, _gdpr_purpose, _gdpr_purpose_consents1, _gdpr_purpose1, _gdpr_purpose_consents2, _gdpr_purpose2, _gdpr_purpose_consents3, _gdpr_purpose3;
71618
+ var gdpr = typeof consent.gdpr === "function" ? consent.gdpr() : void 0;
71619
+ var _gdpr_gdprApplies, _gdpr_purpose_consents_1, _gdpr_purpose_consents_2, _gdpr_purpose_consents_4, _gdpr_purpose_consents_7;
71620
+ cm.gdpr = {
71583
71621
  cmpApi: "static",
71584
71622
  timeout: 8e3,
71585
- allowAuctionWithoutConsent: true,
71586
71623
  defaultGdprScope: true,
71587
71624
  consentData: {
71588
71625
  getTCData: {
71589
- tcString: consent.gdpr().tcString || "",
71590
- gdprApplies: consent.gdpr().gdprApplies || false
71626
+ tcString: (gdpr === null || gdpr === void 0 ? void 0 : gdpr.tcString) || "",
71627
+ gdprApplies: (_gdpr_gdprApplies = gdpr === null || gdpr === void 0 ? void 0 : gdpr.gdprApplies) !== null && _gdpr_gdprApplies !== void 0 ? _gdpr_gdprApplies : true,
71628
+ // Grant P1, P2, P4, P7 so modules won't be denied in static mode
71629
+ purpose: {
71630
+ consents: {
71631
+ "1": (_gdpr_purpose_consents_1 = gdpr === null || gdpr === void 0 ? void 0 : (_gdpr_purpose = gdpr.purpose) === null || _gdpr_purpose === void 0 ? void 0 : (_gdpr_purpose_consents = _gdpr_purpose.consents) === null || _gdpr_purpose_consents === void 0 ? void 0 : _gdpr_purpose_consents["1"]) !== null && _gdpr_purpose_consents_1 !== void 0 ? _gdpr_purpose_consents_1 : true,
71632
+ // storage (accessDevice)
71633
+ "2": (_gdpr_purpose_consents_2 = gdpr === null || gdpr === void 0 ? void 0 : (_gdpr_purpose1 = gdpr.purpose) === null || _gdpr_purpose1 === void 0 ? void 0 : (_gdpr_purpose_consents1 = _gdpr_purpose1.consents) === null || _gdpr_purpose_consents1 === void 0 ? void 0 : _gdpr_purpose_consents1["2"]) !== null && _gdpr_purpose_consents_2 !== void 0 ? _gdpr_purpose_consents_2 : true,
71634
+ // basic ads (fetchBids)
71635
+ "4": (_gdpr_purpose_consents_4 = gdpr === null || gdpr === void 0 ? void 0 : (_gdpr_purpose2 = gdpr.purpose) === null || _gdpr_purpose2 === void 0 ? void 0 : (_gdpr_purpose_consents2 = _gdpr_purpose2.consents) === null || _gdpr_purpose_consents2 === void 0 ? void 0 : _gdpr_purpose_consents2["4"]) !== null && _gdpr_purpose_consents_4 !== void 0 ? _gdpr_purpose_consents_4 : true,
71636
+ // personalized ads (transmitUfpd)
71637
+ "7": (_gdpr_purpose_consents_7 = gdpr === null || gdpr === void 0 ? void 0 : (_gdpr_purpose3 = gdpr.purpose) === null || _gdpr_purpose3 === void 0 ? void 0 : (_gdpr_purpose_consents3 = _gdpr_purpose3.consents) === null || _gdpr_purpose_consents3 === void 0 ? void 0 : _gdpr_purpose_consents3["7"]) !== null && _gdpr_purpose_consents_7 !== void 0 ? _gdpr_purpose_consents_7 : true
71638
+ }
71639
+ }
71640
+ }
71641
+ },
71642
+ rules: [
71643
+ // In static mode: enforce purpose, skip vendor checks
71644
+ {
71645
+ purpose: "basicAds",
71646
+ enforcePurpose: true,
71647
+ enforceVendor: false
71648
+ },
71649
+ {
71650
+ purpose: "storage",
71651
+ enforcePurpose: true,
71652
+ enforceVendor: false
71653
+ },
71654
+ {
71655
+ purpose: "personalizedAds",
71656
+ enforcePurpose: true,
71657
+ enforceVendor: false
71658
+ },
71659
+ // <-- allows transmitUfpd
71660
+ {
71661
+ purpose: "measurement",
71662
+ enforcePurpose: true,
71663
+ enforceVendor: false
71591
71664
  }
71665
+ ]
71666
+ };
71667
+ this.config.allowActivities = _object_spread_props(_object_spread({}, this.config.allowActivities), {
71668
+ accessDevice: {
71669
+ rules: [
71670
+ {
71671
+ allow: true
71672
+ }
71673
+ ]
71674
+ }
71675
+ });
71676
+ }
71677
+ if (hasGppCmp) {
71678
+ cm.gpp = {
71679
+ cmpApi: "iab",
71680
+ timeout: 8e3
71681
+ };
71682
+ } else {
71683
+ var gpp = typeof consent.gpp === "function" ? consent.gpp() : void 0;
71684
+ cm.gpp = {
71685
+ cmpApi: "static",
71686
+ timeout: 8e3,
71687
+ consentData: {
71688
+ gppString: (gpp === null || gpp === void 0 ? void 0 : gpp.gppString) || "",
71689
+ applicableSections: /* gpp?.applicableSections ?? gpp?.sectionList ?? */ [],
71690
+ sectionList: /* gpp?.sectionList ?? gpp?.applicableSections ?? */ []
71592
71691
  }
71593
71692
  };
71594
71693
  }
71694
+ this.config.consentManagement = cm;
71595
71695
  return this;
71596
71696
  }
71597
71697
  },
@@ -73856,25 +73956,15 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
73856
73956
  }
73857
73957
  },
73858
73958
  {
73859
- key: "assurePlaybackState",
73860
- value: function assurePlaybackState(play) {
73861
- if (this.media && this.media.hasPlayed) {
73862
- var _this_instance;
73863
- var newVideoIndex = (_this_instance = this.instance) === null || _this_instance === void 0 ? void 0 : _this_instance.getPlaylistIndex();
73864
- if (newVideoIndex !== this.currentVideoIndex) {
73865
- this.currentVideoIndex = newVideoIndex;
73866
- if (this._source && this._source.type === "playlist") {
73867
- var _this__source;
73868
- this._source.videoId = this.videoId;
73869
- this.emit("UPDATED_SOURCE", (_this__source = this._source) === null || _this__source === void 0 ? void 0 : _this__source.videoId);
73870
- }
73871
- }
73959
+ key: "checkForVideoIdChanges",
73960
+ value: function checkForVideoIdChanges() {
73961
+ if (!this._source || this._source.type !== "playlist") {
73962
+ return;
73872
73963
  }
73873
- if (this.media && play && !this.media.hasPlayed) {
73874
- this.media.hasPlayed = true;
73875
- if (this._source) {
73876
- this._source.videoId = this.videoId;
73877
- }
73964
+ var currentVideoId = this.videoId;
73965
+ if (currentVideoId && currentVideoId.trim() !== "" && currentVideoId !== this._source.videoId) {
73966
+ this._source.videoId = currentVideoId;
73967
+ this.emit("UPDATED_SOURCE", this._source.videoId);
73878
73968
  }
73879
73969
  }
73880
73970
  },
@@ -73903,13 +73993,11 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
73903
73993
  key: "handleYTPlayerReady",
73904
73994
  value: function handleYTPlayerReady(event) {
73905
73995
  var _this = this;
73906
- var _this_instance;
73907
73996
  if (this.instance) {
73908
73997
  this.context.logger.warn("Instance already found!");
73909
73998
  return;
73910
73999
  }
73911
74000
  this.instance = event.target;
73912
- this.currentVideoIndex = (_this_instance = this.instance) === null || _this_instance === void 0 ? void 0 : _this_instance.getPlaylistIndex();
73913
74001
  this.ready = true;
73914
74002
  this.observeResize();
73915
74003
  this.context.store.dispatch({
@@ -73924,6 +74012,7 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
73924
74012
  if (newState !== _this.state) {
73925
74013
  _this.handlePlayerStateChange(newState);
73926
74014
  }
74015
+ _this.checkForVideoIdChanges();
73927
74016
  }, 10);
73928
74017
  }
73929
74018
  },
@@ -73945,19 +74034,16 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
73945
74034
  case -1:
73946
74035
  break;
73947
74036
  case 0:
73948
- this.assurePlaybackState(false);
73949
74037
  this.context.store.dispatch({
73950
74038
  type: "PAUSE"
73951
74039
  });
73952
74040
  break;
73953
74041
  case 1:
73954
- this.assurePlaybackState(true);
73955
74042
  this.context.store.dispatch({
73956
74043
  type: "PLAY"
73957
74044
  });
73958
74045
  break;
73959
74046
  case 2:
73960
- this.assurePlaybackState(false);
73961
74047
  this.context.store.dispatch({
73962
74048
  type: "PAUSE"
73963
74049
  });
@@ -74214,7 +74300,6 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
74214
74300
  key: "play",
74215
74301
  value: function play() {
74216
74302
  var _this_instance;
74217
- this.assurePlaybackState(true);
74218
74303
  (_this_instance = this.instance) === null || _this_instance === void 0 ? void 0 : _this_instance.playVideo();
74219
74304
  return Promise.resolve();
74220
74305
  }
@@ -74223,7 +74308,6 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
74223
74308
  key: "pause",
74224
74309
  value: function pause() {
74225
74310
  var _this_instance;
74226
- this.assurePlaybackState(false);
74227
74311
  (_this_instance = this.instance) === null || _this_instance === void 0 ? void 0 : _this_instance.pauseVideo();
74228
74312
  return Promise.resolve();
74229
74313
  }
@@ -76830,6 +76914,22 @@ var VideoRegionsDataCollection = /*#__PURE__*/ function() {
76830
76914
  }
76831
76915
  return this.missingInfo[keys[keys.length - 1]];
76832
76916
  }
76917
+ },
76918
+ {
76919
+ key: "getLoadedPercentage",
76920
+ value: function getLoadedPercentage() {
76921
+ if (this.isComplete) {
76922
+ return 100;
76923
+ }
76924
+ if (this.timestampList.length === 0) {
76925
+ return 0;
76926
+ }
76927
+ ;
76928
+ var firstMissingTimestamp = Object.keys(this.missingInfo).sort(function(a, b) {
76929
+ return parseFloat(a) - parseFloat(b);
76930
+ })[0];
76931
+ return parseFloat(firstMissingTimestamp) / this.totalLengthSeconds * 100;
76932
+ }
76833
76933
  }
76834
76934
  ]);
76835
76935
  return VideoRegionsDataCollection;
@@ -76860,6 +76960,7 @@ var VideoRegionsDataManager = /*#__PURE__*/ function(_import_events4_EventEmitte
76860
76960
  value: function handlePredictionResult(data) {
76861
76961
  var _this_cache;
76862
76962
  this.regionsData.append(data);
76963
+ this.emit("UPDATE");
76863
76964
  (_this_cache = this.cache) === null || _this_cache === void 0 ? void 0 : _this_cache.update(data);
76864
76965
  }
76865
76966
  },
@@ -76868,6 +76969,7 @@ var VideoRegionsDataManager = /*#__PURE__*/ function(_import_events4_EventEmitte
76868
76969
  value: function handlePredictionCompleted() {
76869
76970
  var _this_logger;
76870
76971
  (_this_logger = this.logger) === null || _this_logger === void 0 ? void 0 : _this_logger.log("Prediction completed!");
76972
+ this.emit("UPDATE");
76871
76973
  }
76872
76974
  },
76873
76975
  {
@@ -76935,6 +77037,12 @@ var VideoRegionsDataManager = /*#__PURE__*/ function(_import_events4_EventEmitte
76935
77037
  return this.regionsData.get(timestamp);
76936
77038
  }
76937
77039
  },
77040
+ {
77041
+ key: "progress",
77042
+ value: function progress() {
77043
+ return this.regionsData.getLoadedPercentage();
77044
+ }
77045
+ },
76938
77046
  {
76939
77047
  key: "dumps",
76940
77048
  value: function dumps(from, to) {
@@ -76960,6 +77068,7 @@ var VideoRegionsDataManager = /*#__PURE__*/ function(_import_events4_EventEmitte
76960
77068
  this.service.send("stop");
76961
77069
  this.service.destroy();
76962
77070
  this.regionsData.load(data);
77071
+ this.emit("UPDATE");
76963
77072
  return;
76964
77073
  }
76965
77074
  if (typeof window === "undefined") {
@@ -76989,6 +77098,7 @@ var VideoRegionsDataManager = /*#__PURE__*/ function(_import_events4_EventEmitte
76989
77098
  _this.service.send("stop");
76990
77099
  _this.service.destroy();
76991
77100
  _this.regionsData.load(parsed);
77101
+ _this.emit("UPDATE");
76992
77102
  } catch (err) {
76993
77103
  var _this_logger;
76994
77104
  (_this_logger = _this.logger) === null || _this_logger === void 0 ? void 0 : _this_logger.error("Failed to load data:", err);
@@ -80970,6 +81080,59 @@ var ProgressBar = /*#__PURE__*/ function() {
80970
81080
  ]);
80971
81081
  return ProgressBar;
80972
81082
  }();
81083
+ // src/Ads/VideoAds/UI/Controls/Components/ProgressIndicator.ts
81084
+ var NS = "http://www.w3.org/2000/svg";
81085
+ var BOX_S = 16;
81086
+ var R = 6;
81087
+ var CIRC = 2 * Math.PI * R;
81088
+ var ProgressBanner = /*#__PURE__*/ function() {
81089
+ function ProgressBanner() {
81090
+ _class_call_check(this, ProgressBanner);
81091
+ this.view = document.createElement("div");
81092
+ this.view.classList.add("progress-banner");
81093
+ var circleWrap = document.createElement("div");
81094
+ circleWrap.classList.add("progress-circle");
81095
+ circleWrap.style.width = "".concat(BOX_S, "px");
81096
+ circleWrap.style.height = "".concat(BOX_S, "px");
81097
+ var svg = document.createElementNS(NS, "svg");
81098
+ svg.setAttribute("viewBox", "0 0 ".concat(BOX_S, " ").concat(BOX_S));
81099
+ var bg = document.createElementNS(NS, "circle");
81100
+ bg.setAttribute("cx", "".concat(BOX_S / 2));
81101
+ bg.setAttribute("cy", "".concat(BOX_S / 2));
81102
+ bg.setAttribute("r", R.toString());
81103
+ bg.classList.add("bg");
81104
+ svg.appendChild(bg);
81105
+ this.fg = document.createElementNS(NS, "circle");
81106
+ this.fg.setAttribute("cx", "".concat(BOX_S / 2));
81107
+ this.fg.setAttribute("cy", "".concat(BOX_S / 2));
81108
+ this.fg.setAttribute("r", R.toString());
81109
+ this.fg.classList.add("fg");
81110
+ this.fg.setAttribute("stroke-dasharray", "".concat(CIRC));
81111
+ this.fg.setAttribute("stroke-dashoffset", "".concat(CIRC));
81112
+ svg.setAttribute("tabindex", "0");
81113
+ svg.appendChild(this.fg);
81114
+ circleWrap.appendChild(svg);
81115
+ this.view.appendChild(circleWrap);
81116
+ this.view.setAttribute("aria-label", "Video processing is 0% complete.");
81117
+ this.label = document.createElement("span");
81118
+ this.label.classList.add("progress-label");
81119
+ this.view.appendChild(this.label);
81120
+ this.setValue(0);
81121
+ }
81122
+ _create_class(ProgressBanner, [
81123
+ {
81124
+ /** Update the banner (0 – 100) */ key: "setValue",
81125
+ value: function setValue(value2) {
81126
+ var offset = CIRC - value2 / 100 * CIRC;
81127
+ this.fg.setAttribute("stroke-dashoffset", "".concat(offset));
81128
+ var text2 = "Video processing is ".concat(Math.ceil(value2), "% complete.");
81129
+ this.label.textContent = text2;
81130
+ this.view.setAttribute("aria-label", text2);
81131
+ }
81132
+ }
81133
+ ]);
81134
+ return ProgressBanner;
81135
+ }();
80973
81136
  // src/Ads/VideoAds/UI/Controls/Components/BottomBar/ControlBottomBar.ts
80974
81137
  var ControlBottomBar = /*#__PURE__*/ function() {
80975
81138
  function ControlBottomBar(context, events) {
@@ -81106,6 +81269,46 @@ var DailymotionBottomBar = /*#__PURE__*/ function() {
81106
81269
  ]);
81107
81270
  return DailymotionBottomBar;
81108
81271
  }();
81272
+ var NativeBottomBar = /*#__PURE__*/ function() {
81273
+ function NativeBottomBar(context, events) {
81274
+ var _this = this;
81275
+ _class_call_check(this, NativeBottomBar);
81276
+ this.buttons = {};
81277
+ this.context = context;
81278
+ this.events = events;
81279
+ this.controlsContainer = document.createElement("div");
81280
+ this.controlsContainer.id = "BRNDTS_CTLBB";
81281
+ this.controlsContainer.dataset.type = "N_CTLBB";
81282
+ var topElement = document.createElement("div");
81283
+ topElement.classList.add("BRNDTS_CTLBB_TOP");
81284
+ this.controlsContainer.appendChild(topElement);
81285
+ var ind = new ProgressBanner();
81286
+ this.context.store.subscribe(this.handleStateChange.bind(this));
81287
+ this.context.data.on("UPDATE", function() {
81288
+ ind.setValue(_this.context.data.progress());
81289
+ });
81290
+ topElement.appendChild(ind.view);
81291
+ }
81292
+ _create_class(NativeBottomBar, [
81293
+ {
81294
+ key: "handleStateChange",
81295
+ value: function handleStateChange(state) {}
81296
+ },
81297
+ {
81298
+ key: "view",
81299
+ get: function get() {
81300
+ return this.controlsContainer;
81301
+ }
81302
+ },
81303
+ {
81304
+ key: "destroy",
81305
+ value: function destroy() {
81306
+ this.view.remove();
81307
+ }
81308
+ }
81309
+ ]);
81310
+ return NativeBottomBar;
81311
+ }();
81109
81312
  // src/Ads/VideoAds/UI/Controls/Controls.ts
81110
81313
  var Controls = /*#__PURE__*/ function() {
81111
81314
  function Controls(context) {
@@ -81147,7 +81350,12 @@ var Controls = /*#__PURE__*/ function() {
81147
81350
  this.container.appendChild(this.controlBottomBar.view);
81148
81351
  }
81149
81352
  if (this.context.media.is("NATIVE")) {
81353
+ var _this_context_config_get_elements, _this_context_config_get1;
81150
81354
  this.setTopBar();
81355
+ if ((_this_context_config_get1 = this.context.config.get("controls")) === null || _this_context_config_get1 === void 0 ? void 0 : (_this_context_config_get_elements = _this_context_config_get1.elements) === null || _this_context_config_get_elements === void 0 ? void 0 : _this_context_config_get_elements.progress_ind) {
81356
+ this.controlBottomBar = new NativeBottomBar(this.context, this.events);
81357
+ this.container.appendChild(this.controlBottomBar.view);
81358
+ }
81151
81359
  }
81152
81360
  }
81153
81361
  }
@@ -83779,6 +83987,12 @@ var VideoRegionsDataManagerDecorator = /*#__PURE__*/ function() {
83779
83987
  return this.component.on(event, handler);
83780
83988
  }
83781
83989
  },
83990
+ {
83991
+ key: "off",
83992
+ value: function off(event, handler) {
83993
+ return this.component.off(event, handler);
83994
+ }
83995
+ },
83782
83996
  {
83783
83997
  key: "fetch",
83784
83998
  value: function fetch1() {
@@ -83797,6 +84011,12 @@ var VideoRegionsDataManagerDecorator = /*#__PURE__*/ function() {
83797
84011
  return this.component.check(timestamp);
83798
84012
  }
83799
84013
  },
84014
+ {
84015
+ key: "progress",
84016
+ value: function progress() {
84017
+ return this.component.progress();
84018
+ }
84019
+ },
83800
84020
  {
83801
84021
  key: "get",
83802
84022
  value: function get(timestamp) {
@@ -83817,8 +84037,8 @@ var VideoRegionsDataManagerDecorator = /*#__PURE__*/ function() {
83817
84037
  },
83818
84038
  {
83819
84039
  key: "loads",
83820
- value: function loads() {
83821
- return this.component.loads();
84040
+ value: function loads(data) {
84041
+ return this.component.loads(data);
83822
84042
  }
83823
84043
  }
83824
84044
  ]);
@@ -84053,7 +84273,7 @@ var VideoRegionsDecoratorFactory = /*#__PURE__*/ function() {
84053
84273
  minDuration: params.minimum_display_time.value
84054
84274
  });
84055
84275
  }
84056
- if ((_params_ad_placements_and_sizes = params.ad_placements_and_sizes) === null || _params_ad_placements_and_sizes === void 0 ? void 0 : _params_ad_placements_and_sizes.value) {
84276
+ if (((_params_ad_placements_and_sizes = params.ad_placements_and_sizes) === null || _params_ad_placements_and_sizes === void 0 ? void 0 : _params_ad_placements_and_sizes.value) !== void 0) {
84057
84277
  target = new VideoRegionsTypeFilterDecorator(target, params.ad_placements_and_sizes);
84058
84278
  }
84059
84279
  return target;