22 lines
7.3 KiB
JavaScript
22 lines
7.3 KiB
JavaScript
|
||
/*!
|
||
* Copyright 2021-2023 Ethan Halsall
|
||
* https://github.com/eshaz/icecast-metadata-js
|
||
*
|
||
* This file is part of icecast-metadata-player.
|
||
*
|
||
* icecast-metadata-player free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU Lesser General Public License as published by
|
||
* the Free Software Foundation, either version 3 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* icecast-metadata-player distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU Lesser General Public License for more details.
|
||
*
|
||
* You should have received a copy of the GNU Lesser General Public License
|
||
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||
*/
|
||
"use strict";(self.webpackChunkIcecastMetadataPlayer=self.webpackChunkIcecastMetadataPlayer||[]).push([[385],{209:(U,e,t)=>{t.d(e,{A:()=>a});var s=t(178);function a(){const U=Uint8Array,e=Float32Array;a.modules||Object.defineProperties(a,{modules:{value:new WeakMap},setModule:{value(U,e){a.modules.set(U,Promise.resolve(e))}},getModule:{value(U,e){let t=a.modules.get(U);return t||(e?t=WebAssembly.compile((0,s.D4)(e)):(e=U.wasm,t=a.inflateDynEncodeString(e).then((U=>WebAssembly.compile(U)))),a.modules.set(U,t)),t}},concatFloat32:{value(U,t){let s=new e(t),a=0,n=0;for(;a<U.length;)s.set(U[a],n),n+=U[a++].length;return s}},getDecodedAudio:{value:(U,e,t,s,a)=>({errors:U,channelData:e,samplesDecoded:t,sampleRate:s,bitDepth:a})},getDecodedAudioMultiChannel:{value(U,e,t,s,n,r){let i,T,o=[];for(i=0;i<t;i++){const U=[];for(T=0;T<e.length;)U.push(e[T++][i]||[]);o.push(a.concatFloat32(U,s))}return a.getDecodedAudio(U,o,s,n,r)}},inflateDynEncodeString:{value:e=>(e=(0,s.D4)(e),new Promise((t=>{const s=String.raw`dynEncode0114db91da9bu*ttt$#U¤¤U¤¤3yzzss|yusvuyÚ&4<054<,5T44^T44<(6U~J(44< ~A544U~6J0444545 444J0444J,4U4U
Ò7U454U4Z4U4U^/6545T4T44BU~64CU~O4U54U~5 U5T4B4Z!4U~5U5U5T4U~6U4ZTU5U5T44~4O4U2ZTU5T44Z!4B6T44U~64B6U~O44U~4O4U~54U~5 44~C4~54U~5 44~5454U4B6Ub!444~UO4U~5 U54U4ZTU#44U$464<4~B6^4<444~U~B4U~54U544~544~U5 µUä#UJUè#5TT4U0ZTTUX5U5T4T4Uà#~4OU4U $~C4~54U~5 T44$6U\!TTT4UaT4<6T4<64<Z!44~4N4<U~5 4UZ!4U±_TU#44UU6UÔ~B$544$6U\!4U6U¤#~B44Uä#~B$~64<6_TU#444U~B~6~54<Y!44<_!T4Y!4<64~444~AN44<U~6J4U5 44J4U[!U#44UO4U~54U~5 U54 7U6844J44J 4UJ4UJ04VK(44<J44<J$4U´~54U~5 4U¤~5!TTT4U$5"U5TTTTTTT4U$"4VK,U54<(6U~64<$6_!4< 64~6A54A544U~6#J(U54A4U[!44J(44#~A4U6UUU
[!4464~64_!4<64~54<6T4<4]TU5 T4Y!44~44~AN4U~54U~54U5 44J(44J UÄA!U5U#UôJU"UÔJU#UÔ"JU#U´"JT4U´ZTU5T4UôZTU5T4UDZTU5T4U$[T44~UO4U~5 UÔUô4U~U´$.U5T4UP[T4U~4~UO4U~5 U#<U#<4U~U2$.UÄUN 44 ~UO4U~5 44!~UO4U~5 4U~4~UO4U~5 44J44J(U5 44U¤~J@44Uä~J<44UD~J844U~J44U$54U$5U54U$54U1^4U1^!4U~54U~5U54U~6U4U^/65T4T4U$54U~4BU~4O4U54U~5 UU'464U'_/54UU~5T4T4U~4BU~UO4U54U~5 U54Uä~4U¤~4U~U'$!44~5U5T44\T44U<~$6U\!4U#aT4U~4U~4O4U~5 U5U5U5TTT4U$"4YTU5 4U4~C5U5 U5U5444$4~64~\TU5 4U~4U~5T4Y!44O4U~54U~54U5 4CYTU5 4Uä~4U¤~4U~4$6TU54U\!44Bæ4Bä~[!4U~4UD~4U~4U~4$6TU54U\!44B4B~[!44U<~4U4~$5 4U"U#$544"Y!454U^!44<J44<(J454U~84UN!#%'+/37?GOWgw·×÷Uä;U9$%& !"#`;a.getModule(a,s).then((U=>WebAssembly.instantiate(U,{}))).then((({exports:s})=>{const a=new Map(Object.entries(s)),n=a.get("puff"),r=a.get("memory").buffer,i=new U(r),T=new DataView(r);let o=a.get("__heap_base");const l=e.length,u=o;o+=4,T.setInt32(u,l,!0);const c=o;o+=l,i.set(e,c);const h=o;o+=4,T.setInt32(h,i.byteLength-o,!0),n(o,h,c,u),t(i.slice(o,o+T.getInt32(h,!0)))}))})))}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:()=>this.U}),this.getOutputChannels=(U,e,t)=>{let s=[],a=0;for(;a<e;)s.push(U.slice(a*t,a++*t+t));return s},this.allocateTypedArray=(U,e,t=!0)=>{const s=this.U.malloc(e.BYTES_PER_ELEMENT*U);return t&&this.t.add(s),{ptr:s,len:U,buf:new e(this.U.HEAP,s,U)}},this.free=()=>{this.t.forEach((U=>{this.U.free(U)})),this.t.clear()},this.codeToString=U=>{const e=[],t=new Uint8Array(this.U.HEAP);for(let s=t[U];0!==s;s=t[++U])e.push(s);return String.fromCharCode.apply(null,e)},this.addError=(U,e,t,s,a,n)=>{U.push({message:e,frameLength:t,frameNumber:s,inputBytes:a,outputSamples:n})},this.instantiate=(U,e)=>(e&&a.setModule(U,e),this.U=new U(a).instantiate(),this.t=new Set,this.U.ready.then((()=>this)))}},374:(U,e,t)=>{t.d(e,{A:()=>n});var s=t(761),a=t(209);class n extends((()=>globalThis.Worker||s)()){constructor(U,e,t,s){a.A.modules||new a.A;let n=a.A.modules.get(t);if(!n){let U,e="text/javascript",r=`'use strict';(${((U,e,t)=>{let s,a,n=new Promise((U=>{a=U}));self.onmessage=({data:{id:r,command:i,data:T}})=>{let o,l=n,u={id:r};"init"===i?(Object.defineProperties(U,{WASMAudioDecoderCommon:{value:e},EmscriptenWASM:{value:t},module:{value:T.module},isWebWorker:{value:!0}}),s=new U(T.options),a()):"free"===i?s.free():"ready"===i?l=l.then((()=>s.ready)):"reset"===i?l=l.then((()=>s.reset())):(Object.assign(u,s[i](Array.isArray(T)?T.map((U=>new Uint8Array(U))):new Uint8Array(T))),o=u.channelData?u.channelData.map((U=>U.buffer)):[]),l.then((()=>self.postMessage(u,o)))}}).toString()})(${t}, ${a.A}, ${s})`;try{U=void 0!==process.versions.node}catch{}n=U?`data:${e};base64,${Buffer.from(r).toString("base64")}`:URL.createObjectURL(new Blob([r],{type:e})),a.A.modules.set(t,n)}super(n,{name:e}),this.i=Number.MIN_SAFE_INTEGER,this.T=new Map,this.onmessage=({data:U})=>{const{id:e,...t}=U;this.T.get(e)(t),this.T.delete(e)},new s(a.A).getModule().then((e=>{this.postToDecoder("init",{module:e,options:U})}))}async postToDecoder(U,e){return new Promise((t=>{this.postMessage({command:U,id:this.i,data:e}),this.T.set(this.i++,t)}))}get ready(){return this.postToDecoder("ready")}async free(){await this.postToDecoder("free").finally((()=>{this.terminate()}))}async reset(){await this.postToDecoder("reset")}}},0:(U,e,t)=>{t.d(e,{A:()=>s});const s=(U,e)=>{Object.defineProperty(U,"name",{value:e})}}}]);
|
||
//# sourceMappingURL=icecast-metadata-player-1.17.3.common.min.js.map
|