PageSourceSearch

https://aiven.io/remix-chunks/react-C-lLpuHr.js

js aiven.io collected 2026-09-24 08:43:05 UTC 8,468 bytes, 33 lines download raw bytes

1import{a as H}from"./typography-C5LMSFAT.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"bb7bd624a8a3321ff6d1587f421551039a69f342"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="18735372-e144-4fe1-8314-24c7030521dd",e._sentryDebugIdIdentifier="sentry-dbid-18735372-e144-4fe1-8314-24c7030521dd")})()}catch{}const O="https://open.spotify.com",$=/open\.spotify\.com\/(\w+)\/(\w+)/i,B="https://open.spotify.com/embed-podcast/iframe-api/v1",D="SpotifyIframeApi",j="onSpotifyIframeApiReady";function P(e,t={}){const i={src:I(e,t),scrolling:"no",frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return`
2    <style>
3      :host {
4        display: inline-block;
5        min-width: 160px;
6        min-height: 80px;
7        position: relative;
8      }
9      iframe {
10        position: absolute;
11        top: 0;
12        left: 0;
13        width: 100%;
14        height: 100%;
15        overflow: hidden;
16      }
17      :host(:not([controls])) {
18        display: none !important;
19      }
20    </style>
21    <iframe${W(i)}></iframe>
22  `}function I(e,t){var i,n,u;if(!e.src)return;const a=e.src.match($),d=a&&a[1],f=a&&a[2],r={t:(i=t.config)==null?void 0:i.startAt,theme:((n=t.config)==null?void 0:n.theme)==="dark"?"0":null},y=(u=t.config)!=null&&u.preferVideo?"/video":"";return`${O}/embed/${d}/${f}${y}?${x(r)}`}class C extends(globalThis.HTMLElement??class{}){static getTemplateHTML=P;static shadowRootOptions={mode:"open"};static observedAttributes=["controls","loop","src"];loadComplete=new M;#r;#a;#l;#t=!1;#e=!1;#i=!0;#n=0;#s=NaN;#o=!1;#u=null;constructor(){super(),this.#d("config")}async load(){var t,i,n;if(this.#r)return;this.#a&&(this.loadComplete=new M),this.#a=!0,await(this.#r=Promise.resolve()),this.#r=null,this.#t=!1,this.#e=!1,this.#n=0,this.#s=NaN,this.#o=!1,this.dispatchEvent(new Event("emptied"));let u=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));const a={t:(t=this.config)==null?void 0:t.startAt,theme:((i=this.config)==null?void 0:i.theme)==="dark"?"0":null,preferVideo:(n=this.config)==null?void 0:n.preferVideo};if(this.#l)this.api=u,this.api.iframeElement.src=I(S(this.attributes),this);else{this.#l=!0,this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=P(S(this.attributes),this));let d=this.shadowRoot.querySelector("iframe");const f=await U(B,D,j);this.api=await new Promise(r=>f.createController(d,a,r)),this.api.iframeElement=d,this.api.addListener("ready",()=>{this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange"))}),this.api.addListener("playback_update",r=>{if(this.#e&&this.#i&&(r.data.isBuffering||!r.data.isPaused)){this.#e=!1,this.currentTime=1;return}if(r.data.duration/1e3!==this.#s&&(this.#e=!1,this.#s=r.data.duration/1e3,this.dispatchEvent(new Event("durationchange"))),r.data.position/1e3!==this.#n&&(this.#o=!1,this.#e=!1,this.#n=r.data.position/1e3,this.dispatchEvent(new Event("timeupdate"))),!this.#t&&!this.#i&&r.data.isPaused){this.#i=!0,this.dispatchEvent(new Event("pause"));return}if(this.#i&&(r.data.isBuffering||!r.data.isPaused)){this.#i=!1,this.dispatchEvent(new Event("play")),this.#t=r.data.isBuffering,this.#t?this.dispatchEvent(new Event("waiting")):this.dispatchEvent(new Event("playing"));return}if(this.#t&&!r.data.isPaused){this.#t=!1,this.dispatchEvent(new Event("playing"));return}if(!this.paused&&!this.seeking&&!this.#e&&Math.ceil(this.currentTime)>=this.duration){if(this.#e=!0,this.loop){this.currentTime=1;return}this.continuous||(this.pause(),this.dispatchEvent(new Event("ended")));return}})}this.loadComplete.resolve(),await this.loadComplete}async attributeChangedCallback(t,i,n){if(i!==n)switch(t){case"src":{this.load();return}}}async play(){var t;return this.#i=!1,this.#t=!0,this.dispatchEvent(new Event("play")),await this.loadComplete,(t=this.api)==null?void 0:t.resume()}async pause(){var t;return await this.loadComplete,(t=this.api)==null?void 0:t.pause()}get config(){return this.#u}set config(t){this.#u=t}get paused(){return this.#i??!0}get muted(){return!1}set muted(t){}get volume(){return 1}set volume(t){}get ended(){return Math.ceil(this.currentTime)>=this.duration}get seeking(){return this.#o}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}get currentTime(){return this.#n}set currentTime(t){if(this.currentTime==t)return;this.#o=!0;let i=this.#n;this.#n=t,this.dispatchEvent(new Event("timeupdate")),this.#n=i,this.loadComplete.then(()=>{var n;(n=this.api)==null||n.seek(t)})}get duration(){return this.#s}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}#d(t){if(Object.prototype.hasOwnProperty.call(this,t)){const i=this[t];delete this[t],this[t]=i}}}function W(e){let t="";for(const i in e){const n=e[i];n===""?t+=` ${i}`:t+=` ${i}="${n}"`}return t}function x(e){return String(new URLSearchParams(z(e)))}function z(e){let t={};for(let i in e){let n=e[i];n===!0||n===""?t[i]=1:n===!1?t[i]=0:n!=null&&(t[i]=n)}return t}function S(e){let t={};for(let i of e)t[i.name]=i.value;return t}const b={};async function U(e,t,i){return b[e]?b[e]:self[t]?Promise.resolve(self[t]):b[e]=new Promise(function(n,u){const a=document.createElement("script");a.src=e;const d=f=>n(f);self[i]=d,a.onload=()=>!i,a.onerror=u,document.head.append(a)})}class M extends Promise{constructor(t=()=>{}){let i,n;super((u,a)=>{t(u,a),i=u,n=a}),this.resolve=i,this.reject=n}}globalThis.customElements&&!globalThis.customElements.get("spotify-audio")&&globalThis.customElements.define("spotify-audio",C);var q=C,F=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),G={className:"class",htmlFor:"for"};function N(e){return e.toLowerCase()}function k(e){if(typeof e=="boolean")return e?"":void 0;if(typeof e!="function"&&!(typeof e=="object"&&e!==null))return e}function Y({react:e,tagName:t,elementClass:i,events:n,displayName:u,defaultProps:a,toAttributeName:d=N,toAttributeValue:f=k}){const r=Number.parseInt(e.version)>=19,y=e.forwardRef((T,v)=>{var _,A;const c=e.useRef(null),w=e.useRef(new Map),E={},L={},p={},g={};for(const[s,o]of Object.entries(T)){if(F.has(s)){p[s]=o;continue}const l=d(G[s]??s);if(i.prototype&&s in i.prototype&&!(s in(((_=globalThis.HTMLElement)==null?void 0:_.prototype)??{}))&&!((A=i.observedAttributes)!=null&&A.some(m=>m===l))){g[s]=o;continue}if(s.startsWith("on")){E[s]=o;continue}const h=f(o);if(l&&h!=null&&(L[l]=String(h),r||(p[l]=h)),l&&r){const m=k(o);
22h!==m?p[l]=h:p[l]=o}}if(typeof window<"u"){for(const s in E){const o=E[s],l=s.endsWith("Capture"),h=(n?.[s]??s.slice(2).toLowerCase()).slice(0,l?-7:void 0);e.useLayoutEffect(()=>{const m=c?.current;if(!(!m||typeof o!="function"))return m.addEventListener(h,o,l),()=>{m.removeEventListener(h,o,l)}},[c?.current,o])}e.useLayoutEffect(()=>{if(c.current===null)return;const s=new Map;for(const o in g)R(c.current,o,g[o]),w.current.delete(o),s.set(o,g[o]);for(const[o,l]of w.current)R(c.current,o,void 0);w.current=s})}if(typeof window>"u"&&i?.getTemplateHTML&&i?.shadowRootOptions){const{mode:s,delegatesFocus:o}=i.shadowRootOptions,l=e.createElement("template",{shadowrootmode:s,shadowrootdelegatesfocus:o,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(L,T)}});p.children=[l,p.children]}return e.createElement(t,{...a,...p,ref:e.useCallback(s=>{c.current=s,typeof v=="function"?v(s):v!==null&&(v.current=s)},[v])})});return y.displayName=u??i.name,y}function R(e,t,i){var n;e[t]=i,i==null&&t in(((n=globalThis.HTMLElement)==null?void 0:n.prototype)??{})&&e.removeAttribute(t)}var J=Y({react:H,tagName:"spotify-audio",elementClass:q,toAttributeName(e){return e==="muted"?"":e==="defaultMuted"?"muted":N(e)}});/*! Bundled license information:
23
24ce-la-react/dist/ce-la-react.js:
25  (**
26   * @license
27   * Copyright 2018 Google LLC
28   * SPDX-License-Identifier: BSD-3-Clause
29   *
30   * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
31   *)
32*/export{J as default};
33//# sourceMappingURL=react-C-lLpuHr.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.