UNPKG

videojs-contrib-eme

Version:

Supports Encrypted Media Extensions for playback of encrypted content in Video.js

3 lines (2 loc) 18.8 kB
/*! @name videojs-contrib-eme @version 5.5.2 @license Apache-2.0 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("video.js")):"function"==typeof define&&define.amd?define(["exports","video.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).videojsContribEme={},e.videojs)}(this,(function(e,t){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(t);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},n.apply(this,arguments)}const r=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;const s=new DataView(e),i=new DataView(t);for(let e=0;e<s.byteLength;e++)if(s.getUint8(e)!==i.getUint8(e))return!1;return!0},a=e=>e instanceof Uint8Array||e instanceof Uint16Array?e.buffer:e,o=(...e)=>{const t=i.default.obj||i.default;return(t.merge||t.mergeOptions).apply(t,e)},y=(...e)=>{const t=o(...e);return Object.keys(t).forEach((e=>{null===t[e]&&delete t[e]})),t},d=e=>{const t=[];return Object.keys(e).forEach((s=>{const i=E(s,e[s])[0];t.push(i)})),t};let c=i.default.xhr.httpHandler;c||(c=(e,t)=>(s,i,n)=>{if(s)e(s);else{if(i.statusCode>=400&&i.statusCode<=599){let s=n;return t&&(s=String.fromCharCode.apply(null,new Uint8Array(n))),void e({cause:s})}e(null,n)}});const l=(e,t,s,n,r)=>{const a=(e=>{const t=String.fromCharCode.apply(null,new Uint16Array(e)),s=(new window.DOMParser).parseFromString(t,"application/xml"),i=s.getElementsByTagName("HttpHeaders")[0];let n={};if(i){const e=i.getElementsByTagName("name"),t=i.getElementsByTagName("value");for(let s=0;s<e.length;s++)n[e[s].childNodes[0].nodeValue]=t[s].childNodes[0].nodeValue}const r=s.getElementsByTagName("Challenge")[0];let a;return r&&(a=window.atob(r.childNodes[0].nodeValue)),s.querySelector("parsererror")&&(n={"Content-Type":"text/xml; charset=utf-8",SOAPAction:'"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"'},a=e),{headers:n,message:a}})(s),o=a.message,d=y(a.headers,n.emeHeaders,t.licenseHeaders);i.default.xhr({uri:t.url,method:"post",headers:d,body:o,responseType:"arraybuffer",requestType:"license",metadata:{keySystem:e}},c(r,!0))},m={EMEFailedToRequestMediaKeySystemAccess:"eme-failed-request-media-key-system-access",EMEFailedToCreateMediaKeys:"eme-failed-create-media-keys",EMEFailedToAttachMediaKeysToVideoElement:"eme-failed-attach-media-keys-to-video",EMEFailedToCreateMediaKeySession:"eme-failed-create-media-key-session",EMEFailedToSetServerCertificate:"eme-failed-set-server-certificate",EMEFailedToGenerateLicenseRequest:"eme-failed-generate-license-request",EMEFailedToUpdateSessionWithReceivedLicenseKeys:"eme-failed-update-session",EMEFailedToCloseSession:"eme-failed-close-session",EMEFailedToRemoveKeysFromSession:"eme-failed-remove-keys",EMEFailedToLoadSessionBySessionId:"eme-failed-load-session"},p="com.apple.fps.1_0",u=({initData:e,id:t,cert:s})=>{"string"==typeof t&&(t=(e=>{const t=new ArrayBuffer(2*e.length),s=new Uint16Array(t);for(let t=0;t<e.length;t++)s[t]=e.charCodeAt(t);return s})(t));let i=0;const n=new ArrayBuffer(e.byteLength+4+t.byteLength+4+s.byteLength),r=new DataView(n);new Uint8Array(n,i,e.byteLength).set(e),i+=e.byteLength,r.setUint32(i,t.byteLength,!0),i+=4;const a=new Uint16Array(n,i,t.length);a.set(t),i+=a.byteLength,r.setUint32(i,s.byteLength,!0),i+=4;return new Uint8Array(n,i,s.byteLength).set(s),new Uint8Array(n,0,n.byteLength)},f=(e,t)=>(s,n)=>{const r=y(s.emeHeaders,t.certificateHeaders);i.default.xhr({uri:t.certificateUri,responseType:"arraybuffer",requestType:"license",metadata:{keySystem:e},headers:r},c(((e,t)=>{e?n(e):n(null,new Uint8Array(t))})))},g=(e,t)=>(e=>{const t=document.createElement("a");return t.href=e,t.hostname})(t),k=(e,t)=>(s,n,r,a)=>{const o=y({"Content-type":"application/octet-stream"},s.emeHeaders,t.licenseHeaders);i.default.xhr({uri:t.licenseUri||t.url,method:"POST",responseType:"arraybuffer",requestType:"license",metadata:{keySystem:e,contentId:n},body:r,headers:o},c(a,!0))},h=({video:e,initData:t,options:s,eventBus:i,emeError:n})=>{const r=s.keySystems["com.apple.fps.1_0"],a=r.getCertificate||f(p,r),o=r.getContentId||g,y=r.getLicense||k(p,r);return new Promise(((e,t)=>{a(s,((s,i)=>{if(s){return n(s,{errorType:m.EMEFailedToSetServerCertificate,keySystem:p}),void t(s)}e(i)}))})).then((r=>{return(({video:e,contentId:t,initData:s,cert:i,options:n,getLicense:r,eventBus:a,emeError:o})=>new Promise(((y,d)=>{if(!e.webkitKeys)try{e.webkitSetMediaKeys(new window.WebKitMediaKeys(p))}catch(e){return o(e,{errorType:m.EMEFailedToCreateMediaKeys,keySystem:p}),void d("Could not create MediaKeys")}let c;try{c=e.webkitKeys.createSession("video/mp4",u({id:t,initData:s,cert:i}))}catch(e){return o(e,{errorType:m.EMEFailedToCreateMediaKeySession,keySystem:p}),void d("Could not create key session")}v(a,{type:"keysessioncreated",keySession:c}),c.contentId=t,c.addEventListener("webkitkeymessage",(e=>{v(a,{type:"keymessage",messageEvent:e}),r(n,t,e.message,((e,t)=>{if(a&&v(a,{type:"licenserequestattempted"}),e)return o(e,{errortype:m.EMEFailedToGenerateLicenseRequest,keySystem:p}),void d(e);c.update(new Uint8Array(t)),v(a,{type:"keysessionupdated",keySession:c})}))})),c.addEventListener("webkitkeyadded",(()=>{y()})),c.addEventListener("webkitkeyerror",(()=>{const e=c.error;o(e,{errorType:m.EMEFailedToUpdateSessionWithReceivedLicenseKeys,keySystem:p}),d(`KeySession error: code ${e.code}, systemCode ${e.systemCode}`)}))})))({video:e,cert:r,initData:t,getLicense:y,options:s,contentId:o(s,(a=t,String.fromCharCode.apply(null,new Uint16Array(a.buffer||a)))),eventBus:i,emeError:n});var a}))},S=e=>e.startsWith("com.apple.fps"),v=(e,t)=>{e.isDisposed()||e.trigger(n({},t))},E=(e,t)=>{if(t.supportedConfigurations)return t.supportedConfigurations;const s=S(e),i={},r=t.initDataTypes||(s?["sinf"]:null),a=t.audioContentType,o=t.audioRobustness,y=t.videoContentType||(s?"video/mp4":null),d=t.videoRobustness,c=t.persistentState;return(a||o)&&(i.audioCapabilities=[n({},a?{contentType:a}:{},o?{robustness:o}:{})]),(y||d)&&(i.videoCapabilities=[n({},y?{contentType:y}:{},d?{robustness:d}:{})]),c&&(i.persistentState=c),r&&(i.initDataTypes=r),[i]},w=(e,t)=>{const{mediaKeys:s,initDataType:n,initData:r,options:a,getLicense:o,removeSession:y,eventBus:d,contentId:c,emeError:l,keySystem:p}=t;let u,f=0;e.on("pause",(()=>{a.limitRenewalsMaxPauseDuration&&"number"==typeof a.limitRenewalsMaxPauseDuration&&(u=setInterval((()=>{f++,f>=a.limitRenewalsMaxPauseDuration&&clearInterval(u)}),1e3),e.on("play",(()=>{clearInterval(u),f=0})))}));try{const t=s.createSession(),u=()=>{i.default.log.debug("Session expired, closing the session."),t.close().then((()=>{d.isDisposed()||(v(d,{type:"keysessionclosed",keySession:t}),y(r))})).catch((e=>{l(e,{errorType:m.EMEFailedToCloseSession,keySystem:p})}))};return v(d,{type:"keysessioncreated",keySession:t}),e.on("dispose",(()=>{u()})),new Promise(((s,y)=>{t.addEventListener("message",(i=>{if(v(d,{type:"keymessage",messageEvent:i}),"license-request"===i.messageType||"license-renewal"===i.messageType){if("license-renewal"===i.messageType){const t=a.limitRenewalsBeforePlay,s=a.limitRenewalsMaxPauseDuration,i="number"==typeof s,n=!e.hasStarted()&&t,r=e.paused()&&i&&f>=s,o=e.ended();if(n||r||o)return void u()}o(a,i.message,c).then((e=>{s(t.update(e).then((()=>{v(d,{type:"keysessionupdated",keySession:t})})).catch((e=>{l(e,{errorType:m.EMEFailedToUpdateSessionWithReceivedLicenseKeys,keySystem:p})})))})).catch((e=>{y(e)}))}}),!1);const g="keystatuseschange";t.addEventListener(g,(e=>{let s=!1;d.isDisposed()||(v(d,{type:g,keyStatuses:t.keyStatuses}),t.keyStatuses.forEach(((n,r)=>{switch(v(d,{keyId:r,status:n,target:t,type:"keystatuschange"}),n){case"expired":s=!0;break;case"internal-error":const t='Key status reported as "internal-error." Leaving the session open since we don\'t have enough details to know if this error is fatal.';i.default.log.warn(t,e)}})),s&&u())}),!1),t.generateRequest(n,r).catch((e=>{l(e,{errorType:m.EMEFailedToGenerateLicenseRequest,keySystem:p}),y("Unable to create or initialize key session")}))}))}catch(e){l(e,{errorType:m.EMEFailedToCreateMediaKeySession,keySystem:p})}},b=(e,t)=>{if("string"==typeof t&&(t={url:t}),!t.url&&t.licenseUri&&(t.url=t.licenseUri),!t.url&&!t.getLicense)throw new Error(`Missing url/licenseUri or getLicense in ${e} keySystem configuration.`);const s=S(e);if(s&&t.certificateUri&&!t.getCertificate&&(t.getCertificate=f(e,t)),s&&!t.getCertificate)throw new Error(`Missing getCertificate or certificateUri in ${e} keySystem configuration.`);return s&&!t.getContentId&&(t.getContentId=g),t.url&&!t.getLicense&&(t.getLicense="com.microsoft.playready"===e?((e,t)=>(s,i,n)=>{l(e,t,i,s,n)})(e,t):s?k(e,t):((e,t)=>(s,n,r)=>{const a=y({"Content-type":"application/octet-stream"},s.emeHeaders,t.licenseHeaders);i.default.xhr({uri:t.url,method:"POST",responseType:"arraybuffer",requestType:"license",metadata:{keySystem:e},body:n,headers:a},c(r,!0))})(e,t)),t},T=({player:e,video:t,initDataType:s,initData:i,keySystemAccess:n,options:r,removeSession:a,eventBus:o,emeError:y})=>{let d=Promise.resolve();const c=n.keySystem;let l;try{l=b(c,r.keySystems[c])}catch(e){return Promise.reject(e)}const p=l.getContentId?l.getContentId(r,(u=i,String.fromCharCode.apply(null,new Uint8Array(u.buffer||u)))):null;var u;if(void 0===t.mediaKeysObject){let s;t.mediaKeysObject=null,t.pendingSessionData=[],d=new Promise(((e,i)=>{t.keySystem=c,l.getCertificate?l.getCertificate(r,((t,n)=>{t?i(t):(s=n,e())})):e(n)})).then((()=>n.createMediaKeys())).then((i=>(v(o,{type:"keysystemaccesscomplete",mediaKeys:i}),(({player:e,video:t,certificate:s,createdMediaKeys:i,emeError:n})=>{t.mediaKeysObject=i;const r=[];s&&r.push(i.setServerCertificate(s).catch((e=>{const s={errorType:m.EMEFailedToSetServerCertificate,keySystem:t.keySystem};n(e,s)})));for(let s=0;s<t.pendingSessionData.length;s++){const i=t.pendingSessionData[s];r.push(w(e,{mediaKeys:t.mediaKeysObject,initDataType:i.initDataType,initData:i.initData,options:i.options,getLicense:i.getLicense,removeSession:i.removeSession,eventBus:i.eventBus,contentId:i.contentId,emeError:i.emeError,keySystem:t.keySystem}))}return t.pendingSessionData=[],r.push(t.setMediaKeys(i).catch((e=>{const s={errorType:m.EMEFailedToAttachMediaKeysToVideoElement,keySystem:t.keySystem};n(e,s)}))),Promise.all(r)})({player:e,video:t,certificate:s,createdMediaKeys:i,emeError:y})))).catch((e=>(y(e,{errorType:m.EMEFailedToCreateMediaKeys,keySystem:c}),e?Promise.reject(e):Promise.reject("Failed to create and initialize a MediaKeys object"))))}return d.then((()=>{const n=t.keySystem?((e,t,s)=>(i,n,r)=>new Promise(((a,o)=>{const y=function(e,t){s&&v(s,{type:"licenserequestattempted"}),e?o(e):a(t)};S(e)?t(i,r,new Uint8Array(n),y):t(i,n,y)})))(c,l.getLicense,o):null;return(({player:e,video:t,initDataType:s,initData:i,options:n,getLicense:r,contentId:a,removeSession:o,eventBus:y,emeError:d})=>{const c={initDataType:s,initData:i,options:n,getLicense:r,removeSession:o,eventBus:y,contentId:a,emeError:d,keySystem:t.keySystem};return t.mediaKeysObject?(c.mediaKeys=t.mediaKeysObject,w(e,c)):(t.pendingSessionData.push(c),Promise.resolve())})({player:e,video:t,initDataType:s,initData:i,options:r,getLicense:n,contentId:p,removeSession:a,eventBus:o,emeError:y})}))},M="com.microsoft.playready",K=(e,t,s,i,n)=>{const r=e.msKeys.createSession("video/mp4",t);if(!r){const e=new Error("Could not create key session.");throw n(e,{errorType:m.EMEFailedToCreateMediaKeySession,keySystem:M}),e}v(i,{type:"keysessioncreated",keySession:r}),r.addEventListener("mskeymessage",(e=>{v(i,{type:"keymessage",messageEvent:e}),((e,t,s,i,n)=>{let r=e.keySystems[M];if("function"==typeof r.getKey)return void r.getKey(e,s.destinationURL,s.message.buffer,((s,r)=>{if(s){const r={errorType:m.EMEFailedToRequestMediaKeySystemAccess,config:d(e.keySystems)};return n(s,r),void v(i,{message:"Unable to get key: "+s,target:t,type:"mskeyerror"})}t.update(r),v(i,{type:"keysessionupdated",keySession:t})}));"string"==typeof r?r={url:r}:"boolean"==typeof r&&(r={}),r.url||(r.url=s.destinationURL);const a=(e,s)=>{if(i&&v(i,{type:"licenserequestattempted"}),e)return n(e,{errorType:m.EMEFailedToGenerateLicenseRequest,keySystem:M}),void v(i,{message:"Unable to request key from url: "+r.url,target:t,type:"mskeyerror"});t.update(new Uint8Array(s))};r.getLicense?r.getLicense(e,s.message.buffer,a):l(M,r,s.message.buffer,e,a)})(s,r,e,i,n)})),r.addEventListener("mskeyerror",(e=>{const t={errorType:m.EMEFailedToCreateMediaKeySession,keySystem:M};n(r.error,t),v(i,{message:`Unexpected key error from key session with code: ${r.error.code} and systemCode: ${r.error.systemCode}`,target:r,type:"mskeyerror"})})),r.addEventListener("mskeyadded",(()=>{v(i,{target:r,type:"mskeyadded"})}))};const C=[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}],D=[{keySystem:"com.apple.fps",supportedConfig:[{initDataTypes:["sinf"],videoCapabilities:[{contentType:"video/mp4"}]}]},{keySystem:"com.microsoft.playready.recommendation",supportedConfig:C},{keySystem:"com.widevine.alpha",supportedConfig:C},{keySystem:"org.w3.clearkey",supportedConfig:C}],L=()=>{const e=window.Promise,t={fairplay:Boolean(window.WebKitMediaKeys),playready:!1,widevine:!1,clearkey:!1};return window.MediaKeys&&window.navigator.requestMediaKeySystemAccess?e.all(D.map((({keySystem:e,supportedConfig:t})=>window.navigator.requestMediaKeySystemAccess(e,t).catch((()=>{}))))).then((([e,s,i,n])=>(t.fairplay=Boolean(e),t.playready=Boolean(s),t.widevine=Boolean(i),t.clearkey=Boolean(n),t))):e.resolve(t)};const F=(e,t)=>{for(let s=0;s<e.length;s++){if(!e[s].initData)continue;const i=a(e[s].initData),n=a(t);if(r(i,n))return!0}return!1},_=(e,t)=>{for(let s=0;s<e.length;s++)if(e[s].initData===t)return void e.splice(s,1)};function U(e,t,s,n,r,a){if(!s||!s.keySystems)return Promise.resolve();if(s.keySystems["com.apple.fps.1_0"]&&window.WebKitMediaKeys&&e.eme.legacyFairplayIsUsed)return i.default.log.debug("eme","Ignoring 'encrypted' event, using legacy fairplay keySystem com.apple.fps.1_0"),Promise.resolve();let o=t.initData;return(e=>{let t;return Object.keys(e).forEach((s=>{const i=E(s,e[s]);t=t?t.catch((e=>window.navigator.requestMediaKeySystemAccess(s,i))):window.navigator.requestMediaKeySystemAccess(s,i)})),t})(s.keySystems).then((i=>{const y=i.keySystem;return s.keySystems[y]&&s.keySystems[y].pssh&&(o=s.keySystems[y].pssh),F(n,o)||!o?Promise.resolve():(n.push({initData:o}),T({player:e,video:t.target,initDataType:t.initDataType,initData:o,keySystemAccess:i,options:s,removeSession:_.bind(null,n),eventBus:r,emeError:a}))})).catch((e=>{const t={errorType:m.EMEFailedToRequestMediaKeySystemAccess,config:d(s.keySystems)};a(e,t)}))}const A=(e,t,s,i)=>t.keySystems&&t.keySystems["com.apple.fps.1_0"]&&e.initData?h({video:e.target,initData:e.initData,options:t,eventBus:s,emeError:i}):Promise.resolve(),P=(e,t,s,i,n)=>{if(!t.keySystems||!t.keySystems[M])return;if(s.reduce(((e,t)=>e||t.playready),!1))return;let r=e.initData;t.keySystems[M]&&t.keySystems[M].pssh&&(r=t.keySystems[M].pssh),r&&(s.push({playready:!0,initData:r}),(({video:e,initData:t,options:s,eventBus:i,emeError:n})=>{e.msKeys&&delete e.msKeys;try{e.msSetMediaKeys(new window.MSMediaKeys(M))}catch(e){throw n(e,{errorType:m.EMEFailedToCreateMediaKeys,keySystem:M}),new Error("Unable to create media keys for PlayReady key system. Error: "+e.message)}K(e,t,s,i,n)})({video:e.target,initData:r,options:t,eventBus:i,emeError:n}))},R=e=>o(e.currentSource(),e.eme.options),I=e=>{const t=e.src();t!==e.eme.activeSrc&&(e.eme.activeSrc=t,e.eme.sessions=[])},B=e=>(t,s)=>{const i={code:5};"string"==typeof t?i.message=t:t&&(t.message&&(i.message=t.message),t.cause&&(t.cause.length||t.cause.byteLength)&&(i.cause=t.cause),t.keySystem&&(i.keySystem=t.keySystem),i.originalError=t),s&&(i.metadata=s),e.error(i)},q=(e,t)=>{if("video"===e.$(".vjs-tech").tagName.toLowerCase())if(I(e),window.MediaKeys){const s=()=>{const s={initDataType:"cenc",initData:null,target:e.tech_.el_};I(e),U(e,s,R(e),e.eme.sessions,e.tech_,t)};if(i.default.browser.IS_FIREFOX){let t;e.on("ended",(()=>{t=!1,e.one(["seek","play"],(i=>{t||0!==e.eme.sessions.length||(s(),t=!0)}))})),e.on("play",(()=>{const i=e.eme.options.limitRenewalsMaxPauseDuration;0===e.eme.sessions.length&&"number"==typeof i&&(t=!0,s())}))}e.tech_.el_.addEventListener("encrypted",(s=>{i.default.log.debug("eme","Received an 'encrypted' event"),I(e),U(e,s,R(e),e.eme.sessions,e.tech_,t)}))}else if(window.WebKitMediaKeys)e.eme.initLegacyFairplay();else if(window.MSMediaKeys){e.tech_.el_.addEventListener("msneedkey",(s=>{i.default.log.debug("eme","Received an 'msneedkey' event"),I(e);try{P(s,R(e),e.eme.sessions,e.tech_,t)}catch(e){t(e)}}));const s=e=>{t(e)};e.tech_.on("mskeyerror",s),e.on("dispose",(()=>{e.tech_.off("mskeyerror",s)}))}},j=function(e={}){const t=this,s=B(t);t.ready((()=>q(t,s))),t.eme={setupEmeListeners(){q(t,s)},initializeMediaKeys(i={},n=function(){},r=!1){const a=o(t.currentSource(),e,i),y={initDataType:"cenc",initData:null,target:t.tech_.el_};if(I(t),window.MediaKeys)U(t,y,a,t.eme.sessions,t.tech_,s).then((()=>n())).catch((e=>{n(e),r||s(e)}));else if(window.MSMediaKeys){const e=i=>{t.tech_.off("mskeyadded",e),t.tech_.off("mskeyerror",e),"mskeyerror"===i.type?(n(i.target.error),r||s(i.message)):n()};t.tech_.one("mskeyadded",e),t.tech_.one("mskeyerror",e);try{P(y,a,t.eme.sessions,t.tech_,s)}catch(i){t.tech_.off("mskeyadded",e),t.tech_.off("mskeyerror",e),n(i),r||s(i)}}},initLegacyFairplay(){const e=e=>{i.default.log.debug("eme","Received a 'webkitneedkey' event"),I(t),A(e,R(t),t.tech_,s).catch((e=>{s(e)}))},n=s=>{const i=R(t).firstWebkitneedkeyTimeout||1e3,n=t.src();t.eme.webkitneedkey_=t.eme.webkitneedkey_||{},t.eme.webkitneedkey_.src!==n&&(t.eme.webkitneedkey_={handledFirstEvent:!1,src:n}),t.eme.webkitneedkey_.handledFirstEvent?e(s):(t.clearTimeout(t.eme.webkitneedkey_.timeout),t.eme.webkitneedkey_.timeout=t.setTimeout((()=>{t.eme.webkitneedkey_.handledFirstEvent=!0,t.eme.webkitneedkey_.timeout=null,e(s)}),i))};t.eme.legacyFairplayIsUsed=!0;let r=t.tech_.el_;r.addEventListener("webkitneedkey",n);const a=()=>{t.off("dispose",a),null!==r&&r.removeEventListener("webkitneedkey",n),t.eme.legacyFairplayIsUsed=!1,r=null};return t.on("dispose",a),a},detectSupportedCDMs:L,legacyFairplayIsUsed:!1,options:e}};i.default.registerPlugin("eme",j),j.Error=m,j.VERSION="5.5.2",e.default=j,e.emeErrorHandler=B,e.getOptions=R,e.handleEncryptedEvent=U,e.handleMsNeedKeyEvent=P,e.handleWebKitNeedKeyEvent=A,e.hasSession=F,e.removeSession=_,e.setupSessions=I,Object.defineProperty(e,"__esModule",{value:!0})}));