1/*! For license information please see reactPlayerHls.9776bc00.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkams_pro=self.webpackChunkams_pro||[]).push([[262],{67890:(t,e,i)=>{i.r(e),i.d(e,{default:()=>v});var s=i(65043),n=i(78068),a=i(9769),o=i(49788);const r=(l=(0,a.u6)(n.lB),class extends l{static shadowRootOptions={...l.shadowRootOptions};static getTemplateHTML=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{src:i,...s}=t;return`\n <script type="application/json" id="config">\n ${JSON.stringify(e.config||{})}\n <\/script>\n ${l.getTemplateHTML(s)}\n `};#t=null;#e=null;constructor(){super(),this.#i("config")}get config(){return this.#e}set config(t){this.#e=t}attributeChangedCallback(t,e,i){"src"!==t&&super.attributeChangedCallback(t,e,i),"src"===t&&e!=i&&this.load()}#s(){var t,e;null==(t=this.#t)||t.remove(),null==(e=this.nativeEl)||e.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#n),this.api&&(this.api.detachMedia(),this.api.destroy(),this.api=null)}async load(){var t,e;const i=!this.api;if(this.#s(),this.src)if(i&&!this.#e&&(this.#e=JSON.parse((null==(t=this.shadowRoot.getElementById("config"))?void 0:t.textContent)||"{}")),o.Ay.isSupported()){switch(await Promise.resolve(),this.api=new o.Ay({liveDurationInfinity:!0,autoStartLoad:!1,...this.config}),this.api.loadSource(this.src),this.api.attachMedia(this.nativeEl),this.nativeEl.preload){case"none":{const t=()=>this.api.startLoad();this.nativeEl.addEventListener("play",t,{once:!0}),this.api.on(o.Ay.Events.DESTROYING,(()=>{this.nativeEl.removeEventListener("play",t)}));break}case"metadata":{const t=this.api.config.maxBufferLength,e=this.api.config.maxBufferSize;this.api.config.maxBufferLength=1,this.api.config.maxBufferSize=1;const i=()=>{this.api.config.maxBufferLength=t,this.api.config.maxBufferSize=e};this.nativeEl.addEventListener("play",i,{once:!0}),this.api.on(o.Ay.Events.DESTROYING,(()=>{this.nativeEl.removeEventListener("play",i)})),this.api.startLoad();break}default:this.api.startLoad()}this.nativeEl.webkitCurrentPlaybackTargetIsWireless&&this.api.stopLoad(),this.nativeEl.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#n),this.#t=document.createElement("source"),this.#t.setAttribute("type","application/x-mpegURL"),this.#t.setAttribute("src",this.src),this.nativeEl.disableRemotePlayback=!1,this.nativeEl.append(this.#t);const t=new WeakMap;this.api.on(o.Ay.Events.MANIFEST_PARSED,((e,i)=>{this.nativeEl.autoplay&&this.nativeEl.paused&&this.nativeEl.play().catch((t=>{console.warn("Autoplay failed:",t)})),s();let n=this.videoTracks.getTrackById("main");n||(n=this.addVideoTrack("main"),n.id="main",n.selected=!0);for(const[s,a]of i.levels.entries()){const e=n.addRendition(a.url[0],a.width,a.height,a.videoCodec,a.bitrate);t.set(a,`${s}`),e.id=`${s}`}for(let[t,s]of i.audioTracks.entries()){const e=s.default?"main":"alternative",i=this.addAudioTrack(e,s.name,s.lang);i.id=`${t}`,s.default&&(i.enabled=!0)}})),this.audioTracks.addEventListener("change",(()=>{var t;const e=+(null==(t=[...this.audioTracks].find((t=>t.enabled)))?void 0:t.id),i=this.api.audioTracks.map((t=>t.id));e!=this.api.audioTrack&&i.includes(e)&&(this.api.audioTrack=e)})),this.api.on(o.Ay.Events.LEVELS_UPDATED,((e,i)=>{const s=this.videoTracks[this.videoTracks.selectedIndex??0];if(!s)return;const n=i.levels.map((e=>t.get(e)));for(const t of this.videoRenditions)t.id&&!n.includes(t.id)&&s.removeRendition(t)}));const i=t=>{const e=t.target.selectedIndex;e!=this.api.nextLevel&&(this.api.nextLevel=e)};null==(e=this.videoRenditions)||e.addEventListener("change",i);const s=()=>{for(const t of this.videoTracks)this.removeVideoTrack(t);for(const t of this.audioTracks)this.removeAudioTrack(t)};this.api.once(o.Ay.Events.DESTROYING,s)}else await Promise.resolve(),this.nativeEl.canPlayType("application/vnd.apple.mpegurl")&&(this.nativeEl.src=this.src)}#n=()=>{var t,e,i;(null==(t=this.nativeEl)?void 0:t.webkitCurrentPlaybackTargetIsWireless)?null==(e=this.api)||e.stopLoad():null==(i=this.api)||i.startLoad()};#i(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}});var l;globalThis.customElements&&!globalThis.customElements.get("hls-video")&&globalThis.customElements.define("hls-video",r);var c=r,d=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),u={className:"class",htmlFor:"for"};function h(t){return t.toLowerCase()}function p(t){return"boolean"===typeof t?t?"":void 0:"function"===typeof t||"object"===typeof t&&null!==t?void 0:t}function f(t,e,i){var s;t[e]=i,null==i&&e in((null==(s=globalThis.HTMLElement)?void 0:s.prototype)??{})&&t.removeAttribute(e)}var v=function(t){let{react:e,tagName:i,elementClass:s,events:n,displayName:a,defaultProps:o,toAttributeName:r=h,toAttributeValue:l=p}=t;const c=Number.parseInt(e.version)>=19,v=e.forwardRef(((t,a)=>{var h,v;const g=e.useRef(null),m=e.useRef(new Map),y={},E={},b={},T={};for(const[e,i]of Object.entries(t)){if(d.has(e)){b[e]=i;continue}const t=r(u[e]??e);if(s.prototype&&e in s.prototype&&!(e in((null==(h=globalThis.HTMLElement)?void 0:h.prototype)??{}))&&!(null==(v=s.observedAttributes)?void 0:v.some((e=>e===t)))){T[e]=i;continue}if(e.startsWith("on")){y[e]=i;continue}const n=l(i);if(t&&null!=n&&(E[t]=String(n),c||(b[t]=n)),t&&c){const e=p(i);b[t]=n!==e?n:i}}if("undefined"!==typeof window){for(const t in y){const i=y[t],s=t.endsWith("Capture"),a=((null==n?void 0:n[t])??t.slice(2).toLowerCase()).slice(0,s?-7:void 0);e.useLayoutEffect((()=>{const t=null==g?void 0:g.current;if(t&&"function"===typeof i)return t.addEventListener(a,i,s),()=>{t.removeEventListener(a,i,s)}}),[null==g?void 0:g.current,i])}e.useLayoutEffect((()=>
2{if(null===g.current)return;const t=new Map;for(const e in T)f(g.current,e,T[e]),m.current.delete(e),t.set(e,T[e]);for(const[e,i]of m.current)f(g.current,e,void 0);m.current=t}))}if("undefined"===typeof window&&(null==s?void 0:s.getTemplateHTML)&&(null==s?void 0:s.shadowRootOptions)){const{mode:i,delegatesFocus:n}=s.shadowRootOptions,a=e.createElement("template",{shadowrootmode:i,shadowrootdelegatesfocus:n,dangerouslySetInnerHTML:{__html:s.getTemplateHTML(E,t)}});b.children=[a,b.children]}return e.createElement(i,{...o,...b,ref:e.useCallback((t=>{g.current=t,"function"===typeof a?a(t):null!==a&&(a.current=t)}),[a])})}));return v.displayName=a??s.name,v}({react:s,tagName:"hls-video",elementClass:c,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":h(t)})}}]); 3//# sourceMappingURL=reactPlayerHls.9776bc00.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.