UNPKG

tone

Version:

A Web Audio framework for making interactive music in the browser.

1 lines 426 kB
!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,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=681)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"i",(function(){return l})),n.d(e,"h",(function(){return p})),n.d(e,"j",(function(){return f})),n.d(e,"k",(function(){return h}));const o=new WeakSet,i=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,u=new WeakMap,l=new WeakMap,p=new WeakMap,f=new WeakMap,h=new WeakMap},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(4);const i=(t,e)=>{Object(o.a)(t,e,"channelCount"),Object(o.a)(t,e,"channelCountMode"),Object(o.a)(t,e,"channelInterpretation")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));const o=-34028234663852886e22,i=-o},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e)=>t.context===e},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e,n)=>{const o=e[n];void 0!==o&&o!==t[n]&&(t[n]=o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e,n)=>{const o=e[n];void 0!==o&&o!==t[n].value&&(t[n].value=o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(0),i=n(9);const r=t=>Object(i.a)(o.c,t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=()=>{try{return new DOMException("","InvalidStateError")}catch(t){return t.code=11,t.name="InvalidStateError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(0),i=n(9);const r=t=>Object(i.a)(o.b,t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e)=>{const n=t.get(e);if(void 0===n)throw new Error("A value with the given key could not be found.");return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=()=>{try{return new DOMException("","NotSupportedError")}catch(t){return t.code=9,t.name="NotSupportedError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e)=>(t.connect=e.connect.bind(e),t.disconnect=e.disconnect.bind(e),t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>"inputs"in t},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n=t.decodeAudioData(e.buffer,()=>{});return void 0!==n&&(n.catch(()=>{}),!0)}catch{}return!1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=()=>{try{return new DOMException("","IndexSizeError")}catch(t){return t.code=1,t.name="IndexSizeError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e,n,o)=>{for(const e of t)if(n(e)){if(o)return!1;throw Error("The set contains at least one similar element.")}return t.add(e),!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(0),i=n(20);const r=t=>{if(o.a.has(t))throw new Error("The AudioNode is already stored.");o.a.add(t),Object(i.a)(t).forEach(t=>t(!0))}},function(t,e,n){"use strict";n.d(e,"AudioContext",(function(){return ui})),n.d(e,"AudioWorkletNode",(function(){return vi})),n.d(e,"OfflineAudioContext",(function(){return wi})),n.d(e,"isAnyAudioContext",(function(){return Oi})),n.d(e,"isAnyAudioNode",(function(){return Ti})),n.d(e,"isAnyAudioParam",(function(){return Si})),n.d(e,"isAnyOfflineAudioContext",(function(){return Ci}));var o=n(18),i=n(514),r=n(515),s=n(516),a=n(664),c=n(517),u=n(518),l=n(519),p=n(520),f=n(521),h=n(522),d=n(523),m=n(524),_=n(525),y=n(526),g=n(662),v=n(527),b=n(528),x=n(529),w=n(667),O=n(530),T=n(531),S=n(532),C=n(533),k=n(534),j=n(535),A=n(536),D=n(537),M=n(538),P=n(539),E=n(540),R=n(541),q=n(542),I=n(543),V=n(544),F=n(545),N=n(546),L=n(547),z=n(668),B=n(548),W=n(549),U=n(550),G=n(551),Y=n(669),Z=n(552),X=n(553),Q=n(554),H=n(555),$=n(556),J=n(557),K=n(558),tt=n(559),et=n(560),nt=n(561),ot=n(562),it=n(563),rt=n(564),st=n(565),at=n(566),ct=n(670),ut=n(567),lt=n(568),pt=n(14),ft=n(37),ht=n(7),dt=n(569),mt=n(570),_t=n(571),yt=n(572),gt=n(573),vt=n(574),bt=n(575),xt=n(576),wt=n(577),Ot=n(578),Tt=(n(579),n(580)),St=n(581),Ct=n(582),kt=n(583),jt=n(584),At=n(585),Dt=n(586),Mt=n(587),Pt=n(665),Et=n(588),Rt=n(666),qt=n(589),It=n(590),Vt=n(591),Ft=n(592),Nt=n(671),Lt=n(663),zt=n(593),Bt=n(594),Wt=n(672),Ut=n(595),Gt=n(596),Yt=n(597),Zt=n(598),Xt=n(599),Qt=n(600),Ht=n(601),$t=n(602),Jt=n(603),Kt=n(604),te=n(605),ee=n(606),ne=n(607),oe=n(608),ie=n(609),re=n(610),se=n(611),ae=n(612),ce=n(613),ue=n(614),le=n(615),pe=n(616),fe=n(617),he=n(10),de=n(618),me=n(619),_e=n(620),ye=n(621),ge=n(622),ve=n(623),be=n(624),xe=n(625),we=n(626),Oe=n(627),Te=n(628),Se=n(629),Ce=n(630),ke=n(631),je=(n(632),n(633)),Ae=n(634),De=n(635),Me=n(636),Pe=(n(637),n(638),n(639),n(640),n(641)),Ee=n(642),Re=n(643),qe=(n(644),n(645),n(646),n(647),n(648),n(649),n(650)),Ie=(n(651),n(44)),Ve=n(652),Fe=n(653),Ne=n(654),Le=n(655),ze=n(656),Be=n(657),We=n(658),Ue=n(659),Ge=n(0),Ye=n(33),Ze=n(34),Xe=n(8),Qe=n(26),He=n(6),$e=n(27),Je=n(9),Ke=n(15),tn=n(23),en=n(45),nn=n(19),on=n(38),rn=n(32),sn=n(13),an=(n(660),n(661)),cn=n(28);n(46),n(130);const un=Object(C.a)(new Map,new WeakMap),ln=Object(Ne.a)(),pn=Object(oe.a)(ln),fn=Object(wt.a)(pn),hn=Object(qt.a)(ln),dn=Object(rt.a)(fn,hn,pn),mn=Object(Vt.a)(dn),_n=Object(Pt.a)(un,pt.a,mn),yn=Object(ot.a)(Xe.a),gn=Object(xe.a)(Xe.a,yn,nn.a),vn=Object(l.a)(_n,He.a,gn),bn=new WeakMap,xn=Object(st.a)(Ge.g),wn=new WeakMap,On=Object(J.a)(cn.a),Tn=Object(gt.a)(hn),Sn=Object(vt.a)(ln),Cn=Object(bt.a)(ln),kn=Object(g.a)(Object(r.a)(Ge.b),bn,un,Object(lt.a)(Ge.h,Ze.a,Xe.a,He.a,$e.a,tn.a),pt.a,ft.a,he.a,Object(B.a)(Ye.a,Ge.h,Xe.a,He.a,$e.a,xn,tn.a,fn),Object(Y.a)(wn,Xe.a,Je.a),On,xn,Tn,Sn,Cn,fn),jn=Object(u.a)(kn,vn,pt.a,_n,xn,fn),An=new WeakSet,Dn=Object(Et.a)(ln),Mn=Object(I.a)(new Uint32Array(1)),Pn=Object(Le.a)(Mn,pt.a),En=Object(ze.a)(Mn),Rn=Object(p.a)(An,un,he.a,Dn,pn,Object(ke.a)(Dn),Pn,En),qn=Object(Pe.a)(mn),In=Object(Ee.a)(mn),Vn=Object(Re.a)(mn),Fn=Object(We.a)(mn),Nn=Object(we.a)(yn,Qe.a,nn.a),Ln=Object(M.a)(Nn),zn=Object(Rt.a)(un,mn,Object(je.a)(mn),Object(Ae.a)(pn),Object(De.a)(mn),Object(Me.a)(mn),qn,In,Vn,an.a,Object(Be.a)(on.a),Fn),Bn=Object(be.a)(Object(it.a)(Qe.a),Nn),Wn=Object(h.a)(Ln,zn,He.a,Bn,gn),Un=Object(v.a)(Object(s.a)(Ge.d),wn,Ge.e,b.a,o.createCancelAndHoldAutomationEvent,o.createCancelScheduledValuesAutomationEvent,o.createExponentialRampToValueAutomationEvent,o.createLinearRampToValueAutomationEvent,o.createSetTargetAutomationEvent,o.createSetValueAutomationEvent,o.createSetValueCurveAutomationEvent,hn),Gn=Object(f.a)(kn,Wn,Un,ht.a,zn,xn,fn,cn.a),Yn=Object(Ht.a)(mn),Zn=Object(m.a)(kn,_.a,pt.a,ht.a,Object(It.a)(Yn,on.a),xn,fn,gn),Xn=Object(zt.a)(mn),Qn=Object(S.a)(Ln,Xn,He.a,Bn,gn),Hn=Object(T.a)(kn,Un,Qn,ft.a,Xn,xn,fn),$n=Object(Mt.a)(Ke.a,Sn),Jn=Object(Ue.a)(ht.a,mn,$n),Kn=Object(Bt.a)(mn,Jn),to=Object(j.a)(Kn,He.a,gn),eo=Object(k.a)(kn,to,Kn,xn,fn),no=Object(Wt.a)(mn),oo=Object(D.a)(no,He.a,gn),io=Object(A.a)(kn,oo,no,xn,fn),ro=Object(Gt.a)(zn,Yn,$n),so=Object(Ut.a)(un,mn,ro,qn,Vn),ao=Object(q.a)(Ln,so,He.a,Bn,gn),co=Object(R.a)(kn,Un,ao,so,xn,fn,cn.a),uo=Object(Zt.a)(mn,Yn,$n),lo=Object(Yt.a)(mn,uo,he.a,on.a),po=Object(F.a)(lo,He.a,gn),fo=Object(V.a)(kn,po,lo,xn,fn),ho=Object(Xt.a)(mn),mo=Object(U.a)(Ln,ho,He.a,Bn,gn),_o=Object(W.a)(kn,Un,mo,ho,xn,fn),yo=Object(Qt.a)(mn,he.a),go=Object(Q.a)(Ln,yo,He.a,Bn,gn),vo=Object(X.a)(kn,Un,go,yo,he.a,xn,fn),bo=Object(nt.a)(Ln,Yn,He.a,Bn,gn),xo=Object(et.a)(kn,Un,bo,Yn,xn,fn),wo=Object(ce.a)(mn),Oo=Object(Jt.a)(ft.a,ht.a,wo,he.a),To=Object(Oe.a)(un,Yn,wo,Object(qe.a)(Yn,pn)),So=Object(ut.a)(zn,mn,He.a,pn,gn,To),Co=Object($t.a)(mn,Oo),ko=Object(ct.a)(kn,Co,So,xn,fn),jo=Object(y.a)(Un,Kn,so,wo,fn),Ao=new WeakMap,Do=Object(At.a)(Zn,jo,On,fn,Ao,cn.a),Mo=Object(ie.a)(un,mn,qn,In,Vn,Fn),Po=Object(_e.a)(Ln,Mo,He.a,Bn,gn),Eo=Object(me.a)(kn,Un,ht.a,Mo,Po,xn,fn,cn.a),Ro=Object(E.a)(zn),qo=Object(fe.a)(Ro,ht.a,mn,Yn,en.a,$n),Io=Object(pe.a)(Ro,ht.a,mn,qo,en.a,$n,on.a),Vo=Object(se.a)(Ye.a,ht.a,mn,Kn,Yn,wo,Io,he.a,Ze.a,$n),Fo=Object(re.a)(mn,Vo),No=Object(ge.a)(Ln,Kn,so,Yn,Fo,He.a,pn,Bn,gn,To),Lo=Object(ye.a)(kn,Un,Fo,No,xn,fn),zo=Object(ae.a)(dn),Bo=Object(ve.a)(zo,xn,new WeakSet),Wo=Object(le.a)(Kn,no,Yn,Io,he.a,$n),Uo=Object(ue.a)(mn,Wo,he.a),Go=Object(Ce.a)(Ln,Uo,He.a,Bn,gn),Yo=Object(Se.a)(kn,Un,Uo,Go,xn,fn),Zo=Object(Fe.a)(Io,He.a,gn),Xo=Object(Ve.a)(kn,ht.a,Io,Zo,xn,fn),Qo=Object(Ot.a)(ln),Ho=Object(K.a)(ln),$o=Qo?Object(a.a)(he.a,Object($.a)(ln),Ho,Object(tt.a)(i.a),dn,xn,new WeakMap,new WeakMap,ln):void 0,Jo=Object(xt.a)(Tn,fn),Ko=Object(z.a)(An,un,L.a,H.a,new WeakSet,xn,Jo,fn,pn,rn.a,sn.a,Pn,En),ti=Object(O.a)($o,jn,Rn,Gn,Hn,eo,io,co,fo,Ko,_o,vo,xo,ko,Do,Eo,Lo,Bo,Yo,Xo),ei=Object(Kt.a)(mn),ni=Object(Tt.a)(kn,ei,xn,fn),oi=Object(te.a)(mn,he.a),ii=Object(St.a)(kn,oi,xn,fn),ri=Object(ee.a)(mn),si=Object(Ct.a)(kn,ri,xn,fn),ai=Object(ne.a)(ht.a,mn,fn),ci=Object(kt.a)(kn,ai,xn),ui=Object(d.a)(ti,ht.a,he.a,Ie.a,ni,ii,si,ci,hn),li=Object(at.a)(Ao),pi=Object(c.a)(li),fi=Object(P.a)(pt.a),hi=Object(G.a)(li),di=Object(Z.a)(pt.a),mi=Object(Lt.a)(bn,fi,pt.a,ht.a,Kn,no,so,Yn,wo,he.a,di,Ho,$n),_i=Object(Nt.a)(ht.a,mn,mi,Yn,he.a,$n),yi=Object(Ft.a)(ln),gi=Object(w.a)(Ln,fi,zn,Kn,no,so,Yn,hi,di,Ho,He.a,yi,pn,Bn,gn,To),vi=Qo?Object(x.a)(pi,kn,Un,gi,_i,xn,fn,yi,cn.a):void 0,bi=(Object(jt.a)(ht.a,he.a,Ie.a,Do,hn),Object(N.a)(he.a,pn)),xi=Object(Te.a)(An,un,yn,li,To,rn.a,Pn,En),wi=(Object(Dt.a)(un,ht.a,bi,Do,xi),Object(de.a)(ti,un,ht.a,bi,xi)),Oi=Object(dt.a)(Ge.g,Tn),Ti=Object(mt.a)(Ge.c,Sn),Si=Object(_t.a)(Ge.e,Cn),Ci=Object(yt.a)(Ge.g,fn)},function(t,e,n){!function(t,e,n,o){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n,o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o;var i=function(t,e,n){return{endTime:e,insertTime:n,type:"exponentialRampToValue",value:t}},r=function(t,e,n){return{endTime:e,insertTime:n,type:"linearRampToValue",value:t}},s=function(t,e){return{startTime:e,type:"setValue",value:t}},a=function(t,e,n){return{duration:n,startTime:e,type:"setValueCurve",values:t}},c=function(t,e,n){var o=n.startTime,i=n.target,r=n.timeConstant;return i+(e-i)*Math.exp((o-t)/r)},u=function(t){return"exponentialRampToValue"===t.type},l=function(t){return"linearRampToValue"===t.type},p=function(t){return u(t)||l(t)},f=function(t){return"setValue"===t.type},h=function(t){return"setValueCurve"===t.type},d=function t(e,n,o,i){var r=e[n];return void 0===r?i:p(r)||f(r)?r.value:h(r)?r.values[r.values.length-1]:c(o,t(e,n-1,r.startTime,i),r)},m=function(t,e,n,o,i){return void 0===n?[o.insertTime,i]:p(n)?[n.endTime,n.value]:f(n)?[n.startTime,n.value]:h(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,d(t,e-1,n.startTime,i)]},_=function(t){return"cancelAndHold"===t.type},y=function(t){return"cancelScheduledValues"===t.type},g=function(t){return _(t)||y(t)?t.cancelTime:u(t)||l(t)?t.endTime:t.startTime},v=function(t,e,n,o){var i=o.endTime,r=o.value;return n===r?r:0<n&&0<r||n<0&&r<0?n*Math.pow(r/n,(t-e)/(i-e)):0},b=function(t,e,n,o){return n+(t-e)/(o.endTime-e)*(o.value-n)},x=function(t,e){var n=e.duration,o=e.startTime,i=e.values;return function(t,e){var n=Math.floor(e),o=Math.ceil(e);return n===o?t[n]:(1-(e-n))*t[n]+(1-(o-e))*t[o]}(i,(t-o)/n*(i.length-1))},w=function(t){return"setTarget"===t.type},O=function(){function t(e){n(this,t),this._automationEvents=[],this._currenTime=0,this._defaultValue=e}return o(t,[{key:Symbol.iterator,value:function(){return this._automationEvents[Symbol.iterator]()}},{key:"add",value:function(t){var e=g(t);if(_(t)||y(t)){var n=this._automationEvents.findIndex((function(t){return g(t)>=e})),o=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),_(t)){var c=this._automationEvents[this._automationEvents.length-1];if(void 0!==o&&p(o)){if(w(c))throw new Error("The internal list is malformed.");var f=h(c)?c.startTime+c.duration:g(c),d=h(c)?c.values[c.values.length-1]:c.value,m=u(o)?v(e,f,d,o):b(e,f,d,o),x=u(o)?i(m,e,this._currenTime):r(m,e,this._currenTime);this._automationEvents.push(x)}void 0!==c&&w(c)&&this._automationEvents.push(s(this.getValue(e),e)),void 0!==c&&h(c)&&c.startTime+c.duration>e&&(this._automationEvents[this._automationEvents.length-1]=a(new Float32Array([6,7]),c.startTime,e-c.startTime))}}else{var O=this._automationEvents.findIndex((function(t){return g(t)>e})),T=-1===O?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[O-1];if(void 0!==T&&h(T)&&g(T)+T.duration>e)return!1;var S=u(t)?i(t.value,t.endTime,this._currenTime):l(t)?r(t.value,e,this._currenTime):t;if(-1===O)this._automationEvents.push(S);else{if(h(t)&&e+t.duration>g(this._automationEvents[O]))return!1;this._automationEvents.splice(O,0,S)}}return!0}},{key:"flush",value:function(t){var e=this._automationEvents.findIndex((function(e){return g(e)>t}));if(e>1){var n=this._automationEvents.slice(e-1),o=n[0];w(o)&&n.unshift(s(d(this._automationEvents,e-2,o.startTime,this._defaultValue),o.startTime)),this._automationEvents=n}}},{key:"getValue",value:function(t){if(0===this._automationEvents.length)return this._defaultValue;var n=this._automationEvents[this._automationEvents.length-1],o=this._automationEvents.findIndex((function(e){return g(e)>t})),i=this._automationEvents[o],r=g(n)<=t?n:this._automationEvents[o-1];if(void 0!==r&&w(r)&&(void 0===i||!p(i)||i.insertTime>t))return c(t,d(this._automationEvents,o-2,r.startTime,this._defaultValue),r);if(void 0!==r&&f(r)&&(void 0===i||!p(i)))return r.value;if(void 0!==r&&h(r)&&(void 0===i||!p(i)||r.startTime+r.duration>t))return t<r.startTime+r.duration?x(t,r):r.values[r.values.length-1];if(void 0!==r&&p(r)&&(void 0===i||!p(i)))return r.value;if(void 0!==i&&u(i)){var s=m(this._automationEvents,o-1,r,i,this._defaultValue),a=e(s,2),_=a[0],y=a[1];return v(t,_,y,i)}if(void 0!==i&&l(i)){var O=m(this._automationEvents,o-1,r,i,this._defaultValue),T=e(O,2),S=T[0],C=T[1];return b(t,S,C,i)}return this._defaultValue}}]),t}();t.AutomationEventList=O,t.createCancelAndHoldAutomationEvent=function(t){return{cancelTime:t,type:"cancelAndHold"}},t.createCancelScheduledValuesAutomationEvent=function(t){return{cancelTime:t,type:"cancelScheduledValues"}},t.createExponentialRampToValueAutomationEvent=function(t,e){return{endTime:e,type:"exponentialRampToValue",value:t}},t.createLinearRampToValueAutomationEvent=function(t,e){return{endTime:e,type:"linearRampToValue",value:t}},t.createSetTargetAutomationEvent=function(t,e,n){return{startTime:e,target:t,timeConstant:n,type:"setTarget"}},t.createSetValueAutomationEvent=s,t.createSetValueCurveAutomationEvent=a,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(673),n(679),n(680))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(0);const i=t=>o.h.has(t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(0),i=n(9);const r=t=>Object(i.a)(o.i,t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(0),i=n(20);const r=t=>{if(!o.a.has(t))throw new Error("The AudioNode is not stored.");o.a.delete(t),Object(i.a)(t).forEach(t=>t(!1))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(24);const i=t=>Object(o.a)(t[0])},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(0);const i=t=>o.a.has(t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>"context"in t},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>"context"in t},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(0),i=n(9);const r=t=>Object(i.a)(o.d,t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(0),i=n(9);const r=t=>Object(i.a)(o.e,t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e)=>n=>{const o={value:t};return Object.defineProperties(n,{currentTarget:o,target:o}),"function"==typeof e?e.call(t,n):e.handleEvent.call(t,n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(14);const i=t=>{var e;t.getChannelData=(e=t.getChannelData,n=>{try{return e.call(t,n)}catch(t){if(12===t.code)throw Object(o.a)();throw t}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>{var e;t.start=(e=t.start,(n=0,o=0,i)=>{if("number"==typeof i&&i<0||o<0||n<0)throw new RangeError("The parameters can't be negative.");e.call(t,n,o,i)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>{var e;t.stop=(e=t.stop,(n=0)=>{if(n<0)throw new RangeError("The parameter can't be negative.");e.call(t,n)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>{try{t.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(12);const i=(t,e,n,i)=>{if(Object(o.a)(e)){const o=e.inputs[i];return t.connect(o,n,0),[o,n,0]}return t.connect(e,n,i),[e,n,i]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(12);const i=(t,e,n,i)=>{Object(o.a)(e)?t.disconnect(e.inputs[i],n,0):t.disconnect(e,n,i)}},function(t,e,n){"use strict";function o(t,e,n,o,i){if("function"==typeof t.copyFromChannel)0===e[n].byteLength&&(e[n]=new Float32Array(128)),t.copyFromChannel(e[n],o,i);else{const r=t.getChannelData(o);if(0===e[n].byteLength)e[n]=r.slice(i,i+128);else{const t=new Float32Array(r.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);e[n].set(t)}}}n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e)=>{const n=[];for(let o=0;o<t;o+=1){const t=[],i="number"==typeof e?e:e[o];for(let e=0;e<i;e+=1)t.push(new Float32Array(128));n.push(t)}return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=()=>{try{return new DOMException("","InvalidAccessError")}catch(t){return t.code=15,t.name="InvalidAccessError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e,n,o)=>{let i=Object.getPrototypeOf(t);for(;!i.hasOwnProperty(e);)i=Object.getPrototypeOf(i);const{get:r,set:s}=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,{get:n(r),set:o(s)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>void 0===t||"number"==typeof t||"string"==typeof t&&("balanced"===t||"interactive"===t||"playback"===t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));class o{constructor(t){this._map=new Map(t)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(t,e=null){return this._map.forEach((n,o)=>t.call(e,n,o,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()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e,n,o,i)=>{"function"==typeof t.copyToChannel?0!==e[n].byteLength&&t.copyToChannel(e[n],o,i):0!==e[n].byteLength&&t.getChannelData(o).set(e[n],i)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e,n,o,i,r,s,a,c,u,l)=>{const p=u.length;let f=a;for(let a=0;a<p;a+=1){let p=n[0]*u[a];for(let e=1;e<i;e+=1){const o=f-e&c-1;p+=n[e]*r[o],p-=t[e]*s[o]}for(let t=i;t<o;t+=1)p+=n[t]*r[f-t&c-1];for(let n=i;n<e;n+=1)p-=t[n]*s[f-n&c-1];r[f]=u[a],s[f]=p,f=f+1&c-1,l[a]=p}return f}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e)=>null===t?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(t*e)))))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=()=>{try{return new DOMException("","UnknownError")}catch(t){return t.name="UnknownError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>{if(null===t)return!1;const e=t.length;return e%2!=0?0!==t[Math.floor(e/2)]:t[e/2-1]+t[e/2]!==0}},function(t,e,n){"use strict";n(47),n(48),n(49),n(50),n(51),n(52),n(53),n(54),n(55),n(56),n(57),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(69),n(70),n(71),n(72),n(73),n(74),n(75),n(76),n(77),n(78),n(79),n(80),n(81),n(82),n(83),n(84),n(85),n(86),n(87),n(88),n(89),n(90),n(91),n(92),n(93),n(94),n(95),n(96),n(97),n(98),n(99),n(100),n(101),n(102),n(103),n(104),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(112),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(127),n(128),n(129)},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(435),n(436),n(437),n(438),n(439),n(440),n(441),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(485),n(486),n(487),n(488),n(489),n(490),n(491),n(492),n(493),n(494),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(504),n(505),n(506),n(507),n(508),n(509),n(510),n(511),n(512)},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=()=>{try{return new DOMException("","AbortError")}catch(t){return t.code=20,t.name="AbortError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>(e,n,o)=>{const i=[];for(let t=0;t<o.numberOfInputs;t+=1)i.push(new Set);t.set(e,{activeInputs:i,outputs:new Set,passiveInputs:new WeakMap,renderer:n})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>(e,n)=>{t.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:n})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>(e,n)=>{t(e).add(n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const o={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},i=(t,e,n,i,r,s)=>class extends t{constructor(t,n=o){const a=r(t),c={...o,...n},u=i(a,c);super(t,!1,u,s(a)?e():null),this._nativeAnalyserNode=u}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){const e=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=t,!(t>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=e,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(t){const e=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=t,!(this._nativeAnalyserNode.maxDecibels>t))throw this._nativeAnalyserNode.minDecibels=e,n()}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)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(3);const i=(t,e,n)=>()=>{const i=new WeakMap;return{render(r,s,a){const c=i.get(s);return void 0!==c?Promise.resolve(c):(async(r,s,a)=>{let c=e(r);if(!Object(o.a)(c,s)){const e={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,fftSize:c.fftSize,maxDecibels:c.maxDecibels,minDecibels:c.minDecibels,smoothingTimeConstant:c.smoothingTimeConstant};c=t(s,e)}return i.set(s,c),await n(r,s,c,a),c})(r,s,a)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var o=n(32),i=n(29);const r={numberOfChannels:1},s=(t,e,n,s,a,c,u,l)=>{let p=null;return class f{constructor(f){if(null===a)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h,numberOfChannels:d,sampleRate:m}={...r,...f};null===p&&(p=new a(1,1,44100));const _=null!==s&&e(c,c)?new s({length:h,numberOfChannels:d,sampleRate:m}):p.createBuffer(d,h,m);if(0===_.numberOfChannels)throw n();return"function"!=typeof _.copyFromChannel?(u(_),Object(i.a)(_)):e(o.a,()=>Object(o.a)(_))||l(_),t.add(_),_}static[Symbol.hasInstance](e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===f.prototype||t.has(e)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var o=n(2),i=n(16),r=n(21);const s={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},a=(t,e,n,a,c,u,l,p)=>class extends t{constructor(t,i=s){const r=u(t),a={...s,...i},p=c(r,a),f=l(r),h=f?e():null;super(t,!1,p,h),this._audioBufferSourceNodeRenderer=h,this._isBufferNullified=!1,this._isBufferSet=null!==i.buffer&&void 0!==i.buffer,this._nativeAudioBufferSourceNode=p,this._onended=null,this._playbackRate=n(this,f,p.playbackRate,o.b,o.a)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(t){try{this._nativeAudioBufferSourceNode.buffer=t}catch(e){if(null!==t||17!==e.code)throw e;if(null!==this._nativeAudioBufferSourceNode.buffer){const t=this._nativeAudioBufferSourceNode.buffer,e=t.numberOfChannels;for(let n=0;n<e;n+=1)t.getChannelData(n).fill(0);this._isBufferNullified=!0}}if(null!==t){if(this._isBufferSet)throw a();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(t){this._nativeAudioBufferSourceNode.loop=t}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(t){this._nativeAudioBufferSourceNode.loopEnd=t}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(t){this._nativeAudioBufferSourceNode.loopStart=t}get onended(){return this._onended}set onended(t){const e="function"==typeof t?p(this,t):null;this._nativeAudioBufferSourceNode.onended=e;const n=this._nativeAudioBufferSourceNode.onended;this._onended=null!==n&&n===e?t:n}get playbackRate(){return this._playbackRate}start(t=0,e=0,n){if(this._nativeAudioBufferSourceNode.start(t,e,n),null!==this._audioBufferSourceNodeRenderer)this._audioBufferSourceNodeRenderer.start=void 0===n?[t,e]:[t,e,n];else{Object(i.a)(this);const t=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",t),setTimeout(()=>Object(r.a)(this),1e3)};this._nativeAudioBufferSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeAudioBufferSourceNode.stop(t),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=t)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(3);const i=(t,e,n,i,r)=>()=>{const s=new WeakMap;let a=null,c=null;return{set start(t){a=t},set stop(t){c=t},render(u,l,p){const f=s.get(l);return void 0!==f?Promise.resolve(f):(async(u,l,p)=>{let f=n(u);const h=Object(o.a)(f,l);if(!h){const t={buffer:f.buffer,channelCount:f.channelCount,channelCountMode:f.channelCountMode,channelInterpretation:f.channelInterpretation,loop:f.loop,loopEnd:f.loopEnd,loopStart:f.loopStart,playbackRate:f.playbackRate.value};f=e(l,t),null!==a&&f.start(...a),null!==c&&f.stop(c)}return s.set(l,f),h?await t(l,u.playbackRate,f.playbackRate,p):await i(l,u.playbackRate,f.playbackRate,p),await r(u,l,f,p),f})(u,l,p)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(39);const i=(t,e,n,i,r,s,a,c,u)=>class extends t{constructor(t={}){if(null===u)throw new Error("Missing the native AudioContext constructor.");const e=new u(t);if(null===e)throw i();if(!Object(o.a)(t.latencyHint))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 n();super(e,2);const{latencyHint:r}=t,{sampleRate:s}=e;if(this._baseLatency="number"==typeof e.baseLatency?e.baseLatency:"balanced"===r?512/s:"interactive"===r||void 0===r?256/s:"playback"===r?1024/s:128*Math.max(2,Math.min(128,Math.round(r*s/128)))/s,this._nativeAudioContext=e,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 e()}):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close())}createMediaElementSource(t){return new r(this,{mediaElement:t})}createMediaStreamDestination(){return new s(this)}createMediaStreamSource(t){return new a(this,{mediaStream:t})}createMediaStreamTrackSource(t){return new c(this,{mediaStreamTrack:t})}resume(){return"suspended"===this._state?new Promise((t,e)=>{const n=()=>{this._nativeAudioContext.removeEventListener("statechange",n),"running"===this._nativeAudioContext.state?t():this.resume().then(t,e)};this._nativeAudioContext.addEventListener("statechange",n)}):this._nativeAudioContext.resume().catch(t=>{if(void 0===t||15===t.code)throw e();throw t})}suspend(){return this._nativeAudioContext.suspend().catch(t=>{if(void 0===t)throw e();throw t})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e,n,o,i,r,s,a)=>class extends t{constructor(t,n){const o=r(t),c=s(o),u=i(o,n,c);super(t,!1,u,c?e(a):null),this._isNodeOfNativeOfflineAudioContext=c,this._nativeAudioDestinationNode=u}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(t){if(this._isNodeOfNativeOfflineAudioContext)throw o();if(t>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=t}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(t){if(this._isNodeOfNativeOfflineAudioContext)throw o();this._nativeAudioDestinationNode.channelCountMode=t}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>{let e=null;return{render:(n,o,i)=>(null===e&&(e=(async(e,n,o)=>{const i=n.destination;return await t(e,n,i,o),i})(n,o,i)),e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(2);const i=(t,e,n,i,r)=>(s,a)=>{const c=a.listener,{forwardX:u,forwardY:l,forwardZ:p,positionX:f,positionY:h,positionZ:d,upX:m,upY:_,upZ:y}=void 0===c.forwardX?(()=>{const u=e(a,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),l=r(a),p=i(a,256,9,0),f=(e,i)=>{const r=n(a,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:i});return r.connect(u,0,e),r.start(),Object.defineProperty(r.offset,"defaultValue",{get:()=>i}),t({context:s},l,r.offset,o.b,o.a)};let h=[0,0,-1,0,1,0],d=[0,0,0];return p.onaudioprocess=({inputBuffer:t})=>{const e=[t.getChannelData(0)[0],t.getChannelData(1)[0],t.getChannelData(2)[0],t.getChannelData(3)[0],t.getChannelData(4)[0],t.getChannelData(5)[0]];e.some((t,e)=>t!==h[e])&&(c.setOrientation(...e),h=e);const n=[t.getChannelData(6)[0],t.getChannelData(7)[0],t.getChannelData(8)[0]];n.some((t,e)=>t!==d[e])&&(c.setPosition(...n),d=n)},u.connect(p),{forwardX:f(0,0),forwardY:f(1,0),forwardZ:f(2,-1),positionX:f(6,0),positionY:f(7,0),positionZ:f(8,0),upX:f(3,0),upY:f(4,1),upZ:f(5,0)}})():c;return{get forwardX(){return u},get forwardY(){return l},get forwardZ(){return p},get positionX(){return f},get positionY(){return h},get positionZ(){return d},get upX(){return m},get upY(){return _},get upZ(){return y}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(18);const i=(t,e,n,i,r,s,a,c,u,l,p,f)=>(h,d,m,_=null,y=null)=>{const g=new o.AutomationEventList(m.defaultValue),v=d?i(g):null,b={get defaultValue(){return m.defaultValue},get maxValue(){return null===_?m.maxValue:_},get minValue(){return null===y?m.minValue:y},get value(){return m.value},set value(t){m.value=t,b.setValueAtTime(t,h.context.currentTime)},cancelAndHoldAtTime(t){if("function"==typeof m.cancelAndHoldAtTime)null===v&&g.flush(h.context.currentTime),g.add(r(t)),m.cancelAndHoldAtTime(t);else{const e=Array.from(g).pop();null===v&&g.flush(h.context.currentTime),g.add(r(t));const n=Array.from(g).pop();m.cancelScheduledValues(t),e!==n&&void 0!==n&&("exponentialRampToValue"===n.type?m.exponentialRampToValueAtTime(n.value,n.endTime):"linearRampToValue"===n.type?m.linearRampToValueAtTime(n.value,n.endTime):"setValue"===n.type?m.setValueAtTime(n.value,n.startTime):"setValueCurve"===n.type&&m.setValueCurveAtTime(n.values,n.startTime,n.duration))}return b},cancelScheduledValues:t=>(null===v&&g.flush(h.context.currentTime),g.add(s(t)),m.cancelScheduledValues(t),b),exponentialRampToValueAtTime:(t,e)=>(null===v&&g.flush(h.context.currentTime),g.add(a(t,e)),m.exponentialRampToValueAtTime(t,e),b),linearRampToValueAtTime:(t,e)=>(null===v&&g.flush(h.context.currentTime),g.add(c(t,e)),m.linearRampToValueAtTime(t,e),b),setTargetAtTime:(t,e,n)=>(null===v&&g.flush(h.context.currentTime),g.add(u(t,e,n)),m.setTargetAtTime(t,e,n),b),setValueAtTime:(t,e)=>(null===v&&g.flush(h.context.currentTime),g.add(l(t,e)),m.setValueAtTime(t,e),b),setValueCurveAtTime(t,e,n){if(null!==f&&"webkitAudioContext"===f.name){const o=e+n,i=h.context.sampleRate,r=Math.ceil(e*i),s=Math.floor(o*i),a=s-r,c=new Float32Array(a);for(let o=0;o<a;o+=1){const s=(t.length-1)/n*((r+o)/i-e),a=Math.floor(s),u=Math.ceil(s);c[o]=a===u?t[a]:(1-(s-a))*t[a]+(1-(u-s))*t[u]}null===v&&g.flush(h.context.currentTime),g.add(p(c,e,n)),m.setValueCurveAtTime(c,e,n);const u=s/i;u<o&&b.setValueAtTime(c[c.length-1],u),b.setValueAtTime(t[t.length-1],o)}else null===v&&g.flush(h.context.currentTime),g.add(p(t,e,n)),m.setValueCurveAtTime(t,e,n);return b}};return n.set(b,m),e.set(b,h),t(b,v),b}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>({replay(e){for(const n of t)if("exponentialRampToValue"===n.type){const{endTime:t,value:o}=n;e.exponentialRampToValueAtTime(o,t)}else if("linearRampToValue"===n.type){const{endTime:t,value:o}=n;e.linearRampToValueAtTime(o,t)}else if("setTarget"===n.type){const{startTime:t,target:o,timeConstant:i}=n;e.setTargetAtTime(o,t,i)}else if("setValue"===n.type){const{startTime:t,value:o}=n;e.setValueAtTime(o,t)}else{if("setValueCurve"!==n.type)throw new Error("Can't apply an unknown automation.");{const{duration:t,startTime:o,values:i}=n;e.setValueCurveAtTime(i,o,t)}}}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var o=n(0),i=n(40);const r={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,outputChannelCount:void 0,parameterData:{},processorOptions:{}},s=t=>{const e=[];for(let n=0;n<t;n+=1)e.push(1);return e},a=(t,e,n,a,c,u,l,p,f)=>class extends e{constructor(e,f,h=r){const d=u(e),m=l(d),_=(t=>({...t,outputChannelCount:void 0!==t.outputChannelCount?t.outputChannelCount:1===t.numberOfInputs&&1===t.numberOfOutputs?[t.channelCount]:s(t.numberOfOutputs)}))({...r,...h}),y=o.j.get(d),g=void 0===y?void 0:y.get(f),v=c(d,m?null:e.baseLatency,p,f,g,_);super(e,!0,v,m?a(f,_,g):null);const b=[];v.parameters.forEach((t,e)=>{const o=n(this,m,t);b.push([e,o])}),this._nativeAudioWorkletNode=v,this._onprocessorerror=null,this._parameters=new i.a(b),m&&t(d,this)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(t){const e="function"==typeof t?f(this,t):null;this._nativeAudioWorkletNode.onprocessorerror=e;const n=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=null!==n&&n===e?t:n}get parameters(){return null===this._parameters?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e,n,o,i,r,s,a,c,u,l,p,f,h,d,m,_,y,g,v)=>class extends d{constructor(e,n){super(e,n),this._nativeContext=e,this._audioWorklet=void 0===t?void 0:{addModule:(e,n)=>t(this,e,n)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e(this)}createBiquadFilter(){return new i(this)}createBuffer(t,e,o){return new n({length:e,numberOfChannels:t,sampleRate:o})}createBufferSource(){return new o(this)}createChannelMerger(t=6){return new r(this,{numberOfInputs:t})}createChannelSplitter(t=6){return new s(this,{numberOfOutputs:t})}createConstantSource(){return new a(this)}createConvolver(){return new c(this)}createDelay(t=1){return new l(this,{maxDelayTime:t})}createDynamicsCompressor(){return new p(this)}createGain(){return new f(this)}createIIRFilter(t,e){return new h(this,{feedback:e,feedforward:t})}createOscillator(){return new m(this)}createPanner(){return new _(this)}createPeriodicWave(t,e,n={disableNormalization:!1}){return new y(this,{...n,imag:e,real:t})}createStereoPanner(){return new g(this)}createWaveShaper(){return new v(this)}decodeAudioData(t,e,n){return u(this._nativeContext,t).then(t=>("function"==typeof e&&e(t),t)).catch(t=>{throw"function"==typeof n&&n(t),t})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(2);const i={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},r=(t,e,n,r,s,a,c)=>class extends t{constructor(t,r=i){const u=a(t),l={...i,...r},p=s(u,l),f=c(u);super(t,!1,p,f?n():null),this._Q=e(this,f,p.Q,o.b,o.a),this._detune=e(this,f,p.detune,1200*Math.log2(o.b),-1200*Math.log2(o.b)),this._frequency=e(this,f,p.frequency,t.sampleRate/2,0),this._gain=e(this,f,p.gain,40*Math.log10(o.b),o.a),this._nativeBiquadFilterNode=p}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,n){if(this._nativeBiquadFilterNode.getFrequencyResponse(t,e,n),t.length!==e.length||e.length!==n.length)throw r()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(3);const i=(t,e,n,i,r)=>()=>{const s=new WeakMap;return{render(a,c,u){const l=s.get(c);return void 0!==l?Promise.resolve(l):(async(a,c,u)=>{let l=n(a);const p=Object(o.a)(l,c);if(!p){const t={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=e(c,t)}return s.set(c,l),p?(await t(c,a.Q,l.Q,u),await t(c,a.detune,l.detune,u),await t(c,a.frequency,l.frequency,u),await t(c,a.gain,l.gain,u)):(await i(c,a.Q,l.Q,u),await i(c,a.detune,l.detune,u),await i(c,a.frequency,l.frequency,u),await i(c,a.gain,l.gain,u)),await r(a,c,l,u),l})(a,c,u)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=(t,e)=>(n,o)=>{const i=e.get(n);if(void 0!==i)return i;const r=t.get(n);if(void 0!==r)return r;try{const i=o();return i instanceof Promise?(t.set(n,i),i.catch(()=>!1).then(o=>(t.delete(n),e.set(n,o),o))):(e.set(n,i),i)}catch{return e.set(n,!1),!1}}},functi