PageSourceSearch

https://gadero.fr/assets/react-C7T0yDiJ.js

js gadero.fr collected 2026-10-07 03:52:54 UTC 6,679 bytes, 16 lines download raw bytes

1var H=Object.defineProperty;var I=t=>{throw TypeError(t)};var F=(t,i,e)=>i in t?H(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e;var L=(t,i,e)=>F(t,typeof i!="symbol"?i+"":i,e),N=(t,i,e)=>i.has(t)||I("Cannot "+e);var A=(t,i,e)=>(N(t,i,"read from private field"),e?e.call(t):i.get(t)),$=(t,i,e)=>i.has(t)?I("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),C=(t,i,e,a)=>(N(t,i,"write to private field"),a?a.call(t,e):i.set(t,e),e);import{a as W}from"./react-DV1t-RFr.js";import{_ as U}from"./User-BwMVt-Id.js";import{M as j,C as P}from"./mixin-DIQKSja0.js";import"./Tick-kzBn0Rae.js";import"./Tree-ClnHW7Jm.js";import"./react-router-CRB4Z4yw.js";import"./Trash-C9p4crdT.js";import"./Service-CVy7A0jM.js";import"./_robots.txt_-BnSfYDXh.js";import"./TrustpilotWidget-BhZ9u-TD.js";import"./GDLoadingMask-DymGFtVF.js";var _;class S extends j(P){constructor(){super(...arguments);$(this,_)}attributeChangedCallback(e,a,n){e!=="src"&&super.attributeChangedCallback(e,a,n),e==="src"&&a!=n&&this.load()}async _initThumbnails(e){const a=async(d,v)=>{const g=[],m=e.timescale||1,w=e.startNumber||1,M=e.presentationTimeOffset?e.presentationTimeOffset/m:0,h=e.segmentDuration;for(let b=0;b<d;b++){const y=q({thIndex:b,thduration:v,ttiles:d,tduration:h,startNumber:w,pto:M}),R=y+v,f=new Promise((E,r)=>{this.api.provideThumbnail(y,({url:s,width:l,height:p,x:T,y:D})=>{try{const k=new VTTCue(y,R,`${s}#xywh=${T},${D},${l},${p}`);E(k)}catch(k){r(k)}})});g.push(f)}return await Promise.all(g).catch(b=>console.error("Error processing thumbnails",b))},{totalThumbnails:n,thumbnailDuration:o}=K(e),u=await a(n,o);let c=this.nativeEl.querySelector('track[label="thumbnails"]');if(!c){c=z(),this.nativeEl.appendChild(c);const d=V(u);c.src=d,c.dispatchEvent(new Event("change"))}}async load(){if(A(this,_)){this.api.attachSource(this.src);return}C(this,_,!0);const e=await U(()=>import("./dash.all.min-FF_1IyY6.js"),[]);this.api=e.MediaPlayer().create(),this.api.initialize(this.nativeEl,this.src,this.autoplay),this.api.on(e.MediaPlayer.events.STREAM_INITIALIZED,()=>{const a=this.api.getRepresentationsByType("video");let n=this.videoTracks.getTrackById("main");n||(n=this.addVideoTrack("main"),n.id="main",n.selected=!0),a.forEach(o=>{const u=o.bandwidth??o.bitrate??(Number.isFinite(o.bitrateInKbit)?o.bitrateInKbit*1e3:void 0),c=n.addRendition(o.id,o.width,o.height,o.mimeType??o.codec,u);c.id=o.id}),this.videoRenditions.addEventListener("change",()=>{const o=this.videoRenditions[this.videoRenditions.selectedIndex];o!=null&&o.id?(this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),this.api.setRepresentationForTypeById("video",o.id,!0)):this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}})}),this.api.isDynamic()||this.api.getRepresentationsByType("image").forEach(async(u,c)=>{c>0||this._initThumbnails(u)})})}}_=new WeakMap,L(S,"shadowRootOptions",{...P.shadowRootOptions}),L(S,"getTemplateHTML",e=>{const{src:a,...n}=e;return P.getTemplateHTML(n)});function K(t){var i,e;const a=t.essentialProperties[0],[n,o]=a.value.split("x").map(Number),u=n*o,c=((e=(i=t.adaptation)==null?void 0:i.period)==null?void 0:e.duration)||null,d=t.segmentDuration,v=t.timescale||1,m=d/v/u;return{totalThumbnails:c!=null?Math.ceil(c/m):Math.ceil(d/m),thumbnailDuration:m}}function q({thIndex:t,tduration:i,thduration:e,ttiles:a,startNumber:n,pto:o}){const u=Math.floor(t/a)+n,c=t%a+1,d=(u-1)*i-o,v=(c-1)*e;return d+v}function z(){const t=document.createElement("track");return t.kind="metadata",t.label="thumbnails",t.srclang="en",t.mode="hidden",t.default=!0,t}function V(t){let i=`WEBVTT
2
3`;for(const n of t)i+=`${a(n.startTime)} --> ${a(n.endTime)}
4`,i+=`${n.text}
5
6`;const e=new Blob([i],{type:"text/vtt"});return URL.createObjectURL(e);function a(n){const o=String(Math.floor(n/3600)).padStart(2,"0"),u=String(Math.floor(n%3600/60)).padStart(2,"0"),c=(n%60).toFixed(3).padStart(6,"0");return`${o}:${u}:${c}`}}globalThis.customElements&&!globalThis.customElements.get("dash-video")&&globalThis.customElements.define("dash-video",S
6);var Z=S,G=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),J={className:"class",htmlFor:"for"};function B(t){return t.toLowerCase()}function O(t){if(typeof t=="boolean")return t?"":void 0;if(typeof t!="function"&&!(typeof t=="object"&&t!==null))return t}function Q({react:t,tagName:i,elementClass:e,events:a,displayName:n,defaultProps:o,toAttributeName:u=B,toAttributeValue:c=O}){const d=Number.parseInt(t.version)>=19,v=t.forwardRef((g,m)=>{var w,M;const h=t.useRef(null),b=t.useRef(new Map),y={},R={},f={},E={};for(const[r,s]of Object.entries(g)){if(G.has(r)){f[r]=s;continue}const l=u(J[r]??r);if(e.prototype&&r in e.prototype&&!(r in(((w=globalThis.HTMLElement)==null?void 0:w.prototype)??{}))&&!((M=e.observedAttributes)!=null&&M.some(T=>T===l))){E[r]=s;continue}if(r.startsWith("on")){y[r]=s;continue}const p=c(s);if(l&&p!=null&&(R[l]=String(p),d||(f[l]=p)),l&&d){const T=O(s);p!==T?f[l]=p:f[l]=s}}if(typeof window<"u"){for(const r in y){const s=y[r],l=r.endsWith("Capture"),p=((a==null?void 0:a[r])??r.slice(2).toLowerCase()).slice(0,l?-7:void 0);t.useLayoutEffect(()=>{const T=h==null?void 0:h.current;if(!(!T||typeof s!="function"))return T.addEventListener(p,s,l),()=>{T.removeEventListener(p,s,l)}},[h==null?void 0:h.current,s])}t.useLayoutEffect(()=>{if(h.current===null)return;const r=new Map;for(const s in E)x(h.current,s,E[s]),b.current.delete(s),r.set(s,E[s]);for(const[s,l]of b.current)x(h.current,s,void 0);b.current=r})}if(typeof window>"u"&&(e!=null&&e.getTemplateHTML)&&(e!=null&&e.shadowRootOptions)){const{mode:r,delegatesFocus:s}=e.shadowRootOptions,l=t.createElement("template",{shadowrootmode:r,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:e.getTemplateHTML(R,g)},key:"ce-la-react-ssr-template-shadow-root"});f.children=[l,f.children]}return t.createElement(i,{...o,...f,ref:t.useCallback(r=>{h.current=r,typeof m=="function"?m(r):m!==null&&(m.current=r)},[m])},f.children)});return v.displayName=n??e.name,v}function x(t,i,e){var a;t[i]=e,e==null&&i in(((a=globalThis.HTMLElement)==null?void 0:a.prototype)??{})&&t.removeAttribute(i)}var ut=Q({react:W,tagName:"dash-video",elementClass:Z,toAttributeName(t){return t==="muted"?"":t==="defaultMuted"?"muted":B(t)}});/*! Bundled license information:
7
8ce-la-react/dist/ce-la-react.js:
9  (**
10   * @license
11   * Copyright 2018 Google LLC
12   * SPDX-License-Identifier: BSD-3-Clause
13   *
14   * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
15   *)
16*/export{ut as default};

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.