@newrelic/video-core 3.1.1 → 3.2.0-beta-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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [3.2.1] - 2025/07/30
6
+
7
+ ### Breaking Change
8
+
9
+ - Decoupled from browser agent, now uses its own harvesting system for independent data collection.
5
10
 
6
11
  ## [3.1.1] - 2025/06/09
7
12
 
@@ -13,11 +18,11 @@ All notable changes to this project will be documented in this file.
13
18
 
14
19
  ### Enhancements
15
20
 
16
- * **Publishing to npm:** The package can now be published to npm, making it easily accessible.
21
+ - **Publishing to npm:** The package can now be published to npm, making it easily accessible.
17
22
 
18
23
  ### Build
19
24
 
20
- * **Distribution Formats:** Added `cjs`, `esm`, and `umd` builds to the `dist` folder, ensuring compatibility with CommonJS, ES Modules, and UMD module formats.
25
+ - **Distribution Formats:** Added `cjs`, `esm`, and `umd` builds to the `dist` folder, ensuring compatibility with CommonJS, ES Modules, and UMD module formats.
21
26
 
22
27
  ## [3.0.0] - 2025/02/20
23
28
 
package/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  # New Relic Video Core - JavaScript
4
4
 
5
+ > **⚠️ BETA VERSION NOTICE**
6
+ > This version is currently in **beta phase** and is under active development. Features and APIs may change without notice. Use with caution in production environments and expect potential breaking changes in future releases.
7
+
5
8
  The New Relic video tracking core library is the base for all video trackers in the browser platform. It contains the classes and core mechanisms used by the player specific trackers.
6
9
  It segregates the events into different event types based on action, such as video-related events going to `VideoAction`, ad-related events to `VideoAdAction`, errors to `VideoErrorAction`, and custom actions to `VideoCustomAction`.
7
10
 
@@ -36,10 +39,20 @@ Add **scripts** inside `dist` folder to your page.
36
39
  `nrvideo` provides a class called `VideoTracker` that will serve as an interface with
37
40
  _Browser Agent_, allowing you to manage and send events to New Relic.
38
41
 
39
- First of all, you have to add a tracker in the core class:
42
+ First, configure the authentication options and initialize a tracker:
40
43
 
41
44
  ```javascript
42
- var tracker = new VideoTracker(player);
45
+ const options = {
46
+ info: {
47
+ beacon: "your-beacon-url.nr-data.net",
48
+ errorBeacon: "your-beacon-url.nr-data.net",
49
+ licenseKey: "your-license-key",
50
+ applicationID: "your-application-id",
51
+ sa: 1,
52
+ },
53
+ };
54
+
55
+ const tracker = new VideoTracker(player, options);
43
56
  ```
44
57
 
45
58
  Once the tracker is added, any event it emits will be sent to New Relic and processed by the following functions:
