PageSourceSearch

https://fidibo.com/static/js/reactPlayerYouTube.42242507.chunk.js

js fidibo.com collected 2026-09-24 18:47:35 UTC 16,987 bytes, 2 lines download raw bytes

1/*! For license information please see reactPlayerYouTube.42242507.chunk.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunkfidibo_web=globalThis.webpackChunkfidibo_web||[]).push([[8446],{26562(t,e,n){function i(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}n.d(e,{A:()=>i})},8195(t,e,n){function i(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(e,{A:()=>i})},38458(t,e,n){n.d(e,{A:()=>s});var i=n(26562);function s(t,e){return t.get((0,i.A)(t,e))}},55149(t,e,n){n.d(e,{A:()=>s});var i=n(8195);function s(t,e,n){(0,i.A)(t,e),e.set(t,n)}},24558(t,e,n){n.d(e,{A:()=>s});var i=n(26562);function s(t,e,n){return t.set((0,i.A)(t,e),n),n}},39790(t,e,n){n.d(e,{A:()=>s});var i=n(8195);function s(t,e){(0,i.A)(t,e),e.add(t)}},54705(t,e,n){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!=i(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}function r(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{A:()=>r})},27570(t,e,n){function i(t){return class extends t{_playedRanges=[];_currentPlayedRange=null;_RANGE_EPSILON=.5;_seeking=!1;connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.addEventListener("play",()=>this.onPlaybackStart({time:this.currentTime})),this.addEventListener("pause",()=>this.onPlaybackStop({time:this.currentTime})),this.addEventListener("ended",()=>this.onPlaybackStop({time:this.currentTime})),this.addEventListener("seeking",()=>this.onSeeking()),this.addEventListener("seeked",()=>this.onSeeked({time:this.currentTime}))}onPlaybackStart(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._seeking=!1;const{time:e}=t,n="number"===typeof e?e:this.currentTime;this._currentPlayedRange||(this._currentPlayedRange={start:n,end:n})}onSeeking(){this._seeking=!0,this._commitCurrentRange()}onSeeked(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._seeking=!1;const{time:e}=t,n="number"===typeof e?e:this.currentTime;this._currentPlayedRange={start:n,end:n}}onPlaybackStop(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{time:e}=t,n="number"===typeof e?e:this.currentTime;this._commitCurrentRange(n)}_commitCurrentRange(t){if(!this._currentPlayedRange)return;"number"===typeof t&&(this._currentPlayedRange.end=t);const{start:e,end:n}=this._currentPlayedRange;this._currentPlayedRange=null,this.addPlayedRange(e,n)}addPlayedRange(t,e){if(t>=e)return;const n=this._RANGE_EPSILON,i=[...this._playedRanges,{start:t,end:e}];i.sort((t,e)=>t.start-e.start);const s=[];for(const r of i){if(!s.length){s.push({...r});continue}const t=s[s.length-1];r.start<=t.end+n?(t.start=Math.min(t.start,r.start),t.end=Math.max(t.end,r.end)):s.push({...r})}this._playedRanges=s}get played(){const t=this.currentTime;return this.paused||this._currentPlayedRange||"number"!==typeof t||(this._currentPlayedRange={start:t,end:t}),this._currentPlayedRange&&"number"===typeof t&&(t>this._currentPlayedRange.end&&(this._currentPlayedRange.end=t),this.addPlayedRange(this._currentPlayedRange.start,this._currentPlayedRange.end)),this._playedRanges.length?s(this._playedRanges.map(t=>[t.start,t.end])):s([[0,0]])}}}function s(t){return Object.defineProperties(t,{start:{value:e=>t[e][0]},end:{value:e=>t[e][1]}}),t}n.d(e,{j:()=>i})},43655(t,e,n){n.r(e),n.d(e,{default:()=>B});var i=n(9950),s=n(39790),r=n(55149),a=n(54705),o=n(24558),l=n(38458),u=n(26562),c=n(27570);const h=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11}
2)/,d=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;function p(t){if(!t)return;const e=t.match(/[?&]t=([\dms]+)/i);if(!e)return;const n=e[1].toLowerCase();let i=0,s=!1;const r=n.match(/(\d+)m/);r&&(i+=60*parseInt(r[1],10),s=!0);const a=n.match(/(\d+)s?$/);return a&&(i+=parseInt(a[1],10),s=!0),s?i:void 0}function f(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;const i={src:m(t,e),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return(null==(n=e.config)?void 0:n.referrerpolicy)&&(i.referrerpolicy=e.config.referrerpolicy),e.config&&(i["data-config"]=JSON.stringify(e.config)),`\n    <style>\n      :host {\n        display: inline-block;\n        line-height: 0;\n        position: relative;\n        min-width: 300px;\n        min-height: 150px;\n      }\n      iframe {\n        position: absolute;\n        top: 0;\n        left: 0;\n      }\n    </style>\n    <iframe${function(t){let e="";for(const n in t){const i=t[n];e+=""===i?` ${L(n)}`:` ${L(n)}="${L(`${i}`)}"`}return e}(i)}></iframe>\n  `}function m(t,e){if(!t.src)return;const n=t.src.includes("-nocookie")?"https://www.youtube-nocookie.com/embed":"https://www.youtube.com/embed",i={controls:""===t.controls?null:0,autoplay:t.autoplay,loop:t.loop,mute:t.muted,playsinline:t.playsinline,preload:t.preload??"metadata",enablejsapi:1,cc_load_policy:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1,start:p(t.src),...e.config};if(h.test(t.src)){const e=t.src.match(h);return`${n}/${e&&e[1]}?${S(i)}`}const s=t.src.match(d);return`${n}?${S({listType:"playlist",list:s&&s[1],...i})}`}var v=new WeakMap,g=new WeakMap,y=new WeakMap,b=new WeakMap,w=new WeakMap,A=new WeakMap,E=new WeakMap,k=new WeakMap,P=new WeakMap,T=new WeakSet;class R extends((0,c.j)(globalThis.HTMLElement??class{})){constructor(){super(),(0,s.A)(this,T),(0,a.A)(this,"loadComplete",new N),(0,r.A)(this,v,void 0),(0,r.A)(this,g,void 0),(0,r.A)(this,y,0),(0,r.A)(this,b,!1),(0,r.A)(this,w,void 0),(0,a.A)(this,"isLoaded",!1),(0,r.A)(this,A,null),(0,r.A)(this,E,null),(0,r.A)(this,k,null),(0,r.A)(this,P,1),(0,u.A)(T,this,_).call(this,"config")}get config(){return(0,l.A)(E,this)}set config(t){(0,o.A)(E,this,t)}async load(){if((0,l.A)(v,this))return;this.shadowRoot||this.attachShadow({mode:"open"});const t=!(0,l.A)(g,this);(0,l.A)(g,this)&&(this.loadComplete=new N,this.isLoaded=!1),(0,o.A)(g,this,
2!0),await(0,o.A)(v,this,Promise.resolve()),(0,o.A)(v,this,null),(0,o.A)(y,this,0),this.dispatchEvent(new Event("emptied"));let e=this.api;if(this.api=null,!this.src)return void(null==e||e.destroy());(0,o.A)(k,this,document.createElement("video")),this.textTracks=(0,l.A)(k,this).textTracks,this.textTracks.addEventListener("change",()=>{var t;const e=Array.from(this.textTracks).find(t=>"showing"===t.mode);null==(t=this.api)||t.setOption("captions","track",e?{languageCode:e.language}:{})}),this.dispatchEvent(new Event("loadstart"));let n=this.shadowRoot.querySelector("iframe"),i=function(t){let e={};for(let n of t)e[n.name]=n.value;return e}(this.attributes);t&&n&&(0,o.A)(E,this,JSON.parse(n.getAttribute("data-config")||"{}")),(null==n?void 0:n.src)&&n.src===m(i,this)||(this.shadowRoot.innerHTML=f(i,this),n=this.shadowRoot.querySelector("iframe"));const s=await async function(t,e,n){if(C[t])return C[t];if(e&&self[e])return await M(0),self[e];return C[t]=new Promise(function(i,s){const r=document.createElement("script");r.src=t;const a=()=>i(self[e]);n&&(self[n]=a),r.onload=()=>!n&&a(),r.onerror=s,document.head.append(r)})}("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady");this.api=new s.Player(n,{events:{onReady:()=>{var t;(0,o.A)(y,this,1),this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),1!==(0,l.A)(P,this)&&(null==(t=this.api)||t.setVolume(100*(0,l.A)(P,this))),this.dispatchEvent(new Event("volumechange")),this.dispatchEvent(new Event("loadcomplete")),this.isLoaded=!0,this.loadComplete.resolve()},onError:t=>{console.error(t),(0,o.A)(A,this,{code:t.data,message:`YouTube iframe player error #${t.data}; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.`}),this.dispatchEvent(new Event("error"))}}});let r=!1;this.api.addEventListener("onStateChange",t=>{var e;const n=t.data;if(n===s.PlayerState.PLAYING||n===s.PlayerState.BUFFERING){r||(r=!0,this.dispatchEvent(new Event("play")));(this.api.getOption("captions","tracklist")||[]).forEach(t=>{[...this.textTracks].some(e=>e.language===t.languageCode)||(0,l.A)(k,this).addTextTrack("subtitles",t.displayName,t.languageCode),this.textTracks=(0,l.A)(k,this).textTracks}),this.dispatchEvent(new Event("loadstart"))}if(n===s.PlayerState.PLAYING)this.seeking&&((0,o.A)(b,this,!1),null==(e=(0,l.A)(w,this))||e.resolve(),this.dispatchEvent(new Event("seeked"))),(0,o.A)(y,this,3),this.dispatchEvent(new Event("playing"));else if(n===s.PlayerState.PAUSED){const t=Math.abs(this.currentTime-u);!this.seeking&&t>.1&&((0,o.A)(b,this,!0),this.dispatchEvent(new Event("seeking"))),r=!1,this.dispatchEvent(new Event("pause"))}n===s.PlayerState.ENDED&&(r=!1,this.dispatchEvent(new Event("pause")),this.dispatchEvent(new Event("ended")),this.loop&&this.play())}),this.api.addEventListener("onPlaybackRateChange",()=>{this.dispatchEvent(new Event("ratechange"))}),this.api.addEventListener("onVolumeChange",()=>{var t;const e=(null==(t=this.api)?void 0:t.getVolume())/100;(0,o.A)(P,this,e),this.dispatchEvent(new Event("volumechange"))}),this.api.addEventListener("onVideoProgress",()=>{this.dispatchEvent(new Event("timeupdate"))}),await this.loadComplete;let a,u=0;setInterval(()=>{var t;const e=Math.abs(this.currentTime-u),n=this.buffered.end(this.buffered.length-1);this.seeking&&n>.1?((0,o.A)(b,this,!1),null==(t=(0,l.A)(w,this))||t.resolve(),this.dispatchEvent(new Event("seeked"))):!this.seeking&&e>.1&&((0,o.A)(b,this,!0),this.dispatchEvent(new Event("seeking"))),u=this.currentTime},50);const c=setInterval(()=>{const t=this.buffered.end(this.buffered.length-1);t>=this.duration&&(clearInterval(c),(0,o.A)(y,this,4)),a!=t&&(a=t,this.dispatchEvent(new Event("progress")))},100)}async attributeChangedCallback(t,e,n){if(e!==n)switch(t){case"src":case"autoplay":case"controls":case"loop":case"playsinline":this.load()}}async play(){var t;return(0,o.A)(w,this,null),await this.loadComplete,null==(t=this.api)||t.playVideo(),function(t){return(e=(e,n)=>{let i;t.addEventListener(e,i=()=>{t.removeEventListener(e,i),n()})},function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return new Promise(t=>{e(...n,function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];n.length>1?t(n):t(n[0])})})})("playing");var e}(this)}async pause(){var t;return await this.loadComplete,null==(t=this.api)?void 0:t.pauseVideo()}get seeking(){return(0,l.A)(b,this)}get readyState(){return(0,l.A)(y,this)}get src(){return this.getAttribute("src")}set src(t){this.src!=t&&this.setAttribute("src",t)}get error(){return(0,l.A)(A,this)}get paused(){var t,e;return this.isLoaded?[-1,0,2,5].includes(null==(e=null==(t=this.api)?void 0:t.getPlayerState)?void 0:e.call(t)):!this.autoplay}get duration(){var t,e;return(null==(e=null==(t=this.api)?void 0:t.getDuration)?void 0:e.call(t))??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(t){this.autoplay!=t&&this.toggleAttribute("autoplay",Boolean(t))}get buffered(){var t,e;if(!this.isLoaded)return I();const n=(null==(t=this.api)?void 0:t.getVideoLoadedFraction())*(null==(e=this.api)?void 0:e.getDuration());return n>0?I(0,n):I()}get controls(){return this.hasAttribute("controls")}set controls(t){this.controls!=t&&this.toggleAttribute("controls",Boolean(t))}get currentTime(){var t,e;return(null==(e=null==(t=this.api)?void 0:t.getCurrentTime)?void 0:e.call(t))??0}set currentTime(t){this.currentTime!=t&&((0,o.A)(w,this,new N),this.loadComplete.then(()=>{var e,n;null==(e=this.api)||e.seekTo(t,!0),this.paused&&(null==(n=(0,l.A)(w,this))||n.then(()=>{var t;(0,l.A)(w,this)&&(null==(t=this.api)||t.pauseVideo())}))}))}set defaultMuted(t){this.defaultMuted!=t&&this.toggleAttribute("muted",Boolean(t))}get defaultMuted(){return this.hasAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",Boolean(t))}set muted(t){this.muted!=t&&this.loadComplete.then(()=>{var e,n;t?null==(e=this.api)||e.mute():null==(n=this.api)||n.unMute()})}get muted(){var t,e;return this.isLoaded?null==(e=null==(t=this.api)?void 0:t.isMuted)?void 0:e.call(t):this.defaultMuted}get playbackRate(){var t,e;return(null==(e=null==(t=this.api)?void 0:t.getPlaybackRate)?void 0:e.call(t))??1}set playbackRate(t){this.playbackRate!=t&&this.loadComplete.then(()=>{var e;null==(e=this.api)||e.setPlaybackRate(t)})}
2get playsInline(){return this.hasAttribute("playsinline")}set playsInline(t){this.playsInline!=t&&this.toggleAttribute("playsinline",Boolean(t))}get poster(){return this.getAttribute("poster")}set poster(t){this.poster!=t&&this.setAttribute("poster",`${t}`)}set volume(t){this.volume!=t&&((0,o.A)(P,this,t),this.loadComplete.then(()=>{var e;null==(e=this.api)||e.setVolume(100*t)}))}get volume(){var t;return this.isLoaded?(null==(t=this.api)?void 0:t.getVolume())/100:(0,l.A)(P,this)}}function _(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}function L(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function S(t){return String(new URLSearchParams(function(t){let e={};for(let n in t){let i=t[n];!0===i||""===i?e[n]=1:!1===i?e[n]=0:null!=i&&(e[n]=i)}return e}(t)))}(0,a.A)(R,"getTemplateHTML",f),(0,a.A)(R,"shadowRootOptions",{mode:"open"}),(0,a.A)(R,"observedAttributes",["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"]);const C={};const M=t=>new Promise(e=>setTimeout(e,t));class N extends Promise{constructor(){let t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};super((i,s)=>{n(i,s),t=i,e=s}),this.resolve=t,this.reject=e}}function I(t,e){return Array.isArray(t)?x(t):x(null==t||null==e||0===t&&0===e?[[0,0]]:[[t,e]])}function x(t){return Object.defineProperties(t,{start:{value:e=>t[e][0]},end:{value:e=>t[e][1]}}),t}globalThis.customElements&&!globalThis.customElements.get("youtube-video")&&globalThis.customElements.define("youtube-video",R);var O=R,j=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),W={className:"class",htmlFor:"for"};function $(t){return t.toLowerCase()}function V(t){return"boolean"===typeof t?t?"":void 0:"function"===typeof t||"object"===typeof t&&null!==t?void 0:t}function H(t,e,n){var i;t[e]=n,null==n&&e in((null==(i=globalThis.HTMLElement)?void 0:i.prototype)??{})&&t.removeAttribute(e)}var B=function(t){let{react:e,tagName:n,elementClass:i,events:s,displayName:r,defaultProps:a,toAttributeName:o=$,toAttributeValue:l=V}=t;const u=Number.parseInt(e.version)>=19,c=e.forwardRef((t,r)=>{var c,h;const d=e.useRef(null),p=e.useRef(new Map),f={},m={},v={},g={};for(const[e,n]of Object.entries(t)){if(j.has(e)){v[e]=n;continue}const t=o(W[e]??e);if(i.prototype&&e in i.prototype&&!(e in((null==(c=globalThis.HTMLElement)?void 0:c.prototype)??{}))&&!(null==(h=i.observedAttributes)?void 0:h.some(e=>e===t))){g[e]=n;continue}if(e.startsWith("on")){f[e]=n;continue}const s=l(n);if(t&&null!=s&&(m[t]=String(s),u||(v[t]=s)),t&&u){const e=V(n);v[t]=s!==e?s:n}}if("undefined"!==typeof window){for(const t in f){const n=f[t],i=t.endsWith("Capture"),r=((null==s?void 0:s[t])??t.slice(2).toLowerCase()).slice(0,i?-7:void 0);e.useLayoutEffect(()=>{const t=null==d?void 0:d.current;if(t&&"function"===typeof n)return t.addEventListener(r,n,i),()=>{t.removeEventListener(r,n,i)}},[null==d?void 0:d.current,n])}e.useLayoutEffect(()=>{if(null===d.current)return;const t=new Map;for(const e in g)H(d.current,e,g[e]),p.current.delete(e),t.set(e,g[e]);for(const[e,n]of p.current)H(d.current,e,void 0);p.current=t})}if("undefined"===typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){const{mode:n,delegatesFocus:s}=i.shadowRootOptions,r=e.createElement("template",{shadowrootmode:n,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(m,t)},key:"ce-la-react-ssr-template-shadow-root"});v.children=[r,v.children]}return e.createElement(n,{...a,...v,ref:e.useCallback(t=>{d.current=t,"function"===typeof r?r(t):null!==r&&(r.current=t)},[r])},v.children)});return c.displayName=r??i.name,c}({react:i,tagName:"youtube-video",elementClass:O,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":$(t)})}}]);

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.