@clickview/player 1.44.0-rc.2 → 1.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -258,7 +258,7 @@ __p+='`),l}),a+=`';
258
258
  </svg>
259
259
  `;class xx extends dAe{constructor(e,t){super(e,t)}createEl(){const e=fAe.prototype.createEl.call(this,"button",{className:this.buildCSSClass()},{type:"button",title:this.controlText_});return e.innerHTML=pAe,this.createControlTextEl(e),e}handleClick(e){var t;e.stopPropagation(),e.preventDefault(),(t=this.options_)!=null&&t.onClick&&this.options_.onClick()}buildCSSClass(){return"cv-remove-video-button"}}_e.registerComponent("removeVideoButton",xx),xx.prototype.controlText_="Remove from watch history";const cee="cvplayer-playback-quality",hee="cvplayer-localcache-playback-quality";class Yl{static isQualityUserPreference(){const e=localStorage.getItem(cee),t=localStorage.getItem(hee);return!!(e||t)}static getPlayerMode(e){var o,u,l,h,f,p,g;const t=((o=e.isFullscreen)==null?void 0:o.call(e))??!1,n=((u=e.usingPlugin)==null?void 0:u.call(e,"playerModePlugin"))?((h=(l=e.playerModePlugin())==null?void 0:l.isHovering)==null?void 0:h.call(l))??!1:!1,s=((f=e.usingPlugin)==null?void 0:f.call(e,"theatreModePlugin"))?((g=(p=e.theatreModePlugin())==null?void 0:p.getTheatreMode)==null?void 0:g.call(p))??!1:!1;return t?"fullscreen":n?"hover":s?"theatre":"default"}static getKnownProfiles(){return["1080","720","480","360","240"]}static enableProfileOrNextBest(e,t){let i=e.getQualityLevelById(t);if(i||(i=this.getNextBestQuality(e,t)),!i)return null;for(let n=0;n<e.length;n++){const a=e[n];a.enabled=i.id===a.id}return i}static getNextBestQuality(e,t){const i=this.getKnownProfiles(),n=i.indexOf(t);if(n>=0){for(let a=n+1;a<i.length;a++){const s=i[a],o=e.getQualityLevelById(s);if(o)return o}for(let a=n-1;a>0;a--){const s=i[a],o=e.getQualityLevelById(s);if(o)return o}}return null}}var Ix=(r=>(r.Default="play",r.Hover="hover",r))(Ix||{});const gAe=_e.getPlugin("plugin"),dee="cv-preview-mode",fee="cv-force-16-9";class vAe extends gAe{constructor(e,t){super(e),this.hasSeeked=!1,this.buttonAdded=!1,this.mode=null,this.defaultDisplayMode="normal",this.onQualityReady=null,t!=null&&t.defaultDisplayMode&&(this.defaultDisplayMode=t.defaultDisplayMode),t!=null&&t.startTime&&(this.startTime=t.startTime),this.onSeek=this.onSeek.bind(this),this.player.one("seeking",this.onSeek)}onSeek(){this.hasSeeked=!0}dispose(){this.cleanupQualityListener(),this.player.off("seeking",this.onSeek),super.dispose()}getMode(){return this.mode}isHovering(){return this.mode==="hover"}setPlayerMode(e,t,i){this.player.trigger("flushprogress");const n=this.mode;if(this.mode=e,e==="hover"){this.buttonAdded||this.addButtons(t,i),this.player.addClass(dee),this.applyAspectRatioFix(),this.enableSubtitles(),this.mute(),this.setLowQuality(),this.removeActivityTimeout(),this.player.trigger("resize");return}n==="hover"&&(this.applyDefaultModeLayout(),this.player.removeClass(dee),this.player.removeClass(fee),this.disableSubtitles(),this.unmute(),this.cleanupQualityListener(),this.restorePreviousQuality(),this.restoreActivityTimeout(),this.player.trigger("resize"),this.hasSeeked||(this.player.currentTime(this.startTime??0),this.hasSeeked=!1))}applyDefaultModeLayout(){var t,i,n,a;const e=(i=(t=this.player).usingPlugin)==null?void 0:i.call(t,"theatreModePlugin");this.defaultDisplayMode==="theatre"?(e&&((n=this.player.theatreModePlugin())==null||n.toggleTheatreMode(!0)),this.player.fill(!0)):(e&&((a=this.player.theatreModePlugin())==null||a.toggleTheatreMode(!1)),this.player.fluid(!0))}applyAspectRatioFix(){const e=()=>{const t=this.player.videoWidth(),i=this.player.videoHeight();if(t>0&&i>0){const n=t/i;Math.abs(n-16/9)<.01||this.player.addClass(fee)}};this.player.readyState()>=1?e():this.player.one("loadedmetadata",e)}addButtons(e,t){const i=new Ax(this.player),n=new lee(this.player,{onClickHandler:e}),a=new xx(this.player,{onClick:t});t&&jh.isFunction(t)&&this.player.addChild(a),this.player.addChild(i),this.player.addChild(n),this.buttonAdded=!0}enableSubtitles(){this.player.dataLoaded(()=>this.player.persistSubtitleSettingsPlugin().previewModeSubtitles())}disableSubtitles(){this.player.dataLoaded(()=>this.player.persistSubtitleSettingsPlugin().applyUserPreferences())}mute(){this.player.ready(()=>{this.player.persistVolumePlugin().disable(),this.player.muted(!0)})}unmute(){this.player.ready(()=>{this.player.persistVolumePlugin().applyUserPreferences(),this.player.persistVolumePlugin().enable()})}setLowQuality(){this.player.dataLoaded(()=>{this.player.persistQualitySettingsPlugin().disable();const e=this.player.qualityLevels();if(e.length>0){this.switchToLowestQuality(e);return}this.cleanupQualityListener(),this.onQualityReady=()=>{this.onQualityReady=null,this.switchToLowestQuality(e)},e.one("change",this.onQualityReady)})}cleanupQualityListener(){this.onQualityReady&&(this.player.qualityLevels().off("change",this.onQualityReady),this.onQualityReady=null)}switchToLowestQuality(e){const t=this.getLowestAvailableQuality(e);t&&Yl.enableProfileOrNextBest(e,t.id)}getLowestAvailableQuality(e){const t=[...Yl.getKnownProfiles()].reverse();for(const i of t){const n=e.getQualityLevelById(i);if(n)return n}return null}restorePreviousQuality(){this.player.dataLoaded(()=>{this.player.persistQualitySettingsPlugin().applyUserPreferences(),this.player.persistQualitySettingsPlugin().enable()})}removeActivityTimeout(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}restoreActivityTimeout(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}_e.registerPlugin("playerModePlugin",vAe);const pee={getStorage(){return window.localStorage?window.localStorage:window.sessionStorage?window.sessionStorage:pee.getMemoryStorage()},getMemoryStorage(){const r=new Map;return{setItem(e,t){r.set(e,t)},getItem(e){return r.get(e)},removeItem(e){r.delete(e)},clear(){r.clear()},get length(){return r.size},key(e){return Array.from(r.values())[e]}}}};var Hh=(r=>(r.LocalStorage="localStorage",r.SessionStorage="sessionStorage",r.MemoryStorage="memoryStorage",r))(Hh||{});class Px{constructor(e){if(this.cachePrefix="_cv:",this.expireTime=3600,this.type=e.type,this.hasSupport=this.hasBrowserSupport(),!!this.hasSupport)try{this.type==="memoryStorage"?this.storage=pee.getMemoryStorage():this.storage=window[this.type]}catch{}}isAvailable(){return this.hasSupport}get(e){if(!this.hasSupport)return;const t=this.storage.getItem(e);try{return JSON.parse(t)}catch{return t}}set(e,t){if(this.hasSupport)try{return this.storage.removeItem(e),typeof t!="string"?(this.storage.setItem(e,JSON.stringify(t)),!0):(this.storage.setItem(e,t),!0)}catch{return!1}}remove(e){if(this.hasSupport)return this.storage.removeItem(e)}length(){if(this.hasSupport)return this.storage.length}clear(){if(this.hasSupport)return this.storage.clear()}cacheSet(e,t,i=this.expireTime){this.cacheClean();const n={time:this.getCurrentTime()+i*1e3,data:typeof t<"u"&&t!==null&&t};return this.set(`${this.cachePrefix}${e}`,n)}cacheGet(e){const t=`${this.cachePrefix}${e}`,i=this.get(t);return i?this.isExpired(i)?(this.remove(t),null):i.data:null}cacheExists(e){const t=`${this.cachePrefix}${e}`,i=this.get(t);return i?this.isExpired(i)?(this.remove(t),!1):!0:!1}cacheRemove(e){return this.remove(`${this.cachePrefix}${e}`)}cacheFlush(){this.cacheClean()}cacheClean(){if(this.hasSupport)for(let e=0;e<this.storage.length;e++){const t=this.storage.key(e);if(t.indexOf(this.cachePrefix)===0){const i=this.get(t);i&&i.time&&this.isExpired(i)&&this.remove(t)}}}isExpired(e){return e.time<this.getCurrentTime()}getCurrentTime(){return new Date().getTime()}hasBrowserSupport(){if(this.type==="memoryStorage")return!0;try{return this.type in window&&window[this.type]!==null}catch{return!1}}}class mAe extends Px{static get Instance(){return this.instance||(this.instance=new this({type:"localStorage"}))}}class yAe extends Px{static get Instance(){return this.instance||(this.instance=new this({type:"sessionStorage"}))}}class _Ae extends Px{static get Instance(){return this.instance||(this.instance=new this({type:"memoryStorage"}))}}const ms=mAe.Instance,gee=yAe.Instance,vee=_Ae.Instance,mee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function yee(r,e,t,i){let n,a,s;const o=e||[0],u=(t=t||0)>>>3,l=i===-1?3:0;for(n=0;n<r.length;n+=1)s=n+u,a=s>>>2,o.length<=a&&o.push(0),o[a]|=r[n]<<8*(l+i*(s%4));return{value:o,binLen:8*r.length+t}}function kx(r,e,t){switch(e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(i,n,a){return(function(s,o,u,l){let h,f,p,g;if(s.length%2!=0)throw new Error("String of HEX type must be in byte increments");const _=o||[0],m=(u=u||0)>>>3,T=l===-1?3:0;for(h=0;h<s.length;h+=2){if(f=parseInt(s.substr(h,2),16),isNaN(f))throw new Error("String of HEX type contains invalid characters");for(g=(h>>>1)+m,p=g>>>2;_.length<=p;)_.push(0);_[p]|=f<<8*(T+l*(g%4))}return{value:_,binLen:4*s.length+u}})(i,n,a,t)};case"TEXT":return function(i,n,a){return(function(s,o,u,l,h){let f,p,g,_,m,T,S,w,R=0;const O=u||[0],C=(l=l||0)>>>3;if(o==="UTF8")for(S=h===-1?3:0,g=0;g<s.length;g+=1)for(f=s.charCodeAt(g),p=[],128>f?p.push(f):2048>f?(p.push(192|f>>>6),p.push(128|63&f)):55296>f||57344<=f?p.push(224|f>>>12,128|f>>>6&63,128|63&f):(g+=1,f=65536+((1023&f)<<10|1023&s.charCodeAt(g)),p.push(240|f>>>18,128|f>>>12&63,128|f>>>6&63,128|63&f)),_=0;_<p.length;_+=1){for(T=R+C,m=T>>>2;O.length<=m;)O.push(0);O[m]|=p[_]<<8*(S+h*(T%4)),R+=1}else for(S=h===-1?2:0,w=o==="UTF16LE"&&h!==1||o!=="UTF16LE"&&h===1,g=0;g<s.length;g+=1){for(f=s.charCodeAt(g),w===!0&&(_=255&f,f=_<<8|f>>>8),T=R+C,m=T>>>2;O.length<=m;)O.push(0);O[m]|=f<<8*(S+h*(T%4)),R+=2}return{value:O,binLen:8*R+l}})(i,e,n,a,t)};case"B64":return function(i,n,a){return(function(s,o,u,l){let h,f,p,g,_,m,T,S=0;const w=o||[0],R=(u=u||0)>>>3,O=l===-1?3:0,C=s.indexOf("=");if(s.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(s=s.replace(/=/g,""),C!==-1&&C<s.length)throw new Error("Invalid '=' found in base-64 string");for(f=0;f<s.length;f+=4){for(_=s.substr(f,4),g=0,p=0;p<_.length;p+=1)h=mee.indexOf(_.charAt(p)),g|=h<<18-6*p;for(p=0;p<_.length-1;p+=1){for(T=S+R,m=T>>>2;w.length<=m;)w.push(0);w[m]|=(g>>>16-8*p&255)<<8*(O+l*(T%4)),S+=1}}return{value:w,binLen:8*S+u}})(i,n,a,t)};case"BYTES":return function(i,n,a){return(function(s,o,u,l){let h,f,p,g;const _=o||[0],m=(u=u||0)>>>3,T=l===-1?3:0;for(f=0;f<s.length;f+=1)h=s.charCodeAt(f),g=f+m,p=g>>>2,_.length<=p&&_.push(0),_[p]|=h<<8*(T+l*(g%4));return{value:_,binLen:8*s.length+u}})(i,n,a,t)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch{throw new Error("ARRAYBUFFER not supported by this environment")}return function(i,n,a){return(function(s,o,u,l){return yee(new Uint8Array(s),o,u,l)})(i,n,a,t)};case"UINT8ARRAY":try{new Uint8Array(0)}catch{throw new Error("UINT8ARRAY not supported by this environment")}return function(i,n,a){return yee(i,n,a,t)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function _ee(r,e,t,i){switch(r){case"HEX":return function(n){return(function(a,s,o,u){let l,h,f="";const p=s/8,g=o===-1?3:0;for(l=0;l<p;l+=1)h=a[l>>>2]>>>8*(g+o*(l%4)),f+="0123456789abcdef".charAt(h>>>4&15)+"0123456789abcdef".charAt(15&h);return u.outputUpper?f.toUpperCase():f})(n,e,t,i)};case"B64":return function(n){return(function(a,s,o,u){let l,h,f,p,g,_="";const m=s/8,T=o===-1?3:0;for(l=0;l<m;l+=3)for(p=l+1<m?a[l+1>>>2]:0,g=l+2<m?a[l+2>>>2]:0,f=(a[l>>>2]>>>8*(T+o*(l%4))&255)<<16|(p>>>8*(T+o*((l+1)%4))&255)<<8|g>>>8*(T+o*((l+2)%4))&255,h=0;h<4;h+=1)_+=8*l+6*h<=s?mee.charAt(f>>>6*(3-h)&63):u.b64Pad;return _})(n,e,t,i)};case"BYTES":return function(n){return(function(a,s,o){let u,l,h="";const f=s/8,p=o===-1?3:0;for(u=0;u<f;u+=1)l=a[u>>>2]>>>8*(p+o*(u%4))&255,h+=String.fromCharCode(l);return h})(n,e,t)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch{throw new Error("ARRAYBUFFER not supported by this environment")}return function(n){return(function(a,s,o){let u;const l=s/8,h=new ArrayBuffer(l),f=new Uint8Array(h),p=o===-1?3:0;for(u=0;u<l;u+=1)f[u]=a[u>>>2]>>>8*(p+o*(u%4))&255;return h})(n,e,t)};case"UINT8ARRAY":try{new Uint8Array(0)}catch{throw new Error("UINT8ARRAY not supported by this environment")}return function(n){return(function(a,s,o){let u;const l=s/8,h=o===-1?3:0,f=new Uint8Array(l);for(u=0;u<l;u+=1)f[u]=a[u>>>2]>>>8*(h+o*(u%4))&255;return f})(n,e,t)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function Tee(r){const e={outputUpper:!1,b64Pad:"=",outputLen:-1},t=r||{},i="Output length must be a multiple of 8";if(e.outputUpper=t.outputUpper||!1,t.b64Pad&&(e.b64Pad=t.b64Pad),t.outputLen){if(t.outputLen%8!=0)throw new Error(i);e.outputLen=t.outputLen}else if(t.shakeLen){if(t.shakeLen%8!=0)throw new Error(i);e.outputLen=t.shakeLen}if(typeof e.outputUpper!="boolean")throw new Error("Invalid outputUpper formatting option");if(typeof e.b64Pad!="string")throw new Error("Invalid b64Pad formatting option");return e}function Rf(r,e){return r<<e|r>>>32-e}function bee(r,e,t){return r^e^t}function TAe(r,e,t){return r&e^r&t^e&t}function Bg(r,e){const t=(65535&r)+(65535&e);return(65535&(r>>>16)+(e>>>16)+(t>>>16))<<16|65535&t}function t_(r,e,t,i,n){const a=(65535&r)+(65535&e)+(65535&t)+(65535&i)+(65535&n);return(65535&(r>>>16)+(e>>>16)+(t>>>16)+(i>>>16)+(n>>>16)+(a>>>16))<<16|65535&a}function bAe(r){return[1732584193,4023233417,2562383102,271733878,3285377520]}function See(r,e){let t,i,n,a,s,o,u;const l=[];for(t=e[0],i=e[1],n=e[2],a=e[3],s=e[4],u=0;u<80;u+=1)l[u]=u<16?r[u]:Rf(l[u-3]^l[u-8]^l[u-14]^l[u-16],1),o=u<20?t_(Rf(t,5),(h=i)&n^~h&a,s,1518500249,l[u]):u<40?t_(Rf(t,5),bee(i,n,a),s,1859775393,l[u]):u<60?t_(Rf(t,5),TAe(i,n,a),s,2400959708,l[u]):t_(Rf(t,5),bee(i,n,a),s,3395469782,l[u]),s=a,a=n,n=Rf(i,30),i=t,t=o;var h;return e[0]=Bg(t,e[0]),e[1]=Bg(i,e[1]),e[2]=Bg(n,e[2]),e[3]=Bg(a,e[3]),e[4]=Bg(s,e[4]),e}function SAe(r,e,t,i){let n;const a=15+(e+65>>>9<<4),s=e+t;for(;r.length<=a;)r.push(0);for(r[e>>>5]|=128<<24-e%32,r[a]=4294967295&s,r[a-1]=s/4294967296|0,n=0;n<r.length;n+=16)i=See(r.slice(n,n+16),i);return i}class EAe extends class{constructor(e,t,i){const n=i||{};if(this.t=t,this.i=n.encoding||"UTF8",this.numRounds=n.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.s=e,this.o=[],this.h=0,this.u=!1,this.l=0,this.A=!1,this.p=[],this.R=[]}update(e){let t,i=0;const n=this.U>>>5,a=this.T(e,this.o,this.h),s=a.binLen,o=a.value,u=s>>>5;for(t=0;t<u;t+=n)i+this.U<=s&&(this.F=this.m(o.slice(t,t+n),this.F),i+=this.U);this.l+=i,this.o=o.slice(i>>>5),this.h=s%this.U,this.u=!0}getHash(e,t){let i,n,a=this.g;const s=Tee(t);if(this.B){if(s.outputLen===-1)throw new Error("Output length must be specified in options");a=s.outputLen}const o=_ee(e,a,this.v,s);if(this.A&&this.Y)return o(this.Y(s));for(n=this.H(this.o.slice(),this.h,this.l,this.C(this.F),a),i=1;i<this.numRounds;i+=1)this.B&&a%32!=0&&(n[n.length-1]&=16777215>>>24-a%32),n=this.H(n,a,0,this.I(this.s),a);return o(n)}setHMACKey(e,t,i){if(!this.L)throw new Error("Variant does not support HMAC");if(this.u)throw new Error("Cannot set MAC key after calling update");const n=kx(t,(i||{}).encoding||"UTF8",this.v);this.M(n(e))}M(e){const t=this.U>>>3,i=t/4-1;let n;if(this.numRounds!==1)throw new Error("Cannot set numRounds with MAC");if(this.A)throw new Error("MAC key already set");for(t<e.binLen/8&&(e.value=this.H(e.value,e.binLen,0,this.I(this.s),this.g));e.value.length<=i;)e.value.push(0);for(n=0;n<=i;n+=1)this.p[n]=909522486^e.value[n],this.R[n]=1549556828^e.value[n];this.F=this.m(this.p,this.F),this.l=this.U,this.A=!0}getHMAC(e,t){const i=Tee(t);return _ee(e,this.g,this.v,i)(this.N())}N(){let e;if(!this.A)throw new Error("Cannot call getHMAC without first setting MAC key");const t=this.H(this.o.slice(),this.h,this.l,this.C(this.F),this.g);return e=this.m(this.R,this.I(this.s)),e=this.H(t,this.g,this.U,e,this.g),e}}{constructor(e,t,i){if(e!=="SHA-1")throw new Error("Chosen SHA variant is not supported");super(e,t,i);const n=i||{};this.L=!0,this.Y=this.N,this.v=-1,this.T=kx(this.t,this.i,this.v),this.m=See,this.C=function(a){return a.slice()},this.I=bAe,this.H=SAe,this.F=[1732584193,4023233417,2562383102,271733878,3285377520],this.U=512,this.g=160,this.B=!1,n.hmacKey&&this.M((function(a,s,o,u){const l=a+" must include a value and format";if(!s)throw new Error(l);if(s.value===void 0||!s.format)throw new Error(l);return kx(s.format,s.encoding||"UTF8",o)(s.value)})("hmacKey",n.hmacKey,this.v))}}var Tl=(r=>(r.CvApSoutheast1="cv-ap-southeast-1",r.CvApSoutheast2="cv-ap-southeast-2",r.CvEuWest1="cv-eu-west-1",r.CvNaWest1="cv-na-west-1",r))(Tl||{});const CAe={systemName:Tl.CvApSoutheast1},wAe={systemName:Tl.CvApSoutheast2},AAe={systemName:Tl.CvEuWest1},xAe={systemName:Tl.CvNaWest1},IAe={CvApSoutheast1:CAe,CvApSoutheast2:wAe,CvEuWest1:AAe,CvNaWest1:xAe};var Eee=(r=>(r.Staff="Staff",r.Learner="Learner",r.Unknown="Unknown",r.System="System",r))(Eee||{});const Cee="r",r_="cv:r",i_="cv:r:e",n_="referrer",wee="cv:originalReferrer",Rx=28800,Aee=["internalReferrer"],Ox={getDecodedAttributionData(){const r=ms.cacheGet(r_);if(r&&Object.keys(r).length>0)return r;const e=xee();return e==null?void 0:e.decoded},getEncodedAttributionData(){const r=ms.cacheGet(i_);return r!=null&&r.length?r:xee().encoded},getProfileId(){const r=Ox.getDecodedAttributionData();return(r==null?void 0:r.profileId)??null},setAttributionData(r){if(!r)return;const e=Iee(r);Nx(e,r)},decodeRValue(r){if(r)try{const e=atob(r),t=JSON.parse(e);if(!Dx(t))throw Error(`Decoded R value is invalid: ${JSON.stringify(t)}`);return t}catch(e){const t=e instanceof Error?e.message:e==null?void 0:e.toString();console.error(t)}}};function xee(){const r=ms.cacheGet(r_),e=ms.cacheGet(i_);return Dx(r)?{encoded:e,decoded:r}:PAe()}function PAe(){ms.cacheRemove(r_),ms.cacheRemove(i_);const r=RAe(),e=Ox.decodeRValue(r);if(e)return Nx(r,e),{decoded:e,encoded:r};const t={internalReferrer:window.location.origin+window.location.pathname,originalReferrer:kAe()},i=Iee(t);return Nx(i,t),{decoded:t,encoded:i}}function Dx(r){return!r||typeof r!="object"||Object.keys(r).length<Aee.length?!1:Aee.every(e=>typeof r[e]=="string")}function kAe(){const r=ms.cacheGet(wee);if(r&&typeof r=="string")return r;let e=document.referrer??"";if(window.URLSearchParams){const t=new URLSearchParams(window.location.search),i=t.has(n_)&&t.get(n_);t.has(n_)&&t.get(n_)&&(e=i)}return e&&ms.cacheSet(wee,e,Rx),e}function RAe(){if(!window.URLSearchParams)return;const r=new URLSearchParams(window.location.search);if(r.has(Cee))return r.get(Cee)}function Iee(r){if(Dx(r))try{return btoa(JSON.stringify(r))}catch{console.error(`R value could not be encoded: ${JSON.stringify(r)}`)}}function Nx(r,e){try{ms.cacheSet(r_,e,Rx),ms.cacheSet(i_,r,Rx)}catch{console.error("Could not store attribution data in session storage")}}const Pee=3,OAe=5e3,DAe=6,Mx={};class NAe{constructor(e){this.key=e.toString()}getCount(){return Mx[this.key]||0}increment(){Mx[this.key]=this.getCount()+1}reset(){delete Mx[this.key]}shouldBreak(){return this.getCount()>=DAe}}class MAe{constructor(){this.attempt=0}async wait(){await new Promise(e=>setTimeout(e,OAe*Math.pow(2,this.attempt))),this.attempt++}}async function LAe(r,e){const t=new MAe,i=new NAe(r);async function n(){const a=await fetch(r,e);if(a.status>=500&&!i.shouldBreak())throw new Error(`Server error: ${a.status}`);return a.ok&&i.reset(),a}for(let a=1;a<=Pee;a++)try{return await n()}catch(s){if(a>=Pee||i.shouldBreak())throw s;i.increment(),await t.wait()}}var a_,BAe=new Uint8Array(16);function FAe(){if(!a_&&(a_=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!a_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a_(BAe)}const UAe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Lx(r){return typeof r=="string"&&UAe.test(r)}for(var ys=[],Bx=0;Bx<256;++Bx)ys.push((Bx+256).toString(16).substr(1));function $Ae(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(ys[r[e+0]]+ys[r[e+1]]+ys[r[e+2]]+ys[r[e+3]]+"-"+ys[r[e+4]]+ys[r[e+5]]+"-"+ys[r[e+6]]+ys[r[e+7]]+"-"+ys[r[e+8]]+ys[r[e+9]]+"-"+ys[r[e+10]]+ys[r[e+11]]+ys[r[e+12]]+ys[r[e+13]]+ys[r[e+14]]+ys[r[e+15]]).toLowerCase();if(!Lx(t))throw TypeError("Stringified UUID is invalid");return t}function qAe(r,e,t){r=r||{};var i=r.random||(r.rng||FAe)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,$Ae(i)}function jAe(r){if(!Lx(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)}const kee="cv:session:",Ree="cv:window:",HAe=new Date(864e13).getTime(),Oee=18e5,VAe=4;function Dee(r){if(r===Hh.LocalStorage)return ms.isAvailable()?ms:vee;if(r===Hh.SessionStorage)return gee.isAvailable()?gee:vee}function Nee(r){return r===!1?HAe:new Date().getTime()+r}function zAe(){return qAe()}function WAe(r){return r?new Date().getTime()>r:!1}function GAe(r){return!(typeof r!="object"||typeof(r==null?void 0:r.id)!="string"||!Lx(r.id)||jAe(r.id)!==VAe||typeof(r==null?void 0:r.ttl)!="number"||(r==null?void 0:r.ttl)<=0||isNaN(r==null?void 0:r.ttl))}function Mee(r,e,t){const i=Dee(t);if(!(i!=null&&i.isAvailable()))return;const n=r+(e||"0");i.remove(n)}function Lee(r,e,t,i){const n=Dee(t),a=r+(e||"0"),s=n.get(a);if(!GAe(s)||WAe(s==null?void 0:s.ttl)){const u={id:zAe(),ttl:Nee(i)};return n.set(a,u),u.id}const o={id:s.id,ttl:Nee(i)};return n.set(a,o),s.id}let Fx=!1;const s_={getClientSessionData(r){const e=Lee(kee,r,Hh.LocalStorage,Oee),t=Lee(Ree,r,Hh.SessionStorage,Fx?!1:Oee);return!e&&!t?null:{id:e,windowId:t}},resetClientSession(r){Mee(kee,r,Hh.LocalStorage),Mee(Ree,r,Hh.SessionStorage)},lockWindowSession(){Fx=!0},unlockWindowSession(){Fx=!1}},Vh={isObject(r){const e=typeof r;return e==="function"||e==="object"&&!!r},isFunction(r){return typeof r=="function"}},Bee={safeUrlConcat(r,e){if(!r)return;let t=r;return r.endsWith("/")||(t+="/"),e&&(t+=e.startsWith("/")?e.slice(1):e),t}},Li={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i},Ql="Unknown";function Of(r,e,t){const i=e.exec(t)||[];let[n]=i;return n||(n=Ql),{name:r,version:n}}function zh(r,e,t){if(!e)return{name:r,version:Ql};const i=e.exec(t),n=i&&i.length?i[0].trim():Ql;return{name:r,version:n}}function KAe(r,e){const t={name:r,version:null};return Li.win2000.test(e)&&(t.version="2000"),Li.winXP.test(e)&&(t.version="XP"),Li.winVista.test(e)&&(t.version="Vista"),Li.win7.test(e)&&(t.version="7"),Li.win8.test(e)&&(t.version="8"),Li.win81.test(e)&&(t.version="8.1"),Li.win10.test(e)&&(t.version="10"),t.version||(t.version=Ql),t}const Fee={getDeviceType(){const r=window.navigator.userAgent;return Li.mobileDevice.test(r)?Li.iphone.test(r)?"iPhone":Li.ipad.test(r)?"iPad":Li.android.test(r)?"Android":Li.blackberry.test(r)?"Blackberry":Li.windowsPhone.test(r)?"Windows Phone":Ql:"Desktop"},getOperatingSystem(){const r=window.navigator.userAgent;return Li.android.test(r)?zh("Android",Li.androidVersion,r):Li.iphone.test(r)||Li.ipad.test(r)?zh("iOS",Li.iosVersion,r):Li.linux.test(r)?zh("Linux",null,r):Li.unix.test(r)?zh("Unix",null,r):Li.mac.test(r)?zh("Macintosh",Li.osxVersion,r):Li.windows.test(r)?KAe("Windows",r):Li.blackberry.test(r)?zh("BlackBerry",Li.blackberryVersion,r):Li.windowsPhone.test(r)?zh("Windows Phone",Li.windowsPhoneVersion,r):{name:Ql,version:Ql}},getBrowser(){const r=window.navigator.userAgent;return Li.chrome.test(r)?Of("Chrome",Li.generalVersion,r):Li.firefox.test(r)?Of("Firefox",Li.generalVersion,r):Li.safari.test(r)?Of("Safari",Li.generalVersion,r):Li.ie.test(r)?Of("Internet Explorer",Li.ieVersion,r):Li.edge.test(r)?Of("Edge",Li.edgeVersion,r):Li.opera.test(r)?Of("Opera",Li.operaVersion,r):{name:Ql,version:Ql}},isTouchScreen(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}},XAe=28800,Uee="cv:utmparams",Ux=[["source","utm_source"],["medium","utm_medium"],["campaign","utm_campaign"],["term","utm_term"],["content","utm_content"]],YAe=Ux.reduce((r,[e])=>({...r,[e]:e}),{}),$ee={getUtmParameters(){if(!window.URLSearchParams)return null;const r=new URLSearchParams(window.location.search),e={},t=([i,n])=>{r.has(n)&&(e[i]=r.get(n))};return Ux.forEach(t),qee(e)},setUtmParameters(r){if(!r)return;const e={},t=i=>{YAe[i]&&(e[i]=r[i])};return Object.keys(r).forEach(t),qee(e)},getURLSearchParams(){if(!window.URLSearchParams)return null;const r=new URLSearchParams,e=$ee.getUtmParameters();return e?(Ux.forEach(([t,i])=>{e[t]&&r.set(i,e[t])}),r):null}};function qee(r){if(Object.keys(r).length)return ms.cacheSet(Uee,r,XAe),r;const e=ms.cacheGet(Uee);return e&&typeof e=="object"&&Object.keys(e).length?e:null}const QAe={version:"2.3.0"},JAe="zXJL9nOHxzDlMUDjiP41",jee="unknown";class ZAe{constructor(e){this.options=e,this.initialize()}initialize(){this.validateOptions(),this.options.logUtmParameters&&(this.utmParameters=$ee.getUtmParameters()),this.options.logAttributionData&&(this.attributionData=Ox.getDecodedAttributionData())}get name(){return"CollectionApiClient"}async log(e){if(Array.isArray(e))return this.logBulk(e);this.shouldLog(e)&&(this.validateEvent(e),await this.postData(await this.formatData(e)))}async logBulk(e){const t=e.filter(n=>this.shouldLog(n));if(!t.length)return;t.forEach(n=>this.validateEvent(n));const i=await Promise.all(t.map(n=>this.formatData(n)));await this.postData(i)}validateOptions(){if(!Vh.isFunction(this.options.getUser))throw new Error("getUser option is required.")}shouldLog(e){return Vh.isFunction(this.options.shouldLog)?this.options.shouldLog(e):!0}async postData(e){const t=await this.getRegionalUrl(this.options.collectionApiUrls),i=JSON.stringify(e),n={"Content-Type":"application/json",...this.getSignatureHeader(i)};let a=Bee.safeUrlConcat(t,"/v1/ingest");Array.isArray(e)&&(a=Bee.safeUrlConcat(a,"/bulk"));try{const s=await LAe(a,{method:"POST",mode:"cors",headers:n,body:i});s.ok||this.logError(new Error(`CollectionApiClient failed to log event. Status: ${s.status} ${s.statusText}`),!1,this.getResponseAsObject(s))}catch(s){this.logError(s)}}getResponseAsObject(e){return{headers:e.headers,ok:e.ok,redirected:e.redirected,status:e.status,statusText:e.statusText,type:e.type,url:e.url,body:e.text()}}getSignatureHeader(e){const t=new EAe("SHA-1","TEXT",{hmacKey:{value:JAe,format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":`${this.options.collectionApiClientId}.${t.getHash("B64")}`}}async getRegionalUrl(e){switch((await this.getRegion()).systemName){case Tl.CvEuWest1:return e.cvEuWest1;case Tl.CvApSoutheast2:return e.cvApSoutheast2;case Tl.CvNaWest1:return e.cvNaWest1;case Tl.CvApSoutheast1:default:return e.cvApSoutheast1}}validateEvent(e){typeof e.type!="string"&&this.logError(new Error("Event type is required."),!0),Vh.isObject(e.actionContext)||this.logError(new Error("Event actionContext is required."),!0),e.actionContext.entity||this.logError(new Error("Event actionContext entity is required."),!0)}async formatData(e){return{type:e.type,data:await this.getEventData(e),metadata:this.getEventMetadata(e)}}async getEventData(e){const t=e.actionContext,i=this.getPlatformMetadata(),n=await this.getUserData(),a=await this.getSessionData(),s={name:this.options.productName,version:this.options.productVersion};this.options.productVariant&&(s.variant=this.options.productVariant);const o={user:n,action:t,platform:i,product:s,session:a};this.utmParameters&&(o.utm=this.utmParameters);const u=this.extractData(e),l=Object.keys(o).map(f=>f.toLowerCase()),h=Object.keys(u).map(f=>f.toLowerCase());return l.forEach(f=>{h.includes(f)&&this.logError(new Error(`${f} is a reserved key.`),!0)}),{...o,...u}}extractData(e){return Vh.isFunction(this.options.formatData)?this.options.formatData(e):{[e.actionContext.entity]:e.data}}async getUserData(){var t,i,n;let e;try{e=await((i=(t=this.options).getProfileId)==null?void 0:i.call(t))}catch(a){this.logError(a)}try{const a=await this.options.getUser();return a!=null&&a.id?{id:a.id,role:((n=a.role)==null?void 0:n.toLowerCase())||jee,userGroup:(a.userGroup??Eee.Unknown).toLowerCase(),yearGroup:this.normalizeYearGroup(a.yearGroup),profileId:e,customer:{id:a.customerId,name:a.customerName,customerGuid:a.customerGuid,crmId:a.crmId,country:a.countryCode,region:await this.getRegion(),openCustomer:!1,accessPolicy:a.accessPolicy}}:e?{profileId:e}:void 0}catch(a){this.logError(a)}}async getRegion(){let e=this.options.regionName;try{const t=await this.options.getUser();t!=null&&t.instanceRegion&&(e=t.instanceRegion)}catch(t){this.logError(t)}return e||this.logError(new Error("RegionName is not set."),!0),this.getRegionByName(e.toLowerCase())}async getSessionData(){try{const e=await this.options.getUser();return{...s_.getClientSessionData(e==null?void 0:e.id),authSessionId:e==null?void 0:e.sessionId}}catch(e){return console.error(e),s_.getClientSessionData(null)}}getPlatformMetadata(){var t,i;const e={url:window.location.href,referrer:document.referrer};return(t=this.attributionData)!=null&&t.internalReferrer&&(e.internalReferrer=this.attributionData.internalReferrer),(i=this.attributionData)!=null&&i.originalReferrer&&(e.originalReferrer=this.attributionData.originalReferrer),{browser:Fee.getBrowser(),os:Fee.getOperatingSystem(),request:e,screenResolution:`${window.screen.width}x${window.screen.height}`,viewportResolution:`${window.innerWidth}x${window.innerHeight}`}}getEventMetadata(e){return{client:{name:`${this.name}.ts`,version:QAe.version,region:this.getRegionByName(this.options.regionName)},timestamp:new Date().toISOString(),eventVersion:e.eventVersion}}getRegionByName(e){let t;return Object.values(IAe).forEach(i=>{i.systemName===e&&(t=i)}),t}normalizeYearGroup(e){return e?e.toLowerCase().split(" ").join("_"):jee}logError(e,t,...i){if(this.options.logError&&this.options.logError(e,...i),t)throw e}}var cr=(r=>(r.Stream="cv_product_stream",r.WebPlayerStream="cv_product_webplayer_stream",r.StreamProgress="cv_product_stream_progress",r.PreviewStreamProgress="cv_product_preview_stream_progress",r.StreamBuffering="cv_product_stream_buffering",r.Login="cv_product_login",r.LoginSsoRedirect="cv_product_login_sso_redirect",r.LoginFailed="cv_product_login_failed",r.Search="cv_product_search",r.InstantSearch="cv_product_instant_search",r.SearchEmptyResult="cv_product_search_empty_result",r.Filter="cv_product_search_filter",r.SearchLanding="cv_product_search_landing",r.Share="cv_product_share",r.Unshare="cv_product_unshare",r.WorkspaceAdd="cv_product_tv_add",r.Rename="cv_product_rename",r.Move="cv_product_move",r.Sort="cv_product_sort",r.Create="cv_product_create",r.Delete="cv_product_delete",r.Associate="cv_product_associate",r.Dissociate="cv_product_dissociate",r.Edit="cv_product_edit",r.Approve="cv_product_approve",r.Reject="cv_product_reject",r.Disable="cv_product_disable",r.Upload="cv_product_upload",r.Download="cv_product_download",r.Navigate="cv_product_navigate",r.Click="cv_product_click",r.Suggest="cv_product_suggest",r.EditAssoc="cv_product_edit_assoc",r.Play="cv_product_play",r.Favourite="cv_product_favourite",r.Follow="cv_product_follow",r.Prefer="cv_product_prefer",r.Print="cv_product_print",r.Copy="cv_product_copy",r.Activate="cv_product_activate",r.VerifyEmail="cv_product_verify_email",r.ChangePassword="cv_product_change_password",r.ManageGroup="cv_product_manage_group",r.Export="cv_product_export",r.SendEmail="cv_product_send_email",r.Publish="cv_product_publish",r.Submit="cv_product_submit",r.Complete="cv_product_complete",r.Archive="cv_product_archive",r.Promote="cv_product_promote",r.Demote="cv_product_demote",r.BulkAction="cv_product_bulk_action",r.Remove="cv_product_remove",r.Dismiss="cv_product_dismiss",r.Open="cv_product_open",r.Hide="cv_product_hide",r.PageView="cv_product_page_view",r.Select="cv_product_select",r.SwitchCustomer="cv_product_switch_customer",r.Focus="cv_product_focus",r.Blur="cv_product_blur",r.Hover="cv_product_hover",r.Unhover="cv_product_unhover",r.SetAccess="cv_product_set_access",r.AddToLocalCache="cv_product_add_to_lc",r.ResolveWarning="cv_product_resolve_warning",r.DismissWarning="cv_product_dismiss_warning",r))(cr||{}),Cn=(r=>(r.Folder="folder",r.Video="video",r.Rating="rating",r.Series="series",r.Library="library",r.Resource="resource",r.Tag="tag",r.Subtitle="subtitle",r.Chapter="chapter",r.Resolution="resolution",r.PlaybackSpeed="playback_speed",r.Device="device",r.Restriction="restriction",r.Interactive="interactive",r.Interaction="interaction",r.PDF="pdf",r.CustomerSetting="customer_setting",r.UserSetting="user_setting",r.LibraryRequest="staff_request",r.Logo="logo",r.Pagination="pagination",r.Thumbnail="thumbnail",r.Banner="banner",r.Link="link",r.Playlist="playlist",r.Playlists="playlists",r.Person="person",r.Company="company",r.Classroom="classroom",r.ClassroomGroup="classroom_group",r.Classification="classification",r.ShareLink="share_link",r.DirectShare="direct_share",r.Upload="upload",r.SearchResults="search_results",r.SearchSuggestion="search_suggestion",r.Audience="audience",r.User="user",r.Clip="clip",r.UserChannel="user_channel",r.Widget="widget",r.Url="url",r.SocialShare="social_share",r.Presentation="presentation",r.BatchJob="batch_job",r.DeepLink="deep_link",r.Feedback="feedback",r.AppLink="app_link",r.SignUp="sign_up",r.FileGeneratorJob="file_generator_job",r.ExportLibraries="export_libraries",r.Product="product",r.Customer="customer",r.SpecialEvent="special_event",r.Region="region",r.ProductTip="product_tip",r.Livestream="livestream",r.DevicesCta="devices_cta",r.Integration="integration",r.Faq="faq",r.MixedMedia="mixed_media",r.TableOfContents="table_of_contents",r.Author="author",r.Glance="glance",r.Filter="filter",r.NotificationSetting="notification_setting",r.Transcript="transcript",r.CurriculumCode="curriculum_code",r.Assign="assign",r.PartnerProfile="partner_profile",r))(Cn||{}),Ms=(r=>(r.TopNav="top_nav",r.LeftNav="left_nav",r.Footer="footer",r.Popup="popup",r.Banner="banner",r.VideoList="video_list",r.VideoListItem="video_list_item",r.VideoListHeader="video_header",r.VideoThumbnail="video_thumbnail",r.ExpandableVideoThumbnail="expandable_video_thumbnail",r.VideoItemPreview="video_item_preview",r.InteractiveItemPreview="interactive_item_preview",r.ClipItemPreview="clip_item_preview",r.VideoDetails="video_details",r.InteractiveDetails="interactive_details",r.ClipDetails="clip_details",r.VideoDetailsHeader="video_details_header",r.EditVideoDetails="edit_video_details",r.EditInteractiveVideoDetails="edit_interactive_video_details",r.EditClipDetails="edit_clip_details",r.EditVideoChapters="edit_video_chapters",r.EditVideoResources="edit_video_resources",r.PreviewVideoResources="preview_video_resources",r.VideoUpload="video_upload",r.VideoRequest="video_request",r.Pagination="pagination",r.LibraryHeader="library_header",r.LibraryTiles="library_tiles",r.LibraryRequestDetails="staff_request_details",r.Libraries="libraries",r.SubFolderList="sub_folder_list",r.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",r.AwaitingReviewVideoItem="awaiting_review_video_item",r.PastReleasesHeader="past_releases_header",r.MigrationWarnings="migration_warnings",r.PlaylistListHeader="playlist_list_header",r.PlaylistListItem="playlist_list_item",r.SeriesListItem="series_list_item",r.SeriesWithVideos="series_with_videos",r.PlaylistWithVideos="playlist_with_videos",r.Dropdown="dropdown",r.ViewCurriculumLinks="view_curriculum_links",r.SearchBar="search_bar",r.InstantSearch="instant_search",r.SearchFilters="search_filters",r.FeaturedSeriesSearchResult="featured_series_search_result",r.ExchangeSearchGroupItem="exchange_search_group_item",r.StaffManager="staff_manager",r.StaffManagerListItem="staff_manager_list_item",r.StudentManager="student_manager",r.ViewStudentVideos="view_student_videos",r.StudentManagerListItem="student_manager_list_item",r.EditUser="edit_user",r.UserAuditLog="user_audit_log",r.BulkUserActionsWizard="bulk_user_actions_wizard",r.BulkUserUploadWizard="bulk_user_upload_wizard",r.Classroom="classroom",r.ClassroomsList="classrooms_list",r.ClassroomsListItem="classrooms_list_item",r.ManageClassroomStudents="manage_classroom_students",r.ManageClassroomStudentListItem="manage_classroom_student_list_item",r.ManageClassroomGroups="manage_classroom_groups",r.ManageClassroomGroupListItem="manage_classroom_group_list_item",r.ManageClassroomTeachers="manage_classroom_teachers",r.ManageClassroomTeacherListItem="manage_classroom_teachers_list_item",r.ArchivedClassrooms="archived_classrooms",r.PreviewInteractive="preview_interactive",r.PreviewSharedInteractive="preview_shared_interactive",r.PreviewInteractiveQuestions="preview_interactive_questions",r.EditInteractive="edit_interactive",r.EditInteractiveDetails="edit_interactive_details",r.PlaySharedInteractive="play_shared_interactive",r.PlayInteractive="play_interactive",r.InteractiveListItem="interactive_list_item",r.DeleteInteractive="delete_interactive",r.NewInteractive="new_interactive",r.CopyInteractive="copy_interactive",r.UnpublishInteractive="unpublish_interactive",r.ShareInteractive="share_interactive",r.PlayPage="play_page",r.Player="player",r.FloatingPlayer="floating_player",r.InteractivePlayer="interactive_player",r.EmbeddedPlayer="embedded_player",r.CreateClipPlayer="create_clip_player",r.PlayClip="play_clip",r.PlaySharedClip="play_shared_clip",r.ClipListItem="clip_list_item",r.ContentUpdatesBanner="content_updates_banner",r.ContentUpdatesClassificationBanner="content_updates_classification_banner",r.PreferencesSettings="preferences_settings",r.NotificationSettings="notification_settings",r.TopicsOnboarding="topics_onboarding",r.MyUploads="my_uploads",r.MyVideos="my_videos",r.SlidingList="sliding_list",r.HeroBannerItem="hero_banner_item",r.SlidingListItem="sliding_list_item",r.ClassificationListItem="classification_list_item",r.ClassificationComingSoon="classification_coming_soon",r.ClassificationHero="classification_hero",r.ClassificationFooter="classification_footer",r.Classification="classification",r.PresentationClassifications="presentation_classifications",r.Dashboard="dashboard",r.DiscoverFooter="discover_footer",r.ProductBanner="product_banner",r.UserOptions="user_options",r.MagicTabs="magic_tabs",r.Settings="settings",r.StudentFeed="student_feed",r.MyShares="my_shares",r.SharedByMe="shared_by_me",r.SharedWithMe="shared_with_me",r.Insights="insights",r.Error="error_view",r.UpgradeForm="upgrade_form",r.ClassroomGuide="classroom_guide",r.TeachingResources="teaching_resources",r.ResourcesGuidancePopup="resources_guidance_popup",r.InteractivesGuidancePopup="interactives_guidance_popup",r.CurriculumGuidancePopup="curriculum_guidance_popup",r.TopVideos="top_videos",r.VideoViewsList="video_views_list",r.VideoOverview="video_overview",r.StudentReachPopup="student_reach_popup",r.LiteUpgradeFeedbackPopup="lite_upgrade_feedback_popup",r.LiteUpgradeBanner="lite_upgrade_banner",r.LiteUpgradeOnboarding="lite_upgrade_onboarding",r.GiveFeedbackPopup="give_feedback_popup",r.LibraryRequestSettings="library_request_settings",r.OpenInAppPrompt="open_in_app_prompt",r.UseAppButton="use_app_button",r.Launchpad="launchpad",r.EditableSubjectPreferencesWidget="editable_subject_preferences_widget",r.ThumbnailHeroMediaWidget="thumbnail_hero_media_widget",r.ThumbnailFixedListMediaLargeWidget="thumbnail_fixed_list_media_large",r.FilterSlidingPillListSmallWidget="filter_sliding_pill_list_small",r.CircleLogoSlidingListWidget="circle_logo_sliding_list_widget",r.RectangularLogoSlidingListWidget="rectangular_logo_sliding_list_widget",r.HeroBannerSmallWidget="hero_banner_small",r.EventIconSlidingListWidget="event_icon_sliding_list_widget",r.OnboardingStepsWidget="onboarding_steps_widget",r.FaqQuestionWidget="faq_question_widget",r.FaqQuestionAccordionWidget="faq_question_accordion_widget",r.SubjectStatsWidgetItem="subject_stats_widget_item",r.AuthorReviewerWidget="author_reviewer_widget",r.ThumbnailFixedListMediaSmallWidget="thumbnail_fixed_list_media_small_widget",r.ThumbnailFixedListFolderSmallWidget="thumbnail_fixed_list_folder_small_widget",r.ThumbnailVerticalListWidget="thumbnail_vertical_list_widget",r.ThumbnailFixedListSmallWidget="thumbnail_fixed_list_small_widget",r.PosterFixedListLargeWidget="poster_fixed_list_large_widget",r.CurriculumResourcesAccordionWidget="curriculum_resources_accordion_widget",r.SearchCurriculumCodeWidget="search_curriculum_code_widget",r.ExchangeLinksWidget="exchange_links_widget",r.TableOfContents="table_of_contents",r.SignUpPopup="sign_up_popup",r.SignUpPage="sign_up_page",r.TrialBanner="trial_banner",r.InviteColleaguePopup="invite_colleague_popup",r.AuthProspectSelect="auth_prospect_select",r.GatedBanner="gated_banner",r.GatedEmptyState="gated_empty_state",r.GatedPopup="gated_popup",r.WelcomePopup="welcome_popup",r.WatchHistoryLanding="watch_history_landing",r.MyFavouritesLanding="my_favourites_landing",r.MyVideoLanding="my_videos_landing",r.PlaylistsLanding="playlists_landing",r.MySharesLanding="myshares_landing",r.PremiumFeatures="premium_features",r.NotificationsDropdown="notifications_dropdown",r.CalendarNav="calendar_nav",r.CalendarDay="calendar_day",r.CalendarPopup="calendar_popup",r.RegionMap="region_map",r.OnboardingWelcomeVideoScreen="onboarding_welcome_video_screen",r.OnboardingSelectRoleScreen="onboarding_select_role_screen",r.OnboardingUsageIntentionScreen="onboarding_usage_intention_screen",r.OnboardingSchoolLevelScreen="onboarding_school_level_screen",r.OnboardingSelectCurriculumScreen="onboarding_select_curriculum_screen",r.OnboardingSubjectsScreen="onboarding_subjects_screen",r.OnboardingSelectVideosScreen="onboarding_select_videos_screen",r.OnboardingCreatePlaylistScreen="onboarding_create_playlist_screen",r.OnboardingSubjectsSummaryScreen="onboarding_subjects_summary_screen",r.ProductTips="product_tips",r.LivestreamBookingForm="booking_form",r.DateRangeFilter="date_range_selector",r.AudienceFilter="audience_filter",r.AssignFlowView="assign_flow_view",r.Global="global",r))(Ms||{}),Jl=(r=>(r.Start="start",r.Complete="complete",r.Save="save",r.Discard="discard",r.Next="next",r.Back="back",r))(Jl||{}),Wh=(r=>(r.Start="start",r.Finish="finish",r.Terminate="terminate",r.Play="play",r.Pause="pause",r.Playback="playback",r.NextChapter="next_chapter",r.PreviousChapter="previous_chapter",r.FullScreenEnter="full_screen_enter",r.FullScreenExit="full_screen_exit",r.ChangeResolution="change_resolution",r.ChangeSpeed="change_speed",r.ChangeDevice="change_device",r.EnableTheatreMode="enable_theatre_mode",r.DisableTheatreMode="disable_theatre_mode",r.ShowTranscript="show_transcript",r.HideTranscript="hide_transcript",r))(Wh||{}),Hee=(r=>(r.Embedded="embedded",r))(Hee||{}),Vee=(r=>(r.FeatureUserChannelVideo="feature_user_channel_video",r.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",r.ShareClip="share_clip",r.ViewOriginalVideo="view_original_video",r.ShareInteractive="share_interactive",r.DeleteInteractiveVideo="delete_interactive_video",r.CopyInteractiveVideo="copy_interactive_video",r.EditInteractiveVideo="edit_interactive_video",r.PrintAsWorksheet="print_as_worksheet",r.PreviewInteractiveVideo="preview_interactive_video",r.ViewResults="view_results",r.ViewInsights="view_insights",r.ViewUsage="view_usage",r.MoveToAnotherFolder="move_to_another_folder",r.CreateInteractiveVideo="create_interactive_video",r.ShareVideo="share_video",r.EditVideo="edit_video",r.DownloadVideo="download_video",r.AddToExchange="add_to_exchange",r.AddToUserChannel="add_to_user_channel",r.CreateClip="create_clip",r.FlagVideo="flag_video",r.AddToLibrary="add_to_library",r.AddToWorkspace="add_to_workspace",r.AddToPlaylist="add_to_playlist",r.RemoveFromPlaylist="remove_from_playlist",r.AddCurriculumLink="add_curriculum_link",r.ViewCurriculumLinks="view_curriculum_links",r.OpenInCurator="open_in_curator",r.ManageVideoAccess="manage_video_access",r.Approve="approve",r.AddToLocalCache="add_to_local_cache",r.OpenInLibraryEditor="open_in_library_editor",r.OpenInClickView="open_in_clickview",r.PlayClip="play_clip",r.EditClip="edit_clip",r.DeleteClip="delete_clip",r.EditVideoDetails="edit_video_details",r.DeleteVideo="delete_video",r.ManageAccess="manage_access",r.SuggestEdit="suggest_edit",r.RemoveFromWatchHistory="remove_from_watch_history",r.ShowTranscript="show_transcript",r.HideTranscript="hide_transcript",r.TranscriptTimepoint="transcript_timepoint",r))(Vee||{}),$x=(r=>(r.FileSelect="file_select",r.DragDrop="drag_drop",r))($x||{}),qx=(r=>(r.On="on",r.Off="off",r))(qx||{}),Fg=(r=>(r.SearchTranscript="search_transcript",r.NextResult="next_result",r.PreviousResult="previous_result",r.ResetResults="reset_results",r))(Fg||{}),jx=(r=>(r.FileSelect="file-select",r.DragDrop="drag-drop",r))(jx||{}),Mc=(r=>(r.Video="videos",r.Clip="clips",r.Interactive="interactives",r.Folder="categories",r.Series="series",r.Tags="tags",r.Subjects="subjects",r))(Mc||{}),Zl=(r=>(r[r.V1=1]="V1",r[r.V2=2]="V2",r[r.V3=3]="V3",r[r.V4=4]="V4",r[r.V5=5]="V5",r))(Zl||{});const Vn={passthrough(r){return r}},Qr={allow:()=>!0,restrict:()=>!1},exe={getShareData(r){var o,u,l,h;const{id:e,search:t,pagePositionIndex:i,shareId:n,shareType:a}=r,s={id:e,search:t,pagePositionIndex:i,shareId:n,shareType:a};return(o=r.video)!=null&&o.id&&(s.video={id:r.video.id}),(u=r.clip)!=null&&u.id&&(s.clip={id:r.clip.id},(l=r.clip.video)!=null&&l.id&&(s.video={id:(h=r.clip.video)==null?void 0:h.id})),r.shareCount!==void 0&&(s.shareCount=r.shareCount),r.embedDetails&&(s.embedDetails=s.embedDetails),s}},Df={getUploadData(r,e){const{entity:t}=e.actionContext;if(t===Cn.Video)return Df.formatVideoUpload(r,e);if(t===Cn.Resource||t===Cn.Subtitle)return Df.formatResourceUpload(r);if(t===Cn.Banner||t===Cn.Thumbnail||t===Cn.MixedMedia)return r;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload(r,e){const{workflowPhase:t}=e.actionContext;if(t===Jl.Start)return Df.getStartVideoUploadData(r);if(t===Jl.Discard)return Df.getDiscardVideoUploadData(r);if(t===Jl.Complete)return Df.getCompleteUploadData(r)},getStartVideoUploadData(r){return!r||!r.length?[]:(r instanceof FileList&&(r=Array.from(r)),r.map(e=>({fileName:e.name,size:e.size,type:e.type,count:r.length})))},getDiscardVideoUploadData(r){const e=t=>{const{type:i,name:n,status:a,cvUpload:s}=t.file,o={fileName:n,count:Array.isArray(r)?r.length:1,type:i,status:a};return t.progress&&(o.progress=t.progress.toFixed(2)),s&&(o.uploadId=s.uploadId),o};return Array.isArray(r)?r.map(t=>e(t)):[e(r)]},getCompleteUploadData(r){return!r||!r.length?[]:r.map(e=>{const{fileName:t,libraryId:i,folderId:n,autoCaption:a}=e;return{fileName:t,libraryId:i,folderId:n,autoCaption:a,count:r.length}})},formatResourceUpload(r){const{id:e,name:t}=r,i={id:e,name:t};return Vh.isObject(r.metadata)&&(i.type=r.metadata.type),i}},txe={[cr.Navigate]:Qr.restrict,[cr.Click]:Qr.allow,[cr.Search]:Qr.allow,[cr.InstantSearch]:Qr.allow,[cr.Play]:Qr.allow,[cr.Stream]:Qr.allow,[cr.WebPlayerStream]:Qr.allow,[cr.StreamProgress]:Qr.allow,[cr.PreviewStreamProgress]:Qr.allow,[cr.StreamBuffering]:Qr.allow,[cr.Rename]:Qr.allow,[cr.Move]:Qr.allow,[cr.Create]:Qr.allow,[cr.Delete]:Qr.allow,[cr.Associate]:Qr.allow,[cr.Dissociate]:Qr.allow,[cr.Filter]:Qr.allow,[cr.Sort]:Qr.allow,[cr.Approve]:Qr.allow,[cr.Reject]:Qr.allow,[cr.Disable]:Qr.allow,[cr.Upload]:Qr.allow,[cr.Download]:Qr.allow,[cr.SetAccess]:Qr.allow,[cr.AddToLocalCache]:Qr.restrict,[cr.Share]:Qr.allow,[cr.Unshare]:Qr.allow,[cr.Edit]:Qr.allow,[cr.Suggest]:Qr.allow,[cr.Favourite]:Qr.allow,[cr.WorkspaceAdd]:Qr.allow,[cr.ResolveWarning]:Qr.allow,[cr.DismissWarning]:Qr.allow,[cr.EditAssoc]:Qr.allow,[cr.Follow]:Qr.allow,[cr.Print]:Qr.allow,[cr.Copy]:Qr.allow,[cr.Activate]:Qr.allow,[cr.VerifyEmail]:Qr.allow,[cr.ChangePassword]:Qr.allow,[cr.Export]:Qr.allow,[cr.SendEmail]:Qr.allow,[cr.Publish]:Qr.allow,[cr.Submit]:Qr.allow,[cr.Complete]:Qr.allow,[cr.Archive]:Qr.allow,[cr.Promote]:Qr.allow,[cr.Demote]:Qr.allow,[cr.BulkAction]:Qr.allow,[cr.Remove]:Qr.allow,[cr.Dismiss]:Qr.allow,[cr.Open]:Qr.allow,[cr.Hide]:Qr.allow,[cr.PageView]:Qr.allow,[cr.Select]:Qr.allow,[cr.SwitchCustomer]:Qr.allow,[cr.Focus]:Qr.allow,[cr.Blur]:Qr.allow,[cr.Hover]:Qr.allow,[cr.Unhover]:Qr.allow},rxe={[cr.Search]:Vn.passthrough,[cr.InstantSearch]:Vn.passthrough,[cr.Play]:Vn.passthrough,[cr.Stream]:Vn.passthrough,[cr.StreamProgress]:Vn.passthrough,[cr.PreviewStreamProgress]:Vn.passthrough,[cr.StreamBuffering]:Vn.passthrough,[cr.Click]:Vn.passthrough,[cr.Filter]:Vn.passthrough,[cr.Sort]:Vn.passthrough,[cr.SetAccess]:Vn.passthrough,[cr.Approve]:Vn.passthrough,[cr.Reject]:Vn.passthrough,[cr.Create]:Vn.passthrough,[cr.Delete]:Vn.passthrough,[cr.Rename]:Vn.passthrough,[cr.Move]:Vn.passthrough,[cr.Edit]:Vn.passthrough,[cr.Share]:exe.getShareData,[cr.Disable]:Vn.passthrough,[cr.Suggest]:Vn.passthrough,[cr.Upload]:Df.getUploadData,[cr.ResolveWarning]:Vn.passthrough,[cr.DismissWarning]:Vn.passthrough,[cr.Follow]:Vn.passthrough,[cr.Print]:Vn.passthrough,[cr.Copy]:Vn.passthrough},zee={[cr.Search]:()=>"search",[cr.InstantSearch]:()=>"search",[cr.Filter]:()=>"filter",[cr.Stream]:()=>Cn.Video},Wee={user:"target_user",product:"target_product"},ixe={[cr.StreamProgress]:!0,[cr.WebPlayerStream]:!0,[cr.PreviewStreamProgress]:!0,[cr.StreamBuffering]:!0},Gee={shouldLog(r){return!!txe[r.type](r)},formatData(r){const e=rxe[r.type],t=Vh.isFunction(e)?e(r.data,r):r.data;if(ixe[r.type])return t;let i=r.actionContext.entity;return Vh.isFunction(zee[r.type])&&(i=zee[r.type](r)),Wee[i]&&(i=Wee[i]),{[i]:t}}};class nxe{constructor(e){this.options=e,this.initialize()}logStream(){const e=`v:${this.options.videoId}`,t=this.getPlayerMetrics();ms.cacheExists(e)||(this.collectionApiClient.log({type:cr.WebPlayerStream,actionContext:this.getActionContext(),data:{...this.getAnalyticsData(),player:t},eventVersion:Zl.V3}),ms&&ms.cacheSet(e,null,300))}logVideoProgress(e,t,i){const n=this.getAnalyticsData(),a=this.getPlayerMetrics(),s=i?cr.PreviewStreamProgress:cr.StreamProgress,o=e.map(u=>({type:s,actionContext:this.getActionContext(),data:{...n,player:a,progress:u},eventVersion:Zl.V2}));for(const u of t)o.push({type:cr.StreamBuffering,actionContext:this.getActionContext(),data:{...n,player:a,buffering:u},eventVersion:Zl.V2});this.collectionApiClient.log(o)}logUserAction(e,t){const i={...this.getAnalyticsData(),...e},n={...this.getActionContext(),...t};this.collectionApiClient.log({type:t.actionType,data:i,actionContext:n,eventVersion:t.eventVersion||Zl.V2})}getAnalyticsData(){const e={video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache,isQualityUserPreference:Yl.isQualityUserPreference()},...this.options.additionalAnalyticsData||{}};this.options.shareId&&(e.video.shareId=this.options.shareId);const t=this.getEntityType();return t===Cn.Interactive?e.interactive={id:+this.options.mediaId}:t===Cn.Clip&&(e.clip={id:+this.options.mediaId}),e}initialize(){this.setupCollectionApiClient(),s_.lockWindowSession(),this.options.player.one("dispose",()=>s_.unlockWindowSession())}setupCollectionApiClient(){this.collectionApiClient=new ZAe({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:()=>this.getCurrentUser(),shouldLog:Gee.shouldLog,formatData:Gee.formatData})}async getCurrentUser(){return{id:this.options.userId,customerId:this.options.customerId,sessionId:this.options.authSessionId}}getActionContext(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Hee.Embedded:void 0,workflowPhase:void 0}}getEntityType(){switch(this.options.mediaType){case"MasterVideo":return Cn.Video;case"MasterInteractive":return Cn.Interactive;case"MasterClip":return Cn.Clip}}getLocationContext(){switch(this.options.playerType){case"player":return Ms.Player;case"interactive-player":return Ms.InteractivePlayer;case"create-clip-player":return Ms.CreateClipPlayer}}getPlayerMetrics(){var i,n;const e=this.options.player,t=(i=e.qualityLevels)==null?void 0:i.call(e);return{mode:Yl.getPlayerMode(e),width:e.currentWidth(),height:e.currentHeight(),quality:(n=t==null?void 0:t[t==null?void 0:t.selectedIndex])==null?void 0:n.id}}}class Hx extends Error{constructor(e,t){super((t==null?void 0:t.title)||"Ajax error"),this.url=e,this.response=t}}class axe{constructor(){this.tokens={gateway:null}}async get(e,t){return await this.parseResponse(await fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)}))}async delete(e,t){await fetch(e,{method:"DELETE",headers:this.getHeaders(t)})}async post(e,t,i,n=!0){const a=await fetch(e,{method:"POST",headers:this.getHeaders(i),body:t,mode:"cors"});if(n)return await this.parseResponse(a)}async put(e,t,i,n=!0){const a=await fetch(e,{method:"PUT",headers:this.getHeaders(i),body:t,mode:"cors"});if(n)return await this.parseResponse(a)}setToken(e,t){this.tokens[e]=t}hasToken(e){return!!this.tokens[e]}getHeaders(e={}){const t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization=`Bearer ${this.tokens[e.tokenName]}`),t}async parseResponse(e){if(e.status===404)return null;if(!e.ok){let i;try{i=await e.json()}catch{throw new Hx(e.url)}finally{throw new Hx(e.url,i)}}return await e.json()}}const Vx=new axe;var o_={exports:{}},Kee;function sxe(){return Kee||(Kee=1,(function(r,e){function t(u){if(u&&typeof u=="object"){var l=u.which||u.keyCode||u.charCode;l&&(u=l)}if(typeof u=="number")return s[u];var h=String(u),f=i[h.toLowerCase()];if(f)return f;var f=n[h.toLowerCase()];if(f)return f;if(h.length===1)return h.charCodeAt(0)}t.isEventKey=function(l,h){if(l&&typeof l=="object"){var f=l.which||l.keyCode||l.charCode;if(f==null)return!1;if(typeof h=="string"){var p=i[h.toLowerCase()];if(p)return p===f;var p=n[h.toLowerCase()];if(p)return p===f}else if(typeof h=="number")return h===f;return!1}},e=r.exports=t;var i=e.code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},n=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*!
260
260
  * Programatically add the following
261
- */for(a=97;a<123;a++)i[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)i[a-48]=a;for(a=1;a<13;a++)i["f"+a]=a+111;for(a=0;a<10;a++)i["numpad "+a]=a+96;var s=e.names=e.title={};for(a in i)s[i[a]]=a;for(var o in n)i[o]=n[o]})(o_,o_.exports)),o_.exports}var oxe=sxe();const Ei=Ai(oxe);function uxe(r){document[r.fsApi_.fullscreenEnabled]&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen())}function lxe(r){const e=r.theatreModePlugin().getTheatreMode();r.theatreModePlugin().toggleTheatreMode(!e,{shouldLog:!0})}function cxe(r){const e=r.volume(),t=r.lastVolume_();if(e===0){const i=t<.1?.1:t;r.volume(i),r.muted(!1)}else r.muted(!r.muted())}function Xee(r){r.paused()?r.play():r.pause()}function u_(r,e){r.currentTime(r.currentTime()+e)}function Yee(r,e){e>0&&r.muted()&&r.muted(!1),r.volume(r.volume()+e)}function hxe(r){const e=r.target,t=["video-js","vjs-tech"];return e.tagName.toLowerCase()==="video"||!!t.find(i=>e.classList.contains(i))}const Qee={f:uxe,m:cxe,k:Xee,space:Xee,t:lxe,left:r=>u_(r,-5),right:r=>u_(r,5),j:r=>u_(r,-10),l:r=>u_(r,10),up:r=>Yee(r,.05),down:r=>Yee(r,-.05)};function dxe(r,e,t){if(r.ctrlKey||r.metaKey||r.altKey)return;const i=Ei(r),a=["up","down"].includes(i);if(a&&!r.shiftKey||!a&&r.shiftKey||i==="t"&&!t.allowTheatreMode||i==="f"&&!t.allowFullscreen||!Qee[i])return;Qee[i](e,r);const s=hxe(r),o=["space"].includes(i);(s||o)&&(r.preventDefault(),r.stopPropagation())}var Jee=(r=>(r.PhysicallyChapteredVideo="physically-chaptered-video",r))(Jee||{});const fxe={version:"1.44.0-rc.1"};function Ti(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Nf(r,e){return Nf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Nf(r,e)}function Ar(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Nf(r,e)}var zx,Zee;function pxe(){if(Zee)return zx;Zee=1,zx=r;function r(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(a){n=a}return[n,i]}return zx}var gxe=pxe();const vxe=Ai(gxe);var l_={exports:{}},Wx,ete;function mxe(){if(ete)return Wx;ete=1;var r=Gd(),e=function(n,a){return a===void 0&&(a=!1),function(s,o,u){if(s){n(s);return}if(o.statusCode>=400&&o.statusCode<=599){var l=u;if(a)if(r.TextDecoder){var h=t(o.headers&&o.headers["content-type"]);try{l=new TextDecoder(h).decode(u)}catch{}}else l=String.fromCharCode.apply(null,new Uint8Array(u));n({cause:l});return}n(null,u)}};function t(i){return i===void 0&&(i=""),i.toLowerCase().split(";").reduce(function(n,a){var s=a.split("="),o=s[0],u=s[1];return o.trim()==="charset"?u.trim():n},"utf-8")}return Wx=e,Wx}var tte;function yxe(){if(tte)return l_.exports;tte=1;var r=Gd(),e=pK(),t=vK();o.httpHandler=mxe();/**
261
+ */for(a=97;a<123;a++)i[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)i[a-48]=a;for(a=1;a<13;a++)i["f"+a]=a+111;for(a=0;a<10;a++)i["numpad "+a]=a+96;var s=e.names=e.title={};for(a in i)s[i[a]]=a;for(var o in n)i[o]=n[o]})(o_,o_.exports)),o_.exports}var oxe=sxe();const Ei=Ai(oxe);function uxe(r){document[r.fsApi_.fullscreenEnabled]&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen())}function lxe(r){const e=r.theatreModePlugin().getTheatreMode();r.theatreModePlugin().toggleTheatreMode(!e,{shouldLog:!0})}function cxe(r){const e=r.volume(),t=r.lastVolume_();if(e===0){const i=t<.1?.1:t;r.volume(i),r.muted(!1)}else r.muted(!r.muted())}function Xee(r){r.paused()?r.play():r.pause()}function u_(r,e){r.currentTime(r.currentTime()+e)}function Yee(r,e){e>0&&r.muted()&&r.muted(!1),r.volume(r.volume()+e)}function hxe(r){const e=r.target,t=["video-js","vjs-tech"];return e.tagName.toLowerCase()==="video"||!!t.find(i=>e.classList.contains(i))}const Qee={f:uxe,m:cxe,k:Xee,space:Xee,t:lxe,left:r=>u_(r,-5),right:r=>u_(r,5),j:r=>u_(r,-10),l:r=>u_(r,10),up:r=>Yee(r,.05),down:r=>Yee(r,-.05)};function dxe(r,e,t){if(r.ctrlKey||r.metaKey||r.altKey)return;const i=Ei(r),a=["up","down"].includes(i);if(a&&!r.shiftKey||!a&&r.shiftKey||i==="t"&&!t.allowTheatreMode||i==="f"&&!t.allowFullscreen||!Qee[i])return;Qee[i](e,r);const s=hxe(r),o=["space"].includes(i);(s||o)&&(r.preventDefault(),r.stopPropagation())}var Jee=(r=>(r.PhysicallyChapteredVideo="physically-chaptered-video",r))(Jee||{});const fxe={version:"1.44.0-rc.2"};function Ti(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Nf(r,e){return Nf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Nf(r,e)}function Ar(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Nf(r,e)}var zx,Zee;function pxe(){if(Zee)return zx;Zee=1,zx=r;function r(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(a){n=a}return[n,i]}return zx}var gxe=pxe();const vxe=Ai(gxe);var l_={exports:{}},Wx,ete;function mxe(){if(ete)return Wx;ete=1;var r=Gd(),e=function(n,a){return a===void 0&&(a=!1),function(s,o,u){if(s){n(s);return}if(o.statusCode>=400&&o.statusCode<=599){var l=u;if(a)if(r.TextDecoder){var h=t(o.headers&&o.headers["content-type"]);try{l=new TextDecoder(h).decode(u)}catch{}}else l=String.fromCharCode.apply(null,new Uint8Array(u));n({cause:l});return}n(null,u)}};function t(i){return i===void 0&&(i=""),i.toLowerCase().split(";").reduce(function(n,a){var s=a.split("="),o=s[0],u=s[1];return o.trim()==="charset"?u.trim():n},"utf-8")}return Wx=e,Wx}var tte;function yxe(){if(tte)return l_.exports;tte=1;var r=Gd(),e=pK(),t=vK();o.httpHandler=mxe();/**
262
262
  * @license
263
263
  * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
264
264
  * Copyright (c) 2014 David Björklund
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/player",
3
- "version": "1.44.0-rc.2",
3
+ "version": "1.44.0",
4
4
  "description": "ClickView Player",
5
5
  "main": "dist/player-app.js",
6
6
  "type": "module",