t!==s[e])||Yo.some((t,e)=>t!==i[e])){s=p,i=Yo;const Ko=t/r.sampleRate;e.gain.setValueAtTime(0,Ko),e=Ho(r,{...a,gain:0}),n=$o(r,{...h,orientationX:s[0],orientationY:s[1],orientationZ:s[2],positionX:i[0],positionY:i[1],positionZ:i[2]}),e.gain.setValueAtTime(1,Ko),Jo.connect(e).connect(n.inputs[0]),n.connect(o)}}return o}})(t,e)}}}),Ou=(r=e,Wo=Ca=Pl,Bo=$o=Au,Uo=Cu,Qo=Ea=Qa=Zs,Zo=Wl,class extends r{constructor(t,e){var s=Go(t),e={...xs,...e},e=Bo(s,e),s=Qo(s);super(t,!1,e,s?Uo():null),this._nativePannerNode=e,this._orientationX=Wo(this,s,e.orientationX,fe,de),this._orientationY=Wo(this,s,e.orientationY,fe,de),this._orientationZ=Wo(this,s,e.orientationZ,fe,de),this._positionX=Wo(this,s,e.positionX,fe,de),this._positionY=Wo(this,s,e.positionY,fe,de),this._positionZ=Wo(this,s,e.positionZ,fe,de),Zo(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(t){this._nativePannerNode.coneInnerAngle=t}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(t){this._nativePannerNode.coneOuterAngle=t}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(t){this._nativePannerNode.coneOuterGain=t}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(t){this._nativePannerNode.distanceModel=t}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(t){this._nativePannerNode.maxDistance=t}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(t){this._nativePannerNode.panningModel=t}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(t){this._nativePannerNode.refDistance=t}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(t){this._nativePannerNode.rolloffFactor=t}}),Du=(zo=le,(t,{disableNormalization:e,imag:s,real:i})=>{var n=s instanceof Float32Array?s:new Float32Array(s),i=i instanceof Float32Array?i:new Float32Array(i),t=t.createPeriodicWave(i,n,{disableNormalization:e});if(Array.from(s).length<2)throw zo();return t}),Mu=(No=Du,Po=Go=Ma=Qs,jo=new WeakSet,class Lo{constructor(t,e){t=Po(t),e=(t=>{var{imag:e,real:s}=t;return void 0===e?void 0===s?{...t,imag:[0,0],real:[0,0]}:{...t,imag:Array.from(s,()=>0),real:s}:void 0===s?{...t,imag:e,real:Array.from(e,()=>0)}:{...t,imag:e,real:s}})({...ws,...e}),t=No(t,e);return jo.add(t),t}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===Lo.prototype||jo.has(t)}}),Eu=((u,I,F,V,N,p)=>{const P=16385,j=new Float32Array([1,1]),L=Math.PI/2,z={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},W={...z,oversample:"none"},d=(t,e,s,i,n)=>{if(1===e){var r=t,o=s,a=i,h=n;const p=new Float32Array(P),d=new Float32Array(P);for(let t=0;tT){const I=(t-T)/(16384-T)*L;y[t]=Math.cos(I),x[t]=Math.sin(I),w[t]=0,b[t]=1}else{const I=t/(16384-T)*L;y[t]=1,x[t]=0,w[t]=Math.cos(I),b[t]=Math.sin(I)}const S=I(r,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),k=F(r,{...z,gain:0}),A=V(r,{...W,curve:y}),C=F(r,{...z,gain:0}),O=V(r,{...W,curve:x}),D=V(r,{...W,curve:j}),M=F(r,{...z,gain:0}),E=V(r,{...W,curve:w}),R=F(r,{...z,gain:0}),q=V(r,{...W,curve:b});return{connectGraph(){c.connect(S),c.connect(void 0===D.inputs?D:D.inputs[0]),S.connect(k,0),S.connect(C,0),S.connect(M,1),S.connect(R,1),D.connect(l),l.connect(void 0===A.inputs?A:A.inputs[0]),l.connect(void 0===O.inputs?O:O.inputs[0]),l.connect(void 0===E.inputs?E:E.inputs[0]),l.connect(void 0===q.inputs?q:q.inputs[0]),A.connect(k.gain),O.connect(C.gain),E.connect(M.gain),q.connect(R.gain),k.connect(u,0,0),M.connect(u,0,0),C.connect(u,0,1),R.connect(u,0,1)},disconnectGraph(){c.disconnect(S),c.disconnect(void 0===D.inputs?D:D.inputs[0]),S.disconnect(k,0),S.disconnect(C,0),S.disconnect(M,1),S.disconnect(R,1),D.disconnect(l),l.disconnect(void 0===A.inputs?A:A.inputs[0]),l.disconnect(void 0===O.inputs?O:O.inputs[0]),l.disconnect(void 0===E.inputs?E:E.inputs[0]),l.disconnect(void 0===q.inputs?q:q.inputs[0]),A.disconnect(k.gain),O.disconnect(C.gain),E.disconnect(M.gain),q.disconnect(R.gain),k.disconnect(u,0,0),M.disconnect(u,0,0),C.disconnect(u,0,1),R.disconnect(u,0,1)}}}};return(e,{channelCount:t,channelCountMode:s,pan:i,...n})=>{if("max"===s)throw N();const r=u(e,{...n,channelCount:1,channelCountMode:s,numberOfInputs:2}),o=F(e,{...n,channelCount:t,channelCountMode:s,gain:1}),a=F(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:i});let{connectGraph:h,disconnectGraph:c}=d(e,t,o,a,r);Object.defineProperty(a.gain,"defaultValue",{get:()=>0}),Object.defineProperty(a.gain,"maxValue",{get:()=>1}),Object.defineProperty(a.gain,"minValue",{get:()=>-1});n={get bufferSize(){},get channelCount(){return o.channelCount},set channelCount(t){o.channelCount!==t&&(l&&c(),{connectGraph:h,disconnectGraph:c}=d(e,t,o,a,r),l&&h()),o.channelCount=t},get channelCountMode(){return o.channelCountMode},set channelCountMode(t){if("clamped-max"===t||"max"===t)throw N();o.channelCountMode=t},get channelInterpretation(){return o.channelInterpretation},set channelInterpretation(t){o.channelInterpretation=t},get context(){return o.context},get inputs(){return[o]},get numberOfInputs(){return o.numberOfInputs},get numberOfOutputs(){return o.numberOfOutputs},get pan(){return a.gain},addEventListener:(...t)=>o.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>o.dispatchEvent(t[0]),removeEventListener:(...t)=>o.removeEventListener(t[0],t[1],t[2])};let l=!1;return p(ps(n,r),()=>{h(),l=!0},()=>{c(),l=!1})}})(Ql,us,fs,Su,gs,Ul),Ru=(Fo=Eu,Vo=gs,(t,e)=>{const s=e.channelCountMode;if("clamped-max"===s)throw Vo();if(void 0===t.createStereoPanner)return Fo(t,e);t=t.createStereoPanner();return R(t,e),i(t,e,"pan"),Object.defineProperty(t,"channelCountMode",{get:()=>s,set:t=>{if(t!==s)throw Vo()}}),t}),qu=(Mo=Il,Ro=m,qo=Vl,()=>{const n=new WeakMap;return{render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=Ro(t);var i=u(s,e);if(!i){const Mo={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,pan:s.pan.value};s=Eo(e,Mo)}return n.set(e,s),i?await Mo(e,t.pan,s.pan):await qo(e,t.pan,s.pan),Ae(s)?await Io(t,e,s.inputs[0]):await Io(t,e,s),s})(t,e)}}}),Iu=(n=e,ko=Pl,Ao=Eo=Ru,Co=qu,class extends n{constructor(t,e){var s=Oo(t),e={...bs,...e},e=Ao(s,e),s=Do(s);super(t,!1,e,s?Co():null),this._pan=ko(this,s,e.pan)}get pan(){return this._pan}}),Fu=(To=m,So=Io=Us,()=>{const i=new WeakMap;return{render(t,e){var s=i.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=To(t);if(!u(s,e)){const To={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,curve:s.curve,oversample:s.oversample};s=bo(e,To)}return i.set(e,s),Ae(s)?await So(t,e,s.inputs[0]):await So(t,e,s),s})(t,e)}}}),Vu=(r=e,mo=a,go=bo=Su,vo=Fu,yo=Oo=Qs,xo=Do=Zs,wo=Wl,class extends r{constructor(t,e){var s=yo(t),e={...Ts,...e},e=go(s,e);super(t,!0,e,xo(s)?vo():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=e,wo(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(t){if(null===t)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(t.length<2)throw mo();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=t}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(t){this._nativeWaveShaperNode.oversample=t}}),Nu=null!==(n=zs)&&n.isSecureContext,Pu=(_o=zs,(t,e,s)=>{Object.defineProperties(_o,{currentFrame:{configurable:!0,get:()=>Math.round(t*e)},currentTime:{configurable:!0,get:()=>t}});try{return s()}finally{null!==_o&&(delete _o.currentFrame,delete _o.currentTime)}}),ju=new WeakMap,Lu=(po=ju,fo=t,t=>{let e=po.get(t);if(void 0!==e)return e;if(null===fo)throw new Error("Missing the native OfflineAudioContext constructor.");return e=new fo(1,1,44100),po.set(t,e),e}),zu=Nu?((r,o,a,l,u,p,d,f,_,m,g,v,y)=>{let x=0;return(e,s,h={credentials:"omit"})=>{const t=g.get(e);if(void 0!==t&&t.has(s))return Promise.resolve();const i=m.get(e);if(void 0!==i){const r=i.get(s);if(void 0!==r)return r}const c=p(e),n=void 0===c.audioWorklet?u(s).then(([t,e])=>{var[t,e]=$t(t,e);return a(t+`;((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${e}
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Tone=e():t.Tone=e()}("undefined"!=typeof self?self:this,()=>{var s={871:function(t,e,s){!function(t,c,s,e){"use strict";function u(t,e,s){return{endTime:e,insertTime:s,type:"exponentialRampToValue",value:t}}function p(t,e,s){return{endTime:e,insertTime:s,type:"linearRampToValue",value:t}}function d(t,e){return{startTime:e,type:"setValue",value:t}}function f(t,e,s){return{duration:s,startTime:e,type:"setValueCurve",values:t}}function l(t,e,s){var i=s.startTime,n=s.target,s=s.timeConstant;return n+(e-n)*Math.exp((i-t)/s)}function _(t){return"exponentialRampToValue"===t.type}function m(t){return"linearRampToValue"===t.type}function g(t){return _(t)||m(t)}function v(t){return"setValue"===t.type}function y(t){return"setValueCurve"===t.type}function x(t,e,s,i){var n=t[e];return void 0===n?i:g(n)||v(n)?n.value:y(n)?n.values[n.values.length-1]:l(s,x(t,e-1,n.startTime,i),n)}function w(t,e,s,i,n){return void 0===s?[i.insertTime,n]:g(s)?[s.endTime,s.value]:v(s)?[s.startTime,s.value]:y(s)?[s.startTime+s.duration,s.values[s.values.length-1]]:[s.startTime,x(t,e-1,s.startTime,n)]}function b(t){return"cancelAndHold"===t.type}function T(t){return"cancelScheduledValues"===t.type}function S(t){return b(t)||T(t)?t.cancelTime:_(t)||m(t)?t.endTime:t.startTime}function k(t,e,s,i){var n=i.endTime,i=i.value;return s===i?i:0=s:S(t)>=s}),i=this._automationEvents[t];if(-1!==t&&(this._automationEvents=this._automationEvents.slice(0,t)),b(e)){var n=this._automationEvents[this._automationEvents.length-1];if(void 0!==i&&g(i)){if(void 0!==n&&C(n))throw new Error("The internal list is malformed.");var t=void 0===n?i.insertTime:y(n)?n.startTime+n.duration:S(n),r=void 0===n?this._defaultValue:y(n)?n.values[n.values.length-1]:n.value,t=(_(i)?k:A)(s,t,r,i),r=(_(i)?u:p)(t,s,this._currenTime);this._automationEvents.push(r)}if(void 0!==n&&C(n)&&this._automationEvents.push(d(this.getValue(s),s)),void 0!==n&&y(n)&&n.startTime+n.duration>s){var i=s-n.startTime,t=(n.values.length-1)/n.duration,o=Math.max(2,1+Math.ceil(i*t)),a=i/(o-1)*t,h=n.values.slice(0,o);if(a<1)for(var c=1;cs}),t=-1===r?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[r-1];if(void 0!==t&&y(t)&&S(t)+t.duration>s)return!1;i=_(e)?u(e.value,e.endTime,this._currenTime):m(e)?p(e.value,s,this._currenTime):e;if(-1===r)this._automationEvents.push(i);else{if(y(e)&&s+e.duration>S(this._automationEvents[r]))return!1;this._automationEvents.splice(r,0,i)}}return!0}},{key:"flush",value:function(e){var t,s,i=this._automationEvents.findIndex(function(t){return S(t)>e});1e}),a=this._automationEvents[o],o=(-1===o?this._automationEvents.length:o)-1,h=this._automationEvents[o];return void 0!==h&&C(h)&&(void 0===a||!g(a)||a.insertTime>e)?l(e,x(this._automationEvents,o-1,h.startTime,this._defaultValue),h):void 0===h||!v(h)||void 0!==a&&g(a)?void 0!==h&&y(h)&&(void 0===a||!g(a)||h.startTime+h.duration>e)?e{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=new Array(e);s{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},805:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},989:(t,e,s)=>{var n=s(498);function i(t,e){for(var s=0;s{t.exports=function(t,e){var s=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=s){var i,n,r,o,a=[],h=!0,c=!1;try{if(r=(s=s.call(t)).next,0===e){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=r.call(s)).done)&&(a.push(i.value),a.length!==e);h=!0);}catch(t){c=!0,n=t}finally{try{if(!h&&null!=s.return&&(o=s.return(),Object(o)!==o))return}finally{if(c)throw n}}return a}},t.exports.__esModule=!0,t.exports.default=t.exports},18:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},821:(t,e,s)=>{var i=s(569),n=s(474),r=s(744),o=s(18);t.exports=function(t,e){return i(t)||n(t,e)||r(t,e)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},327:(t,e,s)=>{var i=s(564).default;t.exports=function(t,e){if("object"!=i(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0===s)return("string"===e?String:Number)(t);s=s.call(t,e||"default");if("object"!=i(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")},t.exports.__esModule=!0,t.exports.default=t.exports},498:(t,e,s)=>{var i=s(564).default,n=s(327);t.exports=function(t){t=n(t,"string");return"symbol"==i(t)?t:t+""},t.exports.__esModule=!0,t.exports.default=t.exports},564:e=>{function s(t){return e.exports=s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},744:(t,e,s)=>{var i=s(113);t.exports=function(t,e){if(t){if("string"==typeof t)return i(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(s="Object"===s&&t.constructor?t.constructor.name:s)||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?i(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports}},i={};function Dm(t){var e=i[t];if(void 0!==e)return e.exports;e=i[t]={exports:{}};return s[t].call(e.exports,e,e.exports,Dm),e.exports}Dm.d=(t,e)=>{for(var s in e)Dm.o(e,s)&&!Dm.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},Dm.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Dm.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var Mm={};return(()=>{"use strict";Dm.r(Mm),Dm.d(Mm,{AMOscillator:()=>nf,AMSynth:()=>Ff,Abs:()=>xf,Add:()=>uf,AmplitudeEnvelope:()=>Rf,Analyser:()=>em,AudioToGain:()=>sf,AutoFilter:()=>v_,AutoPanner:()=>x_,AutoWah:()=>b_,BaseContext:()=>sd,BiquadFilter:()=>Vf,BitCrusher:()=>S_,Buffer:()=>Am,BufferSource:()=>Om,Buffers:()=>Cm,Channel:()=>hm,Chebyshev:()=>A_,Chorus:()=>E_,Clock:()=>Ed,Compressor:()=>dm,Context:()=>id,Convolver:()=>ym,CrossFade:()=>m_,DCMeter:()=>rm,Delay:()=>Rd,Destination:()=>wm,Distortion:()=>R_,Draw:()=>Sm,DuoSynth:()=>Lf,EQ3:()=>vm,Emitter:()=>ed,Envelope:()=>Of,FFT:()=>nm,FMOscillator:()=>rf,FMSynth:()=>zf,FatOscillator:()=>af,FeedbackCombFilter:()=>$f,FeedbackDelay:()=>I_,Filter:()=>Nf,Follower:()=>w_,Freeverb:()=>j_,Frequency:()=>function(t,e){return new vd(b(),t,e)},FrequencyClass:()=>vd,FrequencyEnvelope:()=>Pf,FrequencyShifter:()=>V_,Gain:()=>C,GainToAudio:()=>wf,Gate:()=>fm,GrainPlayer:()=>yf,GreaterThan:()=>kf,GreaterThanZero:()=>Sf,IntervalTimeline:()=>jd,JCReverb:()=>B_,LFO:()=>ff,Limiter:()=>_m,Listener:()=>Tm,Loop:()=>n_,LowpassCombFilter:()=>Kf,Master:()=>bm,MembraneSynth:()=>Uf,Merge:()=>O_,MetalSynth:()=>Bf,Meter:()=>im,MidSideCompressor:()=>mm,MidSideMerge:()=>H_,MidSideSplit:()=>Y_,Midi:()=>function(t,e){return new Nd(b(),t,e)},MidiClass:()=>Nd,Mono:()=>cm,MonoSynth:()=>jf,MultibandCompressor:()=>gm,MultibandSplit:()=>lm,Multiply:()=>q,Negate:()=>bf,Noise:()=>Yd,NoiseSynth:()=>Gf,Offline:()=>function(t,e){return _(this,arguments,void 0,function*(t,e,s=2,i=b().sampleRate){const n=b(),r=new rd(s,e,i);hd(r),yield t(r);s=r.render(),hd(n),e=yield s;return new w(e)})},OfflineContext:()=>rd,OmniOscillator:()=>lf,OnePoleFilter:()=>Jf,Oscillator:()=>E,PWMOscillator:()=>hf,PanVol:()=>am,Panner:()=>y_,Panner3D:()=>um,Param:()=>k,Part:()=>r_,Pattern:()=>f_,Phaser:()=>Z_,PingPongDelay:()=>G_,PitchShift:()=>Q_,Player:()=>gf,Players:()=>vf,PluckSynth:()=>t_,PolySynth:()=>e_,Pow:()=>Ud,PulseOscillator:()=>of,Recorder:()=>pm,Reverb:()=>X_,Sampler:()=>s_,Scale:()=>pf,ScaleExp:()=>Af,Sequence:()=>__,Signal:()=>O,Solo:()=>F,Split:()=>C_,StateTimeline:()=>wd,StereoWidener:()=>J_,Subtract:()=>Tf,SyncedSignal:()=>Cf,Synth:()=>qf,Ticks:()=>function(t,e){return new D(b(),t,e)},TicksClass:()=>D,Time:()=>function(t,e){return new gd(b(),t,e)},TimeClass:()=>gd,Timeline:()=>Hp,ToneAudioBuffer:()=>w,ToneAudioBuffers:()=>Vd,ToneAudioNode:()=>A,ToneBufferSource:()=>Xd,ToneEvent:()=>i_,ToneOscillatorNode:()=>ef,Transport:()=>xm,TransportTime:()=>function(t,e){return new T(b(),t,e)},TransportTimeClass:()=>T,Tremolo:()=>K_,Unit:()=>N,UserMedia:()=>Kd,Vibrato:()=>tm,Volume:()=>qd,WaveShaper:()=>Bd,Waveform:()=>om,Zero:()=>df,connect:()=>Td,connectSeries:()=>bd,connectSignal:()=>Cd,context:()=>km,dbToGain:()=>cd,debug:()=>V,defaultArg:()=>Wp,disconnect:()=>Sd,fanIn:()=>function(...t){const e=t.pop();o(e)&&t.forEach(t=>Td(t,e))},ftom:()=>dd,gainToDb:()=>ld,getContext:()=>b,getDestination:()=>function(){return b().destination},getDraw:()=>function(){return b().draw},getListener:()=>function(){return b().listener},getTransport:()=>function(){return b().transport},immediate:()=>function(){return b().immediate()},intervalToFrequencyRatio:()=>ud,isArray:()=>d,isBoolean:()=>bp,isDefined:()=>o,isFunction:()=>yp,isNote:()=>Sp,isNumber:()=>xp,isObject:()=>wp,isString:()=>Tp,isUndef:()=>vp,loaded:()=>function(){return w.loaded()},mtof:()=>_d,now:()=>function(){return b().now()},optionsFromArguments:()=>g,setContext:()=>hd,start:()=>function(){return ad.resume()},supported:()=>gp,version:()=>P});var V={},N=(Dm.r(V),Dm.d(V,{assert:()=>l,assertContextRunning:()=>kp,assertRange:()=>f,assertUsedScheduleTime:()=>Dp,enterScheduledCallback:()=>Op,log:()=>Ep,setLogger:()=>function(t){Mp=t},warn:()=>Rp}),{});Dm.r(N);const P="15.1.3";var j,L,z,W,B,U,G,Q,Z,X,Y,H,$,J,K,tt,et,st,it,nt,rt,ot,at,ht,ct,lt,ut,pt,dt,ft,_t,mt,gt,vt,yt,xt,wt,bt,Tt,St,kt,At,Ct,Ot,Dt,Mt,Et,Rt,qt,It,Ft,Vt,Nt,Pt=Dm(871);const jt=new WeakSet,Lt=new WeakMap,zt=new WeakMap,Wt=new WeakMap,Bt=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,Zt=new WeakMap,Xt=new WeakMap,Yt={construct:()=>Yt},Ht=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,$t=(t,e)=>{const s=[];let i=t.replace(/^[\s]+/,""),n=i.match(Ht);for(;null!==n;){const t=n[1].slice(1,-1),r=n[0].replace(/([\s]+)?;?$/,"").replace(t,new URL(t,e).toString());s.push(r),i=i.slice(n[0].length).replace(/^[\s]+/,""),n=i.match(Ht)}return[s.join(";"),i]},Jt=t=>{if(void 0!==t&&!Array.isArray(t))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},Kt=t=>{if(!(t=>{try{new new Proxy(t,Yt)}catch{return!1}return!0})(t))throw new TypeError("The given value for processorCtor should be a constructor.");if(null===t.prototype||"object"!=typeof t.prototype)throw new TypeError("The given value for processorCtor should have a prototype.")},te=(t,e)=>{t=t.get(e);if(void 0===t)throw new Error("A value with the given key could not be found.");return t},ee=(t,e)=>{e=Array.from(t).filter(e);if(1{var n=te(t,e),r=ee(n,t=>t[0]===s&&t[1]===i);return 0===n.size&&t.delete(e),r},ie=t=>te(Gt,t),ne=t=>{if(jt.has(t))throw new Error("The AudioNode is already stored.");jt.add(t),ie(t).forEach(t=>t(!0))},re=t=>"port"in t,oe=t=>{if(!jt.has(t))throw new Error("The AudioNode is not stored.");jt.delete(t),ie(t).forEach(t=>t(!1))},ae=(t,e)=>{!re(t)&&e.every(t=>0===t.size)&&oe(t)},he={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},u=(t,e)=>t.context===e,ce=t=>{try{t.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},le=()=>new DOMException("","IndexSizeError"),ue=e=>{var s;e.getChannelData=(s=e.getChannelData,t=>{try{return s.call(e,t)}catch(t){if(12===t.code)throw le();throw t}})},pe={numberOfChannels:1},de=-34028234663852886e22,fe=-de,_e=t=>jt.has(t),me={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},ge=t=>te(Lt,t),ve=t=>te(Wt,t),ye=(e,s)=>{const t=ge(e)["activeInputs"];t.forEach(t=>t.forEach(([t])=>{s.includes(e)||ye(t,[...s,e])}));var i="playbackRate"in e?[e.playbackRate]:re(e)?Array.from(e.parameters.values()):"frequency"in(i=e)&&"gain"in i?[e.Q,e.detune,e.frequency,e.gain]:"offset"in e?[e.offset]:!("frequency"in(i=e))&&"gain"in i?[e.gain]:"detune"in(i=e)&&"frequency"in i?[e.detune,e.frequency]:"pan"in e?[e.pan]:[];for(const e of i){const t=ve(e);void 0!==t&&t.activeInputs.forEach(([t])=>ye(t,s))}_e(e)&&oe(e)},xe=t=>{ye(t.destination,[])},we=t=>"context"in t,be=t=>we(t[0]),Te=(t,e,s,i)=>{for(const e of t)if(s(e)){if(i)return!1;throw Error("The set contains at least one similar element.")}return t.add(e),!0},Se=(t,e,[s,i],n)=>{Te(t,[e,s,i],t=>t[0]===e&&t[1]===s,n)},ke=(t,[e,s,i],n)=>{var r=t.get(e);void 0===r?t.set(e,new Set([[s,i]])):Te(r,[s,i],t=>t[0]===s,n)},Ae=t=>"inputs"in t,Ce=(t,e,s,i)=>{var n;return Ae(e)?(n=e.inputs[i],t.connect(n,s,0),[n,s,0]):(t.connect(e,s,i),[e,s,i])},Oe=(t,e,s)=>{for(const i of t)if(i[0]===e&&i[1]===s)return t.delete(i),i;return null},De=(t,e)=>{if(!ie(t).delete(e))throw new Error("Missing the expected event listener.")},Me=(t,e,s)=>{var i=te(t,e),n=ee(i,t=>t[0]===s);return 0===i.size&&t.delete(e),n},Ee=(t,e,s,i)=>{Ae(e)?t.disconnect(e.inputs[i],s,0):t.disconnect(e,s,i)},m=t=>te(zt,t),Re=t=>te(Bt,t),qe=t=>Qt.has(t),Ie=t=>!jt.has(t),Fe=(r,o)=>new Promise(e=>{if(null!==o)e(!0);else{const o=r.createScriptProcessor(256,1,1),t=r.createGain(),s=r.createBuffer(1,2,44100),i=s.getChannelData(0),n=(i[0]=1,i[1]=1,r.createBufferSource());n.buffer=s,n.loop=!0,n.connect(o).connect(r.destination),n.connect(t),n.disconnect(t),o.onaudioprocess=t=>{t=t.inputBuffer.getChannelData(0);Array.prototype.some.call(t,t=>1===t)?e(!0):e(!1),n.stop(),o.onaudioprocess=null,n.disconnect(o),o.disconnect(r.destination)},n.start()}}),Ve=(t,s)=>{const e=new Map;for(const s of t)for(const t of s){const s=e.get(t);e.set(t,void 0===s?1:s+1)}e.forEach((t,e)=>s(e,t))},Ne=t=>"context"in t,Pe=(t,e,s,i,n)=>{var[r,o]=((t,e,s,i)=>{var{activeInputs:e,passiveInputs:n}=ge(e),e=Oe(e[i],t,s);return null===e?[se(n,t,s,i)[2],!1]:[e[2],!0]})(t,s,i,n);if(null!==r&&(De(t,r),!o||e||qe(t)||Ee(m(t),m(s),i,n)),_e(s)){const t=ge(s)["activeInputs"];ae(s,t)}},je=(t,e,s,i)=>{var[n,r]=((t,e,s)=>{var{activeInputs:e,passiveInputs:i}=ve(e),e=Oe(e,t,s);return null===e?[Me(i,t,s)[1],!1]:[e[2],!0]})(t,s,i);null!==n&&(De(t,n),!r||e||qe(t)||m(t).disconnect(Re(s),i))};class Le{constructor(t){this._map=new Map(t)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(s,i=null){return this._map.forEach((t,e)=>s.call(i,t,e,this))}get(t){return this._map.get(t)}has(t){return this._map.has(t)}keys(){return this._map.keys()}values(){return this._map.values()}}const ze={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}};function We(t,e,s,i,n){if("function"==typeof t.copyFromChannel)0===e[s].byteLength&&(e[s]=new Float32Array(128)),t.copyFromChannel(e[s],i,n);else{const r=t.getChannelData(i);if(0===e[s].byteLength)e[s]=r.slice(n,n+128);else{const t=new Float32Array(r.buffer,n*Float32Array.BYTES_PER_ELEMENT,128);e[s].set(t)}}}const Be=(t,e,s,i,n)=>{"function"==typeof t.copyToChannel?0!==e[s].byteLength&&t.copyToChannel(e[s],i,n):0!==e[s].byteLength&&t.getChannelData(i).set(e[s],n)},Ue=(e,s)=>{const i=[];for(let t=0;t{const{port1:i,port2:n}=new MessageChannel;return new Promise(t=>{const e=()=>{n.onmessage=null,i.close(),n.close(),t()};n.onmessage=()=>e();try{i.postMessage(s,[s])}catch{}finally{e()}})},$e={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},Je=(t,e,s)=>{e=e[s];if(void 0===e)throw t();return e},Ke={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},ts={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},a=()=>new DOMException("","InvalidStateError"),es=()=>new DOMException("","InvalidAccessError"),ss={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},is=(s,i,n,r,o,a,h,t,c,l,u)=>{var e=l.length;let p=t;for(let t=0;t{var e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const s=t.decodeAudioData(e.buffer,()=>{});return void 0!==s&&(s.catch(()=>{}),!0)}catch{}return!1},h=(t,e,s)=>{e=e[s];void 0!==e&&e!==t[s]&&(t[s]=e)},R=(t,e)=>{h(t,e,"channelCount"),h(t,e,"channelCountMode"),h(t,e,"channelInterpretation")},os=t=>"function"==typeof t.getFloatTimeDomainData,i=(t,e,s)=>{e=e[s];void 0!==e&&e!==t[s].value&&(t[s].value=e)},as=i=>{var n;i.start=(n=i.start,(t=0,e=0,s)=>{if("number"==typeof s&&s<0||e<0||t<0)throw new RangeError("The parameters can't be negative.");n.call(i,t,e,s)})},hs=e=>{var s;e.stop=(s=e.stop,(t=0)=>{if(t<0)throw new RangeError("The parameter can't be negative.");s.call(e,t)})},cs=(t,e)=>null===t?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(t*e))))),ls=(t,e)=>{t=t.createBiquadFilter();return R(t,e),i(t,e,"Q"),i(t,e,"detune"),i(t,e,"frequency"),i(t,e,"gain"),h(t,e,"type"),t},us=(t,e)=>{t=t.createChannelSplitter(e.numberOfOutputs);R(t,e);{const s=(e=t).numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>s,set:t=>{if(t!==s)throw a()}}),Object.defineProperty(e,"channelCountMode",{get:()=>"explicit",set:t=>{if("explicit"!==t)throw a()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>"discrete",set:t=>{if("discrete"!==t)throw a()}})}return t},ps=(t,e)=>(t.connect=e.connect.bind(e),t.disconnect=e.disconnect.bind(e),t),ds=(t,e)=>{t=t.createDelay(e.maxDelayTime);return R(t,e),i(t,e,"delayTime"),t},fs=(t,e)=>{t=t.createGain();return R(t,e),i(t,e,"gain"),t};function _s(e,s){let i=[0,0];for(let t=e.length-1;0<=t;--t)(i=[(n=i)[0]*s[0]-n[1]*s[1],n[0]*s[1]+n[1]*s[0]])[0]+=e[t];var n;return i}const ms=(t,e,s,i)=>t.createScriptProcessor(e,s,i),gs=()=>new DOMException("","NotSupportedError"),vs={numberOfChannels:1},ys={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},xs={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},ws={disableNormalization:!1},bs={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},Ts={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},Ss=(t,e,s)=>void 0===t.copyFromChannel?t.getChannelData(s)[0]:(t.copyFromChannel(e,s),e[0]),ks=t=>{if(null===t)return!1;var e=t.length;return e%2!=0?0!==t[Math.floor(e/2)]:t[e/2-1]+t[e/2]!==0},As=(t,e,s,i)=>{let n=t;for(;!n.hasOwnProperty(e);)n=Object.getPrototypeOf(n);var{get:r,set:o}=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,{get:s(r),set:i(o)})},Cs=(e,s,i)=>{try{e.setValueAtTime(s,i)}catch(t){if(9!==t.code)throw t;Cs(e,s,i+1e-7)}},Os=t=>{const e=t.createOscillator();try{e.start(-1)}catch(t){return t instanceof RangeError}return!1},Ds=t=>{const e=t.createBuffer(1,1,44100),s=t.createBufferSource();s.buffer=e,s.start(),s.stop();try{return s.stop(),!0}catch{return!1}},Ms=t=>{const e=t.createOscillator();try{e.stop(-1)}catch(t){return t instanceof RangeError}return!1},Es=()=>{try{new DOMException}catch{return!1}return!0},Rs=()=>new Promise(e=>{const t=new ArrayBuffer(0),{port1:s,port2:i}=new MessageChannel;s.onmessage=({data:t})=>e(null!==t),i.postMessage(t,[t])}),qs=(i,t)=>{const n=t.createGain(),e=(i.connect(n),s=i.disconnect,()=>{s.call(i,n),i.removeEventListener("ended",e)});var s;i.addEventListener("ended",e),ps(i,n),i.stop=(e=>{let s=!1;return(t=0)=>{if(s)try{e.call(i,t)}catch{n.gain.setValueAtTime(0,t)}else e.call(i,t),s=!0}})(i.stop)},Is=(s,i)=>t=>{var e={value:s};return Object.defineProperties(t,{currentTarget:e,target:e}),("function"==typeof i?i:i.handleEvent).call(s,t)},Fs=(W=Te,(t,e,[s,i,n],r)=>{W(t[i],[e,s,n],t=>t[0]===e&&t[1]===s,r)}),Vs=(z=Te,(t,e,[s,i,n],r)=>{var o=t.get(s);void 0===o?t.set(s,new Set([[i,e,n]])):z(o,[i,e,n],t=>t[0]===i&&t[1]===e,r)}),Ns=(L=ee,(t,e,s,i)=>L(t[i],t=>t[0]===e&&t[1]===s)),Ps=new WeakMap,js=(j=Ps,t=>{return null!=(t=j.get(t))?t:0}),Ls=(B=new Map,U=new WeakMap,(e,t)=>{const s=U.get(e);if(void 0!==s)return s;var i=B.get(e);if(void 0!==i)return i;try{const s=t();return s instanceof Promise?(B.set(e,s),s.catch(()=>!1).then(t=>(B.delete(e),U.set(e,t),t))):(U.set(e,s),s)}catch{return U.set(e,!1),!1}}),zs="undefined"==typeof window?null:window,Ws=(J=Ls,K=le,(t,e)=>{const s=t.createAnalyser();if(R(s,e),e.maxDecibels>e.minDecibels)return h(s,e,"fftSize"),h(s,e,"maxDecibels"),h(s,e,"minDecibels"),h(s,e,"smoothingTimeConstant"),J(os,()=>os(s))||((n=s).getFloatTimeDomainData=e=>{var s=new Uint8Array(e.length),i=(n.getByteTimeDomainData(s),Math.max(s.length,n.fftSize));for(let t=0;t{t=$(t);if(null===t.renderer)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer}),Us=(X=ge,Y=Bs,H=qe,async(o,a,h)=>{const t=X(o);await Promise.all(t.activeInputs.map((t,r)=>Array.from(t).map(async([t,e])=>{const s=Y(t),i=await s.render(t,a),n=o.context.destination;H(t)||o===n&&H(o)||i.connect(h,e,r)})).reduce((t,e)=>[...t,...e],[]))}),Gs=(G=Ws,Q=m,Z=Us,()=>{const i=new WeakMap;return{render(t,e){var s=i.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=Q(t);if(!u(s,e)){const Q={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,fftSize:s.fftSize,maxDecibels:s.maxDecibels,minDecibels:s.minDecibels,smoothingTimeConstant:s.smoothingTimeConstant};s=G(e,Q)}return i.set(e,s),await Z(t,e,s),s})(t,e)}}}),Qs=(tt=Ut,t=>{t=tt.get(t);if(void 0===t)throw a();return t}),t=null===(s=zs)?null:s.hasOwnProperty("OfflineAudioContext")?s.OfflineAudioContext:s.hasOwnProperty("webkitOfflineAudioContext")?s.webkitOfflineAudioContext:null,Zs=(Vt=t,t=>null!==Vt&&t instanceof Vt),Xs=new WeakMap,Ys=(Ft=Is,class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(e,s,i){if(null!==s){let t=this._listeners.get(s);void 0===t&&(t=Ft(this,s),"function"==typeof s&&this._listeners.set(s,t)),this._nativeEventTarget.addEventListener(e,t,i)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,e,s){e=null===e?void 0:this._listeners.get(e);this._nativeEventTarget.removeEventListener(t,void 0===e?null:e,s)}}),Hs=null===(s=zs)?null:s.hasOwnProperty("AudioContext")?s.AudioContext:s.hasOwnProperty("webkitAudioContext")?s.webkitAudioContext:null,$s=(It=Hs,t=>null!==It&&t instanceof It),Js=(qt=zs,t=>null!==qt&&"function"==typeof qt.AudioNode&&t instanceof qt.AudioNode),Ks=(Rt=zs,t=>null!==Rt&&"function"==typeof Rt.AudioParam&&t instanceof Rt.AudioParam),ti=null!==(s=zs)&&s.hasOwnProperty("AudioWorkletNode")?s.AudioWorkletNode:null,e=(Nt=Lt,et=((l,u,p,d,f,_,m,g,v,y,x,w,b)=>{const T=new WeakMap;return(i,n,r,o,a)=>{const{activeInputs:h,passiveInputs:c}=_(n),t=_(i)["outputs"],e=g(i),s=t=>{var e=v(n),s=v(i);if(t){const u=se(c,i,r,o);l(h,i,u,!1),a||w(i)||p(s,e,r,o),b(n)&&ne(n)}else{const l=d(h,i,r,o),p=(u(c,o,l,!1),a||w(i)||f(s,e,r,o),m(n));if(0===p)x(n)&&ae(n,h);else{const l=T.get(n);void 0!==l&&clearTimeout(l),T.set(n,setTimeout(()=>{x(n)&&ae(n,h)},1e3*p))}}};return!!y(t,[n,r,o],t=>t[0]===n&&t[1]===r&&t[2]===o,!0)&&(e.add(s),x(i)?l(h,i,[r,o,s],!0):u(c,o,[i,r,s],!0),!0)}})(Fs,Vs,Ce,Ns,Ee,ge,js,ie,m,Te,_e,qe,Ie),st=Ls,At=Qt,Ct=Ee,Ot=ge,Dt=m,Mt=Re,Et=_e,it=i=>(t,e)=>{var s=At.get(t);if(void 0===s){if(!i&&Et(t)){const At=Dt(t),Et=Ot(t)["outputs"];for(const Ot of Et)if(be(Ot)){const Mt=Dt(Ot[0]);Ct(At,Mt,Ot[1],Ot[2])}else{const Ct=Mt(Ot[0]);At.disconnect(Ct,Ot[1])}}At.set(t,e)}else At.set(t,s+e)},nt=le,rt=es,ot=gs,vt=Ce,yt=Qt,xt=ge,wt=m,bt=Re,Tt=Qs,St=_e,kt=Zs,at=(t,e)=>{var s=yt.get(t);if(void 0===s)throw new Error("Missing the expected cycle count.");var i=Tt(t.context),i=kt(i);if(s===e){if(yt.delete(t),!i&&St(t)){const yt=wt(t),Tt=xt(t)["outputs"];for(const xt of Tt)if(be(xt)){const bt=wt(xt[0]);vt(yt,bt,xt[1],xt[2])}else{const vt=bt(xt[0]);yt.connect(vt,xt[1])}}}else yt.set(t,s-e)},_t=Xs,mt=ge,gt=te,ht=function e(s,t){const i=we(t)?t:gt(_t,t);if("delayTime"in i)return[];if(s[0]===i)return[s];if(s.includes(i))return[];t=mt(i).outputs;return Array.from(t).map(t=>e([...s,i],t[0])).reduce((t,e)=>t.concat(e),[])},s=Ys,lt=$s,ut=Js,pt=Ks,ft=ti,class extends s{constructor(t,e,s,i){super(s),this._context=t,this._nativeAudioNode=s;const n=ct(t);if(lt(n)&&!0!==st(Fe,()=>Fe(n,ft))){var r=s,o,a;const c=new Map;r.connect=(a=r.connect.bind(r),(t,e=0,s=0)=>{const i=Ne(t)?a(t,e,s):a(t,e),n=c.get(t);return void 0===n?c.set(t,[{input:s,output:e}]):n.every(t=>t.input!==s||t.output!==e)&&n.push({input:s,output:e}),i}),r.disconnect=(o=r.disconnect,(e,s,i)=>{if(o.apply(r),void 0===e)c.clear();else if("number"==typeof e)for(const[r,o]of c){const s=o.filter(t=>t.output!==e);0===s.length?c.delete(r):c.set(r,s)}else if(c.has(e))if(void 0===s)c.delete(e);else{const r=c.get(e);if(void 0!==r){const o=r.filter(t=>t.output!==s&&(t.input!==i||void 0===i));0===o.length?c.delete(e):c.set(e,o)}}for(const[o,e]of c)e.forEach(t=>{Ne(o)?r.connect(o,t.output,t.input):r.connect(o,t.output)})})}zt.set(this,s),Gt.set(this,new Set),"closed"!==t.state&&e&&ne(this);{t=this,e=i;var h=s;const l=[];for(let t=0;t=this._nativeAudioNode.numberOfOutputs)throw nt();var i=ct(this._context),i=dt(i);if(ut(t)||pt(t))throw rt();if(we(t)){const nt=m(t);try{const et=Ce(this._nativeAudioNode,nt,e,s),it=Ie(this);(i||it)&&this._nativeAudioNode.disconnect(...et),"closed"!==this.context.state&&!it&&Ie(t)&&ne(t)}catch(t){if(12===t.code)throw rt();throw t}if(et(this,t,e,s,i)){const et=ht([this],t);Ve(et,it(i))}return t}s=Re(t);if("playbackRate"===s.name&&1024===s.maxValue)throw ot();try{this._nativeAudioNode.connect(s,e),(i||Ie(this))&&this._nativeAudioNode.disconnect(s,e)}catch(t){if(12===t.code)throw rt();throw t}if(((r,o,a,h)=>{const{activeInputs:c,passiveInputs:l}=ve(o),t=ge(r)["outputs"],e=ie(r),s=t=>{const e=m(r),s=Re(o);if(t){const o=Me(l,r,a);Se(c,r,o,!1),h||qe(r)||e.connect(s,a)}else{t=c,i=r,n=a;const o=ee(t,t=>t[0]===i&&t[1]===n);ke(l,o,!1),h||qe(r)||e.disconnect(s,a)}var i,n};return!!Te(t,[o,a],t=>t[0]===o&&t[1]===a,!0)&&(e.add(s),_e(r)?Se(c,r,[a,s],!0):ke(l,[r,a,s],!0),!0)})(this,t,e,i)){const et=ht([this],t);Ve(et,it(i))}}disconnect(t,e,s){let i;var n=ct(this._context),n=dt(n);if(void 0===t)i=((t,e)=>{const s=ge(t),i=[];for(const n of s.outputs)(be(n)?Pe:je)(t,e,...n),i.push(n[0]);return s.outputs.clear(),i})(this,n);else if("number"==typeof t){if(t<0||t>=this.numberOfOutputs)throw nt();i=((t,e,s)=>{const i=ge(t),n=[];for(const r of i.outputs)r[1]===s&&((be(r)?Pe:je)(t,e,...r),n.push(r[0]),i.outputs.delete(r));return n})(this,n,t)}else{if(void 0!==e&&(e<0||e>=this.numberOfOutputs))throw nt();if(we(t)&&void 0!==s&&(s<0||s>=t.numberOfInputs))throw nt();if(0===(i=((e,s,i,n,r)=>{const o=ge(e);return Array.from(o.outputs).filter(t=>!(t[0]!==i||void 0!==n&&t[1]!==n||void 0!==r&&t[2]!==r)).map(t=>((be(t)?Pe:je)(e,s,...t),o.outputs.delete(t),t[0]))})(this,n,t,e,s)).length)throw rt()}for(const t of i){const e=ht([this],t);Ve(e,at)}}});s=e,ei=Gs,si=le,ii=Ws,ni=ct=Qs,ri=dt=Zs;var ei,si,ii,ni,ri,oi,ai,hi,ci,li,ui,pi,di,fi,_i,mi,gi,vi,yi,xi,wi,bi,Ti,Si,ki,Ai,Ci,Oi,Di,Mi,Ei,Ri,qi,Ii,Fi,Vi,Ni,Pi,ji,Li,zi,Wi,Bi,Ui,Gi,Qi,Zi,Xi,Yi,Hi,$i,Ji,Ki,tn,en,sn,nn,rn,on,an,hn,cn,ln,un,pn,dn,fn,_n,mn,gn,vn,yn,xn,wn,bn,Tn,Sn,kn,An,Cn,On,Dn,Mn,En,Rn,qn,In,Fn,Vn,Nn,Pn,jn,Ln,zn,Wn,Bn,Un,Gn,c,Qn,Zn,Xn,Yn,Hn,$n,Jn,Kn,tr,er,sr,ir,nr,rr,or,ar,hr,cr,lr,ur,pr,dr,fr,_r,mr,gr,vr,yr,xr,wr,br,Tr,Sr,kr,Ar,Cr,Or,Dr,Mr,Er,Rr,qr,Ir,Fr,Vr,Nr,Pr,jr,Lr,zr,Wr,Br,Ur,Gr,Qr,Zr,Xr,Yr,Hr,$r,Jr,Kr,to,eo,so,io,no,ro,oo,ao,ho,co,lo,uo,po,fo,_o,mo,go,vo,yo,xo,wo,bo,To,So,ko,Ao,Co,Oo,Do,Mo,Eo,Ro,qo,Io,Fo,Vo,No,Po,jo,Lo,zo,Wo,Bo,Uo,Go,Qo,Zo,p,Xo,Yo,Ho,$o,Jo,Ko,ta,ea,sa,ia,na,ra,oa,aa,ha,ca,la,ua,pa,da,fa,_a,ma,ga,va,ya,xa,wa,ba,Ta,Sa,ka,Aa,Ca,Oa,Da,Ma,Ea,Ra,qa,Ia,Fa,Va,Na,Pa,ja,La,za,Wa,Ba,Ua,Ga,Qa,Za,Xa,Ya,Ha,$a,Ja,Ka,th,eh,sh,ih,nh,rh,oh,ah,hh,ch,lh,uh,ph,dh,fh,_h,mh,gh,vh,yh,xh,wh,bh,Th,Sh,kh,Ah,Ch,Oh,Dh,Mh,Eh,Rh,qh,Ih,Fh,Vh,Nh,Ph,jh,Lh,zh,Wh,Bh,Uh,Gh,Qh,Zh,Xh,Yh,Hh,$h,Jh,Kh,tc,ec,sc,ic,nc,rc,oc,ac,hc,cc,lc,uc,pc,dc,fc,_c,mc,gc,vc,yc,xc,wc,bc,Tc,Sc,kc,Ac,Cc,Oc,Dc,Mc,Ec,Rc,qc,Ic,Fc,Vc,Nc,Pc,jc,Lc,zc,Wc,Bc,Uc,Gc,Qc,Zc,Xc,Yc,Hc,$c,Jc,Kc,tl,el,sl,il,nl,rl,ol,al,hl,cl,ll,ul,pl,dl,fl,_l,ml,gl,vl,yl,xl,wl,bl,Tl,Sl,kl,Al,Cl,s=class extends s{constructor(t,e){var s=ni(t),e={...he,...e},e=ii(s,e);super(t,!1,e,ri(s)?ei():null),this._nativeAnalyserNode=e}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(t){this._nativeAnalyserNode.fftSize=t}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(t){var e=this._nativeAnalyserNode.maxDecibels;if(!((this._nativeAnalyserNode.maxDecibels=t)>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=e,si()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(t){var e=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=t,!(this._nativeAnalyserNode.maxDecibels>t))throw this._nativeAnalyserNode.minDecibels=e,si()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(t){this._nativeAnalyserNode.smoothingTimeConstant=t}getByteFrequencyData(t){this._nativeAnalyserNode.getByteFrequencyData(t)}getByteTimeDomainData(t){this._nativeAnalyserNode.getByteTimeDomainData(t)}getFloatFrequencyData(t){this._nativeAnalyserNode.getFloatFrequencyData(t)}getFloatTimeDomainData(t){this._nativeAnalyserNode.getFloatTimeDomainData(t)}},Ol=new WeakSet,n=null!==(n=zs)&&n.hasOwnProperty("AudioBuffer")?n.AudioBuffer:null,r=(oi=new Uint32Array(1),t=>(oi[0]=t,oi[0]));Gi=le;const Dl=a=>{a.copyFromChannel=(e,t,s=0)=>{var i=Ui(s),s=Ui(t);if(s>=a.numberOfChannels)throw Gi();var n=a.length,r=a.getChannelData(s),o=e.length;for(let t=i<0?-i:0;t+i{var i=Ui(s),s=Ui(t);if(s>=a.numberOfChannels)throw Gi();const n=a.length,r=a.getChannelData(s),o=e.length;for(let t=i<0?-i:0;t+i{var n,r;i.copyFromChannel=(r=i.copyFromChannel,(t,e,s=0)=>{s=Bi(s),e=Bi(e);if(s{s=Bi(s),e=Bi(e);if(s{let p=null;return class e{constructor(t){if(null===h)throw new Error("Missing the native OfflineAudioContext constructor.");var{length:t,numberOfChannels:e,sampleRate:s}={...pe,...t};null===p&&(p=new h(1,1,44100));const i=null!==a&&r(c,c)?new a({length:t,numberOfChannels:e,sampleRate:s}):p.createBuffer(e,t,s);if(0===i.numberOfChannels)throw o();return"function"!=typeof i.copyFromChannel?(l(i),ue(i)):r(ce,()=>ce(i))||u(i),n.add(i),i}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===e.prototype||n.has(t)}}})(Ol,Ls,gs,n,t,(Wi=n,()=>{if(null===Wi)return!1;try{new Wi({length:1,sampleRate:44100})}catch{return!1}return!0}),Dl,Ml),Rl=(zi=fs,(t,e)=>{const s=zi(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0}),i=(e.connect(s).connect(t.destination),()=>{e.removeEventListener("ended",i),e.disconnect(s),s.disconnect()});e.addEventListener("ended",i)}),ql=(Pi=Bs,ji=ve,Li=qe,async(t,n,r)=>{t=ji(t);await Promise.all(Array.from(t.activeInputs).map(async([t,e])=>{const s=Pi(t),i=await s.render(t,n);Li(t)||i.connect(r,e)}))}),Il=(Ni=ql,(t,e,s)=>Ni(e,t,s)),Fl=(Ai=Rl,Ci=Ls,Oi=t=>{const e=t.createBufferSource();e.start();try{e.start()}catch{return!0}return!1},Di=t=>{const e=t.createBufferSource(),s=t.createBuffer(1,1,44100);e.buffer=s;try{e.start(0,1)}catch{return!1}return!0},Mi=t=>{const e=t.createBufferSource();e.start();try{e.stop()}catch{return!1}return!0},Ei=Os,Ri=Ds,qi=Ms,Vi=As,Ii=(s,t)=>{const i=t.createBuffer(1,1,44100);null===s.buffer&&(s.buffer=i),Vi(s,"buffer",e=>()=>{var t=e.call(s);return t===i?null:t},e=>t=>e.call(s,null===t?i:t))},Fi=qs,(t,e)=>{var n,r,o,s=t.createBufferSource();return R(s,e),i(s,e,"playbackRate"),h(s,e,"buffer"),h(s,e,"loop"),h(s,e,"loopEnd"),h(s,e,"loopStart"),Ci(Oi,()=>Oi(t))||((o=s).start=(i=>{let n=!1;return(t=0,e=0,s)=>{if(n)throw a();i.call(o,t,e,s),n=!0}})(o.start)),Ci(Di,()=>Di(t))||((n=s).start=(r=n.start,(t=0,e=0,s)=>{var i=n.buffer,e=null===i?e:Math.min(i.duration,e);null!==i&&e>i.duration-.5/n.context.sampleRate?r.call(n,t,0,0):r.call(n,t,e,s)})),Ci(Mi,()=>Mi(t))||Ii(s,t),Ci(Ei,()=>Ei(t))||as(s),Ci(Ri,()=>Ri(t))||Fi(s,t),Ci(qi,()=>qi(t))||hs(s),Ai(t,s),s}),Vl=(ki=ve,Ti=t=>{t=ki(t);if(null===t.renderer)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return t.renderer},Si=ql,(t,e,s)=>(Ti(e).replay(s),Si(e,t,s))),Nl=(vi=Il,yi=Fl,xi=m,wi=Vl,bi=Us,()=>{const n=new WeakMap;let r=null,o=null;return{set start(t){r=t},set stop(t){o=t},render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=xi(t);var i=u(s,e);if(!i){const vi={buffer:s.buffer,channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,loop:s.loop,loopEnd:s.loopEnd,loopStart:s.loopStart,playbackRate:s.playbackRate.value};s=yi(e,vi),null!==r&&s.start(...r),null!==o&&s.stop(o)}return n.set(e,s),i?await vi(e,t.playbackRate,s.playbackRate):await wi(e,t.playbackRate,s.playbackRate),await bi(t,e,s),s})(t,e)}}}),Pl=(Qi=Wt,ai=Xs,hi=Bt,ci=Pt.createCancelAndHoldAutomationEvent,li=Pt.createCancelScheduledValuesAutomationEvent,ui=Pt.createExponentialRampToValueAutomationEvent,pi=Pt.createLinearRampToValueAutomationEvent,di=Pt.createSetTargetAutomationEvent,fi=Pt.createSetValueAutomationEvent,_i=Pt.createSetValueCurveAutomationEvent,mi=Hs,gi=Cs,(p,t,d,e=null,s=null)=>{const i=d.value,f=new Pt.AutomationEventList(i),_=t?(c=f,{replay(t){for(const e of c)if("exponentialRampToValue"===e.type){const{endTime:c,value:s}=e;t.exponentialRampToValueAtTime(s,c)}else if("linearRampToValue"===e.type){const{endTime:c,value:i}=e;t.linearRampToValueAtTime(i,c)}else if("setTarget"===e.type){const{startTime:c,target:n,timeConstant:r}=e;t.setTargetAtTime(n,c,r)}else if("setValue"===e.type){const{startTime:c,value:o}=e;t.setValueAtTime(o,c)}else{if("setValueCurve"!==e.type)throw new Error("Can't apply an unknown automation.");{const{duration:c,startTime:a,values:h}=e;t.setValueCurveAtTime(h,a,c)}}}}):null,m={get defaultValue(){return i},get maxValue(){return null===e?d.maxValue:e},get minValue(){return null===s?d.minValue:s},get value(){return d.value},set value(t){d.value=t,m.setValueAtTime(t,p.context.currentTime)},cancelAndHoldAtTime(t){var e,s;return"function"==typeof d.cancelAndHoldAtTime?(null===_&&f.flush(p.context.currentTime),f.add(ci(t)),d.cancelAndHoldAtTime(t)):(e=Array.from(f).pop(),null===_&&f.flush(p.context.currentTime),f.add(ci(t)),s=Array.from(f).pop(),d.cancelScheduledValues(t),e!==s&&void 0!==s&&("exponentialRampToValue"===s.type?d.exponentialRampToValueAtTime(s.value,s.endTime):"linearRampToValue"===s.type?d.linearRampToValueAtTime(s.value,s.endTime):"setValue"===s.type?d.setValueAtTime(s.value,s.startTime):"setValueCurve"===s.type&&d.setValueCurveAtTime(s.values,s.startTime,s.duration))),m},cancelScheduledValues:t=>(null===_&&f.flush(p.context.currentTime),f.add(li(t)),d.cancelScheduledValues(t),m),exponentialRampToValueAtTime(t,e){if(0===t)throw new RangeError;if(!Number.isFinite(e)||e<0)throw new RangeError;var s=p.context.currentTime;return null===_&&f.flush(s),0===Array.from(f).length&&(f.add(fi(i,s)),d.setValueAtTime(i,s)),f.add(ui(t,e)),d.exponentialRampToValueAtTime(t,e),m},linearRampToValueAtTime(t,e){var s=p.context.currentTime;return null===_&&f.flush(s),0===Array.from(f).length&&(f.add(fi(i,s)),d.setValueAtTime(i,s)),f.add(pi(t,e)),d.linearRampToValueAtTime(t,e),m},setTargetAtTime:(t,e,s)=>(null===_&&f.flush(p.context.currentTime),f.add(di(t,e,s)),d.setTargetAtTime(t,e,s),m),setValueAtTime:(t,e)=>(null===_&&f.flush(p.context.currentTime),f.add(fi(t,e)),d.setValueAtTime(t,e),m),setValueCurveAtTime(t,e,s){var i=t instanceof Float32Array?t:new Float32Array(t);if(null!==mi&&"webkitAudioContext"===mi.name){const t=e+s,r=p.context.sampleRate,o=Math.ceil(e*r),a=Math.floor(t*r),h=a-o,c=new Float32Array(h);for(let t=0;t{this._nativeAudioBufferSourceNode.removeEventListener("ended",t),_e(this)&&oe(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeAudioBufferSourceNode.stop(t),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=t)}}),Ll=(n=e,dl=le,fl=a,yl=fs,xl=As,_l=(t,e,s)=>{const i=t.destination;if(i.channelCount!==e)try{i.channelCount=e}catch{}s&&"explicit"!==i.channelCountMode&&(i.channelCountMode="explicit"),0===i.maxChannelCount&&Object.defineProperty(i,"maxChannelCount",{value:e});const n=yl(t,{channelCount:e,channelCountMode:i.channelCountMode,channelInterpretation:i.channelInterpretation,gain:1});return xl(n,"channelCount",t=>()=>t.call(n),t=>e=>{t.call(n,e);try{i.channelCount=e}catch(t){if(e>i.maxChannelCount)throw t}}),xl(n,"channelCountMode",t=>()=>t.call(n),e=>t=>{e.call(n,t),i.channelCountMode=t}),xl(n,"channelInterpretation",t=>()=>t.call(n),e=>t=>{e.call(n,t),i.channelInterpretation=t}),Object.defineProperty(n,"maxChannelCount",{get:()=>i.maxChannelCount}),n.connect(i),n},class extends n{constructor(t,e){var s=ml(t),i=gl(s),s=_l(s,e,i);super(t,!1,s,i?(i=>{const n=new WeakMap;return{render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{var s=e.destination;return n.set(e,s),await i(t,e,s),s})(t,e)}}})(vl):null),this._isNodeOfNativeOfflineAudioContext=i,this._nativeAudioDestinationNode=s}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(t){if(this._isNodeOfNativeOfflineAudioContext)throw fl();if(t>this._nativeAudioDestinationNode.maxChannelCount)throw dl();this._nativeAudioDestinationNode.channelCount=t}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(t){if(this._isNodeOfNativeOfflineAudioContext)throw fl();this._nativeAudioDestinationNode.channelCountMode=t}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}}),zl=(hl=Il,ll=m,ul=Vl,pl=vl=Us,()=>{const n=new WeakMap;return{render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=ll(t);var i=u(s,e);if(!i){const hl={Q:s.Q.value,channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,detune:s.detune.value,frequency:s.frequency.value,gain:s.gain.value,type:s.type};s=cl(e,hl)}return n.set(e,s),i?(await hl(e,t.Q,s.Q),await hl(e,t.detune,s.detune),await hl(e,t.frequency,s.frequency),await hl(e,t.gain,s.gain)):(await ul(e,t.Q,s.Q),await ul(e,t.detune,s.detune),await ul(e,t.frequency,s.frequency),await ul(e,t.gain,s.gain)),await pl(t,e,s),s})(t,e)}}}),Wl=(al=Ps,(t,e)=>al.set(t,e)),Bl=(r=e,tl=bl=Pl,el=zl,sl=es,il=cl=ls,nl=ml=kl=Qs,rl=gl=Al=Zs,ol=Wl,class extends r{constructor(t,e){var s=nl(t),e={...Ge,...e},e=il(s,e),s=rl(s);super(t,!1,e,s?el():null),this._Q=tl(this,s,e.Q,fe,de),this._detune=tl(this,s,e.detune,1200*Math.log2(fe),-1200*Math.log2(fe)),this._frequency=tl(this,s,e.frequency,t.sampleRate/2,0),this._gain=tl(this,s,e.gain,40*Math.log10(fe),de),this._nativeBiquadFilterNode=e,ol(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(t){this._nativeBiquadFilterNode.type=t}getFrequencyResponse(t,e,s){try{this._nativeBiquadFilterNode.getFrequencyResponse(t,e,s)}catch(t){if(11===t.code)throw sl();throw t}if(t.length!==e.length||e.length!==s.length)throw sl()}}),Ul=(Jc=Te,Kc=Js,(r,n,o)=>{const a=new Set;return r.connect=(c=r.connect,(e,s=0,i=0)=>{var t=0===a.size;if(Kc(e))return c.call(r,e,s,i),Jc(a,[e,s,i],t=>t[0]===e&&t[1]===s&&t[2]===i,!0),t&&n(),e;c.call(r,e,s),Jc(a,[e,s],t=>t[0]===e&&t[1]===s,!0),t&&n()}),r.disconnect=(h=r.disconnect,(t,e,s)=>{var i=0{s.channelCount=1,s.channelCountMode="explicit",Object.defineProperty(s,"channelCount",{get:()=>1,set:()=>{throw Hc()}}),Object.defineProperty(s,"channelCountMode",{get:()=>"explicit",set:()=>{throw Hc()}});const i=t.createBufferSource();$c(s,()=>{var e=s.numberOfInputs;for(let t=0;ti.disconnect(s))}),Ql=(Xc=Hs,Yc=Gl,(t,e)=>{var s=t.createChannelMerger(e.numberOfInputs);return null!==Xc&&"webkitAudioContext"===Xc.name&&Yc(t,s),R(s,e),s}),Zl=(Qc=m,()=>{const i=new WeakMap;return{render(t,e){var s=i.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=Qc(t);if(!u(s,e)){const Qc={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,numberOfInputs:s.numberOfInputs};s=Gc(e,Qc)}return i.set(e,s),await Zc(t,e,s),s})(t,e)}}}),Xl=(n=e,zc=Zl,class extends n{constructor(t,e){var s=Bc(t),e={...Qe,...e};super(t,!1,Wc(s,e),Uc(s)?zc():null)}}),Yl=(jc=m,()=>{const i=new WeakMap;return{render(t,e){var s=i.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=jc(t);if(!u(s,e)){const jc={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,numberOfOutputs:s.numberOfOutputs};s=Pc(e,jc)}return i.set(e,s),await Lc(t,e,s),s})(t,e)}}}),Hl=(r=e,Ic=Yl,Fc=Pc=us,class extends r{constructor(t,e){var s=Vc(t),e={...e={...Ze,...e},channelCount:e.numberOfOutputs};super(t,!1,Fc(s,e),Nc(s)?Ic():null)}}),$l=(qc=$c=Ul,(t,{offset:e,...s})=>{const i=t.createBuffer(1,2,44100),n=Ec(t,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=Rc(t,{...s,gain:e}),o=i.getChannelData(0);o[0]=1,o[1]=1,n.buffer=i,n.loop=!0;s={get bufferSize(){},get channelCount(){return r.channelCount},set channelCount(t){r.channelCount=t},get channelCountMode(){return r.channelCountMode},set channelCountMode(t){r.channelCountMode=t},get channelInterpretation(){return r.channelInterpretation},set channelInterpretation(t){r.channelInterpretation=t},get context(){return r.context},get inputs(){return[]},get numberOfInputs(){return n.numberOfInputs},get numberOfOutputs(){return r.numberOfOutputs},get offset(){return r.gain},get onended(){return n.onended},set onended(t){n.onended=t},addEventListener:(...t)=>n.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>n.dispatchEvent(t[0]),removeEventListener:(...t)=>n.removeEventListener(t[0],t[1],t[2]),start(t=0){n.start.call(n,t)},stop(t=0){n.stop.call(n,t)}};return Mc(t,n),qc(ps(s,r),()=>n.connect(r),()=>n.disconnect(r))}),Jl=(kc=Mc=Rl,Ac=Ls,Cc=$l,Oc=Os,Dc=Ms,(t,e)=>{if(void 0===t.createConstantSource)return Cc(t,e);var s=t.createConstantSource();return R(s,e),i(s,e,"offset"),Ac(Oc,()=>Oc(t))||as(s),Ac(Dc,()=>Dc(t))||hs(s),kc(t,s),s}),Kl=(bc=m,()=>{const n=new WeakMap;let r=null,o=null;return{set start(t){r=t},set stop(t){o=t},render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=bc(t);var i=u(s,e);if(!i){const xc={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,offset:s.offset.value};s=wc(e,xc),null!==r&&s.start(r),null!==o&&s.stop(o)}return n.set(e,s),i?await xc(e,t.offset,s.offset):await Tc(e,t.offset,s.offset),await Sc(t,e,s),s})(t,e)}}}),tu=(n=e,_c=Kl,yc=Is,class extends n{constructor(t,e){var s=gc(t),e={...Xe,...e},e=mc(s,e),s=vc(s),i=s?_c():null;super(t,!1,e,i),this._constantSourceNodeRenderer=i,this._nativeConstantSourceNode=e,this._offset=fc(this,s,e.offset,fe,de),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(t){var e="function"==typeof t?yc(this,t):null,s=(this._nativeConstantSourceNode.onended=e,this._nativeConstantSourceNode.onended);this._onended=null!==s&&s===e?t:s}start(t=0){if(this._nativeConstantSourceNode.start(t),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.start=t),"closed"!==this.context.state){ne(this);const t=()=>{this._nativeConstantSourceNode.removeEventListener("ended",t),_e(this)&&oe(this)};this._nativeConstantSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeConstantSourceNode.stop(t),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=t)}}),eu=(t,e)=>{const s=t.createConvolver();if(R(s,e),e.disableNormalization===s.normalize&&(s.normalize=!e.disableNormalization),h(s,e,"buffer"),2()=>t.call(s),e=>t=>{if(2()=>t.call(s),e=>t=>{if("max"===t)throw pc();return e.call(s,t)}),s},su=(lc=m,()=>{const i=new WeakMap;return{render(t,e){var s=i.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=lc(t);if(!u(s,e)){const lc={buffer:s.buffer,channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,disableNormalization:!s.normalize};s=cc(e,lc)}return i.set(e,s),Ae(s)?await uc(t,e,s.inputs[0]):await uc(t,e,s),s})(t,e)}}}),iu=(r=e,nc=su,rc=cc=eu,class extends r{constructor(t,e){var s=oc(t),e={...Ye,...e},i=rc(s,e);super(t,!1,i,ac(s)?nc():null),this._isBufferNullified=!1,this._nativeConvolverNode=i,null!==e.buffer&&hc(this,e.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(t){if(null===(this._nativeConvolverNode.buffer=t)&&null!==this._nativeConvolverNode.buffer){const t=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=t.createBuffer(1,1,t.sampleRate),this._isBufferNullified=!0,hc(this,0)}else this._isBufferNullified=!1,hc(this,null===this._nativeConvolverNode.buffer?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(t){this._nativeConvolverNode.normalize=t}}),nu=(ec=m,n=>{const r=new WeakMap;return{render(t,e){var s=r.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=ec(t);var i=u(s,e);if(!i){const Kh={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,delayTime:s.delayTime.value,maxDelayTime:n};s=tc(e,Kh)}return r.set(e,s),i?await Kh(e,t.delayTime,s.delayTime):await sc(e,t.delayTime,s.delayTime),await ic(t,e,s),s})(t,e)}}}),ru=(n=e,Xh=nu,Yh=tc=ds,class extends n{constructor(t,e){var s=Hh(t),e={...$e,...e},i=Yh(s,e),s=$h(s);super(t,!1,i,s?Xh(e.maxDelayTime):null),this._delayTime=Zh(this,s,i.delayTime),Jh(this,e.maxDelayTime)}get delayTime(){return this._delayTime}}),ou=(t,e)=>{t=t.createDynamicsCompressor();if(R(t,e),2{const n=new WeakMap;return{render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=Bh(t);var i=u(s,e);if(!i){const zh={attack:s.attack.value,channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,knee:s.knee.value,ratio:s.ratio.value,release:s.release.value,threshold:s.threshold.value};s=Wh(e,zh)}return n.set(e,s),i?(await zh(e,t.attack,s.attack),await zh(e,t.knee,s.knee),await zh(e,t.ratio,s.ratio),await zh(e,t.release,s.release),await zh(e,t.threshold,s.threshold)):(await Uh(e,t.attack,s.attack),await Uh(e,t.knee,s.knee),await Uh(e,t.ratio,s.ratio),await Uh(e,t.release,s.release),await Uh(e,t.threshold,s.threshold)),await Gh(t,e,s),s})(t,e)}}}),hu=(r=e,Fh=au,Vh=Wh=ou,class extends r{constructor(t,e){var s=Ph(t),e={...Ke,...e},e=Vh(s,e),s=jh(s);super(t,!1,e,s?Fh():null),this._attack=Ih(this,s,e.attack),this._knee=Ih(this,s,e.knee),this._nativeDynamicsCompressorNode=e,this._ratio=Ih(this,s,e.ratio),this._release=Ih(this,s,e.release),this._threshold=Ih(this,s,e.threshold),Lh(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(t){var e=this._nativeDynamicsCompressorNode.channelCount;if(2<(this._nativeDynamicsCompressorNode.channelCount=t))throw this._nativeDynamicsCompressorNode.channelCount=e,Nh()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(t){var e=this._nativeDynamicsCompressorNode.channelCountMode;if("max"===(this._nativeDynamicsCompressorNode.channelCountMode=t))throw this._nativeDynamicsCompressorNode.channelCountMode=e,Nh()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return"number"==typeof this._nativeDynamicsCompressorNode.reduction.value?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}}),cu=(Dh=zh=Kh=xc=Il,Eh=m,Rh=Uh=sc=Tc=Vl,()=>{const n=new WeakMap;return{render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=Eh(t);var i=u(s,e);if(!i){const Dh={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,gain:s.gain.value};s=Mh(e,Dh)}return n.set(e,s),i?await Dh(e,t.gain,s.gain):await Rh(e,t.gain,s.gain),await qh(t,e,s),s})(t,e)}}}),lu=(n=e,kh=cu,class extends n{constructor(t,e){var s=Ch(t),e={...ts,...e},e=Ah(s,e),s=Oh(s);super(t,!1,e,s?kh():null),this._gain=Sh(this,s,e.gain,fe,de)}get gain(){return this._gain}}),uu=(xh=es,wh=a,(t,e,{channelCount:s,channelCountMode:i,channelInterpretation:n,feedback:r,feedforward:o})=>{const a=cs(e,t.sampleRate),l=r instanceof Float64Array?r:new Float64Array(r),u=o instanceof Float64Array?o:new Float64Array(o),h=l.length,c=u.length,p=Math.min(h,c);if(0===h||20{const e=t.inputBuffer,s=t.outputBuffer,i=e.numberOfChannels;for(let t=0;td.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>d.dispatchEvent(t[0]),getFrequencyResponse(e,s,i){if(e.length!==s.length||s.length!==i.length)throw xh();const n=e.length;for(let t=0;td.removeEventListener(t[0],t[1],t[2])},d)}),pu=(fh=Ls,vh=_h=Ah=Mh=Rc=fs,yh=t,gh=()=>{if(null===yh)return Promise.resolve(!1);const e=new yh(1,1,44100),s=vh(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(t=>{e.oncomplete=()=>{s.disconnect(),t(0!==e.currentTime)},e.startRendering()})},i=>fh(rs,()=>rs(i))?Promise.resolve(fh(gh,gh)).then(t=>{if(!t){const t=mh(i,512,0,1);i.oncomplete=()=>{t.onaudioprocess=null,t.disconnect()},t.onaudioprocess=()=>i.currentTime,t.connect(i.destination)}return i.startRendering()}):new Promise(e=>{const s=_h(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i.oncomplete=t=>{s.disconnect(),e(t.renderedBuffer)},s.connect(i.destination),i.startRendering()})),du=(ch=Ec=Fl,lh=m,uh=t,ph=qh=Gh=ic=uc=Sc=Lc=Zc=Us,dh=pu,(_,m)=>{const i=new WeakMap;let n=null;return{render(t,e){var s=i.get(e);return void 0!==s?Promise.resolve(s):(async(d,f)=>{let t=null,e=lh(d);var s=u(e,f);if(void 0===f.createIIRFilter?t=ch(f,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):s||(e=f.createIIRFilter(m,_)),i.set(f,null===t?e:t),null===t)return await ph(d,f,e),e;{if(null===n){if(null===uh)throw new Error("Missing the native OfflineAudioContext constructor.");const ch=new uh(d.context.destination.channelCount,d.context.length,f.sampleRate);n=(async()=>{await ph(d,ch,ch.destination);{var e=await dh(ch),t=f,s=_,i=m;const n=s instanceof Float64Array?s:new Float64Array(s),r=i instanceof Float64Array?i:new Float64Array(i),o=n.length,a=r.length,h=Math.min(o,a);if(1!==n[0]){for(let t=0;t{if(void 0===t.createIIRFilter)return hh(t,e,s);e=t.createIIRFilter(s.feedforward,s.feedback);return R(e,s),e}),_u=(r=e,ih=fu,nh=du,rh=Ch=Ph=Hh=oc=gc=Vc=Bc=Qs,ah=Lh=Jh=hc=Wl,class extends r{constructor(t,e){var i,n,s=rh(t),r=oh(s),e={...ss,...e},s=ih(s,r?null:t.baseLatency,e);super(t,!1,s,r?nh(e.feedback,e.feedforward):null),(i=s).getFrequencyResponse=(n=i.getFrequencyResponse,(t,e,s)=>{if(t.length!==e.length||e.length!==s.length)throw es();return n.call(i,t,e,s)}),this._nativeIIRFilterNode=s,ah(this,1)}getFrequencyResponse(t,e,s){return this._nativeIIRFilterNode.getFrequencyResponse(t,e,s)}}),mu=(Ya=Sh=Ih=Zh=fc=Pl,Ha=Wc=Gc=Ql,$a=mc=wc=Jl,Ja=mh=bh=ms,Ka=Th=Nh=Qh=pc=gs,th=Ss,eh=oh=Oh=jh=$h=ac=vc=Nc=Uc=Zs,sh=dc=As,(_,m)=>{const a=m.listener,{forwardX:t,forwardY:e,forwardZ:s,positionX:i,positionY:n,positionZ:r,upX:o,upY:h,upZ:c}=void 0===a.forwardX?(()=>{const i=new Float32Array(1),p=Ha(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),d=eh(m);let e=!1,n=[0,0,-1,0,1,0],r=[0,0,0];const f=()=>{if(!e){e=!0;const t=Ja(m,256,9,0);t.onaudioprocess=({inputBuffer:t})=>{const e=[th(t,i,0),th(t,i,1),th(t,i,2),th(t,i,3),th(t,i,4),th(t,i,5)],s=(e.some((t,e)=>t!==n[e])&&(a.setOrientation(...e),n=e),[th(t,i,6),th(t,i,7),th(t,i,8)]);s.some((t,e)=>t!==r[e])&&(a.setPosition(...s),r=s)},p.connect(t)}},t=e=>t=>{t!==n[e]&&(n[e]=t,a.setOrientation(...n))},s=e=>t=>{t!==r[e]&&(r[e]=t,a.setPosition(...r))},o=(t,e,s)=>{const i=$a(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:e}),n=(i.connect(p,0,t),i.start(),Object.defineProperty(i.offset,"defaultValue",{get:()=>e}),Ya({context:_},d,i.offset,fe,de));var r,o,a,h,c,l,u;return sh(n,"value",t=>()=>t.call(n),e=>t=>{try{e.call(n,t)}catch(t){if(9!==t.code)throw t}f(),d&&s(t)}),n.cancelAndHoldAtTime=(r=n.cancelAndHoldAtTime,d?()=>{throw Ka()}:(...t)=>{t=r.apply(n,t);return f(),t}),n.cancelScheduledValues=(o=n.cancelScheduledValues,d?()=>{throw Ka()}:(...t)=>{t=o.apply(n,t);return f(),t}),n.exponentialRampToValueAtTime=(a=n.exponentialRampToValueAtTime,d?()=>{throw Ka()}:(...t)=>{t=a.apply(n,t);return f(),t}),n.linearRampToValueAtTime=(h=n.linearRampToValueAtTime,d?()=>{throw Ka()}:(...t)=>{t=h.apply(n,t);return f(),t}),n.setTargetAtTime=(c=n.setTargetAtTime,d?()=>{throw Ka()}:(...t)=>{t=c.apply(n,t);return f(),t}),n.setValueAtTime=(l=n.setValueAtTime,d?()=>{throw Ka()}:(...t)=>{t=l.apply(n,t);return f(),t}),n.setValueCurveAtTime=(u=n.setValueCurveAtTime,d?()=>{throw Ka()}:(...t)=>{t=u.apply(n,t);return f(),t}),n};return{forwardX:o(0,0,t(0)),forwardY:o(1,0,t(1)),forwardZ:o(2,-1,t(2)),positionX:o(6,0,s(0)),positionY:o(7,0,s(1)),positionZ:o(8,0,s(2)),upX:o(3,0,t(3)),upY:o(4,1,t(4)),upZ:o(5,0,t(5))}})():a;return{get forwardX(){return t},get forwardY(){return e},get forwardZ(){return s},get positionX(){return i},get positionY(){return n},get positionZ(){return r},get upX(){return o},get upY(){return h},get upZ(){return c}}}),gu=new WeakMap,vu=(Ua=Ll,Ga=mu,Za=gu,class extends Ys{constructor(t,e){super(t),this._nativeContext=t,Ut.set(this,t),Qa(t)&&Za.set(t,new Set),this._destination=new Ua(this,e),this._listener=Ga(this,t),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(t){var e="function"==typeof t?Xa(this,t):null,s=(this._nativeContext.onstatechange=e,this._nativeContext.onstatechange);this._onstatechange=null!==s&&s===e?t:s}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}}),yu=(Pa=Rl,ja=Ls,La=Os,za=Ds,Wa=Ms,Ba=qs,(t,e)=>{const s=t.createOscillator();return R(s,e),i(s,e,"detune"),i(s,e,"frequency"),void 0!==e.periodicWave?s.setPeriodicWave(e.periodicWave):h(s,e,"type"),ja(La,()=>La(t))||as(s),ja(za,()=>za(t))||Ba(s,t),ja(Wa,()=>Wa(t))||hs(s),Pa(t,s),s}),xu=(Fa=m,()=>{const n=new WeakMap;let r=null,o=null,a=null;return{set periodicWave(t){r=t},set start(t){o=t},set stop(t){a=t},render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=Fa(t);var i=u(s,e);if(!i){const qa={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,detune:s.detune.value,frequency:s.frequency.value,periodicWave:null===r?void 0:r,type:s.type};s=Ia(e,qa),null!==o&&s.start(o),null!==a&&s.stop(a)}return n.set(e,s),i?(await qa(e,t.detune,s.detune),await qa(e,t.frequency,s.frequency)):(await Va(e,t.detune,s.detune),await Va(e,t.frequency,s.frequency)),await Na(t,e,s),s})(t,e)}}}),wu=(n=e,Oa=Ia=yu,Da=xu,Ra=Xa=Is,class extends n{constructor(t,e){var s=Ma(t),e={...ys,...e},i=Oa(s,e),s=Ea(s),n=s?Da():null,r=t.sampleRate/2;super(t,!1,i,n),this._detune=Ca(this,s,i.detune,153600,-153600),this._frequency=Ca(this,s,i.frequency,r,-r),this._nativeOscillatorNode=i,this._onended=null,this._oscillatorNodeRenderer=n,null!==this._oscillatorNodeRenderer&&void 0!==e.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=e.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(t){var e="function"==typeof t?Ra(this,t):null,s=(this._nativeOscillatorNode.onended=e,this._nativeOscillatorNode.onended);this._onended=null!==s&&s===e?t:s}get type(){return this._nativeOscillatorNode.type}set type(t){this._nativeOscillatorNode.type=t,null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(t){this._nativeOscillatorNode.setPeriodicWave(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=t)}start(t=0){if(this._nativeOscillatorNode.start(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.start=t),"closed"!==this.context.state){ne(this);const t=()=>{this._nativeOscillatorNode.removeEventListener("ended",t),_e(this)&&oe(this)};this._nativeOscillatorNode.addEventListener("ended",t)}}stop(t=0){this._nativeOscillatorNode.stop(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=t)}}),bu=(Aa=Fl,(t,e)=>{const s=Aa(t,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),i=t.createBuffer(1,2,44100);return s.buffer=i,s.loop=!0,s.connect(e),s.start(),()=>{s.stop(),s.disconnect(e)}}),Tu=(ba=a,(r,{curve:t,oversample:e,...s})=>{const o=r.createWaveShaper(),a=r.createWaveShaper(),h=(R(o,s),R(a,s),Ta(r,{...s,gain:1})),i=Ta(r,{...s,gain:-1}),n=Ta(r,{...s,gain:1}),c=Ta(r,{...s,gain:-1});let l=null,u=!1,p=null;const d={get bufferSize(){},get channelCount(){return o.channelCount},set channelCount(t){h.channelCount=t,i.channelCount=t,o.channelCount=t,n.channelCount=t,a.channelCount=t,c.channelCount=t},get channelCountMode(){return o.channelCountMode},set channelCountMode(t){h.channelCountMode=t,i.channelCountMode=t,o.channelCountMode=t,n.channelCountMode=t,a.channelCountMode=t,c.channelCountMode=t},get channelInterpretation(){return o.channelInterpretation},set channelInterpretation(t){h.channelInterpretation=t,i.channelInterpretation=t,o.channelInterpretation=t,n.channelInterpretation=t,a.channelInterpretation=t,c.channelInterpretation=t},get context(){return o.context},get curve(){return p},set curve(e){if(null!==e&&e.length<2)throw ba();if(null===e)o.curve=e,a.curve=e;else{const wa=e.length,ba=new Float32Array(wa+2-wa%2),Sa=new Float32Array(wa+2-wa%2),s=(ba[0]=e[0],Sa[0]=-e[wa-1],Math.ceil((wa+1)/2)),r=(wa+1)/2-1;for(let t=1;th.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>h.dispatchEvent(t[0]),removeEventListener:(...t)=>h.removeEventListener(t[0],t[1],t[2])};return null!==t&&(d.curve=t instanceof Float32Array?t:new Float32Array(t)),e!==d.oversample&&(d.oversample=e),ka(ps(d,n),()=>{h.connect(o).connect(n),h.connect(i).connect(a).connect(c).connect(n),u=!0,Sa(p)&&(l=wa(r,h))},()=>{h.disconnect(o),o.disconnect(n),h.disconnect(i),i.disconnect(a),a.disconnect(c),c.disconnect(n),u=!1,null!==l&&(l(),l=null)})}),Su=(fa=wa=bu,_a=a,ma=Tu,ga=Sa=ks,ya=Hs,xa=As,(s,t)=>{const i=s.createWaveShaper();if(null!==ya&&"webkitAudioContext"===ya.name&&void 0===s.createGain().gain.automationRate)return ma(s,t);R(i,t);var e=null===t.curve||t.curve instanceof Float32Array?t.curve:new Float32Array(t.curve);if(null!==e&&e.length<2)throw _a();h(i,{curve:e},"curve"),h(i,t,"oversample");let n=null,r=!1;return xa(i,"curve",t=>()=>t.call(i),e=>t=>(e.call(i,t),r&&(ga(t)&&null===n?n=fa(s,i):ga(t)||null===n||(n(),n=null)),t)),va(i,()=>{r=!0,ga(i.curve)&&(n=fa(s,i))},()=>{r=!1,null!==n&&(n(),n=null)})}),ku=(na=Ce,ra=a,ha=ms,ca=Su,la=gs,ua=Ee,pa=Ss,da=va=ka=Ul,(t,{coneInnerAngle:e,coneOuterAngle:s,coneOuterGain:i,distanceModel:n,maxDistance:r,orientationX:o,orientationY:a,orientationZ:h,panningModel:c,positionX:l,positionY:u,positionZ:p,refDistance:d,rolloffFactor:f,..._})=>{const m=t.createPanner();if(2<_.channelCount)throw la();if("max"===_.channelCountMode)throw la();R(m,_);const g={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},v=oa(t,{...g,channelInterpretation:"speakers",numberOfInputs:6}),y=aa(t,{..._,gain:1}),x=aa(t,{...g,gain:1}),w=aa(t,{...g,gain:0}),b=aa(t,{...g,gain:0}),T=aa(t,{...g,gain:0}),S=aa(t,{...g,gain:0}),k=aa(t,{...g,gain:0}),A=ha(t,256,6,1),C=ca(t,{...g,curve:new Float32Array([1,1]),oversample:"none"});let O=[o,a,h],D=[l,u,p];const M=new Float32Array(1),E=(A.onaudioprocess=({inputBuffer:t})=>{const e=[pa(t,M,0),pa(t,M,1),pa(t,M,2)],s=(e.some((t,e)=>t!==O[e])&&(m.setOrientation(...e),O=e),[pa(t,M,3),pa(t,M,4),pa(t,M,5)]);s.some((t,e)=>t!==D[e])&&(m.setPosition(...s),D=s)},Object.defineProperty(w.gain,"defaultValue",{get:()=>0}),Object.defineProperty(b.gain,"defaultValue",{get:()=>0}),Object.defineProperty(T.gain,"defaultValue",{get:()=>0}),Object.defineProperty(S.gain,"defaultValue",{get:()=>0}),Object.defineProperty(k.gain,"defaultValue",{get:()=>0}),{get bufferSize(){},get channelCount(){return m.channelCount},set channelCount(t){if(2y.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>y.dispatchEvent(t[0]),removeEventListener:(...t)=>y.removeEventListener(t[0],t[1],t[2])});return e!==E.coneInnerAngle&&(E.coneInnerAngle=e),s!==E.coneOuterAngle&&(E.coneOuterAngle=s),i!==E.coneOuterGain&&(E.coneOuterGain=i),n!==E.distanceModel&&(E.distanceModel=n),r!==E.maxDistance&&(E.maxDistance=r),o!==E.orientationX.value&&(E.orientationX.value=o),a!==E.orientationY.value&&(E.orientationY.value=a),h!==E.orientationZ.value&&(E.orientationZ.value=h),c!==E.panningModel&&(E.panningModel=c),l!==E.positionX.value&&(E.positionX.value=l),u!==E.positionY.value&&(E.positionY.value=u),p!==E.positionZ.value&&(E.positionZ.value=p),d!==E.refDistance&&(E.refDistance=d),f!==E.rolloffFactor&&(E.rolloffFactor=f),1===O[0]&&0===O[1]&&0===O[2]||m.setOrientation(...O),0===D[0]&&0===D[1]&&0===D[2]||m.setPosition(...D),da(ps(E,m),()=>{y.connect(m),na(y,C,0,0),C.connect(x).connect(v,0,0),C.connect(w).connect(v,0,1),C.connect(b).connect(v,0,2),C.connect(T).connect(v,0,3),C.connect(S).connect(v,0,4),C.connect(k).connect(v,0,5),v.connect(A).connect(t.destination)},()=>{y.disconnect(m),ua(y,C,0,0),C.disconnect(x),x.disconnect(v),C.disconnect(w),w.disconnect(v),C.disconnect(b),b.disconnect(v),C.disconnect(T),T.disconnect(v),C.disconnect(S),S.disconnect(v),C.disconnect(k),k.disconnect(v),v.disconnect(A),A.disconnect(t.destination)})}),Au=(ia=ku,(t,e)=>{var s=t.createPanner();return void 0===s.orientationX?ia(t,e):(R(s,e),i(s,e,"orientationX"),i(s,e,"orientationY"),i(s,e,"orientationZ"),i(s,e,"positionX"),i(s,e,"positionY"),i(s,e,"positionZ"),h(s,e,"coneInnerAngle"),h(s,e,"coneOuterAngle"),h(s,e,"coneOuterGain"),h(s,e,"distanceModel"),h(s,e,"maxDistance"),h(s,e,"panningModel"),h(s,e,"refDistance"),h(s,e,"rolloffFactor"),s)}),Cu=(p=qa=Il,Xo=oa=Ql,Yo=Jl,Ho=aa=Ta=fs,Jo=m,Ko=t,ta=Va=Vl,ea=Na=Us,sa=pu,()=>{const c=new WeakMap;let l=null;return{render(t,e){var s=c.get(e);return void 0!==s?Promise.resolve(s):(async(t,r)=>{let o=null,e=Jo(t);var a={channelCount:e.channelCount,channelCountMode:e.channelCountMode,channelInterpretation:e.channelInterpretation},h={...a,coneInnerAngle:e.coneInnerAngle,coneOuterAngle:e.coneOuterAngle,coneOuterGain:e.coneOuterGain,distanceModel:e.distanceModel,maxDistance:e.maxDistance,panningModel:e.panningModel,refDistance:e.refDistance,rolloffFactor:e.rolloffFactor},s=u(e,r);if("bufferSize"in e)o=Ho(r,{...a,gain:1});else if(!s){const p={...h,orientationX:e.orientationX.value,orientationY:e.orientationY.value,orientationZ:e.orientationZ.value,positionX:e.positionX.value,positionY:e.positionY.value,positionZ:e.positionZ.value};e=$o(r,p)}if(c.set(r,null===o?e:o),null===o)return s?(await p(r,t.orientationX,e.orientationX),await p(r,t.orientationY,e.orientationY),await p(r,t.orientationZ,e.orientationZ),await p(r,t.positionX,e.positionX),await p(r,t.positionY,e.positionY),await p(r,t.positionZ,e.positionZ)):(await ta(r,t.orientationX,e.orientationX),await ta(r,t.orientationY,e.orientationY),await ta(r,t.orientationZ,e.orientationZ),await ta(r,t.positionX,e.positionX),await ta(r,t.positionY,e.positionY),await ta(r,t.positionZ,e.positionZ)),Ae(e)?await ea(t,r,e.inputs[0]):await ea(t,r,e),e;{if(null===l){if(null===Ko)throw new Error("Missing the native OfflineAudioContext constructor.");const p=new Ko(6,t.context.length,r.sampleRate),Ho=Xo(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});Ho.connect(p.destination),l=(async()=>{const e=await Promise.all([t.orientationX,t.orientationY,t.orientationZ,t.positionX,t.positionY,t.positionZ].map(async(t,e)=>{e=Yo(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:0===e?1:0});return await ta(p,t,e.offset),e}));for(let t=0;t<6;t+=1)e[t].connect(Ho,0,t),e[t].start(0);return sa(p)})()}const p=await l,Jo=Ho(r,{...a,gain:1}),c=(await ea(t,r,Jo),[]);for(let t=0;tt!==s[e])||Yo.some((t,e)=>t!==i[e])){s=p,i=Yo;const Ko=t/r.sampleRate;e.gain.setValueAtTime(0,Ko),e=Ho(r,{...a,gain:0}),n=$o(r,{...h,orientationX:s[0],orientationY:s[1],orientationZ:s[2],positionX:i[0],positionY:i[1],positionZ:i[2]}),e.gain.setValueAtTime(1,Ko),Jo.connect(e).connect(n.inputs[0]),n.connect(o)}}return o}})(t,e)}}}),Ou=(r=e,Wo=Ca=Pl,Bo=$o=Au,Uo=Cu,Qo=Ea=Qa=Zs,Zo=Wl,class extends r{constructor(t,e){var s=Go(t),e={...xs,...e},e=Bo(s,e),s=Qo(s);super(t,!1,e,s?Uo():null),this._nativePannerNode=e,this._orientationX=Wo(this,s,e.orientationX,fe,de),this._orientationY=Wo(this,s,e.orientationY,fe,de),this._orientationZ=Wo(this,s,e.orientationZ,fe,de),this._positionX=Wo(this,s,e.positionX,fe,de),this._positionY=Wo(this,s,e.positionY,fe,de),this._positionZ=Wo(this,s,e.positionZ,fe,de),Zo(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(t){this._nativePannerNode.coneInnerAngle=t}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(t){this._nativePannerNode.coneOuterAngle=t}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(t){this._nativePannerNode.coneOuterGain=t}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(t){this._nativePannerNode.distanceModel=t}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(t){this._nativePannerNode.maxDistance=t}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(t){this._nativePannerNode.panningModel=t}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(t){this._nativePannerNode.refDistance=t}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(t){this._nativePannerNode.rolloffFactor=t}}),Du=(zo=le,(t,{disableNormalization:e,imag:s,real:i})=>{var n=s instanceof Float32Array?s:new Float32Array(s),i=i instanceof Float32Array?i:new Float32Array(i),t=t.createPeriodicWave(i,n,{disableNormalization:e});if(Array.from(s).length<2)throw zo();return t}),Mu=(No=Du,Po=Go=Ma=Qs,jo=new WeakSet,class Lo{constructor(t,e){t=Po(t),e=(t=>{var{imag:e,real:s}=t;return void 0===e?void 0===s?{...t,imag:[0,0],real:[0,0]}:{...t,imag:Array.from(s,()=>0),real:s}:void 0===s?{...t,imag:e,real:Array.from(e,()=>0)}:{...t,imag:e,real:s}})({...ws,...e}),t=No(t,e);return jo.add(t),t}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===Lo.prototype||jo.has(t)}}),Eu=((u,I,F,V,N,p)=>{const P=16385,j=new Float32Array([1,1]),L=Math.PI/2,z={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},W={...z,oversample:"none"},d=(t,e,s,i,n)=>{if(1===e){var r=t,o=s,a=i,h=n;const p=new Float32Array(P),d=new Float32Array(P);for(let t=0;tT){const I=(t-T)/(16384-T)*L;y[t]=Math.cos(I),x[t]=Math.sin(I),w[t]=0,b[t]=1}else{const I=t/(16384-T)*L;y[t]=1,x[t]=0,w[t]=Math.cos(I),b[t]=Math.sin(I)}const S=I(r,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),k=F(r,{...z,gain:0}),A=V(r,{...W,curve:y}),C=F(r,{...z,gain:0}),O=V(r,{...W,curve:x}),D=V(r,{...W,curve:j}),M=F(r,{...z,gain:0}),E=V(r,{...W,curve:w}),R=F(r,{...z,gain:0}),q=V(r,{...W,curve:b});return{connectGraph(){c.connect(S),c.connect(void 0===D.inputs?D:D.inputs[0]),S.connect(k,0),S.connect(C,0),S.connect(M,1),S.connect(R,1),D.connect(l),l.connect(void 0===A.inputs?A:A.inputs[0]),l.connect(void 0===O.inputs?O:O.inputs[0]),l.connect(void 0===E.inputs?E:E.inputs[0]),l.connect(void 0===q.inputs?q:q.inputs[0]),A.connect(k.gain),O.connect(C.gain),E.connect(M.gain),q.connect(R.gain),k.connect(u,0,0),M.connect(u,0,0),C.connect(u,0,1),R.connect(u,0,1)},disconnectGraph(){c.disconnect(S),c.disconnect(void 0===D.inputs?D:D.inputs[0]),S.disconnect(k,0),S.disconnect(C,0),S.disconnect(M,1),S.disconnect(R,1),D.disconnect(l),l.disconnect(void 0===A.inputs?A:A.inputs[0]),l.disconnect(void 0===O.inputs?O:O.inputs[0]),l.disconnect(void 0===E.inputs?E:E.inputs[0]),l.disconnect(void 0===q.inputs?q:q.inputs[0]),A.disconnect(k.gain),O.disconnect(C.gain),E.disconnect(M.gain),q.disconnect(R.gain),k.disconnect(u,0,0),M.disconnect(u,0,0),C.disconnect(u,0,1),R.disconnect(u,0,1)}}}};return(e,{channelCount:t,channelCountMode:s,pan:i,...n})=>{if("max"===s)throw N();const r=u(e,{...n,channelCount:1,channelCountMode:s,numberOfInputs:2}),o=F(e,{...n,channelCount:t,channelCountMode:s,gain:1}),a=F(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:i});let{connectGraph:h,disconnectGraph:c}=d(e,t,o,a,r);Object.defineProperty(a.gain,"defaultValue",{get:()=>0}),Object.defineProperty(a.gain,"maxValue",{get:()=>1}),Object.defineProperty(a.gain,"minValue",{get:()=>-1});n={get bufferSize(){},get channelCount(){return o.channelCount},set channelCount(t){o.channelCount!==t&&(l&&c(),{connectGraph:h,disconnectGraph:c}=d(e,t,o,a,r),l&&h()),o.channelCount=t},get channelCountMode(){return o.channelCountMode},set channelCountMode(t){if("clamped-max"===t||"max"===t)throw N();o.channelCountMode=t},get channelInterpretation(){return o.channelInterpretation},set channelInterpretation(t){o.channelInterpretation=t},get context(){return o.context},get inputs(){return[o]},get numberOfInputs(){return o.numberOfInputs},get numberOfOutputs(){return o.numberOfOutputs},get pan(){return a.gain},addEventListener:(...t)=>o.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>o.dispatchEvent(t[0]),removeEventListener:(...t)=>o.removeEventListener(t[0],t[1],t[2])};let l=!1;return p(ps(n,r),()=>{h(),l=!0},()=>{c(),l=!1})}})(Ql,us,fs,Su,gs,Ul),Ru=(Fo=Eu,Vo=gs,(t,e)=>{const s=e.channelCountMode;if("clamped-max"===s)throw Vo();if(void 0===t.createStereoPanner)return Fo(t,e);t=t.createStereoPanner();return R(t,e),i(t,e,"pan"),Object.defineProperty(t,"channelCountMode",{get:()=>s,set:t=>{if(t!==s)throw Vo()}}),t}),qu=(Mo=Il,Ro=m,qo=Vl,()=>{const n=new WeakMap;return{render(t,e){var s=n.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=Ro(t);var i=u(s,e);if(!i){const Mo={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,pan:s.pan.value};s=Eo(e,Mo)}return n.set(e,s),i?await Mo(e,t.pan,s.pan):await qo(e,t.pan,s.pan),Ae(s)?await Io(t,e,s.inputs[0]):await Io(t,e,s),s})(t,e)}}}),Iu=(n=e,ko=Pl,Ao=Eo=Ru,Co=qu,class extends n{constructor(t,e){var s=Oo(t),e={...bs,...e},e=Ao(s,e),s=Do(s);super(t,!1,e,s?Co():null),this._pan=ko(this,s,e.pan)}get pan(){return this._pan}}),Fu=(To=m,So=Io=Us,()=>{const i=new WeakMap;return{render(t,e){var s=i.get(e);return void 0!==s?Promise.resolve(s):(async(t,e)=>{let s=To(t);if(!u(s,e)){const To={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,curve:s.curve,oversample:s.oversample};s=bo(e,To)}return i.set(e,s),Ae(s)?await So(t,e,s.inputs[0]):await So(t,e,s),s})(t,e)}}}),Vu=(r=e,mo=a,go=bo=Su,vo=Fu,yo=Oo=Qs,xo=Do=Zs,wo=Wl,class extends r{constructor(t,e){var s=yo(t),e={...Ts,...e},e=go(s,e);super(t,!0,e,xo(s)?vo():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=e,wo(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(t){if(null===t)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(t.length<2)throw mo();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=t}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(t){this._nativeWaveShaperNode.oversample=t}}),Nu=null!==(n=zs)&&n.isSecureContext,Pu=(_o=zs,(t,e,s)=>{Object.defineProperties(_o,{currentFrame:{configurable:!0,get:()=>Math.round(t*e)},currentTime:{configurable:!0,get:()=>t}});try{return s()}finally{null!==_o&&(delete _o.currentFrame,delete _o.currentTime)}}),ju=new WeakMap,Lu=(po=ju,fo=t,t=>{let e=po.get(t);if(void 0!==e)return e;if(null===fo)throw new Error("Missing the native OfflineAudioContext constructor.");return e=new fo(1,1,44100),po.set(t,e),e}),zu=Nu?((r,o,a,l,u,p,d,f,_,m,g,v,y)=>{let x=0;return(e,s,h={credentials:"omit"})=>{const t=g.get(e);if(void 0!==t&&t.has(s))return Promise.resolve();const i=m.get(e);if(void 0!==i){const r=i.get(s);if(void 0!==r)return r}const c=p(e),n=void 0===c.audioWorklet?u(s).then(([t,e])=>{var[t,e]=$t(t,e);return a(t+`;((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${e}
})})(window,'_AWGS')`)}).then(()=>{const t=y._AWGS.pop();if(void 0===t)throw new SyntaxError;l(c.currentTime,c.sampleRate,()=>t(class{},void 0,(t,e)=>{if(""===t.trim())throw o();const s=Zt.get(c);if(void 0!==s){if(s.has(t))throw o();Kt(e),Jt(e.parameterDescriptors),s.set(t,e)}else Kt(e),Jt(e.parameterDescriptors),Zt.set(c,new Map([[t,e]]))},c.sampleRate,void 0,void 0))}):Promise.all([u(s),Promise.resolve(r(v,v))]).then(([[t,e],s])=>{const i=x+1,[n,r]=(x=i,$t(t,e)),o=new Blob([`${n};((AudioWorkletProcessor,registerProcessor)=>{${r}\n})(${s?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${s?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${s?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${i}',class extends AudioWorkletProcessor{process(){return !1}})`],{type:"application/javascript; charset=utf-8"}),a=URL.createObjectURL(o);return c.audioWorklet.addModule(a,h).then(()=>{if(f(c))return c;const t=d(c);return t.audioWorklet.addModule(a,h).then(()=>t)}).then(t=>{if(null===_)throw new SyntaxError;try{new _(t,"__sac"+i)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(a))});return void 0===i?m.set(e,new Map([[s,n]])):i.set(s,n),n.then(()=>{const t=g.get(e);void 0===t?g.set(e,new Set([s])):t.add(s)}).finally(()=>{const t=m.get(e);void 0!==t&&t.delete(s)}),n}})(Ls,gs,(uo=zs,n=>new Promise((t,r)=>{if(null===uo)r(new SyntaxError);else{const e=uo.document.head;if(null===e)r(new SyntaxError);else{const s=uo.document.createElement("script"),i=new Blob([n],{type:"application/javascript"}),o=URL.createObjectURL(i),a=uo.onerror,h=()=>{uo.onerror=a,URL.revokeObjectURL(o)};uo.onerror=(t,e,s,i,n)=>e===o||e===uo.location.href&&1===s&&1===i?(h(),r(n),!1):null!==a?a(t,e,s,i,n):void 0,s.onerror=()=>{h(),r(new SyntaxError)},s.onload=()=>{h(),t()},s.src=o,s.type="module",e.appendChild(s)}}})),Pu,async t=>{try{const e=await fetch(t);if(e.ok)return[await e.text(),e.url]}catch{}throw new DOMException("","AbortError")},Qs,Lu,Zs,ti,new WeakMap,new WeakMap,(co=ti,lo=t,async()=>{if(null===co)return!0;if(null===lo)return!1;const t=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),e=new lo(1,128,44100),s=URL.createObjectURL(t);let i=!1,n=!1;try{await e.audioWorklet.addModule(s);const lo=new co(e,"a",{numberOfOutputs:0}),t=e.createOscillator();lo.port.onmessage=()=>i=!0,lo.onprocessorerror=()=>n=!0,t.connect(lo),t.start(0),await e.startRendering(),await new Promise(t=>setTimeout(t))}catch{}finally{URL.revokeObjectURL(s)}return i&&!n}),zs):void 0,Wu=(ao=$s,ho=Zs,t=>ao(t)||ho(t)),Bu=(Jr=Ol,Kr=Ls,to=new WeakSet,eo=Qs,so=Wu,io=ce,no=rs,ro=Dl,oo=Ml,(t,r)=>{const o=so(t)?t:eo(t);if(to.has(r)){const Jr=new DOMException("","DataCloneError");return Promise.reject(Jr)}try{to.add(r)}catch{}return Kr(no,()=>no(o))?o.decodeAudioData(r).then(t=>(He(r).catch(()=>{}),Kr(io,()=>io(t))||oo(t),Jr.add(t),t)):new Promise((e,s)=>{const i=async()=>{try{await He(r)}catch{}},n=t=>{s(t),i()};try{o.decodeAudioData(r,t=>{"function"!=typeof t.copyFromChannel&&(ro(t),ue(t)),Jr.add(t),i().then(()=>e(t))},t=>{n(null===t?new DOMException("","EncodingError"):t)})}catch(t){n(t)}})}),Uu=(qr=zu,Ir=s,Fr=El,Vr=jl,Nr=Bl,Pr=Xl,jr=Hl,Lr=tu,zr=iu,Wr=Bu,Br=ru,Ur=hu,Gr=lu,Qr=_u,Zr=wu,Xr=Ou,Yr=Mu,Hr=Iu,$r=Vu,class extends vu{constructor(t,e){super(t,e),this._nativeContext=t,this._audioWorklet=void 0===qr?void 0:{addModule:(t,e)=>qr(this,t,e)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new Ir(this)}createBiquadFilter(){return new Nr(this)}createBuffer(t,e,s){return new Fr({length:e,numberOfChannels:t,sampleRate:s})}createBufferSource(){return new Vr(this)}createChannelMerger(t=6){return new Pr(this,{numberOfInputs:t})}createChannelSplitter(t=6){return new jr(this,{numberOfOutputs:t})}createConstantSource(){return new Lr(this)}createConvolver(){return new zr(this)}createDelay(t=1){return new Br(this,{maxDelayTime:t})}createDynamicsCompressor(){return new Ur(this)}createGain(){return new Gr(this)}createIIRFilter(t,e){return new Qr(this,{feedback:e,feedforward:t})}createOscillator(){return new Zr(this)}createPanner(){return new Xr(this)}createPeriodicWave(t,e,s={disableNormalization:!1}){return new Yr(this,{...s,imag:e,real:t})}createStereoPanner(){return new Hr(this)}createWaveShaper(){return new $r(this)}decodeAudioData(t,e,s){return Wr(this._nativeContext,t).then(t=>("function"==typeof e&&e(t),t),t=>{throw"function"==typeof s&&s(t),t})}}),Gu=class extends e{constructor(t,e){const s=Er(t),i=s.createMediaElementSource(e.mediaElement);if(Rr(s))throw TypeError();super(t,!0,i,null),this._nativeMediaElementAudioSourceNode=i}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},Qu=class extends e{constructor(t,e){var s=Dr(t);if(Mr(s))throw new TypeError;s=((t,e)=>{t=t.createMediaStreamDestination();return R(t,e),1===t.numberOfOutputs&&Object.defineProperty(t,"numberOfOutputs",{get:()=>0}),t})(s,{...ns,...e});super(t,!1,s,null),this._nativeMediaStreamAudioDestinationNode=s}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},Zu=class extends e{constructor(t,e){var s=Cr(t),e=((t,{mediaStream:e})=>{const s=e.getAudioTracks();s.sort((t,e)=>t.ide.id?1:0);var i=s.slice(0,1),t=t.createMediaStreamSource(new MediaStream(i));return Object.defineProperty(t,"mediaStream",{value:e}),t})(s,e);if(Or(s))throw new TypeError;super(t,!0,e,null),this._nativeMediaStreamAudioSourceNode=e}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},Xu=(kr=a,Ar=Or=Mr=Rr=Zs,(t,{mediaStreamTrack:e})=>{if("function"==typeof t.createMediaStreamTrackSource)return t.createMediaStreamTrackSource(e);var s=new MediaStream([e]),s=t.createMediaStreamSource(s);if("audio"!==e.kind)throw kr();if(Ar(t))throw new TypeError;return s}),Yu=(r=e,Tr=Xu,Sr=Cr=Dr=Er=Qs,class extends r{constructor(t,e){var s=Sr(t);super(t,!0,Tr(s,e),null)}}),Hu=(n=Uu,_r=a,mr=gs,gr=()=>new DOMException("","UnknownError"),vr=Gu,yr=Qu,xr=Zu,wr=Yu,br=Hs,class extends n{constructor(t={}){if(null===br)throw new Error("Missing the native AudioContext constructor.");let e;try{e=new br(t)}catch(t){if(12===t.code&&"sampleRate is not in range"===t.message)throw mr();throw t}if(null===e)throw gr();if(void 0!==(s=t.latencyHint)&&"number"!=typeof s&&("string"!=typeof s||"balanced"!==s&&"interactive"!==s&&"playback"!==s))throw new TypeError(`The provided value '${t.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(void 0!==t.sampleRate&&e.sampleRate!==t.sampleRate)throw mr();super(e,2);var s=t["latencyHint"],i=e["sampleRate"];if(this._baseLatency="number"==typeof e.baseLatency?e.baseLatency:"balanced"===s?512/i:"interactive"===s||void 0===s?256/i:"playback"===s?1024/i:128*Math.max(2,Math.min(128,Math.round(s*i/128)))/i,this._nativeAudioContext=e,"webkitAudioContext"===br.name?(this._nativeGainNode=e.createGain(),this._nativeOscillatorNode=e.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(e.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,"running"===e.state){this._state="suspended";const t=()=>{"suspended"===this._state&&(this._state=null),e.removeEventListener("statechange",t)};e.addEventListener("statechange",t)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then(()=>{throw _r()}):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close().then(()=>{null!==this._nativeGainNode&&null!==this._nativeOscillatorNode&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),xe(this)}))}createMediaElementSource(t){return new vr(this,{mediaElement:t})}createMediaStreamDestination(){return new yr(this)}createMediaStreamSource(t){return new xr(this,{mediaStream:t})}createMediaStreamTrackSource(t){return new wr(this,{mediaStreamTrack:t})}resume(){return"suspended"===this._state?new Promise((t,e)=>{const s=()=>{this._nativeAudioContext.removeEventListener("statechange",s),"running"===this._nativeAudioContext.state?t():this.resume().then(t,e)};this._nativeAudioContext.addEventListener("statechange",s)}):this._nativeAudioContext.resume().catch(t=>{if(void 0===t||15===t.code)throw _r();throw t})}suspend(){return this._nativeAudioContext.suspend().catch(t=>{if(void 0===t)throw _r();throw t})}}),$u=(fr=gu,t=>{t=fr.get(t);if(void 0===t)throw new Error("The context has no set of AudioWorkletNodes.");return t}),Ju=(t,e)=>{dr(t).add(e)},Ku=(pr=le,(t,e,s=0,i=0)=>{const n=t[s];if(void 0===n)throw pr();return Ne(e)?n.connect(e,0,i):n.connect(e,0)}),tp=(ur=dr=$u,(t,e)=>{ur(t).delete(e)}),ep=(lr=le,(t,e=void 0,s=void 0,i=0)=>void 0===e?t.forEach(t=>t.disconnect()):"number"==typeof e?Je(lr,t,e).disconnect():Ne(e)?void 0===s?t.forEach(t=>t.disconnect(e)):void 0===i?Je(lr,t,s).disconnect(e,0):Je(lr,t,s).disconnect(e,0,i):void 0===s?t.forEach(t=>t.disconnect(e)):Je(lr,t,s).disconnect(e,0)),sp=new WeakMap,ip=(hr=sp,cr=te,t=>cr(hr,t)),np=(Hn=le,$n=a,sr=ms,or=ip,(o,t,e,a)=>{if(0===a.numberOfInputs&&0===a.numberOfOutputs)throw ir();const h=Array.isArray(a.outputChannelCount)?a.outputChannelCount:Array.from(a.outputChannelCount);if(h.some(t=>t<1))throw ir();if(h.length!==a.numberOfOutputs)throw Hn();if("explicit"!==a.channelCountMode)throw ir();const c=a.channelCount*a.numberOfInputs,s=h.reduce((t,e)=>t+e,0),i=void 0===e.parameterDescriptors?0:e.parameterDescriptors.length;if(6void 0===Yn?0:Yn},maxValue:{get:()=>void 0===Hn?fe:Hn},minValue:{get:()=>void 0===$n?de:$n}}),p.push(Kn)}const d=Jn(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,c+i)}),f=cs(t,o.sampleRate),_=sr(o,f,c+i,Math.max(1,s)),r=Kn(o,{channelCount:Math.max(1,s),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,s)}),m=[];for(let t=0;t{const s=p[e];return s.connect(d,0,c+e),s.start(0),[t,s.offset]}));d.connect(_);let g=a.channelInterpretation,v=null;const y=0===a.numberOfOutputs?[_]:m,x={get bufferSize(){return f},get channelCount(){return a.channelCount},set channelCount(t){throw $n()},get channelCountMode(){return a.channelCountMode},set channelCountMode(t){throw $n()},get channelInterpretation(){return g},set channelInterpretation(t){for(const e of l)e.channelInterpretation=t;g=t},get context(){return _.context},get inputs(){return l},get numberOfInputs(){return a.numberOfInputs},get numberOfOutputs(){return a.numberOfOutputs},get onprocessorerror(){return v},set onprocessorerror(t){"function"==typeof v&&x.removeEventListener("processorerror",v),"function"==typeof(v="function"==typeof t?t:null)&&x.addEventListener("processorerror",v)},get parameters(){return V},get port(){return n.port2},addEventListener:(...t)=>_.addEventListener(t[0],t[1],t[2]),connect:Yn.bind(null,y),disconnect:nr.bind(null,y),dispatchEvent:(...t)=>_.dispatchEvent(t[0]),removeEventListener:(...t)=>_.removeEventListener(t[0],t[1],t[2])},w=new Map;var b,T;n.port1.addEventListener=(b=n.port1.addEventListener,(...t)=>{if("message"===t[0]){const s="function"==typeof t[1]?t[1]:"object"==typeof t[1]&&null!==t[1]&&"function"==typeof t[1].handleEvent?t[1].handleEvent:null;var e;null!==s&&(void 0!==(e=w.get(t[1]))?t[1]=e:(t[1]=t=>{rr(o.currentTime,o.sampleRate,()=>s(t))},w.set(s,t[1])))}return b.call(n.port1,t[0],t[1],t[2])}),n.port1.removeEventListener=(T=n.port1.removeEventListener,(...t)=>{var e;return"message"===t[0]&&void 0!==(e=w.get(t[1]))&&(w.delete(t[1]),t[1]=e),T.call(n.port1,t[0],t[1],t[2])});let S=null,k=(Object.defineProperty(n.port1,"onmessage",{get:()=>S,set:t=>{"function"==typeof S&&n.port1.removeEventListener("message",S),"function"==typeof(S="function"==typeof t?t:null)&&(n.port1.addEventListener("message",S),n.port1.start())}}),e.prototype.port=n.port1,null);const N=((t,e,s,i)=>{let n=Xt.get(t);void 0===n&&(n=new WeakMap,Xt.set(t,n));t=(async()=>{var t;return t=i,new s(await new Promise((e,s)=>{const{port1:i,port2:n}=new MessageChannel;i.onmessage=({data:t})=>{i.close(),n.close(),e(t)},i.onmessageerror=({data:t})=>{i.close(),n.close(),s(t)},n.postMessage(t)}))})();return n.set(e,t),t})(o,x,e,a),A=(N.then(t=>k=t),Ue(a.numberOfInputs,a.channelCount)),C=Ue(a.numberOfOutputs,h),O=void 0===e.parameterDescriptors?[]:e.parameterDescriptors.reduce((t,{name:e})=>({...t,[e]:new Float32Array(128)}),{});let D=!0;const M=()=>{0{if(null!==k){const r=or(x);for(let i=0;i{We(s,O,t,c+e,i)});for(let e=0;e{if(0t.every(t=>0===t))&&(1===s?E.delete(e):E.set(e,s-1)),t)}),t=rr(o.currentTime+i/o.sampleRate,o.sampleRate,()=>k.process(s,C,O));D=t;for(let e=0,s=0;e_.connect(q).connect(o.destination),F=()=>{_.disconnect(q),q.disconnect()};return I(),ar(x,()=>{if(D){F(),0{D&&(I(),M()),R=!1})}),rp=(Gn=a,c=np,Zn=ir=gs,Xn=ar=Ul,(t,e,s,i,n,r)=>{if(null!==s)try{const c=new s(t,i,r),Zn=new Map;let e=null;if(Object.defineProperties(c,{channelCount:{get:()=>r.channelCount,set:()=>{throw Gn()}},channelCountMode:{get:()=>"explicit",set:()=>{throw Gn()}},onprocessorerror:{get:()=>e,set:t=>{"function"==typeof e&&c.removeEventListener("processorerror",e),"function"==typeof(e="function"==typeof t?t:null)&&c.addEventListener("processorerror",e)}}}),c.addEventListener=(a=c.addEventListener,(...e)=>{if("processorerror"===e[0]){const c="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;var t;null!==c&&(void 0!==(t=Zn.get(e[1]))?e[1]=t:(e[1]=t=>{"error"===t.type?(Object.defineProperties(t,{type:{value:"processorerror"}}),c(t)):c(new ErrorEvent(e[0],{...t}))},Zn.set(c,e[1])))}return a.call(c,"error",e[1],e[2]),a.call(c,...e)}),c.removeEventListener=(o=c.removeEventListener,(...t)=>{if("processorerror"===t[0]){const c=Zn.get(t[1]);void 0!==c&&(Zn.delete(t[1]),t[1]=c)}return o.call(c,"error",t[1],t[2]),o.call(c,t[0],t[1],t[2])}),0===r.numberOfOutputs)return c;{const Gn=Qn(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return c.connect(Gn).connect(t.destination),Xn(c,()=>Gn.disconnect(),()=>Gn.connect(t.destination))}}catch(t){if(11===t.code)throw Zn();throw t}var o,a;if(void 0===n)throw Zn();{s=r;const h=(new MessageChannel)["port1"];try{h.postMessage(s)}finally{h.close()}}return c(t,e,n,r)}),op=(Dn=Il,Mn=Yn=Ku,En=Fl,Rn=Jn=Ql,qn=Kn=us,In=tr=Jl,Fn=Qn=er=fs,Vn=tp,Nn=nr=ep,Pn=rr=Pu,jn=m,Ln=ti,zn=t,Wn=Vl,Bn=Us,Un=pu,(r,a,h)=>{const c=new WeakMap;let l=null;return{render(t,e){Vn(e,t);var s=c.get(e);return void 0!==s?Promise.resolve(s):(async(o,e)=>{let t=jn(o),s=null;const i=u(t,e),n=Array.isArray(a.outputChannelCount)?a.outputChannelCount:Array.from(a.outputChannelCount);if(null===Ln){const Dn=n.reduce((t,e)=>t+e,0),En=qn(e,{channelCount:Math.max(1,Dn),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,Dn)}),In=[];for(let t=0;t{const s=new zn(En,128*Math.ceil(o.context.length/128),e.sampleRate),i=[],n=[];for(let t=0;t{var e=In(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:t.value});return await Wn(s,t,e.offset),e})),r=Rn(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,Dn+Mn)});for(let e=0;eBn(o,s,t))),Un(s)};l=(async(t,s,e,n,r,o,a)=>{const h=null===s?128*Math.ceil(t.context.length/128):s.length,c=n.channelCount*n.numberOfInputs,i=r.reduce((t,e)=>t+e,0),l=0===i?null:e.createBuffer(i,h,e.sampleRate);if(void 0===o)throw new Error("Missing the processor constructor.");const u=ge(t),p=await((t,e)=>{t=te(Xt,t),e=m(e);return te(t,e)})(e,t),d=Ue(n.numberOfInputs,n.channelCount),f=Ue(n.numberOfOutputs,r),_=Array.from(t.parameters.keys()).reduce((t,e)=>({...t,[e]:new Float32Array(128)}),{});for(let i=0;i{We(s,_,t,c+e,i)});for(let e=0;e0===u.activeInputs[e].size?[]:t),s=a(i/e.sampleRate,e.sampleRate,()=>p.process(t,f,_));if(null!==l)for(let e=0,s=0;eOn.get(t)),hp=(Cn=sp,(t,e)=>{Cn.set(t,e)}),cp=Nu?(mn=Ju,gn=Pl,vn=op,yn=rp,xn=ge,wn=ap,bn=Qs,Tn=Zs,Sn=ti,kn=hp,An=Is,class extends e{constructor(t,e,s){const i=bn(t),n=Tn(i),r={...s={...ze,...s},outputChannelCount:void 0!==s.outputChannelCount?s.outputChannelCount:1===s.numberOfInputs&&1===s.numberOfOutputs?[s.channelCount]:Array.from({length:s.numberOfOutputs},()=>1)};{var s=r;const{port1:u,port2:p}=new MessageChannel;try{u.postMessage(s)}finally{u.close(),p.close()}}const o=Zt.get(i),a=null==o?void 0:o.get(e),h=!n&&"closed"===i.state&&null!=(s=wn(i))?s:i,c=yn(h,n?null:t.baseLatency,Sn,e,a,r),l=(super(t,!0,c,n?vn(e,r,a):null),[]);c.parameters.forEach((t,e)=>{t=gn(this,n,t);l.push([e,t])}),this._nativeAudioWorkletNode=c,this._onprocessorerror=null,this._parameters=new Le(l),n&&mn(i,this);s=xn(this).activeInputs;kn(c,s)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(t){var e="function"==typeof t?An(this,t):null,s=(this._nativeAudioWorkletNode.onprocessorerror=e,this._nativeAudioWorkletNode.onprocessorerror);this._onprocessorerror=null!==s&&s===e?t:s}get parameters(){return null===this._parameters?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}}):void 0,lp=(fn=gs,_n=t,(t,e,s)=>{if(null===_n)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new _n(t,e,s)}catch(t){if("SyntaxError"===t.name)throw fn();throw t}}),up=(on=Ol,an=Ls,hn=Bs,cn=$u,ln=pu,un=ce,pn=Dl,dn=Ml,(t,e)=>hn(t).render(t,e).then(()=>Promise.all(Array.from(cn(e)).map(t=>hn(t).render(t,e)))).then(()=>ln(e)).then(t=>("function"!=typeof t.copyFromChannel?(pn(t),ue(t)):an(un,()=>un(t))||dn(t),on.add(t),t))),pp=(en=Ls,sn=a,nn=lp,rn=up,class extends Uu{constructor(t,e,s){let i;if("number"==typeof t&&void 0!==e&&void 0!==s)i={length:e,numberOfChannels:t,sampleRate:s};else{if("object"!=typeof t)throw new Error("The given parameters are not valid.");i=t}const{length:n,numberOfChannels:r,sampleRate:o}={...vs,...i},a=nn(r,n,o);en(rs,()=>rs(a))||a.addEventListener("statechange",(()=>{let e=0;const s=t=>{"running"===this._state&&(0{this._state=null,xe(this)}))}_waitForThePromiseToSettle(t){null===this._state?this._nativeOfflineAudioContext.dispatchEvent(t):setTimeout(()=>this._waitForThePromiseToSettle(t))}}),dp=(Ki=Ut,tn=$s,t=>{var e=Ki.get(t);return tn(e)||tn(t)}),fp=($i=zt,Ji=Js,t=>$i.has(t)||Ji(t)),_p=(Yi=Bt,Hi=Ks,t=>Yi.has(t)||Hi(t)),mp=(Zi=Ut,Xi=Zs,t=>{var e=Zi.get(t);return Xi(e)||Xi(t)}),gp=()=>(async(t,e,s,i,n,r,o,a,h,c,l,u,p,d,f,_)=>!!(t(e,e)&&t(s,s)&&t(n,n)&&t(r,r)&&t(a,a)&&t(h,h)&&t(c,c)&&t(l,l)&&t(u,u)&&t(p,p)&&t(d,d))&&(await Promise.all([t(i,i),t(o,o),t(f,f),t(_,_)])).every(t=>t))(Ls,(s=>()=>{if(null===s)return!1;const t=new s(1,1,44100).createBuffer(1,1,44100);if(void 0===t.copyToChannel)return!0;var e=new Float32Array(2);try{t.copyFromChannel(e,0,0)}catch{return!1}return!0})(t),(s=>()=>{if(null===s)return!1;if(void 0!==s.prototype&&void 0!==s.prototype.close)return!0;const t=new s,e=void 0!==t.close;try{t.close()}catch{}return e})(Hs),(t=>()=>{if(null===t)return Promise.resolve(!1);const n=new t(1,1,44100);return new Promise(e=>{let s=!0;var t=t=>{s&&(s=!1,n.startRendering(),e(t instanceof TypeError))};let i;try{i=n.decodeAudioData(null,()=>{},t)}catch(e){t(e)}void 0!==i&&i.catch(t)})})(t),(e=>()=>{if(null===e)return!1;let t;try{t=new e({latencyHint:"balanced"})}catch{return!1}return t.close(),!0})(Hs),(s=>()=>{if(null===s)return!1;const t=new s(1,1,44100).createGain(),e=t.connect(t)===t;return t.disconnect(t),e})(t),((r,o)=>async()=>{if(null===r)return!0;if(null===o)return!1;const t=new Blob(['let c,p;class A extends AudioWorkletProcessor{constructor(){super();this.port.onmessage=(e)=>{p=e.data;p.onmessage=()=>{p.postMessage(c);p.close()};this.port.postMessage(0)}}process(){c=1}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),s=new MessageChannel,e=new o(1,128,44100),i=URL.createObjectURL(t);let n=!1;try{await e.audioWorklet.addModule(i);const o=new r(e,"a",{numberOfOutputs:0}),t=e.createOscillator();await new Promise(t=>{o.port.onmessage=()=>t(),o.port.postMessage(s.port2,[s.port2])}),o.port.onmessage=()=>n=!0,t.connect(o),t.start(0),await e.startRendering(),n=await new Promise(e=>{s.port1.onmessage=({data:t})=>e(1===t),s.port1.postMessage(0)})}catch{}finally{s.port1.close(),URL.revokeObjectURL(i)}return n})(ti,t),(e=>()=>{if(null===e)return!1;const t=new e(1,1,44100).createChannelMerger();if("max"===t.channelCountMode)return!0;try{t.channelCount=2}catch{return!0}return!1})(t),(e=>()=>{if(null===e)return!1;const t=new e(1,1,44100);return void 0===t.createConstantSource||t.createConstantSource().offset.maxValue!==Number.POSITIVE_INFINITY})(t),(s=>()=>{if(null===s)return!1;const t=new s(1,1,44100),e=t.createConvolver();e.buffer=t.createBuffer(1,1,t.sampleRate);try{e.buffer=t.createBuffer(1,1,t.sampleRate)}catch{return!1}return!0})(t),(e=>()=>{if(null===e)return!1;const t=new e(1,1,44100).createConvolver();try{t.channelCount=1}catch{return!1}return!0})(t),Es,(t=>()=>null!==t&&t.hasOwnProperty("isSecureContext"))(zs),(e=>()=>{if(null===e)return!1;const t=new e;try{return t.createMediaStreamSource(new MediaStream),!1}catch(t){return!0}finally{t.close()}})(Hs),(i=>()=>{if(null===i)return Promise.resolve(!1);const t=new i(1,1,44100);if(void 0===t.createStereoPanner)return Promise.resolve(!0);if(void 0===t.createConstantSource)return Promise.resolve(!0);const e=t.createConstantSource(),s=t.createStereoPanner();return e.channelCount=1,e.offset.value=1,s.channelCount=1,e.start(),e.connect(s).connect(t.destination),t.startRendering().then(t=>1!==t.getChannelData(0)[0])})(t),Rs);function vp(t){return void 0===t}function o(t){return void 0!==t}function yp(t){return"function"==typeof t}function xp(t){return"number"==typeof t}function wp(t){return"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object}function bp(t){return"boolean"==typeof t}function d(t){return Array.isArray(t)}function Tp(t){return"string"==typeof t}function Sp(t){return Tp(t)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(t)}function l(t,e){if(!t)throw new Error(e)}function f(t,e,s=1/0){if(!(e<=t&&t<=s))throw new RangeError(`Value must be within [${e}, ${s}], got: `+t)}function kp(t){t.isOffline||"running"===t.state||Rp('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let Ap=!1,Cp=!1;function Op(t){Ap=t}function Dp(t){vp(t)&&Ap&&!Cp&&(Cp=!0,Rp("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let Mp=console;function Ep(...t){Mp.log(...t)}function Rp(...t){Mp.warn(...t)}const qp="object"==typeof self?self:null,Ip=qp&&(qp.hasOwnProperty("AudioContext")||qp.hasOwnProperty("webkitAudioContext"));function Fp(t,e,s,i){var n,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;0<=a;a--)(n=t[a])&&(o=(r<3?n(o):3