package/dist/cjs/index.js CHANGED
@@ -1 +1,3 @@
1
- function a0b(a,b){const c=a0a();return a0b=function(d,e){d=d-0x117;let f=c[d];return f;},a0b(a,b);}(function(a,b){const G=a0b,c=a();while(!![]){try{const d=-parseInt(G(0x1f9))/0x1+parseInt(G(0x2a9))/0x2+-parseInt(G(0x175))/0x3*(-parseInt(G(0x206))/0x4)+parseInt(G(0x117))/0x5+parseInt(G(0x199))/0x6+-parseInt(G(0x14a))/0x7*(-parseInt(G(0x1fa))/0x8)+-parseInt(G(0x145))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,0x4cd39),((()=>{'use strict';const c3=a0b;var a={0x33:(f,g)=>{const H=a0b;Object[H(0x219)](g,H(0x2af),{'value':!0x0}),g[H(0x1a9)]=void 0x0;class h{}h['AdPositions']={'PRE':H(0x281),'MID':H(0x259),'POST':'post'},g['default']=h;},0x90:(f,g)=>{const I=a0b;Object[I(0x219)](g,I(0x2af),{'value':!0x0}),g[I(0x1a9)]=void 0x0;class h{static[I(0x231)](...m){const J=I;j(m,h[J(0x16f)][J(0x11e)],J(0x121));}static['warn'](...m){const K=I;j(m,h['Levels'][K(0x276)],K(0x2a2));}static[I(0x26b)](...m){const L=I;j([]['slice']['call'](arguments),h['Levels'][L(0x193)],L(0x253));}static[I(0x154)](...m){const M=I;j(m,h[M(0x16f)][M(0x133)],'indigo');}static['debugCommonVideoEvents'](m,o,p){const N=I;try{if(h[N(0x17c)]<=h['Levels'][N(0x133)]){p=p||function(u){const O=N;h['debug'](O(0x284)+u['type']);};var q=['canplay',N(0x132),'waiting','ended',N(0x260),N(0x160),N(0x1e7),'resume',N(0x231),N(0x1c9),N(0x1f7),N(0x1e5),N(0x269),N(0x152),N(0x18a),N(0x1f2),N(0x28c),'loadedmetadata'];o&&(null===o[0x0]?(o[N(0x157)](),q=o):q=q['concat'](o));for(var r=0x0;r<q[N(0x28f)];r++)'function'==typeof m?m['call'](window,q[r],p):m['on']?m['on'](q[r],p):m[N(0x184)]?m[N(0x184)](q[r],p):m[N(0x243)]?m[N(0x243)](q[r],p):h[N(0x27d)](N(0x26a),m);}}catch(u){h[N(0x27d)](u);}}}function j(m,p,q){const P=I;p=p||h[P(0x16f)][P(0x193)],q=q||P(0x253);var u,v,w=h[P(0x1cc)];h[P(0x12e)]&&(w+='['+('0'+(u=new Date())[P(0x18b)]())[P(0x1a2)](-0x2)+':'+('0'+u['getMinutes']())[P(0x1a2)](-0x2)+':'+('0'+u['getSeconds']())['slice'](-0x2)+'.'+('00'+u['getMilliseconds']())[P(0x1a2)](-0x3)+']\x20'),w+=function(x){return l[x];}(p)+':',h[P(0x17c)]<=p&&p!==h[P(0x16f)][P(0x191)]&&(!h[P(0x272)]||'undefined'!=typeof document&&document[P(0x29c)]?k(m,w):(v=p===h[P(0x16f)]['ERROR']&&console[P(0x231)]?console[P(0x231)]:p===h['Levels'][P(0x276)]&&console[P(0x27d)]?console[P(0x27d)]:p===h[P(0x16f)][P(0x133)]&&console[P(0x154)]&&null==window[P(0x155)]?console[P(0x154)]:console[P(0x1b0)],w='%c'+w,m[P(0x196)](0x0,0x0,w,P(0x1ac)+q),v[P(0x19e)](console,m)));}function k(m,o){const Q=I;if(m instanceof Array){for(var p in m)k(m[p],o);}else Q(0x212)==typeof m?console['log'](o+'\x20'+m):(console[Q(0x1b0)](o+'↵'),console[Q(0x1b0)](m));}h['Levels']={'SILENT':0x5,'ERROR':0x4,'WARNING':0x3,'NOTICE':0x2,'DEBUG':0x1,'ALL':0x0},h['level']=h[I(0x16f)][I(0x11e)],h[I(0x272)]=!0x0,h[I(0x12e)]=!0x0,h[I(0x1cc)]='[nrvideo]';const l={0x4:'e',0x3:'w',0x2:'n',0x1:'d'};!(function(){const R=I;if('undefined'!=typeof window&&window[R(0x21d)]&&window[R(0x21d)][R(0x18e)]){var m=/\?.*&*nrvideo-debug=(.+)/i['exec'](window[R(0x21d)][R(0x18e)]);null!==m&&('true'===m[0x1]?h[R(0x17c)]=h[R(0x16f)][R(0x275)]:h[R(0x17c)]=m[0x1]),null!==/\?.*&*nrvideo-colors=false/i[R(0x15d)](window[R(0x21d)][R(0x18e)])&&(h['colorful']=!0x1);}}()),g[I(0x1a9)]=h;},0x92:(f,g)=>{const S=a0b;Object['defineProperty'](g,S(0x2af),{'value':!0x0}),g['default']=void 0x0,g[S(0x1a9)]=class{constructor(h){const T=S;this[T(0x246)]={};}['send'](h,j){const U=S;j=Object[U(0x2ad)](j||{},this[U(0x246)]);}[S(0x1fe)](h,j){this['_attributes'][h]=j;}[S(0x28d)](h){const V=S;this[V(0x246)]['append'](h);}};},0x12e:(f,g,h)=>{const W=a0b;Object[W(0x219)](g,W(0x2af),{'value':!0x0}),g[W(0x1a9)]=void 0x0;var j=p(h(0x14a)),k=p(h(0x238)),l=p(h(0x1c7)),m=p(h(0x33));function p(u){const X=W;return u&&u[X(0x2af)]?u:{'default':u};}class q extends k[W(0x1a9)]{constructor(u){const Y=W;super(),this['customData']={},this[Y(0x1ba)]=null,this[Y(0x173)]=null,this['_trackerReadyChrono']=new l[(Y(0x1a9))](),this[Y(0x288)]['start'](),this[Y(0x1ef)]=m['default'][Y(0x239)],this[Y(0x11f)]=m[Y(0x1a9)][Y(0x135)],u=u||{},this['setOptions'](u);}[W(0x22d)](u){const Z=W;u&&(u[Z(0x173)]&&(this[Z(0x173)]=u['parentTracker']),u[Z(0x134)]&&(this[Z(0x134)]=u[Z(0x134)]),u[Z(0x1ba)]&&(this[Z(0x1ba)]=u[Z(0x1ba)]));}[W(0x18a)](){const a0=W;this[a0(0x228)]();}[W(0x17f)](){}[W(0x228)](){}[W(0x19c)](){const a1=W;return this[a1(0x1a3)][a1(0x229)]?0x7d0:this[a1(0x1ba)]?this[a1(0x1ba)]:this[a1(0x173)]&&this[a1(0x173)][a1(0x1ba)]?this[a1(0x173)]['heartbeat']:0x7530;}[W(0x166)](){const a2=W;this[a2(0x1c4)]=setInterval(this[a2(0x12a)][a2(0x20d)](this),Math['max'](this[a2(0x19c)](),0x7d0));}[W(0x1fc)](){const a3=W;this[a3(0x1c4)]&&clearInterval(this[a3(0x1c4)]);}['sendHeartbeat'](u){const a4=W;this['sendVideoAction'](q['Events'][a4(0x1b2)],u);}[W(0x225)](u,v){const a5=W;(u=u||{})[a5(0x230)]=this[a5(0x14d)](),u[a5(0x224)]=this['getTrackerVersion'](),u[a5(0x258)]=j[a5(0x1a9)][a5(0x123)],u['timeSinceTrackerReady']=this[a5(0x288)][a5(0x1e9)]();for(let w in this[a5(0x134)])u[w]=this[a5(0x134)][w];return null!=document[a5(0x128)]&&(u['isBackgroundEvent']=document['hidden']),u;}[W(0x2a7)](){const a6=W;return j[a6(0x1a9)][a6(0x123)];}[W(0x14d)](){const a7=W;return a7(0x182);}[W(0x213)](u,v){const a8=W;this[a8(0x2ab)](a8(0x1a7),u,this[a8(0x225)](v));}[W(0x13e)](u,v){const a9=W;this[a9(0x2ab)](a9(0x17d),u,this['getAttributes'](v));}['sendVideoErrorAction'](u,v){const aa=W;let w=this[aa(0x1d7)]()?aa(0x245):aa(0x1bb);this[aa(0x2ab)]('VideoErrorAction',u,this['getAttributes'](v,w));}[W(0x1d3)](u,v){const ab=W;this['emit'](ab(0x172),u,this['getAttributes'](v,ab(0x1df)));}}q[W(0x1c3)]={'HEARTBEAT':W(0x1b2)},g[W(0x1a9)]=q;},0x148:(f,g,h)=>{const ac=a0b;Object[ac(0x219)](g,'__esModule',{'value':!0x0}),g[ac(0x1a9)]=void 0x0;var j=l(h(0x1c7)),k=l(h(0x90));function l(m){const ad=ac;return m&&m[ad(0x2af)]?m:{'default':m};}g[ac(0x1a9)]=class{constructor(){const ae=ac;this[ae(0x186)](),this[ae(0x282)]=Date['now'](),this['_hb']=!0x0,this['_acc']=0x0,this[ae(0x236)]=0x0;}['reset'](){const af=ac;this['_viewSession']=null,this[af(0x1e4)]=0x0,this[af(0x229)]=!0x1,this[af(0x223)]=0x0,this['numberOfAds']=0x0,this[af(0x27b)]=0x0,this[af(0x1d5)]=0x0,this[af(0x1b9)]=0x0,this[af(0x21a)]=!0x1,this[af(0x262)]=!0x1,this['resetFlags'](),this[af(0x194)]();}[ac(0x174)](){const ag=ac;this['isPlayerReady']=!0x1,this[ag(0x29a)]=!0x1,this[ag(0x1a6)]=!0x1,this[ag(0x136)]=!0x1,this[ag(0x22c)]=!0x1,this[ag(0x22a)]=!0x1,this[ag(0x131)]=!0x1;}['resetChronos'](){const ah=ac;this[ah(0x23b)]=new j[(ah(0x1a9))](),this[ah(0x264)]=new j[(ah(0x1a9))](),this['timeSincePaused']=new j['default'](),this[ah(0x218)]=new j[(ah(0x1a9))](),this['timeSinceBufferBegin']=new j[(ah(0x1a9))](),this[ah(0x265)]=new j['default'](),this[ah(0x181)]=new j['default'](),this[ah(0x295)]=new j['default'](),this[ah(0x16b)]=new j[(ah(0x1a9))](),this[ah(0x179)]=new j[(ah(0x1a9))](),this[ah(0x1c1)]=new j[(ah(0x1a9))](),this[ah(0x1b1)]=new j[(ah(0x1a9))](),this[ah(0x1e2)]=new j[(ah(0x1a9))](),this[ah(0x1a8)]=new j[(ah(0x1a9))](),this[ah(0x1cd)]={},this[ah(0x2a3)]=new j['default'](),this['bufferElapsedTime']=new j['default']();}[ac(0x1d7)](){return this['_isAd'];}[ac(0x211)](m){const ai=ac;this[ai(0x229)]=m;}[ac(0x151)](m){const aj=ac;this[aj(0x1cd)][m]=new j['default'](),this[aj(0x1cd)][m]['start']();}['removeTimeSinceAttribute'](m){const ak=ac;delete this[ak(0x1cd)][m];}[ac(0x24a)](){const al=ac;if(!this[al(0x1a1)]){let m=new Date()[al(0x19a)](),o=Math['random']()[al(0x1c2)](0x24)[al(0x220)](0x2)+Math[al(0x2ae)]()[al(0x1c2)](0x24)['substring'](0x2);this[al(0x1a1)]=m+'-'+o;}return this[al(0x1a1)];}[ac(0x1b7)](){return this['getViewSession']()+'-'+this['_viewCount'];}['getStateAttributes'](m){const am=ac;m=m||{},this[am(0x1d7)]()?(this['isRequested']&&(m[am(0x244)]=this[am(0x23b)][am(0x1e9)](),m[am(0x17b)]=this[am(0x295)][am(0x1e9)]()),this[am(0x1a6)]&&(m[am(0x1c6)]=this['timeSinceStarted'][am(0x1e9)]()),this[am(0x136)]&&(m[am(0x163)]=this[am(0x238)]['getDeltaTime']()),this[am(0x22a)]&&(m[am(0x22b)]=this['timeSinceBufferBegin']['getDeltaTime']()),this[am(0x22c)]&&(m[am(0x1ad)]=this[am(0x218)][am(0x1e9)]()),this[am(0x21a)]&&(m[am(0x171)]=this['timeSinceAdBreakStart'][am(0x1e9)]()),m[am(0x1bf)]=this[am(0x1bf)]):(this[am(0x29a)]&&(m[am(0x23b)]=this['timeSinceRequested'][am(0x1e9)](),m['timeSinceLastHeartbeat']=this[am(0x295)][am(0x1e9)]()),this['isStarted']&&(m[am(0x264)]=this[am(0x264)][am(0x1e9)]()),this['isPaused']&&(m[am(0x238)]=this['timeSincePaused'][am(0x1e9)]()),this[am(0x22a)]&&(m['timeSinceBufferBegin']=this[am(0x198)]['getDeltaTime']()),this[am(0x22c)]&&(m[am(0x218)]=this[am(0x218)][am(0x1e9)]()),m[am(0x1c1)]=this[am(0x1c1)][am(0x1e9)](),m[am(0x27b)]=this[am(0x27b)]),m[am(0x223)]=this[am(0x223)],this[am(0x1d7)]()||(this[am(0x1a8)]['startTime']>0x0?m['playtimeSinceLastEvent']=this[am(0x1a8)][am(0x1e9)]():m['playtimeSinceLastEvent']=0x0,this[am(0x131)]?this[am(0x1a8)][am(0x21b)]():this[am(0x1a8)][am(0x186)](),this['totalPlaytime']+=m[am(0x1a8)],m[am(0x1d5)]=this['totalPlaytime']);for(const [o,p]of Object[am(0x25a)](this['customTimeSinceAttributes']))m[o]=p[am(0x1e9)]();return m;}[ac(0x178)](m){const an=ac;let o='';return o=m?an(0x287):this[an(0x22c)]?an(0x1f7):this['isPaused']?an(0x1e7):an(0x271),k[an(0x1a9)]['debug'](an(0x2a5)+o),o;}[ac(0x29d)](){const ao=ac;this[ao(0x1e4)]++;}[ac(0x296)](){const ap=ac;return!this[ap(0x18f)]&&(this[ap(0x18f)]=!0x0,!0x0);}[ac(0x16d)](){const aq=ac;return!this[aq(0x29a)]&&(this['isRequested']=!0x0,this[aq(0x1c1)][aq(0x186)](),this[aq(0x23b)][aq(0x21b)](),!0x0);}['goStart'](){const ar=ac;return!(!this[ar(0x29a)]||this['isStarted']||(this[ar(0x1d7)]()?this[ar(0x1bf)]++:this['numberOfVideos']++,this[ar(0x1a6)]=!0x0,this['isPlaying']=!0x0,this[ar(0x264)]['start'](),this[ar(0x1a8)][ar(0x21b)](),0x0));}['goEnd'](){const as=ac;return!!this[as(0x29a)]&&(this[as(0x223)]=0x0,this['resetFlags'](),this[as(0x23b)][as(0x19f)](),this[as(0x264)][as(0x19f)](),this[as(0x1a8)][as(0x19f)](),!0x0);}[ac(0x1d0)](){const at=ac;return!(!this['isStarted']||this[at(0x136)]||(this[at(0x136)]=!0x0,this[at(0x131)]=!0x1,this[at(0x238)][at(0x21b)](),this[at(0x1a8)]['stop'](),this[at(0x1b1)][at(0x186)](),this[at(0x22a)]&&(this[at(0x236)]+=this[at(0x25c)]['getDeltaTime']()),this['elapsedTime'][at(0x21b)](),0x0));}[ac(0x1f4)](){const au=ac;return!(!this[au(0x1a6)]||!this[au(0x136)]||(this['isPaused']=!0x1,this['isPlaying']=!0x0,this['timeSincePaused'][au(0x19f)](),this['timeSinceResumed']['start'](),this[au(0x11d)]?(this['_acc']=this[au(0x2a3)][au(0x1e9)](),this[au(0x11d)]=!0x1):(this['isBuffering']&&this[au(0x25c)][au(0x21b)](),this[au(0x20f)]+=this[au(0x2a3)]['getDeltaTime']()),0x0));}[ac(0x256)](){const av=ac;return!(!this['isRequested']||this['isBuffering']||(this[av(0x22a)]=!0x0,this[av(0x131)]=!0x1,this[av(0x198)][av(0x21b)](),this['bufferElapsedTime']['start'](),0x0));}['goBufferEnd'](){const aw=ac;return!(!this[aw(0x29a)]||!this['isBuffering']||(this['isBuffering']=!0x1,this[aw(0x131)]=!0x0,this[aw(0x198)][aw(0x19f)](),this[aw(0x11d)]?(this['_bufferAcc']=this[aw(0x25c)][aw(0x1e9)](),this[aw(0x11d)]=!0x1):this[aw(0x236)]+=this[aw(0x25c)]['getDeltaTime'](),0x0));}[ac(0x18c)](){const ax=ac;return!(!this[ax(0x1a6)]||this['isSeeking']||(this['isSeeking']=!0x0,this[ax(0x131)]=!0x1,this[ax(0x218)]['start'](),this[ax(0x1e2)][ax(0x186)](),0x0));}[ac(0x289)](){const ay=ac;return!(!this[ay(0x1a6)]||!this[ay(0x22c)]||(this[ay(0x22c)]=!0x1,this[ay(0x131)]=!0x0,this[ay(0x218)][ay(0x19f)](),this[ay(0x1e2)][ay(0x21b)](),0x0));}[ac(0x1aa)](){const az=ac;return!this['isAdBreak']&&(this[az(0x21a)]=!0x0,this[az(0x265)][az(0x21b)](),!0x0);}[ac(0x164)](){const aA=ac;return!!this['isAdBreak']&&(this[aA(0x29a)]=!0x1,this['isAdBreak']=!0x1,this[aA(0x1b9)]=this['timeSinceAdBreakStart']['getDeltaTime'](),this[aA(0x265)][aA(0x19f)](),!0x0);}[ac(0x12b)](){const aB=ac;this[aB(0x181)][aB(0x21b)]();}[ac(0x1ed)](){const aC=ac;this[aC(0x295)]['start']();}[ac(0x1bd)](){const aD=ac;this['timeSinceLastRenditionChange'][aD(0x21b)]();}[ac(0x29b)](){const aE=ac;this[aE(0x179)][aE(0x21b)]();}[ac(0x17a)](){const aF=ac;this['isError']=!0x0,this[aF(0x223)]++;}[ac(0x286)](){const aG=ac;this[aG(0x1c1)][aG(0x21b)]();}};},0x14a:f=>{const aH=a0b;f[aH(0x15c)]=JSON[aH(0x144)]('{\x22name\x22:\x22@newrelic/video-core\x22,\x22version\x22:\x223.1.1\x22,\x22description\x22:\x22New\x20Relic\x20video\x20tracking\x20core\x20library\x22,\x22main\x22:\x22./dist/cjs/index.js\x22,\x22module\x22:\x22./dist/esm/index.js\x22,\x22scripts\x22:{\x22build\x22:\x22webpack\x20--mode\x20production\x22,\x22build:dev\x22:\x22webpack\x20--mode\x20development\x22,\x22watch\x22:\x22webpack\x20--mode\x20production\x20--progress\x20--color\x20--watch\x22,\x22watch:dev\x22:\x22webpack\x20--progress\x20--color\x20--watch\x22,\x22clean\x22:\x22rm\x20-rf\x20dist\x20coverage\x20doc\x22,\x22test\x22:\x22nyc\x20--reporter=html\x20--reporter=text\x20mocha\x20--require\x20@babel/register\x22,\x22doc\x22:\x22jsdoc\x20-c\x20jsdoc.json\x20-d\x20documentation\x22,\x22deploy\x22:\x22node\x20scripts/deploy.js\x22,\x22third-party-updates\x22:\x22oss\x20third-party\x20manifest\x20--includeOptDeps\x20&&\x20oss\x20third-party\x20notices\x20--includeOptDeps\x20&&\x20git\x20add\x20THIRD_PARTY_NOTICES.md\x20third_party_manifest.json\x22},\x22repository\x22:{\x22type\x22:\x22git\x22,\x22url\x22:\x22https://github.com/newrelic/video-core-js\x22},\x22author\x22:\x22Jordi\x20Aguilar\x22,\x22contributors\x22:[\x22Andreu\x20Santarén\x20Llop\x22],\x22license\x22:\x22Apache-2.0\x22,\x22devDependencies\x22:{\x22@babel/core\x22:\x22^7.24.5\x22,\x22@babel/plugin-transform-modules-commonjs\x22:\x22^7.24.1\x22,\x22@newrelic/newrelic-oss-cli\x22:\x22^0.1.2\x22,\x22@babel/preset-env\x22:\x22^7.24.5\x22,\x22@babel/register\x22:\x22^7.24.6\x22,\x22aws-sdk\x22:\x22^2.920.0\x22,\x22babel-loader\x22:\x22^9.1.3\x22,\x22chai\x22:\x22^4.3.4\x22,\x22diff\x22:\x22^5.0.0\x22,\x22jsdom\x22:\x22^25.0.1\x22,\x22mocha\x22:\x22^10.4.0\x22,\x22nyc\x22:\x22^15.1.0\x22,\x22sinon\x22:\x22^2.4.1\x22,\x22webpack\x22:\x22^5.91.0\x22,\x22webpack-cli\x22:\x22^4.9.2\x22,\x22webpack-obfuscator\x22:\x22^3.5.1\x22},\x22files\x22:[\x22THIRD_PARTY_NOTICES.md\x22,\x22dist\x22,\x22CHANGELOG.md\x22,\x22LICENSE\x22,\x22README.md\x22,\x22!test\x22],\x22publishConfig\x22:{\x22access\x22:\x22public\x22}}');},0x18f:(f,g,j)=>{const aI=a0b;Object[aI(0x219)](g,aI(0x2af),{'value':!0x0}),g[aI(0x1a9)]=void 0x0;var k=p(j(0x90)),m=p(j(0x92));function p(y){const aJ=aI;return y&&y[aJ(0x2af)]?y:{'default':y};}class q{static[aI(0x1e0)](y){const aK=aI;y['on']&&y[aK(0x2ab)]?(v[aK(0x2ac)](y),y['on']('*',x),'function'==typeof y[aK(0x1b3)]&&y[aK(0x1b3)]()):k[aK(0x1a9)][aK(0x231)](aK(0x277),y);}static[aI(0x241)](y){const aL=aI;y[aL(0x270)]('*',x),y['dispose']();let z=v[aL(0x1d4)](y);-0x1!==z&&v['splice'](z,0x1);}static[aI(0x247)](){return v;}static[aI(0x215)](){return u;}static[aI(0x137)](y){u=y;}static[aI(0x1c8)](y,z,A){const aM=aI;null!=q['getBackend']()&&q[aM(0x215)]()instanceof m[aM(0x1a9)]?q[aM(0x215)]()[aM(0x1c8)](y,z,A):aM(0x23d)!=typeof newrelic&&newrelic['recordCustomEvent']?(void 0x0!==A&&(A['timeSinceLoad']=window[aM(0x1da)][aM(0x1e6)]()/0x3e8),newrelic[aM(0x188)](y,{'actionName':z,...A})):w||(k[aM(0x1a9)][aM(0x231)](aM(0x283),'In\x20order\x20to\x20use\x20NewRelic\x20Video\x20you\x20will\x20need\x20New\x20Relic\x20Browser\x20Agent.'),w=!0x0);}static['sendError'](y){const aN=aI;q[aN(0x1c8)](aN(0x11e),y);}}let u,v=[],w=!0x1;function x(y){const aO=aI;let z=function(A){let B={};for(let C in A)null!==A[C]&&void 0x0!==A[C]&&(B[C]=A[C]);return B;}(y[aO(0x25b)]);k[aO(0x1a9)][aO(0x17c)]<=k[aO(0x1a9)]['Levels'][aO(0x133)]?k[aO(0x1a9)]['notice']('Sent',y['type'],z):k[aO(0x1a9)][aO(0x26b)]('Sent',y[aO(0x19b)]),q['send'](y[aO(0x1f0)],y['type'],z);}g[aI(0x1a9)]=q;},0x196:(f,g,h)=>{const aP=a0b;Object[aP(0x219)](g,aP(0x2af),{'value':!0x0}),g['default']=void 0x0;var j=l(h(0x92)),k=l(h(0x90));function l(o){const aQ=aP;return o&&o[aQ(0x2af)]?o:{'default':o};}class m extends j[aP(0x1a9)]{constructor(o,p){const aR=aP;super(),this['_accountId']=o,this[aR(0x234)]=p,this[aR(0x266)]='',this[aR(0x1f6)]=[],this[aR(0x167)]=!0x1,this['_lastTimestamp']=0x0,setInterval(()=>{const aS=aR;this[aS(0x120)](m['Source']['TIMER']);},0x2710);}[aP(0x1c8)](o,p,q){const aT=aP;if(this[aT(0x266)]=o,super['send'](p,q),this[aT(0x1f6)][aT(0x28f)]<0x1f4){(q=this[aT(0x15f)](q))[aT(0x1f0)]=this[aT(0x266)],q[aT(0x249)]=p;let u=Date[aT(0x1e6)]();u>this[aT(0x14b)]?(q[aT(0x1af)]=u,this[aT(0x14b)]=u):(this[aT(0x14b)]++,q['timestamp']=this['_lastTimestamp']),this[aT(0x1f6)][aT(0x2ac)](q);}}['generateAttributes'](o){const aU=aP;o[aU(0x1eb)]=window[aU(0x21d)][aU(0x14e)],o[aU(0x1d8)]=window['location'][aU(0x293)]+window[aU(0x21d)][aU(0x1d9)],o[aU(0x156)]=document[aU(0x18d)];let p='Unknown';-0x1!=navigator['userAgent'][aU(0x1d4)](aU(0x177))?p=aU(0x278):-0x1!=navigator[aU(0x21c)][aU(0x1d4)](aU(0x291))?p=aU(0x291):-0x1!=navigator[aU(0x21c)][aU(0x1d4)](aU(0x125))?p=aU(0x125):navigator[aU(0x21c)][aU(0x140)](/iPhone|iPad|iPod/i)?p=aU(0x23f):-0x1!=navigator[aU(0x21c)][aU(0x1d4)](aU(0x159))?p=aU(0x159):-0x1!=navigator[aU(0x21c)]['indexOf'](aU(0x28b))&&(p=aU(0x1dd)),o[aU(0x240)]=p;let q=aU(0x209);if(-0x1!=navigator[aU(0x21c)][aU(0x1d4)](aU(0x203))?q=aU(0x203):-0x1!=navigator[aU(0x21c)][aU(0x1d4)](aU(0x1db))?q=aU(0x1db):-0x1!=navigator[aU(0x21c)][aU(0x1d4)](aU(0x202))?q='IE':-0x1!=navigator['userAgent'][aU(0x1d4)](aU(0x13c))?q='Microsoft\x20Edge':-0x1!=navigator[aU(0x21c)][aU(0x1d4)]('Safari')?q=aU(0x15e):-0x1!=navigator[aU(0x21c)][aU(0x1d4)](aU(0x1b8))&&(q=aU(0x1b8)),o[aU(0x24d)]=q,!o[aU(0x147)]){let u=aU(0x209);u=navigator['userAgent'][aU(0x140)](/Tablet|iPad/i)?aU(0x217):navigator['userAgent'][aU(0x140)](/Mobile|Windows Phone|Lumia|Android|webOS|iPhone|iPod|Blackberry|PlayBook|BB10|Opera Mini|\bCrMo\/|Opera Mobi/i)?aU(0x26c):null!=window[aU(0x155)]?aU(0x165):aU(0x129),o[aU(0x147)]=u;}return o;}[aP(0x120)](o){const aV=aP;o==m['Source']['TIMER']&&this[aV(0x167)]?k['default'][aV(0x154)](aV(0x221)):(this[aV(0x167)]=!0x0,this[aV(0x1f6)][aV(0x28f)]>0x0?(k[aV(0x1a9)][aV(0x154)](aV(0x13b),this[aV(0x1f6)]),this[aV(0x298)](this[aV(0x1f6)][aV(0x232)]())):this[aV(0x167)]=!0x1);}[aP(0x298)](o){const aW=aP,p={'method':aW(0x1ce),'headers':{'Content-Type':aW(0x1d1),'X-Insert-Key':this[aW(0x234)]},'body':JSON[aW(0x20a)](o)},q=aW(0x1f3)+this[aW(0x150)]+'/events';fetch(q,p)[aW(0x1cf)](u=>u[aW(0x185)]())[aW(0x1cf)](u=>{this['insightsRequestResponse'](u);})[aW(0x210)](u=>{const aX=aW;k[aX(0x1a9)][aX(0x231)](aX(0x183),u,o),this['_eventBuffer'][aX(0x2ac)](o),this[aX(0x167)]=!0x1;});}[aP(0x27a)](o){const aY=aP;this[aY(0x120)](m['Source']['FETCH']);}}m['Source']={'TIMER':aP(0x16a),'FETCH':'FETCH'},g[aP(0x1a9)]=m;},0x1c7:(f,g)=>{const aZ=a0b;Object['defineProperty'](g,'__esModule',{'value':!0x0}),g[aZ(0x1a9)]=void 0x0;class h{constructor(){const b0=aZ;this[b0(0x186)]();}['reset'](){const b1=aZ;this[b1(0x1ff)]=0x0,this['stopTime']=0x0,this[b1(0x162)]=0x0;}['getDeltaTime'](){const b2=aZ;return this['startTime']?this[b2(0x162)]+(new Date()[b2(0x19a)]()-this['startTime']):null;}[aZ(0x21b)](){const b3=aZ;this['startTime']=new Date()[b3(0x19a)](),this['stopTime']=0x0;}[aZ(0x19f)](){const b4=aZ;return this[b4(0x261)]=new Date()[b4(0x19a)](),this[b4(0x1e9)]();}[aZ(0x1be)](){const b5=aZ;var j=new h();return j['startTime']=this[b5(0x1ff)],j['stopTime']=this[b5(0x261)],j['offset']=this[b5(0x162)],j;}}g[aZ(0x1a9)]=h;},0x238:(f,g)=>{const b6=a0b;Object[b6(0x219)](g,b6(0x2af),{'value':!0x0}),g[b6(0x1a9)]=void 0x0,g['default']=class{['on'](h,j){const b7=b6;if(this[b7(0x267)]=this[b7(0x267)]||{},b7(0x122)==typeof j)return this[b7(0x267)][h]=this[b7(0x267)][h]||[],this[b7(0x267)][h]['push'](j),this;}['off'](h,j){const b8=b6;if(this[b8(0x267)]=this[b8(0x267)]||{},this[b8(0x267)][h]){var k=this['_listeners'][h]['indexOf'](j);-0x1!==k&&this[b8(0x267)][h][b8(0x196)](k,0x1);}return this;}[b6(0x2ab)](h,j,k){const b9=b6;return this[b9(0x267)]=this[b9(0x267)]||{},k=k||{},Array[b9(0x127)](this[b9(0x267)][j])&&this['_listeners'][j][b9(0x20e)](l=>{const ba=b9;l[ba(0x143)](this,{'eventType':h,'type':j,'data':k,'target':this});}),Array[b9(0x127)](this['_listeners']['*'])&&this['_listeners']['*'][b9(0x20e)](l=>{const bb=b9;l[bb(0x143)](this,{'eventType':h,'type':j,'data':k,'target':this});}),this;}};},0x319:(f,g,j)=>{const bc=a0b;Object[bc(0x219)](g,bc(0x2af),{'value':!0x0}),g[bc(0x1a9)]=void 0x0;var k=q(j(0x90)),l=q(j(0x12e)),m=q(j(0x148)),p=q(j(0x14a));function q(w){const bd=bc;return w&&w[bd(0x2af)]?w:{'default':w};}class u extends l[bc(0x1a9)]{constructor(w,x){const be=bc;super(),this[be(0x1a3)]=new m[(be(0x1a9))](),this[be(0x252)]=null,this['_lastBufferType']=null,this[be(0x1f1)]=null,x=x||{},this[be(0x22d)](x),w&&this[be(0x11b)](w,x[be(0x1a5)]),k[be(0x1a9)]['notice'](be(0x268)+this[be(0x14d)]()+'\x20v'+this[be(0x2a7)]()+be(0x138));}['setUserId'](w){const bf=bc;this[bf(0x1f1)]=w;}[bc(0x22d)](w){const bg=bc;w&&(w[bg(0x252)]&&this[bg(0x290)](w[bg(0x252)]),bg(0x1ee)==typeof w[bg(0x1d7)]&&this[bg(0x211)](w[bg(0x1d7)]),l[bg(0x1a9)][bg(0x273)][bg(0x22d)]['apply'](this,arguments));}[bc(0x11b)](w,x){const bh=bc;(this['player']||this[bh(0x1a5)])&&this[bh(0x18a)](),bh(0x23d)!=typeof document&&document[bh(0x118)]&&(bh(0x212)==typeof w&&(w=document[bh(0x118)](w)),'string'==typeof x&&(x=document[bh(0x118)](x))),x=x||w,this[bh(0x235)]=w,this['tag']=x,this['registerListeners']();}[bc(0x1d7)](){const bi=bc;return this['state'][bi(0x1d7)]();}[bc(0x211)](w){const bj=bc;this[bj(0x1a3)][bj(0x211)](w);}['setAdsTracker'](w){const bk=bc;this['disposeAdsTracker'](),w&&(this[bk(0x252)]=w,this[bk(0x252)][bk(0x211)](!0x0),this[bk(0x252)][bk(0x173)]=this,this['adsTracker']['on']('*',v[bk(0x20d)](this)));}[bc(0x24c)](){const bl=bc;this[bl(0x252)]&&(this[bl(0x252)]['off']('*',v),this[bl(0x252)][bl(0x18a)]());}[bc(0x18a)](){const bm=bc;this[bm(0x1fc)](),this[bm(0x24c)](),this['unregisterListeners'](),this[bm(0x235)]=null,this[bm(0x1a5)]=null;}['registerListeners'](){}[bc(0x228)](){}['getViewId'](){const bn=bc;return this[bn(0x173)]?this[bn(0x173)][bn(0x1b7)]():this[bn(0x1a3)]['getViewId']();}['getViewSession'](){const bo=bc;return this[bo(0x173)]?this[bo(0x173)]['getViewSession']():this[bo(0x1a3)][bo(0x24a)]();}[bc(0x214)](){return null;}['getTitle'](){return null;}[bc(0x27c)](){return null;}[bc(0x251)](){return null;}[bc(0x12d)](){const bp=bc;if(this[bp(0x1a5)]&&this[bp(0x1a5)]['webkitVideoDecodedByteCount']){let w;if(this[bp(0x126)]){w=this['tag']['webkitVideoDecodedByteCount'];let x=w-this['_lastWebkitBitrate'],y=this[bp(0x19c)]()/0x3e8;w=Math[bp(0x27e)](x/y*0x8);}return this[bp(0x126)]=this[bp(0x1a5)][bp(0x216)],w||null;}}['getRenditionName'](){return null;}[bc(0x1ca)](){return null;}[bc(0x2a4)](w){const bq=bc;let x,y=this['getRenditionBitrate']();return this[bq(0x1d7)]()?(x=this[bq(0x14c)],w&&(this[bq(0x14c)]=y)):(x=this[bq(0x124)],w&&(this['_lastRendition']=y)),y&&x?y>x?'up':y<x?bq(0x1a4):null:null;}[bc(0x1f5)](){const br=bc;return this['tag']?this['tag'][br(0x168)]:null;}[bc(0x25f)](){const bs=bc;return this['tag']?this['tag'][bs(0x20b)]:null;}[bc(0x1b5)](){const bt=bc;return this[bt(0x1a5)]?this[bt(0x1a5)][bt(0x279)]:null;}[bc(0x1cb)](){const bu=bc;return this[bu(0x1a5)]?this['tag'][bu(0x201)]:null;}[bc(0x205)](){return null;}[bc(0x24b)](){const bv=bc;return this[bv(0x1a5)]?this[bv(0x1a5)][bv(0x1de)]:null;}['getPlayrate'](){const bw=bc;return this[bw(0x1a5)]?this[bw(0x1a5)]['playbackRate']:null;}[bc(0x1dc)](){const bx=bc;return this[bx(0x1a5)]?this[bx(0x1a5)][bx(0x2a6)]:null;}['isFullscreen'](){return null;}[bc(0x1e8)](){return null;}[bc(0x299)](){const by=bc;return this[by(0x14d)]();}[bc(0x227)](){const bz=bc;return p[bz(0x1a9)]['version'];}[bc(0x24e)](){return null;}[bc(0x169)](){const bA=bc;return this[bA(0x1a5)]?this[bA(0x1a5)][bA(0x1ab)]:null;}['getPreload'](){const bB=bc;return this[bB(0x1a5)]?this['tag'][bB(0x1f8)]:null;}[bc(0x1ae)](){return null;}['getAdPosition'](){const bC=bc;return this['parentTracker']?this[bC(0x173)][bC(0x1a3)][bC(0x1a6)]?'mid':bC(0x281):null;}[bc(0x2a1)](){return null;}[bc(0x1b6)](){return null;}[bc(0x2b0)](){return null;}[bc(0x1ea)](){return null;}['getInstrumentationVersion'](){return null;}[bc(0x225)](w,x){const bD=bc;if(void 0x0===(w=l[bD(0x1a9)]['prototype'][bD(0x225)][bD(0x19e)](this,arguments))[bD(0x1d7)]&&(w['isAd']=this['isAd']()),w[bD(0x1b4)]=this[bD(0x24a)](),w['viewId']=this[bD(0x1b7)](),w['playerName']=this[bD(0x299)](),w['playerVersion']=this['getPlayerVersion'](),w['instrumentation.provider']=this[bD(0x2b0)](),w[bD(0x280)]=this[bD(0x1ea)](),w[bD(0x16e)]=this[bD(0x263)](),w[bD(0x15b)]=this[bD(0x1f1)],w[bD(0x12c)]='Browser',bD(0x1df)===x)return w;try{w[bD(0x1eb)]=window[bD(0x21d)][bD(0x14e)];}catch(y){}this[bD(0x1d7)]()?(w['adId']=this[bD(0x214)](),w[bD(0x28a)]=this[bD(0x23e)](),w[bD(0x237)]=this[bD(0x24b)](),w[bD(0x119)]=this[bD(0x1e8)](),w['adBitrate']=this['getBitrate']()||this[bD(0x12d)]()||this[bD(0x1ca)](),w[bD(0x207)]=this[bD(0x2a8)](),w['adRenditionBitrate']=this[bD(0x1ca)](),w[bD(0x170)]=this['getRenditionHeight'](),w[bD(0x1c7)]=this[bD(0x25f)](),w['adDuration']=this[bD(0x1b5)](),w[bD(0x141)]=this[bD(0x1cb)](),w['adLanguage']=this[bD(0x205)](),w[bD(0x176)]=this[bD(0x1dc)](),w['adFps']=this[bD(0x24e)](),w[bD(0x139)]=this[bD(0x28e)](),w[bD(0x1fd)]=this[bD(0x1b6)](),w[bD(0x13f)]=this['getAdPartner']()):(w['contentId']=this[bD(0x214)](),w[bD(0x1a0)]=this[bD(0x23e)](),w['contentSrc']=this[bD(0x24b)](),w[bD(0x1c0)]=this['getCdn'](),w[bD(0x25d)]=this[bD(0x1cb)](),w[bD(0x148)]=this[bD(0x27c)](),w[bD(0x24f)]=this[bD(0x251)]()||this['getWebkitBitrate']()||this[bD(0x1ca)](),w['contentRenditionName']=this[bD(0x2a8)](),w[bD(0x17e)]=this[bD(0x1ca)](),w[bD(0x14f)]=this['getRenditionHeight'](),w[bD(0x197)]=this[bD(0x25f)](),w[bD(0x20c)]=this[bD(0x1b5)](),w[bD(0x26e)]=this[bD(0x205)](),w[bD(0x222)]=this[bD(0x11c)](),w['contentIsFullscreen']=this['isFullscreen'](),w['contentIsMuted']=this['isMuted'](),w[bD(0x21e)]=this['isAutoplayed'](),w['contentPreload']=this[bD(0x208)](),w[bD(0x146)]=this[bD(0x24e)](),null!=this[bD(0x252)]&&this['adsTracker'][bD(0x1a3)][bD(0x1b9)]>0x0&&(w[bD(0x1b9)]=this['adsTracker'][bD(0x1a3)][bD(0x1b9)])),this[bD(0x1a3)][bD(0x22e)](w);for(let z in this[bD(0x134)])w[z]=this['customData'][z];return w;}[bc(0x1e3)](w,x,y){const bE=bc;y=y||{},this[bE(0x1d3)](w,y),this['state'][bE(0x151)](x);}[bc(0x250)](w){const bF=bc;this[bF(0x1a3)][bF(0x296)]()&&(w=w||{},this['sendVideoAction'](u['Events'][bF(0x26f)],w));}['sendRequest'](w){const bG=bc;if(this['state'][bG(0x16d)]()){let x;this[bG(0x1d7)]()?(x=u[bG(0x1c3)]['AD_REQUEST'],this[bG(0x13e)](x,w)):(x=u[bG(0x1c3)][bG(0x11a)],this[bG(0x213)](x,w));}}[bc(0x153)](w){const bH=bc;if(this[bH(0x1a3)][bH(0x257)]()){let x;this[bH(0x1d7)]()?(x=u[bH(0x1c3)][bH(0x187)],this[bH(0x173)]&&(this[bH(0x173)]['state'][bH(0x131)]=!0x1),this[bH(0x13e)](x,w)):(x=u[bH(0x1c3)][bH(0x204)],this[bH(0x213)](x,w)),this['startHeartbeat'](),this[bH(0x1a3)][bH(0x1ed)]();}}['sendEnd'](w){const bI=bc;if(this[bI(0x1a3)]['goEnd']()){let x;w=w||{},this[bI(0x1d7)]()?(x=u[bI(0x1c3)][bI(0x19d)],w[bI(0x244)]=this['state'][bI(0x23b)][bI(0x1e9)](),w[bI(0x1c6)]=this[bI(0x1a3)][bI(0x264)][bI(0x1e9)](),this[bI(0x173)]&&(this[bI(0x173)][bI(0x1a3)][bI(0x131)]=!0x0)):(x=u['Events']['CONTENT_END'],w[bI(0x23b)]=this[bI(0x1a3)][bI(0x23b)]['getDeltaTime'](),w[bI(0x264)]=this[bI(0x1a3)][bI(0x264)][bI(0x1e9)]()),this[bI(0x1fc)](),this[bI(0x1d7)]()?this[bI(0x13e)](x,w):this[bI(0x213)](x,w),this[bI(0x173)]&&this[bI(0x1d7)]()&&this['parentTracker'][bI(0x1a3)]['goLastAd'](),this[bI(0x1a3)]['goViewCountUp'](),this[bI(0x1a3)][bI(0x1d5)]=0x0;}}[bc(0x1fb)](w){const bJ=bc;if(this['state'][bJ(0x1d0)]()){let x=this[bJ(0x1d7)]()?u[bJ(0x1c3)][bJ(0x29f)]:u[bJ(0x1c3)][bJ(0x29e)];this[bJ(0x1d7)]()?this['sendVideoAdAction'](x,w):this[bJ(0x213)](x,w);}}[bc(0x12f)](w){const bK=bc;if(this[bK(0x1a3)][bK(0x1f4)]()){let x;w=w||{},this[bK(0x1d7)]()?(x=u[bK(0x1c3)]['AD_RESUME'],w[bK(0x163)]=this[bK(0x1a3)][bK(0x238)]['getDeltaTime']()):(x=u[bK(0x1c3)][bK(0x130)],w[bK(0x238)]=this[bK(0x1a3)]['timeSincePaused'][bK(0x1e9)]()),this[bK(0x1d7)]()?this[bK(0x13e)](x,w):this[bK(0x213)](x,w);}}[bc(0x192)](w){const bL=bc;if(this['state'][bL(0x256)]()){let x;w=w||{},x=this['isAd']()?u[bL(0x1c3)]['AD_BUFFER_START']:u[bL(0x1c3)]['CONTENT_BUFFER_START'],w=this[bL(0x158)](w),this[bL(0x226)]=w[bL(0x22f)],this['isAd']()?this[bL(0x13e)](x,w):this[bL(0x213)](x,w);}}['sendBufferEnd'](w){const bM=bc;if(this[bM(0x1a3)][bM(0x1e1)]()){let x;w=w||{},this[bM(0x1d7)]()?(x=u['Events'][bM(0x1c5)],w[bM(0x22b)]=this[bM(0x1a3)]['timeSinceBufferBegin'][bM(0x1e9)]()):(x=u[bM(0x1c3)][bM(0x26d)],w[bM(0x198)]=this[bM(0x1a3)][bM(0x198)]['getDeltaTime']()),w=this['buildBufferAttributes'](w),null!=this[bM(0x226)]&&(w[bM(0x22f)]=this['_lastBufferType']),this[bM(0x1d7)]()?this[bM(0x13e)](x,w):this[bM(0x213)](x,w),this[bM(0x1a3)]['initialBufferingHappened']=!0x0;}}[bc(0x158)](w){const bN=bc;return null==w[bN(0x264)]||w['timeSinceStarted']<0x64?w['isInitialBuffering']=!this[bN(0x1a3)][bN(0x262)]:w[bN(0x190)]=!0x1,w[bN(0x22f)]=this[bN(0x1a3)]['calculateBufferType'](w[bN(0x190)]),w[bN(0x1b1)]=this[bN(0x1a3)]['timeSinceResumed'][bN(0x1e9)](),w['timeSinceSeekEnd']=this['state'][bN(0x1e2)]['getDeltaTime'](),w;}[bc(0x189)](w){const bO=bc;if(this[bO(0x1a3)][bO(0x18c)]()){let x;x=this['isAd']()?u[bO(0x1c3)][bO(0x27f)]:u['Events']['CONTENT_SEEK_START'],this[bO(0x1d7)]()?this[bO(0x13e)](x,w):this['sendVideoAction'](x,w);}}[bc(0x292)](w){const bP=bc;if(this[bP(0x1a3)]['goSeekEnd']()){let x;w=w||{},this[bP(0x1d7)]()?(x=u['Events'][bP(0x248)],w[bP(0x1ad)]=this[bP(0x1a3)][bP(0x218)][bP(0x1e9)]()):(x=u['Events'][bP(0x297)],w[bP(0x218)]=this[bP(0x1a3)][bP(0x218)][bP(0x1e9)]()),this[bP(0x1d7)]()?this[bP(0x13e)](x,w):this['sendVideoAction'](x,w);}}['sendDownload'](w){const bQ=bc;(w=w||{})[bQ(0x1a3)]||k['default'][bQ(0x27d)](bQ(0x1d2)),this[bQ(0x213)](u[bQ(0x1c3)][bQ(0x23a)],w),this[bQ(0x1a3)]['goDownload']();}[bc(0x285)](w){const bR=bc;(w=w||{})[bR(0x1d7)]=this[bR(0x1d7)](),this[bR(0x1a3)][bR(0x17a)]();let x=this[bR(0x1d7)]()?u[bR(0x1c3)][bR(0x23c)]:u[bR(0x1c3)]['CONTENT_ERROR'];this[bR(0x161)](x,w);}[bc(0x294)](w){const bS=bc;let x;(w=w||{})[bS(0x16b)]=this[bS(0x1a3)][bS(0x16b)][bS(0x1e9)](),w[bS(0x157)]=this[bS(0x2a4)](!0x0),x=this[bS(0x1d7)]()?u[bS(0x1c3)][bS(0x13a)]:u[bS(0x1c3)][bS(0x21f)],this['isAd']()?this[bS(0x13e)](x,w):this[bS(0x213)](x,w),this[bS(0x1a3)]['goRenditionChange']();}[bc(0x12a)](w){const bT=bc;if(this[bT(0x1a3)][bT(0x29a)]){let x,y=this[bT(0x19c)]();this[bT(0x1a3)][bT(0x11d)]=!0x0,y=this[bT(0x254)](y),this['isAd']()?(x=u[bT(0x1c3)][bT(0x2aa)],'bitmovin-ads'===this[bT(0x299)]()?this[bT(0x13e)](x,w):this['sendVideoAdAction'](x,{'elapsedTime':y,...w})):(x=u[bT(0x1c3)][bT(0x255)],this[bT(0x213)](x,{'elapsedTime':y,...w})),this[bT(0x1a3)][bT(0x1ed)]();}}[bc(0x254)](w){const bU=bc;return this[bU(0x1a3)][bU(0x20f)]&&(w-=this['state'][bU(0x20f)],this[bU(0x1a3)][bU(0x20f)]=0x0),this[bU(0x1a3)][bU(0x136)]&&((w-=this[bU(0x1a3)][bU(0x2a3)]['getDeltaTime']())<0xa&&(w=0x0),this[bU(0x1a3)]['elapsedTime'][bU(0x21b)]()),this[bU(0x1a3)][bU(0x236)]?(w-=this[bU(0x1a3)]['_bufferAcc'],this[bU(0x1a3)]['_bufferAcc']=0x0):this['state'][bU(0x22a)]&&((w-=this[bU(0x1a3)][bU(0x25c)][bU(0x1e9)]())<0x5&&(w=0x0),this[bU(0x1a3)]['bufferElapsedTime'][bU(0x21b)]()),Math[bU(0x15a)](0x0,w);}[bc(0x2a0)](w){const bV=bc;this['isAd']()&&this[bV(0x1a3)][bV(0x1aa)]()&&(this['state'][bV(0x1b9)]=0x0,this[bV(0x173)]&&(this[bV(0x173)][bV(0x1a3)]['isPlaying']=!0x1),this[bV(0x13e)](u[bV(0x1c3)][bV(0x242)],w));}[bc(0x25e)](w){const bW=bc;this[bW(0x1d7)]()&&this[bW(0x1a3)][bW(0x164)]()&&((w=w||{})[bW(0x171)]=this['state']['timeSinceAdBreakStart'][bW(0x1e9)](),this['sendVideoAdAction'](u[bW(0x1c3)][bW(0x13d)],w),this['parentTracker']&&(this['parentTracker'][bW(0x1a3)]['isPlaying']=!0x0),this[bW(0x1fc)](),this[bW(0x173)]&&this[bW(0x1d7)]()&&this[bW(0x173)][bW(0x1a3)]['goLastAd']());}[bc(0x2b1)](w){const bX=bc;this['isAd']()&&((w=w||{})[bX(0x142)]||k['default']['warn'](bX(0x1bc)),w[bX(0x179)]=this[bX(0x1a3)][bX(0x179)][bX(0x1e9)](),this[bX(0x13e)](u['Events'][bX(0x149)],w),this[bX(0x1a3)]['goAdQuartile']());}['sendAdClick'](w){const bY=bc;this[bY(0x1d7)]()&&((w=w||{})['url']||k[bY(0x1a9)][bY(0x27d)](bY(0x1d6)),this['sendVideoAdAction'](u[bY(0x1c3)][bY(0x195)],w));}}function v(w){const bZ=bc;w['type']!==u[bZ(0x1c3)]['AD_ERROR']?this['sendVideoAdAction'](w[bZ(0x19b)],w[bZ(0x25b)]):this[bZ(0x161)](w['type'],w[bZ(0x25b)]);}u[bc(0x1c3)]={'PLAYER_READY':'PLAYER_READY','DOWNLOAD':bc(0x23a),'ERROR':bc(0x11e),'CONTENT_REQUEST':bc(0x11a),'CONTENT_START':bc(0x204),'CONTENT_END':'CONTENT_END','CONTENT_PAUSE':bc(0x29e),'CONTENT_RESUME':'CONTENT_RESUME','CONTENT_SEEK_START':'CONTENT_SEEK_START','CONTENT_SEEK_END':bc(0x297),'CONTENT_BUFFER_START':bc(0x16c),'CONTENT_BUFFER_END':bc(0x26d),'CONTENT_HEARTBEAT':'CONTENT_HEARTBEAT','CONTENT_RENDITION_CHANGE':bc(0x21f),'CONTENT_ERROR':bc(0x180),'AD_REQUEST':bc(0x274),'AD_START':bc(0x187),'AD_END':'AD_END','AD_PAUSE':bc(0x29f),'AD_RESUME':bc(0x200),'AD_SEEK_START':bc(0x27f),'AD_SEEK_END':bc(0x248),'AD_BUFFER_START':bc(0x1ec),'AD_BUFFER_END':bc(0x1c5),'AD_HEARTBEAT':bc(0x2aa),'AD_RENDITION_CHANGE':bc(0x13a),'AD_ERROR':bc(0x23c),'AD_BREAK_START':bc(0x242),'AD_BREAK_END':bc(0x13d),'AD_QUARTILE':bc(0x149),'AD_CLICK':bc(0x195)},g[bc(0x1a9)]=u;}},b={};function c(f){const c0=a0b;var g=b[f];if(void 0x0!==g)return g['exports'];var h=b[f]={'exports':{}};return a[f](h,h[c0(0x15c)],c),h[c0(0x15c)];}var d={};((()=>{const c1=a0b;var j=d;Object['defineProperty'](j,'__esModule',{'value':!0x0}),j[c1(0x1a9)]=void 0x0;var k=D(c(0x92)),m=D(c(0x196)),p=D(c(0x18f)),q=D(c(0x33)),v=D(c(0x1c7)),w=D(c(0x90)),x=D(c(0x238)),y=D(c(0x12e)),z=D(c(0x319)),B=D(c(0x148)),C=c(0x14a);function D(F){const c2=c1;return F&&F[c2(0x2af)]?F:{'default':F};}const E={'Constants':q[c1(0x1a9)],'Chrono':v[c1(0x1a9)],'Log':w[c1(0x1a9)],'Emitter':x['default'],'Tracker':y['default'],'VideoTracker':z['default'],'VideoTrackerState':B[c1(0x1a9)],'Core':p[c1(0x1a9)],'Backend':k['default'],'NRInsightsBackend':m['default'],'version':C[c1(0x123)]};j[c1(0x1a9)]=E;})()),module['exports'][c3(0x233)]=d;})()));function a0a(){const c4=['exports','exec','Safari','generateAttributes','playing','sendVideoErrorAction','offset','timeSinceAdPaused','goAdBreakEnd','Cast','startHeartbeat','_harvestLocked','videoHeight','isAutoplayed','TIMER','timeSinceLastRenditionChange','CONTENT_BUFFER_START','goRequest','instrumentation.version','Levels','adRenditionHeight','timeSinceAdBreakBegin','VideoCustomAction','parentTracker','resetFlags','6dyuLAd','adIsMuted','Win','calculateBufferType','timeSinceLastAdQuartile','goError','timeSinceLastAdHeartbeat','level','VideoAdAction','contentRenditionBitrate','registerListeners','CONTENT_ERROR','timeSinceLastDownload','base-tracker','Error:','addEventListener','json','reset','AD_START','recordCustomEvent','sendSeekStart','dispose','getDate','goSeekStart','referrer','search','isPlayerReady','isInitialBuffering','SILENT','sendBufferStart','NOTICE','resetChronos','AD_CLICK','splice','contentRenditionWidth','timeSinceBufferBegin','3015540XDPJJb','getTime','type','getHeartbeat','AD_END','apply','stop','contentTitle','_viewSession','slice','state','down','tag','isStarted','VideoAction','playtimeSinceLastEvent','default','goAdBreakStart','autoplay','color:\x20','timeSinceAdSeekBegin','getAdQuartile','timestamp','log','timeSinceResumed','HEARTBEAT','trackerInit','viewSession','getDuration','getAdCreativeId','getViewId','Opera','totalAdPlaytime','heartbeat','videoError','Called\x20sendAdQuartile\x20without\x20{\x20quartile:\x20xxxxx\x20}.','goRenditionChange','clone','numberOfAds','contentCdn','timeSinceLastAd','toString','Events','_heartbeatInterval','AD_BUFFER_END','timeSinceAdStarted','adRenditionWidth','send','abort','getRenditionBitrate','getPlayhead','prefix','customTimeSinceAttributes','POST','then','goPause','application/json','Called\x20sendDownload\x20without\x20{\x20state:\x20xxxxx\x20}.','sendVideoCustomAction','indexOf','totalPlaytime','Called\x20sendAdClick\x20without\x20{\x20url:\x20xxxxx\x20}.','isAd','currentUrl','pathname','performance','Firefox','isMuted','UNIX','currentSrc','customAction','addTracker','goBufferEnd','timeSinceSeekEnd','sendCustom','_viewCount','seeking','now','pause','getCdn','getDeltaTime','getInstrumentationName','pageUrl','AD_BUFFER_START','goHeartbeat','boolean','_actionTable','eventType','_userId','loadeddata','https://insights-collector.newrelic.com/v1/accounts/','goResume','getRenditionHeight','_eventBuffer','seek','preload','323938OVtpWT','2562928oAVQBE','sendPause','stopHeartbeat','adCreativeId','setAttribute','startTime','AD_RESUME','currentTime','MSIE','Chrome','CONTENT_START','getLanguage','1078892WFpcvM','adRenditionName','getPreload','Unknown','stringify','videoWidth','contentDuration','bind','forEach','_acc','catch','setIsAd','string','sendVideoAction','getVideoId','getBackend','webkitVideoDecodedByteCount','Tablet','timeSinceSeekBegin','defineProperty','isAdBreak','start','userAgent','location','contentIsAutoplayed','CONTENT_RENDITION_CHANGE','substring','Harvest\x20still\x20locked,\x20abort','contentPlayrate','numberOfErrors','trackerVersion','getAttributes','_lastBufferType','getPlayerVersion','unregisterListeners','_isAd','isBuffering','timeSinceAdBufferBegin','isSeeking','setOptions','getStateAttributes','bufferType','trackerName','error','pop','nrvideo','_apiKey','player','_bufferAcc','adSrc','timeSincePaused','ACTION_TABLE','DOWNLOAD','timeSinceRequested','AD_ERROR','undefined','getTitle','iOS','userAgentOS','removeTracker','AD_BREAK_START','addEventHandler','timeSinceAdRequested','adError','_attributes','getTrackers','AD_SEEK_END','actionName','getViewSession','getSrc','disposeAdsTracker','userAgentName','getFps','contentBitrate','sendPlayerReady','getBitrate','adsTracker','darkcyan','adjustElapsedTimeForPause','CONTENT_HEARTBEAT','goBufferStart','goStart','coreVersion','mid','entries','data','bufferElapsedTime','contentPlayhead','sendAdBreakEnd','getRenditionWidth','play','stopTime','initialBufferingHappened','getInstrumentationVersion','timeSinceStarted','timeSinceAdBreakStart','_eventType','_listeners','Tracker\x20','seeked','debugCommonVideoEvents:\x20No\x20common\x20listener\x20function\x20found\x20for\x20','notice','Mobile','CONTENT_BUFFER_END','contentLanguage','PLAYER_READY','off','connection','colorful','prototype','AD_REQUEST','ALL','WARNING','Tried\x20to\x20load\x20a\x20non-tracker.','Windows','duration','insightsRequestResponse','numberOfVideos','isLive','warn','round','AD_SEEK_START','instrumentation.name','pre','_createdAt','newrelic.recordCustomEvent()\x20is\x20not\x20available.','Event:\x20','sendError','goLastAd','initial','_trackerReadyChrono','goSeekEnd','adTitle','X11','loadstart','setAttributes','getAdPosition','length','setAdsTracker','Android','sendSeekEnd','origin','sendRenditionChanged','timeSinceLastHeartbeat','goPlayerReady','CONTENT_SEEK_END','pushEventToInsights','getPlayerName','isRequested','goAdQuartile','documentMode','goViewCountUp','CONTENT_PAUSE','AD_PAUSE','sendAdBreakStart','getAdPartner','darkorange','elapsedTime','getRenditionShift','Buffer\x20Type\x20=\x20','muted','getTrackerVersion','getRenditionName','112224gGpuda','AD_HEARTBEAT','emit','push','assign','random','__esModule','getInstrumentationProvider','sendAdQuartile','1154205WJhdTO','getElementById','adCdn','CONTENT_REQUEST','setPlayer','getPlayrate','_hb','ERROR','_actionAdTable','harvestHandler','darkred','function','version','_lastRendition','Mac','_lastWebkitBitrate','isArray','hidden','Desktop','sendHeartbeat','goDownload','src','getWebkitBitrate','includeTime','sendResume','CONTENT_RESUME','isPlaying','buffering','DEBUG','customData','ACTION_AD_TABLE','isPaused','setBackend','\x20is\x20ready.','adPosition','AD_RENDITION_CHANGE','Push\x20events\x20to\x20Insights\x20=\x20','Edge','AD_BREAK_END','sendVideoAdAction','adPartner','match','adPlayhead','quartile','call','parse','9096624vXHLhc','contentFps','deviceType','contentIsLive','AD_QUARTILE','7dFdtFo','_lastTimestamp','_lastAdRendition','getTrackerName','href','contentRenditionHeight','_accountId','setTimeSinceAttribute','stalled','sendStart','debug','cast','referrerUrl','shift','buildBufferAttributes','Linux','max','enduser.id'];a0a=function(){return c4;};return a0a();}
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ (()=>{"use strict";var e={51:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{}i.AdPositions={PRE:"pre",MID:"mid",POST:"post"},i.INTERVAL=1e4,i.MAX_EVENTS_PER_BATCH=1e3,i.MAX_PAYLOAD_SIZE=1,i.MAX_BEACON_SIZE=.0625,i.MAX_EVENT_SIZE=.0625,i.VALID_EVENT_TYPES=["VideoAction","VideoAdAction","VideoErrorAction","VideoCustomAction"],i.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=i},144:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{static error(...e){s(e,i.Levels.ERROR,"darkred")}static warn(...e){s(e,i.Levels.WARNING,"darkorange")}static notice(...e){s([].slice.call(arguments),i.Levels.NOTICE,"darkcyan")}static debug(...e){s(e,i.Levels.DEBUG,"indigo")}static debugCommonVideoEvents(e,t,s){try{if(i.level<=i.Levels.DEBUG){s=s||function(e){i.debug("Event: "+e.type)};var n=["canplay","buffering","waiting","ended","play","playing","pause","resume","error","abort","seek","seeking","seeked","stalled","dispose","loadeddata","loadstart","loadedmetadata"];t&&(null===t[0]?(t.shift(),n=t):n=n.concat(t));for(var r=0;r<n.length;r++)"function"==typeof e?e.call(window,n[r],s):e.on?e.on(n[r],s):e.addEventListener?e.addEventListener(n[r],s):e.addEventHandler?e.addEventHandler(n[r],s):i.warn("debugCommonVideoEvents: No common listener function found for ",e)}}catch(e){i.warn(e)}}}function s(e,t,s){t=t||i.Levels.NOTICE,s=s||"darkcyan";var a,o,d=i.prefix;i.includeTime&&(d+="["+("0"+(a=new Date).getDate()).slice(-2)+":"+("0"+a.getMinutes()).slice(-2)+":"+("0"+a.getSeconds()).slice(-2)+"."+("00"+a.getMilliseconds()).slice(-3)+"] "),d+=function(e){return r[e]}(t)+":",i.level<=t&&t!==i.Levels.SILENT&&(!i.colorful||"undefined"!=typeof document&&document.documentMode?n(e,d):(o=t===i.Levels.ERROR&&console.error?console.error:t===i.Levels.WARNING&&console.warn?console.warn:t===i.Levels.DEBUG&&console.debug&&null==window.cast?console.debug:console.log,d="%c"+d,e.splice(0,0,d,"color: "+s),o.apply(console,e)))}function n(e,t){if(e instanceof Array)for(var i in e)n(e[i],t);else"string"==typeof e?console.log(t+" "+e):(console.log(t+"↵"),console.log(e))}i.Levels={SILENT:5,ERROR:4,WARNING:3,NOTICE:2,DEBUG:1,ALL:0},i.level=i.Levels.ERROR,i.colorful=!0,i.includeTime=!0,i.prefix="[nrvideo]";const r={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]?i.level=i.Levels.ALL:i.level=e[1]),null!==/\?.*&*nrvideo-colors=false/i.exec(window.location.search)&&(i.colorful=!1)}}(),t.default=i},302:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(i(330)),n=o(i(568)),r=o(i(455)),a=o(i(51));function o(e){return e&&e.__esModule?e:{default:e}}class d extends n.default{constructor(e){super(),this.customData={},this.heartbeat=null,this.parentTracker=null,this._trackerReadyChrono=new r.default,this._trackerReadyChrono.start(),this._actionTable=a.default.ACTION_TABLE,this._actionAdTable=a.default.ACTION_AD_TABLE,e=e||{},this.setOptions(e)}setOptions(e){e&&(e.parentTracker&&(this.parentTracker=e.parentTracker),e.customData&&(this.customData=e.customData),e.heartbeat&&(this.heartbeat=e.heartbeat))}dispose(){this.unregisterListeners()}registerListeners(){}unregisterListeners(){}getHeartbeat(){return this.state._isAd?2e3:this.heartbeat?this.heartbeat:this.parentTracker&&this.parentTracker.heartbeat?this.parentTracker.heartbeat:3e4}startHeartbeat(){this._heartbeatInterval=setInterval(this.sendHeartbeat.bind(this),Math.max(this.getHeartbeat(),2e3))}stopHeartbeat(){this._heartbeatInterval&&clearInterval(this._heartbeatInterval)}sendHeartbeat(e){this.sendVideoAction(d.Events.HEARTBEAT,e)}getAttributes(e,t){(e=e||{}).trackerName=this.getTrackerName(),e.trackerVersion=this.getTrackerVersion(),e.coreVersion=s.default.version,e.timeSinceTrackerReady=this._trackerReadyChrono.getDeltaTime();for(let t in this.customData)e[t]=this.customData[t];return null!=document.hidden&&(e.isBackgroundEvent=document.hidden),e}getTrackerVersion(){return s.default.version}getTrackerName(){return"base-tracker"}sendVideoAction(e,t){this.emit("VideoAction",e,this.getAttributes(t))}sendVideoAdAction(e,t){this.emit("VideoAdAction",e,this.getAttributes(t))}sendVideoErrorAction(e,t){let i=this.isAd()?"adError":"videoError";this.emit("VideoErrorAction",e,this.getAttributes(t,i))}sendVideoCustomAction(e,t){this.emit("VideoCustomAction",e,this.getAttributes(t,"customAction"))}}d.Events={HEARTBEAT:"HEARTBEAT"},t.default=d},324:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NRVideoHarvester=void 0;var s=a(i(51)),n=a(i(330)),r=i(347);function a(e){return e&&e.__esModule?e:{default:e}}const{INTERVAL:o,MAX_EVENTS_PER_BATCH:d,MAX_PAYLOAD_SIZE:l,MAX_BEACON_SIZE:h}=s.default;t.NRVideoHarvester=class{#e=!1;#t;#i=null;constructor(e){this.#t=e,window.addEventListener("pagehide",(()=>this.triggerHarvest({isFinalHarvest:!0})))}startTimer(){if(this.#e)return;this.#e=!0;const e=()=>{this.triggerHarvest({}),this.#e&&(this.#i=setTimeout(e,o))};this.#i=setTimeout(e,o)}stopTimer(){this.#e=!1,this.#i&&(clearTimeout(this.#i),this.#i=null)}triggerHarvest(e={}){if(!this.#t.isEmpty())try{const t=this.#t.drain(),i=e.isFinalHarvest?h:l,s=this.chunkEvents(t,i);s.forEach(((t,i)=>{const n=i===s.length-1;this.sendChunk(t,e,n)}))}catch(e){console.error("Error during harvest:",e)}}chunkEvents(e,t){const i=[];let s=[];for(const n of e)if(s.length>=d&&(i.push(s),s=[]),s.push(n),(0,r.getPayloadSize)({ins:s})>t){const e=s.pop();s.length>0&&i.push(s),s=[e]}return s.length>0&&i.push(s),i}sendChunk(e,t,i){const s=this.#s();if(!s)return void this.#t.postHarvestCleanup({retry:!1,status:0});const n={body:{ins:e}};(0,r.callApi)({url:s,payload:n,options:t},(t=>{t.retry&&(t.chunk=e),this.#t.postHarvestCleanup(t)}))}#s(){try{if(!window.NRVIDEO||!window.NRVIDEO.info)throw new Error("NRVIDEO info is not available.");const{beacon:e,licenseKey:t,applicationID:i,sa:s}=window.NRVIDEO.info;if(!e||!t||!i)throw new Error("Options object provided by New Relic is not correctly initialized");return`https://${e}/ins/1/${t}?a=${i}&v=${n.default.version}&ref=${window.location.href}&ca=VA`}catch(e){return console.error(e.message),null}}}},328:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=r(i(455)),n=r(i(144));function r(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(){this.reset(),this._createdAt=Date.now(),this._hb=!0,this._acc=0,this._bufferAcc=0}reset(){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()}resetFlags(){this.isPlayerReady=!1,this.isRequested=!1,this.isStarted=!1,this.isPaused=!1,this.isSeeking=!1,this.isBuffering=!1,this.isPlaying=!1}resetChronos(){this.timeSinceRequested=new s.default,this.timeSinceStarted=new s.default,this.timeSincePaused=new s.default,this.timeSinceSeekBegin=new s.default,this.timeSinceBufferBegin=new s.default,this.timeSinceAdBreakStart=new s.default,this.timeSinceLastDownload=new s.default,this.timeSinceLastHeartbeat=new s.default,this.timeSinceLastRenditionChange=new s.default,this.timeSinceLastAdQuartile=new s.default,this.timeSinceLastAd=new s.default,this.timeSinceResumed=new s.default,this.timeSinceSeekEnd=new s.default,this.playtimeSinceLastEvent=new s.default,this.customTimeSinceAttributes={},this.elapsedTime=new s.default,this.bufferElapsedTime=new s.default}isAd(){return this._isAd}setIsAd(e){this._isAd=e}setTimeSinceAttribute(e){this.customTimeSinceAttributes[e]=new s.default,this.customTimeSinceAttributes[e].start()}removeTimeSinceAttribute(e){delete this.customTimeSinceAttributes[e]}getViewSession(){if(!this._viewSession){let e=(new Date).getTime(),t=Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2);this._viewSession=e+"-"+t}return this._viewSession}getViewId(){return this.getViewSession()+"-"+this._viewCount}getStateAttributes(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(const[t,i]of Object.entries(this.customTimeSinceAttributes))e[t]=i.getDeltaTime();return e}calculateBufferType(e){let t="";return t=e?"initial":this.isSeeking?"seek":this.isPaused?"pause":"connection",n.default.debug("Buffer Type = "+t),t}goViewCountUp(){this._viewCount++}goPlayerReady(){return!this.isPlayerReady&&(this.isPlayerReady=!0,!0)}goRequest(){return!this.isRequested&&(this.isRequested=!0,this.timeSinceLastAd.reset(),this.timeSinceRequested.start(),!0)}goStart(){return!(!this.isRequested||this.isStarted||(this.isAd()?this.numberOfAds++:this.numberOfVideos++,this.isStarted=!0,this.isPlaying=!0,this.timeSinceStarted.start(),this.playtimeSinceLastEvent.start(),0))}goEnd(){return!!this.isRequested&&(this.numberOfErrors=0,this.resetFlags(),this.timeSinceRequested.stop(),this.timeSinceStarted.stop(),this.playtimeSinceLastEvent.stop(),!0)}goPause(){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))}goResume(){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))}goBufferStart(){return!(!this.isRequested||this.isBuffering||(this.isBuffering=!0,this.isPlaying=!1,this.timeSinceBufferBegin.start(),this.bufferElapsedTime.start(),0))}goBufferEnd(){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))}goSeekStart(){return!(!this.isStarted||this.isSeeking||(this.isSeeking=!0,this.isPlaying=!1,this.timeSinceSeekBegin.start(),this.timeSinceSeekEnd.reset(),0))}goSeekEnd(){return!(!this.isStarted||!this.isSeeking||(this.isSeeking=!1,this.isPlaying=!0,this.timeSinceSeekBegin.stop(),this.timeSinceSeekEnd.start(),0))}goAdBreakStart(){return!this.isAdBreak&&(this.isAdBreak=!0,this.timeSinceAdBreakStart.start(),!0)}goAdBreakEnd(){return!!this.isAdBreak&&(this.isRequested=!1,this.isAdBreak=!1,this.totalAdPlaytime=this.timeSinceAdBreakStart.getDeltaTime(),this.timeSinceAdBreakStart.stop(),!0)}goDownload(){this.timeSinceLastDownload.start()}goHeartbeat(){this.timeSinceLastHeartbeat.start()}goRenditionChange(){this.timeSinceLastRenditionChange.start()}goAdQuartile(){this.timeSinceLastAdQuartile.start()}goError(){this.isError=!0,this.numberOfErrors++}goLastAd(){this.timeSinceLastAd.start()}}},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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callApi=function({url:e,payload:t,options:i={}},s){if(!e||!t||!s)return console.error("callApi: Missing required parameters"),void(s&&s({retry:!1,status:0}));let n;try{n=JSON.stringify(t.body)}catch(e){return console.error("callApi: Error serializing payload",e),void s({retry:!1,status:0})}if(i.isFinalHarvest&&navigator.sendBeacon)try{const t=navigator.sendBeacon(e,n);s({retry:!t,status:t?200:0})}catch(e){s({retry:!0,status:0})}else fetch(e,{method:"POST",body:n,headers:{"Content-Type":"application/json"},keepalive:i.isFinalHarvest}).then((e=>{const t=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);s({retry:t,status:e.status,ok:e.ok})})).catch((()=>{s({retry:!0,status:0})}))},t.getPayloadSize=function(e){if(!e||"object"!=typeof e)return 0;try{const 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 s,n=(s=i(144))&&s.__esModule?s:{default:s},r=i(449),a=i(418);class o{static addTracker(e,t){(0,a.setAuthConfig)(t.info),e.on&&e.emit?(d.push(e),e.on("*",l),"function"==typeof e.trackerInit&&e.trackerInit()):n.default.error("Tried to load a non-tracker.",e)}static removeTracker(e){e.off("*",l),e.dispose();let t=d.indexOf(e);-1!==t&&d.splice(t,1)}static getTrackers(){return d}static send(e,t,i){i.timeSinceLoad=window.performance.now()/1e3,(0,r.recordEvent)(e,{actionName:t,...i})}static sendError(e){o.send("ERROR",e)}}let d=[];function l(e){let t=function(e){let t={};for(let i in e)null!==e[i]&&void 0!==e[i]&&(t[i]=e[i]);return t}(e.data);n.default.level<=n.default.Levels.DEBUG?n.default.notice("Sent",e.type,t):n.default.notice("Sent",e.type),o.send(e.eventType,e.type,t)}t.default=o},418:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setAuthConfig=function(e){try{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("setAuthConfig: info parameter must be a valid object");if(function(e){if(!e||"object"!=typeof e)return!1;const{licenseKey:t,appName:i,region:s,applicationID:n,beacon:r}=e;return!(!t||"string"!=typeof t||0===t.trim().length)&&(n?!!(r&&"string"==typeof r&&r.trim().length>0):!!(i&&"string"==typeof i&&i.trim().length>0&&s&&"string"==typeof s&&s.trim().length>0))}(e)){const{licenseKey:t,appName:i,region:s,beacon:n,sa:a,applicationID:o}=e;window.NRVIDEO=window.NRVIDEO||{};let d=n;if(!d&&s){if(!r[s])throw new Error(`setAuthConfig: Invalid region '${s}'. Valid regions: ${Object.keys(r).join(", ")}`);d=r[s]}return window.NRVIDEO.info={beacon:d,licenseKey:t,applicationID:o||null,appName:i||null,sa:a||0},!0}{const t=function(e){if(!e||"object"!=typeof e)return"info parameter must be a valid object";const{licenseKey:t,appName:i,region:s,applicationID:n,beacon:r}=e;if(!t||"string"!=typeof t||0===t.trim().length)return"licenseKey is required and must be a non-empty string";if(n){if(!r||"string"!=typeof r||0===r.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(!s||"string"!=typeof s||0===s.trim().length)return"region is required when not using applicationID"}return"configuration validation failed"}(e);throw new Error(`setAuthConfig: ${t}`)}}catch(e){return console.error("setAuthConfig:",e.message),!1}};var s,n=(s=i(51))&&s.__esModule?s:{default:s};const{COLLECTOR:r}=n.default},431:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NRVideoEventAggregator=void 0;var s,n=i(347),r=(s=i(51))&&s.__esModule?s:{default:s};const{MAX_EVENTS_PER_BATCH:a,MAX_PAYLOAD_SIZE:o}=r.default;t.NRVideoEventAggregator=class{#n=[];#r=[];isEmpty(){return 0===this.#n.length&&0===this.#r.length}drain(){const e=[...this.#r,...this.#n];return this.#n=[],this.#r=[],e}add(e){this.#n.push(e)}postHarvestCleanup(e){if(e.retry&&e.chunk?.length){for(;this.#r.length>0&&((0,n.getPayloadSize)(this.#r)+(0,n.getPayloadSize)(e.chunk)>o||this.#r.length+e.chunk.length>a);)this.#r.shift();this.#r.push(...e.chunk)}else this.#r=[]}}},449:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.recordEvent=function(e,t={}){if("string"!=typeof e||0===e.length||!o.includes(e))return console.warn("recordEvent: Invalid eventType provided:",e),!1;if(null!==t&&("object"!=typeof 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{const{appName:i}=window.NRVIDEO.info,s={...t,eventType:e,appName:i,timestamp:Date.now()},a=(0,r.getPayloadSize)(s);return a>d?(console.warn(`recordEvent: Event size (${a} bytes) exceeds maximum (${d} bytes)`),!1):(n.customEventAggregator.add(s),!0)}catch(e){return console.error("recordEvent: Error recording event:",e),!1}};var s,n=i(487),r=i(347),a=(s=i(51))&&s.__esModule?s:{default:s};const{VALID_EVENT_TYPES:o,MAX_EVENT_SIZE:d}=a.default},455:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{constructor(){this.reset()}reset(){this.startTime=0,this.stopTime=0,this.offset=0}getDeltaTime(){return this.startTime?this.offset+((new Date).getTime()-this.startTime):null}start(){this.startTime=(new Date).getTime(),this.stopTime=0}stop(){return this.stopTime=(new Date).getTime(),this.getDeltaTime()}clone(){var e=new i;return e.startTime=this.startTime,e.stopTime=this.stopTime,e.offset=this.offset,e}}t.default=i},487:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.customEventAggregator=void 0;var s=i(431),n=i(324);const r=t.customEventAggregator=new s.NRVideoEventAggregator;new n.NRVideoHarvester(r).startTimer()},568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{on(e,t){if(this._listeners=this._listeners||{},"function"==typeof t)return this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t),this}off(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}emit(e,t,i){return this._listeners=this._listeners||{},i=i||{},Array.isArray(this._listeners[t])&&this._listeners[t].forEach((s=>{s.call(this,{eventType:e,type:t,data:i,target:this})})),Array.isArray(this._listeners["*"])&&this._listeners["*"].forEach((s=>{s.call(this,{eventType:e,type:t,data:i,target:this})})),this}}},793:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(i(144)),n=o(i(302)),r=o(i(328)),a=o(i(330));function o(e){return e&&e.__esModule?e:{default:e}}class d extends n.default{constructor(e,t){super(),this.state=new r.default,this.adsTracker=null,this._lastBufferType=null,this._userId=null,t=t||{},this.setOptions(t),e&&this.setPlayer(e,t.tag),s.default.notice("Tracker "+this.getTrackerName()+" v"+this.getTrackerVersion()+" is ready.")}setUserId(e){this._userId=e}setOptions(e){e&&(e.adsTracker&&this.setAdsTracker(e.adsTracker),"boolean"==typeof e.isAd&&this.setIsAd(e.isAd),n.default.prototype.setOptions.apply(this,arguments))}setPlayer(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()}isAd(){return this.state.isAd()}setIsAd(e){this.state.setIsAd(e)}setAdsTracker(e){this.disposeAdsTracker(),e&&(this.adsTracker=e,this.adsTracker.setIsAd(!0),this.adsTracker.parentTracker=this,this.adsTracker.on("*",l.bind(this)))}disposeAdsTracker(){this.adsTracker&&(this.adsTracker.off("*",l),this.adsTracker.dispose())}dispose(){this.stopHeartbeat(),this.disposeAdsTracker(),this.unregisterListeners(),this.player=null,this.tag=null}registerListeners(){}unregisterListeners(){}getViewId(){return this.parentTracker?this.parentTracker.getViewId():this.state.getViewId()}getViewSession(){return this.parentTracker?this.parentTracker.getViewSession():this.state.getViewSession()}getVideoId(){return null}getTitle(){return null}isLive(){return null}getBitrate(){return null}getWebkitBitrate(){if(this.tag&&this.tag.webkitVideoDecodedByteCount){let e;if(this._lastWebkitBitrate){e=this.tag.webkitVideoDecodedByteCount;let t=e-this._lastWebkitBitrate,i=this.getHeartbeat()/1e3;e=Math.round(t/i*8)}return this._lastWebkitBitrate=this.tag.webkitVideoDecodedByteCount,e||null}}getRenditionName(){return null}getRenditionBitrate(){return null}getRenditionShift(e){let 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}getRenditionHeight(){return this.tag?this.tag.videoHeight:null}getRenditionWidth(){return this.tag?this.tag.videoWidth:null}getDuration(){return this.tag?this.tag.duration:null}getPlayhead(){return this.tag?this.tag.currentTime:null}getLanguage(){return null}getSrc(){return this.tag?this.tag.currentSrc:null}getPlayrate(){return this.tag?this.tag.playbackRate:null}isMuted(){return this.tag?this.tag.muted:null}isFullscreen(){return null}getCdn(){return null}getPlayerName(){return this.getTrackerName()}getPlayerVersion(){return a.default.version}getFps(){return null}isAutoplayed(){return this.tag?this.tag.autoplay:null}getPreload(){return this.tag?this.tag.preload:null}getAdQuartile(){return null}getAdPosition(){return this.parentTracker?this.parentTracker.state.isStarted?"mid":"pre":null}getAdPartner(){return null}getAdCreativeId(){return null}getInstrumentationProvider(){return null}getInstrumentationName(){return null}getInstrumentationVersion(){return null}getAttributes(e,t){if(void 0===(e=n.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){}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);for(let t in this.customData)e[t]=this.customData[t];return e}sendCustom(e,t,i){i=i||{},this.sendVideoCustomAction(e,i),this.state.setTimeSinceAttribute(t)}sendPlayerReady(e){this.state.goPlayerReady()&&(e=e||{},this.sendVideoAction(d.Events.PLAYER_READY,e))}sendRequest(e){if(this.state.goRequest()){let t;this.isAd()?(t=d.Events.AD_REQUEST,this.sendVideoAdAction(t,e)):(t=d.Events.CONTENT_REQUEST,this.sendVideoAction(t,e))}}sendStart(e){if(this.state.goStart()){let t;this.isAd()?(t=d.Events.AD_START,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(t,e)):(t=d.Events.CONTENT_START,this.sendVideoAction(t,e)),this.startHeartbeat(),this.state.goHeartbeat()}}sendEnd(e){if(this.state.goEnd()){let t;e=e||{},this.isAd()?(t=d.Events.AD_END,e.timeSinceAdRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceAdStarted=this.state.timeSinceStarted.getDeltaTime(),this.parentTracker&&(this.parentTracker.state.isPlaying=!0)):(t=d.Events.CONTENT_END,e.timeSinceRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceStarted=this.state.timeSinceStarted.getDeltaTime()),this.stopHeartbeat(),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd(),this.state.goViewCountUp(),this.state.totalPlaytime=0}}sendPause(e){if(this.state.goPause()){let t=this.isAd()?d.Events.AD_PAUSE:d.Events.CONTENT_PAUSE;this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendResume(e){if(this.state.goResume()){let t;e=e||{},this.isAd()?(t=d.Events.AD_RESUME,e.timeSinceAdPaused=this.state.timeSincePaused.getDeltaTime()):(t=d.Events.CONTENT_RESUME,e.timeSincePaused=this.state.timeSincePaused.getDeltaTime()),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendBufferStart(e){if(this.state.goBufferStart()){let t;e=e||{},t=this.isAd()?d.Events.AD_BUFFER_START:d.Events.CONTENT_BUFFER_START,e=this.buildBufferAttributes(e),this._lastBufferType=e.bufferType,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendBufferEnd(e){if(this.state.goBufferEnd()){let t;e=e||{},this.isAd()?(t=d.Events.AD_BUFFER_END,e.timeSinceAdBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()):(t=d.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(t,e):this.sendVideoAction(t,e),this.state.initialBufferingHappened=!0}}buildBufferAttributes(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}sendSeekStart(e){if(this.state.goSeekStart()){let t;t=this.isAd()?d.Events.AD_SEEK_START:d.Events.CONTENT_SEEK_START,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendSeekEnd(e){if(this.state.goSeekEnd()){let t;e=e||{},this.isAd()?(t=d.Events.AD_SEEK_END,e.timeSinceAdSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()):(t=d.Events.CONTENT_SEEK_END,e.timeSinceSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendDownload(e){(e=e||{}).state||s.default.warn("Called sendDownload without { state: xxxxx }."),this.sendVideoAction(d.Events.DOWNLOAD,e),this.state.goDownload()}sendError(e){(e=e||{}).isAd=this.isAd(),this.state.goError();let t=this.isAd()?d.Events.AD_ERROR:d.Events.CONTENT_ERROR;this.sendVideoErrorAction(t,e)}sendRenditionChanged(e){let t;(e=e||{}).timeSinceLastRenditionChange=this.state.timeSinceLastRenditionChange.getDeltaTime(),e.shift=this.getRenditionShift(!0),t=this.isAd()?d.Events.AD_RENDITION_CHANGE:d.Events.CONTENT_RENDITION_CHANGE,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e),this.state.goRenditionChange()}sendHeartbeat(e){if(this.state.isRequested){let t,i=this.getHeartbeat();this.state._hb=!0,i=this.adjustElapsedTimeForPause(i),this.isAd()?(t=d.Events.AD_HEARTBEAT,"bitmovin-ads"===this.getPlayerName()?this.sendVideoAdAction(t,e):this.sendVideoAdAction(t,{elapsedTime:i,...e})):(t=d.Events.CONTENT_HEARTBEAT,this.sendVideoAction(t,{elapsedTime:i,...e})),this.state.goHeartbeat()}}adjustElapsedTimeForPause(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)}sendAdBreakStart(e){this.isAd()&&this.state.goAdBreakStart()&&(this.state.totalAdPlaytime=0,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(d.Events.AD_BREAK_START,e))}sendAdBreakEnd(e){this.isAd()&&this.state.goAdBreakEnd()&&((e=e||{}).timeSinceAdBreakBegin=this.state.timeSinceAdBreakStart.getDeltaTime(),this.sendVideoAdAction(d.Events.AD_BREAK_END,e),this.parentTracker&&(this.parentTracker.state.isPlaying=!0),this.stopHeartbeat(),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd())}sendAdQuartile(e){this.isAd()&&((e=e||{}).quartile||s.default.warn("Called sendAdQuartile without { quartile: xxxxx }."),e.timeSinceLastAdQuartile=this.state.timeSinceLastAdQuartile.getDeltaTime(),this.sendVideoAdAction(d.Events.AD_QUARTILE,e),this.state.goAdQuartile())}sendAdClick(e){this.isAd()&&((e=e||{}).url||s.default.warn("Called sendAdClick without { url: xxxxx }."),this.sendVideoAdAction(d.Events.AD_CLICK,e))}}function l(e){e.type!==d.Events.AD_ERROR?this.sendVideoAdAction(e.type,e.data):this.sendVideoErrorAction(e.type,e.data)}d.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=d}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,i),r.exports}var s={};(()=>{var e=s;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=c(i(399)),n=c(i(51)),r=c(i(455)),a=c(i(144)),o=c(i(568)),d=c(i(302)),l=c(i(793)),h=c(i(328)),u=i(330);function c(e){return e&&e.__esModule?e:{default:e}}const g={Constants:n.default,Chrono:r.default,Log:a.default,Emitter:o.default,Tracker:d.default,VideoTracker:l.default,VideoTrackerState:h.default,Core:t.default,version:u.version};e.default=g})(),module.exports.nrvideo=s})();
3
+ //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @license Apache-2.0
3
- * @newrelic/video-core 3.1.1
3
+ * @newrelic/video-core 3.2.0-beta-1
4
4
  * Copyright New Relic <http://newrelic.com/>
5
5
  * @author Jordi Aguilar
6
6
  */