diff --git a/app/package.json b/app/package.json index 8c920b4..7111216 100644 --- a/app/package.json +++ b/app/package.json @@ -8,11 +8,6 @@ "build": "vite build", "preview": "vite preview" }, - "prettier": { - "tabWidth": 4, - "semi": false, - "singleQuote": true - }, "dependencies": { "@mapbox/tiny-sdf": "^2.2.0", "@tiptap/pm": "^3.28.0", diff --git a/app/public/drops/bonsai/assets/index-B4Fea1ir.css b/app/public/drops/bonsai/assets/index-B4Fea1ir.css deleted file mode 100644 index 046eb9b..0000000 --- a/app/public/drops/bonsai/assets/index-B4Fea1ir.css +++ /dev/null @@ -1 +0,0 @@ -:root{--ivory:#fefdfc;--ivory-shade:#ecebea;--sand:#f7f4ef;--sand-shade:#b9b7b3;--charcoal:#181818;--charcoal-shade:#2a2a2a;--forest:#053f0a;--forest-shade:#f6fff6;--clay:#fa3812;--clay-shade:#ffefec;--sea:#1253fa;--sea-shade:#f0f8ff;--grey-700:#565656;--grey-600:#747474;--grey-500:#a3a3a3;--grey-400:#d1d1d1}:root .theme-light{--theme-bg:#fefdfc;--theme-fg:#181818;--theme-layout:#f7f4ef;--theme-grey:#747474;--theme-shade:#ecebea;--theme-contrast:#fa3812}:root .theme-dark{--theme-bg:#181818;--theme-fg:#fefdfc;--theme-layout:#f7f4ef;--theme-grey:#a3a3a3;--theme-shade:#2a2a2a;--theme-contrast:#fa3812}:root{--ease-in-quad:cubic-bezier(.55, .085, .68, .53);--ease-in-cubic:cubic-bezier(.55, .055, .675, .19);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-quint:cubic-bezier(.755, .05, .855, .06);--ease-in-expo:cubic-bezier(.95, .05, .795, .035);--ease-in-circ:cubic-bezier(.6, .04, .98, .335);--ease-out-quad:cubic-bezier(.25, .46, .45, .94);--ease-out-cubic:cubic-bezier(.215, .61, .355, 1);--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-out-quint:cubic-bezier(.23, 1, .32, 1);--ease-out-expo:cubic-bezier(.19, 1, .22, 1);--ease-out-circ:cubic-bezier(.075, .82, .165, 1);--ease-in-out-quad:cubic-bezier(.455, .03, .515, .955);--ease-in-out-cubic:cubic-bezier(.645, .045, .355, 1);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--ease-in-out-quint:cubic-bezier(.86, 0, .07, 1);--ease-in-out-expo:cubic-bezier(1, 0, 0, 1);--ease-in-out-circ:cubic-bezier(.785, .135, .15, .86)}:where(:not(html,iframe,canvas,img,svg,video,audio):not(svg *,symbol *)){all:unset;display:revert}*,:before,:after{box-sizing:border-box}a,button{cursor:revert}img{max-block-size:100%;max-inline-size:100%}table{border-collapse:collapse}input,textarea{-webkit-user-select:auto}textarea{white-space:revert}meter{appearance:revert}:where(pre){all:revert}::placeholder{color:unset}::marker{content:initial}:where([hidden]){display:none}:where([contenteditable]:not([contenteditable=false])){-moz-user-modify:read-write;-webkit-user-modify:read-write;overflow-wrap:break-word;-webkit-line-break:after-white-space;-webkit-user-select:auto}:where([draggable=true]){-webkit-user-drag:element}:where(dialog:modal){all:revert}@font-face{font-family:Galapagos A;font-style:normal;font-weight:400;src:url(/drops/bonsai/assets/abc-galapagos-a-trial-C6Aj3Ara.woff2)format("woff2"),url(/drops/bonsai/assets/abc-galapagos-a-trial-D4z1ovPJ.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:normal;font-weight:400;src:url(/drops/bonsai/assets/hanken-grotesk-BB3emo1n.woff2)format("woff2"),url(/drops/bonsai/assets/hanken-grotesk-NweiADIQ.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:italic;font-weight:400;src:url(/drops/bonsai/assets/hanken-grotesk-italic-jl8TIPSn.woff2)format("woff2"),url(/drops/bonsai/assets/hanken-grotesk-italic-C_HjJa0S.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:normal;font-weight:600;src:url(/drops/bonsai/assets/hanken-grotesk-semibold-TK-BXOrb.woff2)format("woff2"),url(/drops/bonsai/assets/hanken-grotesk-semibold-vPR5A_Tb.woff)format("woff")}@font-face{font-family:Iosevka Charon Mono;font-style:normal;font-weight:700;src:url(/drops/bonsai/assets/iosevka-charon-mono-bold-1nweGISG.woff2)format("woff2"),url(/drops/bonsai/assets/iosevka-charon-mono-bold-DN5oOlAE.woff)format("woff")}:root{--font-serif:"Instrument Serif", serif;--font-sans:"Hanken Grotesk", sans-serif;--font-mono:"Iosevka Charon Mono", monospace;--layout-column-count:12;--layout-column-gap:20px;--layout-margin:20px;--layout-width:calc(100vw - (2 * var(--layout-margin)));--layout-column-width:calc(( var(--layout-width) - ((var(--layout-column-count) - 1) * var(--layout-column-gap)) ) / var(--layout-column-count))}.layout-block,.layout-grid{padding-left:var(--layout-margin);padding-right:var(--layout-margin);width:100%}.layout-grid{grid-template-columns:repeat(var(--layout-column-count), minmax(0, 1fr));grid-gap:var(--layout-column-gap);display:grid}html,html *{scrollbar-width:none!important;-ms-overflow-style:none!important}html::-webkit-scrollbar{width:0!important;height:0!important}html ::-webkit-scrollbar{width:0!important;height:0!important}:root{font-family:var(--font-sans), Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;background:var(--ivory);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{min-height:100vh;margin:0}.h1,h1{font-family:var(--font-serif);font-size:max(8vw,128px);font-style:italic;font-weight:400;line-height:1}.h2,h2{font-family:var(--font-serif);font-size:max(4vw,64px);font-style:italic;font-weight:400;line-height:1}.h3,h3{font-family:var(--font-serif);font-size:max(3vw,48px);font-style:italic;font-weight:400;line-height:1}.h4,h4{font-family:var(--font-serif);font-size:max(2vw,32px);font-style:italic;font-weight:400;line-height:1}.p,p,a,li{font-family:var(--font-sans);font-size:max(1vw,16px);font-weight:400;line-height:1.25}.label,label,button,pre{font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1}.bold{font-weight:700}#app{min-height:100vh}button{cursor:pointer}::selection{color:var(--theme-bg);background:var(--theme-fg)}::selection{color:var(--theme-bg);background:var(--theme-fg)}.shared-range label{font-family:var(--font-mono);text-transform:uppercase;opacity:.45;justify-content:space-between;gap:max(.5vw,8px);font-size:max(.875vw,14px);font-weight:700;line-height:1;display:flex}.shared-range input[type=range]{appearance:none;background:var(--grey-400);cursor:pointer;border-radius:max(.125vw,2px);outline:none;width:100%;height:max(.125vw,2px)}.shared-range input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:var(--theme-fg);cursor:pointer;width:max(.75vw,12px);height:max(.75vw,12px);transition:transform .15s var(--ease-out-quad);border-radius:50%}.shared-range input[type=range]::-moz-range-thumb{background:var(--theme-fg);cursor:pointer;width:max(.75vw,12px);height:max(.75vw,12px);transition:transform .15s var(--ease-out-quad);border:none;border-radius:50%}.shared-range input[type=range]:hover::-webkit-slider-thumb{transform:scale(1.3)}.shared-range input[type=range]:hover::-moz-range-thumb{transform:scale(1.3)}.btn{--t-duration:.35s;--t-ease:var(--ease-out-quad);background:var(--theme-contrast);color:var(--ivory);cursor:pointer;transition:color var(--t-duration) var(--t-ease);border-radius:max(.5vw,8px);align-items:center;padding:max(.375vw,6px) max(1vw,16px);display:inline-flex;position:relative;overflow:hidden}.btn .leading-icon{opacity:0;width:max(.625vw,10px);height:1em;transition:transform var(--t-duration) var(--t-ease), opacity var(--t-duration) var(--t-ease);align-items:center;display:flex;position:absolute;transform:translate(-100%)}.btn .text{width:100%;transition:transform var(--t-duration) var(--t-ease);display:block;position:relative;overflow:hidden}.btn .text span{transition:transform var(--t-duration) var(--t-ease);font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1;display:inline-block}.btn .text span:first-child{color:var(--ivory)}.btn .text span:last-child{color:var(--ivory);position:absolute;bottom:0;left:0;right:0;transform:translateY(105%)}.btn .arrow{transition:transform var(--t-duration) var(--t-ease), opacity var(--t-duration) var(--t-ease)}.btn .arrow:not(:only-child){margin-left:.5em}.btn .loading{align-items:center;width:max(.625vw,10px);height:1em;display:flex}.btn .loading svg{width:100%;height:auto}.btn:before{content:"";background:var(--theme-contrast);clip-path:inset(100% 0 0);transition:clip-path var(--t-duration) var(--t-ease);display:block;position:absolute;inset:-2px}.btn:hover,.btn.active,.btn.router-link-active{color:var(--ivory)}.btn:hover:before,.btn.active:before,.btn.router-link-active:before{clip-path:inset(0)}.btn:hover .text span:first-child,.btn.active .text span:first-child,.btn.router-link-active .text span:first-child{transform:translateY(-105%)}.btn:hover .text span:last-child,.btn.active .text span:last-child,.btn.router-link-active .text span:last-child{transform:none}.btn:hover.text-icon .leading-icon,.btn.active.text-icon .leading-icon,.btn.router-link-active.text-icon .leading-icon{opacity:1;transform:none}.btn:hover.text-icon .text,.btn.active.text-icon .text,.btn.router-link-active.text-icon .text{transform:translate(1.5em)}.btn:hover.text-icon .arrow,.btn.active.text-icon .arrow,.btn.router-link-active.text-icon .arrow{opacity:0;transform:translate(100%)}.btn:disabled,.btn.disabled{opacity:.16;pointer-events:none}.bonsai{height:100%;position:relative}.bonsai canvas{width:100%;height:100%;position:absolute;top:0;left:0}.bonsai .controls{bottom:var(--layout-margin);white-space:nowrap;align-items:flex-end;gap:max(1vw,16px);display:flex;position:absolute;left:50%;transform:translate(-50%)}.bonsai .controls .control{flex-direction:column;gap:max(.375vw,6px);min-width:max(9.375vw,150px);display:flex}main.drop{background:var(--theme-bg);color:var(--theme-fg);height:100vh} diff --git a/app/public/drops/bonsai/assets/index-CQxvOJT7.css b/app/public/drops/bonsai/assets/index-CQxvOJT7.css new file mode 100644 index 0000000..5a15042 --- /dev/null +++ b/app/public/drops/bonsai/assets/index-CQxvOJT7.css @@ -0,0 +1 @@ +:root{--ivory:#fefdfc;--ivory-shade:#ecebea;--sand:#f7f4ef;--sand-shade:#b9b7b3;--charcoal:#181818;--charcoal-shade:#2a2a2a;--forest:#053f0a;--forest-shade:#f6fff6;--clay:#fa3812;--clay-shade:#ffefec;--sea:#1253fa;--sea-shade:#f0f8ff;--grey-700:#565656;--grey-600:#747474;--grey-500:#a3a3a3;--grey-400:#d1d1d1}:root .theme-light{--theme-bg:#fefdfc;--theme-fg:#181818;--theme-layout:#f7f4ef;--theme-grey:#747474;--theme-shade:#ecebea;--theme-contrast:#fa3812}:root .theme-dark{--theme-bg:#181818;--theme-fg:#fefdfc;--theme-layout:#f7f4ef;--theme-grey:#a3a3a3;--theme-shade:#2a2a2a;--theme-contrast:#fa3812}:root{--ease-in-quad:cubic-bezier(.55, .085, .68, .53);--ease-in-cubic:cubic-bezier(.55, .055, .675, .19);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-quint:cubic-bezier(.755, .05, .855, .06);--ease-in-expo:cubic-bezier(.95, .05, .795, .035);--ease-in-circ:cubic-bezier(.6, .04, .98, .335);--ease-out-quad:cubic-bezier(.25, .46, .45, .94);--ease-out-cubic:cubic-bezier(.215, .61, .355, 1);--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-out-quint:cubic-bezier(.23, 1, .32, 1);--ease-out-expo:cubic-bezier(.19, 1, .22, 1);--ease-out-circ:cubic-bezier(.075, .82, .165, 1);--ease-in-out-quad:cubic-bezier(.455, .03, .515, .955);--ease-in-out-cubic:cubic-bezier(.645, .045, .355, 1);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--ease-in-out-quint:cubic-bezier(.86, 0, .07, 1);--ease-in-out-expo:cubic-bezier(1, 0, 0, 1);--ease-in-out-circ:cubic-bezier(.785, .135, .15, .86)}:where(:not(html,iframe,canvas,img,svg,video,audio):not(svg *,symbol *)){all:unset;display:revert}*,:before,:after{box-sizing:border-box}a,button{cursor:revert}img{max-block-size:100%;max-inline-size:100%}table{border-collapse:collapse}input,textarea{-webkit-user-select:auto}textarea{white-space:revert}meter{appearance:revert}:where(pre){all:revert}::placeholder{color:unset}::marker{content:initial}:where([hidden]){display:none}:where([contenteditable]:not([contenteditable=false])){-moz-user-modify:read-write;-webkit-user-modify:read-write;overflow-wrap:break-word;-webkit-line-break:after-white-space;-webkit-user-select:auto}:where([draggable=true]){-webkit-user-drag:element}:where(dialog:modal){all:revert}@font-face{font-family:Galapagos A;font-style:normal;font-weight:400;src:url(/drops/bonsai/assets/abc-galapagos-a-trial-C6Aj3Ara.woff2)format("woff2"),url(/drops/bonsai/assets/abc-galapagos-a-trial-D4z1ovPJ.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:normal;font-weight:400;src:url(/drops/bonsai/assets/hanken-grotesk-BB3emo1n.woff2)format("woff2"),url(/drops/bonsai/assets/hanken-grotesk-NweiADIQ.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:italic;font-weight:400;src:url(/drops/bonsai/assets/hanken-grotesk-italic-jl8TIPSn.woff2)format("woff2"),url(/drops/bonsai/assets/hanken-grotesk-italic-C_HjJa0S.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:normal;font-weight:600;src:url(/drops/bonsai/assets/hanken-grotesk-semibold-TK-BXOrb.woff2)format("woff2"),url(/drops/bonsai/assets/hanken-grotesk-semibold-vPR5A_Tb.woff)format("woff")}@font-face{font-family:Iosevka Charon Mono;font-style:normal;font-weight:700;src:url(/drops/bonsai/assets/iosevka-charon-mono-bold-1nweGISG.woff2)format("woff2"),url(/drops/bonsai/assets/iosevka-charon-mono-bold-DN5oOlAE.woff)format("woff")}:root{--font-serif:"Instrument Serif", serif;--font-sans:"Hanken Grotesk", sans-serif;--font-mono:"Iosevka Charon Mono", monospace;--layout-column-count:12;--layout-column-gap:20px;--layout-margin:20px;--layout-width:calc(100vw - (2 * var(--layout-margin)));--layout-column-width:calc(( var(--layout-width) - ((var(--layout-column-count) - 1) * var(--layout-column-gap)) ) / var(--layout-column-count))}.layout-block,.layout-grid{padding-left:var(--layout-margin);padding-right:var(--layout-margin);width:100%}.layout-grid{grid-template-columns:repeat(var(--layout-column-count), minmax(0, 1fr));grid-gap:var(--layout-column-gap);display:grid}html,html *{scrollbar-width:none!important;-ms-overflow-style:none!important}html::-webkit-scrollbar{width:0!important;height:0!important}html ::-webkit-scrollbar{width:0!important;height:0!important}:root{font-family:var(--font-sans), Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;background:var(--ivory);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{min-height:100vh;margin:0}.h1,h1{font-family:var(--font-serif);font-size:max(8vw,128px);font-style:italic;font-weight:400;line-height:1}.h2,h2{font-family:var(--font-serif);font-size:max(4vw,64px);font-style:italic;font-weight:400;line-height:1}.h3,h3{font-family:var(--font-serif);font-size:max(3vw,48px);font-style:italic;font-weight:400;line-height:1}.h4,h4{font-family:var(--font-serif);font-size:max(2vw,32px);font-style:italic;font-weight:400;line-height:1}.p,p,a,li{font-family:var(--font-sans);font-size:max(1vw,16px);font-weight:400;line-height:1.25}.label,label,button,pre{font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1}.bold{font-weight:700}#app{min-height:100vh}button{cursor:pointer}::selection{color:var(--theme-bg);background:var(--theme-fg)}::selection{color:var(--theme-bg);background:var(--theme-fg)}.btn{--t-duration:.35s;--t-ease:var(--ease-out-quad);background:var(--theme-contrast);color:var(--ivory);cursor:pointer;transition:color var(--t-duration) var(--t-ease);border-radius:max(.5vw,8px);align-items:center;padding:max(.375vw,6px) max(1vw,16px);display:inline-flex;position:relative;overflow:hidden}.btn .leading-icon{opacity:0;width:max(.625vw,10px);height:1em;transition:transform var(--t-duration) var(--t-ease), opacity var(--t-duration) var(--t-ease);align-items:center;display:flex;position:absolute;transform:translate(-100%)}.btn .text{width:100%;transition:transform var(--t-duration) var(--t-ease);display:block;position:relative;overflow:hidden}.btn .text .transition{transition:transform var(--t-duration) var(--t-ease);font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1;display:inline-block}.btn .text .transition:first-child{color:var(--ivory)}.btn .text .transition:last-child{color:var(--ivory);position:absolute;bottom:0;left:0;right:0;transform:translateY(105%)}.btn .arrow{transition:transform var(--t-duration) var(--t-ease), opacity var(--t-duration) var(--t-ease)}.btn .arrow:not(:only-child){margin-left:.5em}.btn .loading{align-items:center;width:max(.625vw,10px);height:1em;display:flex}.btn .loading svg{width:100%;height:auto}.btn:before{content:"";background:var(--theme-contrast);clip-path:inset(100% 0 0);transition:clip-path var(--t-duration) var(--t-ease);display:block;position:absolute;inset:-2px}.btn:hover,.btn.active,.btn.router-link-active{color:var(--ivory)}.btn:hover:before,.btn.active:before,.btn.router-link-active:before{clip-path:inset(0)}.btn:hover .text span:first-child,.btn.active .text span:first-child,.btn.router-link-active .text span:first-child{transform:translateY(-105%)}.btn:hover .text span:last-child,.btn.active .text span:last-child,.btn.router-link-active .text span:last-child{transform:none}.btn:hover.text-icon .leading-icon,.btn.active.text-icon .leading-icon,.btn.router-link-active.text-icon .leading-icon{opacity:1;transform:none}.btn:hover.text-icon .text,.btn.active.text-icon .text,.btn.router-link-active.text-icon .text{transform:translate(1.5em)}.btn:hover.text-icon .arrow,.btn.active.text-icon .arrow,.btn.router-link-active.text-icon .arrow{opacity:0;transform:translate(100%)}.btn:disabled,.btn.disabled{opacity:.16;pointer-events:none}.shared-control-panel{--t-duration:.4s;--t-ease:var(--ease-out-quart);--panel-width:calc(4 * var(--layout-column-width) + (4 - 1) * var(--layout-column-gap));padding:var(--layout-margin) 0;pointer-events:none;align-items:center;gap:max(.5vw,8px);height:100dvh;display:flex;position:fixed;top:0;right:0}.shared-control-panel .toggle-btn{pointer-events:all;top:var(--layout-margin);z-index:5;cursor:pointer;border-top-right-radius:0;border-bottom-right-radius:0;position:absolute;right:0}.shared-control-panel .toggle-btn .toggle-btn-inner{align-items:center;gap:max(.5vw,8px);display:flex}.shared-control-panel .toggle-btn .toggle-icon{font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1}.shared-control-panel .toggle-btn .toggle-label{white-space:nowrap;font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1}.shared-control-panel .panel-body{pointer-events:all;width:var(--panel-width);background:var(--theme-bg);border:1px solid var(--grey-400);height:100%;transition:transform var(--t-duration) var(--t-ease);border-radius:max(.625vw,10px);flex-direction:column;padding-top:max(3.125vw,50px);display:flex;overflow:hidden;transform:translate(100%)}.shared-control-panel .panel-inner{scrollbar-width:thin;scrollbar-color:var(--grey-400) transparent;flex-direction:column;flex:1;align-items:flex-start;gap:max(1.25vw,20px);padding:max(1.5vw,24px) max(1.25vw,20px);display:flex;overflow:hidden auto}.shared-control-panel .panel-inner::-webkit-scrollbar{width:max(.25vw,4px)}.shared-control-panel .panel-inner::-webkit-scrollbar-track{background:0 0}.shared-control-panel .panel-inner::-webkit-scrollbar-thumb{background:var(--grey-400);border-radius:max(.125vw,2px)}.shared-control-panel.is-open .panel-body{transform:translate(0)}.shared-range{width:100%}.shared-range label{font-family:var(--font-mono);text-transform:uppercase;opacity:.45;justify-content:space-between;gap:max(.5vw,8px);font-size:max(.875vw,14px);font-weight:700;line-height:1;display:flex}.shared-range input[type=range]{appearance:none;background:var(--grey-400);cursor:pointer;border-radius:max(.125vw,2px);outline:none;width:100%;height:max(.125vw,2px)}.shared-range input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:var(--theme-fg);cursor:pointer;width:max(.75vw,12px);height:max(.75vw,12px);transition:transform .15s var(--ease-out-quad);border-radius:50%}.shared-range input[type=range]::-moz-range-thumb{background:var(--theme-fg);cursor:pointer;width:max(.75vw,12px);height:max(.75vw,12px);transition:transform .15s var(--ease-out-quad);border:none;border-radius:50%}.shared-range input[type=range]:hover::-webkit-slider-thumb{transform:scale(1.3)}.shared-range input[type=range]:hover::-moz-range-thumb{transform:scale(1.3)}.bonsai{height:100%;position:relative}.bonsai canvas{width:100%;height:100%;position:absolute;top:0;left:0}main.drop{background:var(--theme-bg);color:var(--theme-fg);height:100vh} diff --git a/app/public/drops/bonsai/assets/index-ChADjOAS.js b/app/public/drops/bonsai/assets/index-ChADjOAS.js new file mode 100644 index 0000000..565eaea --- /dev/null +++ b/app/public/drops/bonsai/assets/index-ChADjOAS.js @@ -0,0 +1 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function l(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var u={},d=[],f=()=>{},p=()=>!1,m=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),h=e=>e.startsWith(`onUpdate:`),g=Object.assign,_=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},v=Object.prototype.hasOwnProperty,y=(e,t)=>v.call(e,t),b=Array.isArray,x=e=>O(e)===`[object Map]`,S=e=>O(e)===`[object Set]`,C=e=>O(e)===`[object Date]`,w=e=>typeof e==`function`,T=e=>typeof e==`string`,E=e=>typeof e==`symbol`,D=e=>typeof e==`object`&&!!e,ee=e=>(D(e)||w(e))&&w(e.then)&&w(e.catch),te=Object.prototype.toString,O=e=>te.call(e),ne=e=>O(e).slice(8,-1),re=e=>O(e)===`[object Object]`,ie=e=>T(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ae=l(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),k=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},oe=/-\w/g,A=k(e=>e.replace(oe,e=>e.slice(1).toUpperCase())),se=/\B([A-Z])/g,ce=k(e=>e.replace(se,`-$1`).toLowerCase()),le=k(e=>e.charAt(0).toUpperCase()+e.slice(1)),ue=k(e=>e?`on${le(e)}`:``),j=(e,t)=>!Object.is(e,t),de=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},pe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},me,he=()=>me||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ge(e){if(b(e)){let t={};for(let n=0;n{if(e){let n=e.split(ve);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function xe(e){let t=``;if(T(e))t=e;else if(b(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Oe=e=>T(e)?e:e==null?``:b(e)||D(e)&&(e.toString===te||!w(e.toString))?De(e)?Oe(e.value):JSON.stringify(e,ke,2):String(e),ke=(e,t)=>De(t)?ke(e,t.value):x(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ae(t,r)+` =>`]=n,e),{})}:S(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ae(e))}:E(t)?Ae(t):D(t)&&!b(t)&&!re(t)?String(t):t,Ae=(e,t=``)=>E(e)?`Symbol(${e.description??t})`:e,M,je=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&M&&(M.active?(this.parent=M,this.index=(M.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e0&&--this._on===0){if(M===this)M=this.prevScope;else{let e=M;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Re){let e=Re;for(Re=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Le;){let t=Le;for(Le=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function He(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ue(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ke(r),qe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function We(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ge(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ge(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qe)||(e.globalVersion=Qe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!We(e))))return;e.flags|=2;let t=e.dep,n=N,r=P;N=e,P=!0;try{He(e);let n=e.fn(e._value);(t.version===0||j(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{N=n,P=r,Ue(e),e.flags&=-3}}function Ke(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ke(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function qe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var P=!0,Je=[];function Ye(){Je.push(P),P=!1}function Xe(){let e=Je.pop();P=e===void 0||e}function Ze(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=N;N=void 0;try{t()}finally{N=e}}}var Qe=0,$e=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},et=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!N||!P||N===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==N)t=this.activeLink=new $e(N,this),N.deps?(t.prevDep=N.depsTail,N.depsTail.nextDep=t,N.depsTail=t):N.deps=N.depsTail=t,tt(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=N.depsTail,t.nextDep=void 0,N.depsTail.nextDep=t,N.depsTail=t,N.deps===t&&(N.deps=e)}return t}trigger(e){this.version++,Qe++,this.notify(e)}notify(e){Be();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ve()}}};function tt(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)tt(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var nt=new WeakMap,rt=Symbol(``),it=Symbol(``),at=Symbol(``);function F(e,t,n){if(P&&N){let t=nt.get(e);t||nt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new et),r.map=t,r.key=n),r.track()}}function ot(e,t,n,r,i,a){let o=nt.get(e);if(!o){Qe++;return}let s=e=>{e&&e.trigger()};if(Be(),t===`clear`)o.forEach(s);else{let i=b(e),a=i&&ie(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===at||!E(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(at)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(rt)),x(e)&&s(o.get(it)));break;case`delete`:i||(s(o.get(rt)),x(e)&&s(o.get(it)));break;case`set`:x(e)&&s(o.get(rt));break}}Ve()}function st(e,t){let n=nt.get(e);return n&&n.get(t)}function ct(e){let t=R(e);return t===e?t:(F(t,`iterate`,at),L(e)?t:t.map(Zt))}function lt(e){return F(e=R(e),`iterate`,at),e}function I(e,t){return Jt(e)?Qt(qt(e)?Zt(t):t):Zt(t)}var ut={__proto__:null,[Symbol.iterator](){return dt(this,Symbol.iterator,e=>I(this,e))},concat(...e){return ct(this).concat(...e.map(e=>b(e)?ct(e):e))},entries(){return dt(this,`entries`,e=>(e[1]=I(this,e[1]),e))},every(e,t){return pt(this,`every`,e,t,void 0,arguments)},filter(e,t){return pt(this,`filter`,e,t,e=>e.map(e=>I(this,e)),arguments)},find(e,t){return pt(this,`find`,e,t,e=>I(this,e),arguments)},findIndex(e,t){return pt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return pt(this,`findLast`,e,t,e=>I(this,e),arguments)},findLastIndex(e,t){return pt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return pt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ht(this,`includes`,e)},indexOf(...e){return ht(this,`indexOf`,e)},join(e){return ct(this).join(e)},lastIndexOf(...e){return ht(this,`lastIndexOf`,e)},map(e,t){return pt(this,`map`,e,t,void 0,arguments)},pop(){return gt(this,`pop`)},push(...e){return gt(this,`push`,e)},reduce(e,...t){return mt(this,`reduce`,e,t)},reduceRight(e,...t){return mt(this,`reduceRight`,e,t)},shift(){return gt(this,`shift`)},some(e,t){return pt(this,`some`,e,t,void 0,arguments)},splice(...e){return gt(this,`splice`,e)},toReversed(){return ct(this).toReversed()},toSorted(e){return ct(this).toSorted(e)},toSpliced(...e){return ct(this).toSpliced(...e)},unshift(...e){return gt(this,`unshift`,e)},values(){return dt(this,`values`,e=>I(this,e))}};function dt(e,t,n){let r=lt(e),i=r[t]();return r!==e&&!L(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var ft=Array.prototype;function pt(e,t,n,r,i,a){let o=lt(e),s=o!==e&&!L(e),c=o[t];if(c!==ft[t]){let t=c.apply(e,a);return s?Zt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,I(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function mt(e,t,n,r){let i=lt(e),a=i!==e&&!L(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=I(e,t)),n.call(this,t,I(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?I(e,c):c}function ht(e,t,n){let r=R(e);F(r,`iterate`,at);let i=r[t](...n);return(i===-1||i===!1)&&Yt(n[0])?(n[0]=R(n[0]),r[t](...n)):i}function gt(e,t,n=[]){Ye(),Be();let r=R(e)[t].apply(e,n);return Ve(),Xe(),r}var _t=l(`__proto__,__v_isRef,__isVue`),vt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(E));function yt(e){E(e)||(e=String(e));let t=R(this);return F(t,`has`,e),t.hasOwnProperty(e)}var bt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Bt:zt:i?Rt:Lt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=b(e);if(!r){let e;if(a&&(e=ut[t]))return e;if(t===`hasOwnProperty`)return yt}let o=Reflect.get(e,t,z(e)?e:n);if((E(t)?vt.has(t):_t(t))||(r||F(e,`get`,t),i))return o;if(z(o)){let e=a&&ie(t)?o:o.value;return r&&D(e)?Wt(e):e}return D(o)?r?Wt(o):Ht(o):o}},xt=class extends bt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=b(e)&&ie(t);if(!this._isShallow){let e=Jt(i);if(!L(n)&&!Jt(n)&&(i=R(i),n=R(n)),!a&&z(i)&&!z(n))return e||(i.value=n),!0}let o=a?Number(t)e,Ot=e=>Reflect.getPrototypeOf(e);function kt(e,t,n){return function(...r){let i=this.__v_raw,a=R(i),o=x(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Dt:t?Qt:Zt;return!t&&F(a,`iterate`,c?it:rt),g(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function At(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function jt(e,t){let n={get(n){let r=this.__v_raw,i=R(r),a=R(n);e||(j(n,a)&&F(i,`get`,n),F(i,`get`,a));let{has:o}=Ot(i),s=t?Dt:e?Qt:Zt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&F(R(t),`iterate`,rt),t.size},has(t){let n=this.__v_raw,r=R(n),i=R(t);return e||(j(t,i)&&F(r,`has`,t),F(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=R(a),s=t?Dt:e?Qt:Zt;return!e&&F(o,`iterate`,rt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return g(n,e?{add:At(`add`),set:At(`set`),delete:At(`delete`),clear:At(`clear`)}:{add(e){let n=R(this),r=Ot(n),i=R(e),a=!t&&!L(e)&&!Jt(e)?i:e;return r.has.call(n,a)||j(e,a)&&r.has.call(n,e)||j(i,a)&&r.has.call(n,i)||(n.add(a),ot(n,`add`,a,a)),this},set(e,n){!t&&!L(n)&&!Jt(n)&&(n=R(n));let r=R(this),{has:i,get:a}=Ot(r),o=i.call(r,e);o||=(e=R(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?j(n,s)&&ot(r,`set`,e,n,s):ot(r,`add`,e,n),this},delete(e){let t=R(this),{has:n,get:r}=Ot(t),i=n.call(t,e);i||=(e=R(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&ot(t,`delete`,e,void 0,a),o},clear(){let e=R(this),t=e.size!==0,n=e.clear();return t&&ot(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=kt(r,e,t)}),n}function Mt(e,t){let n=jt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(y(n,r)&&r in t?n:t,r,i)}var Nt={get:Mt(!1,!1)},Pt={get:Mt(!1,!0)},Ft={get:Mt(!0,!1)},It={get:Mt(!0,!0)},Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap;function Vt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ht(e){return Jt(e)?e:Kt(e,!1,Ct,Nt,Lt)}function Ut(e){return Kt(e,!1,Tt,Pt,Rt)}function Wt(e){return Kt(e,!0,wt,Ft,zt)}function Gt(e){return Kt(e,!0,Et,It,Bt)}function Kt(e,t,n,r,i){if(!D(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Vt(ne(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function qt(e){return Jt(e)?qt(e.__v_raw):!!(e&&e.__v_isReactive)}function Jt(e){return!!(e&&e.__v_isReadonly)}function L(e){return!!(e&&e.__v_isShallow)}function Yt(e){return e?!!e.__v_raw:!1}function R(e){let t=e&&e.__v_raw;return t?R(t):e}function Xt(e){return!y(e,`__v_skip`)&&Object.isExtensible(e)&&fe(e,`__v_skip`,!0),e}var Zt=e=>D(e)?Ht(e):e,Qt=e=>D(e)?Wt(e):e;function z(e){return e?e.__v_isRef===!0:!1}function $t(e){return tn(e,!1)}function en(e){return tn(e,!0)}function tn(e,t){return z(e)?e:new nn(e,t)}var nn=class{constructor(e,t){this.dep=new et,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:R(e),this._value=t?e:Zt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||L(e)||Jt(e);e=n?e:R(e),j(e,t)&&(this._rawValue=e,this._value=n?e:Zt(e),this.dep.trigger())}};function rn(e){return z(e)?e.value:e}function an(e){return w(e)?e():rn(e)}var on={get:(e,t,n)=>t===`__v_raw`?e:rn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return z(i)&&!z(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function sn(e){return qt(e)?e:new Proxy(e,on)}var cn=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new et,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function ln(e){return new cn(e)}var un=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=E(t)?t:String(t),this._raw=R(e);let r=!0,i=e;if(!b(e)||E(this._key)||!ie(this._key))do r=!Yt(i)||L(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=rn(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&z(this._raw[this._key])){let t=this._object[this._key];if(z(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return st(this._raw,this._key)}},dn=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function fn(e,t,n){return z(e)?e:w(e)?new dn(e):D(e)&&arguments.length>1?pn(e,t,n):$t(e)}function pn(e,t,n){return new un(e,t,n)}var mn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new et(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qe-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&N!==this)return ze(this,!0),!0}get value(){let e=this.dep.track();return Ge(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function hn(e,t,n=!1){let r,i;return w(e)?r=e:(r=e.get,i=e.set),new mn(r,i,n)}var gn={},_n=new WeakMap,vn=void 0;function yn(e,t=!1,n=vn){if(n){let t=_n.get(n);t||_n.set(n,t=[]),t.push(e)}}function bn(e,t,n=u){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:L(e)||i===!1||i===0?xn(e,1):xn(e),d,p,m,h,g=!1,v=!1;if(z(e)?(p=()=>e.value,g=L(e)):qt(e)?(p=()=>l(e),g=!0):b(e)?(v=!0,g=e.some(e=>qt(e)||L(e)),p=()=>e.map(e=>{if(z(e))return e.value;if(qt(e))return l(e);if(w(e))return c?c(e,2):e()})):p=w(e)?t?c?()=>c(e,2):e:()=>{if(m){Ye();try{m()}finally{Xe()}}let t=vn;vn=d;try{return c?c(e,3,[h]):e(h)}finally{vn=t}}:f,t&&i){let e=p,t=i===!0?1/0:i;p=()=>xn(e(),t)}let y=Me(),x=()=>{d.stop(),y&&y.active&&_(y.effects,d)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return x(),n}}let S=v?Array(e.length).fill(gn):gn,C=e=>{if(!(!(d.flags&1)||!d.dirty&&!e))if(t){let n=d.run();if(e||i||g||(v?n.some((e,t)=>j(e,S[t])):j(n,S))){m&&m();let e=vn;vn=d;try{let e=[n,S===gn?void 0:v&&S[0]===gn?[]:S,h];S=n,c?c(t,3,e):t(...e)}finally{vn=e}}}else d.run()};return s&&s(C),d=new Fe(p),d.scheduler=o?()=>o(C,!1):C,h=e=>yn(e,!1,d),m=d.onStop=()=>{let e=_n.get(d);if(e){if(c)c(e,4);else for(let t of e)t();_n.delete(d)}},t?r?C(!0):S=d.run():o?o(C.bind(null,!0),!0):d.run(),x.pause=d.pause.bind(d),x.resume=d.resume.bind(d),x.stop=x,x}function xn(e,t=1/0,n){if(t<=0||!D(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,z(e))xn(e.value,t,n);else if(b(e))for(let r=0;r{xn(e,t,n)});else if(re(e)){for(let r in e)xn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&xn(e[r],t,n)}return e}function Sn(e,t,n,r){try{return r?e(...r):e()}catch(e){Cn(e,t,n)}}function B(e,t,n,r){if(w(e)){let i=Sn(e,t,n,r);return i&&ee(i)&&i.catch(e=>{Cn(e,t,n)}),i}if(b(e)){let i=[];for(let a=0;a>>1,i=V[r],a=Ln(i);a=Ln(n)?V.push(e):V.splice(jn(t),0,e),e.flags|=1,Nn()}}function Nn(){kn||=On.then(Rn)}function Pn(e){b(e)?Tn.push(...e):En&&e.id===-1?En.splice(Dn+1,0,e):e.flags&1||(Tn.push(e),e.flags|=1),Nn()}function Fn(e,t,n=H+1){for(;nLn(e)-Ln(t));if(Tn.length=0,En){En.push(...e);return}for(En=e,Dn=0;Dne.id==null?e.flags&2?-1:1/0:e.id;function Rn(e){try{for(H=0;H{r._d&&$i(-1);let i=Bn(t),a=Xi.length,o;try{o=e(...n)}finally{for(let e=Xi.length;e>a;e--)Zi();Bn(i),r._d&&$i(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Hn(e,t){if(U===null)return e;let n=Pa(U),r=e.dirs||=[];for(let e=0;e1)return n&&w(t)?t.call(r&&r.proxy):t}}var Kn=Symbol.for(`v-scx`),qn=()=>Gn(Kn);function Jn(e,t){return Zn(e,null,t)}function Yn(e,t){return Zn(e,null,{flush:`sync`})}function Xn(e,t,n){return Zn(e,t,n)}function Zn(e,t,n=u){let{immediate:r,deep:i,flush:a,once:o}=n,s=g({},n),c=t&&r||!t&&a!==`post`,l;if(Ta){if(a===`sync`){let e=qn();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=f,e.resume=f,e.pause=f,e}}let d=Q;s.call=(e,t,n)=>B(e,d,t,n);let p=!1;a===`post`?s.scheduler=e=>{G(e,d&&d.suspense)}:a!==`sync`&&(p=!0,s.scheduler=(e,t)=>{t?e():Mn(e)}),s.augmentJob=e=>{t&&(e.flags|=4),p&&(e.flags|=2,d&&(e.id=d.uid,e.i=d))};let m=bn(e,t,s);return Ta&&(l?l.push(m):c&&m()),m}function Qn(e,t,n){let r=this.proxy,i=T(e)?e.includes(`.`)?$n(r,e):()=>r[e]:e.bind(r,r),a;w(t)?a=t:(a=t.handler,n=t);let o=Sa(this),s=Zn(i,a.bind(r),n);return o(),s}function $n(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,nr=Symbol(`_leaveCb`);function rr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,rr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ir(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function ar(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var or=new WeakMap;function sr(e,t,n,r,i=!1){if(b(e)){e.forEach((e,a)=>sr(e,t&&(b(t)?t[a]:t),n,r,i));return}if(lr(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&sr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Pa(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,d=s.refs===u?s.refs={}:s.refs,f=s.setupState,m=R(f),h=f===u?p:e=>!ar(d,e)&&y(m,e),g=(e,t)=>!(t&&ar(d,t));if(l!=null&&l!==c){if(cr(t),T(l))d[l]=null,h(l)&&(f[l]=null);else if(z(l)){let e=t;g(l,e.k)&&(l.value=null),e.k&&(d[e.k]=null)}}if(w(c))Sn(c,s,12,[o,d]);else{let t=T(c),r=z(c);if(t||r){let s=()=>{if(e.f){let n=t?h(c)?f[c]:d[c]:g(c)||!e.k?c.value:d[e.k];if(i)b(n)&&_(n,a);else if(b(n))n.includes(a)||n.push(a);else if(t)d[c]=[a],h(c)&&(f[c]=d[c]);else{let t=[a];g(c,e.k)&&(c.value=t),e.k&&(d[e.k]=t)}}else t?(d[c]=o,h(c)&&(f[c]=o)):r&&(g(c,e.k)&&(c.value=o),e.k&&(d[e.k]=o))};if(o){let t=()=>{s(),or.delete(e)};t.id=-1,or.set(e,t),G(t,n)}else cr(e),s()}}}function cr(e){let t=or.get(e);t&&(t.flags|=8,or.delete(e))}he().requestIdleCallback,he().cancelIdleCallback;var lr=e=>!!e.type.__asyncLoader,ur=e=>e.type.__isKeepAlive;function dr(e,t){pr(e,`a`,t)}function fr(e,t){pr(e,`da`,t)}function pr(e,t,n=Q){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(hr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)ur(e.parent.vnode)&&mr(r,t,n,e),e=e.parent}}function mr(e,t,n,r){let i=hr(t,e,r,!0);Sr(()=>{_(r[t],i)},n)}function hr(e,t,n=Q,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ye();let i=Sa(n),a=B(t,n,e,r);return i(),Xe(),a};return r?i.unshift(a):i.push(a),a}}var gr=e=>(t,n=Q)=>{(!Ta||e===`sp`)&&hr(e,(...e)=>t(...e),n)},_r=gr(`bm`),vr=gr(`m`),yr=gr(`bu`),br=gr(`u`),xr=gr(`bum`),Sr=gr(`um`),Cr=gr(`sp`),wr=gr(`rtg`),Tr=gr(`rtc`);function Er(e,t=Q){hr(`ec`,e,t)}var Dr=`components`,Or=Symbol.for(`v-ndc`);function kr(e){return T(e)?Ar(Dr,e,!1)||e:e||Or}function Ar(e,t,n=!0,r=!1){let i=U||Q;if(i){let n=i.type;if(e===Dr){let e=Fa(n,!1);if(e&&(e===t||e===A(t)||e===le(A(t))))return n}let a=jr(i[e]||n[e],t)||jr(i.appContext[e],t);return!a&&r?n:a}}function jr(e,t){return e&&(e[t]||e[A(t)]||e[le(A(t))])}function Mr(e,t,n={},r,i,a){if(U.ce||U.parent&&lr(U.parent)&&U.parent.ce){let e=a!=null&&n.key==null?g({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),J(),na(K,null,[X(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=Xi.length;J();let c;try{let i=o&&Nr(o(n)),s=n.key||a||i&&i.key;c=na(K,{key:(s&&!E(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Xi.length;e>s;e--)Zi();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function Nr(e){return e.some(e=>!ra(e)||!(e.type===Ji||e.type===K&&!Nr(e.children)))?e:null}var Pr=e=>e?wa(e)?Pa(e):Pr(e.parent):null,Fr=g(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Pr(e.parent),$root:e=>Pr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Gr(e),$forceUpdate:e=>e.f||=()=>{Mn(e.update)},$nextTick:e=>e.n||=An.bind(e.proxy),$watch:e=>Qn.bind(e)}),Ir=(e,t)=>e!==u&&!e.__isScriptSetup&&y(e,t),Lr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(Ir(r,t))return o[t]=1,r[t];else if(i!==u&&y(i,t))return o[t]=2,i[t];else if(y(a,t))return o[t]=3,a[t];else if(n!==u&&y(n,t))return o[t]=4,n[t];else Br&&(o[t]=0)}let l=Fr[t],d,f;if(l)return t===`$attrs`&&F(e.attrs,`get`,``),l(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==u&&y(n,t))return o[t]=4,n[t];if(f=c.config.globalProperties,y(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return Ir(i,t)?(i[t]=n,!0):r!==u&&y(r,t)?(r[t]=n,!0):y(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==u&&s[0]!==`$`&&y(e,s)||Ir(t,s)||y(a,s)||y(r,s)||y(Fr,s)||y(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?y(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Rr(e){return b(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function zr(e,t){return!e||!t?e||t:b(e)&&b(t)?e.concat(t):g({},Rr(e),Rr(t))}var Br=!0;function Vr(e){let t=Gr(e),n=e.proxy,r=e.ctx;Br=!1,t.beforeCreate&&Ur(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:p,beforeUpdate:m,updated:h,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:x,unmounted:S,render:C,renderTracked:T,renderTriggered:E,errorCaptured:ee,serverPrefetch:te,expose:O,inheritAttrs:ne,components:re,directives:ie,filters:ae}=t;if(l&&Hr(l,r,null),o)for(let e in o){let t=o[e];w(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);D(t)&&(e.data=Ht(t))}if(Br=!0,a)for(let e in a){let t=a[e],i=La({get:w(t)?t.bind(n,n):w(t.get)?t.get.bind(n,n):f,set:!w(t)&&w(t.set)?t.set.bind(n):f});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)Wr(s[e],r,n,e);if(c){let e=w(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Wn(t,e[t])})}u&&Ur(u,e,`c`);function k(e,t){b(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(_r,d),k(vr,p),k(yr,m),k(br,h),k(dr,g),k(fr,_),k(Er,ee),k(Tr,T),k(wr,E),k(xr,y),k(Sr,S),k(Cr,te),b(O))if(O.length){let t=e.exposed||={};O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};C&&e.render===f&&(e.render=C),ne!=null&&(e.inheritAttrs=ne),re&&(e.components=re),ie&&(e.directives=ie),te&&ir(e)}function Hr(e,t,n=f){b(e)&&(e=Xr(e));for(let n in e){let r=e[n],i;i=D(r)?`default`in r?Gn(r.from||n,r.default,!0):Gn(r.from||n):Gn(r),z(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Ur(e,t,n){B(b(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Wr(e,t,n,r){let i=r.includes(`.`)?$n(n,r):()=>n[r];if(T(e)){let n=t[e];w(n)&&Xn(i,n)}else if(w(e))Xn(i,e.bind(n));else if(D(e))if(b(e))e.forEach(e=>Wr(e,t,n,r));else{let r=w(e.handler)?e.handler.bind(n):t[e.handler];w(r)&&Xn(i,r,e)}}function Gr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Kr(c,e,o,!0)),Kr(c,t,o)),D(t)&&a.set(t,c),c}function Kr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Kr(e,a,n,!0),i&&i.forEach(t=>Kr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=qr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var qr={data:Jr,props:Qr,emits:Qr,methods:Zr,computed:Zr,beforeCreate:W,created:W,beforeMount:W,mounted:W,beforeUpdate:W,updated:W,beforeDestroy:W,beforeUnmount:W,destroyed:W,unmounted:W,activated:W,deactivated:W,errorCaptured:W,serverPrefetch:W,components:Zr,directives:Zr,watch:$r,provide:Jr,inject:Yr};function Jr(e,t){return t?e?function(){return g(w(e)?e.call(this,this):e,w(t)?t.call(this,this):t)}:t:e}function Yr(e,t){return Zr(Xr(e),Xr(t))}function Xr(e){if(b(e)){let t={};for(let n=0;n{let c,l=u,d;return Yn(()=>{let t=e[i];j(c,t)&&(c=t,s())}),{get(){return o(),n.get?n.get(c):c},set(e){let o=n.set?n.set(e):e;if(!j(o,c)&&!(l!==u&&j(e,l)))return;let f=r.vnode.props,p=!!(f&&(t in f||i in f||a in f)&&(`onUpdate:${t}`in f||`onUpdate:${i}`in f||`onUpdate:${a}`in f));p||(c=e,s()),r.emit(`update:${t}`,o),j(e,l)&&(j(e,o)&&!j(o,d)||p&&l!==u&&!j(o,c))&&s(),l=e,d=o}}});return s[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?o||u:s,done:!1}:{done:!0}}}},s}var ai=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${A(t)}Modifiers`]||e[`${ce(t)}Modifiers`];function oi(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||u,i=n,a=t.startsWith(`update:`),o=a&&ai(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>T(e)?e.trim():e)),o.number&&(i=n.map(pe)));let s,c=r[s=ue(t)]||r[s=ue(A(t))];!c&&a&&(c=r[s=ue(ce(t))]),c&&B(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,B(l,e,6,i)}}var si=new WeakMap;function ci(e,t,n=!1){let r=n?si:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!w(e)){let r=e=>{let n=ci(e,t,!0);n&&(s=!0,g(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(D(e)&&r.set(e,null),null):(b(a)?a.forEach(e=>o[e]=null):g(o,a),D(e)&&r.set(e,o),o)}function li(e,t){return!e||!m(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),y(e,t[0].toLowerCase()+t.slice(1))||y(e,ce(t))||y(e,t))}function ui(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:g}=e,_=Bn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Z(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;v=Z(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:di(s)}}catch(t){Xi.length=0,Cn(t,e,1),v=X(Ji)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(h)&&(y=fi(y,a)),b=la(b,y,!1,!0))}return n.dirs&&(b=la(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&rr(b,n.transition),v=b,Bn(_),v}var di=e=>{let t;for(let n in e)(n===`class`||n===`style`||m(n))&&((t||={})[n]=e[n]);return t},fi=(e,t)=>{let n={};for(let r in e)(!h(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function pi(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?mi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(_i),yi=e=>Object.getPrototypeOf(e)===_i;function bi(e,t,n,r=!1){let i={},a=vi();e.propsDefaults=Object.create(null),Si(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Ut(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function xi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=R(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{c=!0;let[n,r]=Ti(e,t,!0);g(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return D(e)&&r.set(e,d),d;if(b(a))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Oi=e=>b(e)?e.map(Z):[Z(e)],ki=(e,t,n)=>{if(t._n)return t;let r=Vn((...e)=>Oi(t(...e)),n);return r._c=!1,r},Ai=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Di(n))continue;let i=e[n];if(w(i))t[n]=ki(n,i,r);else if(i!=null){let e=Oi(i);t[n]=()=>e}}},ji=(e,t)=>{let n=Oi(t);e.slots.default=()=>n},Mi=(e,t,n)=>{for(let r in t)(n||!Di(r))&&(e[r]=t[r])},Ni=(e,t,n)=>{let r=e.slots=vi();if(e.vnode.shapeFlag&32){let e=t._;e?(Mi(r,t,n),n&&fe(r,`_`,e,!0)):Ai(t,r)}else t&&ji(e,t)},Pi=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=u;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:Mi(i,t,n):(a=!t.$stable,Ai(t,i)),o=t}else t&&(ji(e,t),o={default:1});if(a)for(let e in i)!Di(e)&&o[e]==null&&delete i[e]},G=Ki;function Fi(e){return Ii(e)}function Ii(e,t){let n=he();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=f,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!ia(e,t)&&(r=_e(e),j(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case qi:y(e,t,n,r);break;case Ji:b(e,t,n,r);break;case Yi:e??x(t,n,r,o);break;case K:ne(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?re(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,be)}u!=null&&i?sr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&sr(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),i(e),e=n;i(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ee(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,i,s,c,l,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=o(e.type,c,m&&m.is,m),h&8?p(d,e.children):h&16&&D(e.children,d,null,i,s,Li(e,c),l,u),_&&Un(e,null,i,`created`),E(d,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!ae(e)&&a(d,e,null,m[e],c,i);`value`in m&&a(d,`value`,null,m.value,c),(f=m.onVnodeBeforeMount)&&ha(f,i,e)}_&&Un(e,null,i,`beforeMount`);let v=zi(s,g);v&&g.beforeEnter(d),r(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&G(()=>{try{f&&ha(f,i,e),v&&g.enter(d),_&&Un(e,null,i,`mounted`)}finally{}},s)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let m=e.props||u,h=t.props||u,g;if(n&&Ri(n,!1),(g=h.onVnodeBeforeUpdate)&&ha(g,n,t,e),f&&Un(t,e,n,`beforeUpdate`),n&&Ri(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(l=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(c,``),d?te(e.dynamicChildren,d,c,n,r,Li(t,i),o):s||se(e,t,c,null,n,r,Li(t,i),o,!1),l>0){if(l&16)O(c,m,h,n,i);else if(l&2&&m.class!==h.class&&a(c,`class`,null,h.class,i),l&4&&a(c,`style`,m.style,h.style,i),l&8){let e=t.dynamicProps;for(let t=0;t{g&&ha(g,n,t,e),f&&Un(t,e,n,`updated`)},r)},te=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==u)for(let o in t)!ae(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(ae(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},ne=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),D(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(te(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&Bi(e,t,!0)):se(e,t,n,f,a,o,c,l,u)},re=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ie(t,n,r,i,a,o,c):k(e,t,c)},ie=(e,t,n,r,i,a,o)=>{let s=e.component=va(e,r,i);if(ur(e)&&(s.ctx.renderer=be),Ea(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,oe,o),!e.el){let r=s.subTree=X(Ji);b(null,r,t,n),e.placeholder=r.el}}else oe(s,e,t,n,i,a,o)},k=(e,t,n)=>{let r=t.component=e.component;if(pi(e,t,n))if(r.asyncDep&&!r.asyncResolved){A(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},oe=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Hi(e);if(n){t&&(t.el=c.el,A(e,t,o)),n.asyncDep.then(()=>{G(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Ri(e,!1),t?(t.el=c.el,A(e,t,o)):t=c,n&&de(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ha(d,s,t,c),Ri(e,!0);let f=ui(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),_e(p),e,i,a),t.el=f.el,u===null&&gi(e,f.el),r&&G(r,i),(d=t.props&&t.props.onVnodeUpdated)&&G(()=>ha(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=lr(t);if(Ri(e,!1),l&&de(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ha(o,d,t),Ri(e,!0),s&&Se){let t=()=>{e.subTree=ui(e),Se(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=ui(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&G(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;G(()=>ha(o,d,e),i)}(t.shapeFlag&256||d&&lr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&G(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Fe(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Mn(u),Ri(e,!0),l()},A=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,xi(e,t.props,r,n),Pi(e,t.children,n),Ye(),Fn(e),Xe()},se=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){le(l,d,n,r,i,a,o,s,c);return}else if(f&256){ce(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&ge(l,i,a),d!==l&&p(n,d)):u&16?m&16?le(l,d,n,r,i,a,o,s,c):ge(l,i,a,!0):(u&8&&p(n,``),m&16&&D(d,n,r,i,a,o,s,c))},ce=(e,t,n,r,i,a,o,s,c)=>{e||=d,t||=d;let l=e.length,u=t.length,f=Math.min(l,u),p;for(p=0;pu?ge(e,i,a,!0,!1,f):D(t,n,r,i,a,o,s,c,f)},le=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,f=e.length-1,p=u-1;for(;l<=f&&l<=p;){let r=e[l],u=t[l]=c?fa(t[l]):Z(t[l]);if(ia(r,u))v(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=f&&l<=p;){let r=e[f],l=t[p]=c?fa(t[p]):Z(t[p]);if(ia(r,l))v(r,l,n,null,i,a,o,s,c);else break;f--,p--}if(l>f){if(l<=p){let e=p+1,d=ep)for(;l<=f;)j(e[l],i,a,!0),l++;else{let m=l,h=l,g=new Map;for(l=h;l<=p;l++){let e=t[l]=c?fa(t[l]):Z(t[l]);e.key!=null&&g.set(e.key,l)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(l=0;l=b){j(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&ia(r,t[_])){u=_;break}u===void 0?j(r,i,a,!0):(C[u-h]=l+1,u>=S?S=u:x=!0,v(r,t[u],n,null,i,a,o,s,c),y++)}let w=x?Vi(C):d;for(_=w.length-1,l=b-1;l>=0;l--){let e=h+l,d=t[e],f=t[e+1],p=e+1{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){ue(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,be);return}if(c===K){r(s,t,n);for(let e=0;el.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[nr];s._isLeaving&&s[nr](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},j=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(Ye(),sr(s,null,n,e,!0),Xe()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!lr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&ha(_,t,e),u&6)me(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Un(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,be,r):l&&!l.hasOnce&&(a!==K||d>0&&d&64)?ge(l,t,n,!1,!0):(a===K&&d&384||!i&&u&16)&&ge(c,t,n),r&&fe(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&G(()=>{_&&ha(_,t,e),h&&Un(e,null,t,`unmounted`),v&&(e.el=null)},n)},fe=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===K){pe(n,r);return}if(t===Yi){C(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},pe=(e,t)=>{let n;for(;e!==t;)n=h(e),i(e),e=n;i(t)},me=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ui(c),Ui(l),r&&de(r),i.stop(),a&&(a.flags|=8,j(o,e,t,n)),s&&G(s,t),G(()=>{e.isUnmounted=!0},t)},ge=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return _e(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[er];return n?h(n):t},ve=!1,ye=(e,t,n)=>{let r;e==null?t._vnode&&(j(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ve||=(ve=!0,Fn(r),In(),!1)},be={p:v,um:j,m:ue,r:fe,mt:ie,mc:D,pc:se,pbc:te,n:_e,o:e},xe,Se;return t&&([xe,Se]=t(be)),{render:ye,hydrate:xe,createApp:ni(ye,xe)}}function Li({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Ri({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function zi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Bi(e,t,n=!1){let r=e.children,i=t.children;if(b(r)&&b(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Hi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hi(t)}function Ui(e){if(e)for(let t=0;te.__isSuspense;function Ki(e,t){t&&t.pendingBranch?b(e)?t.effects.push(...e):t.effects.push(e):Pn(e)}var K=Symbol.for(`v-fgt`),qi=Symbol.for(`v-txt`),Ji=Symbol.for(`v-cmt`),Yi=Symbol.for(`v-stc`),Xi=[],q=null;function J(e=!1){Xi.push(q=e?null:[])}function Zi(){Xi.pop(),q=Xi[Xi.length-1]||null}var Qi=1;function $i(e,t=!1){Qi+=e,e<0&&q&&t&&(q.hasOnce=!0)}function ea(e){return e.dynamicChildren=Qi>0?q||d:null,Zi(),Qi>0&&q&&q.push(e),e}function ta(e,t,n,r,i,a){return ea(Y(e,t,n,r,i,a,!0))}function na(e,t,n,r,i){return ea(X(e,t,n,r,i,!0))}function ra(e){return e?e.__v_isVNode===!0:!1}function ia(e,t){return e.type===t.type&&e.key===t.key}var aa=({key:e})=>e??null,oa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:T(e)||z(e)||w(e)?{i:U,r:e,k:t,f:!!n}:e);function Y(e,t=null,n=null,r=0,i=null,a=e===K?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&aa(t),ref:t&&oa(t),scopeId:zn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:U};return s?(pa(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=T(n)?8:16),Qi>0&&!o&&q&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&q.push(c),c}var X=sa;function sa(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Or)&&(e=Ji),ra(e)){let r=la(e,t,!0);return n&&pa(r,n),Qi>0&&!a&&q&&(r.shapeFlag&6?q[q.indexOf(e)]=r:q.push(r)),r.patchFlag=-2,r}if(Ia(e)&&(e=e.__vccOpts),t){t=ca(t);let{class:e,style:n}=t;e&&!T(e)&&(t.class=xe(e)),D(n)&&(Yt(n)&&!b(n)&&(n=g({},n)),t.style=ge(n))}let o=T(e)?1:Gi(e)?128:tr(e)?64:D(e)?4:w(e)?2:0;return Y(e,t,n,r,i,o,a,!0)}function ca(e){return e?Yt(e)||yi(e)?g({},e):e:null}function la(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?ma(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&aa(l),ref:t&&t.ref?n&&a?b(a)?a.concat(oa(t)):[a,oa(t)]:oa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==K?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&la(e.ssContent),ssFallback:e.ssFallback&&la(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&rr(u,c.clone(u)),u}function ua(e=` `,t=0){return X(qi,null,e,t)}function da(e=``,t=!1){return t?(J(),na(Ji,null,e)):X(Ji,null,e)}function Z(e){return e==null||typeof e==`boolean`?X(Ji):b(e)?X(K,null,e.slice()):ra(e)?fa(e):X(qi,null,String(e))}function fa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:la(e)}function pa(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(b(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),pa(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!yi(t)?t._ctx=U:r===3&&U&&(U.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(w(t)){if(r&65){pa(e,{default:t});return}t={default:t,_ctx:U},n=32}else t=String(t),r&64?(n=16,t=[ua(t)]):n=8;e.children=t,e.shapeFlag|=n}function ma(...e){let t={};for(let n=0;nQ||U,ba,xa;{let e=he(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};ba=t(`__VUE_INSTANCE_SETTERS__`,e=>Q=e),xa=t(`__VUE_SSR_SETTERS__`,e=>Ta=e)}var Sa=e=>{let t=Q;return ba(e),e.scope.on(),()=>{e.scope.off(),ba(t)}},Ca=()=>{Q&&Q.scope.off(),ba(null)};function wa(e){return e.vnode.shapeFlag&4}var Ta=!1;function Ea(e,t=!1,n=!1){t&&xa(t);let{props:r,children:i}=e.vnode,a=wa(e);bi(e,r,a,t),Ni(e,i,n||t);let o=a?Da(e,t):void 0;return t&&xa(!1),o}function Da(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Lr);let{setup:r}=n;if(r){Ye();let n=e.setupContext=r.length>1?Na(e):null,i=Sa(e),a=Sn(r,e,0,[e.props,n]),o=ee(a);if(Xe(),i(),(o||e.sp)&&!lr(e)&&ir(e),o){if(a.then(Ca,Ca),t)return a.then(n=>{Oa(e,n,t)}).catch(t=>{Cn(t,e,0)});e.asyncDep=a}else Oa(e,a,t)}else ja(e,t)}function Oa(e,t,n){w(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:D(t)&&(e.setupState=sn(t)),ja(e,n)}var ka,Aa;function ja(e,t,n){let r=e.type;if(!e.render){if(!t&&ka&&!r.render){let t=r.template||Gr(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=ka(t,g(g({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||f,Aa&&Aa(e)}{let t=Sa(e);Ye();try{Vr(e)}finally{Xe(),t()}}}var Ma={get(e,t){return F(e,`get`,``),e[t]}};function Na(e){return{attrs:new Proxy(e.attrs,Ma),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Pa(e){return e.exposed?e.exposeProxy||=new Proxy(sn(Xt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Fr)return Fr[n](e)},has(e,t){return t in e||t in Fr}}):e.proxy}function Fa(e,t=!0){return w(e)?e.displayName||e.name:e.name||t&&e.__name}function Ia(e){return w(e)&&`__vccOpts`in e}var La=(e,t)=>hn(e,t,Ta),Ra=`3.5.40`,za=void 0,Ba=typeof window<`u`&&window.trustedTypes;if(Ba)try{za=Ba.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Va=za?e=>za.createHTML(e):e=>e,Ha=`http://www.w3.org/2000/svg`,Ua=`http://www.w3.org/1998/Math/MathML`,Wa=typeof document<`u`?document:null,Ga=Wa&&Wa.createElement(`template`),Ka={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Wa.createElementNS(Ha,e):t===`mathml`?Wa.createElementNS(Ua,e):n?Wa.createElement(e,{is:n}):Wa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Wa.createTextNode(e),createComment:e=>Wa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Wa.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Ga.innerHTML=Va(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=Ga.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},qa=Symbol(`_vtc`);function Ja(e,t,n){let r=e[qa];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Ya=Symbol(`_vod`),Xa=Symbol(`_vsh`),Za=Symbol(``),Qa=/(?:^|;)\s*display\s*:/;function $a(e,t,n){let r=e.style,i=T(n),a=!1;if(n&&!i){if(t)if(T(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??to(r,t,``)}else for(let e in t)n[e]??to(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?to(r,i,``):ao(e,i,!T(t)&&t?t[i]:void 0,o)||to(r,i,o)}}else if(i){if(t!==n){let e=r[Za];e&&(n+=`;`+e),r.cssText=n,a=Qa.test(n)}}else t&&e.removeAttribute(`style`);Ya in e&&(e[Ya]=a?r.display:``,e[Xa]&&(r.display=`none`))}var eo=/\s*!important$/;function to(e,t,n){if(b(n))n.forEach(n=>to(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=io(e,t);eo.test(n)?e.setProperty(ce(r),n.replace(eo,``),`important`):e[r]=n}}var no=[`Webkit`,`Moz`,`ms`],ro={};function io(e,t){let n=ro[t];if(n)return n;let r=A(t);if(r!==`filter`&&r in e)return ro[t]=r;r=le(r);for(let n=0;n_o||=(vo.then(()=>_o=0),Date.now());function bo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(b(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,So=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ja(e,r,o):t===`style`?$a(e,n,r):m(t)?h(t)||po(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):Co(e,t,r,o))?(co(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&so(e,t,r,o,a,t!==`value`)):e._isVueCE&&(wo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!T(r)))?co(e,A(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),so(e,t,r,o))};function Co(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&xo(t)&&w(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return xo(t)&&T(n)?!1:t in e}function wo(e,t){let n=e._def.props;if(!n)return!1;let r=A(t);return Array.isArray(n)?n.some(e=>A(e)===r):Object.keys(n).some(e=>A(e)===r)}var To=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return b(t)?e=>de(t,e):t};function Eo(e){e.target.composing=!0}function Do(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Oo=Symbol(`_assign`);function ko(e,t,n){return t&&(e=e.trim()),n&&(e=pe(e)),e}var Ao={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Oo]=To(i);let a=r||i.props&&i.props.type===`number`;lo(e,t?`change`:`input`,t=>{t.target.composing||e[Oo](ko(e.value,n,a))}),(n||a)&&lo(e,`change`,()=>{e.value=ko(e.value,n,a)}),t||(lo(e,`compositionstart`,Eo),lo(e,`compositionend`,Do),lo(e,`change`,Do))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Oo]=To(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?pe(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},jo=g({patchProp:So},Ka),Mo;function No(){return Mo||=Fi(jo)}var Po=((...e)=>{let t=No().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Io(e);if(!r)return;let i=t._component;!w(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Fo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Fo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Io(e){return T(e)?document.querySelector(e):e}function Lo(e,t){return Me()?(Ne(e,t),!0):!1}var Ro=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var zo=Object.prototype.toString,Bo=e=>zo.call(e)===`[object Object]`,Vo=()=>{};function Ho(...e){if(e.length!==1)return fn(...e);let t=e[0];return typeof t==`function`?Wt(ln(()=>({get:t,set:Vo}))):$t(t)}function Uo(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var Wo=e=>e();function Go(e=Wo,t={}){let{initialState:n=`active`}=t,r=Ho(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:Gt(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function Ko(e){return Array.isArray(e)?e:[e]}function qo(e){return e||ya()}function Jo(e,t,n={}){let{eventFilter:r=Wo,...i}=n;return Xn(e,Uo(r,t),i)}function Yo(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=Go(r,{initialState:i});return{stop:Jo(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function Xo(e,t=!0,n){qo(n)?vr(e,n):t?e():An(e)}function Zo(e,t,n){return Xn(e,t,{...n,immediate:!0})}var Qo=Ro?window:void 0;Ro&&window.document,Ro&&window.navigator,Ro&&window.location;function $o(e){let t=an(e);return t?.$el??t}function es(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=La(()=>{let t=Ko(an(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return Zo(()=>[n.value?.map(e=>$o(e))??[Qo].filter(e=>e!=null),Ko(an(n.value?e[1]:e[0])),Ko(rn(n.value?e[2]:e[1])),an(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=Bo(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function ts(){let e=en(!1),t=ya();return t&&vr(()=>{e.value=!0},t),e}function ns(e){let t=ts();return La(()=>(t.value,!!e()))}var rs=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},is=`__vueuse_ssr_handlers__`,as=os();function os(){return is in rs||(rs[is]=rs[is]||{}),rs[is]}function ss(e,t){return as[e]||t}function cs(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var ls={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},us=`vueuse-storage`;function ds(e,t,n,r={}){let{flush:i=`pre`,deep:a=!0,listenToStorageChanges:o=!0,writeDefaults:s=!0,mergeDefaults:c=!1,shallow:l,window:u=Qo,eventFilter:d,onError:f=e=>{console.error(e)},initOnMounted:p}=r,m=(l?en:$t)(typeof t==`function`?t():t),h=La(()=>an(e));if(!n)try{n=ss(`getDefaultStorage`,()=>Qo?.localStorage)()}catch(e){f(e)}if(!n)return m;let g=an(t),_=cs(g),v=r.serializer??ls[_],{pause:y,resume:b}=Yo(m,e=>C(e),{flush:i,deep:a,eventFilter:d});Xn(h,()=>T(),{flush:i});let x=!1;u&&o&&(n instanceof Storage?es(u,`storage`,e=>{p&&!x||T(e)},{passive:!0}):es(u,us,e=>{p&&!x||E(e)})),p?Xo(()=>{x=!0,T()}):T();function S(e,t){if(u){let r={key:h.value,oldValue:e,newValue:t,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(us,{detail:r}))}}function C(e){try{let t=n.getItem(h.value);if(e==null)S(t,null),n.removeItem(h.value);else{let r=v.write(e);t!==r&&(n.setItem(h.value,r),S(t,r))}}catch(e){f(e)}}function w(e){let t=e?e.newValue:n.getItem(h.value);if(t==null)return s&&g!=null&&n.setItem(h.value,v.write(g)),g;if(!e&&c){let e=v.read(t);return typeof c==`function`?c(e,g):_===`object`&&!Array.isArray(e)?{...g,...e}:e}else if(typeof t!=`string`)return t;else return v.read(t)}function T(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){m.value=g;return}if(!(e&&e.key!==h.value)){y();try{let t=v.write(m.value);(e===void 0||e?.newValue!==t)&&(m.value=w(e))}catch(e){f(e)}finally{e?An(b):b()}}}}function E(e){T(e.detail)}return m}function fs(e,t,n={}){let{window:r=Qo,...i}=n,a,o=ns(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=Xn(La(()=>{let t=an(e);return Array.isArray(t)?t.map(e=>$o(e)):[$o(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return Lo(l),{isSupported:o,stop:l}}function ps(e,t={width:0,height:0},n={}){let{window:r=Qo,box:i=`content-box`}=n,a=La(()=>{var t;return(t=$o(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),o=en(t.width),s=en(t.height),{stop:c}=fs(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=$o(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=Ko(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);Xo(()=>{let n=$o(e);if(n&&`offsetWidth`in n)if(i===`content-box`&&r){let e=r.getComputedStyle(n),t=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),i=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),c=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);o.value=n.offsetWidth-t-a,s.value=n.offsetHeight-i-c}else o.value=n.offsetWidth,s.value=n.offsetHeight;else n&&(o.value=t.width,s.value=t.height)});let l=Xn(()=>$o(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}var ms={key:0,class:`leading-icon`},hs={class:`text`},gs={class:`transition`},_s={class:`transition`},vs={key:1,class:`arrow`},ys={__name:`Btn`,props:{tag:{type:String,default:()=>`button`},arrow:{type:Boolean,default:()=>!1},loading:{type:Boolean,default:()=>!1}},setup(e){return(t,n)=>(J(),na(kr(e.tag),{class:`btn`},{default:Vn(()=>[e.arrow?(J(),ta(`span`,ms,`→`)):da(``,!0),Y(`span`,hs,[Y(`span`,gs,[Mr(t.$slots,`default`)]),Y(`span`,_s,[Mr(t.$slots,`default`)])]),e.arrow?(J(),ta(`span`,vs,`→`)):da(``,!0)]),_:3}))}},bs={class:`toggle-icon`},xs={class:`panel-body`},Ss={class:`panel-inner`},Cs={__name:`ControlPanel`,props:{title:{type:String,default:`Controls`},defaultOpen:{type:Boolean,default:!0}},setup(e){let t=$t(e.defaultOpen);return(e,n)=>(J(),ta(`div`,{class:xe([`shared-control-panel`,{"is-open":t.value}])},[X(ys,{class:`toggle-btn`,onClick:n[0]||=e=>t.value=!t.value,"aria-expanded":t.value,"aria-label":`Toggle control panel`},{default:Vn(()=>[Y(`span`,bs,Oe(t.value?`×`:`⊞`),1)]),_:1},8,[`aria-expanded`]),Y(`div`,xs,[Y(`div`,Ss,[Mr(e.$slots,`default`)])])],2))}},ws=Math.sqrt(3),Ts=Math.sqrt(5),Es=.5*(ws-1),Ds=(3-ws)/6;(Ts-1)/4,(5-Ts)/20;var Os=e=>Math.floor(e)|0,ks=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]);function As(e=Math.random){let t=js(e),n=new Float64Array(t).map(e=>ks[e%12*2]),r=new Float64Array(t).map(e=>ks[e%12*2+1]);return function(e,i){let a=0,o=0,s=0,c=(e+i)*Es,l=Os(e+c),u=Os(i+c),d=(l+u)*Ds,f=l-d,p=u-d,m=e-f,h=i-p,g,_;m>h?(g=1,_=0):(g=0,_=1);let v=m-g+Ds,y=h-_+Ds,b=m-1+2*Ds,x=h-1+2*Ds,S=l&255,C=u&255,w=.5-m*m-h*h;if(w>=0){let e=S+t[C],i=n[e],o=r[e];w*=w,a=w*w*(i*m+o*h)}let T=.5-v*v-y*y;if(T>=0){let e=S+g+t[C+_],i=n[e],a=r[e];T*=T,o=T*T*(i*v+a*y)}let E=.5-b*b-x*x;if(E>=0){let e=S+1+t[C+1],i=n[e],a=r[e];E*=E,s=E*E*(i*b+a*x)}return 70*(a+o+s)}}function js(e){let t=new Uint8Array(512);for(let e=0;e<512/2;e++)t[e]=e;for(let n=0;n<512/2-1;n++){let r=n+~~(e()*(256-n)),i=t[n];t[n]=t[r],t[r]=i}for(let e=256;e<512;e++)t[e]=t[e-256];return t}var $=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Ms(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}var Ns=new Uint8Array(16);function Ps(){return crypto.getRandomValues(Ns)}function Fs(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():Is(e,t,n)}function Is(e,t,n){e||={};let r=e.random??e.rng?.()??Ps();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Ms(r)}var Ls={class:`shared-range`},Rs=[`min`,`max`,`step`],zs={__name:`Range`,props:zr({label:String,min:{type:Number,default:0},max:{type:Number,default:1},step:{type:Number,default:.1}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ii(e,`modelValue`);return(n,r)=>(J(),ta(`div`,Ls,[Y(`label`,null,[Y(`span`,null,Oe(e.label),1),Y(`span`,null,Oe(t.value),1)]),Hn(Y(`input`,{type:`range`,"onUpdate:modelValue":r[0]||=e=>t.value=e,min:e.min,max:e.max,step:e.step},null,8,Rs),[[Ao,t.value,void 0,{number:!0}]])]))}},Bs=c(o(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=r():typeof define==`function`&&define.amd?define(r):n.Alea=r()})(e,function(){return e.importState=function(t){var n=new e;return n.importState(t),n},e;function e(){return function(e){var n=0,r=0,i=0,a=1;e.length==0&&(e=[+new Date]);var o=t();n=o(` `),r=o(` `),i=o(` `);for(var s=0;s>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26};return t.version=`Mash 0.9`,t}})}))()),Vs={class:`bonsai`},Hs=360,Us={__name:`Bonsai`,setup(e){let t=$t(),{width:n,height:r}=ps(t),i=ds(`bonsai-seed`,``),a=()=>{i.value=Fs()};i.value||a();let o=La(()=>As((0,Bs.default)(i.value))),s=$t(30),c=$t(1),l=$t(.35),u=$t(.4),d=Math.PI*2/Hs,f=(e,t,n)=>{let{numR:r,spatialFreq:i,ringStep:a,mutation:o}=n,s=e*.04,c=r-1,l=Array.from({length:c},(e,n)=>.15+(t(n*.22,1.5)+1)/2*1.7),u=l.reduce((e,t)=>e+t,0),f=l.map(t=>t/u*(e-s)),p=[];p.push(Array.from({length:361},(e,n)=>{let r=n*d,a=t(Math.cos(r)*i,Math.sin(r)*i);return s*(1+a*.12)}));for(let e=1;e{let l=c*d,u=Math.cos(l),f=Math.sin(l),p=t(u*i+e*a,f*i+e*a);return n[c]+r+p*r*o}))}return{rings:p,growthAmounts:f}},p=(e,t)=>{e.beginPath();for(let n=0;n<=Hs;n++){let r=n*d,i=Math.cos(r)*t[n],a=Math.sin(r)*t[n];n===0?e.moveTo(i,a):e.lineTo(i,a)}e.closePath(),e.stroke()},m=()=>{if(!t.value||!n.value||!r.value)return;let e=t.value.getContext(`2d`),i=n.value,a=r.value;t.value.width=i,t.value.height=a;let d=Math.min(i,a)*.46;e.translate(i/2,a/2);let{rings:m,growthAmounts:h}=f(d,o.value,{numR:s.value,spatialFreq:c.value,ringStep:l.value,mutation:u.value}),g=Math.min(...h),_=Math.max(...h)-g||1;m.forEach((t,n)=>{let r=(h[Math.max(0,n-1)]-g)/_;e.strokeStyle=`#000`,e.lineWidth=.8+r*1.4,p(e,t)})};return vr(()=>{Jn(m)}),(e,n)=>(J(),ta(`div`,Vs,[Y(`canvas`,{ref_key:`canvas`,ref:t},null,512),X(Cs,{title:`controls`},{default:Vn(()=>[X(zs,{modelValue:s.value,"onUpdate:modelValue":n[0]||=e=>s.value=e,label:`Rings`,min:2,max:80,step:1},null,8,[`modelValue`]),X(zs,{modelValue:c.value,"onUpdate:modelValue":n[1]||=e=>c.value=e,label:`Noise`,min:.1,max:2},null,8,[`modelValue`]),X(zs,{modelValue:l.value,"onUpdate:modelValue":n[2]||=e=>l.value=e,label:`Variation`,min:0,max:1.5,step:.05},null,8,[`modelValue`]),X(zs,{modelValue:u.value,"onUpdate:modelValue":n[3]||=e=>u.value=e,label:`Mutation`,step:.05},null,8,[`modelValue`]),X(ys,{onClick:a},{default:Vn(()=>[...n[4]||=[ua(`New Seed`,-1)]]),_:1})]),_:1})]))}},Ws={class:`drop theme-light`};Po({__name:`App`,setup(e){return(e,t)=>(J(),ta(`main`,Ws,[X(Us)]))}}).mount(`#app`); \ No newline at end of file diff --git a/app/public/drops/bonsai/assets/index-kYUuDunm.js b/app/public/drops/bonsai/assets/index-kYUuDunm.js deleted file mode 100644 index fc54dad..0000000 --- a/app/public/drops/bonsai/assets/index-kYUuDunm.js +++ /dev/null @@ -1 +0,0 @@ -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function l(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var u={},d=[],f=()=>{},p=()=>!1,m=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),h=e=>e.startsWith(`onUpdate:`),g=Object.assign,_=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},v=Object.prototype.hasOwnProperty,y=(e,t)=>v.call(e,t),b=Array.isArray,x=e=>O(e)===`[object Map]`,S=e=>O(e)===`[object Set]`,C=e=>O(e)===`[object Date]`,w=e=>typeof e==`function`,T=e=>typeof e==`string`,E=e=>typeof e==`symbol`,D=e=>typeof e==`object`&&!!e,ee=e=>(D(e)||w(e))&&w(e.then)&&w(e.catch),te=Object.prototype.toString,O=e=>te.call(e),ne=e=>O(e).slice(8,-1),re=e=>O(e)===`[object Object]`,ie=e=>T(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ae=l(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),k=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},oe=/-\w/g,A=k(e=>e.replace(oe,e=>e.slice(1).toUpperCase())),se=/\B([A-Z])/g,ce=k(e=>e.replace(se,`-$1`).toLowerCase()),le=k(e=>e.charAt(0).toUpperCase()+e.slice(1)),ue=k(e=>e?`on${le(e)}`:``),j=(e,t)=>!Object.is(e,t),de=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},pe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},me,he=()=>me||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ge(e){if(b(e)){let t={};for(let n=0;n{if(e){let n=e.split(ve);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function xe(e){let t=``;if(T(e))t=e;else if(b(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Oe=e=>T(e)?e:e==null?``:b(e)||D(e)&&(e.toString===te||!w(e.toString))?De(e)?Oe(e.value):JSON.stringify(e,ke,2):String(e),ke=(e,t)=>De(t)?ke(e,t.value):x(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ae(t,r)+` =>`]=n,e),{})}:S(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ae(e))}:E(t)?Ae(t):D(t)&&!b(t)&&!re(t)?String(t):t,Ae=(e,t=``)=>E(e)?`Symbol(${e.description??t})`:e,M,je=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&M&&(M.active?(this.parent=M,this.index=(M.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e0&&--this._on===0){if(M===this)M=this.prevScope;else{let e=M;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Re){let e=Re;for(Re=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Le;){let t=Le;for(Le=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function He(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ue(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ke(r),qe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function We(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ge(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ge(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qe)||(e.globalVersion=Qe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!We(e))))return;e.flags|=2;let t=e.dep,n=N,r=P;N=e,P=!0;try{He(e);let n=e.fn(e._value);(t.version===0||j(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{N=n,P=r,Ue(e),e.flags&=-3}}function Ke(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ke(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function qe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var P=!0,Je=[];function Ye(){Je.push(P),P=!1}function Xe(){let e=Je.pop();P=e===void 0||e}function Ze(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=N;N=void 0;try{t()}finally{N=e}}}var Qe=0,$e=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},et=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!N||!P||N===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==N)t=this.activeLink=new $e(N,this),N.deps?(t.prevDep=N.depsTail,N.depsTail.nextDep=t,N.depsTail=t):N.deps=N.depsTail=t,tt(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=N.depsTail,t.nextDep=void 0,N.depsTail.nextDep=t,N.depsTail=t,N.deps===t&&(N.deps=e)}return t}trigger(e){this.version++,Qe++,this.notify(e)}notify(e){Be();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ve()}}};function tt(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)tt(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var nt=new WeakMap,rt=Symbol(``),it=Symbol(``),at=Symbol(``);function F(e,t,n){if(P&&N){let t=nt.get(e);t||nt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new et),r.map=t,r.key=n),r.track()}}function ot(e,t,n,r,i,a){let o=nt.get(e);if(!o){Qe++;return}let s=e=>{e&&e.trigger()};if(Be(),t===`clear`)o.forEach(s);else{let i=b(e),a=i&&ie(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===at||!E(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(at)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(rt)),x(e)&&s(o.get(it)));break;case`delete`:i||(s(o.get(rt)),x(e)&&s(o.get(it)));break;case`set`:x(e)&&s(o.get(rt));break}}Ve()}function st(e,t){let n=nt.get(e);return n&&n.get(t)}function ct(e){let t=R(e);return t===e?t:(F(t,`iterate`,at),L(e)?t:t.map(Zt))}function lt(e){return F(e=R(e),`iterate`,at),e}function I(e,t){return Jt(e)?Qt(qt(e)?Zt(t):t):Zt(t)}var ut={__proto__:null,[Symbol.iterator](){return dt(this,Symbol.iterator,e=>I(this,e))},concat(...e){return ct(this).concat(...e.map(e=>b(e)?ct(e):e))},entries(){return dt(this,`entries`,e=>(e[1]=I(this,e[1]),e))},every(e,t){return pt(this,`every`,e,t,void 0,arguments)},filter(e,t){return pt(this,`filter`,e,t,e=>e.map(e=>I(this,e)),arguments)},find(e,t){return pt(this,`find`,e,t,e=>I(this,e),arguments)},findIndex(e,t){return pt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return pt(this,`findLast`,e,t,e=>I(this,e),arguments)},findLastIndex(e,t){return pt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return pt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ht(this,`includes`,e)},indexOf(...e){return ht(this,`indexOf`,e)},join(e){return ct(this).join(e)},lastIndexOf(...e){return ht(this,`lastIndexOf`,e)},map(e,t){return pt(this,`map`,e,t,void 0,arguments)},pop(){return gt(this,`pop`)},push(...e){return gt(this,`push`,e)},reduce(e,...t){return mt(this,`reduce`,e,t)},reduceRight(e,...t){return mt(this,`reduceRight`,e,t)},shift(){return gt(this,`shift`)},some(e,t){return pt(this,`some`,e,t,void 0,arguments)},splice(...e){return gt(this,`splice`,e)},toReversed(){return ct(this).toReversed()},toSorted(e){return ct(this).toSorted(e)},toSpliced(...e){return ct(this).toSpliced(...e)},unshift(...e){return gt(this,`unshift`,e)},values(){return dt(this,`values`,e=>I(this,e))}};function dt(e,t,n){let r=lt(e),i=r[t]();return r!==e&&!L(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var ft=Array.prototype;function pt(e,t,n,r,i,a){let o=lt(e),s=o!==e&&!L(e),c=o[t];if(c!==ft[t]){let t=c.apply(e,a);return s?Zt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,I(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function mt(e,t,n,r){let i=lt(e),a=i!==e&&!L(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=I(e,t)),n.call(this,t,I(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?I(e,c):c}function ht(e,t,n){let r=R(e);F(r,`iterate`,at);let i=r[t](...n);return(i===-1||i===!1)&&Yt(n[0])?(n[0]=R(n[0]),r[t](...n)):i}function gt(e,t,n=[]){Ye(),Be();let r=R(e)[t].apply(e,n);return Ve(),Xe(),r}var _t=l(`__proto__,__v_isRef,__isVue`),vt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(E));function yt(e){E(e)||(e=String(e));let t=R(this);return F(t,`has`,e),t.hasOwnProperty(e)}var bt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Bt:zt:i?Rt:Lt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=b(e);if(!r){let e;if(a&&(e=ut[t]))return e;if(t===`hasOwnProperty`)return yt}let o=Reflect.get(e,t,z(e)?e:n);if((E(t)?vt.has(t):_t(t))||(r||F(e,`get`,t),i))return o;if(z(o)){let e=a&&ie(t)?o:o.value;return r&&D(e)?Wt(e):e}return D(o)?r?Wt(o):Ht(o):o}},xt=class extends bt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=b(e)&&ie(t);if(!this._isShallow){let e=Jt(i);if(!L(n)&&!Jt(n)&&(i=R(i),n=R(n)),!a&&z(i)&&!z(n))return e||(i.value=n),!0}let o=a?Number(t)e,Ot=e=>Reflect.getPrototypeOf(e);function kt(e,t,n){return function(...r){let i=this.__v_raw,a=R(i),o=x(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Dt:t?Qt:Zt;return!t&&F(a,`iterate`,c?it:rt),g(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function At(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function jt(e,t){let n={get(n){let r=this.__v_raw,i=R(r),a=R(n);e||(j(n,a)&&F(i,`get`,n),F(i,`get`,a));let{has:o}=Ot(i),s=t?Dt:e?Qt:Zt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&F(R(t),`iterate`,rt),t.size},has(t){let n=this.__v_raw,r=R(n),i=R(t);return e||(j(t,i)&&F(r,`has`,t),F(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=R(a),s=t?Dt:e?Qt:Zt;return!e&&F(o,`iterate`,rt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return g(n,e?{add:At(`add`),set:At(`set`),delete:At(`delete`),clear:At(`clear`)}:{add(e){let n=R(this),r=Ot(n),i=R(e),a=!t&&!L(e)&&!Jt(e)?i:e;return r.has.call(n,a)||j(e,a)&&r.has.call(n,e)||j(i,a)&&r.has.call(n,i)||(n.add(a),ot(n,`add`,a,a)),this},set(e,n){!t&&!L(n)&&!Jt(n)&&(n=R(n));let r=R(this),{has:i,get:a}=Ot(r),o=i.call(r,e);o||=(e=R(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?j(n,s)&&ot(r,`set`,e,n,s):ot(r,`add`,e,n),this},delete(e){let t=R(this),{has:n,get:r}=Ot(t),i=n.call(t,e);i||=(e=R(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&ot(t,`delete`,e,void 0,a),o},clear(){let e=R(this),t=e.size!==0,n=e.clear();return t&&ot(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=kt(r,e,t)}),n}function Mt(e,t){let n=jt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(y(n,r)&&r in t?n:t,r,i)}var Nt={get:Mt(!1,!1)},Pt={get:Mt(!1,!0)},Ft={get:Mt(!0,!1)},It={get:Mt(!0,!0)},Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap;function Vt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ht(e){return Jt(e)?e:Kt(e,!1,Ct,Nt,Lt)}function Ut(e){return Kt(e,!1,Tt,Pt,Rt)}function Wt(e){return Kt(e,!0,wt,Ft,zt)}function Gt(e){return Kt(e,!0,Et,It,Bt)}function Kt(e,t,n,r,i){if(!D(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Vt(ne(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function qt(e){return Jt(e)?qt(e.__v_raw):!!(e&&e.__v_isReactive)}function Jt(e){return!!(e&&e.__v_isReadonly)}function L(e){return!!(e&&e.__v_isShallow)}function Yt(e){return e?!!e.__v_raw:!1}function R(e){let t=e&&e.__v_raw;return t?R(t):e}function Xt(e){return!y(e,`__v_skip`)&&Object.isExtensible(e)&&fe(e,`__v_skip`,!0),e}var Zt=e=>D(e)?Ht(e):e,Qt=e=>D(e)?Wt(e):e;function z(e){return e?e.__v_isRef===!0:!1}function $t(e){return tn(e,!1)}function en(e){return tn(e,!0)}function tn(e,t){return z(e)?e:new nn(e,t)}var nn=class{constructor(e,t){this.dep=new et,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:R(e),this._value=t?e:Zt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||L(e)||Jt(e);e=n?e:R(e),j(e,t)&&(this._rawValue=e,this._value=n?e:Zt(e),this.dep.trigger())}};function rn(e){return z(e)?e.value:e}function an(e){return w(e)?e():rn(e)}var on={get:(e,t,n)=>t===`__v_raw`?e:rn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return z(i)&&!z(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function sn(e){return qt(e)?e:new Proxy(e,on)}var cn=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new et,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function ln(e){return new cn(e)}var un=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=E(t)?t:String(t),this._raw=R(e);let r=!0,i=e;if(!b(e)||E(this._key)||!ie(this._key))do r=!Yt(i)||L(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=rn(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&z(this._raw[this._key])){let t=this._object[this._key];if(z(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return st(this._raw,this._key)}},dn=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function fn(e,t,n){return z(e)?e:w(e)?new dn(e):D(e)&&arguments.length>1?pn(e,t,n):$t(e)}function pn(e,t,n){return new un(e,t,n)}var mn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new et(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qe-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&N!==this)return ze(this,!0),!0}get value(){let e=this.dep.track();return Ge(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function hn(e,t,n=!1){let r,i;return w(e)?r=e:(r=e.get,i=e.set),new mn(r,i,n)}var gn={},_n=new WeakMap,vn=void 0;function yn(e,t=!1,n=vn){if(n){let t=_n.get(n);t||_n.set(n,t=[]),t.push(e)}}function bn(e,t,n=u){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:L(e)||i===!1||i===0?xn(e,1):xn(e),d,p,m,h,g=!1,v=!1;if(z(e)?(p=()=>e.value,g=L(e)):qt(e)?(p=()=>l(e),g=!0):b(e)?(v=!0,g=e.some(e=>qt(e)||L(e)),p=()=>e.map(e=>{if(z(e))return e.value;if(qt(e))return l(e);if(w(e))return c?c(e,2):e()})):p=w(e)?t?c?()=>c(e,2):e:()=>{if(m){Ye();try{m()}finally{Xe()}}let t=vn;vn=d;try{return c?c(e,3,[h]):e(h)}finally{vn=t}}:f,t&&i){let e=p,t=i===!0?1/0:i;p=()=>xn(e(),t)}let y=Me(),x=()=>{d.stop(),y&&y.active&&_(y.effects,d)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return x(),n}}let S=v?Array(e.length).fill(gn):gn,C=e=>{if(!(!(d.flags&1)||!d.dirty&&!e))if(t){let n=d.run();if(e||i||g||(v?n.some((e,t)=>j(e,S[t])):j(n,S))){m&&m();let e=vn;vn=d;try{let e=[n,S===gn?void 0:v&&S[0]===gn?[]:S,h];S=n,c?c(t,3,e):t(...e)}finally{vn=e}}}else d.run()};return s&&s(C),d=new Fe(p),d.scheduler=o?()=>o(C,!1):C,h=e=>yn(e,!1,d),m=d.onStop=()=>{let e=_n.get(d);if(e){if(c)c(e,4);else for(let t of e)t();_n.delete(d)}},t?r?C(!0):S=d.run():o?o(C.bind(null,!0),!0):d.run(),x.pause=d.pause.bind(d),x.resume=d.resume.bind(d),x.stop=x,x}function xn(e,t=1/0,n){if(t<=0||!D(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,z(e))xn(e.value,t,n);else if(b(e))for(let r=0;r{xn(e,t,n)});else if(re(e)){for(let r in e)xn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&xn(e[r],t,n)}return e}function Sn(e,t,n,r){try{return r?e(...r):e()}catch(e){Cn(e,t,n)}}function B(e,t,n,r){if(w(e)){let i=Sn(e,t,n,r);return i&&ee(i)&&i.catch(e=>{Cn(e,t,n)}),i}if(b(e)){let i=[];for(let a=0;a>>1,i=V[r],a=Ln(i);a=Ln(n)?V.push(e):V.splice(jn(t),0,e),e.flags|=1,Nn()}}function Nn(){kn||=On.then(Rn)}function Pn(e){b(e)?Tn.push(...e):En&&e.id===-1?En.splice(Dn+1,0,e):e.flags&1||(Tn.push(e),e.flags|=1),Nn()}function Fn(e,t,n=H+1){for(;nLn(e)-Ln(t));if(Tn.length=0,En){En.push(...e);return}for(En=e,Dn=0;Dne.id==null?e.flags&2?-1:1/0:e.id;function Rn(e){try{for(H=0;H{r._d&&ea(-1);let i=Bn(t),a=Xi.length,o;try{o=e(...n)}finally{for(let e=Xi.length;e>a;e--)Qi();Bn(i),r._d&&ea(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Hn(e,t){if(U===null)return e;let n=Pa(U),r=e.dirs||=[];for(let e=0;e1)return n&&w(t)?t.call(r&&r.proxy):t}}var Kn=Symbol.for(`v-scx`),qn=()=>Gn(Kn);function Jn(e,t){return Zn(e,null,t)}function Yn(e,t){return Zn(e,null,{flush:`sync`})}function Xn(e,t,n){return Zn(e,t,n)}function Zn(e,t,n=u){let{immediate:r,deep:i,flush:a,once:o}=n,s=g({},n),c=t&&r||!t&&a!==`post`,l;if(Ta){if(a===`sync`){let e=qn();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=f,e.resume=f,e.pause=f,e}}let d=Q;s.call=(e,t,n)=>B(e,d,t,n);let p=!1;a===`post`?s.scheduler=e=>{G(e,d&&d.suspense)}:a!==`sync`&&(p=!0,s.scheduler=(e,t)=>{t?e():Mn(e)}),s.augmentJob=e=>{t&&(e.flags|=4),p&&(e.flags|=2,d&&(e.id=d.uid,e.i=d))};let m=bn(e,t,s);return Ta&&(l?l.push(m):c&&m()),m}function Qn(e,t,n){let r=this.proxy,i=T(e)?e.includes(`.`)?$n(r,e):()=>r[e]:e.bind(r,r),a;w(t)?a=t:(a=t.handler,n=t);let o=Sa(this),s=Zn(i,a.bind(r),n);return o(),s}function $n(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,nr=Symbol(`_leaveCb`);function rr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,rr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ir(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function ar(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var or=new WeakMap;function sr(e,t,n,r,i=!1){if(b(e)){e.forEach((e,a)=>sr(e,t&&(b(t)?t[a]:t),n,r,i));return}if(lr(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&sr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Pa(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,d=s.refs===u?s.refs={}:s.refs,f=s.setupState,m=R(f),h=f===u?p:e=>!ar(d,e)&&y(m,e),g=(e,t)=>!(t&&ar(d,t));if(l!=null&&l!==c){if(cr(t),T(l))d[l]=null,h(l)&&(f[l]=null);else if(z(l)){let e=t;g(l,e.k)&&(l.value=null),e.k&&(d[e.k]=null)}}if(w(c))Sn(c,s,12,[o,d]);else{let t=T(c),r=z(c);if(t||r){let s=()=>{if(e.f){let n=t?h(c)?f[c]:d[c]:g(c)||!e.k?c.value:d[e.k];if(i)b(n)&&_(n,a);else if(b(n))n.includes(a)||n.push(a);else if(t)d[c]=[a],h(c)&&(f[c]=d[c]);else{let t=[a];g(c,e.k)&&(c.value=t),e.k&&(d[e.k]=t)}}else t?(d[c]=o,h(c)&&(f[c]=o)):r&&(g(c,e.k)&&(c.value=o),e.k&&(d[e.k]=o))};if(o){let t=()=>{s(),or.delete(e)};t.id=-1,or.set(e,t),G(t,n)}else cr(e),s()}}}function cr(e){let t=or.get(e);t&&(t.flags|=8,or.delete(e))}he().requestIdleCallback,he().cancelIdleCallback;var lr=e=>!!e.type.__asyncLoader,ur=e=>e.type.__isKeepAlive;function dr(e,t){pr(e,`a`,t)}function fr(e,t){pr(e,`da`,t)}function pr(e,t,n=Q){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(hr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)ur(e.parent.vnode)&&mr(r,t,n,e),e=e.parent}}function mr(e,t,n,r){let i=hr(t,e,r,!0);Sr(()=>{_(r[t],i)},n)}function hr(e,t,n=Q,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ye();let i=Sa(n),a=B(t,n,e,r);return i(),Xe(),a};return r?i.unshift(a):i.push(a),a}}var gr=e=>(t,n=Q)=>{(!Ta||e===`sp`)&&hr(e,(...e)=>t(...e),n)},_r=gr(`bm`),vr=gr(`m`),yr=gr(`bu`),br=gr(`u`),xr=gr(`bum`),Sr=gr(`um`),Cr=gr(`sp`),wr=gr(`rtg`),Tr=gr(`rtc`);function Er(e,t=Q){hr(`ec`,e,t)}var Dr=`components`,Or=Symbol.for(`v-ndc`);function kr(e){return T(e)?Ar(Dr,e,!1)||e:e||Or}function Ar(e,t,n=!0,r=!1){let i=U||Q;if(i){let n=i.type;if(e===Dr){let e=Fa(n,!1);if(e&&(e===t||e===A(t)||e===le(A(t))))return n}let a=jr(i[e]||n[e],t)||jr(i.appContext[e],t);return!a&&r?n:a}}function jr(e,t){return e&&(e[t]||e[A(t)]||e[le(A(t))])}function Mr(e,t,n={},r,i,a){if(U.ce||U.parent&&lr(U.parent)&&U.parent.ce){let e=a!=null&&n.key==null?g({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),Zi(),ra(K,null,[Y(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=Xi.length;Zi();let c;try{let i=o&&Nr(o(n)),s=n.key||a||i&&i.key;c=ra(K,{key:(s&&!E(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Xi.length;e>s;e--)Qi();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function Nr(e){return e.some(e=>!ia(e)||!(e.type===Ji||e.type===K&&!Nr(e.children)))?e:null}var Pr=e=>e?wa(e)?Pa(e):Pr(e.parent):null,Fr=g(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Pr(e.parent),$root:e=>Pr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Gr(e),$forceUpdate:e=>e.f||=()=>{Mn(e.update)},$nextTick:e=>e.n||=An.bind(e.proxy),$watch:e=>Qn.bind(e)}),Ir=(e,t)=>e!==u&&!e.__isScriptSetup&&y(e,t),Lr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(Ir(r,t))return o[t]=1,r[t];else if(i!==u&&y(i,t))return o[t]=2,i[t];else if(y(a,t))return o[t]=3,a[t];else if(n!==u&&y(n,t))return o[t]=4,n[t];else Br&&(o[t]=0)}let l=Fr[t],d,f;if(l)return t===`$attrs`&&F(e.attrs,`get`,``),l(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==u&&y(n,t))return o[t]=4,n[t];if(f=c.config.globalProperties,y(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return Ir(i,t)?(i[t]=n,!0):r!==u&&y(r,t)?(r[t]=n,!0):y(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==u&&s[0]!==`$`&&y(e,s)||Ir(t,s)||y(a,s)||y(r,s)||y(Fr,s)||y(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?y(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Rr(e){return b(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function zr(e,t){return!e||!t?e||t:b(e)&&b(t)?e.concat(t):g({},Rr(e),Rr(t))}var Br=!0;function Vr(e){let t=Gr(e),n=e.proxy,r=e.ctx;Br=!1,t.beforeCreate&&Ur(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:p,beforeUpdate:m,updated:h,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:x,unmounted:S,render:C,renderTracked:T,renderTriggered:E,errorCaptured:ee,serverPrefetch:te,expose:O,inheritAttrs:ne,components:re,directives:ie,filters:ae}=t;if(l&&Hr(l,r,null),o)for(let e in o){let t=o[e];w(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);D(t)&&(e.data=Ht(t))}if(Br=!0,a)for(let e in a){let t=a[e],i=La({get:w(t)?t.bind(n,n):w(t.get)?t.get.bind(n,n):f,set:!w(t)&&w(t.set)?t.set.bind(n):f});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)Wr(s[e],r,n,e);if(c){let e=w(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Wn(t,e[t])})}u&&Ur(u,e,`c`);function k(e,t){b(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(_r,d),k(vr,p),k(yr,m),k(br,h),k(dr,g),k(fr,_),k(Er,ee),k(Tr,T),k(wr,E),k(xr,y),k(Sr,S),k(Cr,te),b(O))if(O.length){let t=e.exposed||={};O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};C&&e.render===f&&(e.render=C),ne!=null&&(e.inheritAttrs=ne),re&&(e.components=re),ie&&(e.directives=ie),te&&ir(e)}function Hr(e,t,n=f){b(e)&&(e=Xr(e));for(let n in e){let r=e[n],i;i=D(r)?`default`in r?Gn(r.from||n,r.default,!0):Gn(r.from||n):Gn(r),z(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Ur(e,t,n){B(b(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Wr(e,t,n,r){let i=r.includes(`.`)?$n(n,r):()=>n[r];if(T(e)){let n=t[e];w(n)&&Xn(i,n)}else if(w(e))Xn(i,e.bind(n));else if(D(e))if(b(e))e.forEach(e=>Wr(e,t,n,r));else{let r=w(e.handler)?e.handler.bind(n):t[e.handler];w(r)&&Xn(i,r,e)}}function Gr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Kr(c,e,o,!0)),Kr(c,t,o)),D(t)&&a.set(t,c),c}function Kr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Kr(e,a,n,!0),i&&i.forEach(t=>Kr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=qr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var qr={data:Jr,props:Qr,emits:Qr,methods:Zr,computed:Zr,beforeCreate:W,created:W,beforeMount:W,mounted:W,beforeUpdate:W,updated:W,beforeDestroy:W,beforeUnmount:W,destroyed:W,unmounted:W,activated:W,deactivated:W,errorCaptured:W,serverPrefetch:W,components:Zr,directives:Zr,watch:$r,provide:Jr,inject:Yr};function Jr(e,t){return t?e?function(){return g(w(e)?e.call(this,this):e,w(t)?t.call(this,this):t)}:t:e}function Yr(e,t){return Zr(Xr(e),Xr(t))}function Xr(e){if(b(e)){let t={};for(let n=0;n{let c,l=u,d;return Yn(()=>{let t=e[i];j(c,t)&&(c=t,s())}),{get(){return o(),n.get?n.get(c):c},set(e){let o=n.set?n.set(e):e;if(!j(o,c)&&!(l!==u&&j(e,l)))return;let f=r.vnode.props,p=!!(f&&(t in f||i in f||a in f)&&(`onUpdate:${t}`in f||`onUpdate:${i}`in f||`onUpdate:${a}`in f));p||(c=e,s()),r.emit(`update:${t}`,o),j(e,l)&&(j(e,o)&&!j(o,d)||p&&l!==u&&!j(o,c))&&s(),l=e,d=o}}});return s[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?o||u:s,done:!1}:{done:!0}}}},s}var ai=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${A(t)}Modifiers`]||e[`${ce(t)}Modifiers`];function oi(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||u,i=n,a=t.startsWith(`update:`),o=a&&ai(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>T(e)?e.trim():e)),o.number&&(i=n.map(pe)));let s,c=r[s=ue(t)]||r[s=ue(A(t))];!c&&a&&(c=r[s=ue(ce(t))]),c&&B(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,B(l,e,6,i)}}var si=new WeakMap;function ci(e,t,n=!1){let r=n?si:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!w(e)){let r=e=>{let n=ci(e,t,!0);n&&(s=!0,g(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(D(e)&&r.set(e,null),null):(b(a)?a.forEach(e=>o[e]=null):g(o,a),D(e)&&r.set(e,o),o)}function li(e,t){return!e||!m(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),y(e,t[0].toLowerCase()+t.slice(1))||y(e,ce(t))||y(e,t))}function ui(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:g}=e,_=Bn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=X(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;v=X(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:di(s)}}catch(t){Xi.length=0,Cn(t,e,1),v=Y(Ji)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(h)&&(y=fi(y,a)),b=ua(b,y,!1,!0))}return n.dirs&&(b=ua(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&rr(b,n.transition),v=b,Bn(_),v}var di=e=>{let t;for(let n in e)(n===`class`||n===`style`||m(n))&&((t||={})[n]=e[n]);return t},fi=(e,t)=>{let n={};for(let r in e)(!h(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function pi(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?mi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(_i),yi=e=>Object.getPrototypeOf(e)===_i;function bi(e,t,n,r=!1){let i={},a=vi();e.propsDefaults=Object.create(null),Si(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Ut(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function xi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=R(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{c=!0;let[n,r]=Ti(e,t,!0);g(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return D(e)&&r.set(e,d),d;if(b(a))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Oi=e=>b(e)?e.map(X):[X(e)],ki=(e,t,n)=>{if(t._n)return t;let r=Vn((...e)=>Oi(t(...e)),n);return r._c=!1,r},Ai=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Di(n))continue;let i=e[n];if(w(i))t[n]=ki(n,i,r);else if(i!=null){let e=Oi(i);t[n]=()=>e}}},ji=(e,t)=>{let n=Oi(t);e.slots.default=()=>n},Mi=(e,t,n)=>{for(let r in t)(n||!Di(r))&&(e[r]=t[r])},Ni=(e,t,n)=>{let r=e.slots=vi();if(e.vnode.shapeFlag&32){let e=t._;e?(Mi(r,t,n),n&&fe(r,`_`,e,!0)):Ai(t,r)}else t&&ji(e,t)},Pi=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=u;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:Mi(i,t,n):(a=!t.$stable,Ai(t,i)),o=t}else t&&(ji(e,t),o={default:1});if(a)for(let e in i)!Di(e)&&o[e]==null&&delete i[e]},G=Ki;function Fi(e){return Ii(e)}function Ii(e,t){let n=he();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=f,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!aa(e,t)&&(r=_e(e),j(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case qi:y(e,t,n,r);break;case Ji:b(e,t,n,r);break;case Yi:e??x(t,n,r,o);break;case K:ne(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?re(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,be)}u!=null&&i?sr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&sr(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),i(e),e=n;i(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ee(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,i,s,c,l,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=o(e.type,c,m&&m.is,m),h&8?p(d,e.children):h&16&&D(e.children,d,null,i,s,Li(e,c),l,u),_&&Un(e,null,i,`created`),E(d,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!ae(e)&&a(d,e,null,m[e],c,i);`value`in m&&a(d,`value`,null,m.value,c),(f=m.onVnodeBeforeMount)&&Z(f,i,e)}_&&Un(e,null,i,`beforeMount`);let v=zi(s,g);v&&g.beforeEnter(d),r(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&G(()=>{try{f&&Z(f,i,e),v&&g.enter(d),_&&Un(e,null,i,`mounted`)}finally{}},s)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let m=e.props||u,h=t.props||u,g;if(n&&Ri(n,!1),(g=h.onVnodeBeforeUpdate)&&Z(g,n,t,e),f&&Un(t,e,n,`beforeUpdate`),n&&Ri(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(l=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(c,``),d?te(e.dynamicChildren,d,c,n,r,Li(t,i),o):s||se(e,t,c,null,n,r,Li(t,i),o,!1),l>0){if(l&16)O(c,m,h,n,i);else if(l&2&&m.class!==h.class&&a(c,`class`,null,h.class,i),l&4&&a(c,`style`,m.style,h.style,i),l&8){let e=t.dynamicProps;for(let t=0;t{g&&Z(g,n,t,e),f&&Un(t,e,n,`updated`)},r)},te=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==u)for(let o in t)!ae(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(ae(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},ne=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),D(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(te(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&Bi(e,t,!0)):se(e,t,n,f,a,o,c,l,u)},re=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ie(t,n,r,i,a,o,c):k(e,t,c)},ie=(e,t,n,r,i,a,o)=>{let s=e.component=va(e,r,i);if(ur(e)&&(s.ctx.renderer=be),Ea(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,oe,o),!e.el){let r=s.subTree=Y(Ji);b(null,r,t,n),e.placeholder=r.el}}else oe(s,e,t,n,i,a,o)},k=(e,t,n)=>{let r=t.component=e.component;if(pi(e,t,n))if(r.asyncDep&&!r.asyncResolved){A(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},oe=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Hi(e);if(n){t&&(t.el=c.el,A(e,t,o)),n.asyncDep.then(()=>{G(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Ri(e,!1),t?(t.el=c.el,A(e,t,o)):t=c,n&&de(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Z(d,s,t,c),Ri(e,!0);let f=ui(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),_e(p),e,i,a),t.el=f.el,u===null&&gi(e,f.el),r&&G(r,i),(d=t.props&&t.props.onVnodeUpdated)&&G(()=>Z(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=lr(t);if(Ri(e,!1),l&&de(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Z(o,d,t),Ri(e,!0),s&&Se){let t=()=>{e.subTree=ui(e),Se(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=ui(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&G(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;G(()=>Z(o,d,e),i)}(t.shapeFlag&256||d&&lr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&G(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Fe(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Mn(u),Ri(e,!0),l()},A=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,xi(e,t.props,r,n),Pi(e,t.children,n),Ye(),Fn(e),Xe()},se=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){le(l,d,n,r,i,a,o,s,c);return}else if(f&256){ce(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&ge(l,i,a),d!==l&&p(n,d)):u&16?m&16?le(l,d,n,r,i,a,o,s,c):ge(l,i,a,!0):(u&8&&p(n,``),m&16&&D(d,n,r,i,a,o,s,c))},ce=(e,t,n,r,i,a,o,s,c)=>{e||=d,t||=d;let l=e.length,u=t.length,f=Math.min(l,u),p;for(p=0;pu?ge(e,i,a,!0,!1,f):D(t,n,r,i,a,o,s,c,f)},le=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,f=e.length-1,p=u-1;for(;l<=f&&l<=p;){let r=e[l],u=t[l]=c?pa(t[l]):X(t[l]);if(aa(r,u))v(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=f&&l<=p;){let r=e[f],l=t[p]=c?pa(t[p]):X(t[p]);if(aa(r,l))v(r,l,n,null,i,a,o,s,c);else break;f--,p--}if(l>f){if(l<=p){let e=p+1,d=ep)for(;l<=f;)j(e[l],i,a,!0),l++;else{let m=l,h=l,g=new Map;for(l=h;l<=p;l++){let e=t[l]=c?pa(t[l]):X(t[l]);e.key!=null&&g.set(e.key,l)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(l=0;l=b){j(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&aa(r,t[_])){u=_;break}u===void 0?j(r,i,a,!0):(C[u-h]=l+1,u>=S?S=u:x=!0,v(r,t[u],n,null,i,a,o,s,c),y++)}let w=x?Vi(C):d;for(_=w.length-1,l=b-1;l>=0;l--){let e=h+l,d=t[e],f=t[e+1],p=e+1{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){ue(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,be);return}if(c===K){r(s,t,n);for(let e=0;el.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[nr];s._isLeaving&&s[nr](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},j=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(Ye(),sr(s,null,n,e,!0),Xe()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!lr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Z(_,t,e),u&6)me(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Un(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,be,r):l&&!l.hasOnce&&(a!==K||d>0&&d&64)?ge(l,t,n,!1,!0):(a===K&&d&384||!i&&u&16)&&ge(c,t,n),r&&fe(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&G(()=>{_&&Z(_,t,e),h&&Un(e,null,t,`unmounted`),v&&(e.el=null)},n)},fe=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===K){pe(n,r);return}if(t===Yi){C(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},pe=(e,t)=>{let n;for(;e!==t;)n=h(e),i(e),e=n;i(t)},me=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ui(c),Ui(l),r&&de(r),i.stop(),a&&(a.flags|=8,j(o,e,t,n)),s&&G(s,t),G(()=>{e.isUnmounted=!0},t)},ge=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return _e(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[er];return n?h(n):t},ve=!1,ye=(e,t,n)=>{let r;e==null?t._vnode&&(j(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ve||=(ve=!0,Fn(r),In(),!1)},be={p:v,um:j,m:ue,r:fe,mt:ie,mc:D,pc:se,pbc:te,n:_e,o:e},xe,Se;return t&&([xe,Se]=t(be)),{render:ye,hydrate:xe,createApp:ni(ye,xe)}}function Li({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Ri({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function zi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Bi(e,t,n=!1){let r=e.children,i=t.children;if(b(r)&&b(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Hi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hi(t)}function Ui(e){if(e)for(let t=0;te.__isSuspense;function Ki(e,t){t&&t.pendingBranch?b(e)?t.effects.push(...e):t.effects.push(e):Pn(e)}var K=Symbol.for(`v-fgt`),qi=Symbol.for(`v-txt`),Ji=Symbol.for(`v-cmt`),Yi=Symbol.for(`v-stc`),Xi=[],q=null;function Zi(e=!1){Xi.push(q=e?null:[])}function Qi(){Xi.pop(),q=Xi[Xi.length-1]||null}var $i=1;function ea(e,t=!1){$i+=e,e<0&&q&&t&&(q.hasOnce=!0)}function ta(e){return e.dynamicChildren=$i>0?q||d:null,Qi(),$i>0&&q&&q.push(e),e}function na(e,t,n,r,i,a){return ta(J(e,t,n,r,i,a,!0))}function ra(e,t,n,r,i){return ta(Y(e,t,n,r,i,!0))}function ia(e){return e?e.__v_isVNode===!0:!1}function aa(e,t){return e.type===t.type&&e.key===t.key}var oa=({key:e})=>e??null,sa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:T(e)||z(e)||w(e)?{i:U,r:e,k:t,f:!!n}:e);function J(e,t=null,n=null,r=0,i=null,a=e===K?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&oa(t),ref:t&&sa(t),scopeId:zn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:U};return s?(ma(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=T(n)?8:16),$i>0&&!o&&q&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&q.push(c),c}var Y=ca;function ca(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Or)&&(e=Ji),ia(e)){let r=ua(e,t,!0);return n&&ma(r,n),$i>0&&!a&&q&&(r.shapeFlag&6?q[q.indexOf(e)]=r:q.push(r)),r.patchFlag=-2,r}if(Ia(e)&&(e=e.__vccOpts),t){t=la(t);let{class:e,style:n}=t;e&&!T(e)&&(t.class=xe(e)),D(n)&&(Yt(n)&&!b(n)&&(n=g({},n)),t.style=ge(n))}let o=T(e)?1:Gi(e)?128:tr(e)?64:D(e)?4:w(e)?2:0;return J(e,t,n,r,i,o,a,!0)}function la(e){return e?Yt(e)||yi(e)?g({},e):e:null}function ua(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?ha(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&oa(l),ref:t&&t.ref?n&&a?b(a)?a.concat(sa(t)):[a,sa(t)]:sa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==K?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ua(e.ssContent),ssFallback:e.ssFallback&&ua(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&rr(u,c.clone(u)),u}function da(e=` `,t=0){return Y(qi,null,e,t)}function fa(e=``,t=!1){return t?(Zi(),ra(Ji,null,e)):Y(Ji,null,e)}function X(e){return e==null||typeof e==`boolean`?Y(Ji):b(e)?Y(K,null,e.slice()):ia(e)?pa(e):Y(qi,null,String(e))}function pa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ua(e)}function ma(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(b(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),ma(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!yi(t)?t._ctx=U:r===3&&U&&(U.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(w(t)){if(r&65){ma(e,{default:t});return}t={default:t,_ctx:U},n=32}else t=String(t),r&64?(n=16,t=[da(t)]):n=8;e.children=t,e.shapeFlag|=n}function ha(...e){let t={};for(let n=0;nQ||U,ba,xa;{let e=he(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};ba=t(`__VUE_INSTANCE_SETTERS__`,e=>Q=e),xa=t(`__VUE_SSR_SETTERS__`,e=>Ta=e)}var Sa=e=>{let t=Q;return ba(e),e.scope.on(),()=>{e.scope.off(),ba(t)}},Ca=()=>{Q&&Q.scope.off(),ba(null)};function wa(e){return e.vnode.shapeFlag&4}var Ta=!1;function Ea(e,t=!1,n=!1){t&&xa(t);let{props:r,children:i}=e.vnode,a=wa(e);bi(e,r,a,t),Ni(e,i,n||t);let o=a?Da(e,t):void 0;return t&&xa(!1),o}function Da(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Lr);let{setup:r}=n;if(r){Ye();let n=e.setupContext=r.length>1?Na(e):null,i=Sa(e),a=Sn(r,e,0,[e.props,n]),o=ee(a);if(Xe(),i(),(o||e.sp)&&!lr(e)&&ir(e),o){if(a.then(Ca,Ca),t)return a.then(n=>{Oa(e,n,t)}).catch(t=>{Cn(t,e,0)});e.asyncDep=a}else Oa(e,a,t)}else ja(e,t)}function Oa(e,t,n){w(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:D(t)&&(e.setupState=sn(t)),ja(e,n)}var ka,Aa;function ja(e,t,n){let r=e.type;if(!e.render){if(!t&&ka&&!r.render){let t=r.template||Gr(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=ka(t,g(g({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||f,Aa&&Aa(e)}{let t=Sa(e);Ye();try{Vr(e)}finally{Xe(),t()}}}var Ma={get(e,t){return F(e,`get`,``),e[t]}};function Na(e){return{attrs:new Proxy(e.attrs,Ma),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Pa(e){return e.exposed?e.exposeProxy||=new Proxy(sn(Xt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Fr)return Fr[n](e)},has(e,t){return t in e||t in Fr}}):e.proxy}function Fa(e,t=!0){return w(e)?e.displayName||e.name:e.name||t&&e.__name}function Ia(e){return w(e)&&`__vccOpts`in e}var La=(e,t)=>hn(e,t,Ta),Ra=`3.5.40`,za=void 0,Ba=typeof window<`u`&&window.trustedTypes;if(Ba)try{za=Ba.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Va=za?e=>za.createHTML(e):e=>e,Ha=`http://www.w3.org/2000/svg`,Ua=`http://www.w3.org/1998/Math/MathML`,Wa=typeof document<`u`?document:null,Ga=Wa&&Wa.createElement(`template`),Ka={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Wa.createElementNS(Ha,e):t===`mathml`?Wa.createElementNS(Ua,e):n?Wa.createElement(e,{is:n}):Wa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Wa.createTextNode(e),createComment:e=>Wa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Wa.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Ga.innerHTML=Va(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=Ga.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},qa=Symbol(`_vtc`);function Ja(e,t,n){let r=e[qa];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Ya=Symbol(`_vod`),Xa=Symbol(`_vsh`),Za=Symbol(``),Qa=/(?:^|;)\s*display\s*:/;function $a(e,t,n){let r=e.style,i=T(n),a=!1;if(n&&!i){if(t)if(T(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??to(r,t,``)}else for(let e in t)n[e]??to(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?to(r,i,``):ao(e,i,!T(t)&&t?t[i]:void 0,o)||to(r,i,o)}}else if(i){if(t!==n){let e=r[Za];e&&(n+=`;`+e),r.cssText=n,a=Qa.test(n)}}else t&&e.removeAttribute(`style`);Ya in e&&(e[Ya]=a?r.display:``,e[Xa]&&(r.display=`none`))}var eo=/\s*!important$/;function to(e,t,n){if(b(n))n.forEach(n=>to(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=io(e,t);eo.test(n)?e.setProperty(ce(r),n.replace(eo,``),`important`):e[r]=n}}var no=[`Webkit`,`Moz`,`ms`],ro={};function io(e,t){let n=ro[t];if(n)return n;let r=A(t);if(r!==`filter`&&r in e)return ro[t]=r;r=le(r);for(let n=0;n_o||=(vo.then(()=>_o=0),Date.now());function bo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(b(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,So=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ja(e,r,o):t===`style`?$a(e,n,r):m(t)?h(t)||po(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):Co(e,t,r,o))?(co(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&so(e,t,r,o,a,t!==`value`)):e._isVueCE&&(wo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!T(r)))?co(e,A(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),so(e,t,r,o))};function Co(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&xo(t)&&w(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return xo(t)&&T(n)?!1:t in e}function wo(e,t){let n=e._def.props;if(!n)return!1;let r=A(t);return Array.isArray(n)?n.some(e=>A(e)===r):Object.keys(n).some(e=>A(e)===r)}var To=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return b(t)?e=>de(t,e):t};function Eo(e){e.target.composing=!0}function Do(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Oo=Symbol(`_assign`);function ko(e,t,n){return t&&(e=e.trim()),n&&(e=pe(e)),e}var Ao={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Oo]=To(i);let a=r||i.props&&i.props.type===`number`;lo(e,t?`change`:`input`,t=>{t.target.composing||e[Oo](ko(e.value,n,a))}),(n||a)&&lo(e,`change`,()=>{e.value=ko(e.value,n,a)}),t||(lo(e,`compositionstart`,Eo),lo(e,`compositionend`,Do),lo(e,`change`,Do))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Oo]=To(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?pe(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},jo=g({patchProp:So},Ka),Mo;function No(){return Mo||=Fi(jo)}var Po=((...e)=>{let t=No().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Io(e);if(!r)return;let i=t._component;!w(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Fo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Fo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Io(e){return T(e)?document.querySelector(e):e}function Lo(e,t){return Me()?(Ne(e,t),!0):!1}var Ro=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var zo=Object.prototype.toString,Bo=e=>zo.call(e)===`[object Object]`,Vo=()=>{};function Ho(...e){if(e.length!==1)return fn(...e);let t=e[0];return typeof t==`function`?Wt(ln(()=>({get:t,set:Vo}))):$t(t)}function Uo(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var Wo=e=>e();function Go(e=Wo,t={}){let{initialState:n=`active`}=t,r=Ho(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:Gt(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function Ko(e){return Array.isArray(e)?e:[e]}function qo(e){return e||ya()}function Jo(e,t,n={}){let{eventFilter:r=Wo,...i}=n;return Xn(e,Uo(r,t),i)}function Yo(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=Go(r,{initialState:i});return{stop:Jo(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function Xo(e,t=!0,n){qo(n)?vr(e,n):t?e():An(e)}function Zo(e,t,n){return Xn(e,t,{...n,immediate:!0})}var Qo=Ro?window:void 0;Ro&&window.document,Ro&&window.navigator,Ro&&window.location;function $o(e){let t=an(e);return t?.$el??t}function es(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=La(()=>{let t=Ko(an(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return Zo(()=>[n.value?.map(e=>$o(e))??[Qo].filter(e=>e!=null),Ko(an(n.value?e[1]:e[0])),Ko(rn(n.value?e[2]:e[1])),an(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=Bo(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function ts(){let e=en(!1),t=ya();return t&&vr(()=>{e.value=!0},t),e}function ns(e){let t=ts();return La(()=>(t.value,!!e()))}var rs=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},is=`__vueuse_ssr_handlers__`,as=os();function os(){return is in rs||(rs[is]=rs[is]||{}),rs[is]}function ss(e,t){return as[e]||t}function cs(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var ls={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},us=`vueuse-storage`;function ds(e,t,n,r={}){let{flush:i=`pre`,deep:a=!0,listenToStorageChanges:o=!0,writeDefaults:s=!0,mergeDefaults:c=!1,shallow:l,window:u=Qo,eventFilter:d,onError:f=e=>{console.error(e)},initOnMounted:p}=r,m=(l?en:$t)(typeof t==`function`?t():t),h=La(()=>an(e));if(!n)try{n=ss(`getDefaultStorage`,()=>Qo?.localStorage)()}catch(e){f(e)}if(!n)return m;let g=an(t),_=cs(g),v=r.serializer??ls[_],{pause:y,resume:b}=Yo(m,e=>C(e),{flush:i,deep:a,eventFilter:d});Xn(h,()=>T(),{flush:i});let x=!1;u&&o&&(n instanceof Storage?es(u,`storage`,e=>{p&&!x||T(e)},{passive:!0}):es(u,us,e=>{p&&!x||E(e)})),p?Xo(()=>{x=!0,T()}):T();function S(e,t){if(u){let r={key:h.value,oldValue:e,newValue:t,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(us,{detail:r}))}}function C(e){try{let t=n.getItem(h.value);if(e==null)S(t,null),n.removeItem(h.value);else{let r=v.write(e);t!==r&&(n.setItem(h.value,r),S(t,r))}}catch(e){f(e)}}function w(e){let t=e?e.newValue:n.getItem(h.value);if(t==null)return s&&g!=null&&n.setItem(h.value,v.write(g)),g;if(!e&&c){let e=v.read(t);return typeof c==`function`?c(e,g):_===`object`&&!Array.isArray(e)?{...g,...e}:e}else if(typeof t!=`string`)return t;else return v.read(t)}function T(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){m.value=g;return}if(!(e&&e.key!==h.value)){y();try{let t=v.write(m.value);(e===void 0||e?.newValue!==t)&&(m.value=w(e))}catch(e){f(e)}finally{e?An(b):b()}}}}function E(e){T(e.detail)}return m}function fs(e,t,n={}){let{window:r=Qo,...i}=n,a,o=ns(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=Xn(La(()=>{let t=an(e);return Array.isArray(t)?t.map(e=>$o(e)):[$o(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return Lo(l),{isSupported:o,stop:l}}function ps(e,t={width:0,height:0},n={}){let{window:r=Qo,box:i=`content-box`}=n,a=La(()=>{var t;return(t=$o(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),o=en(t.width),s=en(t.height),{stop:c}=fs(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=$o(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=Ko(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);Xo(()=>{let n=$o(e);if(n&&`offsetWidth`in n)if(i===`content-box`&&r){let e=r.getComputedStyle(n),t=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),i=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),c=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);o.value=n.offsetWidth-t-a,s.value=n.offsetHeight-i-c}else o.value=n.offsetWidth,s.value=n.offsetHeight;else n&&(o.value=t.width,s.value=t.height)});let l=Xn(()=>$o(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}var ms=Math.sqrt(3),hs=Math.sqrt(5),gs=.5*(ms-1),_s=(3-ms)/6;(hs-1)/4,(5-hs)/20;var vs=e=>Math.floor(e)|0,ys=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]);function bs(e=Math.random){let t=xs(e),n=new Float64Array(t).map(e=>ys[e%12*2]),r=new Float64Array(t).map(e=>ys[e%12*2+1]);return function(e,i){let a=0,o=0,s=0,c=(e+i)*gs,l=vs(e+c),u=vs(i+c),d=(l+u)*_s,f=l-d,p=u-d,m=e-f,h=i-p,g,_;m>h?(g=1,_=0):(g=0,_=1);let v=m-g+_s,y=h-_+_s,b=m-1+2*_s,x=h-1+2*_s,S=l&255,C=u&255,w=.5-m*m-h*h;if(w>=0){let e=S+t[C],i=n[e],o=r[e];w*=w,a=w*w*(i*m+o*h)}let T=.5-v*v-y*y;if(T>=0){let e=S+g+t[C+_],i=n[e],a=r[e];T*=T,o=T*T*(i*v+a*y)}let E=.5-b*b-x*x;if(E>=0){let e=S+1+t[C+1],i=n[e],a=r[e];E*=E,s=E*E*(i*b+a*x)}return 70*(a+o+s)}}function xs(e){let t=new Uint8Array(512);for(let e=0;e<512/2;e++)t[e]=e;for(let n=0;n<512/2-1;n++){let r=n+~~(e()*(256-n)),i=t[n];t[n]=t[r],t[r]=i}for(let e=256;e<512;e++)t[e]=t[e-256];return t}var $=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Ss(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}var Cs=new Uint8Array(16);function ws(){return crypto.getRandomValues(Cs)}function Ts(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():Es(e,t,n)}function Es(e,t,n){e||={};let r=e.random??e.rng?.()??ws();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Ss(r)}var Ds={class:`shared-range`},Os=[`min`,`max`,`step`],ks={__name:`Range`,props:zr({label:String,min:{type:Number,default:0},max:{type:Number,default:1},step:{type:Number,default:.1}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ii(e,`modelValue`);return(n,r)=>(Zi(),na(`div`,Ds,[J(`label`,null,[J(`span`,null,Oe(e.label),1),J(`span`,null,Oe(t.value),1)]),Hn(J(`input`,{type:`range`,"onUpdate:modelValue":r[0]||=e=>t.value=e,min:e.min,max:e.max,step:e.step},null,8,Os),[[Ao,t.value,void 0,{number:!0}]])]))}},As={key:0,class:`leading-icon`},js={class:`text`},Ms={key:1,class:`arrow`},Ns={__name:`Btn`,props:{tag:{type:String,default:()=>`button`},arrow:{type:Boolean,default:()=>!1},loading:{type:Boolean,default:()=>!1}},setup(e){return(t,n)=>(Zi(),ra(kr(e.tag),{class:`btn`},{default:Vn(()=>[e.arrow?(Zi(),na(`span`,As,`→`)):fa(``,!0),J(`span`,js,[J(`span`,null,[Mr(t.$slots,`default`)]),J(`span`,null,[Mr(t.$slots,`default`)])]),e.arrow?(Zi(),na(`span`,Ms,`→`)):fa(``,!0)]),_:3}))}},Ps=c(o(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=r():typeof define==`function`&&define.amd?define(r):n.Alea=r()})(e,function(){return e.importState=function(t){var n=new e;return n.importState(t),n},e;function e(){return function(e){var n=0,r=0,i=0,a=1;e.length==0&&(e=[+new Date]);var o=t();n=o(` `),r=o(` `),i=o(` `);for(var s=0;s>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26};return t.version=`Mash 0.9`,t}})}))()),Fs={class:`bonsai`},Is={class:`controls`},Ls={class:`control`},Rs={class:`control`},zs={class:`control`},Bs={class:`control`},Vs=360,Hs={__name:`Bonsai`,setup(e){let t=$t(),{width:n,height:r}=ps(t),i=ds(`bonsai-seed`,``),a=()=>{i.value=Ts()};i.value||a();let o=La(()=>bs((0,Ps.default)(i.value))),s=$t(30),c=$t(1),l=$t(.35),u=$t(.4),d=Math.PI*2/Vs,f=(e,t,n)=>{let{numR:r,spatialFreq:i,ringStep:a,mutation:o}=n,s=e*.04,c=r-1,l=Array.from({length:c},(e,n)=>.15+(t(n*.22,1.5)+1)/2*1.7),u=l.reduce((e,t)=>e+t,0),f=l.map(t=>t/u*(e-s)),p=[];p.push(Array.from({length:361},(e,n)=>{let r=n*d,a=t(Math.cos(r)*i,Math.sin(r)*i);return s*(1+a*.12)}));for(let e=1;e{let l=c*d,u=Math.cos(l),f=Math.sin(l),p=t(u*i+e*a,f*i+e*a);return n[c]+r+p*r*o}))}return{rings:p,growthAmounts:f}},p=(e,t)=>{e.beginPath();for(let n=0;n<=Vs;n++){let r=n*d,i=Math.cos(r)*t[n],a=Math.sin(r)*t[n];n===0?e.moveTo(i,a):e.lineTo(i,a)}e.closePath(),e.stroke()},m=()=>{if(!t.value||!n.value||!r.value)return;let e=t.value.getContext(`2d`),i=n.value,a=r.value;t.value.width=i,t.value.height=a;let d=Math.min(i,a)*.46;e.translate(i/2,a/2);let{rings:m,growthAmounts:h}=f(d,o.value,{numR:s.value,spatialFreq:c.value,ringStep:l.value,mutation:u.value}),g=Math.min(...h),_=Math.max(...h)-g||1;m.forEach((t,n)=>{let r=(h[Math.max(0,n-1)]-g)/_;e.strokeStyle=`#000`,e.lineWidth=.8+r*1.4,p(e,t)})};return vr(()=>{Jn(m)}),(e,n)=>(Zi(),na(`div`,Fs,[J(`canvas`,{ref_key:`canvas`,ref:t},null,512),J(`div`,Is,[J(`div`,Ls,[Y(ks,{modelValue:s.value,"onUpdate:modelValue":n[0]||=e=>s.value=e,label:`Rings`,min:2,max:80,step:1},null,8,[`modelValue`])]),J(`div`,Rs,[Y(ks,{modelValue:c.value,"onUpdate:modelValue":n[1]||=e=>c.value=e,label:`Noise`,min:.1,max:2},null,8,[`modelValue`])]),J(`div`,zs,[Y(ks,{modelValue:l.value,"onUpdate:modelValue":n[2]||=e=>l.value=e,label:`Variation`,min:0,max:1.5,step:.05},null,8,[`modelValue`])]),J(`div`,Bs,[Y(ks,{modelValue:u.value,"onUpdate:modelValue":n[3]||=e=>u.value=e,label:`Mutation`,step:.05},null,8,[`modelValue`])]),Y(Ns,{onClick:a},{default:Vn(()=>[...n[4]||=[da(`New Seed`,-1)]]),_:1})])]))}},Us={class:`drop theme-light`};Po({__name:`App`,setup(e){return(e,t)=>(Zi(),na(`main`,Us,[Y(Hs)]))}}).mount(`#app`); \ No newline at end of file diff --git a/app/public/drops/bonsai/index.html b/app/public/drops/bonsai/index.html index 1b1551f..08bf7b1 100644 --- a/app/public/drops/bonsai/index.html +++ b/app/public/drops/bonsai/index.html @@ -5,8 +5,8 @@ Bonsai - - + +
diff --git a/app/public/drops/image-melody/assets/index-Dk6TxSdE.css b/app/public/drops/image-melody/assets/index-BfScccQB.css similarity index 68% rename from app/public/drops/image-melody/assets/index-Dk6TxSdE.css rename to app/public/drops/image-melody/assets/index-BfScccQB.css index 2bce1d1..88799af 100644 --- a/app/public/drops/image-melody/assets/index-Dk6TxSdE.css +++ b/app/public/drops/image-melody/assets/index-BfScccQB.css @@ -1 +1 @@ -:root{--ivory:#fefdfc;--ivory-shade:#ecebea;--sand:#f7f4ef;--sand-shade:#b9b7b3;--charcoal:#181818;--charcoal-shade:#2a2a2a;--forest:#053f0a;--forest-shade:#f6fff6;--clay:#fa3812;--clay-shade:#ffefec;--sea:#1253fa;--sea-shade:#f0f8ff;--grey-700:#565656;--grey-600:#747474;--grey-500:#a3a3a3;--grey-400:#d1d1d1}:root .theme-light{--theme-bg:#fefdfc;--theme-fg:#181818;--theme-layout:#f7f4ef;--theme-grey:#747474;--theme-shade:#ecebea;--theme-contrast:#fa3812}:root .theme-dark{--theme-bg:#181818;--theme-fg:#fefdfc;--theme-layout:#f7f4ef;--theme-grey:#a3a3a3;--theme-shade:#2a2a2a;--theme-contrast:#fa3812}:root{--ease-in-quad:cubic-bezier(.55, .085, .68, .53);--ease-in-cubic:cubic-bezier(.55, .055, .675, .19);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-quint:cubic-bezier(.755, .05, .855, .06);--ease-in-expo:cubic-bezier(.95, .05, .795, .035);--ease-in-circ:cubic-bezier(.6, .04, .98, .335);--ease-out-quad:cubic-bezier(.25, .46, .45, .94);--ease-out-cubic:cubic-bezier(.215, .61, .355, 1);--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-out-quint:cubic-bezier(.23, 1, .32, 1);--ease-out-expo:cubic-bezier(.19, 1, .22, 1);--ease-out-circ:cubic-bezier(.075, .82, .165, 1);--ease-in-out-quad:cubic-bezier(.455, .03, .515, .955);--ease-in-out-cubic:cubic-bezier(.645, .045, .355, 1);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--ease-in-out-quint:cubic-bezier(.86, 0, .07, 1);--ease-in-out-expo:cubic-bezier(1, 0, 0, 1);--ease-in-out-circ:cubic-bezier(.785, .135, .15, .86)}:where(:not(html,iframe,canvas,img,svg,video,audio):not(svg *,symbol *)){all:unset;display:revert}*,:before,:after{box-sizing:border-box}a,button{cursor:revert}img{max-block-size:100%;max-inline-size:100%}table{border-collapse:collapse}input,textarea{-webkit-user-select:auto}textarea{white-space:revert}meter{appearance:revert}:where(pre){all:revert}::placeholder{color:unset}::marker{content:initial}:where([hidden]){display:none}:where([contenteditable]:not([contenteditable=false])){-moz-user-modify:read-write;-webkit-user-modify:read-write;overflow-wrap:break-word;-webkit-line-break:after-white-space;-webkit-user-select:auto}:where([draggable=true]){-webkit-user-drag:element}:where(dialog:modal){all:revert}@font-face{font-family:Galapagos A;font-style:normal;font-weight:400;src:url(/drops/image-melody/assets/abc-galapagos-a-trial-C6Aj3Ara.woff2)format("woff2"),url(/drops/image-melody/assets/abc-galapagos-a-trial-D4z1ovPJ.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:normal;font-weight:400;src:url(/drops/image-melody/assets/hanken-grotesk-BB3emo1n.woff2)format("woff2"),url(/drops/image-melody/assets/hanken-grotesk-NweiADIQ.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:italic;font-weight:400;src:url(/drops/image-melody/assets/hanken-grotesk-italic-jl8TIPSn.woff2)format("woff2"),url(/drops/image-melody/assets/hanken-grotesk-italic-C_HjJa0S.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:normal;font-weight:600;src:url(/drops/image-melody/assets/hanken-grotesk-semibold-TK-BXOrb.woff2)format("woff2"),url(/drops/image-melody/assets/hanken-grotesk-semibold-vPR5A_Tb.woff)format("woff")}@font-face{font-family:Iosevka Charon Mono;font-style:normal;font-weight:700;src:url(/drops/image-melody/assets/iosevka-charon-mono-bold-1nweGISG.woff2)format("woff2"),url(/drops/image-melody/assets/iosevka-charon-mono-bold-DN5oOlAE.woff)format("woff")}:root{--font-serif:"Instrument Serif", serif;--font-sans:"Hanken Grotesk", sans-serif;--font-mono:"Iosevka Charon Mono", monospace;--layout-column-count:12;--layout-column-gap:20px;--layout-margin:20px;--layout-width:calc(100vw - (2 * var(--layout-margin)));--layout-column-width:calc(( var(--layout-width) - ((var(--layout-column-count) - 1) * var(--layout-column-gap)) ) / var(--layout-column-count))}.layout-block,.layout-grid{padding-left:var(--layout-margin);padding-right:var(--layout-margin);width:100%}.layout-grid{grid-template-columns:repeat(var(--layout-column-count), minmax(0, 1fr));grid-gap:var(--layout-column-gap);display:grid}html,html *{scrollbar-width:none!important;-ms-overflow-style:none!important}html::-webkit-scrollbar{width:0!important;height:0!important}html ::-webkit-scrollbar{width:0!important;height:0!important}:root{font-family:var(--font-sans), Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;background:var(--ivory);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{min-height:100vh;margin:0}.h1,h1{font-family:var(--font-serif);font-size:max(8vw,128px);font-style:italic;font-weight:400;line-height:1}.h2,h2{font-family:var(--font-serif);font-size:max(4vw,64px);font-style:italic;font-weight:400;line-height:1}.h3,h3{font-family:var(--font-serif);font-size:max(3vw,48px);font-style:italic;font-weight:400;line-height:1}.h4,h4{font-family:var(--font-serif);font-size:max(2vw,32px);font-style:italic;font-weight:400;line-height:1}.p,p,a,li{font-family:var(--font-sans);font-size:max(1vw,16px);font-weight:400;line-height:1.25}.label,label,button,pre{font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1}.bold{font-weight:700}#app{min-height:100vh}button{cursor:pointer}::selection{color:var(--theme-bg);background:var(--theme-fg)}::selection{color:var(--theme-bg);background:var(--theme-fg)}.btn{--t-duration:.35s;--t-ease:var(--ease-out-quad);background:var(--theme-contrast);color:var(--ivory);cursor:pointer;transition:color var(--t-duration) var(--t-ease);border-radius:max(.5vw,8px);align-items:center;padding:max(.375vw,6px) max(1vw,16px);display:inline-flex;position:relative;overflow:hidden}.btn .leading-icon{opacity:0;width:max(.625vw,10px);height:1em;transition:transform var(--t-duration) var(--t-ease), opacity var(--t-duration) var(--t-ease);align-items:center;display:flex;position:absolute;transform:translate(-100%)}.btn .text{width:100%;transition:transform var(--t-duration) var(--t-ease);display:block;position:relative;overflow:hidden}.btn .text span{transition:transform var(--t-duration) var(--t-ease);font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1;display:inline-block}.btn .text span:first-child{color:var(--ivory)}.btn .text span:last-child{color:var(--ivory);position:absolute;bottom:0;left:0;right:0;transform:translateY(105%)}.btn .arrow{transition:transform var(--t-duration) var(--t-ease), opacity var(--t-duration) var(--t-ease)}.btn .arrow:not(:only-child){margin-left:.5em}.btn .loading{align-items:center;width:max(.625vw,10px);height:1em;display:flex}.btn .loading svg{width:100%;height:auto}.btn:before{content:"";background:var(--theme-contrast);clip-path:inset(100% 0 0);transition:clip-path var(--t-duration) var(--t-ease);display:block;position:absolute;inset:-2px}.btn:hover,.btn.active,.btn.router-link-active{color:var(--ivory)}.btn:hover:before,.btn.active:before,.btn.router-link-active:before{clip-path:inset(0)}.btn:hover .text span:first-child,.btn.active .text span:first-child,.btn.router-link-active .text span:first-child{transform:translateY(-105%)}.btn:hover .text span:last-child,.btn.active .text span:last-child,.btn.router-link-active .text span:last-child{transform:none}.btn:hover.text-icon .leading-icon,.btn.active.text-icon .leading-icon,.btn.router-link-active.text-icon .leading-icon{opacity:1;transform:none}.btn:hover.text-icon .text,.btn.active.text-icon .text,.btn.router-link-active.text-icon .text{transform:translate(1.5em)}.btn:hover.text-icon .arrow,.btn.active.text-icon .arrow,.btn.router-link-active.text-icon .arrow{opacity:0;transform:translate(100%)}.btn:disabled,.btn.disabled{opacity:.16;pointer-events:none}.image-melody{flex-direction:column;justify-content:center;align-items:center;gap:max(3.125vw,50px);height:100vh;display:flex}.image-melody .drop-zone{background:var(--theme-layout);cursor:pointer;border-radius:max(.625vw,10px);justify-content:center;align-items:center;width:max(31.25vw,500px);height:max(31.25vw,500px);display:flex}.image-melody .drop-zone.active{opacity:.7}.image-melody .images{border-radius:max(.625vw,10px);grid-template-columns:1fr 1fr;display:grid;overflow:hidden}.image-melody .images canvas{background:var(--theme-layout);width:max(31.25vw,500px);height:max(31.25vw,500px)}.image-melody .images canvas:first-child{border-right:1px solid var(--theme-grey)}.image-melody .audio{text-align:center;width:max(18.75vw,300px)}.image-melody .audio .controls{justify-content:center;gap:max(.5vw,8px);display:flex}.image-melody .audio .reset{margin-top:max(1vw,16px);text-decoration:underline}main.drop{background:var(--theme-bg);color:var(--theme-fg);height:100vh} +:root{--ivory:#fefdfc;--ivory-shade:#ecebea;--sand:#f7f4ef;--sand-shade:#b9b7b3;--charcoal:#181818;--charcoal-shade:#2a2a2a;--forest:#053f0a;--forest-shade:#f6fff6;--clay:#fa3812;--clay-shade:#ffefec;--sea:#1253fa;--sea-shade:#f0f8ff;--grey-700:#565656;--grey-600:#747474;--grey-500:#a3a3a3;--grey-400:#d1d1d1}:root .theme-light{--theme-bg:#fefdfc;--theme-fg:#181818;--theme-layout:#f7f4ef;--theme-grey:#747474;--theme-shade:#ecebea;--theme-contrast:#fa3812}:root .theme-dark{--theme-bg:#181818;--theme-fg:#fefdfc;--theme-layout:#f7f4ef;--theme-grey:#a3a3a3;--theme-shade:#2a2a2a;--theme-contrast:#fa3812}:root{--ease-in-quad:cubic-bezier(.55, .085, .68, .53);--ease-in-cubic:cubic-bezier(.55, .055, .675, .19);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-quint:cubic-bezier(.755, .05, .855, .06);--ease-in-expo:cubic-bezier(.95, .05, .795, .035);--ease-in-circ:cubic-bezier(.6, .04, .98, .335);--ease-out-quad:cubic-bezier(.25, .46, .45, .94);--ease-out-cubic:cubic-bezier(.215, .61, .355, 1);--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-out-quint:cubic-bezier(.23, 1, .32, 1);--ease-out-expo:cubic-bezier(.19, 1, .22, 1);--ease-out-circ:cubic-bezier(.075, .82, .165, 1);--ease-in-out-quad:cubic-bezier(.455, .03, .515, .955);--ease-in-out-cubic:cubic-bezier(.645, .045, .355, 1);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--ease-in-out-quint:cubic-bezier(.86, 0, .07, 1);--ease-in-out-expo:cubic-bezier(1, 0, 0, 1);--ease-in-out-circ:cubic-bezier(.785, .135, .15, .86)}:where(:not(html,iframe,canvas,img,svg,video,audio):not(svg *,symbol *)){all:unset;display:revert}*,:before,:after{box-sizing:border-box}a,button{cursor:revert}img{max-block-size:100%;max-inline-size:100%}table{border-collapse:collapse}input,textarea{-webkit-user-select:auto}textarea{white-space:revert}meter{appearance:revert}:where(pre){all:revert}::placeholder{color:unset}::marker{content:initial}:where([hidden]){display:none}:where([contenteditable]:not([contenteditable=false])){-moz-user-modify:read-write;-webkit-user-modify:read-write;overflow-wrap:break-word;-webkit-line-break:after-white-space;-webkit-user-select:auto}:where([draggable=true]){-webkit-user-drag:element}:where(dialog:modal){all:revert}@font-face{font-family:Galapagos A;font-style:normal;font-weight:400;src:url(/drops/image-melody/assets/abc-galapagos-a-trial-C6Aj3Ara.woff2)format("woff2"),url(/drops/image-melody/assets/abc-galapagos-a-trial-D4z1ovPJ.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:normal;font-weight:400;src:url(/drops/image-melody/assets/hanken-grotesk-BB3emo1n.woff2)format("woff2"),url(/drops/image-melody/assets/hanken-grotesk-NweiADIQ.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:italic;font-weight:400;src:url(/drops/image-melody/assets/hanken-grotesk-italic-jl8TIPSn.woff2)format("woff2"),url(/drops/image-melody/assets/hanken-grotesk-italic-C_HjJa0S.woff)format("woff")}@font-face{font-family:Hanken Grotesk;font-style:normal;font-weight:600;src:url(/drops/image-melody/assets/hanken-grotesk-semibold-TK-BXOrb.woff2)format("woff2"),url(/drops/image-melody/assets/hanken-grotesk-semibold-vPR5A_Tb.woff)format("woff")}@font-face{font-family:Iosevka Charon Mono;font-style:normal;font-weight:700;src:url(/drops/image-melody/assets/iosevka-charon-mono-bold-1nweGISG.woff2)format("woff2"),url(/drops/image-melody/assets/iosevka-charon-mono-bold-DN5oOlAE.woff)format("woff")}:root{--font-serif:"Instrument Serif", serif;--font-sans:"Hanken Grotesk", sans-serif;--font-mono:"Iosevka Charon Mono", monospace;--layout-column-count:12;--layout-column-gap:20px;--layout-margin:20px;--layout-width:calc(100vw - (2 * var(--layout-margin)));--layout-column-width:calc(( var(--layout-width) - ((var(--layout-column-count) - 1) * var(--layout-column-gap)) ) / var(--layout-column-count))}.layout-block,.layout-grid{padding-left:var(--layout-margin);padding-right:var(--layout-margin);width:100%}.layout-grid{grid-template-columns:repeat(var(--layout-column-count), minmax(0, 1fr));grid-gap:var(--layout-column-gap);display:grid}html,html *{scrollbar-width:none!important;-ms-overflow-style:none!important}html::-webkit-scrollbar{width:0!important;height:0!important}html ::-webkit-scrollbar{width:0!important;height:0!important}:root{font-family:var(--font-sans), Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;background:var(--ivory);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{min-height:100vh;margin:0}.h1,h1{font-family:var(--font-serif);font-size:max(8vw,128px);font-style:italic;font-weight:400;line-height:1}.h2,h2{font-family:var(--font-serif);font-size:max(4vw,64px);font-style:italic;font-weight:400;line-height:1}.h3,h3{font-family:var(--font-serif);font-size:max(3vw,48px);font-style:italic;font-weight:400;line-height:1}.h4,h4{font-family:var(--font-serif);font-size:max(2vw,32px);font-style:italic;font-weight:400;line-height:1}.p,p,a,li{font-family:var(--font-sans);font-size:max(1vw,16px);font-weight:400;line-height:1.25}.label,label,button,pre{font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1}.bold{font-weight:700}#app{min-height:100vh}button{cursor:pointer}::selection{color:var(--theme-bg);background:var(--theme-fg)}::selection{color:var(--theme-bg);background:var(--theme-fg)}.btn{--t-duration:.35s;--t-ease:var(--ease-out-quad);background:var(--theme-contrast);color:var(--ivory);cursor:pointer;transition:color var(--t-duration) var(--t-ease);border-radius:max(.5vw,8px);align-items:center;padding:max(.375vw,6px) max(1vw,16px);display:inline-flex;position:relative;overflow:hidden}.btn .leading-icon{opacity:0;width:max(.625vw,10px);height:1em;transition:transform var(--t-duration) var(--t-ease), opacity var(--t-duration) var(--t-ease);align-items:center;display:flex;position:absolute;transform:translate(-100%)}.btn .text{width:100%;transition:transform var(--t-duration) var(--t-ease);display:block;position:relative;overflow:hidden}.btn .text .transition{transition:transform var(--t-duration) var(--t-ease);font-family:var(--font-mono);text-transform:uppercase;font-size:max(.875vw,14px);font-weight:700;line-height:1;display:inline-block}.btn .text .transition:first-child{color:var(--ivory)}.btn .text .transition:last-child{color:var(--ivory);position:absolute;bottom:0;left:0;right:0;transform:translateY(105%)}.btn .arrow{transition:transform var(--t-duration) var(--t-ease), opacity var(--t-duration) var(--t-ease)}.btn .arrow:not(:only-child){margin-left:.5em}.btn .loading{align-items:center;width:max(.625vw,10px);height:1em;display:flex}.btn .loading svg{width:100%;height:auto}.btn:before{content:"";background:var(--theme-contrast);clip-path:inset(100% 0 0);transition:clip-path var(--t-duration) var(--t-ease);display:block;position:absolute;inset:-2px}.btn:hover,.btn.active,.btn.router-link-active{color:var(--ivory)}.btn:hover:before,.btn.active:before,.btn.router-link-active:before{clip-path:inset(0)}.btn:hover .text span:first-child,.btn.active .text span:first-child,.btn.router-link-active .text span:first-child{transform:translateY(-105%)}.btn:hover .text span:last-child,.btn.active .text span:last-child,.btn.router-link-active .text span:last-child{transform:none}.btn:hover.text-icon .leading-icon,.btn.active.text-icon .leading-icon,.btn.router-link-active.text-icon .leading-icon{opacity:1;transform:none}.btn:hover.text-icon .text,.btn.active.text-icon .text,.btn.router-link-active.text-icon .text{transform:translate(1.5em)}.btn:hover.text-icon .arrow,.btn.active.text-icon .arrow,.btn.router-link-active.text-icon .arrow{opacity:0;transform:translate(100%)}.btn:disabled,.btn.disabled{opacity:.16;pointer-events:none}.image-melody{flex-direction:column;justify-content:center;align-items:center;gap:max(3.125vw,50px);height:100vh;display:flex}.image-melody .drop-zone{background:var(--theme-layout);cursor:pointer;border-radius:max(.625vw,10px);justify-content:center;align-items:center;width:max(31.25vw,500px);height:max(31.25vw,500px);display:flex}.image-melody .drop-zone.active{opacity:.7}.image-melody .images{border-radius:max(.625vw,10px);grid-template-columns:1fr 1fr;display:grid;overflow:hidden}.image-melody .images canvas{background:var(--theme-layout);width:max(31.25vw,500px);height:max(31.25vw,500px)}.image-melody .images canvas:first-child{border-right:1px solid var(--theme-grey)}.image-melody .audio{text-align:center;width:max(18.75vw,300px)}.image-melody .audio .controls{justify-content:center;gap:max(.5vw,8px);display:flex}.image-melody .audio .reset{margin-top:max(1vw,16px);text-decoration:underline}main.drop{background:var(--theme-bg);color:var(--theme-fg);height:100vh} diff --git a/app/public/drops/image-melody/assets/index-C-dHDnAG.js b/app/public/drops/image-melody/assets/index-Bqx1iDV3.js similarity index 81% rename from app/public/drops/image-melody/assets/index-C-dHDnAG.js rename to app/public/drops/image-melody/assets/index-Bqx1iDV3.js index 7c17472..055cd28 100644 --- a/app/public/drops/image-melody/assets/index-C-dHDnAG.js +++ b/app/public/drops/image-melody/assets/index-Bqx1iDV3.js @@ -1,7 +1,7 @@ -var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function t(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var n={},r=[],i=()=>{},a=()=>!1,o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith(`onUpdate:`),c=Object.assign,l=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>S(e)===`[object Map]`,m=e=>S(e)===`[object Set]`,h=e=>S(e)===`[object Date]`,g=e=>typeof e==`function`,_=e=>typeof e==`string`,v=e=>typeof e==`symbol`,y=e=>typeof e==`object`&&!!e,b=e=>(y(e)||g(e))&&g(e.then)&&g(e.catch),x=Object.prototype.toString,S=e=>x.call(e),C=e=>S(e).slice(8,-1),w=e=>S(e)===`[object Object]`,T=e=>_(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,E=t(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),D=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},O=/-\w/g,k=D(e=>e.replace(O,e=>e.slice(1).toUpperCase())),ee=/\B([A-Z])/g,te=D(e=>e.replace(ee,`-$1`).toLowerCase()),ne=D(e=>e.charAt(0).toUpperCase()+e.slice(1)),re=D(e=>e?`on${ne(e)}`:``),A=(e,t)=>!Object.is(e,t),j=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},M=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ae=e=>{let t=_(e)?Number(e):NaN;return isNaN(t)?e:t},oe,se=()=>oe||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function N(e){if(f(e)){let t={};for(let n=0;n{if(e){let n=e.split(le);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function fe(e){let t=``;if(_(e))t=e;else if(f(e))for(let n=0;n0&&--this._on===0){if(P===this)P=this.prevScope;else{let e=P;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Te){let e=Te;for(Te=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;we;){let t=we;for(we=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function ke(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ae(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ne(r),Pe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function je(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Me(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Me(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Be)||(e.globalVersion=Be,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!je(e))))return;e.flags|=2;let t=e.dep,n=F,r=Fe;F=e,Fe=!0;try{ke(e);let n=e.fn(e._value);(t.version===0||A(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{F=n,Fe=r,Ae(e),e.flags&=-3}}function Ne(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ne(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Pe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Fe=!0,Ie=[];function Le(){Ie.push(Fe),Fe=!1}function Re(){let e=Ie.pop();Fe=e===void 0||e}function ze(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=F;F=void 0;try{t()}finally{F=e}}}var Be=0,Ve=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},He=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!F||!Fe||F===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==F)t=this.activeLink=new Ve(F,this),F.deps?(t.prevDep=F.depsTail,F.depsTail.nextDep=t,F.depsTail=t):F.deps=F.depsTail=t,Ue(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=F.depsTail,t.nextDep=void 0,F.depsTail.nextDep=t,F.depsTail=t,F.deps===t&&(F.deps=e)}return t}trigger(e){this.version++,Be++,this.notify(e)}notify(e){De();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Oe()}}};function Ue(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ue(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var We=new WeakMap,Ge=Symbol(``),Ke=Symbol(``),qe=Symbol(``);function Je(e,t,n){if(Fe&&F){let t=We.get(e);t||We.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new He),r.map=t,r.key=n),r.track()}}function Ye(e,t,n,r,i,a){let o=We.get(e);if(!o){Be++;return}let s=e=>{e&&e.trigger()};if(De(),t===`clear`)o.forEach(s);else{let i=f(e),a=i&&T(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===qe||!v(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(qe)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ge)),p(e)&&s(o.get(Ke)));break;case`delete`:i||(s(o.get(Ge)),p(e)&&s(o.get(Ke)));break;case`set`:p(e)&&s(o.get(Ge));break}}Oe()}function Xe(e){let t=I(e);return t===e?t:(Je(t,`iterate`,qe),Ft(e)?t:t.map(Rt))}function Ze(e){return Je(e=I(e),`iterate`,qe),e}function Qe(e,t){return Pt(e)?zt(Nt(e)?Rt(t):t):Rt(t)}var $e={__proto__:null,[Symbol.iterator](){return et(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Xe(this).concat(...e.map(e=>f(e)?Xe(e):e))},entries(){return et(this,`entries`,e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return nt(this,`every`,e,t,void 0,arguments)},filter(e,t){return nt(this,`filter`,e,t,e=>e.map(e=>Qe(this,e)),arguments)},find(e,t){return nt(this,`find`,e,t,e=>Qe(this,e),arguments)},findIndex(e,t){return nt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return nt(this,`findLast`,e,t,e=>Qe(this,e),arguments)},findLastIndex(e,t){return nt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return nt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return it(this,`includes`,e)},indexOf(...e){return it(this,`indexOf`,e)},join(e){return Xe(this).join(e)},lastIndexOf(...e){return it(this,`lastIndexOf`,e)},map(e,t){return nt(this,`map`,e,t,void 0,arguments)},pop(){return at(this,`pop`)},push(...e){return at(this,`push`,e)},reduce(e,...t){return rt(this,`reduce`,e,t)},reduceRight(e,...t){return rt(this,`reduceRight`,e,t)},shift(){return at(this,`shift`)},some(e,t){return nt(this,`some`,e,t,void 0,arguments)},splice(...e){return at(this,`splice`,e)},toReversed(){return Xe(this).toReversed()},toSorted(e){return Xe(this).toSorted(e)},toSpliced(...e){return Xe(this).toSpliced(...e)},unshift(...e){return at(this,`unshift`,e)},values(){return et(this,`values`,e=>Qe(this,e))}};function et(e,t,n){let r=Ze(e),i=r[t]();return r!==e&&!Ft(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var tt=Array.prototype;function nt(e,t,n,r,i,a){let o=Ze(e),s=o!==e&&!Ft(e),c=o[t];if(c!==tt[t]){let t=c.apply(e,a);return s?Rt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,Qe(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function rt(e,t,n,r){let i=Ze(e),a=i!==e&&!Ft(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=Qe(e,t)),n.call(this,t,Qe(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?Qe(e,c):c}function it(e,t,n){let r=I(e);Je(r,`iterate`,qe);let i=r[t](...n);return(i===-1||i===!1)&&It(n[0])?(n[0]=I(n[0]),r[t](...n)):i}function at(e,t,n=[]){Le(),De();let r=I(e)[t].apply(e,n);return Oe(),Re(),r}var ot=t(`__proto__,__v_isRef,__isVue`),st=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(v));function ct(e){v(e)||(e=String(e));let t=I(this);return Je(t,`has`,e),t.hasOwnProperty(e)}var lt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Dt:Et:i?Tt:wt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=f(e);if(!r){let e;if(a&&(e=$e[t]))return e;if(t===`hasOwnProperty`)return ct}let o=Reflect.get(e,t,Bt(e)?e:n);if((v(t)?st.has(t):ot(t))||(r||Je(e,`get`,t),i))return o;if(Bt(o)){let e=a&&T(t)?o:o.value;return r&&y(e)?jt(e):e}return y(o)?r?jt(o):kt(o):o}},ut=class extends lt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=f(e)&&T(t);if(!this._isShallow){let e=Pt(i);if(!Ft(n)&&!Pt(n)&&(i=I(i),n=I(n)),!a&&Bt(i)&&!Bt(n))return e||(i.value=n),!0}let o=a?Number(t)e,gt=e=>Reflect.getPrototypeOf(e);function _t(e,t,n){return function(...r){let i=this.__v_raw,a=I(i),o=p(a),s=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?ht:t?zt:Rt;return!t&&Je(a,`iterate`,l?Ke:Ge),c(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function vt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function yt(e,t){let n={get(n){let r=this.__v_raw,i=I(r),a=I(n);e||(A(n,a)&&Je(i,`get`,n),Je(i,`get`,a));let{has:o}=gt(i),s=t?ht:e?zt:Rt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&Je(I(t),`iterate`,Ge),t.size},has(t){let n=this.__v_raw,r=I(n),i=I(t);return e||(A(t,i)&&Je(r,`has`,t),Je(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=I(a),s=t?ht:e?zt:Rt;return!e&&Je(o,`iterate`,Ge),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return c(n,e?{add:vt(`add`),set:vt(`set`),delete:vt(`delete`),clear:vt(`clear`)}:{add(e){let n=I(this),r=gt(n),i=I(e),a=!t&&!Ft(e)&&!Pt(e)?i:e;return r.has.call(n,a)||A(e,a)&&r.has.call(n,e)||A(i,a)&&r.has.call(n,i)||(n.add(a),Ye(n,`add`,a,a)),this},set(e,n){!t&&!Ft(n)&&!Pt(n)&&(n=I(n));let r=I(this),{has:i,get:a}=gt(r),o=i.call(r,e);o||=(e=I(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?A(n,s)&&Ye(r,`set`,e,n,s):Ye(r,`add`,e,n),this},delete(e){let t=I(this),{has:n,get:r}=gt(t),i=n.call(t,e);i||=(e=I(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&Ye(t,`delete`,e,void 0,a),o},clear(){let e=I(this),t=e.size!==0,n=e.clear();return t&&Ye(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=_t(r,e,t)}),n}function bt(e,t){let n=yt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(d(n,r)&&r in t?n:t,r,i)}var xt={get:bt(!1,!1)},St={get:bt(!1,!0)},Ct={get:bt(!0,!1)},wt=new WeakMap,Tt=new WeakMap,Et=new WeakMap,Dt=new WeakMap;function Ot(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function kt(e){return Pt(e)?e:Mt(e,!1,ft,xt,wt)}function At(e){return Mt(e,!1,mt,St,Tt)}function jt(e){return Mt(e,!0,pt,Ct,Et)}function Mt(e,t,n,r,i){if(!y(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Ot(C(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Nt(e){return Pt(e)?Nt(e.__v_raw):!!(e&&e.__v_isReactive)}function Pt(e){return!!(e&&e.__v_isReadonly)}function Ft(e){return!!(e&&e.__v_isShallow)}function It(e){return e?!!e.__v_raw:!1}function I(e){let t=e&&e.__v_raw;return t?I(t):e}function Lt(e){return!d(e,`__v_skip`)&&Object.isExtensible(e)&&ie(e,`__v_skip`,!0),e}var Rt=e=>y(e)?kt(e):e,zt=e=>y(e)?jt(e):e;function Bt(e){return e?e.__v_isRef===!0:!1}function Vt(e){return Ut(e,!1)}function Ht(e){return Ut(e,!0)}function Ut(e,t){return Bt(e)?e:new Wt(e,t)}var Wt=class{constructor(e,t){this.dep=new He,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:I(e),this._value=t?e:Rt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Ft(e)||Pt(e);e=n?e:I(e),A(e,t)&&(this._rawValue=e,this._value=n?e:Rt(e),this.dep.trigger())}};function Gt(e){return Bt(e)?e.value:e}function Kt(e){return g(e)?e():Gt(e)}var qt={get:(e,t,n)=>t===`__v_raw`?e:Gt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return Bt(i)&&!Bt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Jt(e){return Nt(e)?e:new Proxy(e,qt)}var Yt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new He(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Be-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&F!==this)return Ee(this,!0),!0}get value(){let e=this.dep.track();return Me(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Xt(e,t,n=!1){let r,i;return g(e)?r=e:(r=e.get,i=e.set),new Yt(r,i,n)}var Zt={},Qt=new WeakMap,$t=void 0;function en(e,t=!1,n=$t){if(n){let t=Qt.get(n);t||Qt.set(n,t=[]),t.push(e)}}function tn(e,t,r=n){let{immediate:a,deep:o,once:s,scheduler:c,augmentJob:u,call:d}=r,p=e=>o?e:Ft(e)||o===!1||o===0?nn(e,1):nn(e),m,h,_,v,y=!1,b=!1;if(Bt(e)?(h=()=>e.value,y=Ft(e)):Nt(e)?(h=()=>p(e),y=!0):f(e)?(b=!0,y=e.some(e=>Nt(e)||Ft(e)),h=()=>e.map(e=>{if(Bt(e))return e.value;if(Nt(e))return p(e);if(g(e))return d?d(e,2):e()})):h=g(e)?t?d?()=>d(e,2):e:()=>{if(_){Le();try{_()}finally{Re()}}let t=$t;$t=m;try{return d?d(e,3,[v]):e(v)}finally{$t=t}}:i,t&&o){let e=h,t=o===!0?1/0:o;h=()=>nn(e(),t)}let x=ye(),S=()=>{m.stop(),x&&x.active&&l(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(Zt):Zt,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(t){let n=m.run();if(e||o||y||(b?n.some((e,t)=>A(e,C[t])):A(n,C))){_&&_();let e=$t;$t=m;try{let e=[n,C===Zt?void 0:b&&C[0]===Zt?[]:C,v];C=n,d?d(t,3,e):t(...e)}finally{$t=e}}}else m.run()};return u&&u(w),m=new Se(h),m.scheduler=c?()=>c(w,!1):w,v=e=>en(e,!1,m),_=m.onStop=()=>{let e=Qt.get(m);if(e){if(d)d(e,4);else for(let t of e)t();Qt.delete(m)}},t?a?w(!0):C=m.run():c?c(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function nn(e,t=1/0,n){if(t<=0||!y(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Bt(e))nn(e.value,t,n);else if(f(e))for(let r=0;r{nn(e,t,n)});else if(w(e)){for(let r in e)nn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&nn(e[r],t,n)}return e}function rn(e,t,n,r){try{return r?e(...r):e()}catch(e){on(e,t,n)}}function an(e,t,n,r){if(g(e)){let i=rn(e,t,n,r);return i&&b(i)&&i.catch(e=>{on(e,t,n)}),i}if(f(e)){let i=[];for(let a=0;a>>1,i=cn[r],a=Sn(i);a=Sn(n)?cn.push(e):cn.splice(gn(t),0,e),e.flags|=1,vn()}}function vn(){mn||=pn.then(Cn)}function yn(e){f(e)?un.push(...e):dn&&e.id===-1?dn.splice(fn+1,0,e):e.flags&1||(un.push(e),e.flags|=1),vn()}function bn(e,t,n=ln+1){for(;nSn(e)-Sn(t));if(un.length=0,dn){dn.push(...e);return}for(dn=e,fn=0;fne.id==null?e.flags&2?-1:1/0:e.id;function Cn(e){try{for(ln=0;ln{r._d&&ea(-1);let i=En(t),a=Yi.length,o;try{o=e(...n)}finally{for(let e=Yi.length;e>a;e--)Qi();En(i),r._d&&ea(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function On(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o1)return n&&g(t)?t.call(r&&r.proxy):t}}var jn=Symbol.for(`v-scx`),Mn=()=>An(jn);function Nn(e,t){return Fn(e,null,t)}function Pn(e,t,n){return Fn(e,t,n)}function Fn(e,t,r=n){let{immediate:a,deep:o,flush:s,once:l}=r,u=c({},r),d=t&&a||!t&&s!==`post`,f;if(ka){if(s===`sync`){let e=Mn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=i,e.resume=i,e.pause=i,e}}let p=Sa;u.call=(e,t,n)=>an(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{Mi(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():_n(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=tn(e,t,u);return ka&&(f?f.push(h):d&&h()),h}function In(e,t,n){let r=this.proxy,i=_(e)?e.includes(`.`)?Ln(r,e):()=>r[e]:e.bind(r,r),a;g(t)?a=t:(a=t.handler,n=t);let o=Ea(this),s=Fn(i,a.bind(r),n);return o(),s}function Ln(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Bn=Symbol(`_leaveCb`),Vn=Symbol(`_enterCb`);function Hn(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return hr(()=>{e.isMounted=!0}),vr(()=>{e.isUnmounting=!0}),e}var Un=[Function,Array],Wn={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Un,onEnter:Un,onAfterEnter:Un,onEnterCancelled:Un,onBeforeLeave:Un,onLeave:Un,onAfterLeave:Un,onLeaveCancelled:Un,onBeforeAppear:Un,onAppear:Un,onAfterAppear:Un,onAppearCancelled:Un},Gn=e=>{let t=e.subTree;return t.component?Gn(t.component):t},Kn={name:`BaseTransition`,props:Wn,setup(e,{slots:t}){let n=Ca(),r=Hn();return()=>{let i=t.default&&er(t.default(),!0),a=i&&i.length?qn(i):n.subTree?pa():void 0;if(!a)return;let o=I(e),{mode:s}=o;if(r.isLeaving)return Zn(a);let c=Qn(a);if(!c)return Zn(a);let l=Xn(c,o,r,n,e=>l=e);c.type!==qi&&$n(c,l);let u=n.subTree&&Qn(n.subTree);if(u&&u.type!==qi&&!aa(u,c)&&Gn(n).type!==qi){let e=Xn(u,o,r,n);if($n(u,e),s===`out-in`&&c.type!==qi)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},Zn(a);s===`in-out`&&c.type!==qi?e.delayLeave=(e,t,n)=>{let i=Yn(r,u);i[String(u.key)]=u,e[Bn]=()=>{t(),e[Bn]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function qn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==qi){t=n;break}}return t}var Jn=Kn;function Yn(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Xn(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=Yn(n,e),C=(e,t)=>{e&&an(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),f(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[Bn]&&t[Bn](!0);let i=S[x];i&&aa(e,i)&&i.el[Bn]&&i.el[Bn](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=d;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||d;else return;let s=!1;t[Vn]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[Vn]=void 0)};let c=t[Vn].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[Vn]&&t[Vn](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[Bn]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[Bn]=void 0,S[i]===e&&delete S[i])};let o=t[Bn].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=Xn(e,t,n,r,i);return i&&i(a),a}};return T}function Zn(e){if(sr(e))return e=da(e),e.children=null,e}function Qn(e){if(!sr(e))return zn(e.type)&&e.children?qn(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&g(n.default))return n.default()}}function $n(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$n(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function er(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;eir(e,t&&(f(t)?t[n]:t),r,i,o));return}if(or(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&ir(e,t,r,i.component.subTree);return}let s=i.shapeFlag&4?Ra(i.component):i.el,c=o?null:s,{i:u,r:p}=e,m=t&&t.r,h=u.refs===n?u.refs={}:u.refs,v=u.setupState,y=I(v),b=v===n?a:e=>!nr(h,e)&&d(y,e),x=(e,t)=>!(t&&nr(h,t));if(m!=null&&m!==p){if(ar(t),_(m))h[m]=null,b(m)&&(v[m]=null);else if(Bt(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(g(p))rn(p,u,12,[c,h]);else{let t=_(p),n=Bt(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:h[p]:x(p)||!e.k?p.value:h[e.k];if(o)f(n)&&l(n,s);else if(f(n))n.includes(s)||n.push(s);else if(t)h[p]=[s],b(p)&&(v[p]=h[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(h[e.k]=t)}}else t?(h[p]=c,b(p)&&(v[p]=c)):n&&(x(p,e.k)&&(p.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),rr.delete(e)};t.id=-1,rr.set(e,t),Mi(t,r)}else ar(e),i()}}}function ar(e){let t=rr.get(e);t&&(t.flags|=8,rr.delete(e))}se().requestIdleCallback,se().cancelIdleCallback;var or=e=>!!e.type.__asyncLoader,sr=e=>e.type.__isKeepAlive;function cr(e,t){ur(e,`a`,t)}function lr(e,t){ur(e,`da`,t)}function ur(e,t,n=Sa){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(fr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)sr(e.parent.vnode)&&dr(r,t,n,e),e=e.parent}}function dr(e,t,n,r){let i=fr(t,e,r,!0);yr(()=>{l(r[t],i)},n)}function fr(e,t,n=Sa,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Le();let i=Ea(n),a=an(t,n,e,r);return i(),Re(),a};return r?i.unshift(a):i.push(a),a}}var pr=e=>(t,n=Sa)=>{(!ka||e===`sp`)&&fr(e,(...e)=>t(...e),n)},mr=pr(`bm`),hr=pr(`m`),gr=pr(`bu`),_r=pr(`u`),vr=pr(`bum`),yr=pr(`um`),br=pr(`sp`),xr=pr(`rtg`),Sr=pr(`rtc`);function Cr(e,t=Sa){fr(`ec`,e,t)}var wr=`components`;function Tr(e,t){return Or(wr,e,!0,t)||e}var Er=Symbol.for(`v-ndc`);function Dr(e){return _(e)?Or(wr,e,!1)||e:e||Er}function Or(e,t,n=!0,r=!1){let i=wn||Sa;if(i){let n=i.type;if(e===wr){let e=za(n,!1);if(e&&(e===t||e===k(t)||e===ne(k(t))))return n}let a=kr(i[e]||n[e],t)||kr(i.appContext[e],t);return!a&&r?n:a}}function kr(e,t){return e&&(e[t]||e[k(t)]||e[ne(k(t))])}function Ar(e,t,n={},r,i,a){if(wn.ce||wn.parent&&or(wn.parent)&&wn.parent.ce){let e=a!=null&&n.key==null?c({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),Zi(),ra(Gi,null,[L(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=Yi.length;Zi();let l;try{let i=o&&jr(o(n)),s=n.key||a||i&&i.key;l=ra(Gi,{key:(s&&!v(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Yi.length;e>s;e--)Qi();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function jr(e){return e.some(e=>!ia(e)||!(e.type===qi||e.type===Gi&&!jr(e.children)))?e:null}var Mr=e=>e?Oa(e)?Ra(e):Mr(e.parent):null,Nr=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Mr(e.parent),$root:e=>Mr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Hr(e),$forceUpdate:e=>e.f||=()=>{_n(e.update)},$nextTick:e=>e.n||=hn.bind(e.proxy),$watch:e=>In.bind(e)}),Pr=(e,t)=>e!==n&&!e.__isScriptSetup&&d(e,t),Fr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return r[t];case 3:return o[t]}else if(Pr(i,t))return s[t]=1,i[t];else if(a!==n&&d(a,t))return s[t]=2,a[t];else if(d(o,t))return s[t]=3,o[t];else if(r!==n&&d(r,t))return s[t]=4,r[t];else Lr&&(s[t]=0)}let u=Nr[t],f,p;if(u)return t===`$attrs`&&Je(e.attrs,`get`,``),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(r!==n&&d(r,t))return s[t]=4,r[t];if(p=l.config.globalProperties,d(p,t))return p[t]},set({_:e},t,r){let{data:i,setupState:a,ctx:o}=e;return Pr(a,t)?(a[t]=r,!0):i!==n&&d(i,t)?(i[t]=r,!0):d(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==n&&c[0]!==`$`&&d(e,c)||Pr(t,c)||d(o,c)||d(i,c)||d(Nr,c)||d(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?d(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Ir(e){return f(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Lr=!0;function Rr(e){let t=Hr(e),n=e.proxy,r=e.ctx;Lr=!1,t.beforeCreate&&Br(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:p,mounted:m,beforeUpdate:h,updated:_,activated:v,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:ee,inheritAttrs:te,components:ne,directives:re,filters:A}=t;if(u&&zr(u,r,null),s)for(let e in s){let t=s[e];g(t)&&(r[e]=t.bind(n))}if(a){let t=a.call(n,n);y(t)&&(e.data=kt(t))}if(Lr=!0,o)for(let e in o){let t=o[e],a=Va({get:g(t)?t.bind(n,n):g(t.get)?t.get.bind(n,n):i,set:!g(t)&&g(t.set)?t.set.bind(n):i});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Vr(c[e],r,n,e);if(l){let e=g(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{kn(t,e[t])})}d&&Br(d,e,`c`);function j(e,t){f(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(j(mr,p),j(hr,m),j(gr,h),j(_r,_),j(cr,v),j(lr,b),j(Cr,O),j(Sr,E),j(xr,D),j(vr,S),j(yr,w),j(br,k),f(ee))if(ee.length){let t=e.exposed||={};ee.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===i&&(e.render=T),te!=null&&(e.inheritAttrs=te),ne&&(e.components=ne),re&&(e.directives=re),k&&tr(e)}function zr(e,t,n=i){f(e)&&(e=qr(e));for(let n in e){let r=e[n],i;i=y(r)?`default`in r?An(r.from||n,r.default,!0):An(r.from||n):An(r),Bt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Br(e,t,n){an(f(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Vr(e,t,n,r){let i=r.includes(`.`)?Ln(n,r):()=>n[r];if(_(e)){let n=t[e];g(n)&&Pn(i,n)}else if(g(e))Pn(i,e.bind(n));else if(y(e))if(f(e))e.forEach(e=>Vr(e,t,n,r));else{let r=g(e.handler)?e.handler.bind(n):t[e.handler];g(r)&&Pn(i,r,e)}}function Hr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Ur(c,e,o,!0)),Ur(c,t,o)),y(t)&&a.set(t,c),c}function Ur(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Ur(e,a,n,!0),i&&i.forEach(t=>Ur(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Wr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Wr={data:Gr,props:Xr,emits:Xr,methods:Yr,computed:Yr,beforeCreate:Jr,created:Jr,beforeMount:Jr,mounted:Jr,beforeUpdate:Jr,updated:Jr,beforeDestroy:Jr,beforeUnmount:Jr,destroyed:Jr,unmounted:Jr,activated:Jr,deactivated:Jr,errorCaptured:Jr,serverPrefetch:Jr,components:Yr,directives:Yr,watch:Zr,provide:Gr,inject:Kr};function Gr(e,t){return t?e?function(){return c(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function Kr(e,t){return Yr(qr(e),qr(t))}function qr(e){if(f(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${k(t)}Modifiers`]||e[`${te(t)}Modifiers`];function ri(e,t,...r){if(e.isUnmounted)return;let i=e.vnode.props||n,a=r,o=t.startsWith(`update:`),s=o&&ni(i,t.slice(7));s&&(s.trim&&(a=r.map(e=>_(e)?e.trim():e)),s.number&&(a=r.map(M)));let c,l=i[c=re(t)]||i[c=re(k(t))];!l&&o&&(l=i[c=re(te(t))]),l&&an(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,an(u,e,6,a)}}var ii=new WeakMap;function ai(e,t,n=!1){let r=n?ii:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!g(e)){let r=e=>{let n=ai(e,t,!0);n&&(s=!0,c(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(y(e)&&r.set(e,null),null):(f(a)?a.forEach(e=>o[e]=null):c(o,a),y(e)&&r.set(e,o),o)}function oi(e,t){return!e||!o(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),d(e,t[0].toLowerCase()+t.slice(1))||d(e,te(t))||d(e,t))}function si(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=En(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=ma(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=ma(e.length>1?e(f,{attrs:c,slots:o,emit:l}):e(f,null)),y=t.props?c:ci(c)}}catch(t){Yi.length=0,on(t,e,1),v=L(qi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(s)&&(y=li(y,a)),b=da(b,y,!1,!0))}return n.dirs&&(b=da(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&$n(b,n.transition),v=b,En(_),v}var ci=e=>{let t;for(let n in e)(n===`class`||n===`style`||o(n))&&((t||={})[n]=e[n]);return t},li=(e,t)=>{let n={};for(let r in e)(!s(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ui(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?di(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(mi),gi=e=>Object.getPrototypeOf(e)===mi;function _i(e,t,n,r=!1){let i={},a=hi();e.propsDefaults=Object.create(null),yi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:At(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function vi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=I(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[n,r]=Si(e,t,!0);c(l,n),r&&u.push(...r)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!s&&!p)return y(e)&&a.set(e,r),r;if(f(s))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Ti=e=>f(e)?e.map(ma):[ma(e)],Ei=(e,t,n)=>{if(t._n)return t;let r=Dn((...e)=>Ti(t(...e)),n);return r._c=!1,r},Di=(e,t,n)=>{let r=e._ctx;for(let n in e){if(wi(n))continue;let i=e[n];if(g(i))t[n]=Ei(n,i,r);else if(i!=null){let e=Ti(i);t[n]=()=>e}}},Oi=(e,t)=>{let n=Ti(t);e.slots.default=()=>n},ki=(e,t,n)=>{for(let r in t)(n||!wi(r))&&(e[r]=t[r])},Ai=(e,t,n)=>{let r=e.slots=hi();if(e.vnode.shapeFlag&32){let e=t._;e?(ki(r,t,n),n&&ie(r,`_`,e,!0)):Di(t,r)}else t&&Oi(e,t)},ji=(e,t,r)=>{let{vnode:i,slots:a}=e,o=!0,s=n;if(i.shapeFlag&32){let e=t._;e?r&&e===1?o=!1:ki(a,t,r):(o=!t.$stable,Di(t,a)),s=t}else t&&(Oi(e,t),s={default:1});if(o)for(let e in a)!wi(e)&&s[e]==null&&delete a[e]},Mi=Wi;function Ni(e){return Pi(e)}function Pi(e,t){let a=se();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=i,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!aa(e,t)&&(r=he(e),ue(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Ki:y(e,t,n,r);break;case qi:b(e,t,n,r);break;case Ji:e??x(t,n,r,o);break;case Gi:ne(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?re(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,P)}u!=null&&i?ir(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&ir(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),k(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&O(e.children,d,null,r,i,Fi(e,a),s,u),_&&On(e,null,r,`created`),D(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!E(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&va(f,r,e)}_&&On(e,null,r,`beforeMount`);let v=Li(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&Mi(()=>{try{f&&va(f,r,e),v&&g.enter(d),_&&On(e,null,r,`mounted`)}finally{}},i)},D=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||n,h=t.props||n,g;if(r&&Ii(r,!1),(g=h.onVnodeBeforeUpdate)&&va(g,r,t,e),f&&On(t,e,r,`beforeUpdate`),r&&Ii(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?ee(e.dynamicChildren,d,l,r,i,Fi(t,a),o):s||oe(e,t,l,null,r,i,Fi(t,a),o,!1),u>0){if(u&16)te(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t{g&&va(g,r,t,e),f&&On(t,e,r,`updated`)},i)},ee=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==r){if(t!==n)for(let n in t)!E(n)&&!(n in r)&&c(e,n,t[n],null,a,i);for(let n in r){if(E(n))continue;let o=r[n],s=t[n];o!==s&&n!==`value`&&c(e,n,s,o,a,i)}`value`in r&&c(e,`value`,t.value,r.value,a)}},ne=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),O(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(ee(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ri(e,t,!0)):oe(e,t,n,f,i,a,s,c,l)},re=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):A(t,n,r,i,a,o,c):ie(e,t,c)},A=(e,t,n,r,i,a,o)=>{let s=e.component=xa(e,r,i);if(sr(e)&&(s.ctx.renderer=P),Aa(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,M,o),!e.el){let r=s.subTree=L(qi);b(null,r,t,n),e.placeholder=r.el}}else M(s,e,t,n,i,a,o)},ie=(e,t,n)=>{let r=t.component=e.component;if(ui(e,t,n))if(r.asyncDep&&!r.asyncResolved){ae(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},M=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Bi(e);if(n){t&&(t.el=c.el,ae(e,t,o)),n.asyncDep.then(()=>{Mi(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Ii(e,!1),t?(t.el=c.el,ae(e,t,o)):t=c,n&&j(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&va(d,s,t,c),Ii(e,!0);let f=si(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),he(p),e,i,a),t.el=f.el,u===null&&pi(e,f.el),r&&Mi(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Mi(()=>va(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=or(t);if(Ii(e,!1),l&&j(l),!m&&(o=c&&c.onVnodeBeforeMount)&&va(o,d,t),Ii(e,!0),s&&ye){let t=()=>{e.subTree=si(e),ye(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=si(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Mi(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Mi(()=>va(o,d,e),i)}(t.shapeFlag&256||d&&or(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Mi(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Se(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>_n(u),Ii(e,!0),l()},ae=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,vi(e,t.props,r,n),ji(e,t.children,n),Le(),bn(e),Re()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ce(l,d,n,r,i,a,o,s,c);return}else if(f&256){N(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&me(l,i,a),d!==l&&p(n,d)):u&16?m&16?ce(l,d,n,r,i,a,o,s,c):me(l,i,a,!0):(u&8&&p(n,``),m&16&&O(d,n,r,i,a,o,s,c))},N=(e,t,n,i,a,o,s,c,l)=>{e||=r,t||=r;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?me(e,a,o,!0,!1,f):O(t,n,i,a,o,s,c,l,f)},ce=(e,t,n,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?ha(t[u]):ma(t[u]);if(aa(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?ha(t[p]):ma(t[p]);if(aa(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,r=ep)for(;u<=f;)ue(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ha(t[u]):ma(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){ue(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&aa(r,t[_])){i=_;break}i===void 0?ue(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let w=x?zi(C):r;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,r=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){le(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,P);return}if(c===Gi){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Bn];a._isLeaving&&a[Bn](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},ue=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(Le(),ir(s,null,n,e,!0),Re()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!or(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&va(_,t,e),u&6)pe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&On(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,P,r):l&&!l.hasOnce&&(a!==Gi||d>0&&d&64)?me(l,t,n,!1,!0):(a===Gi&&d&384||!i&&u&16)&&me(c,t,n),r&&de(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Mi(()=>{_&&va(_,t,e),h&&On(e,null,t,`unmounted`),v&&(e.el=null)},n)},de=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===Gi){fe(n,r);return}if(t===Ji){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},fe=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},pe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Vi(c),Vi(l),r&&j(r),i.stop(),a&&(a.flags|=8,ue(o,e,t,n)),s&&Mi(s,t),Mi(()=>{e.isUnmounted=!0},t)},me=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return he(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Rn];return n?h(n):t},ge=!1,_e=(e,t,n)=>{let r;e==null?t._vnode&&(ue(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ge||=(ge=!0,bn(r),xn(),!1)},P={p:v,um:ue,m:le,r:de,mt:A,mc:O,pc:oe,pbc:ee,n:he,o:e},ve,ye;return t&&([ve,ye]=t(P)),{render:_e,hydrate:ve,createApp:ei(_e,ve)}}function Fi({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Ii({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Li(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ri(e,t,n=!1){let r=e.children,i=t.children;if(f(r)&&f(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Bi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Bi(t)}function Vi(e){if(e)for(let t=0;te.__isSuspense;function Wi(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):yn(e)}var Gi=Symbol.for(`v-fgt`),Ki=Symbol.for(`v-txt`),qi=Symbol.for(`v-cmt`),Ji=Symbol.for(`v-stc`),Yi=[],Xi=null;function Zi(e=!1){Yi.push(Xi=e?null:[])}function Qi(){Yi.pop(),Xi=Yi[Yi.length-1]||null}var $i=1;function ea(e,t=!1){$i+=e,e<0&&Xi&&t&&(Xi.hasOnce=!0)}function ta(e){return e.dynamicChildren=$i>0?Xi||r:null,Qi(),$i>0&&Xi&&Xi.push(e),e}function na(e,t,n,r,i,a){return ta(ca(e,t,n,r,i,a,!0))}function ra(e,t,n,r,i){return ta(L(e,t,n,r,i,!0))}function ia(e){return e?e.__v_isVNode===!0:!1}function aa(e,t){return e.type===t.type&&e.key===t.key}var oa=({key:e})=>e??null,sa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:_(e)||Bt(e)||g(e)?{i:wn,r:e,k:t,f:!!n}:e);function ca(e,t=null,n=null,r=0,i=null,a=e===Gi?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&oa(t),ref:t&&sa(t),scopeId:Tn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:wn};return s?(ga(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=_(n)?8:16),$i>0&&!o&&Xi&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Xi.push(c),c}var L=la;function la(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Er)&&(e=qi),ia(e)){let r=da(e,t,!0);return n&&ga(r,n),$i>0&&!a&&Xi&&(r.shapeFlag&6?Xi[Xi.indexOf(e)]=r:Xi.push(r)),r.patchFlag=-2,r}if(Ba(e)&&(e=e.__vccOpts),t){t=ua(t);let{class:e,style:n}=t;e&&!_(e)&&(t.class=fe(e)),y(n)&&(It(n)&&!f(n)&&(n=c({},n)),t.style=N(n))}let o=_(e)?1:Ui(e)?128:zn(e)?64:y(e)?4:g(e)?2:0;return ca(e,t,n,r,i,o,a,!0)}function ua(e){return e?It(e)||gi(e)?c({},e):e:null}function da(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?_a(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&oa(l),ref:t&&t.ref?n&&a?f(a)?a.concat(sa(t)):[a,sa(t)]:sa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Gi?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&da(e.ssContent),ssFallback:e.ssFallback&&da(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&$n(u,c.clone(u)),u}function fa(e=` `,t=0){return L(Ki,null,e,t)}function pa(e=``,t=!1){return t?(Zi(),ra(qi,null,e)):L(qi,null,e)}function ma(e){return e==null||typeof e==`boolean`?L(qi):f(e)?L(Gi,null,e.slice()):ia(e)?ha(e):L(Ki,null,String(e))}function ha(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:da(e)}function ga(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(f(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),ga(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!gi(t)?t._ctx=wn:r===3&&wn&&(wn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(g(t)){if(r&65){ga(e,{default:t});return}t={default:t,_ctx:wn},n=32}else t=String(t),r&64?(n=16,t=[fa(t)]):n=8;e.children=t,e.shapeFlag|=n}function _a(...e){let t={};for(let n=0;nSa||wn,wa,Ta;{let e=se(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};wa=t(`__VUE_INSTANCE_SETTERS__`,e=>Sa=e),Ta=t(`__VUE_SSR_SETTERS__`,e=>ka=e)}var Ea=e=>{let t=Sa;return wa(e),e.scope.on(),()=>{e.scope.off(),wa(t)}},Da=()=>{Sa&&Sa.scope.off(),wa(null)};function Oa(e){return e.vnode.shapeFlag&4}var ka=!1;function Aa(e,t=!1,n=!1){t&&Ta(t);let{props:r,children:i}=e.vnode,a=Oa(e);_i(e,r,a,t),Ai(e,i,n||t);let o=a?ja(e,t):void 0;return t&&Ta(!1),o}function ja(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Fr);let{setup:r}=n;if(r){Le();let n=e.setupContext=r.length>1?La(e):null,i=Ea(e),a=rn(r,e,0,[e.props,n]),o=b(a);if(Re(),i(),(o||e.sp)&&!or(e)&&tr(e),o){if(a.then(Da,Da),t)return a.then(n=>{Ma(e,n,t)}).catch(t=>{on(t,e,0)});e.asyncDep=a}else Ma(e,a,t)}else Fa(e,t)}function Ma(e,t,n){g(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:y(t)&&(e.setupState=Jt(t)),Fa(e,n)}var Na,Pa;function Fa(e,t,n){let r=e.type;if(!e.render){if(!t&&Na&&!r.render){let t=r.template||Hr(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Na(t,c(c({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||i,Pa&&Pa(e)}{let t=Ea(e);Le();try{Rr(e)}finally{Re(),t()}}}var Ia={get(e,t){return Je(e,`get`,``),e[t]}};function La(e){return{attrs:new Proxy(e.attrs,Ia),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ra(e){return e.exposed?e.exposeProxy||=new Proxy(Jt(Lt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Nr)return Nr[n](e)},has(e,t){return t in e||t in Nr}}):e.proxy}function za(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}function Ba(e){return g(e)&&`__vccOpts`in e}var Va=(e,t)=>Xt(e,t,ka);function Ha(e,t,n){try{ea(-1);let r=arguments.length;return r===2?y(t)&&!f(t)?ia(t)?L(e,null,[t]):L(e,t):L(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ia(n)&&(n=[n]),L(e,t,n))}finally{ea(1)}}var Ua=`3.5.40`,Wa=void 0,Ga=typeof window<`u`&&window.trustedTypes;if(Ga)try{Wa=Ga.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ka=Wa?e=>Wa.createHTML(e):e=>e,qa=`http://www.w3.org/2000/svg`,Ja=`http://www.w3.org/1998/Math/MathML`,Ya=typeof document<`u`?document:null,Xa=Ya&&Ya.createElement(`template`),Za={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Ya.createElementNS(qa,e):t===`mathml`?Ya.createElementNS(Ja,e):n?Ya.createElement(e,{is:n}):Ya.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Ya.createTextNode(e),createComment:e=>Ya.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ya.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Xa.innerHTML=Ka(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=Xa.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qa=`transition`,$a=`animation`,eo=Symbol(`_vtc`),to={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},no=c({},Wn,to),ro=(e=>(e.displayName=`Transition`,e.props=no,e))((e,{slots:t})=>Ha(Jn,oo(e),t)),io=(e,t=[])=>{f(e)?e.forEach(e=>e(...t)):e&&e(...t)},ao=e=>e?f(e)?e.some(e=>e.length>1):e.length>1:!1;function oo(e){let t={};for(let n in e)n in to||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=so(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,uo(e,t?d:s),uo(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,uo(e,f),uo(e,m),uo(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);io(i,[t,o]),fo(()=>{uo(t,e?l:a),lo(t,e?d:s),ao(i)||mo(t,r,g,o)})};return c(t,{onBeforeEnter(e){io(v,[e]),lo(e,a),lo(e,o)},onBeforeAppear(e){io(C,[e]),lo(e,l),lo(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);lo(e,f),e._enterCancelled?(lo(e,p),vo(e)):(vo(e),lo(e,p)),fo(()=>{e._isLeaving&&(uo(e,f),lo(e,m),ao(x)||mo(e,r,_,n))}),io(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),io(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),io(T,[e])},onLeaveCancelled(e){D(e),io(S,[e])}})}function so(e){if(e==null)return null;if(y(e))return[co(e.enter),co(e.leave)];{let t=co(e);return[t,t]}}function co(e){return ae(e)}function lo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[eo]||(e[eo]=new Set)).add(t)}function uo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[eo];n&&(n.delete(t),n.size||(e[eo]=void 0))}function fo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var po=0;function mo(e,t,n,r){let i=e._endId=++po,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=ho(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${Qa}Delay`),a=r(`${Qa}Duration`),o=go(i,a),s=r(`${$a}Delay`),c=r(`${$a}Duration`),l=go(s,c),u=null,d=0,f=0;t===Qa?o>0&&(u=Qa,d=o,f=a.length):t===$a?l>0&&(u=$a,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?Qa:$a:null,f=u?u===Qa?a.length:c.length:0);let p=u===Qa&&/\b(?:transform|all)(?:,|$)/.test(r(`${Qa}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function go(e,t){for(;e.length_o(t)+_o(e[n])))}function _o(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function vo(e){return(e?e.ownerDocument:document).body.offsetHeight}function yo(e,t,n){let r=e[eo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var bo=Symbol(`_vod`),xo=Symbol(`_vsh`),So=Symbol(``),Co=/(?:^|;)\s*display\s*:/;function wo(e,t,n){let r=e.style,i=_(n),a=!1;if(n&&!i){if(t)if(_(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Eo(r,t,``)}else for(let e in t)n[e]??Eo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Eo(r,i,``):Ao(e,i,!_(t)&&t?t[i]:void 0,o)||Eo(r,i,o)}}else if(i){if(t!==n){let e=r[So];e&&(n+=`;`+e),r.cssText=n,a=Co.test(n)}}else t&&e.removeAttribute(`style`);bo in e&&(e[bo]=a?r.display:``,e[xo]&&(r.display=`none`))}var To=/\s*!important$/;function Eo(e,t,n){if(f(n))n.forEach(n=>Eo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=ko(e,t);To.test(n)?e.setProperty(te(r),n.replace(To,``),`important`):e[r]=n}}var Do=[`Webkit`,`Moz`,`ms`],Oo={};function ko(e,t){let n=Oo[t];if(n)return n;let r=k(t);if(r!==`filter`&&r in e)return Oo[t]=r;r=ne(r);for(let n=0;nVo||=(Ho.then(()=>Vo=0),Date.now());function Wo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(f(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ko=(e,t,n,r,i,a)=>{let c=i===`svg`;t===`class`?yo(e,r,c):t===`style`?wo(e,n,r):o(t)?s(t)||Lo(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):qo(e,t,r,c))?(No(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Mo(e,t,r,c,a,t!==`value`)):e._isVueCE&&(Jo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!_(r)))?No(e,k(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Mo(e,t,r,c))};function qo(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Go(t)&&g(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Go(t)&&_(n)?!1:t in e}function Jo(e,t){let n=e._def.props;if(!n)return!1;let r=k(t);return Array.isArray(n)?n.some(e=>k(e)===r):Object.keys(n).some(e=>k(e)===r)}var Yo=c({patchProp:Ko},Za),Xo;function Zo(){return Xo||=Ni(Yo)}var Qo=((...e)=>{let t=Zo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=es(e);if(!r)return;let i=t._component;!g(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,$o(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function $o(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function es(e){return _(e)?document.querySelector(e):e}function ts(e,t){return ye()?(be(e,t),!0):!1}function ns(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return ts(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}var rs=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var is=Object.prototype.toString,as=e=>is.call(e)===`[object Object]`,os=(e,t)=>Object.hasOwn(e,t);function ss(e){return Array.isArray(e)?e:[e]}function cs(e,t,n){return Pn(e,t,{...n,immediate:!0})}var ls=rs?window:void 0,us=rs?window.document:void 0;rs&&window.navigator,rs&&window.location;function ds(e){let t=Kt(e);return t?.$el??t}function fs(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=Va(()=>{let t=ss(Kt(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return cs(()=>[n.value?.map(e=>ds(e))??[ls].filter(e=>e!=null),ss(Kt(n.value?e[1]:e[0])),ss(Gt(n.value?e[2]:e[1])),Kt(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=as(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function ps(e,t={}){let n=Ht(!1),r=Ht(null),i=0,a=!0;if(rs){let o=typeof t==`function`?{onDrop:t}:t,s=o.multiple??!0,c=o.preventDefaultForUnhandled??!1,l=e=>{let t=Array.from(e.dataTransfer?.files??[]);return t.length===0?null:s?t:[t[0]]},u=e=>{let t=Gt(o.dataTypes);return typeof t==`function`?t(e):!t?.length||e.length!==0&&e.every(e=>t.some(t=>e.includes(t)))},d=e=>{if(o.checkValidity)return o.checkValidity(e);let t=Array.from(e??[]).map(e=>e.type),n=u(t),r=s||e.length<=1;return n&&r},f=()=>/^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent)&&!(`chrome`in window),p=(e,t)=>{let s=e.dataTransfer?.items;if(a=(s&&d(s))??!1,c&&e.preventDefault(),!f()&&!a){e.dataTransfer&&(e.dataTransfer.dropEffect=`none`);return}e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`);let u=l(e);switch(t){case`enter`:var p;i+=1,n.value=!0,(p=o.onEnter)==null||p.call(o,null,e);break;case`over`:var m;(m=o.onOver)==null||m.call(o,null,e);break;case`leave`:var h;--i,i===0&&(n.value=!1),(h=o.onLeave)==null||h.call(o,null,e);break;case`drop`:if(i=0,n.value=!1,a){var g;r.value=u,(g=o.onDrop)==null||g.call(o,u,e)}break}};fs(e,`dragenter`,e=>p(e,`enter`)),fs(e,`dragover`,e=>p(e,`over`)),fs(e,`dragleave`,e=>p(e,`leave`)),fs(e,`drop`,e=>p(e,`drop`))}return{files:r,isOverDropZone:n}}var ms={multiple:!0,accept:`*`,reset:!1,directory:!1};function hs(e){if(!e)return null;if(e instanceof FileList)return e;let t=new DataTransfer;for(let n of e)t.items.add(n);return t.files}function gs(e={}){let{document:t=us}=e,n=Vt(hs(e.initialFiles)),{on:r,trigger:i}=ns(),{on:a,trigger:o}=ns(),s=Va(()=>{let r=ds(e.input)??(t?t.createElement(`input`):void 0);return r&&(r.type=`file`,r.onchange=e=>{let t=e.target;n.value=t.files,i(n.value)},r.oncancel=()=>{o()}),r}),c=()=>{n.value=null,s.value&&s.value.value&&(s.value.value=``,i(null))},l=e=>{let t=s.value;t&&(t.multiple=Kt(e.multiple),t.accept=Kt(e.accept),t.webkitdirectory=Kt(e.directory),os(e,`capture`)&&(t.capture=Kt(e.capture)))};return Nn(()=>{l(e)}),{files:jt(n),open:t=>{let n=s.value;if(!n)return;let r={...ms,...e,...t};l(r),Kt(r.reset)&&c(),n.click()},reset:c,onCancel:a,onChange:r}}function _s(e,t,n){if(e!==`cover`&&e!==`contain`)throw TypeError(`Invalid mode`);let r=t.width/t.height,i=n.width/n.height,{width:a}=n,{height:o}=n;return(e===`contain`?r>i:r`button`},arrow:{type:Boolean,default:()=>!1},loading:{type:Boolean,default:()=>!1}},setup(e){return(t,n)=>(Zi(),ra(Dr(e.tag),{class:`btn`},{default:Dn(()=>[e.arrow?(Zi(),na(`span`,vs,`→`)):pa(``,!0),ca(`span`,ys,[ca(`span`,null,[Ar(t.$slots,`default`)]),ca(`span`,null,[Ar(t.$slots,`default`)])]),e.arrow?(Zi(),na(`span`,bs,`→`)):pa(``,!0)]),_:3}))}},Ss=`15.1.22`,Cs=e(((e,t)=>{function n(e){if(Array.isArray(e))return e}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),ws=e(((e,t)=>{function n(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Ts=e(((e,t)=>{function n(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{var n=Ts();function r(e,t){if(e){if(typeof e==`string`)return n(e,t);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),Ds=e(((e,t)=>{function n(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Os=e(((e,t)=>{var n=Cs(),r=ws(),i=Es(),a=Ds();function o(e,t){return n(e)||r(e,t)||i(e,t)||a()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})),ks=e(((e,t)=>{function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),As=e(((e,t)=>{function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),js=e(((e,t)=>{var n=As().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),Ms=e(((e,t)=>{var n=As().default,r=js();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})),Ns=e(((e,t)=>{var n=Ms();function r(e,t){for(var r=0;r{(function(n,r){typeof e==`object`&&t!==void 0?r(e,Os(),ks(),Ns()):typeof define==`function`&&define.amd?define([`exports`,`@babel/runtime/helpers/slicedToArray`,`@babel/runtime/helpers/classCallCheck`,`@babel/runtime/helpers/createClass`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.automationEvents={},n._slicedToArray,n._classCallCheck,n._createClass))})(e,(function(e,t,n,r){var i=function(e,t,n){return{endTime:t,insertTime:n,type:`exponentialRampToValue`,value:e}},a=function(e,t,n){return{endTime:t,insertTime:n,type:`linearRampToValue`,value:e}},o=function(e,t){return{startTime:t,type:`setValue`,value:e}},s=function(e,t,n){return{duration:n,startTime:t,type:`setValueCurve`,values:e}},c=function(e,t,n){var r=n.startTime,i=n.target,a=n.timeConstant;return i+(t-i)*Math.exp((r-e)/a)},l=function(e){return e.type===`exponentialRampToValue`},u=function(e){return e.type===`linearRampToValue`},d=function(e){return l(e)||u(e)},f=function(e){return e.type===`setValue`},p=function(e){return e.type===`setValueCurve`},m=function(e,t,n,r){var i=e[t];return i===void 0?r:d(i)||f(i)?i.value:p(i)?i.values[i.values.length-1]:c(n,m(e,t-1,i.startTime,r),i)},h=function(e,t,n,r,i){return n===void 0?[r.insertTime,i]:d(n)?[n.endTime,n.value]:f(n)?[n.startTime,n.value]:p(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,m(e,t-1,n.startTime,i)]},g=function(e){return e.type===`cancelAndHold`},_=function(e){return e.type===`cancelScheduledValues`},v=function(e){return g(e)||_(e)?e.cancelTime:l(e)||u(e)?e.endTime:e.startTime},y=function(e,t,n,r){var i=r.endTime,a=r.value;return n===a?a:0=t:v(n)>=t}),r=this._automationEvents[n];if(n!==-1&&(this._automationEvents=this._automationEvents.slice(0,n)),g(e)){var c=this._automationEvents[this._automationEvents.length-1];if(r!==void 0&&d(r)){if(c!==void 0&&w(c))throw Error(`The internal list is malformed.`);var f=c===void 0?r.insertTime:p(c)?c.startTime+c.duration:v(c),m=c===void 0?this._defaultValue:p(c)?c.values[c.values.length-1]:c.value,h=l(r)?y(t,f,m,r):b(t,f,m,r),x=l(r)?i(h,t,this._currenTime):a(h,t,this._currenTime);this._automationEvents.push(x)}if(c!==void 0&&w(c)&&this._automationEvents.push(o(this.getValue(t),t)),c!==void 0&&p(c)&&c.startTime+c.duration>t){var S=t-c.startTime;this._automationEvents[this._automationEvents.length-1]=s(C(c.values,c.duration,S),c.startTime,S)}}}else{var T=this._automationEvents.findIndex(function(e){return v(e)>t}),E=T===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[T-1];if(E!==void 0&&p(E)&&v(E)+E.duration>t)return!1;var D=l(e)?i(e.value,e.endTime,this._currenTime):u(e)?a(e.value,t,this._currenTime):e;if(T===-1)this._automationEvents.push(D);else{if(p(e)&&t+e.duration>v(this._automationEvents[T]))return!1;this._automationEvents.splice(T,0,D)}}return!0}},{key:`flush`,value:function(e){var t=this._automationEvents.findIndex(function(t){return v(t)>e});if(t>1){var n=this._automationEvents.slice(t-1),r=n[0];w(r)&&n.unshift(o(m(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:`getValue`,value:function(e){if(this._automationEvents.length===0)return this._defaultValue;var n=this._automationEvents.findIndex(function(t){return v(t)>e}),r=this._automationEvents[n],i=(n===-1?this._automationEvents.length:n)-1,a=this._automationEvents[i];if(a!==void 0&&w(a)&&(r===void 0||!d(r)||r.insertTime>e))return c(e,m(this._automationEvents,i-1,a.startTime,this._defaultValue),a);if(a!==void 0&&f(a)&&(r===void 0||!d(r)))return a.value;if(a!==void 0&&p(a)&&(r===void 0||!d(r)||a.startTime+a.duration>e))return enew DOMException(``,`AbortError`),Is=e=>(t,n,[r,i,a],o)=>{e(t[i],[n,r,a],e=>e[0]===n&&e[1]===r,o)},Ls=e=>(t,n,r)=>{let i=[];for(let e=0;e(t,n)=>{e.set(t,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:n})},zs=new WeakSet,Bs=new WeakMap,Vs=new WeakMap,Hs=new WeakMap,Us=new WeakMap,Ws=new WeakMap,Gs=new WeakMap,Ks=new WeakMap,qs=new WeakMap,Js=new WeakMap,Ys={construct(){return Ys}},Xs=e=>{try{new new Proxy(e,Ys)}catch{return!1}return!0},Zs=/^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]*);?/,Qs=(e,t)=>{let n=[],r=e.replace(/^[\s]+/,``),i=r.match(Zs);for(;i!==null;){let e=i[1].slice(1,-1),a=i[0].replace(/([\s]+)?;?$/,``).replace(e,new URL(e,t).toString());n.push(a),r=r.slice(i[0].length).replace(/^[\s]+/,``),i=r.match(Zs)}return[n.join(`;`),r]},$s=e=>{if(e!==void 0&&!Array.isArray(e))throw TypeError(`The parameterDescriptors property of given value for processorCtor is not an array.`)},ec=e=>{if(!Xs(e))throw TypeError(`The given value for processorCtor should be a constructor.`);if(e.prototype===null||typeof e.prototype!=`object`)throw TypeError(`The given value for processorCtor should have a prototype.`)},tc=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{let p=0;return(m,h,g={credentials:`omit`})=>{let _=u.get(m);if(_!==void 0&&_.has(h))return Promise.resolve();let v=l.get(m);if(v!==void 0){let e=v.get(h);if(e!==void 0)return e}let y=a(m),b=y.audioWorklet===void 0?i(h).then(([e,t])=>{let[r,i]=Qs(e,t);return n(`${r};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${i} -})})(window,'_AWGS')`)}).then(()=>{let e=f._AWGS.pop();if(e===void 0)throw SyntaxError();r(y.currentTime,y.sampleRate,()=>e(class{},void 0,(e,n)=>{if(e.trim()===``)throw t();let r=qs.get(y);if(r!==void 0){if(r.has(e))throw t();ec(n),$s(n.parameterDescriptors),r.set(e,n)}else ec(n),$s(n.parameterDescriptors),qs.set(y,new Map([[e,n]]))},y.sampleRate,void 0,void 0))}):Promise.all([i(h),Promise.resolve(e(d,d))]).then(([[e,t],n])=>{let r=p+1;p=r;let[i,a]=Qs(e,t),l=`${i};((AudioWorkletProcessor,registerProcessor)=>{${a} -})(${n?`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{${n?``:`__c = (a) => a.forEach(e=>this.__b.add(e.buffer));`}process(i,o,p){${n?``:`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${r}',class extends AudioWorkletProcessor{process(){return !1}})`,u=new Blob([l],{type:`application/javascript; charset=utf-8`}),d=URL.createObjectURL(u);return y.audioWorklet.addModule(d,g).then(()=>{if(s(y))return y;let e=o(y);return e.audioWorklet.addModule(d,g).then(()=>e)}).then(e=>{if(c===null)throw SyntaxError();try{new c(e,`__sac${r}`)}catch{throw SyntaxError()}}).finally(()=>URL.revokeObjectURL(d))});return v===void 0?l.set(m,new Map([[h,b]])):v.set(h,b),b.then(()=>{let e=u.get(m);e===void 0?u.set(m,new Set([h])):e.add(h)}).finally(()=>{let e=l.get(m);e!==void 0&&e.delete(h)}),b}},nc=(e,t)=>{let n=e.get(t);if(n===void 0)throw Error(`A value with the given key could not be found.`);return n},rc=(e,t)=>{let n=Array.from(e).filter(t);if(n.length>1)throw Error(`More than one element was found.`);if(n.length===0)throw Error(`No element was found.`);let[r]=n;return e.delete(r),r},ic=(e,t,n,r)=>{let i=nc(e,t),a=rc(i,e=>e[0]===n&&e[1]===r);return i.size===0&&e.delete(t),a},ac=e=>nc(Gs,e),oc=e=>{if(zs.has(e))throw Error(`The AudioNode is already stored.`);zs.add(e),ac(e).forEach(e=>e(!0))},sc=e=>`port`in e,cc=e=>{if(!zs.has(e))throw Error(`The AudioNode is not stored.`);zs.delete(e),ac(e).forEach(e=>e(!1))},lc=(e,t)=>{!sc(e)&&t.every(e=>e.size===0)&&cc(e)},uc=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{let p=new WeakMap;return(m,h,g,_,v)=>{let{activeInputs:y,passiveInputs:b}=a(h),{outputs:x}=a(m),S=s(m),C=a=>{let s=c(h),l=c(m);if(a){let t=ic(b,m,g,_);e(y,m,t,!1),!v&&!d(m)&&n(l,s,g,_),f(h)&&oc(h)}else{let e=r(y,m,g,_);t(b,_,e,!1),!v&&!d(m)&&i(l,s,g,_);let n=o(h);if(n===0)u(h)&&lc(h,y);else{let e=p.get(h);e!==void 0&&clearTimeout(e),p.set(h,setTimeout(()=>{u(h)&&lc(h,y)},n*1e3))}}};return l(x,[h,g,_],e=>e[0]===h&&e[1]===g&&e[2]===_,!0)?(S.add(C),u(m)?e(y,m,[g,_,C],!0):t(b,_,[m,g,C],!0),!0):!1}},dc=e=>(t,n,[r,i,a],o)=>{let s=t.get(r);s===void 0?t.set(r,new Set([[i,n,a]])):e(s,[i,n,a],e=>e[0]===i&&e[1]===n,o)},fc=e=>(t,n)=>{let r=e(t,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:0});n.connect(r).connect(t.destination);let i=()=>{n.removeEventListener(`ended`,i),n.disconnect(r),r.disconnect()};n.addEventListener(`ended`,i)},pc=e=>(t,n)=>{e(t).add(n)},mc={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},hc=(e,t,n,r,i,a)=>class extends e{constructor(e,n){let o=i(e),s=r(o,{...mc,...n}),c=a(o)?t():null;super(e,!1,s,c),this._nativeAnalyserNode=s}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(e){this._nativeAnalyserNode.fftSize=e}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(e){let t=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=e,!(e>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=t,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(e){let t=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=e,!(this._nativeAnalyserNode.maxDecibels>e))throw this._nativeAnalyserNode.minDecibels=t,n()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(e){this._nativeAnalyserNode.smoothingTimeConstant=e}getByteFrequencyData(e){this._nativeAnalyserNode.getByteFrequencyData(e)}getByteTimeDomainData(e){this._nativeAnalyserNode.getByteTimeDomainData(e)}getFloatFrequencyData(e){this._nativeAnalyserNode.getFloatFrequencyData(e)}getFloatTimeDomainData(e){this._nativeAnalyserNode.getFloatTimeDomainData(e)}},gc=(e,t)=>e.context===t,_c=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return gc(o,a)||(o=e(a,{channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,fftSize:o.fftSize,maxDecibels:o.maxDecibels,minDecibels:o.minDecibels,smoothingTimeConstant:o.smoothingTimeConstant})),r.set(a,o),await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},vc=e=>{try{e.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},yc=()=>new DOMException(``,`IndexSizeError`),bc=e=>{e.getChannelData=(t=>n=>{try{return t.call(e,n)}catch(e){throw e.code===12?yc():e}})(e.getChannelData)},xc={numberOfChannels:1},Sc=(e,t,n,r,i,a,o,s)=>{let c=null;return class l{constructor(l){if(i===null)throw Error(`Missing the native OfflineAudioContext constructor.`);let{length:u,numberOfChannels:d,sampleRate:f}={...xc,...l};c===null&&(c=new i(1,1,44100));let p=r!==null&&t(a,a)?new r({length:u,numberOfChannels:d,sampleRate:f}):c.createBuffer(d,u,f);if(p.numberOfChannels===0)throw n();return typeof p.copyFromChannel==`function`?t(vc,()=>vc(p))||s(p):(o(p),bc(p)),e.add(p),p}static[Symbol.hasInstance](t){return typeof t==`object`&&!!t&&Object.getPrototypeOf(t)===l.prototype||e.has(t)}}},Cc=-34028234663852886e22,wc=34028234663852886e22,Tc=e=>zs.has(e),Ec={buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1},Dc=(e,t,n,r,i,a,o,s)=>class extends e{constructor(e,r){let s=a(e),c={...Ec,...r},l=i(s,c),u=o(s),d=u?t():null;super(e,!1,l,d),this._audioBufferSourceNodeRenderer=d,this._isBufferNullified=!1,this._isBufferSet=c.buffer!==null,this._nativeAudioBufferSourceNode=l,this._onended=null,this._playbackRate=n(this,u,l.playbackRate,wc,Cc)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(e){if(this._nativeAudioBufferSourceNode.buffer=e,e!==null){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(e){this._nativeAudioBufferSourceNode.loop=e}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(e){this._nativeAudioBufferSourceNode.loopEnd=e}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(e){this._nativeAudioBufferSourceNode.loopStart=e}get onended(){return this._onended}set onended(e){let t=typeof e==`function`?s(this,e):null;this._nativeAudioBufferSourceNode.onended=t;let n=this._nativeAudioBufferSourceNode.onended;this._onended=n!==null&&n===t?e:n}get playbackRate(){return this._playbackRate}start(e=0,t=0,n){if(this._nativeAudioBufferSourceNode.start(e,t,n),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=n===void 0?[e,t]:[e,t,n]),this.context.state!==`closed`){oc(this);let e=()=>{this._nativeAudioBufferSourceNode.removeEventListener(`ended`,e),Tc(this)&&cc(this)};this._nativeAudioBufferSourceNode.addEventListener(`ended`,e)}}stop(e=0){this._nativeAudioBufferSourceNode.stop(e),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=e)}},Oc=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=null,s=null,c=async(c,l)=>{let u=n(c),d=gc(u,l);return d||(u=t(l,{buffer:u.buffer,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,loop:u.loop,loopEnd:u.loopEnd,loopStart:u.loopStart,playbackRate:u.playbackRate.value}),o!==null&&u.start(...o),s!==null&&u.stop(s)),a.set(l,u),d?await e(l,c.playbackRate,u.playbackRate):await r(l,c.playbackRate,u.playbackRate),await i(c,l,u),u};return{set start(e){o=e},set stop(e){s=e},render(e,t){let n=a.get(t);return n===void 0?c(e,t):Promise.resolve(n)}}},kc=e=>`playbackRate`in e,Ac=e=>`frequency`in e&&`gain`in e,jc=e=>`offset`in e,Mc=e=>!(`frequency`in e)&&`gain`in e,Nc=e=>`detune`in e&&`frequency`in e&&!(`gain`in e),Pc=e=>`pan`in e,Fc=e=>nc(Bs,e),Ic=e=>nc(Hs,e),Lc=(e,t)=>{let{activeInputs:n}=Fc(e);n.forEach(n=>n.forEach(([n])=>{t.includes(e)||Lc(n,[...t,e])}));let r=kc(e)?[e.playbackRate]:sc(e)?Array.from(e.parameters.values()):Ac(e)?[e.Q,e.detune,e.frequency,e.gain]:jc(e)?[e.offset]:Mc(e)?[e.gain]:Nc(e)?[e.detune,e.frequency]:Pc(e)?[e.pan]:[];for(let e of r){let n=Ic(e);n!==void 0&&n.activeInputs.forEach(([e])=>Lc(e,t))}Tc(e)&&cc(e)},Rc=e=>{Lc(e.destination,[])},zc=e=>e===void 0||typeof e==`number`||typeof e==`string`&&(e===`balanced`||e===`interactive`||e===`playback`),Bc=(e,t,n,r,i,a,o,s,c)=>class extends e{constructor(e={}){if(c===null)throw Error(`Missing the native AudioContext constructor.`);let t;try{t=new c(e)}catch(e){throw e.code===12&&e.message===`sampleRate is not in range`?n():e}if(t===null)throw r();if(!zc(e.latencyHint))throw TypeError(`The provided value '${e.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(e.sampleRate!==void 0&&t.sampleRate!==e.sampleRate)throw n();super(t,2);let{latencyHint:i}=e,{sampleRate:a}=t;if(this._baseLatency=typeof t.baseLatency==`number`?t.baseLatency:i===`balanced`?512/a:i===`interactive`||i===void 0?256/a:i===`playback`?1024/a:Math.max(2,Math.min(128,Math.round(i*a/128)))*128/a,this._nativeAudioContext=t,c.name===`webkitAudioContext`?(this._nativeGainNode=t.createGain(),this._nativeOscillatorNode=t.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(t.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,t.state===`running`){this._state=`suspended`;let e=()=>{this._state===`suspended`&&(this._state=null),t.removeEventListener(`statechange`,e)};t.addEventListener(`statechange`,e)}}get baseLatency(){return this._baseLatency}get state(){return this._state===null?this._nativeAudioContext.state:this._state}close(){return this.state===`closed`?this._nativeAudioContext.close().then(()=>{throw t()}):(this._state===`suspended`&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),Rc(this)}))}createMediaElementSource(e){return new i(this,{mediaElement:e})}createMediaStreamDestination(){return new a(this)}createMediaStreamSource(e){return new o(this,{mediaStream:e})}createMediaStreamTrackSource(e){return new s(this,{mediaStreamTrack:e})}resume(){return this._state===`suspended`?new Promise((e,t)=>{let n=()=>{this._nativeAudioContext.removeEventListener(`statechange`,n),this._nativeAudioContext.state===`running`?e():this.resume().then(e,t)};this._nativeAudioContext.addEventListener(`statechange`,n)}):this._nativeAudioContext.resume().catch(e=>{throw e===void 0||e.code===15?t():e})}suspend(){return this._nativeAudioContext.suspend().catch(e=>{throw e===void 0?t():e})}},Vc=(e,t,n,r,i,a,o,s)=>class extends e{constructor(e,n){let r=a(e),c=o(r),l=i(r,n,c),u=c?t(s):null;super(e,!1,l,u),this._isNodeOfNativeOfflineAudioContext=c,this._nativeAudioDestinationNode=l}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(e>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=e}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=e}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},Hc=e=>{let t=new WeakMap,n=async(n,r)=>{let i=r.destination;return t.set(r,i),await e(n,r,i),i};return{render(e,r){let i=t.get(r);return i===void 0?n(e,r):Promise.resolve(i)}}},Uc=(e,t,n,r,i,a,o,s)=>(c,l)=>{let u=l.listener,{forwardX:d,forwardY:f,forwardZ:p,positionX:m,positionY:h,positionZ:g,upX:_,upY:v,upZ:y}=u.forwardX===void 0?(()=>{let d=new Float32Array(1),f=t(l,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:9}),p=o(l),m=!1,h=[0,0,-1,0,1,0],g=[0,0,0],_=()=>{if(m)return;m=!0;let e=r(l,256,9,0);e.onaudioprocess=({inputBuffer:e})=>{let t=[a(e,d,0),a(e,d,1),a(e,d,2),a(e,d,3),a(e,d,4),a(e,d,5)];t.some((e,t)=>e!==h[t])&&(u.setOrientation(...t),h=t);let n=[a(e,d,6),a(e,d,7),a(e,d,8)];n.some((e,t)=>e!==g[t])&&(u.setPosition(...n),g=n)},f.connect(e)},v=e=>t=>{t!==h[e]&&(h[e]=t,u.setOrientation(...h))},y=e=>t=>{t!==g[e]&&(g[e]=t,u.setPosition(...g))},b=(t,r,a)=>{let o=n(l,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,offset:r});o.connect(f,0,t),o.start(),Object.defineProperty(o.offset,"defaultValue",{get(){return r}});let u=e({context:c},p,o.offset,wc,Cc);return s(u,`value`,e=>()=>e.call(u),e=>t=>{try{e.call(u,t)}catch(e){if(e.code!==9)throw e}_(),p&&a(t)}),u.cancelAndHoldAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.cancelAndHoldAtTime),u.cancelScheduledValues=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.cancelScheduledValues),u.exponentialRampToValueAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.exponentialRampToValueAtTime),u.linearRampToValueAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.linearRampToValueAtTime),u.setTargetAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.setTargetAtTime),u.setValueAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.setValueAtTime),u.setValueCurveAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.setValueCurveAtTime),u};return{forwardX:b(0,0,v(0)),forwardY:b(1,0,v(1)),forwardZ:b(2,-1,v(2)),positionX:b(6,0,y(0)),positionY:b(7,0,y(1)),positionZ:b(8,0,y(2)),upX:b(3,0,v(3)),upY:b(4,1,v(4)),upZ:b(5,0,v(5))}})():u;return{get forwardX(){return d},get forwardY(){return f},get forwardZ(){return p},get positionX(){return m},get positionY(){return h},get positionZ(){return g},get upX(){return _},get upY(){return v},get upZ(){return y}}},Wc=e=>`context`in e,Gc=e=>Wc(e[0]),Kc=(e,t,n,r)=>{for(let t of e)if(n(t)){if(r)return!1;throw Error(`The set contains at least one similar element.`)}return e.add(t),!0},qc=(e,t,[n,r],i)=>{Kc(e,[t,n,r],e=>e[0]===t&&e[1]===n,i)},Jc=(e,[t,n,r],i)=>{let a=e.get(t);a===void 0?e.set(t,new Set([[n,r]])):Kc(a,[n,r],e=>e[0]===n,i)},Yc=e=>`inputs`in e,Xc=(e,t,n,r)=>{if(Yc(t)){let i=t.inputs[r];return e.connect(i,n,0),[i,n,0]}return e.connect(t,n,r),[t,n,r]},Zc=(e,t,n)=>{for(let r of e)if(r[0]===t&&r[1]===n)return e.delete(r),r;return null},Qc=(e,t,n)=>rc(e,e=>e[0]===t&&e[1]===n),$c=(e,t)=>{if(!ac(e).delete(t))throw Error(`Missing the expected event listener.`)},el=(e,t,n)=>{let r=nc(e,t),i=rc(r,e=>e[0]===n);return r.size===0&&e.delete(t),i},tl=(e,t,n,r)=>{Yc(t)?e.disconnect(t.inputs[r],n,0):e.disconnect(t,n,r)},R=e=>nc(Vs,e),nl=e=>nc(Us,e),rl=e=>Ks.has(e),il=e=>!zs.has(e),al=(e,t)=>new Promise(n=>{if(t!==null)n(!0);else{let t=e.createScriptProcessor(256,1,1),r=e.createGain(),i=e.createBuffer(1,2,44100),a=i.getChannelData(0);a[0]=1,a[1]=1;let o=e.createBufferSource();o.buffer=i,o.loop=!0,o.connect(t).connect(e.destination),o.connect(r),o.disconnect(r),t.onaudioprocess=r=>{let i=r.inputBuffer.getChannelData(0);Array.prototype.some.call(i,e=>e===1)?n(!0):n(!1),o.stop(),t.onaudioprocess=null,o.disconnect(t),t.disconnect(e.destination)},o.start()}}),ol=(e,t)=>{let n=new Map;for(let t of e)for(let e of t){let t=n.get(e);n.set(e,t===void 0?1:t+1)}n.forEach((e,n)=>t(n,e))},sl=e=>`context`in e,cl=e=>{let t=new Map;e.connect=(e=>(n,r=0,i=0)=>{let a=sl(n)?e(n,r,i):e(n,r),o=t.get(n);return o===void 0?t.set(n,[{input:i,output:r}]):o.every(e=>e.input!==i||e.output!==r)&&o.push({input:i,output:r}),a})(e.connect.bind(e)),e.disconnect=(n=>(r,i,a)=>{if(n.apply(e),r===void 0)t.clear();else if(typeof r==`number`)for(let[e,n]of t){let i=n.filter(e=>e.output!==r);i.length===0?t.delete(e):t.set(e,i)}else if(t.has(r))if(i===void 0)t.delete(r);else{let e=t.get(r);if(e!==void 0){let n=e.filter(e=>e.output!==i&&(e.input!==a||a===void 0));n.length===0?t.delete(r):t.set(r,n)}}for(let[n,r]of t)r.forEach(t=>{sl(n)?e.connect(n,t.output,t.input):e.connect(n,t.output)})})(e.disconnect)},ll=(e,t,n,r)=>{let{activeInputs:i,passiveInputs:a}=Ic(t),{outputs:o}=Fc(e),s=ac(e),c=o=>{let s=R(e),c=nl(t);if(o){let t=el(a,e,n);qc(i,e,t,!1),!r&&!rl(e)&&s.connect(c,n)}else{let t=Qc(i,e,n);Jc(a,t,!1),!r&&!rl(e)&&s.disconnect(c,n)}};return Kc(o,[t,n],e=>e[0]===t&&e[1]===n,!0)?(s.add(c),Tc(e)?qc(i,e,[n,c],!0):Jc(a,[e,n,c],!0),!0):!1},ul=(e,t,n,r)=>{let{activeInputs:i,passiveInputs:a}=Fc(t),o=Zc(i[r],e,n);return o===null?[ic(a,e,n,r)[2],!1]:[o[2],!0]},dl=(e,t,n)=>{let{activeInputs:r,passiveInputs:i}=Ic(t),a=Zc(r,e,n);return a===null?[el(i,e,n)[1],!1]:[a[2],!0]},fl=(e,t,n,r,i)=>{let[a,o]=ul(e,n,r,i);if(a!==null&&($c(e,a),o&&!t&&!rl(e)&&tl(R(e),R(n),r,i)),Tc(n)){let{activeInputs:e}=Fc(n);lc(n,e)}},pl=(e,t,n,r)=>{let[i,a]=dl(e,n,r);i!==null&&($c(e,i),a&&!t&&!rl(e)&&R(e).disconnect(nl(n),r))},ml=(e,t)=>{let n=Fc(e),r=[];for(let i of n.outputs)Gc(i)?fl(e,t,...i):pl(e,t,...i),r.push(i[0]);return n.outputs.clear(),r},hl=(e,t,n)=>{let r=Fc(e),i=[];for(let a of r.outputs)a[1]===n&&(Gc(a)?fl(e,t,...a):pl(e,t,...a),i.push(a[0]),r.outputs.delete(a));return i},gl=(e,t,n,r,i)=>{let a=Fc(e);return Array.from(a.outputs).filter(e=>e[0]===n&&(r===void 0||e[1]===r)&&(i===void 0||e[2]===i)).map(n=>(Gc(n)?fl(e,t,...n):pl(e,t,...n),a.outputs.delete(n),n[0]))},_l=(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)=>class extends l{constructor(t,r,i,a){super(i),this._context=t,this._nativeAudioNode=i;let o=u(t);d(o)&&!0!==n(al,()=>al(o,h))&&cl(i),Vs.set(this,i),Gs.set(this,new Set),t.state!==`closed`&&r&&oc(this),e(this,a,i)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(e){this._nativeAudioNode.channelCount=e}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(e){this._nativeAudioNode.channelCountMode=e}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(e){this._nativeAudioNode.channelInterpretation=e}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(e,n=0,s=0){if(n<0||n>=this._nativeAudioNode.numberOfOutputs)throw i();let l=m(u(this._context));if(f(e)||p(e))throw a();if(Wc(e)){let i=R(e);try{let t=Xc(this._nativeAudioNode,i,n,s),r=il(this);(l||r)&&this._nativeAudioNode.disconnect(...t),this.context.state!==`closed`&&!r&&il(e)&&oc(e)}catch(e){throw e.code===12?a():e}return t(this,e,n,s,l)&&ol(c([this],e),r(l)),e}let d=nl(e);if(d.name===`playbackRate`&&d.maxValue===1024)throw o();try{this._nativeAudioNode.connect(d,n),(l||il(this))&&this._nativeAudioNode.disconnect(d,n)}catch(e){throw e.code===12?a():e}ll(this,e,n,l)&&ol(c([this],e),r(l))}disconnect(e,t,n){let r,o=m(u(this._context));if(e===void 0)r=ml(this,o);else if(typeof e==`number`){if(e<0||e>=this.numberOfOutputs)throw i();r=hl(this,o,e)}else{if(t!==void 0&&(t<0||t>=this.numberOfOutputs)||Wc(e)&&n!==void 0&&(n<0||n>=e.numberOfInputs))throw i();if(r=gl(this,o,e,t,n),r.length===0)throw a()}for(let e of r)ol(c([this],e),s)}},vl=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>(p,m,h,g=null,_=null)=>{let v=h.value,y=new Ps.AutomationEventList(v),b=m?r(y):null,x={get defaultValue(){return v},get maxValue(){return g===null?h.maxValue:g},get minValue(){return _===null?h.minValue:_},get value(){return h.value},set value(e){h.value=e,x.setValueAtTime(e,p.context.currentTime)},cancelAndHoldAtTime(e){if(typeof h.cancelAndHoldAtTime==`function`)b===null&&y.flush(p.context.currentTime),y.add(i(e)),h.cancelAndHoldAtTime(e);else{let t=Array.from(y).pop();b===null&&y.flush(p.context.currentTime),y.add(i(e));let n=Array.from(y).pop();h.cancelScheduledValues(e),t!==n&&n!==void 0&&(n.type===`exponentialRampToValue`?h.exponentialRampToValueAtTime(n.value,n.endTime):n.type===`linearRampToValue`?h.linearRampToValueAtTime(n.value,n.endTime):n.type===`setValue`?h.setValueAtTime(n.value,n.startTime):n.type===`setValueCurve`&&h.setValueCurveAtTime(n.values,n.startTime,n.duration))}return x},cancelScheduledValues(e){return b===null&&y.flush(p.context.currentTime),y.add(a(e)),h.cancelScheduledValues(e),x},exponentialRampToValueAtTime(e,t){if(e===0||!Number.isFinite(t)||t<0)throw RangeError();let n=p.context.currentTime;return b===null&&y.flush(n),Array.from(y).length===0&&(y.add(l(v,n)),h.setValueAtTime(v,n)),y.add(o(e,t)),h.exponentialRampToValueAtTime(e,t),x},linearRampToValueAtTime(e,t){let n=p.context.currentTime;return b===null&&y.flush(n),Array.from(y).length===0&&(y.add(l(v,n)),h.setValueAtTime(v,n)),y.add(s(e,t)),h.linearRampToValueAtTime(e,t),x},setTargetAtTime(e,t,n){return b===null&&y.flush(p.context.currentTime),y.add(c(e,t,n)),h.setTargetAtTime(e,t,n),x},setValueAtTime(e,t){return b===null&&y.flush(p.context.currentTime),y.add(l(e,t)),h.setValueAtTime(e,t),x},setValueCurveAtTime(e,t,n){let r=e instanceof Float32Array?e:new Float32Array(e);if(d!==null&&d.name===`webkitAudioContext`){let e=t+n,i=p.context.sampleRate,a=Math.ceil(t*i),o=Math.floor(e*i),s=o-a,c=new Float32Array(s);for(let e=0;e({replay(t){for(let n of e)if(n.type===`exponentialRampToValue`){let{endTime:e,value:r}=n;t.exponentialRampToValueAtTime(r,e)}else if(n.type===`linearRampToValue`){let{endTime:e,value:r}=n;t.linearRampToValueAtTime(r,e)}else if(n.type===`setTarget`){let{startTime:e,target:r,timeConstant:i}=n;t.setTargetAtTime(r,e,i)}else if(n.type===`setValue`){let{startTime:e,value:r}=n;t.setValueAtTime(r,e)}else if(n.type===`setValueCurve`){let{duration:e,startTime:r,values:i}=n;t.setValueCurveAtTime(i,r,e)}else throw Error(`Can't apply an unknown automation.`)}}),bl=class{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach((n,r)=>e.call(t,n,r,this))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}},xl={channelCount:2,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},Sl=(e,t,n,r,i,a,o,s,c,l,u,d,f,p)=>class extends t{constructor(t,p,m){let h=s(t),g=c(h),_=u({...xl,...m});f(_);let v=qs.get(h)?.get(p),y=i(g||h.state!==`closed`?h:o(h)??h,g?null:t.baseLatency,l,p,v,_),b=g?r(p,_,v):null;super(t,!0,y,b);let x=[];y.parameters.forEach((e,t)=>{let r=n(this,g,e);x.push([t,r])}),this._nativeAudioWorkletNode=y,this._onprocessorerror=null,this._parameters=new bl(x),g&&e(h,this);let{activeInputs:S}=a(this);d(y,S)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(e){let t=typeof e==`function`?p(this,e):null;this._nativeAudioWorkletNode.onprocessorerror=t;let n=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=n!==null&&n===t?e:n}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function Cl(e,t,n,r,i){if(typeof e.copyFromChannel==`function`)t[n].byteLength===0&&(t[n]=new Float32Array(128)),e.copyFromChannel(t[n],r,i);else{let a=e.getChannelData(r);if(t[n].byteLength===0)t[n]=a.slice(i,i+128);else{let e=new Float32Array(a.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);t[n].set(e)}}}var wl=(e,t,n,r,i)=>{typeof e.copyToChannel==`function`?t[n].byteLength!==0&&e.copyToChannel(t[n],r,i):t[n].byteLength!==0&&e.getChannelData(r).set(t[n],i)},Tl=(e,t)=>{let n=[];for(let r=0;rnc(nc(Js,e),R(t)),Dl=async(e,t,n,r,i,a,o)=>{let s=t===null?Math.ceil(e.context.length/128)*128:t.length,c=r.channelCount*r.numberOfInputs,l=i.reduce((e,t)=>e+t,0),u=l===0?null:n.createBuffer(l,s,n.sampleRate);if(a===void 0)throw Error(`Missing the processor constructor.`);let d=Fc(e),f=await El(n,e),p=Tl(r.numberOfInputs,r.channelCount),m=Tl(r.numberOfOutputs,i),h=Array.from(e.parameters.keys()).reduce((e,t)=>({...e,[t]:new Float32Array(128)}),{});for(let l=0;l0&&t!==null)for(let e=0;e{Cl(t,h,e,c+n,l)});for(let e=0;ed.activeInputs[t].size===0?[]:e),t=o(l/n.sampleRate,n.sampleRate,()=>f.process(e,m,h));if(u!==null)for(let e=0,t=0;e(g,_,v)=>{let y=new WeakMap,b=null,x=async(s,x)=>{let S=u(s),C=null,w=gc(S,x),T=Array.isArray(_.outputChannelCount)?_.outputChannelCount:Array.from(_.outputChannelCount);if(d===null){let e=T.reduce((e,t)=>e+t,0),n=i(x,{channelCount:Math.max(1,e),channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:Math.max(1,e)}),a=[];for(let e=0;e{let c=new f(n,Math.ceil(s.context.length/128)*128,x.sampleRate),l=[],u=[];for(let e=0;e<_.numberOfInputs;e+=1)l.push(o(c,{channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:1})),u.push(i(c,{channelCount:_.channelCount,channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:_.channelCount}));let d=await Promise.all(Array.from(s.parameters.values()).map(async e=>{let t=a(c,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,offset:e.value});return await p(c,e,t.offset),t})),g=r(c,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:Math.max(1,e+t)});for(let e=0;e<_.numberOfInputs;e+=1){l[e].connect(u[e]);for(let t=0;t<_.channelCount;t+=1)u[e].connect(g,t,e*_.channelCount+t)}for(let[t,n]of d.entries())n.connect(g,0,e+t),n.start(0);return g.connect(c.destination),await Promise.all(l.map(e=>m(s,c,e))),h(c)})(),x,_,T,v,l)}let e=await b,t=n(x,{buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[c,u,d]=C;e!==null&&(t.buffer=e,t.start(0)),t.connect(c);for(let e=0,t=0;eclass extends m{constructor(t,n){super(t,n),this._nativeContext=t,this._audioWorklet=e===void 0?void 0:{addModule:(t,n)=>e(this,t,n)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new t(this)}createBiquadFilter(){return new i(this)}createBuffer(e,t,r){return new n({length:t,numberOfChannels:e,sampleRate:r})}createBufferSource(){return new r(this)}createChannelMerger(e=6){return new a(this,{numberOfInputs:e})}createChannelSplitter(e=6){return new o(this,{numberOfOutputs:e})}createConstantSource(){return new s(this)}createConvolver(){return new c(this)}createDelay(e=1){return new u(this,{maxDelayTime:e})}createDynamicsCompressor(){return new d(this)}createGain(){return new f(this)}createIIRFilter(e,t){return new p(this,{feedback:t,feedforward:e})}createOscillator(){return new h(this)}createPanner(){return new g(this)}createPeriodicWave(e,t,n={disableNormalization:!1}){return new _(this,{...n,imag:t,real:e})}createStereoPanner(){return new v(this)}createWaveShaper(){return new y(this)}decodeAudioData(e,t,n){return l(this._nativeContext,e).then(e=>(typeof t==`function`&&t(e),e),e=>{throw typeof n==`function`&&n(e),e})}},Al={Q:1,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,detune:0,frequency:350,gain:0,type:`lowpass`},jl=(e,t,n,r,i,a,o,s)=>class extends e{constructor(e,r){let c=a(e),l=i(c,{...Al,...r}),u=o(c),d=u?n():null;super(e,!1,l,d),this._Q=t(this,u,l.Q,wc,Cc),this._detune=t(this,u,l.detune,1200*Math.log2(wc),-1200*Math.log2(wc)),this._frequency=t(this,u,l.frequency,e.sampleRate/2,0),this._gain=t(this,u,l.gain,40*Math.log10(wc),Cc),this._nativeBiquadFilterNode=l,s(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(e){this._nativeBiquadFilterNode.type=e}getFrequencyResponse(e,t,n){try{this._nativeBiquadFilterNode.getFrequencyResponse(e,t,n)}catch(e){throw e.code===11?r():e}if(e.length!==t.length||t.length!==n.length)throw r()}},Ml=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=async(o,s)=>{let c=n(o),l=gc(c,s);return l||(c=t(s,{Q:c.Q.value,channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,detune:c.detune.value,frequency:c.frequency.value,gain:c.gain.value,type:c.type})),a.set(s,c),l?(await e(s,o.Q,c.Q),await e(s,o.detune,c.detune),await e(s,o.frequency,c.frequency),await e(s,o.gain,c.gain)):(await r(s,o.Q,c.Q),await r(s,o.detune,c.detune),await r(s,o.frequency,c.frequency),await r(s,o.gain,c.gain)),await i(o,s,c),c};return{render(e,t){let n=a.get(t);return n===void 0?o(e,t):Promise.resolve(n)}}},Nl=(e,t)=>(n,r)=>{let i=t.get(n);if(i!==void 0)return i;let a=e.get(n);if(a!==void 0)return a;try{let i=r();return i instanceof Promise?(e.set(n,i),i.catch(()=>!1).then(r=>(e.delete(n),t.set(n,r),r))):(t.set(n,i),i)}catch{return t.set(n,!1),!1}},Pl={channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:6},Fl=(e,t,n,r,i)=>class extends e{constructor(e,a){let o=r(e),s=n(o,{...Pl,...a}),c=i(o)?t():null;super(e,!1,s,c)}},Il=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return gc(o,a)||(o=e(a,{channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,numberOfInputs:o.numberOfInputs})),r.set(a,o),await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},Ll={channelCount:6,channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:6},Rl=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=r(e),c=n(s,a({...Ll,...o})),l=i(s)?t():null;super(e,!1,c,l)}},zl=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return gc(o,a)||(o=e(a,{channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,numberOfOutputs:o.numberOfOutputs})),r.set(a,o),await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},Bl=e=>(t,n,r)=>e(n,t,r),Vl=e=>(t,n,r=0,i=0)=>{let a=t[r];if(a===void 0)throw e();return sl(n)?a.connect(n,0,i):a.connect(n,0)},Hl=e=>(t,n)=>{let r=e(t,{buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1});return r.buffer=t.createBuffer(1,2,44100),r.loop=!0,r.connect(n),r.start(),()=>{r.stop(),r.disconnect(n)}},Ul={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,offset:1},Wl=(e,t,n,r,i,a,o)=>class extends e{constructor(e,o){let s=i(e),c=r(s,{...Ul,...o}),l=a(s),u=l?n():null;super(e,!1,c,u),this._constantSourceNodeRenderer=u,this._nativeConstantSourceNode=c,this._offset=t(this,l,c.offset,wc,Cc),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(e){let t=typeof e==`function`?o(this,e):null;this._nativeConstantSourceNode.onended=t;let n=this._nativeConstantSourceNode.onended;this._onended=n!==null&&n===t?e:n}start(e=0){if(this._nativeConstantSourceNode.start(e),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=e),this.context.state!==`closed`){oc(this);let e=()=>{this._nativeConstantSourceNode.removeEventListener(`ended`,e),Tc(this)&&cc(this)};this._nativeConstantSourceNode.addEventListener(`ended`,e)}}stop(e=0){this._nativeConstantSourceNode.stop(e),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=e)}},Gl=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=null,s=null,c=async(c,l)=>{let u=n(c),d=gc(u,l);return d||(u=t(l,{channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,offset:u.offset.value}),o!==null&&u.start(o),s!==null&&u.stop(s)),a.set(l,u),d?await e(l,c.offset,u.offset):await r(l,c.offset,u.offset),await i(c,l,u),u};return{set start(e){o=e},set stop(e){s=e},render(e,t){let n=a.get(t);return n===void 0?c(e,t):Promise.resolve(n)}}},Kl=e=>t=>(e[0]=t,e[0]),ql={buffer:null,channelCount:2,channelCountMode:`clamped-max`,channelInterpretation:`speakers`,disableNormalization:!1},Jl=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=r(e),c={...ql,...o},l=n(s,c),u=i(s)?t():null;super(e,!1,l,u),this._isBufferNullified=!1,this._nativeConvolverNode=l,c.buffer!==null&&a(this,c.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(e){if(this._nativeConvolverNode.buffer=e,e===null&&this._nativeConvolverNode.buffer!==null){let e=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=e.createBuffer(1,1,e.sampleRate),this._isBufferNullified=!0,a(this,0)}else this._isBufferNullified=!1,a(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(e){this._nativeConvolverNode.normalize=e}},Yl=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return gc(o,a)||(o=e(a,{buffer:o.buffer,channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,disableNormalization:!o.normalize})),r.set(a,o),Yc(o)?await n(i,a,o.inputs[0]):await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},Xl=(e,t)=>(n,r,i)=>{if(t===null)throw Error(`Missing the native OfflineAudioContext constructor.`);try{return new t(n,r,i)}catch(t){throw t.name===`SyntaxError`?e():t}},Zl=()=>new DOMException(``,`DataCloneError`),Ql=e=>{let{port1:t,port2:n}=new MessageChannel;return new Promise(r=>{let i=()=>{n.onmessage=null,t.close(),n.close(),r()};n.onmessage=()=>i();try{t.postMessage(e,[e])}catch{}finally{i()}})},$l=(e,t,n,r,i,a,o,s,c,l,u)=>(d,f)=>{let p=o(d)?d:a(d);if(i.has(f)){let e=n();return Promise.reject(e)}try{i.add(f)}catch{}return t(c,()=>c(p))?p.decodeAudioData(f).then(n=>(Ql(f).catch(()=>{}),t(s,()=>s(n))||u(n),e.add(n),n)):new Promise((t,n)=>{let i=async()=>{try{await Ql(f)}catch{}},a=e=>{n(e),i()};try{p.decodeAudioData(f,n=>{typeof n.copyFromChannel!=`function`&&(l(n),bc(n)),e.add(n),i().then(()=>t(n))},e=>{a(e===null?r():e)})}catch(e){a(e)}})},eu=(e,t,n,r,i,a,o,s)=>(c,l)=>{let u=t.get(c);if(u===void 0)throw Error(`Missing the expected cycle count.`);let d=s(a(c.context));if(u===l){if(t.delete(c),!d&&o(c)){let t=r(c),{outputs:a}=n(c);for(let n of a)if(Gc(n))e(t,r(n[0]),n[1],n[2]);else{let e=i(n[0]);t.connect(e,n[1])}}}else t.set(c,u-l)},tu={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,delayTime:0,maxDelayTime:1},nu=(e,t,n,r,i,a,o)=>class extends e{constructor(e,s){let c=i(e),l={...tu,...s},u=r(c,l),d=a(c),f=d?n(l.maxDelayTime):null;super(e,!1,u,f),this._delayTime=t(this,d,u.delayTime),o(this,l.maxDelayTime)}get delayTime(){return this._delayTime}},ru=(e,t,n,r,i)=>a=>{let o=new WeakMap,s=async(s,c)=>{let l=n(s),u=gc(l,c);return u||(l=t(c,{channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,delayTime:l.delayTime.value,maxDelayTime:a})),o.set(c,l),u?await e(c,s.delayTime,l.delayTime):await r(c,s.delayTime,l.delayTime),await i(s,c,l),l};return{render(e,t){let n=o.get(t);return n===void 0?s(e,t):Promise.resolve(n)}}},iu=e=>(t,n,r,i)=>e(t[i],e=>e[0]===n&&e[1]===r),au=e=>(t,n)=>{e(t).delete(n)},ou=e=>`delayTime`in e,su=(e,t,n)=>function r(i,a){let o=Wc(a)?a:n(e,a);if(ou(o))return[];if(i[0]===o)return[i];if(i.includes(o))return[];let{outputs:s}=t(o);return Array.from(s).map(e=>r([...i,o],e[0])).reduce((e,t)=>e.concat(t),[])},cu=(e,t,n)=>{let r=t[n];if(r===void 0)throw e();return r},lu=e=>(t,n=void 0,r=void 0,i=0)=>n===void 0?t.forEach(e=>e.disconnect()):typeof n==`number`?cu(e,t,n).disconnect():sl(n)?r===void 0?t.forEach(e=>e.disconnect(n)):i===void 0?cu(e,t,r).disconnect(n,0):cu(e,t,r).disconnect(n,0,i):r===void 0?t.forEach(e=>e.disconnect(n)):cu(e,t,r).disconnect(n,0),uu={attack:.003,channelCount:2,channelCountMode:`clamped-max`,channelInterpretation:`speakers`,knee:30,ratio:12,release:.25,threshold:-24},du=(e,t,n,r,i,a,o,s)=>class extends e{constructor(e,i){let c=a(e),l=r(c,{...uu,...i}),u=o(c),d=u?n():null;super(e,!1,l,d),this._attack=t(this,u,l.attack),this._knee=t(this,u,l.knee),this._nativeDynamicsCompressorNode=l,this._ratio=t(this,u,l.ratio),this._release=t(this,u,l.release),this._threshold=t(this,u,l.threshold),s(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(e){let t=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=e,e>2)throw this._nativeDynamicsCompressorNode.channelCount=t,i()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(e){let t=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=e,e===`max`)throw this._nativeDynamicsCompressorNode.channelCountMode=t,i()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value==`number`?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},fu=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=async(o,s)=>{let c=n(o),l=gc(c,s);return l||(c=t(s,{attack:c.attack.value,channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,knee:c.knee.value,ratio:c.ratio.value,release:c.release.value,threshold:c.threshold.value})),a.set(s,c),l?(await e(s,o.attack,c.attack),await e(s,o.knee,c.knee),await e(s,o.ratio,c.ratio),await e(s,o.release,c.release),await e(s,o.threshold,c.threshold)):(await r(s,o.attack,c.attack),await r(s,o.knee,c.knee),await r(s,o.ratio,c.ratio),await r(s,o.release,c.release),await r(s,o.threshold,c.threshold)),await i(o,s,c),c};return{render(e,t){let n=a.get(t);return n===void 0?o(e,t):Promise.resolve(n)}}},pu=()=>new DOMException(``,`EncodingError`),mu=e=>t=>new Promise((n,r)=>{if(e===null){r(SyntaxError());return}let i=e.document.head;if(i===null)r(SyntaxError());else{let a=e.document.createElement(`script`),o=new Blob([t],{type:`application/javascript`}),s=URL.createObjectURL(o),c=e.onerror,l=()=>{e.onerror=c,URL.revokeObjectURL(s)};e.onerror=(t,n,i,a,o)=>{if(n===s||n===e.location.href&&i===1&&a===1)return l(),r(o),!1;if(c!==null)return c(t,n,i,a,o)},a.onerror=()=>{l(),r(SyntaxError())},a.onload=()=>{l(),n()},a.src=s,a.type=`module`,i.appendChild(a)}}),hu=e=>class{constructor(e){this._nativeEventTarget=e,this._listeners=new WeakMap}addEventListener(t,n,r){if(n!==null){let i=this._listeners.get(n);i===void 0&&(i=e(this,n),typeof n==`function`&&this._listeners.set(n,i)),this._nativeEventTarget.addEventListener(t,i,r)}}dispatchEvent(e){return this._nativeEventTarget.dispatchEvent(e)}removeEventListener(e,t,n){let r=t===null?void 0:this._listeners.get(t);this._nativeEventTarget.removeEventListener(e,r===void 0?null:r,n)}},gu=e=>(t,n,r)=>{Object.defineProperties(e,{currentFrame:{configurable:!0,get(){return Math.round(t*n)}},currentTime:{configurable:!0,get(){return t}}});try{return r()}finally{e!==null&&(delete e.currentFrame,delete e.currentTime)}},_u=e=>async t=>{try{let e=await fetch(t);if(e.ok)return[await e.text(),e.url]}catch{}throw e()},vu={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,gain:1},yu=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=i(e),c=r(s,{...vu,...o}),l=a(s),u=l?n():null;super(e,!1,c,u),this._gain=t(this,l,c.gain,wc,Cc)}get gain(){return this._gain}},bu=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=async(o,s)=>{let c=n(o),l=gc(c,s);return l||(c=t(s,{channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,gain:c.gain.value})),a.set(s,c),l?await e(s,o.gain,c.gain):await r(s,o.gain,c.gain),await i(o,s,c),c};return{render(e,t){let n=a.get(t);return n===void 0?o(e,t):Promise.resolve(n)}}},xu=(e,t)=>n=>t(e,n),Su=e=>t=>{let n=e(t);if(n.renderer===null)throw Error(`Missing the renderer of the given AudioNode in the audio graph.`);return n.renderer},Cu=e=>t=>e.get(t)??0,wu=e=>t=>{let n=e(t);if(n.renderer===null)throw Error(`Missing the renderer of the given AudioParam in the audio graph.`);return n.renderer},Tu=e=>t=>e.get(t),z=()=>new DOMException(``,`InvalidStateError`),Eu=e=>t=>{let n=e.get(t);if(n===void 0)throw z();return n},Du=(e,t)=>n=>{let r=e.get(n);if(r!==void 0)return r;if(t===null)throw Error(`Missing the native OfflineAudioContext constructor.`);return r=new t(1,1,44100),e.set(n,r),r},Ou=e=>t=>{let n=e.get(t);if(n===void 0)throw Error(`The context has no set of AudioWorkletNodes.`);return n},ku=()=>new DOMException(``,`InvalidAccessError`),Au=e=>{e.getFrequencyResponse=(t=>(n,r,i)=>{if(n.length!==r.length||r.length!==i.length)throw ku();return t.call(e,n,r,i)})(e.getFrequencyResponse)},ju={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`},Mu=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=r(e),c=i(s),l={...ju,...o},u=t(s,c?null:e.baseLatency,l),d=c?n(l.feedback,l.feedforward):null;super(e,!1,u,d),Au(u),this._nativeIIRFilterNode=u,a(this,1)}getFrequencyResponse(e,t,n){return this._nativeIIRFilterNode.getFrequencyResponse(e,t,n)}},Nu=(e,t,n,r,i,a,o,s,c,l,u)=>{let d=l.length,f=s;for(let s=0;s{let i=n instanceof Float64Array?n:new Float64Array(n),a=r instanceof Float64Array?r:new Float64Array(r),o=i.length,s=a.length,c=Math.min(o,s);if(i[0]!==1){for(let e=0;e(a,o)=>{let s=new WeakMap,c=null,l=async(l,u)=>{let d=null,f=t(l),p=gc(f,u);if(u.createIIRFilter===void 0?d=e(u,{buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):p||(f=u.createIIRFilter(o,a)),s.set(u,d===null?f:d),d!==null){if(c===null){if(n===null)throw Error(`Missing the native OfflineAudioContext constructor.`);let e=new n(l.context.destination.channelCount,l.context.length,u.sampleRate);c=(async()=>(await r(l,e,e.destination),Pu(await i(e),u,a,o)))()}let e=await c;return d.buffer=e,d.start(0),d}return await r(l,u,f),f};return{render(e,t){let n=s.get(t);return n===void 0?l(e,t):Promise.resolve(n)}}},Iu=(e,t,n,r,i,a)=>o=>(s,c)=>{let l=e.get(s);if(l===void 0){if(!o&&a(s)){let e=r(s),{outputs:a}=n(s);for(let n of a)if(Gc(n))t(e,r(n[0]),n[1],n[2]);else{let t=i(n[0]);e.disconnect(t,n[1])}}e.set(s,c)}else e.set(s,l+c)},Lu=(e,t)=>n=>t(e.get(n))||t(n),Ru=(e,t)=>n=>e.has(n)||t(n),zu=(e,t)=>n=>e.has(n)||t(n),Bu=(e,t)=>n=>t(e.get(n))||t(n),Vu=e=>t=>e!==null&&t instanceof e,Hu=e=>t=>e!==null&&typeof e.AudioNode==`function`&&t instanceof e.AudioNode,Uu=e=>t=>e!==null&&typeof e.AudioParam==`function`&&t instanceof e.AudioParam,Wu=(e,t)=>n=>e(n)||t(n),Gu=e=>t=>e!==null&&t instanceof e,Ku=e=>e!==null&&e.isSecureContext,qu=(e,t,n,r)=>class extends e{constructor(e,i){let a=n(e),o=t(a,i);if(r(a))throw TypeError();super(e,!0,o,null),this._nativeMediaElementAudioSourceNode=o}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},Ju={channelCount:2,channelCountMode:`explicit`,channelInterpretation:`speakers`},Yu=(e,t,n,r)=>class extends e{constructor(e,i){let a=n(e);if(r(a))throw TypeError();let o=t(a,{...Ju,...i});super(e,!1,o,null),this._nativeMediaStreamAudioDestinationNode=o}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},Xu=(e,t,n,r)=>class extends e{constructor(e,i){let a=n(e),o=t(a,i);if(r(a))throw TypeError();super(e,!0,o,null),this._nativeMediaStreamAudioSourceNode=o}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},Zu=(e,t,n)=>class extends e{constructor(e,r){let i=t(n(e),r);super(e,!0,i,null)}},Qu=(e,t,n,r,i,a)=>class extends n{constructor(n,a){super(n),this._nativeContext=n,Ws.set(this,n),r(n)&&i.set(n,new Set),this._destination=new e(this,a),this._listener=t(this,n),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(e){let t=typeof e==`function`?a(this,e):null;this._nativeContext.onstatechange=t;let n=this._nativeContext.onstatechange;this._onstatechange=n!==null&&n===t?e:n}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},$u=e=>{let t=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{let n=e.decodeAudioData(t.buffer,()=>{});return n===void 0?!1:(n.catch(()=>{}),!0)}catch{}return!1},ed=(e,t)=>(n,r,i)=>{let a=new Set;return n.connect=(i=>(o,s=0,c=0)=>{let l=a.size===0;if(t(o))return i.call(n,o,s,c),e(a,[o,s,c],e=>e[0]===o&&e[1]===s&&e[2]===c,!0),l&&r(),o;i.call(n,o,s),e(a,[o,s],e=>e[0]===o&&e[1]===s,!0),l&&r()})(n.connect),n.disconnect=(e=>(r,o,s)=>{let c=a.size>0;if(r===void 0)e.apply(n),a.clear();else if(typeof r==`number`){e.call(n,r);for(let e of a)e[1]===r&&a.delete(e)}else{t(r)?e.call(n,r,o,s):e.call(n,r,o);for(let e of a)e[0]===r&&(o===void 0||e[1]===o)&&(s===void 0||e[2]===s)&&a.delete(e)}let l=a.size===0;c&&l&&i()})(n.disconnect),n},B=(e,t,n)=>{let r=t[n];r!==void 0&&r!==e[n]&&(e[n]=r)},V=(e,t)=>{B(e,t,`channelCount`),B(e,t,`channelCountMode`),B(e,t,`channelInterpretation`)},td=e=>typeof e.getFloatTimeDomainData==`function`,nd=e=>{e.getFloatTimeDomainData=t=>{let n=new Uint8Array(t.length);e.getByteTimeDomainData(n);let r=Math.max(n.length,e.fftSize);for(let e=0;e(n,r)=>{let i=n.createAnalyser();if(V(i,r),!(r.maxDecibels>r.minDecibels))throw t();return B(i,r,`fftSize`),B(i,r,`maxDecibels`),B(i,r,`minDecibels`),B(i,r,`smoothingTimeConstant`),e(td,()=>td(i))||nd(i),i},id=e=>e===null?null:e.hasOwnProperty(`AudioBuffer`)?e.AudioBuffer:null,H=(e,t,n)=>{let r=t[n];r!==void 0&&r!==e[n].value&&(e[n].value=r)},ad=e=>{e.start=(t=>{let n=!1;return(r=0,i=0,a)=>{if(n)throw z();t.call(e,r,i,a),n=!0}})(e.start)},od=e=>{e.start=(t=>(n=0,r=0,i)=>{if(typeof i==`number`&&i<0||r<0||n<0)throw RangeError(`The parameters can't be negative.`);t.call(e,n,r,i)})(e.start)},sd=e=>{e.stop=(t=>(n=0)=>{if(n<0)throw RangeError(`The parameter can't be negative.`);t.call(e,n)})(e.stop)},cd=(e,t,n,r,i,a,o,s,c,l,u)=>(d,f)=>{let p=d.createBufferSource();return V(p,f),H(p,f,`playbackRate`),B(p,f,`buffer`),B(p,f,`loop`),B(p,f,`loopEnd`),B(p,f,`loopStart`),t(n,()=>n(d))||ad(p),t(r,()=>r(d))||c(p),t(i,()=>i(d))||l(p,d),t(a,()=>a(d))||od(p),t(o,()=>o(d))||u(p,d),t(s,()=>s(d))||sd(p),e(d,p),p},ld=e=>e===null?null:e.hasOwnProperty(`AudioContext`)?e.AudioContext:e.hasOwnProperty(`webkitAudioContext`)?e.webkitAudioContext:null,ud=(e,t)=>(n,r,i)=>{let a=n.destination;if(a.channelCount!==r)try{a.channelCount=r}catch{}i&&a.channelCountMode!==`explicit`&&(a.channelCountMode=`explicit`),a.maxChannelCount===0&&Object.defineProperty(a,"maxChannelCount",{value:r});let o=e(n,{channelCount:r,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,gain:1});return t(o,`channelCount`,e=>()=>e.call(o),e=>t=>{e.call(o,t);try{a.channelCount=t}catch(e){if(t>a.maxChannelCount)throw e}}),t(o,`channelCountMode`,e=>()=>e.call(o),e=>t=>{e.call(o,t),a.channelCountMode=t}),t(o,`channelInterpretation`,e=>()=>e.call(o),e=>t=>{e.call(o,t),a.channelInterpretation=t}),Object.defineProperty(o,"maxChannelCount",{get:()=>a.maxChannelCount}),o.connect(a),o},dd=e=>e===null?null:e.hasOwnProperty(`AudioWorkletNode`)?e.AudioWorkletNode:null,fd=e=>{let{port1:t}=new MessageChannel;try{t.postMessage(e)}finally{t.close()}},pd=(e,t,n,r,i)=>(a,o,s,c,l,u)=>{if(s!==null)try{let t=new s(a,c,u),r=new Map,o=null;if(Object.defineProperties(t,{channelCount:{get:()=>u.channelCount,set:()=>{throw e()}},channelCountMode:{get:()=>`explicit`,set:()=>{throw e()}},onprocessorerror:{get:()=>o,set:e=>{typeof o==`function`&&t.removeEventListener(`processorerror`,o),o=typeof e==`function`?e:null,typeof o==`function`&&t.addEventListener(`processorerror`,o)}}}),t.addEventListener=(e=>(...n)=>{if(n[0]===`processorerror`){let e=typeof n[1]==`function`?n[1]:typeof n[1]==`object`&&n[1]!==null&&typeof n[1].handleEvent==`function`?n[1].handleEvent:null;if(e!==null){let t=r.get(n[1]);t===void 0?(n[1]=t=>{t.type===`error`?(Object.defineProperties(t,{type:{value:`processorerror`}}),e(t)):e(new ErrorEvent(n[0],{...t}))},r.set(e,n[1])):n[1]=t}}return e.call(t,`error`,n[1],n[2]),e.call(t,...n)})(t.addEventListener),t.removeEventListener=(e=>(...n)=>{if(n[0]===`processorerror`){let e=r.get(n[1]);e!==void 0&&(r.delete(n[1]),n[1]=e)}return e.call(t,`error`,n[1],n[2]),e.call(t,n[0],n[1],n[2])})(t.removeEventListener),u.numberOfOutputs!==0){let e=n(a,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:0});return t.connect(e).connect(a.destination),i(t,()=>e.disconnect(),()=>e.connect(a.destination))}return t}catch(e){throw e.code===11?r():e}if(l===void 0)throw r();return fd(u),t(a,o,l,u)},md=(e,t)=>e===null?512:Math.max(512,Math.min(16384,2**Math.round(Math.log2(e*t)))),hd=e=>new Promise((t,n)=>{let{port1:r,port2:i}=new MessageChannel;r.onmessage=({data:e})=>{r.close(),i.close(),t(e)},r.onmessageerror=({data:e})=>{r.close(),i.close(),n(e)},i.postMessage(e)}),gd=async(e,t)=>new e(await hd(t)),_d=(e,t,n,r)=>{let i=Js.get(e);i===void 0&&(i=new WeakMap,Js.set(e,i));let a=gd(n,r);return i.set(t,a),a},vd=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>(p,m,h,g)=>{if(g.numberOfInputs===0&&g.numberOfOutputs===0)throw c();let _=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(_.some(e=>e<1))throw c();if(_.length!==g.numberOfOutputs)throw t();if(g.channelCountMode!==`explicit`)throw c();let v=g.channelCount*g.numberOfInputs,y=_.reduce((e,t)=>e+t,0),b=h.parameterDescriptors===void 0?0:h.parameterDescriptors.length;if(v+b>6||y>6)throw c();let x=new MessageChannel,S=[],C=[];for(let e=0;ee===void 0?0:e},maxValue:{get:()=>t===void 0?wc:t},minValue:{get:()=>n===void 0?Cc:n}}),w.push(i)}let T=r(p,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:Math.max(1,v+b)}),E=md(m,p.sampleRate),D=s(p,E,v+b,Math.max(1,y)),O=i(p,{channelCount:Math.max(1,y),channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:Math.max(1,y)}),k=[];for(let e=0;e{let n=w[t];return n.connect(T,0,v+t),n.start(0),[e,n.offset]}));T.connect(D);let te=g.channelInterpretation,ne=null,re=g.numberOfOutputs===0?[D]:k,A={get bufferSize(){return E},get channelCount(){return g.channelCount},set channelCount(e){throw n()},get channelCountMode(){return g.channelCountMode},set channelCountMode(e){throw n()},get channelInterpretation(){return te},set channelInterpretation(e){for(let t of S)t.channelInterpretation=e;te=e},get context(){return D.context},get inputs(){return S},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return ne},set onprocessorerror(e){typeof ne==`function`&&A.removeEventListener(`processorerror`,ne),ne=typeof e==`function`?e:null,typeof ne==`function`&&A.addEventListener(`processorerror`,ne)},get parameters(){return ee},get port(){return x.port2},addEventListener(...e){return D.addEventListener(e[0],e[1],e[2])},connect:e.bind(null,re),disconnect:l.bind(null,re),dispatchEvent(...e){return D.dispatchEvent(e[0])},removeEventListener(...e){return D.removeEventListener(e[0],e[1],e[2])}},j=new Map;x.port1.addEventListener=(e=>(...t)=>{if(t[0]===`message`){let e=typeof t[1]==`function`?t[1]:typeof t[1]==`object`&&t[1]!==null&&typeof t[1].handleEvent==`function`?t[1].handleEvent:null;if(e!==null){let n=j.get(t[1]);n===void 0?(t[1]=t=>{u(p.currentTime,p.sampleRate,()=>e(t))},j.set(e,t[1])):t[1]=n}}return e.call(x.port1,t[0],t[1],t[2])})(x.port1.addEventListener),x.port1.removeEventListener=(e=>(...t)=>{if(t[0]===`message`){let e=j.get(t[1]);e!==void 0&&(j.delete(t[1]),t[1]=e)}return e.call(x.port1,t[0],t[1],t[2])})(x.port1.removeEventListener);let ie=null;Object.defineProperty(x.port1,"onmessage",{get:()=>ie,set:e=>{typeof ie==`function`&&x.port1.removeEventListener(`message`,ie),ie=typeof e==`function`?e:null,typeof ie==`function`&&(x.port1.addEventListener(`message`,ie),x.port1.start())}}),h.prototype.port=x.port1;let M=null;_d(p,A,h,g).then(e=>M=e);let ae=Tl(g.numberOfInputs,g.channelCount),oe=Tl(g.numberOfOutputs,_),se=h.parameterDescriptors===void 0?[]:h.parameterDescriptors.reduce((e,{name:t})=>({...e,[t]:new Float32Array(128)}),{}),N=!0,ce=()=>{g.numberOfOutputs>0&&D.disconnect(O);for(let e=0,t=0;e{if(M!==null){let n=d(A);for(let r=0;r{Cl(e,se,t,v+n,r)});for(let e=0;e{if(n[t].size>0)return le.set(t,E/128),e;let r=le.get(t);return r===void 0?[]:(e.every(e=>e.every(e=>e===0))&&(r===1?le.delete(t):le.set(t,r-1)),e)});N=u(p.currentTime+r/p.sampleRate,p.sampleRate,()=>M.process(e,oe,se));for(let e=0,n=0;eD.connect(de).connect(p.destination),pe=()=>{D.disconnect(de),de.disconnect()};return fe(),f(A,()=>{if(N){pe(),g.numberOfOutputs>0&&D.connect(O);for(let e=0,t=0;e{N&&(fe(),ce()),ue=!1})},yd=(e,t)=>{let n=e.createBiquadFilter();return V(n,t),H(n,t,`Q`),H(n,t,`detune`),H(n,t,`frequency`),H(n,t,`gain`),B(n,t,`type`),n},bd=(e,t)=>(n,r)=>{let i=n.createChannelMerger(r.numberOfInputs);return e!==null&&e.name===`webkitAudioContext`&&t(n,i),V(i,r),i},xd=e=>{let t=e.numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>t,set:e=>{if(e!==t)throw z()}}),Object.defineProperty(e,"channelCountMode",{get:()=>`explicit`,set:e=>{if(e!==`explicit`)throw z()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>`discrete`,set:e=>{if(e!==`discrete`)throw z()}})},Sd=(e,t)=>{let n=e.createChannelSplitter(t.numberOfOutputs);return V(n,t),xd(n),n},Cd=(e,t,n,r,i)=>(a,o)=>{if(a.createConstantSource===void 0)return n(a,o);let s=a.createConstantSource();return V(s,o),H(s,o,`offset`),t(r,()=>r(a))||od(s),t(i,()=>i(a))||sd(s),e(a,s),s},wd=(e,t)=>(e.connect=t.connect.bind(t),e.disconnect=t.disconnect.bind(t),e),Td=(e,t,n,r)=>(i,{offset:a,...o})=>{let s=i.createBuffer(1,2,44100),c=t(i,{buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=n(i,{...o,gain:a}),u=s.getChannelData(0);return u[0]=1,u[1]=1,c.buffer=s,c.loop=!0,e(i,c),r(wd({get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(e){l.channelCount=e},get channelCountMode(){return l.channelCountMode},set channelCountMode(e){l.channelCountMode=e},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(e){l.channelInterpretation=e},get context(){return l.context},get inputs(){return[]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return l.numberOfOutputs},get offset(){return l.gain},get onended(){return c.onended},set onended(e){c.onended=e},addEventListener(...e){return c.addEventListener(e[0],e[1],e[2])},dispatchEvent(...e){return c.dispatchEvent(e[0])},removeEventListener(...e){return c.removeEventListener(e[0],e[1],e[2])},start(e=0){c.start.call(c,e)},stop(e=0){c.stop.call(c,e)}},l),()=>c.connect(l),()=>c.disconnect(l))},Ed=(e,t)=>(n,r)=>{let i=n.createConvolver();if(V(i,r),r.disableNormalization===i.normalize&&(i.normalize=!r.disableNormalization),B(i,r,`buffer`),r.channelCount>2||(t(i,`channelCount`,e=>()=>e.call(i),t=>n=>{if(n>2)throw e();return t.call(i,n)}),r.channelCountMode===`max`))throw e();return t(i,`channelCountMode`,e=>()=>e.call(i),t=>n=>{if(n===`max`)throw e();return t.call(i,n)}),i},Dd=(e,t)=>{let n=e.createDelay(t.maxDelayTime);return V(n,t),H(n,t,`delayTime`),n},Od=e=>(t,n)=>{let r=t.createDynamicsCompressor();if(V(r,n),n.channelCount>2||n.channelCountMode===`max`)throw e();return H(r,n,`attack`),H(r,n,`knee`),H(r,n,`ratio`),H(r,n,`release`),H(r,n,`threshold`),r},kd=(e,t)=>{let n=e.createGain();return V(n,t),H(n,t,`gain`),n},Ad=e=>(t,n,r)=>{if(t.createIIRFilter===void 0)return e(t,n,r);let i=t.createIIRFilter(r.feedforward,r.feedback);return V(i,r),i};function jd(e,t){let n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}function Md(e,t){return[e[0]*t[0]-e[1]*t[1],e[0]*t[1]+e[1]*t[0]]}function Nd(e,t){let n=[0,0];for(let r=e.length-1;r>=0;--r)n=Md(n,t),n[0]+=e[r];return n}var Pd=(e,t,n,r)=>(i,a,{channelCount:o,channelCountMode:s,channelInterpretation:c,feedback:l,feedforward:u})=>{let d=md(a,i.sampleRate),f=l instanceof Float64Array?l:new Float64Array(l),p=u instanceof Float64Array?u:new Float64Array(u),m=f.length,h=p.length,g=Math.min(m,h);if(m===0||m>20)throw r();if(f[0]===0)throw t();if(h===0||h>20)throw r();if(p[0]===0)throw t();if(f[0]!==1){for(let e=0;e{let t=e.inputBuffer,n=e.outputBuffer,r=t.numberOfChannels;for(let e=0;ee.createMediaElementSource(t.mediaElement),Id=(e,t)=>{let n=e.createMediaStreamDestination();return V(n,t),n.numberOfOutputs===1&&Object.defineProperty(n,"numberOfOutputs",{get:()=>0}),n},Ld=(e,{mediaStream:t})=>{let n=t.getAudioTracks();n.sort((e,t)=>e.idt.id));let r=n.slice(0,1),i=e.createMediaStreamSource(new MediaStream(r));return Object.defineProperty(i,"mediaStream",{value:t}),i},Rd=(e,t)=>(n,{mediaStreamTrack:r})=>{if(typeof n.createMediaStreamTrackSource==`function`)return n.createMediaStreamTrackSource(r);let i=new MediaStream([r]),a=n.createMediaStreamSource(i);if(r.kind!==`audio`)throw e();if(t(n))throw TypeError();return a},zd=e=>e===null?null:e.hasOwnProperty(`OfflineAudioContext`)?e.OfflineAudioContext:e.hasOwnProperty(`webkitOfflineAudioContext`)?e.webkitOfflineAudioContext:null,Bd=(e,t,n,r,i,a)=>(o,s)=>{let c=o.createOscillator();return V(c,s),H(c,s,`detune`),H(c,s,`frequency`),s.periodicWave===void 0?B(c,s,`type`):c.setPeriodicWave(s.periodicWave),t(n,()=>n(o))||od(c),t(r,()=>r(o))||a(c,o),t(i,()=>i(o))||sd(c),e(o,c),c},Vd=e=>(t,n)=>{let r=t.createPanner();return r.orientationX===void 0?e(t,n):(V(r,n),H(r,n,`orientationX`),H(r,n,`orientationY`),H(r,n,`orientationZ`),H(r,n,`positionX`),H(r,n,`positionY`),H(r,n,`positionZ`),B(r,n,`coneInnerAngle`),B(r,n,`coneOuterAngle`),B(r,n,`coneOuterGain`),B(r,n,`distanceModel`),B(r,n,`maxDistance`),B(r,n,`panningModel`),B(r,n,`refDistance`),B(r,n,`rolloffFactor`),r)},Hd=(e,t,n,r,i,a,o,s,c,l)=>(u,{coneInnerAngle:d,coneOuterAngle:f,coneOuterGain:p,distanceModel:m,maxDistance:h,orientationX:g,orientationY:_,orientationZ:v,panningModel:y,positionX:b,positionY:x,positionZ:S,refDistance:C,rolloffFactor:w,...T})=>{let E=u.createPanner();if(T.channelCount>2||T.channelCountMode===`max`)throw o();V(E,T);let D={channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`},O=n(u,{...D,channelInterpretation:`speakers`,numberOfInputs:6}),k=r(u,{...T,gain:1}),ee=r(u,{...D,gain:1}),te=r(u,{...D,gain:0}),ne=r(u,{...D,gain:0}),re=r(u,{...D,gain:0}),A=r(u,{...D,gain:0}),j=r(u,{...D,gain:0}),ie=i(u,256,6,1),M=a(u,{...D,curve:new Float32Array([1,1]),oversample:`none`}),ae=[g,_,v],oe=[b,x,S],se=new Float32Array(1);ie.onaudioprocess=({inputBuffer:e})=>{let t=[c(e,se,0),c(e,se,1),c(e,se,2)];t.some((e,t)=>e!==ae[t])&&(E.setOrientation(...t),ae=t);let n=[c(e,se,3),c(e,se,4),c(e,se,5)];n.some((e,t)=>e!==oe[t])&&(E.setPosition(...n),oe=n)},Object.defineProperty(te.gain,"defaultValue",{get:()=>0}),Object.defineProperty(ne.gain,"defaultValue",{get:()=>0}),Object.defineProperty(re.gain,"defaultValue",{get:()=>0}),Object.defineProperty(A.gain,"defaultValue",{get:()=>0}),Object.defineProperty(j.gain,"defaultValue",{get:()=>0});let N={get bufferSize(){},get channelCount(){return E.channelCount},set channelCount(e){if(e>2)throw o();k.channelCount=e,E.channelCount=e},get channelCountMode(){return E.channelCountMode},set channelCountMode(e){if(e===`max`)throw o();k.channelCountMode=e,E.channelCountMode=e},get channelInterpretation(){return E.channelInterpretation},set channelInterpretation(e){k.channelInterpretation=e,E.channelInterpretation=e},get coneInnerAngle(){return E.coneInnerAngle},set coneInnerAngle(e){E.coneInnerAngle=e},get coneOuterAngle(){return E.coneOuterAngle},set coneOuterAngle(e){E.coneOuterAngle=e},get coneOuterGain(){return E.coneOuterGain},set coneOuterGain(e){if(e<0||e>1)throw t();E.coneOuterGain=e},get context(){return E.context},get distanceModel(){return E.distanceModel},set distanceModel(e){E.distanceModel=e},get inputs(){return[k]},get maxDistance(){return E.maxDistance},set maxDistance(e){if(e<0)throw RangeError();E.maxDistance=e},get numberOfInputs(){return E.numberOfInputs},get numberOfOutputs(){return E.numberOfOutputs},get orientationX(){return ee.gain},get orientationY(){return te.gain},get orientationZ(){return ne.gain},get panningModel(){return E.panningModel},set panningModel(e){E.panningModel=e},get positionX(){return re.gain},get positionY(){return A.gain},get positionZ(){return j.gain},get refDistance(){return E.refDistance},set refDistance(e){if(e<0)throw RangeError();E.refDistance=e},get rolloffFactor(){return E.rolloffFactor},set rolloffFactor(e){if(e<0)throw RangeError();E.rolloffFactor=e},addEventListener(...e){return k.addEventListener(e[0],e[1],e[2])},dispatchEvent(...e){return k.dispatchEvent(e[0])},removeEventListener(...e){return k.removeEventListener(e[0],e[1],e[2])}};return d!==N.coneInnerAngle&&(N.coneInnerAngle=d),f!==N.coneOuterAngle&&(N.coneOuterAngle=f),p!==N.coneOuterGain&&(N.coneOuterGain=p),m!==N.distanceModel&&(N.distanceModel=m),h!==N.maxDistance&&(N.maxDistance=h),g!==N.orientationX.value&&(N.orientationX.value=g),_!==N.orientationY.value&&(N.orientationY.value=_),v!==N.orientationZ.value&&(N.orientationZ.value=v),y!==N.panningModel&&(N.panningModel=y),b!==N.positionX.value&&(N.positionX.value=b),x!==N.positionY.value&&(N.positionY.value=x),S!==N.positionZ.value&&(N.positionZ.value=S),C!==N.refDistance&&(N.refDistance=C),w!==N.rolloffFactor&&(N.rolloffFactor=w),(ae[0]!==1||ae[1]!==0||ae[2]!==0)&&E.setOrientation(...ae),(oe[0]!==0||oe[1]!==0||oe[2]!==0)&&E.setPosition(...oe),l(wd(N,E),()=>{k.connect(E),e(k,M,0,0),M.connect(ee).connect(O,0,0),M.connect(te).connect(O,0,1),M.connect(ne).connect(O,0,2),M.connect(re).connect(O,0,3),M.connect(A).connect(O,0,4),M.connect(j).connect(O,0,5),O.connect(ie).connect(u.destination)},()=>{k.disconnect(E),s(k,M,0,0),M.disconnect(ee),ee.disconnect(O),M.disconnect(te),te.disconnect(O),M.disconnect(ne),ne.disconnect(O),M.disconnect(re),re.disconnect(O),M.disconnect(A),A.disconnect(O),M.disconnect(j),j.disconnect(O),O.disconnect(ie),ie.disconnect(u.destination)})},Ud=e=>(t,{disableNormalization:n,imag:r,real:i})=>{let a=r instanceof Float32Array?r:new Float32Array(r),o=i instanceof Float32Array?i:new Float32Array(i),s=t.createPeriodicWave(o,a,{disableNormalization:n});if(Array.from(r).length<2)throw e();return s},Wd=(e,t,n,r)=>e.createScriptProcessor(t,n,r),Gd=(e,t)=>(n,r)=>{let i=r.channelCountMode;if(i===`clamped-max`)throw t();if(n.createStereoPanner===void 0)return e(n,r);let a=n.createStereoPanner();return V(a,r),H(a,r,`pan`),Object.defineProperty(a,"channelCountMode",{get:()=>i,set:e=>{if(e!==i)throw t()}}),a},Kd=(e,t,n,r,i,a)=>{let o=16385,s=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`},u={...l,oversample:`none`},d=(e,t,i,a)=>{let d=new Float32Array(o),f=new Float32Array(o);for(let e=0;e{let f=new Float32Array(o),p=new Float32Array(o),m=new Float32Array(o),h=new Float32Array(o),g=8192;for(let e=0;eg){let t=(e-g)/(o-1-g)*c;f[e]=Math.cos(t),p[e]=Math.sin(t),m[e]=0,h[e]=1}else{let t=e/(o-1-g)*c;f[e]=1,p[e]=0,m[e]=Math.cos(t),h[e]=Math.sin(t)}let _=t(e,{channelCount:2,channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:2}),v=n(e,{...l,gain:0}),y=r(e,{...u,curve:f}),b=n(e,{...l,gain:0}),x=r(e,{...u,curve:p}),S=r(e,{...u,curve:s}),C=n(e,{...l,gain:0}),w=r(e,{...u,curve:m}),T=n(e,{...l,gain:0}),E=r(e,{...u,curve:h});return{connectGraph(){i.connect(_),i.connect(S.inputs===void 0?S:S.inputs[0]),_.connect(v,0),_.connect(b,0),_.connect(C,1),_.connect(T,1),S.connect(a),a.connect(y.inputs===void 0?y:y.inputs[0]),a.connect(x.inputs===void 0?x:x.inputs[0]),a.connect(w.inputs===void 0?w:w.inputs[0]),a.connect(E.inputs===void 0?E:E.inputs[0]),y.connect(v.gain),x.connect(b.gain),w.connect(C.gain),E.connect(T.gain),v.connect(d,0,0),C.connect(d,0,0),b.connect(d,0,1),T.connect(d,0,1)},disconnectGraph(){i.disconnect(_),i.disconnect(S.inputs===void 0?S:S.inputs[0]),_.disconnect(v,0),_.disconnect(b,0),_.disconnect(C,1),_.disconnect(T,1),S.disconnect(a),a.disconnect(y.inputs===void 0?y:y.inputs[0]),a.disconnect(x.inputs===void 0?x:x.inputs[0]),a.disconnect(w.inputs===void 0?w:w.inputs[0]),a.disconnect(E.inputs===void 0?E:E.inputs[0]),y.disconnect(v.gain),x.disconnect(b.gain),w.disconnect(C.gain),E.disconnect(T.gain),v.disconnect(d,0,0),C.disconnect(d,0,0),b.disconnect(d,0,1),T.disconnect(d,0,1)}}},p=(e,t,n,r,a)=>{if(t===1)return d(e,n,r,a);if(t===2)return f(e,n,r,a);throw i()};return(t,{channelCount:r,channelCountMode:o,pan:s,...c})=>{if(o===`max`)throw i();let l=e(t,{...c,channelCount:1,channelCountMode:o,numberOfInputs:2}),u=n(t,{...c,channelCount:r,channelCountMode:o,gain:1}),d=n(t,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:s}),{connectGraph:f,disconnectGraph:m}=p(t,r,u,d,l);Object.defineProperty(d.gain,"defaultValue",{get:()=>0}),Object.defineProperty(d.gain,"maxValue",{get:()=>1}),Object.defineProperty(d.gain,"minValue",{get:()=>-1});let h={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(e){u.channelCount!==e&&(g&&m(),{connectGraph:f,disconnectGraph:m}=p(t,e,u,d,l),g&&f()),u.channelCount=e},get channelCountMode(){return u.channelCountMode},set channelCountMode(e){if(e===`clamped-max`||e===`max`)throw i();u.channelCountMode=e},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(e){u.channelInterpretation=e},get context(){return u.context},get inputs(){return[u]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get pan(){return d.gain},addEventListener(...e){return u.addEventListener(e[0],e[1],e[2])},dispatchEvent(...e){return u.dispatchEvent(e[0])},removeEventListener(...e){return u.removeEventListener(e[0],e[1],e[2])}},g=!1;return a(wd(h,l),()=>{f(),g=!0},()=>{m(),g=!1})}},qd=(e,t,n,r,i,a,o)=>(s,c)=>{let l=s.createWaveShaper();if(a!==null&&a.name===`webkitAudioContext`&&s.createGain().gain.automationRate===void 0)return n(s,c);V(l,c);let u=c.curve===null||c.curve instanceof Float32Array?c.curve:new Float32Array(c.curve);if(u!==null&&u.length<2)throw t();B(l,{curve:u},`curve`),B(l,c,`oversample`);let d=null,f=!1;return o(l,`curve`,e=>()=>e.call(l),t=>n=>(t.call(l,n),f&&(r(n)&&d===null?d=e(s,l):!r(n)&&d!==null&&(d(),d=null)),n)),i(l,()=>{f=!0,r(l.curve)&&(d=e(s,l))},()=>{f=!1,d!==null&&(d(),d=null)})},Jd=(e,t,n,r,i)=>(a,{curve:o,oversample:s,...c})=>{let l=a.createWaveShaper(),u=a.createWaveShaper();V(l,c),V(u,c);let d=n(a,{...c,gain:1}),f=n(a,{...c,gain:-1}),p=n(a,{...c,gain:1}),m=n(a,{...c,gain:-1}),h=null,g=!1,_=null,v={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(e){d.channelCount=e,f.channelCount=e,l.channelCount=e,p.channelCount=e,u.channelCount=e,m.channelCount=e},get channelCountMode(){return l.channelCountMode},set channelCountMode(e){d.channelCountMode=e,f.channelCountMode=e,l.channelCountMode=e,p.channelCountMode=e,u.channelCountMode=e,m.channelCountMode=e},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(e){d.channelInterpretation=e,f.channelInterpretation=e,l.channelInterpretation=e,p.channelInterpretation=e,u.channelInterpretation=e,m.channelInterpretation=e},get context(){return l.context},get curve(){return _},set curve(n){if(n!==null&&n.length<2)throw t();if(n===null)l.curve=n,u.curve=n;else{let e=n.length,t=new Float32Array(e+2-e%2),r=new Float32Array(e+2-e%2);t[0]=n[0],r[0]=-n[e-1];let i=Math.ceil((e+1)/2),a=(e+1)/2-1;for(let o=1;o{d.connect(l).connect(p),d.connect(f).connect(u).connect(m).connect(p),g=!0,r(_)&&(h=e(a,d))},()=>{d.disconnect(l),l.disconnect(p),d.disconnect(f),f.disconnect(u),u.disconnect(m),m.disconnect(p),g=!1,h!==null&&(h(),h=null)})},Yd=()=>new DOMException(``,`NotSupportedError`),Xd={numberOfChannels:1},Zd=(e,t,n,r,i)=>class extends e{constructor(e,n,i){let a;if(typeof e==`number`&&n!==void 0&&i!==void 0)a={length:n,numberOfChannels:e,sampleRate:i};else if(typeof e==`object`)a=e;else throw Error(`The given parameters are not valid.`);let{length:o,numberOfChannels:s,sampleRate:c}={...Xd,...a},l=r(s,o,c);t($u,()=>$u(l))||l.addEventListener(`statechange`,(()=>{let e=0,t=n=>{this._state===`running`&&(e>0?(l.removeEventListener(`statechange`,t),n.stopImmediatePropagation(),this._waitForThePromiseToSettle(n)):e+=1)};return t})()),super(l,s),this._length=o,this._nativeOfflineAudioContext=l,this._state=null}get length(){return this._nativeOfflineAudioContext.length===void 0?this._length:this._nativeOfflineAudioContext.length}get state(){return this._state===null?this._nativeOfflineAudioContext.state:this._state}startRendering(){return this._state===`running`?Promise.reject(n()):(this._state=`running`,i(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,Rc(this)}))}_waitForThePromiseToSettle(e){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(e):setTimeout(()=>this._waitForThePromiseToSettle(e))}},Qd={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,detune:0,frequency:440,periodicWave:void 0,type:`sine`},$d=(e,t,n,r,i,a,o)=>class extends e{constructor(e,o){let s=i(e),c={...Qd,...o},l=n(s,c),u=a(s),d=u?r():null,f=e.sampleRate/2;super(e,!1,l,d),this._detune=t(this,u,l.detune,153600,-153600),this._frequency=t(this,u,l.frequency,f,-f),this._nativeOscillatorNode=l,this._onended=null,this._oscillatorNodeRenderer=d,this._oscillatorNodeRenderer!==null&&c.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=c.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(e){let t=typeof e==`function`?o(this,e):null;this._nativeOscillatorNode.onended=t;let n=this._nativeOscillatorNode.onended;this._onended=n!==null&&n===t?e:n}get type(){return this._nativeOscillatorNode.type}set type(e){this._nativeOscillatorNode.type=e,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(e){this._nativeOscillatorNode.setPeriodicWave(e),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=e)}start(e=0){if(this._nativeOscillatorNode.start(e),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=e),this.context.state!==`closed`){oc(this);let e=()=>{this._nativeOscillatorNode.removeEventListener(`ended`,e),Tc(this)&&cc(this)};this._nativeOscillatorNode.addEventListener(`ended`,e)}}stop(e=0){this._nativeOscillatorNode.stop(e),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=e)}},ef=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=null,s=null,c=null,l=async(l,u)=>{let d=n(l),f=gc(d,u);return f||(d=t(u,{channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:o===null?void 0:o,type:d.type}),s!==null&&d.start(s),c!==null&&d.stop(c)),a.set(u,d),f?(await e(u,l.detune,d.detune),await e(u,l.frequency,d.frequency)):(await r(u,l.detune,d.detune),await r(u,l.frequency,d.frequency)),await i(l,u,d),d};return{set periodicWave(e){o=e},set start(e){s=e},set stop(e){c=e},render(e,t){let n=a.get(t);return n===void 0?l(e,t):Promise.resolve(n)}}},tf={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},nf=(e,t,n,r,i,a,o)=>class extends e{constructor(e,s){let c=i(e),l=n(c,{...tf,...s}),u=a(c),d=u?r():null;super(e,!1,l,d),this._nativePannerNode=l,this._orientationX=t(this,u,l.orientationX,wc,Cc),this._orientationY=t(this,u,l.orientationY,wc,Cc),this._orientationZ=t(this,u,l.orientationZ,wc,Cc),this._positionX=t(this,u,l.positionX,wc,Cc),this._positionY=t(this,u,l.positionY,wc,Cc),this._positionZ=t(this,u,l.positionZ,wc,Cc),o(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(e){this._nativePannerNode.coneInnerAngle=e}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(e){this._nativePannerNode.coneOuterAngle=e}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(e){this._nativePannerNode.coneOuterGain=e}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(e){this._nativePannerNode.distanceModel=e}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(e){this._nativePannerNode.maxDistance=e}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(e){this._nativePannerNode.panningModel=e}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(e){this._nativePannerNode.refDistance=e}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(e){this._nativePannerNode.rolloffFactor=e}},rf=(e,t,n,r,i,a,o,s,c,l)=>()=>{let u=new WeakMap,d=null,f=async(f,p)=>{let m=null,h=a(f),g={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation},_={...g,coneInnerAngle:h.coneInnerAngle,coneOuterAngle:h.coneOuterAngle,coneOuterGain:h.coneOuterGain,distanceModel:h.distanceModel,maxDistance:h.maxDistance,panningModel:h.panningModel,refDistance:h.refDistance,rolloffFactor:h.rolloffFactor},v=gc(h,p);if(`bufferSize`in h?m=r(p,{...g,gain:1}):v||(h=i(p,{..._,orientationX:h.orientationX.value,orientationY:h.orientationY.value,orientationZ:h.orientationZ.value,positionX:h.positionX.value,positionY:h.positionY.value,positionZ:h.positionZ.value})),u.set(p,m===null?h:m),m!==null){if(d===null){if(o===null)throw Error(`Missing the native OfflineAudioContext constructor.`);let e=new o(6,f.context.length,p.sampleRate),r=t(e,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:6});r.connect(e.destination),d=(async()=>{let t=await Promise.all([f.orientationX,f.orientationY,f.orientationZ,f.positionX,f.positionY,f.positionZ].map(async(t,r)=>{let i=n(e,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,offset:+(r===0)});return await s(e,t,i.offset),i}));for(let e=0;e<6;e+=1)t[e].connect(r,0,e),t[e].start(0);return l(e)})()}let e=await d,a=r(p,{...g,gain:1});await c(f,p,a);let u=[];for(let t=0;te!==h[t])||n.some((e,t)=>e!==v[t])){h=e,v=n;let o=t/p.sampleRate;y.gain.setValueAtTime(0,o),y=r(p,{...g,gain:0}),b=i(p,{..._,orientationX:h[0],orientationY:h[1],orientationZ:h[2],positionX:v[0],positionY:v[1],positionZ:v[2]}),y.gain.setValueAtTime(1,o),a.connect(y).connect(b.inputs[0]),b.connect(m)}}return m}return v?(await e(p,f.orientationX,h.orientationX),await e(p,f.orientationY,h.orientationY),await e(p,f.orientationZ,h.orientationZ),await e(p,f.positionX,h.positionX),await e(p,f.positionY,h.positionY),await e(p,f.positionZ,h.positionZ)):(await s(p,f.orientationX,h.orientationX),await s(p,f.orientationY,h.orientationY),await s(p,f.orientationZ,h.orientationZ),await s(p,f.positionX,h.positionX),await s(p,f.positionY,h.positionY),await s(p,f.positionZ,h.positionZ)),Yc(h)?await c(f,p,h.inputs[0]):await c(f,p,h),h};return{render(e,t){let n=u.get(t);return n===void 0?f(e,t):Promise.resolve(n)}}},af={disableNormalization:!1},of=(e,t,n,r)=>class i{constructor(i,a){let o=e(t(i),r({...af,...a}));return n.add(o),o}static[Symbol.hasInstance](e){return typeof e==`object`&&!!e&&Object.getPrototypeOf(e)===i.prototype||n.has(e)}},sf=(e,t)=>(n,r,i)=>(e(r).replay(i),t(r,n,i)),cf=(e,t,n)=>async(r,i,a)=>{let o=e(r);await Promise.all(o.activeInputs.map((e,o)=>Array.from(e).map(async([e,s])=>{let c=await t(e).render(e,i),l=r.context.destination;!n(e)&&(r!==l||!n(r))&&c.connect(a,s,o)})).reduce((e,t)=>[...e,...t],[]))},lf=(e,t,n)=>async(r,i,a)=>{let o=t(r);await Promise.all(Array.from(o.activeInputs).map(async([t,r])=>{let o=await e(t).render(t,i);n(t)||o.connect(a,r)}))},uf=(e,t,n,r)=>i=>e($u,()=>$u(i))?Promise.resolve(e(r,r)).then(e=>{if(!e){let e=n(i,512,0,1);i.oncomplete=()=>{e.onaudioprocess=null,e.disconnect()},e.onaudioprocess=()=>i.currentTime,e.connect(i.destination)}return i.startRendering()}):new Promise(e=>{let n=t(i,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:0});i.oncomplete=t=>{n.disconnect(),e(t.renderedBuffer)},n.connect(i.destination),i.startRendering()}),df=e=>(t,n)=>{e.set(t,n)},ff=e=>(t,n)=>e.set(t,n),pf=(e,t,n,r,i,a,o,s)=>(c,l)=>n(c).render(c,l).then(()=>Promise.all(Array.from(r(l)).map(e=>n(e).render(e,l)))).then(()=>i(l)).then(n=>(typeof n.copyFromChannel==`function`?t(a,()=>a(n))||s(n):(o(n),bc(n)),e.add(n),n)),mf={channelCount:2,channelCountMode:`explicit`,channelInterpretation:`speakers`,pan:0},hf=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=i(e),c=n(s,{...mf,...o}),l=a(s),u=l?r():null;super(e,!1,c,u),this._pan=t(this,l,c.pan)}get pan(){return this._pan}},gf=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=async(o,s)=>{let c=n(o),l=gc(c,s);return l||(c=t(s,{channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,pan:c.pan.value})),a.set(s,c),l?await e(s,o.pan,c.pan):await r(s,o.pan,c.pan),Yc(c)?await i(o,s,c.inputs[0]):await i(o,s,c),c};return{render(e,t){let n=a.get(t);return n===void 0?o(e,t):Promise.resolve(n)}}},_f=e=>()=>{if(e===null)return!1;try{new e({length:1,sampleRate:44100})}catch{return!1}return!0},vf=(e,t)=>async()=>{if(e===null)return!0;if(t===null)return!1;let n=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`}),r=new t(1,128,44100),i=URL.createObjectURL(n),a=!1,o=!1;try{await r.audioWorklet.addModule(i);let t=new e(r,`a`,{numberOfOutputs:0}),n=r.createOscillator();t.port.onmessage=()=>a=!0,t.onprocessorerror=()=>o=!0,n.connect(t),n.start(0),await r.startRendering(),await new Promise(e=>setTimeout(e))}catch{}finally{URL.revokeObjectURL(i)}return a&&!o},yf=(e,t)=>()=>{if(t===null)return Promise.resolve(!1);let n=new t(1,1,44100),r=e(n,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:0});return new Promise(e=>{n.oncomplete=()=>{r.disconnect(),e(n.currentTime!==0)},n.startRendering()})},bf=()=>new DOMException(``,`UnknownError`),xf={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,curve:null,oversample:`none`},Sf=(e,t,n,r,i,a,o)=>class extends e{constructor(e,t){let s=i(e),c=n(s,{...xf,...t}),l=a(s)?r():null;super(e,!0,c,l),this._isCurveNullified=!1,this._nativeWaveShaperNode=c,o(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(e){if(e===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(e.length<2)throw t();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=e}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(e){this._nativeWaveShaperNode.oversample=e}},Cf=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return gc(o,a)||(o=e(a,{channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,curve:o.curve,oversample:o.oversample})),r.set(a,o),Yc(o)?await n(i,a,o.inputs[0]):await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},wf=()=>typeof window>`u`?null:window,Tf=(e,t)=>n=>{n.copyFromChannel=(r,i,a=0)=>{let o=e(a),s=e(i);if(s>=n.numberOfChannels)throw t();let c=n.length,l=n.getChannelData(s),u=r.length;for(let e=o<0?-o:0;e+o{let o=e(a),s=e(i);if(s>=n.numberOfChannels)throw t();let c=n.length,l=n.getChannelData(s),u=r.length;for(let e=o<0?-o:0;e+ot=>{t.copyFromChannel=(n=>(r,i,a=0)=>{let o=e(a),s=e(i);if(o(r,i,a=0)=>{let o=e(a),s=e(i);if(o(t,n)=>{let r=n.createBuffer(1,1,44100);t.buffer===null&&(t.buffer=r),e(t,`buffer`,e=>()=>{let n=e.call(t);return n===r?null:n},e=>n=>e.call(t,n===null?r:n))},Of=(e,t)=>(n,r)=>{r.channelCount=1,r.channelCountMode=`explicit`,Object.defineProperty(r,"channelCount",{get:()=>1,set:()=>{throw e()}}),Object.defineProperty(r,"channelCountMode",{get:()=>`explicit`,set:()=>{throw e()}});let i=n.createBufferSource();t(r,()=>{let e=r.numberOfInputs;for(let t=0;ti.disconnect(r))},kf=(e,t,n)=>e.copyFromChannel===void 0?e.getChannelData(n)[0]:(e.copyFromChannel(t,n),t[0]),Af=e=>{if(e===null)return!1;let t=e.length;return t%2==0?e[t/2-1]+e[t/2]!==0:e[Math.floor(t/2)]!==0},jf=(e,t,n,r)=>{let i=e;for(;!i.hasOwnProperty(t);)i=Object.getPrototypeOf(i);let{get:a,set:o}=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,{get:n(a),set:r(o)})},Mf=e=>({...e,outputChannelCount:e.outputChannelCount===void 0?e.numberOfInputs===1&&e.numberOfOutputs===1?[e.channelCount]:Array.from({length:e.numberOfOutputs},()=>1):e.outputChannelCount}),Nf=e=>({...e,channelCount:e.numberOfOutputs}),Pf=e=>{let{imag:t,real:n}=e;return t===void 0?n===void 0?{...e,imag:[0,0],real:[0,0]}:{...e,imag:Array.from(n,()=>0),real:n}:n===void 0?{...e,imag:t,real:Array.from(t,()=>0)}:{...e,imag:t,real:n}},Ff=(e,t,n)=>{try{e.setValueAtTime(t,n)}catch(r){if(r.code!==9)throw r;Ff(e,t,n+1e-7)}},If=e=>{let t=e.createBufferSource();t.start();try{t.start()}catch{return!0}return!1},Lf=e=>{let t=e.createBufferSource();t.buffer=e.createBuffer(1,1,44100);try{t.start(0,1)}catch{return!1}return!0},Rf=e=>{let t=e.createBufferSource();t.start();try{t.stop()}catch{return!1}return!0},zf=e=>{let t=e.createOscillator();try{t.start(-1)}catch(e){return e instanceof RangeError}return!1},Bf=e=>{let t=e.createBuffer(1,1,44100),n=e.createBufferSource();n.buffer=t,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},Vf=e=>{let t=e.createOscillator();try{t.stop(-1)}catch(e){return e instanceof RangeError}return!1},Hf=e=>{let{port1:t,port2:n}=new MessageChannel;try{t.postMessage(e)}finally{t.close(),n.close()}},Uf=e=>{e.start=(t=>(n=0,r=0,i)=>{let a=e.buffer,o=a===null?r:Math.min(a.duration,r);a!==null&&o>a.duration-.5/e.context.sampleRate?t.call(e,n,0,0):t.call(e,n,o,i)})(e.start)},Wf=(e,t)=>{let n=t.createGain();e.connect(n);let r=(t=>()=>{t.call(e,n),e.removeEventListener(`ended`,r)})(e.disconnect);e.addEventListener(`ended`,r),wd(e,n),e.stop=(t=>{let r=!1;return(i=0)=>{if(r)try{t.call(e,i)}catch{n.gain.setValueAtTime(0,i)}else t.call(e,i),r=!0}})(e.stop)},Gf=(e,t)=>n=>{let r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),typeof t==`function`?t.call(e,n):t.handleEvent.call(e,n)},Kf=Is(Kc),qf=dc(Kc),Jf=iu(rc),Yf=new WeakMap,Xf=Cu(Yf),Zf=Nl(new Map,new WeakMap),Qf=wf(),$f=rd(Zf,yc),ep=Su(Fc),tp=cf(Fc,ep,rl),np=_c($f,R,tp),U=Eu(Ws),rp=zd(Qf),W=Gu(rp),ip=new WeakMap,ap=hu(Gf),op=ld(Qf),sp=Vu(op),cp=Hu(Qf),lp=Uu(Qf),up=dd(Qf),G=_l(Ls(Bs),uc(Kf,qf,Xc,Jf,tl,Fc,Xf,ac,R,Kc,Tc,rl,il),Zf,Iu(Ks,tl,Fc,R,nl,Tc),yc,ku,Yd,eu(Xc,Ks,Fc,R,nl,U,Tc,W),su(ip,Fc,nc),ap,U,sp,cp,lp,W,up),dp=hc(G,np,yc,$f,U,W),fp=new WeakSet,pp=id(Qf),mp=Kl(new Uint32Array(1)),hp=Tf(mp,yc),gp=Ef(mp),_p=Sc(fp,Zf,Yd,pp,rp,_f(pp),hp,gp),vp=fc(kd),yp=lf(ep,Ic,rl),bp=Bl(yp),xp=cd(vp,Zf,If,Lf,Rf,zf,Bf,Vf,Uf,Df(jf),Wf),Sp=sf(wu(Ic),yp),Cp=Oc(bp,xp,R,Sp,tp),wp=vl(Rs(Hs),ip,Us,yl,Ps.createCancelAndHoldAutomationEvent,Ps.createCancelScheduledValuesAutomationEvent,Ps.createExponentialRampToValueAutomationEvent,Ps.createLinearRampToValueAutomationEvent,Ps.createSetTargetAutomationEvent,Ps.createSetValueAutomationEvent,Ps.createSetValueCurveAutomationEvent,op,Ff),Tp=Dc(G,Cp,wp,z,xp,U,W,Gf),Ep=Vc(G,Hc,yc,z,ud(kd,jf),U,W,tp),Dp=Ml(bp,yd,R,Sp,tp),Op=ff(Yf),kp=jl(G,wp,Dp,ku,yd,U,W,Op),Ap=ed(Kc,cp),jp=bd(op,Of(z,Ap)),Mp=Fl(G,Il(jp,R,tp),jp,U,W),Np=Rl(G,zl(Sd,R,tp),Sd,U,W,Nf),Pp=Cd(vp,Zf,Td(vp,xp,kd,Ap),zf,Vf),Fp=Wl(G,wp,Gl(bp,Pp,R,Sp,tp),Pp,U,W,Gf),Ip=Ed(Yd,jf),Lp=Jl(G,Yl(Ip,R,tp),Ip,U,W,Op),Rp=nu(G,wp,ru(bp,Dd,R,Sp,tp),Dd,U,W,Op),zp=Od(Yd),Bp=du(G,wp,fu(bp,zp,R,Sp,tp),zp,Yd,U,W,Op),Vp=yu(G,wp,bu(bp,kd,R,Sp,tp),kd,U,W),Hp=Pd(ku,z,Wd,Yd),Up=uf(Zf,kd,Wd,yf(kd,rp)),Wp=Fu(xp,R,rp,tp,Up),Gp=Mu(G,Ad(Hp),Wp,U,W,Op),Kp=Uc(wp,jp,Pp,Wd,Yd,kf,W,jf),qp=new WeakMap,Jp=Qu(Ep,Kp,ap,W,qp,Gf),Yp=Bd(vp,Zf,zf,Bf,Vf,Wf),Xp=$d(G,wp,Yp,ef(bp,Yp,R,Sp,tp),U,W,Gf),Zp=Hl(xp),Qp=qd(Zp,z,Jd(Zp,z,kd,Af,Ap),Af,Ap,op,jf),$p=Vd(Hd(Xc,z,jp,kd,Wd,Qp,Yd,tl,kf,Ap)),em=nf(G,wp,$p,rf(bp,jp,Pp,kd,$p,R,rp,Sp,tp,Up),U,W,Op),tm=of(Ud(yc),U,new WeakSet,Pf),nm=Gd(Kd(jp,Sd,kd,Qp,Yd,Ap),Yd),rm=hf(G,wp,nm,gf(bp,nm,R,Sp,tp),U,W),im=Sf(G,z,Qp,Cf(Qp,R,tp),U,W,Op),am=Ku(Qf),om=gu(Qf),sm=new WeakMap,cm=Du(sm,rp),lm=am?tc(Zf,Yd,mu(Qf),om,_u(Fs),U,cm,W,up,new WeakMap,new WeakMap,vf(up,rp),Qf):void 0,um=Wu(sp,W),dm=kl(lm,dp,_p,Tp,kp,Mp,Np,Fp,Lp,$l(fp,Zf,Zl,pu,new WeakSet,U,um,vc,$u,hp,gp),Rp,Bp,Vp,Gp,Jp,Xp,em,tm,rm,im),fm=Bc(dm,z,Yd,bf,qu(G,Fd,U,W),Yu(G,Id,U,W),Xu(G,Ld,U,W),Zu(G,Rd(z,W),U),op),pm=Ou(qp),mm=pc(pm),hm=Vl(yc),gm=au(pm),_m=lu(yc),vm=new WeakMap,ym=pd(z,vd(hm,yc,z,jp,Sd,Pp,kd,Wd,Yd,_m,om,xu(vm,nc),Ap),kd,Yd,Ap),bm=Ol(bp,hm,xp,jp,Sd,Pp,kd,gm,_m,om,R,up,rp,Sp,tp,Up),xm=Tu(sm),Sm=df(vm),Cm=am?Sl(mm,G,wp,bm,ym,Fc,xm,U,W,up,Mf,Sm,Hf,Gf):void 0,wm=Zd(dm,Zf,z,Xl(Yd,rp),pf(fp,Zf,ep,pm,Up,vc,hp,gp)),Tm=Lu(Ws,sp),Em=Ru(Vs,cp),Dm=zu(Us,lp),Om=Bu(Ws,W);function km(e){return e===void 0}function K(e){return e!==void 0}function Am(e){return typeof e==`function`}function jm(e){return typeof e==`number`}function Mm(e){return Object.prototype.toString.call(e)===`[object Object]`&&e.constructor===Object}function Nm(e){return typeof e==`boolean`}function Pm(e){return Array.isArray(e)}function Fm(e){return typeof e==`string`}function Im(e){return Fm(e)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(e)}function q(e,t){if(!e)throw Error(t)}function Lm(e,t,n=1/0){if(!(t<=e&&e<=n))throw RangeError(`Value must be within [${t}, ${n}], got: ${e}`)}function Rm(e){!e.isOffline&&e.state!==`running`&&Gm(`The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.`)}var zm=!1,Bm=!1;function Vm(e){zm=e}function Hm(e){km(e)&&zm&&!Bm&&(Bm=!0,Gm(`Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing`))}var Um=console;function Wm(...e){Um.log(...e)}function Gm(...e){Um.warn(...e)}function Km(e){return new fm(e)}function qm(e,t,n){return new wm(e,t,n)}var Jm=typeof self==`object`?self:null,Ym=Jm&&(Jm.hasOwnProperty(`AudioContext`)||Jm.hasOwnProperty(`webkitAudioContext`));function Xm(e,t,n){return q(K(Cm),`AudioWorkletNode only works in a secure context (https or localhost)`),new(e instanceof Jm?.BaseAudioContext?Jm?.AudioWorkletNode:Cm)(e,t,n)}function Zm(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function J(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var Qm=class{constructor(e,t,n,r){this._callback=e,this._type=t,this._minimumUpdateInterval=Math.max(128/(r||44100),.001),this.updateInterval=n,this._createClock()}_createWorker(){let e=new Blob([` +var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function t(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var n={},r=[],i=()=>{},a=()=>!1,o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith(`onUpdate:`),c=Object.assign,l=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>S(e)===`[object Map]`,m=e=>S(e)===`[object Set]`,h=e=>S(e)===`[object Date]`,g=e=>typeof e==`function`,_=e=>typeof e==`string`,v=e=>typeof e==`symbol`,y=e=>typeof e==`object`&&!!e,b=e=>(y(e)||g(e))&&g(e.then)&&g(e.catch),x=Object.prototype.toString,S=e=>x.call(e),C=e=>S(e).slice(8,-1),w=e=>S(e)===`[object Object]`,T=e=>_(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,E=t(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),D=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},O=/-\w/g,k=D(e=>e.replace(O,e=>e.slice(1).toUpperCase())),ee=/\B([A-Z])/g,te=D(e=>e.replace(ee,`-$1`).toLowerCase()),ne=D(e=>e.charAt(0).toUpperCase()+e.slice(1)),re=D(e=>e?`on${ne(e)}`:``),A=(e,t)=>!Object.is(e,t),j=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},M=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ae=e=>{let t=_(e)?Number(e):NaN;return isNaN(t)?e:t},oe,se=()=>oe||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function N(e){if(f(e)){let t={};for(let n=0;n{if(e){let n=e.split(le);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function fe(e){let t=``;if(_(e))t=e;else if(f(e))for(let n=0;n0&&--this._on===0){if(P===this)P=this.prevScope;else{let e=P;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Te){let e=Te;for(Te=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;we;){let t=we;for(we=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function ke(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ae(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ne(r),Pe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function je(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Me(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Me(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Be)||(e.globalVersion=Be,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!je(e))))return;e.flags|=2;let t=e.dep,n=F,r=Fe;F=e,Fe=!0;try{ke(e);let n=e.fn(e._value);(t.version===0||A(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{F=n,Fe=r,Ae(e),e.flags&=-3}}function Ne(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ne(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Pe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Fe=!0,Ie=[];function Le(){Ie.push(Fe),Fe=!1}function Re(){let e=Ie.pop();Fe=e===void 0||e}function ze(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=F;F=void 0;try{t()}finally{F=e}}}var Be=0,Ve=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},He=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!F||!Fe||F===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==F)t=this.activeLink=new Ve(F,this),F.deps?(t.prevDep=F.depsTail,F.depsTail.nextDep=t,F.depsTail=t):F.deps=F.depsTail=t,Ue(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=F.depsTail,t.nextDep=void 0,F.depsTail.nextDep=t,F.depsTail=t,F.deps===t&&(F.deps=e)}return t}trigger(e){this.version++,Be++,this.notify(e)}notify(e){De();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Oe()}}};function Ue(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ue(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var We=new WeakMap,Ge=Symbol(``),Ke=Symbol(``),qe=Symbol(``);function Je(e,t,n){if(Fe&&F){let t=We.get(e);t||We.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new He),r.map=t,r.key=n),r.track()}}function Ye(e,t,n,r,i,a){let o=We.get(e);if(!o){Be++;return}let s=e=>{e&&e.trigger()};if(De(),t===`clear`)o.forEach(s);else{let i=f(e),a=i&&T(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===qe||!v(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(qe)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ge)),p(e)&&s(o.get(Ke)));break;case`delete`:i||(s(o.get(Ge)),p(e)&&s(o.get(Ke)));break;case`set`:p(e)&&s(o.get(Ge));break}}Oe()}function Xe(e){let t=I(e);return t===e?t:(Je(t,`iterate`,qe),Ft(e)?t:t.map(Rt))}function Ze(e){return Je(e=I(e),`iterate`,qe),e}function Qe(e,t){return Pt(e)?zt(Nt(e)?Rt(t):t):Rt(t)}var $e={__proto__:null,[Symbol.iterator](){return et(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Xe(this).concat(...e.map(e=>f(e)?Xe(e):e))},entries(){return et(this,`entries`,e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return nt(this,`every`,e,t,void 0,arguments)},filter(e,t){return nt(this,`filter`,e,t,e=>e.map(e=>Qe(this,e)),arguments)},find(e,t){return nt(this,`find`,e,t,e=>Qe(this,e),arguments)},findIndex(e,t){return nt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return nt(this,`findLast`,e,t,e=>Qe(this,e),arguments)},findLastIndex(e,t){return nt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return nt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return it(this,`includes`,e)},indexOf(...e){return it(this,`indexOf`,e)},join(e){return Xe(this).join(e)},lastIndexOf(...e){return it(this,`lastIndexOf`,e)},map(e,t){return nt(this,`map`,e,t,void 0,arguments)},pop(){return at(this,`pop`)},push(...e){return at(this,`push`,e)},reduce(e,...t){return rt(this,`reduce`,e,t)},reduceRight(e,...t){return rt(this,`reduceRight`,e,t)},shift(){return at(this,`shift`)},some(e,t){return nt(this,`some`,e,t,void 0,arguments)},splice(...e){return at(this,`splice`,e)},toReversed(){return Xe(this).toReversed()},toSorted(e){return Xe(this).toSorted(e)},toSpliced(...e){return Xe(this).toSpliced(...e)},unshift(...e){return at(this,`unshift`,e)},values(){return et(this,`values`,e=>Qe(this,e))}};function et(e,t,n){let r=Ze(e),i=r[t]();return r!==e&&!Ft(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var tt=Array.prototype;function nt(e,t,n,r,i,a){let o=Ze(e),s=o!==e&&!Ft(e),c=o[t];if(c!==tt[t]){let t=c.apply(e,a);return s?Rt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,Qe(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function rt(e,t,n,r){let i=Ze(e),a=i!==e&&!Ft(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=Qe(e,t)),n.call(this,t,Qe(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?Qe(e,c):c}function it(e,t,n){let r=I(e);Je(r,`iterate`,qe);let i=r[t](...n);return(i===-1||i===!1)&&It(n[0])?(n[0]=I(n[0]),r[t](...n)):i}function at(e,t,n=[]){Le(),De();let r=I(e)[t].apply(e,n);return Oe(),Re(),r}var ot=t(`__proto__,__v_isRef,__isVue`),st=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(v));function ct(e){v(e)||(e=String(e));let t=I(this);return Je(t,`has`,e),t.hasOwnProperty(e)}var lt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Dt:Et:i?Tt:wt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=f(e);if(!r){let e;if(a&&(e=$e[t]))return e;if(t===`hasOwnProperty`)return ct}let o=Reflect.get(e,t,Bt(e)?e:n);if((v(t)?st.has(t):ot(t))||(r||Je(e,`get`,t),i))return o;if(Bt(o)){let e=a&&T(t)?o:o.value;return r&&y(e)?jt(e):e}return y(o)?r?jt(o):kt(o):o}},ut=class extends lt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=f(e)&&T(t);if(!this._isShallow){let e=Pt(i);if(!Ft(n)&&!Pt(n)&&(i=I(i),n=I(n)),!a&&Bt(i)&&!Bt(n))return e||(i.value=n),!0}let o=a?Number(t)e,gt=e=>Reflect.getPrototypeOf(e);function _t(e,t,n){return function(...r){let i=this.__v_raw,a=I(i),o=p(a),s=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?ht:t?zt:Rt;return!t&&Je(a,`iterate`,l?Ke:Ge),c(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function vt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function yt(e,t){let n={get(n){let r=this.__v_raw,i=I(r),a=I(n);e||(A(n,a)&&Je(i,`get`,n),Je(i,`get`,a));let{has:o}=gt(i),s=t?ht:e?zt:Rt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&Je(I(t),`iterate`,Ge),t.size},has(t){let n=this.__v_raw,r=I(n),i=I(t);return e||(A(t,i)&&Je(r,`has`,t),Je(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=I(a),s=t?ht:e?zt:Rt;return!e&&Je(o,`iterate`,Ge),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return c(n,e?{add:vt(`add`),set:vt(`set`),delete:vt(`delete`),clear:vt(`clear`)}:{add(e){let n=I(this),r=gt(n),i=I(e),a=!t&&!Ft(e)&&!Pt(e)?i:e;return r.has.call(n,a)||A(e,a)&&r.has.call(n,e)||A(i,a)&&r.has.call(n,i)||(n.add(a),Ye(n,`add`,a,a)),this},set(e,n){!t&&!Ft(n)&&!Pt(n)&&(n=I(n));let r=I(this),{has:i,get:a}=gt(r),o=i.call(r,e);o||=(e=I(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?A(n,s)&&Ye(r,`set`,e,n,s):Ye(r,`add`,e,n),this},delete(e){let t=I(this),{has:n,get:r}=gt(t),i=n.call(t,e);i||=(e=I(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&Ye(t,`delete`,e,void 0,a),o},clear(){let e=I(this),t=e.size!==0,n=e.clear();return t&&Ye(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=_t(r,e,t)}),n}function bt(e,t){let n=yt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(d(n,r)&&r in t?n:t,r,i)}var xt={get:bt(!1,!1)},St={get:bt(!1,!0)},Ct={get:bt(!0,!1)},wt=new WeakMap,Tt=new WeakMap,Et=new WeakMap,Dt=new WeakMap;function Ot(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function kt(e){return Pt(e)?e:Mt(e,!1,ft,xt,wt)}function At(e){return Mt(e,!1,mt,St,Tt)}function jt(e){return Mt(e,!0,pt,Ct,Et)}function Mt(e,t,n,r,i){if(!y(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Ot(C(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Nt(e){return Pt(e)?Nt(e.__v_raw):!!(e&&e.__v_isReactive)}function Pt(e){return!!(e&&e.__v_isReadonly)}function Ft(e){return!!(e&&e.__v_isShallow)}function It(e){return e?!!e.__v_raw:!1}function I(e){let t=e&&e.__v_raw;return t?I(t):e}function Lt(e){return!d(e,`__v_skip`)&&Object.isExtensible(e)&&ie(e,`__v_skip`,!0),e}var Rt=e=>y(e)?kt(e):e,zt=e=>y(e)?jt(e):e;function Bt(e){return e?e.__v_isRef===!0:!1}function Vt(e){return Ut(e,!1)}function Ht(e){return Ut(e,!0)}function Ut(e,t){return Bt(e)?e:new Wt(e,t)}var Wt=class{constructor(e,t){this.dep=new He,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:I(e),this._value=t?e:Rt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Ft(e)||Pt(e);e=n?e:I(e),A(e,t)&&(this._rawValue=e,this._value=n?e:Rt(e),this.dep.trigger())}};function Gt(e){return Bt(e)?e.value:e}function Kt(e){return g(e)?e():Gt(e)}var qt={get:(e,t,n)=>t===`__v_raw`?e:Gt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return Bt(i)&&!Bt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Jt(e){return Nt(e)?e:new Proxy(e,qt)}var Yt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new He(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Be-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&F!==this)return Ee(this,!0),!0}get value(){let e=this.dep.track();return Me(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Xt(e,t,n=!1){let r,i;return g(e)?r=e:(r=e.get,i=e.set),new Yt(r,i,n)}var Zt={},Qt=new WeakMap,$t=void 0;function en(e,t=!1,n=$t){if(n){let t=Qt.get(n);t||Qt.set(n,t=[]),t.push(e)}}function tn(e,t,r=n){let{immediate:a,deep:o,once:s,scheduler:c,augmentJob:u,call:d}=r,p=e=>o?e:Ft(e)||o===!1||o===0?nn(e,1):nn(e),m,h,_,v,y=!1,b=!1;if(Bt(e)?(h=()=>e.value,y=Ft(e)):Nt(e)?(h=()=>p(e),y=!0):f(e)?(b=!0,y=e.some(e=>Nt(e)||Ft(e)),h=()=>e.map(e=>{if(Bt(e))return e.value;if(Nt(e))return p(e);if(g(e))return d?d(e,2):e()})):h=g(e)?t?d?()=>d(e,2):e:()=>{if(_){Le();try{_()}finally{Re()}}let t=$t;$t=m;try{return d?d(e,3,[v]):e(v)}finally{$t=t}}:i,t&&o){let e=h,t=o===!0?1/0:o;h=()=>nn(e(),t)}let x=ye(),S=()=>{m.stop(),x&&x.active&&l(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(Zt):Zt,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(t){let n=m.run();if(e||o||y||(b?n.some((e,t)=>A(e,C[t])):A(n,C))){_&&_();let e=$t;$t=m;try{let e=[n,C===Zt?void 0:b&&C[0]===Zt?[]:C,v];C=n,d?d(t,3,e):t(...e)}finally{$t=e}}}else m.run()};return u&&u(w),m=new Se(h),m.scheduler=c?()=>c(w,!1):w,v=e=>en(e,!1,m),_=m.onStop=()=>{let e=Qt.get(m);if(e){if(d)d(e,4);else for(let t of e)t();Qt.delete(m)}},t?a?w(!0):C=m.run():c?c(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function nn(e,t=1/0,n){if(t<=0||!y(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Bt(e))nn(e.value,t,n);else if(f(e))for(let r=0;r{nn(e,t,n)});else if(w(e)){for(let r in e)nn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&nn(e[r],t,n)}return e}function rn(e,t,n,r){try{return r?e(...r):e()}catch(e){on(e,t,n)}}function an(e,t,n,r){if(g(e)){let i=rn(e,t,n,r);return i&&b(i)&&i.catch(e=>{on(e,t,n)}),i}if(f(e)){let i=[];for(let a=0;a>>1,i=cn[r],a=Sn(i);a=Sn(n)?cn.push(e):cn.splice(gn(t),0,e),e.flags|=1,vn()}}function vn(){mn||=pn.then(Cn)}function yn(e){f(e)?un.push(...e):dn&&e.id===-1?dn.splice(fn+1,0,e):e.flags&1||(un.push(e),e.flags|=1),vn()}function bn(e,t,n=ln+1){for(;nSn(e)-Sn(t));if(un.length=0,dn){dn.push(...e);return}for(dn=e,fn=0;fne.id==null?e.flags&2?-1:1/0:e.id;function Cn(e){try{for(ln=0;ln{r._d&&ea(-1);let i=En(t),a=Yi.length,o;try{o=e(...n)}finally{for(let e=Yi.length;e>a;e--)Qi();En(i),r._d&&ea(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function On(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o1)return n&&g(t)?t.call(r&&r.proxy):t}}var jn=Symbol.for(`v-scx`),Mn=()=>An(jn);function Nn(e,t){return Fn(e,null,t)}function Pn(e,t,n){return Fn(e,t,n)}function Fn(e,t,r=n){let{immediate:a,deep:o,flush:s,once:l}=r,u=c({},r),d=t&&a||!t&&s!==`post`,f;if(ka){if(s===`sync`){let e=Mn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=i,e.resume=i,e.pause=i,e}}let p=Sa;u.call=(e,t,n)=>an(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{Mi(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():_n(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=tn(e,t,u);return ka&&(f?f.push(h):d&&h()),h}function In(e,t,n){let r=this.proxy,i=_(e)?e.includes(`.`)?Ln(r,e):()=>r[e]:e.bind(r,r),a;g(t)?a=t:(a=t.handler,n=t);let o=Ea(this),s=Fn(i,a.bind(r),n);return o(),s}function Ln(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Bn=Symbol(`_leaveCb`),Vn=Symbol(`_enterCb`);function Hn(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return hr(()=>{e.isMounted=!0}),vr(()=>{e.isUnmounting=!0}),e}var Un=[Function,Array],Wn={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Un,onEnter:Un,onAfterEnter:Un,onEnterCancelled:Un,onBeforeLeave:Un,onLeave:Un,onAfterLeave:Un,onLeaveCancelled:Un,onBeforeAppear:Un,onAppear:Un,onAfterAppear:Un,onAppearCancelled:Un},Gn=e=>{let t=e.subTree;return t.component?Gn(t.component):t},Kn={name:`BaseTransition`,props:Wn,setup(e,{slots:t}){let n=Ca(),r=Hn();return()=>{let i=t.default&&er(t.default(),!0),a=i&&i.length?qn(i):n.subTree?pa():void 0;if(!a)return;let o=I(e),{mode:s}=o;if(r.isLeaving)return Zn(a);let c=Qn(a);if(!c)return Zn(a);let l=Xn(c,o,r,n,e=>l=e);c.type!==qi&&$n(c,l);let u=n.subTree&&Qn(n.subTree);if(u&&u.type!==qi&&!aa(u,c)&&Gn(n).type!==qi){let e=Xn(u,o,r,n);if($n(u,e),s===`out-in`&&c.type!==qi)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},Zn(a);s===`in-out`&&c.type!==qi?e.delayLeave=(e,t,n)=>{let i=Yn(r,u);i[String(u.key)]=u,e[Bn]=()=>{t(),e[Bn]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function qn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==qi){t=n;break}}return t}var Jn=Kn;function Yn(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Xn(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=Yn(n,e),C=(e,t)=>{e&&an(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),f(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[Bn]&&t[Bn](!0);let i=S[x];i&&aa(e,i)&&i.el[Bn]&&i.el[Bn](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=d;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||d;else return;let s=!1;t[Vn]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[Vn]=void 0)};let c=t[Vn].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[Vn]&&t[Vn](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[Bn]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[Bn]=void 0,S[i]===e&&delete S[i])};let o=t[Bn].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=Xn(e,t,n,r,i);return i&&i(a),a}};return T}function Zn(e){if(sr(e))return e=da(e),e.children=null,e}function Qn(e){if(!sr(e))return zn(e.type)&&e.children?qn(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&g(n.default))return n.default()}}function $n(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$n(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function er(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;eir(e,t&&(f(t)?t[n]:t),r,i,o));return}if(or(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&ir(e,t,r,i.component.subTree);return}let s=i.shapeFlag&4?Ra(i.component):i.el,c=o?null:s,{i:u,r:p}=e,m=t&&t.r,h=u.refs===n?u.refs={}:u.refs,v=u.setupState,y=I(v),b=v===n?a:e=>!nr(h,e)&&d(y,e),x=(e,t)=>!(t&&nr(h,t));if(m!=null&&m!==p){if(ar(t),_(m))h[m]=null,b(m)&&(v[m]=null);else if(Bt(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(g(p))rn(p,u,12,[c,h]);else{let t=_(p),n=Bt(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:h[p]:x(p)||!e.k?p.value:h[e.k];if(o)f(n)&&l(n,s);else if(f(n))n.includes(s)||n.push(s);else if(t)h[p]=[s],b(p)&&(v[p]=h[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(h[e.k]=t)}}else t?(h[p]=c,b(p)&&(v[p]=c)):n&&(x(p,e.k)&&(p.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),rr.delete(e)};t.id=-1,rr.set(e,t),Mi(t,r)}else ar(e),i()}}}function ar(e){let t=rr.get(e);t&&(t.flags|=8,rr.delete(e))}se().requestIdleCallback,se().cancelIdleCallback;var or=e=>!!e.type.__asyncLoader,sr=e=>e.type.__isKeepAlive;function cr(e,t){ur(e,`a`,t)}function lr(e,t){ur(e,`da`,t)}function ur(e,t,n=Sa){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(fr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)sr(e.parent.vnode)&&dr(r,t,n,e),e=e.parent}}function dr(e,t,n,r){let i=fr(t,e,r,!0);yr(()=>{l(r[t],i)},n)}function fr(e,t,n=Sa,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Le();let i=Ea(n),a=an(t,n,e,r);return i(),Re(),a};return r?i.unshift(a):i.push(a),a}}var pr=e=>(t,n=Sa)=>{(!ka||e===`sp`)&&fr(e,(...e)=>t(...e),n)},mr=pr(`bm`),hr=pr(`m`),gr=pr(`bu`),_r=pr(`u`),vr=pr(`bum`),yr=pr(`um`),br=pr(`sp`),xr=pr(`rtg`),Sr=pr(`rtc`);function Cr(e,t=Sa){fr(`ec`,e,t)}var wr=`components`;function Tr(e,t){return Or(wr,e,!0,t)||e}var Er=Symbol.for(`v-ndc`);function Dr(e){return _(e)?Or(wr,e,!1)||e:e||Er}function Or(e,t,n=!0,r=!1){let i=wn||Sa;if(i){let n=i.type;if(e===wr){let e=za(n,!1);if(e&&(e===t||e===k(t)||e===ne(k(t))))return n}let a=kr(i[e]||n[e],t)||kr(i.appContext[e],t);return!a&&r?n:a}}function kr(e,t){return e&&(e[t]||e[k(t)]||e[ne(k(t))])}function Ar(e,t,n={},r,i,a){if(wn.ce||wn.parent&&or(wn.parent)&&wn.parent.ce){let e=a!=null&&n.key==null?c({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),Zi(),ra(Gi,null,[L(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=Yi.length;Zi();let l;try{let i=o&&jr(o(n)),s=n.key||a||i&&i.key;l=ra(Gi,{key:(s&&!v(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Yi.length;e>s;e--)Qi();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function jr(e){return e.some(e=>!ia(e)||!(e.type===qi||e.type===Gi&&!jr(e.children)))?e:null}var Mr=e=>e?Oa(e)?Ra(e):Mr(e.parent):null,Nr=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Mr(e.parent),$root:e=>Mr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Hr(e),$forceUpdate:e=>e.f||=()=>{_n(e.update)},$nextTick:e=>e.n||=hn.bind(e.proxy),$watch:e=>In.bind(e)}),Pr=(e,t)=>e!==n&&!e.__isScriptSetup&&d(e,t),Fr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return r[t];case 3:return o[t]}else if(Pr(i,t))return s[t]=1,i[t];else if(a!==n&&d(a,t))return s[t]=2,a[t];else if(d(o,t))return s[t]=3,o[t];else if(r!==n&&d(r,t))return s[t]=4,r[t];else Lr&&(s[t]=0)}let u=Nr[t],f,p;if(u)return t===`$attrs`&&Je(e.attrs,`get`,``),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(r!==n&&d(r,t))return s[t]=4,r[t];if(p=l.config.globalProperties,d(p,t))return p[t]},set({_:e},t,r){let{data:i,setupState:a,ctx:o}=e;return Pr(a,t)?(a[t]=r,!0):i!==n&&d(i,t)?(i[t]=r,!0):d(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==n&&c[0]!==`$`&&d(e,c)||Pr(t,c)||d(o,c)||d(i,c)||d(Nr,c)||d(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?d(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Ir(e){return f(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Lr=!0;function Rr(e){let t=Hr(e),n=e.proxy,r=e.ctx;Lr=!1,t.beforeCreate&&Br(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:p,mounted:m,beforeUpdate:h,updated:_,activated:v,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:ee,inheritAttrs:te,components:ne,directives:re,filters:A}=t;if(u&&zr(u,r,null),s)for(let e in s){let t=s[e];g(t)&&(r[e]=t.bind(n))}if(a){let t=a.call(n,n);y(t)&&(e.data=kt(t))}if(Lr=!0,o)for(let e in o){let t=o[e],a=Va({get:g(t)?t.bind(n,n):g(t.get)?t.get.bind(n,n):i,set:!g(t)&&g(t.set)?t.set.bind(n):i});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Vr(c[e],r,n,e);if(l){let e=g(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{kn(t,e[t])})}d&&Br(d,e,`c`);function j(e,t){f(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(j(mr,p),j(hr,m),j(gr,h),j(_r,_),j(cr,v),j(lr,b),j(Cr,O),j(Sr,E),j(xr,D),j(vr,S),j(yr,w),j(br,k),f(ee))if(ee.length){let t=e.exposed||={};ee.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===i&&(e.render=T),te!=null&&(e.inheritAttrs=te),ne&&(e.components=ne),re&&(e.directives=re),k&&tr(e)}function zr(e,t,n=i){f(e)&&(e=qr(e));for(let n in e){let r=e[n],i;i=y(r)?`default`in r?An(r.from||n,r.default,!0):An(r.from||n):An(r),Bt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Br(e,t,n){an(f(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Vr(e,t,n,r){let i=r.includes(`.`)?Ln(n,r):()=>n[r];if(_(e)){let n=t[e];g(n)&&Pn(i,n)}else if(g(e))Pn(i,e.bind(n));else if(y(e))if(f(e))e.forEach(e=>Vr(e,t,n,r));else{let r=g(e.handler)?e.handler.bind(n):t[e.handler];g(r)&&Pn(i,r,e)}}function Hr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Ur(c,e,o,!0)),Ur(c,t,o)),y(t)&&a.set(t,c),c}function Ur(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Ur(e,a,n,!0),i&&i.forEach(t=>Ur(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Wr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Wr={data:Gr,props:Xr,emits:Xr,methods:Yr,computed:Yr,beforeCreate:Jr,created:Jr,beforeMount:Jr,mounted:Jr,beforeUpdate:Jr,updated:Jr,beforeDestroy:Jr,beforeUnmount:Jr,destroyed:Jr,unmounted:Jr,activated:Jr,deactivated:Jr,errorCaptured:Jr,serverPrefetch:Jr,components:Yr,directives:Yr,watch:Zr,provide:Gr,inject:Kr};function Gr(e,t){return t?e?function(){return c(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function Kr(e,t){return Yr(qr(e),qr(t))}function qr(e){if(f(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${k(t)}Modifiers`]||e[`${te(t)}Modifiers`];function ri(e,t,...r){if(e.isUnmounted)return;let i=e.vnode.props||n,a=r,o=t.startsWith(`update:`),s=o&&ni(i,t.slice(7));s&&(s.trim&&(a=r.map(e=>_(e)?e.trim():e)),s.number&&(a=r.map(M)));let c,l=i[c=re(t)]||i[c=re(k(t))];!l&&o&&(l=i[c=re(te(t))]),l&&an(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,an(u,e,6,a)}}var ii=new WeakMap;function ai(e,t,n=!1){let r=n?ii:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!g(e)){let r=e=>{let n=ai(e,t,!0);n&&(s=!0,c(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(y(e)&&r.set(e,null),null):(f(a)?a.forEach(e=>o[e]=null):c(o,a),y(e)&&r.set(e,o),o)}function oi(e,t){return!e||!o(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),d(e,t[0].toLowerCase()+t.slice(1))||d(e,te(t))||d(e,t))}function si(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=En(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=ma(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=ma(e.length>1?e(f,{attrs:c,slots:o,emit:l}):e(f,null)),y=t.props?c:ci(c)}}catch(t){Yi.length=0,on(t,e,1),v=L(qi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(s)&&(y=li(y,a)),b=da(b,y,!1,!0))}return n.dirs&&(b=da(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&$n(b,n.transition),v=b,En(_),v}var ci=e=>{let t;for(let n in e)(n===`class`||n===`style`||o(n))&&((t||={})[n]=e[n]);return t},li=(e,t)=>{let n={};for(let r in e)(!s(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ui(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?di(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(mi),gi=e=>Object.getPrototypeOf(e)===mi;function _i(e,t,n,r=!1){let i={},a=hi();e.propsDefaults=Object.create(null),yi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:At(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function vi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=I(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[n,r]=Si(e,t,!0);c(l,n),r&&u.push(...r)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!s&&!p)return y(e)&&a.set(e,r),r;if(f(s))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Ti=e=>f(e)?e.map(ma):[ma(e)],Ei=(e,t,n)=>{if(t._n)return t;let r=Dn((...e)=>Ti(t(...e)),n);return r._c=!1,r},Di=(e,t,n)=>{let r=e._ctx;for(let n in e){if(wi(n))continue;let i=e[n];if(g(i))t[n]=Ei(n,i,r);else if(i!=null){let e=Ti(i);t[n]=()=>e}}},Oi=(e,t)=>{let n=Ti(t);e.slots.default=()=>n},ki=(e,t,n)=>{for(let r in t)(n||!wi(r))&&(e[r]=t[r])},Ai=(e,t,n)=>{let r=e.slots=hi();if(e.vnode.shapeFlag&32){let e=t._;e?(ki(r,t,n),n&&ie(r,`_`,e,!0)):Di(t,r)}else t&&Oi(e,t)},ji=(e,t,r)=>{let{vnode:i,slots:a}=e,o=!0,s=n;if(i.shapeFlag&32){let e=t._;e?r&&e===1?o=!1:ki(a,t,r):(o=!t.$stable,Di(t,a)),s=t}else t&&(Oi(e,t),s={default:1});if(o)for(let e in a)!wi(e)&&s[e]==null&&delete a[e]},Mi=Wi;function Ni(e){return Pi(e)}function Pi(e,t){let a=se();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=i,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!aa(e,t)&&(r=he(e),ue(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Ki:y(e,t,n,r);break;case qi:b(e,t,n,r);break;case Ji:e??x(t,n,r,o);break;case Gi:ne(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?re(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,P)}u!=null&&i?ir(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&ir(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),k(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&O(e.children,d,null,r,i,Fi(e,a),s,u),_&&On(e,null,r,`created`),D(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!E(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&va(f,r,e)}_&&On(e,null,r,`beforeMount`);let v=Li(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&Mi(()=>{try{f&&va(f,r,e),v&&g.enter(d),_&&On(e,null,r,`mounted`)}finally{}},i)},D=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||n,h=t.props||n,g;if(r&&Ii(r,!1),(g=h.onVnodeBeforeUpdate)&&va(g,r,t,e),f&&On(t,e,r,`beforeUpdate`),r&&Ii(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?ee(e.dynamicChildren,d,l,r,i,Fi(t,a),o):s||oe(e,t,l,null,r,i,Fi(t,a),o,!1),u>0){if(u&16)te(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t{g&&va(g,r,t,e),f&&On(t,e,r,`updated`)},i)},ee=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==r){if(t!==n)for(let n in t)!E(n)&&!(n in r)&&c(e,n,t[n],null,a,i);for(let n in r){if(E(n))continue;let o=r[n],s=t[n];o!==s&&n!==`value`&&c(e,n,s,o,a,i)}`value`in r&&c(e,`value`,t.value,r.value,a)}},ne=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),O(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(ee(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ri(e,t,!0)):oe(e,t,n,f,i,a,s,c,l)},re=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):A(t,n,r,i,a,o,c):ie(e,t,c)},A=(e,t,n,r,i,a,o)=>{let s=e.component=xa(e,r,i);if(sr(e)&&(s.ctx.renderer=P),Aa(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,M,o),!e.el){let r=s.subTree=L(qi);b(null,r,t,n),e.placeholder=r.el}}else M(s,e,t,n,i,a,o)},ie=(e,t,n)=>{let r=t.component=e.component;if(ui(e,t,n))if(r.asyncDep&&!r.asyncResolved){ae(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},M=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Bi(e);if(n){t&&(t.el=c.el,ae(e,t,o)),n.asyncDep.then(()=>{Mi(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Ii(e,!1),t?(t.el=c.el,ae(e,t,o)):t=c,n&&j(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&va(d,s,t,c),Ii(e,!0);let f=si(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),he(p),e,i,a),t.el=f.el,u===null&&pi(e,f.el),r&&Mi(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Mi(()=>va(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=or(t);if(Ii(e,!1),l&&j(l),!m&&(o=c&&c.onVnodeBeforeMount)&&va(o,d,t),Ii(e,!0),s&&ye){let t=()=>{e.subTree=si(e),ye(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=si(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Mi(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Mi(()=>va(o,d,e),i)}(t.shapeFlag&256||d&&or(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Mi(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Se(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>_n(u),Ii(e,!0),l()},ae=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,vi(e,t.props,r,n),ji(e,t.children,n),Le(),bn(e),Re()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ce(l,d,n,r,i,a,o,s,c);return}else if(f&256){N(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&me(l,i,a),d!==l&&p(n,d)):u&16?m&16?ce(l,d,n,r,i,a,o,s,c):me(l,i,a,!0):(u&8&&p(n,``),m&16&&O(d,n,r,i,a,o,s,c))},N=(e,t,n,i,a,o,s,c,l)=>{e||=r,t||=r;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?me(e,a,o,!0,!1,f):O(t,n,i,a,o,s,c,l,f)},ce=(e,t,n,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?ha(t[u]):ma(t[u]);if(aa(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?ha(t[p]):ma(t[p]);if(aa(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,r=ep)for(;u<=f;)ue(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ha(t[u]):ma(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){ue(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&aa(r,t[_])){i=_;break}i===void 0?ue(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let w=x?zi(C):r;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,r=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){le(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,P);return}if(c===Gi){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Bn];a._isLeaving&&a[Bn](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},ue=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(Le(),ir(s,null,n,e,!0),Re()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!or(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&va(_,t,e),u&6)pe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&On(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,P,r):l&&!l.hasOnce&&(a!==Gi||d>0&&d&64)?me(l,t,n,!1,!0):(a===Gi&&d&384||!i&&u&16)&&me(c,t,n),r&&de(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Mi(()=>{_&&va(_,t,e),h&&On(e,null,t,`unmounted`),v&&(e.el=null)},n)},de=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===Gi){fe(n,r);return}if(t===Ji){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},fe=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},pe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Vi(c),Vi(l),r&&j(r),i.stop(),a&&(a.flags|=8,ue(o,e,t,n)),s&&Mi(s,t),Mi(()=>{e.isUnmounted=!0},t)},me=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return he(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Rn];return n?h(n):t},ge=!1,_e=(e,t,n)=>{let r;e==null?t._vnode&&(ue(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ge||=(ge=!0,bn(r),xn(),!1)},P={p:v,um:ue,m:le,r:de,mt:A,mc:O,pc:oe,pbc:ee,n:he,o:e},ve,ye;return t&&([ve,ye]=t(P)),{render:_e,hydrate:ve,createApp:ei(_e,ve)}}function Fi({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Ii({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Li(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ri(e,t,n=!1){let r=e.children,i=t.children;if(f(r)&&f(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Bi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Bi(t)}function Vi(e){if(e)for(let t=0;te.__isSuspense;function Wi(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):yn(e)}var Gi=Symbol.for(`v-fgt`),Ki=Symbol.for(`v-txt`),qi=Symbol.for(`v-cmt`),Ji=Symbol.for(`v-stc`),Yi=[],Xi=null;function Zi(e=!1){Yi.push(Xi=e?null:[])}function Qi(){Yi.pop(),Xi=Yi[Yi.length-1]||null}var $i=1;function ea(e,t=!1){$i+=e,e<0&&Xi&&t&&(Xi.hasOnce=!0)}function ta(e){return e.dynamicChildren=$i>0?Xi||r:null,Qi(),$i>0&&Xi&&Xi.push(e),e}function na(e,t,n,r,i,a){return ta(ca(e,t,n,r,i,a,!0))}function ra(e,t,n,r,i){return ta(L(e,t,n,r,i,!0))}function ia(e){return e?e.__v_isVNode===!0:!1}function aa(e,t){return e.type===t.type&&e.key===t.key}var oa=({key:e})=>e??null,sa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:_(e)||Bt(e)||g(e)?{i:wn,r:e,k:t,f:!!n}:e);function ca(e,t=null,n=null,r=0,i=null,a=e===Gi?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&oa(t),ref:t&&sa(t),scopeId:Tn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:wn};return s?(ga(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=_(n)?8:16),$i>0&&!o&&Xi&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Xi.push(c),c}var L=la;function la(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Er)&&(e=qi),ia(e)){let r=da(e,t,!0);return n&&ga(r,n),$i>0&&!a&&Xi&&(r.shapeFlag&6?Xi[Xi.indexOf(e)]=r:Xi.push(r)),r.patchFlag=-2,r}if(Ba(e)&&(e=e.__vccOpts),t){t=ua(t);let{class:e,style:n}=t;e&&!_(e)&&(t.class=fe(e)),y(n)&&(It(n)&&!f(n)&&(n=c({},n)),t.style=N(n))}let o=_(e)?1:Ui(e)?128:zn(e)?64:y(e)?4:g(e)?2:0;return ca(e,t,n,r,i,o,a,!0)}function ua(e){return e?It(e)||gi(e)?c({},e):e:null}function da(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?_a(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&oa(l),ref:t&&t.ref?n&&a?f(a)?a.concat(sa(t)):[a,sa(t)]:sa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Gi?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&da(e.ssContent),ssFallback:e.ssFallback&&da(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&$n(u,c.clone(u)),u}function fa(e=` `,t=0){return L(Ki,null,e,t)}function pa(e=``,t=!1){return t?(Zi(),ra(qi,null,e)):L(qi,null,e)}function ma(e){return e==null||typeof e==`boolean`?L(qi):f(e)?L(Gi,null,e.slice()):ia(e)?ha(e):L(Ki,null,String(e))}function ha(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:da(e)}function ga(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(f(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),ga(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!gi(t)?t._ctx=wn:r===3&&wn&&(wn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(g(t)){if(r&65){ga(e,{default:t});return}t={default:t,_ctx:wn},n=32}else t=String(t),r&64?(n=16,t=[fa(t)]):n=8;e.children=t,e.shapeFlag|=n}function _a(...e){let t={};for(let n=0;nSa||wn,wa,Ta;{let e=se(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};wa=t(`__VUE_INSTANCE_SETTERS__`,e=>Sa=e),Ta=t(`__VUE_SSR_SETTERS__`,e=>ka=e)}var Ea=e=>{let t=Sa;return wa(e),e.scope.on(),()=>{e.scope.off(),wa(t)}},Da=()=>{Sa&&Sa.scope.off(),wa(null)};function Oa(e){return e.vnode.shapeFlag&4}var ka=!1;function Aa(e,t=!1,n=!1){t&&Ta(t);let{props:r,children:i}=e.vnode,a=Oa(e);_i(e,r,a,t),Ai(e,i,n||t);let o=a?ja(e,t):void 0;return t&&Ta(!1),o}function ja(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Fr);let{setup:r}=n;if(r){Le();let n=e.setupContext=r.length>1?La(e):null,i=Ea(e),a=rn(r,e,0,[e.props,n]),o=b(a);if(Re(),i(),(o||e.sp)&&!or(e)&&tr(e),o){if(a.then(Da,Da),t)return a.then(n=>{Ma(e,n,t)}).catch(t=>{on(t,e,0)});e.asyncDep=a}else Ma(e,a,t)}else Fa(e,t)}function Ma(e,t,n){g(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:y(t)&&(e.setupState=Jt(t)),Fa(e,n)}var Na,Pa;function Fa(e,t,n){let r=e.type;if(!e.render){if(!t&&Na&&!r.render){let t=r.template||Hr(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Na(t,c(c({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||i,Pa&&Pa(e)}{let t=Ea(e);Le();try{Rr(e)}finally{Re(),t()}}}var Ia={get(e,t){return Je(e,`get`,``),e[t]}};function La(e){return{attrs:new Proxy(e.attrs,Ia),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ra(e){return e.exposed?e.exposeProxy||=new Proxy(Jt(Lt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Nr)return Nr[n](e)},has(e,t){return t in e||t in Nr}}):e.proxy}function za(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}function Ba(e){return g(e)&&`__vccOpts`in e}var Va=(e,t)=>Xt(e,t,ka);function Ha(e,t,n){try{ea(-1);let r=arguments.length;return r===2?y(t)&&!f(t)?ia(t)?L(e,null,[t]):L(e,t):L(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ia(n)&&(n=[n]),L(e,t,n))}finally{ea(1)}}var Ua=`3.5.40`,Wa=void 0,Ga=typeof window<`u`&&window.trustedTypes;if(Ga)try{Wa=Ga.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ka=Wa?e=>Wa.createHTML(e):e=>e,qa=`http://www.w3.org/2000/svg`,Ja=`http://www.w3.org/1998/Math/MathML`,Ya=typeof document<`u`?document:null,Xa=Ya&&Ya.createElement(`template`),Za={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Ya.createElementNS(qa,e):t===`mathml`?Ya.createElementNS(Ja,e):n?Ya.createElement(e,{is:n}):Ya.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Ya.createTextNode(e),createComment:e=>Ya.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ya.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Xa.innerHTML=Ka(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=Xa.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qa=`transition`,$a=`animation`,eo=Symbol(`_vtc`),to={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},no=c({},Wn,to),ro=(e=>(e.displayName=`Transition`,e.props=no,e))((e,{slots:t})=>Ha(Jn,oo(e),t)),io=(e,t=[])=>{f(e)?e.forEach(e=>e(...t)):e&&e(...t)},ao=e=>e?f(e)?e.some(e=>e.length>1):e.length>1:!1;function oo(e){let t={};for(let n in e)n in to||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=so(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,uo(e,t?d:s),uo(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,uo(e,f),uo(e,m),uo(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);io(i,[t,o]),fo(()=>{uo(t,e?l:a),lo(t,e?d:s),ao(i)||mo(t,r,g,o)})};return c(t,{onBeforeEnter(e){io(v,[e]),lo(e,a),lo(e,o)},onBeforeAppear(e){io(C,[e]),lo(e,l),lo(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);lo(e,f),e._enterCancelled?(lo(e,p),vo(e)):(vo(e),lo(e,p)),fo(()=>{e._isLeaving&&(uo(e,f),lo(e,m),ao(x)||mo(e,r,_,n))}),io(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),io(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),io(T,[e])},onLeaveCancelled(e){D(e),io(S,[e])}})}function so(e){if(e==null)return null;if(y(e))return[co(e.enter),co(e.leave)];{let t=co(e);return[t,t]}}function co(e){return ae(e)}function lo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[eo]||(e[eo]=new Set)).add(t)}function uo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[eo];n&&(n.delete(t),n.size||(e[eo]=void 0))}function fo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var po=0;function mo(e,t,n,r){let i=e._endId=++po,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=ho(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${Qa}Delay`),a=r(`${Qa}Duration`),o=go(i,a),s=r(`${$a}Delay`),c=r(`${$a}Duration`),l=go(s,c),u=null,d=0,f=0;t===Qa?o>0&&(u=Qa,d=o,f=a.length):t===$a?l>0&&(u=$a,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?Qa:$a:null,f=u?u===Qa?a.length:c.length:0);let p=u===Qa&&/\b(?:transform|all)(?:,|$)/.test(r(`${Qa}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function go(e,t){for(;e.length_o(t)+_o(e[n])))}function _o(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function vo(e){return(e?e.ownerDocument:document).body.offsetHeight}function yo(e,t,n){let r=e[eo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var bo=Symbol(`_vod`),xo=Symbol(`_vsh`),So=Symbol(``),Co=/(?:^|;)\s*display\s*:/;function wo(e,t,n){let r=e.style,i=_(n),a=!1;if(n&&!i){if(t)if(_(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Eo(r,t,``)}else for(let e in t)n[e]??Eo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Eo(r,i,``):Ao(e,i,!_(t)&&t?t[i]:void 0,o)||Eo(r,i,o)}}else if(i){if(t!==n){let e=r[So];e&&(n+=`;`+e),r.cssText=n,a=Co.test(n)}}else t&&e.removeAttribute(`style`);bo in e&&(e[bo]=a?r.display:``,e[xo]&&(r.display=`none`))}var To=/\s*!important$/;function Eo(e,t,n){if(f(n))n.forEach(n=>Eo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=ko(e,t);To.test(n)?e.setProperty(te(r),n.replace(To,``),`important`):e[r]=n}}var Do=[`Webkit`,`Moz`,`ms`],Oo={};function ko(e,t){let n=Oo[t];if(n)return n;let r=k(t);if(r!==`filter`&&r in e)return Oo[t]=r;r=ne(r);for(let n=0;nVo||=(Ho.then(()=>Vo=0),Date.now());function Wo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(f(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ko=(e,t,n,r,i,a)=>{let c=i===`svg`;t===`class`?yo(e,r,c):t===`style`?wo(e,n,r):o(t)?s(t)||Lo(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):qo(e,t,r,c))?(No(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Mo(e,t,r,c,a,t!==`value`)):e._isVueCE&&(Jo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!_(r)))?No(e,k(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Mo(e,t,r,c))};function qo(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Go(t)&&g(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Go(t)&&_(n)?!1:t in e}function Jo(e,t){let n=e._def.props;if(!n)return!1;let r=k(t);return Array.isArray(n)?n.some(e=>k(e)===r):Object.keys(n).some(e=>k(e)===r)}var Yo=c({patchProp:Ko},Za),Xo;function Zo(){return Xo||=Ni(Yo)}var Qo=((...e)=>{let t=Zo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=es(e);if(!r)return;let i=t._component;!g(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,$o(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function $o(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function es(e){return _(e)?document.querySelector(e):e}function ts(e,t){return ye()?(be(e,t),!0):!1}function ns(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return ts(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}var rs=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var is=Object.prototype.toString,as=e=>is.call(e)===`[object Object]`,os=(e,t)=>Object.hasOwn(e,t);function ss(e){return Array.isArray(e)?e:[e]}function cs(e,t,n){return Pn(e,t,{...n,immediate:!0})}var ls=rs?window:void 0,us=rs?window.document:void 0;rs&&window.navigator,rs&&window.location;function ds(e){let t=Kt(e);return t?.$el??t}function fs(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=Va(()=>{let t=ss(Kt(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return cs(()=>[n.value?.map(e=>ds(e))??[ls].filter(e=>e!=null),ss(Kt(n.value?e[1]:e[0])),ss(Gt(n.value?e[2]:e[1])),Kt(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=as(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function ps(e,t={}){let n=Ht(!1),r=Ht(null),i=0,a=!0;if(rs){let o=typeof t==`function`?{onDrop:t}:t,s=o.multiple??!0,c=o.preventDefaultForUnhandled??!1,l=e=>{let t=Array.from(e.dataTransfer?.files??[]);return t.length===0?null:s?t:[t[0]]},u=e=>{let t=Gt(o.dataTypes);return typeof t==`function`?t(e):!t?.length||e.length!==0&&e.every(e=>t.some(t=>e.includes(t)))},d=e=>{if(o.checkValidity)return o.checkValidity(e);let t=Array.from(e??[]).map(e=>e.type),n=u(t),r=s||e.length<=1;return n&&r},f=()=>/^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent)&&!(`chrome`in window),p=(e,t)=>{let s=e.dataTransfer?.items;if(a=(s&&d(s))??!1,c&&e.preventDefault(),!f()&&!a){e.dataTransfer&&(e.dataTransfer.dropEffect=`none`);return}e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`);let u=l(e);switch(t){case`enter`:var p;i+=1,n.value=!0,(p=o.onEnter)==null||p.call(o,null,e);break;case`over`:var m;(m=o.onOver)==null||m.call(o,null,e);break;case`leave`:var h;--i,i===0&&(n.value=!1),(h=o.onLeave)==null||h.call(o,null,e);break;case`drop`:if(i=0,n.value=!1,a){var g;r.value=u,(g=o.onDrop)==null||g.call(o,u,e)}break}};fs(e,`dragenter`,e=>p(e,`enter`)),fs(e,`dragover`,e=>p(e,`over`)),fs(e,`dragleave`,e=>p(e,`leave`)),fs(e,`drop`,e=>p(e,`drop`))}return{files:r,isOverDropZone:n}}var ms={multiple:!0,accept:`*`,reset:!1,directory:!1};function hs(e){if(!e)return null;if(e instanceof FileList)return e;let t=new DataTransfer;for(let n of e)t.items.add(n);return t.files}function gs(e={}){let{document:t=us}=e,n=Vt(hs(e.initialFiles)),{on:r,trigger:i}=ns(),{on:a,trigger:o}=ns(),s=Va(()=>{let r=ds(e.input)??(t?t.createElement(`input`):void 0);return r&&(r.type=`file`,r.onchange=e=>{let t=e.target;n.value=t.files,i(n.value)},r.oncancel=()=>{o()}),r}),c=()=>{n.value=null,s.value&&s.value.value&&(s.value.value=``,i(null))},l=e=>{let t=s.value;t&&(t.multiple=Kt(e.multiple),t.accept=Kt(e.accept),t.webkitdirectory=Kt(e.directory),os(e,`capture`)&&(t.capture=Kt(e.capture)))};return Nn(()=>{l(e)}),{files:jt(n),open:t=>{let n=s.value;if(!n)return;let r={...ms,...e,...t};l(r),Kt(r.reset)&&c(),n.click()},reset:c,onCancel:a,onChange:r}}function _s(e,t,n){if(e!==`cover`&&e!==`contain`)throw TypeError(`Invalid mode`);let r=t.width/t.height,i=n.width/n.height,{width:a}=n,{height:o}=n;return(e===`contain`?r>i:r`button`},arrow:{type:Boolean,default:()=>!1},loading:{type:Boolean,default:()=>!1}},setup(e){return(t,n)=>(Zi(),ra(Dr(e.tag),{class:`btn`},{default:Dn(()=>[e.arrow?(Zi(),na(`span`,vs,`→`)):pa(``,!0),ca(`span`,ys,[ca(`span`,bs,[Ar(t.$slots,`default`)]),ca(`span`,xs,[Ar(t.$slots,`default`)])]),e.arrow?(Zi(),na(`span`,Ss,`→`)):pa(``,!0)]),_:3}))}},ws=`15.1.22`,Ts=e(((e,t)=>{function n(e){if(Array.isArray(e))return e}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Es=e(((e,t)=>{function n(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Ds=e(((e,t)=>{function n(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{var n=Ds();function r(e,t){if(e){if(typeof e==`string`)return n(e,t);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),ks=e(((e,t)=>{function n(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),As=e(((e,t)=>{var n=Ts(),r=Es(),i=Os(),a=ks();function o(e,t){return n(e)||r(e,t)||i(e,t)||a()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})),js=e(((e,t)=>{function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Ms=e(((e,t)=>{function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Ns=e(((e,t)=>{var n=Ms().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),Ps=e(((e,t)=>{var n=Ms().default,r=Ns();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})),Fs=e(((e,t)=>{var n=Ps();function r(e,t){for(var r=0;r{(function(n,r){typeof e==`object`&&t!==void 0?r(e,As(),js(),Fs()):typeof define==`function`&&define.amd?define([`exports`,`@babel/runtime/helpers/slicedToArray`,`@babel/runtime/helpers/classCallCheck`,`@babel/runtime/helpers/createClass`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.automationEvents={},n._slicedToArray,n._classCallCheck,n._createClass))})(e,(function(e,t,n,r){var i=function(e,t,n){return{endTime:t,insertTime:n,type:`exponentialRampToValue`,value:e}},a=function(e,t,n){return{endTime:t,insertTime:n,type:`linearRampToValue`,value:e}},o=function(e,t){return{startTime:t,type:`setValue`,value:e}},s=function(e,t,n){return{duration:n,startTime:t,type:`setValueCurve`,values:e}},c=function(e,t,n){var r=n.startTime,i=n.target,a=n.timeConstant;return i+(t-i)*Math.exp((r-e)/a)},l=function(e){return e.type===`exponentialRampToValue`},u=function(e){return e.type===`linearRampToValue`},d=function(e){return l(e)||u(e)},f=function(e){return e.type===`setValue`},p=function(e){return e.type===`setValueCurve`},m=function(e,t,n,r){var i=e[t];return i===void 0?r:d(i)||f(i)?i.value:p(i)?i.values[i.values.length-1]:c(n,m(e,t-1,i.startTime,r),i)},h=function(e,t,n,r,i){return n===void 0?[r.insertTime,i]:d(n)?[n.endTime,n.value]:f(n)?[n.startTime,n.value]:p(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,m(e,t-1,n.startTime,i)]},g=function(e){return e.type===`cancelAndHold`},_=function(e){return e.type===`cancelScheduledValues`},v=function(e){return g(e)||_(e)?e.cancelTime:l(e)||u(e)?e.endTime:e.startTime},y=function(e,t,n,r){var i=r.endTime,a=r.value;return n===a?a:0=t:v(n)>=t}),r=this._automationEvents[n];if(n!==-1&&(this._automationEvents=this._automationEvents.slice(0,n)),g(e)){var c=this._automationEvents[this._automationEvents.length-1];if(r!==void 0&&d(r)){if(c!==void 0&&w(c))throw Error(`The internal list is malformed.`);var f=c===void 0?r.insertTime:p(c)?c.startTime+c.duration:v(c),m=c===void 0?this._defaultValue:p(c)?c.values[c.values.length-1]:c.value,h=l(r)?y(t,f,m,r):b(t,f,m,r),x=l(r)?i(h,t,this._currenTime):a(h,t,this._currenTime);this._automationEvents.push(x)}if(c!==void 0&&w(c)&&this._automationEvents.push(o(this.getValue(t),t)),c!==void 0&&p(c)&&c.startTime+c.duration>t){var S=t-c.startTime;this._automationEvents[this._automationEvents.length-1]=s(C(c.values,c.duration,S),c.startTime,S)}}}else{var T=this._automationEvents.findIndex(function(e){return v(e)>t}),E=T===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[T-1];if(E!==void 0&&p(E)&&v(E)+E.duration>t)return!1;var D=l(e)?i(e.value,e.endTime,this._currenTime):u(e)?a(e.value,t,this._currenTime):e;if(T===-1)this._automationEvents.push(D);else{if(p(e)&&t+e.duration>v(this._automationEvents[T]))return!1;this._automationEvents.splice(T,0,D)}}return!0}},{key:`flush`,value:function(e){var t=this._automationEvents.findIndex(function(t){return v(t)>e});if(t>1){var n=this._automationEvents.slice(t-1),r=n[0];w(r)&&n.unshift(o(m(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:`getValue`,value:function(e){if(this._automationEvents.length===0)return this._defaultValue;var n=this._automationEvents.findIndex(function(t){return v(t)>e}),r=this._automationEvents[n],i=(n===-1?this._automationEvents.length:n)-1,a=this._automationEvents[i];if(a!==void 0&&w(a)&&(r===void 0||!d(r)||r.insertTime>e))return c(e,m(this._automationEvents,i-1,a.startTime,this._defaultValue),a);if(a!==void 0&&f(a)&&(r===void 0||!d(r)))return a.value;if(a!==void 0&&p(a)&&(r===void 0||!d(r)||a.startTime+a.duration>e))return enew DOMException(``,`AbortError`),Rs=e=>(t,n,[r,i,a],o)=>{e(t[i],[n,r,a],e=>e[0]===n&&e[1]===r,o)},zs=e=>(t,n,r)=>{let i=[];for(let e=0;e(t,n)=>{e.set(t,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:n})},Vs=new WeakSet,Hs=new WeakMap,Us=new WeakMap,Ws=new WeakMap,Gs=new WeakMap,Ks=new WeakMap,qs=new WeakMap,Js=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,Zs={construct(){return Zs}},Qs=e=>{try{new new Proxy(e,Zs)}catch{return!1}return!0},$s=/^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]*);?/,ec=(e,t)=>{let n=[],r=e.replace(/^[\s]+/,``),i=r.match($s);for(;i!==null;){let e=i[1].slice(1,-1),a=i[0].replace(/([\s]+)?;?$/,``).replace(e,new URL(e,t).toString());n.push(a),r=r.slice(i[0].length).replace(/^[\s]+/,``),i=r.match($s)}return[n.join(`;`),r]},tc=e=>{if(e!==void 0&&!Array.isArray(e))throw TypeError(`The parameterDescriptors property of given value for processorCtor is not an array.`)},nc=e=>{if(!Qs(e))throw TypeError(`The given value for processorCtor should be a constructor.`);if(e.prototype===null||typeof e.prototype!=`object`)throw TypeError(`The given value for processorCtor should have a prototype.`)},rc=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{let p=0;return(m,h,g={credentials:`omit`})=>{let _=u.get(m);if(_!==void 0&&_.has(h))return Promise.resolve();let v=l.get(m);if(v!==void 0){let e=v.get(h);if(e!==void 0)return e}let y=a(m),b=y.audioWorklet===void 0?i(h).then(([e,t])=>{let[r,i]=ec(e,t);return n(`${r};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${i} +})})(window,'_AWGS')`)}).then(()=>{let e=f._AWGS.pop();if(e===void 0)throw SyntaxError();r(y.currentTime,y.sampleRate,()=>e(class{},void 0,(e,n)=>{if(e.trim()===``)throw t();let r=Ys.get(y);if(r!==void 0){if(r.has(e))throw t();nc(n),tc(n.parameterDescriptors),r.set(e,n)}else nc(n),tc(n.parameterDescriptors),Ys.set(y,new Map([[e,n]]))},y.sampleRate,void 0,void 0))}):Promise.all([i(h),Promise.resolve(e(d,d))]).then(([[e,t],n])=>{let r=p+1;p=r;let[i,a]=ec(e,t),l=`${i};((AudioWorkletProcessor,registerProcessor)=>{${a} +})(${n?`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{${n?``:`__c = (a) => a.forEach(e=>this.__b.add(e.buffer));`}process(i,o,p){${n?``:`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${r}',class extends AudioWorkletProcessor{process(){return !1}})`,u=new Blob([l],{type:`application/javascript; charset=utf-8`}),d=URL.createObjectURL(u);return y.audioWorklet.addModule(d,g).then(()=>{if(s(y))return y;let e=o(y);return e.audioWorklet.addModule(d,g).then(()=>e)}).then(e=>{if(c===null)throw SyntaxError();try{new c(e,`__sac${r}`)}catch{throw SyntaxError()}}).finally(()=>URL.revokeObjectURL(d))});return v===void 0?l.set(m,new Map([[h,b]])):v.set(h,b),b.then(()=>{let e=u.get(m);e===void 0?u.set(m,new Set([h])):e.add(h)}).finally(()=>{let e=l.get(m);e!==void 0&&e.delete(h)}),b}},ic=(e,t)=>{let n=e.get(t);if(n===void 0)throw Error(`A value with the given key could not be found.`);return n},ac=(e,t)=>{let n=Array.from(e).filter(t);if(n.length>1)throw Error(`More than one element was found.`);if(n.length===0)throw Error(`No element was found.`);let[r]=n;return e.delete(r),r},oc=(e,t,n,r)=>{let i=ic(e,t),a=ac(i,e=>e[0]===n&&e[1]===r);return i.size===0&&e.delete(t),a},sc=e=>ic(qs,e),cc=e=>{if(Vs.has(e))throw Error(`The AudioNode is already stored.`);Vs.add(e),sc(e).forEach(e=>e(!0))},lc=e=>`port`in e,uc=e=>{if(!Vs.has(e))throw Error(`The AudioNode is not stored.`);Vs.delete(e),sc(e).forEach(e=>e(!1))},dc=(e,t)=>{!lc(e)&&t.every(e=>e.size===0)&&uc(e)},fc=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{let p=new WeakMap;return(m,h,g,_,v)=>{let{activeInputs:y,passiveInputs:b}=a(h),{outputs:x}=a(m),S=s(m),C=a=>{let s=c(h),l=c(m);if(a){let t=oc(b,m,g,_);e(y,m,t,!1),!v&&!d(m)&&n(l,s,g,_),f(h)&&cc(h)}else{let e=r(y,m,g,_);t(b,_,e,!1),!v&&!d(m)&&i(l,s,g,_);let n=o(h);if(n===0)u(h)&&dc(h,y);else{let e=p.get(h);e!==void 0&&clearTimeout(e),p.set(h,setTimeout(()=>{u(h)&&dc(h,y)},n*1e3))}}};return l(x,[h,g,_],e=>e[0]===h&&e[1]===g&&e[2]===_,!0)?(S.add(C),u(m)?e(y,m,[g,_,C],!0):t(b,_,[m,g,C],!0),!0):!1}},pc=e=>(t,n,[r,i,a],o)=>{let s=t.get(r);s===void 0?t.set(r,new Set([[i,n,a]])):e(s,[i,n,a],e=>e[0]===i&&e[1]===n,o)},mc=e=>(t,n)=>{let r=e(t,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:0});n.connect(r).connect(t.destination);let i=()=>{n.removeEventListener(`ended`,i),n.disconnect(r),r.disconnect()};n.addEventListener(`ended`,i)},hc=e=>(t,n)=>{e(t).add(n)},gc={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},_c=(e,t,n,r,i,a)=>class extends e{constructor(e,n){let o=i(e),s=r(o,{...gc,...n}),c=a(o)?t():null;super(e,!1,s,c),this._nativeAnalyserNode=s}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(e){this._nativeAnalyserNode.fftSize=e}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(e){let t=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=e,!(e>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=t,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(e){let t=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=e,!(this._nativeAnalyserNode.maxDecibels>e))throw this._nativeAnalyserNode.minDecibels=t,n()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(e){this._nativeAnalyserNode.smoothingTimeConstant=e}getByteFrequencyData(e){this._nativeAnalyserNode.getByteFrequencyData(e)}getByteTimeDomainData(e){this._nativeAnalyserNode.getByteTimeDomainData(e)}getFloatFrequencyData(e){this._nativeAnalyserNode.getFloatFrequencyData(e)}getFloatTimeDomainData(e){this._nativeAnalyserNode.getFloatTimeDomainData(e)}},vc=(e,t)=>e.context===t,yc=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return vc(o,a)||(o=e(a,{channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,fftSize:o.fftSize,maxDecibels:o.maxDecibels,minDecibels:o.minDecibels,smoothingTimeConstant:o.smoothingTimeConstant})),r.set(a,o),await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},bc=e=>{try{e.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},xc=()=>new DOMException(``,`IndexSizeError`),Sc=e=>{e.getChannelData=(t=>n=>{try{return t.call(e,n)}catch(e){throw e.code===12?xc():e}})(e.getChannelData)},Cc={numberOfChannels:1},wc=(e,t,n,r,i,a,o,s)=>{let c=null;return class l{constructor(l){if(i===null)throw Error(`Missing the native OfflineAudioContext constructor.`);let{length:u,numberOfChannels:d,sampleRate:f}={...Cc,...l};c===null&&(c=new i(1,1,44100));let p=r!==null&&t(a,a)?new r({length:u,numberOfChannels:d,sampleRate:f}):c.createBuffer(d,u,f);if(p.numberOfChannels===0)throw n();return typeof p.copyFromChannel==`function`?t(bc,()=>bc(p))||s(p):(o(p),Sc(p)),e.add(p),p}static[Symbol.hasInstance](t){return typeof t==`object`&&!!t&&Object.getPrototypeOf(t)===l.prototype||e.has(t)}}},Tc=-34028234663852886e22,Ec=34028234663852886e22,Dc=e=>Vs.has(e),Oc={buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1},kc=(e,t,n,r,i,a,o,s)=>class extends e{constructor(e,r){let s=a(e),c={...Oc,...r},l=i(s,c),u=o(s),d=u?t():null;super(e,!1,l,d),this._audioBufferSourceNodeRenderer=d,this._isBufferNullified=!1,this._isBufferSet=c.buffer!==null,this._nativeAudioBufferSourceNode=l,this._onended=null,this._playbackRate=n(this,u,l.playbackRate,Ec,Tc)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(e){if(this._nativeAudioBufferSourceNode.buffer=e,e!==null){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(e){this._nativeAudioBufferSourceNode.loop=e}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(e){this._nativeAudioBufferSourceNode.loopEnd=e}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(e){this._nativeAudioBufferSourceNode.loopStart=e}get onended(){return this._onended}set onended(e){let t=typeof e==`function`?s(this,e):null;this._nativeAudioBufferSourceNode.onended=t;let n=this._nativeAudioBufferSourceNode.onended;this._onended=n!==null&&n===t?e:n}get playbackRate(){return this._playbackRate}start(e=0,t=0,n){if(this._nativeAudioBufferSourceNode.start(e,t,n),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=n===void 0?[e,t]:[e,t,n]),this.context.state!==`closed`){cc(this);let e=()=>{this._nativeAudioBufferSourceNode.removeEventListener(`ended`,e),Dc(this)&&uc(this)};this._nativeAudioBufferSourceNode.addEventListener(`ended`,e)}}stop(e=0){this._nativeAudioBufferSourceNode.stop(e),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=e)}},Ac=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=null,s=null,c=async(c,l)=>{let u=n(c),d=vc(u,l);return d||(u=t(l,{buffer:u.buffer,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,loop:u.loop,loopEnd:u.loopEnd,loopStart:u.loopStart,playbackRate:u.playbackRate.value}),o!==null&&u.start(...o),s!==null&&u.stop(s)),a.set(l,u),d?await e(l,c.playbackRate,u.playbackRate):await r(l,c.playbackRate,u.playbackRate),await i(c,l,u),u};return{set start(e){o=e},set stop(e){s=e},render(e,t){let n=a.get(t);return n===void 0?c(e,t):Promise.resolve(n)}}},jc=e=>`playbackRate`in e,Mc=e=>`frequency`in e&&`gain`in e,Nc=e=>`offset`in e,Pc=e=>!(`frequency`in e)&&`gain`in e,Fc=e=>`detune`in e&&`frequency`in e&&!(`gain`in e),Ic=e=>`pan`in e,Lc=e=>ic(Hs,e),Rc=e=>ic(Ws,e),zc=(e,t)=>{let{activeInputs:n}=Lc(e);n.forEach(n=>n.forEach(([n])=>{t.includes(e)||zc(n,[...t,e])}));let r=jc(e)?[e.playbackRate]:lc(e)?Array.from(e.parameters.values()):Mc(e)?[e.Q,e.detune,e.frequency,e.gain]:Nc(e)?[e.offset]:Pc(e)?[e.gain]:Fc(e)?[e.detune,e.frequency]:Ic(e)?[e.pan]:[];for(let e of r){let n=Rc(e);n!==void 0&&n.activeInputs.forEach(([e])=>zc(e,t))}Dc(e)&&uc(e)},Bc=e=>{zc(e.destination,[])},Vc=e=>e===void 0||typeof e==`number`||typeof e==`string`&&(e===`balanced`||e===`interactive`||e===`playback`),Hc=(e,t,n,r,i,a,o,s,c)=>class extends e{constructor(e={}){if(c===null)throw Error(`Missing the native AudioContext constructor.`);let t;try{t=new c(e)}catch(e){throw e.code===12&&e.message===`sampleRate is not in range`?n():e}if(t===null)throw r();if(!Vc(e.latencyHint))throw TypeError(`The provided value '${e.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(e.sampleRate!==void 0&&t.sampleRate!==e.sampleRate)throw n();super(t,2);let{latencyHint:i}=e,{sampleRate:a}=t;if(this._baseLatency=typeof t.baseLatency==`number`?t.baseLatency:i===`balanced`?512/a:i===`interactive`||i===void 0?256/a:i===`playback`?1024/a:Math.max(2,Math.min(128,Math.round(i*a/128)))*128/a,this._nativeAudioContext=t,c.name===`webkitAudioContext`?(this._nativeGainNode=t.createGain(),this._nativeOscillatorNode=t.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(t.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,t.state===`running`){this._state=`suspended`;let e=()=>{this._state===`suspended`&&(this._state=null),t.removeEventListener(`statechange`,e)};t.addEventListener(`statechange`,e)}}get baseLatency(){return this._baseLatency}get state(){return this._state===null?this._nativeAudioContext.state:this._state}close(){return this.state===`closed`?this._nativeAudioContext.close().then(()=>{throw t()}):(this._state===`suspended`&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),Bc(this)}))}createMediaElementSource(e){return new i(this,{mediaElement:e})}createMediaStreamDestination(){return new a(this)}createMediaStreamSource(e){return new o(this,{mediaStream:e})}createMediaStreamTrackSource(e){return new s(this,{mediaStreamTrack:e})}resume(){return this._state===`suspended`?new Promise((e,t)=>{let n=()=>{this._nativeAudioContext.removeEventListener(`statechange`,n),this._nativeAudioContext.state===`running`?e():this.resume().then(e,t)};this._nativeAudioContext.addEventListener(`statechange`,n)}):this._nativeAudioContext.resume().catch(e=>{throw e===void 0||e.code===15?t():e})}suspend(){return this._nativeAudioContext.suspend().catch(e=>{throw e===void 0?t():e})}},Uc=(e,t,n,r,i,a,o,s)=>class extends e{constructor(e,n){let r=a(e),c=o(r),l=i(r,n,c),u=c?t(s):null;super(e,!1,l,u),this._isNodeOfNativeOfflineAudioContext=c,this._nativeAudioDestinationNode=l}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(e>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=e}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=e}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},Wc=e=>{let t=new WeakMap,n=async(n,r)=>{let i=r.destination;return t.set(r,i),await e(n,r,i),i};return{render(e,r){let i=t.get(r);return i===void 0?n(e,r):Promise.resolve(i)}}},Gc=(e,t,n,r,i,a,o,s)=>(c,l)=>{let u=l.listener,{forwardX:d,forwardY:f,forwardZ:p,positionX:m,positionY:h,positionZ:g,upX:_,upY:v,upZ:y}=u.forwardX===void 0?(()=>{let d=new Float32Array(1),f=t(l,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:9}),p=o(l),m=!1,h=[0,0,-1,0,1,0],g=[0,0,0],_=()=>{if(m)return;m=!0;let e=r(l,256,9,0);e.onaudioprocess=({inputBuffer:e})=>{let t=[a(e,d,0),a(e,d,1),a(e,d,2),a(e,d,3),a(e,d,4),a(e,d,5)];t.some((e,t)=>e!==h[t])&&(u.setOrientation(...t),h=t);let n=[a(e,d,6),a(e,d,7),a(e,d,8)];n.some((e,t)=>e!==g[t])&&(u.setPosition(...n),g=n)},f.connect(e)},v=e=>t=>{t!==h[e]&&(h[e]=t,u.setOrientation(...h))},y=e=>t=>{t!==g[e]&&(g[e]=t,u.setPosition(...g))},b=(t,r,a)=>{let o=n(l,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,offset:r});o.connect(f,0,t),o.start(),Object.defineProperty(o.offset,"defaultValue",{get(){return r}});let u=e({context:c},p,o.offset,Ec,Tc);return s(u,`value`,e=>()=>e.call(u),e=>t=>{try{e.call(u,t)}catch(e){if(e.code!==9)throw e}_(),p&&a(t)}),u.cancelAndHoldAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.cancelAndHoldAtTime),u.cancelScheduledValues=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.cancelScheduledValues),u.exponentialRampToValueAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.exponentialRampToValueAtTime),u.linearRampToValueAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.linearRampToValueAtTime),u.setTargetAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.setTargetAtTime),u.setValueAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.setValueAtTime),u.setValueCurveAtTime=(e=>p?()=>{throw i()}:(...t)=>{let n=e.apply(u,t);return _(),n})(u.setValueCurveAtTime),u};return{forwardX:b(0,0,v(0)),forwardY:b(1,0,v(1)),forwardZ:b(2,-1,v(2)),positionX:b(6,0,y(0)),positionY:b(7,0,y(1)),positionZ:b(8,0,y(2)),upX:b(3,0,v(3)),upY:b(4,1,v(4)),upZ:b(5,0,v(5))}})():u;return{get forwardX(){return d},get forwardY(){return f},get forwardZ(){return p},get positionX(){return m},get positionY(){return h},get positionZ(){return g},get upX(){return _},get upY(){return v},get upZ(){return y}}},Kc=e=>`context`in e,qc=e=>Kc(e[0]),Jc=(e,t,n,r)=>{for(let t of e)if(n(t)){if(r)return!1;throw Error(`The set contains at least one similar element.`)}return e.add(t),!0},Yc=(e,t,[n,r],i)=>{Jc(e,[t,n,r],e=>e[0]===t&&e[1]===n,i)},Xc=(e,[t,n,r],i)=>{let a=e.get(t);a===void 0?e.set(t,new Set([[n,r]])):Jc(a,[n,r],e=>e[0]===n,i)},Zc=e=>`inputs`in e,Qc=(e,t,n,r)=>{if(Zc(t)){let i=t.inputs[r];return e.connect(i,n,0),[i,n,0]}return e.connect(t,n,r),[t,n,r]},$c=(e,t,n)=>{for(let r of e)if(r[0]===t&&r[1]===n)return e.delete(r),r;return null},el=(e,t,n)=>ac(e,e=>e[0]===t&&e[1]===n),tl=(e,t)=>{if(!sc(e).delete(t))throw Error(`Missing the expected event listener.`)},nl=(e,t,n)=>{let r=ic(e,t),i=ac(r,e=>e[0]===n);return r.size===0&&e.delete(t),i},rl=(e,t,n,r)=>{Zc(t)?e.disconnect(t.inputs[r],n,0):e.disconnect(t,n,r)},R=e=>ic(Us,e),il=e=>ic(Gs,e),al=e=>Js.has(e),ol=e=>!Vs.has(e),sl=(e,t)=>new Promise(n=>{if(t!==null)n(!0);else{let t=e.createScriptProcessor(256,1,1),r=e.createGain(),i=e.createBuffer(1,2,44100),a=i.getChannelData(0);a[0]=1,a[1]=1;let o=e.createBufferSource();o.buffer=i,o.loop=!0,o.connect(t).connect(e.destination),o.connect(r),o.disconnect(r),t.onaudioprocess=r=>{let i=r.inputBuffer.getChannelData(0);Array.prototype.some.call(i,e=>e===1)?n(!0):n(!1),o.stop(),t.onaudioprocess=null,o.disconnect(t),t.disconnect(e.destination)},o.start()}}),cl=(e,t)=>{let n=new Map;for(let t of e)for(let e of t){let t=n.get(e);n.set(e,t===void 0?1:t+1)}n.forEach((e,n)=>t(n,e))},ll=e=>`context`in e,ul=e=>{let t=new Map;e.connect=(e=>(n,r=0,i=0)=>{let a=ll(n)?e(n,r,i):e(n,r),o=t.get(n);return o===void 0?t.set(n,[{input:i,output:r}]):o.every(e=>e.input!==i||e.output!==r)&&o.push({input:i,output:r}),a})(e.connect.bind(e)),e.disconnect=(n=>(r,i,a)=>{if(n.apply(e),r===void 0)t.clear();else if(typeof r==`number`)for(let[e,n]of t){let i=n.filter(e=>e.output!==r);i.length===0?t.delete(e):t.set(e,i)}else if(t.has(r))if(i===void 0)t.delete(r);else{let e=t.get(r);if(e!==void 0){let n=e.filter(e=>e.output!==i&&(e.input!==a||a===void 0));n.length===0?t.delete(r):t.set(r,n)}}for(let[n,r]of t)r.forEach(t=>{ll(n)?e.connect(n,t.output,t.input):e.connect(n,t.output)})})(e.disconnect)},dl=(e,t,n,r)=>{let{activeInputs:i,passiveInputs:a}=Rc(t),{outputs:o}=Lc(e),s=sc(e),c=o=>{let s=R(e),c=il(t);if(o){let t=nl(a,e,n);Yc(i,e,t,!1),!r&&!al(e)&&s.connect(c,n)}else{let t=el(i,e,n);Xc(a,t,!1),!r&&!al(e)&&s.disconnect(c,n)}};return Jc(o,[t,n],e=>e[0]===t&&e[1]===n,!0)?(s.add(c),Dc(e)?Yc(i,e,[n,c],!0):Xc(a,[e,n,c],!0),!0):!1},fl=(e,t,n,r)=>{let{activeInputs:i,passiveInputs:a}=Lc(t),o=$c(i[r],e,n);return o===null?[oc(a,e,n,r)[2],!1]:[o[2],!0]},pl=(e,t,n)=>{let{activeInputs:r,passiveInputs:i}=Rc(t),a=$c(r,e,n);return a===null?[nl(i,e,n)[1],!1]:[a[2],!0]},ml=(e,t,n,r,i)=>{let[a,o]=fl(e,n,r,i);if(a!==null&&(tl(e,a),o&&!t&&!al(e)&&rl(R(e),R(n),r,i)),Dc(n)){let{activeInputs:e}=Lc(n);dc(n,e)}},hl=(e,t,n,r)=>{let[i,a]=pl(e,n,r);i!==null&&(tl(e,i),a&&!t&&!al(e)&&R(e).disconnect(il(n),r))},gl=(e,t)=>{let n=Lc(e),r=[];for(let i of n.outputs)qc(i)?ml(e,t,...i):hl(e,t,...i),r.push(i[0]);return n.outputs.clear(),r},_l=(e,t,n)=>{let r=Lc(e),i=[];for(let a of r.outputs)a[1]===n&&(qc(a)?ml(e,t,...a):hl(e,t,...a),i.push(a[0]),r.outputs.delete(a));return i},vl=(e,t,n,r,i)=>{let a=Lc(e);return Array.from(a.outputs).filter(e=>e[0]===n&&(r===void 0||e[1]===r)&&(i===void 0||e[2]===i)).map(n=>(qc(n)?ml(e,t,...n):hl(e,t,...n),a.outputs.delete(n),n[0]))},yl=(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)=>class extends l{constructor(t,r,i,a){super(i),this._context=t,this._nativeAudioNode=i;let o=u(t);d(o)&&!0!==n(sl,()=>sl(o,h))&&ul(i),Us.set(this,i),qs.set(this,new Set),t.state!==`closed`&&r&&cc(this),e(this,a,i)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(e){this._nativeAudioNode.channelCount=e}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(e){this._nativeAudioNode.channelCountMode=e}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(e){this._nativeAudioNode.channelInterpretation=e}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(e,n=0,s=0){if(n<0||n>=this._nativeAudioNode.numberOfOutputs)throw i();let l=m(u(this._context));if(f(e)||p(e))throw a();if(Kc(e)){let i=R(e);try{let t=Qc(this._nativeAudioNode,i,n,s),r=ol(this);(l||r)&&this._nativeAudioNode.disconnect(...t),this.context.state!==`closed`&&!r&&ol(e)&&cc(e)}catch(e){throw e.code===12?a():e}return t(this,e,n,s,l)&&cl(c([this],e),r(l)),e}let d=il(e);if(d.name===`playbackRate`&&d.maxValue===1024)throw o();try{this._nativeAudioNode.connect(d,n),(l||ol(this))&&this._nativeAudioNode.disconnect(d,n)}catch(e){throw e.code===12?a():e}dl(this,e,n,l)&&cl(c([this],e),r(l))}disconnect(e,t,n){let r,o=m(u(this._context));if(e===void 0)r=gl(this,o);else if(typeof e==`number`){if(e<0||e>=this.numberOfOutputs)throw i();r=_l(this,o,e)}else{if(t!==void 0&&(t<0||t>=this.numberOfOutputs)||Kc(e)&&n!==void 0&&(n<0||n>=e.numberOfInputs))throw i();if(r=vl(this,o,e,t,n),r.length===0)throw a()}for(let e of r)cl(c([this],e),s)}},bl=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>(p,m,h,g=null,_=null)=>{let v=h.value,y=new Is.AutomationEventList(v),b=m?r(y):null,x={get defaultValue(){return v},get maxValue(){return g===null?h.maxValue:g},get minValue(){return _===null?h.minValue:_},get value(){return h.value},set value(e){h.value=e,x.setValueAtTime(e,p.context.currentTime)},cancelAndHoldAtTime(e){if(typeof h.cancelAndHoldAtTime==`function`)b===null&&y.flush(p.context.currentTime),y.add(i(e)),h.cancelAndHoldAtTime(e);else{let t=Array.from(y).pop();b===null&&y.flush(p.context.currentTime),y.add(i(e));let n=Array.from(y).pop();h.cancelScheduledValues(e),t!==n&&n!==void 0&&(n.type===`exponentialRampToValue`?h.exponentialRampToValueAtTime(n.value,n.endTime):n.type===`linearRampToValue`?h.linearRampToValueAtTime(n.value,n.endTime):n.type===`setValue`?h.setValueAtTime(n.value,n.startTime):n.type===`setValueCurve`&&h.setValueCurveAtTime(n.values,n.startTime,n.duration))}return x},cancelScheduledValues(e){return b===null&&y.flush(p.context.currentTime),y.add(a(e)),h.cancelScheduledValues(e),x},exponentialRampToValueAtTime(e,t){if(e===0||!Number.isFinite(t)||t<0)throw RangeError();let n=p.context.currentTime;return b===null&&y.flush(n),Array.from(y).length===0&&(y.add(l(v,n)),h.setValueAtTime(v,n)),y.add(o(e,t)),h.exponentialRampToValueAtTime(e,t),x},linearRampToValueAtTime(e,t){let n=p.context.currentTime;return b===null&&y.flush(n),Array.from(y).length===0&&(y.add(l(v,n)),h.setValueAtTime(v,n)),y.add(s(e,t)),h.linearRampToValueAtTime(e,t),x},setTargetAtTime(e,t,n){return b===null&&y.flush(p.context.currentTime),y.add(c(e,t,n)),h.setTargetAtTime(e,t,n),x},setValueAtTime(e,t){return b===null&&y.flush(p.context.currentTime),y.add(l(e,t)),h.setValueAtTime(e,t),x},setValueCurveAtTime(e,t,n){let r=e instanceof Float32Array?e:new Float32Array(e);if(d!==null&&d.name===`webkitAudioContext`){let e=t+n,i=p.context.sampleRate,a=Math.ceil(t*i),o=Math.floor(e*i),s=o-a,c=new Float32Array(s);for(let e=0;e({replay(t){for(let n of e)if(n.type===`exponentialRampToValue`){let{endTime:e,value:r}=n;t.exponentialRampToValueAtTime(r,e)}else if(n.type===`linearRampToValue`){let{endTime:e,value:r}=n;t.linearRampToValueAtTime(r,e)}else if(n.type===`setTarget`){let{startTime:e,target:r,timeConstant:i}=n;t.setTargetAtTime(r,e,i)}else if(n.type===`setValue`){let{startTime:e,value:r}=n;t.setValueAtTime(r,e)}else if(n.type===`setValueCurve`){let{duration:e,startTime:r,values:i}=n;t.setValueCurveAtTime(i,r,e)}else throw Error(`Can't apply an unknown automation.`)}}),Sl=class{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach((n,r)=>e.call(t,n,r,this))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}},Cl={channelCount:2,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},wl=(e,t,n,r,i,a,o,s,c,l,u,d,f,p)=>class extends t{constructor(t,p,m){let h=s(t),g=c(h),_=u({...Cl,...m});f(_);let v=Ys.get(h)?.get(p),y=i(g||h.state!==`closed`?h:o(h)??h,g?null:t.baseLatency,l,p,v,_),b=g?r(p,_,v):null;super(t,!0,y,b);let x=[];y.parameters.forEach((e,t)=>{let r=n(this,g,e);x.push([t,r])}),this._nativeAudioWorkletNode=y,this._onprocessorerror=null,this._parameters=new Sl(x),g&&e(h,this);let{activeInputs:S}=a(this);d(y,S)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(e){let t=typeof e==`function`?p(this,e):null;this._nativeAudioWorkletNode.onprocessorerror=t;let n=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=n!==null&&n===t?e:n}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function Tl(e,t,n,r,i){if(typeof e.copyFromChannel==`function`)t[n].byteLength===0&&(t[n]=new Float32Array(128)),e.copyFromChannel(t[n],r,i);else{let a=e.getChannelData(r);if(t[n].byteLength===0)t[n]=a.slice(i,i+128);else{let e=new Float32Array(a.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);t[n].set(e)}}}var El=(e,t,n,r,i)=>{typeof e.copyToChannel==`function`?t[n].byteLength!==0&&e.copyToChannel(t[n],r,i):t[n].byteLength!==0&&e.getChannelData(r).set(t[n],i)},Dl=(e,t)=>{let n=[];for(let r=0;ric(ic(Xs,e),R(t)),kl=async(e,t,n,r,i,a,o)=>{let s=t===null?Math.ceil(e.context.length/128)*128:t.length,c=r.channelCount*r.numberOfInputs,l=i.reduce((e,t)=>e+t,0),u=l===0?null:n.createBuffer(l,s,n.sampleRate);if(a===void 0)throw Error(`Missing the processor constructor.`);let d=Lc(e),f=await Ol(n,e),p=Dl(r.numberOfInputs,r.channelCount),m=Dl(r.numberOfOutputs,i),h=Array.from(e.parameters.keys()).reduce((e,t)=>({...e,[t]:new Float32Array(128)}),{});for(let l=0;l0&&t!==null)for(let e=0;e{Tl(t,h,e,c+n,l)});for(let e=0;ed.activeInputs[t].size===0?[]:e),t=o(l/n.sampleRate,n.sampleRate,()=>f.process(e,m,h));if(u!==null)for(let e=0,t=0;e(g,_,v)=>{let y=new WeakMap,b=null,x=async(s,x)=>{let S=u(s),C=null,w=vc(S,x),T=Array.isArray(_.outputChannelCount)?_.outputChannelCount:Array.from(_.outputChannelCount);if(d===null){let e=T.reduce((e,t)=>e+t,0),n=i(x,{channelCount:Math.max(1,e),channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:Math.max(1,e)}),a=[];for(let e=0;e{let c=new f(n,Math.ceil(s.context.length/128)*128,x.sampleRate),l=[],u=[];for(let e=0;e<_.numberOfInputs;e+=1)l.push(o(c,{channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:1})),u.push(i(c,{channelCount:_.channelCount,channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:_.channelCount}));let d=await Promise.all(Array.from(s.parameters.values()).map(async e=>{let t=a(c,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,offset:e.value});return await p(c,e,t.offset),t})),g=r(c,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:Math.max(1,e+t)});for(let e=0;e<_.numberOfInputs;e+=1){l[e].connect(u[e]);for(let t=0;t<_.channelCount;t+=1)u[e].connect(g,t,e*_.channelCount+t)}for(let[t,n]of d.entries())n.connect(g,0,e+t),n.start(0);return g.connect(c.destination),await Promise.all(l.map(e=>m(s,c,e))),h(c)})(),x,_,T,v,l)}let e=await b,t=n(x,{buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[c,u,d]=C;e!==null&&(t.buffer=e,t.start(0)),t.connect(c);for(let e=0,t=0;eclass extends m{constructor(t,n){super(t,n),this._nativeContext=t,this._audioWorklet=e===void 0?void 0:{addModule:(t,n)=>e(this,t,n)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new t(this)}createBiquadFilter(){return new i(this)}createBuffer(e,t,r){return new n({length:t,numberOfChannels:e,sampleRate:r})}createBufferSource(){return new r(this)}createChannelMerger(e=6){return new a(this,{numberOfInputs:e})}createChannelSplitter(e=6){return new o(this,{numberOfOutputs:e})}createConstantSource(){return new s(this)}createConvolver(){return new c(this)}createDelay(e=1){return new u(this,{maxDelayTime:e})}createDynamicsCompressor(){return new d(this)}createGain(){return new f(this)}createIIRFilter(e,t){return new p(this,{feedback:t,feedforward:e})}createOscillator(){return new h(this)}createPanner(){return new g(this)}createPeriodicWave(e,t,n={disableNormalization:!1}){return new _(this,{...n,imag:t,real:e})}createStereoPanner(){return new v(this)}createWaveShaper(){return new y(this)}decodeAudioData(e,t,n){return l(this._nativeContext,e).then(e=>(typeof t==`function`&&t(e),e),e=>{throw typeof n==`function`&&n(e),e})}},Ml={Q:1,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,detune:0,frequency:350,gain:0,type:`lowpass`},Nl=(e,t,n,r,i,a,o,s)=>class extends e{constructor(e,r){let c=a(e),l=i(c,{...Ml,...r}),u=o(c),d=u?n():null;super(e,!1,l,d),this._Q=t(this,u,l.Q,Ec,Tc),this._detune=t(this,u,l.detune,1200*Math.log2(Ec),-1200*Math.log2(Ec)),this._frequency=t(this,u,l.frequency,e.sampleRate/2,0),this._gain=t(this,u,l.gain,40*Math.log10(Ec),Tc),this._nativeBiquadFilterNode=l,s(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(e){this._nativeBiquadFilterNode.type=e}getFrequencyResponse(e,t,n){try{this._nativeBiquadFilterNode.getFrequencyResponse(e,t,n)}catch(e){throw e.code===11?r():e}if(e.length!==t.length||t.length!==n.length)throw r()}},Pl=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=async(o,s)=>{let c=n(o),l=vc(c,s);return l||(c=t(s,{Q:c.Q.value,channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,detune:c.detune.value,frequency:c.frequency.value,gain:c.gain.value,type:c.type})),a.set(s,c),l?(await e(s,o.Q,c.Q),await e(s,o.detune,c.detune),await e(s,o.frequency,c.frequency),await e(s,o.gain,c.gain)):(await r(s,o.Q,c.Q),await r(s,o.detune,c.detune),await r(s,o.frequency,c.frequency),await r(s,o.gain,c.gain)),await i(o,s,c),c};return{render(e,t){let n=a.get(t);return n===void 0?o(e,t):Promise.resolve(n)}}},Fl=(e,t)=>(n,r)=>{let i=t.get(n);if(i!==void 0)return i;let a=e.get(n);if(a!==void 0)return a;try{let i=r();return i instanceof Promise?(e.set(n,i),i.catch(()=>!1).then(r=>(e.delete(n),t.set(n,r),r))):(t.set(n,i),i)}catch{return t.set(n,!1),!1}},Il={channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:6},Ll=(e,t,n,r,i)=>class extends e{constructor(e,a){let o=r(e),s=n(o,{...Il,...a}),c=i(o)?t():null;super(e,!1,s,c)}},Rl=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return vc(o,a)||(o=e(a,{channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,numberOfInputs:o.numberOfInputs})),r.set(a,o),await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},zl={channelCount:6,channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:6},Bl=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=r(e),c=n(s,a({...zl,...o})),l=i(s)?t():null;super(e,!1,c,l)}},Vl=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return vc(o,a)||(o=e(a,{channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,numberOfOutputs:o.numberOfOutputs})),r.set(a,o),await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},Hl=e=>(t,n,r)=>e(n,t,r),Ul=e=>(t,n,r=0,i=0)=>{let a=t[r];if(a===void 0)throw e();return ll(n)?a.connect(n,0,i):a.connect(n,0)},Wl=e=>(t,n)=>{let r=e(t,{buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1});return r.buffer=t.createBuffer(1,2,44100),r.loop=!0,r.connect(n),r.start(),()=>{r.stop(),r.disconnect(n)}},Gl={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,offset:1},Kl=(e,t,n,r,i,a,o)=>class extends e{constructor(e,o){let s=i(e),c=r(s,{...Gl,...o}),l=a(s),u=l?n():null;super(e,!1,c,u),this._constantSourceNodeRenderer=u,this._nativeConstantSourceNode=c,this._offset=t(this,l,c.offset,Ec,Tc),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(e){let t=typeof e==`function`?o(this,e):null;this._nativeConstantSourceNode.onended=t;let n=this._nativeConstantSourceNode.onended;this._onended=n!==null&&n===t?e:n}start(e=0){if(this._nativeConstantSourceNode.start(e),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=e),this.context.state!==`closed`){cc(this);let e=()=>{this._nativeConstantSourceNode.removeEventListener(`ended`,e),Dc(this)&&uc(this)};this._nativeConstantSourceNode.addEventListener(`ended`,e)}}stop(e=0){this._nativeConstantSourceNode.stop(e),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=e)}},ql=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=null,s=null,c=async(c,l)=>{let u=n(c),d=vc(u,l);return d||(u=t(l,{channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,offset:u.offset.value}),o!==null&&u.start(o),s!==null&&u.stop(s)),a.set(l,u),d?await e(l,c.offset,u.offset):await r(l,c.offset,u.offset),await i(c,l,u),u};return{set start(e){o=e},set stop(e){s=e},render(e,t){let n=a.get(t);return n===void 0?c(e,t):Promise.resolve(n)}}},Jl=e=>t=>(e[0]=t,e[0]),Yl={buffer:null,channelCount:2,channelCountMode:`clamped-max`,channelInterpretation:`speakers`,disableNormalization:!1},Xl=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=r(e),c={...Yl,...o},l=n(s,c),u=i(s)?t():null;super(e,!1,l,u),this._isBufferNullified=!1,this._nativeConvolverNode=l,c.buffer!==null&&a(this,c.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(e){if(this._nativeConvolverNode.buffer=e,e===null&&this._nativeConvolverNode.buffer!==null){let e=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=e.createBuffer(1,1,e.sampleRate),this._isBufferNullified=!0,a(this,0)}else this._isBufferNullified=!1,a(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(e){this._nativeConvolverNode.normalize=e}},Zl=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return vc(o,a)||(o=e(a,{buffer:o.buffer,channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,disableNormalization:!o.normalize})),r.set(a,o),Zc(o)?await n(i,a,o.inputs[0]):await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},Ql=(e,t)=>(n,r,i)=>{if(t===null)throw Error(`Missing the native OfflineAudioContext constructor.`);try{return new t(n,r,i)}catch(t){throw t.name===`SyntaxError`?e():t}},$l=()=>new DOMException(``,`DataCloneError`),eu=e=>{let{port1:t,port2:n}=new MessageChannel;return new Promise(r=>{let i=()=>{n.onmessage=null,t.close(),n.close(),r()};n.onmessage=()=>i();try{t.postMessage(e,[e])}catch{}finally{i()}})},tu=(e,t,n,r,i,a,o,s,c,l,u)=>(d,f)=>{let p=o(d)?d:a(d);if(i.has(f)){let e=n();return Promise.reject(e)}try{i.add(f)}catch{}return t(c,()=>c(p))?p.decodeAudioData(f).then(n=>(eu(f).catch(()=>{}),t(s,()=>s(n))||u(n),e.add(n),n)):new Promise((t,n)=>{let i=async()=>{try{await eu(f)}catch{}},a=e=>{n(e),i()};try{p.decodeAudioData(f,n=>{typeof n.copyFromChannel!=`function`&&(l(n),Sc(n)),e.add(n),i().then(()=>t(n))},e=>{a(e===null?r():e)})}catch(e){a(e)}})},nu=(e,t,n,r,i,a,o,s)=>(c,l)=>{let u=t.get(c);if(u===void 0)throw Error(`Missing the expected cycle count.`);let d=s(a(c.context));if(u===l){if(t.delete(c),!d&&o(c)){let t=r(c),{outputs:a}=n(c);for(let n of a)if(qc(n))e(t,r(n[0]),n[1],n[2]);else{let e=i(n[0]);t.connect(e,n[1])}}}else t.set(c,u-l)},ru={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,delayTime:0,maxDelayTime:1},iu=(e,t,n,r,i,a,o)=>class extends e{constructor(e,s){let c=i(e),l={...ru,...s},u=r(c,l),d=a(c),f=d?n(l.maxDelayTime):null;super(e,!1,u,f),this._delayTime=t(this,d,u.delayTime),o(this,l.maxDelayTime)}get delayTime(){return this._delayTime}},au=(e,t,n,r,i)=>a=>{let o=new WeakMap,s=async(s,c)=>{let l=n(s),u=vc(l,c);return u||(l=t(c,{channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,delayTime:l.delayTime.value,maxDelayTime:a})),o.set(c,l),u?await e(c,s.delayTime,l.delayTime):await r(c,s.delayTime,l.delayTime),await i(s,c,l),l};return{render(e,t){let n=o.get(t);return n===void 0?s(e,t):Promise.resolve(n)}}},ou=e=>(t,n,r,i)=>e(t[i],e=>e[0]===n&&e[1]===r),su=e=>(t,n)=>{e(t).delete(n)},cu=e=>`delayTime`in e,lu=(e,t,n)=>function r(i,a){let o=Kc(a)?a:n(e,a);if(cu(o))return[];if(i[0]===o)return[i];if(i.includes(o))return[];let{outputs:s}=t(o);return Array.from(s).map(e=>r([...i,o],e[0])).reduce((e,t)=>e.concat(t),[])},uu=(e,t,n)=>{let r=t[n];if(r===void 0)throw e();return r},du=e=>(t,n=void 0,r=void 0,i=0)=>n===void 0?t.forEach(e=>e.disconnect()):typeof n==`number`?uu(e,t,n).disconnect():ll(n)?r===void 0?t.forEach(e=>e.disconnect(n)):i===void 0?uu(e,t,r).disconnect(n,0):uu(e,t,r).disconnect(n,0,i):r===void 0?t.forEach(e=>e.disconnect(n)):uu(e,t,r).disconnect(n,0),fu={attack:.003,channelCount:2,channelCountMode:`clamped-max`,channelInterpretation:`speakers`,knee:30,ratio:12,release:.25,threshold:-24},pu=(e,t,n,r,i,a,o,s)=>class extends e{constructor(e,i){let c=a(e),l=r(c,{...fu,...i}),u=o(c),d=u?n():null;super(e,!1,l,d),this._attack=t(this,u,l.attack),this._knee=t(this,u,l.knee),this._nativeDynamicsCompressorNode=l,this._ratio=t(this,u,l.ratio),this._release=t(this,u,l.release),this._threshold=t(this,u,l.threshold),s(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(e){let t=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=e,e>2)throw this._nativeDynamicsCompressorNode.channelCount=t,i()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(e){let t=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=e,e===`max`)throw this._nativeDynamicsCompressorNode.channelCountMode=t,i()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value==`number`?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},mu=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=async(o,s)=>{let c=n(o),l=vc(c,s);return l||(c=t(s,{attack:c.attack.value,channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,knee:c.knee.value,ratio:c.ratio.value,release:c.release.value,threshold:c.threshold.value})),a.set(s,c),l?(await e(s,o.attack,c.attack),await e(s,o.knee,c.knee),await e(s,o.ratio,c.ratio),await e(s,o.release,c.release),await e(s,o.threshold,c.threshold)):(await r(s,o.attack,c.attack),await r(s,o.knee,c.knee),await r(s,o.ratio,c.ratio),await r(s,o.release,c.release),await r(s,o.threshold,c.threshold)),await i(o,s,c),c};return{render(e,t){let n=a.get(t);return n===void 0?o(e,t):Promise.resolve(n)}}},hu=()=>new DOMException(``,`EncodingError`),gu=e=>t=>new Promise((n,r)=>{if(e===null){r(SyntaxError());return}let i=e.document.head;if(i===null)r(SyntaxError());else{let a=e.document.createElement(`script`),o=new Blob([t],{type:`application/javascript`}),s=URL.createObjectURL(o),c=e.onerror,l=()=>{e.onerror=c,URL.revokeObjectURL(s)};e.onerror=(t,n,i,a,o)=>{if(n===s||n===e.location.href&&i===1&&a===1)return l(),r(o),!1;if(c!==null)return c(t,n,i,a,o)},a.onerror=()=>{l(),r(SyntaxError())},a.onload=()=>{l(),n()},a.src=s,a.type=`module`,i.appendChild(a)}}),_u=e=>class{constructor(e){this._nativeEventTarget=e,this._listeners=new WeakMap}addEventListener(t,n,r){if(n!==null){let i=this._listeners.get(n);i===void 0&&(i=e(this,n),typeof n==`function`&&this._listeners.set(n,i)),this._nativeEventTarget.addEventListener(t,i,r)}}dispatchEvent(e){return this._nativeEventTarget.dispatchEvent(e)}removeEventListener(e,t,n){let r=t===null?void 0:this._listeners.get(t);this._nativeEventTarget.removeEventListener(e,r===void 0?null:r,n)}},vu=e=>(t,n,r)=>{Object.defineProperties(e,{currentFrame:{configurable:!0,get(){return Math.round(t*n)}},currentTime:{configurable:!0,get(){return t}}});try{return r()}finally{e!==null&&(delete e.currentFrame,delete e.currentTime)}},yu=e=>async t=>{try{let e=await fetch(t);if(e.ok)return[await e.text(),e.url]}catch{}throw e()},bu={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,gain:1},xu=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=i(e),c=r(s,{...bu,...o}),l=a(s),u=l?n():null;super(e,!1,c,u),this._gain=t(this,l,c.gain,Ec,Tc)}get gain(){return this._gain}},Su=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=async(o,s)=>{let c=n(o),l=vc(c,s);return l||(c=t(s,{channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,gain:c.gain.value})),a.set(s,c),l?await e(s,o.gain,c.gain):await r(s,o.gain,c.gain),await i(o,s,c),c};return{render(e,t){let n=a.get(t);return n===void 0?o(e,t):Promise.resolve(n)}}},Cu=(e,t)=>n=>t(e,n),wu=e=>t=>{let n=e(t);if(n.renderer===null)throw Error(`Missing the renderer of the given AudioNode in the audio graph.`);return n.renderer},Tu=e=>t=>e.get(t)??0,Eu=e=>t=>{let n=e(t);if(n.renderer===null)throw Error(`Missing the renderer of the given AudioParam in the audio graph.`);return n.renderer},Du=e=>t=>e.get(t),z=()=>new DOMException(``,`InvalidStateError`),Ou=e=>t=>{let n=e.get(t);if(n===void 0)throw z();return n},ku=(e,t)=>n=>{let r=e.get(n);if(r!==void 0)return r;if(t===null)throw Error(`Missing the native OfflineAudioContext constructor.`);return r=new t(1,1,44100),e.set(n,r),r},Au=e=>t=>{let n=e.get(t);if(n===void 0)throw Error(`The context has no set of AudioWorkletNodes.`);return n},ju=()=>new DOMException(``,`InvalidAccessError`),Mu=e=>{e.getFrequencyResponse=(t=>(n,r,i)=>{if(n.length!==r.length||r.length!==i.length)throw ju();return t.call(e,n,r,i)})(e.getFrequencyResponse)},Nu={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`},Pu=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=r(e),c=i(s),l={...Nu,...o},u=t(s,c?null:e.baseLatency,l),d=c?n(l.feedback,l.feedforward):null;super(e,!1,u,d),Mu(u),this._nativeIIRFilterNode=u,a(this,1)}getFrequencyResponse(e,t,n){return this._nativeIIRFilterNode.getFrequencyResponse(e,t,n)}},Fu=(e,t,n,r,i,a,o,s,c,l,u)=>{let d=l.length,f=s;for(let s=0;s{let i=n instanceof Float64Array?n:new Float64Array(n),a=r instanceof Float64Array?r:new Float64Array(r),o=i.length,s=a.length,c=Math.min(o,s);if(i[0]!==1){for(let e=0;e(a,o)=>{let s=new WeakMap,c=null,l=async(l,u)=>{let d=null,f=t(l),p=vc(f,u);if(u.createIIRFilter===void 0?d=e(u,{buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):p||(f=u.createIIRFilter(o,a)),s.set(u,d===null?f:d),d!==null){if(c===null){if(n===null)throw Error(`Missing the native OfflineAudioContext constructor.`);let e=new n(l.context.destination.channelCount,l.context.length,u.sampleRate);c=(async()=>(await r(l,e,e.destination),Iu(await i(e),u,a,o)))()}let e=await c;return d.buffer=e,d.start(0),d}return await r(l,u,f),f};return{render(e,t){let n=s.get(t);return n===void 0?l(e,t):Promise.resolve(n)}}},Ru=(e,t,n,r,i,a)=>o=>(s,c)=>{let l=e.get(s);if(l===void 0){if(!o&&a(s)){let e=r(s),{outputs:a}=n(s);for(let n of a)if(qc(n))t(e,r(n[0]),n[1],n[2]);else{let t=i(n[0]);e.disconnect(t,n[1])}}e.set(s,c)}else e.set(s,l+c)},zu=(e,t)=>n=>t(e.get(n))||t(n),Bu=(e,t)=>n=>e.has(n)||t(n),Vu=(e,t)=>n=>e.has(n)||t(n),Hu=(e,t)=>n=>t(e.get(n))||t(n),Uu=e=>t=>e!==null&&t instanceof e,Wu=e=>t=>e!==null&&typeof e.AudioNode==`function`&&t instanceof e.AudioNode,Gu=e=>t=>e!==null&&typeof e.AudioParam==`function`&&t instanceof e.AudioParam,Ku=(e,t)=>n=>e(n)||t(n),qu=e=>t=>e!==null&&t instanceof e,Ju=e=>e!==null&&e.isSecureContext,Yu=(e,t,n,r)=>class extends e{constructor(e,i){let a=n(e),o=t(a,i);if(r(a))throw TypeError();super(e,!0,o,null),this._nativeMediaElementAudioSourceNode=o}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},Xu={channelCount:2,channelCountMode:`explicit`,channelInterpretation:`speakers`},Zu=(e,t,n,r)=>class extends e{constructor(e,i){let a=n(e);if(r(a))throw TypeError();let o=t(a,{...Xu,...i});super(e,!1,o,null),this._nativeMediaStreamAudioDestinationNode=o}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},Qu=(e,t,n,r)=>class extends e{constructor(e,i){let a=n(e),o=t(a,i);if(r(a))throw TypeError();super(e,!0,o,null),this._nativeMediaStreamAudioSourceNode=o}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},$u=(e,t,n)=>class extends e{constructor(e,r){let i=t(n(e),r);super(e,!0,i,null)}},ed=(e,t,n,r,i,a)=>class extends n{constructor(n,a){super(n),this._nativeContext=n,Ks.set(this,n),r(n)&&i.set(n,new Set),this._destination=new e(this,a),this._listener=t(this,n),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(e){let t=typeof e==`function`?a(this,e):null;this._nativeContext.onstatechange=t;let n=this._nativeContext.onstatechange;this._onstatechange=n!==null&&n===t?e:n}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},td=e=>{let t=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{let n=e.decodeAudioData(t.buffer,()=>{});return n===void 0?!1:(n.catch(()=>{}),!0)}catch{}return!1},nd=(e,t)=>(n,r,i)=>{let a=new Set;return n.connect=(i=>(o,s=0,c=0)=>{let l=a.size===0;if(t(o))return i.call(n,o,s,c),e(a,[o,s,c],e=>e[0]===o&&e[1]===s&&e[2]===c,!0),l&&r(),o;i.call(n,o,s),e(a,[o,s],e=>e[0]===o&&e[1]===s,!0),l&&r()})(n.connect),n.disconnect=(e=>(r,o,s)=>{let c=a.size>0;if(r===void 0)e.apply(n),a.clear();else if(typeof r==`number`){e.call(n,r);for(let e of a)e[1]===r&&a.delete(e)}else{t(r)?e.call(n,r,o,s):e.call(n,r,o);for(let e of a)e[0]===r&&(o===void 0||e[1]===o)&&(s===void 0||e[2]===s)&&a.delete(e)}let l=a.size===0;c&&l&&i()})(n.disconnect),n},B=(e,t,n)=>{let r=t[n];r!==void 0&&r!==e[n]&&(e[n]=r)},V=(e,t)=>{B(e,t,`channelCount`),B(e,t,`channelCountMode`),B(e,t,`channelInterpretation`)},rd=e=>typeof e.getFloatTimeDomainData==`function`,id=e=>{e.getFloatTimeDomainData=t=>{let n=new Uint8Array(t.length);e.getByteTimeDomainData(n);let r=Math.max(n.length,e.fftSize);for(let e=0;e(n,r)=>{let i=n.createAnalyser();if(V(i,r),!(r.maxDecibels>r.minDecibels))throw t();return B(i,r,`fftSize`),B(i,r,`maxDecibels`),B(i,r,`minDecibels`),B(i,r,`smoothingTimeConstant`),e(rd,()=>rd(i))||id(i),i},od=e=>e===null?null:e.hasOwnProperty(`AudioBuffer`)?e.AudioBuffer:null,H=(e,t,n)=>{let r=t[n];r!==void 0&&r!==e[n].value&&(e[n].value=r)},sd=e=>{e.start=(t=>{let n=!1;return(r=0,i=0,a)=>{if(n)throw z();t.call(e,r,i,a),n=!0}})(e.start)},cd=e=>{e.start=(t=>(n=0,r=0,i)=>{if(typeof i==`number`&&i<0||r<0||n<0)throw RangeError(`The parameters can't be negative.`);t.call(e,n,r,i)})(e.start)},ld=e=>{e.stop=(t=>(n=0)=>{if(n<0)throw RangeError(`The parameter can't be negative.`);t.call(e,n)})(e.stop)},ud=(e,t,n,r,i,a,o,s,c,l,u)=>(d,f)=>{let p=d.createBufferSource();return V(p,f),H(p,f,`playbackRate`),B(p,f,`buffer`),B(p,f,`loop`),B(p,f,`loopEnd`),B(p,f,`loopStart`),t(n,()=>n(d))||sd(p),t(r,()=>r(d))||c(p),t(i,()=>i(d))||l(p,d),t(a,()=>a(d))||cd(p),t(o,()=>o(d))||u(p,d),t(s,()=>s(d))||ld(p),e(d,p),p},dd=e=>e===null?null:e.hasOwnProperty(`AudioContext`)?e.AudioContext:e.hasOwnProperty(`webkitAudioContext`)?e.webkitAudioContext:null,fd=(e,t)=>(n,r,i)=>{let a=n.destination;if(a.channelCount!==r)try{a.channelCount=r}catch{}i&&a.channelCountMode!==`explicit`&&(a.channelCountMode=`explicit`),a.maxChannelCount===0&&Object.defineProperty(a,"maxChannelCount",{value:r});let o=e(n,{channelCount:r,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,gain:1});return t(o,`channelCount`,e=>()=>e.call(o),e=>t=>{e.call(o,t);try{a.channelCount=t}catch(e){if(t>a.maxChannelCount)throw e}}),t(o,`channelCountMode`,e=>()=>e.call(o),e=>t=>{e.call(o,t),a.channelCountMode=t}),t(o,`channelInterpretation`,e=>()=>e.call(o),e=>t=>{e.call(o,t),a.channelInterpretation=t}),Object.defineProperty(o,"maxChannelCount",{get:()=>a.maxChannelCount}),o.connect(a),o},pd=e=>e===null?null:e.hasOwnProperty(`AudioWorkletNode`)?e.AudioWorkletNode:null,md=e=>{let{port1:t}=new MessageChannel;try{t.postMessage(e)}finally{t.close()}},hd=(e,t,n,r,i)=>(a,o,s,c,l,u)=>{if(s!==null)try{let t=new s(a,c,u),r=new Map,o=null;if(Object.defineProperties(t,{channelCount:{get:()=>u.channelCount,set:()=>{throw e()}},channelCountMode:{get:()=>`explicit`,set:()=>{throw e()}},onprocessorerror:{get:()=>o,set:e=>{typeof o==`function`&&t.removeEventListener(`processorerror`,o),o=typeof e==`function`?e:null,typeof o==`function`&&t.addEventListener(`processorerror`,o)}}}),t.addEventListener=(e=>(...n)=>{if(n[0]===`processorerror`){let e=typeof n[1]==`function`?n[1]:typeof n[1]==`object`&&n[1]!==null&&typeof n[1].handleEvent==`function`?n[1].handleEvent:null;if(e!==null){let t=r.get(n[1]);t===void 0?(n[1]=t=>{t.type===`error`?(Object.defineProperties(t,{type:{value:`processorerror`}}),e(t)):e(new ErrorEvent(n[0],{...t}))},r.set(e,n[1])):n[1]=t}}return e.call(t,`error`,n[1],n[2]),e.call(t,...n)})(t.addEventListener),t.removeEventListener=(e=>(...n)=>{if(n[0]===`processorerror`){let e=r.get(n[1]);e!==void 0&&(r.delete(n[1]),n[1]=e)}return e.call(t,`error`,n[1],n[2]),e.call(t,n[0],n[1],n[2])})(t.removeEventListener),u.numberOfOutputs!==0){let e=n(a,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:0});return t.connect(e).connect(a.destination),i(t,()=>e.disconnect(),()=>e.connect(a.destination))}return t}catch(e){throw e.code===11?r():e}if(l===void 0)throw r();return md(u),t(a,o,l,u)},gd=(e,t)=>e===null?512:Math.max(512,Math.min(16384,2**Math.round(Math.log2(e*t)))),_d=e=>new Promise((t,n)=>{let{port1:r,port2:i}=new MessageChannel;r.onmessage=({data:e})=>{r.close(),i.close(),t(e)},r.onmessageerror=({data:e})=>{r.close(),i.close(),n(e)},i.postMessage(e)}),vd=async(e,t)=>new e(await _d(t)),yd=(e,t,n,r)=>{let i=Xs.get(e);i===void 0&&(i=new WeakMap,Xs.set(e,i));let a=vd(n,r);return i.set(t,a),a},bd=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>(p,m,h,g)=>{if(g.numberOfInputs===0&&g.numberOfOutputs===0)throw c();let _=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(_.some(e=>e<1))throw c();if(_.length!==g.numberOfOutputs)throw t();if(g.channelCountMode!==`explicit`)throw c();let v=g.channelCount*g.numberOfInputs,y=_.reduce((e,t)=>e+t,0),b=h.parameterDescriptors===void 0?0:h.parameterDescriptors.length;if(v+b>6||y>6)throw c();let x=new MessageChannel,S=[],C=[];for(let e=0;ee===void 0?0:e},maxValue:{get:()=>t===void 0?Ec:t},minValue:{get:()=>n===void 0?Tc:n}}),w.push(i)}let T=r(p,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:Math.max(1,v+b)}),E=gd(m,p.sampleRate),D=s(p,E,v+b,Math.max(1,y)),O=i(p,{channelCount:Math.max(1,y),channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:Math.max(1,y)}),k=[];for(let e=0;e{let n=w[t];return n.connect(T,0,v+t),n.start(0),[e,n.offset]}));T.connect(D);let te=g.channelInterpretation,ne=null,re=g.numberOfOutputs===0?[D]:k,A={get bufferSize(){return E},get channelCount(){return g.channelCount},set channelCount(e){throw n()},get channelCountMode(){return g.channelCountMode},set channelCountMode(e){throw n()},get channelInterpretation(){return te},set channelInterpretation(e){for(let t of S)t.channelInterpretation=e;te=e},get context(){return D.context},get inputs(){return S},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return ne},set onprocessorerror(e){typeof ne==`function`&&A.removeEventListener(`processorerror`,ne),ne=typeof e==`function`?e:null,typeof ne==`function`&&A.addEventListener(`processorerror`,ne)},get parameters(){return ee},get port(){return x.port2},addEventListener(...e){return D.addEventListener(e[0],e[1],e[2])},connect:e.bind(null,re),disconnect:l.bind(null,re),dispatchEvent(...e){return D.dispatchEvent(e[0])},removeEventListener(...e){return D.removeEventListener(e[0],e[1],e[2])}},j=new Map;x.port1.addEventListener=(e=>(...t)=>{if(t[0]===`message`){let e=typeof t[1]==`function`?t[1]:typeof t[1]==`object`&&t[1]!==null&&typeof t[1].handleEvent==`function`?t[1].handleEvent:null;if(e!==null){let n=j.get(t[1]);n===void 0?(t[1]=t=>{u(p.currentTime,p.sampleRate,()=>e(t))},j.set(e,t[1])):t[1]=n}}return e.call(x.port1,t[0],t[1],t[2])})(x.port1.addEventListener),x.port1.removeEventListener=(e=>(...t)=>{if(t[0]===`message`){let e=j.get(t[1]);e!==void 0&&(j.delete(t[1]),t[1]=e)}return e.call(x.port1,t[0],t[1],t[2])})(x.port1.removeEventListener);let ie=null;Object.defineProperty(x.port1,"onmessage",{get:()=>ie,set:e=>{typeof ie==`function`&&x.port1.removeEventListener(`message`,ie),ie=typeof e==`function`?e:null,typeof ie==`function`&&(x.port1.addEventListener(`message`,ie),x.port1.start())}}),h.prototype.port=x.port1;let M=null;yd(p,A,h,g).then(e=>M=e);let ae=Dl(g.numberOfInputs,g.channelCount),oe=Dl(g.numberOfOutputs,_),se=h.parameterDescriptors===void 0?[]:h.parameterDescriptors.reduce((e,{name:t})=>({...e,[t]:new Float32Array(128)}),{}),N=!0,ce=()=>{g.numberOfOutputs>0&&D.disconnect(O);for(let e=0,t=0;e{if(M!==null){let n=d(A);for(let r=0;r{Tl(e,se,t,v+n,r)});for(let e=0;e{if(n[t].size>0)return le.set(t,E/128),e;let r=le.get(t);return r===void 0?[]:(e.every(e=>e.every(e=>e===0))&&(r===1?le.delete(t):le.set(t,r-1)),e)});N=u(p.currentTime+r/p.sampleRate,p.sampleRate,()=>M.process(e,oe,se));for(let e=0,n=0;eD.connect(de).connect(p.destination),pe=()=>{D.disconnect(de),de.disconnect()};return fe(),f(A,()=>{if(N){pe(),g.numberOfOutputs>0&&D.connect(O);for(let e=0,t=0;e{N&&(fe(),ce()),ue=!1})},xd=(e,t)=>{let n=e.createBiquadFilter();return V(n,t),H(n,t,`Q`),H(n,t,`detune`),H(n,t,`frequency`),H(n,t,`gain`),B(n,t,`type`),n},Sd=(e,t)=>(n,r)=>{let i=n.createChannelMerger(r.numberOfInputs);return e!==null&&e.name===`webkitAudioContext`&&t(n,i),V(i,r),i},Cd=e=>{let t=e.numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>t,set:e=>{if(e!==t)throw z()}}),Object.defineProperty(e,"channelCountMode",{get:()=>`explicit`,set:e=>{if(e!==`explicit`)throw z()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>`discrete`,set:e=>{if(e!==`discrete`)throw z()}})},wd=(e,t)=>{let n=e.createChannelSplitter(t.numberOfOutputs);return V(n,t),Cd(n),n},Td=(e,t,n,r,i)=>(a,o)=>{if(a.createConstantSource===void 0)return n(a,o);let s=a.createConstantSource();return V(s,o),H(s,o,`offset`),t(r,()=>r(a))||cd(s),t(i,()=>i(a))||ld(s),e(a,s),s},Ed=(e,t)=>(e.connect=t.connect.bind(t),e.disconnect=t.disconnect.bind(t),e),Dd=(e,t,n,r)=>(i,{offset:a,...o})=>{let s=i.createBuffer(1,2,44100),c=t(i,{buffer:null,channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=n(i,{...o,gain:a}),u=s.getChannelData(0);return u[0]=1,u[1]=1,c.buffer=s,c.loop=!0,e(i,c),r(Ed({get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(e){l.channelCount=e},get channelCountMode(){return l.channelCountMode},set channelCountMode(e){l.channelCountMode=e},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(e){l.channelInterpretation=e},get context(){return l.context},get inputs(){return[]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return l.numberOfOutputs},get offset(){return l.gain},get onended(){return c.onended},set onended(e){c.onended=e},addEventListener(...e){return c.addEventListener(e[0],e[1],e[2])},dispatchEvent(...e){return c.dispatchEvent(e[0])},removeEventListener(...e){return c.removeEventListener(e[0],e[1],e[2])},start(e=0){c.start.call(c,e)},stop(e=0){c.stop.call(c,e)}},l),()=>c.connect(l),()=>c.disconnect(l))},Od=(e,t)=>(n,r)=>{let i=n.createConvolver();if(V(i,r),r.disableNormalization===i.normalize&&(i.normalize=!r.disableNormalization),B(i,r,`buffer`),r.channelCount>2||(t(i,`channelCount`,e=>()=>e.call(i),t=>n=>{if(n>2)throw e();return t.call(i,n)}),r.channelCountMode===`max`))throw e();return t(i,`channelCountMode`,e=>()=>e.call(i),t=>n=>{if(n===`max`)throw e();return t.call(i,n)}),i},kd=(e,t)=>{let n=e.createDelay(t.maxDelayTime);return V(n,t),H(n,t,`delayTime`),n},Ad=e=>(t,n)=>{let r=t.createDynamicsCompressor();if(V(r,n),n.channelCount>2||n.channelCountMode===`max`)throw e();return H(r,n,`attack`),H(r,n,`knee`),H(r,n,`ratio`),H(r,n,`release`),H(r,n,`threshold`),r},jd=(e,t)=>{let n=e.createGain();return V(n,t),H(n,t,`gain`),n},Md=e=>(t,n,r)=>{if(t.createIIRFilter===void 0)return e(t,n,r);let i=t.createIIRFilter(r.feedforward,r.feedback);return V(i,r),i};function Nd(e,t){let n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}function Pd(e,t){return[e[0]*t[0]-e[1]*t[1],e[0]*t[1]+e[1]*t[0]]}function Fd(e,t){let n=[0,0];for(let r=e.length-1;r>=0;--r)n=Pd(n,t),n[0]+=e[r];return n}var Id=(e,t,n,r)=>(i,a,{channelCount:o,channelCountMode:s,channelInterpretation:c,feedback:l,feedforward:u})=>{let d=gd(a,i.sampleRate),f=l instanceof Float64Array?l:new Float64Array(l),p=u instanceof Float64Array?u:new Float64Array(u),m=f.length,h=p.length,g=Math.min(m,h);if(m===0||m>20)throw r();if(f[0]===0)throw t();if(h===0||h>20)throw r();if(p[0]===0)throw t();if(f[0]!==1){for(let e=0;e{let t=e.inputBuffer,n=e.outputBuffer,r=t.numberOfChannels;for(let e=0;ee.createMediaElementSource(t.mediaElement),Rd=(e,t)=>{let n=e.createMediaStreamDestination();return V(n,t),n.numberOfOutputs===1&&Object.defineProperty(n,"numberOfOutputs",{get:()=>0}),n},zd=(e,{mediaStream:t})=>{let n=t.getAudioTracks();n.sort((e,t)=>e.idt.id));let r=n.slice(0,1),i=e.createMediaStreamSource(new MediaStream(r));return Object.defineProperty(i,"mediaStream",{value:t}),i},Bd=(e,t)=>(n,{mediaStreamTrack:r})=>{if(typeof n.createMediaStreamTrackSource==`function`)return n.createMediaStreamTrackSource(r);let i=new MediaStream([r]),a=n.createMediaStreamSource(i);if(r.kind!==`audio`)throw e();if(t(n))throw TypeError();return a},Vd=e=>e===null?null:e.hasOwnProperty(`OfflineAudioContext`)?e.OfflineAudioContext:e.hasOwnProperty(`webkitOfflineAudioContext`)?e.webkitOfflineAudioContext:null,Hd=(e,t,n,r,i,a)=>(o,s)=>{let c=o.createOscillator();return V(c,s),H(c,s,`detune`),H(c,s,`frequency`),s.periodicWave===void 0?B(c,s,`type`):c.setPeriodicWave(s.periodicWave),t(n,()=>n(o))||cd(c),t(r,()=>r(o))||a(c,o),t(i,()=>i(o))||ld(c),e(o,c),c},Ud=e=>(t,n)=>{let r=t.createPanner();return r.orientationX===void 0?e(t,n):(V(r,n),H(r,n,`orientationX`),H(r,n,`orientationY`),H(r,n,`orientationZ`),H(r,n,`positionX`),H(r,n,`positionY`),H(r,n,`positionZ`),B(r,n,`coneInnerAngle`),B(r,n,`coneOuterAngle`),B(r,n,`coneOuterGain`),B(r,n,`distanceModel`),B(r,n,`maxDistance`),B(r,n,`panningModel`),B(r,n,`refDistance`),B(r,n,`rolloffFactor`),r)},Wd=(e,t,n,r,i,a,o,s,c,l)=>(u,{coneInnerAngle:d,coneOuterAngle:f,coneOuterGain:p,distanceModel:m,maxDistance:h,orientationX:g,orientationY:_,orientationZ:v,panningModel:y,positionX:b,positionY:x,positionZ:S,refDistance:C,rolloffFactor:w,...T})=>{let E=u.createPanner();if(T.channelCount>2||T.channelCountMode===`max`)throw o();V(E,T);let D={channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`},O=n(u,{...D,channelInterpretation:`speakers`,numberOfInputs:6}),k=r(u,{...T,gain:1}),ee=r(u,{...D,gain:1}),te=r(u,{...D,gain:0}),ne=r(u,{...D,gain:0}),re=r(u,{...D,gain:0}),A=r(u,{...D,gain:0}),j=r(u,{...D,gain:0}),ie=i(u,256,6,1),M=a(u,{...D,curve:new Float32Array([1,1]),oversample:`none`}),ae=[g,_,v],oe=[b,x,S],se=new Float32Array(1);ie.onaudioprocess=({inputBuffer:e})=>{let t=[c(e,se,0),c(e,se,1),c(e,se,2)];t.some((e,t)=>e!==ae[t])&&(E.setOrientation(...t),ae=t);let n=[c(e,se,3),c(e,se,4),c(e,se,5)];n.some((e,t)=>e!==oe[t])&&(E.setPosition(...n),oe=n)},Object.defineProperty(te.gain,"defaultValue",{get:()=>0}),Object.defineProperty(ne.gain,"defaultValue",{get:()=>0}),Object.defineProperty(re.gain,"defaultValue",{get:()=>0}),Object.defineProperty(A.gain,"defaultValue",{get:()=>0}),Object.defineProperty(j.gain,"defaultValue",{get:()=>0});let N={get bufferSize(){},get channelCount(){return E.channelCount},set channelCount(e){if(e>2)throw o();k.channelCount=e,E.channelCount=e},get channelCountMode(){return E.channelCountMode},set channelCountMode(e){if(e===`max`)throw o();k.channelCountMode=e,E.channelCountMode=e},get channelInterpretation(){return E.channelInterpretation},set channelInterpretation(e){k.channelInterpretation=e,E.channelInterpretation=e},get coneInnerAngle(){return E.coneInnerAngle},set coneInnerAngle(e){E.coneInnerAngle=e},get coneOuterAngle(){return E.coneOuterAngle},set coneOuterAngle(e){E.coneOuterAngle=e},get coneOuterGain(){return E.coneOuterGain},set coneOuterGain(e){if(e<0||e>1)throw t();E.coneOuterGain=e},get context(){return E.context},get distanceModel(){return E.distanceModel},set distanceModel(e){E.distanceModel=e},get inputs(){return[k]},get maxDistance(){return E.maxDistance},set maxDistance(e){if(e<0)throw RangeError();E.maxDistance=e},get numberOfInputs(){return E.numberOfInputs},get numberOfOutputs(){return E.numberOfOutputs},get orientationX(){return ee.gain},get orientationY(){return te.gain},get orientationZ(){return ne.gain},get panningModel(){return E.panningModel},set panningModel(e){E.panningModel=e},get positionX(){return re.gain},get positionY(){return A.gain},get positionZ(){return j.gain},get refDistance(){return E.refDistance},set refDistance(e){if(e<0)throw RangeError();E.refDistance=e},get rolloffFactor(){return E.rolloffFactor},set rolloffFactor(e){if(e<0)throw RangeError();E.rolloffFactor=e},addEventListener(...e){return k.addEventListener(e[0],e[1],e[2])},dispatchEvent(...e){return k.dispatchEvent(e[0])},removeEventListener(...e){return k.removeEventListener(e[0],e[1],e[2])}};return d!==N.coneInnerAngle&&(N.coneInnerAngle=d),f!==N.coneOuterAngle&&(N.coneOuterAngle=f),p!==N.coneOuterGain&&(N.coneOuterGain=p),m!==N.distanceModel&&(N.distanceModel=m),h!==N.maxDistance&&(N.maxDistance=h),g!==N.orientationX.value&&(N.orientationX.value=g),_!==N.orientationY.value&&(N.orientationY.value=_),v!==N.orientationZ.value&&(N.orientationZ.value=v),y!==N.panningModel&&(N.panningModel=y),b!==N.positionX.value&&(N.positionX.value=b),x!==N.positionY.value&&(N.positionY.value=x),S!==N.positionZ.value&&(N.positionZ.value=S),C!==N.refDistance&&(N.refDistance=C),w!==N.rolloffFactor&&(N.rolloffFactor=w),(ae[0]!==1||ae[1]!==0||ae[2]!==0)&&E.setOrientation(...ae),(oe[0]!==0||oe[1]!==0||oe[2]!==0)&&E.setPosition(...oe),l(Ed(N,E),()=>{k.connect(E),e(k,M,0,0),M.connect(ee).connect(O,0,0),M.connect(te).connect(O,0,1),M.connect(ne).connect(O,0,2),M.connect(re).connect(O,0,3),M.connect(A).connect(O,0,4),M.connect(j).connect(O,0,5),O.connect(ie).connect(u.destination)},()=>{k.disconnect(E),s(k,M,0,0),M.disconnect(ee),ee.disconnect(O),M.disconnect(te),te.disconnect(O),M.disconnect(ne),ne.disconnect(O),M.disconnect(re),re.disconnect(O),M.disconnect(A),A.disconnect(O),M.disconnect(j),j.disconnect(O),O.disconnect(ie),ie.disconnect(u.destination)})},Gd=e=>(t,{disableNormalization:n,imag:r,real:i})=>{let a=r instanceof Float32Array?r:new Float32Array(r),o=i instanceof Float32Array?i:new Float32Array(i),s=t.createPeriodicWave(o,a,{disableNormalization:n});if(Array.from(r).length<2)throw e();return s},Kd=(e,t,n,r)=>e.createScriptProcessor(t,n,r),qd=(e,t)=>(n,r)=>{let i=r.channelCountMode;if(i===`clamped-max`)throw t();if(n.createStereoPanner===void 0)return e(n,r);let a=n.createStereoPanner();return V(a,r),H(a,r,`pan`),Object.defineProperty(a,"channelCountMode",{get:()=>i,set:e=>{if(e!==i)throw t()}}),a},Jd=(e,t,n,r,i,a)=>{let o=16385,s=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`},u={...l,oversample:`none`},d=(e,t,i,a)=>{let d=new Float32Array(o),f=new Float32Array(o);for(let e=0;e{let f=new Float32Array(o),p=new Float32Array(o),m=new Float32Array(o),h=new Float32Array(o),g=8192;for(let e=0;eg){let t=(e-g)/(o-1-g)*c;f[e]=Math.cos(t),p[e]=Math.sin(t),m[e]=0,h[e]=1}else{let t=e/(o-1-g)*c;f[e]=1,p[e]=0,m[e]=Math.cos(t),h[e]=Math.sin(t)}let _=t(e,{channelCount:2,channelCountMode:`explicit`,channelInterpretation:`discrete`,numberOfOutputs:2}),v=n(e,{...l,gain:0}),y=r(e,{...u,curve:f}),b=n(e,{...l,gain:0}),x=r(e,{...u,curve:p}),S=r(e,{...u,curve:s}),C=n(e,{...l,gain:0}),w=r(e,{...u,curve:m}),T=n(e,{...l,gain:0}),E=r(e,{...u,curve:h});return{connectGraph(){i.connect(_),i.connect(S.inputs===void 0?S:S.inputs[0]),_.connect(v,0),_.connect(b,0),_.connect(C,1),_.connect(T,1),S.connect(a),a.connect(y.inputs===void 0?y:y.inputs[0]),a.connect(x.inputs===void 0?x:x.inputs[0]),a.connect(w.inputs===void 0?w:w.inputs[0]),a.connect(E.inputs===void 0?E:E.inputs[0]),y.connect(v.gain),x.connect(b.gain),w.connect(C.gain),E.connect(T.gain),v.connect(d,0,0),C.connect(d,0,0),b.connect(d,0,1),T.connect(d,0,1)},disconnectGraph(){i.disconnect(_),i.disconnect(S.inputs===void 0?S:S.inputs[0]),_.disconnect(v,0),_.disconnect(b,0),_.disconnect(C,1),_.disconnect(T,1),S.disconnect(a),a.disconnect(y.inputs===void 0?y:y.inputs[0]),a.disconnect(x.inputs===void 0?x:x.inputs[0]),a.disconnect(w.inputs===void 0?w:w.inputs[0]),a.disconnect(E.inputs===void 0?E:E.inputs[0]),y.disconnect(v.gain),x.disconnect(b.gain),w.disconnect(C.gain),E.disconnect(T.gain),v.disconnect(d,0,0),C.disconnect(d,0,0),b.disconnect(d,0,1),T.disconnect(d,0,1)}}},p=(e,t,n,r,a)=>{if(t===1)return d(e,n,r,a);if(t===2)return f(e,n,r,a);throw i()};return(t,{channelCount:r,channelCountMode:o,pan:s,...c})=>{if(o===`max`)throw i();let l=e(t,{...c,channelCount:1,channelCountMode:o,numberOfInputs:2}),u=n(t,{...c,channelCount:r,channelCountMode:o,gain:1}),d=n(t,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:s}),{connectGraph:f,disconnectGraph:m}=p(t,r,u,d,l);Object.defineProperty(d.gain,"defaultValue",{get:()=>0}),Object.defineProperty(d.gain,"maxValue",{get:()=>1}),Object.defineProperty(d.gain,"minValue",{get:()=>-1});let h={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(e){u.channelCount!==e&&(g&&m(),{connectGraph:f,disconnectGraph:m}=p(t,e,u,d,l),g&&f()),u.channelCount=e},get channelCountMode(){return u.channelCountMode},set channelCountMode(e){if(e===`clamped-max`||e===`max`)throw i();u.channelCountMode=e},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(e){u.channelInterpretation=e},get context(){return u.context},get inputs(){return[u]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get pan(){return d.gain},addEventListener(...e){return u.addEventListener(e[0],e[1],e[2])},dispatchEvent(...e){return u.dispatchEvent(e[0])},removeEventListener(...e){return u.removeEventListener(e[0],e[1],e[2])}},g=!1;return a(Ed(h,l),()=>{f(),g=!0},()=>{m(),g=!1})}},Yd=(e,t,n,r,i,a,o)=>(s,c)=>{let l=s.createWaveShaper();if(a!==null&&a.name===`webkitAudioContext`&&s.createGain().gain.automationRate===void 0)return n(s,c);V(l,c);let u=c.curve===null||c.curve instanceof Float32Array?c.curve:new Float32Array(c.curve);if(u!==null&&u.length<2)throw t();B(l,{curve:u},`curve`),B(l,c,`oversample`);let d=null,f=!1;return o(l,`curve`,e=>()=>e.call(l),t=>n=>(t.call(l,n),f&&(r(n)&&d===null?d=e(s,l):!r(n)&&d!==null&&(d(),d=null)),n)),i(l,()=>{f=!0,r(l.curve)&&(d=e(s,l))},()=>{f=!1,d!==null&&(d(),d=null)})},Xd=(e,t,n,r,i)=>(a,{curve:o,oversample:s,...c})=>{let l=a.createWaveShaper(),u=a.createWaveShaper();V(l,c),V(u,c);let d=n(a,{...c,gain:1}),f=n(a,{...c,gain:-1}),p=n(a,{...c,gain:1}),m=n(a,{...c,gain:-1}),h=null,g=!1,_=null,v={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(e){d.channelCount=e,f.channelCount=e,l.channelCount=e,p.channelCount=e,u.channelCount=e,m.channelCount=e},get channelCountMode(){return l.channelCountMode},set channelCountMode(e){d.channelCountMode=e,f.channelCountMode=e,l.channelCountMode=e,p.channelCountMode=e,u.channelCountMode=e,m.channelCountMode=e},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(e){d.channelInterpretation=e,f.channelInterpretation=e,l.channelInterpretation=e,p.channelInterpretation=e,u.channelInterpretation=e,m.channelInterpretation=e},get context(){return l.context},get curve(){return _},set curve(n){if(n!==null&&n.length<2)throw t();if(n===null)l.curve=n,u.curve=n;else{let e=n.length,t=new Float32Array(e+2-e%2),r=new Float32Array(e+2-e%2);t[0]=n[0],r[0]=-n[e-1];let i=Math.ceil((e+1)/2),a=(e+1)/2-1;for(let o=1;o{d.connect(l).connect(p),d.connect(f).connect(u).connect(m).connect(p),g=!0,r(_)&&(h=e(a,d))},()=>{d.disconnect(l),l.disconnect(p),d.disconnect(f),f.disconnect(u),u.disconnect(m),m.disconnect(p),g=!1,h!==null&&(h(),h=null)})},Zd=()=>new DOMException(``,`NotSupportedError`),Qd={numberOfChannels:1},$d=(e,t,n,r,i)=>class extends e{constructor(e,n,i){let a;if(typeof e==`number`&&n!==void 0&&i!==void 0)a={length:n,numberOfChannels:e,sampleRate:i};else if(typeof e==`object`)a=e;else throw Error(`The given parameters are not valid.`);let{length:o,numberOfChannels:s,sampleRate:c}={...Qd,...a},l=r(s,o,c);t(td,()=>td(l))||l.addEventListener(`statechange`,(()=>{let e=0,t=n=>{this._state===`running`&&(e>0?(l.removeEventListener(`statechange`,t),n.stopImmediatePropagation(),this._waitForThePromiseToSettle(n)):e+=1)};return t})()),super(l,s),this._length=o,this._nativeOfflineAudioContext=l,this._state=null}get length(){return this._nativeOfflineAudioContext.length===void 0?this._length:this._nativeOfflineAudioContext.length}get state(){return this._state===null?this._nativeOfflineAudioContext.state:this._state}startRendering(){return this._state===`running`?Promise.reject(n()):(this._state=`running`,i(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,Bc(this)}))}_waitForThePromiseToSettle(e){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(e):setTimeout(()=>this._waitForThePromiseToSettle(e))}},ef={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,detune:0,frequency:440,periodicWave:void 0,type:`sine`},tf=(e,t,n,r,i,a,o)=>class extends e{constructor(e,o){let s=i(e),c={...ef,...o},l=n(s,c),u=a(s),d=u?r():null,f=e.sampleRate/2;super(e,!1,l,d),this._detune=t(this,u,l.detune,153600,-153600),this._frequency=t(this,u,l.frequency,f,-f),this._nativeOscillatorNode=l,this._onended=null,this._oscillatorNodeRenderer=d,this._oscillatorNodeRenderer!==null&&c.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=c.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(e){let t=typeof e==`function`?o(this,e):null;this._nativeOscillatorNode.onended=t;let n=this._nativeOscillatorNode.onended;this._onended=n!==null&&n===t?e:n}get type(){return this._nativeOscillatorNode.type}set type(e){this._nativeOscillatorNode.type=e,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(e){this._nativeOscillatorNode.setPeriodicWave(e),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=e)}start(e=0){if(this._nativeOscillatorNode.start(e),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=e),this.context.state!==`closed`){cc(this);let e=()=>{this._nativeOscillatorNode.removeEventListener(`ended`,e),Dc(this)&&uc(this)};this._nativeOscillatorNode.addEventListener(`ended`,e)}}stop(e=0){this._nativeOscillatorNode.stop(e),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=e)}},nf=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=null,s=null,c=null,l=async(l,u)=>{let d=n(l),f=vc(d,u);return f||(d=t(u,{channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:o===null?void 0:o,type:d.type}),s!==null&&d.start(s),c!==null&&d.stop(c)),a.set(u,d),f?(await e(u,l.detune,d.detune),await e(u,l.frequency,d.frequency)):(await r(u,l.detune,d.detune),await r(u,l.frequency,d.frequency)),await i(l,u,d),d};return{set periodicWave(e){o=e},set start(e){s=e},set stop(e){c=e},render(e,t){let n=a.get(t);return n===void 0?l(e,t):Promise.resolve(n)}}},rf={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},af=(e,t,n,r,i,a,o)=>class extends e{constructor(e,s){let c=i(e),l=n(c,{...rf,...s}),u=a(c),d=u?r():null;super(e,!1,l,d),this._nativePannerNode=l,this._orientationX=t(this,u,l.orientationX,Ec,Tc),this._orientationY=t(this,u,l.orientationY,Ec,Tc),this._orientationZ=t(this,u,l.orientationZ,Ec,Tc),this._positionX=t(this,u,l.positionX,Ec,Tc),this._positionY=t(this,u,l.positionY,Ec,Tc),this._positionZ=t(this,u,l.positionZ,Ec,Tc),o(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(e){this._nativePannerNode.coneInnerAngle=e}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(e){this._nativePannerNode.coneOuterAngle=e}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(e){this._nativePannerNode.coneOuterGain=e}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(e){this._nativePannerNode.distanceModel=e}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(e){this._nativePannerNode.maxDistance=e}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(e){this._nativePannerNode.panningModel=e}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(e){this._nativePannerNode.refDistance=e}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(e){this._nativePannerNode.rolloffFactor=e}},of=(e,t,n,r,i,a,o,s,c,l)=>()=>{let u=new WeakMap,d=null,f=async(f,p)=>{let m=null,h=a(f),g={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation},_={...g,coneInnerAngle:h.coneInnerAngle,coneOuterAngle:h.coneOuterAngle,coneOuterGain:h.coneOuterGain,distanceModel:h.distanceModel,maxDistance:h.maxDistance,panningModel:h.panningModel,refDistance:h.refDistance,rolloffFactor:h.rolloffFactor},v=vc(h,p);if(`bufferSize`in h?m=r(p,{...g,gain:1}):v||(h=i(p,{..._,orientationX:h.orientationX.value,orientationY:h.orientationY.value,orientationZ:h.orientationZ.value,positionX:h.positionX.value,positionY:h.positionY.value,positionZ:h.positionZ.value})),u.set(p,m===null?h:m),m!==null){if(d===null){if(o===null)throw Error(`Missing the native OfflineAudioContext constructor.`);let e=new o(6,f.context.length,p.sampleRate),r=t(e,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`speakers`,numberOfInputs:6});r.connect(e.destination),d=(async()=>{let t=await Promise.all([f.orientationX,f.orientationY,f.orientationZ,f.positionX,f.positionY,f.positionZ].map(async(t,r)=>{let i=n(e,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,offset:+(r===0)});return await s(e,t,i.offset),i}));for(let e=0;e<6;e+=1)t[e].connect(r,0,e),t[e].start(0);return l(e)})()}let e=await d,a=r(p,{...g,gain:1});await c(f,p,a);let u=[];for(let t=0;te!==h[t])||n.some((e,t)=>e!==v[t])){h=e,v=n;let o=t/p.sampleRate;y.gain.setValueAtTime(0,o),y=r(p,{...g,gain:0}),b=i(p,{..._,orientationX:h[0],orientationY:h[1],orientationZ:h[2],positionX:v[0],positionY:v[1],positionZ:v[2]}),y.gain.setValueAtTime(1,o),a.connect(y).connect(b.inputs[0]),b.connect(m)}}return m}return v?(await e(p,f.orientationX,h.orientationX),await e(p,f.orientationY,h.orientationY),await e(p,f.orientationZ,h.orientationZ),await e(p,f.positionX,h.positionX),await e(p,f.positionY,h.positionY),await e(p,f.positionZ,h.positionZ)):(await s(p,f.orientationX,h.orientationX),await s(p,f.orientationY,h.orientationY),await s(p,f.orientationZ,h.orientationZ),await s(p,f.positionX,h.positionX),await s(p,f.positionY,h.positionY),await s(p,f.positionZ,h.positionZ)),Zc(h)?await c(f,p,h.inputs[0]):await c(f,p,h),h};return{render(e,t){let n=u.get(t);return n===void 0?f(e,t):Promise.resolve(n)}}},sf={disableNormalization:!1},cf=(e,t,n,r)=>class i{constructor(i,a){let o=e(t(i),r({...sf,...a}));return n.add(o),o}static[Symbol.hasInstance](e){return typeof e==`object`&&!!e&&Object.getPrototypeOf(e)===i.prototype||n.has(e)}},lf=(e,t)=>(n,r,i)=>(e(r).replay(i),t(r,n,i)),uf=(e,t,n)=>async(r,i,a)=>{let o=e(r);await Promise.all(o.activeInputs.map((e,o)=>Array.from(e).map(async([e,s])=>{let c=await t(e).render(e,i),l=r.context.destination;!n(e)&&(r!==l||!n(r))&&c.connect(a,s,o)})).reduce((e,t)=>[...e,...t],[]))},df=(e,t,n)=>async(r,i,a)=>{let o=t(r);await Promise.all(Array.from(o.activeInputs).map(async([t,r])=>{let o=await e(t).render(t,i);n(t)||o.connect(a,r)}))},ff=(e,t,n,r)=>i=>e(td,()=>td(i))?Promise.resolve(e(r,r)).then(e=>{if(!e){let e=n(i,512,0,1);i.oncomplete=()=>{e.onaudioprocess=null,e.disconnect()},e.onaudioprocess=()=>i.currentTime,e.connect(i.destination)}return i.startRendering()}):new Promise(e=>{let n=t(i,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:0});i.oncomplete=t=>{n.disconnect(),e(t.renderedBuffer)},n.connect(i.destination),i.startRendering()}),pf=e=>(t,n)=>{e.set(t,n)},mf=e=>(t,n)=>e.set(t,n),hf=(e,t,n,r,i,a,o,s)=>(c,l)=>n(c).render(c,l).then(()=>Promise.all(Array.from(r(l)).map(e=>n(e).render(e,l)))).then(()=>i(l)).then(n=>(typeof n.copyFromChannel==`function`?t(a,()=>a(n))||s(n):(o(n),Sc(n)),e.add(n),n)),gf={channelCount:2,channelCountMode:`explicit`,channelInterpretation:`speakers`,pan:0},_f=(e,t,n,r,i,a)=>class extends e{constructor(e,o){let s=i(e),c=n(s,{...gf,...o}),l=a(s),u=l?r():null;super(e,!1,c,u),this._pan=t(this,l,c.pan)}get pan(){return this._pan}},vf=(e,t,n,r,i)=>()=>{let a=new WeakMap,o=async(o,s)=>{let c=n(o),l=vc(c,s);return l||(c=t(s,{channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,pan:c.pan.value})),a.set(s,c),l?await e(s,o.pan,c.pan):await r(s,o.pan,c.pan),Zc(c)?await i(o,s,c.inputs[0]):await i(o,s,c),c};return{render(e,t){let n=a.get(t);return n===void 0?o(e,t):Promise.resolve(n)}}},yf=e=>()=>{if(e===null)return!1;try{new e({length:1,sampleRate:44100})}catch{return!1}return!0},bf=(e,t)=>async()=>{if(e===null)return!0;if(t===null)return!1;let n=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`}),r=new t(1,128,44100),i=URL.createObjectURL(n),a=!1,o=!1;try{await r.audioWorklet.addModule(i);let t=new e(r,`a`,{numberOfOutputs:0}),n=r.createOscillator();t.port.onmessage=()=>a=!0,t.onprocessorerror=()=>o=!0,n.connect(t),n.start(0),await r.startRendering(),await new Promise(e=>setTimeout(e))}catch{}finally{URL.revokeObjectURL(i)}return a&&!o},xf=(e,t)=>()=>{if(t===null)return Promise.resolve(!1);let n=new t(1,1,44100),r=e(n,{channelCount:1,channelCountMode:`explicit`,channelInterpretation:`discrete`,gain:0});return new Promise(e=>{n.oncomplete=()=>{r.disconnect(),e(n.currentTime!==0)},n.startRendering()})},Sf=()=>new DOMException(``,`UnknownError`),Cf={channelCount:2,channelCountMode:`max`,channelInterpretation:`speakers`,curve:null,oversample:`none`},wf=(e,t,n,r,i,a,o)=>class extends e{constructor(e,t){let s=i(e),c=n(s,{...Cf,...t}),l=a(s)?r():null;super(e,!0,c,l),this._isCurveNullified=!1,this._nativeWaveShaperNode=c,o(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(e){if(e===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(e.length<2)throw t();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=e}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(e){this._nativeWaveShaperNode.oversample=e}},Tf=(e,t,n)=>()=>{let r=new WeakMap,i=async(i,a)=>{let o=t(i);return vc(o,a)||(o=e(a,{channelCount:o.channelCount,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,curve:o.curve,oversample:o.oversample})),r.set(a,o),Zc(o)?await n(i,a,o.inputs[0]):await n(i,a,o),o};return{render(e,t){let n=r.get(t);return n===void 0?i(e,t):Promise.resolve(n)}}},Ef=()=>typeof window>`u`?null:window,Df=(e,t)=>n=>{n.copyFromChannel=(r,i,a=0)=>{let o=e(a),s=e(i);if(s>=n.numberOfChannels)throw t();let c=n.length,l=n.getChannelData(s),u=r.length;for(let e=o<0?-o:0;e+o{let o=e(a),s=e(i);if(s>=n.numberOfChannels)throw t();let c=n.length,l=n.getChannelData(s),u=r.length;for(let e=o<0?-o:0;e+ot=>{t.copyFromChannel=(n=>(r,i,a=0)=>{let o=e(a),s=e(i);if(o(r,i,a=0)=>{let o=e(a),s=e(i);if(o(t,n)=>{let r=n.createBuffer(1,1,44100);t.buffer===null&&(t.buffer=r),e(t,`buffer`,e=>()=>{let n=e.call(t);return n===r?null:n},e=>n=>e.call(t,n===null?r:n))},Af=(e,t)=>(n,r)=>{r.channelCount=1,r.channelCountMode=`explicit`,Object.defineProperty(r,"channelCount",{get:()=>1,set:()=>{throw e()}}),Object.defineProperty(r,"channelCountMode",{get:()=>`explicit`,set:()=>{throw e()}});let i=n.createBufferSource();t(r,()=>{let e=r.numberOfInputs;for(let t=0;ti.disconnect(r))},jf=(e,t,n)=>e.copyFromChannel===void 0?e.getChannelData(n)[0]:(e.copyFromChannel(t,n),t[0]),Mf=e=>{if(e===null)return!1;let t=e.length;return t%2==0?e[t/2-1]+e[t/2]!==0:e[Math.floor(t/2)]!==0},Nf=(e,t,n,r)=>{let i=e;for(;!i.hasOwnProperty(t);)i=Object.getPrototypeOf(i);let{get:a,set:o}=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,{get:n(a),set:r(o)})},Pf=e=>({...e,outputChannelCount:e.outputChannelCount===void 0?e.numberOfInputs===1&&e.numberOfOutputs===1?[e.channelCount]:Array.from({length:e.numberOfOutputs},()=>1):e.outputChannelCount}),Ff=e=>({...e,channelCount:e.numberOfOutputs}),If=e=>{let{imag:t,real:n}=e;return t===void 0?n===void 0?{...e,imag:[0,0],real:[0,0]}:{...e,imag:Array.from(n,()=>0),real:n}:n===void 0?{...e,imag:t,real:Array.from(t,()=>0)}:{...e,imag:t,real:n}},Lf=(e,t,n)=>{try{e.setValueAtTime(t,n)}catch(r){if(r.code!==9)throw r;Lf(e,t,n+1e-7)}},Rf=e=>{let t=e.createBufferSource();t.start();try{t.start()}catch{return!0}return!1},zf=e=>{let t=e.createBufferSource();t.buffer=e.createBuffer(1,1,44100);try{t.start(0,1)}catch{return!1}return!0},Bf=e=>{let t=e.createBufferSource();t.start();try{t.stop()}catch{return!1}return!0},Vf=e=>{let t=e.createOscillator();try{t.start(-1)}catch(e){return e instanceof RangeError}return!1},Hf=e=>{let t=e.createBuffer(1,1,44100),n=e.createBufferSource();n.buffer=t,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},Uf=e=>{let t=e.createOscillator();try{t.stop(-1)}catch(e){return e instanceof RangeError}return!1},Wf=e=>{let{port1:t,port2:n}=new MessageChannel;try{t.postMessage(e)}finally{t.close(),n.close()}},Gf=e=>{e.start=(t=>(n=0,r=0,i)=>{let a=e.buffer,o=a===null?r:Math.min(a.duration,r);a!==null&&o>a.duration-.5/e.context.sampleRate?t.call(e,n,0,0):t.call(e,n,o,i)})(e.start)},Kf=(e,t)=>{let n=t.createGain();e.connect(n);let r=(t=>()=>{t.call(e,n),e.removeEventListener(`ended`,r)})(e.disconnect);e.addEventListener(`ended`,r),Ed(e,n),e.stop=(t=>{let r=!1;return(i=0)=>{if(r)try{t.call(e,i)}catch{n.gain.setValueAtTime(0,i)}else t.call(e,i),r=!0}})(e.stop)},qf=(e,t)=>n=>{let r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),typeof t==`function`?t.call(e,n):t.handleEvent.call(e,n)},Jf=Rs(Jc),Yf=pc(Jc),Xf=ou(ac),Zf=new WeakMap,Qf=Tu(Zf),$f=Fl(new Map,new WeakMap),ep=Ef(),tp=ad($f,xc),np=wu(Lc),rp=uf(Lc,np,al),ip=yc(tp,R,rp),U=Ou(Ks),ap=Vd(ep),W=qu(ap),op=new WeakMap,sp=_u(qf),cp=dd(ep),lp=Uu(cp),up=Wu(ep),dp=Gu(ep),fp=pd(ep),G=yl(zs(Hs),fc(Jf,Yf,Qc,Xf,rl,Lc,Qf,sc,R,Jc,Dc,al,ol),$f,Ru(Js,rl,Lc,R,il,Dc),xc,ju,Zd,nu(Qc,Js,Lc,R,il,U,Dc,W),lu(op,Lc,ic),sp,U,lp,up,dp,W,fp),pp=_c(G,ip,xc,tp,U,W),mp=new WeakSet,hp=od(ep),gp=Jl(new Uint32Array(1)),_p=Df(gp,xc),vp=Of(gp),yp=wc(mp,$f,Zd,hp,ap,yf(hp),_p,vp),bp=mc(jd),xp=df(np,Rc,al),Sp=Hl(xp),Cp=ud(bp,$f,Rf,zf,Bf,Vf,Hf,Uf,Gf,kf(Nf),Kf),wp=lf(Eu(Rc),xp),Tp=Ac(Sp,Cp,R,wp,rp),Ep=bl(Bs(Ws),op,Gs,xl,Is.createCancelAndHoldAutomationEvent,Is.createCancelScheduledValuesAutomationEvent,Is.createExponentialRampToValueAutomationEvent,Is.createLinearRampToValueAutomationEvent,Is.createSetTargetAutomationEvent,Is.createSetValueAutomationEvent,Is.createSetValueCurveAutomationEvent,cp,Lf),Dp=kc(G,Tp,Ep,z,Cp,U,W,qf),Op=Uc(G,Wc,xc,z,fd(jd,Nf),U,W,rp),kp=Pl(Sp,xd,R,wp,rp),Ap=mf(Zf),jp=Nl(G,Ep,kp,ju,xd,U,W,Ap),Mp=nd(Jc,up),Np=Sd(cp,Af(z,Mp)),Pp=Ll(G,Rl(Np,R,rp),Np,U,W),Fp=Bl(G,Vl(wd,R,rp),wd,U,W,Ff),Ip=Td(bp,$f,Dd(bp,Cp,jd,Mp),Vf,Uf),Lp=Kl(G,Ep,ql(Sp,Ip,R,wp,rp),Ip,U,W,qf),Rp=Od(Zd,Nf),zp=Xl(G,Zl(Rp,R,rp),Rp,U,W,Ap),Bp=iu(G,Ep,au(Sp,kd,R,wp,rp),kd,U,W,Ap),Vp=Ad(Zd),Hp=pu(G,Ep,mu(Sp,Vp,R,wp,rp),Vp,Zd,U,W,Ap),Up=xu(G,Ep,Su(Sp,jd,R,wp,rp),jd,U,W),Wp=Id(ju,z,Kd,Zd),Gp=ff($f,jd,Kd,xf(jd,ap)),Kp=Lu(Cp,R,ap,rp,Gp),qp=Pu(G,Md(Wp),Kp,U,W,Ap),Jp=Gc(Ep,Np,Ip,Kd,Zd,jf,W,Nf),Yp=new WeakMap,Xp=ed(Op,Jp,sp,W,Yp,qf),Zp=Hd(bp,$f,Vf,Hf,Uf,Kf),Qp=tf(G,Ep,Zp,nf(Sp,Zp,R,wp,rp),U,W,qf),$p=Wl(Cp),em=Yd($p,z,Xd($p,z,jd,Mf,Mp),Mf,Mp,cp,Nf),tm=Ud(Wd(Qc,z,Np,jd,Kd,em,Zd,rl,jf,Mp)),nm=af(G,Ep,tm,of(Sp,Np,Ip,jd,tm,R,ap,wp,rp,Gp),U,W,Ap),rm=cf(Gd(xc),U,new WeakSet,If),im=qd(Jd(Np,wd,jd,em,Zd,Mp),Zd),am=_f(G,Ep,im,vf(Sp,im,R,wp,rp),U,W),om=wf(G,z,em,Tf(em,R,rp),U,W,Ap),sm=Ju(ep),cm=vu(ep),lm=new WeakMap,um=ku(lm,ap),dm=sm?rc($f,Zd,gu(ep),cm,yu(Ls),U,um,W,fp,new WeakMap,new WeakMap,bf(fp,ap),ep):void 0,fm=Ku(lp,W),pm=jl(dm,pp,yp,Dp,jp,Pp,Fp,Lp,zp,tu(mp,$f,$l,hu,new WeakSet,U,fm,bc,td,_p,vp),Bp,Hp,Up,qp,Xp,Qp,nm,rm,am,om),mm=Hc(pm,z,Zd,Sf,Yu(G,Ld,U,W),Zu(G,Rd,U,W),Qu(G,zd,U,W),$u(G,Bd(z,W),U),cp),hm=Au(Yp),gm=hc(hm),_m=Ul(xc),vm=su(hm),ym=du(xc),bm=new WeakMap,xm=hd(z,bd(_m,xc,z,Np,wd,Ip,jd,Kd,Zd,ym,cm,Cu(bm,ic),Mp),jd,Zd,Mp),Sm=Al(Sp,_m,Cp,Np,wd,Ip,jd,vm,ym,cm,R,fp,ap,wp,rp,Gp),Cm=Du(lm),wm=pf(bm),Tm=sm?wl(gm,G,Ep,Sm,xm,Lc,Cm,U,W,fp,Pf,wm,Wf,qf):void 0,Em=$d(pm,$f,z,Ql(Zd,ap),hf(mp,$f,np,hm,Gp,bc,_p,vp)),Dm=zu(Ks,lp),Om=Bu(Us,up),km=Vu(Gs,dp),Am=Hu(Ks,W);function jm(e){return e===void 0}function K(e){return e!==void 0}function Mm(e){return typeof e==`function`}function Nm(e){return typeof e==`number`}function Pm(e){return Object.prototype.toString.call(e)===`[object Object]`&&e.constructor===Object}function Fm(e){return typeof e==`boolean`}function Im(e){return Array.isArray(e)}function Lm(e){return typeof e==`string`}function Rm(e){return Lm(e)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(e)}function q(e,t){if(!e)throw Error(t)}function zm(e,t,n=1/0){if(!(t<=e&&e<=n))throw RangeError(`Value must be within [${t}, ${n}], got: ${e}`)}function Bm(e){!e.isOffline&&e.state!==`running`&&qm(`The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.`)}var Vm=!1,Hm=!1;function Um(e){Vm=e}function Wm(e){jm(e)&&Vm&&!Hm&&(Hm=!0,qm(`Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing`))}var Gm=console;function Km(...e){Gm.log(...e)}function qm(...e){Gm.warn(...e)}function Jm(e){return new mm(e)}function Ym(e,t,n){return new Em(e,t,n)}var Xm=typeof self==`object`?self:null,Zm=Xm&&(Xm.hasOwnProperty(`AudioContext`)||Xm.hasOwnProperty(`webkitAudioContext`));function Qm(e,t,n){return q(K(Tm),`AudioWorkletNode only works in a secure context (https or localhost)`),new(e instanceof Xm?.BaseAudioContext?Xm?.AudioWorkletNode:Tm)(e,t,n)}function $m(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function J(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var eh=class{constructor(e,t,n,r){this._callback=e,this._type=t,this._minimumUpdateInterval=Math.max(128/(r||44100),.001),this.updateInterval=n,this._createClock()}_createWorker(){let e=new Blob([` // the initial timeout time let timeoutTime = ${(this._updateInterval*1e3).toFixed(1)}; // onmessage callback @@ -16,7 +16,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } // call tick initially tick(); - `],{type:`text/javascript`}),t=URL.createObjectURL(e),n=new Worker(t);n.onmessage=this._callback.bind(this),this._worker=n}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type===`worker`)try{this._createWorker()}catch{this._type=`timeout`,this._createClock()}else this._type===`timeout`&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){var t;this._updateInterval=Math.max(e,this._minimumUpdateInterval),this._type===`worker`&&((t=this._worker)==null||t.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}};function $m(e){return Dm(e)}function eh(e){return Em(e)}function th(e){return Om(e)}function nh(e){return Tm(e)}function rh(e){return e instanceof _p}function ih(e,t){return e===`value`||$m(t)||eh(t)||rh(t)}function ah(e,...t){if(!t.length)return e;let n=t.shift();if(Mm(e)&&Mm(n))for(let t in n)ih(t,n[t])?e[t]=n[t]:Mm(n[t])?(e[t]||Object.assign(e,{[t]:{}}),ah(e[t],n[t])):Object.assign(e,{[t]:n[t]});return ah(e,...t)}function oh(e,t){return e.length===t.length&&e.every((e,n)=>t[n]===e)}function Y(e,t,n=[],r){let i={},a=Array.from(t);if(Mm(a[0])&&r&&!Reflect.has(a[0],r)&&(Object.keys(a[0]).some(t=>Reflect.has(e,t))||(ah(i,{[r]:a[0]}),n.splice(n.indexOf(r),1),a.shift())),a.length===1&&Mm(a[0]))ah(i,a[0]);else for(let e=0;e{Reflect.has(e,t)&&delete e[t]}),e}var uh=class{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...e){(this.debug||Jm&&this.toString()===Jm.TONE_DEBUG_CLASS)&&Wm(this,...e)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}};uh.version=Ss;var dh=1e-6;function fh(e,t){return e>t+dh}function ph(e,t){return fh(e,t)||hh(e,t)}function mh(e,t){return e+dhthis.memory){let e=this.length-this.memory;this._timeline.splice(0,e)}return this}remove(e){let t=this._timeline.indexOf(e);return t!==-1&&this._timeline.splice(t,1),this}get(e,t=`time`){let n=this._search(e,t);return n===-1?null:this._timeline[n]}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e,t=`time`){let n=this._search(e,t);return n+10&&this._timeline[t-1].time=0?this._timeline[n-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(hh(this._timeline[t].time,e)){for(let n=t;n>=0&&hh(this._timeline[n].time,e);n--)t=n;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else this._timeline.length===1&&ph(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){let t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){let t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e,t=`time`){if(this._timeline.length===0)return-1;let n=0,r=this._timeline.length,i=r;if(r>0&&this._timeline[r-1][t]<=e)return r-1;for(;n=0&&this._timeline[n].time>=e;)n--;return this._iterate(t,n+1),this}forEachAtTime(e,t){let n=this._search(e);if(n!==-1&&hh(this._timeline[n].time,e)){let r=n;for(let t=n;t>=0&&hh(this._timeline[t].time,e);t--)r=t;this._iterate(e=>{t(e)},r,n)}return this}dispose(){return super.dispose(),this._timeline=[],this}},vh=[];function yh(e){vh.push(e)}function bh(e){vh.forEach(t=>t(e))}var xh=[];function Sh(e){xh.push(e)}function Ch(e){xh.forEach(t=>t(e))}var wh=class e extends uh{constructor(){super(...arguments),this.name=`Emitter`}on(e,t){return e.split(/\W+/).forEach(e=>{km(this._events)&&(this._events={}),this._events.hasOwnProperty(e)||(this._events[e]=[]),this._events[e].push(t)}),this}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}off(e,t){return e.split(/\W+/).forEach(e=>{if(km(this._events)&&(this._events={}),this._events.hasOwnProperty(e))if(km(t))this._events[e]=[];else{let n=this._events[e];for(let e=n.length-1;e>=0;e--)n[e]===t&&n.splice(e,1)}}),this}emit(e,...t){if(this._events&&this._events.hasOwnProperty(e)){let n=this._events[e].slice(0);for(let e=0,r=n.length;e{let r=Object.getOwnPropertyDescriptor(e.prototype,n);Object.defineProperty(t.prototype,n,r)})}dispose(){return super.dispose(),this._events=void 0,this}},Th=class extends wh{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}},Eh=class e extends Th{constructor(){super(),this.name=`Context`,this._constants=new Map,this._timeouts=new _h,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;let t=Y(e.getDefaults(),arguments,[`context`]);t.context?(this._context=t.context,this._latencyHint=arguments[0]?.latencyHint||``):(this._context=Km({latencyHint:t.latencyHint}),this._latencyHint=t.latencyHint),this._ticker=new Qm(this.emit.bind(this,`tick`),t.clockSource,t.updateInterval,this._context.sampleRate),this.on(`tick`,this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit(`statechange`,this.state)},this[arguments[0]?.hasOwnProperty(`updateInterval`)?`_lookAhead`:`lookAhead`]=t.lookAhead}static getDefaults(){return{clockSource:`worker`,latencyHint:`interactive`,lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||=(bh(this),!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,n){return this._context.createBuffer(e,t,n)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,n){return this._context.createPeriodicWave(e,t,n)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){return q(nh(this._context),`Not available if OfflineAudioContext`),this._context.createMediaStreamSource(e)}createMediaElementSource(e){return q(nh(this._context),`Not available if OfflineAudioContext`),this._context.createMediaElementSource(e)}createMediaStreamDestination(){return q(nh(this._context),`Not available if OfflineAudioContext`),this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){q(!this._initialized,`The listener cannot be set after initialization.`),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){q(!this._initialized,`The transport cannot be set after initialization.`),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){q(!this._initialized,`Draw cannot be set after initialization.`),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){q(!this._initialized,`The destination cannot be set after initialization.`),this._destination=e}createAudioWorkletNode(e,t){return Xm(this.rawContext,e,t)}addAudioWorkletModule(e){return J(this,void 0,void 0,function*(){q(K(this.rawContext.audioWorklet),`AudioWorkletNode is only available in a secure context (https or localhost)`),this._workletPromise||=this.rawContext.audioWorklet.addModule(e),yield this._workletPromise})}workletsAreReady(){return J(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get lookAhead(){return this._lookAhead}set lookAhead(e){this._lookAhead=e,this.updateInterval=e?e/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return nh(this._context)?this._context.resume():Promise.resolve()}close(){return J(this,void 0,void 0,function*(){nh(this._context)&&this.state!==`closed`&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&Ch(this)})}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{let t=this._context.createBuffer(1,128,this._context.sampleRate),n=t.getChannelData(0);for(let t=0;tthis._constants[e].disconnect()),this.close(),this}_timeoutLoop(){let e=this.now();this._timeouts.forEachBefore(e,e=>{e.callback(),this._timeouts.remove(e)})}setTimeout(e,t){this._timeoutIds++;let n=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:n+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach(t=>{t.id===e&&this._timeouts.remove(t)}),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){let n=++this._timeoutIds,r=()=>{let i=this.now();this._timeouts.add({callback:()=>{e(),r()},id:n,time:i+t})};return r(),n}},Dh=class extends Th{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,n){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,n){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e){return J(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}};function X(e,t){Pm(t)?t.forEach(t=>X(e,t)):Object.defineProperty(e,t,{enumerable:!0,writable:!1})}function Oh(e,t){Pm(t)?t.forEach(t=>Oh(e,t)):Object.defineProperty(e,t,{writable:!0})}var Z=()=>{},kh=class e extends uh{constructor(){super(),this.name=`ToneAudioBuffer`,this.onload=Z;let t=Y(e.getDefaults(),arguments,[`url`,`onload`,`onerror`]);this.reverse=t.reverse,this.onload=t.onload,Fm(t.url)?this.load(t.url).catch(t.onerror):t.url&&this.set(t.url)}static getDefaults(){return{onerror:Z,onload:Z,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:Nh().sampleRate}set(t){return t instanceof e?t.loaded?this._buffer=t.get():t.onload=()=>{this.set(t),this.onload(this)}:this._buffer=t,this._reversed&&this._reverse(),this}get(){return this._buffer}load(t){return J(this,void 0,void 0,function*(){let n=e.load(t).then(e=>{this.set(e),this.onload(this)});e.downloads.push(n);try{yield n}finally{let t=e.downloads.indexOf(n);e.downloads.splice(t,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){let t=Pm(e)&&e[0].length>0,n=t?e.length:1,r=t?e[0].length:e.length,i=Nh(),a=i.createBuffer(n,r,i.sampleRate),o=!t&&n===1?[e]:e;for(let e=0;ee/t),this.fromArray(e)}return this}toArray(e){if(jm(e))return this.getChannelData(e);if(this.numberOfChannels===1)return this.toArray(0);{let e=[];for(let t=0;t0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(t){return new e().fromArray(t)}static fromUrl(t){return J(this,void 0,void 0,function*(){return yield new e().load(t)})}static load(t){return J(this,void 0,void 0,function*(){let n=e.baseUrl===``||e.baseUrl.endsWith(`/`)?e.baseUrl:e.baseUrl+`/`,r=yield fetch(n+t);if(!r.ok)throw Error(`could not load url: ${t}`);let i=yield r.arrayBuffer();return yield Nh().decodeAudioData(i)})}static supportsType(e){let t=e.split(`.`),n=t[t.length-1];return document.createElement(`audio`).canPlayType(`audio/`+n)!==``}static loaded(){return J(this,void 0,void 0,function*(){for(yield Promise.resolve();e.downloads.length;)yield e.downloads[0]})}};kh.baseUrl=``,kh.downloads=[];var Ah=class extends Eh{constructor(){super({clockSource:`offline`,context:th(arguments[0])?arguments[0]:qm(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:th(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name=`OfflineContext`,this._currentTime=0,this.isOffline=!0,this._duration=th(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return J(this,void 0,void 0,function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit(`tick`),this._currentTime+=128/this.sampleRate,t++;let n=Math.floor(this.sampleRate/128);e&&t%n===0&&(yield new Promise(e=>setTimeout(e,1)))}})}render(){return J(this,arguments,void 0,function*(e=!0){return yield this.workletsAreReady(),yield this._renderClock(e),new kh(yield this._context.startRendering())})}close(){return Promise.resolve()}},jh=new Dh,Mh=jh;function Nh(){return Mh===jh&&Ym&&Ph(new Eh),Mh}function Ph(e,t=!1){t&&Mh.dispose(),Mh=nh(e)?new Eh(e):th(e)?new Ah(e):e}if(Jm&&!Jm.TONE_SILENCE_LOGGING){let e=` * Tone.js v${Ss} * `;console.log(`%c${e}`,`background: #000; color: #fff`)}function Fh(e){return 10**(e/20)}function Ih(e){return Math.log(e)/Math.LN10*20}function Lh(e){return 2**(e/12)}var Rh=440;function zh(){return Rh}function Bh(e){Rh=e}function Vh(e){return Math.round(Hh(e))}function Hh(e){return 69+12*Math.log2(e/Rh)}function Uh(e){return Rh*2**((e-69)/12)}var Wh=class e extends uh{constructor(e,t,n){super(),this.defaultUnits=`s`,this._val=t,this._units=n,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{let n=parseInt(e,10),r=t===`.`?1.5:1;return n===1?this._beatsToUnits(this._getTimeSignature())*r:this._beatsToUnits(4/n)*r},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{let t=parseInt(e,10);return this._beatsToUnits(8/(Math.floor(t)*3))},regexp:/^(\d+)t$/i},tr:{method:(e,t,n)=>{let r=0;return e&&e!==`0`&&(r+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!==`0`&&(r+=this._beatsToUnits(parseFloat(t))),n&&n!==`0`&&(r+=this._beatsToUnits(parseFloat(n)/4)),r},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof e&&this.fromType(this._val),km(this._val))return this._noArg();if(Fm(this._val)&&km(this._units)){for(let e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(Mm(this._val)){let e=0;for(let t in this._val)if(K(this._val[t])){let n=this._val[t],r=new this.constructor(this.context,t).valueOf()*n;e+=r}return e}if(K(this._units)){let e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}else if(Fm(this._val))return parseFloat(this._val);else return this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case`s`:this._val=e.toSeconds();break;case`i`:this._val=e.toTicks();break;case`hz`:this._val=e.toFrequency();break;case`midi`:this._val=e.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}},Gh=class e extends Wh{constructor(){super(...arguments),this.name=`TimeClass`}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:t=>{let n=new e(this.context,t).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(n))},regexp:/^@(.+)/}})}quantize(e,t=1){let n=new this.constructor(this.context,e).valueOf(),r=this.valueOf();return r+(Math.round(r/n)*n-r)*t}toNotation(){let t=this.toSeconds(),n=[`1m`];for(let e=1;e<9;e++){let t=2**e;n.push(t+`n.`),n.push(t+`n`),n.push(t+`t`)}n.push(`0`);let r=n[0],i=new e(this.context,n[0]).toSeconds();return n.forEach(n=>{let a=new e(this.context,n).toSeconds();Math.abs(a-t)3&&(r=parseFloat(parseFloat(i).toFixed(3))),[n,t,r].join(`:`)}toTicks(){let e=this._beatsToUnits(1);return this.valueOf()/e*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return Vh(this.toFrequency())}_now(){return this.context.now()}},Kh=class e extends Gh{constructor(){super(...arguments),this.name=`Frequency`,this.defaultUnits=`hz`}static get A4(){return zh()}static set A4(e){Bh(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(t){return this.defaultUnits===`midi`?t:e.mtof(t)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(t,n){let r=qh[t.toLowerCase()]+(parseInt(n,10)+1)*12;return this.defaultUnits===`midi`?r:e.mtof(r)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,n){let r=1;return e&&e!==`0`&&(r*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!==`0`&&(r*=this._beatsToUnits(parseFloat(t))),n&&n!==`0`&&(r*=this._beatsToUnits(parseFloat(n)/4)),r}}})}transpose(t){return new e(this.context,this.valueOf()*Lh(t))}harmonize(e){return e.map(e=>this.transpose(e))}toMidi(){return Vh(this.valueOf())}toNote(){let t=this.toFrequency(),n=Math.log2(t/e.A4),r=Math.round(12*n)+57,i=Math.floor(r/12);return i<0&&(r+=-12*i),Jh[r%12]+i.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){let e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(e*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return Uh(e)}static ftom(e){return Vh(e)}},qh={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},Jh=[`C`,`C#`,`D`,`D#`,`E`,`F`,`F#`,`G`,`G#`,`A`,`A#`,`B`],Yh=class extends Gh{constructor(){super(...arguments),this.name=`TransportTime`}_now(){return this.context.transport.seconds}},Xh=class e extends uh{constructor(){super();let t=Y(e.getDefaults(),arguments,[`context`]);this.defaultContext?this.context=this.defaultContext:this.context=t.context}static getDefaults(){return{context:Nh()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return Hm(e),new Gh(this.context,e).toSeconds()}toFrequency(e){return new Kh(this.context,e).toFrequency()}toTicks(e){return new Yh(this.context,e).toTicks()}_getPartialProperties(e){let t=this.get();return Object.keys(t).forEach(n=>{km(e[n])&&delete t[n]}),t}get(){let t=sh(this);return Object.keys(t).forEach(n=>{if(Reflect.has(this,n)){let r=this[n];K(r)&&K(r.value)&&K(r.setValueAtTime)?t[n]=r.value:r instanceof e?t[n]=r._getPartialProperties(t[n]):Pm(r)||jm(r)||Fm(r)||Nm(r)?t[n]=r:delete t[n]}}),t}set(t){return Object.keys(t).forEach(n=>{Reflect.has(this,n)&&K(this[n])&&(this[n]&&K(this[n].value)&&K(this[n].setValueAtTime)?this[n].value!==t[n]&&(this[n].value=t[n]):this[n]instanceof e?this[n].set(t[n]):this[n]=t[n])}),this}},Zh=class extends _h{constructor(e=`stopped`){super(),this.name=`StateTimeline`,this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){let t=this.get(e);return t===null?this._initial:t.state}setStateAtTime(e,t,n){return Lm(t,0),this.add(Object.assign({},n,{state:e,time:t})),this}getLastState(e,t){let n=this._search(t);for(let t=n;t>=0;t--){let n=this._timeline[t];if(n.state===e)return n}}getNextState(e,t){let n=this._search(t);if(n!==-1)for(let t=n;t0,`timeConstant must be a number greater than 0`);let i=this.toSeconds(t);return this._assertRange(r),q(isFinite(r)&&isFinite(i),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(e)}, ${JSON.stringify(t)}`),this._events.add({constant:n,time:i,type:`setTargetAtTime`,value:r}),this.log(this.units,`setTargetAtTime`,e,i,n),this._param.setTargetAtTime(r,i,n),this}setValueCurveAtTime(e,t,n,r=1){n=this.toSeconds(n),t=this.toSeconds(t);let i=this._fromType(e[0])*r;this.setValueAtTime(this._toType(i),t);let a=n/(e.length-1);for(let n=1;n{t.type===`cancelScheduledValues`?e.cancelScheduledValues(t.time):t.type===`setTargetAtTime`?e.setTargetAtTime(t.value,t.time,t.constant):e[t.type](t.value,t.time)}),this}setParam(e){q(this._swappable,`The Param must be assigned as 'swappable' in the constructor`);let t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,n,r,i){return n+(t-n)*Math.exp(-(i-e)/r)}_linearInterpolate(e,t,n,r,i){return t+(r-t)*((i-e)/(n-e))}_exponentialInterpolate(e,t,n,r,i){return t*(r/t)**+((i-e)/(n-e))}},$=class e extends Xh{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return K(this.input)?$m(this.input)||this.input instanceof Q?1:this.input.numberOfInputs:0}get numberOfOutputs(){return K(this.output)?this.output.numberOfOutputs:0}_isAudioNode(t){return K(t)&&(t instanceof e||eh(t))}_getInternalNodes(){let e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach(t=>{t.channelCount=e.channelCount,t.channelCountMode=e.channelCountMode,t.channelInterpretation=e.channelInterpretation})}_getChannelProperties(){let e=this._getInternalNodes();q(e.length>0,`ToneAudioNode does not have any internal nodes`);let t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){let t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){let t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){let t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e,t=0,n=0){return $h(this,e,t,n),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return Gm(`toMaster() has been renamed toDestination()`),this.toDestination()}disconnect(e,t=0,n=0){return eg(this,e,t,n),this}chain(...e){return Qh(this,...e),this}fan(...e){return e.forEach(e=>this.connect(e)),this}dispose(){return super.dispose(),K(this.input)&&(this.input instanceof e?this.input.dispose():eh(this.input)&&this.input.disconnect()),K(this.output)&&(this.output instanceof e?this.output.dispose():eh(this.output)&&this.output.disconnect()),this._internalChannels=[],this}};function Qh(...e){let t=e.shift();e.reduce((e,t)=>(e instanceof $?e.connect(t):eh(e)&&$h(e,t),t),t)}function $h(e,t,n=0,r=0){for(q(K(e),`Cannot connect from undefined node`),q(K(t),`Cannot connect to undefined node`),(t instanceof $||eh(t))&&q(t.numberOfInputs>0,`Cannot connect to node with no inputs`),q(e.numberOfOutputs>0,`Cannot connect from node with no outputs`);t instanceof $||t instanceof Q;)K(t.input)&&(t=t.input);for(;e instanceof $;)K(e.output)&&(e=e.output);$m(t)?e.connect(t,n):e.connect(t,n,r)}function eg(e,t,n=0,r=0){if(K(t))for(;t instanceof $;)t=t.input;for(;!eh(e);)K(e.output)&&(e=e.output);$m(t)?e.disconnect(t,n):eh(t)?e.disconnect(t,n,r):e.disconnect()}var tg=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`gain`,`units`]);super(t),this.name=`Gain`,this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode,this.gain=new Q({context:this.context,convert:t.convert,param:this._gainNode.gain,units:t.units,value:t.gain,minValue:t.minValue,maxValue:t.maxValue}),X(this,`gain`)}static getDefaults(){return Object.assign($.getDefaults(),{convert:!0,gain:1,units:`gain`})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}},ng=class extends ${constructor(e){super(e),this.onended=Z,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new tg({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(e){let t=this.toSeconds(e);return this._startTime!==-1&&t>=this._startTime&&(this._stopTime===-1||t<=this._stopTime)?`started`:`stopped`},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign($.getDefaults(),{curve:`linear`,fadeIn:0,fadeOut:0,onended:Z})}_startGain(e,t=1){q(this._startTime===-1,`Source cannot be started more than once`);let n=this.toSeconds(this._fadeIn);return this._startTime=e+n,this._startTime=Math.max(this._startTime,this.context.currentTime),n>0?(this._gainNode.gain.setValueAtTime(0,e),this._curve===`linear`?this._gainNode.gain.linearRampToValueAtTime(t,e+n):this._gainNode.gain.exponentialApproachValueAtTime(t,e,n)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log(`stop`,e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){q(this._startTime!==-1,`'start' must be called before 'stop'`),this.cancelStop();let t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.now()),t>0?this._curve===`linear`?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{let e=this._curve===`exponential`?t*2:0;this._stopSource(this.now()+e),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==Z&&(this.onended(this),this.onended=Z,!this.context.isOffline)){let e=()=>this.dispose();typeof requestIdleCallback<`u`?requestIdleCallback(e):setTimeout(e,10)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log(`cancelStop`),q(this._startTime!==-1,`Source is not started`),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=Z,this}},rg=class e extends ng{constructor(){let t=Y(e.getDefaults(),arguments,[`offset`]);super(t),this.name=`ToneConstantSource`,this._source=this.context.createConstantSource(),$h(this._source,this._gainNode),this.offset=new Q({context:this.context,convert:t.convert,param:this._source.offset,units:t.units,value:t.offset,minValue:t.minValue,maxValue:t.maxValue})}static getDefaults(){return Object.assign(ng.getDefaults(),{convert:!0,offset:1,units:`number`})}start(e){let t=this.toSeconds(e);return this.log(`start`,t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),this.state===`started`&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}},ig=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`value`,`units`]);super(t),this.name=`Signal`,this.override=!0,this.output=this._constantSource=new rg({context:this.context,convert:t.convert,offset:t.value,units:t.units,minValue:t.minValue,maxValue:t.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign($.getDefaults(),{convert:!0,units:`number`,value:0})}connect(e,t=0,n=0){return ag(this,e,t,n),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,n){return this._param.exponentialRampTo(e,t,n),this}linearRampTo(e,t,n){return this._param.linearRampTo(e,t,n),this}targetRampTo(e,t,n){return this._param.targetRampTo(e,t,n),this}exponentialApproachValueAtTime(e,t,n){return this._param.exponentialApproachValueAtTime(e,t,n),this}setTargetAtTime(e,t,n){return this._param.setTargetAtTime(e,t,n),this}setValueCurveAtTime(e,t,n,r){return this._param.setValueCurveAtTime(e,t,n,r),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,n){return this._param.rampTo(e,t,n),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}};function ag(e,t,n,r){(t instanceof Q||$m(t)||t instanceof ig&&t.override)&&(t.cancelScheduledValues(0),t.setValueAtTime(0,0),t instanceof ig&&(t.overridden=!0)),$h(e,t,n,r)}var og=class e extends Q{constructor(){let t=Y(e.getDefaults(),arguments,[`value`]);super(t),this.name=`TickParam`,this._events=new _h(1/0),this._multiplier=1,this._multiplier=t.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:`setValueAtTime`,value:this._fromType(t.value)}),this.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(Q.getDefaults(),{multiplier:1,units:`hertz`,value:1})}setTargetAtTime(e,t,n){t=this.toSeconds(t),this.setRampPoint(t);let r=this._fromType(e),i=this._events.get(t),a=Math.round(Math.max(1/n,1));for(let e=0;e<=a;e++){let a=n*e+t,o=this._exponentialApproach(i.time,i.value,r,n,a);this.linearRampToValueAtTime(this._toType(o),a)}return this}setValueAtTime(e,t){let n=this.toSeconds(t);super.setValueAtTime(e,t);let r=this._events.get(n),i=this._events.previousEvent(r),a=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(a,0),this}linearRampToValueAtTime(e,t){let n=this.toSeconds(t);super.linearRampToValueAtTime(e,t);let r=this._events.get(n),i=this._events.previousEvent(r),a=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(a,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);let n=this._fromType(e),r=this._events.get(t),i=Math.round(Math.max((t-r.time)*10,1)),a=(t-r.time)/i;for(let e=0;e<=i;e++){let i=a*e+r.time,o=this._exponentialInterpolate(r.time,r.value,t,n,i);this.linearRampToValueAtTime(this._toType(o),i)}return this}_getTicksUntilEvent(e,t){if(e===null)e={ticks:0,time:0,type:`setValueAtTime`,value:0};else if(km(e.ticks)){let t=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(t,e.time)}let n=this._fromType(this.getValueAtTime(e.time)),r=this._fromType(this.getValueAtTime(t)),i=this._events.get(t);return i&&i.time===t&&i.type===`setValueAtTime`&&(r=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(n+r)+e.ticks}getTicksAtTime(e){let t=this.toSeconds(e),n=this._events.get(t);return Math.max(this._getTicksUntilEvent(n,t),0)}getDurationOfTicks(e,t){let n=this.toSeconds(t),r=this.getTicksAtTime(t);return this.getTimeOfTick(r+e)-n}getTimeOfTick(e){let t=this._events.get(e,`ticks`),n=this._events.getAfter(e,`ticks`);if(t&&t.ticks===e)return t.time;if(t&&n&&n.type===`linearRampToValueAtTime`&&t.value!==n.value){let r=this._fromType(this.getValueAtTime(t.time)),i=(this._fromType(this.getValueAtTime(n.time))-r)/(n.time-t.time),a=Math.sqrt(r**2-2*i*(t.ticks-e)),o=(-r+a)/i,s=(-r-a)/i;return(o>0?o:s)+t.time}else if(t)return t.value===0?1/0:t.time+(e-t.ticks)/t.value;else return e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){let n=this.toSeconds(t),r=this.toSeconds(e),i=this.getTicksAtTime(n);return this.getTicksAtTime(n+r)-i}_fromType(e){return this.units===`bpm`&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return this.units===`bpm`&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){let t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}},sg=class e extends ig{constructor(){let t=Y(e.getDefaults(),arguments,[`value`]);super(t),this.name=`TickSignal`,this.input=this._param=new og({context:this.context,convert:t.convert,multiplier:t.multiplier,param:this._constantSource.offset,units:t.units,value:t.value})}static getDefaults(){return Object.assign(ig.getDefaults(),{multiplier:1,units:`hertz`,value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}},cg=class e extends Xh{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`]);super(t),this.name=`TickSource`,this._state=new Zh,this._tickOffset=new _h,this._ticksAtTime=new _h,this._secondsAtTime=new _h,this.frequency=new sg({context:this.context,units:t.units,value:t.frequency}),X(this,`frequency`),this._state.setStateAtTime(`stopped`,0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:`hertz`},Xh.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){let n=this.toSeconds(e);return this._state.getValueAtTime(n)!==`started`&&(this._state.setStateAtTime(`started`,n),K(t)&&this.setTicksAtTime(t,n),this._ticksAtTime.cancel(n),this._secondsAtTime.cancel(n)),this}stop(e){let t=this.toSeconds(e);if(this._state.getValueAtTime(t)===`stopped`){let e=this._state.get(t);e&&e.time>0&&(this._tickOffset.cancel(e.time),this._state.cancel(e.time))}return this._state.cancel(t),this._state.setStateAtTime(`stopped`,t),this.setTicksAtTime(0,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}pause(e){let t=this.toSeconds(e);return this._state.getValueAtTime(t)===`started`&&(this._state.setStateAtTime(`paused`,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t)),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this._ticksAtTime.cancel(e),this._secondsAtTime.cancel(e),this}getTicksAtTime(e){let t=this.toSeconds(e),n=this._state.getLastState(`stopped`,t),r=this._ticksAtTime.get(t),i={state:`paused`,time:t};this._state.add(i);let a=r||n,o=r?r.ticks:0,s=null;return this._state.forEachBetween(a.time,t+this.sampleTime,e=>{let t=a.time,n=this._tickOffset.get(e.time);n&&n.time>=a.time&&(o=n.ticks,t=n.time),a.state===`started`&&e.state!==`started`&&(o+=this.frequency.getTicksAtTime(e.time)-this.frequency.getTicksAtTime(t),e.time!==i.time&&(s={state:e.state,time:e.time,ticks:o})),a=e}),this._state.remove(i),s&&this._ticksAtTime.add(s),o}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){let t=this.now(),n=this.frequency.timeToTicks(e,t);this.setTicksAtTime(n,t)}getSecondsAtTime(e){e=this.toSeconds(e);let t=this._state.getLastState(`stopped`,e),n={state:`paused`,time:e};this._state.add(n);let r=this._secondsAtTime.get(e),i=r||t,a=r?r.seconds:0,o=null;return this._state.forEachBetween(i.time,e+this.sampleTime,e=>{let t=i.time,r=this._tickOffset.get(e.time);r&&r.time>=i.time&&(a=r.seconds,t=r.time),i.state===`started`&&e.state!==`started`&&(a+=e.time-t,e.time!==n.time&&(o={state:e.state,time:e.time,seconds:a})),i=e}),this._state.remove(n),o&&this._secondsAtTime.add(o),a}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e,t=this.now()){let n=this._tickOffset.get(t),r=this._state.get(t),i=Math.max(n.time,r.time),a=this.frequency.getTicksAtTime(i)+e-n.ticks;return this.frequency.getTimeOfTick(a)}forEachTickBetween(e,t,n){let r=this._state.get(e);this._state.forEachBetween(e,t,t=>{r&&r.state===`started`&&t.state!==`started`&&this.forEachTickBetween(Math.max(r.time,e),t.time-this.sampleTime,n),r=t});let i=null;if(r&&r.state===`started`){let a=Math.max(r.time,e),o=this.frequency.getTicksAtTime(a),s=o-this.frequency.getTicksAtTime(r.time),c=Math.ceil(s)-s;c=hh(c,1)?0:c;let l=this.frequency.getTimeOfTick(o+c);for(;l{switch(e.state){case`started`:let t=this._tickSource.getTicksAtTime(e.time);this.emit(`start`,e.time,t);break;case`stopped`:e.time!==0&&this.emit(`stop`,e.time);break;case`paused`:this.emit(`pause`,e.time);break}}),this._tickSource.forEachTickBetween(e,t,(e,t)=>{this.callback(e,t)}))}getStateAtTime(e){let t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off(`tick`,this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}};wh.mixin(lg);var ug=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`volume`]);super(t),this.name=`Volume`,this.input=this.output=new tg({context:this.context,gain:t.volume,units:`decibels`}),this.volume=this.output.gain,X(this,`volume`),this._unmutedVolume=t.volume,this.mute=t.mute}static getDefaults(){return Object.assign($.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}},dg=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.name=`Destination`,this.input=new ug({context:this.context}),this.output=new tg({context:this.context}),this.volume=this.input.volume,Qh(this.input,this.output,this.context.rawContext.destination),this.mute=t.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign($.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(...e){return this.input.disconnect(),e.unshift(this.input),e.push(this.output),Qh(...e),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};yh(e=>{e.destination=new dg({context:e})}),Sh(e=>{e.destination.dispose()});var fg=class extends ${constructor(){super(...arguments),this.name=`Listener`,this.positionX=new Q({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Q({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Q({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Q({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Q({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Q({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Q({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Q({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Q({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign($.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}};yh(e=>{e.listener=new fg({context:e})}),Sh(e=>{e.listener.dispose()});var pg=class e extends uh{constructor(){super(),this.name=`ToneAudioBuffers`,this._buffers=new Map,this._loadingCount=0;let t=Y(e.getDefaults(),arguments,[`urls`,`onload`,`baseUrl`],`urls`);this.baseUrl=t.baseUrl,Object.keys(t.urls).forEach(e=>{this._loadingCount++;let n=t.urls[e];this.add(e,n,this._bufferLoaded.bind(this,t.onload),t.onerror)})}static getDefaults(){return{baseUrl:``,onerror:Z,onload:Z,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return q(this.has(e),`ToneAudioBuffers has no buffer named: ${e}`),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,this._loadingCount===0&&e&&e()}get loaded(){return Array.from(this._buffers).every(([e,t])=>t.loaded)}add(e,t,n=Z,r=Z){return Fm(t)?(this.baseUrl&&t.trim().substring(0,11).toLowerCase()===`data:audio/`&&(this.baseUrl=``),this._buffers.set(e.toString(),new kh(this.baseUrl+t,n,r))):this._buffers.set(e.toString(),new kh(t,n,r)),this}dispose(){return super.dispose(),this._buffers.forEach(e=>e.dispose()),this._buffers.clear(),this}},mg=class extends Yh{constructor(){super(...arguments),this.name=`Ticks`,this.defaultUnits=`i`}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}},hg=class extends Xh{constructor(){super(...arguments),this.name=`Draw`,this.expiration=.25,this.anticipation=.008,this._events=new _h,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){let e=this.context.currentTime;this._events.forEachBefore(e+this.anticipation,t=>{e-t.time<=this.expiration&&t.callback(),this._events.remove(t)}),this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}};yh(e=>{e.draw=new hg({context:e})}),Sh(e=>{e.draw.dispose()});var gg=class extends uh{constructor(){super(...arguments),this.name=`IntervalTimeline`,this._root=null,this._length=0}add(e){q(K(e.time),`Events must have a time property`),q(K(e.duration),`Events must have a duration parameter`),e.time=e.time.valueOf();let t=new _g(e.time,e.time+e.duration,e);for(this._root===null?this._root=t:this._root.insert(t),this._length++;t!==null;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(this._root!==null){let t=[];this._root.search(e.time,t);for(let n of t)if(n.event===e){this._removeNode(n),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,e=>this.remove(e)),this}_setRoot(e){this._root=e,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(e,t){e.parent===null?this._setRoot(t):(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent))}_removeNode(e){if(e.left===null&&e.right===null)this._replaceNodeInParent(e,null);else if(e.right===null)this._replaceNodeInParent(e,e.left);else if(e.left===null)this._replaceNodeInParent(e,e.right);else{let t=e.getBalance(),n,r=null;if(t>0)if(e.left.right===null)n=e.left,n.right=e.right,r=n;else{for(n=e.left.right;n.right!==null;)n=n.right;n.parent&&(n.parent.right=n.left,r=n.parent,n.left=e.left,n.right=e.right)}else if(e.right.left===null)n=e.right,n.left=e.left,r=n;else{for(n=e.right.left;n.left!==null;)n=n.left;n.parent&&(n.parent.left=n.right,r=n.parent,n.left=e.left,n.right=e.right)}e.parent===null?this._setRoot(n):e.isLeftChild()?e.parent.left=n:e.parent.right=n,r&&this._rebalance(r)}e.dispose()}_rotateLeft(e){let t=e.parent,n=e.isLeftChild(),r=e.right;r&&(e.right=r.left,r.left=e),t===null?this._setRoot(r):n?t.left=r:t.right=r}_rotateRight(e){let t=e.parent,n=e.isLeftChild(),r=e.left;r&&(e.left=r.right,r.right=e),t===null?this._setRoot(r):n?t.left=r:t.right=r}_rebalance(e){let t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(this._root!==null){let t=[];if(this._root.search(e,t),t.length>0){let e=t[0];for(let n=1;ne.low&&(e=t[n]);return e.event}}return null}forEach(e){if(this._root!==null){let t=[];this._root.traverse(e=>t.push(e)),t.forEach(t=>{t.event&&e(t.event)})}return this}forEachAtTime(e,t){if(this._root!==null){let n=[];this._root.search(e,n),n.forEach(e=>{e.event&&t(e.event)})}return this}forEachFrom(e,t){if(this._root!==null){let n=[];this._root.searchAfter(e,n),n.forEach(e=>{e.event&&t(e.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(e=>e.dispose()),this._root=null,this}},_g=class{constructor(e,t,n){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=n,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?this.left===null?this.left=e:this.left.insert(e):this.right===null?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(this.left!==null&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),!(this.low>e)&&this.right!==null&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),this.left!==null&&this.left.searchAfter(e,t)),this.right!==null&&this.right.searchAfter(e,t)}traverse(e){e(this),this.left!==null&&this.left.traverse(e),this.right!==null&&this.right.traverse(e)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right===null?this.left===null?this.height=0:this.height=this.left.height+1:this.height=this.right.height+1}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return this.left!==null&&this.right!==null?e=this.left.height-this.right.height:this.left===null?this.right!==null&&(e=-(this.right.height+1)):e=this.left.height+1,e}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}},vg=class extends uh{constructor(e){super(),this.name=`TimelineValue`,this._timeline=new _h({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){let t=this._timeline.get(e);return t?t.value:this._initialValue}},yg=class e extends ${constructor(){super(Y(e.getDefaults(),arguments,[`context`]))}connect(e,t=0,n=0){return ag(this,e,t,n),this}},bg=class e extends yg{constructor(){let t=Y(e.getDefaults(),arguments,[`mapping`,`length`]);super(t),this.name=`WaveShaper`,this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper,Pm(t.mapping)||t.mapping instanceof Float32Array?this.curve=Float32Array.from(t.mapping):Am(t.mapping)&&this.setMap(t.mapping,t.length)}static getDefaults(){return Object.assign(ig.getDefaults(),{length:1024})}setMap(e,t=1024){let n=new Float32Array(t);for(let r=0,i=t;rt.includes(e)),`oversampling must be either 'none', '2x', or '4x'`),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}},xg=class e extends yg{constructor(){let t=Y(e.getDefaults(),arguments,[`value`]);super(t),this.name=`Pow`,this._exponentScaler=this.input=this.output=new bg({context:this.context,mapping:this._expFunc(t.value),length:8192}),this._exponent=t.value}static getDefaults(){return Object.assign(yg.getDefaults(),{value:1})}_expFunc(e){return t=>Math.abs(t)**+e}get value(){return this._exponent}set value(e){this._exponent=e,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}},Sg=class e{constructor(t,n){this.id=e._eventId++,this._remainderTime=0;let r=Object.assign(e.getDefaults(),n);this.transport=t,this.callback=r.callback,this._once=r.once,this.time=Math.floor(r.time),this._remainderTime=r.time-this.time}static getDefaults(){return{callback:Z,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(e){if(this.callback){let t=this.transport.bpm.getDurationOfTicks(1,e);this.callback(e+this._remainderTime*t),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}};Sg._eventId=0;var Cg=class e extends Sg{constructor(t,n){super(t,n),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);let r=Object.assign(e.getDefaults(),n);this.duration=r.duration,this._interval=r.interval,this._nextTick=r.time,this.transport.on(`start`,this._boundRestart),this.transport.on(`loopStart`,this._boundRestart),this.transport.on(`ticks`,this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},Sg.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvent(){return mh(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new mg(this.context,this._nextTick).toSeconds()):-1}_createEvents(e){mh(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new mg(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;let t=this.transport.getTicksAtTime(e);fh(t,this.time)&&(this._nextTick=this.floatTime+Math.ceil((t-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off(`start`,this._boundRestart),this.transport.off(`loopStart`,this._boundRestart),this.transport.off(`ticks`,this._boundRestart),this}},wg=class e extends Xh{constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.name=`Transport`,this._loop=new vg(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new _h,this._repeatedEvents=new gg,this._syncedSignals=[],this._swingAmount=0,this._ppq=t.ppq,this._clock=new lg({callback:this._processTick.bind(this),context:this.context,frequency:0,units:`bpm`}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=t.ppq,this.bpm.setValueAtTime(t.bpm,0),X(this,`bpm`),this._timeSignature=t.timeSignature,this._swingTicks=t.ppq/2}static getDefaults(){return Object.assign(Xh.getDefaults(),{bpm:120,loopEnd:`4m`,loopStart:0,ppq:192,swing:0,swingSubdivision:`8n`,timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit(`loopEnd`,e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit(`loopStart`,e,this._clock.getSecondsAtTime(e)),this.emit(`loop`,e)),this._swingAmount>0&&t%this._ppq!==0&&t%(this._swingTicks*2)!=0){let n=t%(this._swingTicks*2)/(this._swingTicks*2),r=Math.sin(n*Math.PI)*this._swingAmount;e+=new mg(this.context,this._swingTicks*2/3).toSeconds()*r}Vm(!0),this._timeline.forEachAtTime(t,t=>t.invoke(e)),Vm(!1)}schedule(e,t){let n=new Sg(this,{callback:e,time:new Yh(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}scheduleRepeat(e,t,n,r=1/0){let i=new Cg(this,{callback:e,duration:new Gh(this.context,r).toTicks(),interval:new Gh(this.context,t).toTicks(),time:new Yh(this.context,n).toTicks()});return this._addEvent(i,this._repeatedEvents)}scheduleOnce(e,t){let n=new Sg(this,{callback:e,once:!0,time:new Yh(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){let t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(e=0){let t=this.toTicks(e);return this._timeline.forEachFrom(t,e=>this.clear(e.id)),this._repeatedEvents.forEachFrom(t,e=>this.clear(e.id)),this}_bindClockEvents(){this._clock.on(`start`,(e,t)=>{t=new mg(this.context,t).toSeconds(),this.emit(`start`,e,t)}),this._clock.on(`stop`,e=>{this.emit(`stop`,e)}),this._clock.on(`pause`,e=>{this.emit(`pause`,e)})}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){this.context.resume();let n;return K(t)&&(n=this.toTicks(t)),this._clock.start(e,n),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)===`started`?this.stop(e):this.start(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){Pm(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new Gh(this.context,this._loopStart,`i`).toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new Gh(this.context,this._loopEnd,`i`).toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new mg(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){let e=this.now(),t=this._clock.getTicksAtTime(e);return new mg(this.context,t).toBarsBeatsSixteenths()}set position(e){let t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){let t=this.now(),n=this._clock.frequency.timeToTicks(e,t);this.ticks=n}get progress(){if(this.loop){let e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){let t=this.now();if(this.state===`started`){let n=this._clock.getTicksAtTime(t),r=t+this._clock.frequency.getDurationOfTicks(Math.ceil(n)-n,t);this.emit(`stop`,r),this._clock.setTicksAtTime(e,r),this.emit(`start`,r,this._clock.getSecondsAtTime(r))}else this.emit(`ticks`,t),this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return this._clock.getTicksAtTime(e)}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),this.state!==`started`)return 0;{let t=this.now(),n=this.getTicksAtTime(t),r=e-n%e;return this._clock.nextTickTime(r,t)}}syncSignal(e,t){let n=this.now(),r=this.bpm,i=1/(60/r.getValueAtTime(n)/this.PPQ),a=[];if(e.units===`time`){let e=1/64/i,t=new tg(e),n=new xg(-1),o=new tg(e);r.chain(t,n,o),r=o,i=1/i,a=[t,n,o]}t||=e.getValueAtTime(n)===0?0:e.getValueAtTime(n)/i;let o=new tg(t);return r.connect(o),o.connect(e._param),a.push(o),this._syncedSignals.push({initial:e.value,nodes:a,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){let n=this._syncedSignals[t];n.signal===e&&(n.nodes.forEach(e=>e.dispose()),n.signal.value=n.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),Oh(this,`bpm`),this._timeline.dispose(),this._repeatedEvents.dispose(),this}};wh.mixin(wg),yh(e=>{e.transport=new wg({context:e})}),Sh(e=>{e.transport.dispose()});var Tg=class extends ${constructor(e){super(e),this.input=void 0,this._state=new Zh(`stopped`),this._synced=!1,this._scheduled=[],this._syncedStart=Z,this._syncedStop=Z,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new ug({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,X(this,`volume`),this.onstop=e.onstop}static getDefaults(){return Object.assign($.getDefaults(),{mute:!1,onstop:Z,volume:0})}get state(){return this._synced?this.context.transport.state===`started`?this._state.getValueAtTime(this.context.transport.seconds):`stopped`:this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,n){let r=km(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(r=this._clampToCurrentTime(r),!this._synced&&this._state.getValueAtTime(r)===`started`)q(fh(r,this._state.get(r).time),`Start time must be strictly greater than previous start time`),this._state.cancel(r),this._state.setStateAtTime(`started`,r),this.log(`restart`,r),this.restart(r,t,n);else if(this.log(`start`,r),this._state.setStateAtTime(`started`,r),this._synced){let e=this._state.get(r);e&&(e.offset=this.toSeconds(ch(t,0)),e.duration=n?this.toSeconds(n):void 0);let i=this.context.transport.schedule(e=>{this._start(e,t,n)},r);this._scheduled.push(i),this.context.transport.state===`started`&&this.context.transport.getSecondsAtTime(this.immediate())>r&&this._syncedStart(this.now(),this.context.transport.seconds)}else Rm(this.context),this._start(r,t,n);return this}stop(e){let t=km(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),this._state.getValueAtTime(t)===`started`||K(this._state.getNextState(`started`,t))){if(this.log(`stop`,t),!this._synced)this._stop(t);else{let e=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(e)}this._state.cancel(t),this._state.setStateAtTime(`stopped`,t)}return this}restart(e,t,n){return e=this.toSeconds(e),this._state.getValueAtTime(e)===`started`&&(this._state.cancel(e),this._restart(e,t,n)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(fh(t,0)){let n=this._state.get(t);if(n&&n.state===`started`&&n.time!==t){let r=t-this.toSeconds(n.time),i;n.duration&&(i=this.toSeconds(n.duration)-r),this._start(e,this.toSeconds(n.offset)+r,i)}}},this._syncedStop=e=>{let t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(t)===`started`&&this._stop(e)},this.context.transport.on(`start`,this._syncedStart),this.context.transport.on(`loopStart`,this._syncedStart),this.context.transport.on(`stop`,this._syncedStop),this.context.transport.on(`pause`,this._syncedStop),this.context.transport.on(`loopEnd`,this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off(`stop`,this._syncedStop),this.context.transport.off(`pause`,this._syncedStop),this.context.transport.off(`loopEnd`,this._syncedStop),this.context.transport.off(`start`,this._syncedStart),this.context.transport.off(`loopStart`,this._syncedStart)),this._synced=!1,this._scheduled.forEach(e=>this.context.transport.clear(e)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=Z,this.unsync(),this._volume.dispose(),this._state.dispose(),this}},Eg=class e extends ng{constructor(){let t=Y(e.getDefaults(),arguments,[`url`,`onload`]);super(t),this.name=`ToneBufferSource`,this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1,$h(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Q({context:this.context,param:this._source.playbackRate,units:`positive`,value:t.playbackRate}),this.loop=t.loop,this.loopStart=t.loopStart,this.loopEnd=t.loopEnd,this._buffer=new kh(t.url,t.onload,t.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(ng.getDefaults(),{url:new kh,loop:!1,loopEnd:0,loopStart:0,onload:Z,onerror:Z,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,n,r=1){q(this.buffer.loaded,`buffer is either not set or not loaded`);let i=this.toSeconds(e);this._startGain(i,r),t=this.loop?ch(t,this.loopStart):ch(t,0);let a=Math.max(this.toSeconds(t),0);if(this.loop){let e=this.toSeconds(this.loopEnd)||this.buffer.duration,t=this.toSeconds(this.loopStart),n=e-t;ph(a,e)&&(a=(a-t)%n+t),hh(a,this.buffer.duration)&&(a=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,mh(a,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(i,a)),K(n)){let e=this.toSeconds(n);e=Math.max(e,0),this.stop(i+e)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}};function Dg(e,t){return J(this,void 0,void 0,function*(){let n=t/e.context.sampleRate,r=new Ah(1,n,e.context.sampleRate);return new e.constructor(Object.assign(e.get(),{frequency:2/n,detune:0,context:r})).toDestination().start(0),(yield r.render()).getChannelData(0)})}var Og=class e extends ng{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`]);super(t),this.name=`ToneOscillatorNode`,this._oscillator=this.context.createOscillator(),this._internalChannels=[this._oscillator],$h(this._oscillator,this._gainNode),this.type=t.type,this.frequency=new Q({context:this.context,param:this._oscillator.frequency,units:`frequency`,value:t.frequency}),this.detune=new Q({context:this.context,param:this._oscillator.detune,units:`cents`,value:t.detune}),X(this,[`frequency`,`detune`])}static getDefaults(){return Object.assign(ng.getDefaults(),{detune:0,frequency:440,type:`sine`})}start(e){let t=this.toSeconds(e);return this.log(`start`,t),this._startGain(t),this._oscillator.start(t),this}_stopSource(e){this._oscillator.stop(e)}setPeriodicWave(e){return this._oscillator.setPeriodicWave(e),this}get type(){return this._oscillator.type}set type(e){this._oscillator.type=e}dispose(){return super.dispose(),this.state===`started`&&this.stop(),this._oscillator.disconnect(),this.frequency.dispose(),this.detune.dispose(),this}},kg=class e extends Tg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`]);super(t),this.name=`Oscillator`,this._oscillator=null,this.frequency=new ig({context:this.context,units:`frequency`,value:t.frequency}),X(this,`frequency`),this.detune=new ig({context:this.context,units:`cents`,value:t.detune}),X(this,`detune`),this._partials=t.partials,this._partialCount=t.partialCount,this._type=t.type,t.partialCount&&t.type!==`custom`&&(this._type=this.baseType+t.partialCount.toString()),this.phase=t.phase}static getDefaults(){return Object.assign(Tg.getDefaults(),{detune:0,frequency:440,partialCount:0,partials:[],phase:0,type:`sine`})}_start(e){let t=this.toSeconds(e),n=new Og({context:this.context,onended:()=>this.onstop(this)});this._oscillator=n,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){let t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){let t=this.toSeconds(e);return this.log(`restart`,t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type===`custom`)return e._periodicWaveCache.find(e=>e.phase===this._phase&&oh(e.partials,this._partials));{let t=e._periodicWaveCache.find(e=>e.type===this._type&&e.phase===this._phase);return this._partialCount=t?t.partialCount:this._partialCount,t}}get type(){return this._type}set type(t){this._type=t;let n=[`sine`,`square`,`sawtooth`,`triangle`].indexOf(t)!==-1;if(this._phase===0&&n)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=t);else{let n=this._getCachedPeriodicWave();if(K(n)){let{partials:e,wave:t}=n;this._wave=t,this._partials=e,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{let[n,r]=this._getRealImaginary(t,this._phase),i=this.context.createPeriodicWave(n,r);this._wave=i,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),e._periodicWaveCache.push({imag:r,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:n,type:this._type,wave:this._wave}),e._periodicWaveCache.length>100&&e._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),``)}set baseType(e){this.partialCount&&this._type!==`custom`&&e!==`custom`?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){Lm(e,0);let t=this._type,n=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(n&&(t=n[1]),this._type!==`custom`)e===0?this.type=t:this.type=t+e.toString();else{let t=new Float32Array(e);this._partials.forEach((e,n)=>t[n]=e),this._partials=Array.from(t),this.type=this._type}}_getRealImaginary(e,t){let n=4096/2,r=new Float32Array(n),i=new Float32Array(n),a=1;if(e===`custom`){if(a=this._partials.length+1,this._partialCount=this._partials.length,n=a,this._partials.length===0)return[r,i]}else{let t=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);t?(a=parseInt(t[2],10)+1,this._partialCount=parseInt(t[2],10),e=t[1],a=Math.max(a,2),n=a):this._partialCount=0,this._partials=[]}for(let o=1;o>1&1?-1:1):0,this._partials[o-1]=s;break;case`custom`:s=this._partials[o-1];break;default:throw TypeError(`Oscillator: invalid type: `+e)}s===0?(r[o]=0,i[o]=0):(r[o]=-s*Math.sin(t*o),i[o]=s*Math.cos(t*o))}return[r,i]}_inverseFFT(e,t,n){let r=0,i=e.length;for(let a=0;a(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}},jg=class e extends ig{constructor(){let t=Y(e.getDefaults(),arguments,[`value`]);super(t),this.name=`Multiply`,this.override=!1,this._mult=this.input=this.output=new tg({context:this.context,minValue:t.minValue,maxValue:t.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(ig.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}},Mg=class e extends Tg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`,`modulationType`]);super(t),this.name=`AMOscillator`,this._modulationScale=new Ag({context:this.context}),this._modulationNode=new tg({context:this.context}),this._carrier=new kg({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase,type:t.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new kg({context:this.context,phase:t.phase,type:t.modulationType}),this.harmonicity=new jg({context:this.context,units:`positive`,value:t.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),X(this,[`frequency`,`detune`,`harmonicity`])}static getDefaults(){return Object.assign(kg.getDefaults(),{harmonicity:1,modulationType:`square`})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(){return J(this,arguments,void 0,function*(e=1024){return Dg(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}},Ng=class e extends Tg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`,`modulationType`]);super(t),this.name=`FMOscillator`,this._modulationNode=new tg({context:this.context,gain:0}),this._carrier=new kg({context:this.context,detune:t.detune,frequency:0,onstop:()=>this.onstop(this),phase:t.phase,type:t.type}),this.detune=this._carrier.detune,this.frequency=new ig({context:this.context,units:`frequency`,value:t.frequency}),this._modulator=new kg({context:this.context,phase:t.phase,type:t.modulationType}),this.harmonicity=new jg({context:this.context,units:`positive`,value:t.harmonicity}),this.modulationIndex=new jg({context:this.context,units:`positive`,value:t.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),X(this,[`modulationIndex`,`frequency`,`detune`,`harmonicity`])}static getDefaults(){return Object.assign(kg.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:`square`})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(){return J(this,arguments,void 0,function*(e=1024){return Dg(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}},Pg=class e extends Tg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`width`]);super(t),this.name=`PulseOscillator`,this._widthGate=new tg({context:this.context,gain:0}),this._thresh=new bg({context:this.context,mapping:e=>e<=0?-1:1}),this.width=new ig({context:this.context,units:`audioRange`,value:t.width}),this._triangle=new kg({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase,type:`triangle`}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),X(this,[`width`,`frequency`,`detune`])}static getDefaults(){return Object.assign(Tg.getDefaults(),{detune:0,frequency:440,phase:0,type:`pulse`,width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return`pulse`}get baseType(){return`pulse`}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(){return J(this,arguments,void 0,function*(e=1024){return Dg(this,e)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}},Fg=class e extends Tg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`,`spread`]);super(t),this.name=`FatOscillator`,this._oscillators=[],this.frequency=new ig({context:this.context,units:`frequency`,value:t.frequency}),this.detune=new ig({context:this.context,units:`cents`,value:t.detune}),this._spread=t.spread,this._type=t.type,this._phase=t.phase,this._partials=t.partials,this._partialCount=t.partialCount,this.count=t.count,X(this,[`frequency`,`detune`])}static getDefaults(){return Object.assign(kg.getDefaults(),{count:3,spread:20,type:`sawtooth`})}_start(e){e=this.toSeconds(e),this._forEach(t=>t.start(e))}_stop(e){e=this.toSeconds(e),this._forEach(t=>t.stop(e))}_restart(e){this._forEach(t=>t.restart(e))}_forEach(e){for(let t=0;tt.type=e)}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){let t=-e/2,n=e/(this._oscillators.length-1);this._forEach((e,r)=>e.detune.value=t+n*r)}}get count(){return this._oscillators.length}set count(e){if(Lm(e,1),this._oscillators.length!==e){this._forEach(e=>e.dispose()),this._oscillators=[];for(let t=0;tthis.onstop(this):Z});this.type===`custom`&&(n.partials=this._partials),this.frequency.connect(n.frequency),this.detune.connect(n.detune),n.detune.overridden=!1,n.connect(this.output),this._oscillators[t]=n}this.spread=this._spread,this.state===`started`&&this._forEach(e=>e.start())}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach((e,t)=>e.phase=this._phase+t/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach(t=>t.baseType=e),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type=`custom`,this._forEach(t=>t.partials=e))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach(t=>t.partialCount=e),this._type=this._oscillators[0].type}asArray(){return J(this,arguments,void 0,function*(e=1024){return Dg(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(e=>e.dispose()),this}},Ig=class e extends Tg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`modulationFrequency`]);super(t),this.name=`PWMOscillator`,this.sourceType=`pwm`,this._scale=new jg({context:this.context,value:2}),this._pulse=new Pg({context:this.context,frequency:t.modulationFrequency}),this._pulse.carrierType=`sine`,this.modulationFrequency=this._pulse.frequency,this._modulator=new kg({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),X(this,[`modulationFrequency`,`frequency`,`detune`])}static getDefaults(){return Object.assign(Tg.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:`pwm`})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return`pwm`}get baseType(){return`pwm`}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(){return J(this,arguments,void 0,function*(e=1024){return Dg(this,e)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}},Lg={am:Mg,fat:Fg,fm:Ng,oscillator:kg,pulse:Pg,pwm:Ig},Rg=class e extends Tg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`]);super(t),this.name=`OmniOscillator`,this.frequency=new ig({context:this.context,units:`frequency`,value:t.frequency}),this.detune=new ig({context:this.context,units:`cents`,value:t.detune}),X(this,[`frequency`,`detune`]),this.set(t)}static getDefaults(){return Object.assign(kg.getDefaults(),Ng.getDefaults(),Mg.getDefaults(),Fg.getDefaults(),Pg.getDefaults(),Ig.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e=``;return[`am`,`fm`,`fat`].some(e=>this._sourceType===e)&&(e=this._sourceType),e+this._oscillator.type}set type(e){e.substr(0,2)===`fm`?(this._createNewOscillator(`fm`),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,2)===`am`?(this._createNewOscillator(`am`),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,3)===`fat`?(this._createNewOscillator(`fat`),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):e===`pwm`?(this._createNewOscillator(`pwm`),this._oscillator=this._oscillator):e===`pulse`?this._createNewOscillator(`pulse`):(this._createNewOscillator(`oscillator`),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){!this._getOscType(this._oscillator,`pulse`)&&!this._getOscType(this._oscillator,`pwm`)&&(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){!this._getOscType(this._oscillator,`pulse`)&&!this._getOscType(this._oscillator,`pwm`)&&(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,`type`)&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;let t=Lg[e],n=this.now();if(this._oscillator){let e=this._oscillator;e.stop(n),this.context.setTimeout(()=>e.dispose(),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state===`started`&&this._oscillator.start(n)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t=`sine`;this._oscillator.type!==`pwm`&&this._oscillator.type!==`pulse`&&(t=this._oscillator.type),e===`fm`?this.type=`fm`+t:e===`am`?this.type=`am`+t:e===`fat`?this.type=`fat`+t:e===`oscillator`?this.type=t:e===`pulse`?this.type=`pulse`:e===`pwm`&&(this.type=`pwm`)}_getOscType(e,t){return e instanceof Lg[t]}get baseType(){return this._oscillator.baseType}set baseType(e){!this._getOscType(this._oscillator,`pulse`)&&!this._getOscType(this._oscillator,`pwm`)&&e!==`pulse`&&e!==`pwm`&&(this._oscillator.baseType=e)}get width(){if(this._getOscType(this._oscillator,`pulse`))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,`fat`))return this._oscillator.count}set count(e){this._getOscType(this._oscillator,`fat`)&&jm(e)&&(this._oscillator.count=e)}get spread(){if(this._getOscType(this._oscillator,`fat`))return this._oscillator.spread}set spread(e){this._getOscType(this._oscillator,`fat`)&&jm(e)&&(this._oscillator.spread=e)}get modulationType(){if(this._getOscType(this._oscillator,`fm`)||this._getOscType(this._oscillator,`am`))return this._oscillator.modulationType}set modulationType(e){(this._getOscType(this._oscillator,`fm`)||this._getOscType(this._oscillator,`am`))&&Fm(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){if(this._getOscType(this._oscillator,`fm`))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,`fm`)||this._getOscType(this._oscillator,`am`))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,`pwm`))return this._oscillator.modulationFrequency}asArray(){return J(this,arguments,void 0,function*(e=1024){return Dg(this,e)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}};function zg(e,t=1/0){let n=new WeakMap;return function(r,i){Reflect.defineProperty(r,i,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){Lm(r,e,t),n.set(this,r)}})}}function Bg(e,t=1/0){let n=new WeakMap;return function(r,i){Reflect.defineProperty(r,i,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){Lm(this.toSeconds(r),e,t),n.set(this,r)}})}}var Vg=class e extends Tg{constructor(){let t=Y(e.getDefaults(),arguments,[`url`,`onload`]);super(t),this.name=`Player`,this._activeSources=new Set,this._buffer=new kh({onload:this._onload.bind(this,t.onload),onerror:t.onerror,reverse:t.reverse,url:t.url}),this.autostart=t.autostart,this._loop=t.loop,this._loopStart=t.loopStart,this._loopEnd=t.loopEnd,this._playbackRate=t.playbackRate,this.fadeIn=t.fadeIn,this.fadeOut=t.fadeOut}static getDefaults(){return Object.assign(Tg.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:Z,onerror:Z,playbackRate:1,reverse:!1})}load(e){return J(this,void 0,void 0,function*(){return yield this._buffer.load(e),this._onload(),this})}_onload(e=Z){e(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())===`started`&&(this._state.cancel(this.now()),this._state.setStateAtTime(`stopped`,this.now()))}start(e,t,n){return super.start(e,t,n),this}_start(e,t,n){t=this._loop?ch(t,this._loopStart):ch(t,0);let r=this.toSeconds(t),i=n;n=ch(n,Math.max(this._buffer.duration-r,0));let a=this.toSeconds(n);a/=this._playbackRate,e=this.toSeconds(e);let o=new Eg({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(e+a),this._state.setStateAtTime(`stopped`,e+a,{implicitEnd:!0})),this._activeSources.add(o),this._loop&&km(i)?o.start(e,r):o.start(e,r,a-this.toSeconds(this.fadeOut))}_stop(e){let t=this.toSeconds(e);this._activeSources.forEach(e=>e.stop(t))}restart(e,t,n){return super.restart(e,t,n),this}_restart(e,t,n){var r;(r=[...this._activeSources].pop())==null||r.stop(e),this._start(e,t,n)}seek(e,t){let n=this.toSeconds(t);if(this._state.getValueAtTime(n)===`started`){let t=this.toSeconds(e);this._stop(n),this._start(n,t)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&Lm(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopStart=e})}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&Lm(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopEnd=e})}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach(t=>{t.loop=e}),e)){let e=this._state.getNextState(`stopped`,this.now());e&&this._state.cancel(e.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;let t=this.now(),n=this._state.getNextState(`stopped`,t);n&&n.implicitEnd&&(this._state.cancel(n.time),this._activeSources.forEach(e=>e.cancelStop())),this._activeSources.forEach(n=>{n.playbackRate.setValueAtTime(e,t)})}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(e=>e.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}};Zm([Bg(0)],Vg.prototype,`fadeIn`,void 0),Zm([Bg(0)],Vg.prototype,`fadeOut`,void 0);var Hg=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`attack`,`decay`,`sustain`,`release`]);super(t),this.name=`Envelope`,this._sig=new ig({context:this.context,value:0}),this.output=this._sig,this.input=void 0,this.attack=t.attack,this.decay=t.decay,this.sustain=t.sustain,this.release=t.release,this.attackCurve=t.attackCurve,this.releaseCurve=t.releaseCurve,this.decayCurve=t.decayCurve}static getDefaults(){return Object.assign($.getDefaults(),{attack:.01,attackCurve:`linear`,decay:.1,decayCurve:`exponential`,release:1,releaseCurve:`exponential`,sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(Fm(e))return e;{let n;for(n in Ug)if(Ug[n][t]===e)return n;return e}}_setCurve(e,t,n){if(Fm(n)&&Reflect.has(Ug,n)){let r=Ug[n];Mm(r)?e!==`_decayCurve`&&(this[e]=r[t]):this[e]=r}else if(Pm(n)&&e!==`_decayCurve`)this[e]=n;else throw Error(`Envelope: invalid curve: `+n)}get attackCurve(){return this._getCurve(this._attackCurve,`In`)}set attackCurve(e){this._setCurve(`_attackCurve`,`In`,e)}get releaseCurve(){return this._getCurve(this._releaseCurve,`Out`)}set releaseCurve(e){this._setCurve(`_releaseCurve`,`Out`,e)}get decayCurve(){return this._getCurve(this._decayCurve,`Out`)}set decayCurve(e){this._setCurve(`_decayCurve`,`Out`,e)}triggerAttack(e,t=1){this.log(`triggerAttack`,e,t),e=this.toSeconds(e);let n=this.toSeconds(this.attack),r=this.toSeconds(this.decay),i=this.getValueAtTime(e);if(i>0){let e=1/n;n=(1-i)/e}if(n0){let n=this.toSeconds(this.release);n{let e,t,n=[];for(e=0;e<128;e++)n[e]=Math.sin(e/127*(Math.PI/2));let r=[];for(e=0;e<127;e++)t=e/127,r[e]=(Math.sin(Math.PI*2*t*6.4-Math.PI/2)+1)/10+t*.83;r[127]=1;let i=[];for(e=0;e<128;e++)i[e]=Math.ceil(e/127*5)/5;let a=[];for(e=0;e<128;e++)t=e/127,a[e]=.5*(1-Math.cos(Math.PI*t));let o=[];for(e=0;e<128;e++){t=e/127;let n=t**3*4+.2,r=Math.cos(n*Math.PI*2*t);o[e]=Math.abs(r*(1-t))}function s(e){let t=Array(e.length);for(let n=0;nthis._original_triggerRelease(e),this._volume=this.output=new ug({context:this.context,volume:t.volume}),this.volume=this._volume.volume,X(this,`volume`)}static getDefaults(){return Object.assign($.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod(`triggerAttack`,1),this._syncMethod(`triggerRelease`,0),this.context.transport.on(`stop`,this._syncedRelease),this.context.transport.on(`pause`,this._syncedRelease),this.context.transport.on(`loopEnd`,this._syncedRelease)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){let n=this[`_original_`+e]=this[e];this[e]=(...e)=>{let r=e[t],i=this.context.transport.schedule(r=>{e[t]=r,n.apply(this,e)},r);this._scheduledEvents.push(i)}}unsync(){return this._scheduledEvents.forEach(e=>this.context.transport.clear(e)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off(`stop`,this._syncedRelease),this.context.transport.off(`pause`,this._syncedRelease),this.context.transport.off(`loopEnd`,this._syncedRelease)),this}triggerAttackRelease(e,t,n,r){let i=this.toSeconds(n),a=this.toSeconds(t);return this.triggerAttack(e,i,r),this.triggerRelease(i+a),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}},Gg=class e extends Wg{constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.portamento=t.portamento,this.onsilence=t.onsilence}static getDefaults(){return Object.assign(Wg.getDefaults(),{detune:0,onsilence:Z,portamento:0})}triggerAttack(e,t,n=1){this.log(`triggerAttack`,e,t,n);let r=this.toSeconds(t);return this._triggerEnvelopeAttack(r,n),this.setNote(e,r),this}triggerRelease(e){this.log(`triggerRelease`,e);let t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){let n=this.toSeconds(t),r=e instanceof Kh?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(n)>.05){let e=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,e,n)}else this.frequency.setValueAtTime(r,n);return this}};Zm([Bg(0)],Gg.prototype,`portamento`,void 0);var Kg=class e extends Hg{constructor(){super(Y(e.getDefaults(),arguments,[`attack`,`decay`,`sustain`,`release`])),this.name=`AmplitudeEnvelope`,this._gainNode=new tg({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}},qg=class e extends Gg{constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.name=`Synth`,this.oscillator=new Rg(Object.assign({context:this.context,detune:t.detune,onstop:()=>this.onsilence(this)},t.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new Kg(Object.assign({context:this.context},t.envelope)),this.oscillator.chain(this.envelope,this.output),X(this,[`oscillator`,`frequency`,`detune`,`envelope`])}static getDefaults(){return Object.assign(Gg.getDefaults(),{envelope:Object.assign(lh(Hg.getDefaults(),Object.keys($.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(lh(Rg.getDefaults(),[...Object.keys(Tg.getDefaults()),`frequency`,`detune`]),{type:`triangle`})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),this.envelope.sustain===0){let t=this.toSeconds(this.envelope.attack),n=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+t+n)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}},Jg=class e extends qg{constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.name=`MembraneSynth`,this.portamento=0,this.pitchDecay=t.pitchDecay,this.octaves=t.octaves,X(this,[`oscillator`,`envelope`])}static getDefaults(){return ah(Gg.getDefaults(),qg.getDefaults(),{envelope:{attack:.001,attackCurve:`exponential`,decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:`sine`},pitchDecay:.05})}setNote(e,t){let n=this.toSeconds(t),r=this.toFrequency(e instanceof Kh?e.toFrequency():e),i=r*this.octaves;return this.oscillator.frequency.setValueAtTime(i,n),this.oscillator.frequency.exponentialRampToValueAtTime(r,n+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}};Zm([zg(0)],Jg.prototype,`octaves`,void 0),Zm([Bg(0)],Jg.prototype,`pitchDecay`,void 0);var Yg=new Set;function Xg(e){Yg.add(e)}function Zg(e,t){let n=`registerProcessor("${e}", ${t})`;Yg.add(n)}Xg(` + `],{type:`text/javascript`}),t=URL.createObjectURL(e),n=new Worker(t);n.onmessage=this._callback.bind(this),this._worker=n}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type===`worker`)try{this._createWorker()}catch{this._type=`timeout`,this._createClock()}else this._type===`timeout`&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){var t;this._updateInterval=Math.max(e,this._minimumUpdateInterval),this._type===`worker`&&((t=this._worker)==null||t.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}};function th(e){return km(e)}function nh(e){return Om(e)}function rh(e){return Am(e)}function ih(e){return Dm(e)}function ah(e){return e instanceof yp}function oh(e,t){return e===`value`||th(t)||nh(t)||ah(t)}function sh(e,...t){if(!t.length)return e;let n=t.shift();if(Pm(e)&&Pm(n))for(let t in n)oh(t,n[t])?e[t]=n[t]:Pm(n[t])?(e[t]||Object.assign(e,{[t]:{}}),sh(e[t],n[t])):Object.assign(e,{[t]:n[t]});return sh(e,...t)}function ch(e,t){return e.length===t.length&&e.every((e,n)=>t[n]===e)}function Y(e,t,n=[],r){let i={},a=Array.from(t);if(Pm(a[0])&&r&&!Reflect.has(a[0],r)&&(Object.keys(a[0]).some(t=>Reflect.has(e,t))||(sh(i,{[r]:a[0]}),n.splice(n.indexOf(r),1),a.shift())),a.length===1&&Pm(a[0]))sh(i,a[0]);else for(let e=0;e{Reflect.has(e,t)&&delete e[t]}),e}var fh=class{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...e){(this.debug||Xm&&this.toString()===Xm.TONE_DEBUG_CLASS)&&Km(this,...e)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}};fh.version=ws;var ph=1e-6;function mh(e,t){return e>t+ph}function hh(e,t){return mh(e,t)||_h(e,t)}function gh(e,t){return e+phthis.memory){let e=this.length-this.memory;this._timeline.splice(0,e)}return this}remove(e){let t=this._timeline.indexOf(e);return t!==-1&&this._timeline.splice(t,1),this}get(e,t=`time`){let n=this._search(e,t);return n===-1?null:this._timeline[n]}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e,t=`time`){let n=this._search(e,t);return n+10&&this._timeline[t-1].time=0?this._timeline[n-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(_h(this._timeline[t].time,e)){for(let n=t;n>=0&&_h(this._timeline[n].time,e);n--)t=n;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else this._timeline.length===1&&hh(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){let t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){let t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e,t=`time`){if(this._timeline.length===0)return-1;let n=0,r=this._timeline.length,i=r;if(r>0&&this._timeline[r-1][t]<=e)return r-1;for(;n=0&&this._timeline[n].time>=e;)n--;return this._iterate(t,n+1),this}forEachAtTime(e,t){let n=this._search(e);if(n!==-1&&_h(this._timeline[n].time,e)){let r=n;for(let t=n;t>=0&&_h(this._timeline[t].time,e);t--)r=t;this._iterate(e=>{t(e)},r,n)}return this}dispose(){return super.dispose(),this._timeline=[],this}},bh=[];function xh(e){bh.push(e)}function Sh(e){bh.forEach(t=>t(e))}var Ch=[];function wh(e){Ch.push(e)}function Th(e){Ch.forEach(t=>t(e))}var Eh=class e extends fh{constructor(){super(...arguments),this.name=`Emitter`}on(e,t){return e.split(/\W+/).forEach(e=>{jm(this._events)&&(this._events={}),this._events.hasOwnProperty(e)||(this._events[e]=[]),this._events[e].push(t)}),this}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}off(e,t){return e.split(/\W+/).forEach(e=>{if(jm(this._events)&&(this._events={}),this._events.hasOwnProperty(e))if(jm(t))this._events[e]=[];else{let n=this._events[e];for(let e=n.length-1;e>=0;e--)n[e]===t&&n.splice(e,1)}}),this}emit(e,...t){if(this._events&&this._events.hasOwnProperty(e)){let n=this._events[e].slice(0);for(let e=0,r=n.length;e{let r=Object.getOwnPropertyDescriptor(e.prototype,n);Object.defineProperty(t.prototype,n,r)})}dispose(){return super.dispose(),this._events=void 0,this}},Dh=class extends Eh{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}},Oh=class e extends Dh{constructor(){super(),this.name=`Context`,this._constants=new Map,this._timeouts=new yh,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;let t=Y(e.getDefaults(),arguments,[`context`]);t.context?(this._context=t.context,this._latencyHint=arguments[0]?.latencyHint||``):(this._context=Jm({latencyHint:t.latencyHint}),this._latencyHint=t.latencyHint),this._ticker=new eh(this.emit.bind(this,`tick`),t.clockSource,t.updateInterval,this._context.sampleRate),this.on(`tick`,this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit(`statechange`,this.state)},this[arguments[0]?.hasOwnProperty(`updateInterval`)?`_lookAhead`:`lookAhead`]=t.lookAhead}static getDefaults(){return{clockSource:`worker`,latencyHint:`interactive`,lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||=(Sh(this),!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,n){return this._context.createBuffer(e,t,n)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,n){return this._context.createPeriodicWave(e,t,n)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){return q(ih(this._context),`Not available if OfflineAudioContext`),this._context.createMediaStreamSource(e)}createMediaElementSource(e){return q(ih(this._context),`Not available if OfflineAudioContext`),this._context.createMediaElementSource(e)}createMediaStreamDestination(){return q(ih(this._context),`Not available if OfflineAudioContext`),this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){q(!this._initialized,`The listener cannot be set after initialization.`),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){q(!this._initialized,`The transport cannot be set after initialization.`),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){q(!this._initialized,`Draw cannot be set after initialization.`),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){q(!this._initialized,`The destination cannot be set after initialization.`),this._destination=e}createAudioWorkletNode(e,t){return Qm(this.rawContext,e,t)}addAudioWorkletModule(e){return J(this,void 0,void 0,function*(){q(K(this.rawContext.audioWorklet),`AudioWorkletNode is only available in a secure context (https or localhost)`),this._workletPromise||=this.rawContext.audioWorklet.addModule(e),yield this._workletPromise})}workletsAreReady(){return J(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get lookAhead(){return this._lookAhead}set lookAhead(e){this._lookAhead=e,this.updateInterval=e?e/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return ih(this._context)?this._context.resume():Promise.resolve()}close(){return J(this,void 0,void 0,function*(){ih(this._context)&&this.state!==`closed`&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&Th(this)})}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{let t=this._context.createBuffer(1,128,this._context.sampleRate),n=t.getChannelData(0);for(let t=0;tthis._constants[e].disconnect()),this.close(),this}_timeoutLoop(){let e=this.now();this._timeouts.forEachBefore(e,e=>{e.callback(),this._timeouts.remove(e)})}setTimeout(e,t){this._timeoutIds++;let n=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:n+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach(t=>{t.id===e&&this._timeouts.remove(t)}),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){let n=++this._timeoutIds,r=()=>{let i=this.now();this._timeouts.add({callback:()=>{e(),r()},id:n,time:i+t})};return r(),n}},kh=class extends Dh{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,n){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,n){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e){return J(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}};function X(e,t){Im(t)?t.forEach(t=>X(e,t)):Object.defineProperty(e,t,{enumerable:!0,writable:!1})}function Ah(e,t){Im(t)?t.forEach(t=>Ah(e,t)):Object.defineProperty(e,t,{writable:!0})}var Z=()=>{},jh=class e extends fh{constructor(){super(),this.name=`ToneAudioBuffer`,this.onload=Z;let t=Y(e.getDefaults(),arguments,[`url`,`onload`,`onerror`]);this.reverse=t.reverse,this.onload=t.onload,Lm(t.url)?this.load(t.url).catch(t.onerror):t.url&&this.set(t.url)}static getDefaults(){return{onerror:Z,onload:Z,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:Fh().sampleRate}set(t){return t instanceof e?t.loaded?this._buffer=t.get():t.onload=()=>{this.set(t),this.onload(this)}:this._buffer=t,this._reversed&&this._reverse(),this}get(){return this._buffer}load(t){return J(this,void 0,void 0,function*(){let n=e.load(t).then(e=>{this.set(e),this.onload(this)});e.downloads.push(n);try{yield n}finally{let t=e.downloads.indexOf(n);e.downloads.splice(t,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){let t=Im(e)&&e[0].length>0,n=t?e.length:1,r=t?e[0].length:e.length,i=Fh(),a=i.createBuffer(n,r,i.sampleRate),o=!t&&n===1?[e]:e;for(let e=0;ee/t),this.fromArray(e)}return this}toArray(e){if(Nm(e))return this.getChannelData(e);if(this.numberOfChannels===1)return this.toArray(0);{let e=[];for(let t=0;t0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(t){return new e().fromArray(t)}static fromUrl(t){return J(this,void 0,void 0,function*(){return yield new e().load(t)})}static load(t){return J(this,void 0,void 0,function*(){let n=e.baseUrl===``||e.baseUrl.endsWith(`/`)?e.baseUrl:e.baseUrl+`/`,r=yield fetch(n+t);if(!r.ok)throw Error(`could not load url: ${t}`);let i=yield r.arrayBuffer();return yield Fh().decodeAudioData(i)})}static supportsType(e){let t=e.split(`.`),n=t[t.length-1];return document.createElement(`audio`).canPlayType(`audio/`+n)!==``}static loaded(){return J(this,void 0,void 0,function*(){for(yield Promise.resolve();e.downloads.length;)yield e.downloads[0]})}};jh.baseUrl=``,jh.downloads=[];var Mh=class extends Oh{constructor(){super({clockSource:`offline`,context:rh(arguments[0])?arguments[0]:Ym(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:rh(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name=`OfflineContext`,this._currentTime=0,this.isOffline=!0,this._duration=rh(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return J(this,void 0,void 0,function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit(`tick`),this._currentTime+=128/this.sampleRate,t++;let n=Math.floor(this.sampleRate/128);e&&t%n===0&&(yield new Promise(e=>setTimeout(e,1)))}})}render(){return J(this,arguments,void 0,function*(e=!0){return yield this.workletsAreReady(),yield this._renderClock(e),new jh(yield this._context.startRendering())})}close(){return Promise.resolve()}},Nh=new kh,Ph=Nh;function Fh(){return Ph===Nh&&Zm&&Ih(new Oh),Ph}function Ih(e,t=!1){t&&Ph.dispose(),Ph=ih(e)?new Oh(e):rh(e)?new Mh(e):e}if(Xm&&!Xm.TONE_SILENCE_LOGGING){let e=` * Tone.js v${ws} * `;console.log(`%c${e}`,`background: #000; color: #fff`)}function Lh(e){return 10**(e/20)}function Rh(e){return Math.log(e)/Math.LN10*20}function zh(e){return 2**(e/12)}var Bh=440;function Vh(){return Bh}function Hh(e){Bh=e}function Uh(e){return Math.round(Wh(e))}function Wh(e){return 69+12*Math.log2(e/Bh)}function Gh(e){return Bh*2**((e-69)/12)}var Kh=class e extends fh{constructor(e,t,n){super(),this.defaultUnits=`s`,this._val=t,this._units=n,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{let n=parseInt(e,10),r=t===`.`?1.5:1;return n===1?this._beatsToUnits(this._getTimeSignature())*r:this._beatsToUnits(4/n)*r},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{let t=parseInt(e,10);return this._beatsToUnits(8/(Math.floor(t)*3))},regexp:/^(\d+)t$/i},tr:{method:(e,t,n)=>{let r=0;return e&&e!==`0`&&(r+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!==`0`&&(r+=this._beatsToUnits(parseFloat(t))),n&&n!==`0`&&(r+=this._beatsToUnits(parseFloat(n)/4)),r},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof e&&this.fromType(this._val),jm(this._val))return this._noArg();if(Lm(this._val)&&jm(this._units)){for(let e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(Pm(this._val)){let e=0;for(let t in this._val)if(K(this._val[t])){let n=this._val[t],r=new this.constructor(this.context,t).valueOf()*n;e+=r}return e}if(K(this._units)){let e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}else if(Lm(this._val))return parseFloat(this._val);else return this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case`s`:this._val=e.toSeconds();break;case`i`:this._val=e.toTicks();break;case`hz`:this._val=e.toFrequency();break;case`midi`:this._val=e.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}},qh=class e extends Kh{constructor(){super(...arguments),this.name=`TimeClass`}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:t=>{let n=new e(this.context,t).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(n))},regexp:/^@(.+)/}})}quantize(e,t=1){let n=new this.constructor(this.context,e).valueOf(),r=this.valueOf();return r+(Math.round(r/n)*n-r)*t}toNotation(){let t=this.toSeconds(),n=[`1m`];for(let e=1;e<9;e++){let t=2**e;n.push(t+`n.`),n.push(t+`n`),n.push(t+`t`)}n.push(`0`);let r=n[0],i=new e(this.context,n[0]).toSeconds();return n.forEach(n=>{let a=new e(this.context,n).toSeconds();Math.abs(a-t)3&&(r=parseFloat(parseFloat(i).toFixed(3))),[n,t,r].join(`:`)}toTicks(){let e=this._beatsToUnits(1);return this.valueOf()/e*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return Uh(this.toFrequency())}_now(){return this.context.now()}},Jh=class e extends qh{constructor(){super(...arguments),this.name=`Frequency`,this.defaultUnits=`hz`}static get A4(){return Vh()}static set A4(e){Hh(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(t){return this.defaultUnits===`midi`?t:e.mtof(t)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(t,n){let r=Yh[t.toLowerCase()]+(parseInt(n,10)+1)*12;return this.defaultUnits===`midi`?r:e.mtof(r)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,n){let r=1;return e&&e!==`0`&&(r*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!==`0`&&(r*=this._beatsToUnits(parseFloat(t))),n&&n!==`0`&&(r*=this._beatsToUnits(parseFloat(n)/4)),r}}})}transpose(t){return new e(this.context,this.valueOf()*zh(t))}harmonize(e){return e.map(e=>this.transpose(e))}toMidi(){return Uh(this.valueOf())}toNote(){let t=this.toFrequency(),n=Math.log2(t/e.A4),r=Math.round(12*n)+57,i=Math.floor(r/12);return i<0&&(r+=-12*i),Xh[r%12]+i.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){let e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(e*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return Gh(e)}static ftom(e){return Uh(e)}},Yh={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},Xh=[`C`,`C#`,`D`,`D#`,`E`,`F`,`F#`,`G`,`G#`,`A`,`A#`,`B`],Zh=class extends qh{constructor(){super(...arguments),this.name=`TransportTime`}_now(){return this.context.transport.seconds}},Qh=class e extends fh{constructor(){super();let t=Y(e.getDefaults(),arguments,[`context`]);this.defaultContext?this.context=this.defaultContext:this.context=t.context}static getDefaults(){return{context:Fh()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return Wm(e),new qh(this.context,e).toSeconds()}toFrequency(e){return new Jh(this.context,e).toFrequency()}toTicks(e){return new Zh(this.context,e).toTicks()}_getPartialProperties(e){let t=this.get();return Object.keys(t).forEach(n=>{jm(e[n])&&delete t[n]}),t}get(){let t=lh(this);return Object.keys(t).forEach(n=>{if(Reflect.has(this,n)){let r=this[n];K(r)&&K(r.value)&&K(r.setValueAtTime)?t[n]=r.value:r instanceof e?t[n]=r._getPartialProperties(t[n]):Im(r)||Nm(r)||Lm(r)||Fm(r)?t[n]=r:delete t[n]}}),t}set(t){return Object.keys(t).forEach(n=>{Reflect.has(this,n)&&K(this[n])&&(this[n]&&K(this[n].value)&&K(this[n].setValueAtTime)?this[n].value!==t[n]&&(this[n].value=t[n]):this[n]instanceof e?this[n].set(t[n]):this[n]=t[n])}),this}},$h=class extends yh{constructor(e=`stopped`){super(),this.name=`StateTimeline`,this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){let t=this.get(e);return t===null?this._initial:t.state}setStateAtTime(e,t,n){return zm(t,0),this.add(Object.assign({},n,{state:e,time:t})),this}getLastState(e,t){let n=this._search(t);for(let t=n;t>=0;t--){let n=this._timeline[t];if(n.state===e)return n}}getNextState(e,t){let n=this._search(t);if(n!==-1)for(let t=n;t0,`timeConstant must be a number greater than 0`);let i=this.toSeconds(t);return this._assertRange(r),q(isFinite(r)&&isFinite(i),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(e)}, ${JSON.stringify(t)}`),this._events.add({constant:n,time:i,type:`setTargetAtTime`,value:r}),this.log(this.units,`setTargetAtTime`,e,i,n),this._param.setTargetAtTime(r,i,n),this}setValueCurveAtTime(e,t,n,r=1){n=this.toSeconds(n),t=this.toSeconds(t);let i=this._fromType(e[0])*r;this.setValueAtTime(this._toType(i),t);let a=n/(e.length-1);for(let n=1;n{t.type===`cancelScheduledValues`?e.cancelScheduledValues(t.time):t.type===`setTargetAtTime`?e.setTargetAtTime(t.value,t.time,t.constant):e[t.type](t.value,t.time)}),this}setParam(e){q(this._swappable,`The Param must be assigned as 'swappable' in the constructor`);let t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,n,r,i){return n+(t-n)*Math.exp(-(i-e)/r)}_linearInterpolate(e,t,n,r,i){return t+(r-t)*((i-e)/(n-e))}_exponentialInterpolate(e,t,n,r,i){return t*(r/t)**+((i-e)/(n-e))}},$=class e extends Qh{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return K(this.input)?th(this.input)||this.input instanceof Q?1:this.input.numberOfInputs:0}get numberOfOutputs(){return K(this.output)?this.output.numberOfOutputs:0}_isAudioNode(t){return K(t)&&(t instanceof e||nh(t))}_getInternalNodes(){let e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach(t=>{t.channelCount=e.channelCount,t.channelCountMode=e.channelCountMode,t.channelInterpretation=e.channelInterpretation})}_getChannelProperties(){let e=this._getInternalNodes();q(e.length>0,`ToneAudioNode does not have any internal nodes`);let t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){let t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){let t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){let t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e,t=0,n=0){return tg(this,e,t,n),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return qm(`toMaster() has been renamed toDestination()`),this.toDestination()}disconnect(e,t=0,n=0){return ng(this,e,t,n),this}chain(...e){return eg(this,...e),this}fan(...e){return e.forEach(e=>this.connect(e)),this}dispose(){return super.dispose(),K(this.input)&&(this.input instanceof e?this.input.dispose():nh(this.input)&&this.input.disconnect()),K(this.output)&&(this.output instanceof e?this.output.dispose():nh(this.output)&&this.output.disconnect()),this._internalChannels=[],this}};function eg(...e){let t=e.shift();e.reduce((e,t)=>(e instanceof $?e.connect(t):nh(e)&&tg(e,t),t),t)}function tg(e,t,n=0,r=0){for(q(K(e),`Cannot connect from undefined node`),q(K(t),`Cannot connect to undefined node`),(t instanceof $||nh(t))&&q(t.numberOfInputs>0,`Cannot connect to node with no inputs`),q(e.numberOfOutputs>0,`Cannot connect from node with no outputs`);t instanceof $||t instanceof Q;)K(t.input)&&(t=t.input);for(;e instanceof $;)K(e.output)&&(e=e.output);th(t)?e.connect(t,n):e.connect(t,n,r)}function ng(e,t,n=0,r=0){if(K(t))for(;t instanceof $;)t=t.input;for(;!nh(e);)K(e.output)&&(e=e.output);th(t)?e.disconnect(t,n):nh(t)?e.disconnect(t,n,r):e.disconnect()}var rg=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`gain`,`units`]);super(t),this.name=`Gain`,this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode,this.gain=new Q({context:this.context,convert:t.convert,param:this._gainNode.gain,units:t.units,value:t.gain,minValue:t.minValue,maxValue:t.maxValue}),X(this,`gain`)}static getDefaults(){return Object.assign($.getDefaults(),{convert:!0,gain:1,units:`gain`})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}},ig=class extends ${constructor(e){super(e),this.onended=Z,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new rg({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(e){let t=this.toSeconds(e);return this._startTime!==-1&&t>=this._startTime&&(this._stopTime===-1||t<=this._stopTime)?`started`:`stopped`},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign($.getDefaults(),{curve:`linear`,fadeIn:0,fadeOut:0,onended:Z})}_startGain(e,t=1){q(this._startTime===-1,`Source cannot be started more than once`);let n=this.toSeconds(this._fadeIn);return this._startTime=e+n,this._startTime=Math.max(this._startTime,this.context.currentTime),n>0?(this._gainNode.gain.setValueAtTime(0,e),this._curve===`linear`?this._gainNode.gain.linearRampToValueAtTime(t,e+n):this._gainNode.gain.exponentialApproachValueAtTime(t,e,n)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log(`stop`,e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){q(this._startTime!==-1,`'start' must be called before 'stop'`),this.cancelStop();let t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.now()),t>0?this._curve===`linear`?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{let e=this._curve===`exponential`?t*2:0;this._stopSource(this.now()+e),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==Z&&(this.onended(this),this.onended=Z,!this.context.isOffline)){let e=()=>this.dispose();typeof requestIdleCallback<`u`?requestIdleCallback(e):setTimeout(e,10)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log(`cancelStop`),q(this._startTime!==-1,`Source is not started`),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=Z,this}},ag=class e extends ig{constructor(){let t=Y(e.getDefaults(),arguments,[`offset`]);super(t),this.name=`ToneConstantSource`,this._source=this.context.createConstantSource(),tg(this._source,this._gainNode),this.offset=new Q({context:this.context,convert:t.convert,param:this._source.offset,units:t.units,value:t.offset,minValue:t.minValue,maxValue:t.maxValue})}static getDefaults(){return Object.assign(ig.getDefaults(),{convert:!0,offset:1,units:`number`})}start(e){let t=this.toSeconds(e);return this.log(`start`,t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),this.state===`started`&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}},og=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`value`,`units`]);super(t),this.name=`Signal`,this.override=!0,this.output=this._constantSource=new ag({context:this.context,convert:t.convert,offset:t.value,units:t.units,minValue:t.minValue,maxValue:t.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign($.getDefaults(),{convert:!0,units:`number`,value:0})}connect(e,t=0,n=0){return sg(this,e,t,n),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,n){return this._param.exponentialRampTo(e,t,n),this}linearRampTo(e,t,n){return this._param.linearRampTo(e,t,n),this}targetRampTo(e,t,n){return this._param.targetRampTo(e,t,n),this}exponentialApproachValueAtTime(e,t,n){return this._param.exponentialApproachValueAtTime(e,t,n),this}setTargetAtTime(e,t,n){return this._param.setTargetAtTime(e,t,n),this}setValueCurveAtTime(e,t,n,r){return this._param.setValueCurveAtTime(e,t,n,r),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,n){return this._param.rampTo(e,t,n),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}};function sg(e,t,n,r){(t instanceof Q||th(t)||t instanceof og&&t.override)&&(t.cancelScheduledValues(0),t.setValueAtTime(0,0),t instanceof og&&(t.overridden=!0)),tg(e,t,n,r)}var cg=class e extends Q{constructor(){let t=Y(e.getDefaults(),arguments,[`value`]);super(t),this.name=`TickParam`,this._events=new yh(1/0),this._multiplier=1,this._multiplier=t.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:`setValueAtTime`,value:this._fromType(t.value)}),this.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(Q.getDefaults(),{multiplier:1,units:`hertz`,value:1})}setTargetAtTime(e,t,n){t=this.toSeconds(t),this.setRampPoint(t);let r=this._fromType(e),i=this._events.get(t),a=Math.round(Math.max(1/n,1));for(let e=0;e<=a;e++){let a=n*e+t,o=this._exponentialApproach(i.time,i.value,r,n,a);this.linearRampToValueAtTime(this._toType(o),a)}return this}setValueAtTime(e,t){let n=this.toSeconds(t);super.setValueAtTime(e,t);let r=this._events.get(n),i=this._events.previousEvent(r),a=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(a,0),this}linearRampToValueAtTime(e,t){let n=this.toSeconds(t);super.linearRampToValueAtTime(e,t);let r=this._events.get(n),i=this._events.previousEvent(r),a=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(a,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);let n=this._fromType(e),r=this._events.get(t),i=Math.round(Math.max((t-r.time)*10,1)),a=(t-r.time)/i;for(let e=0;e<=i;e++){let i=a*e+r.time,o=this._exponentialInterpolate(r.time,r.value,t,n,i);this.linearRampToValueAtTime(this._toType(o),i)}return this}_getTicksUntilEvent(e,t){if(e===null)e={ticks:0,time:0,type:`setValueAtTime`,value:0};else if(jm(e.ticks)){let t=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(t,e.time)}let n=this._fromType(this.getValueAtTime(e.time)),r=this._fromType(this.getValueAtTime(t)),i=this._events.get(t);return i&&i.time===t&&i.type===`setValueAtTime`&&(r=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(n+r)+e.ticks}getTicksAtTime(e){let t=this.toSeconds(e),n=this._events.get(t);return Math.max(this._getTicksUntilEvent(n,t),0)}getDurationOfTicks(e,t){let n=this.toSeconds(t),r=this.getTicksAtTime(t);return this.getTimeOfTick(r+e)-n}getTimeOfTick(e){let t=this._events.get(e,`ticks`),n=this._events.getAfter(e,`ticks`);if(t&&t.ticks===e)return t.time;if(t&&n&&n.type===`linearRampToValueAtTime`&&t.value!==n.value){let r=this._fromType(this.getValueAtTime(t.time)),i=(this._fromType(this.getValueAtTime(n.time))-r)/(n.time-t.time),a=Math.sqrt(r**2-2*i*(t.ticks-e)),o=(-r+a)/i,s=(-r-a)/i;return(o>0?o:s)+t.time}else if(t)return t.value===0?1/0:t.time+(e-t.ticks)/t.value;else return e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){let n=this.toSeconds(t),r=this.toSeconds(e),i=this.getTicksAtTime(n);return this.getTicksAtTime(n+r)-i}_fromType(e){return this.units===`bpm`&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return this.units===`bpm`&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){let t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}},lg=class e extends og{constructor(){let t=Y(e.getDefaults(),arguments,[`value`]);super(t),this.name=`TickSignal`,this.input=this._param=new cg({context:this.context,convert:t.convert,multiplier:t.multiplier,param:this._constantSource.offset,units:t.units,value:t.value})}static getDefaults(){return Object.assign(og.getDefaults(),{multiplier:1,units:`hertz`,value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}},ug=class e extends Qh{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`]);super(t),this.name=`TickSource`,this._state=new $h,this._tickOffset=new yh,this._ticksAtTime=new yh,this._secondsAtTime=new yh,this.frequency=new lg({context:this.context,units:t.units,value:t.frequency}),X(this,`frequency`),this._state.setStateAtTime(`stopped`,0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:`hertz`},Qh.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){let n=this.toSeconds(e);return this._state.getValueAtTime(n)!==`started`&&(this._state.setStateAtTime(`started`,n),K(t)&&this.setTicksAtTime(t,n),this._ticksAtTime.cancel(n),this._secondsAtTime.cancel(n)),this}stop(e){let t=this.toSeconds(e);if(this._state.getValueAtTime(t)===`stopped`){let e=this._state.get(t);e&&e.time>0&&(this._tickOffset.cancel(e.time),this._state.cancel(e.time))}return this._state.cancel(t),this._state.setStateAtTime(`stopped`,t),this.setTicksAtTime(0,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}pause(e){let t=this.toSeconds(e);return this._state.getValueAtTime(t)===`started`&&(this._state.setStateAtTime(`paused`,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t)),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this._ticksAtTime.cancel(e),this._secondsAtTime.cancel(e),this}getTicksAtTime(e){let t=this.toSeconds(e),n=this._state.getLastState(`stopped`,t),r=this._ticksAtTime.get(t),i={state:`paused`,time:t};this._state.add(i);let a=r||n,o=r?r.ticks:0,s=null;return this._state.forEachBetween(a.time,t+this.sampleTime,e=>{let t=a.time,n=this._tickOffset.get(e.time);n&&n.time>=a.time&&(o=n.ticks,t=n.time),a.state===`started`&&e.state!==`started`&&(o+=this.frequency.getTicksAtTime(e.time)-this.frequency.getTicksAtTime(t),e.time!==i.time&&(s={state:e.state,time:e.time,ticks:o})),a=e}),this._state.remove(i),s&&this._ticksAtTime.add(s),o}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){let t=this.now(),n=this.frequency.timeToTicks(e,t);this.setTicksAtTime(n,t)}getSecondsAtTime(e){e=this.toSeconds(e);let t=this._state.getLastState(`stopped`,e),n={state:`paused`,time:e};this._state.add(n);let r=this._secondsAtTime.get(e),i=r||t,a=r?r.seconds:0,o=null;return this._state.forEachBetween(i.time,e+this.sampleTime,e=>{let t=i.time,r=this._tickOffset.get(e.time);r&&r.time>=i.time&&(a=r.seconds,t=r.time),i.state===`started`&&e.state!==`started`&&(a+=e.time-t,e.time!==n.time&&(o={state:e.state,time:e.time,seconds:a})),i=e}),this._state.remove(n),o&&this._secondsAtTime.add(o),a}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e,t=this.now()){let n=this._tickOffset.get(t),r=this._state.get(t),i=Math.max(n.time,r.time),a=this.frequency.getTicksAtTime(i)+e-n.ticks;return this.frequency.getTimeOfTick(a)}forEachTickBetween(e,t,n){let r=this._state.get(e);this._state.forEachBetween(e,t,t=>{r&&r.state===`started`&&t.state!==`started`&&this.forEachTickBetween(Math.max(r.time,e),t.time-this.sampleTime,n),r=t});let i=null;if(r&&r.state===`started`){let a=Math.max(r.time,e),o=this.frequency.getTicksAtTime(a),s=o-this.frequency.getTicksAtTime(r.time),c=Math.ceil(s)-s;c=_h(c,1)?0:c;let l=this.frequency.getTimeOfTick(o+c);for(;l{switch(e.state){case`started`:let t=this._tickSource.getTicksAtTime(e.time);this.emit(`start`,e.time,t);break;case`stopped`:e.time!==0&&this.emit(`stop`,e.time);break;case`paused`:this.emit(`pause`,e.time);break}}),this._tickSource.forEachTickBetween(e,t,(e,t)=>{this.callback(e,t)}))}getStateAtTime(e){let t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off(`tick`,this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}};Eh.mixin(dg);var fg=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`volume`]);super(t),this.name=`Volume`,this.input=this.output=new rg({context:this.context,gain:t.volume,units:`decibels`}),this.volume=this.output.gain,X(this,`volume`),this._unmutedVolume=t.volume,this.mute=t.mute}static getDefaults(){return Object.assign($.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}},pg=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.name=`Destination`,this.input=new fg({context:this.context}),this.output=new rg({context:this.context}),this.volume=this.input.volume,eg(this.input,this.output,this.context.rawContext.destination),this.mute=t.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign($.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(...e){return this.input.disconnect(),e.unshift(this.input),e.push(this.output),eg(...e),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};xh(e=>{e.destination=new pg({context:e})}),wh(e=>{e.destination.dispose()});var mg=class extends ${constructor(){super(...arguments),this.name=`Listener`,this.positionX=new Q({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Q({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Q({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Q({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Q({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Q({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Q({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Q({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Q({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign($.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}};xh(e=>{e.listener=new mg({context:e})}),wh(e=>{e.listener.dispose()});var hg=class e extends fh{constructor(){super(),this.name=`ToneAudioBuffers`,this._buffers=new Map,this._loadingCount=0;let t=Y(e.getDefaults(),arguments,[`urls`,`onload`,`baseUrl`],`urls`);this.baseUrl=t.baseUrl,Object.keys(t.urls).forEach(e=>{this._loadingCount++;let n=t.urls[e];this.add(e,n,this._bufferLoaded.bind(this,t.onload),t.onerror)})}static getDefaults(){return{baseUrl:``,onerror:Z,onload:Z,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return q(this.has(e),`ToneAudioBuffers has no buffer named: ${e}`),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,this._loadingCount===0&&e&&e()}get loaded(){return Array.from(this._buffers).every(([e,t])=>t.loaded)}add(e,t,n=Z,r=Z){return Lm(t)?(this.baseUrl&&t.trim().substring(0,11).toLowerCase()===`data:audio/`&&(this.baseUrl=``),this._buffers.set(e.toString(),new jh(this.baseUrl+t,n,r))):this._buffers.set(e.toString(),new jh(t,n,r)),this}dispose(){return super.dispose(),this._buffers.forEach(e=>e.dispose()),this._buffers.clear(),this}},gg=class extends Zh{constructor(){super(...arguments),this.name=`Ticks`,this.defaultUnits=`i`}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}},_g=class extends Qh{constructor(){super(...arguments),this.name=`Draw`,this.expiration=.25,this.anticipation=.008,this._events=new yh,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){let e=this.context.currentTime;this._events.forEachBefore(e+this.anticipation,t=>{e-t.time<=this.expiration&&t.callback(),this._events.remove(t)}),this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}};xh(e=>{e.draw=new _g({context:e})}),wh(e=>{e.draw.dispose()});var vg=class extends fh{constructor(){super(...arguments),this.name=`IntervalTimeline`,this._root=null,this._length=0}add(e){q(K(e.time),`Events must have a time property`),q(K(e.duration),`Events must have a duration parameter`),e.time=e.time.valueOf();let t=new yg(e.time,e.time+e.duration,e);for(this._root===null?this._root=t:this._root.insert(t),this._length++;t!==null;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(this._root!==null){let t=[];this._root.search(e.time,t);for(let n of t)if(n.event===e){this._removeNode(n),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,e=>this.remove(e)),this}_setRoot(e){this._root=e,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(e,t){e.parent===null?this._setRoot(t):(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent))}_removeNode(e){if(e.left===null&&e.right===null)this._replaceNodeInParent(e,null);else if(e.right===null)this._replaceNodeInParent(e,e.left);else if(e.left===null)this._replaceNodeInParent(e,e.right);else{let t=e.getBalance(),n,r=null;if(t>0)if(e.left.right===null)n=e.left,n.right=e.right,r=n;else{for(n=e.left.right;n.right!==null;)n=n.right;n.parent&&(n.parent.right=n.left,r=n.parent,n.left=e.left,n.right=e.right)}else if(e.right.left===null)n=e.right,n.left=e.left,r=n;else{for(n=e.right.left;n.left!==null;)n=n.left;n.parent&&(n.parent.left=n.right,r=n.parent,n.left=e.left,n.right=e.right)}e.parent===null?this._setRoot(n):e.isLeftChild()?e.parent.left=n:e.parent.right=n,r&&this._rebalance(r)}e.dispose()}_rotateLeft(e){let t=e.parent,n=e.isLeftChild(),r=e.right;r&&(e.right=r.left,r.left=e),t===null?this._setRoot(r):n?t.left=r:t.right=r}_rotateRight(e){let t=e.parent,n=e.isLeftChild(),r=e.left;r&&(e.left=r.right,r.right=e),t===null?this._setRoot(r):n?t.left=r:t.right=r}_rebalance(e){let t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(this._root!==null){let t=[];if(this._root.search(e,t),t.length>0){let e=t[0];for(let n=1;ne.low&&(e=t[n]);return e.event}}return null}forEach(e){if(this._root!==null){let t=[];this._root.traverse(e=>t.push(e)),t.forEach(t=>{t.event&&e(t.event)})}return this}forEachAtTime(e,t){if(this._root!==null){let n=[];this._root.search(e,n),n.forEach(e=>{e.event&&t(e.event)})}return this}forEachFrom(e,t){if(this._root!==null){let n=[];this._root.searchAfter(e,n),n.forEach(e=>{e.event&&t(e.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(e=>e.dispose()),this._root=null,this}},yg=class{constructor(e,t,n){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=n,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?this.left===null?this.left=e:this.left.insert(e):this.right===null?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(this.left!==null&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),!(this.low>e)&&this.right!==null&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),this.left!==null&&this.left.searchAfter(e,t)),this.right!==null&&this.right.searchAfter(e,t)}traverse(e){e(this),this.left!==null&&this.left.traverse(e),this.right!==null&&this.right.traverse(e)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right===null?this.left===null?this.height=0:this.height=this.left.height+1:this.height=this.right.height+1}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return this.left!==null&&this.right!==null?e=this.left.height-this.right.height:this.left===null?this.right!==null&&(e=-(this.right.height+1)):e=this.left.height+1,e}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}},bg=class extends fh{constructor(e){super(),this.name=`TimelineValue`,this._timeline=new yh({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){let t=this._timeline.get(e);return t?t.value:this._initialValue}},xg=class e extends ${constructor(){super(Y(e.getDefaults(),arguments,[`context`]))}connect(e,t=0,n=0){return sg(this,e,t,n),this}},Sg=class e extends xg{constructor(){let t=Y(e.getDefaults(),arguments,[`mapping`,`length`]);super(t),this.name=`WaveShaper`,this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper,Im(t.mapping)||t.mapping instanceof Float32Array?this.curve=Float32Array.from(t.mapping):Mm(t.mapping)&&this.setMap(t.mapping,t.length)}static getDefaults(){return Object.assign(og.getDefaults(),{length:1024})}setMap(e,t=1024){let n=new Float32Array(t);for(let r=0,i=t;rt.includes(e)),`oversampling must be either 'none', '2x', or '4x'`),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}},Cg=class e extends xg{constructor(){let t=Y(e.getDefaults(),arguments,[`value`]);super(t),this.name=`Pow`,this._exponentScaler=this.input=this.output=new Sg({context:this.context,mapping:this._expFunc(t.value),length:8192}),this._exponent=t.value}static getDefaults(){return Object.assign(xg.getDefaults(),{value:1})}_expFunc(e){return t=>Math.abs(t)**+e}get value(){return this._exponent}set value(e){this._exponent=e,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}},wg=class e{constructor(t,n){this.id=e._eventId++,this._remainderTime=0;let r=Object.assign(e.getDefaults(),n);this.transport=t,this.callback=r.callback,this._once=r.once,this.time=Math.floor(r.time),this._remainderTime=r.time-this.time}static getDefaults(){return{callback:Z,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(e){if(this.callback){let t=this.transport.bpm.getDurationOfTicks(1,e);this.callback(e+this._remainderTime*t),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}};wg._eventId=0;var Tg=class e extends wg{constructor(t,n){super(t,n),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);let r=Object.assign(e.getDefaults(),n);this.duration=r.duration,this._interval=r.interval,this._nextTick=r.time,this.transport.on(`start`,this._boundRestart),this.transport.on(`loopStart`,this._boundRestart),this.transport.on(`ticks`,this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},wg.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvent(){return gh(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new gg(this.context,this._nextTick).toSeconds()):-1}_createEvents(e){gh(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new gg(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;let t=this.transport.getTicksAtTime(e);mh(t,this.time)&&(this._nextTick=this.floatTime+Math.ceil((t-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off(`start`,this._boundRestart),this.transport.off(`loopStart`,this._boundRestart),this.transport.off(`ticks`,this._boundRestart),this}},Eg=class e extends Qh{constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.name=`Transport`,this._loop=new bg(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new yh,this._repeatedEvents=new vg,this._syncedSignals=[],this._swingAmount=0,this._ppq=t.ppq,this._clock=new dg({callback:this._processTick.bind(this),context:this.context,frequency:0,units:`bpm`}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=t.ppq,this.bpm.setValueAtTime(t.bpm,0),X(this,`bpm`),this._timeSignature=t.timeSignature,this._swingTicks=t.ppq/2}static getDefaults(){return Object.assign(Qh.getDefaults(),{bpm:120,loopEnd:`4m`,loopStart:0,ppq:192,swing:0,swingSubdivision:`8n`,timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit(`loopEnd`,e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit(`loopStart`,e,this._clock.getSecondsAtTime(e)),this.emit(`loop`,e)),this._swingAmount>0&&t%this._ppq!==0&&t%(this._swingTicks*2)!=0){let n=t%(this._swingTicks*2)/(this._swingTicks*2),r=Math.sin(n*Math.PI)*this._swingAmount;e+=new gg(this.context,this._swingTicks*2/3).toSeconds()*r}Um(!0),this._timeline.forEachAtTime(t,t=>t.invoke(e)),Um(!1)}schedule(e,t){let n=new wg(this,{callback:e,time:new Zh(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}scheduleRepeat(e,t,n,r=1/0){let i=new Tg(this,{callback:e,duration:new qh(this.context,r).toTicks(),interval:new qh(this.context,t).toTicks(),time:new Zh(this.context,n).toTicks()});return this._addEvent(i,this._repeatedEvents)}scheduleOnce(e,t){let n=new wg(this,{callback:e,once:!0,time:new Zh(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){let t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(e=0){let t=this.toTicks(e);return this._timeline.forEachFrom(t,e=>this.clear(e.id)),this._repeatedEvents.forEachFrom(t,e=>this.clear(e.id)),this}_bindClockEvents(){this._clock.on(`start`,(e,t)=>{t=new gg(this.context,t).toSeconds(),this.emit(`start`,e,t)}),this._clock.on(`stop`,e=>{this.emit(`stop`,e)}),this._clock.on(`pause`,e=>{this.emit(`pause`,e)})}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){this.context.resume();let n;return K(t)&&(n=this.toTicks(t)),this._clock.start(e,n),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)===`started`?this.stop(e):this.start(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){Im(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new qh(this.context,this._loopStart,`i`).toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new qh(this.context,this._loopEnd,`i`).toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new gg(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){let e=this.now(),t=this._clock.getTicksAtTime(e);return new gg(this.context,t).toBarsBeatsSixteenths()}set position(e){let t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){let t=this.now(),n=this._clock.frequency.timeToTicks(e,t);this.ticks=n}get progress(){if(this.loop){let e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){let t=this.now();if(this.state===`started`){let n=this._clock.getTicksAtTime(t),r=t+this._clock.frequency.getDurationOfTicks(Math.ceil(n)-n,t);this.emit(`stop`,r),this._clock.setTicksAtTime(e,r),this.emit(`start`,r,this._clock.getSecondsAtTime(r))}else this.emit(`ticks`,t),this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return this._clock.getTicksAtTime(e)}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),this.state!==`started`)return 0;{let t=this.now(),n=this.getTicksAtTime(t),r=e-n%e;return this._clock.nextTickTime(r,t)}}syncSignal(e,t){let n=this.now(),r=this.bpm,i=1/(60/r.getValueAtTime(n)/this.PPQ),a=[];if(e.units===`time`){let e=1/64/i,t=new rg(e),n=new Cg(-1),o=new rg(e);r.chain(t,n,o),r=o,i=1/i,a=[t,n,o]}t||=e.getValueAtTime(n)===0?0:e.getValueAtTime(n)/i;let o=new rg(t);return r.connect(o),o.connect(e._param),a.push(o),this._syncedSignals.push({initial:e.value,nodes:a,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){let n=this._syncedSignals[t];n.signal===e&&(n.nodes.forEach(e=>e.dispose()),n.signal.value=n.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),Ah(this,`bpm`),this._timeline.dispose(),this._repeatedEvents.dispose(),this}};Eh.mixin(Eg),xh(e=>{e.transport=new Eg({context:e})}),wh(e=>{e.transport.dispose()});var Dg=class extends ${constructor(e){super(e),this.input=void 0,this._state=new $h(`stopped`),this._synced=!1,this._scheduled=[],this._syncedStart=Z,this._syncedStop=Z,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new fg({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,X(this,`volume`),this.onstop=e.onstop}static getDefaults(){return Object.assign($.getDefaults(),{mute:!1,onstop:Z,volume:0})}get state(){return this._synced?this.context.transport.state===`started`?this._state.getValueAtTime(this.context.transport.seconds):`stopped`:this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,n){let r=jm(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(r=this._clampToCurrentTime(r),!this._synced&&this._state.getValueAtTime(r)===`started`)q(mh(r,this._state.get(r).time),`Start time must be strictly greater than previous start time`),this._state.cancel(r),this._state.setStateAtTime(`started`,r),this.log(`restart`,r),this.restart(r,t,n);else if(this.log(`start`,r),this._state.setStateAtTime(`started`,r),this._synced){let e=this._state.get(r);e&&(e.offset=this.toSeconds(uh(t,0)),e.duration=n?this.toSeconds(n):void 0);let i=this.context.transport.schedule(e=>{this._start(e,t,n)},r);this._scheduled.push(i),this.context.transport.state===`started`&&this.context.transport.getSecondsAtTime(this.immediate())>r&&this._syncedStart(this.now(),this.context.transport.seconds)}else Bm(this.context),this._start(r,t,n);return this}stop(e){let t=jm(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),this._state.getValueAtTime(t)===`started`||K(this._state.getNextState(`started`,t))){if(this.log(`stop`,t),!this._synced)this._stop(t);else{let e=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(e)}this._state.cancel(t),this._state.setStateAtTime(`stopped`,t)}return this}restart(e,t,n){return e=this.toSeconds(e),this._state.getValueAtTime(e)===`started`&&(this._state.cancel(e),this._restart(e,t,n)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(mh(t,0)){let n=this._state.get(t);if(n&&n.state===`started`&&n.time!==t){let r=t-this.toSeconds(n.time),i;n.duration&&(i=this.toSeconds(n.duration)-r),this._start(e,this.toSeconds(n.offset)+r,i)}}},this._syncedStop=e=>{let t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(t)===`started`&&this._stop(e)},this.context.transport.on(`start`,this._syncedStart),this.context.transport.on(`loopStart`,this._syncedStart),this.context.transport.on(`stop`,this._syncedStop),this.context.transport.on(`pause`,this._syncedStop),this.context.transport.on(`loopEnd`,this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off(`stop`,this._syncedStop),this.context.transport.off(`pause`,this._syncedStop),this.context.transport.off(`loopEnd`,this._syncedStop),this.context.transport.off(`start`,this._syncedStart),this.context.transport.off(`loopStart`,this._syncedStart)),this._synced=!1,this._scheduled.forEach(e=>this.context.transport.clear(e)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=Z,this.unsync(),this._volume.dispose(),this._state.dispose(),this}},Og=class e extends ig{constructor(){let t=Y(e.getDefaults(),arguments,[`url`,`onload`]);super(t),this.name=`ToneBufferSource`,this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1,tg(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Q({context:this.context,param:this._source.playbackRate,units:`positive`,value:t.playbackRate}),this.loop=t.loop,this.loopStart=t.loopStart,this.loopEnd=t.loopEnd,this._buffer=new jh(t.url,t.onload,t.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(ig.getDefaults(),{url:new jh,loop:!1,loopEnd:0,loopStart:0,onload:Z,onerror:Z,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,n,r=1){q(this.buffer.loaded,`buffer is either not set or not loaded`);let i=this.toSeconds(e);this._startGain(i,r),t=this.loop?uh(t,this.loopStart):uh(t,0);let a=Math.max(this.toSeconds(t),0);if(this.loop){let e=this.toSeconds(this.loopEnd)||this.buffer.duration,t=this.toSeconds(this.loopStart),n=e-t;hh(a,e)&&(a=(a-t)%n+t),_h(a,this.buffer.duration)&&(a=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,gh(a,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(i,a)),K(n)){let e=this.toSeconds(n);e=Math.max(e,0),this.stop(i+e)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}};function kg(e,t){return J(this,void 0,void 0,function*(){let n=t/e.context.sampleRate,r=new Mh(1,n,e.context.sampleRate);return new e.constructor(Object.assign(e.get(),{frequency:2/n,detune:0,context:r})).toDestination().start(0),(yield r.render()).getChannelData(0)})}var Ag=class e extends ig{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`]);super(t),this.name=`ToneOscillatorNode`,this._oscillator=this.context.createOscillator(),this._internalChannels=[this._oscillator],tg(this._oscillator,this._gainNode),this.type=t.type,this.frequency=new Q({context:this.context,param:this._oscillator.frequency,units:`frequency`,value:t.frequency}),this.detune=new Q({context:this.context,param:this._oscillator.detune,units:`cents`,value:t.detune}),X(this,[`frequency`,`detune`])}static getDefaults(){return Object.assign(ig.getDefaults(),{detune:0,frequency:440,type:`sine`})}start(e){let t=this.toSeconds(e);return this.log(`start`,t),this._startGain(t),this._oscillator.start(t),this}_stopSource(e){this._oscillator.stop(e)}setPeriodicWave(e){return this._oscillator.setPeriodicWave(e),this}get type(){return this._oscillator.type}set type(e){this._oscillator.type=e}dispose(){return super.dispose(),this.state===`started`&&this.stop(),this._oscillator.disconnect(),this.frequency.dispose(),this.detune.dispose(),this}},jg=class e extends Dg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`]);super(t),this.name=`Oscillator`,this._oscillator=null,this.frequency=new og({context:this.context,units:`frequency`,value:t.frequency}),X(this,`frequency`),this.detune=new og({context:this.context,units:`cents`,value:t.detune}),X(this,`detune`),this._partials=t.partials,this._partialCount=t.partialCount,this._type=t.type,t.partialCount&&t.type!==`custom`&&(this._type=this.baseType+t.partialCount.toString()),this.phase=t.phase}static getDefaults(){return Object.assign(Dg.getDefaults(),{detune:0,frequency:440,partialCount:0,partials:[],phase:0,type:`sine`})}_start(e){let t=this.toSeconds(e),n=new Ag({context:this.context,onended:()=>this.onstop(this)});this._oscillator=n,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){let t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){let t=this.toSeconds(e);return this.log(`restart`,t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type===`custom`)return e._periodicWaveCache.find(e=>e.phase===this._phase&&ch(e.partials,this._partials));{let t=e._periodicWaveCache.find(e=>e.type===this._type&&e.phase===this._phase);return this._partialCount=t?t.partialCount:this._partialCount,t}}get type(){return this._type}set type(t){this._type=t;let n=[`sine`,`square`,`sawtooth`,`triangle`].indexOf(t)!==-1;if(this._phase===0&&n)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=t);else{let n=this._getCachedPeriodicWave();if(K(n)){let{partials:e,wave:t}=n;this._wave=t,this._partials=e,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{let[n,r]=this._getRealImaginary(t,this._phase),i=this.context.createPeriodicWave(n,r);this._wave=i,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),e._periodicWaveCache.push({imag:r,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:n,type:this._type,wave:this._wave}),e._periodicWaveCache.length>100&&e._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),``)}set baseType(e){this.partialCount&&this._type!==`custom`&&e!==`custom`?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){zm(e,0);let t=this._type,n=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(n&&(t=n[1]),this._type!==`custom`)e===0?this.type=t:this.type=t+e.toString();else{let t=new Float32Array(e);this._partials.forEach((e,n)=>t[n]=e),this._partials=Array.from(t),this.type=this._type}}_getRealImaginary(e,t){let n=4096/2,r=new Float32Array(n),i=new Float32Array(n),a=1;if(e===`custom`){if(a=this._partials.length+1,this._partialCount=this._partials.length,n=a,this._partials.length===0)return[r,i]}else{let t=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);t?(a=parseInt(t[2],10)+1,this._partialCount=parseInt(t[2],10),e=t[1],a=Math.max(a,2),n=a):this._partialCount=0,this._partials=[]}for(let o=1;o>1&1?-1:1):0,this._partials[o-1]=s;break;case`custom`:s=this._partials[o-1];break;default:throw TypeError(`Oscillator: invalid type: `+e)}s===0?(r[o]=0,i[o]=0):(r[o]=-s*Math.sin(t*o),i[o]=s*Math.cos(t*o))}return[r,i]}_inverseFFT(e,t,n){let r=0,i=e.length;for(let a=0;a(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}},Ng=class e extends og{constructor(){let t=Y(e.getDefaults(),arguments,[`value`]);super(t),this.name=`Multiply`,this.override=!1,this._mult=this.input=this.output=new rg({context:this.context,minValue:t.minValue,maxValue:t.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(og.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}},Pg=class e extends Dg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`,`modulationType`]);super(t),this.name=`AMOscillator`,this._modulationScale=new Mg({context:this.context}),this._modulationNode=new rg({context:this.context}),this._carrier=new jg({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase,type:t.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new jg({context:this.context,phase:t.phase,type:t.modulationType}),this.harmonicity=new Ng({context:this.context,units:`positive`,value:t.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),X(this,[`frequency`,`detune`,`harmonicity`])}static getDefaults(){return Object.assign(jg.getDefaults(),{harmonicity:1,modulationType:`square`})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(){return J(this,arguments,void 0,function*(e=1024){return kg(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}},Fg=class e extends Dg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`,`modulationType`]);super(t),this.name=`FMOscillator`,this._modulationNode=new rg({context:this.context,gain:0}),this._carrier=new jg({context:this.context,detune:t.detune,frequency:0,onstop:()=>this.onstop(this),phase:t.phase,type:t.type}),this.detune=this._carrier.detune,this.frequency=new og({context:this.context,units:`frequency`,value:t.frequency}),this._modulator=new jg({context:this.context,phase:t.phase,type:t.modulationType}),this.harmonicity=new Ng({context:this.context,units:`positive`,value:t.harmonicity}),this.modulationIndex=new Ng({context:this.context,units:`positive`,value:t.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),X(this,[`modulationIndex`,`frequency`,`detune`,`harmonicity`])}static getDefaults(){return Object.assign(jg.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:`square`})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(){return J(this,arguments,void 0,function*(e=1024){return kg(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}},Ig=class e extends Dg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`width`]);super(t),this.name=`PulseOscillator`,this._widthGate=new rg({context:this.context,gain:0}),this._thresh=new Sg({context:this.context,mapping:e=>e<=0?-1:1}),this.width=new og({context:this.context,units:`audioRange`,value:t.width}),this._triangle=new jg({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase,type:`triangle`}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),X(this,[`width`,`frequency`,`detune`])}static getDefaults(){return Object.assign(Dg.getDefaults(),{detune:0,frequency:440,phase:0,type:`pulse`,width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return`pulse`}get baseType(){return`pulse`}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(){return J(this,arguments,void 0,function*(e=1024){return kg(this,e)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}},Lg=class e extends Dg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`,`spread`]);super(t),this.name=`FatOscillator`,this._oscillators=[],this.frequency=new og({context:this.context,units:`frequency`,value:t.frequency}),this.detune=new og({context:this.context,units:`cents`,value:t.detune}),this._spread=t.spread,this._type=t.type,this._phase=t.phase,this._partials=t.partials,this._partialCount=t.partialCount,this.count=t.count,X(this,[`frequency`,`detune`])}static getDefaults(){return Object.assign(jg.getDefaults(),{count:3,spread:20,type:`sawtooth`})}_start(e){e=this.toSeconds(e),this._forEach(t=>t.start(e))}_stop(e){e=this.toSeconds(e),this._forEach(t=>t.stop(e))}_restart(e){this._forEach(t=>t.restart(e))}_forEach(e){for(let t=0;tt.type=e)}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){let t=-e/2,n=e/(this._oscillators.length-1);this._forEach((e,r)=>e.detune.value=t+n*r)}}get count(){return this._oscillators.length}set count(e){if(zm(e,1),this._oscillators.length!==e){this._forEach(e=>e.dispose()),this._oscillators=[];for(let t=0;tthis.onstop(this):Z});this.type===`custom`&&(n.partials=this._partials),this.frequency.connect(n.frequency),this.detune.connect(n.detune),n.detune.overridden=!1,n.connect(this.output),this._oscillators[t]=n}this.spread=this._spread,this.state===`started`&&this._forEach(e=>e.start())}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach((e,t)=>e.phase=this._phase+t/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach(t=>t.baseType=e),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type=`custom`,this._forEach(t=>t.partials=e))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach(t=>t.partialCount=e),this._type=this._oscillators[0].type}asArray(){return J(this,arguments,void 0,function*(e=1024){return kg(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(e=>e.dispose()),this}},Rg=class e extends Dg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`modulationFrequency`]);super(t),this.name=`PWMOscillator`,this.sourceType=`pwm`,this._scale=new Ng({context:this.context,value:2}),this._pulse=new Ig({context:this.context,frequency:t.modulationFrequency}),this._pulse.carrierType=`sine`,this.modulationFrequency=this._pulse.frequency,this._modulator=new jg({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),X(this,[`modulationFrequency`,`frequency`,`detune`])}static getDefaults(){return Object.assign(Dg.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:`pwm`})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return`pwm`}get baseType(){return`pwm`}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(){return J(this,arguments,void 0,function*(e=1024){return kg(this,e)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}},zg={am:Pg,fat:Lg,fm:Fg,oscillator:jg,pulse:Ig,pwm:Rg},Bg=class e extends Dg{constructor(){let t=Y(e.getDefaults(),arguments,[`frequency`,`type`]);super(t),this.name=`OmniOscillator`,this.frequency=new og({context:this.context,units:`frequency`,value:t.frequency}),this.detune=new og({context:this.context,units:`cents`,value:t.detune}),X(this,[`frequency`,`detune`]),this.set(t)}static getDefaults(){return Object.assign(jg.getDefaults(),Fg.getDefaults(),Pg.getDefaults(),Lg.getDefaults(),Ig.getDefaults(),Rg.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e=``;return[`am`,`fm`,`fat`].some(e=>this._sourceType===e)&&(e=this._sourceType),e+this._oscillator.type}set type(e){e.substr(0,2)===`fm`?(this._createNewOscillator(`fm`),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,2)===`am`?(this._createNewOscillator(`am`),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,3)===`fat`?(this._createNewOscillator(`fat`),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):e===`pwm`?(this._createNewOscillator(`pwm`),this._oscillator=this._oscillator):e===`pulse`?this._createNewOscillator(`pulse`):(this._createNewOscillator(`oscillator`),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){!this._getOscType(this._oscillator,`pulse`)&&!this._getOscType(this._oscillator,`pwm`)&&(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){!this._getOscType(this._oscillator,`pulse`)&&!this._getOscType(this._oscillator,`pwm`)&&(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,`type`)&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;let t=zg[e],n=this.now();if(this._oscillator){let e=this._oscillator;e.stop(n),this.context.setTimeout(()=>e.dispose(),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state===`started`&&this._oscillator.start(n)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t=`sine`;this._oscillator.type!==`pwm`&&this._oscillator.type!==`pulse`&&(t=this._oscillator.type),e===`fm`?this.type=`fm`+t:e===`am`?this.type=`am`+t:e===`fat`?this.type=`fat`+t:e===`oscillator`?this.type=t:e===`pulse`?this.type=`pulse`:e===`pwm`&&(this.type=`pwm`)}_getOscType(e,t){return e instanceof zg[t]}get baseType(){return this._oscillator.baseType}set baseType(e){!this._getOscType(this._oscillator,`pulse`)&&!this._getOscType(this._oscillator,`pwm`)&&e!==`pulse`&&e!==`pwm`&&(this._oscillator.baseType=e)}get width(){if(this._getOscType(this._oscillator,`pulse`))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,`fat`))return this._oscillator.count}set count(e){this._getOscType(this._oscillator,`fat`)&&Nm(e)&&(this._oscillator.count=e)}get spread(){if(this._getOscType(this._oscillator,`fat`))return this._oscillator.spread}set spread(e){this._getOscType(this._oscillator,`fat`)&&Nm(e)&&(this._oscillator.spread=e)}get modulationType(){if(this._getOscType(this._oscillator,`fm`)||this._getOscType(this._oscillator,`am`))return this._oscillator.modulationType}set modulationType(e){(this._getOscType(this._oscillator,`fm`)||this._getOscType(this._oscillator,`am`))&&Lm(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){if(this._getOscType(this._oscillator,`fm`))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,`fm`)||this._getOscType(this._oscillator,`am`))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,`pwm`))return this._oscillator.modulationFrequency}asArray(){return J(this,arguments,void 0,function*(e=1024){return kg(this,e)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}};function Vg(e,t=1/0){let n=new WeakMap;return function(r,i){Reflect.defineProperty(r,i,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){zm(r,e,t),n.set(this,r)}})}}function Hg(e,t=1/0){let n=new WeakMap;return function(r,i){Reflect.defineProperty(r,i,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){zm(this.toSeconds(r),e,t),n.set(this,r)}})}}var Ug=class e extends Dg{constructor(){let t=Y(e.getDefaults(),arguments,[`url`,`onload`]);super(t),this.name=`Player`,this._activeSources=new Set,this._buffer=new jh({onload:this._onload.bind(this,t.onload),onerror:t.onerror,reverse:t.reverse,url:t.url}),this.autostart=t.autostart,this._loop=t.loop,this._loopStart=t.loopStart,this._loopEnd=t.loopEnd,this._playbackRate=t.playbackRate,this.fadeIn=t.fadeIn,this.fadeOut=t.fadeOut}static getDefaults(){return Object.assign(Dg.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:Z,onerror:Z,playbackRate:1,reverse:!1})}load(e){return J(this,void 0,void 0,function*(){return yield this._buffer.load(e),this._onload(),this})}_onload(e=Z){e(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())===`started`&&(this._state.cancel(this.now()),this._state.setStateAtTime(`stopped`,this.now()))}start(e,t,n){return super.start(e,t,n),this}_start(e,t,n){t=this._loop?uh(t,this._loopStart):uh(t,0);let r=this.toSeconds(t),i=n;n=uh(n,Math.max(this._buffer.duration-r,0));let a=this.toSeconds(n);a/=this._playbackRate,e=this.toSeconds(e);let o=new Og({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(e+a),this._state.setStateAtTime(`stopped`,e+a,{implicitEnd:!0})),this._activeSources.add(o),this._loop&&jm(i)?o.start(e,r):o.start(e,r,a-this.toSeconds(this.fadeOut))}_stop(e){let t=this.toSeconds(e);this._activeSources.forEach(e=>e.stop(t))}restart(e,t,n){return super.restart(e,t,n),this}_restart(e,t,n){var r;(r=[...this._activeSources].pop())==null||r.stop(e),this._start(e,t,n)}seek(e,t){let n=this.toSeconds(t);if(this._state.getValueAtTime(n)===`started`){let t=this.toSeconds(e);this._stop(n),this._start(n,t)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&zm(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopStart=e})}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&zm(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopEnd=e})}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach(t=>{t.loop=e}),e)){let e=this._state.getNextState(`stopped`,this.now());e&&this._state.cancel(e.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;let t=this.now(),n=this._state.getNextState(`stopped`,t);n&&n.implicitEnd&&(this._state.cancel(n.time),this._activeSources.forEach(e=>e.cancelStop())),this._activeSources.forEach(n=>{n.playbackRate.setValueAtTime(e,t)})}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(e=>e.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}};$m([Hg(0)],Ug.prototype,`fadeIn`,void 0),$m([Hg(0)],Ug.prototype,`fadeOut`,void 0);var Wg=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`attack`,`decay`,`sustain`,`release`]);super(t),this.name=`Envelope`,this._sig=new og({context:this.context,value:0}),this.output=this._sig,this.input=void 0,this.attack=t.attack,this.decay=t.decay,this.sustain=t.sustain,this.release=t.release,this.attackCurve=t.attackCurve,this.releaseCurve=t.releaseCurve,this.decayCurve=t.decayCurve}static getDefaults(){return Object.assign($.getDefaults(),{attack:.01,attackCurve:`linear`,decay:.1,decayCurve:`exponential`,release:1,releaseCurve:`exponential`,sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(Lm(e))return e;{let n;for(n in Gg)if(Gg[n][t]===e)return n;return e}}_setCurve(e,t,n){if(Lm(n)&&Reflect.has(Gg,n)){let r=Gg[n];Pm(r)?e!==`_decayCurve`&&(this[e]=r[t]):this[e]=r}else if(Im(n)&&e!==`_decayCurve`)this[e]=n;else throw Error(`Envelope: invalid curve: `+n)}get attackCurve(){return this._getCurve(this._attackCurve,`In`)}set attackCurve(e){this._setCurve(`_attackCurve`,`In`,e)}get releaseCurve(){return this._getCurve(this._releaseCurve,`Out`)}set releaseCurve(e){this._setCurve(`_releaseCurve`,`Out`,e)}get decayCurve(){return this._getCurve(this._decayCurve,`Out`)}set decayCurve(e){this._setCurve(`_decayCurve`,`Out`,e)}triggerAttack(e,t=1){this.log(`triggerAttack`,e,t),e=this.toSeconds(e);let n=this.toSeconds(this.attack),r=this.toSeconds(this.decay),i=this.getValueAtTime(e);if(i>0){let e=1/n;n=(1-i)/e}if(n0){let n=this.toSeconds(this.release);n{let e,t,n=[];for(e=0;e<128;e++)n[e]=Math.sin(e/127*(Math.PI/2));let r=[];for(e=0;e<127;e++)t=e/127,r[e]=(Math.sin(Math.PI*2*t*6.4-Math.PI/2)+1)/10+t*.83;r[127]=1;let i=[];for(e=0;e<128;e++)i[e]=Math.ceil(e/127*5)/5;let a=[];for(e=0;e<128;e++)t=e/127,a[e]=.5*(1-Math.cos(Math.PI*t));let o=[];for(e=0;e<128;e++){t=e/127;let n=t**3*4+.2,r=Math.cos(n*Math.PI*2*t);o[e]=Math.abs(r*(1-t))}function s(e){let t=Array(e.length);for(let n=0;nthis._original_triggerRelease(e),this._volume=this.output=new fg({context:this.context,volume:t.volume}),this.volume=this._volume.volume,X(this,`volume`)}static getDefaults(){return Object.assign($.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod(`triggerAttack`,1),this._syncMethod(`triggerRelease`,0),this.context.transport.on(`stop`,this._syncedRelease),this.context.transport.on(`pause`,this._syncedRelease),this.context.transport.on(`loopEnd`,this._syncedRelease)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){let n=this[`_original_`+e]=this[e];this[e]=(...e)=>{let r=e[t],i=this.context.transport.schedule(r=>{e[t]=r,n.apply(this,e)},r);this._scheduledEvents.push(i)}}unsync(){return this._scheduledEvents.forEach(e=>this.context.transport.clear(e)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off(`stop`,this._syncedRelease),this.context.transport.off(`pause`,this._syncedRelease),this.context.transport.off(`loopEnd`,this._syncedRelease)),this}triggerAttackRelease(e,t,n,r){let i=this.toSeconds(n),a=this.toSeconds(t);return this.triggerAttack(e,i,r),this.triggerRelease(i+a),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}},qg=class e extends Kg{constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.portamento=t.portamento,this.onsilence=t.onsilence}static getDefaults(){return Object.assign(Kg.getDefaults(),{detune:0,onsilence:Z,portamento:0})}triggerAttack(e,t,n=1){this.log(`triggerAttack`,e,t,n);let r=this.toSeconds(t);return this._triggerEnvelopeAttack(r,n),this.setNote(e,r),this}triggerRelease(e){this.log(`triggerRelease`,e);let t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){let n=this.toSeconds(t),r=e instanceof Jh?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(n)>.05){let e=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,e,n)}else this.frequency.setValueAtTime(r,n);return this}};$m([Hg(0)],qg.prototype,`portamento`,void 0);var Jg=class e extends Wg{constructor(){super(Y(e.getDefaults(),arguments,[`attack`,`decay`,`sustain`,`release`])),this.name=`AmplitudeEnvelope`,this._gainNode=new rg({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}},Yg=class e extends qg{constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.name=`Synth`,this.oscillator=new Bg(Object.assign({context:this.context,detune:t.detune,onstop:()=>this.onsilence(this)},t.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new Jg(Object.assign({context:this.context},t.envelope)),this.oscillator.chain(this.envelope,this.output),X(this,[`oscillator`,`frequency`,`detune`,`envelope`])}static getDefaults(){return Object.assign(qg.getDefaults(),{envelope:Object.assign(dh(Wg.getDefaults(),Object.keys($.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(dh(Bg.getDefaults(),[...Object.keys(Dg.getDefaults()),`frequency`,`detune`]),{type:`triangle`})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),this.envelope.sustain===0){let t=this.toSeconds(this.envelope.attack),n=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+t+n)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}},Xg=class e extends Yg{constructor(){let t=Y(e.getDefaults(),arguments);super(t),this.name=`MembraneSynth`,this.portamento=0,this.pitchDecay=t.pitchDecay,this.octaves=t.octaves,X(this,[`oscillator`,`envelope`])}static getDefaults(){return sh(qg.getDefaults(),Yg.getDefaults(),{envelope:{attack:.001,attackCurve:`exponential`,decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:`sine`},pitchDecay:.05})}setNote(e,t){let n=this.toSeconds(t),r=this.toFrequency(e instanceof Jh?e.toFrequency():e),i=r*this.octaves;return this.oscillator.frequency.setValueAtTime(i,n),this.oscillator.frequency.exponentialRampToValueAtTime(r,n+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}};$m([Vg(0)],Xg.prototype,`octaves`,void 0),$m([Hg(0)],Xg.prototype,`pitchDecay`,void 0);var Zg=new Set;function Qg(e){Zg.add(e)}function $g(e,t){let n=`registerProcessor("${e}", ${t})`;Zg.add(n)}Qg(` /** * The base AudioWorkletProcessor for use in Tone.js. Works with the {@link ToneAudioWorklet}. */ @@ -46,7 +46,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }; } } -`),Xg(` +`),Qg(` /** * Abstract class for a single input/output processor. * has a 'generate' function which processes one sample at a time @@ -113,7 +113,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return !this.disposed; } }; -`),Xg(` +`),Qg(` /** * A multichannel buffer for use within an AudioWorkletProcessor as a delay line */ @@ -157,7 +157,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return this.buffer[channel][readHead]; } } -`),Zg(`feedback-comb-filter`,` +`),$g(`feedback-comb-filter`,` class FeedbackCombFilterWorklet extends SingleIOProcessor { constructor(options) { @@ -187,7 +187,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return delayedSample; } } -`);var Qg=class e extends Wg{constructor(){let t=Y(e.getDefaults(),arguments,[`urls`,`onload`,`baseUrl`],`urls`);super(t),this.name=`Sampler`,this._activeSources=new Map;let n={};Object.keys(t.urls).forEach(e=>{let r=parseInt(e,10);if(q(Im(e)||jm(r)&&isFinite(r),`url key is neither a note or midi pitch: ${e}`),Im(e)){let r=new Kh(this.context,e).toMidi();n[r]=t.urls[e]}else jm(r)&&isFinite(r)&&(n[r]=t.urls[r])}),this._buffers=new pg({urls:n,onload:t.onload,baseUrl:t.baseUrl,onerror:t.onerror}),this.attack=t.attack,this.release=t.release,this.curve=t.curve,this._buffers.loaded&&Promise.resolve().then(t.onload)}static getDefaults(){return Object.assign(Wg.getDefaults(),{attack:0,baseUrl:``,curve:`exponential`,onload:Z,onerror:Z,release:.1,urls:{}})}_findClosest(e){let t=0;for(;t<96;){if(this._buffers.has(e+t))return-t;if(this._buffers.has(e-t))return t;t++}throw Error(`No available buffers for note: ${e}`)}triggerAttack(e,t,n=1){return this.log(`triggerAttack`,e,t,n),Array.isArray(e)||(e=[e]),e.forEach(e=>{let r=Hh(new Kh(this.context,e).toFrequency()),i=Math.round(r),a=r-i,o=this._findClosest(i),s=i-o,c=this._buffers.get(s),l=Lh(o+a),u=new Eg({url:c,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:l}).connect(this.output);u.start(t,0,c.duration/l,n),Pm(this._activeSources.get(i))||this._activeSources.set(i,[]),this._activeSources.get(i).push(u),u.onended=()=>{if(this._activeSources&&this._activeSources.has(i)){let e=this._activeSources.get(i),t=e.indexOf(u);t!==-1&&e.splice(t,1)}}}),this}triggerRelease(e,t){return this.log(`triggerRelease`,e,t),Array.isArray(e)||(e=[e]),e.forEach(e=>{let n=new Kh(this.context,e).toMidi();if(this._activeSources.has(n)&&this._activeSources.get(n).length){let e=this._activeSources.get(n);t=this.toSeconds(t),e.forEach(e=>{e.stop(t)}),this._activeSources.set(n,[])}}),this}releaseAll(e){let t=this.toSeconds(e);return this._activeSources.forEach(e=>{for(;e.length;)e.shift().stop(t)}),this}sync(){return this._syncState()&&(this._syncMethod(`triggerAttack`,1),this._syncMethod(`triggerRelease`,1)),this}triggerAttackRelease(e,t,n,r=1){let i=this.toSeconds(n);return this.triggerAttack(e,i,r),Pm(t)?(q(Pm(e),`notes must be an array when duration is array`),e.forEach((e,n)=>{let r=t[Math.min(n,t.length-1)];this.triggerRelease(e,i+this.toSeconds(r))})):this.triggerRelease(e,i+this.toSeconds(t)),this}add(e,t,n){if(q(Im(e)||isFinite(e),`note must be a pitch or midi: ${e}`),Im(e)){let r=new Kh(this.context,e).toMidi();this._buffers.add(r,t,n)}else this._buffers.add(e,t,n);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(e=>{e.forEach(e=>e.dispose())}),this._activeSources.clear(),this}};Zm([Bg(0)],Qg.prototype,`attack`,void 0),Zm([Bg(0)],Qg.prototype,`release`,void 0);var $g=class e extends Xh{constructor(){let t=Y(e.getDefaults(),arguments,[`callback`,`value`]);super(t),this.name=`ToneEvent`,this._state=new Zh(`stopped`),this._startOffset=0,this._loop=t.loop,this.callback=t.callback,this.value=t.value,this._loopStart=this.toTicks(t.loopStart),this._loopEnd=this.toTicks(t.loopEnd),this._playbackRate=t.playbackRate,this._probability=t.probability,this._humanize=t.humanize,this.mute=t.mute,this._playbackRate=t.playbackRate,this._state.increasing=!0,this._rescheduleEvents()}static getDefaults(){return Object.assign(Xh.getDefaults(),{callback:Z,humanize:!1,loop:!1,loopEnd:`1m`,loopStart:0,mute:!1,playbackRate:1,probability:1,value:null})}_rescheduleEvents(e=-1){this._state.forEachFrom(e,e=>{let t;if(e.state===`started`){e.id!==-1&&this.context.transport.clear(e.id);let n=e.time+Math.round(this.startOffset/this._playbackRate);if(this._loop===!0||jm(this._loop)&&this._loop>1){t=1/0,jm(this._loop)&&(t=this._loop*this._getLoopDuration());let r=this._state.getAfter(n);r!==null&&(t=Math.min(t,r.time-n)),t!==1/0&&(t=new mg(this.context,t));let i=new mg(this.context,this._getLoopDuration());e.id=this.context.transport.scheduleRepeat(this._tick.bind(this),i,new mg(this.context,n),t)}else e.id=this.context.transport.schedule(this._tick.bind(this),new mg(this.context,n))}})}get state(){return this._state.getValueAtTime(this.context.transport.ticks)}get startOffset(){return this._startOffset}set startOffset(e){this._startOffset=e}get probability(){return this._probability}set probability(e){this._probability=e}get humanize(){return this._humanize}set humanize(e){this._humanize=e}start(e){let t=this.toTicks(e);return this._state.getValueAtTime(t)===`stopped`&&(this._state.add({id:-1,state:`started`,time:t}),this._rescheduleEvents(t)),this}stop(e){this.cancel(e);let t=this.toTicks(e);if(this._state.getValueAtTime(t)===`started`){this._state.setStateAtTime(`stopped`,t,{id:-1});let e=this._state.getBefore(t),n=t;e!==null&&(n=e.time),this._rescheduleEvents(n)}return this}cancel(e){e=ch(e,-1/0);let t=this.toTicks(e);return this._state.forEachFrom(t,e=>{this.context.transport.clear(e.id)}),this._state.cancel(t),this}_tick(e){let t=this.context.transport.getTicksAtTime(e);if(!this.mute&&this._state.getValueAtTime(t)===`started`){if(this.probability<1&&Math.random()>this.probability)return;if(this.humanize){let t=.02;Nm(this.humanize)||(t=this.toSeconds(this.humanize)),e+=(Math.random()*2-1)*t}this.callback(e,this.value)}}_getLoopDuration(){return(this._loopEnd-this._loopStart)/this._playbackRate}get loop(){return this._loop}set loop(e){this._loop=e,this._rescheduleEvents()}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this._rescheduleEvents()}get loopEnd(){return new mg(this.context,this._loopEnd).toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e),this._loop&&this._rescheduleEvents()}get loopStart(){return new mg(this.context,this._loopStart).toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e),this._loop&&this._rescheduleEvents()}get progress(){if(this._loop){let e=this.context.transport.ticks,t=this._state.get(e);if(t!==null&&t.state===`started`){let n=this._getLoopDuration();return(e-t.time)%n/n}else return 0}else return 0}dispose(){return super.dispose(),this.cancel(),this._state.dispose(),this}},e_=class e extends Xh{constructor(){let t=Y(e.getDefaults(),arguments,[`callback`,`interval`]);super(t),this.name=`Loop`,this._event=new $g({context:this.context,callback:this._tick.bind(this),loop:!0,loopEnd:t.interval,playbackRate:t.playbackRate,probability:t.probability,humanize:t.humanize}),this.callback=t.callback,this.iterations=t.iterations}static getDefaults(){return Object.assign(Xh.getDefaults(),{interval:`4n`,callback:Z,playbackRate:1,iterations:1/0,probability:1,mute:!1,humanize:!1})}start(e){return this._event.start(e),this}stop(e){return this._event.stop(e),this}cancel(e){return this._event.cancel(e),this}_tick(e){this.callback(e)}get state(){return this._event.state}get progress(){return this._event.progress}get interval(){return this._event.loopEnd}set interval(e){this._event.loopEnd=e}get playbackRate(){return this._event.playbackRate}set playbackRate(e){this._event.playbackRate=e}get humanize(){return this._event.humanize}set humanize(e){this._event.humanize=e}get probability(){return this._event.probability}set probability(e){this._event.probability=e}get mute(){return this._event.mute}set mute(e){this._event.mute=e}get iterations(){return this._event.loop===!0?1/0:this._event.loop}set iterations(e){e===1/0?this._event.loop=!0:this._event.loop=e}dispose(){return super.dispose(),this._event.dispose(),this}},t_=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`pan`]);super(t),this.name=`Panner`,this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner,this.pan=new Q({context:this.context,param:this._panner.pan,value:t.pan,minValue:-1,maxValue:1}),this._panner.channelCount=t.channelCount,this._panner.channelCountMode=`explicit`,X(this,`pan`)}static getDefaults(){return Object.assign($.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}};Zg(`bit-crusher`,` +`);var e_=class e extends Kg{constructor(){let t=Y(e.getDefaults(),arguments,[`urls`,`onload`,`baseUrl`],`urls`);super(t),this.name=`Sampler`,this._activeSources=new Map;let n={};Object.keys(t.urls).forEach(e=>{let r=parseInt(e,10);if(q(Rm(e)||Nm(r)&&isFinite(r),`url key is neither a note or midi pitch: ${e}`),Rm(e)){let r=new Jh(this.context,e).toMidi();n[r]=t.urls[e]}else Nm(r)&&isFinite(r)&&(n[r]=t.urls[r])}),this._buffers=new hg({urls:n,onload:t.onload,baseUrl:t.baseUrl,onerror:t.onerror}),this.attack=t.attack,this.release=t.release,this.curve=t.curve,this._buffers.loaded&&Promise.resolve().then(t.onload)}static getDefaults(){return Object.assign(Kg.getDefaults(),{attack:0,baseUrl:``,curve:`exponential`,onload:Z,onerror:Z,release:.1,urls:{}})}_findClosest(e){let t=0;for(;t<96;){if(this._buffers.has(e+t))return-t;if(this._buffers.has(e-t))return t;t++}throw Error(`No available buffers for note: ${e}`)}triggerAttack(e,t,n=1){return this.log(`triggerAttack`,e,t,n),Array.isArray(e)||(e=[e]),e.forEach(e=>{let r=Wh(new Jh(this.context,e).toFrequency()),i=Math.round(r),a=r-i,o=this._findClosest(i),s=i-o,c=this._buffers.get(s),l=zh(o+a),u=new Og({url:c,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:l}).connect(this.output);u.start(t,0,c.duration/l,n),Im(this._activeSources.get(i))||this._activeSources.set(i,[]),this._activeSources.get(i).push(u),u.onended=()=>{if(this._activeSources&&this._activeSources.has(i)){let e=this._activeSources.get(i),t=e.indexOf(u);t!==-1&&e.splice(t,1)}}}),this}triggerRelease(e,t){return this.log(`triggerRelease`,e,t),Array.isArray(e)||(e=[e]),e.forEach(e=>{let n=new Jh(this.context,e).toMidi();if(this._activeSources.has(n)&&this._activeSources.get(n).length){let e=this._activeSources.get(n);t=this.toSeconds(t),e.forEach(e=>{e.stop(t)}),this._activeSources.set(n,[])}}),this}releaseAll(e){let t=this.toSeconds(e);return this._activeSources.forEach(e=>{for(;e.length;)e.shift().stop(t)}),this}sync(){return this._syncState()&&(this._syncMethod(`triggerAttack`,1),this._syncMethod(`triggerRelease`,1)),this}triggerAttackRelease(e,t,n,r=1){let i=this.toSeconds(n);return this.triggerAttack(e,i,r),Im(t)?(q(Im(e),`notes must be an array when duration is array`),e.forEach((e,n)=>{let r=t[Math.min(n,t.length-1)];this.triggerRelease(e,i+this.toSeconds(r))})):this.triggerRelease(e,i+this.toSeconds(t)),this}add(e,t,n){if(q(Rm(e)||isFinite(e),`note must be a pitch or midi: ${e}`),Rm(e)){let r=new Jh(this.context,e).toMidi();this._buffers.add(r,t,n)}else this._buffers.add(e,t,n);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(e=>{e.forEach(e=>e.dispose())}),this._activeSources.clear(),this}};$m([Hg(0)],e_.prototype,`attack`,void 0),$m([Hg(0)],e_.prototype,`release`,void 0);var t_=class e extends Qh{constructor(){let t=Y(e.getDefaults(),arguments,[`callback`,`value`]);super(t),this.name=`ToneEvent`,this._state=new $h(`stopped`),this._startOffset=0,this._loop=t.loop,this.callback=t.callback,this.value=t.value,this._loopStart=this.toTicks(t.loopStart),this._loopEnd=this.toTicks(t.loopEnd),this._playbackRate=t.playbackRate,this._probability=t.probability,this._humanize=t.humanize,this.mute=t.mute,this._playbackRate=t.playbackRate,this._state.increasing=!0,this._rescheduleEvents()}static getDefaults(){return Object.assign(Qh.getDefaults(),{callback:Z,humanize:!1,loop:!1,loopEnd:`1m`,loopStart:0,mute:!1,playbackRate:1,probability:1,value:null})}_rescheduleEvents(e=-1){this._state.forEachFrom(e,e=>{let t;if(e.state===`started`){e.id!==-1&&this.context.transport.clear(e.id);let n=e.time+Math.round(this.startOffset/this._playbackRate);if(this._loop===!0||Nm(this._loop)&&this._loop>1){t=1/0,Nm(this._loop)&&(t=this._loop*this._getLoopDuration());let r=this._state.getAfter(n);r!==null&&(t=Math.min(t,r.time-n)),t!==1/0&&(t=new gg(this.context,t));let i=new gg(this.context,this._getLoopDuration());e.id=this.context.transport.scheduleRepeat(this._tick.bind(this),i,new gg(this.context,n),t)}else e.id=this.context.transport.schedule(this._tick.bind(this),new gg(this.context,n))}})}get state(){return this._state.getValueAtTime(this.context.transport.ticks)}get startOffset(){return this._startOffset}set startOffset(e){this._startOffset=e}get probability(){return this._probability}set probability(e){this._probability=e}get humanize(){return this._humanize}set humanize(e){this._humanize=e}start(e){let t=this.toTicks(e);return this._state.getValueAtTime(t)===`stopped`&&(this._state.add({id:-1,state:`started`,time:t}),this._rescheduleEvents(t)),this}stop(e){this.cancel(e);let t=this.toTicks(e);if(this._state.getValueAtTime(t)===`started`){this._state.setStateAtTime(`stopped`,t,{id:-1});let e=this._state.getBefore(t),n=t;e!==null&&(n=e.time),this._rescheduleEvents(n)}return this}cancel(e){e=uh(e,-1/0);let t=this.toTicks(e);return this._state.forEachFrom(t,e=>{this.context.transport.clear(e.id)}),this._state.cancel(t),this}_tick(e){let t=this.context.transport.getTicksAtTime(e);if(!this.mute&&this._state.getValueAtTime(t)===`started`){if(this.probability<1&&Math.random()>this.probability)return;if(this.humanize){let t=.02;Fm(this.humanize)||(t=this.toSeconds(this.humanize)),e+=(Math.random()*2-1)*t}this.callback(e,this.value)}}_getLoopDuration(){return(this._loopEnd-this._loopStart)/this._playbackRate}get loop(){return this._loop}set loop(e){this._loop=e,this._rescheduleEvents()}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this._rescheduleEvents()}get loopEnd(){return new gg(this.context,this._loopEnd).toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e),this._loop&&this._rescheduleEvents()}get loopStart(){return new gg(this.context,this._loopStart).toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e),this._loop&&this._rescheduleEvents()}get progress(){if(this._loop){let e=this.context.transport.ticks,t=this._state.get(e);if(t!==null&&t.state===`started`){let n=this._getLoopDuration();return(e-t.time)%n/n}else return 0}else return 0}dispose(){return super.dispose(),this.cancel(),this._state.dispose(),this}},n_=class e extends Qh{constructor(){let t=Y(e.getDefaults(),arguments,[`callback`,`interval`]);super(t),this.name=`Loop`,this._event=new t_({context:this.context,callback:this._tick.bind(this),loop:!0,loopEnd:t.interval,playbackRate:t.playbackRate,probability:t.probability,humanize:t.humanize}),this.callback=t.callback,this.iterations=t.iterations}static getDefaults(){return Object.assign(Qh.getDefaults(),{interval:`4n`,callback:Z,playbackRate:1,iterations:1/0,probability:1,mute:!1,humanize:!1})}start(e){return this._event.start(e),this}stop(e){return this._event.stop(e),this}cancel(e){return this._event.cancel(e),this}_tick(e){this.callback(e)}get state(){return this._event.state}get progress(){return this._event.progress}get interval(){return this._event.loopEnd}set interval(e){this._event.loopEnd=e}get playbackRate(){return this._event.playbackRate}set playbackRate(e){this._event.playbackRate=e}get humanize(){return this._event.humanize}set humanize(e){this._event.humanize=e}get probability(){return this._event.probability}set probability(e){this._event.probability=e}get mute(){return this._event.mute}set mute(e){this._event.mute=e}get iterations(){return this._event.loop===!0?1/0:this._event.loop}set iterations(e){e===1/0?this._event.loop=!0:this._event.loop=e}dispose(){return super.dispose(),this._event.dispose(),this}},r_=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`pan`]);super(t),this.name=`Panner`,this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner,this.pan=new Q({context:this.context,param:this._panner.pan,value:t.pan,minValue:-1,maxValue:1}),this._panner.channelCount=t.channelCount,this._panner.channelCountMode=`explicit`,X(this,`pan`)}static getDefaults(){return Object.assign($.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}};$g(`bit-crusher`,` class BitCrusherWorklet extends SingleIOProcessor { static get parameterDescriptors() { @@ -206,4 +206,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return val; } } -`);var n_=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`solo`]);super(t),this.name=`Solo`,this.input=this.output=new tg({context:this.context}),e._allSolos.has(this.context)||e._allSolos.set(this.context,new Set),e._allSolos.get(this.context).add(this),this.solo=t.solo}static getDefaults(){return Object.assign($.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(t){t?this._addSolo():this._removeSolo(),e._allSolos.get(this.context).forEach(e=>e._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){e._soloed.has(this.context)||e._soloed.set(this.context,new Set),e._soloed.get(this.context).add(this)}_removeSolo(){e._soloed.has(this.context)&&e._soloed.get(this.context).delete(this)}_isSoloed(){return e._soloed.has(this.context)&&e._soloed.get(this.context).has(this)}_noSolos(){return!e._soloed.has(this.context)||e._soloed.has(this.context)&&e._soloed.get(this.context).size===0}_updateSolo(){this._isSoloed()||this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),e._allSolos.get(this.context).delete(this),this._removeSolo(),this}};n_._allSolos=new Map,n_._soloed=new Map;var r_=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`pan`,`volume`]);super(t),this.name=`PanVol`,this._panner=this.input=new t_({context:this.context,pan:t.pan,channelCount:t.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new ug({context:this.context,volume:t.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=t.mute,X(this,[`pan`,`volume`])}static getDefaults(){return Object.assign($.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}},i_=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`volume`,`pan`]);super(t),this.name=`Channel`,this._solo=this.input=new n_({solo:t.solo,context:this.context}),this._panVol=this.output=new r_({context:this.context,pan:t.pan,volume:t.volume,mute:t.mute,channelCount:t.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),X(this,[`pan`,`volume`])}static getDefaults(){return Object.assign($.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(e){this._solo.solo=e}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(e){this._panVol.mute=e}_getBus(t){return e.buses.has(t)||e.buses.set(t,new tg({context:this.context})),e.buses.get(t)}send(e,t=0){let n=this._getBus(e),r=new tg({context:this.context,units:`decibels`,gain:t});return this.connect(r),r.connect(n),r}receive(e){return this._getBus(e).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}};i_.buses=new Map;function a_(){return Nh().now()}Nh().transport;function o_(){return Nh().transport}Nh().destination,Nh().destination,Nh().listener,Nh().draw,Nh();var s_={class:`image-melody`},c_={key:1},l_={class:`images`,key:`images`},u_={key:0,class:`audio`},d_={class:`controls`},f_=500,p_={__name:`ImageMelody`,setup(e){let t=Vt(),n=Vt(0),r=Vt(),i=Vt(),a=Vt(),o=Vt(),s=Vt(),c=Vt(),l=async e=>{e?.[0]&&(r.value=!0,await new Promise(t=>{let n=new FileReader;n.onload=e=>{i.value=e.target.result,t()},n.readAsDataURL(e[0])}))},{isOverDropZone:u}=ps(t,{onDrop:l,dataTypes:[`image/jpeg`,`image/png`]}),{open:d,onChange:f}=gs({accept:[`image/jpeg`,`image/png`]});f(l);let p=(e,t)=>{e.width=f_,e.height=f_;let n=e.getContext(`2d`),{x:r,y:i,width:o,height:s}=_s(`cover`,{width:a.value.naturalWidth,height:a.value.naturalHeight},{width:e.width,height:e.height});if(t){let e=t.width/5,r=t.height/5,i=[];for(let a=0;a<5;a++)for(let o=0;o<5;o++){let s=Math.floor(o*e),c=(Math.floor(a*r)*t.width+s*t.height)*4,l=t.data[c],u=t.data[c+1],d=t.data[c+2];n.fillStyle=`rgba(${l}, ${u}, ${d}, ${t.data[c+3]/255})`,i.push(Math.round((l+u+d)/3));let f=f_/5;n.fillRect(o*f,a*f,f,f)}c.value=i}else n.drawImage(a.value,r,i,o,s);return n};Pn(i,async()=>{if(!i.value)return;a.value.src=i.value,await new Promise(e=>a.value.onload=e),r.value=!1,n.value=1,await new Promise(e=>setTimeout(e,f_));let e=p(o.value).getImageData(0,0,f_,f_);p(s.value,e)});let m=Vt(),h=(e,t)=>e.slice(0,t.length).map((e,t)=>({index:t,value:e})).sort((e,t)=>e.value-t.value).map(e=>e.index).map(e=>t[e]),g=()=>{if(m.value)return;let e=new qg().toDestination();a_();let t=h(c.value,[`C4`,`D4`,`E4`,`G4`,`A4`]),n=0;m.value=new e_(r=>{e.triggerAttackRelease(t[n],`8n`),n=(n+1)%t.length},`4n`).start(0),o_().start()},_=()=>{m.value?.dispose(),m.value=null,o_().stop()},v=()=>{_(),n.value=0,c.value=null};return(e,i)=>{let l=Tr(`svg-util-spinner`);return Zi(),na(`div`,s_,[ca(`img`,{ref_key:`image`,ref:a,hidden:``},null,512),L(ro,{name:`fade`,mode:`out-in`},{default:Dn(()=>[n.value===0?(Zi(),na(`div`,{class:fe([`drop-zone`,{active:Gt(u)}]),ref_key:`dropZone`,ref:t,key:`drop`,onClick:i[0]||=(...e)=>Gt(d)&&Gt(d)(...e)},[r.value?(Zi(),ra(l,{key:0})):(Zi(),na(`p`,c_,`Drop PNG or JPG`))],2)):n.value===1?(Zi(),na(`div`,l_,[ca(`canvas`,{ref_key:`viewCanvas`,ref:o},null,512),ca(`canvas`,{ref_key:`processCanvas`,ref:s},null,512)])):pa(``,!0)]),_:1}),c.value?(Zi(),na(`div`,u_,[ca(`div`,d_,[L(xs,{onClick:g,class:`play`},{default:Dn(()=>[...i[1]||=[fa(`Play`,-1)]]),_:1}),L(xs,{onClick:_},{default:Dn(()=>[...i[2]||=[fa(`Stop`,-1)]]),_:1})]),ca(`button`,{onClick:v,class:`reset`},`Reset`)])):pa(``,!0)])}}},m_={class:`drop theme-light`};Qo({__name:`App`,setup(e){return(e,t)=>(Zi(),na(`main`,m_,[L(p_)]))}}).mount(`#app`); \ No newline at end of file +`);var i_=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`solo`]);super(t),this.name=`Solo`,this.input=this.output=new rg({context:this.context}),e._allSolos.has(this.context)||e._allSolos.set(this.context,new Set),e._allSolos.get(this.context).add(this),this.solo=t.solo}static getDefaults(){return Object.assign($.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(t){t?this._addSolo():this._removeSolo(),e._allSolos.get(this.context).forEach(e=>e._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){e._soloed.has(this.context)||e._soloed.set(this.context,new Set),e._soloed.get(this.context).add(this)}_removeSolo(){e._soloed.has(this.context)&&e._soloed.get(this.context).delete(this)}_isSoloed(){return e._soloed.has(this.context)&&e._soloed.get(this.context).has(this)}_noSolos(){return!e._soloed.has(this.context)||e._soloed.has(this.context)&&e._soloed.get(this.context).size===0}_updateSolo(){this._isSoloed()||this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),e._allSolos.get(this.context).delete(this),this._removeSolo(),this}};i_._allSolos=new Map,i_._soloed=new Map;var a_=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`pan`,`volume`]);super(t),this.name=`PanVol`,this._panner=this.input=new r_({context:this.context,pan:t.pan,channelCount:t.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new fg({context:this.context,volume:t.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=t.mute,X(this,[`pan`,`volume`])}static getDefaults(){return Object.assign($.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}},o_=class e extends ${constructor(){let t=Y(e.getDefaults(),arguments,[`volume`,`pan`]);super(t),this.name=`Channel`,this._solo=this.input=new i_({solo:t.solo,context:this.context}),this._panVol=this.output=new a_({context:this.context,pan:t.pan,volume:t.volume,mute:t.mute,channelCount:t.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),X(this,[`pan`,`volume`])}static getDefaults(){return Object.assign($.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(e){this._solo.solo=e}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(e){this._panVol.mute=e}_getBus(t){return e.buses.has(t)||e.buses.set(t,new rg({context:this.context})),e.buses.get(t)}send(e,t=0){let n=this._getBus(e),r=new rg({context:this.context,units:`decibels`,gain:t});return this.connect(r),r.connect(n),r}receive(e){return this._getBus(e).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}};o_.buses=new Map;function s_(){return Fh().now()}Fh().transport;function c_(){return Fh().transport}Fh().destination,Fh().destination,Fh().listener,Fh().draw,Fh();var l_={class:`image-melody`},u_={key:1},d_={class:`images`,key:`images`},f_={key:0,class:`audio`},p_={class:`controls`},m_=500,h_={__name:`ImageMelody`,setup(e){let t=Vt(),n=Vt(0),r=Vt(),i=Vt(),a=Vt(),o=Vt(),s=Vt(),c=Vt(),l=async e=>{e?.[0]&&(r.value=!0,await new Promise(t=>{let n=new FileReader;n.onload=e=>{i.value=e.target.result,t()},n.readAsDataURL(e[0])}))},{isOverDropZone:u}=ps(t,{onDrop:l,dataTypes:[`image/jpeg`,`image/png`]}),{open:d,onChange:f}=gs({accept:[`image/jpeg`,`image/png`]});f(l);let p=(e,t)=>{e.width=m_,e.height=m_;let n=e.getContext(`2d`),{x:r,y:i,width:o,height:s}=_s(`cover`,{width:a.value.naturalWidth,height:a.value.naturalHeight},{width:e.width,height:e.height});if(t){let e=t.width/5,r=t.height/5,i=[];for(let a=0;a<5;a++)for(let o=0;o<5;o++){let s=Math.floor(o*e),c=(Math.floor(a*r)*t.width+s*t.height)*4,l=t.data[c],u=t.data[c+1],d=t.data[c+2];n.fillStyle=`rgba(${l}, ${u}, ${d}, ${t.data[c+3]/255})`,i.push(Math.round((l+u+d)/3));let f=m_/5;n.fillRect(o*f,a*f,f,f)}c.value=i}else n.drawImage(a.value,r,i,o,s);return n};Pn(i,async()=>{if(!i.value)return;a.value.src=i.value,await new Promise(e=>a.value.onload=e),r.value=!1,n.value=1,await new Promise(e=>setTimeout(e,m_));let e=p(o.value).getImageData(0,0,m_,m_);p(s.value,e)});let m=Vt(),h=(e,t)=>e.slice(0,t.length).map((e,t)=>({index:t,value:e})).sort((e,t)=>e.value-t.value).map(e=>e.index).map(e=>t[e]),g=()=>{if(m.value)return;let e=new Yg().toDestination();s_();let t=h(c.value,[`C4`,`D4`,`E4`,`G4`,`A4`]),n=0;m.value=new n_(r=>{e.triggerAttackRelease(t[n],`8n`),n=(n+1)%t.length},`4n`).start(0),c_().start()},_=()=>{m.value?.dispose(),m.value=null,c_().stop()},v=()=>{_(),n.value=0,c.value=null};return(e,i)=>{let l=Tr(`svg-util-spinner`);return Zi(),na(`div`,l_,[ca(`img`,{ref_key:`image`,ref:a,hidden:``},null,512),L(ro,{name:`fade`,mode:`out-in`},{default:Dn(()=>[n.value===0?(Zi(),na(`div`,{class:fe([`drop-zone`,{active:Gt(u)}]),ref_key:`dropZone`,ref:t,key:`drop`,onClick:i[0]||=(...e)=>Gt(d)&&Gt(d)(...e)},[r.value?(Zi(),ra(l,{key:0})):(Zi(),na(`p`,u_,`Drop PNG or JPG`))],2)):n.value===1?(Zi(),na(`div`,d_,[ca(`canvas`,{ref_key:`viewCanvas`,ref:o},null,512),ca(`canvas`,{ref_key:`processCanvas`,ref:s},null,512)])):pa(``,!0)]),_:1}),c.value?(Zi(),na(`div`,f_,[ca(`div`,p_,[L(Cs,{onClick:g,class:`play`},{default:Dn(()=>[...i[1]||=[fa(`Play`,-1)]]),_:1}),L(Cs,{onClick:_},{default:Dn(()=>[...i[2]||=[fa(`Stop`,-1)]]),_:1})]),ca(`button`,{onClick:v,class:`reset`},`Reset`)])):pa(``,!0)])}}},g_={class:`drop theme-light`};Qo({__name:`App`,setup(e){return(e,t)=>(Zi(),na(`main`,g_,[L(h_)]))}}).mount(`#app`); \ No newline at end of file diff --git a/app/public/drops/image-melody/index.html b/app/public/drops/image-melody/index.html index 7f79739..9c02dd3 100644 --- a/app/public/drops/image-melody/index.html +++ b/app/public/drops/image-melody/index.html @@ -5,8 +5,8 @@ Image Melody - - + +
diff --git a/app/src/components/Panel.vue b/app/src/components/Panel.vue index fca3404..f50d9a1 100644 --- a/app/src/components/Panel.vue +++ b/app/src/components/Panel.vue @@ -1,54 +1,63 @@ @@ -69,56 +78,49 @@ const formattedDate = computed(() => { grid-template-rows: auto 1fr auto; display: grid; gap: rs(30px); + height: calc(100dvh - (2 * var(--layout-margin))); .header { text-align: center; } .content { text-align: center; - display: flex; - flex-direction: column; + grid-template-rows: auto auto 1fr; + display: grid; gap: rs(15px); + min-height: 0; + position: relative; .name { margin-bottom: rs(5px); } - .description, .date { + .description, + .date { color: var(--theme-grey); } .description { text-align: left; max-width: rs(400px); margin: 0 auto; + min-height: 0; + overflow: auto; + padding-bottom: rs(30px); a { word-break: break-word; } } - .meta-item { - font-size: rs(12px); - - .meta-label { - opacity: 0.7; - margin-right: rs(8px); - } - - .meta-value { - opacity: 0.9; - } - } - .tags { - display: flex; - flex-wrap: wrap; - gap: rs(8px); - justify-content: center; - - .tag { - background: rgba(255, 255, 255, 0.1); - padding: rs(4px) rs(12px); - border-radius: rs(12px); - font-size: rs(11px); - text-transform: lowercase; - } + .fade { + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: rs(30px); + background: linear-gradient( + to bottom, + transparent, + var(--theme-bg) + ); } } .btn-wrap { diff --git a/app/src/pages/drop.vue b/app/src/pages/drop.vue index 309ae06..1451b5d 100644 --- a/app/src/pages/drop.vue +++ b/app/src/pages/drop.vue @@ -1,5 +1,5 @@