@newrelic/video-core 3.2.0-beta-1 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -3
- package/README.md +17 -39
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.LICENSE.txt +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.LICENSE.txt +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/nrvideo.min.js +1 -1
- package/dist/umd/nrvideo.min.js.LICENSE.txt +3 -1
- package/dist/umd/nrvideo.min.js.map +1 -1
- package/package.json +6 -3
- package/src/agent.js +74 -5
- package/src/constants.js +15 -13
- package/src/core.js +59 -15
- package/src/eventAggregator.js +189 -37
- package/src/harvestScheduler.js +416 -0
- package/src/index.js +21 -0
- package/src/optimizedHttpClient.js +165 -0
- package/src/recordEvent.js +23 -50
- package/src/retryQueueHandler.js +124 -0
- package/src/tracker.js +23 -6
- package/src/utils.js +124 -63
- package/src/videoConfiguration.js +113 -0
- package/src/videotrackerstate.js +25 -1
- package/src/authConfiguration.js +0 -138
- package/src/harvester.js +0 -171
package/dist/umd/nrvideo.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see nrvideo.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.nrvideo=t():e.nrvideo=t()}(self,(()=>(()=>{"use strict";var e={51:(e,t)=>{function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function r(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));a.AdPositions={PRE:"pre",MID:"mid",POST:"post"},a.INTERVAL=1e4,a.MAX_EVENTS_PER_BATCH=1e3,a.MAX_PAYLOAD_SIZE=1,a.MAX_BEACON_SIZE=.0625,a.MAX_EVENT_SIZE=.0625,a.VALID_EVENT_TYPES=["VideoAction","VideoAdAction","VideoErrorAction","VideoCustomAction"],a.COLLECTOR={US:"bam-cell.nr-data.net",EU:"bam.eu01.nr-data.net",Stage:"staging-bam-cell.nr-data.net",GOV:"gov-bam.nr-data.net"},t.default=a},144:(e,t)=>{function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r(n.key),n)}}function r(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,i=[{key:"error",value:function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];a(i,e.Levels.ERROR,"darkred")}},{key:"warn",value:function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];a(i,e.Levels.WARNING,"darkorange")}},{key:"notice",value:function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];a([].slice.call(arguments),e.Levels.NOTICE,"darkcyan")}},{key:"debug",value:function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];a(i,e.Levels.DEBUG,"indigo")}},{key:"debugCommonVideoEvents",value:function(t,i,n){try{if(e.level<=e.Levels.DEBUG){n=n||function(t){e.debug("Event: "+t.type)};var r=["canplay","buffering","waiting","ended","play","playing","pause","resume","error","abort","seek","seeking","seeked","stalled","dispose","loadeddata","loadstart","loadedmetadata"];i&&(null===i[0]?(i.shift(),r=i):r=r.concat(i));for(var o=0;o<r.length;o++)"function"==typeof t?t.call(window,r[o],n):t.on?t.on(r[o],n):t.addEventListener?t.addEventListener(r[o],n):t.addEventHandler?t.addEventHandler(r[o],n):e.warn("debugCommonVideoEvents: No common listener function found for ",t)}}catch(t){e.warn(t)}}}],null&&n(t.prototype,null),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}();function a(e,t,i){t=t||o.Levels.NOTICE,i=i||"darkcyan";var n,r,a=o.prefix;o.includeTime&&(a+="["+("0"+(n=new Date).getDate()).slice(-2)+":"+("0"+n.getMinutes()).slice(-2)+":"+("0"+n.getSeconds()).slice(-2)+"."+("00"+n.getMilliseconds()).slice(-3)+"] "),a+=function(e){return u[e]}(t)+":",o.level<=t&&t!==o.Levels.SILENT&&(!o.colorful||"undefined"!=typeof document&&document.documentMode?s(e,a):(r=t===o.Levels.ERROR&&console.error?console.error:t===o.Levels.WARNING&&console.warn?console.warn:t===o.Levels.DEBUG&&console.debug&&null==window.cast?console.debug:console.log,a="%c"+a,e.splice(0,0,a,"color: "+i),r.apply(console,e)))}function s(e,t){if(e instanceof Array)for(var i in e)s(e[i],t);else"string"==typeof e?console.log(t+" "+e):(console.log(t+"↵"),console.log(e))}o.Levels={SILENT:5,ERROR:4,WARNING:3,NOTICE:2,DEBUG:1,ALL:0},o.level=o.Levels.ERROR,o.colorful=!0,o.includeTime=!0,o.prefix="[nrvideo]";var u={4:"e",3:"w",2:"n",1:"d"};!function(){if("undefined"!=typeof window&&window.location&&window.location.search){var e=/\?.*&*nrvideo-debug=(.+)/i.exec(window.location.search);null!==e&&("true"===e[1]?o.level=o.Levels.ALL:o.level=e[1]),null!==/\?.*&*nrvideo-colors=false/i.exec(window.location.search)&&(o.colorful=!1)}}(),t.default=o},302:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(i(330)),o=u(i(568)),a=u(i(455)),s=u(i(51));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var y=function(e){function t(e){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=function(e,t,i){return t=d(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,i||[],d(e).constructor):t.apply(e,i))}(this,t)).customData={},i.heartbeat=null,i.parentTracker=null,i._trackerReadyChrono=new a.default,i._trackerReadyChrono.start(),i._actionTable=s.default.ACTION_TABLE,i._actionAdTable=s.default.ACTION_AD_TABLE,e=e||{},i.setOptions(e),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),i=t,(o=[{key:"setOptions",value:function(e){e&&(e.parentTracker&&(this.parentTracker=e.parentTracker),e.customData&&(this.customData=e.customData),e.heartbeat&&(this.heartbeat=e.heartbeat))}},{key:"dispose",value:function(){this.unregisterListeners()}},{key:"registerListeners",value:function(){}},{key:"unregisterListeners",value:function(){}},{key:"getHeartbeat",value:function(){return this.state._isAd?2e3:this.heartbeat?this.heartbeat:this.parentTracker&&this.parentTracker.heartbeat?this.parentTracker.heartbeat:3e4}},{key:"startHeartbeat",value:function(){this._heartbeatInterval=setInterval(this.sendHeartbeat.bind(this),Math.max(this.getHeartbeat(),2e3))}},{key:"stopHeartbeat",value:function(){this._heartbeatInterval&&clearInterval(this._heartbeatInterval)}},{key:"sendHeartbeat",value:function(e){this.sendVideoAction(t.Events.HEARTBEAT,e)}},{key:"getAttributes",value:function(e,t){for(var i in(e=e||{}).trackerName=this.getTrackerName(),e.trackerVersion=this.getTrackerVersion(),e.coreVersion=r.default.version,e.timeSinceTrackerReady=this._trackerReadyChrono.getDeltaTime(),this.customData)e[i]=this.customData[i];return null!=document.hidden&&(e.isBackgroundEvent=document.hidden),e}},{key:"getTrackerVersion",value:function(){return r.default.version}},{key:"getTrackerName",value:function(){return"base-tracker"}},{key:"sendVideoAction",value:function(e,t){this.emit("VideoAction",e,this.getAttributes(t))}},{key:"sendVideoAdAction",value:function(e,t){this.emit("VideoAdAction",e,this.getAttributes(t))}},{key:"sendVideoErrorAction",value:function(e,t){var i=this.isAd()?"adError":"videoError";this.emit("VideoErrorAction",e,this.getAttributes(t,i))}},{key:"sendVideoCustomAction",value:function(e,t){this.emit("VideoCustomAction",e,this.getAttributes(t,"customAction"))}}])&&c(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,o}(o.default);y.Events={HEARTBEAT:"HEARTBEAT"},t.default=y},324:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NRVideoHarvester=void 0;var r=s(i(51)),o=s(i(330)),a=i(347);function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function f(e,t,i){d(e,t),t.set(e,i)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return e.get(p(e,t))}function y(e,t,i){return e.set(p(e,t),i),i}function p(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}var v=r.default.INTERVAL,m=r.default.MAX_EVENTS_PER_BATCH,g=r.default.MAX_PAYLOAD_SIZE,b=r.default.MAX_BEACON_SIZE,A=new WeakMap,E=new WeakMap,S=new WeakMap,T=new WeakSet;function k(){try{if(!window.NRVIDEO||!window.NRVIDEO.info)throw new Error("NRVIDEO info is not available.");var e=window.NRVIDEO.info,t=e.beacon,i=e.licenseKey,n=e.applicationID;if(e.sa,!t||!i||!n)throw new Error("Options object provided by New Relic is not correctly initialized");return"https://".concat(t,"/ins/1/").concat(i,"?a=").concat(n,"&v=").concat(o.default.version,"&ref=").concat(window.location.href,"&ca=VA")}catch(e){return console.error(e.message),null}}t.NRVideoHarvester=function(){return e=function e(t){var i,n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,i=T),i.add(this),f(this,A,!1),f(this,E,void 0),f(this,S,null),y(E,this,t),window.addEventListener("pagehide",(function(){return n.triggerHarvest({isFinalHarvest:!0})}))},t=[{key:"startTimer",value:function(){var e=this;if(!h(A,this)){y(A,this,!0);var t=function(){e.triggerHarvest({}),h(A,e)&&y(S,e,setTimeout(t,v))};y(S,this,setTimeout(t,v))}}},{key:"stopTimer",value:function(){y(A,this,!1),h(S,this)&&(clearTimeout(h(S,this)),y(S,this,null))}},{key:"triggerHarvest",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!h(E,this).isEmpty())try{var i=h(E,this).drain(),n=t.isFinalHarvest?b:g,r=this.chunkEvents(i,n);r.forEach((function(i,n){var o=n===r.length-1;e.sendChunk(i,t,o)}))}catch(e){console.error("Error during harvest:",e)}}},{key:"chunkEvents",value:function(e,t){var i,n=[],r=[],o=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return u(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}(e);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(r.length>=m&&(n.push(r),r=[]),r.push(s),(0,a.getPayloadSize)({ins:r})>t){var c=r.pop();r.length>0&&n.push(r),r=[c]}}}catch(e){o.e(e)}finally{o.f()}return r.length>0&&n.push(r),n}},{key:"sendChunk",value:function(e,t,i){var n=this,r=p(T,this,k).call(this);if(r){var o={body:{ins:e}};(0,a.callApi)({url:r,payload:o,options:t},(function(t){t.retry&&(t.chunk=e),h(E,n).postHarvestCleanup(t)}))}else h(E,this).postHarvestCleanup({retry:!1,status:0})}}],t&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},328:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(455)),r=o(i(144));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o,a,s=[],u=!0,c=!1;try{if(o=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;u=!1}else for(;!(u=(n=o.call(i)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var f=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.reset(),this._createdAt=Date.now(),this._hb=!0,this._acc=0,this._bufferAcc=0},(t=[{key:"reset",value:function(){this._viewSession=null,this._viewCount=0,this._isAd=!1,this.numberOfErrors=0,this.numberOfAds=0,this.numberOfVideos=0,this.totalPlaytime=0,this.totalAdPlaytime=0,this.isAdBreak=!1,this.initialBufferingHappened=!1,this.resetFlags(),this.resetChronos()}},{key:"resetFlags",value:function(){this.isPlayerReady=!1,this.isRequested=!1,this.isStarted=!1,this.isPaused=!1,this.isSeeking=!1,this.isBuffering=!1,this.isPlaying=!1}},{key:"resetChronos",value:function(){this.timeSinceRequested=new n.default,this.timeSinceStarted=new n.default,this.timeSincePaused=new n.default,this.timeSinceSeekBegin=new n.default,this.timeSinceBufferBegin=new n.default,this.timeSinceAdBreakStart=new n.default,this.timeSinceLastDownload=new n.default,this.timeSinceLastHeartbeat=new n.default,this.timeSinceLastRenditionChange=new n.default,this.timeSinceLastAdQuartile=new n.default,this.timeSinceLastAd=new n.default,this.timeSinceResumed=new n.default,this.timeSinceSeekEnd=new n.default,this.playtimeSinceLastEvent=new n.default,this.customTimeSinceAttributes={},this.elapsedTime=new n.default,this.bufferElapsedTime=new n.default}},{key:"isAd",value:function(){return this._isAd}},{key:"setIsAd",value:function(e){this._isAd=e}},{key:"setTimeSinceAttribute",value:function(e){this.customTimeSinceAttributes[e]=new n.default,this.customTimeSinceAttributes[e].start()}},{key:"removeTimeSinceAttribute",value:function(e){delete this.customTimeSinceAttributes[e]}},{key:"getViewSession",value:function(){if(!this._viewSession){var e=(new Date).getTime(),t=Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2);this._viewSession=e+"-"+t}return this._viewSession}},{key:"getViewId",value:function(){return this.getViewSession()+"-"+this._viewCount}},{key:"getStateAttributes",value:function(e){e=e||{},this.isAd()?(this.isRequested&&(e.timeSinceAdRequested=this.timeSinceRequested.getDeltaTime(),e.timeSinceLastAdHeartbeat=this.timeSinceLastHeartbeat.getDeltaTime()),this.isStarted&&(e.timeSinceAdStarted=this.timeSinceStarted.getDeltaTime()),this.isPaused&&(e.timeSinceAdPaused=this.timeSincePaused.getDeltaTime()),this.isBuffering&&(e.timeSinceAdBufferBegin=this.timeSinceBufferBegin.getDeltaTime()),this.isSeeking&&(e.timeSinceAdSeekBegin=this.timeSinceSeekBegin.getDeltaTime()),this.isAdBreak&&(e.timeSinceAdBreakBegin=this.timeSinceAdBreakStart.getDeltaTime()),e.numberOfAds=this.numberOfAds):(this.isRequested&&(e.timeSinceRequested=this.timeSinceRequested.getDeltaTime(),e.timeSinceLastHeartbeat=this.timeSinceLastHeartbeat.getDeltaTime()),this.isStarted&&(e.timeSinceStarted=this.timeSinceStarted.getDeltaTime()),this.isPaused&&(e.timeSincePaused=this.timeSincePaused.getDeltaTime()),this.isBuffering&&(e.timeSinceBufferBegin=this.timeSinceBufferBegin.getDeltaTime()),this.isSeeking&&(e.timeSinceSeekBegin=this.timeSinceSeekBegin.getDeltaTime()),e.timeSinceLastAd=this.timeSinceLastAd.getDeltaTime(),e.numberOfVideos=this.numberOfVideos),e.numberOfErrors=this.numberOfErrors,this.isAd()||(this.playtimeSinceLastEvent.startTime>0?e.playtimeSinceLastEvent=this.playtimeSinceLastEvent.getDeltaTime():e.playtimeSinceLastEvent=0,this.isPlaying?this.playtimeSinceLastEvent.start():this.playtimeSinceLastEvent.reset(),this.totalPlaytime+=e.playtimeSinceLastEvent,e.totalPlaytime=this.totalPlaytime);for(var t=0,i=Object.entries(this.customTimeSinceAttributes);t<i.length;t++){var n=s(i[t],2),r=n[0],o=n[1];e[r]=o.getDeltaTime()}return e}},{key:"calculateBufferType",value:function(e){var t;return t=e?"initial":this.isSeeking?"seek":this.isPaused?"pause":"connection",r.default.debug("Buffer Type = "+t),t}},{key:"goViewCountUp",value:function(){this._viewCount++}},{key:"goPlayerReady",value:function(){return!this.isPlayerReady&&(this.isPlayerReady=!0,!0)}},{key:"goRequest",value:function(){return!this.isRequested&&(this.isRequested=!0,this.timeSinceLastAd.reset(),this.timeSinceRequested.start(),!0)}},{key:"goStart",value:function(){return!(!this.isRequested||this.isStarted||(this.isAd()?this.numberOfAds++:this.numberOfVideos++,this.isStarted=!0,this.isPlaying=!0,this.timeSinceStarted.start(),this.playtimeSinceLastEvent.start(),0))}},{key:"goEnd",value:function(){return!!this.isRequested&&(this.numberOfErrors=0,this.resetFlags(),this.timeSinceRequested.stop(),this.timeSinceStarted.stop(),this.playtimeSinceLastEvent.stop(),!0)}},{key:"goPause",value:function(){return!(!this.isStarted||this.isPaused||(this.isPaused=!0,this.isPlaying=!1,this.timeSincePaused.start(),this.playtimeSinceLastEvent.stop(),this.timeSinceResumed.reset(),this.isBuffering&&(this._bufferAcc+=this.bufferElapsedTime.getDeltaTime()),this.elapsedTime.start(),0))}},{key:"goResume",value:function(){return!(!this.isStarted||!this.isPaused||(this.isPaused=!1,this.isPlaying=!0,this.timeSincePaused.stop(),this.timeSinceResumed.start(),this._hb?(this._acc=this.elapsedTime.getDeltaTime(),this._hb=!1):(this.isBuffering&&this.bufferElapsedTime.start(),this._acc+=this.elapsedTime.getDeltaTime()),0))}},{key:"goBufferStart",value:function(){return!(!this.isRequested||this.isBuffering||(this.isBuffering=!0,this.isPlaying=!1,this.timeSinceBufferBegin.start(),this.bufferElapsedTime.start(),0))}},{key:"goBufferEnd",value:function(){return!(!this.isRequested||!this.isBuffering||(this.isBuffering=!1,this.isPlaying=!0,this.timeSinceBufferBegin.stop(),this._hb?(this._bufferAcc=this.bufferElapsedTime.getDeltaTime(),this._hb=!1):this._bufferAcc+=this.bufferElapsedTime.getDeltaTime(),0))}},{key:"goSeekStart",value:function(){return!(!this.isStarted||this.isSeeking||(this.isSeeking=!0,this.isPlaying=!1,this.timeSinceSeekBegin.start(),this.timeSinceSeekEnd.reset(),0))}},{key:"goSeekEnd",value:function(){return!(!this.isStarted||!this.isSeeking||(this.isSeeking=!1,this.isPlaying=!0,this.timeSinceSeekBegin.stop(),this.timeSinceSeekEnd.start(),0))}},{key:"goAdBreakStart",value:function(){return!this.isAdBreak&&(this.isAdBreak=!0,this.timeSinceAdBreakStart.start(),!0)}},{key:"goAdBreakEnd",value:function(){return!!this.isAdBreak&&(this.isRequested=!1,this.isAdBreak=!1,this.totalAdPlaytime=this.timeSinceAdBreakStart.getDeltaTime(),this.timeSinceAdBreakStart.stop(),!0)}},{key:"goDownload",value:function(){this.timeSinceLastDownload.start()}},{key:"goHeartbeat",value:function(){this.timeSinceLastHeartbeat.start()}},{key:"goRenditionChange",value:function(){this.timeSinceLastRenditionChange.start()}},{key:"goAdQuartile",value:function(){this.timeSinceLastAdQuartile.start()}},{key:"goError",value:function(){this.isError=!0,this.numberOfErrors++}},{key:"goLastAd",value:function(){this.timeSinceLastAd.start()}}])&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.default=f},330:e=>{e.exports=JSON.parse('{"name":"@newrelic/video-core","version":"3.2.0-beta-1","description":"New Relic video tracking core library","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","scripts":{"build":"webpack --mode production","build:dev":"webpack --mode development","watch":"webpack --mode production --progress --color --watch","watch:dev":"webpack --progress --color --watch","clean":"rm -rf dist coverage doc","test":"nyc --reporter=html --reporter=text mocha --require @babel/register","doc":"jsdoc -c jsdoc.json -d documentation","deploy":"node scripts/deploy.js","third-party-updates":"oss third-party manifest --includeOptDeps && oss third-party notices --includeOptDeps && git add THIRD_PARTY_NOTICES.md third_party_manifest.json"},"repository":{"type":"git","url":"https://github.com/newrelic/video-core-js"},"author":"Jordi Aguilar","contributors":["Andreu Santarén Llop"],"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.24.5","@babel/plugin-transform-modules-commonjs":"^7.24.1","@babel/preset-env":"^7.24.5","@babel/register":"^7.24.6","@newrelic/newrelic-oss-cli":"^0.1.2","aws-sdk":"^2.920.0","babel-loader":"^9.1.3","chai":"^4.3.4","diff":"^5.0.0","jsdom":"^25.0.1","mocha":"^10.4.0","nyc":"^15.1.0","sinon":"^2.4.1","webpack":"^5.91.0","webpack-cli":"^4.9.2"},"files":["THIRD_PARTY_NOTICES.md","dist","src","CHANGELOG.md","LICENSE","README.md","!test"],"publishConfig":{"access":"public"}}')},347:(e,t)=>{function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.callApi=function(e,t){var i,n=e.url,r=e.payload,o=e.options,a=void 0===o?{}:o;if(!n||!r||!t)return console.error("callApi: Missing required parameters"),void(t&&t({retry:!1,status:0}));try{i=JSON.stringify(r.body)}catch(e){return console.error("callApi: Error serializing payload",e),void t({retry:!1,status:0})}if(a.isFinalHarvest&&navigator.sendBeacon)try{var s=navigator.sendBeacon(n,i);t({retry:!s,status:s?200:0})}catch(e){t({retry:!0,status:0})}else fetch(n,{method:"POST",body:i,headers:{"Content-Type":"application/json"},keepalive:a.isFinalHarvest}).then((function(e){var i=function(e){switch(e){case 408:case 429:case 500:return!0;case 401:case 403:case 404:return!1}return e>=502&&e<=504||e>=512&&e<=530}(e.status);t({retry:i,status:e.status,ok:e.ok})})).catch((function(){t({retry:!0,status:0})}))},t.getPayloadSize=function(e){if(!e||"object"!==i(e))return 0;try{var t=JSON.stringify(e);return(new TextEncoder).encode(t).length/1048576}catch(e){return console.error("getPayloadSize: Error calculating payload size",e),0}}},399:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=i(144))&&n.__esModule?n:{default:n},o=i(449),a=i(418);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function c(e,t,i){return(t=f(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,i){return i&&l(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,0,[{key:"addTracker",value:function(e,t){(0,a.setAuthConfig)(t.info),e.on&&e.emit?(h.push(e),e.on("*",y),"function"==typeof e.trackerInit&&e.trackerInit()):r.default.error("Tried to load a non-tracker.",e)}},{key:"removeTracker",value:function(e){e.off("*",y),e.dispose();var t=h.indexOf(e);-1!==t&&h.splice(t,1)}},{key:"getTrackers",value:function(){return h}},{key:"send",value:function(e,t,i){i.timeSinceLoad=window.performance.now()/1e3,(0,o.recordEvent)(e,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({actionName:t},i))}},{key:"sendError",value:function(t){e.send("ERROR",t)}}])}(),h=[];function y(e){var t=function(e){var t={};for(var i in e)null!==e[i]&&void 0!==e[i]&&(t[i]=e[i]);return t}(e.data);r.default.level<=r.default.Levels.DEBUG?r.default.notice("Sent",e.type,t):r.default.notice("Sent",e.type),d.send(e.eventType,e.type,t)}t.default=d},418:(e,t,i)=>{var n;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setAuthConfig=function(e){try{if(!e||"object"!==r(e)||Array.isArray(e))throw new Error("setAuthConfig: info parameter must be a valid object");if(function(e){if(!e||"object"!==r(e))return!1;var t=e.licenseKey,i=e.appName,n=e.region,o=e.applicationID,a=e.beacon;return!(!t||"string"!=typeof t||0===t.trim().length)&&(o?!!(a&&"string"==typeof a&&a.trim().length>0):!!(i&&"string"==typeof i&&i.trim().length>0&&n&&"string"==typeof n&&n.trim().length>0))}(e)){var t=e.licenseKey,i=e.appName,n=e.region,a=e.beacon,s=e.sa,u=e.applicationID;window.NRVIDEO=window.NRVIDEO||{};var c=a;if(!c&&n){if(!o[n])throw new Error("setAuthConfig: Invalid region '".concat(n,"'. Valid regions: ").concat(Object.keys(o).join(", ")));c=o[n]}return window.NRVIDEO.info={beacon:c,licenseKey:t,applicationID:u||null,appName:i||null,sa:s||0},!0}var l=function(e){if(!e||"object"!==r(e))return"info parameter must be a valid object";var t=e.licenseKey,i=e.appName,n=e.region,o=e.applicationID,a=e.beacon;if(!t||"string"!=typeof t||0===t.trim().length)return"licenseKey is required and must be a non-empty string";if(o){if(!a||"string"!=typeof a||0===a.trim().length)return"beacon URL is required when using applicationID"}else{if(!i||"string"!=typeof i||0===i.trim().length)return"appName is required when not using applicationID";if(!n||"string"!=typeof n||0===n.trim().length)return"region is required when not using applicationID"}return"configuration validation failed"}(e);throw new Error("setAuthConfig: ".concat(l))}catch(e){return console.error("setAuthConfig:",e.message),!1}};var o=((n=i(51))&&n.__esModule?n:{default:n}).default.COLLECTOR},431:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NRVideoEventAggregator=void 0;var r,o=i(347),a=(r=i(51))&&r.__esModule?r:{default:r};function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function f(e,t,i){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,i)}function d(e,t,i){return e.set(y(e,t),i),i}function h(e,t){return e.get(y(e,t))}function y(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}var p=a.default.MAX_EVENTS_PER_BATCH,v=a.default.MAX_PAYLOAD_SIZE,m=new WeakMap,g=new WeakMap;t.NRVideoEventAggregator=function(){return function(e,t){return t&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,m,[]),f(this,g,[])}),[{key:"isEmpty",value:function(){return 0===h(m,this).length&&0===h(g,this).length}},{key:"drain",value:function(){var e=[].concat(s(h(g,this)),s(h(m,this)));return d(m,this,[]),d(g,this,[]),e}},{key:"add",value:function(e){h(m,this).push(e)}},{key:"postHarvestCleanup",value:function(e){var t,i;if(e.retry&&null!==(t=e.chunk)&&void 0!==t&&t.length){for(;h(g,this).length>0&&((0,o.getPayloadSize)(h(g,this))+(0,o.getPayloadSize)(e.chunk)>v||h(g,this).length+e.chunk.length>p);)h(g,this).shift();(i=h(g,this)).push.apply(i,s(e.chunk))}else d(g,this,[])}}])}()},449:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.recordEvent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e||0===e.length||!f.includes(e))return console.warn("recordEvent: Invalid eventType provided:",e),!1;if(null!==t&&("object"!==l(t)||Array.isArray(t)))return console.warn("recordEvent: attributes must be a plain object"),!1;if(t=t||{},!window.NRVIDEO||!window.NRVIDEO.info)return console.error("recordEvent: NRVIDEO not properly initialized"),!1;try{var i=window.NRVIDEO.info.appName,n=u(u({},t),{},{eventType:e,appName:i,timestamp:Date.now()}),a=(0,o.getPayloadSize)(n);return a>d?(console.warn("recordEvent: Event size (".concat(a," bytes) exceeds maximum (").concat(d," bytes)")),!1):(r.customEventAggregator.add(n),!0)}catch(e){return console.error("recordEvent: Error recording event:",e),!1}};var n,r=i(487),o=i(347),a=(n=i(51))&&n.__esModule?n:{default:n};function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function c(e,t,i){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}var f=a.default.VALID_EVENT_TYPES,d=a.default.MAX_EVENT_SIZE},455:(e,t)=>{function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r(n.key),n)}}function r(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.reset()}return t=e,(i=[{key:"reset",value:function(){this.startTime=0,this.stopTime=0,this.offset=0}},{key:"getDeltaTime",value:function(){return this.startTime?this.offset+((new Date).getTime()-this.startTime):null}},{key:"start",value:function(){this.startTime=(new Date).getTime(),this.stopTime=0}},{key:"stop",value:function(){return this.stopTime=(new Date).getTime(),this.getDeltaTime()}},{key:"clone",value:function(){var t=new e;return t.startTime=this.startTime,t.stopTime=this.stopTime,t.offset=this.offset,t}}])&&n(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}();t.default=o},487:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.customEventAggregator=void 0;var n=i(431),r=i(324),o=t.customEventAggregator=new n.NRVideoEventAggregator;new r.NRVideoHarvester(o).startTimer()},568:(e,t)=>{function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r(n.key),n)}}function r(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"on",value:function(e,t){if(this._listeners=this._listeners||{},"function"==typeof t)return this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t),this}},{key:"off",value:function(e,t){if(this._listeners=this._listeners||{},this._listeners[e]){var i=this._listeners[e].indexOf(t);-1!==i&&this._listeners[e].splice(i,1)}return this}},{key:"emit",value:function(e,t,i){var n=this;return this._listeners=this._listeners||{},i=i||{},Array.isArray(this._listeners[t])&&this._listeners[t].forEach((function(r){r.call(n,{eventType:e,type:t,data:i,target:n})})),Array.isArray(this._listeners["*"])&&this._listeners["*"].forEach((function(r){r.call(n,{eventType:e,type:t,data:i,target:n})})),this}}])&&n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.default=o},793:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(i(144)),o=u(i(302)),a=u(i(328)),s=u(i(330));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach((function(t){f(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function f(e,t,i){return(t=h(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function d(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var m=function(e){function t(e,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,i){return t=p(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,i||[],p(e).constructor):t.apply(e,i))}(this,t)).state=new a.default,o.adsTracker=null,o._lastBufferType=null,o._userId=null,i=i||{},o.setOptions(i),e&&o.setPlayer(e,i.tag),r.default.notice("Tracker "+o.getTrackerName()+" v"+o.getTrackerVersion()+" is ready."),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),i=t,u=[{key:"setUserId",value:function(e){this._userId=e}},{key:"setOptions",value:function(e){e&&(e.adsTracker&&this.setAdsTracker(e.adsTracker),"boolean"==typeof e.isAd&&this.setIsAd(e.isAd),o.default.prototype.setOptions.apply(this,arguments))}},{key:"setPlayer",value:function(e,t){(this.player||this.tag)&&this.dispose(),"undefined"!=typeof document&&document.getElementById&&("string"==typeof e&&(e=document.getElementById(e)),"string"==typeof t&&(t=document.getElementById(t))),t=t||e,this.player=e,this.tag=t,this.registerListeners()}},{key:"isAd",value:function(){return this.state.isAd()}},{key:"setIsAd",value:function(e){this.state.setIsAd(e)}},{key:"setAdsTracker",value:function(e){this.disposeAdsTracker(),e&&(this.adsTracker=e,this.adsTracker.setIsAd(!0),this.adsTracker.parentTracker=this,this.adsTracker.on("*",g.bind(this)))}},{key:"disposeAdsTracker",value:function(){this.adsTracker&&(this.adsTracker.off("*",g),this.adsTracker.dispose())}},{key:"dispose",value:function(){this.stopHeartbeat(),this.disposeAdsTracker(),this.unregisterListeners(),this.player=null,this.tag=null}},{key:"registerListeners",value:function(){}},{key:"unregisterListeners",value:function(){}},{key:"getViewId",value:function(){return this.parentTracker?this.parentTracker.getViewId():this.state.getViewId()}},{key:"getViewSession",value:function(){return this.parentTracker?this.parentTracker.getViewSession():this.state.getViewSession()}},{key:"getVideoId",value:function(){return null}},{key:"getTitle",value:function(){return null}},{key:"isLive",value:function(){return null}},{key:"getBitrate",value:function(){return null}},{key:"getWebkitBitrate",value:function(){if(this.tag&&this.tag.webkitVideoDecodedByteCount){var e;if(this._lastWebkitBitrate){var t=(e=this.tag.webkitVideoDecodedByteCount)-this._lastWebkitBitrate,i=this.getHeartbeat()/1e3;e=Math.round(t/i*8)}return this._lastWebkitBitrate=this.tag.webkitVideoDecodedByteCount,e||null}}},{key:"getRenditionName",value:function(){return null}},{key:"getRenditionBitrate",value:function(){return null}},{key:"getRenditionShift",value:function(e){var t,i=this.getRenditionBitrate();return this.isAd()?(t=this._lastAdRendition,e&&(this._lastAdRendition=i)):(t=this._lastRendition,e&&(this._lastRendition=i)),i&&t?i>t?"up":i<t?"down":null:null}},{key:"getRenditionHeight",value:function(){return this.tag?this.tag.videoHeight:null}},{key:"getRenditionWidth",value:function(){return this.tag?this.tag.videoWidth:null}},{key:"getDuration",value:function(){return this.tag?this.tag.duration:null}},{key:"getPlayhead",value:function(){return this.tag?this.tag.currentTime:null}},{key:"getLanguage",value:function(){return null}},{key:"getSrc",value:function(){return this.tag?this.tag.currentSrc:null}},{key:"getPlayrate",value:function(){return this.tag?this.tag.playbackRate:null}},{key:"isMuted",value:function(){return this.tag?this.tag.muted:null}},{key:"isFullscreen",value:function(){return null}},{key:"getCdn",value:function(){return null}},{key:"getPlayerName",value:function(){return this.getTrackerName()}},{key:"getPlayerVersion",value:function(){return s.default.version}},{key:"getFps",value:function(){return null}},{key:"isAutoplayed",value:function(){return this.tag?this.tag.autoplay:null}},{key:"getPreload",value:function(){return this.tag?this.tag.preload:null}},{key:"getAdQuartile",value:function(){return null}},{key:"getAdPosition",value:function(){return this.parentTracker?this.parentTracker.state.isStarted?"mid":"pre":null}},{key:"getAdPartner",value:function(){return null}},{key:"getAdCreativeId",value:function(){return null}},{key:"getInstrumentationProvider",value:function(){return null}},{key:"getInstrumentationName",value:function(){return null}},{key:"getInstrumentationVersion",value:function(){return null}},{key:"getAttributes",value:function(e,t){if(void 0===(e=o.default.prototype.getAttributes.apply(this,arguments)).isAd&&(e.isAd=this.isAd()),e.viewSession=this.getViewSession(),e.viewId=this.getViewId(),e.playerName=this.getPlayerName(),e.playerVersion=this.getPlayerVersion(),e["instrumentation.provider"]=this.getInstrumentationProvider(),e["instrumentation.name"]=this.getInstrumentationName(),e["instrumentation.version"]=this.getInstrumentationVersion(),e["enduser.id"]=this._userId,e.src="Browser","customAction"===t)return e;try{e.pageUrl=window.location.href}catch(e){}for(var i in this.isAd()?(e.adId=this.getVideoId(),e.adTitle=this.getTitle(),e.adSrc=this.getSrc(),e.adCdn=this.getCdn(),e.adBitrate=this.getBitrate()||this.getWebkitBitrate()||this.getRenditionBitrate(),e.adRenditionName=this.getRenditionName(),e.adRenditionBitrate=this.getRenditionBitrate(),e.adRenditionHeight=this.getRenditionHeight(),e.adRenditionWidth=this.getRenditionWidth(),e.adDuration=this.getDuration(),e.adPlayhead=this.getPlayhead(),e.adLanguage=this.getLanguage(),e.adIsMuted=this.isMuted(),e.adFps=this.getFps(),e.adPosition=this.getAdPosition(),e.adCreativeId=this.getAdCreativeId(),e.adPartner=this.getAdPartner()):(e.contentId=this.getVideoId(),e.contentTitle=this.getTitle(),e.contentSrc=this.getSrc(),e.contentCdn=this.getCdn(),e.contentPlayhead=this.getPlayhead(),e.contentIsLive=this.isLive(),e.contentBitrate=this.getBitrate()||this.getWebkitBitrate()||this.getRenditionBitrate(),e.contentRenditionName=this.getRenditionName(),e.contentRenditionBitrate=this.getRenditionBitrate(),e.contentRenditionHeight=this.getRenditionHeight(),e.contentRenditionWidth=this.getRenditionWidth(),e.contentDuration=this.getDuration(),e.contentLanguage=this.getLanguage(),e.contentPlayrate=this.getPlayrate(),e.contentIsFullscreen=this.isFullscreen(),e.contentIsMuted=this.isMuted(),e.contentIsAutoplayed=this.isAutoplayed(),e.contentPreload=this.getPreload(),e.contentFps=this.getFps(),null!=this.adsTracker&&this.adsTracker.state.totalAdPlaytime>0&&(e.totalAdPlaytime=this.adsTracker.state.totalAdPlaytime)),this.state.getStateAttributes(e),this.customData)e[i]=this.customData[i];return e}},{key:"sendCustom",value:function(e,t,i){i=i||{},this.sendVideoCustomAction(e,i),this.state.setTimeSinceAttribute(t)}},{key:"sendPlayerReady",value:function(e){this.state.goPlayerReady()&&(e=e||{},this.sendVideoAction(t.Events.PLAYER_READY,e))}},{key:"sendRequest",value:function(e){var i;this.state.goRequest()&&(this.isAd()?(i=t.Events.AD_REQUEST,this.sendVideoAdAction(i,e)):(i=t.Events.CONTENT_REQUEST,this.sendVideoAction(i,e)))}},{key:"sendStart",value:function(e){var i;this.state.goStart()&&(this.isAd()?(i=t.Events.AD_START,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(i,e)):(i=t.Events.CONTENT_START,this.sendVideoAction(i,e)),this.startHeartbeat(),this.state.goHeartbeat())}},{key:"sendEnd",value:function(e){var i;this.state.goEnd()&&(e=e||{},this.isAd()?(i=t.Events.AD_END,e.timeSinceAdRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceAdStarted=this.state.timeSinceStarted.getDeltaTime(),this.parentTracker&&(this.parentTracker.state.isPlaying=!0)):(i=t.Events.CONTENT_END,e.timeSinceRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceStarted=this.state.timeSinceStarted.getDeltaTime()),this.stopHeartbeat(),this.isAd()?this.sendVideoAdAction(i,e):this.sendVideoAction(i,e),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd(),this.state.goViewCountUp(),this.state.totalPlaytime=0)}},{key:"sendPause",value:function(e){if(this.state.goPause()){var i=this.isAd()?t.Events.AD_PAUSE:t.Events.CONTENT_PAUSE;this.isAd()?this.sendVideoAdAction(i,e):this.sendVideoAction(i,e)}}},{key:"sendResume",value:function(e){var i;this.state.goResume()&&(e=e||{},this.isAd()?(i=t.Events.AD_RESUME,e.timeSinceAdPaused=this.state.timeSincePaused.getDeltaTime()):(i=t.Events.CONTENT_RESUME,e.timeSincePaused=this.state.timeSincePaused.getDeltaTime()),this.isAd()?this.sendVideoAdAction(i,e):this.sendVideoAction(i,e))}},{key:"sendBufferStart",value:function(e){var i;this.state.goBufferStart()&&(e=e||{},i=this.isAd()?t.Events.AD_BUFFER_START:t.Events.CONTENT_BUFFER_START,e=this.buildBufferAttributes(e),this._lastBufferType=e.bufferType,this.isAd()?this.sendVideoAdAction(i,e):this.sendVideoAction(i,e))}},{key:"sendBufferEnd",value:function(e){var i;this.state.goBufferEnd()&&(e=e||{},this.isAd()?(i=t.Events.AD_BUFFER_END,e.timeSinceAdBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()):(i=t.Events.CONTENT_BUFFER_END,e.timeSinceBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()),e=this.buildBufferAttributes(e),null!=this._lastBufferType&&(e.bufferType=this._lastBufferType),this.isAd()?this.sendVideoAdAction(i,e):this.sendVideoAction(i,e),this.state.initialBufferingHappened=!0)}},{key:"buildBufferAttributes",value:function(e){return null==e.timeSinceStarted||e.timeSinceStarted<100?e.isInitialBuffering=!this.state.initialBufferingHappened:e.isInitialBuffering=!1,e.bufferType=this.state.calculateBufferType(e.isInitialBuffering),e.timeSinceResumed=this.state.timeSinceResumed.getDeltaTime(),e.timeSinceSeekEnd=this.state.timeSinceSeekEnd.getDeltaTime(),e}},{key:"sendSeekStart",value:function(e){var i;this.state.goSeekStart()&&(i=this.isAd()?t.Events.AD_SEEK_START:t.Events.CONTENT_SEEK_START,this.isAd()?this.sendVideoAdAction(i,e):this.sendVideoAction(i,e))}},{key:"sendSeekEnd",value:function(e){var i;this.state.goSeekEnd()&&(e=e||{},this.isAd()?(i=t.Events.AD_SEEK_END,e.timeSinceAdSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()):(i=t.Events.CONTENT_SEEK_END,e.timeSinceSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()),this.isAd()?this.sendVideoAdAction(i,e):this.sendVideoAction(i,e))}},{key:"sendDownload",value:function(e){(e=e||{}).state||r.default.warn("Called sendDownload without { state: xxxxx }."),this.sendVideoAction(t.Events.DOWNLOAD,e),this.state.goDownload()}},{key:"sendError",value:function(e){(e=e||{}).isAd=this.isAd(),this.state.goError();var i=this.isAd()?t.Events.AD_ERROR:t.Events.CONTENT_ERROR;this.sendVideoErrorAction(i,e)}},{key:"sendRenditionChanged",value:function(e){var i;(e=e||{}).timeSinceLastRenditionChange=this.state.timeSinceLastRenditionChange.getDeltaTime(),e.shift=this.getRenditionShift(!0),i=this.isAd()?t.Events.AD_RENDITION_CHANGE:t.Events.CONTENT_RENDITION_CHANGE,this.isAd()?this.sendVideoAdAction(i,e):this.sendVideoAction(i,e),this.state.goRenditionChange()}},{key:"sendHeartbeat",value:function(e){if(this.state.isRequested){var i,n=this.getHeartbeat();this.state._hb=!0,n=this.adjustElapsedTimeForPause(n),this.isAd()?(i=t.Events.AD_HEARTBEAT,"bitmovin-ads"===this.getPlayerName()?this.sendVideoAdAction(i,e):this.sendVideoAdAction(i,l({elapsedTime:n},e))):(i=t.Events.CONTENT_HEARTBEAT,this.sendVideoAction(i,l({elapsedTime:n},e))),this.state.goHeartbeat()}}},{key:"adjustElapsedTimeForPause",value:function(e){return this.state._acc&&(e-=this.state._acc,this.state._acc=0),this.state.isPaused&&((e-=this.state.elapsedTime.getDeltaTime())<10&&(e=0),this.state.elapsedTime.start()),this.state._bufferAcc?(e-=this.state._bufferAcc,this.state._bufferAcc=0):this.state.isBuffering&&((e-=this.state.bufferElapsedTime.getDeltaTime())<5&&(e=0),this.state.bufferElapsedTime.start()),Math.max(0,e)}},{key:"sendAdBreakStart",value:function(e){this.isAd()&&this.state.goAdBreakStart()&&(this.state.totalAdPlaytime=0,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(t.Events.AD_BREAK_START,e))}},{key:"sendAdBreakEnd",value:function(e){this.isAd()&&this.state.goAdBreakEnd()&&((e=e||{}).timeSinceAdBreakBegin=this.state.timeSinceAdBreakStart.getDeltaTime(),this.sendVideoAdAction(t.Events.AD_BREAK_END,e),this.parentTracker&&(this.parentTracker.state.isPlaying=!0),this.stopHeartbeat(),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd())}},{key:"sendAdQuartile",value:function(e){this.isAd()&&((e=e||{}).quartile||r.default.warn("Called sendAdQuartile without { quartile: xxxxx }."),e.timeSinceLastAdQuartile=this.state.timeSinceLastAdQuartile.getDeltaTime(),this.sendVideoAdAction(t.Events.AD_QUARTILE,e),this.state.goAdQuartile())}},{key:"sendAdClick",value:function(e){this.isAd()&&((e=e||{}).url||r.default.warn("Called sendAdClick without { url: xxxxx }."),this.sendVideoAdAction(t.Events.AD_CLICK,e))}}],u&&d(i.prototype,u),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,u}(o.default);function g(e){e.type!==m.Events.AD_ERROR?this.sendVideoAdAction(e.type,e.data):this.sendVideoErrorAction(e.type,e.data)}m.Events={PLAYER_READY:"PLAYER_READY",DOWNLOAD:"DOWNLOAD",ERROR:"ERROR",CONTENT_REQUEST:"CONTENT_REQUEST",CONTENT_START:"CONTENT_START",CONTENT_END:"CONTENT_END",CONTENT_PAUSE:"CONTENT_PAUSE",CONTENT_RESUME:"CONTENT_RESUME",CONTENT_SEEK_START:"CONTENT_SEEK_START",CONTENT_SEEK_END:"CONTENT_SEEK_END",CONTENT_BUFFER_START:"CONTENT_BUFFER_START",CONTENT_BUFFER_END:"CONTENT_BUFFER_END",CONTENT_HEARTBEAT:"CONTENT_HEARTBEAT",CONTENT_RENDITION_CHANGE:"CONTENT_RENDITION_CHANGE",CONTENT_ERROR:"CONTENT_ERROR",AD_REQUEST:"AD_REQUEST",AD_START:"AD_START",AD_END:"AD_END",AD_PAUSE:"AD_PAUSE",AD_RESUME:"AD_RESUME",AD_SEEK_START:"AD_SEEK_START",AD_SEEK_END:"AD_SEEK_END",AD_BUFFER_START:"AD_BUFFER_START",AD_BUFFER_END:"AD_BUFFER_END",AD_HEARTBEAT:"AD_HEARTBEAT",AD_RENDITION_CHANGE:"AD_RENDITION_CHANGE",AD_ERROR:"AD_ERROR",AD_BREAK_START:"AD_BREAK_START",AD_BREAK_END:"AD_BREAK_END",AD_QUARTILE:"AD_QUARTILE",AD_CLICK:"AD_CLICK"},t.default=m}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}var n={};return(()=>{var e=n;e.default=void 0;var t=d(i(399)),r=d(i(51)),o=d(i(455)),a=d(i(144)),s=d(i(568)),u=d(i(302)),c=d(i(793)),l=d(i(328)),f=i(330);function d(e){return e&&e.__esModule?e:{default:e}}var h={Constants:r.default,Chrono:o.default,Log:a.default,Emitter:s.default,Tracker:u.default,VideoTracker:c.default,VideoTrackerState:l.default,Core:t.default,version:f.version};e.default=h})(),n.default})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.nrvideo=t():e.nrvideo=t()}(self,()=>(()=>{"use strict";var e={28:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.OptimizedHttpClient=void 0;var n,i=r(347),o=(n=r(144))&&n.__esModule?n:{default:n};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return f(c,"_invoke",function(r,n,i){var o,s,u,c=0,l=i||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,u=e,d.n=r,a}};function h(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=d.p,y=o[2];r>3?(i=y===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(s=0,d.v=n,d.n=o[1]):h<y&&(i=r<3||o[0]>n||n>y)&&(o[4]=r,o[5]=n,d.n=y,s=0))}if(i||r>1)return a;throw f=!0,n}return function(i,l,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,y),s=l,u=y;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=d.n<0)?u:r.call(n,d))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,o),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(f(t={},n,function(){return this}),t),h=c.prototype=s.prototype=Object.create(d);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,f(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=c,f(h,"constructor",c),f(c,"constructor",u),u.displayName="GeneratorFunction",f(c,i,"GeneratorFunction"),f(h),f(h,i,"Generator"),f(h,n,function(){return this}),f(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:y}})()}function f(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}f=function(e,t,r,n){function o(t,r){f(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},f(e,t,r,n)}function d(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function h(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)})}}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function v(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var p=t.OptimizedHttpClient=function(){return function(e,t){return t&&y(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},[{key:"send",value:(n=h(l().m(function e(t,r){var n,i,a,s,u,c;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=t.url,i=t.payload,a=t.options,s=void 0===a?{}:a,e.p=1,n&&i){e.n=2;break}throw new Error("URL and payload are required");case 2:return u={url:n,payload:i,options:s,callback:r},e.n=3,this.executeRequest(u);case 3:e.n=5;break;case 4:e.p=4,c=e.v,o.default.error("Failed to send request:",c.message),r({retry:!1,status:0,error:c.message});case 5:return e.a(2)}},e,this,[[1,4]])})),function(e,t){return n.apply(this,arguments)})},{key:"executeRequest",value:(r=h(l().m(function e(t){var r,n,i,o,a,s,u,c,f,d,h;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=t.url,n=t.payload,i=t.options,t.callback,o=Date.now(),e.p=1,a=JSON.stringify(n.body),!i.isFinalHarvest||!navigator.sendBeacon){e.n=3;break}return e.n=2,this.sendWithBeacon(r,a);case 2:return s=e.v,u={success:s,status:s?204:0},this.handleRequestComplete(t,u,o),e.a(2);case 3:return e.n=4,this.fetchWithTimeout(r,{method:"POST",body:a,headers:{"Content-Type":"application/json"},keepalive:i.isFinalHarvest},1e4);case 4:c=e.v,f={success:c.ok,status:c.status,statusText:c.statusText},this.handleRequestComplete(t,f,o),e.n=6;break;case 5:e.p=5,h=e.v,d={success:!1,status:0,error:h.message},this.handleRequestComplete(t,d,o);case 6:return e.a(2)}},e,this,[[1,5]])})),function(e){return r.apply(this,arguments)})},{key:"handleRequestComplete",value:function(e,t){(0,e.callback)({retry:!t.success&&(0===t.status||(0,i.shouldRetry)(t.status)),status:t.status,error:t.error})}},{key:"sendWithBeacon",value:(t=h(l().m(function e(t,r){var n;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.a(2,navigator.sendBeacon(t,r));case 1:return e.p=1,n=e.v,o.default.warn("sendBeacon failed, falling back to fetch:",n.message),e.a(2,!1)}},e,null,[[0,1]])})),function(e,r){return t.apply(this,arguments)})},{key:"fetchWithTimeout",value:(e=h(l().m(function e(t,r,n){var i,o,a,s;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return i=new AbortController,o=setTimeout(function(){return i.abort()},n),e.p=1,e.n=2,fetch(t,u(u({},r),{},{signal:i.signal}));case 2:return a=e.v,clearTimeout(o),e.a(2,a);case 3:if(e.p=3,s=e.v,clearTimeout(o),"AbortError"!==s.name){e.n=4;break}throw new Error("Request timeout after ".concat(n,"ms"));case 4:throw s;case 5:return e.a(2)}},e,null,[[1,3]])})),function(t,r,n){return e.apply(this,arguments)})}]);var e,t,r,n}();t.default=p},51:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)});a.AdPositions={PRE:"pre",MID:"mid",POST:"post"},a.COLLECTOR={US:["bam.nr-data.net","bam-cell.nr-data.net"],EU:"bam.eu01.nr-data.net",Staging:"staging-bam-cell.nr-data.net",GOV:"gov-bam.nr-data.net"},a.VALID_EVENT_TYPES=["VideoAction","VideoAdAction","VideoErrorAction","VideoCustomAction"],a.MAX_PAYLOAD_SIZE=1048576,a.MAX_BEACON_SIZE=61440,a.MAX_EVENTS_PER_BATCH=1e3,a.INTERVAL=1e4,t.default=a},144:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=[{key:"error",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];a(r,e.Levels.ERROR,"darkred")}},{key:"warn",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];a(r,e.Levels.WARNING,"darkorange")}},{key:"notice",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];a([].slice.call(arguments),e.Levels.NOTICE,"darkcyan")}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];a(r,e.Levels.DEBUG,"indigo")}},{key:"debugCommonVideoEvents",value:function(t,r,n){try{if(e.level<=e.Levels.DEBUG){n=n||function(t){e.debug("Event: "+t.type)};var i=["canplay","buffering","waiting","ended","play","playing","pause","resume","error","abort","seek","seeking","seeked","stalled","dispose","loadeddata","loadstart","loadedmetadata"];r&&(null===r[0]?(r.shift(),i=r):i=i.concat(r));for(var o=0;o<i.length;o++)"function"==typeof t?t.call(window,i[o],n):t.on?t.on(i[o],n):t.addEventListener?t.addEventListener(i[o],n):t.addEventHandler?t.addEventHandler(i[o],n):e.warn("debugCommonVideoEvents: No common listener function found for ",t)}}catch(t){e.warn(t)}}}],null&&n(t.prototype,null),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();function a(e,t,r){t=t||o.Levels.NOTICE,r=r||"darkcyan";var n,i,a=o.prefix;o.includeTime&&(a+="["+("0"+(n=new Date).getDate()).slice(-2)+":"+("0"+n.getMinutes()).slice(-2)+":"+("0"+n.getSeconds()).slice(-2)+"."+("00"+n.getMilliseconds()).slice(-3)+"] "),a+=function(e){return u[e]}(t)+":",o.level<=t&&t!==o.Levels.SILENT&&(!o.colorful||"undefined"!=typeof document&&document.documentMode?s(e,a):(i=t===o.Levels.ERROR&&console.error?console.error:t===o.Levels.WARNING&&console.warn?console.warn:t===o.Levels.DEBUG&&console.debug&&null==window.cast?console.debug:console.log,a="%c"+a,e.splice(0,0,a,"color: "+r),i.apply(console,e)))}function s(e,t){if(e instanceof Array)for(var r in e)s(e[r],t);else"string"==typeof e?console.log(t+" "+e):(console.log(t+"↵"),console.log(e))}o.Levels={SILENT:5,ERROR:4,WARNING:3,NOTICE:2,DEBUG:1,ALL:0},o.level=o.Levels.ERROR,o.colorful=!0,o.includeTime=!0,o.prefix="[nrvideo]";var u={4:"e",3:"w",2:"n",1:"d"};!function(){if("undefined"!=typeof window&&window.location&&window.location.search){var e=/\?.*&*nrvideo-debug=(.+)/i.exec(window.location.search);null!==e&&("true"===e[1]?o.level=o.Levels.ALL:o.level=e[1]),null!==/\?.*&*nrvideo-colors=false/i.exec(window.location.search)&&(o.colorful=!1)}}(),t.default=o},302:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=l(r(330)),o=l(r(568)),a=l(r(455)),s=l(r(51)),u=r(487),c=l(r(144));function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var p=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=y(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}(this,t)).customData={},r.heartbeat=null,r.parentTracker=null,r._trackerReadyChrono=new a.default,r._trackerReadyChrono.start(),r._actionTable=s.default.ACTION_TABLE,r._actionAdTable=s.default.ACTION_AD_TABLE,e=e||{},r.setOptions(e),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),r=t,(o=[{key:"setOptions",value:function(e){e&&(e.parentTracker&&(this.parentTracker=e.parentTracker),e.customData&&(this.customData=e.customData),e.heartbeat&&(this.heartbeat=e.heartbeat))}},{key:"dispose",value:function(){this.unregisterListeners()}},{key:"registerListeners",value:function(){}},{key:"unregisterListeners",value:function(){}},{key:"getHeartbeat",value:function(){return this.state._isAd?2e3:this.heartbeat?this.heartbeat:this.parentTracker&&this.parentTracker.heartbeat?this.parentTracker.heartbeat:3e4}},{key:"startHeartbeat",value:function(){this._heartbeatInterval=setInterval(this.sendHeartbeat.bind(this),Math.max(this.getHeartbeat(),2e3))}},{key:"stopHeartbeat",value:function(){this._heartbeatInterval&&clearInterval(this._heartbeatInterval)}},{key:"sendHeartbeat",value:function(e){this.sendVideoAction(t.Events.HEARTBEAT,e)}},{key:"getAttributes",value:function(e,t){for(var r in(e=e||{}).trackerName=this.getTrackerName(),e.trackerVersion=this.getTrackerVersion(),e.coreVersion=i.default.version,e.timeSinceTrackerReady=this._trackerReadyChrono.getDeltaTime(),this.customData)e[r]=this.customData[r];return null!=document.hidden&&(e.isBackgroundEvent=document.hidden),e}},{key:"getTrackerVersion",value:function(){return i.default.version}},{key:"getTrackerName",value:function(){return"base-tracker"}},{key:"sendVideoAction",value:function(e,t){this.emit("VideoAction",e,this.getAttributes(t))}},{key:"sendVideoAdAction",value:function(e,t){this.emit("VideoAdAction",e,this.getAttributes(t))}},{key:"sendVideoErrorAction",value:function(e,t){var r=this.isAd()?"adError":"videoError";this.emit("VideoErrorAction",e,this.getAttributes(t,r))}},{key:"sendVideoCustomAction",value:function(e,t){this.emit("VideoCustomAction",e,this.getAttributes(t,"customAction"))}},{key:"setHarvestInterval",value:function(e){if(u.videoAnalyticsHarvester)try{u.videoAnalyticsHarvester.setHarvestInterval(e)}catch(e){return void c.default.error("Failed to set harvest interval:",e.message)}else c.default.error("VideoAnalyticsHarvester is not available")}}])&&f(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(o.default);p.Events={HEARTBEAT:"HEARTBEAT"},t.default=p},328:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(455)),i=o(r(144));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var f=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.reset(),this._createdAt=Date.now(),this._hb=!0,this._acc=0,this._bufferAcc=0},(t=[{key:"reset",value:function(){this._viewSession=null,this._viewCount=0,this._isAd=!1,this.numberOfErrors=0,this.numberOfAds=0,this.numberOfVideos=0,this.totalPlaytime=0,this.totalAdPlaytime=0,this.isAdBreak=!1,this.initialBufferingHappened=!1,this.resetFlags(),this.resetChronos()}},{key:"resetFlags",value:function(){this.isPlayerReady=!1,this.isRequested=!1,this.isStarted=!1,this.isPaused=!1,this.isSeeking=!1,this.isBuffering=!1,this.isPlaying=!1}},{key:"resetChronos",value:function(){this.timeSinceRequested=new n.default,this.timeSinceStarted=new n.default,this.timeSincePaused=new n.default,this.timeSinceSeekBegin=new n.default,this.timeSinceBufferBegin=new n.default,this.timeSinceAdBreakStart=new n.default,this.timeSinceLastDownload=new n.default,this.timeSinceLastHeartbeat=new n.default,this.timeSinceLastRenditionChange=new n.default,this.timeSinceLastAdQuartile=new n.default,this.timeSinceLastAd=new n.default,this.timeSinceLastError=new n.default,this.timeSinceLastAdError=new n.default,this.timeSinceResumed=new n.default,this.timeSinceSeekEnd=new n.default,this.playtimeSinceLastEvent=new n.default,this.customTimeSinceAttributes={},this.elapsedTime=new n.default,this.bufferElapsedTime=new n.default}},{key:"isAd",value:function(){return this._isAd}},{key:"setIsAd",value:function(e){this._isAd=e}},{key:"setTimeSinceAttribute",value:function(e){this.customTimeSinceAttributes[e]=new n.default,this.customTimeSinceAttributes[e].start()}},{key:"removeTimeSinceAttribute",value:function(e){delete this.customTimeSinceAttributes[e]}},{key:"getViewSession",value:function(){if(!this._viewSession){var e=(new Date).getTime(),t=Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2);this._viewSession=e+"-"+t}return this._viewSession}},{key:"getViewId",value:function(){return this.getViewSession()+"-"+this._viewCount}},{key:"getStateAttributes",value:function(e){e=e||{},this.isAd()?(this.isRequested&&(e.timeSinceAdRequested=this.timeSinceRequested.getDeltaTime(),e.timeSinceLastAdHeartbeat=this.timeSinceLastHeartbeat.getDeltaTime()),this.isStarted&&(e.timeSinceAdStarted=this.timeSinceStarted.getDeltaTime()),this.isPaused&&(e.timeSinceAdPaused=this.timeSincePaused.getDeltaTime()),this.isBuffering&&(e.timeSinceAdBufferBegin=this.timeSinceBufferBegin.getDeltaTime()),this.isSeeking&&(e.timeSinceAdSeekBegin=this.timeSinceSeekBegin.getDeltaTime()),this.isAdBreak&&(e.timeSinceAdBreakBegin=this.timeSinceAdBreakStart.getDeltaTime()),this.numberOfErrors>0&&this.timeSinceLastAdError.startTime>0&&(e.timeSinceLastAdError=this.timeSinceLastAdError.getDeltaTime()),e.numberOfAds=this.numberOfAds):(this.isRequested&&(e.timeSinceRequested=this.timeSinceRequested.getDeltaTime(),e.timeSinceLastHeartbeat=this.timeSinceLastHeartbeat.getDeltaTime()),this.isStarted&&(e.timeSinceStarted=this.timeSinceStarted.getDeltaTime()),this.isPaused&&(e.timeSincePaused=this.timeSincePaused.getDeltaTime()),this.isBuffering&&(e.timeSinceBufferBegin=this.timeSinceBufferBegin.getDeltaTime()),this.isSeeking&&(e.timeSinceSeekBegin=this.timeSinceSeekBegin.getDeltaTime()),e.timeSinceLastAd=this.timeSinceLastAd.getDeltaTime(),this.numberOfErrors>0&&this.timeSinceLastError.startTime>0&&(e.timeSinceLastError=this.timeSinceLastError.getDeltaTime()),e.numberOfVideos=this.numberOfVideos),e.numberOfErrors=this.numberOfErrors,this.isAd()||(this.playtimeSinceLastEvent.startTime>0?e.playtimeSinceLastEvent=this.playtimeSinceLastEvent.getDeltaTime():e.playtimeSinceLastEvent=0,this.isPlaying?this.playtimeSinceLastEvent.start():this.playtimeSinceLastEvent.reset(),this.totalPlaytime+=e.playtimeSinceLastEvent,e.totalPlaytime=this.totalPlaytime);for(var t=0,r=Object.entries(this.customTimeSinceAttributes);t<r.length;t++){var n=s(r[t],2),i=n[0],o=n[1];e[i]=o.getDeltaTime()}return e}},{key:"calculateBufferType",value:function(e){var t;return t=e?"initial":this.isSeeking?"seek":this.isPaused?"pause":"connection",i.default.debug("Buffer Type = "+t),t}},{key:"goViewCountUp",value:function(){this._viewCount++}},{key:"goPlayerReady",value:function(){return!this.isPlayerReady&&(this.isPlayerReady=!0,!0)}},{key:"goRequest",value:function(){return!this.isRequested&&(this.isRequested=!0,this.timeSinceLastAd.reset(),this.timeSinceRequested.start(),!0)}},{key:"goStart",value:function(){return!(!this.isRequested||this.isStarted||(this.isAd()?this.numberOfAds++:this.numberOfVideos++,this.isStarted=!0,this.isPlaying=!0,this.timeSinceStarted.start(),this.playtimeSinceLastEvent.start(),0))}},{key:"goEnd",value:function(){return!!this.isRequested&&(this.numberOfErrors=0,this.resetFlags(),this.timeSinceRequested.stop(),this.timeSinceStarted.stop(),this.playtimeSinceLastEvent.stop(),!0)}},{key:"goPause",value:function(){return!(!this.isStarted||this.isPaused||(this.isPaused=!0,this.isPlaying=!1,this.timeSincePaused.start(),this.playtimeSinceLastEvent.stop(),this.timeSinceResumed.reset(),this.isBuffering&&(this._bufferAcc+=this.bufferElapsedTime.getDeltaTime()),this.elapsedTime.start(),0))}},{key:"goResume",value:function(){return!(!this.isStarted||!this.isPaused||(this.isPaused=!1,this.isPlaying=!0,this.timeSincePaused.stop(),this.timeSinceResumed.start(),this._hb?(this._acc=this.elapsedTime.getDeltaTime(),this._hb=!1):(this.isBuffering&&this.bufferElapsedTime.start(),this._acc+=this.elapsedTime.getDeltaTime()),0))}},{key:"goBufferStart",value:function(){return!(!this.isRequested||this.isBuffering||(this.isBuffering=!0,this.isPlaying=!1,this.timeSinceBufferBegin.start(),this.bufferElapsedTime.start(),0))}},{key:"goBufferEnd",value:function(){return!(!this.isRequested||!this.isBuffering||(this.isBuffering=!1,this.isPlaying=!0,this.timeSinceBufferBegin.stop(),this._hb?(this._bufferAcc=this.bufferElapsedTime.getDeltaTime(),this._hb=!1):this._bufferAcc+=this.bufferElapsedTime.getDeltaTime(),0))}},{key:"goSeekStart",value:function(){return!(!this.isStarted||this.isSeeking||(this.isSeeking=!0,this.isPlaying=!1,this.timeSinceSeekBegin.start(),this.timeSinceSeekEnd.reset(),0))}},{key:"goSeekEnd",value:function(){return!(!this.isStarted||!this.isSeeking||(this.isSeeking=!1,this.isPlaying=!0,this.timeSinceSeekBegin.stop(),this.timeSinceSeekEnd.start(),0))}},{key:"goAdBreakStart",value:function(){return!this.isAdBreak&&(this.isAdBreak=!0,this.timeSinceAdBreakStart.start(),!0)}},{key:"goAdBreakEnd",value:function(){return!!this.isAdBreak&&(this.isRequested=!1,this.isAdBreak=!1,this.totalAdPlaytime=this.timeSinceAdBreakStart.getDeltaTime(),this.timeSinceAdBreakStart.stop(),!0)}},{key:"goDownload",value:function(){this.timeSinceLastDownload.start()}},{key:"goHeartbeat",value:function(){this.timeSinceLastHeartbeat.start()}},{key:"goRenditionChange",value:function(){this.timeSinceLastRenditionChange.start()}},{key:"goAdQuartile",value:function(){this.timeSinceLastAdQuartile.start()}},{key:"goError",value:function(){this.isError=!0,this.numberOfErrors++,this.isAd()?this.timeSinceLastAdError.start():this.timeSinceLastError.start()}},{key:"goLastAd",value:function(){this.timeSinceLastAd.start()}}])&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.default=f},330:e=>{e.exports=JSON.parse('{"name":"@newrelic/video-core","version":"4.0.1","description":"New Relic video tracking core library","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","scripts":{"build":"webpack --mode production","build:dev":"webpack --mode development","watch":"webpack --mode production --progress --color --watch","watch:dev":"webpack --progress --color --watch","clean":"rm -rf dist coverage doc","test":"nyc --reporter=html --reporter=text mocha --require @babel/register","doc":"jsdoc -c jsdoc.json -d documentation","deploy":"node scripts/deploy.js","third-party-updates":"oss third-party manifest --includeOptDeps && oss third-party notices --includeOptDeps && git add THIRD_PARTY_NOTICES.md third_party_manifest.json"},"repository":{"type":"git","url":"https://github.com/newrelic/video-core-js"},"author":"Jordi Aguilar","contributors":["Andreu Santarén Llop","Malay Chandan","Bharat Sarsawat"],"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.24.5","@babel/plugin-transform-modules-commonjs":"^7.24.1","@newrelic/newrelic-oss-cli":"^0.1.2","@babel/preset-env":"^7.24.5","@babel/register":"^7.24.6","aws-sdk":"^2.920.0","babel-loader":"^9.1.3","chai":"^4.3.4","diff":"^5.0.0","jsdom":"^25.0.1","mocha":"^10.4.0","nyc":"^15.1.0","sinon":"^2.4.1","webpack":"^5.91.0","webpack-cli":"^4.9.2"},"files":["THIRD_PARTY_NOTICES.md","dist","src","CHANGELOG.md","LICENSE","README.md","src","!test"],"publishConfig":{"access":"public"}}')},347:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildUrl=function(e){try{if(!window.NRVIDEO||!window.NRVIDEO.info)throw new Error("NRVIDEO info is not available.");var t=window.NRVIDEO.info,r=t.beacon,i=t.licenseKey,o=t.applicationID;if(!r||!i)throw new Error("Options object provided by New Relic is not correctly initialized");return o?"https://".concat(e||r,"/ins/1/").concat(i,"?a=").concat(o,"&v=").concat(n.default.version,"&ref=").concat(window.location.href,"&ca=VA"):"https://".concat(e||r,"/ins/1/").concat(i,"?&v=").concat(n.default.version,"&ref=").concat(window.location.href,"&ca=VA")}catch(e){return console.error(e.message),null}},t.compressPayload=function(e){var t=JSON.stringify(e),r=new Blob([t]).stream(),n=new CompressionStream("gzip"),i=r.pipeThrough(n);return new Response(i).blob()},t.dataSize=function(e){if("string"==typeof e&&e.length)return e.length;if("object"===c(e)){if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer&&e.byteLength)return e.byteLength;if("undefined"!=typeof Blob&&e instanceof Blob&&e.size)return e.size;if(!("undefined"!=typeof FormData&&e instanceof FormData))try{return function(e){try{var t;return null!==(t=JSON.stringify(e,l()))&&void 0!==t?t:""}catch(e){return i.default.error("Error stringifying value:",e.message),""}}(e).length}catch(e){return}}},t.decompressPayload=function(e){return f.apply(this,arguments)},t.shouldRetry=function(e){switch(e){case 408:case 429:case 500:return!0;case 401:case 403:case 404:return!1}return e>=502&&e<=504||e>=512&&e<=530};var n=o(r(330)),i=o(r(144));function o(e){return e&&e.__esModule?e:{default:e}}function a(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var a=n&&n.prototype instanceof c?n:c,l=Object.create(a.prototype);return s(l,"_invoke",function(r,n,i){var o,a,s,c=0,l=i||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,a=0,s=e,d.n=r,u}};function h(r,n){for(a=r,s=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=d.p,y=o[2];r>3?(i=y===n)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(a=0,d.v=n,d.n=o[1]):h<y&&(i=r<3||o[0]>n||n>y)&&(o[4]=r,o[5]=n,d.n=y,a=0))}if(i||r>1)return u;throw f=!0,n}return function(i,l,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,y),a=l,s=y;(t=a<2?e:s)||!f;){o||(a?a<3?(a>1&&(d.n=-1),h(a,s)):d.n=s:d.v=s);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==u)break}catch(t){o=e,a=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,i,o),!0),l}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(s(t={},n,function(){return this}),t),h=f.prototype=c.prototype=Object.create(d);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e}return l.prototype=f,s(h,"constructor",f),s(f,"constructor",l),l.displayName="GeneratorFunction",s(f,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,n,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:y}})()}function s(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}s=function(e,t,r,n){function o(t,r){s(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},s(e,t,r,n)}function u(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var l=function(){var e=new WeakSet;return function(t,r){if("object"===c(r)&&null!==r){if(e.has(r))return;e.add(r)}return r}};function f(){var e;return e=a().m(function e(t){var r,n,i,o,s,u;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(t instanceof Blob)){e.n=1;break}r=t.stream(),e.n=4;break;case 1:if(!(t instanceof ArrayBuffer)){e.n=2;break}r=new Blob([t]).stream(),e.n=4;break;case 2:if(!(t instanceof Uint8Array)){e.n=3;break}r=new Blob([t]).stream(),e.n=4;break;case 3:throw new Error("Unsupported compressed data type");case 4:return n=new DecompressionStream("gzip"),i=r.pipeThrough(n),o=new Response(i),e.n=5,o.text();case 5:return s=e.v,e.a(2,JSON.parse(s));case 6:throw e.p=6,u=e.v,new Error("Failed to decompress payload: ".concat(u.message));case 7:return e.a(2)}},e,null,[[0,6]])}),f=function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,s,"next",e)}function s(e){u(o,n,i,a,s,"throw",e)}a(void 0)})},f.apply(this,arguments)}},374:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HarvestScheduler=void 0;var n=r(431),i=r(413),o=r(28),a=r(347),s=c(r(51)),u=c(r(144));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return m(c,"_invoke",function(r,n,i){var o,s,u,c=0,l=i||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,u=e,d.n=r,a}};function h(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=d.p,y=o[2];r>3?(i=y===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(s=0,d.v=n,d.n=o[1]):h<y&&(i=r<3||o[0]>n||n>y)&&(o[4]=r,o[5]=n,d.n=y,s=0))}if(i||r>1)return a;throw f=!0,n}return function(i,l,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,y),s=l,u=y;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=d.n<0)?u:r.call(n,d))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,o),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(m(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(l);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,m(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,m(f,"constructor",c),m(c,"constructor",u),u.displayName="GeneratorFunction",m(c,i,"GeneratorFunction"),m(f),m(f,i,"Generator"),m(f,n,function(){return this}),m(f,"toString",function(){return"[object Generator]"}),(p=function(){return{w:o,m:d}})()}function m(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}m=function(e,t,r,n){function o(t,r){m(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},m(e,t,r,n)}function b(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function g(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){b(o,n,i,a,s,"next",e)}function s(e){b(o,n,i,a,s,"throw",e)}a(void 0)})}}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function E(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}t.HarvestScheduler=function(){return e=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.eventBuffer=t,this.retryQueueHandler=new i.RetryQueueHandler,this.httpClient=new o.OptimizedHttpClient,this.fallBackUrl="",this.retryCount=0,this.eventBuffer instanceof n.NrVideoEventAggregator&&this.eventBuffer.setSmartHarvestCallback(function(e,t){return r.triggerSmartHarvest(e,t)}),this.isStarted=!1,this.currentTimerId=null,this.harvestCycle=s.default.INTERVAL,this.isHarvesting=!1,this.setupPageLifecycleHandlers()},t=[{key:"startScheduler",value:function(){this.isStarted?u.default.warn("Harvest scheduler is already started"):(this.isStarted=!0,u.default.notice("Starting harvest scheduler",{harvestCycle:this.harvestCycle,eventBufferSize:this.eventBuffer?this.eventBuffer.size():0}),this.scheduleNextHarvest())}},{key:"stopScheduler",value:function(){this.isStarted&&(this.isStarted=!1,this.currentTimerId&&(clearTimeout(this.currentTimerId),this.currentTimerId=null),u.default.notice("Harvest scheduler stopped"))}},{key:"triggerSmartHarvest",value:(f=g(p().m(function e(t,r){var n;return p().w(function(e){for(;;)switch(e.p=e.n){case 0:if(u.default.notice("".concat(t," harvest triggered at ").concat(r,"% threshold"),{type:t,threshold:r}),this.eventBuffer&&!this.eventBuffer.isEmpty()){e.n=1;break}return e.a(2);case 1:return this.currentTimerId&&(clearTimeout(this.currentTimerId),this.currentTimerId=null),e.p=2,e.n=3,this.triggerHarvest({});case 3:e.n=5;break;case 4:e.p=4,n=e.v,u.default.error("".concat(t," harvest failed:"),n.message);case 5:return e.p=5,this.isStarted&&this.scheduleNextHarvest(),e.f(5);case 6:return e.a(2)}},e,this,[[2,4,5,6]])})),function(e,t){return f.apply(this,arguments)})},{key:"scheduleNextHarvest",value:function(){var e=this;if(this.isStarted){var t=this.harvestCycle;this.currentTimerId=setTimeout(function(){return e.onHarvestInterval()},t)}}},{key:"onHarvestInterval",value:(l=g(p().m(function e(){var t,r,n;return p().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,t=this.eventBuffer&&!this.eventBuffer.isEmpty(),r=this.retryQueueHandler&&this.retryQueueHandler.getQueueSize()>0,t||r){e.n=1;break}return e.a(2);case 1:return e.n=2,this.triggerHarvest({});case 2:e.n=4;break;case 3:e.p=3,n=e.v,u.default.error("Error during scheduled harvest:",n.message);case 4:return e.p=4,this.scheduleNextHarvest(),e.f(4);case 5:return e.a(2)}},e,this,[[0,3,4,5]])})),function(){return l.apply(this,arguments)})},{key:"triggerHarvest",value:(c=g(p().m(function e(){var t,r,n,i,o,c=arguments;return p().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:{},!this.isHarvesting){e.n=1;break}return e.a(2,{success:!1,reason:"harvest_in_progress"});case 1:return this.isHarvesting=!0,e.p=2,r=this.drainEvents(t),t.isFinalHarvest&&(n=s.default.MAX_BEACON_SIZE,(0,a.dataSize)(r)>n&&(r=this.trimEventsToFit(r,n))),e.n=3,this.sendChunk(r,t,!0);case 3:return i=e.v,e.a(2,{success:i.success,totalChunks:1,results:[i]});case 4:return e.p=4,o=e.v,u.default.error("Harvest cycle failed:",o.message),this.handleHarvestFailure(o),e.a(2,{success:!1,error:o.message,consecutiveFailures:this.consecutiveFailures});case 5:return e.p=5,this.isHarvesting=!1,e.f(5);case 6:return e.a(2)}},e,this,[[2,4,5,6]])})),function(){return c.apply(this,arguments)})},{key:"trimEventsToFit",value:function(e,t){if(0===e.length)return e;for(var r=[],n=0,i=e.length-1;i>=0;i--){var o=e[i],s=(0,a.dataSize)({ins:[o].concat(r)});s>t||(r.unshift(o),n=s)}var c=e.length-r.length;if(c>0){var l=e.slice(0,c);u.default.warn("Discarded ".concat(c," events to fit beacon size limit"),{originalCount:e.length,trimmedCount:r.length,finalSize:n,maxSize:t}),this.retryQueueHandler&&this.retryQueueHandler.addFailedEvents(l)}return r}},{key:"drainEvents",value:function(){var e=this.eventBuffer.drain(),t=y(e),r=(0,a.dataSize)(e);if(this.retryQueueHandler&&this.retryQueueHandler.getQueueSize()>0){var n=s.default.MAX_PAYLOAD_SIZE-r,i=s.default.MAX_EVENTS_PER_BATCH-t.length;if(n>0&&i>0){var o=this.retryQueueHandler.getRetryEventsToFit(n,i);o.length>0&&(t=[].concat(y(o),y(t)))}}return t}},{key:"sendChunk",value:(r=g(p().m(function e(t,r,n){var i,o,s=this;return p().w(function(e){for(;;)if(0===e.n)return i=(0,a.buildUrl)(this.fallBackUrl),o={url:i,payload:{body:{ins:t}},options:d(d({},r),{},{isLastChunk:n})},e.a(2,new Promise(function(e){s.httpClient.send(o,function(r){r.retry?s.handleRequestFailure(t):(s.retryCount=0,s.fallBackUrl=""),e({success:!r.retry,status:r.status,error:r.error,chunk:t,eventCount:t.length})})}))},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"handleRequestFailure",value:function(e){var t;this.retryQueueHandler.addFailedEvents(e),"US"===(null===(t=window.NRVIDEO)||void 0===t||null===(t=t.info)||void 0===t?void 0:t.region)&&(this.retryCount++,this.retryCount>5?(this.retryCount=0,this.fallBackUrl=""):this.retryCount>=2&&(this.fallBackUrl=s.default.COLLECTOR.US[1]))}},{key:"handleHarvestFailure",value:function(e){this.consecutiveFailures++,u.default.warn("Harvest failure handled",{error:e.message,consecutiveFailures:this.consecutiveFailures})}},{key:"updateHarvestInterval",value:function(e){"number"!=typeof e&&isNaN(e)?u.default.warn("Invalid newInterval provided to updateHarvestInterval"):e<1e3||e>3e5?u.default.warn("newInterval out of bounds (1000-300000), ignoring"):this.harvestCycle!==e&&(this.harvestCycle=e,u.default.notice("Updated harvestCycle:",this.harvestCycle),this.currentTimerId&&(clearTimeout(this.currentTimerId),this.currentTimerId=null),this.isStarted&&this.scheduleNextHarvest())}},{key:"setupPageLifecycleHandlers",value:function(){var e=this,t=!1,r=function(){t||(t=!0,e.triggerHarvest({isFinalHarvest:!0,force:!0}))};document.addEventListener("visibilitychange",function(){document.hidden&&r()}),window.addEventListener("pagehide",function(){r()}),window.addEventListener("beforeunload",function(){r()})}}],t&&S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,c,l,f}()},399:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(144))&&n.__esModule?n:{default:n},o=r(449),a=r(659);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof s?n:s,l=Object.create(u.prototype);return c(l,"_invoke",function(r,n,i){var o,s,u,c=0,l=i||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return o=t,s=0,u=e,d.n=r,a}};function h(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=d.p,y=o[2];r>3?(i=y===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(s=0,d.v=n,d.n=o[1]):h<y&&(i=r<3||o[0]>n||n>y)&&(o[4]=r,o[5]=n,d.n=y,s=0))}if(i||r>1)return a;throw f=!0,n}return function(i,l,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,y),s=l,u=y;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=d.n<0)?u:r.call(n,d))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,o),!0),l}var a={};function s(){}function l(){}function f(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(c(t={},n,function(){return this}),t),h=f.prototype=s.prototype=Object.create(d);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e}return l.prototype=f,c(h,"constructor",f),c(f,"constructor",l),l.displayName="GeneratorFunction",c(f,i,"GeneratorFunction"),c(h),c(h,i,"Generator"),c(h,n,function(){return this}),c(h,"toString",function(){return"[object Generator]"}),(u=function(){return{w:o,m:y}})()}function c(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}c=function(e,t,r,n){function o(t,r){c(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},c(e,t,r,n)}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function v(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}var p=function(){return function(e,t,r){return r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},0,[{key:"addTracker",value:function(e,t){null!=t&&t.info&&(0,a.setVideoConfig)(t.info),e.on&&e.emit?(m.push(e),e.on("*",b),"function"==typeof e.trackerInit&&e.trackerInit()):i.default.error("Tried to load a non-tracker.",e)}},{key:"removeTracker",value:function(e){e.off("*",b),e.dispose();var t=m.indexOf(e);-1!==t&&m.splice(t,1)}},{key:"getTrackers",value:function(){return m}},{key:"send",value:function(e,t,r){var n=d({actionName:t},r);return(0,o.recordEvent)(e,n)}},{key:"sendError",value:function(e){return(0,o.recordEvent)("VideoErrorAction",d({actionName:"ERROR"},e))}},{key:"forceHarvest",value:(e=u().m(function e(){var t,n,o;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,t=r(487),n=t.videoAnalyticsHarvester,e.n=1,n.forceHarvest();case 1:return e.a(2,e.v);case 2:return e.p=2,o=e.v,i.default.error("Failed to force harvest:",o.message),e.a(2,{success:!1,error:o.message})}},e,null,[[0,2]])}),t=function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)})},function(){return t.apply(this,arguments)})}]);var e,t}(),m=[];function b(e){try{var t=function(e){var t={};for(var r in e)null!==e[r]&&void 0!==e[r]&&(t[r]=e[r]);return t}(e.data);i.default.level<=i.default.Levels.DEBUG?i.default.notice("Sent",e.type,t):i.default.notice("Sent",e.type),p.send(e.eventType,e.type,t)}catch(e){i.default.error("Error in event handler:",e.message)}}t.default=p},413:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RetryQueueHandler=void 0;var n=a(r(144)),i=r(347),o=a(r(51));function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}var y=o.default.MAX_PAYLOAD_SIZE,v=o.default.MAX_EVENTS_PER_BATCH,p=t.RetryQueueHandler=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.retryQueue=[],this.maxQueueSize=v,this.maxQueueSizeBytes=y},(t=[{key:"addFailedEvents",value:function(e){try{var t=Array.isArray(e)?e:[e];n.default.notice("Adding ".concat(t.length," failed events to retry queue"),{queueSizeBefore:this.retryQueue.length});var r,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;this.retryQueue.length>=this.maxQueueSize&&this.evictOldestEvent();for(var s=(0,i.dataSize)(a);(0,i.dataSize)(this.retryQueue)+s>this.maxQueueSizeBytes;)this.evictOldestEvent();this.retryQueue.push(c({},a))}}catch(e){o.e(e)}finally{o.f()}}catch(e){n.default.error("Failed to add events to retry queue:",e.message)}}},{key:"discardEvent",value:function(e,t){n.default.warn("Discarded event",{reason:t,eventType:e.eventType})}},{key:"evictOldestEvent",value:function(){if(this.retryQueue.length>0){var e=this.retryQueue.shift();this.discardEvent(e,"Queue full - evicted oldest")}}},{key:"getRetryEventsToFit",value:function(e,t){for(var r=[],n=0,o=0,a=this.retryQueue.length-1;a>=0;a--){var s=this.retryQueue[a];if(o>=t)break;var u=(0,i.dataSize)(s);if(n+u>e)break;r.unshift(s),n+=u,o++,this.retryQueue.splice(a,1)}return r}},{key:"getQueueSize",value:function(){return this.retryQueue.length}},{key:"clear",value:function(){this.retryQueue=[]}}])&&d(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.default=p},431:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NrVideoEventAggregator=void 0;var n=a(r(144)),i=a(r(51)),o=r(347);function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}var l=i.default.MAX_PAYLOAD_SIZE,f=i.default.MAX_EVENTS_PER_BATCH,d=t.NrVideoEventAggregator=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.buffer=[],this.maxPayloadSize=l,this.maxEventsPerBatch=f,this.currentPayloadSize=0,this.totalEvents=0,this.smartHarvestPayloadThreshold=Math.floor(.6*this.maxPayloadSize),this.overflowPayloadThreshold=Math.floor(.9*this.maxPayloadSize),this.smartHarvestEventThreshold=Math.floor(.6*this.maxEventsPerBatch),this.overflowEventThreshold=Math.floor(.9*this.maxEventsPerBatch),this.onSmartHarvestTrigger=null},(t=[{key:"add",value:function(e){try{var t=(0,o.dataSize)(e),r=this.currentPayloadSize+t>=this.maxPayloadSize,i=this.totalEvents+1>=this.maxEventsPerBatch;return(r||i)&&this.makeRoom(t),this.buffer.push(e),this.totalEvents++,this.currentPayloadSize+=t,this.checkSmartHarvestTrigger(),!0}catch(e){return n.default.error("Failed to add event to buffer:",e.message),!1}}},{key:"checkSmartHarvestTrigger",value:function(){var e=this.currentPayloadSize/this.maxPayloadSize,t=this.totalEvents/this.maxEventsPerBatch,r=this.currentPayloadSize>=this.overflowPayloadThreshold,i=this.totalEvents>=this.overflowEventThreshold;if(r||i){var o=r?"payload ".concat(this.currentPayloadSize,"/").concat(this.maxPayloadSize," bytes (").concat(Math.round(100*e),"%)"):"events ".concat(this.totalEvents,"/").concat(this.maxEventsPerBatch," (").concat(Math.round(100*t),"%)");n.default.warn("OVERFLOW PREVENTION: ".concat(o," - Emergency harvest triggered")),this.onSmartHarvestTrigger&&"function"==typeof this.onSmartHarvestTrigger&&this.onSmartHarvestTrigger("overflow",90)}else{var a=this.currentPayloadSize>=this.smartHarvestPayloadThreshold,s=this.totalEvents>=this.smartHarvestEventThreshold;(a||s)&&this.onSmartHarvestTrigger&&"function"==typeof this.onSmartHarvestTrigger&&this.onSmartHarvestTrigger("smart",60)}}},{key:"setSmartHarvestCallback",value:function(e){this.onSmartHarvestTrigger=e}},{key:"drain",value:function(){try{var e=this.buffer.splice(0);return this.totalEvents=0,this.currentPayloadSize=0,e}catch(e){return n.default.error("Failed to drain events from buffer:",e.message),[]}}},{key:"isEmpty",value:function(){return 0===this.totalEvents}},{key:"size",value:function(){return this.totalEvents}},{key:"clear",value:function(){this.buffer=[],this.totalEvents=0}},{key:"makeRoom",value:function(e){if(e>this.maxPayloadSize)n.default.error("Event dropped: Event size exceeds maximum payload size.");else for(;(this.totalEvents>=this.maxEventsPerBatch||this.currentPayloadSize+e>=this.maxPayloadSize)&&this.buffer.length>0;){var t=this.buffer.shift(),r=(0,o.dataSize)(t);this.totalEvents--,this.currentPayloadSize-=r,n.default.warn("Event buffer full, oldest event removed.")}}}])&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.default=d},449:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.recordEvent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var r;if(!i.default.VALID_EVENT_TYPES.includes(e))return o.default.warn("Invalid event type provided to recordEvent",{eventType:e}),!1;if(null===(r=window)||void 0===r||null===(r=r.NRVIDEO)||void 0===r||!r.info)return;var a=window.NRVIDEO.info,s=a.appName,u=a.applicationID,l=c(c(c({},t),{},{eventType:e},u?{}:{appName:s}),{},{timestamp:Date.now(),timeSinceLoad:window.performance?window.performance.now()/1e3:null});return n.videoAnalyticsHarvester.addEvent(l)}catch(e){return o.default.error("Failed to record event:",e.message),!1}};var n=r(487),i=a(r(51)),o=a(r(144));function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t,r){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},455:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.reset()}return t=e,(r=[{key:"reset",value:function(){this.startTime=0,this.stopTime=0,this.offset=0}},{key:"getDeltaTime",value:function(){return this.startTime?this.offset+((new Date).getTime()-this.startTime):null}},{key:"start",value:function(){this.startTime=(new Date).getTime(),this.stopTime=0}},{key:"stop",value:function(){return this.stopTime=(new Date).getTime(),this.getDeltaTime()}},{key:"clone",value:function(){var t=new e;return t.startTime=this.startTime,t.stopTime=this.stopTime,t.offset=this.offset,t}}])&&n(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();t.default=o},487:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.videoAnalyticsHarvester=void 0;var n,i=r(374),o=r(431),a=(n=r(144))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}var l=function(){return function(e,t){return t&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isInitialized=!1,this.harvestScheduler=null,this.eventBuffer=null},[{key:"initialize",value:function(){if(this.isInitialized)a.default.warn("Video analytics agent already initialized");else try{this.eventBuffer=new o.NrVideoEventAggregator,this.harvestScheduler=new i.HarvestScheduler(this.eventBuffer),this.harvestScheduler.startScheduler(),this.isInitialized=!0,a.default.notice("Video analytics agent initialized successfully")}catch(e){a.default.error("Failed to initialize video analytics agent:",e.message)}}},{key:"addEvent",value:function(e){this.isInitialized||(a.default.warn("Video analytics agent not initialized, initializing now"),this.initialize());try{return this.eventBuffer.add(e)}catch(e){return a.default.error("Failed to add event to harvesting system:",e.message),!1}}},{key:"setHarvestInterval",value:function(e){this.isInitialized||this.initialize(),this.harvestScheduler.updateHarvestInterval(e)}}])}(),f=new l;t.videoAnalyticsHarvester=f},568:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"on",value:function(e,t){if(this._listeners=this._listeners||{},"function"==typeof t)return this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t),this}},{key:"off",value:function(e,t){if(this._listeners=this._listeners||{},this._listeners[e]){var r=this._listeners[e].indexOf(t);-1!==r&&this._listeners[e].splice(r,1)}return this}},{key:"emit",value:function(e,t,r){var n=this;return this._listeners=this._listeners||{},r=r||{},Array.isArray(this._listeners[t])&&this._listeners[t].forEach(function(i){i.call(n,{eventType:e,type:t,data:r,target:n})}),Array.isArray(this._listeners["*"])&&this._listeners["*"].forEach(function(i){i.call(n,{eventType:e,type:t,data:r,target:n})}),this}}])&&n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.default=o},659:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.setVideoConfig=function(e){return y.setConfiguration(e)},t.videoConfiguration=void 0;var n=o(r(144)),i=o(r(51));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function f(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var d=i.default.COLLECTOR,h=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"setConfiguration",value:function(e){return this.initializeGlobalConfig(e),n.default.notice("Video analytics configuration initialized successfully"),!0}},{key:"validateRequiredFields",value:function(e){if(!e||"object"!==c(e))return n.default.error("Configuration must be an object"),!1;var t=e.licenseKey,r=e.appName,i=e.region,o=e.applicationID,a=e.beacon;if(!t)return n.default.error("licenseKey is required"),!1;if(o){if(!a)return n.default.error("beacon is required when applicationID is provided"),!1;if(!Object.values(d).flatMap(function(e){return e}).includes(a))return n.default.error("Invalid beacon: ".concat(a)),!1}else{if(!r||!i)return n.default.error("appName and region are required when applicationID is not provided"),!1;if(!d[i])return n.default.error("Invalid region: ".concat(i,". Valid regions are: ").concat(Object.keys(d).join(", "))),!1}return!0}},{key:"initializeGlobalConfig",value:function(e){if(this.validateRequiredFields(e)){var t=e.licenseKey,r=e.appName,n=e.region,o=e.beacon,a=e.applicationID;o="US"===n?i.default.COLLECTOR.US[0]:o||d[n],window.NRVIDEO={info:s(s({},n?{region:n}:{}),{},{beacon:o,licenseKey:t,applicationID:a},a?{}:{appName:r})}}}}])&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),y=t.videoConfiguration=new h;t.default=h},793:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=u(r(144)),o=u(r(302)),a=u(r(328)),s=u(r(330));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function f(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var m=function(e){function t(e,r){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,r){return t=v(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,r||[],v(e).constructor):t.apply(e,r))}(this,t)).state=new a.default,o.adsTracker=null,o._lastBufferType=null,o._userId=null,r=r||{},o.setOptions(r),e&&o.setPlayer(e,r.tag),i.default.notice("Tracker "+o.getTrackerName()+" v"+o.getTrackerVersion()+" is ready."),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,u=[{key:"setUserId",value:function(e){this._userId=e}},{key:"setOptions",value:function(e){e&&(e.adsTracker&&this.setAdsTracker(e.adsTracker),"boolean"==typeof e.isAd&&this.setIsAd(e.isAd),o.default.prototype.setOptions.apply(this,arguments))}},{key:"setPlayer",value:function(e,t){(this.player||this.tag)&&this.dispose(),"undefined"!=typeof document&&document.getElementById&&("string"==typeof e&&(e=document.getElementById(e)),"string"==typeof t&&(t=document.getElementById(t))),t=t||e,this.player=e,this.tag=t,this.registerListeners()}},{key:"isAd",value:function(){return this.state.isAd()}},{key:"setIsAd",value:function(e){this.state.setIsAd(e)}},{key:"setAdsTracker",value:function(e){this.disposeAdsTracker(),e&&(this.adsTracker=e,this.adsTracker.setIsAd(!0),this.adsTracker.parentTracker=this,this.adsTracker.on("*",b.bind(this)))}},{key:"disposeAdsTracker",value:function(){this.adsTracker&&(this.adsTracker.off("*",b),this.adsTracker.dispose())}},{key:"dispose",value:function(){this.stopHeartbeat(),this.disposeAdsTracker(),this.unregisterListeners(),this.player=null,this.tag=null}},{key:"registerListeners",value:function(){}},{key:"unregisterListeners",value:function(){}},{key:"getViewId",value:function(){return this.parentTracker?this.parentTracker.getViewId():this.state.getViewId()}},{key:"getViewSession",value:function(){return this.parentTracker?this.parentTracker.getViewSession():this.state.getViewSession()}},{key:"getVideoId",value:function(){return null}},{key:"getTitle",value:function(){return null}},{key:"isLive",value:function(){return null}},{key:"getBitrate",value:function(){return null}},{key:"getWebkitBitrate",value:function(){if(this.tag&&this.tag.webkitVideoDecodedByteCount){var e;if(this._lastWebkitBitrate){var t=(e=this.tag.webkitVideoDecodedByteCount)-this._lastWebkitBitrate,r=this.getHeartbeat()/1e3;e=Math.round(t/r*8)}return this._lastWebkitBitrate=this.tag.webkitVideoDecodedByteCount,e||null}}},{key:"getRenditionName",value:function(){return null}},{key:"getRenditionBitrate",value:function(){return null}},{key:"getRenditionShift",value:function(e){var t,r=this.getRenditionBitrate();return this.isAd()?(t=this._lastAdRendition,e&&(this._lastAdRendition=r)):(t=this._lastRendition,e&&(this._lastRendition=r)),r&&t?r>t?"up":r<t?"down":null:null}},{key:"getRenditionHeight",value:function(){return this.tag?this.tag.videoHeight:null}},{key:"getRenditionWidth",value:function(){return this.tag?this.tag.videoWidth:null}},{key:"getDuration",value:function(){return this.tag?this.tag.duration:null}},{key:"getPlayhead",value:function(){return this.tag?this.tag.currentTime:null}},{key:"getLanguage",value:function(){return null}},{key:"getSrc",value:function(){return this.tag?this.tag.currentSrc:null}},{key:"getPlayrate",value:function(){return this.tag?this.tag.playbackRate:null}},{key:"isMuted",value:function(){return this.tag?this.tag.muted:null}},{key:"isFullscreen",value:function(){return null}},{key:"getCdn",value:function(){return null}},{key:"getPlayerName",value:function(){return this.getTrackerName()}},{key:"getPlayerVersion",value:function(){return s.default.version}},{key:"getFps",value:function(){return null}},{key:"isAutoplayed",value:function(){return this.tag?this.tag.autoplay:null}},{key:"getPreload",value:function(){return this.tag?this.tag.preload:null}},{key:"getAdQuartile",value:function(){return null}},{key:"getAdPosition",value:function(){return this.parentTracker?this.parentTracker.state.isStarted?"mid":"pre":null}},{key:"getAdPartner",value:function(){return null}},{key:"getAdCreativeId",value:function(){return null}},{key:"getInstrumentationProvider",value:function(){return null}},{key:"getInstrumentationName",value:function(){return null}},{key:"getInstrumentationVersion",value:function(){return null}},{key:"getAttributes",value:function(e,t){if(void 0===(e=o.default.prototype.getAttributes.apply(this,arguments)).isAd&&(e.isAd=this.isAd()),e.viewSession=this.getViewSession(),e.viewId=this.getViewId(),e.playerName=this.getPlayerName(),e.playerVersion=this.getPlayerVersion(),e["instrumentation.provider"]=this.getInstrumentationProvider(),e["instrumentation.name"]=this.getInstrumentationName(),e["instrumentation.version"]=this.getInstrumentationVersion(),e["enduser.id"]=this._userId,e.src="Browser","customAction"===t)return e;try{e.pageUrl=window.location.href}catch(e){}for(var r in this.isAd()?(e.adId=this.getVideoId(),e.adTitle=this.getTitle(),e.adSrc=this.getSrc(),e.adCdn=this.getCdn(),e.adBitrate=this.getBitrate()||this.getWebkitBitrate()||this.getRenditionBitrate(),e.adRenditionName=this.getRenditionName(),e.adRenditionBitrate=this.getRenditionBitrate(),e.adRenditionHeight=this.getRenditionHeight(),e.adRenditionWidth=this.getRenditionWidth(),e.adDuration=this.getDuration(),e.adPlayhead=this.getPlayhead(),e.adLanguage=this.getLanguage(),e.adIsMuted=this.isMuted(),e.adFps=this.getFps(),e.adPosition=this.getAdPosition(),e.adCreativeId=this.getAdCreativeId(),e.adPartner=this.getAdPartner()):(e.contentId=this.getVideoId(),e.contentTitle=this.getTitle(),e.contentSrc=this.getSrc(),e.contentCdn=this.getCdn(),e.contentPlayhead=this.getPlayhead(),e.contentIsLive=this.isLive(),e.contentBitrate=this.getBitrate()||this.getWebkitBitrate()||this.getRenditionBitrate(),e.contentRenditionName=this.getRenditionName(),e.contentRenditionBitrate=this.getRenditionBitrate(),e.contentRenditionHeight=this.getRenditionHeight(),e.contentRenditionWidth=this.getRenditionWidth(),e.contentDuration=this.getDuration(),e.contentLanguage=this.getLanguage(),e.contentPlayrate=this.getPlayrate(),e.contentIsFullscreen=this.isFullscreen(),e.contentIsMuted=this.isMuted(),e.contentIsAutoplayed=this.isAutoplayed(),e.contentPreload=this.getPreload(),e.contentFps=this.getFps(),null!=this.adsTracker&&this.adsTracker.state.totalAdPlaytime>0&&(e.totalAdPlaytime=this.adsTracker.state.totalAdPlaytime)),this.state.getStateAttributes(e),this.customData)e[r]=this.customData[r];return e}},{key:"sendCustom",value:function(e,t,r){r=r||{},this.sendVideoCustomAction(e,r),this.state.setTimeSinceAttribute(t)}},{key:"sendPlayerReady",value:function(e){this.state.goPlayerReady()&&(e=e||{},this.sendVideoAction(t.Events.PLAYER_READY,e))}},{key:"sendRequest",value:function(e){var r;this.state.goRequest()&&(this.isAd()?(r=t.Events.AD_REQUEST,this.sendVideoAdAction(r,e)):(r=t.Events.CONTENT_REQUEST,this.sendVideoAction(r,e)))}},{key:"sendStart",value:function(e){var r;this.state.goStart()&&(this.isAd()?(r=t.Events.AD_START,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(r,e)):(r=t.Events.CONTENT_START,this.sendVideoAction(r,e)),this.startHeartbeat(),this.state.goHeartbeat())}},{key:"sendEnd",value:function(e){var r;this.state.goEnd()&&(e=e||{},this.isAd()?(r=t.Events.AD_END,e.timeSinceAdRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceAdStarted=this.state.timeSinceStarted.getDeltaTime(),this.parentTracker&&(this.parentTracker.state.isPlaying=!0)):(r=t.Events.CONTENT_END,e.timeSinceRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceStarted=this.state.timeSinceStarted.getDeltaTime()),this.stopHeartbeat(),this.isAd()?this.sendVideoAdAction(r,e):this.sendVideoAction(r,e),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd(),this.state.goViewCountUp(),this.state.totalPlaytime=0)}},{key:"sendPause",value:function(e){if(this.state.goPause()){var r=this.isAd()?t.Events.AD_PAUSE:t.Events.CONTENT_PAUSE;this.isAd()?this.sendVideoAdAction(r,e):this.sendVideoAction(r,e)}}},{key:"sendResume",value:function(e){var r;this.state.goResume()&&(e=e||{},this.isAd()?(r=t.Events.AD_RESUME,e.timeSinceAdPaused=this.state.timeSincePaused.getDeltaTime()):(r=t.Events.CONTENT_RESUME,e.timeSincePaused=this.state.timeSincePaused.getDeltaTime()),this.isAd()?this.sendVideoAdAction(r,e):this.sendVideoAction(r,e))}},{key:"sendBufferStart",value:function(e){var r;this.state.goBufferStart()&&(e=e||{},r=this.isAd()?t.Events.AD_BUFFER_START:t.Events.CONTENT_BUFFER_START,e=this.buildBufferAttributes(e),this._lastBufferType=e.bufferType,this.isAd()?this.sendVideoAdAction(r,e):this.sendVideoAction(r,e))}},{key:"sendBufferEnd",value:function(e){var r;this.state.goBufferEnd()&&(e=e||{},this.isAd()?(r=t.Events.AD_BUFFER_END,e.timeSinceAdBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()):(r=t.Events.CONTENT_BUFFER_END,e.timeSinceBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()),e=this.buildBufferAttributes(e),null!=this._lastBufferType&&(e.bufferType=this._lastBufferType),this.isAd()?this.sendVideoAdAction(r,e):this.sendVideoAction(r,e),this.state.initialBufferingHappened=!0)}},{key:"buildBufferAttributes",value:function(e){return null==e.timeSinceStarted||e.timeSinceStarted<100?e.isInitialBuffering=!this.state.initialBufferingHappened:e.isInitialBuffering=!1,e.bufferType=this.state.calculateBufferType(e.isInitialBuffering),e.timeSinceResumed=this.state.timeSinceResumed.getDeltaTime(),e.timeSinceSeekEnd=this.state.timeSinceSeekEnd.getDeltaTime(),e}},{key:"sendSeekStart",value:function(e){var r;this.state.goSeekStart()&&(r=this.isAd()?t.Events.AD_SEEK_START:t.Events.CONTENT_SEEK_START,this.isAd()?this.sendVideoAdAction(r,e):this.sendVideoAction(r,e))}},{key:"sendSeekEnd",value:function(e){var r;this.state.goSeekEnd()&&(e=e||{},this.isAd()?(r=t.Events.AD_SEEK_END,e.timeSinceAdSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()):(r=t.Events.CONTENT_SEEK_END,e.timeSinceSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()),this.isAd()?this.sendVideoAdAction(r,e):this.sendVideoAction(r,e))}},{key:"sendDownload",value:function(e){(e=e||{}).state||i.default.warn("Called sendDownload without { state: xxxxx }."),this.sendVideoAction(t.Events.DOWNLOAD,e),this.state.goDownload()}},{key:"sendError",value:function(e){(e=e||{}).isAd=this.isAd(),this.state.goError();var r=this.isAd()?t.Events.AD_ERROR:t.Events.CONTENT_ERROR;this.sendVideoErrorAction(r,e)}},{key:"sendRenditionChanged",value:function(e){var r;(e=e||{}).timeSinceLastRenditionChange=this.state.timeSinceLastRenditionChange.getDeltaTime(),e.shift=this.getRenditionShift(!0),r=this.isAd()?t.Events.AD_RENDITION_CHANGE:t.Events.CONTENT_RENDITION_CHANGE,this.isAd()?this.sendVideoAdAction(r,e):this.sendVideoAction(r,e),this.state.goRenditionChange()}},{key:"sendHeartbeat",value:function(e){if(this.state.isRequested){var r,n=this.getHeartbeat();this.state._hb=!0,n=this.adjustElapsedTimeForPause(n),this.isAd()?(r=t.Events.AD_HEARTBEAT,"bitmovin-ads"===this.getPlayerName()?this.sendVideoAdAction(r,e):this.sendVideoAdAction(r,l({elapsedTime:n},e))):(r=t.Events.CONTENT_HEARTBEAT,this.sendVideoAction(r,l({elapsedTime:n},e))),this.state.goHeartbeat()}}},{key:"adjustElapsedTimeForPause",value:function(e){return this.state._acc&&(e-=this.state._acc,this.state._acc=0),this.state.isPaused&&((e-=this.state.elapsedTime.getDeltaTime())<10&&(e=0),this.state.elapsedTime.start()),this.state._bufferAcc?(e-=this.state._bufferAcc,this.state._bufferAcc=0):this.state.isBuffering&&((e-=this.state.bufferElapsedTime.getDeltaTime())<5&&(e=0),this.state.bufferElapsedTime.start()),Math.max(0,e)}},{key:"sendAdBreakStart",value:function(e){this.isAd()&&this.state.goAdBreakStart()&&(this.state.totalAdPlaytime=0,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(t.Events.AD_BREAK_START,e))}},{key:"sendAdBreakEnd",value:function(e){this.isAd()&&this.state.goAdBreakEnd()&&((e=e||{}).timeSinceAdBreakBegin=this.state.timeSinceAdBreakStart.getDeltaTime(),this.sendVideoAdAction(t.Events.AD_BREAK_END,e),this.parentTracker&&(this.parentTracker.state.isPlaying=!0),this.stopHeartbeat(),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd())}},{key:"sendAdQuartile",value:function(e){this.isAd()&&((e=e||{}).quartile||i.default.warn("Called sendAdQuartile without { quartile: xxxxx }."),e.timeSinceLastAdQuartile=this.state.timeSinceLastAdQuartile.getDeltaTime(),this.sendVideoAdAction(t.Events.AD_QUARTILE,e),this.state.goAdQuartile())}},{key:"sendAdClick",value:function(e){this.isAd()&&((e=e||{}).url||i.default.warn("Called sendAdClick without { url: xxxxx }."),this.sendVideoAdAction(t.Events.AD_CLICK,e))}}],u&&d(r.prototype,u),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,u}(o.default);function b(e){e.type!==m.Events.AD_ERROR?this.sendVideoAdAction(e.type,e.data):this.sendVideoErrorAction(e.type,e.data)}m.Events={PLAYER_READY:"PLAYER_READY",DOWNLOAD:"DOWNLOAD",ERROR:"ERROR",CONTENT_REQUEST:"CONTENT_REQUEST",CONTENT_START:"CONTENT_START",CONTENT_END:"CONTENT_END",CONTENT_PAUSE:"CONTENT_PAUSE",CONTENT_RESUME:"CONTENT_RESUME",CONTENT_SEEK_START:"CONTENT_SEEK_START",CONTENT_SEEK_END:"CONTENT_SEEK_END",CONTENT_BUFFER_START:"CONTENT_BUFFER_START",CONTENT_BUFFER_END:"CONTENT_BUFFER_END",CONTENT_HEARTBEAT:"CONTENT_HEARTBEAT",CONTENT_RENDITION_CHANGE:"CONTENT_RENDITION_CHANGE",CONTENT_ERROR:"CONTENT_ERROR",AD_REQUEST:"AD_REQUEST",AD_START:"AD_START",AD_END:"AD_END",AD_PAUSE:"AD_PAUSE",AD_RESUME:"AD_RESUME",AD_SEEK_START:"AD_SEEK_START",AD_SEEK_END:"AD_SEEK_END",AD_BUFFER_START:"AD_BUFFER_START",AD_BUFFER_END:"AD_BUFFER_END",AD_HEARTBEAT:"AD_HEARTBEAT",AD_RENDITION_CHANGE:"AD_RENDITION_CHANGE",AD_ERROR:"AD_ERROR",AD_BREAK_START:"AD_BREAK_START",AD_BREAK_END:"AD_BREAK_END",AD_QUARTILE:"AD_QUARTILE",AD_CLICK:"AD_CLICK"},t.default=m}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}var n={};return(()=>{var e=n;e.default=void 0;var t=m(r(399)),i=m(r(51)),o=m(r(455)),a=m(r(144)),s=m(r(568)),u=m(r(302)),c=m(r(793)),l=m(r(328)),f=r(431),d=r(413),h=r(28),y=r(374),v=r(449),p=r(330);function m(e){return e&&e.__esModule?e:{default:e}}var b={Constants:i.default,Chrono:o.default,Log:a.default,Emitter:s.default,Tracker:u.default,VideoTracker:c.default,VideoTrackerState:l.default,Core:t.default,version:p.version,NrVideoEventAggregator:f.NrVideoEventAggregator,RetryQueueHandler:d.RetryQueueHandler,OptimizedHttpClient:h.OptimizedHttpClient,HarvestScheduler:y.HarvestScheduler,recordEvent:v.recordEvent};e.default=b})(),n.default})());
|
|
3
3
|
//# sourceMappingURL=nrvideo.min.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @license Apache-2.0
|
|
3
|
-
* @newrelic/video-core
|
|
3
|
+
* @newrelic/video-core 4.0.1
|
|
4
4
|
* Copyright New Relic <http://newrelic.com/>
|
|
5
5
|
* @author Jordi Aguilar
|
|
6
6
|
*/
|
|
7
|
+
|
|
8
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|