(()=>{"use strict";function e(e,t){if(e.length===t)return e;const r=[];if(e.length>t){const n=Math.round(e.length/t);for(let t=0;t<e.length;t+=n)r.push(e[t])}else{const u=Math.ceil(t/e.length);for(const t of e)r.push(...n(t,u))}return u=r,a=t,i=n(e[e.length-1],t),u.length===a?u:u.length>a?u.slice(0,a):u.concat(i.slice(0,a-u.length));var u,a,i}function t(e,t,n){const r=Math.min(...e),u=Math.max(...e);return e.map(e=>function(e,t,n){return e*(n-t)+t}(function(e,t,n){let r=(e-t)/(n-t);return Number.isNaN(r)?0:r}(e,r,u),t,n))}function n(e,t){return new Array(t).fill(e)}(()=>{if("undefined"!=typeof __webpack_require__){var e=__webpack_require__.u,t=__webpack_require__.e,n={},r={};__webpack_require__.u=function(t){return e(t)+(n.hasOwnProperty(t)?"?"+n[t]:"")},__webpack_require__.e=function(u){return t(u).catch(function(t){var a=r.hasOwnProperty(u)?r[u]:3;if(a<1){var i=e(u);throw t.message="Loading chunk "+u+" failed after 3 retries.\n("+i+")",t.request=i,t}return new Promise(function(e){setTimeout(function(){var t=Date.now();n[u]=t,r[u]=a-1,e(__webpack_require__.e(u))},500)})})}}})();n(0,39);const r=self;r.addEventListener("message",async n=>{const{seq:u,data:a}=n.data,i=t(function(t,n){if(t.length===n)return t;let r=[];if(t.length>n){for(;r.length>2*n||0===r.length;){r=[];for(let e=1;e<t.length-1;e+=2){const n=(t[e-1]+t[e+1]+t[e])/3;r.push(n)}t=r}return e(r,n)}return e(t,n)}(a.map(e=>Math.abs(e)),39),0,1);r.postMessage({seq:u,waveform:i})})})();
//# sourceMappingURL=playback.worker.js.map