From 251b62b68554237871265e4a5f1d87d3b8c6a164 Mon Sep 17 00:00:00 2001 From: Oskar Rough Date: Wed, 3 Jan 2018 21:44:13 +0100 Subject: [PATCH] 0.3.6 --- dist/radio4000-player.min.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/radio4000-player.min.js b/dist/radio4000-player.min.js index 6a3ce494..cf621c03 100644 --- a/dist/radio4000-player.min.js +++ b/dist/radio4000-player.min.js @@ -1,2 +1,2 @@ -(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?t():'function'==typeof define&&define.amd?define(t):t()})(this,function(){'use strict';function e(e){return e===void 0||null===e}function t(e){return e!==void 0&&null!==e}function n(e){return!0===e}function a(e){return!1===e}function o(e){return'string'==typeof e||'number'==typeof e||'boolean'==typeof e}function r(e){return null!==e&&'object'==typeof e}function l(e){return'[object Object]'===Vn.call(e)}function i(e){return'[object RegExp]'===Vn.call(e)}function c(e){var t=parseFloat(e);return 0<=t&&Hn(t)===t&&isFinite(e)}function p(e){return null==e?'':'object'==typeof e?JSON.stringify(e,null,2):e+''}function u(e){var t=parseFloat(e);return isNaN(t)?e:t}function g(e,t){for(var a=Object.create(null),n=e.split(','),o=0;oUo&&Do[a].id>e.id;)a--;Do.splice(a+1,0,e)}Bo||(Bo=!0,bo(Ie))}}function De(e){qo.clear(),Ve(e,qo)}function Ve(e,t){var a,n,o=Array.isArray(e);if((o||r(e))&&Object.isExtensible(e)){if(e.__ob__){var s=e.__ob__.dep.id;if(t.has(s))return;t.add(s)}if(o)for(a=e.length;a--;)Ve(e[a],t);else for(n=Object.keys(e),a=n.length;a--;)Ve(e[n[a]],t)}}function Re(e,t,a){Ko.get=function(){return this[t][a]},Ko.set=function(e){this[t][a]=e},Object.defineProperty(e,a,Ko)}function Be(e){e._watchers=[];var t=e.$options;t.props&&Fe(e,t.props),t.methods&&We(e,t.methods),t.data?Ue(e):D(e._data={},!0),t.computed&&ze(e,t.computed),t.watch&&t.watch!==uo&&Ye(e,t.watch)}function Fe(e,t){var a=e.$options.propsData||{},n=e._props={},o=e.$options._propKeys=[],r=!e.$parent;Lo.shouldConvert=r;var s=function(r){o.push(r);var s=X(r,t,a,e);V(n,r,s),r in e||Re(e,'_props',r)};for(var l in t)s(l);Lo.shouldConvert=!0}function Ue(e){var t=e.$options.data;t=e._data='function'==typeof t?je(t,e):t||{},l(t)||(t={});for(var a=Object.keys(t),n=e.$options.props,o=e.$options.methods,r=a.length;r--;){var s=a[r];n&&v(n,s)||!P(s)&&Re(e,'_data',s)}D(t,!0)}function je(e,t){try{return e.call(t)}catch(a){return M(a,t,'data()'),{}}}function ze(e,t){var a=e._computedWatchers=Object.create(null);for(var n in t){var o=t[n],r='function'==typeof o?o:o.get;a[n]=new zo(e,r||x,x,Wo),n in e||qe(e,n,o)}}function qe(e,t,a){'function'==typeof a?(Ko.get=Ke(t),Ko.set=x):(Ko.get=a.get?!1===a.cache?a.get:Ke(t):x,Ko.set=a.set?a.set:x),Object.defineProperty(e,t,Ko)}function Ke(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),Co.target&&t.depend(),t.value}}function We(e,t){e.$options.props;for(var a in t)e[a]=null==t[a]?x:b(t[a],e)}function Ye(e,t){for(var a in t){var n=t[a];if(Array.isArray(n))for(var o=0;oa.indexOf(e[o]))&&n.push(e[o]);return n}return e}function xt(e){this._init(e)}function Et(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1r[a].indexOf(o)&&r[a].push(o):r[a]=[o]:r[a]=o}}function zt(o,a){return o.key===a.key&&(o.tag===a.tag&&o.isComment===a.isComment&&t(o.data)===t(a.data)&&qt(o,a)||n(o.isAsyncPlaceholder)&&o.asyncFactory===a.asyncFactory&&e(a.asyncFactory.error))}function qt(e,a){if('input'!==e.tag)return!0;var n,o=t(n=e.data)&&t(n=n.attrs)&&n.type,r=t(n=a.data)&&t(n=n.attrs)&&n.type;return o===r}function Kt(e,a,n){var o,r,s={};for(o=a;o<=n;++o)r=e[o].key,t(r)&&(s[r]=o);return s}function Wt(e,t){(e.data.directives||t.data.directives)&&Yt(e,t)}function Yt(e,t){var a,n,o,r=e===fr,s=Gt(e.data.directives,e.context),l=Gt(t.data.directives,t.context),d=[],c=[];for(a in l)n=s[a],o=l[a],n?(o.oldValue=n.value,Xt(o,'update',t,e),o.def&&o.def.componentUpdated&&c.push(o)):(Xt(o,'bind',t,e),o.def&&o.def.inserted&&d.push(o));if(d.length){var i=function(){for(var a=0;aa.indexOf(' '+t+' ')&&e.setAttribute('class',(a+t).trim())}}function ha(e,t){if(t&&(t=t.trim()))if(e.classList)-1a.indexOf(t)&&(a.push(t),ma(e,t))}function va(e,t){e._transitionClasses&&f(e._transitionClasses,t),ha(e,t)}function _a(t,e,a){var n=ba(t,e),o=n.type,r=n.timeout,s=n.propCount;if(!o)return a();var l=o===Ar?Sr:Nr,i=0,d=function(){t.removeEventListener(l,c),a()},c=function(a){a.target===t&&++i>=s&&d()};setTimeout(function(){id?Ar:Mr:null,p=a?a===Ar?r.length:i.length:0);var u=a===Ar&&Dr.test(n[Ir+'Property']);return{type:a,timeout:c,propCount:p,hasTransform:u}}function ka(e,t){for(;e.length':('
'+e.innerHTML+'
').replace(/vue-slot=/g,'slot=');if(o.shadow&&e.shadowRoot?(e.shadowRoot.innerHTML=u,d.el=e.shadowRoot.children[0]):(e.innerHTML=u,d.el=e.children[0]),Za(e,n),e.__vue_custom_element__=new t(d),o.shadow&&o.shadowCss&&e.shadowRoot){var m=document.createElement('style');m.type='text/css',m.appendChild(document.createTextNode(o.shadowCss)),e.shadowRoot.appendChild(m)}e.removeAttribute('vce-cloak'),e.setAttribute('vce-ready',''),nn(e,'vce-ready')}}function rn(e){e.customElement=function(t,a){var n=2=h?t(e/h)+'d':e>=m?t(e/m)+'h':e>=s?t(e/s)+'m':e>=Ms?t(e/Ms)+'s':e+'ms'}function Ln(e){return Pn(e,h,'day')||Pn(e,m,'hour')||Pn(e,s,'minute')||Pn(e,Ms,'second')||e+' ms'}function Pn(e,t,a){return eh?(p=e(o[f+1])?null:o[f+1].elm,_(a,p,o,m,f,r)):m>f&&k(a,n,u,h)}function x(a,o,r,s){if(a!==o){var l=o.elm=a.elm;if(n(a.isAsyncPlaceholder))return void(t(o.asyncFactory.resolved)?w(a.elm,o,r):o.isAsyncPlaceholder=!0);if(n(o.isStatic)&&n(a.isStatic)&&o.key===a.key&&(n(o.isCloned)||n(o.isOnce)))return void(o.componentInstance=a.componentInstance);var d,i=o.data;t(i)&&t(d=i.hook)&&t(d=d.prepatch)&&d(a,o);var c=a.children,p=o.children;if(t(i)&&y(o)){for(d=0;dM.call(Ve,o)&&Ve.push(o)),n&&(t=o[e+a])&&t.call(o))}function me(){}function he(n,y,e){var r=e&&e[l]||'',i=y.prototype,o=J(i),g=y.observedAttributes||N,a={prototype:o};He(o,h,{value:function(){if(K)K=!1;else if(!this[F]){this[F]=!0,new y(this),i[h]&&i[h].call(this);var t=Q[Y.get(y)];(!j||1>0),Ae='addEventListener',u='attached',a='Callback',Me='detached',l='extends',c='attributeChanged'+a,s=u+a,p='connected'+a,d='disconnected'+a,h='created'+a,m=Me+a,g='ADDITION',o='MODIFICATION',y='REMOVAL',f='DOMAttrModified',v='DOMContentLoaded',b='DOMSubtreeModified',x='<',T='=',E=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,C=['ANNOTATION-XML','COLOR-PROFILE','FONT-FACE','FONT-FACE-SRC','FONT-FACE-URI','FONT-FACE-FORMAT','FONT-FACE-NAME','MISSING-GLYPH'],k=[],w=[],L='',A=be.documentElement,M=k.indexOf||function(a){for(var e=this.length;e--&&this[e]!==a;);return e},_=ke.prototype,S=_.hasOwnProperty,P=_.isPrototypeOf,O=ke.defineProperty,N=[],H=ke.getOwnPropertyDescriptor,D=ke.getOwnPropertyNames,I=ke.getPrototypeOf,B=ke.setPrototypeOf,R=!!ke.__proto__,F='__dreCEv1',U=z.customElements,j='force'!==e&&!!(U&&U.define&&U.get&&U.whenDefined),q=ke.create||ke,$=z.Map||function(){var a,o=[],t=[];return{get:function(a){return t[M.call(o,a)]},set:function(n,e){a=M.call(o,n),0>a?t[o.push(n)-1]=e:t[a]=e}}},W=z.Promise||function(a){function o(a){for(t=!0;s.length;)s.shift()(a)}var s=[],t=!1,n={catch:function(){return n},then:function(a){return s.push(a),t&&setTimeout(o,1),n}};return a(o),n},K=!1,Q=q(null),G=q(null),Y=new $,Z=function(t){return t.toLowerCase()},J=ke.create||function t(a){return a?(t.prototype=a,new t):this},Ie=B||(R?function(a,e){return a.__proto__=e,a}:D&&H?function(){function a(a,o){for(var t,n=D(o),r=0,l=n.length;r=t||0>a||v&&n>=u}function l(){var e=us();return s(e)?i(e):void(h=setTimeout(l,r(e)))}function i(e){return(h=void 0,_&&c)?n(e):(c=p=void 0,m)}function d(){var e=us(),a=s(e);if(c=arguments,p=this,y=e,a){if(void 0===h)return o(y);if(v)return h=setTimeout(l,t),n(y)}return void 0===h&&(h=setTimeout(l,t)),m}var c,p,u,m,h,y,g=0,f=!1,v=!1,_=!0;if('function'!=typeof e)throw new TypeError('Expected a function');return t=un(t)||0,dn(a)&&(f=!!a.leading,v='maxWait'in a,u=v?Nn(un(a.maxWait)||0,t):u,_='trailing'in a?!!a.trailing:_),d.cancel=function(){void 0!==h&&clearTimeout(h),g=0,c=y=p=h=void 0},d.flush=function(){return void 0===h?m:i(us())},d};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .Loading[data-v-b13e295a] { font-size: 0.9em; position: relative; } .Loading span[data-v-b13e295a]::before { display: block; content: \'\'; position: absolute; top: 0; left: 0; width: 10em; height: 2px; background: linear-gradient( to right, #a7a7a7, rgba(255, 255, 255, 0)); animation-name: Loading; animation-duration: 4s; animation-direction: alternate; animation-timing-function: ease; animation-iteration-count: infinite; } .Header-image .Loading[data-v-b13e295a] { position: absolute; top: 0; right: 0; left: 0; bottom: 0; } @keyframes Loading { 0%[data-v-b13e295a] { width: 10%; } 100%[data-v-b13e295a] { width: 100%; } } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var ys={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('div',{staticClass:'Loading',class:{"Loading--hasNoMessage":!e.message}},[e.message?a('span',[e._v(e._s(e.message))]):a('span')])},staticRenderFns:[],_scopeId:'data-v-b13e295a',props:{message:String}};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .R4[data-v-992d0cf4] { width: 1.2em; height: 1.2em; /*fill: white;*/ fill: black; } .R4 *[data-v-992d0cf4] { fill: inherit; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .Header[data-v-d9ee9b72] { position: relative; display: flex; flex-wrap: nowrap; align-items: center; background-color: hsl(0, 0%, 96%); border-bottom: 1px solid hsl(0, 0%, 70%); } .Header-media[data-v-d9ee9b72] { position: relative; width: 1em; height: 1em; font-size: 3.5em; } .Header-media img[data-v-d9ee9b72] { display: inline-block; vertical-align: top; width: 100%; } .Header-body[data-v-d9ee9b72] { flex: 1; line-height: 1.4; } .Header-channel[data-v-d9ee9b72] { margin-left: 0.3em; margin-bottom: 0; margin-top: 0; } .Header-track[data-v-d9ee9b72] { font-size: 0.9375em; /* 15/16 */ margin: 0; } marquee[data-v-d9ee9b72] { display: block; min-height: 1em; /* avoid jumps */ } .Header-logo[data-v-d9ee9b72] { position: absolute; top: 0.2em; right: 0.2em; opacity: 0.1; transition: opacity 100ms; } .Header-logo[data-v-d9ee9b72]:hover { opacity: 1; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var gs={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('header',{staticClass:'Header'},[a('a',{staticClass:'Header-logo',attrs:{href:e.linkHref,target:e.linkTarget,title:'Open this radio on Radio4000.com'}},[a('R4Logo')],1),a('a',{staticClass:'Header-media',attrs:{href:e.linkHref,target:e.linkTarget,title:'Open this radio on Radio4000.com'}},[e.image?a('img',{attrs:{src:e.image,alt:''}}):a('loading')],1),e.channel.title?a('div',{staticClass:'Header-body'},[a('p',{staticClass:'Header-channel',attrs:{title:e.channelDescription}},[a('strong',[e._v(e._s(e.channel.title))])]),a('marquee',{staticClass:'Header-track',attrs:{title:[e.track.body?e.track.body:'']}},[e._v(e._s(e.track.title))])],1):a('loading')],1)},staticRenderFns:[],_scopeId:'data-v-d9ee9b72',name:'channel-header',props:{channel:Object,track:Object,image:String,r4Url:Boolean},components:{Loading:ys,R4Logo:{render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('svg',{staticClass:'R4',attrs:{width:'150',height:'130',viewBox:'0 0 150 130',xmlns:'http://www.w3.org/2000/svg',"xmlns:xlink":'http://www.w3.org/1999/xlink',"xmlns:figma":'http://www.figma.com/figma/ns'}},[a('title',[e._v('Radio4000')]),a('g',{attrs:{"figma:type":'frame',fill:'#FFF'}},[a('use',{attrs:{"xlink:href":'#a',transform:'translate(62.367 18.91)',"figma:type":'vector-operation'}}),a('use',{attrs:{"xlink:href":'#b',"figma:type":'vector-operation'}})]),a('defs',[a('path',{attrs:{id:'a',"fill-rule":'evenodd',d:'M54.51 89.487H0v-19.92L42.15 0h32.486v69.724H87.63v19.763H74.636v21.187H54.51V89.487zm5.866-53.654l-28.71 40h28.99v-40h-.28z'}}),a('path',{attrs:{id:'b',"fill-rule":'evenodd',d:'M7.818 91.806H0V0h40.76c23.284 0 37.878 8.13 37.878 26.624 0 16-12.626 24.132-29.516 26.1l25.91 39.082h-12.3L37.645 54.38H7.818v37.426zM7.59 25.248v21.05h27.14c12.387 0 23.66-2.438 23.66-10.49 0-8.05-10.3-10.56-23.938-10.56H7.592z'}})])])},staticRenderFns:[],_scopeId:'data-v-992d0cf4',name:'r4-logo'}},computed:{linkHref:function(){var e=this.r4Url?'/':'https://radio4000.com/',t=this.channel.slug;return t===void 0?e:e+t},linkTarget:function(){return this.r4Url?'_self':'_blank'},channelDescription:function(){var e=this.channel,t=e.title,a=t===void 0?'':t,n=e.slug,o=n===void 0?'':n,r=e.body,s=r===void 0?'':r;return'[ '+a+', @'+o+' ] '+s}}};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .TrackItem[data-v-1ba13855] { display: block; width: 100%; padding: 0.4em 0.6em; cursor: pointer; color: initial; text-decoration: none; } .TrackItem-title[data-v-1ba13855], .TrackItem-body[data-v-1ba13855] { margin: 0; padding-left: 0.3em; padding-right: 0.3em; word-break: break-all; } .TrackItem-title[data-v-1ba13855] { display: inline-block; /* for .active styles */ font-size: 0.8125em; /* 13/16 */ line-height: 1.4; } .TrackItem-body[data-v-1ba13855] { font-size: 0.75em; /* 12/16 */ color: #737373; } .TrackItem[data-v-1ba13855]:hover, .TrackItem.active[data-v-1ba13855] { background-color: hsla(0, 0%, 100%, 0.2); } .TrackItem.active .TrackItem-title[data-v-1ba13855] { background-color: #5e1ae6; color: white; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var fs={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('a',{staticClass:'TrackItem',attrs:{href:e.href},on:{click:e.select}},[a('p',{staticClass:'TrackItem-title'},[e._v(e._s(e.track.title))]),e.track.body?a('p',{staticClass:'TrackItem-body'},[e._v(e._s(e.track.body))]):e._e()])},staticRenderFns:[],_scopeId:'data-v-1ba13855',name:'track-item',props:{track:Object,channelSlug:String},computed:{href:function(){return'https://radio4000.com/'+this.channelSlug+'/'+this.track.id}},methods:{select:function(e){e.preventDefault(),this.$emit('select',this.track)}}};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .TrackList-list[data-v-25a6b060] { position: absolute; width: 100%; height: 100%; overflow-y: auto; margin: 0; padding: 0; list-style: none; counter-reset: tracks; transform: translateZ(0); } .TrackList-item[data-v-25a6b060] { position: relative; border-bottom: 1px solid #e0e0e0; } .TrackList-item[data-v-25a6b060]:last-child { border-bottom: 0; } .TrackList-item[data-v-25a6b060]::after { content: counter(tracks) ""; counter-increment: tracks; color: #737373; font-size: 0.5em; position: absolute; top: 0.5em; right: 0.5em; } .TrackList-query[data-v-25a6b060] { background-color: hsla(0, 0%, 50%, 0.2); padding: 0.5em; font-size: 0.75em; /*color: #737373;*/ text-align: center; } .TrackList-controls[data-v-25a6b060] { position: absolute; bottom: 0.5em; right: 1.3em; z-index: 1; opacity: 0.6; } .TrackList-controls[data-v-25a6b060]:hover { opacity: 1; } .Btn--locateTrack[data-v-25a6b060] { padding: 0.5em; margin: 0; line-height: 1; border: 1px solid #999; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var vs={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('div',{staticClass:'TrackList'},[e.tracks&&e.tracks.length?e._e():a('Loading'),a('ol',{staticClass:'TrackList-list'},[e.query?a('li',{staticClass:'TrackList-query'},[e._v('Playing selection '),a('em',[e._v('"'+e._s(e.query)+'"')])]):e._e(),e._l(e.tracks,function(t,n){return a('li',{key:t.id,staticClass:'TrackList-item'},[a('track-item',{class:{active:e.currentTrackIndex===n},attrs:{track:t,channelSlug:e.channelSlug},on:{select:e.select}})],1)})],2),e.tracks&&e.tracks.length?a('div',{staticClass:'TrackList-controls'},[a('button',{staticClass:'Btn Btn--locateTrack',attrs:{title:'Locate current track'},on:{click:e.locateCurrentTrack}},[e._v('\u25CE')])]):e._e()],1)},staticRenderFns:[],_scopeId:'data-v-25a6b060',name:'track-list',props:{tracks:Array,track:Object,channelSlug:String,currentTrackIndex:Number,query:String},components:{Loading:ys,TrackItem:fs},watch:{tracks:function(){this.$nextTick(this.locateCurrentTrack)}},methods:{select:function(e){this.$emit('select',e)},locateCurrentTrack:function(){if(!isNaN(this.currentTrackIndex)){var e=this.$el.querySelector('.TrackList-list'),t=this.$el.querySelectorAll('li'),a=t[this.currentTrackIndex];a&&(e.scrollTop=a.offsetTop-4)}}}};Zr.gajus=Zr.gajus||{},Zr.gajus.Sister=mn;var _s=function(e,t,a){var n=document.head||document.getElementsByTagName('head')[0],o=document.createElement('script');'function'==typeof t&&(a=t,t={}),t=t||{},a=a||function(){},o.type=t.type||'text/javascript',o.charset=t.charset||'utf8',o.async=!('async'in t)||!!t.async,o.src=e,t.attrs&&hn(o,t.attrs),t.text&&(o.text=''+t.text);var r='onload'in o?yn:gn;r(o,a),o.onload||yn(o,a),n.appendChild(o)},bs=ln(function(e,t){Object.defineProperty(t,'__esModule',{value:!0});var a=function(e){return e&&e.__esModule?e:{default:e}}(_s);t.default=function(){var e=new Promise(function(e){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function)return void e(window.YT);var t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){t&&t(),e(window.YT)}}),t='http:'===window.location.protocol?'http:':'https:';return a.default(t+'//www.youtube.com/iframe_api'),e},e.exports=t['default']});sn(bs);var ks=fn,Cs=vn;'function'==typeof Dn.setTimeout&&(ks=setTimeout),'function'==typeof Dn.clearTimeout&&(Cs=clearTimeout);var Ts,xs=[],Es=!1,ws=-1;Tn.prototype.run=function(){this.fun.apply(null,this.array)};var Ls=Dn.performance||{},Ps=Ls.now||Ls.mozNow||Ls.msNow||Ls.oNow||Ls.webkitNow||function(){return new Date().getTime()},$s=new Date,As={nextTick:function(e){var t=Array(arguments.length-1);if(1n&&(a--,n+=1e9)),[a,n]},platform:'browser',release:{},config:{},uptime:function(){var e=new Date;return(e-$s)/1e3}},Ms=1e3,s=60*Ms,m=60*s,h=24*m,d=365.25*h,y=function(e,t){t=t||{};var a=typeof e;if('string'==a&&0this.volume}}},rl=function(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t *[data-v-7005eacf], .Layout-footer > *[data-v-7005eacf] { flex: 1; } .Layout-section[data-v-7005eacf] { flex: 1; display: flex; flex-direction: row; flex-wrap: wrap; min-height: 0; /* allow scrolling in FF */ overflow: hidden; } .Layout-section>*[data-v-7005eacf] { flex-grow: 1; } .Layout-aside[data-v-7005eacf] { min-height: 200px; /* youtube requirements */ display: flex; /* allow child to expand */ } .Layout-main[data-v-7005eacf] { flex-basis: 20em; min-height: 200px; /* this is where it breaks into two columns */ max-width: 30rem; position: relative; } /* Box sizing for all elements of the web component in non scoped style */ radio4000-player { box-sizing: border-box; } radio4000-player *, radio4000-player *:before, radio4000-player *:after { box-sizing: inherit; } radio4000-player { display: flex; width: 100%; /* youtube requirements */ min-width: 200px; /* min and max heights need to be on root elemenet aka */ /* header+aside+footer height */ min-height: calc(3.5em + 200px + 2.75em); /* don\'t expand the viewport */ max-height: 100vh; /* default height */ height: 500px; height: calc(3.5em + 400px + 2.75em); background-color: hsl(260, 10%, 92%); color: hsl(0, 0%, 10%); font-size: 16px; } radio4000-player, radio4000-player .Btn { font-family: \'Maison Neue\', \'maisonneue\', \'system-ui\', sans-serif; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var sl={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('div',{staticClass:'Layout'},[a('div',{staticClass:'Layout-header'},[a('channel-header',{attrs:{channel:e.channel,image:e.image,r4Url:e.r4Url,track:e.currentTrack},slot:'header'})],1),a('div',{staticClass:'Layout-section'},[a('div',{staticClass:'Layout-aside'},[a('provider-player',{attrs:{autoplay:e.autoplay,isMuted:e.isMuted,isPlaying:e.isPlaying,track:e.currentTrack,volume:e.volume},on:{play:e.play,pause:e.pause,trackEnded:e.trackEnded}})],1),a('div',{staticClass:'Layout-main'},[a('track-list',{attrs:{currentTrackIndex:e.currentTrackIndex,channelSlug:e.channel.slug,track:e.currentTrack,tracks:e.tracksPool,query:e.query},on:{select:e.playTrack}})],1)]),a('div',{staticClass:'Layout-footer'},[a('player-controls',{attrs:{isDisabled:!this.tracksPool.length,isMuted:e.isMuted,isPlaying:e.isPlaying,isShuffle:e.isShuffle,volume:e.volume},on:{play:e.play,pause:e.pause,toggleMute:e.toggleMute,toggleShuffle:e.toggleShuffle,next:e.playNextTrack}})],1)])},staticRenderFns:[],_scopeId:'data-v-7005eacf',name:'radio4000-player',components:{ChannelHeader:gs,TrackList:vs,ProviderPlayer:al,PlayerControls:ol},props:{channel:Object,image:String,tracks:Array,originTrack:Object,autoplay:Boolean,r4Url:Boolean,shuffle:Boolean,volume:Number,query:String},data:function(){return{currentTrack:{},isPlaying:!1,isShuffle:this.$props.shuffle,loop:!1,playerReady:!1,tracksPool:[]}},created:function(){0!==Object.keys(this.originTrack).length&&this.playTrack(this.originTrack)},computed:{isMuted:{get:function(){return 0===this.volume},set:function(e){e?this.$root.$emit('setVolume',0):this.$root.$emit('setVolume',100)}},currentTrackIndex:function(){var e=this;return this.tracksPool.findIndex(function(t){return t.id===e.currentTrack.id})}},watch:{shuffle:function(e){this.isShuffle=e},originTrack:function(e){this.playTrack(e)},tracks:function(){this.newTracksPool();var e=0===Object.keys(this.currentTrack).length;e&&this.playNextTrack()}},methods:{playTrack:function(e){var t=this.currentTrack;this.currentTrack=e,this.$emit('trackChanged',{track:e,previousTrack:t})},newTracksPool:function(){var e=this.tracks.slice().reverse();if(this.isShuffle){var t=e.splice(this.currentTrackIndex,1),a=$n(e);this.tracksPool=[].concat(rl(t),rl(a))}else this.tracksPool=e},playNextTrack:function(){var e=this.getNextTrack();e&&this.playTrack(e)},getNextTrack:function(){var e=this.tracksPool,t=this.currentTrackIndex;return e[t+1]},play:function(){this.isPlaying=!0},pause:function(){this.isPlaying=!1},toggleShuffle:function(){this.isShuffle=!this.isShuffle,this.newTracksPool()},toggleMute:function(){this.isMuted=!this.isMuted},trackEnded:function(){this.$emit('trackEnded',{track:this.currentTrack}),this.playNextTrack()}}},ll='function'==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise(function(a,n){function o(){var e,t=[],a=[],s={};return r.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm,function(n,o,r){t.push(o=o.toLowerCase()),a.push([o,r]),e=s[o],s[o]=e?e+','+r:r}),{ok:1==(0|r.status/200),status:r.status,statusText:r.statusText,url:r.responseURL,clone:o,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},headers:{keys:function(){return t},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}}var r=new XMLHttpRequest;for(var s in r.open(t.method||'get',e),t.headers)r.setRequestHeader(s,t.headers[s]);r.withCredentials='include'==t.credentials,r.onload=function(){a(o())},r.onerror=n,r.send(t.body)})},il=function(){if(window&&window.r4&&window.r4.databaseURL)return window.r4.databaseURL;return'https://radio4000.firebaseio.com'}(),dl=function(e){return e.json().then(function(e){if(!Object.keys(e).length)throw new Error('404');return e})},cl=function(e,t){return Object.assign(e,{id:t})},pl=function(e){return Object.keys(e).map(function(t){return Object.assign(e[t],{id:t})})},ul=function(e){return e[0]};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .Console[data-v-68a0dd38] { font-family: monospace; padding: 0 1em; line-height: 1.4; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var ml={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.canLoad?a('radio4000-player',{attrs:{channel:e.channel,tracks:e.tracks,originTrack:e.track,image:e.image,autoplay:e.autoplay,r4Url:e.r4Url,volume:e.localVolume,shuffle:e.shuffle,query:e.query},on:{trackChanged:e.onTrackChanged,trackEnded:e.onTrackEnded}}):a('div',{staticClass:'Console'},[a('p',[e._v('Radio4000-player is ready to start playing: '),a('a',{attrs:{href:'https://github.com/internet4000/radio4000-player-vue'}},[e._v('documentation')])])])},staticRenderFns:[],_scopeId:'data-v-68a0dd38',name:'player-data',components:{Radio4000Player:sl},props:{autoplay:Boolean,channelSlug:String,channelId:String,trackId:String,r4Url:{type:Boolean,default:!1},volume:{type:Number,default:100},shuffle:Boolean,query:String},data:function(){return{channel:{},image:'',tracks:[],track:{}}},created:function(){var e=this;this.$root.$on('setVolume',hs(function(t){e.localVolume=t},100));var t=this.channelSlug,a=this.channelId,n=this.trackId;return n?this.loadChannelByTrack(n):t?this.loadChannelBySlug(t):a?this.loadChannelById(a):void 0},watch:{channelSlug:function(e){this.loadChannelBySlug(e)},channelId:function(e){this.loadChannelById(e)},trackId:function(e){this.loadChannelByTrack(e)}},computed:{localVolume:{get:function(){return this.volume},set:function(e){this.$root.$el.parentNode.volume=e}},canLoad:function(){return this.channel||this.channelSlug||this.channelId||this.trackId}},methods:{loadChannelBySlug:function(e){return An(e).then(this.updateChannel).catch(function(e){console.log(e)})},loadChannelById:function(e){return Mn(e).then(this.updateChannel).catch(function(e){console.log(e)})},loadChannelByTrack:function(e){var t=this;return Sn(e).then(function(e){return t.track=e,t.channel.id===e.channel?void 0:t.loadChannelById(e.channel)})},loadChannelTracks:function(e){In(e.id).then(this.updateTracks).catch(function(e){console.log(e)})},loadChannelImage:function(e){On(e).then(this.updateImage).catch(function(){})},updateChannel:function(e){this.tracks=[],this.image='',e.image?this.updateImage(e.image):this.loadChannelImage(e),e.tracks.length?this.updateTracks(e.tracks):this.loadChannelTracks(e),this.channel=e},updateTracks:function(e){return this.tracks=e},updateImage:function(e){return this.image=e?e:''},updatePlaylist:function(e){this.updateChannel(e)},onTrackChanged:function(){for(var e=arguments.length,t=Array(e),a=0;ajo&&Vo[a].id>e.id;)a--;Vo.splice(a+1,0,e)}Fo||(Fo=!0,ko(Ie))}}function De(e){Ko.clear(),Ve(e,Ko)}function Ve(e,t){var a,n,o=Array.isArray(e);if((o||r(e))&&Object.isExtensible(e)){if(e.__ob__){var s=e.__ob__.dep.id;if(t.has(s))return;t.add(s)}if(o)for(a=e.length;a--;)Ve(e[a],t);else for(n=Object.keys(e),a=n.length;a--;)Ve(e[n[a]],t)}}function Re(e,t,a){Wo.get=function(){return this[t][a]},Wo.set=function(e){this[t][a]=e},Object.defineProperty(e,a,Wo)}function Be(e){e._watchers=[];var t=e.$options;t.props&&Fe(e,t.props),t.methods&&We(e,t.methods),t.data?Ue(e):D(e._data={},!0),t.computed&&ze(e,t.computed),t.watch&&t.watch!==mo&&Ye(e,t.watch)}function Fe(e,t){var a=e.$options.propsData||{},n=e._props={},o=e.$options._propKeys=[],r=!e.$parent;Po.shouldConvert=r;var s=function(r){o.push(r);var s=X(r,t,a,e);V(n,r,s),r in e||Re(e,'_props',r)};for(var l in t)s(l);Po.shouldConvert=!0}function Ue(e){var t=e.$options.data;t=e._data='function'==typeof t?je(t,e):t||{},l(t)||(t={});for(var a=Object.keys(t),n=e.$options.props,o=e.$options.methods,r=a.length;r--;){var s=a[r];n&&v(n,s)||!P(s)&&Re(e,'_data',s)}D(t,!0)}function je(e,t){try{return e.call(t)}catch(a){return M(a,t,'data()'),{}}}function ze(e,t){var a=e._computedWatchers=Object.create(null);for(var n in t){var o=t[n],r='function'==typeof o?o:o.get;a[n]=new qo(e,r||x,x,Yo),n in e||qe(e,n,o)}}function qe(e,t,a){'function'==typeof a?(Wo.get=Ke(t),Wo.set=x):(Wo.get=a.get?!1===a.cache?a.get:Ke(t):x,Wo.set=a.set?a.set:x),Object.defineProperty(e,t,Wo)}function Ke(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),To.target&&t.depend(),t.value}}function We(e,t){e.$options.props;for(var a in t)e[a]=null==t[a]?x:b(t[a],e)}function Ye(e,t){for(var a in t){var n=t[a];if(Array.isArray(n))for(var o=0;oa.indexOf(e[o]))&&n.push(e[o]);return n}return e}function xt(e){this._init(e)}function Et(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1r[a].indexOf(o)&&r[a].push(o):r[a]=[o]:r[a]=o}}function zt(o,a){return o.key===a.key&&(o.tag===a.tag&&o.isComment===a.isComment&&t(o.data)===t(a.data)&&qt(o,a)||n(o.isAsyncPlaceholder)&&o.asyncFactory===a.asyncFactory&&e(a.asyncFactory.error))}function qt(e,a){if('input'!==e.tag)return!0;var n,o=t(n=e.data)&&t(n=n.attrs)&&n.type,r=t(n=a.data)&&t(n=n.attrs)&&n.type;return o===r}function Kt(e,a,n){var o,r,s={};for(o=a;o<=n;++o)r=e[o].key,t(r)&&(s[r]=o);return s}function Wt(e,t){(e.data.directives||t.data.directives)&&Yt(e,t)}function Yt(e,t){var a,n,o,r=e===vr,s=Gt(e.data.directives,e.context),l=Gt(t.data.directives,t.context),d=[],c=[];for(a in l)n=s[a],o=l[a],n?(o.oldValue=n.value,Xt(o,'update',t,e),o.def&&o.def.componentUpdated&&c.push(o)):(Xt(o,'bind',t,e),o.def&&o.def.inserted&&d.push(o));if(d.length){var i=function(){for(var a=0;aa.indexOf(' '+t+' ')&&e.setAttribute('class',(a+t).trim())}}function ha(e,t){if(t&&(t=t.trim()))if(e.classList)-1a.indexOf(t)&&(a.push(t),ma(e,t))}function va(e,t){e._transitionClasses&&f(e._transitionClasses,t),ha(e,t)}function _a(t,e,a){var n=ba(t,e),o=n.type,r=n.timeout,s=n.propCount;if(!o)return a();var l=o===Mr?Or:Hr,i=0,d=function(){t.removeEventListener(l,c),a()},c=function(a){a.target===t&&++i>=s&&d()};setTimeout(function(){id?Mr:Ir:null,p=a?a===Mr?r.length:i.length:0);var u=a===Mr&&Vr.test(n[Sr+'Property']);return{type:a,timeout:c,propCount:p,hasTransform:u}}function ka(e,t){for(;e.length':('
'+e.innerHTML+'
').replace(/vue-slot=/g,'slot=');if(o.shadow&&e.shadowRoot?(e.shadowRoot.innerHTML=m,c.el=e.shadowRoot.children[0]):(e.innerHTML=m,c.el=e.children[0]),Ja(e,n),e.__vue_custom_element__=new t(c),o.shadow&&o.shadowCss&&e.shadowRoot){var h=document.createElement('style');h.type='text/css',h.appendChild(document.createTextNode(o.shadowCss)),e.shadowRoot.appendChild(h)}e.removeAttribute('vce-cloak'),e.setAttribute('vce-ready',''),on(e,'vce-ready')}}function sn(e){e.customElement=function(t,a){var n=2=h?t(e/h)+'d':e>=m?t(e/m)+'h':e>=s?t(e/s)+'m':e>=Is?t(e/Is)+'s':e+'ms'}function Pn(e){return $n(e,h,'day')||$n(e,m,'hour')||$n(e,s,'minute')||$n(e,Is,'second')||e+' ms'}function $n(e,t,a){return eh?(p=e(o[f+1])?null:o[f+1].elm,_(a,p,o,m,f,r)):m>f&&k(a,n,u,h)}function x(a,o,r,s){if(a!==o){var l=o.elm=a.elm;if(n(a.isAsyncPlaceholder))return void(t(o.asyncFactory.resolved)?w(a.elm,o,r):o.isAsyncPlaceholder=!0);if(n(o.isStatic)&&n(a.isStatic)&&o.key===a.key&&(n(o.isCloned)||n(o.isOnce)))return void(o.componentInstance=a.componentInstance);var d,i=o.data;t(i)&&t(d=i.hook)&&t(d=d.prepatch)&&d(a,o);var c=a.children,p=o.children;if(t(i)&&y(o)){for(d=0;dA.call(Re,o)&&Re.push(o)),s&&(t=o[e+a]||o[n+a])&&t.call(o))}function he(){}function ye(n,y,e){var r=e&&e[l]||'',i=y.prototype,o=Z(i),g=y.observedAttributes||O,a={prototype:o};De(o,h,{value:function(){if(K)K=!1;else if(!this[B]){this[B]=!0,new y(this),i[h]&&i[h].call(this);var t=W[Y.get(y)];(!U||1>0),Ie='addEventListener',u='attached',a='Callback',Se='detached',l='extends',c='attributeChanged'+a,s=u+a,p='connected'+a,d='disconnected'+a,h='created'+a,m=Se+a,g='ADDITION',o='MODIFICATION',y='REMOVAL',f='DOMAttrModified',v='DOMContentLoaded',i='DOMSubtreeModified',b='<',T='=',x=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,C=['ANNOTATION-XML','COLOR-PROFILE','FONT-FACE','FONT-FACE-SRC','FONT-FACE-URI','FONT-FACE-FORMAT','FONT-FACE-NAME','MISSING-GLYPH'],k=[],E=[],w='',L=ke.documentElement,A=k.indexOf||function(a){for(var e=this.length;e--&&this[e]!==a;);return e},_=Ce.prototype,M=_.hasOwnProperty,P=_.isPrototypeOf,S=Ce.defineProperty,O=[],N=Ce.getOwnPropertyDescriptor,H=Ce.getOwnPropertyNames,I=Ce.getPrototypeOf,D=Ce.setPrototypeOf,R=!!Ce.__proto__,B='__dreCEv1',F=z.customElements,U=!/^force/.test(e.type)&&!!(F&&F.define&&F.get&&F.whenDefined),j=Ce.create||Ce,$=z.Map||function(){var a,o=[],t=[];return{get:function(a){return t[A.call(o,a)]},set:function(n,e){a=A.call(o,n),0>a?t[o.push(n)-1]=e:t[a]=e}}},q=z.Promise||function(a){function o(a){for(t=!0;s.length;)s.shift()(a)}var s=[],t=!1,n={catch:function(){return n},then:function(a){return s.push(a),t&&setTimeout(o,1),n}};return a(o),n},K=!1,W=j(null),G=j(null),Y=new $,Q=function(t){return t.toLowerCase()},Z=Ce.create||function t(a){return a?(t.prototype=a,new t):this},J=D||(R?function(a,e){return a.__proto__=e,a}:H&&N?function(){function a(a,o){for(var t,n=H(o),r=0,l=n.length;r=t||0>a||v&&n>=u}function l(){var e=hs();return s(e)?i(e):void(h=setTimeout(l,r(e)))}function i(e){return(h=void 0,_&&c)?n(e):(c=p=void 0,m)}function d(){var e=hs(),a=s(e);if(c=arguments,p=this,y=e,a){if(void 0===h)return o(y);if(v)return h=setTimeout(l,t),n(y)}return void 0===h&&(h=setTimeout(l,t)),m}var c,p,u,m,h,y,g=0,f=!1,v=!1,_=!0;if('function'!=typeof e)throw new TypeError('Expected a function');return t=mn(t)||0,cn(a)&&(f=!!a.leading,v='maxWait'in a,u=v?Hn(mn(a.maxWait)||0,t):u,_='trailing'in a?!!a.trailing:_),d.cancel=function(){void 0!==h&&clearTimeout(h),g=0,c=y=p=h=void 0},d.flush=function(){return void 0===h?m:i(hs())},d};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .Loading[data-v-b13e295a] { font-size: 0.9em; position: relative; } .Loading span[data-v-b13e295a]::before { display: block; content: \'\'; position: absolute; top: 0; left: 0; width: 10em; height: 2px; background: linear-gradient( to right, #a7a7a7, rgba(255, 255, 255, 0)); animation-name: Loading; animation-duration: 4s; animation-direction: alternate; animation-timing-function: ease; animation-iteration-count: infinite; } .Header-image .Loading[data-v-b13e295a] { position: absolute; top: 0; right: 0; left: 0; bottom: 0; } @keyframes Loading { 0%[data-v-b13e295a] { width: 10%; } 100%[data-v-b13e295a] { width: 100%; } } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var gs={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('div',{staticClass:'Loading',class:{"Loading--hasNoMessage":!e.message}},[e.message?a('span',[e._v(e._s(e.message))]):a('span')])},staticRenderFns:[],_scopeId:'data-v-b13e295a',props:{message:String}};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .R4[data-v-992d0cf4] { width: 1.2em; height: 1.2em; /*fill: white;*/ fill: black; } .R4 *[data-v-992d0cf4] { fill: inherit; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .Header[data-v-d9ee9b72] { position: relative; display: flex; flex-wrap: nowrap; align-items: center; background-color: hsl(0, 0%, 96%); border-bottom: 1px solid hsl(0, 0%, 70%); } .Header-media[data-v-d9ee9b72] { position: relative; width: 1em; height: 1em; font-size: 3.5em; } .Header-media img[data-v-d9ee9b72] { display: inline-block; vertical-align: top; width: 100%; } .Header-body[data-v-d9ee9b72] { flex: 1; line-height: 1.4; } .Header-channel[data-v-d9ee9b72] { margin-left: 0.3em; margin-bottom: 0; margin-top: 0; } .Header-track[data-v-d9ee9b72] { font-size: 0.9375em; /* 15/16 */ margin: 0; } marquee[data-v-d9ee9b72] { display: block; min-height: 1em; /* avoid jumps */ } .Header-logo[data-v-d9ee9b72] { position: absolute; top: 0.2em; right: 0.2em; opacity: 0.1; transition: opacity 100ms; } .Header-logo[data-v-d9ee9b72]:hover { opacity: 1; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var fs={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('header',{staticClass:'Header'},[a('a',{staticClass:'Header-logo',attrs:{href:e.linkHref,target:e.linkTarget,title:'Open this radio on Radio4000.com'}},[a('R4Logo')],1),a('a',{staticClass:'Header-media',attrs:{href:e.linkHref,target:e.linkTarget,title:'Open this radio on Radio4000.com'}},[e.image?a('img',{attrs:{src:e.image,alt:''}}):a('loading')],1),e.channel.title?a('div',{staticClass:'Header-body'},[a('p',{staticClass:'Header-channel',attrs:{title:e.channelDescription}},[a('strong',[e._v(e._s(e.channel.title))])]),a('marquee',{staticClass:'Header-track',attrs:{title:[e.track.body?e.track.body:'']}},[e._v(e._s(e.track.title))])],1):a('loading')],1)},staticRenderFns:[],_scopeId:'data-v-d9ee9b72',name:'channel-header',props:{channel:Object,track:Object,image:String,r4Url:Boolean},components:{Loading:gs,R4Logo:{render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('svg',{staticClass:'R4',attrs:{width:'150',height:'130',viewBox:'0 0 150 130',xmlns:'http://www.w3.org/2000/svg',"xmlns:xlink":'http://www.w3.org/1999/xlink',"xmlns:figma":'http://www.figma.com/figma/ns'}},[a('title',[e._v('Radio4000')]),a('g',{attrs:{"figma:type":'frame',fill:'#FFF'}},[a('use',{attrs:{"xlink:href":'#a',transform:'translate(62.367 18.91)',"figma:type":'vector-operation'}}),a('use',{attrs:{"xlink:href":'#b',"figma:type":'vector-operation'}})]),a('defs',[a('path',{attrs:{id:'a',"fill-rule":'evenodd',d:'M54.51 89.487H0v-19.92L42.15 0h32.486v69.724H87.63v19.763H74.636v21.187H54.51V89.487zm5.866-53.654l-28.71 40h28.99v-40h-.28z'}}),a('path',{attrs:{id:'b',"fill-rule":'evenodd',d:'M7.818 91.806H0V0h40.76c23.284 0 37.878 8.13 37.878 26.624 0 16-12.626 24.132-29.516 26.1l25.91 39.082h-12.3L37.645 54.38H7.818v37.426zM7.59 25.248v21.05h27.14c12.387 0 23.66-2.438 23.66-10.49 0-8.05-10.3-10.56-23.938-10.56H7.592z'}})])])},staticRenderFns:[],_scopeId:'data-v-992d0cf4',name:'r4-logo'}},computed:{linkHref:function(){var e=this.r4Url?'/':'https://radio4000.com/',t=this.channel.slug;return t===void 0?e:e+t},linkTarget:function(){return this.r4Url?'_self':'_blank'},channelDescription:function(){var e=this.channel,t=e.title,a=t===void 0?'':t,n=e.slug,o=n===void 0?'':n,r=e.body,s=r===void 0?'':r;return'[ '+a+', @'+o+' ] '+s}}};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .TrackItem[data-v-1ba13855] { display: block; padding: 0.4em 0.6em; color: initial; text-decoration: none; } .TrackItem-title[data-v-1ba13855], .TrackItem-body[data-v-1ba13855] { margin: 0; padding-left: 0.3em; padding-right: 0.3em; word-break: break-all; } .TrackItem-title[data-v-1ba13855] { display: inline-block; /* for .active styles */ font-size: 0.8125em; /* 13/16 */ line-height: 1.4; } .TrackItem-body[data-v-1ba13855] { font-size: 0.75em; /* 12/16 */ color: #737373; } .TrackItem[data-v-1ba13855]:hover, .TrackItem.active[data-v-1ba13855] { background-color: hsla(0, 0%, 100%, 0.2); } .TrackItem.active .TrackItem-title[data-v-1ba13855] { background-color: #5e1ae6; color: white; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var vs={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('a',{staticClass:'TrackItem',attrs:{href:e.href},on:{click:function(t){t.preventDefault(),e.$emit('select')}}},[a('p',{staticClass:'TrackItem-title'},[e._v(e._s(e.track.title))]),e.track.body?a('p',{staticClass:'TrackItem-body'},[e._v(e._s(e.track.body))]):e._e()])},staticRenderFns:[],_scopeId:'data-v-1ba13855',name:'track-item',props:{track:Object,channelSlug:String},computed:{href:function(){return'https://radio4000.com/'+this.channelSlug+'/'+this.track.id}}};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .TrackList-list[data-v-25a6b060] { position: absolute; width: 100%; height: 100%; overflow-y: auto; margin: 0; padding: 0; list-style: none; counter-reset: tracks; transform: translateZ(0); } .TrackList-item[data-v-25a6b060] { position: relative; border-bottom: 1px solid #e0e0e0; } .TrackList-item[data-v-25a6b060]:last-child { border-bottom: 0; } .TrackList-item[data-v-25a6b060]::after { content: counter(tracks) ""; counter-increment: tracks; color: #737373; font-size: 0.5em; position: absolute; top: 0.5em; right: 0.5em; } .TrackList-query[data-v-25a6b060] { background-color: hsla(0, 0%, 50%, 0.2); padding: 0.5em; font-size: 0.75em; text-align: center; } .TrackList-controls[data-v-25a6b060] { position: absolute; bottom: 0.5em; right: 1.3em; z-index: 1; opacity: 0.6; } .TrackList-controls[data-v-25a6b060]:hover { opacity: 1; } .Btn--locateTrack[data-v-25a6b060] { padding: 0.5em; margin: 0; line-height: 1; border: 1px solid #999; border-radius: 3px; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var _s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('div',{staticClass:'TrackList'},[e.hasTracks?e._e():a('Loading'),a('ol',{staticClass:'TrackList-list'},[e.query?a('li',{staticClass:'TrackList-query'},[e._v('Playing selection '),a('em',[e._v('"'+e._s(e.query)+'"')])]):e._e(),e._l(e.tracks,function(t,n){return a('li',{key:t.id,staticClass:'TrackList-item'},[a('track-item',{class:{active:e.currentTrackIndex===n},attrs:{track:t,channelSlug:e.channelSlug},on:{select:function(){e.$emit('select',t)}}})],1)})],2),e.hasTracks?a('div',{staticClass:'TrackList-controls'},[a('button',{staticClass:'Btn Btn--locateTrack',attrs:{title:'Locate current track'},on:{click:e.locateCurrentTrack}},[e._v('\u25CE')])]):e._e()],1)},staticRenderFns:[],_scopeId:'data-v-25a6b060',name:'track-list',props:{tracks:Array,track:Object,channelSlug:String,currentTrackIndex:Number,query:String},components:{Loading:gs,TrackItem:vs},computed:{hasTracks:function(){return this.tracks&&0n&&(a--,n+=1e9)),[a,n]},platform:'browser',release:{},config:{},uptime:function(){var e=new Date;return(e-As)/1e3}},Is=1e3,s=60*Is,m=60*s,h=24*m,d=365.25*h,y=function(e,t){t=t||{};var a=typeof e;if('string'==a&&0this.volume}}},sl=function(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t *[data-v-7005eacf], .Layout-footer > *[data-v-7005eacf] { flex: 1; } .Layout-section[data-v-7005eacf] { flex: 1; display: flex; flex-direction: row; flex-wrap: wrap; min-height: 0; /* allow scrolling in FF */ overflow: hidden; } .Layout-section>*[data-v-7005eacf] { flex-grow: 1; } .Layout-aside[data-v-7005eacf] { min-height: 200px; /* youtube requirements */ display: flex; /* allow child to expand */ } .Layout-main[data-v-7005eacf] { flex-basis: 20em; min-height: 200px; /* this is where it breaks into two columns */ max-width: 30rem; position: relative; } /* Box sizing for all elements of the web component in non scoped style */ radio4000-player { box-sizing: border-box; } radio4000-player *, radio4000-player *:before, radio4000-player *:after { box-sizing: inherit; } radio4000-player { display: flex; width: 100%; /* youtube requirements */ min-width: 200px; /* min and max heights need to be on root elemenet aka */ /* header+aside+footer height */ min-height: calc(3.5em + 200px + 2.75em); /* don\'t expand the viewport */ max-height: 100vh; /* default height */ height: 500px; height: calc(3.5em + 400px + 2.75em); background-color: hsl(260, 10%, 92%); color: hsl(0, 0%, 10%); font-size: 16px; } radio4000-player, radio4000-player .Btn { font-family: \'Maison Neue\', \'maisonneue\', \'system-ui\', sans-serif; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var ll={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a('div',{staticClass:'Layout'},[a('div',{staticClass:'Layout-header'},[a('channel-header',{attrs:{channel:e.channel,image:e.image,r4Url:e.r4Url,track:e.currentTrack}})],1),a('div',{staticClass:'Layout-section'},[a('div',{staticClass:'Layout-aside'},[a('provider-player',{attrs:{autoplay:e.autoplay,isMuted:e.isMuted,isPlaying:e.isPlaying,track:e.currentTrack,volume:e.volume},on:{play:e.play,pause:e.pause,trackEnded:e.trackEnded}})],1),a('div',{staticClass:'Layout-main'},[a('track-list',{attrs:{currentTrackIndex:e.currentTrackIndex,channelSlug:e.channel.slug,track:e.currentTrack,tracks:e.tracksPool,query:e.query},on:{select:e.playTrack}})],1)]),a('div',{staticClass:'Layout-footer'},[a('player-controls',{attrs:{isDisabled:!this.tracksPool.length,isMuted:e.isMuted,isPlaying:e.isPlaying,isShuffle:e.isShuffle,volume:e.volume},on:{play:e.play,pause:e.pause,toggleMute:e.toggleMute,toggleShuffle:e.toggleShuffle,next:e.playNextTrack}})],1)])},staticRenderFns:[],_scopeId:'data-v-7005eacf',name:'radio4000-player',components:{ChannelHeader:fs,TrackList:_s,ProviderPlayer:nl,PlayerControls:rl},props:{channel:Object,image:String,tracks:Array,originTrack:Object,autoplay:Boolean,r4Url:Boolean,shuffle:Boolean,volume:Number,query:String},data:function(){return{currentTrack:{},isPlaying:!1,isShuffle:this.$props.shuffle,loop:!1,playerReady:!1,tracksPool:[]}},created:function(){0!==Object.keys(this.originTrack).length&&this.playTrack(this.originTrack)},computed:{isMuted:{get:function(){return 0===this.volume},set:function(e){e?this.$root.$emit('setVolume',0):this.$root.$emit('setVolume',100)}},currentTrackIndex:function(){var e=this;return this.tracksPool.findIndex(function(t){return t.id===e.currentTrack.id})}},watch:{shuffle:function(e){this.isShuffle=e},originTrack:function(e){this.playTrack(e)},tracks:function(){this.newTracksPool();var e=0===Object.keys(this.currentTrack).length;e&&this.playNextTrack()}},methods:{playTrack:function(e){var t=this.currentTrack;this.currentTrack=e,this.$emit('trackChanged',{track:e,previousTrack:t})},newTracksPool:function(){var e=this.tracks.slice().reverse();if(this.isShuffle){var t=e.splice(this.currentTrackIndex,1),a=An(e);this.tracksPool=[].concat(sl(t),sl(a))}else this.tracksPool=e},playNextTrack:function(){var e=this.getNextTrack();e&&this.playTrack(e)},getNextTrack:function(){var e=this.tracksPool,t=this.currentTrackIndex;return e[t+1]},play:function(){this.isPlaying=!0},pause:function(){this.isPlaying=!1},toggleShuffle:function(){this.isShuffle=!this.isShuffle,this.newTracksPool()},toggleMute:function(){this.isMuted=!this.isMuted},trackEnded:function(){this.$emit('trackEnded',{track:this.currentTrack}),this.playNextTrack()}}},il='function'==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise(function(a,n){function o(){var e,t=[],a=[],s={};return r.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm,function(n,o,r){t.push(o=o.toLowerCase()),a.push([o,r]),e=s[o],s[o]=e?e+','+r:r}),{ok:1==(0|r.status/200),status:r.status,statusText:r.statusText,url:r.responseURL,clone:o,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},headers:{keys:function(){return t},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}}var r=new XMLHttpRequest;for(var s in r.open(t.method||'get',e),t.headers)r.setRequestHeader(s,t.headers[s]);r.withCredentials='include'==t.credentials,r.onload=function(){a(o())},r.onerror=n,r.send(t.body)})},dl=function(){if(window&&window.r4&&window.r4.databaseURL)return window.r4.databaseURL;return'https://radio4000.firebaseio.com'}(),cl=function(e){return e.json().then(function(e){if(!Object.keys(e).length)throw new Error('404');return e})},pl=function(e,t){return Object.assign(e,{id:t})},ul=function(e){return Object.keys(e).map(function(t){return Object.assign(e[t],{id:t})})},ml=function(e){return e[0]};(function(){if(document){var e=document.head||document.getElementsByTagName('head')[0],t=document.createElement('style'),a=' .Console[data-v-68a0dd38] { font-family: monospace; padding: 0 1em; line-height: 1.4; } ';t.type='text/css',t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a)),e.appendChild(t)}})();var hl={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.canLoad?a('radio4000-player',{attrs:{channel:e.channel,tracks:e.tracks,originTrack:e.track,image:e.image,autoplay:e.autoplay,r4Url:e.r4Url,volume:e.localVolume,shuffle:e.shuffle,query:e.query},on:{trackChanged:e.onTrackChanged,trackEnded:e.onTrackEnded}}):a('div',{staticClass:'Console'},[a('p',[e._v('Radio4000-player is ready to start playing: '),a('a',{attrs:{href:'https://github.com/internet4000/radio4000-player-vue'}},[e._v('documentation')])])])},staticRenderFns:[],_scopeId:'data-v-68a0dd38',name:'player-data',components:{Radio4000Player:ll},props:{autoplay:Boolean,channelSlug:String,channelId:String,trackId:String,r4Url:{type:Boolean,default:!1},volume:{type:Number,default:100},shuffle:Boolean,query:String},data:function(){return{channel:{},image:'',tracks:[],track:{}}},created:function(){var e=this;this.$root.$on('setVolume',ys(function(t){e.localVolume=t},100));var t=this.channelSlug,a=this.channelId,n=this.trackId;return n?this.loadChannelByTrack(n):t?this.loadChannelBySlug(t):a?this.loadChannelById(a):void 0},watch:{channelSlug:function(e){this.loadChannelBySlug(e)},channelId:function(e){this.loadChannelById(e)},trackId:function(e){this.loadChannelByTrack(e)}},computed:{localVolume:{get:function(){return this.volume},set:function(e){var t=this.$root.$el.parentNode;t.setAttribute('volume',e)}},canLoad:function(){return this.channel||this.channelSlug||this.channelId||this.trackId}},methods:{loadChannelBySlug:function(e){return Mn(e).then(this.updateChannel).catch(function(e){console.log(e)})},loadChannelById:function(e){return In(e).then(this.updateChannel).catch(function(e){console.log(e)})},loadChannelByTrack:function(e){var t=this;return On(e).then(function(e){return t.track=e,t.channel.id===e.channel?void 0:t.loadChannelById(e.channel)})},loadChannelTracks:function(e){Sn(e.id).then(this.updateTracks).catch(function(e){console.log(e)})},loadChannelImage:function(e){Nn(e).then(this.updateImage).catch(function(){})},updateChannel:function(e){this.tracks=[],this.image='',e.image?this.updateImage(e.image):this.loadChannelImage(e),e.tracks.length?this.updateTracks(e.tracks):this.loadChannelTracks(e),this.channel=e},updateTracks:function(e){return this.tracks=e},updateImage:function(e){return this.image=e?e:''},updatePlaylist:function(e){this.updateChannel(e)},onTrackChanged:function(){for(var e=arguments.length,t=Array(e),a=0;a