PageSourceSearch

https://radiosudest.com/build/assets/player-BkdWiBfy.js

js radiosudest.com collected 2026-10-05 09:42:09 UTC 14,677 bytes, 1 lines download raw bytes

1import{$ as e,B as t,J as n,K as r,P as i,Q as a,W as o,X as s,Y as c,Z as l,_n as u,ct as d,et as f,fn as p,j as m,k as h,mn as g,nt as _,ot as v,pn as y,q as b,rt as x,sn as S,st as C,t as w,tt as T,vt as E,xt as D,yt as O}from"./time-CTDdmuSb.js";import{t as k}from"./play-pause-button-K_5PkvM4.js";import{t as A}from"./inline-list-CZQxsl2v.js";import{i as j,n as ee,r as M,t as N}from"./dist-JmmMBMY-.js";var P=p(`Volume1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),F=p(`Volume2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),I=p(`VolumeX`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),L=class extends C{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){let i=new t({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){this.#e.add(e);let t=R(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=R(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=R(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=R(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>
vendor: 4,143 bytes, line 1
1t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){n.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){let n={exact:!0,...t};return this.getAll().find(t=>e(n,t))}findAll(t={}){return this.getAll().filter(n=>e(t,n))}notify(e){n.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return n.batch(()=>Promise.all(e.map(e=>e.continue().catch(T))))}};function R(e){return e.options.scope?.id}var z=class extends C{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let i=t.queryKey,o=t.queryHash??a(i,t),s=this.get(o);return s||(s=new r({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){n.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>f(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>f(e,t)):t}notify(e){n.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){n.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){n.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},B=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new z,this.#t=e.mutationCache||new L,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=c.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=b.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(x(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=s(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,r){return n.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;n.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#e;return n.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t},i=n.batch(()=>this.#e.findAll(e).map(e=>e.cancel(r)));return Promise.all(i).then(T).catch(T)}invalidateQueries(e,t={}){return n.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0},i=n.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(T)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(i).then(T)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(x(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(T).catch(T)}
1fetchInfiniteQuery(e){return e.behavior=o(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(T).catch(T)}ensureInfiniteQueryData(e){return e.behavior=o(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return b.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(l(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{_(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(l(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{_(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=a(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===v&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},V=u(y(),1);function H(e){(0,V.useEffect)(()=>{!e||!(e instanceof d)||`mediaSession`in navigator&&e.setMediaSessionMetadata()},[e?.title])}var U=()=>{let[{media:e,status:t},{setError:n,setLoading:r,setPause:i,setPlay:a}]=E(),[o,s]=(0,V.useState)(0),[c,l]=(0,V.useState)(0),u=(0,V.useRef)(!1),f=(0,V.useRef)(null),p=f.current;H(e);let m=(0,V.useCallback)(e=>{f.current=e},[]);return(0,V.useEffect)(()=>
1{l(0),s(e?.duration??0),e instanceof d&&e.load()},[e?.title]),(0,V.useEffect)(()=>{p!==null&&(p.onplay=a,p.onloadstart=r,p.onwaiting=r,p.onpause=()=>{t===O.ERROR?n():i()},p.onabort=()=>u.current=!1,p.onerror=()=>{D.error(`Le média n'a pas pu être joué.`),n()},p.oncanplay=()=>{p?.play(),a()})},[p,t,r,i,a,n]),(0,V.useEffect)(()=>{let e=window.setInterval(()=>{if(p===null||t===O.PAUSED)return clearInterval(e);l(Math.round(p.currentTime))},1e3);return()=>clearInterval(e)},[p,t]),(0,V.useEffect)(()=>{u.current||(t===O.PLAYING&&p?.paused?((p?.play())?.catch(()=>n())?.finally(()=>{u.current=!1}),u.current=!0):t===O.PAUSED&&!p?.paused&&p?.pause())},[t,p,n,u]),{setAudioRef:m,audio:p,togglePlay:()=>{switch(t){case O.PLAYING:p?.pause(),i();break;case O.PAUSED:p?.play(),a();break;case O.ERROR:n();break;default:r();break}},currentTime:c,duration:o,seek:e=>{p&&o&&(p.currentTime=e*o/100,l(p.currentTime))}}};function W(e){return e===1/0}function G(e,t){return e===0||W(e)||t===O.ERROR}function K(e,t){return t<=0||W(t)?0:e/t*100}function q(e,t,n){return t!==null&&n?t:e}function J(e,t){return t?0:e}function Y(e){return e===0?I:e<.5?P:F}function X(e,t){return Math.max(0,Math.min(e-t.left,t.width))/t.width*100}var Z=g();function Q({media:e,status:t,duration:n}){let r=W(n),i=t===O.PLAYING;return(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,Z.jsx)(m,{url:e.artwork,alt:e.title,size:`sm`,fallback:`none`,className:`shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[r&&i&&(0,Z.jsxs)(`span`,{className:`mb-0.5 inline-flex w-fit items-center gap-1.5 rounded-full bg-red-500/10 px-2 py-0.5 text-xs font-medium text-red-600 dark:text-red-400`,children:[(0,Z.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-red-500`}),`EN DIRECT`]}),(0,Z.jsx)(`p`,{className:`max-w-full truncate text-sm font-semibold text-gray-900 dark:text-gray-100`,children:e.title}),(0,Z.jsx)(`p`,{className:`max-w-full truncate text-xs text-gray-500 dark:text-gray-400`,children:(0,Z.jsx)(A,{items:e.attributions,path:e=>e.path})})]})]})}function te({currentTime:e,duration:t,status:n,seek:r}){let i=(0,V.useRef)(null),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(null),l=W(t),u=G(t,n),d=K(e,t),f=q(d,s,a),p=(0,V.useCallback)(e=>{let t=i.current;return t?X(e,t.getBoundingClientRect()):0},[]),m=(0,V.useCallback)(e=>{u||(e.preventDefault(),e.target.setPointerCapture(e.pointerId),o(!0),c(p(e.clientX)))},[u,p]),g=(0,V.useCallback)(e=>{a&&c(p(e.clientX))},[a,p]),_=(0,V.useCallback)(e=>{a&&(r(p(e.clientX)),o(!1),c(null))},[a,p,r]),v=(0,V.useCallback)(e=>{u||a||r(p(e.clientX))},[u,a,p,r]);return(0,Z.jsx)(h,{showIf:!l,children:(0,Z.jsxs)(`div`,{ref:i,role:`slider`,"aria-label":`Progression`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(d),tabIndex:u?-1:0,className:`group relative h-3 w-full cursor-pointer touch-none`,onClick:v,onPointerDown:m,onPointerMove:g,onPointerUp:_,children:[(0,Z.jsx)(`div`,{className:`absolute top-1/2 left-0 h-1 w-full -translate-y-1/2 rounded-full bg-gray-200 transition-[height] group-hover:h-1.5 dark:bg-gray-700`,children:(0,Z.jsx)(`div`,{className:`h-full rounded-full bg-gray-900 transition-[width] dark:bg-gray-100`,style:{width:`${f}%`}})}),(0,Z.jsx)(`div`,{className:`absolute top-1/2 h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full bg-gray-900 opacity-0 shadow transition-opacity group-hover:opacity-100 dark:bg-gray-100`,style:{left:`${f}%`}})]})})}function ne({currentTime:e,duration:t}){return(0,Z.jsx)(h,{showIf:!W(t),children:(0,Z.jsxs)(`p`,{className:`hidden text-xs tabular-nums text-gray-500 md:block dark:text-gray-400`,children:[w(e||0),` / `,w(t||0)]})})}function re({audio:e}){let[t,n]=(0,V.useState)(1),[r,i]=(0,V.useState)(!1),a=J(t,r),o=Y(a),s=(0,V.useCallback)(t=>{e&&(e.volume=t,e.muted=t===0)},[e]),c=(0,V.useCallback)(e=>{let t=Number.parseFloat(e.target.value);n(t),i(!1),s(t)},[s]),l=(0,V.useCallback)(()=>{let e=!r;i(e),s(e?0:t)},[r,t,s]);return(0,Z.jsxs)(M,{children:[(0,Z.jsx)(j,{asChild:!0,children:(0,Z.jsx)(`button`,{type:`button`,onClick:l,"aria-label":`Volume`,className:`hidden items-center justify-center rounded-full p-1.5 text-gray-500 transition-colors hover:text-gray-900 md:flex dar
1k:text-gray-400 dark:hover:text-gray-100`,children:(0,Z.jsx)(o,{className:`h-5 w-5`})})}),(0,Z.jsx)(ee,{children:(0,Z.jsx)(N,{side:`top`,align:`center`,sideOffset:12,className:`flex h-32 w-10 items-center justify-center rounded-lg border border-gray-200 bg-white p-2 shadow-lg dark:border-gray-700 dark:bg-gray-900`,children:(0,Z.jsx)(`input`,{type:`range`,min:0,max:1,step:.01,value:a,onChange:c,"aria-label":`Volume`,className:`volume-slider h-24 w-1.5 cursor-pointer appearance-none rounded-full bg-gray-200 dark:bg-gray-700`,style:{writingMode:`vertical-lr`,direction:`rtl`,accentColor:`#FD7661`}})})})]})}function ie({close:e}){let[{media:t,status:n}]=E(),{audio:r,togglePlay:a,currentTime:o,duration:s,seek:c}=U(),{current:l}=i(),u=t?.previewDuration??s;return(0,V.useEffect)(()=>{t instanceof d&&t.updateLiveMetadata(l)},[t,l]),t?(0,Z.jsxs)(`div`,{id:`player`,className:`fixed inset-x-0 z-30 border-t border-gray-200 bg-white/95 shadow-[0_-4px_16px_rgba(0,0,0,0.08)] backdrop-blur-md bottom-[calc(env(safe-area-inset-bottom)+53px)] md:z-50 md:bottom-0 dark:border-gray-700 dark:bg-gray-900/95 dark:shadow-[0_-4px_16px_rgba(0,0,0,0.3)]`,children:[(0,Z.jsx)(te,{currentTime:o,duration:u,status:n,seek:c}),(0,Z.jsx)($,{media:t}),(0,Z.jsxs)(`div`,{className:`mx-auto flex items-center justify-between gap-3 px-3 py-2.5 md:gap-4 md:px-4 md:py-3`,children:[(0,Z.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Z.jsx)(Q,{media:t,status:n,duration:s})}),(0,Z.jsx)(k,{label:t.title,action:a,status:n,className:`hidden shrink-0 md:flex`}),(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 md:gap-3`,children:[(0,Z.jsx)(ne,{currentTime:o,duration:u}),(0,Z.jsx)(re,{audio:r}),(0,Z.jsx)(ae,{close:()=>{r?.pause(),e()}})]})]})]}):null}function $({media:e}){let{setAudioRef:t,audio:n}=U();return(0,Z.jsx)(`audio`,{ref:t,src:e.url,preload:`metadata`,onCanPlay:()=>n?.play()})}function ae({close:e}){return(0,Z.jsx)(`button`,{type:`button`,onClick:e,"aria-label":`Fermer le lecteur`,className:`flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 dark:text-gray-500 dark:hover:bg-gray-800 dark:hover:text-gray-300`,"data-umami-event":`close-player`,children:(0,Z.jsx)(S,{className:`h-4 w-4`})})}
1export{ie as n,B as r,$ as 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.