@clickview/player 1.42.0 → 1.43.0-rc.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/dist/player/player.js
CHANGED
|
@@ -255,7 +255,7 @@ __p+='`),f}),a+=`';
|
|
|
255
255
|
</svg>
|
|
256
256
|
`;class jL extends eUe{constructor(e,t){super(e,t)}createEl(){const e=tUe.prototype.createEl.call(this,"button",{className:this.buildCSSClass()},{type:"button",title:this.controlText_});return e.innerHTML=rUe,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",jL),jL.prototype.controlText_="Remove from watch history";class D0{static getKnownProfiles(){return["1080","720","480","360","240"]}static enableProfileOrNextBest(e,t){let n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(let i=0;i<e.length;i++){const a=e[i];a.enabled=n.id===a.id}return n}static getNextBestQuality(e,t){const n=this.getKnownProfiles(),i=n.indexOf(t);if(i>=0){for(let a=i+1;a<n.length;a++){const s=n[a],o=e.getQualityLevelById(s);if(o)return o}for(let a=i-1;a>0;a--){const s=n[a],o=e.getQualityLevelById(s);if(o)return o}}return null}}var HL=(r=>(r.Default="play",r.Hover="hover",r))(HL||{});const nUe=$e.getPlugin("plugin"),Rfe="cv-preview-mode",kfe="cv-force-16-9";class iUe extends nUe{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,n){this.player.trigger("flushprogress");const i=this.mode;if(this.mode=e,e==="hover"){this.buttonAdded||this.addButtons(t,n),this.player.addClass(Rfe),this.applyAspectRatioFix(),this.enableSubtitles(),this.mute(),this.setLowQuality(),this.removeActivityTimeout(),this.player.trigger("resize");return}i==="hover"&&(this.applyDefaultModeLayout(),this.player.removeClass(Rfe),this.player.removeClass(kfe),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 e,t;this.defaultDisplayMode==="theatre"?((e=this.player.theatreModePlugin())==null||e.toggleTheatreMode(!0),this.player.fill(!0)):((t=this.player.theatreModePlugin())==null||t.toggleTheatreMode(!1),this.player.fluid(!0))}applyAspectRatioFix(){const e=()=>{const t=this.player.videoWidth(),n=this.player.videoHeight();if(t>0&&n>0){const i=t/n;Math.abs(i-16/9)<.01||this.player.addClass(kfe)}};this.player.readyState()>=1?e():this.player.one("loadedmetadata",e)}addButtons(e,t){const n=new qL(this.player),i=new Afe(this.player,{onClickHandler:e}),a=new jL(this.player,{onClick:t});t&&Am.isFunction(t)&&this.player.addChild(a),this.player.addChild(n),this.player.addChild(i),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&&D0.enableProfileOrNextBest(e,t.id)}getLowestAvailableQuality(e){const t=[...D0.getKnownProfiles()].reverse();for(const n of t){const i=e.getQualityLevelById(n);if(i)return i}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",iUe);const Ife={getStorage(){return window.localStorage?window.localStorage:window.sessionStorage?window.sessionStorage:Ife.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 Rm=(r=>(r.LocalStorage="localStorage",r.SessionStorage="sessionStorage",r.MemoryStorage="memoryStorage",r))(Rm||{});class VL{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=Ife.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,n=this.expireTime){this.cacheClean();const i={time:this.getCurrentTime()+n*1e3,data:typeof t<"u"&&t!==null&&t};return this.set(`${this.cachePrefix}${e}`,i)}cacheGet(e){const t=`${this.cachePrefix}${e}`,n=this.get(t);return n?this.isExpired(n)?(this.remove(t),null):n.data:null}cacheExists(e){const t=`${this.cachePrefix}${e}`,n=this.get(t);return n?this.isExpired(n)?(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 n=this.get(t);n&&n.time&&this.isExpired(n)&&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 aUe extends VL{static get Instance(){return this.instance||(this.instance=new this({type:"localStorage"}))}}class sUe extends VL{static get Instance(){return this.instance||(this.instance=new this({type:"sessionStorage"}))}}class oUe extends VL{static get Instance(){return this.instance||(this.instance=new this({type:"memoryStorage"}))}}const Rl=aUe.Instance,Ofe=sUe.Instance,Pfe=oUe.Instance,Dfe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Nfe(r,e,t,n){let i,a,s;const o=e||[0],l=(t=t||0)>>>3,f=n===-1?3:0;for(i=0;i<r.length;i+=1)s=i+l,a=s>>>2,o.length<=a&&o.push(0),o[a]|=r[i]<<8*(f+n*(s%4));return{value:o,binLen:8*r.length+t}}function zL(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(n,i,a){return(function(s,o,l,f){let h,p,m,_;if(s.length%2!=0)throw new Error("String of HEX type must be in byte increments");const E=o||[0],T=(l=l||0)>>>3,C=f===-1?3:0;for(h=0;h<s.length;h+=2){if(p=parseInt(s.substr(h,2),16),isNaN(p))throw new Error("String of HEX type contains invalid characters");for(_=(h>>>1)+T,m=_>>>2;E.length<=m;)E.push(0);E[m]|=p<<8*(C+f*(_%4))}return{value:E,binLen:4*s.length+l}})(n,i,a,t)};case"TEXT":return function(n,i,a){return(function(s,o,l,f,h){let p,m,_,E,T,C,R,P,L=0;const B=l||[0],I=(f=f||0)>>>3;if(o==="UTF8")for(R=h===-1?3:0,_=0;_<s.length;_+=1)for(p=s.charCodeAt(_),m=[],128>p?m.push(p):2048>p?(m.push(192|p>>>6),m.push(128|63&p)):55296>p||57344<=p?m.push(224|p>>>12,128|p>>>6&63,128|63&p):(_+=1,p=65536+((1023&p)<<10|1023&s.charCodeAt(_)),m.push(240|p>>>18,128|p>>>12&63,128|p>>>6&63,128|63&p)),E=0;E<m.length;E+=1){for(C=L+I,T=C>>>2;B.length<=T;)B.push(0);B[T]|=m[E]<<8*(R+h*(C%4)),L+=1}else for(R=h===-1?2:0,P=o==="UTF16LE"&&h!==1||o!=="UTF16LE"&&h===1,_=0;_<s.length;_+=1){for(p=s.charCodeAt(_),P===!0&&(E=255&p,p=E<<8|p>>>8),C=L+I,T=C>>>2;B.length<=T;)B.push(0);B[T]|=p<<8*(R+h*(C%4)),L+=2}return{value:B,binLen:8*L+f}})(n,e,i,a,t)};case"B64":return function(n,i,a){return(function(s,o,l,f){let h,p,m,_,E,T,C,R=0;const P=o||[0],L=(l=l||0)>>>3,B=f===-1?3:0,I=s.indexOf("=");if(s.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(s=s.replace(/=/g,""),I!==-1&&I<s.length)throw new Error("Invalid '=' found in base-64 string");for(p=0;p<s.length;p+=4){for(E=s.substr(p,4),_=0,m=0;m<E.length;m+=1)h=Dfe.indexOf(E.charAt(m)),_|=h<<18-6*m;for(m=0;m<E.length-1;m+=1){for(C=R+L,T=C>>>2;P.length<=T;)P.push(0);P[T]|=(_>>>16-8*m&255)<<8*(B+f*(C%4)),R+=1}}return{value:P,binLen:8*R+l}})(n,i,a,t)};case"BYTES":return function(n,i,a){return(function(s,o,l,f){let h,p,m,_;const E=o||[0],T=(l=l||0)>>>3,C=f===-1?3:0;for(p=0;p<s.length;p+=1)h=s.charCodeAt(p),_=p+T,m=_>>>2,E.length<=m&&E.push(0),E[m]|=h<<8*(C+f*(_%4));return{value:E,binLen:8*s.length+l}})(n,i,a,t)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch{throw new Error("ARRAYBUFFER not supported by this environment")}return function(n,i,a){return(function(s,o,l,f){return Nfe(new Uint8Array(s),o,l,f)})(n,i,a,t)};case"UINT8ARRAY":try{new Uint8Array(0)}catch{throw new Error("UINT8ARRAY not supported by this environment")}return function(n,i,a){return Nfe(n,i,a,t)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function Mfe(r,e,t,n){switch(r){case"HEX":return function(i){return(function(a,s,o,l){let f,h,p="";const m=s/8,_=o===-1?3:0;for(f=0;f<m;f+=1)h=a[f>>>2]>>>8*(_+o*(f%4)),p+="0123456789abcdef".charAt(h>>>4&15)+"0123456789abcdef".charAt(15&h);return l.outputUpper?p.toUpperCase():p})(i,e,t,n)};case"B64":return function(i){return(function(a,s,o,l){let f,h,p,m,_,E="";const T=s/8,C=o===-1?3:0;for(f=0;f<T;f+=3)for(m=f+1<T?a[f+1>>>2]:0,_=f+2<T?a[f+2>>>2]:0,p=(a[f>>>2]>>>8*(C+o*(f%4))&255)<<16|(m>>>8*(C+o*((f+1)%4))&255)<<8|_>>>8*(C+o*((f+2)%4))&255,h=0;h<4;h+=1)E+=8*f+6*h<=s?Dfe.charAt(p>>>6*(3-h)&63):l.b64Pad;return E})(i,e,t,n)};case"BYTES":return function(i){return(function(a,s,o){let l,f,h="";const p=s/8,m=o===-1?3:0;for(l=0;l<p;l+=1)f=a[l>>>2]>>>8*(m+o*(l%4))&255,h+=String.fromCharCode(f);return h})(i,e,t)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch{throw new Error("ARRAYBUFFER not supported by this environment")}return function(i){return(function(a,s,o){let l;const f=s/8,h=new ArrayBuffer(f),p=new Uint8Array(h),m=o===-1?3:0;for(l=0;l<f;l+=1)p[l]=a[l>>>2]>>>8*(m+o*(l%4))&255;return h})(i,e,t)};case"UINT8ARRAY":try{new Uint8Array(0)}catch{throw new Error("UINT8ARRAY not supported by this environment")}return function(i){return(function(a,s,o){let l;const f=s/8,h=o===-1?3:0,p=new Uint8Array(f);for(l=0;l<f;l+=1)p[l]=a[l>>>2]>>>8*(h+o*(l%4))&255;return p})(i,e,t)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function Lfe(r){const e={outputUpper:!1,b64Pad:"=",outputLen:-1},t=r||{},n="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(n);e.outputLen=t.outputLen}else if(t.shakeLen){if(t.shakeLen%8!=0)throw new Error(n);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 M_(r,e){return r<<e|r>>>32-e}function Ffe(r,e,t){return r^e^t}function uUe(r,e,t){return r&e^r&t^e&t}function N0(r,e){const t=(65535&r)+(65535&e);return(65535&(r>>>16)+(e>>>16)+(t>>>16))<<16|65535&t}function ew(r,e,t,n,i){const a=(65535&r)+(65535&e)+(65535&t)+(65535&n)+(65535&i);return(65535&(r>>>16)+(e>>>16)+(t>>>16)+(n>>>16)+(i>>>16)+(a>>>16))<<16|65535&a}function lUe(r){return[1732584193,4023233417,2562383102,271733878,3285377520]}function Bfe(r,e){let t,n,i,a,s,o,l;const f=[];for(t=e[0],n=e[1],i=e[2],a=e[3],s=e[4],l=0;l<80;l+=1)f[l]=l<16?r[l]:M_(f[l-3]^f[l-8]^f[l-14]^f[l-16],1),o=l<20?ew(M_(t,5),(h=n)&i^~h&a,s,1518500249,f[l]):l<40?ew(M_(t,5),Ffe(n,i,a),s,1859775393,f[l]):l<60?ew(M_(t,5),uUe(n,i,a),s,2400959708,f[l]):ew(M_(t,5),Ffe(n,i,a),s,3395469782,f[l]),s=a,a=i,i=M_(n,30),n=t,t=o;var h;return e[0]=N0(t,e[0]),e[1]=N0(n,e[1]),e[2]=N0(i,e[2]),e[3]=N0(a,e[3]),e[4]=N0(s,e[4]),e}function cUe(r,e,t,n){let i;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,i=0;i<r.length;i+=16)n=Bfe(r.slice(i,i+16),n);return n}class fUe extends class{constructor(e,t,n){const i=n||{};if(this.t=t,this.i=i.encoding||"UTF8",this.numRounds=i.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,n=0;const i=this.U>>>5,a=this.T(e,this.o,this.h),s=a.binLen,o=a.value,l=s>>>5;for(t=0;t<l;t+=i)n+this.U<=s&&(this.F=this.m(o.slice(t,t+i),this.F),n+=this.U);this.l+=n,this.o=o.slice(n>>>5),this.h=s%this.U,this.u=!0}getHash(e,t){let n,i,a=this.g;const s=Lfe(t);if(this.B){if(s.outputLen===-1)throw new Error("Output length must be specified in options");a=s.outputLen}const o=Mfe(e,a,this.v,s);if(this.A&&this.Y)return o(this.Y(s));for(i=this.H(this.o.slice(),this.h,this.l,this.C(this.F),a),n=1;n<this.numRounds;n+=1)this.B&&a%32!=0&&(i[i.length-1]&=16777215>>>24-a%32),i=this.H(i,a,0,this.I(this.s),a);return o(i)}setHMACKey(e,t,n){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 i=zL(t,(n||{}).encoding||"UTF8",this.v);this.M(i(e))}M(e){const t=this.U>>>3,n=t/4-1;let i;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<=n;)e.value.push(0);for(i=0;i<=n;i+=1)this.p[i]=909522486^e.value[i],this.R[i]=1549556828^e.value[i];this.F=this.m(this.p,this.F),this.l=this.U,this.A=!0}getHMAC(e,t){const n=Lfe(t);return Mfe(e,this.g,this.v,n)(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,n){if(e!=="SHA-1")throw new Error("Chosen SHA variant is not supported");super(e,t,n);const i=n||{};this.L=!0,this.Y=this.N,this.v=-1,this.T=zL(this.t,this.i,this.v),this.m=Bfe,this.C=function(a){return a.slice()},this.I=lUe,this.H=cUe,this.F=[1732584193,4023233417,2562383102,271733878,3285377520],this.U=512,this.g=160,this.B=!1,i.hmacKey&&this.M((function(a,s,o,l){const f=a+" must include a value and format";if(!s)throw new Error(f);if(s.value===void 0||!s.format)throw new Error(f);return zL(s.format,s.encoding||"UTF8",o)(s.value)})("hmacKey",i.hmacKey,this.v))}}var dp=(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))(dp||{});const dUe={systemName:dp.CvApSoutheast1},hUe={systemName:dp.CvApSoutheast2},pUe={systemName:dp.CvEuWest1},vUe={systemName:dp.CvNaWest1},gUe={CvApSoutheast1:dUe,CvApSoutheast2:hUe,CvEuWest1:pUe,CvNaWest1:vUe};var Ufe=(r=>(r.Staff="Staff",r.Learner="Learner",r.Unknown="Unknown",r.System="System",r))(Ufe||{});const $fe="r",tw="cv:r",rw="cv:r:e",nw="referrer",qfe="cv:originalReferrer",WL=28800,jfe=["internalReferrer"],GL={getDecodedAttributionData(){const r=Rl.cacheGet(tw);if(r&&Object.keys(r).length>0)return r;const e=Hfe();return e==null?void 0:e.decoded},getEncodedAttributionData(){const r=Rl.cacheGet(rw);return r!=null&&r.length?r:Hfe().encoded},getProfileId(){const r=GL.getDecodedAttributionData();return(r==null?void 0:r.profileId)??null},setAttributionData(r){if(!r)return;const e=Vfe(r);YL(e,r)},decodeRValue(r){if(r)try{const e=atob(r),t=JSON.parse(e);if(!KL(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 Hfe(){const r=Rl.cacheGet(tw),e=Rl.cacheGet(rw);return KL(r)?{encoded:e,decoded:r}:mUe()}function mUe(){Rl.cacheRemove(tw),Rl.cacheRemove(rw);const r=_Ue(),e=GL.decodeRValue(r);if(e)return YL(r,e),{decoded:e,encoded:r};const t={internalReferrer:window.location.origin+window.location.pathname,originalReferrer:yUe()},n=Vfe(t);return YL(n,t),{decoded:t,encoded:n}}function KL(r){return!r||typeof r!="object"||Object.keys(r).length<jfe.length?!1:jfe.every(e=>typeof r[e]=="string")}function yUe(){const r=Rl.cacheGet(qfe);if(r&&typeof r=="string")return r;let e=document.referrer??"";if(window.URLSearchParams){const t=new URLSearchParams(window.location.search),n=t.has(nw)&&t.get(nw);t.has(nw)&&t.get(nw)&&(e=n)}return e&&Rl.cacheSet(qfe,e,WL),e}function _Ue(){if(!window.URLSearchParams)return;const r=new URLSearchParams(window.location.search);if(r.has($fe))return r.get($fe)}function Vfe(r){if(KL(r))try{return btoa(JSON.stringify(r))}catch{console.error(`R value could not be encoded: ${JSON.stringify(r)}`)}}function YL(r,e){try{Rl.cacheSet(tw,e,WL),Rl.cacheSet(rw,r,WL)}catch{console.error("Could not store attribution data in session storage")}}const zfe=3,bUe=5e3,TUe=6,XL={};class SUe{constructor(e){this.key=e.toString()}getCount(){return XL[this.key]||0}increment(){XL[this.key]=this.getCount()+1}reset(){delete XL[this.key]}shouldBreak(){return this.getCount()>=TUe}}class EUe{constructor(){this.attempt=0}async wait(){await new Promise(e=>setTimeout(e,bUe*Math.pow(2,this.attempt))),this.attempt++}}async function CUe(r,e){const t=new EUe,n=new SUe(r);async function i(){const a=await fetch(r,e);if(a.status>=500&&!n.shouldBreak())throw new Error(`Server error: ${a.status}`);return a.ok&&n.reset(),a}for(let a=1;a<=zfe;a++)try{return await i()}catch(s){if(a>=zfe||n.shouldBreak())throw s;n.increment(),await t.wait()}}var iw,wUe=new Uint8Array(16);function xUe(){if(!iw&&(iw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!iw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return iw(wUe)}const AUe=/^(?:[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 QL(r){return typeof r=="string"&&AUe.test(r)}for(var kl=[],JL=0;JL<256;++JL)kl.push((JL+256).toString(16).substr(1));function RUe(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(kl[r[e+0]]+kl[r[e+1]]+kl[r[e+2]]+kl[r[e+3]]+"-"+kl[r[e+4]]+kl[r[e+5]]+"-"+kl[r[e+6]]+kl[r[e+7]]+"-"+kl[r[e+8]]+kl[r[e+9]]+"-"+kl[r[e+10]]+kl[r[e+11]]+kl[r[e+12]]+kl[r[e+13]]+kl[r[e+14]]+kl[r[e+15]]).toLowerCase();if(!QL(t))throw TypeError("Stringified UUID is invalid");return t}function kUe(r,e,t){r=r||{};var n=r.random||(r.rng||xUe)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,RUe(n)}function IUe(r){if(!QL(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)}const Wfe="cv:session:",Gfe="cv:window:",OUe=new Date(864e13).getTime(),Kfe=18e5,PUe=4;function Yfe(r){if(r===Rm.LocalStorage)return Rl.isAvailable()?Rl:Pfe;if(r===Rm.SessionStorage)return Ofe.isAvailable()?Ofe:Pfe}function Xfe(r){return r===!1?OUe:new Date().getTime()+r}function DUe(){return kUe()}function NUe(r){return r?new Date().getTime()>r:!1}function MUe(r){return!(typeof r!="object"||typeof(r==null?void 0:r.id)!="string"||!QL(r.id)||IUe(r.id)!==PUe||typeof(r==null?void 0:r.ttl)!="number"||(r==null?void 0:r.ttl)<=0||isNaN(r==null?void 0:r.ttl))}function Qfe(r,e,t){const n=Yfe(t);if(!(n!=null&&n.isAvailable()))return;const i=r+(e||"0");n.remove(i)}function Jfe(r,e,t,n){const i=Yfe(t),a=r+(e||"0"),s=i.get(a);if(!MUe(s)||NUe(s==null?void 0:s.ttl)){const l={id:DUe(),ttl:Xfe(n)};return i.set(a,l),l.id}const o={id:s.id,ttl:Xfe(n)};return i.set(a,o),s.id}let ZL=!1;const aw={getClientSessionData(r){const e=Jfe(Wfe,r,Rm.LocalStorage,Kfe),t=Jfe(Gfe,r,Rm.SessionStorage,ZL?!1:Kfe);return!e&&!t?null:{id:e,windowId:t}},resetClientSession(r){Qfe(Wfe,r,Rm.LocalStorage),Qfe(Gfe,r,Rm.SessionStorage)},lockWindowSession(){ZL=!0},unlockWindowSession(){ZL=!1}},km={isObject(r){const e=typeof r;return e==="function"||e==="object"&&!!r},isFunction(r){return typeof r=="function"}},Zfe={safeUrlConcat(r,e){if(!r)return;let t=r;return r.endsWith("/")||(t+="/"),e&&(t+=e.startsWith("/")?e.slice(1):e),t}},Ea={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},av="Unknown";function L_(r,e,t){const n=e.exec(t)||[];let[i]=n;return i||(i=av),{name:r,version:i}}function Im(r,e,t){if(!e)return{name:r,version:av};const n=e.exec(t),i=n&&n.length?n[0].trim():av;return{name:r,version:i}}function LUe(r,e){const t={name:r,version:null};return Ea.win2000.test(e)&&(t.version="2000"),Ea.winXP.test(e)&&(t.version="XP"),Ea.winVista.test(e)&&(t.version="Vista"),Ea.win7.test(e)&&(t.version="7"),Ea.win8.test(e)&&(t.version="8"),Ea.win81.test(e)&&(t.version="8.1"),Ea.win10.test(e)&&(t.version="10"),t.version||(t.version=av),t}const ede={getDeviceType(){const r=window.navigator.userAgent;return Ea.mobileDevice.test(r)?Ea.iphone.test(r)?"iPhone":Ea.ipad.test(r)?"iPad":Ea.android.test(r)?"Android":Ea.blackberry.test(r)?"Blackberry":Ea.windowsPhone.test(r)?"Windows Phone":av:"Desktop"},getOperatingSystem(){const r=window.navigator.userAgent;return Ea.android.test(r)?Im("Android",Ea.androidVersion,r):Ea.iphone.test(r)||Ea.ipad.test(r)?Im("iOS",Ea.iosVersion,r):Ea.linux.test(r)?Im("Linux",null,r):Ea.unix.test(r)?Im("Unix",null,r):Ea.mac.test(r)?Im("Macintosh",Ea.osxVersion,r):Ea.windows.test(r)?LUe("Windows",r):Ea.blackberry.test(r)?Im("BlackBerry",Ea.blackberryVersion,r):Ea.windowsPhone.test(r)?Im("Windows Phone",Ea.windowsPhoneVersion,r):{name:av,version:av}},getBrowser(){const r=window.navigator.userAgent;return Ea.chrome.test(r)?L_("Chrome",Ea.generalVersion,r):Ea.firefox.test(r)?L_("Firefox",Ea.generalVersion,r):Ea.safari.test(r)?L_("Safari",Ea.generalVersion,r):Ea.ie.test(r)?L_("Internet Explorer",Ea.ieVersion,r):Ea.edge.test(r)?L_("Edge",Ea.edgeVersion,r):Ea.opera.test(r)?L_("Opera",Ea.operaVersion,r):{name:av,version:av}},isTouchScreen(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}},FUe=28800,tde="cv:utmparams",eF=[["source","utm_source"],["medium","utm_medium"],["campaign","utm_campaign"],["term","utm_term"],["content","utm_content"]],BUe=eF.reduce((r,[e])=>({...r,[e]:e}),{}),rde={getUtmParameters(){if(!window.URLSearchParams)return null;const r=new URLSearchParams(window.location.search),e={},t=([n,i])=>{r.has(i)&&(e[n]=r.get(i))};return eF.forEach(t),nde(e)},setUtmParameters(r){if(!r)return;const e={},t=n=>{BUe[n]&&(e[n]=r[n])};return Object.keys(r).forEach(t),nde(e)},getURLSearchParams(){if(!window.URLSearchParams)return null;const r=new URLSearchParams,e=rde.getUtmParameters();return e?(eF.forEach(([t,n])=>{e[t]&&r.set(n,e[t])}),r):null}};function nde(r){if(Object.keys(r).length)return Rl.cacheSet(tde,r,FUe),r;const e=Rl.cacheGet(tde);return e&&typeof e=="object"&&Object.keys(e).length?e:null}const UUe={version:"2.3.0"},$Ue="zXJL9nOHxzDlMUDjiP41",ide="unknown";class qUe{constructor(e){this.options=e,this.initialize()}initialize(){this.validateOptions(),this.options.logUtmParameters&&(this.utmParameters=rde.getUtmParameters()),this.options.logAttributionData&&(this.attributionData=GL.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(i=>this.shouldLog(i));if(!t.length)return;t.forEach(i=>this.validateEvent(i));const n=await Promise.all(t.map(i=>this.formatData(i)));await this.postData(n)}validateOptions(){if(!km.isFunction(this.options.getUser))throw new Error("getUser option is required.")}shouldLog(e){return km.isFunction(this.options.shouldLog)?this.options.shouldLog(e):!0}async postData(e){const t=await this.getRegionalUrl(this.options.collectionApiUrls),n=JSON.stringify(e),i={"Content-Type":"application/json",...this.getSignatureHeader(n)};let a=Zfe.safeUrlConcat(t,"/v1/ingest");Array.isArray(e)&&(a=Zfe.safeUrlConcat(a,"/bulk"));try{const s=await CUe(a,{method:"POST",mode:"cors",headers:i,body:n});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 fUe("SHA-1","TEXT",{hmacKey:{value:$Ue,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 dp.CvEuWest1:return e.cvEuWest1;case dp.CvApSoutheast2:return e.cvApSoutheast2;case dp.CvNaWest1:return e.cvNaWest1;case dp.CvApSoutheast1:default:return e.cvApSoutheast1}}validateEvent(e){typeof e.type!="string"&&this.logError(new Error("Event type is required."),!0),km.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,n=this.getPlatformMetadata(),i=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:i,action:t,platform:n,product:s,session:a};this.utmParameters&&(o.utm=this.utmParameters);const l=this.extractData(e),f=Object.keys(o).map(p=>p.toLowerCase()),h=Object.keys(l).map(p=>p.toLowerCase());return f.forEach(p=>{h.includes(p)&&this.logError(new Error(`${p} is a reserved key.`),!0)}),{...o,...l}}extractData(e){return km.isFunction(this.options.formatData)?this.options.formatData(e):{[e.actionContext.entity]:e.data}}async getUserData(){var t,n,i;let e;try{e=await((n=(t=this.options).getProfileId)==null?void 0:n.call(t))}catch(a){this.logError(a)}try{const a=await this.options.getUser();return a!=null&&a.id?{id:a.id,role:((i=a.role)==null?void 0:i.toLowerCase())||ide,userGroup:(a.userGroup??Ufe.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{...aw.getClientSessionData(e==null?void 0:e.id),authSessionId:e==null?void 0:e.sessionId}}catch(e){return console.error(e),aw.getClientSessionData(null)}}getPlatformMetadata(){var t,n;const e={url:window.location.href,referrer:document.referrer};return(t=this.attributionData)!=null&&t.internalReferrer&&(e.internalReferrer=this.attributionData.internalReferrer),(n=this.attributionData)!=null&&n.originalReferrer&&(e.originalReferrer=this.attributionData.originalReferrer),{browser:ede.getBrowser(),os:ede.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:UUe.version,region:this.getRegionByName(this.options.regionName)},timestamp:new Date().toISOString(),eventVersion:e.eventVersion}}getRegionByName(e){let t;return Object.values(gUe).forEach(n=>{n.systemName===e&&(t=n)}),t}normalizeYearGroup(e){return e?e.toLowerCase().split(" ").join("_"):ide}logError(e,t,...n){if(this.options.logError&&this.options.logError(e,...n),t)throw e}}var rn=(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.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))(rn||{}),ks=(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))(ks||{}),ic=(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.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))(ic||{}),sv=(r=>(r.Start="start",r.Complete="complete",r.Save="save",r.Discard="discard",r.Next="next",r.Back="back",r))(sv||{}),Om=(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))(Om||{}),ade=(r=>(r.Embedded="embedded",r))(ade||{}),sde=(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))(sde||{}),tF=(r=>(r.FileSelect="file_select",r.DragDrop="drag_drop",r))(tF||{}),rF=(r=>(r.On="on",r.Off="off",r))(rF||{}),M0=(r=>(r.SearchTranscript="search_transcript",r.NextResult="next_result",r.PreviousResult="previous_result",r.ResetResults="reset_results",r))(M0||{}),nF=(r=>(r.FileSelect="file-select",r.DragDrop="drag-drop",r))(nF||{}),tg=(r=>(r.Video="videos",r.Clip="clips",r.Interactive="interactives",r.Folder="categories",r.Series="series",r.Tags="tags",r.Subjects="subjects",r))(tg||{}),ov=(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))(ov||{});const wo={passthrough(r){return r}},fi={allow:()=>!0,restrict:()=>!1},jUe={getShareData(r){var o,l,f,h;const{id:e,search:t,pagePositionIndex:n,shareId:i,shareType:a}=r,s={id:e,search:t,pagePositionIndex:n,shareId:i,shareType:a};return(o=r.video)!=null&&o.id&&(s.video={id:r.video.id}),(l=r.clip)!=null&&l.id&&(s.clip={id:r.clip.id},(f=r.clip.video)!=null&&f.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}},F_={getUploadData(r,e){const{entity:t}=e.actionContext;if(t===ks.Video)return F_.formatVideoUpload(r,e);if(t===ks.Resource||t===ks.Subtitle)return F_.formatResourceUpload(r);if(t===ks.Banner||t===ks.Thumbnail||t===ks.MixedMedia)return r;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload(r,e){const{workflowPhase:t}=e.actionContext;if(t===sv.Start)return F_.getStartVideoUploadData(r);if(t===sv.Discard)return F_.getDiscardVideoUploadData(r);if(t===sv.Complete)return F_.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:n,name:i,status:a,cvUpload:s}=t.file,o={fileName:i,count:Array.isArray(r)?r.length:1,type:n,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:n,folderId:i,autoCaption:a}=e;return{fileName:t,libraryId:n,folderId:i,autoCaption:a,count:r.length}})},formatResourceUpload(r){const{id:e,name:t}=r,n={id:e,name:t};return km.isObject(r.metadata)&&(n.type=r.metadata.type),n}},HUe={[rn.Navigate]:fi.restrict,[rn.Click]:fi.allow,[rn.Search]:fi.allow,[rn.InstantSearch]:fi.allow,[rn.Play]:fi.allow,[rn.Stream]:fi.allow,[rn.WebPlayerStream]:fi.allow,[rn.StreamProgress]:fi.allow,[rn.PreviewStreamProgress]:fi.allow,[rn.Rename]:fi.allow,[rn.Move]:fi.allow,[rn.Create]:fi.allow,[rn.Delete]:fi.allow,[rn.Associate]:fi.allow,[rn.Dissociate]:fi.allow,[rn.Filter]:fi.allow,[rn.Sort]:fi.allow,[rn.Approve]:fi.allow,[rn.Reject]:fi.allow,[rn.Disable]:fi.allow,[rn.Upload]:fi.allow,[rn.Download]:fi.allow,[rn.SetAccess]:fi.allow,[rn.AddToLocalCache]:fi.restrict,[rn.Share]:fi.allow,[rn.Unshare]:fi.allow,[rn.Edit]:fi.allow,[rn.Suggest]:fi.allow,[rn.Favourite]:fi.allow,[rn.WorkspaceAdd]:fi.allow,[rn.ResolveWarning]:fi.allow,[rn.DismissWarning]:fi.allow,[rn.EditAssoc]:fi.allow,[rn.Follow]:fi.allow,[rn.Print]:fi.allow,[rn.Copy]:fi.allow,[rn.Activate]:fi.allow,[rn.VerifyEmail]:fi.allow,[rn.ChangePassword]:fi.allow,[rn.Export]:fi.allow,[rn.SendEmail]:fi.allow,[rn.Publish]:fi.allow,[rn.Submit]:fi.allow,[rn.Complete]:fi.allow,[rn.Archive]:fi.allow,[rn.Promote]:fi.allow,[rn.Demote]:fi.allow,[rn.BulkAction]:fi.allow,[rn.Remove]:fi.allow,[rn.Dismiss]:fi.allow,[rn.Open]:fi.allow,[rn.Hide]:fi.allow,[rn.PageView]:fi.allow,[rn.Select]:fi.allow,[rn.SwitchCustomer]:fi.allow,[rn.Focus]:fi.allow,[rn.Blur]:fi.allow,[rn.Hover]:fi.allow,[rn.Unhover]:fi.allow},VUe={[rn.Search]:wo.passthrough,[rn.InstantSearch]:wo.passthrough,[rn.Play]:wo.passthrough,[rn.Stream]:wo.passthrough,[rn.StreamProgress]:wo.passthrough,[rn.PreviewStreamProgress]:wo.passthrough,[rn.Click]:wo.passthrough,[rn.Filter]:wo.passthrough,[rn.Sort]:wo.passthrough,[rn.SetAccess]:wo.passthrough,[rn.Approve]:wo.passthrough,[rn.Reject]:wo.passthrough,[rn.Create]:wo.passthrough,[rn.Delete]:wo.passthrough,[rn.Rename]:wo.passthrough,[rn.Move]:wo.passthrough,[rn.Edit]:wo.passthrough,[rn.Share]:jUe.getShareData,[rn.Disable]:wo.passthrough,[rn.Suggest]:wo.passthrough,[rn.Upload]:F_.getUploadData,[rn.ResolveWarning]:wo.passthrough,[rn.DismissWarning]:wo.passthrough,[rn.Follow]:wo.passthrough,[rn.Print]:wo.passthrough,[rn.Copy]:wo.passthrough},ode={[rn.Search]:()=>"search",[rn.InstantSearch]:()=>"search",[rn.Filter]:()=>"filter",[rn.Stream]:()=>ks.Video},ude={user:"target_user",product:"target_product"},zUe={[rn.StreamProgress]:!0,[rn.WebPlayerStream]:!0,[rn.PreviewStreamProgress]:!0},lde={shouldLog(r){return!!HUe[r.type](r)},formatData(r){const e=VUe[r.type],t=km.isFunction(e)?e(r.data,r):r.data;if(zUe[r.type])return t;let n=r.actionContext.entity;return km.isFunction(ode[r.type])&&(n=ode[r.type](r)),ude[n]&&(n=ude[n]),{[n]:t}}};class WUe{constructor(e){this.options=e,this.initialize()}logStream(){const e=`v:${this.options.videoId}`;Rl.cacheExists(e)||(this.collectionApiClient.log({type:rn.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:ov.V3}),Rl&&Rl.cacheSet(e,null,300))}logVideoProgress(e){const t=this.getAnalyticsData();this.collectionApiClient.log(e.map(n=>({type:rn.StreamProgress,actionContext:this.getActionContext(),data:{...t,progress:n},eventVersion:ov.V2})))}logVideoPreviewProgress(e){const t=this.getAnalyticsData();this.collectionApiClient.log(e.map(n=>({type:rn.PreviewStreamProgress,actionContext:this.getActionContext(),data:{...t,progress:n},eventVersion:ov.V2})))}logUserAction(e,t){const n={...this.getAnalyticsData(),...e},i={...this.getActionContext(),...t};this.collectionApiClient.log({type:t.actionType,data:n,actionContext:i,eventVersion:t.eventVersion||ov.V2})}getAnalyticsData(){const e={video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache},...this.options.additionalAnalyticsData||{}};this.options.shareId&&(e.video.shareId=this.options.shareId);const t=this.getEntityType();return t===ks.Interactive?e.interactive={id:+this.options.mediaId}:t===ks.Clip&&(e.clip={id:+this.options.mediaId}),e}initialize(){this.setupCollectionApiClient(),aw.lockWindowSession(),this.options.player.one("dispose",()=>aw.unlockWindowSession())}setupCollectionApiClient(){this.collectionApiClient=new qUe({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:()=>this.getCurrentUser(),shouldLog:lde.shouldLog,formatData:lde.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?ade.Embedded:void 0,workflowPhase:void 0}}getEntityType(){switch(this.options.mediaType){case"MasterVideo":return ks.Video;case"MasterInteractive":return ks.Interactive;case"MasterClip":return ks.Clip}}getLocationContext(){switch(this.options.playerType){case"player":return ic.Player;case"interactive-player":return ic.InteractivePlayer;case"create-clip-player":return ic.CreateClipPlayer}}}class iF extends Error{constructor(e,t){super((t==null?void 0:t.title)||"Ajax error"),this.url=e,this.response=t}}class GUe{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,n,i=!0){const a=await fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});if(i)return await this.parseResponse(a)}async put(e,t,n,i=!0){const a=await fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});if(i)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 n;try{n=await e.json()}catch{throw new iF(e.url)}finally{throw new iF(e.url,n)}}return await e.json()}}const aF=new GUe;var sw={exports:{}},cde;function KUe(){return cde||(cde=1,(function(r,e){function t(l){if(l&&typeof l=="object"){var f=l.which||l.keyCode||l.charCode;f&&(l=f)}if(typeof l=="number")return s[l];var h=String(l),p=n[h.toLowerCase()];if(p)return p;var p=i[h.toLowerCase()];if(p)return p;if(h.length===1)return h.charCodeAt(0)}t.isEventKey=function(f,h){if(f&&typeof f=="object"){var p=f.which||f.keyCode||f.charCode;if(p==null)return!1;if(typeof h=="string"){var m=n[h.toLowerCase()];if(m)return m===p;var m=i[h.toLowerCase()];if(m)return m===p}else if(typeof h=="number")return h===p;return!1}},e=r.exports=t;var n=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},i=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};/*!
|
|
257
257
|
* Programatically add the following
|
|
258
|
-
*/for(a=97;a<123;a++)n[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)n[a-48]=a;for(a=1;a<13;a++)n["f"+a]=a+111;for(a=0;a<10;a++)n["numpad "+a]=a+96;var s=e.names=e.title={};for(a in n)s[n[a]]=a;for(var o in i)n[o]=i[o]})(sw,sw.exports)),sw.exports}var YUe=KUe();const Ji=ia(YUe);function XUe(r){document[r.fsApi_.fullscreenEnabled]&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen())}function QUe(r){const e=r.theatreModePlugin().getTheatreMode();r.theatreModePlugin().toggleTheatreMode(!e,{shouldLog:!0})}function JUe(r){const e=r.volume(),t=r.lastVolume_();if(e===0){const n=t<.1?.1:t;r.volume(n),r.muted(!1)}else r.muted(!r.muted())}function fde(r){r.paused()?r.play():r.pause()}function ow(r,e){r.currentTime(r.currentTime()+e)}function dde(r,e){e>0&&r.muted()&&r.muted(!1),r.volume(r.volume()+e)}function ZUe(r){const e=r.target,t=["video-js","vjs-tech"];return e.tagName.toLowerCase()==="video"||!!t.find(n=>e.classList.contains(n))}const hde={f:XUe,m:JUe,k:fde,space:fde,t:QUe,left:r=>ow(r,-5),right:r=>ow(r,5),j:r=>ow(r,-10),l:r=>ow(r,10),up:r=>dde(r,.05),down:r=>dde(r,-.05)};function e4e(r,e,t){if(r.ctrlKey||r.metaKey||r.altKey)return;const n=Ji(r),a=["up","down"].includes(n);if(a&&!r.shiftKey||!a&&r.shiftKey||n==="t"&&!t.allowTheatreMode||n==="f"&&!t.allowFullscreen||!hde[n])return;hde[n](e,r);const s=ZUe(r),o=["space"].includes(n);(s||o)&&(r.preventDefault(),r.stopPropagation())}var pde=(r=>(r.PhysicallyChapteredVideo="physically-chaptered-video",r))(pde||{});const t4e={version:"1.
|
|
258
|
+
*/for(a=97;a<123;a++)n[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)n[a-48]=a;for(a=1;a<13;a++)n["f"+a]=a+111;for(a=0;a<10;a++)n["numpad "+a]=a+96;var s=e.names=e.title={};for(a in n)s[n[a]]=a;for(var o in i)n[o]=i[o]})(sw,sw.exports)),sw.exports}var YUe=KUe();const Ji=ia(YUe);function XUe(r){document[r.fsApi_.fullscreenEnabled]&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen())}function QUe(r){const e=r.theatreModePlugin().getTheatreMode();r.theatreModePlugin().toggleTheatreMode(!e,{shouldLog:!0})}function JUe(r){const e=r.volume(),t=r.lastVolume_();if(e===0){const n=t<.1?.1:t;r.volume(n),r.muted(!1)}else r.muted(!r.muted())}function fde(r){r.paused()?r.play():r.pause()}function ow(r,e){r.currentTime(r.currentTime()+e)}function dde(r,e){e>0&&r.muted()&&r.muted(!1),r.volume(r.volume()+e)}function ZUe(r){const e=r.target,t=["video-js","vjs-tech"];return e.tagName.toLowerCase()==="video"||!!t.find(n=>e.classList.contains(n))}const hde={f:XUe,m:JUe,k:fde,space:fde,t:QUe,left:r=>ow(r,-5),right:r=>ow(r,5),j:r=>ow(r,-10),l:r=>ow(r,10),up:r=>dde(r,.05),down:r=>dde(r,-.05)};function e4e(r,e,t){if(r.ctrlKey||r.metaKey||r.altKey)return;const n=Ji(r),a=["up","down"].includes(n);if(a&&!r.shiftKey||!a&&r.shiftKey||n==="t"&&!t.allowTheatreMode||n==="f"&&!t.allowFullscreen||!hde[n])return;hde[n](e,r);const s=ZUe(r),o=["space"].includes(n);(s||o)&&(r.preventDefault(),r.stopPropagation())}var pde=(r=>(r.PhysicallyChapteredVideo="physically-chaptered-video",r))(pde||{});const t4e={version:"1.43.0-rc.0"};function Gi(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function B_(r,e){return B_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},B_(r,e)}function An(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,B_(r,e)}var sF,vde;function r4e(){if(vde)return sF;vde=1,sF=r;function r(e,t){var n,i=null;try{n=JSON.parse(e,t)}catch(a){i=a}return[i,n]}return sF}var n4e=r4e();const i4e=ia(n4e);var uw={exports:{}},oF,gde;function a4e(){if(gde)return oF;gde=1;var r=Jy(),e=function(i,a){return a===void 0&&(a=!1),function(s,o,l){if(s){i(s);return}if(o.statusCode>=400&&o.statusCode<=599){var f=l;if(a)if(r.TextDecoder){var h=t(o.headers&&o.headers["content-type"]);try{f=new TextDecoder(h).decode(l)}catch{}}else f=String.fromCharCode.apply(null,new Uint8Array(l));i({cause:f});return}i(null,l)}};function t(n){return n===void 0&&(n=""),n.toLowerCase().split(";").reduce(function(i,a){var s=a.split("="),o=s[0],l=s[1];return o.trim()==="charset"?l.trim():i},"utf-8")}return oF=e,oF}var mde;function s4e(){if(mde)return uw.exports;mde=1;var r=Jy(),e=Pae(),t=Nae();o.httpHandler=a4e();/**
|
|
259
259
|
* @license
|
|
260
260
|
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
|
|
261
261
|
* Copyright (c) 2014 David Björklund
|