1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2042],{62276:(e,t,i)=>{i.r(t),i.d(t,{default:()=>S});var s=i(7620);let a="https://player.twitch.tv",n=/(?:www\.|go\.)?twitch\.tv\/(?:videos?\/|\?video=)(\d+)($|\?)/,r=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,o={IDLE:"Idle",ENDED:"Ended"},l={PAUSE:2,PLAY:3,SEEK:4,SET_MUTED:10,SET_VOLUME:11};function u(e,t={}){let i={src:d(e,t),frameborder:"0",width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; picture-in-picture;",sandbox:"allow-modals allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",scrolling:"no"};return t.config&&(i["data-config"]=JSON.stringify(t.config)),` 2 <style> 3 :host { 4 display: inline-block; 5 min-width: 300px; 6 min-height: 150px; 7 position: relative; 8 } 9 iframe { 10 position: absolute; 11 top: 0; 12 left: 0; 13 width: 100%; 14 height: 100%; 15 } 16 :host(:not([controls])) { 17 pointer-events: none; 18 } 19 </style> 20 <iframe${function(e){let t="";for(let i in e){let s=e[i];""===s?t+=` ${c(i)}`:t+=` ${c(i)}="${c(`${s}`)}"`}return t}(i)}></iframe> 21 `}function d(e,t){var i;if(!e.src)return;let s=e.src.match(n),o=e.src.match(r),l={parent:null==(i=globalThis.location)?void 0:i.hostname,controls:""===e.controls&&null,autoplay:""===e.autoplay&&null,muted:e.muted,preload:e.preload,...t.config};if(s){let e=s[1];return`${a}/?video=v${e}&${p(l)}`}if(o){let e=o[1];return`${a}/?channel=${e}&${p(l)}`}return""}class h extends(globalThis.HTMLElement??class{}){static getTemplateHTML=u;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","loop","muted","playsinline","preload","src"];loadComplete=new m;#e;#t;#i;#s={};#a=0;#n=!1;#r=1;#o=!this.autoplay;#l=!1;#u=0;#d=null;constructor(){super(),this.#h("config")}get config(){return this.#d}set config(e){this.#d=e}async load(){if(this.#e)return;this.shadowRoot||this.attachShadow({mode:"open"});let e=!this.#t;if(this.#t&&(this.loadComplete=new m),this.#t=!0,await (this.#e=Promise.resolve()),this.#e=null,this.#u=0,this.dispatchEvent(new Event("emptied")),!this.src){this.shadowRoot.innerHTML="",globalThis.removeEventListener("message",this.#c);return}this.dispatchEvent(new Event("loadstart"));let t=this.shadowRoot.querySelector("iframe"),i=function(e){let t={};for(let i of e)t[i.name]=i.value;return t}(this.attributes);e&&t&&(this.#d=JSON.parse(t.getAttribute("data-config")||"{}")),(null==t?void 0:t.src)&&t.src===d(i,this)||(this.shadowRoot.innerHTML=u(i,this),t=this.shadowRoot.querySelector("iframe")),this.#i=t,globalThis.addEventListener("message",this.#c)}attributeChangedCallback(e,t,i){if(t!==i)switch(e){case"src":case"controls":this.load()}}getVideoPlaybackQuality(){return this.#s.stats.videoStats}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",e)}get readyState(){return this.#u}get seeking(){return this.#l}get buffered(){var e,t,i,s;return i=0,s=(null==(t=null==(e=this.#s.stats)?void 0:e.videoStats)?void 0:t.bufferSize)??0,Array.isArray(0)?f(i):null==i||null==s||0===i&&0===s?f([[0,0]]):f([[i,s]])}get paused(){return this.#s.playback?this.#s.playback===o.IDLE:this.#o}get ended(){return!!this.#s.playback&&this.#s.playback===o.ENDED}get duration(){return this.#s.duration??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(e){this.autoplay!=e&&this.toggleAttribute("autoplay",!!e)}get controls(){return this.hasAttribute("controls")}set controls(e){this.controls!=e&&this.toggleAttribute("controls",!!e)}get currentTime(){return this.#s.currentTime?this.#s.currentTime:this.#a}set currentTime(e){this.#a=e,this.loadComplete.then(()=>{this.#p(l.SEEK,e)})}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",!!e)}get loop(){return this.hasAttribute("loop")}set loop(e){this.toggleAttribute("loop",!!e)}get muted(){return this.#n}set muted(e){this.#n=e,this.loadComplete.then(()=>{this.#p(l.SET_MUTED,e)})}get volume(){return this.#r}set volume(e){this.#r=e,this.loadComplete.then(()=>{this.#p(l.SET_VOLUME,e)})}
21get playsInline(){return this.hasAttribute("playsinline")}set playsInline(e){this.toggleAttribute("playsinline",!!e)}play(){this.#o=!1,this.#p(l.PLAY)}pause(){this.#o=!0,this.#p(l.PAUSE)}#c=async e=>{var t,i,s,a;if(!this.#i.contentWindow)return;let{data:n,source:r}=e;if(r===this.#i.contentWindow){if("twitch-embed"===n.namespace)await new Promise(e=>setTimeout(e,10)),"ready"===n.eventName?(this.dispatchEvent(new Event("loadcomplete")),this.loadComplete.resolve(),this.#u=1,this.dispatchEvent(new Event("loadedmetadata"))):"seek"===n.eventName?(this.#l=!0,this.dispatchEvent(new Event("seeking"))):"playing"===n.eventName?(this.#l&&(this.#l=!1,this.dispatchEvent(new Event("seeked"))),this.#u=3,this.dispatchEvent(new Event("playing"))):this.dispatchEvent(new Event(n.eventName));else if("twitch-embed-player-proxy"===n.namespace&&"UPDATE_STATE"===n.eventName){let e=this.#s.duration,r=this.#s.currentTime,o=this.#s.volume,l=this.#s.muted,u=null==(i=null==(t=this.#s.stats)?void 0:t.videoStats)?void 0:i.bufferSize;this.#s={...this.#s,...n.params},e!==this.#s.duration&&this.dispatchEvent(new Event("durationchange")),r!==this.#s.currentTime&&this.dispatchEvent(new Event("timeupdate")),(o!==this.#s.volume||l!==this.#s.muted)&&(void 0!==this.#s.volume&&(this.#r=this.#s.volume),void 0!==this.#s.muted&&(this.#n=this.#s.muted),this.dispatchEvent(new Event("volumechange"))),u!==(null==(a=null==(s=this.#s.stats)?void 0:s.videoStats)?void 0:a.bufferSize)&&this.dispatchEvent(new Event("progress"))}}};#p(e,t){this.#i.contentWindow&&this.#i.contentWindow.postMessage({eventName:e,params:t,namespace:"twitch-embed-player-proxy"},a)}#h(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}}function c(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}function p(e){return String(new URLSearchParams(function(e){let t={};for(let i in e){let s=e[i];!0===s||""===s?t[i]=!0:!1===s?t[i]=!1:null!=s&&(t[i]=s)}return t}(e)))}class m extends Promise{constructor(e=()=>{}){let t,i;super((s,a)=>{e(s,a),t=s,i=a}),this.resolve=t,this.reject=i}}function f(e){return Object.defineProperties(e,{start:{value:t=>e[t][0]},end:{value:t=>e[t][1]}}),e}globalThis.customElements&&!globalThis.customElements.get("twitch-video")&&globalThis.customElements.define("twitch-video",h);var v=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),g={className:"class",htmlFor:"for"};function y(e){return e.toLowerCase()}function w(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e?void 0:"object"!=typeof e||null===e?e:void 0}function E(e,t,i){var s,a;e[t]=i,null==i&&t in(null!=(a=null==(s=globalThis.HTMLElement)?void 0:s.prototype)?a:{})&&e.removeAttribute(t)}var S=function(e){let{react:t,tagName:i,elementClass:s,events:a,displayName:n,defaultProps:r,toAttributeName:o=y,toAttributeValue:l=w}=e,u=Number.parseInt(t.version)>=19,d=t.forwardRef((e,n)=>{var d,h,c,p,m;let f=t.useRef(null),y=t.useRef(new Map),S={},b={},T={},L={};for(let[t,i]of Object.entries(e)){if(v.has(t)){T[t]=i;continue}let e=o(null!=(c=g[t])?c:t);if(s.prototype&&t in s.prototype&&!(t in(null!=(p=null==(d=globalThis.HTMLElement)?void 0:d.prototype)?p:{}))&&!(null==(h=s.observedAttributes)?void 0:h.some(t=>t===e))){L[t]=i;continue}if(t.startsWith("on")){S[t]=i;continue}let a=l(i);e&&null!=a&&(b[e]=String(a),u||(T[e]=a)),e&&u&&(a!==w(i)?T[e]=a:T[e]=i)}if("undefined"!=typeof window){for(let e in S){let i=S[e],s=e.endsWith("Capture"),n=(null!=(m=null==a?void 0:a[e])?m:e.slice(2).toLowerCase()).slice(0,s?-7:void 0);t.useLayoutEffect(()=>{let e=null==f?void 0:f.current;if(e&&"function"==typeof i)return e.addEventListener(n,i,s),()=>{e.removeEventListener(n,i,s)}},[null==f?void 0:f.current,i])}t.useLayoutEffect(()=>{if(null===f.current)return;let e=new Map;for(let t in L)E(f.current,t,L[t]),y.current.delete(t),e.set(t,L[t]);for(let[e,t]of y.current)E(f.current,e,void 0);y.current=e})}if("undefined"==typeof window&&(null==s?void 0:s.getTemplateHTML)&&(null==s?void 0:s.shadowRootOptions)){let{mode:i,delegatesFocus:a}=s.shadowRootOptions;T.children=[t.createElement("template",{shadowrootmode:i,shadowrootdelegatesfocus:a,dangerouslySetInnerHTML:{__html:s.getTemplateHTML(b,e)},key:"ce-la-react-ssr-template-shadow-root"}),T.children]}return t.createElement(i,{...r,...T,ref:t.useCallback(e=>{f.current=e,"function"==typeof n?n(e):null!==n&&(n.current=e)},[n])},T.children)});return d.displayName=null!=n?n:s.name,d}({react:s,tagName:"twitch-video",elementClass:h,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":y(e)})}}]);
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.