Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

xns-audio-player-simple

Package Overview
Dependencies
2
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.0.2

4

dist/index.js
/*!
* xns-audio-player-simple v2.0.0
* xns-audio-player-simple v2.0.2
* (c) James Sinkala
* Released under the ISC License.
*/
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var RepeatIcon=_interopDefault(require("vue-ionicons/dist/ios-repeat")),SkipBackwardIcon=_interopDefault(require("vue-ionicons/dist/ios-skip-backward")),PlayIcon=_interopDefault(require("vue-ionicons/dist/ios-play")),PauseIcon=_interopDefault(require("vue-ionicons/dist/ios-pause")),SquareIcon=_interopDefault(require("vue-ionicons/dist/ios-square")),SkipForwardIcon=_interopDefault(require("vue-ionicons/dist/ios-skip-forward")),BufferingIcon=_interopDefault(require("vue-ionicons/dist/ios-more")),VolumeAddIconInactive=_interopDefault(require("vue-ionicons/dist/ios-add-circle-outline")),VolumeAddIcon=_interopDefault(require("vue-ionicons/dist/ios-add-circle")),VolumeReduceIconInactive=_interopDefault(require("vue-ionicons/dist/ios-remove-circle-outline")),VolumeReduceIcon=_interopDefault(require("vue-ionicons/dist/ios-remove-circle")),MusicalNoteIcon=_interopDefault(require("vue-ionicons/dist/ios-musical-note"));function styleInject(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}var css='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\n/**\n * Render the `main` element consistently in IE.\n */\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\n/**\n * Add the correct font size in all browsers.\n */\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\n\n[type="button"],\n[type="reset"],\n[type="submit"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\n\n[type="button"]::-moz-focus-inner,\n[type="reset"]::-moz-focus-inner,\n[type="submit"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\n\n[type="button"]:-moz-focusring,\n[type="reset"]:-moz-focusring,\n[type="submit"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type="checkbox"],\n[type="radio"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type="number"]::-webkit-inner-spin-button,\n[type="number"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type="search"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type="search"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user\'s configured `sans` font-family (with Tailwind\'s default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind\'s default "normal" line-height so the user isn\'t forced\n * to override it to ensure consistency even when using the default theme.\n */\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it\'s border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e2e8f0; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\n\n[role="button"] {\n cursor: pointer;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don\'t inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\n/**\n * Use the configured \'mono\' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * \'mono\' font family.\n */\n\n/**\n * Make replaced elements `display: block` by default as that\'s\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\naudio {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg {\n max-width: 100%;\n height: auto;\n}\n\n.tw-bg-transparent {\n background-color: transparent;\n}\n\n.tw-bg-center {\n background-position: center;\n}\n\n.tw-bg-no-repeat {\n background-repeat: no-repeat;\n}\n\n.tw-bg-cover {\n background-size: cover;\n}\n\n.tw-cursor-pointer {\n cursor: pointer;\n}\n\n.tw-flex {\n display: flex;\n}\n\n.tw-inline-flex {\n display: inline-flex;\n}\n\n.tw-flex-row {\n flex-direction: row;\n}\n\n.tw-flex-col {\n flex-direction: column;\n}\n\n.tw-flex-wrap {\n flex-wrap: wrap;\n}\n\n.tw-items-center {\n align-items: center;\n}\n\n.tw-justify-start {\n justify-content: flex-start;\n}\n\n.tw-justify-end {\n justify-content: flex-end;\n}\n\n.tw-justify-center {\n justify-content: center;\n}\n\n.tw-justify-between {\n justify-content: space-between;\n}\n\n.tw-flex-1 {\n flex: 1 1 0%;\n}\n\n.tw-flex-grow-0 {\n flex-grow: 0;\n}\n\n.tw-flex-grow {\n flex-grow: 1;\n}\n\n.tw-float-right {\n float: right;\n}\n\n.tw-float-left {\n float: left;\n}\n\n.tw-m-0 {\n margin: 0;\n}\n\n.tw-m-1 {\n margin: 0.25rem;\n}\n\n.tw-mx-1 {\n margin-left: 0.25rem;\n margin-right: 0.25rem;\n}\n\n.tw-mx-2 {\n margin-left: 0.5rem;\n margin-right: 0.5rem;\n}\n\n.tw-mt-0 {\n margin-top: 0;\n}\n\n.tw-mr-0 {\n margin-right: 0;\n}\n\n.tw-mb-0 {\n margin-bottom: 0;\n}\n\n.tw-ml-0 {\n margin-left: 0;\n}\n\n.tw-max-h-simplePlyrmaxheightsm {\n max-height: 80px;\n}\n\n.tw-py-0 {\n padding-top: 0;\n padding-bottom: 0;\n}\n\n.tw-px-0 {\n padding-left: 0;\n padding-right: 0;\n}\n\n.tw-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.tw-text-white {\n color: #fff;\n}\n\n.tw-text-primary-green {\n color: #21FB92;\n}\n\n.tw-align-middle {\n vertical-align: middle;\n}\n\n.tw-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.tw-w-12 {\n width: 3rem;\n}\n\n.tw-w-auto {\n width: auto;\n}\n\n.tw-w-full {\n width: 100%;\n}\n\n.tw-z-20 {\n z-index: 20;\n}';styleInject(css);var script={name:"XnsAudioPlayerSimple",components:{RepeatIcon:RepeatIcon,SkipBackwardIcon:SkipBackwardIcon,PlayIcon:PlayIcon,PauseIcon:PauseIcon,SquareIcon:SquareIcon,SkipForwardIcon:SkipForwardIcon,BufferingIcon:BufferingIcon,VolumeAddIcon:VolumeAddIcon,VolumeReduceIcon:VolumeReduceIcon,VolumeReduceIconInactive:VolumeReduceIconInactive,VolumeAddIconInactive:VolumeAddIconInactive,MusicalNoteIcon:MusicalNoteIcon},props:{playlist:{type:Array,default:function(){return[]}},playerWidth:{type:Number,default:320},repeatAll:{type:Boolean,default:!1},playerVolume:{type:Number,default:.5},stopPlayback:{type:Boolean,default:!1},pausePlayback:{type:Boolean,default:!1},showAudioDuration:{type:Boolean,default:!0},showAudioData:{type:Boolean,default:!0},progressBarColor:{type:String,default:"#008080"}},data:function(){return{localPlayerWidth:320,localProgressBarColor:"",songs:[],songsCount:0,playerIsPlaying:!1,playerIsPaused:!1,playerIsStopped:!1,isFirstTrack:!0,isMuted:!1,playerIsLoading:!1,continuousPlaybackStatus:!1,audio:new Audio,volume:.5,buffered:0,currentTrackId:0,currentTrackTime:0,currentTrackDuration:0,lastSongId:0,coverColors:["#009688","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#00bcd4","#4caf50","#ff9800","#607d8b","#795548","#008080"],coverColor:""}},watch:{immediate:!0,playerVolume:function(){this.updatePlayerVolume(this.playerVolume)},repeatAll:function(){this.updateContinuousPlaybackStatus(this.repeatAll)},playlist:function(){this.updateSongs(this.playlist)},stopPlayback:function(){this.stopPlayback&&this.stop()},pausePlayback:function(){this.pausePlayback&&this.pause()},playerWidth:function(){this.adjustPlayerDimensions(this.playerWidth)},progressBarColor:function(){this.validateProgressColor(this.progressBarColor)}},filters:{doubleDigits:function(e){if(isNaN(e))return"00";if(e<60)return e.toFixed()<10?"0 : 0"+e.toFixed():"0 : "+e.toFixed();var t=e.toFixed()%60==60?"00":(e%60).toFixed();return Math.floor(e.toFixed()/60).toFixed()+" : "+(t<10?"0"+t:t)}},mounted:function(){var e=this;this.songs=this.playlist,setTimeout(function(){e.coverColor=e.pickRandomColor(),e.lastSongId=e.songs.length-1,e.updatePlayerVolume(e.playerVolume),e.updateContinuousPlaybackStatus(e.repeatAll),e.adjustPlayerDimensions(e.playerWidth),e.updateSongs(e.playlist),e.validateProgressColor(e.progressBarColor)},300),this.audio.volume=this.volume},methods:{adjustPlayerDimensions:function(e){this.localPlayerWidth=e<320?320:e>1366?1366:e},validateProgressColor:function(e){this.localProgressBarColor=-1!==this.coverColors.indexOf(e)?e:"#008080"},pickRandomColor:function(){return this.coverColors[Math.floor(Math.random()*this.coverColors.length)]},emitPlayerStatus:function(e){var t=this;setTimeout(function(){t.$emit("player-status",e)},200)},decreaseVolume:function(){this.updatePlayerVolume(this.volume-.1>=0?this.volume-.1:0)},increaseVolume:function(){this.updatePlayerVolume(this.volume+.1<=1?this.volume+.1:1)},audioListening:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?(this.audio.addEventListener("loadeddata",this.proccessPlaybackStart,!1),this.audio.addEventListener("timeupdate",this.proccessPlaybackTimeUpdate,!1),this.audio.addEventListener("pause",this.proccessPlaybackPause,!1),this.audio.addEventListener("emptied",this.proccessPlaybackEmptied,!1),this.audio.addEventListener("ended",this.proccessPlaybackStop,!1)):(this.audio.removeEventListener("loadeddata",this.proccessPlaybackStart,!1),this.audio.removeEventListener("timeupdate",this.proccessPlaybackTimeUpdate,!1),this.audio.removeEventListener("pause",this.proccessPlaybackPause,!1),this.audio.removeEventListener("emptied",this.proccessPlaybackEmptied,!1),this.audio.removeEventListener("ended",this.proccessPlaybackStop,!1))},updateUi:function(e){this.updateLoadingStatus(e.loading),this.updatePlayingStatus(e.playing),this.updatePauseStatus(e.pause),this.updateStopStatus(e.stop)},proccessPlaybackStart:function(){this.updateUi({loading:!1,playing:!0,pause:!1,stop:!1}),this.updateCurrentTrackDuration(this.audio.duration),this.emitPlayerStatus("playing")},proccessPlaybackTimeUpdate:function(){isNaN(this.currentTrackDuration)||!isFinite(this.currentTrackDuration)?this.updateCurrentTrackDuration(260):this.updateCurrentTrackDuration(isNaN(this.audio.duration)||!isFinite(this.audio.duration)?260:this.audio.duration),this.playerIsLoading&&this.updateLoadingStatus(!1),this.updateCurrentTrackTime(this.audio.currentTime),this.updateUi({loading:!1,playing:!0,pause:!1,stop:!1})},proccessPlaybackPause:function(){this.updateUi({loading:!1,playing:!1,pause:!0,stop:!1}),this.emitPlayerStatus("paused")},proccessPlaybackEmptied:function(){this.audio.removeEventListener("loadeddata",this.proccessPlaybackStart,!1),this.audio.removeEventListener("timeupdate",this.proccessPlaybackTimeUpdate,!1),this.audio.removeEventListener("pause",this.proccessPlaybackEmptied,!1),this.updateCurrentTrackTime(0),this.updateCurrentTrackDuration(100),this.updateUi({loading:!1,playing:!1,pause:!1,stop:!0}),this.emitPlayerStatus("stopped")},proccessPlaybackStop:function(){this.emitPlayerStatus("stopped"),this.audio.removeEventListener("loadeddata",this.proccessPlaybackStart,!1),this.audio.removeEventListener("timeupdate",this.proccessPlaybackTimeUpdate,!1),this.audio.removeEventListener("pause",this.proccessPlaybackPause,!1),this.updateCurrentTrackTime(0),this.updateCurrentTrackDuration(100),this.updateUi({loading:!1,playing:!1,pause:!1,stop:!0}),this.continuousPlaybackStatus&&(this.currentTrackId+1<=this.lastSongId?(this.updatePlayingStatus(!0),this.updateCurrentTrackId(this.currentTrackId+1),this.playTrack()):(this.updatePlayingStatus(!0),this.updateCurrentTrackId(0),this.playTrack()))},updateSongs:function(e){this.songs=e,this.songsCount=e.length,this.lastSongId=e.length-1},updateContinuousPlaybackStatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.continuousPlaybackStatus;this.continuousPlaybackStatus=e},updateCurrentTrackId:function(e){this.currentTrackId=e},updateCurrentTrackTime:function(e){this.currentTrackTime=e,this.$emit("playback-timer",{playingItemDuration:this.currentTrackDuration,playingItemTime:this.currentTrackTime})},updateCurrentTrackDuration:function(e){this.currentTrackDuration=e},updatePlayerVolume:function(e){this.volume=e,this.audio.volume=this.volume},updateLoadingStatus:function(e){this.playerIsLoading=e},updatePlayingStatus:function(e){this.playerIsPlaying=e},updatePauseStatus:function(e){this.playerIsPaused=e},updateStopStatus:function(e){this.playerIsStopped=e},playTrack:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentTrackId,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.songsCount<=0)return!1;var i=this;this.playerIsPaused&!n?(this.audio.currentTime=this.currentTrackTime,setTimeout(function(){e.audio.play(),i.audioListening()},10)):(this.audio.load(),this.coverColor=this.pickRandomColor(),this.playerIsLoading=!0,this.currentTrackId=t,this.audio.src=this.songs[t].audio,this.audio.play(),setTimeout(function(){i.audioListening()},10)),this.audio.volume=this.volume},pause:function(){var e=this;this.audioListening(!1),setTimeout(function(){e.audio.pause(),e.updateUi({loading:!1,playing:!1,pause:!0,stop:!1})},10)},stop:function(){var e=this,t=this;t.audio.load(),setTimeout(function(){e.currentTrackTime=0,e.audio.currentTime=0,t.updateUi({loading:!1,playing:!1,pause:!1,stop:!0}),t.audioListening(!1)},10)},next:function(){var e=this,t=this;this.currentTrackId+1<=this.lastSongId?(this.currentTrackId+=1,this.audioListening(!1),setTimeout(function(){t.playTrack(e.currentTrackId,!0)},10)):this.continuousPlaybackStatus&&(this.currentTrackId=0,this.audioListening(!1),setTimeout(function(){t.playTrack(e.currentTrackId,!0)},10))},previous:function(){var e=this,t=this;this.currentTrackId-1>=0?(this.currentTrackId-=1,this.audioListening(!1),setTimeout(function(){t.playTrack(e.currentTrackId,!0)},10)):this.continuousPlaybackStatus?(this.currentTrackId=this.lastSongId,this.audioListening(!1),setTimeout(function(){t.playTrack(e.currentTrackId,!0)},10)):console.log("Reached start of playlist")},seekPlayer:function(e){var t=this;this.audioListening(!1),this.currentTrackTime=e,this.audio.currentTime=e,setTimeout(function(){t.audioListening()},10)}}};function normalizeComponent(e,t,n,i,s,o,a,r,l,c){"boolean"!=typeof a&&(l=r,r=a,a=!1);var d,u="function"==typeof n?n.options:n;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,s&&(u.functional=!0)),i&&(u._scopeId=i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=a?function(){t.call(this,c(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),d)if(u.functional){var p=u.render;u.render=function(e,t){return d.call(t),p(e,t)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,d):[d]}return n}var normalizeComponent_1=normalizeComponent,isOldIE="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function createInjector(e){return function(e,t){return addStyle(e,t)}}var HEAD=document.head||document.getElementsByTagName("head")[0],styles={};function addStyle(e,t){var n=isOldIE?t.media||"default":e,i=styles[n]||(styles[n]={ids:new Set,styles:[]});if(!i.ids.has(e)){i.ids.add(e);var s=t.source;if(t.map&&(s+="\n/*# sourceURL="+t.map.sources[0]+" */",s+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),i.element||(i.element=document.createElement("style"),i.element.type="text/css",t.media&&i.element.setAttribute("media",t.media),HEAD.appendChild(i.element)),"styleSheet"in i.element)i.styles.push(s),i.element.styleSheet.cssText=i.styles.filter(Boolean).join("\n");else{var o=i.ids.size-1,a=document.createTextNode(s),r=i.element.childNodes;r[o]&&i.element.removeChild(r[o]),r.length?i.element.insertBefore(a,r[o]):i.element.appendChild(a)}}}var browser=createInjector,__vue_script__=script,__vue_render__=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"tw-flex tw-flex-col tw-flex-wrap tw-z-20 tw-min-h-10 tw-max-h-simplePlyrmaxheightsm tw-py-0 tw-px-0 tw-mt-0 tw-mr-0 tw-mb-0 tw-ml-0 tw-bg-no-repeat tw-bg-center tw-bg-cover pp",style:"max-width:"+e.localPlayerWidth+"px"},[n("div",{staticClass:"tw-flex tw-flex-row tw-w-full tw-items-center tw-justify-between px-4 py-1"},[n("xns-seek-bar",{attrs:{"bar-color":e.localProgressBarColor,"bar-height":20,listen:e.playerIsPlaying||e.playerIsPaused,"current-value":e.currentTrackTime,"total-value":e.currentTrackDuration,intensity:e.volume},on:{seekedTo:e.seekPlayer}})],1),e._v(" "),n("div",{staticClass:"tw-flex tw-flex-row tw-w-full tw-p-r-3 tw-p-l-1 tw-m-0 tw-w-full pp-controls",attrs:{title:e.songsCount>0?e.songs[e.currentTrackId].artist+" - "+e.songs[e.currentTrackId].title:"No Audio To Play"}},[n("div",{staticClass:"tw-inline-flex tw-flex-grow-0 tw-w-12 tw-m-1 tw-float-left",style:e.songsCount>0&&""!==e.songs[e.currentTrackId].cover?"":"background-color: "+e.coverColor},[e.songsCount>0&&""!==e.songs[e.currentTrackId].cover?n("img",{staticClass:"tw-h-auto tw-w-full",attrs:{src:e.songs[e.currentTrackId].cover}}):n("MusicalNoteIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons tw-h-full tw-w-auto",w:"40",h:"40"}})],1),e._v(" "),n("div",{staticClass:"tw-inline-flex tw-flex-grow tw-flex-col tw-items-center tw-w-full"},[n("div",{staticClass:"tw-inline-flex tw-flex-row tw-w-full tw-items-center tw-align-middle tw-justify-between tw-p-l-3 tw-p-r-1 tw-py-1"},[n("div",{staticClass:"tw-inline-flex tw-flex-row tw-justify-start"},[(e.currentTrackId>0||e.continuousPlaybackStatus)&&e.songsCount>0?n("div",{staticClass:"tw-flex-1 tw-m-1 tw-justify-center tw-align-middle",on:{click:function(t){return e.previous()}}},[n("SkipBackwardIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1):e._e(),e._v(" "),n("div",{staticClass:"tw-flex-1 tw-m-1 tw-justify-center tw-align-middle"},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.playerIsPlaying&&!e.playerIsLoading,expression:"!playerIsPlaying && !playerIsLoading"}],on:{click:function(t){return e.playTrack()}}},[n("PlayIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.playerIsPlaying&&!e.playerIsLoading,expression:"playerIsPlaying && !playerIsLoading"}],attrs:{disabled:e.songsCount<=0},on:{click:function(t){return e.pause()}}},[n("PauseIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1),e._v(" "),n("span",[n("BufferingIcon",{directives:[{name:"show",rawName:"v-show",value:e.playerIsLoading,expression:"playerIsLoading"}],staticClass:"tw-text-white tw-cursor-pointer",attrs:{"root-class":"pp-icons",animate:"beat",w:"30",h:"30"}})],1)]),e._v(" "),n("div",{staticClass:"tw-flex-1 tw-m-1 tw-justify-center tw-align-middle",attrs:{disabled:e.songsCount<=0},on:{click:function(t){return e.stop()}}},[n("SquareIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1),e._v(" "),(e.currentTrackId<e.lastSongId||e.continuousPlaybackStatus)&&e.songsCount>0?n("div",{staticClass:"tw-flex-1 tw-m-1 tw-justify-center tw-align-middle",attrs:{disabled:e.songsCount<=0},on:{click:function(t){return e.next()}}},[n("SkipForwardIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1):e._e()]),e._v(" "),e.localPlayerWidth>=600&&""!==e.songs[e.currentTrackId].audio&&e.showAudioData?n("div",{staticClass:"tw-inline-flex tw-flex-row tw-justify-start tw-text-white tw-truncate"},[e._v("\n "+e._s(e.songs[e.currentTrackId].artist||"Unknown")+" - "+e._s(e.songs[e.currentTrackId].title||"Unknown")+"\n ")]):e._e(),e._v(" "),n("div",{staticClass:"tw-inline-flex tw-flex-row tw-justify-end"},[e.localPlayerWidth>=400&&e.showAudioDuration?n("div",{staticClass:"tw-inline-flex tw-flex-row tw-justify-end tw-text-white timer"},[e._v("\n "+e._s(e.localPlayerWidth>=600?e.$options.filters.doubleDigits(e.currentTrackTime):"")+" "+e._s(e.localPlayerWidth>=600?"-":"")+" "+e._s(e._f("doubleDigits")(e.currentTrackDuration))+"\n ")]):e._e(),e._v(" "),n("div",{staticClass:"tw-flex-1 tw-mx-1"},[n("div",{class:e.localPlayerWidth>=400?"tw-bg-transparent tw-float-right tw-text-white tw-p-t-2":"tw-bg-transparent tw-float-right tw-text-white",attrs:{disabled:e.volume<=.1||e.songsCount<=0},on:{click:function(t){return e.decreaseVolume()}}},[e.volume>0?n("VolumeReduceIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}}):n("VolumeReduceIconInactive",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}})],1)]),e._v(" "),n("div",{class:e.localPlayerWidth>=400?"tw-flex-1 tw-mx-2 tw-p-t-2":"tw-flex-1 tw-mx-2"},[n("div",{staticClass:"tw-bg-transparent tw-float-right tw-text-white",attrs:{disabled:e.volume>=1||e.songsCount<=0},on:{click:function(t){return e.increaseVolume()}}},[e.volume<1?n("VolumeAddIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}}):n("VolumeAddIconInactive",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}})],1)]),e._v(" "),n("div",{class:e.localPlayerWidth>=400?"tw-flex-1 tw-mx-1 tw-p-t-2":"tw-flex-1 tw-mx-1"},[n("span",{class:e.continuousPlaybackStatus?"tw-bg-transparent tw-float-right tw-text-white tw-text-primary-green":"tw-bg-transparent tw-float-right tw-text-white",on:{click:function(t){return e.updateContinuousPlaybackStatus()}}},[n("RepeatIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":e.continuousPlaybackStatus?"pp-icons-green":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}})],1)])])])])])])])},__vue_staticRenderFns__=[],__vue_inject_styles__=function(e){e&&e("data-v-48810230_0",{source:".pp[data-v-48810230]{background:#232526;background:-webkit-linear-gradient(to right,rgba(35,37,38,.8),rgba(65,67,69,.8));background:linear-gradient(to right,rgba(35,37,38,.8),rgba(65,67,69,.8))}.pp-controls[data-v-48810230]{background:#303942;background:-webkit-linear-gradient(to right,rgba(43,51,59,.95),rgba(41,50,60,.95));background:linear-gradient(to right,rgba(43,51,59,.95),rgba(41,50,60,.95))}.pp-icons[data-v-48810230]{fill:#fff!important}.pp-icons[data-v-48810230]:focus{fill:grey!important}.pp-icons-green[data-v-48810230]{fill:#32cd32}[data-v-48810230]::selection{background:0 0}.timer[data-v-48810230]{margin:auto;padding:10px}.tw-p-t-2[data-v-48810230]{padding-top:7px}",map:void 0,media:void 0})},__vue_scope_id__="data-v-48810230",__vue_module_identifier__=void 0,__vue_is_functional_template__=!1,XnsAudioPlayerSimple=normalizeComponent_1({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,browser,void 0),script$1={name:"XnsSeekBar",props:{currentValue:{type:Number,default:0},totalValue:{type:Number,default:20},listen:{type:Boolean,default:!0},barHeight:{type:Number,default:60},barColor:{type:String,default:"#008080"},barShadeColor:{type:String,default:"#e1e1e1"},intensity:{type:Number,default:.5}},data:function(){return{progress:0,localValue:0,progressTotalWidth:0,colorIntensity:""}},computed:{localListen:function(){return this.listen}},watch:{immediate:!0,currentValue:function(){var e=this.currentValue/this.totalValue*100;this.progress=e<=100?e:100},listen:function(){this.listenToEvents(this.listen)},intensity:function(){this.colorIntensity=50+50*this.intensity>=100?"":50+50*this.intensity}},mounted:function(){var e=this.currentValue/this.totalValue*100;this.progress=e<=100?e:100,this.colorIntensity=50,this.listenToEvents(this.localListen),window.addEventListener("resize",this.windowResize,!1)},methods:{getClickPosition:function(e){var t=(e=e||window.event).target||e.srcElement;3==t.nodeType&&(t=t.parentNode),this.progressTotalWidth=this.progressTotalWidth||t.offsetWidth;var n=e.offsetX;this.progress=n/this.progressTotalWidth*100;var i=this.progress/100*this.totalValue;this.$emit("seekedTo",i)},detectMouseDown:function(e){e.preventDefault(),this.$refs.trackprogress.addEventListener("mousemove",this.getClickPosition,!1)},detectMouseUp:function(){this.$refs.trackprogress.removeEventListener("mousemove",this.getClickPosition,!1)},windowResize:function(){var e=this;setTimeout(function(){e.progressTotalWidth=e.$refs.trackprogress.offsetWidth},200)},listenToEvents:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?(this.$refs.trackprogress.addEventListener("click",this.getClickPosition,!1),this.$refs.trackprogress.addEventListener("mousedown",this.detectMouseDown,!1),this.$refs.trackprogress.addEventListener("mouseup",this.detectMouseUp,!1)):(this.$refs.trackprogress.removeEventListener("click",this.getClickPosition,!1),this.$refs.trackprogress.removeEventListener("mousedown",this.detectMouseDown,!1),this.$refs.trackprogress.removeEventListener("mouseup",this.detectMouseUp,!1))}}};function normalizeComponent$1(e,t,n,i,s,o,a,r,l,c){"boolean"!=typeof a&&(l=r,r=a,a=!1);const d="function"==typeof n?n.options:n;let u;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,s&&(d.functional=!0)),i&&(d._scopeId=i),o?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=u):t&&(u=a?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),u)if(d.functional){const e=d.render;d.render=function(t,n){return u.call(n),e(t,n)}}else{const e=d.beforeCreate;d.beforeCreate=e?[].concat(e,u):[u]}return n}const isOldIE$1="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function createInjector$1(e){return(e,t)=>addStyle$1(e,t)}let HEAD$1;const styles$1={};function addStyle$1(e,t){const n=isOldIE$1?t.media||"default":e,i=styles$1[n]||(styles$1[n]={ids:new Set,styles:[]});if(!i.ids.has(e)){i.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),i.element||(i.element=document.createElement("style"),i.element.type="text/css",t.media&&i.element.setAttribute("media",t.media),void 0===HEAD$1&&(HEAD$1=document.head||document.getElementsByTagName("head")[0]),HEAD$1.appendChild(i.element)),"styleSheet"in i.element)i.styles.push(n),i.element.styleSheet.cssText=i.styles.filter(Boolean).join("\n");else{const e=i.ids.size-1,t=document.createTextNode(n),s=i.element.childNodes;s[e]&&i.element.removeChild(s[e]),s.length?i.element.insertBefore(t,s[e]):i.element.appendChild(t)}}}var __vue_script__$1=script$1,__vue_render__$1=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{ref:"trackprogress",staticClass:"progress-wrapper",style:"position: inherit; display: flex; flex: 1; width: inherit; height: "+this.barHeight+"px; position: relative; background: "+this.barShadeColor+"; overflow: hidden;"},[t("div",{staticClass:"progressbar",style:"background: rgba(3,169,244, .8); width: "+this.progress+"%;position: absolute; left: 0; right: 0; bottom: 0; top: 0; height: inherit; background: "+this.barColor+this.colorIntensity})])},__vue_staticRenderFns__$1=[],__vue_inject_styles__$1=function(e){e&&e("data-v-15c9f83f_0",{source:"[data-v-15c9f83f]::selection{background:0 0}*[data-v-15c9f83f],[data-v-15c9f83f]:hover{cursor:default}",map:void 0,media:void 0})},__vue_scope_id__$1="data-v-15c9f83f",__vue_module_identifier__$1=void 0,__vue_is_functional_template__$1=!1,__vue_component__=normalizeComponent$1({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__$1,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,!1,createInjector$1,void 0,void 0),index={install:function(e){e.component("xns-seek-bar",__vue_component__)}},dist=index,index$1={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{progressBar:dist};e.use(t.progressBar),e.component("xns-audio-player-simple",XnsAudioPlayerSimple)}};module.exports=index$1;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var RepeatIcon=_interopDefault(require("vue-ionicons/dist/ios-repeat")),SkipBackwardIcon=_interopDefault(require("vue-ionicons/dist/ios-skip-backward")),PlayIcon=_interopDefault(require("vue-ionicons/dist/ios-play")),PauseIcon=_interopDefault(require("vue-ionicons/dist/ios-pause")),SquareIcon=_interopDefault(require("vue-ionicons/dist/ios-square")),SkipForwardIcon=_interopDefault(require("vue-ionicons/dist/ios-skip-forward")),BufferingIcon=_interopDefault(require("vue-ionicons/dist/ios-more")),VolumeAddIconInactive=_interopDefault(require("vue-ionicons/dist/ios-add-circle-outline")),VolumeAddIcon=_interopDefault(require("vue-ionicons/dist/ios-add-circle")),VolumeReduceIconInactive=_interopDefault(require("vue-ionicons/dist/ios-remove-circle-outline")),VolumeReduceIcon=_interopDefault(require("vue-ionicons/dist/ios-remove-circle")),MusicalNoteIcon=_interopDefault(require("vue-ionicons/dist/ios-musical-note"));function styleInject(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var css_248z='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\r\n ========================================================================== */\n\n/**\r\n * 1. Correct the line height in all browsers.\r\n * 2. Prevent adjustments of font size after orientation changes in iOS.\r\n */\n\n/* Sections\r\n ========================================================================== */\n\n/**\r\n * Remove the margin in all browsers.\r\n */\n\n/**\r\n * Render the `main` element consistently in IE.\r\n */\n\n/**\r\n * Correct the font size and margin on `h1` elements within `section` and\r\n * `article` contexts in Chrome, Firefox, and Safari.\r\n */\n\n/* Grouping content\r\n ========================================================================== */\n\n/**\r\n * 1. Add the correct box sizing in Firefox.\r\n * 2. Show the overflow in Edge and IE.\r\n */\n\n/**\r\n * 1. Correct the inheritance and scaling of font size in all browsers.\r\n * 2. Correct the odd `em` font sizing in all browsers.\r\n */\n\n/* Text-level semantics\r\n ========================================================================== */\n\n/**\r\n * Remove the gray background on active links in IE 10.\r\n */\n\na {\n background-color: transparent;\n}\n\n/**\r\n * 1. Remove the bottom border in Chrome 57-\r\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\r\n */\n\n/**\r\n * Add the correct font weight in Chrome, Edge, and Safari.\r\n */\n\n/**\r\n * 1. Correct the inheritance and scaling of font size in all browsers.\r\n * 2. Correct the odd `em` font sizing in all browsers.\r\n */\n\n/**\r\n * Add the correct font size in all browsers.\r\n */\n\n/**\r\n * Prevent `sub` and `sup` elements from affecting the line height in\r\n * all browsers.\r\n */\n\n/* Embedded content\r\n ========================================================================== */\n\n/**\r\n * Remove the border on images inside links in IE 10.\r\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\r\n ========================================================================== */\n\n/**\r\n * 1. Change the font styles in all browsers.\r\n * 2. Remove the margin in Firefox and Safari.\r\n */\n\n/**\r\n * Show the overflow in IE.\r\n * 1. Show the overflow in Edge.\r\n */\n\n/**\r\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\r\n * 1. Remove the inheritance of text transform in Firefox.\r\n */\n\n/**\r\n * Correct the inability to style clickable types in iOS and Safari.\r\n */\n\n\r\n[type="button"],\r\n[type="reset"],\r\n[type="submit"] {\n -webkit-appearance: button;\n}\n\n/**\r\n * Remove the inner border and padding in Firefox.\r\n */\n\n\r\n[type="button"]::-moz-focus-inner,\r\n[type="reset"]::-moz-focus-inner,\r\n[type="submit"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\r\n * Restore the focus styles unset by the previous rule.\r\n */\n\n\r\n[type="button"]:-moz-focusring,\r\n[type="reset"]:-moz-focusring,\r\n[type="submit"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\r\n * Correct the padding in Firefox.\r\n */\n\n/**\r\n * 1. Correct the text wrapping in Edge and IE.\r\n * 2. Correct the color inheritance from `fieldset` elements in IE.\r\n * 3. Remove the padding so developers are not caught out when they zero out\r\n * `fieldset` elements in all browsers.\r\n */\n\n/**\r\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\r\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\r\n * Remove the default vertical scrollbar in IE 10+.\r\n */\n\n/**\r\n * 1. Add the correct box sizing in IE 10.\r\n * 2. Remove the padding in IE 10.\r\n */\n\n[type="checkbox"],\r\n[type="radio"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\r\n * Correct the cursor style of increment and decrement buttons in Chrome.\r\n */\n\n[type="number"]::-webkit-inner-spin-button,\r\n[type="number"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\r\n * 1. Correct the odd appearance in Chrome and Safari.\r\n * 2. Correct the outline style in Safari.\r\n */\n\n[type="search"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\r\n * Remove the inner padding in Chrome and Safari on macOS.\r\n */\n\n[type="search"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\r\n * 1. Correct the inability to style clickable types in iOS and Safari.\r\n * 2. Change font properties to `inherit` in Safari.\r\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\r\n ========================================================================== */\n\n/*\r\n * Add the correct display in Edge, IE 10+, and Firefox.\r\n */\n\ndetails {\n display: block;\n}\n\n/*\r\n * Add the correct display in all browsers.\r\n */\n\n/* Misc\r\n ========================================================================== */\n\n/**\r\n * Add the correct display in IE 10+.\r\n */\n\ntemplate {\n display: none;\n}\n\n/**\r\n * Add the correct display in IE 10.\r\n */\n\n[hidden] {\n display: none;\n}\n\n/**\r\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\r\n * A thin layer on top of normalize.css that provides a starting point more\r\n * suitable for web applications.\r\n */\n\n/**\r\n * Removes the default spacing and border for appropriate elements.\r\n */\n\n/**\r\n * Work around a Firefox/IE bug where the transparent `button` background\r\n * results in a loss of the default `button` focus styles.\r\n */\n\n/**\r\n * Tailwind custom reset styles\r\n */\n\n/**\r\n * 1. Use the user\'s configured `sans` font-family (with Tailwind\'s default\r\n * sans-serif font stack as a fallback) as a sane default.\r\n * 2. Use Tailwind\'s default "normal" line-height so the user isn\'t forced\r\n * to override it to ensure consistency even when using the default theme.\r\n */\n\n/**\r\n * 1. Prevent padding and border from affecting element width.\r\n *\r\n * We used to set this in the html element and inherit from\r\n * the parent element for everything else. This caused issues\r\n * in shadow-dom-enhanced elements like <details> where the content\r\n * is wrapped by a div with box-sizing set to `content-box`.\r\n *\r\n * https://github.com/mozdevs/cssremedy/issues/4\r\n *\r\n *\r\n * 2. Allow adding a border to an element by just adding a border-width.\r\n *\r\n * By default, the way the browser specifies that an element should have no\r\n * border is by setting it\'s border-style to `none` in the user-agent\r\n * stylesheet.\r\n *\r\n * In order to easily add borders to elements by just setting the `border-width`\r\n * property, we change the default border-style for all elements to `solid`, and\r\n * use border-width to hide them instead. This way our `border` utilities only\r\n * need to set the `border-width` property instead of the entire `border`\r\n * shorthand, making our border utilities much more straightforward to compose.\r\n *\r\n * https://github.com/tailwindcss/tailwindcss/pull/116\r\n */\n\n*,\r\n::before,\r\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e2e8f0; /* 2 */\n}\n\n/*\r\n * Ensure horizontal rules are visible by default\r\n */\n\n/**\r\n * Undo the `border-style: none` reset that Normalize applies to images so that\r\n * our `border-{width}` utilities have the expected effect.\r\n *\r\n * The Normalize reset is unnecessary for us since we default the border-width\r\n * to 0 on all elements.\r\n *\r\n * https://github.com/tailwindcss/tailwindcss/issues/362\r\n */\n\nimg {\n border-style: solid;\n}\n\n\r\n[role="button"] {\n cursor: pointer;\n}\n\n/**\r\n * Reset links to optimize for opt-in styling instead of\r\n * opt-out.\r\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\r\n * Reset form element properties that are easy to forget to\r\n * style explicitly so you don\'t inadvertently introduce\r\n * styles that deviate from your design system. These styles\r\n * supplement a partial reset that is already applied by\r\n * normalize.css.\r\n */\n\n/**\r\n * Use the configured \'mono\' font family for elements that\r\n * are expected to be rendered with a monospace font, falling\r\n * back to the system monospace stack if there is no configured\r\n * \'mono\' font family.\r\n */\n\n/**\r\n * Make replaced elements `display: block` by default as that\'s\r\n * the behavior you want almost all of the time. Inspired by\r\n * CSS Remedy, with `svg` added as well.\r\n *\r\n * https://github.com/mozdevs/cssremedy/issues/14\r\n */\n\nimg,\r\naudio {\n display: block;\n vertical-align: middle;\n}\n\n/**\r\n * Constrain images and videos to the parent width and preserve\r\n * their instrinsic aspect ratio.\r\n *\r\n * https://github.com/mozdevs/cssremedy/issues/14\r\n */\n\nimg {\n max-width: 100%;\n height: auto;\n}\n\n.tw-bg-transparent {\n background-color: transparent;\n}\n\n.tw-bg-center {\n background-position: center;\n}\n\n.tw-bg-no-repeat {\n background-repeat: no-repeat;\n}\n\n.tw-bg-cover {\n background-size: cover;\n}\n\n.tw-cursor-pointer {\n cursor: pointer;\n}\n\n.tw-flex {\n display: flex;\n}\n\n.tw-inline-flex {\n display: inline-flex;\n}\n\n.tw-flex-row {\n flex-direction: row;\n}\n\n.tw-flex-col {\n flex-direction: column;\n}\n\n.tw-flex-wrap {\n flex-wrap: wrap;\n}\n\n.tw-items-center {\n align-items: center;\n}\n\n.tw-justify-start {\n justify-content: flex-start;\n}\n\n.tw-justify-end {\n justify-content: flex-end;\n}\n\n.tw-justify-center {\n justify-content: center;\n}\n\n.tw-justify-between {\n justify-content: space-between;\n}\n\n.tw-flex-1 {\n flex: 1 1 0%;\n}\n\n.tw-flex-grow-0 {\n flex-grow: 0;\n}\n\n.tw-flex-grow {\n flex-grow: 1;\n}\n\n.tw-float-right {\n float: right;\n}\n\n.tw-float-left {\n float: left;\n}\n\n.tw-m-0 {\n margin: 0;\n}\n\n.tw-m-1 {\n margin: 0.25rem;\n}\n\n.tw-mx-1 {\n margin-left: 0.25rem;\n margin-right: 0.25rem;\n}\n\n.tw-mx-2 {\n margin-left: 0.5rem;\n margin-right: 0.5rem;\n}\n\n.tw-mt-0 {\n margin-top: 0;\n}\n\n.tw-mr-0 {\n margin-right: 0;\n}\n\n.tw-mb-0 {\n margin-bottom: 0;\n}\n\n.tw-ml-0 {\n margin-left: 0;\n}\n\n.tw-max-h-simplePlyrmaxheightsm {\n max-height: 80px;\n}\n\n.tw-py-0 {\n padding-top: 0;\n padding-bottom: 0;\n}\n\n.tw-px-0 {\n padding-left: 0;\n padding-right: 0;\n}\n\n.tw-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.tw-text-white {\n color: #fff;\n}\n\n.tw-text-primary-green {\n color: #21FB92;\n}\n\n.tw-align-middle {\n vertical-align: middle;\n}\n\n.tw-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.tw-w-12 {\n width: 3rem;\n}\n\n.tw-w-auto {\n width: auto;\n}\n\n.tw-w-full {\n width: 100%;\n}\n\n.tw-z-20 {\n z-index: 20;\n}';styleInject(css_248z);var script={name:"XnsAudioPlayerSimple",components:{RepeatIcon:RepeatIcon,SkipBackwardIcon:SkipBackwardIcon,PlayIcon:PlayIcon,PauseIcon:PauseIcon,SquareIcon:SquareIcon,SkipForwardIcon:SkipForwardIcon,BufferingIcon:BufferingIcon,VolumeAddIcon:VolumeAddIcon,VolumeReduceIcon:VolumeReduceIcon,VolumeReduceIconInactive:VolumeReduceIconInactive,VolumeAddIconInactive:VolumeAddIconInactive,MusicalNoteIcon:MusicalNoteIcon},props:{playlist:{type:Array,default:function(){return[]}},playerWidth:{type:Number,default:320},repeatAll:{type:Boolean,default:!1},playerVolume:{type:Number,default:.5},stopPlayback:{type:Boolean,default:!1},pausePlayback:{type:Boolean,default:!1},showAudioDuration:{type:Boolean,default:!0},showAudioData:{type:Boolean,default:!0},progressBarColor:{type:String,default:"#008080"}},data:function(){return{localPlayerWidth:320,localProgressBarColor:"",songs:[],songsCount:0,playerIsPlaying:!1,playerIsPaused:!1,playerIsStopped:!1,isFirstTrack:!0,isMuted:!1,playerIsLoading:!1,continuousPlaybackStatus:!1,audio:new Audio,volume:.5,buffered:0,currentTrackId:0,currentTrackTime:0,currentTrackDuration:0,lastSongId:0,coverColors:["#009688","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#00bcd4","#4caf50","#ff9800","#607d8b","#795548","#008080"],coverColor:""}},watch:{immediate:!0,playerVolume:function(){this.updatePlayerVolume(this.playerVolume)},repeatAll:function(){this.updateContinuousPlaybackStatus(this.repeatAll)},playlist:function(){this.updateSongs(this.playlist)},stopPlayback:function(){this.stopPlayback&&this.stop()},pausePlayback:function(){this.pausePlayback&&this.pause()},playerWidth:function(){this.adjustPlayerDimensions(this.playerWidth)},progressBarColor:function(){this.validateProgressColor(this.progressBarColor)}},filters:{doubleDigits:function(e){if(isNaN(e))return"00";if(e<60)return e.toFixed()<10?"0 : 0"+e.toFixed():"0 : "+e.toFixed();var t=e.toFixed()%60==60?"00":(e%60).toFixed();return Math.floor(e.toFixed()/60).toFixed()+" : "+(t<10?"0"+t:t)}},mounted:function(){var e=this;this.songs=this.playlist,setTimeout(function(){e.coverColor=e.pickRandomColor(),e.lastSongId=e.songs.length-1,e.updatePlayerVolume(e.playerVolume),e.updateContinuousPlaybackStatus(e.repeatAll),e.adjustPlayerDimensions(e.playerWidth),e.updateSongs(e.playlist),e.validateProgressColor(e.progressBarColor)},300),this.audio.volume=this.volume},methods:{adjustPlayerDimensions:function(e){this.localPlayerWidth=e<320?320:e>1366?1366:e},validateProgressColor:function(e){this.localProgressBarColor=-1!==this.coverColors.indexOf(e)?e:"#008080"},pickRandomColor:function(){return this.coverColors[Math.floor(Math.random()*this.coverColors.length)]},emitPlayerStatus:function(e){var t=this;setTimeout(function(){t.$emit("player-status",e)},200)},decreaseVolume:function(){this.updatePlayerVolume(this.volume-.1>=0?this.volume-.1:0)},increaseVolume:function(){this.updatePlayerVolume(this.volume+.1<=1?this.volume+.1:1)},audioListening:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?(this.audio.addEventListener("loadeddata",this.proccessPlaybackStart,!1),this.audio.addEventListener("timeupdate",this.proccessPlaybackTimeUpdate,!1),this.audio.addEventListener("pause",this.proccessPlaybackPause,!1),this.audio.addEventListener("emptied",this.proccessPlaybackEmptied,!1),this.audio.addEventListener("ended",this.proccessPlaybackStop,!1)):(this.audio.removeEventListener("loadeddata",this.proccessPlaybackStart,!1),this.audio.removeEventListener("timeupdate",this.proccessPlaybackTimeUpdate,!1),this.audio.removeEventListener("pause",this.proccessPlaybackPause,!1),this.audio.removeEventListener("emptied",this.proccessPlaybackEmptied,!1),this.audio.removeEventListener("ended",this.proccessPlaybackStop,!1))},updateUi:function(e){this.updateLoadingStatus(e.loading),this.updatePlayingStatus(e.playing),this.updatePauseStatus(e.pause),this.updateStopStatus(e.stop)},proccessPlaybackStart:function(){this.updateUi({loading:!1,playing:!0,pause:!1,stop:!1}),this.updateCurrentTrackDuration(this.audio.duration),this.emitPlayerStatus("playing")},proccessPlaybackTimeUpdate:function(){isNaN(this.currentTrackDuration)||!isFinite(this.currentTrackDuration)?this.updateCurrentTrackDuration(260):this.updateCurrentTrackDuration(isNaN(this.audio.duration)||!isFinite(this.audio.duration)?260:this.audio.duration),this.playerIsLoading&&this.updateLoadingStatus(!1),this.updateCurrentTrackTime(this.audio.currentTime),this.updateUi({loading:!1,playing:!0,pause:!1,stop:!1})},proccessPlaybackPause:function(){this.updateUi({loading:!1,playing:!1,pause:!0,stop:!1}),this.emitPlayerStatus("paused")},proccessPlaybackEmptied:function(){this.audio.removeEventListener("loadeddata",this.proccessPlaybackStart,!1),this.audio.removeEventListener("timeupdate",this.proccessPlaybackTimeUpdate,!1),this.audio.removeEventListener("pause",this.proccessPlaybackEmptied,!1),this.updateCurrentTrackTime(0),this.updateCurrentTrackDuration(100),this.updateUi({loading:!1,playing:!1,pause:!1,stop:!0}),this.emitPlayerStatus("stopped")},proccessPlaybackStop:function(){this.emitPlayerStatus("stopped"),this.audio.removeEventListener("loadeddata",this.proccessPlaybackStart,!1),this.audio.removeEventListener("timeupdate",this.proccessPlaybackTimeUpdate,!1),this.audio.removeEventListener("pause",this.proccessPlaybackPause,!1),this.updateCurrentTrackTime(0),this.updateCurrentTrackDuration(100),this.updateUi({loading:!1,playing:!1,pause:!1,stop:!0}),this.continuousPlaybackStatus&&(this.currentTrackId+1<=this.lastSongId?(this.updatePlayingStatus(!0),this.updateCurrentTrackId(this.currentTrackId+1),this.playTrack()):(this.updatePlayingStatus(!0),this.updateCurrentTrackId(0),this.playTrack()))},updateSongs:function(e){this.songs=e,this.songsCount=e.length,this.lastSongId=e.length-1},updateContinuousPlaybackStatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.continuousPlaybackStatus;this.continuousPlaybackStatus=e},updateCurrentTrackId:function(e){this.currentTrackId=e},updateCurrentTrackTime:function(e){this.currentTrackTime=e,this.$emit("playback-timer",{playingItemDuration:this.currentTrackDuration,playingItemTime:this.currentTrackTime})},updateCurrentTrackDuration:function(e){this.currentTrackDuration=e},updatePlayerVolume:function(e){this.volume=e,this.audio.volume=this.volume},updateLoadingStatus:function(e){this.playerIsLoading=e},updatePlayingStatus:function(e){this.playerIsPlaying=e},updatePauseStatus:function(e){this.playerIsPaused=e},updateStopStatus:function(e){this.playerIsStopped=e},playTrack:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentTrackId,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.songsCount<=0)return!1;var r=this;this.playerIsPaused&!n?(this.audio.currentTime=this.currentTrackTime,setTimeout(function(){e.audio.play(),r.audioListening()},10)):(this.audio.load(),this.coverColor=this.pickRandomColor(),this.playerIsLoading=!0,this.currentTrackId=t,this.audio.src=this.songs[t].audio,this.audio.play(),setTimeout(function(){r.audioListening()},10)),this.audio.volume=this.volume},pause:function(){var e=this;this.audioListening(!1),setTimeout(function(){e.audio.pause(),e.updateUi({loading:!1,playing:!1,pause:!0,stop:!1})},10)},stop:function(){var e=this,t=this;t.audio.load(),setTimeout(function(){e.currentTrackTime=0,e.audio.currentTime=0,t.updateUi({loading:!1,playing:!1,pause:!1,stop:!0}),t.audioListening(!1)},10)},next:function(){var e=this,t=this;this.currentTrackId+1<=this.lastSongId?(this.currentTrackId+=1,this.audioListening(!1),setTimeout(function(){t.playTrack(e.currentTrackId,!0)},10)):this.continuousPlaybackStatus&&(this.currentTrackId=0,this.audioListening(!1),setTimeout(function(){t.playTrack(e.currentTrackId,!0)},10))},previous:function(){var e=this,t=this;this.currentTrackId-1>=0?(this.currentTrackId-=1,this.audioListening(!1),setTimeout(function(){t.playTrack(e.currentTrackId,!0)},10)):this.continuousPlaybackStatus?(this.currentTrackId=this.lastSongId,this.audioListening(!1),setTimeout(function(){t.playTrack(e.currentTrackId,!0)},10)):console.log("Reached start of playlist")},seekPlayer:function(e){var t=this;this.audioListening(!1),this.currentTrackTime=e,this.audio.currentTime=e,setTimeout(function(){t.audioListening()},10)}}};function normalizeComponent(e,t,n,r,i,o,s,a,l,c){"boolean"!=typeof s&&(l=a,a=s,s=!1);var d,u="function"==typeof n?n.options:n;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),r&&(u._scopeId=r),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=s?function(){t.call(this,c(this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),d)if(u.functional){var p=u.render;u.render=function(e,t){return d.call(t),p(e,t)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,d):[d]}return n}var normalizeComponent_1=normalizeComponent,isOldIE="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function createInjector(e){return function(e,t){return addStyle(e,t)}}var HEAD=document.head||document.getElementsByTagName("head")[0],styles={};function addStyle(e,t){var n=isOldIE?t.media||"default":e,r=styles[n]||(styles[n]={ids:new Set,styles:[]});if(!r.ids.has(e)){r.ids.add(e);var i=t.source;if(t.map&&(i+="\n/*# sourceURL="+t.map.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),r.element||(r.element=document.createElement("style"),r.element.type="text/css",t.media&&r.element.setAttribute("media",t.media),HEAD.appendChild(r.element)),"styleSheet"in r.element)r.styles.push(i),r.element.styleSheet.cssText=r.styles.filter(Boolean).join("\n");else{var o=r.ids.size-1,s=document.createTextNode(i),a=r.element.childNodes;a[o]&&r.element.removeChild(a[o]),a.length?r.element.insertBefore(s,a[o]):r.element.appendChild(s)}}}var browser=createInjector,__vue_script__=script,__vue_render__=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"tw-flex tw-flex-row tw-flex-wrap tw-z-20 tw-min-h-10 tw-max-h-simplePlyrmaxheightsm tw-py-0 tw-px-0 tw-mt-0 tw-mr-0 tw-mb-0 tw-ml-0 tw-bg-no-repeat tw-bg-center tw-bg-cover pp",style:"max-width:"+e.localPlayerWidth+"px"},[n("div",{staticClass:"tw-flex tw-flex-row tw-w-full tw-items-center tw-justify-between"},[n("xns-seek-bar",{attrs:{"bar-color":e.localProgressBarColor,"bar-height":20,listen:e.playerIsPlaying||e.playerIsPaused,"current-value":e.currentTrackTime,"total-value":e.currentTrackDuration,intensity:e.volume},on:{seekedTo:e.seekPlayer}})],1),e._v(" "),n("div",{staticClass:"tw-flex tw-flex-row tw-w-full tw-p-r-3 tw-p-l-1 tw-m-0 tw-w-full pp-controls",attrs:{title:e.songsCount>0?e.songs[e.currentTrackId].artist+" - "+e.songs[e.currentTrackId].title:"No Audio To Play"}},[n("div",{staticClass:"tw-inline-flex tw-flex-grow-0 tw-w-12 tw-m-1 tw-float-left",style:e.songsCount>0&&""!==e.songs[e.currentTrackId].cover?"":"background-color: "+e.coverColor},[e.songsCount>0&&""!==e.songs[e.currentTrackId].cover?n("img",{staticClass:"tw-h-auto tw-w-full",attrs:{src:e.songs[e.currentTrackId].cover}}):n("MusicalNoteIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons tw-h-full tw-w-auto",w:"40",h:"40"}})],1),e._v(" "),n("div",{staticClass:"tw-inline-flex tw-flex-grow tw-flex-col tw-items-center tw-w-full"},[n("div",{staticClass:"tw-inline-flex tw-flex-row tw-w-full tw-items-center tw-align-middle tw-justify-between tw-p-l-3 tw-p-r-1 tw-py-1"},[n("div",{staticClass:"tw-inline-flex tw-flex-row tw-justify-start"},[(e.currentTrackId>0||e.continuousPlaybackStatus)&&e.songsCount>0?n("div",{staticClass:"tw-flex-1 tw-m-1 tw-justify-center tw-align-middle",on:{click:function(t){return e.previous()}}},[n("SkipBackwardIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1):e._e(),e._v(" "),n("div",{staticClass:"tw-flex-1 tw-m-1 tw-justify-center tw-align-middle"},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.playerIsPlaying&&!e.playerIsLoading,expression:"!playerIsPlaying && !playerIsLoading"}],on:{click:function(t){return e.playTrack()}}},[n("PlayIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.playerIsPlaying&&!e.playerIsLoading,expression:"playerIsPlaying && !playerIsLoading"}],attrs:{disabled:e.songsCount<=0},on:{click:function(t){return e.pause()}}},[n("PauseIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1),e._v(" "),n("span",[n("BufferingIcon",{directives:[{name:"show",rawName:"v-show",value:e.playerIsLoading,expression:"playerIsLoading"}],staticClass:"tw-text-white tw-cursor-pointer",attrs:{"root-class":"pp-icons",animate:"beat",w:"30",h:"30"}})],1)]),e._v(" "),n("div",{staticClass:"tw-flex-1 tw-m-1 tw-justify-center tw-align-middle",attrs:{disabled:e.songsCount<=0},on:{click:function(t){return e.stop()}}},[n("SquareIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1),e._v(" "),(e.currentTrackId<e.lastSongId||e.continuousPlaybackStatus)&&e.songsCount>0?n("div",{staticClass:"tw-flex-1 tw-m-1 tw-justify-center tw-align-middle",attrs:{disabled:e.songsCount<=0},on:{click:function(t){return e.next()}}},[n("SkipForwardIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:"30",h:"30"}})],1):e._e()]),e._v(" "),e.localPlayerWidth>=600&&""!==e.songs[e.currentTrackId].audio&&e.showAudioData?n("div",{staticClass:"tw-inline-flex tw-flex-row tw-justify-start tw-text-white tw-truncate"},[e._v("\n "+e._s(e.songs[e.currentTrackId].artist||"Unknown")+" - "+e._s(e.songs[e.currentTrackId].title||"Unknown")+"\n ")]):e._e(),e._v(" "),n("div",{staticClass:"tw-inline-flex tw-flex-row tw-justify-end"},[e.localPlayerWidth>=400&&e.showAudioDuration?n("div",{staticClass:"tw-inline-flex tw-flex-row tw-justify-end tw-text-white timer"},[e._v("\n "+e._s(e.localPlayerWidth>=600?e.$options.filters.doubleDigits(e.currentTrackTime):"")+" "+e._s(e.localPlayerWidth>=600?"-":"")+" "+e._s(e._f("doubleDigits")(e.currentTrackDuration))+"\n ")]):e._e(),e._v(" "),n("div",{staticClass:"tw-flex-1 tw-mx-1"},[n("div",{class:e.localPlayerWidth>=400?"tw-bg-transparent tw-float-right tw-text-white tw-p-t-2":"tw-bg-transparent tw-float-right tw-text-white",attrs:{disabled:e.volume<=.1||e.songsCount<=0},on:{click:function(t){return e.decreaseVolume()}}},[e.volume>0?n("VolumeReduceIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}}):n("VolumeReduceIconInactive",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}})],1)]),e._v(" "),n("div",{class:e.localPlayerWidth>=400?"tw-flex-1 tw-mx-2 tw-p-t-2":"tw-flex-1 tw-mx-2"},[n("div",{staticClass:"tw-bg-transparent tw-float-right tw-text-white",attrs:{disabled:e.volume>=1||e.songsCount<=0},on:{click:function(t){return e.increaseVolume()}}},[e.volume<1?n("VolumeAddIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}}):n("VolumeAddIconInactive",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}})],1)]),e._v(" "),n("div",{class:e.localPlayerWidth>=400?"tw-flex-1 tw-mx-1 tw-p-t-2":"tw-flex-1 tw-mx-1"},[n("span",{class:e.continuousPlaybackStatus?"tw-bg-transparent tw-float-right tw-text-white tw-text-primary-green":"tw-bg-transparent tw-float-right tw-text-white",on:{click:function(t){return e.updateContinuousPlaybackStatus()}}},[n("RepeatIcon",{staticClass:"tw-cursor-pointer tw-text-white",attrs:{"root-class":e.continuousPlaybackStatus?"pp-icons-green":"pp-icons",w:e.localPlayerWidth>=500?"35":"25",h:e.localPlayerWidth>=500?"35":"25"}})],1)])])])])])])])},__vue_staticRenderFns__=[],__vue_inject_styles__=function(e){e&&e("data-v-5eae9864_0",{source:".pp[data-v-5eae9864]{background:#232526;background:-webkit-linear-gradient(to right,rgba(35,37,38,.8),rgba(65,67,69,.8));background:linear-gradient(to right,rgba(35,37,38,.8),rgba(65,67,69,.8))}.pp-controls[data-v-5eae9864]{background:#303942;background:-webkit-linear-gradient(to right,rgba(43,51,59,.95),rgba(41,50,60,.95));background:linear-gradient(to right,rgba(43,51,59,.95),rgba(41,50,60,.95))}.pp-icons[data-v-5eae9864]{fill:#fff!important}.pp-icons[data-v-5eae9864]:focus{fill:grey!important}.pp-icons-green[data-v-5eae9864]{fill:#32cd32}[data-v-5eae9864]::selection{background:0 0}.timer[data-v-5eae9864]{margin:auto;padding:10px}.tw-p-t-2[data-v-5eae9864]{padding-top:7px}",map:void 0,media:void 0})},__vue_scope_id__="data-v-5eae9864",__vue_module_identifier__=void 0,__vue_is_functional_template__=!1,XnsAudioPlayerSimple=normalizeComponent_1({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,browser,void 0);function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var dist=createCommonjsModule(function(e){var t={name:"XnsSeekBar",props:{currentValue:{type:Number,default:0},totalValue:{type:Number,default:20},listen:{type:Boolean,default:!0},barHeight:{type:Number,default:60},barColor:{type:String,default:"#008080"},barShadeColor:{type:String,default:"#e1e1e1"},intensity:{type:Number,default:.5}},data:function(){return{progress:0,progressTotalWidth:0,colorIntensity:50,localBarColor:""}},watch:{immediate:!0,currentValue:function(){this.calibrateProgress(this.currentValue)},totalValue:function(){this.calibrateProgress(this.currentValue,this.totalValue)},listen:function(){this.listenToEvents(this.listen)},intensity:function(){this.hexOpacity(this.barColor,this.intensity)},barColor:function(){this.hexOpacity(this.barColor,this.intensity)}},mounted:function(){this.calibrateProgress(this.currentValue,this.totalValue),this.hexOpacity(this.barColor,this.intensity),this.listenToEvents(this.listen),window.addEventListener("resize",this.windowResize,!1)},methods:{getClickPosition:function(e){var t=(e=e||window.event).target||e.srcElement;3==t.nodeType&&(t=t.parentNode),this.progressTotalWidth=this.progressTotalWidth||t.offsetWidth;var n=e.offsetX;this.progress=n/this.progressTotalWidth*100;var r=this.progress/100*this.totalValue;this.$emit("seekedTo",r)},detectMouseDown:function(e){e.preventDefault(),this.$refs.trackprogress.addEventListener("mousemove",this.getClickPosition,!1)},detectMouseUp:function(){this.$refs.trackprogress.removeEventListener("mousemove",this.getClickPosition,!1)},windowResize:function(){var e=this;setTimeout(function(){e.progressTotalWidth=e.$refs.trackprogress.offsetWidth},200)},listenToEvents:function(){arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?(this.$refs.trackprogress.removeEventListener("click",this.getClickPosition,!1),this.$refs.trackprogress.removeEventListener("mousedown",this.detectMouseDown,!1),this.$refs.trackprogress.removeEventListener("mouseup",this.detectMouseUp,!1)):(this.$refs.trackprogress.addEventListener("click",this.getClickPosition,!1),this.$refs.trackprogress.addEventListener("mousedown",this.detectMouseDown,!1),this.$refs.trackprogress.addEventListener("mouseup",this.detectMouseUp,!1))},calibrateProgress:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentValue)/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.totalValue)*100;this.progress=e<=100?e:100},hexOpacity:function(e,t){var n=100*t<=99?100*t:99;this.localBarColor="".concat(e)+n}}};const n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());let r;const i={};var o=function(e,t,n,r,i,o,s,a,l,c){"boolean"!=typeof s&&(l=a,a=s,s=!1);const d="function"==typeof n?n.options:n;let u;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),r&&(d._scopeId=r),o?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=u):t&&(u=s?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),u)if(d.functional){const e=d.render;d.render=function(t,n){return u.call(n),e(t,n)}}else{const e=d.beforeCreate;d.beforeCreate=e?[].concat(e,u):[u]}return n}({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{ref:"trackprogress",staticClass:"xns-seeker-progress-wrapper",style:"height: "+this.barHeight+"px; background: "+this.barShadeColor},[t("div",{staticClass:"xns-seeker-progress-bar",style:"width: "+this.progress+"%; background: "+this.localBarColor})])},staticRenderFns:[]},function(e){e&&e("data-v-7d3c114a_0",{source:"[data-v-7d3c114a]::selection{background:0 0}*[data-v-7d3c114a],[data-v-7d3c114a]:hover{cursor:default}.xns-seeker-progress-wrapper[data-v-7d3c114a]{position:inherit;display:flex;flex:1;width:inherit;position:relative;overflow:hidden}.xns-seeker-progress-bar[data-v-7d3c114a]{position:absolute;left:0;right:0;bottom:0;top:0;height:inherit}",map:void 0,media:void 0})},t,"data-v-7d3c114a",!1,void 0,!1,function(e){return(e,t)=>(function(e,t){const o=n?t.media||"default":e,s=i[o]||(i[o]={ids:new Set,styles:[]});if(!s.ids.has(e)){s.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),s.element||(s.element=document.createElement("style"),s.element.type="text/css",t.media&&s.element.setAttribute("media",t.media),void 0===r&&(r=document.head||document.getElementsByTagName("head")[0]),r.appendChild(s.element)),"styleSheet"in s.element)s.styles.push(n),s.element.styleSheet.cssText=s.styles.filter(Boolean).join("\n");else{const e=s.ids.size-1,t=document.createTextNode(n),r=s.element.childNodes;r[e]&&s.element.removeChild(r[e]),r.length?s.element.insertBefore(t,r[e]):s.element.appendChild(t)}}})(e,t)},void 0,void 0),s={install:function(e){e.component("xns-seek-bar",o)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(s),e.exports=s}),index={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{progressBar:dist};e.use(t.progressBar),e.component("xns-audio-player-simple",XnsAudioPlayerSimple)}};module.exports=index;
{
"private": false,
"name": "xns-audio-player-simple",
"version": "2.0.1",
"version": "2.0.2",
"description": "a simple yet powerful music player for vuejs based on xns-audio-player",

@@ -43,3 +43,3 @@ "main": "./dist/index.js",

"postcss-preset-env": "^6.7.0",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-postcss": "^2.4.1",
"rollup-plugin-vue": "^4.2.0",

@@ -53,4 +53,4 @@ "tailwindcss": "^1.2.0",

"vue-ionicons": "^3.0.4",
"xns-seek-bar": "^1.0.0"
"xns-seek-bar": "^1.0.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc