HEX
Server: Apache/2.4.41
System: Linux mainweb 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: nationalmedicaregrp (1119)
PHP: 8.3.7
Disabled: exec,passthru,shell_exec,system,popen,proc_open,pcntl_exec
Upload Files
File: /home/dv-pro/public_html/wp-content/plugins/simply-static/src/admin/build/reactPlayerSpotify.js
"use strict";(globalThis.webpackChunksimplystatic_settings=globalThis.webpackChunksimplystatic_settings||[]).push([[771],{653:(t,e,i)=>{i.r(e),i.d(e,{default:()=>w});var n=i(609);const s="https://open.spotify.com",o=/open\.spotify\.com\/(\w+)\/(\w+)/i;function a(t,e={}){return`\n    <style>\n      :host {\n        display: inline-block;\n        min-width: 160px;\n        min-height: 80px;\n        position: relative;\n      }\n      iframe {\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 100%;\n        height: 100%;\n        overflow: hidden;\n      }\n      :host(:not([controls])) {\n        display: none !important;\n      }\n    </style>\n    <iframe${function(t){let e="";for(const i in t){const n=t[i];e+=""===n?` ${i}`:` ${i}="${n}"`}return e}({src:r(t,e),scrolling:"no",frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"})}></iframe>\n  `}function r(t,e){var i,n,a;if(!t.src)return;const r=t.src.match(o),l=r&&r[1],d=r&&r[2],u={t:null==(i=e.config)?void 0:i.startAt,theme:"dark"===(null==(n=e.config)?void 0:n.theme)?"0":null},h=(null==(a=e.config)?void 0:a.preferVideo)?"/video":"";return`${s}/embed/${l}/${d}${h}?${function(t){return String(new URLSearchParams(function(t){let e={};for(let i in t){let n=t[i];!0===n||""===n?e[i]=1:!1===n?e[i]=0:null!=n&&(e[i]=n)}return e}(t)))}(u)}`}class l extends(globalThis.HTMLElement??class{}){static getTemplateHTML=a;static shadowRootOptions={mode:"open"};static observedAttributes=["controls","loop","src"];loadComplete=new h;#t;#e;#i;#n=!1;#s=!1;#o=!0;#a=0;#r=NaN;#l=!1;#d=null;constructor(){super(),this.#u("config")}async load(){var t,e,i;if(this.#t)return;this.#e&&(this.loadComplete=new h),this.#e=!0,await(this.#t=Promise.resolve()),this.#t=null,this.#n=!1,this.#s=!1,this.#a=0,this.#r=NaN,this.#l=!1,this.dispatchEvent(new Event("emptied"));let n=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));const s={t:null==(t=this.config)?void 0:t.startAt,theme:"dark"===(null==(e=this.config)?void 0:e.theme)?"0":null,preferVideo:null==(i=this.config)?void 0:i.preferVideo};if(this.#i)this.api=n,this.api.iframeElement.src=r(d(this.attributes),this);else{this.#i=!0,this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=a(d(this.attributes),this));let t=this.shadowRoot.querySelector("iframe");const e=await async function(t,e,i){return u[t]?u[t]:e&&self[e]?Promise.resolve(self[e]):u[t]=new Promise((function(e,n){const s=document.createElement("script");s.src=t;const o=t=>e(t);i&&(self[i]=o),s.onload=()=>!1,s.onerror=n,document.head.append(s)}))}("https://open.spotify.com/embed-podcast/iframe-api/v1","SpotifyIframeApi","onSpotifyIframeApiReady");this.api=await new Promise((i=>e.createController(t,s,i))),this.api.iframeElement=t,this.api.addListener("ready",(()=>{this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange"))})),this.api.addListener("playback_update",(t=>this.#s&&this.#o&&(t.data.isBuffering||!t.data.isPaused)?(this.#s=!1,void(this.currentTime=1)):(t.data.duration/1e3!==this.#r&&(this.#s=!1,this.#r=t.data.duration/1e3,this.dispatchEvent(new Event("durationchange"))),t.data.position/1e3!==this.#a&&(this.#l=!1,this.#s=!1,this.#a=t.data.position/1e3,this.dispatchEvent(new Event("timeupdate"))),this.#n||this.#o||!t.data.isPaused?!this.#o||!t.data.isBuffering&&t.data.isPaused?this.#n&&!t.data.isPaused?(this.#n=!1,void this.dispatchEvent(new Event("playing"))):!this.paused&&!this.seeking&&!this.#s&&Math.ceil(this.currentTime)>=this.duration?(this.#s=!0,this.loop?void(this.currentTime=1):void(this.continuous||(this.pause(),this.dispatchEvent(new Event("ended"))))):void 0:(this.#o=!1,this.dispatchEvent(new Event("play")),this.#n=t.data.isBuffering,void(this.#n?this.dispatchEvent(new Event("waiting")):this.dispatchEvent(new Event("playing")))):(this.#o=!0,void this.dispatchEvent(new Event("pause"))))))}this.loadComplete.resolve(),await this.loadComplete}async attributeChangedCallback(t,e,i){e!==i&&("src"!==t||this.load())}async play(){var t;return this.#o=!1,this.#n=!0,this.dispatchEvent(new Event("play")),await this.loadComplete,null==(t=this.api)?void 0:t.resume()}async pause(){var t;return await this.loadComplete,null==(t=this.api)?void 0:t.pause()}get config(){return this.#d}set config(t){this.#d=t}get paused(){return this.#o??!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.#l}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",Boolean(t))}get currentTime(){return this.#a}set currentTime(t){if(this.currentTime==t)return;this.#l=!0;let e=this.#a;this.#a=t,this.dispatchEvent(new Event("timeupdate")),this.#a=e,this.loadComplete.then((()=>{var e;null==(e=this.api)||e.seek(t)}))}get duration(){return this.#r}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}#u(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}}function d(t){let e={};for(let i of t)e[i.name]=i.value;return e}const u={};class h extends Promise{constructor(t=()=>{}){let e,i;super(((n,s)=>{t(n,s),e=n,i=s})),this.resolve=e,this.reject=i}}globalThis.customElements&&!globalThis.customElements.get("spotify-audio")&&globalThis.customElements.define("spotify-audio",l);var c=l,p=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),f={className:"class",htmlFor:"for"};function m(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 g(t,e,i){var n;t[e]=i,null==i&&e in((null==(n=globalThis.HTMLElement)?void 0:n.prototype)??{})&&t.removeAttribute(e)}var w=function({react:t,tagName:e,elementClass:i,events:n,displayName:s,defaultProps:o,toAttributeName:a=m,toAttributeValue:r=v}){const l=Number.parseInt(t.version)>=19,d=t.forwardRef(((s,d)=>{var u,h;const c=t.useRef(null),m=t.useRef(new Map),w={},y={},E={},T={};for(const[t,e]of Object.entries(s)){if(p.has(t)){E[t]=e;continue}const n=a(f[t]??t);if(i.prototype&&t in i.prototype&&!(t in((null==(u=globalThis.HTMLElement)?void 0:u.prototype)??{}))&&!(null==(h=i.observedAttributes)?void 0:h.some((t=>t===n)))){T[t]=e;continue}if(t.startsWith("on")){w[t]=e;continue}const s=r(e);if(n&&null!=s&&(y[n]=String(s),l||(E[n]=s)),n&&l){const t=v(e);E[n]=s!==t?s:e}}if("undefined"!=typeof window){for(const e in w){const i=w[e],s=e.endsWith("Capture"),o=((null==n?void 0:n[e])??e.slice(2).toLowerCase()).slice(0,s?-7:void 0);t.useLayoutEffect((()=>{const t=null==c?void 0:c.current;if(t&&"function"==typeof i)return t.addEventListener(o,i,s),()=>{t.removeEventListener(o,i,s)}}),[null==c?void 0:c.current,i])}t.useLayoutEffect((()=>{if(null===c.current)return;const t=new Map;for(const e in T)g(c.current,e,T[e]),m.current.delete(e),t.set(e,T[e]);for(const[t,e]of m.current)g(c.current,t,void 0);m.current=t}))}if("undefined"==typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){const{mode:e,delegatesFocus:n}=i.shadowRootOptions,o=t.createElement("template",{shadowrootmode:e,shadowrootdelegatesfocus:n,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(y,s)}});E.children=[o,E.children]}return t.createElement(e,{...o,...E,ref:t.useCallback((t=>{c.current=t,"function"==typeof d?d(t):null!==d&&(d.current=t)}),[d])})}));return d.displayName=s??i.name,d}({react:n,tagName:"spotify-audio",elementClass:c,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":m(t)})}}]);