From a9e409417304388c9d2026825af19e6d309cefde Mon Sep 17 00:00:00 2001 From: 0xShug0 <231717474+0xShug0@users.noreply.github.com> Date: Wed, 28 Oct 2026 19:37:59 -0400 Subject: [PATCH] Fix Arena package matching independently of Studio settings --- webui/native/dist/index.html | 86 ++++++++++++++-------------- webui/native/src/routes/+page.svelte | 1 - webui/native/src/routes/Arena.svelte | 10 ++-- 3 files changed, 48 insertions(+), 49 deletions(-) diff --git a/webui/native/dist/index.html b/webui/native/dist/index.html index 12607daaa..92269a763 100644 --- a/webui/native/dist/index.html +++ b/webui/native/dist/index.html @@ -37,9 +37,9 @@ const element = document.currentScript.parentElement; - this.__sveltekit_1xyyov=this.__sveltekit_1xyyov||{};this.__sveltekit_1xyyov.app=(function(Tu){"use strict";var Gn=typeof document<"u"?document.currentScript:null;function Kx(a,t){for(var i=0;in[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}const X_=!1;var ep=Array.isArray,Yx=Array.prototype.indexOf,$u=Array.prototype.includes,qu=Array.from,tp=Object.defineProperty,so=Object.getOwnPropertyDescriptor,Z_=Object.getOwnPropertyDescriptors,Jx=Object.prototype,Xx=Array.prototype,ap=Object.getPrototypeOf,e1=Object.isExtensible;function Zc(a){return typeof a=="function"}const No=()=>{};function Zx(a){return a()}function ip(a){for(var t=0;t{a=n,t=s});return{promise:i,resolve:a,reject:t}}function e6(a,t,i=!1){return a===void 0?i?t():t:a}function ed(a,t){if(Array.isArray(a))return a;if(t===void 0||!(Symbol.iterator in a))return Array.from(a);const i=[];for(const n of a)if(i.push(n),i.length===t)break;return i}const Qn=2,wl=4,td=8,np=1<<24,qr=16,tr=32,ro=64,sp=128,ar=512,Pn=1024,jn=2048,ir=4096,_s=8192,Rs=16384,kl=32768,rp=1<<25,oo=65536,Cu=1<<17,a1=1<<18,dc=1<<19,i1=1<<20,jr=1<<25,xl=65536,Au=1<<21,uc=1<<22,Oo=1<<23,Nr=Symbol("$state"),op=Symbol("legacy props"),t6=Symbol(""),n1=Symbol("attributes"),lp=Symbol("class"),cp=Symbol("style"),dp=Symbol("text"),ad=Symbol("form reset"),id=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},nd=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),a6=1,sd=3,fc=8;function up(a){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function i6(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function n6(a,t,i){throw new Error("https://svelte.dev/e/each_key_duplicate")}function s6(a){throw new Error("https://svelte.dev/e/effect_in_teardown")}function r6(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function o6(a){throw new Error("https://svelte.dev/e/effect_orphan")}function l6(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function c6(){throw new Error("https://svelte.dev/e/hydration_failed")}function d6(a){throw new Error("https://svelte.dev/e/props_invalid_value")}function u6(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function f6(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function p6(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function m6(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const g6=1,h6=2,s1=4,_6=8,v6=16,b6=1,y6=2,w6=4,k6=8,x6=16,r1=1,S6=2,fp="[",pp="[!",o1="[?",mp="]",pc={},Nn=Symbol("uninitialized"),l1="http://www.w3.org/1999/xhtml",T6="http://www.w3.org/2000/svg",$6="@attach";function q6(){console.warn("https://svelte.dev/e/derived_inert")}function Gu(a){console.warn("https://svelte.dev/e/hydration_mismatch")}function C6(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function A6(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let ua=!1;function ts(a){ua=a}let oi;function Fn(a){if(a===null)throw Gu(),pc;return oi=a}function lo(){return Fn(nr(oi))}function w(a){if(ua){if(nr(oi)!==null)throw Gu(),pc;oi=a}}function Rt(a=1){if(ua){for(var t=a,i=oi;t--;)i=nr(i);oi=i}}function rd(a=!0){for(var t=0,i=oi;;){if(i.nodeType===fc){var n=i.data;if(n===mp){if(t===0)return i;t-=1}else(n===fp||n===pp||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var s=nr(i);a&&i.remove(),i=s}}function gp(a){if(!a||a.nodeType!==fc)throw Gu(),pc;return a.data}function c1(a){return a===this.v}function d1(a,t){return a!=a?t==t:a!==t||a!==null&&typeof a=="object"||typeof a=="function"}function u1(a){return!d1(a,this.v)}let mc=!1,G6=!1;function F6(){mc=!0}let Oi=null;function gc(a){Oi=a}function M6(a){return z6().get(a)}function zi(a,t=!1,i){Oi={p:Oi,i:!1,c:null,e:null,s:a,x:null,r:ii,l:mc&&!t?{s:null,u:null,$:[]}:null}}function Ei(a){var t=Oi,i=t.e;if(i!==null){t.e=null;for(var n of i)B1(n)}return a!==void 0&&(t.x=a),t.i=!0,Oi=t.p,a??{}}function hc(){return!mc||Oi!==null&&Oi.l===null}function z6(a){return Oi===null&&up(),Oi.c??=new Map(E6(Oi)||void 0)}function E6(a){let t=a.p;for(;t!==null;){const i=t.c;if(i!==null)return i;t=t.p}return null}let Sl=[];function f1(){var a=Sl;Sl=[],ip(a)}function Cr(a){if(Sl.length===0&&!ld){var t=Sl;queueMicrotask(()=>{t===Sl&&f1()})}Sl.push(a)}function U6(){for(;Sl.length>0;)f1()}function p1(a){var t=ii;if(t===null)return vi.f|=Oo,a;if((t.f&kl)===0&&(t.f&wl)===0)throw a;Io(a,t)}function Io(a,t){if(!(t!==null&&(t.f&Rs)!==0)){for(;t!==null;){if((t.f&sp)!==0){if((t.f&kl)===0)throw a;try{t.b.error(a);return}catch(i){a=i}}t=t.parent}throw a}}const R6=-7169;function hn(a,t){a.f=a.f&R6|t}function hp(a){(a.f&ar)!==0||a.deps===null?hn(a,Pn):hn(a,ir)}function m1(a){if(a!==null)for(const t of a)(t.f&Qn)===0||(t.f&xl)===0||(t.f^=xl,m1(t.deps))}function g1(a,t,i){(a.f&jn)!==0?t.add(a):(a.f&ir)!==0&&i.add(a),m1(a.deps),hn(a,Pn)}function h1(a,t,i){if(a==null)return t(void 0),No;const n=x(()=>a.subscribe(t,i));return n.unsubscribe?()=>n.unsubscribe():n}const _c=[];function Tl(a,t=No){let i=null;const n=new Set;function s(l){if(d1(a,l)&&(a=l,i)){const c=!_c.length;for(const d of n)d[1](),_c.push(d,a);if(c){for(let d=0;d<_c.length;d+=2)_c[d][0](_c[d+1]);_c.length=0}}}function r(l){s(l(a))}function o(l,c=No){const d=[l,c];return n.add(d),n.size===1&&(i=t(s,r)||No),l(a),()=>{n.delete(d),n.size===0&&i&&(i(),i=null)}}return{set:s,update:r,subscribe:o}}function Fu(a){let t;return h1(a,i=>t=i)(),t}let Mu=!1,_p=Symbol("unmounted");function zu(a,t,i){const n=i[t]??={store:null,source:Y(void 0),unsubscribe:No};if(n.store!==a&&!(_p in i))if(n.unsubscribe(),n.store=a??null,a==null)n.source.v=void 0,n.unsubscribe=No;else{var s=!0;n.unsubscribe=h1(a,r=>{s?n.source.v=r:y(n.source,r)}),s=!1}return a&&_p in i?Fu(a):e(n.source)}function vp(){const a={};function t(){Sc(()=>{for(var i in a)a[i].unsubscribe();tp(a,_p,{enumerable:!1,value:!0})})}return[a,t]}function B6(a){var t=Mu;try{return Mu=!1,[a(),Mu]}finally{Mu=t}}function P6(a,t){if(t){const i=document.body;a.autofocus=!0,Cr(()=>{document.activeElement===i&&a.focus()})}}function rn(a){ua&&vs(a)!==null&&Gp(a)}let _1=!1;function v1(){_1||(_1=!0,document.addEventListener("reset",a=>{Promise.resolve().then(()=>{if(!a.defaultPrevented)for(const t of a.target.elements)t[ad]?.()})},{capture:!0}))}function vc(a){var t=vi,i=ii;rr(null),or(null);try{return a()}finally{rr(t),or(i)}}function bp(a,t,i,n=i){a.addEventListener(t,()=>vc(i));const s=a[ad];s?a[ad]=()=>{s(),n(!0)}:a[ad]=()=>n(!0),v1()}function j6(a){let t=0,i=ql(0),n;return()=>{Fp()&&(e(i),Tc(()=>(t===0&&(n=x(()=>a(()=>cd(i)))),t+=1,()=>{Cr(()=>{t-=1,t===0&&(n?.(),n=void 0,cd(i))})})))}}var N6=oo|dc;function O6(a,t,i,n){new I6(a,t,i,n)}class I6{parent;is_pending=!1;transform_error;#e;#t=ua?oi:null;#a;#l;#n;#s=null;#i=null;#o=null;#r=null;#g=0;#c=0;#d=!1;#f=new Set;#h=new Set;#u=null;#v=j6(()=>(this.#u=ql(this.#g),()=>{this.#u=null}));constructor(t,i,n,s){this.#e=t,this.#a=i,this.#l=r=>{var o=ii;o.b=this,o.f|=sp,n(r)},this.parent=ii.b,this.transform_error=s??this.parent?.transform_error??(r=>r),this.#n=Lo(()=>{if(ua){const r=this.#t;lo();const o=r.data===pp;if(r.data.startsWith(o1)){const c=JSON.parse(r.data.slice(o1.length));this.#b(c)}else o?this.#k():this.#_()}else this.#p()},N6),ua&&(this.#e=oi)}#_(){try{this.#s=bs(()=>this.#l(this.#e))}catch(t){this.error(t)}}#b(t){const i=this.#a.failed,{reset:n,invoke_onerror:s}=this.#y(t);Cr(s),i&&(this.#o=bs(()=>{i(this.#e,()=>t,()=>n)}))}#y(t){var i=!1,n=!1;const s=()=>{if(i){A6();return}i=!0,n&&m6(),this.#o!==null&&Al(this.#o,()=>{this.#o=null}),this.#m(()=>{this.#p()})};return{reset:s,invoke_onerror:()=>{try{n=!0,this.#a.onerror?.(t,s),n=!1}catch(o){Io(o,this.#n&&this.#n.parent)}}}}#k(){const t=this.#a.pending;t&&(this.is_pending=!0,this.#i=bs(()=>t(this.#e)),Cr(()=>{var i=this.#r=document.createDocumentFragment(),n=ss();i.append(n),this.#s=this.#m(()=>bs(()=>this.#l(n))),this.#c===0&&(this.#e.before(i),this.#r=null,Al(this.#i,()=>{this.#i=null}),this.#w(ai))}))}#p(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#g=0,this.#s=bs(()=>{this.#l(this.#e)}),this.#c>0){var t=this.#r=document.createDocumentFragment();zp(this.#s,t);const i=this.#a.pending;this.#i=bs(()=>i(this.#e))}else this.#w(ai)}catch(i){this.error(i)}}#w(t){this.is_pending=!1,t.transfer_effects(this.#f,this.#h)}defer_effect(t){g1(t,this.#f,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#a.pending}#m(t){var i=ii,n=vi,s=Oi;or(this.#n),rr(this.#n),gc(this.#n.ctx);try{return co.ensure(),t()}catch(r){return p1(r),null}finally{or(i),rr(n),gc(s)}}#x(t,i){if(!this.has_pending_snippet()){this.parent&&this.parent.#x(t,i);return}this.#c+=t,this.#c===0&&(this.#w(i),this.#i&&Al(this.#i,()=>{this.#i=null}),this.#r&&(this.#e.before(this.#r),this.#r=null))}update_pending_count(t,i){this.#x(t,i),this.#g+=t,!(!this.#u||this.#d)&&(this.#d=!0,Cr(()=>{this.#d=!1,this.#u&&Cl(this.#u,this.#g)}))}get_effect_pending(){return this.#v(),e(this.#u)}error(t){if(!this.#a.onerror&&!this.#a.failed)throw t;ai?.is_fork?(this.#s&&ai.skip_effect(this.#s),this.#i&&ai.skip_effect(this.#i),this.#o&&ai.skip_effect(this.#o),ai.oncommit(()=>{this.#S(t)})):this.#S(t)}#S(t){this.#s&&(as(this.#s),this.#s=null),this.#i&&(as(this.#i),this.#i=null),this.#o&&(as(this.#o),this.#o=null),ua&&(Fn(this.#t),Rt(),Fn(rd()));let i=this.#a.failed;const n=s=>{const{reset:r,invoke_onerror:o}=this.#y(s);o(),i&&(this.#o=this.#m(()=>{try{return bs(()=>{var l=ii;l.b=this,l.f|=sp,i(this.#e,()=>s,()=>r)})}catch(l){return Io(l,this.#n.parent),null}}))};Cr(()=>{var s;try{s=this.transform_error(t)}catch(r){Io(r,this.#n&&this.#n.parent);return}s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(n,r=>Io(r,this.#n&&this.#n.parent)):n(s)})}}function yp(a,t,i,n){const s=hc()?bc:Lt;var r=a.filter(p=>!p.settled),o=t.map(s);if(i.length===0&&r.length===0){n(o);return}var l=ii,c=D6(),d=r.length===1?r[0].promise:r.length>1?Promise.all(r.map(p=>p.promise)):null;function g(p){if((l.f&Rs)===0){c();try{n([...o,...p])}catch(u){Io(u,l)}Eu()}}var h=b1();if(i.length===0){d.then(()=>g([])).finally(h);return}function m(){Promise.all(i.map(p=>L6(p))).then(g).catch(p=>Io(p,l)).finally(h)}d?d.then(()=>{c(),m(),Eu()}):m()}function D6(){var a=ii,t=vi,i=Oi,n=ai;return function(r=!0){or(a),rr(t),gc(i),r&&(a.f&Rs)===0&&(n?.activate(),n?.apply())}}function Eu(a=!0){or(null),rr(null),gc(null),a&&ai?.deactivate()}function b1(){var a=ii,t=a.b,i=ai,n=!!t?.is_rendered();return t?.update_pending_count(1,i),i.increment(n,a),()=>{t?.update_pending_count(-1,i),i.decrement(n,a)}}function bc(a){var t=Qn|jn;return ii!==null&&(ii.f|=dc),{ctx:Oi,deps:null,effects:null,equals:c1,f:t,fn:a,reactions:null,rv:0,v:Nn,wv:0,parent:ii,ac:null}}const od=Symbol("obsolete");function L6(a,t,i){let n=ii;n===null&&i6();var s=void 0,r=ql(Nn),o=!vi,l=new Set;return Z6(()=>{var c=ii,d=t1();s=d.promise;try{Promise.resolve(a()).then(d.resolve,p=>{p!==id&&d.reject(p)}).finally(Eu)}catch(p){d.reject(p),Eu()}var g=ai;if(o){if((c.f&kl)!==0)var h=b1();if(n.b?.is_rendered())g.async_deriveds.get(c)?.reject(od);else for(const p of l.values())p.reject(od);l.add(d),g.async_deriveds.set(c,d)}const m=(p,u=void 0)=>{h?.(),l.delete(d),u!==od&&(g.activate(),u?(r.f|=Oo,Cl(r,u)):((r.f&Oo)!==0&&(r.f^=Oo),Cl(r,p)),g.deactivate())};d.promise.then(m,p=>m(null,p||"unknown"))}),Sc(()=>{for(const c of l)c.reject(od)}),new Promise(c=>{function d(g){function h(){g===s?c(r):d(s)}g.then(h,h)}d(s)})}function La(a){const t=bc(a);return V1(t),t}function Lt(a){const t=bc(a);return t.equals=u1,t}function V6(a){var t=a.effects;if(t!==null){a.effects=null;for(var i=0;i{t.ac.abort(id),t.ac=null}),t.fn!==null&&(t.teardown=No),dd(t,0),Mp(t))}function w1(a){if(a.effects!==null)for(const t of a.effects)t.teardown&&t.fn!==null&&Ml(t)}let kp=null,yc=null,ai=null,xp=null,Ar=null,Sp=null,ld=!1,Tp=!1,wc=null,Uu=null;var k1=0,KP=new Set;let W6=1;class co{id=W6++;#e=!1;linked=!0;#t=null;#a=null;async_deriveds=new Map;current=new Map;previous=new Map;#l=new Set;#n=new Set;#s=0;#i=new Map;#o=null;#r=[];#g=[];#c=new Set;#d=new Set;#f=new Map;#h=new Set;is_fork=!1;#u=!1;constructor(){yc===null?kp=yc=this:(yc.#a=this,this.#t=yc),yc=this}#v(){if(this.is_fork)return!0;for(const n of this.#i.keys()){for(var t=n,i=!1;t.parent!==null;){if(this.#f.has(t)){i=!0;break}t=t.parent}if(!i)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]}),this.#h.delete(t)}unskip_effect(t,i=n=>this.schedule(n)){var n=this.#f.get(t);if(n){this.#f.delete(t);for(var s of n.d)hn(s,jn),i(s);for(s of n.m)hn(s,ir),i(s)}this.#h.add(t)}#_(){this.#e=!0,k1++>1e3&&(this.#m(),Q6());for(const c of this.#c)this.#d.delete(c),hn(c,jn),this.schedule(c);for(const c of this.#d)hn(c,ir),this.schedule(c);const t=this.#r;this.#r=[],this.apply();var i=wc=[],n=[],s=Uu=[];for(const c of t)try{this.#b(c,i,n)}catch(d){throw q1(c),this.#v()||this.discard(),d}if(ai=null,s.length>0){var r=co.ensure();for(const c of s)r.schedule(c)}if(wc=null,Uu=null,this.#v()){this.#p(n),this.#p(i);for(const[c,d]of this.#f)$1(c,d);s.length>0&&ai.#_();return}const o=this.#y();if(o){this.#p(n),this.#p(i),o.#k(this);return}this.#c.clear(),this.#d.clear();for(const c of this.#l)c(this);this.#l.clear(),xp=this,S1(n),S1(i),xp=null,this.#o?.resolve();var l=ai;if(this.#s===0&&(this.#r.length===0||l!==null)&&this.#m(),this.#r.length>0)if(l!==null){const c=l;c.#r.push(...this.#r.filter(d=>!c.#r.includes(d)))}else l=this;l!==null&&l.#_()}#b(t,i,n){t.f^=Pn;for(var s=t.first;s!==null;){var r=s.f,o=(r&(tr|ro))!==0,l=o&&(r&Pn)!==0,c=l||(r&_s)!==0||this.#f.has(s);if(!c&&s.fn!==null){o?s.f^=Pn:(r&wl)!==0?i.push(s):qc(s)&&((r&qr)!==0&&this.#d.add(s),Ml(s));var d=s.first;if(d!==null){s=d;continue}}for(;s!==null;){var g=s.next;if(g!==null){s=g;break}s=s.parent}}}#y(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[i,[,n]]of this.current)if(t.current.has(i)&&!n)return t}t=t.#t}return null}#k(t){for(const[n,s]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,s);for(const[n,s]of t.async_deriveds){const r=this.async_deriveds.get(n);r&&s.promise.then(r.resolve).catch(r.reject)}t.async_deriveds.clear(),this.transfer_effects(t.#c,t.#d);const i=n=>{var s=n.reactions;if(s!==null&&!((n.f&Qn)!==0&&(n.f&(jn|ir))===0))for(const l of s){var r=l.f;if((r&Qn)!==0)i(l);else{var o=l;r&(uc|qr)&&!this.async_deriveds.has(o)&&(this.#d.delete(o),hn(o,jn),this.schedule(o))}}};for(const n of this.current.keys())i(n);this.oncommit(()=>t.discard()),t.#m(),ai=this,this.#_()}#p(t){for(var i=0;i!h.current.get(m)[1]);if(!(!h.#e||s.length===0)){var r=s.filter(m=>!this.current.has(m));if(r.length===0)t&&h.discard();else if(i.length>0){if(t)for(const m of this.#h)h.unskip_effect(m,p=>{(p.f&(qr|uc))!==0?h.schedule(p):h.#p([p])});h.activate();var o=new Set,l=new Map;for(var c of i)T1(c,r,o,l);l=new Map;var d=[...h.current].filter(([m,p])=>{const u=this.current.get(m);return u?u[0]!==p[0]||u[1]!==p[1]:!0}).map(([m])=>m);if(d.length>0)for(const m of this.#g)(m.f&(Rs|_s|Cu))===0&&$p(m,d,l)&&((m.f&(uc|qr))!==0?(hn(m,jn),h.schedule(m)):h.#c.add(m));if(h.#r.length>0&&!h.#u){h.apply();for(var g of h.#r)h.#b(g,[],[]);h.#r=[]}h.deactivate()}}}}increment(t,i){if(this.#s+=1,t){let n=this.#i.get(i)??0;this.#i.set(i,n+1)}}decrement(t,i){if(this.#s-=1,t){let n=this.#i.get(i)??0;n===1?this.#i.delete(i):this.#i.set(i,n-1)}this.#u||(this.#u=!0,Cr(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_effects(t,i){for(const n of t)this.#c.add(n);for(const n of i)this.#d.add(n);t.clear(),i.clear()}oncommit(t){this.#l.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#o??=t1()).promise}static ensure(){if(ai===null){const t=ai=new co;!Tp&&!ld&&Cr(()=>{t.#e||t.flush()})}return ai}apply(){{Ar=null;return}}schedule(t){if(Sp=t,t.b?.is_pending&&(t.f&(wl|td|np))!==0&&(t.f&kl)===0){t.b.defer_effect(t);return}for(var i=t;i.parent!==null;){i=i.parent;var n=i.f;if(wc!==null&&i===ii&&(vi===null||(vi.f&Qn)===0))return;if((n&(ro|tr))!==0){if((n&Pn)===0)return;i.f^=Pn}}this.#r.push(i)}#m(){if(this.linked){var t=this.#t,i=this.#a;t===null?kp=i:t.#a=i,i===null?yc=t:i.#t=t,this.linked=!1}}}function x1(a){var t=ld;ld=!0;try{for(var i;;){if(U6(),ai===null)return i;ai.flush()}}finally{ld=t}}function Q6(){try{l6()}catch(a){Io(a,Sp)}}let uo=null;function S1(a){var t=a.length;if(t!==0){for(var i=0;i0)){$l.clear();for(const s of uo){if((s.f&(Rs|_s))!==0)continue;const r=[s];let o=s.parent;for(;o!==null;)uo.has(o)&&(uo.delete(o),r.push(o)),o=o.parent;for(let l=r.length-1;l>=0;l--){const c=r[l];(c.f&(Rs|_s))===0&&Ml(c)}}uo.clear()}}uo=null}}function T1(a,t,i,n){if(!i.has(a)&&(i.add(a),a.reactions!==null))for(const s of a.reactions){const r=s.f;(r&Qn)!==0?T1(s,t,i,n):(r&(uc|qr))!==0&&(r&jn)===0&&$p(s,t,n)&&(hn(s,jn),qp(s))}}function $p(a,t,i){const n=i.get(a);if(n!==void 0)return n;if(a.deps!==null)for(const s of a.deps){if($u.call(t,s))return!0;if((s.f&Qn)!==0&&$p(s,t,i))return i.set(s,!0),!0}return i.set(a,!1),!1}function qp(a){ai.schedule(a)}function $1(a,t){if(!((a.f&tr)!==0&&(a.f&Pn)!==0)){(a.f&jn)!==0?t.d.push(a):(a.f&ir)!==0&&t.m.push(a),hn(a,Pn);for(var i=a.first;i!==null;)$1(i,t),i=i.next}}function q1(a){hn(a,Pn);for(var t=a.first;t!==null;)q1(t),t=t.next}let Ru=new Set;const $l=new Map;let C1=!1;function ql(a,t){var i={f:0,v:a,reactions:null,equals:c1,rv:0,wv:0};return i}function Mn(a,t){const i=ql(a);return V1(i),i}function Y(a,t=!1,i=!0){const n=ql(a);return t||(n.equals=u1),mc&&i&&Oi!==null&&Oi.l!==null&&(Oi.l.s??=[]).push(n),n}function Bt(a,t){return y(a,x(()=>e(a))),t}function y(a,t,i=!1){vi!==null&&(!Gr||(vi.f&Cu)!==0)&&hc()&&(vi.f&(Qn|qr|uc|Cu))!==0&&(Or===null||!Or.has(a))&&p6();let n=i?kc(t):t;return Cl(a,n,Uu)}function Cl(a,t,i=null){if(!a.equals(t)){$l.set(a,fo?t:a.v);var n=co.ensure();if(n.capture(a,t),(a.f&Qn)!==0){const s=a;(a.f&jn)!==0&&wp(s),Ar===null&&hp(s)}a.wv=Q1(),A1(a,jn,i),hc()&&ii!==null&&(ii.f&Pn)!==0&&(ii.f&(tr|ro))===0&&(lr===null?n4([a]):lr.push(a)),!n.is_fork&&Ru.size>0&&!C1&&K6()}return t}function K6(){C1=!1;for(const a of Ru){(a.f&Pn)!==0&&hn(a,ir);let t;try{t=qc(a)}catch{t=!0}t&&Ml(a)}Ru.clear()}function Bu(a,t=1){var i=e(a),n=t===1?i++:i--;return y(a,i),n}function cd(a){y(a,a.v+1)}function A1(a,t,i){var n=a.reactions;if(n!==null)for(var s=hc(),r=n.length,o=0;o{if(Fl===r)return l();var c=vi,d=Fl;rr(null),W1(r);var g=l();return rr(c),W1(d),g};return n&&i.set("length",Mn(a.length)),new Proxy(a,{defineProperty(l,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&u6();var g=i.get(c);return g===void 0?o(()=>{var h=Mn(d.value);return i.set(c,h),h}):y(g,d.value,!0),!0},deleteProperty(l,c){var d=i.get(c);if(d===void 0){if(c in l){const g=o(()=>Mn(Nn));i.set(c,g),cd(s)}}else y(d,Nn),cd(s);return!0},get(l,c,d){if(c===Nr)return a;var g=i.get(c),h=c in l;if(g===void 0&&(!h||so(l,c)?.writable)&&(g=o(()=>{var p=kc(h?l[c]:Nn),u=Mn(p);return u}),i.set(c,g)),g!==void 0){var m=e(g);return m===Nn?void 0:m}return Reflect.get(l,c,d)},getOwnPropertyDescriptor(l,c){var d=Reflect.getOwnPropertyDescriptor(l,c);if(d&&"value"in d){var g=i.get(c);g&&(d.value=e(g))}else if(d===void 0){var h=i.get(c),m=h?.v;if(h!==void 0&&m!==Nn)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(l,c){if(c===Nr)return!0;var d=i.get(c),g=d!==void 0&&d.v!==Nn||Reflect.has(l,c);if(d!==void 0||ii!==null&&(!g||so(l,c)?.writable)){d===void 0&&(d=o(()=>{var m=g?kc(l[c]):Nn,p=Mn(m);return p}),i.set(c,d));var h=e(d);if(h===Nn)return!1}return g},set(l,c,d,g){var h=i.get(c),m=c in l;if(n&&c==="length")for(var p=d;pMn(Nn)),i.set(p+"",u))}if(h===void 0)(!m||so(l,c)?.writable)&&(h=o(()=>Mn(void 0)),y(h,kc(d)),i.set(c,h));else{m=h.v!==Nn;var f=o(()=>kc(d));y(h,f)}var _=Reflect.getOwnPropertyDescriptor(l,c);if(_?.set&&_.set.call(g,d),!m){if(n&&typeof c=="string"){var b=i.get("length"),v=Number(c);Number.isInteger(v)&&v>=b.v&&y(b,v+1)}cd(s)}return!0},ownKeys(l){e(s);var c=Reflect.ownKeys(l).filter(h=>{var m=i.get(h);return m===void 0||m.v!==Nn});for(var[d,g]of i)g.v!==Nn&&!(d in l)&&c.push(d);return c},setPrototypeOf(){f6()}})}function G1(a){try{if(a!==null&&typeof a=="object"&&Nr in a)return a[Nr]}catch{}return a}function Y6(a,t){return Object.is(G1(a),G1(t))}var xc,Cp,F1,M1,z1;function Ap(){if(xc===void 0){xc=window,Cp=document,F1=/Firefox/.test(navigator.userAgent);var a=Element.prototype,t=Node.prototype,i=Text.prototype;M1=so(t,"firstChild").get,z1=so(t,"nextSibling").get,e1(a)&&(a[lp]=void 0,a[n1]=null,a[cp]=void 0,a.__e=void 0),e1(i)&&(i[dp]=void 0)}}function ss(a=""){return document.createTextNode(a)}function vs(a){return M1.call(a)}function nr(a){return z1.call(a)}function k(a,t){if(!ua)return vs(a);var i=vs(oi);if(i===null)i=oi.appendChild(ss());else if(t&&i.nodeType!==sd){var n=ss();return i?.before(n),Fn(n),n}return t&&Pu(i),Fn(i),i}function ht(a,t=!1){if(!ua){var i=vs(a);return i instanceof Comment&&i.data===""?nr(i):i}if(t){if(oi?.nodeType!==sd){var n=ss();return oi?.before(n),Fn(n),n}Pu(oi)}return oi}function q(a,t=1,i=!1){let n=ua?oi:a;for(var s;t--;)s=n,n=nr(n);if(!ua)return n;if(i){if(n?.nodeType!==sd){var r=ss();return n===null?s?.after(r):n.before(r),Fn(r),r}Pu(n)}return Fn(n),n}function Gp(a){a.textContent=""}function E1(){return!1}function U1(a,t,i){return t==null||t===l1?i?document.createElement(a,{is:i}):document.createElement(a):i?document.createElementNS(t,a,{is:i}):document.createElementNS(t,a)}function Pu(a){if(a.nodeValue.length<65536)return;let t=a.nextSibling;for(;t!==null&&t.nodeType===sd;)t.remove(),a.nodeValue+=t.nodeValue,t=a.nextSibling}function R1(a){ii===null&&(vi===null&&o6(),r6()),fo&&s6()}function J6(a,t){var i=t.last;i===null?t.last=t.first=a:(i.next=a,a.prev=i,t.last=a)}function sr(a,t){var i=ii;i!==null&&(i.f&_s)!==0&&(a|=_s);var n={ctx:Oi,deps:null,nodes:null,f:a|jn|ar,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,wv:0,ac:null};ai?.register_created_effect(n);var s=n;if((a&wl)!==0)wc!==null?wc.push(n):co.ensure().schedule(n);else if(t!==null){try{Ml(n)}catch(o){throw as(n),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&dc)===0&&(s=s.first,(a&qr)!==0&&(a&oo)!==0&&s!==null&&(s.f|=oo))}if(s!==null&&(s.parent=i,i!==null&&J6(s,i),vi!==null&&(vi.f&Qn)!==0&&(a&ro)===0)){var r=vi;(r.effects??=[]).push(s)}return n}function Fp(){return vi!==null&&!Gr}function Sc(a){const t=sr(td,null);return hn(t,Pn),t.teardown=a,t}function ju(a){R1();var t=ii.f,i=!vi&&(t&tr)!==0&&Oi!==null&&!Oi.i;if(i){var n=Oi;(n.e??=[]).push(a)}else return B1(a)}function B1(a){return sr(wl|i1,a)}function P1(a){return R1(),sr(td|i1,a)}function X6(a){co.ensure();const t=sr(ro|dc,a);return(i={})=>new Promise(n=>{i.outro?Al(t,()=>{as(t),n(void 0)}):(as(t),n(void 0))})}function Do(a){return sr(wl,a)}function Ee(a,t){var i=Oi,n={effect:null,ran:!1,deps:a};i.l.$.push(n),n.effect=Tc(()=>{if(a(),!n.ran){n.ran=!0;var s=ii;try{or(s.parent),x(t)}finally{or(s)}}})}function kn(){var a=Oi;Tc(()=>{for(var t of a.l.$){t.deps();var i=t.effect;(i.f&Pn)!==0&&i.deps!==null&&hn(i,ir),qc(i)&&Ml(i),t.ran=!1}})}function Z6(a){return sr(uc|dc,a)}function Tc(a,t=0){return sr(td|t,a)}function ie(a,t=[],i=[],n=[]){yp(n,t,i,s=>{sr(td,()=>{a(...s.map(e))})})}function e4(a,t=[],i=[],n=[]){yp(n,t,i,s=>{sr(wl,()=>a(...s.map(e)))})}function Lo(a,t=0){var i=sr(qr|t,a);return i}function j1(a,t=0){var i=sr(np|t,a);return i}function bs(a){return sr(tr|dc,a)}function N1(a){var t=a.teardown;if(t!==null){const i=fo,n=vi;L1(!0),rr(null);try{t.call(null)}finally{L1(i),rr(n)}}}function Mp(a,t=!1){var i=a.first;for(a.first=a.last=null;i!==null;){const s=i.ac;s!==null&&vc(()=>{s.abort(id)});var n=i.next;(i.f&ro)!==0?i.parent=null:as(i,t),i=n}}function t4(a){for(var t=a.first;t!==null;){var i=t.next;(t.f&tr)===0&&as(t),t=i}}function as(a,t=!0){var i=!1;(t||(a.f&a1)!==0)&&a.nodes!==null&&a.nodes.end!==null&&(a4(a.nodes.start,a.nodes.end),i=!0),a.f|=rp,Mp(a,t&&!i),dd(a,0);var n=a.nodes&&a.nodes.t;if(n!==null)for(const r of n)r.stop();N1(a),a.f^=rp,a.f|=Rs;var s=a.parent;s!==null&&s.first!==null&&O1(a),a.next=a.prev=a.teardown=a.ctx=a.deps=a.fn=a.nodes=a.ac=a.b=null}function a4(a,t){for(;a!==null;){var i=a===t?null:nr(a);a.remove(),a=i}}function O1(a){var t=a.parent,i=a.prev,n=a.next;i!==null&&(i.next=n),n!==null&&(n.prev=i),t!==null&&(t.first===a&&(t.first=n),t.last===a&&(t.last=i))}function Al(a,t,i=!0){var n=[];I1(a,n,!0);var s=()=>{i&&as(a),t&&t()},r=n.length;if(r>0){var o=()=>--r||s();for(var l of n)l.out(o)}else s()}function I1(a,t,i){if((a.f&_s)===0){a.f^=_s;var n=a.nodes&&a.nodes.t;if(n!==null)for(const l of n)(l.is_global||i)&&t.push(l);for(var s=a.first;s!==null;){var r=s.next;if((s.f&ro)===0){var o=(s.f&oo)!==0||(s.f&tr)!==0&&(a.f&qr)!==0;I1(s,t,o?i:!1)}s=r}}}function Nu(a){D1(a,!0)}function D1(a,t){if((a.f&_s)!==0){a.f^=_s,(a.f&Pn)===0&&(hn(a,jn),co.ensure().schedule(a));for(var i=a.first;i!==null;){var n=i.next,s=(i.f&oo)!==0||(i.f&tr)!==0;D1(i,s?t:!1),i=n}var r=a.nodes&&a.nodes.t;if(r!==null)for(const o of r)(o.is_global||t)&&o.in()}}function zp(a,t){if(a.nodes)for(var i=a.nodes.start,n=a.nodes.end;i!==null;){var s=i===n?null:nr(i);t.append(i),i=s}}let $c=null;function i4(a){var t=$c;try{if($c=new Set,x(a),t!==null)for(var i of $c)t.add(i);return $c}finally{$c=t}}function Wi(a){for(var t of i4(a))Cl(t,t.v)}let Ou=!1,fo=!1;function L1(a){fo=a}let vi=null,Gr=!1;function rr(a){vi=a}let ii=null;function or(a){ii=a}let Or=null;function V1(a){vi!==null&&(Or??=new Set).add(a)}let Gs=null,Bs=0,lr=null;function n4(a){lr=a}let H1=1,Gl=0,Fl=Gl;function W1(a){Fl=a}function Q1(){return++H1}function qc(a){var t=a.f;if((t&jn)!==0)return!0;if(t&Qn&&(a.f&=~xl),(t&ir)!==0){for(var i=a.deps,n=i.length,s=0;sa.wv)return!0}(t&ar)!==0&&Ar===null&&hn(a,Pn)}return!1}function K1(a,t,i=!0){var n=a.reactions;if(n!==null&&!(Or!==null&&Or.has(a)))for(var s=0;s{a.ac.abort(id)}),a.ac=null);try{a.f|=Au;var g=a.fn,h=g();a.f|=kl;var m=a.deps,p=ai?.is_fork;if(Gs!==null){var u;if(p||dd(a,Bs),m!==null&&Bs>0)for(m.length=Bs+Gs.length,u=0;u{r.ac.abort(id),r.ac=null,hn(r,jn)}),H6(r),dd(r,0)}}function dd(a,t){var i=a.deps;if(i!==null)for(var n=t;ni?.call(this,r))}return a.startsWith("pointer")||a.startsWith("touch")||a==="wheel"?Cr(()=>{t.addEventListener(a,s,n)}):t.addEventListener(a,s,n),s}function re(a,t,i,n,s){var r={capture:n,passive:s},o=ev(a,t,i,r);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Sc(()=>{t.removeEventListener(a,o,r)})}function h4(a,t,i){(t[ud]??={})[a]=i}function _4(a){for(var t=0;t{throw f});throw m}}finally{a[ud]=t,delete a.currentTarget,rr(g),or(h)}}}const v4=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:a=>a});function b4(a){return v4?.createHTML(a)??a}function av(a){var t=U1("template");return t.innerHTML=b4(a.replaceAll("","")),t.content}function cr(a,t){var i=ii;i.nodes===null&&(i.nodes={start:a,end:t,a:null,t:null})}function ae(a,t){var i=(t&r1)!==0,n=(t&S6)!==0,s,r=!a.startsWith("");return()=>{if(ua)return cr(oi,null),oi;s===void 0&&(s=av(r?a:""+a),i||(s=vs(s)));var o=n||F1?document.importNode(s,!0):s.cloneNode(!0);if(i){var l=vs(o),c=o.lastChild;cr(l,c)}else cr(o,o);return o}}function y4(a,t,i="svg"){var n=!a.startsWith(""),s=(t&r1)!==0,r=`<${i}>${n?a:""+a}`,o;return()=>{if(ua)return cr(oi,null),oi;if(!o){var l=av(r),c=vs(l);if(s)for(o=document.createDocumentFragment();vs(c);)o.appendChild(vs(c));else o=vs(c)}var d=o.cloneNode(!0);if(s){var g=vs(d),h=d.lastChild;cr(g,h)}else cr(d,d);return d}}function po(a,t){return y4(a,t,"svg")}function Bp(a=""){if(!ua){var t=ss(a+"");return cr(t,t),t}var i=oi;return i.nodeType!==sd?(i.before(i=ss()),Fn(i)):Pu(i),cr(i,i),i}function ys(){if(ua)return cr(oi,null),oi;var a=document.createDocumentFragment(),t=document.createComment(""),i=ss();return a.append(t,i),cr(t,i),a}function J(a,t){if(ua){var i=ii;((i.f&kl)===0||i.nodes.end===null)&&(i.nodes.end=oi),lo();return}a!==null&&a.before(t)}function W(a,t){var i=t==null?"":typeof t=="object"?`${t}`:t;i!==(a[dp]??=a.nodeValue)&&(a[dp]=i,a.nodeValue=`${i}`)}function iv(a,t){return nv(a,t)}function w4(a,t){Ap(),t.intro=t.intro??!1;const i=t.target,n=ua,s=oi;try{for(var r=vs(i);r&&(r.nodeType!==fc||r.data!==fp);)r=nr(r);if(!r)throw pc;ts(!0),Fn(r);const o=nv(a,{...t,anchor:r});return ts(!1),o}catch(o){if(o instanceof Error&&o.message.split(` -`).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==pc&&console.warn("Failed to hydrate: ",o),t.recover===!1&&c6(),Ap(),Gp(i),ts(!1),iv(a,t)}finally{ts(n),Fn(s)}}const Iu=new Map;function nv(a,{target:t,anchor:i,props:n={},events:s,context:r,intro:o=!0,transformError:l}){Ap();var c=void 0,d=X6(()=>{var g=i??t.appendChild(ss());O6(g,{pending:()=>{}},p=>{zi({});var u=Oi;if(r&&(u.c=r),s&&(n.$$events=s),ua&&cr(p,null),c=a(p,n)||{},ua&&(ii.nodes.end=oi,oi===null||oi.nodeType!==fc||oi.data!==mp))throw Gu(),pc;Ei()},l);var h=new Set,m=p=>{for(var u=0;u{for(var p of h)for(const _ of[t,document]){var u=Iu.get(_),f=u.get(p);--f==0?(_.removeEventListener(p,Rp),u.delete(p),u.size===0&&Iu.delete(_)):u.set(p,f)}Up.delete(m),g!==i&&g.parentNode?.removeChild(g)}});return Pp.set(c,d),c}let Pp=new WeakMap;function k4(a,t){const i=Pp.get(a);return i?(Pp.delete(a),i(t)):Promise.resolve()}class fd{anchor;#e=new Map;#t=new Map;#a=new Map;#l=new Set;#n=!0;constructor(t,i=!0){this.anchor=t,this.#n=i}#s=t=>{if(this.#e.has(t)){var i=this.#e.get(t),n=this.#t.get(i);if(n)Nu(n),this.#l.delete(i);else{var s=this.#a.get(i);s&&(Nu(s.effect),this.#t.set(i,s.effect),this.#a.delete(i),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[r,o]of this.#e){if(this.#e.delete(r),r===t)break;const l=this.#a.get(o);l&&(as(l.effect),this.#a.delete(o))}for(const[r,o]of this.#t){if(r===i||this.#l.has(r))continue;const l=()=>{if(Array.from(this.#e.values()).includes(r)){var d=document.createDocumentFragment();zp(o,d),d.append(ss()),this.#a.set(r,{effect:o,fragment:d})}else as(o);this.#l.delete(r),this.#t.delete(r)};this.#n||!n?(this.#l.add(r),Al(o,l,!1)):l()}}};#i=t=>{this.#e.delete(t);const i=Array.from(this.#e.values());for(const[n,s]of this.#a)i.includes(n)||(as(s.effect),this.#a.delete(n))};ensure(t,i){var n=ai,s=E1();if(i&&!this.#t.has(t)&&!this.#a.has(t))if(s){var r=document.createDocumentFragment(),o=ss();r.append(o),this.#a.set(t,{effect:bs(()=>i(o)),fragment:r})}else this.#t.set(t,bs(()=>i(this.anchor)));if(this.#e.set(n,t),s){for(const[l,c]of this.#t)l===t?n.unskip_effect(c):n.skip_effect(c);for(const[l,c]of this.#a)l===t?n.unskip_effect(c.effect):n.skip_effect(c.effect);n.oncommit(this.#s),n.ondiscard(this.#i)}else ua&&(this.anchor=oi),this.#s(n)}}function ve(a,t,i=!1){var n;ua&&(n=oi,lo());var s=new fd(a),r=i?oo:0;function o(l,c){if(ua){var d=gp(n);if(l!==parseInt(d.substring(1))){var g=rd();Fn(g),s.anchor=g,ts(!1),s.ensure(l,c),ts(!0);return}}s.ensure(l,c)}Lo(()=>{var l=!1;t((c,d=0)=>{l=!0,o(d,c)}),l||o(-1,null)},r)}const x4=Symbol("NaN");function sv(a,t,i){ua&&lo();var n=new fd(a),s=!hc();Lo(()=>{var r=t();r!==r&&(r=x4),s&&r!==null&&typeof r=="object"&&(r={}),n.ensure(r,i)})}function Kt(a,t){return t}function S4(a,t,i){for(var n=[],s=t.length,r,o=t.length,l=0;l{if(r){if(r.pending.delete(h),r.done.add(h),r.pending.size===0){var m=a.outrogroups;jp(a,qu(r.done)),m.delete(r),m.size===0&&(a.outrogroups=null)}}else o-=1},!1)}if(o===0){var c=n.length===0&&i!==null;if(c){var d=i,g=d.parentNode;Gp(g),g.append(d),a.items.clear()}jp(a,t,!c)}else r={pending:new Set(t),done:new Set},(a.outrogroups??=new Set).add(r)}function jp(a,t,i=!0){var n;if(a.pending.size>0){n=new Set;for(const o of a.pending.values())for(const l of o)n.add(a.items.get(l).e)}for(var s=0;s{var T=i();return ep(T)?T:T==null?[]:qu(T)}),m,p=new Map,u=!0;function f(T){(v.effect.f&Rs)===0&&(v.pending.delete(T),v.fallback=g,T4(v,m,o,t,n),g!==null&&(m.length===0?(g.f&jr)===0?Nu(g):(g.f^=jr,md(g,null,o)):Al(g,()=>{g=null})))}function _(T){v.pending.delete(T)}var b=Lo(()=>{m=e(h);var T=m.length;let S=!1;if(ua){var M=gp(o)===pp;M!==(T===0)&&(o=rd(),Fn(o),ts(!1),S=!0)}for(var P=new Set,B=ai,C=E1(),j=0;jr(o)):(g=bs(()=>r(rv??=ss())),g.f|=jr)),T>P.size&&n6(),ua&&T>0&&Fn(rd()),!u)if(p.set(B,P),C){for(const[H,E]of l)P.has(H)||B.skip_effect(E.e);B.oncommit(f),B.ondiscard(_)}else f(B);S&&ts(!0),e(h)}),v={effect:b,items:l,pending:p,outrogroups:null,fallback:g};u=!1,ua&&(o=oi)}function pd(a){for(;a!==null&&(a.f&tr)===0;)a=a.next;return a}function T4(a,t,i,n,s){var r=(n&_6)!==0,o=t.length,l=a.items,c=pd(a.effect.first),d,g=null,h,m=[],p=[],u,f,_,b;if(r)for(b=0;b0){var j=(n&s1)!==0&&o===0?i:null;if(r){for(b=0;b{if(h!==void 0)for(_ of h)_.nodes?.a?.apply()})}function $4(a,t,i,n,s,r,o,l){var c=(o&g6)!==0?(o&v6)===0?Y(i,!1,!1):ql(i):null,d=(o&h6)!==0?ql(s):null;return{v:c,i:d,e:bs(()=>(r(t,c??i,d??s,l),()=>{a.delete(n)}))}}function md(a,t,i){if(a.nodes)for(var n=a.nodes.start,s=a.nodes.end,r=t&&(t.f&jr)===0?t.nodes.start:i;n!==null;){var o=nr(n);if(r.before(n),n===s)return;n=o}}function Vo(a,t,i){t===null?a.effect.first=i:t.next=i,i===null?a.effect.last=t:i.prev=t}function q4(a,t,i,n,s){ua&&lo();var r=t.$$slots?.[i],o=!1;r===!0&&(r=t.children,o=!0),r===void 0||r(a,o?()=>n:n)}function ov(a,t,...i){var n=new fd(a);Lo(()=>{const s=t()??null;n.ensure(s,s&&(r=>s(r,...i)))},oo)}function gd(a,t,i){var n;ua&&(n=oi,lo());var s=new fd(a);Lo(()=>{var r=t()??null;if(ua){var o=gp(n),l=o===fp,c=r!==null;if(l!==c){var d=rd();Fn(d),s.anchor=d,ts(!1),s.ensure(r,r&&(g=>i(g,r))),ts(!0);return}}s.ensure(r,r&&(g=>i(g,r)))},oo)}function C4(a,t,i,n,s,r){let o=ua;ua&&lo();var l=null;ua&&oi.nodeType===a6&&(l=oi,lo());var c=ua?oi:a,d=new fd(c,!1);Lo(()=>{const g=t()||null;var h=T6;if(g===null){d.ensure(null,null);return}return d.ensure(g,m=>{if(g){if(l=ua?l:U1(g,h),cr(l,l),n){var p=null;ua&&g4(g)&&l.append(p=document.createComment(""));var u=ua?vs(l):l.appendChild(ss());ua&&(u===null?ts(!1):Fn(u)),n(l,u),p?.remove()}ii.nodes.end=l,m.before(l)}ua&&Fn(m)}),()=>{}},oo),Sc(()=>{}),o&&(ts(!0),Fn(c))}function A4(a,t){let i=null,n=ua;var s;if(ua){i=oi;for(var r=vs(document.head);r!==null&&(r.nodeType!==fc||r.data!==a);)r=nr(r);if(r===null)ts(!1);else{var o=nr(r);r.remove(),Fn(o)}}ua||(s=document.head.appendChild(ss()));try{Lo(()=>{var l=bs(()=>t(s));l.f|=a1})}finally{n&&(ts(!0),Fn(i))}}function Du(a,t,i){Do(()=>{var n=x(()=>t(a,i?.())||{});if(n?.destroy)return()=>n.destroy()})}function G4(a,t){var i=void 0,n;j1(()=>{i!==(i=t())&&(n&&(as(n),n=null),i&&(n=bs(()=>{Do(()=>i(a))})))})}function lv(a){var t,i,n="";if(typeof a=="string"||typeof a=="number")n+=a;else if(typeof a=="object")if(Array.isArray(a)){var s=a.length;for(t=0;t=0;){var l=o+r;(o===0||cv.includes(n[o-1]))&&(l===n.length||cv.includes(n[l]))?n=(o===0?"":n.substring(0,o))+n.substring(l+1):o=l}}return n===""?null:n}function dv(a,t=!1){var i=t?" !important;":";",n="";for(var s of Object.keys(a)){var r=a[s];r!=null&&r!==""&&(n+=" "+s+": "+r+i)}return n}function Np(a){return a[0]!=="-"||a[1]!=="-"?a.toLowerCase():a}function E4(a,t){if(t){var i="",n,s;if(Array.isArray(t)?(n=t[0],s=t[1]):n=t,a){a=String(a).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var r=!1,o=0,l=!1,c=[];n&&c.push(...Object.keys(n).map(Np)),s&&c.push(...Object.keys(s).map(Np));var d=0,g=-1;const f=a.length;for(var h=0;h{"__value"in a&&xn(a,a.__value)});t.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Sc(()=>{t.disconnect()})}function dr(a,t,i=t){var n=new WeakSet,s=!0;bp(a,"change",r=>{var o=r?"[selected]":":checked",l;if(a.multiple)l=[].map.call(a.querySelectorAll(o),hd);else{var c=a.querySelector(o)??a.querySelector("option:not([disabled])");l=c&&hd(c)}i(l),a.__value=l,ai!==null&&n.add(ai)}),Do(()=>{var r=t();if(a===document.activeElement){var o=ai;if(n.has(o))return}if(xn(a,r,s),s&&r===void 0){var l=a.querySelector(":checked");l!==null&&(r=hd(l),i(r))}a.__value=r,s=!1}),On(a)}function hd(a){return"__value"in a?a.__value:a.value}const _d=Symbol("class"),vd=Symbol("style"),uv=Symbol("is custom element"),fv=Symbol("is html"),U4=nd?"link":"LINK",pv=nd?"input":"INPUT",R4=nd?"option":"OPTION",B4=nd?"select":"SELECT",P4=nd?"progress":"PROGRESS";function Pt(a){if(ua){var t=!1,i=()=>{if(!t){if(t=!0,a.hasAttribute("value")){var n=a.value;_e(a,"value",null),a.value=n}if(a.hasAttribute("checked")){var s=a.checked;_e(a,"checked",null),a.checked=s}}};a[ad]=i,Cr(i),v1()}}function bi(a,t){var i=Lu(a);i.value===(i.value=t??void 0)||a.value===t&&(t!==0||a.nodeName!==P4)||(a.value=t??"")}function zl(a,t){var i=Lu(a);i.checked!==(i.checked=t??void 0)&&(a.checked=t)}function j4(a,t){t?a.hasAttribute("selected")||a.setAttribute("selected",""):a.removeAttribute("selected")}function _e(a,t,i,n){var s=Lu(a);ua&&(s[t]=a.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&a.nodeName===U4)||s[t]!==(s[t]=i)&&(t==="loading"&&(a[t6]=i),i==null?a.removeAttribute(t):typeof i!="string"&&hv(a).includes(t)?a[t]=i:a.setAttribute(t,i))}function N4(a,t,i,n,s=!1,r=!1){if(ua&&s&&a.nodeName===pv){var o=a,l=o.type==="checkbox"?"defaultChecked":"defaultValue";l in i||Pt(o)}var c=Lu(a),d=c[uv],g=!c[fv];let h=ua&&d;h&&ts(!1);var m=t||{},p=a.nodeName===R4;for(var u in t)u in i||(i[u]=null);i.class?i.class=M4(i.class):i[_d]&&(i.class=null),i[vd]&&(i.style??=null);var f=hv(a);if(a.nodeName===pv&&"type"in i&&("value"in i||"__value"in i)){var _=i.type;(_!==m.type||_===void 0&&a.hasAttribute("type"))&&(m.type=_,_e(a,"type",_))}for(const B in i){let C=i[B];if(p&&B==="value"&&C==null){a.value=a.__value="",m[B]=C;continue}if(B==="class"){var b=a.namespaceURI==="http://www.w3.org/1999/xhtml";va(a,b,C,n,t?.[_d],i[_d]),m[B]=C,m[_d]=i[_d];continue}if(B==="style"){Ip(a,C,t?.[vd],i[vd]),m[B]=C,m[vd]=i[vd];continue}var v=m[B];if(!(C===v&&!(C===void 0&&a.hasAttribute(B)))){m[B]=C;var T=B[0]+B[1];if(T!=="$$")if(T==="on"){const j={},G="$$"+B;let A=B.slice(2);var S=c4(A);if(o4(A)&&(A=A.slice(0,-7),j.capture=!0),!S&&v){if(C!=null)continue;a.removeEventListener(A,m[G],j),m[G]=null}if(S)h4(A,a,C),_4([A]);else if(C!=null){let N=function(H){m[B].call(this,H)};m[G]=ev(A,a,N,j)}}else if(B==="style")_e(a,B,C);else if(B==="autofocus")P6(a,!!C);else if(!d&&(B==="__value"||B==="value"&&C!=null))a.value=a.__value=C;else if(B==="selected"&&p)j4(a,C);else{var M=B;g||(M=u4(M));var P=M==="defaultValue"||M==="defaultChecked";if(C==null&&!d&&!P)if(c[B]=null,M==="value"||M==="checked"){let j=a;const G=t===void 0;if(M==="value"){let A=j.defaultValue;j.removeAttribute(M),j.defaultValue=A,j.value=j.__value=G?A:null}else{let A=j.defaultChecked;j.removeAttribute(M),j.defaultChecked=A,j.checked=G?A:!1}}else a.removeAttribute(B);else P||f.includes(M)&&(d||typeof C!="string")?(a[M]=C,M in c&&(c[M]=Nn)):typeof C!="function"&&_e(a,M,C)}}}return h&&ts(!0),m}function mv(a,t,i=[],n=[],s=[],r,o=!1,l=!1){yp(s,i,n,c=>{var d=void 0,g={},h=a.nodeName===B4,m=!1;if(j1(()=>{var u=t(...c.map(e)),f=N4(a,d,u,r,o,l);m&&h&&"value"in u&&xn(a,u.value);for(let b of Object.getOwnPropertySymbols(g))u[b]||as(g[b]);for(let b of Object.getOwnPropertySymbols(u)){var _=u[b];b.description===$6&&(!d||_!==d[b])&&(g[b]&&as(g[b]),g[b]=bs(()=>G4(a,()=>_))),f[b]=_}d=f}),h){var p=a;Do(()=>{xn(p,d.value,!0),On(p)})}m=!0})}function Lu(a){return a[n1]??={[uv]:a.nodeName.includes("-"),[fv]:a.namespaceURI===l1}}var gv=new Map;function hv(a){var t=a.getAttribute("is")||a.nodeName,i=gv.get(t);if(i)return i;gv.set(t,i=[]);for(var n,s=a,r=Element.prototype;r!==s;){n=Z_(s);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&i.push(o);s=ap(s)}return i}function Ta(a,t,i=t){var n=new WeakSet;bp(a,"input",async s=>{var r=s?a.defaultValue:a.value;if(r=Lp(a)?Vp(r):r,i(r),ai!==null&&n.add(ai),await Ps(),r!==(r=t())){var o=a.selectionStart,l=a.selectionEnd,c=a.value.length;if(a.value=r??"",l!==null){var d=a.value.length;o===l&&l===c&&d>c?(a.selectionStart=d,a.selectionEnd=d):(a.selectionStart=o,a.selectionEnd=Math.min(l,d))}}}),(ua&&a.defaultValue!==a.value||x(t)==null&&a.value)&&(i(Lp(a)?Vp(a.value):a.value),ai!==null&&n.add(ai)),Tc(()=>{var s=t();if(a===document.activeElement){var r=ai;if(n.has(r))return}Lp(a)&&s===Vp(a.value)||a.type==="date"&&!s&&!a.value||s!==a.value&&(a.value=s??"")})}function Dp(a,t,i=t){bp(a,"change",n=>{var s=n?a.defaultChecked:a.checked;i(s)}),(ua&&a.defaultChecked!==a.checked||x(t)==null)&&i(a.checked),Tc(()=>{var n=t();a.checked=!!n})}function Lp(a){var t=a.type;return t==="number"||t==="range"}function Vp(a){return a===""?null:+a}function El(a,t,i){var n=so(a,t);n&&n.set&&(a[t]=i,Sc(()=>{a[t]=null}))}function Hp(a,t){return a===t||a?.[Nr]===t}function Ci(a={},t,i,n){var s=Oi.r,r=ii;return Do(()=>{var o,l;return Tc(()=>{o=l,l=n?.()||[],x(()=>{Hp(i(...l),a)||(t(a,...l),o&&Hp(i(...o),a)&&t(null,...o))})}),()=>{let c=r;for(;c!==s&&c.parent!==null&&c.parent.f&rp;)c=c.parent;const d=()=>{l&&Hp(i(...l),a)&&t(null,...l)},g=c.teardown;c.teardown=()=>{d(),g?.()}}}),a}function O4(a){return function(...t){var i=t[0];return i.stopPropagation(),a?.apply(this,t)}}function I4(a){return function(...t){var i=t[0];return i.preventDefault(),a?.apply(this,t)}}function Xi(a=!1){const t=Oi,i=t.l.u;if(!i)return;let n=()=>K(t.s);if(a){let s=0,r={};const o=bc(()=>{let l=!1;const c=t.s;for(const d in c)c[d]!==r[d]&&(r[d]=c[d],l=!0);return l&&s++,s});n=()=>e(o)}i.b.length&&P1(()=>{_v(t,n),ip(i.b)}),ju(()=>{const s=x(()=>i.m.map(Zx));return()=>{for(const r of s)typeof r=="function"&&r()}}),i.a.length&&ju(()=>{_v(t,n),ip(i.a)})}function _v(a,t){if(a.l.s)for(const i of a.l.s)e(i);t()}const D4={get(a,t){if(!a.exclude.has(t))return a.props[t]},set(a,t){return!1},getOwnPropertyDescriptor(a,t){if(!a.exclude.has(t)&&t in a.props)return{enumerable:!0,configurable:!0,value:a.props[t]}},has(a,t){return a.exclude.has(t)?!1:t in a.props},ownKeys(a){return Reflect.ownKeys(a.props).filter(t=>!a.exclude.has(t))}};function Na(a,t,i){return new Proxy({props:a,exclude:t},D4)}const L4={get(a,t){let i=a.props.length;for(;i--;){let n=a.props[i];if(Zc(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(a,t,i){let n=a.props.length;for(;n--;){let s=a.props[n];Zc(s)&&(s=s());const r=so(s,t);if(r&&r.set)return r.set(i),!0}return!1},getOwnPropertyDescriptor(a,t){let i=a.props.length;for(;i--;){let n=a.props[i];if(Zc(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const s=so(n,t);return s&&!s.configurable&&(s.configurable=!0),s}}},has(a,t){if(t===Nr||t===op)return!1;for(let i of a.props)if(Zc(i)&&(i=i()),i!=null&&t in i)return!0;return!1},ownKeys(a){const t=[];for(let i of a.props)if(Zc(i)&&(i=i()),!!i){for(const n in i)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(i))t.includes(n)||t.push(n)}return t}};function Va(...a){return new Proxy({props:a},L4)}function xe(a,t,i,n){var s=!mc||(i&y6)!==0,r=(i&k6)!==0,o=(i&x6)!==0,l=n,c=!0,d=void 0,g=()=>o&&s?(d??=bc(n),e(d)):(c&&(c=!1,l=o?x(n):n),l);let h;if(r){var m=Nr in a||op in a;h=so(a,t)?.set??(m&&t in a?S=>a[t]=S:void 0)}var p,u=!1;r?[p,u]=B6(()=>a[t]):p=a[t],p===void 0&&n!==void 0&&(p=g(),h&&(s&&d6(),h(p)));var f;if(s?f=()=>{var S=a[t];return S===void 0?g():(c=!0,S)}:f=()=>{var S=a[t];return S!==void 0&&(l=void 0),S===void 0?l:S},s&&(i&w6)===0)return f;if(h){var _=a.$$legacy;return(function(S,M){return arguments.length>0?((!s||!M||_||u)&&h(M?f():S),S):f()})}var b=!1,v=((i&b6)!==0?bc:Lt)(()=>(b=!1,f()));r&&e(v);var T=ii;return(function(S,M){if(arguments.length>0){const P=M?e(v):s&&r?kc(S):S;return y(v,P),b=!0,l!==void 0&&(l=P),S}return fo&&b||(T.f&Rs)!==0?v.v:e(v)})}function V4(a){return class extends H4{constructor(t){super({component:a,...t})}}}class H4{#e;#t;constructor(t){var i=new Map,n=(r,o)=>{var l=Y(o,!1,!1);return i.set(r,l),l};const s=new Proxy({...t.props||{},$$events:{}},{get(r,o){return e(i.get(o)??n(o,Reflect.get(r,o)))},has(r,o){return o===op?!0:(e(i.get(o)??n(o,Reflect.get(r,o))),Reflect.has(r,o))},set(r,o,l){return y(i.get(o)??n(o,l),l),Reflect.set(r,o,l)}});this.#t=(t.hydrate?w4:iv)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&x1(),this.#e=s.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||tp(this,r,{get(){return this.#t[r]},set(o){this.#t[r]=o},enumerable:!0});this.#t.$set=r=>{Object.assign(s,r)},this.#t.$destroy=()=>{k4(this.#t)}}$set(t){this.#t.$set(t)}$on(t,i){this.#e[t]=this.#e[t]||[];const n=(...s)=>i.call(this,...s);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(s=>s!==n)}}$destroy(){this.#t.$destroy()}}function Kn(a){Oi===null&&up(),mc&&Oi.l!==null?W4(Oi).m.push(a):ju(()=>{const t=x(a);if(typeof t=="function")return t})}function ur(a){Oi===null&&up(),Kn(()=>()=>x(a))}function W4(a){var t=a.l;return t.u??={a:[],b:[],m:[]}}class Wp{constructor(t,i){this.status=t,typeof i=="string"?this.body={message:i}:i?this.body=i:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Qp{constructor(t,i){try{new Headers({location:i})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(i)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=i}}class Kp extends Error{constructor(t,i,n){super(n),this.status=t,this.text=i}}new URL("sveltekit-internal://");function Q4(a,t){return a==="/"||t==="ignore"?a:t==="never"?a.endsWith("/")?a.slice(0,-1):a:t==="always"&&!a.endsWith("/")?a+"/":a}function K4(a){return a.split("%25").map(decodeURI).join("%25")}function Y4(a){for(const t in a)a[t]=decodeURIComponent(a[t]);return a}function Yp({href:a}){return a.split("#")[0]}function Ho(){}function J4(...a){let t=5381;for(const i of a)if(typeof i=="string"){let n=i.length;for(;n;)t=t*33^i.charCodeAt(--n)}else if(ArrayBuffer.isView(i)){const n=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);let s=n.length;for(;s;)t=t*33^n[--s]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function X4(a){const t=atob(a),i=new Uint8Array(t.length);for(let n=0;n((a instanceof Request?a.method:t?.method||"GET")!=="GET"&&bd.delete(Jp(a)),Z4(a,t));const bd=new Map;function e5(a,t){const i=Jp(a,t),n=document.querySelector(i);if(n?.textContent){n.remove();let{body:s,...r}=JSON.parse(n.textContent);n.getAttribute("data-b64")!==null&&(s=X4(s));const l=n.getAttribute("data-ttl");return l&&bd.set(i,{body:s,init:r,ttl:1e3*Number(l)}),Promise.resolve(new Response(s,r))}return window.fetch(a,t)}function t5(a,t,i){if(bd.size>0){const n=Jp(a,i),s=bd.get(n);if(s){if(performance.now(){const s=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(n);if(s)return t.push({name:s[1],matcher:s[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(n);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!n)return;const o=n.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,d)=>{if(d%2){if(c.startsWith("x+"))return Xp(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Xp(String.fromCharCode(...c.slice(2).split("-").map(f=>parseInt(f,16))));const g=a5.exec(c),[,h,m,p,u]=g;return t.push({name:p,matcher:u,optional:!!h,rest:!!m,chained:m?d===1&&o[0]==="":!1}),m?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return Xp(c)}).join("")}).join("")}/?$`),params:t}}function s5(a){return a!==""&&!/^\([^)]+\)$/.test(a)}function r5(a){return a.slice(1).split("/").filter(s5)}function o5(a,t,i){const n={},s=a.slice(1),r=s.filter(l=>l!==void 0);let o=0;for(let l=0;lg).join("/"),o=0),d===void 0)if(c.rest)d="";else continue;if(!c.matcher||i[c.matcher](d)){n[c.name]=d;const g=t[l+1],h=s[l+1];g&&!g.rest&&g.optional&&h&&c.chained&&(o=0),!g&&!h&&Object.keys(n).length===r.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return n}function Xp(a){return a.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function l5({nodes:a,server_loads:t,dictionary:i,matchers:n}){const s=new Set(t);return Object.entries(i).map(([l,[c,d,g]])=>{const{pattern:h,params:m}=n5(l),p={id:l,exec:u=>{const f=h.exec(u);if(f)return o5(f,m,n)},errors:[1,...g||[]].map(u=>a[u]),layouts:[0,...d||[]].map(o),leaf:r(c)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function r(l){const c=l<0;return c&&(l=~l),[c,a[l]]}function o(l){return l===void 0?l:[s.has(l),a[l]]}}function vv(a,t=JSON.parse){try{return t(sessionStorage[a])}catch{}}function bv(a,t,i=JSON.stringify){const n=i(t);try{sessionStorage[a]=n}catch{}}const fr=globalThis.__sveltekit_1xyyov?.base??"",c5=globalThis.__sveltekit_1xyyov?.assets??fr??"",d5="0.9.3",yv="sveltekit:snapshot",wv="sveltekit:scroll",kv="sveltekit:states",u5="sveltekit:pageurl",Cc="sveltekit:history",yd="sveltekit:navigation",Ul={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Zp=location.origin;function xv(a){if(a instanceof URL)return a;let t=document.baseURI;if(!t){const i=document.getElementsByTagName("base");t=i.length?i[0].href:document.URL}return new URL(a,t)}function Rl(){return{x:pageXOffset,y:pageYOffset}}function Ac(a,t){return a.getAttribute(`data-sveltekit-${t}`)}const Sv={...Ul,"":Ul.hover};function Tv(a){let t=a.assignedSlot??a.parentNode;return t?.nodeType===11&&(t=t.host),t}function $v(a,t){for(;a&&a!==t;){if(a.nodeName.toUpperCase()==="A"&&a.hasAttribute("href"))return a;a=Tv(a)}}function em(a,t,i){let n;try{if(n=new URL(a instanceof SVGAElement?a.href.baseVal:a.href,document.baseURI),i&&n.hash.match(/^#[^/]/)){const l=location.hash.split("#")[1]||"/";n.hash=`#${l}${n.hash}`}}catch{}const s=a instanceof SVGAElement?a.target.baseVal:a.target,r=!n||!!s||Hu(n,t,i)||(a.getAttribute("rel")||"").split(/\s+/).includes("external"),o=n?.origin===Zp&&a.hasAttribute("download");return{url:n,external:r,target:s,download:o}}function Vu(a){let t=null,i=null,n=null,s=null,r=null,o=null,l=a;for(;l&&l!==document.documentElement;)n===null&&(n=Ac(l,"preload-code")),s===null&&(s=Ac(l,"preload-data")),t===null&&(t=Ac(l,"keepfocus")),i===null&&(i=Ac(l,"noscroll")),r===null&&(r=Ac(l,"reload")),o===null&&(o=Ac(l,"replacestate")),l=Tv(l);function c(d){switch(d){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Sv[n??"off"],preload_data:Sv[s??"off"],keepfocus:c(t),noscroll:c(i),reload:c(r),replace_state:c(o)}}function qv(a){const t=Tl(a);let i=!0;function n(){i=!0,t.update(o=>o)}function s(o){i=!1,t.set(o)}function r(o){let l;return t.subscribe(c=>{(l===void 0||i&&c!==l)&&o(l=c)})}return{notify:n,set:s,subscribe:r}}const Cv={v:Ho};function f5(){const{set:a,subscribe:t}=Tl(!1);let i;async function n(){clearTimeout(i);try{const s=await fetch(`${c5}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!s.ok)return!1;const o=(await s.json()).version!==d5;return o&&(a(!0),Cv.v(),clearTimeout(i)),o}catch{return!1}}return{subscribe:t,check:n}}function Hu(a,t,i){return a.origin!==Zp||!a.pathname.startsWith(t)?!0:i?a.pathname!==location.pathname:!1}const Av=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Av];const p5=new Set([...Av]);[...p5];function m5(a){return a.filter(t=>t!=null)}function Wu(a,t){return a+"/"+t}function tm(a){return a instanceof Wp||a instanceof Kp?a.status:500}function g5(a){return a instanceof Kp?a.text:"Internal Error"}let Fs,wd,am;const h5=Kn.toString().includes("$$")||/function \w+\(\) \{\}/.test(Kn.toString()),Gv="a:";h5?(Fs={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Gv)},wd={current:null},am={current:!1}):(Fs=new class{#e=Mn({});get data(){return e(this.#e)}set data(t){y(this.#e,t)}#t=Mn(null);get form(){return e(this.#t)}set form(t){y(this.#t,t)}#a=Mn(null);get error(){return e(this.#a)}set error(t){y(this.#a,t)}#l=Mn({});get params(){return e(this.#l)}set params(t){y(this.#l,t)}#n=Mn({id:null});get route(){return e(this.#n)}set route(t){y(this.#n,t)}#s=Mn({});get state(){return e(this.#s)}set state(t){y(this.#s,t)}#i=Mn(-1);get status(){return e(this.#i)}set status(t){y(this.#i,t)}#o=Mn(new URL(Gv));get url(){return e(this.#o)}set url(t){y(this.#o,t)}},wd=new class{#e=Mn(null);get current(){return e(this.#e)}set current(t){y(this.#e,t)}},am=new class{#e=Mn(!1);get current(){return e(this.#e)}set current(t){y(this.#e,t)}},Cv.v=()=>am.current=!0);function Fv(a){Object.assign(Fs,a)}const _5=new Set(["icon","shortcut icon","apple-touch-icon"]);let kd=null;const Wo=vv(wv)??{},xd=vv(yv)??{},mo={url:qv({}),page:qv({}),navigating:Tl(null),updated:f5()};function im(a){Wo[a]=Rl()}function v5(a,t){let i=a+1;for(;Wo[i];)delete Wo[i],i+=1;for(i=t+1;xd[i];)delete xd[i],i+=1}function Sd(a,t=!1){return t?location.replace(a.href):location.href=a.href,new Promise(Ho)}async function Mv(){if("serviceWorker"in navigator){const a=await navigator.serviceWorker.getRegistration(fr||"/");a&&await a.update()}}let nm,sm,Qu,go,rm,Yn;const Ku=[],Yu=[];let pr=null;function Ju(){pr?.fork?.then(a=>a?.discard()),pr=null,Fc={element:void 0,href:void 0}}const Xu=new Map,zv=new Set,b5=new Set,Td=new Set;let mn={branch:[],error:null,url:null},Ev=!1,Zu=!1,Uv=!0,$d=!1,qd=!1,Rv=!1,om=!1,Bv,is,mr,Qo;const ef=new Set,Pv=new Map,jv=new Map;async function y5(a,t,i){if(globalThis.__sveltekit_1xyyov.data){const{q:r={},p:o={},l={},f:c={}}=globalThis.__sveltekit_1xyyov.data;for(const d in r)r[d];for(const d in l)l[d];for(const d in c)c[d];for(const d in o)o[d]}document.URL!==location.href&&(location.href=location.href),Yn=a,await a.hooks.init?.(),nm=l5(a),go=document.documentElement,rm=t,sm=a.nodes[0],Qu=a.nodes[1],sm(),Qu(),is=history.state?.[Cc],mr=history.state?.[yd],is||(is=mr=Date.now(),history.replaceState({...history.state,[Cc]:is,[yd]:mr},""));const n=Wo[is];function s(){n&&(history.scrollRestoration="manual",scrollTo(n.x,n.y))}i?(s(),await E5(rm,i)):(await Gc({type:"enter",url:xv(Yn.hash?B5(new URL(location.href)):location.href),replace_state:!0}),s()),z5()}function w5(){Ku.length=0,om=!1}function Nv(a){Yu.some(t=>t?.snapshot)&&(xd[a]=Yu.map(t=>t?.snapshot?.capture()))}function Ov(a){xd[a]?.forEach((t,i)=>{Yu[i]?.snapshot?.restore(t)})}function Iv(){im(is),bv(wv,Wo),Nv(mr),bv(yv,xd)}async function k5(a,t,i,n){let s,r;t.invalidateAll&&Ju(),await Gc({type:"goto",url:xv(a),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:i,nav_token:n,accept:()=>{if(t.invalidateAll){om=!0,s=new Set;for(const[o,l]of Pv)for(const[c,d]of l)d.resource?.reset(),s.add(Wu(o,c));r=new Set;for(const[o,l]of jv)for(const c of l.keys())r.add(Wu(o,c))}t.invalidate&&t.invalidate.forEach(M5)}}),t.invalidateAll&&Ps().then(Ps).then(()=>{for(const[o,l]of Pv)for(const[c,{resource:d}]of l)s?.has(Wu(o,c))&&d.start();for(const[o,l]of jv)for(const[c,{resource:d}]of l)r?.has(Wu(o,c))&&d.reconnect()})}async function x5(a){if(a.id!==pr?.id){Ju();const t={};ef.add(t),pr={id:a.id,token:t,promise:Lv({...a,preload:t}).then(i=>(ef.delete(t),i.type==="loaded"&&i.state.error&&Ju(),i)),fork:null}}return pr.promise}async function lm(a){const t=(await af(a,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(i=>i[1]()))}async function Dv(a,t,i){const n={params:mn.params,route:{id:mn.route?.id??null},url:new URL(location.href)};if(mn={...a.state,nav:n},Fv(a.props.page),Bv=new Yn.root({target:t,props:{...a.props,stores:mo,components:Yu},hydrate:i,sync:!1,transformError:void 0}),await Promise.resolve(),i){const s={from:null,to:{...n,scroll:Wo[is]??Rl()},willUnload:!1,type:"enter",complete:Promise.resolve()};Td.forEach(r=>r(s))}Ov(mr),Zu=!0}async function tf({url:a,params:t,branch:i,errors:n,status:s,error:r,route:o,form:l}){let c="never";if(fr&&(a.pathname===fr||a.pathname===fr+"/"))c="always";else for(const u of i)u?.slash!==void 0&&(c=u.slash);a.pathname=Q4(a.pathname,c),a.search=a.search;const d={type:"loaded",state:{url:a,params:t,branch:i,error:r,route:o},props:{constructors:m5(i).map(u=>u.node.component),page:mm(Fs)}};l!==void 0&&(d.props.form=l);let g={},h=!Fs,m=0;for(let u=0;ul(new URL(o))))return!0;return!1}function dm(a,t){return a?.type==="data"?a:a?.type==="skip"?t??null:null}function $5(a,t){if(!a)return new Set(t.searchParams.keys());const i=new Set([...a.searchParams.keys(),...t.searchParams.keys()]);for(const n of i){const s=a.searchParams.getAll(n),r=t.searchParams.getAll(n);s.every(o=>r.includes(o))&&r.every(o=>s.includes(o))&&i.delete(n)}return i}function q5({error:a,url:t,route:i,params:n}){return{type:"loaded",state:{error:a,url:t,route:i,params:n,branch:[]},props:{page:mm(Fs),constructors:[]}}}async function Lv({id:a,invalidating:t,url:i,params:n,route:s,preload:r}){if(pr?.id===a)return ef.delete(pr.token),pr.promise;const{errors:o,layouts:l,leaf:c}=s,d=[...l,c];o.forEach(_=>_?.().catch(Ho)),d.forEach(_=>_?.[1]().catch(Ho));const g=mn.url?a!==nf(mn.url):!1,h=mn.route?s.id!==mn.route.id:!1,m=$5(mn.url,i);let p=!1;const u=d.map(async(_,b)=>{if(!_)return;const v=mn.branch[b];return _[1]===v?.loader&&!T5(p,h,g,m,v.universal?.uses,n)?v:(p=!0,cm({loader:_[1],url:i,params:n,route:s,parent:async()=>{const S={};for(let M=0;MPromise.resolve({}),server_data_node:dm(r)}),l={node:await Qu(),loader:Qu,universal:null,server:null,data:null};return tf({url:i,params:s,branch:[o,l],status:a,error:t,errors:[],route:null})}catch(o){if(o instanceof Qp){await k5(new URL(o.location,location.href),{},0);return}const l=await Yn.get_error_template(),c=await Mc(o,{url:i,params:s,route:n}),d=String(c?.message??"").replace(/&/g,"&").replace(//g,">"),g=l({status:a,message:d}),h=new DOMParser().parseFromString(g,"text/html");throw document.documentElement.replaceChild(document.adoptNode(h.head),document.head),document.documentElement.replaceChild(document.adoptNode(h.body),document.body),o}}async function A5(a){const t=a.href;if(Xu.has(t))return Xu.get(t);let i;try{const n=(async()=>{let s=await Yn.hooks.reroute({url:new URL(a),fetch:async(r,o)=>S5(r,o,a).promise})??a;if(typeof s=="string"){const r=new URL(a);Yn.hash?r.hash=s:r.pathname=s,s=r}return s})();Xu.set(t,n),i=await n}catch{Xu.delete(t);return}return i}async function af(a,t){if(a&&!Hu(a,fr,Yn.hash)){const i=await A5(a);if(!i)return;const n=G5(i);for(const s of nm){const r=s.exec(n);if(r)return{id:nf(a),invalidating:t,route:s,params:Y4(r),url:a}}}}function G5(a){return K4(Yn.hash?a.hash.replace(/^#/,"").replace(/[?#].+/,""):a.pathname.slice(fr.length))||"/"}function nf(a){return(Yn.hash?a.hash.replace(/^#/,""):a.pathname)+a.search}function Vv({url:a,type:t,intent:i,delta:n,event:s,scroll:r}){let o=!1;const l=pm(mn,i,a,t,r??null);n!==void 0&&(l.navigation.delta=n),s!==void 0&&(l.navigation.event=s);const c={...l.navigation,cancel:()=>{o=!0,l.reject(new Error("navigation cancelled"))}};return $d||zv.forEach(d=>d(c)),o?null:l}async function Gc({type:a,url:t,popped:i,keepfocus:n,noscroll:s,replace_state:r,state:o={},redirect_count:l=0,nav_token:c={},accept:d=Ho,block:g=Ho,event:h}){const m=Qo;Qo=c;const p=await af(t,!1),u=a==="enter"?pm(mn,p,t,a):Vv({url:t,type:a,delta:i?.delta,intent:p,scroll:i?.scroll,event:h});if(!u){g(),Qo===c&&(Qo=m);return}const f=is,_=mr;d(),$d=!0,Zu&&u.navigation.type!=="enter"&&mo.navigating.set(wd.current=u.navigation);let b=p&&await Lv(p);if(!b){if(Hu(t,fr,Yn.hash))return await Sd(t,r);b=await Hv(t,{id:null},await Mc(new Kp(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,r)}if(t=p?.url||t,Qo!==c){u.reject(new Error("navigation aborted"));return}if(!b)return;if(b.type==="redirect"){if(l<20){await Gc({type:a,url:new URL(b.location,t),popped:i,keepfocus:n,noscroll:s,replace_state:r,state:o,redirect_count:l+1,nav_token:c}),u.fulfil(void 0);return}if(b=await um({status:500,error:await Mc(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!b)return}else if(b.props.page.status>=400&&await mo.updated.check())return await Mv(),await Sd(t,r);if(w5(),im(f),Nv(_),b.props.page.url.pathname!==t.pathname&&(t.pathname=b.props.page.url.pathname),o=i?i.state:o,!i){const B=r?0:1,C={[Cc]:is+=B,[yd]:mr+=B,[kv]:o};(r?history.replaceState:history.pushState).call(history,C,"",t),r||v5(is,mr)}const v=p&&pr?.id===p.id?pr.fork:null;pr?.fork&&!v?Ju():(pr=null,Fc={element:void 0,href:void 0}),b.props.page.state=o;let T;if(Zu){const B=(await Promise.all(Array.from(b5,G=>G(u.navigation)))).filter(G=>typeof G=="function");if(B.length>0){let G=function(){B.forEach(A=>{Td.delete(A)})};B.push(G),B.forEach(A=>{Td.add(A)})}const C=u.navigation.to;mn={...b.state,nav:{params:C.params,route:C.route,url:C.url}},b.props.page&&(b.props.page.url=t),!n&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();const j=v&&await v;j?T=j.commit():(kd=null,Bv.$set(b.props),kd&&Object.assign(b.props.page,kd),Fv(b.props.page),T=r4?.()),Rv=!0}else await Dv(b,rm,!1);const{activeElement:S}=document;if(await T,await Ps(),await Ps(),Qo!==c){u.reject(new Error("navigation aborted"));return}b.props.page&&kd&&Object.assign(b.props.page,kd);let M=null;if(Uv){const B=i?i.scroll:s?Rl():null;B?scrollTo(B.x,B.y):(M=t.hash&&document.getElementById(Wv(t)))?M.scrollIntoView():scrollTo(0,0)}const P=document.activeElement!==S&&document.activeElement!==document.body;!n&&!P&&R5(t,!M),Uv=!0,$d=!1,u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=Rl()),Td.forEach(B=>B(u.navigation)),a==="popstate"&&Ov(mr),mo.navigating.set(wd.current=null)}async function Hv(a,t,i,n,s){return a.origin===Zp&&a.pathname===location.pathname&&!Ev?await um({status:n,error:i,url:a,route:t}):await Sd(a,s)}let Fc={element:void 0,href:void 0};function F5(){let a,t;go.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(a),a=setTimeout(()=>{s(l,Ul.hover)},20)});function i(o){o.defaultPrevented||s(o.composedPath()[0],Ul.tap)}go.addEventListener("mousedown",i),go.addEventListener("touchstart",i,{passive:!0});const n=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(lm(new URL(l.target.href)),n.unobserve(l.target))},{threshold:0});async function s(o,l){const c=$v(o,go),d=c===Fc.element&&c?.href===Fc.href&&l>=t;if(!c||d)return;const{url:g,external:h,download:m}=em(c,fr,Yn.hash);if(h||m)return;const p=Vu(c),u=g&&nf(mn.url)===nf(g);if(!(p.reload||u))if(l<=p.preload_data){Fc={element:c,href:c.href},t=Ul.tap;const f=await af(g,!1);if(!f)return;x5(f)}else l<=p.preload_code&&(Fc={element:c,href:c.href},t=l,lm(g))}function r(){n.disconnect();for(const o of go.querySelectorAll("a")){const{url:l,external:c,download:d}=em(o,fr,Yn.hash);if(c||d)continue;const g=Vu(o);g.reload||(g.preload_code===Ul.viewport&&n.observe(o),g.preload_code===Ul.eager&&lm(l))}}Td.add(r),r()}function Mc(a,t){if(a instanceof Wp)return a.body;const i=tm(a),n=g5(a);return Yn.hooks.handleError({error:a,event:t,status:i,message:n})??{message:n}}function M5(a){if(typeof a=="function")Ku.push(a);else{const{href:t}=new URL(a,location.href);Ku.push(i=>i.href===t)}}function z5(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let i=!1;if(Iv(),!$d){const n=pm(mn,void 0,null,"leave"),s={...n.navigation,cancel:()=>{i=!0,n.reject(new Error("navigation cancelled"))}};zv.forEach(r=>r(s))}i?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Iv()}),navigator.connection?.saveData||F5(),go.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const i=$v(t.composedPath()[0],go);if(!i)return;const{url:n,external:s,target:r,download:o}=em(i,fr,Yn.hash);if(!n)return;if(r==="_parent"||r==="_top"){if(window.parent!==window)return}else if(r&&r!=="_self")return;const l=Vu(i);if(!(i instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||o)return;const[d,g]=(Yn.hash?n.hash.replace(/^#/,""):n.href).split("#"),h=d===Yp(location);if(s||l.reload&&(!h||!g)){Vv({url:n,type:"link",event:t})?$d=!0:t.preventDefault();return}if(g!==void 0&&h){const[,m]=mn.url.href.split("#");if(m===g){if(t.preventDefault(),g===""||g==="top"&&i.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const p=i.ownerDocument.getElementById(decodeURIComponent(g));p&&(p.scrollIntoView(),p.focus())}return}if(qd=!0,im(is),a(n),!l.replace_state)return;qd=!1}t.preventDefault(),await new Promise(m=>{requestAnimationFrame(()=>{setTimeout(m,0)}),setTimeout(m,100)}),await Gc({type:"link",url:n,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??n.href===location.href,event:t})}),go.addEventListener("submit",t=>{if(t.defaultPrevented)return;const i=HTMLFormElement.prototype.cloneNode.call(t.target),n=t.submitter;if((n?.formTarget||i.target)==="_blank"||(n?.formMethod||i.method)!=="get")return;const o=new URL(n?.hasAttribute("formaction")&&n?.formAction||i.action);if(Hu(o,fr,!1))return;const l=t.target,c=Vu(l);if(c.reload)return;t.preventDefault(),t.stopPropagation();const d=new FormData(l,n);o.search=new URLSearchParams(d).toString(),Gc({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!fm){if(t.state?.[Cc]){const i=t.state[Cc];if(Qo={},i===is)return;const n=Wo[i],s=t.state[kv]??{},r=new URL(t.state[u5]??location.href),o=t.state[yd],l=mn.url?Yp(location)===Yp(mn.url):!1;if(o===mr&&(Rv||l)){s!==Fs.state&&(Fs.state=s),a(r),Wo[is]=Rl(),n&&scrollTo(n.x,n.y),is=i;return}const d=i-is;await Gc({type:"popstate",url:r,popped:{state:s,scroll:n,delta:d},accept:()=>{is=i,mr=o},block:()=>{history.go(-d)},nav_token:Qo,event:t})}else if(!qd){const i=new URL(location.href);a(i),Yn.hash&&location.reload()}}}),addEventListener("hashchange",()=>{qd&&(qd=!1,history.replaceState({...history.state,[Cc]:++is,[yd]:mr},"",location.href))});for(const t of document.querySelectorAll("link"))_5.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&mo.navigating.set(wd.current=null)});function a(t){mn.url=Fs.url=t,mo.page.set(mm(Fs)),mo.page.notify()}}async function E5(a,{status:t=200,error:i,node_ids:n,params:s,route:r,server_route:o,data:l,form:c}){Ev=!0;const d=new URL(location.href);let g;({params:s={},route:r={id:null}}=await af(d,!1)||{}),g=nm.find(({id:p})=>p===r.id);let h,m=!0;try{const p=n.map(async(f,_)=>{const b=l[_];return b?.uses&&(b.uses=U5(b.uses)),cm({loader:Yn.nodes[f],url:d,params:s,route:r,parent:async()=>{const v={};for(let T=0;T<_;T+=1)Object.assign(v,(await p[T]).data);return v},server_data_node:dm(b)})}),u=await Promise.all(p);if(g){const f=g.layouts;for(let _=0;_{const l=history.state;fm=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(l,"",a),t&&scrollTo(r,o),fm=!1})}else{const r=document.body,o=r.getAttribute("tabindex");r.tabIndex=-1,r.focus({preventScroll:!0,focusVisible:!1}),o!==null?r.setAttribute("tabindex",o):r.removeAttribute("tabindex")}const s=getSelection();if(s&&s.type!=="None"){const r=[];for(let o=0;o{if(s.rangeCount===r.length){for(let o=0;o{r=d,o=g});return l.catch(Ho),{navigation:{from:{params:a.params,route:{id:a.route?.id??null},url:a.url,scroll:Rl()},to:i&&{params:t?.params??null,route:{id:t?.route?.id??null},url:i,scroll:s},willUnload:!t,type:n,complete:l},fulfil:r,reject:o}}function mm(a){return{data:a.data,error:a.error,form:a.form,params:a.params,route:a.route,state:a.state,status:a.status,url:a.url}}function B5(a){const t=new URL(a);return t.hash=decodeURIComponent(a.hash),t}function Wv(a){let t;if(Yn.hash){const[,,i]=a.hash.split("#",3);t=i??""}else t=a.hash.slice(1);return decodeURIComponent(t)}const YP="modulepreload",JP=function(a,t){return new URL(a,t).href},XP={},Bl=function(t,i,n){let s=Promise.resolve();function r(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&r(l.reason);return t().catch(r)})},P5={},j5="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(j5);var N5=ae('
'),O5=ae(" ",1);function I5(a,t){zi(t,!0);let i=xe(t,"components",23,()=>[]),n=xe(t,"data_0",3,null),s=xe(t,"data_1",3,null);P1(()=>t.stores.page.set(t.page)),ju(()=>{t.stores,t.page,t.constructors,i(),t.form,n(),s(),t.stores.page.notify()});let r=Mn(!1),o=Mn(!1),l=Mn(null);Kn(()=>{const f=t.stores.page.subscribe(()=>{e(r)&&(y(o,!0),Ps().then(()=>{y(l,document.title||"untitled page",!0)}))});return y(r,!0),f});const c=La(()=>t.constructors[1]);var d=O5(),g=ht(d);{var h=f=>{const _=La(()=>t.constructors[0]);var b=ys(),v=ht(b);gd(v,()=>e(_),(T,S)=>{Ci(S(T,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(M,P)=>{var B=ys(),C=ht(B);gd(C,()=>e(c),(j,G)=>{Ci(G(j,{get data(){return s()},get form(){return t.form},get params(){return t.page.params}}),A=>i()[1]=A,()=>i()?.[1])}),J(M,B)},$$slots:{default:!0}}),M=>i()[0]=M,()=>i()?.[0])}),J(f,b)},m=f=>{const _=La(()=>t.constructors[0]);var b=ys(),v=ht(b);gd(v,()=>e(_),(T,S)=>{Ci(S(T,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),M=>i()[0]=M,()=>i()?.[0])}),J(f,b)};ve(g,f=>{t.constructors[1]?f(h):f(m,-1)})}var p=q(g,2);{var u=f=>{var _=N5(),b=k(_);{var v=T=>{var S=Bp();ie(()=>W(S,e(l))),J(T,S)};ve(b,T=>{e(o)&&T(v)})}w(_),J(f,_)};ve(p,f=>{e(r)&&f(u)})}J(a,d),Ei()}const D5=V4(I5),L5=[()=>Bl(()=>Promise.resolve().then(()=>Y5),void 0,Gn&&Gn.tagName.toUpperCase()==="SCRIPT"&&Gn.src||new URL("_app/immutable/bundle.BPEI3Cn2.js",document.baseURI).href),()=>Bl(()=>Promise.resolve().then(()=>eS),void 0,Gn&&Gn.tagName.toUpperCase()==="SCRIPT"&&Gn.src||new URL("_app/immutable/bundle.BPEI3Cn2.js",document.baseURI).href),()=>Bl(()=>Promise.resolve().then(()=>Lz),void 0,Gn&&Gn.tagName.toUpperCase()==="SCRIPT"&&Gn.src||new URL("_app/immutable/bundle.BPEI3Cn2.js",document.baseURI).href)],V5=[],H5={"/":[2]},gm={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},Qv=Object.fromEntries(Object.entries(gm.transport).map(([a,t])=>[a,t.decode])),W5=Object.fromEntries(Object.entries(gm.transport).map(([a,t])=>[a,t.encode])),Kv=Object.freeze(Object.defineProperty({__proto__:null,decode:(a,t)=>Qv[a](t),decoders:Qv,dictionary:H5,encoders:W5,get_error_template:()=>Bl(()=>Promise.resolve().then(()=>Vz),void 0,Gn&&Gn.tagName.toUpperCase()==="SCRIPT"&&Gn.src||new URL("_app/immutable/bundle.BPEI3Cn2.js",document.baseURI).href).then(a=>a.default),hash:!0,hooks:gm,matchers:P5,nodes:L5,root:D5,server_loads:V5},Symbol.toStringTag,{value:"Module"}));function Q5(a,t){y5(Kv,a,t)}function K5(a,t){var i=ys(),n=ht(i);ov(n,()=>t.children),J(a,i)}const Y5=Object.freeze(Object.defineProperty({__proto__:null,component:K5},Symbol.toStringTag,{value:"Module"})),J5={get error(){return Fs.error},get status(){return Fs.status}};mo.updated.check;const Yv=J5;var X5=ae("

",1);function Z5(a,t){zi(t,!0);var i=X5(),n=ht(i),s=k(n,!0);w(n);var r=q(n,2),o=k(r,!0);w(r),ie(()=>{W(s,Yv.status),W(o,Yv.error?.message)}),J(a,i),Ei()}const eS=Object.freeze(Object.defineProperty({__proto__:null,component:Z5},Symbol.toStringTag,{value:"Module"}));F6();const Pl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const hm=(...a)=>a.filter((t,i,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===i).join(" ").trim();function _m(a){return a!=null}function tS(a,t={}){const i=t.attributeNames??{},n=m=>i[m]??m,s=a.size??a.width??Pl.width,r=a.size??a.height??Pl.height,o=a.aliases?.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`)??[],l=[...a.name?[`lucide-${a.name}`]:[],...o],c=t.className?.split(" ").filter(Boolean)??[],d=t.includeDefaultClasses===!1?hm(...c):hm("lucide",...l,...c),g=t.absoluteStrokeWidth?Number(t.strokeWidth??Pl["stroke-width"])*Number(a.size??a.width??Pl.width)/Number(t.size??t.width??Pl.width):t.strokeWidth??Pl["stroke-width"];return["svg",{...Object.entries(Pl).reduce((m,[p,u])=>(m[n(p)]=u,m),{}),..."color"in t&&t.color&&{[n("stroke")]:t.color},..."size"in t&&_m(t.size)&&{[n("width")]:t.size,[n("height")]:t.size},..."width"in t&&_m(t.width)&&{[n("width")]:t.width},..."height"in t&&_m(t.height)&&{[n("height")]:t.height},[n("stroke-width")]:g,...d&&{[n("class")]:d},[n("viewBox")]:`0 0 ${s} ${r}`,...t.hasA11yProp===!1?{[n("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},a.node.map(m=>{const[p,u,f]=m,_=t.nonScalingStroke?{[n("vector-effect")]:"non-scaling-stroke",...u}:u;return f?[p,_,f]:[p,_]})]}const aS=a=>{for(const t in a)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const iS=Symbol("lucide-context"),nS=()=>M6(iS);var sS=new Set(["$$slots","$$events","$$legacy","color","size","width","height","strokeWidth","absoluteStrokeWidth","nonScalingStroke","iconNode","icon","class","children"]),rS=po("");function Ha(a,t){zi(t,!0);const i=nS()??{},n=xe(t,"color",19,()=>i.color??"currentColor"),s=xe(t,"size",19,()=>i.size??24),r=xe(t,"width",19,s),o=xe(t,"height",19,s),l=xe(t,"strokeWidth",19,()=>i.strokeWidth??2),c=xe(t,"absoluteStrokeWidth",19,()=>i.absoluteStrokeWidth??!1),d=xe(t,"nonScalingStroke",19,()=>i.nonScalingStroke??!1),g=xe(t,"iconNode",19,()=>[]),h=xe(t,"icon",19,()=>({node:g(),aliases:[],size:24})),m=Na(t,sS),p=La(()=>!!t.children||aS(m)),u=La(()=>tS(h(),{color:n(),width:r(),height:o(),strokeWidth:l(),absoluteStrokeWidth:c(),nonScalingStroke:d(),className:hm("lucide-icon",i.class),hasA11yProp:e(p),attributes:m})),f=La(()=>ed(e(u),3)),_=La(()=>e(f)[1]),b=La(()=>e6(e(f)[2],()=>[],!0)),v=La(()=>({...e(_),class:[...e(_).class.split(" "),t.class]}));var T=rS();mv(T,()=>({...e(v)}));var S=k(T);Ct(S,17,()=>e(b),Kt,(P,B)=>{var C=La(()=>ed(e(B),2));let j=()=>e(C)[0],G=()=>e(C)[1];var A=ys(),N=ht(A);C4(N,j,!0,(H,E)=>{mv(H,()=>({...G()}))}),J(P,A)});var M=q(S);ov(M,()=>t.children??No),w(T),J(a,T),Ei()}var oS=new Set(["$$slots","$$events","$$legacy"]);function Jv(a,t){let i=Na(t,oS);const n={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var lS=new Set(["$$slots","$$events","$$legacy"]);function Xv(a,t){let i=Na(t,lS);const n={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var cS=new Set(["$$slots","$$events","$$legacy"]);function sf(a,t){let i=Na(t,cS);const n={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3"}],["path",{d:"M6 6v11"}],["path",{d:"M10 3v18"}],["path",{d:"M14 8v7"}],["path",{d:"M18 5v13"}],["path",{d:"M22 10v3"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var dS=new Set(["$$slots","$$events","$$legacy"]);function vm(a,t){let i=Na(t,dS);const n={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var uS=new Set(["$$slots","$$events","$$legacy"]);function bm(a,t){let i=Na(t,uS);const n={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var fS=new Set(["$$slots","$$events","$$legacy"]);function rf(a,t){let i=Na(t,fS);const n={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var pS=new Set(["$$slots","$$events","$$legacy"]);function of(a,t){let i=Na(t,pS);const n={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var mS=new Set(["$$slots","$$events","$$legacy"]);function Zv(a,t){let i=Na(t,mS);const n={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var gS=new Set(["$$slots","$$events","$$legacy"]);function hS(a,t){let i=Na(t,gS);const n={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var _S=new Set(["$$slots","$$events","$$legacy"]);function Cd(a,t){let i=Na(t,_S);const n={name:"download",size:24,node:[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var vS=new Set(["$$slots","$$events","$$legacy"]);function bS(a,t){let i=Na(t,vS);const n={name:"file-headphone",size:24,node:[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0"}]],aliases:["file-audio","file-audio-2"]};Ha(a,Va(()=>i,{get icon(){return n}}))}var yS=new Set(["$$slots","$$events","$$legacy"]);function Ko(a,t){let i=Na(t,yS);const n={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var wS=new Set(["$$slots","$$events","$$legacy"]);function zc(a,t){let i=Na(t,wS);const n={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var kS=new Set(["$$slots","$$events","$$legacy"]);function eb(a,t){let i=Na(t,kS);const n={name:"languages",size:24,node:[["path",{d:"m5 8 6 6"}],["path",{d:"m4 14 6-6 2-3"}],["path",{d:"M2 5h12"}],["path",{d:"M7 2h1"}],["path",{d:"m22 22-5-10-5 10"}],["path",{d:"M14 18h6"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var xS=new Set(["$$slots","$$events","$$legacy"]);function SS(a,t){let i=Na(t,xS);const n={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]],aliases:["layers-3"]};Ha(a,Va(()=>i,{get icon(){return n}}))}var TS=new Set(["$$slots","$$events","$$legacy"]);function $S(a,t){let i=Na(t,TS);const n={name:"list-filter",size:24,node:[["path",{d:"M2 5h20"}],["path",{d:"M6 12h12"}],["path",{d:"M9 19h6"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var qS=new Set(["$$slots","$$events","$$legacy"]);function CS(a,t){let i=Na(t,qS);const n={name:"list",size:24,node:[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var AS=new Set(["$$slots","$$events","$$legacy"]);function GS(a,t){let i=Na(t,AS);const n={name:"merge",size:24,node:[["path",{d:"m8 6 4-4 4 4"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22"}],["path",{d:"m20 22-5-5"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var FS=new Set(["$$slots","$$events","$$legacy"]);function Ad(a,t){let i=Na(t,FS);const n={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var MS=new Set(["$$slots","$$events","$$legacy"]);function ym(a,t){let i=Na(t,MS);const n={name:"mic",size:24,node:[["path",{d:"M12 19v3"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var zS=new Set(["$$slots","$$events","$$legacy"]);function ES(a,t){let i=Na(t,zS);const n={name:"minus",size:24,node:[["path",{d:"M5 12h14"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var US=new Set(["$$slots","$$events","$$legacy"]);function tb(a,t){let i=Na(t,US);const n={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var RS=new Set(["$$slots","$$events","$$legacy"]);function Ec(a,t){let i=Na(t,RS);const n={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var BS=new Set(["$$slots","$$events","$$legacy"]);function Ir(a,t){let i=Na(t,BS);const n={name:"plus",size:24,node:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var PS=new Set(["$$slots","$$events","$$legacy"]);function jS(a,t){let i=Na(t,PS);const n={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var NS=new Set(["$$slots","$$events","$$legacy"]);function OS(a,t){let i=Na(t,NS);const n={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var IS=new Set(["$$slots","$$events","$$legacy"]);function DS(a,t){let i=Na(t,IS);const n={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M12 7v5l4 2"}]],aliases:["history"]};Ha(a,Va(()=>i,{get icon(){return n}}))}var LS=new Set(["$$slots","$$events","$$legacy"]);function ab(a,t){let i=Na(t,LS);const n={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var VS=new Set(["$$slots","$$events","$$legacy"]);function HS(a,t){let i=Na(t,VS);const n={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var WS=new Set(["$$slots","$$events","$$legacy"]);function ib(a,t){let i=Na(t,WS);const n={name:"scissors",size:24,node:[["circle",{cx:"6",cy:"6",r:"3"}],["path",{d:"M8.12 8.12 12 12"}],["path",{d:"M20 4 8.12 15.88"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M14.8 14.8 20 20"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var QS=new Set(["$$slots","$$events","$$legacy"]);function nb(a,t){let i=Na(t,QS);const n={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var KS=new Set(["$$slots","$$events","$$legacy"]);function sb(a,t){let i=Na(t,KS);const n={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var YS=new Set(["$$slots","$$events","$$legacy"]);function Uc(a,t){let i=Na(t,YS);const n={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var JS=new Set(["$$slots","$$events","$$legacy"]);function ho(a,t){let i=Na(t,JS);const n={name:"trash",size:24,node:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],aliases:["trash-2"]};Ha(a,Va(()=>i,{get icon(){return n}}))}var XS=new Set(["$$slots","$$events","$$legacy"]);function ZS(a,t){let i=Na(t,XS);const n={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var eT=new Set(["$$slots","$$events","$$legacy"]);function wm(a,t){let i=Na(t,eT);const n={name:"upload",size:24,node:[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var tT=new Set(["$$slots","$$events","$$legacy"]);function Gd(a,t){let i=Na(t,tT);const n={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5"}],["path",{d:"M20 21a8 8 0 0 0-16 0"}]],aliases:["user-2"]};Ha(a,Va(()=>i,{get icon(){return n}}))}var aT=new Set(["$$slots","$$events","$$legacy"]);function lf(a,t){let i=Na(t,aT);const n={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var iT=new Set(["$$slots","$$events","$$legacy"]);function jl(a,t){let i=Na(t,iT);const n={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var nT=new Set(["$$slots","$$events","$$legacy"]);function sT(a,t){let i=Na(t,nT);const n={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var rT=new Set(["$$slots","$$events","$$legacy"]);function rb(a,t){let i=Na(t,rT);const n={name:"x",size:24,node:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var oT=new Set(["$$slots","$$events","$$legacy"]);function lT(a,t){let i=Na(t,oT);const n={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}var cT=new Set(["$$slots","$$events","$$legacy"]);function dT(a,t){let i=Na(t,cT);const n={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]]};Ha(a,Va(()=>i,{get icon(){return n}}))}function cf(a,t,i){for(let n=0;na.getChannelData(c));let o=44;for(let l=0;lt.decodeAudioData(await c.arrayBuffer()))),n=i[0].sampleRate,s=i[0].numberOfChannels;for(const c of i)if(c.sampleRate!==n||c.numberOfChannels!==s)throw new Error("Generated chunks use different audio formats and cannot be joined.");const r=i.reduce((c,d)=>c+d.length,0),o=t.createBuffer(s,r,n);let l=0;for(const c of i){for(let d=0;dn[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}const X_=!1;var ep=Array.isArray,Yx=Array.prototype.indexOf,$u=Array.prototype.includes,qu=Array.from,tp=Object.defineProperty,so=Object.getOwnPropertyDescriptor,Z_=Object.getOwnPropertyDescriptors,Jx=Object.prototype,Xx=Array.prototype,ap=Object.getPrototypeOf,e1=Object.isExtensible;function Xc(a){return typeof a=="function"}const Mo=()=>{};function Zx(a){return a()}function ip(a){for(var t=0;t{a=n,t=s});return{promise:i,resolve:a,reject:t}}function e6(a,t,i=!1){return a===void 0?i?t():t:a}function Zc(a,t){if(Array.isArray(a))return a;if(t===void 0||!(Symbol.iterator in a))return Array.from(a);const i=[];for(const n of a)if(i.push(n),i.length===t)break;return i}const Yn=2,hl=4,ed=8,np=1<<24,$r=16,ar=32,ro=64,sp=128,ir=512,Bn=1024,Pn=2048,nr=4096,_s=8192,Bs=16384,_l=32768,rp=1<<25,oo=65536,Cu=1<<17,a1=1<<18,lc=1<<19,i1=1<<20,Nr=1<<25,vl=65536,Au=1<<21,cc=1<<22,zo=1<<23,Or=Symbol("$state"),op=Symbol("legacy props"),t6=Symbol(""),n1=Symbol("attributes"),lp=Symbol("class"),cp=Symbol("style"),dp=Symbol("text"),td=Symbol("form reset"),ad=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},id=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),a6=1,nd=3,dc=8;function up(a){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function i6(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function n6(a,t,i){throw new Error("https://svelte.dev/e/each_key_duplicate")}function s6(a){throw new Error("https://svelte.dev/e/effect_in_teardown")}function r6(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function o6(a){throw new Error("https://svelte.dev/e/effect_orphan")}function l6(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function c6(){throw new Error("https://svelte.dev/e/hydration_failed")}function d6(a){throw new Error("https://svelte.dev/e/props_invalid_value")}function u6(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function f6(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function p6(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function m6(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const g6=1,h6=2,s1=4,_6=8,v6=16,b6=1,y6=2,w6=4,k6=8,x6=16,r1=1,S6=2,fp="[",pp="[!",o1="[?",mp="]",uc={},jn=Symbol("uninitialized"),l1="http://www.w3.org/1999/xhtml",T6="http://www.w3.org/2000/svg",$6="@attach";function q6(){console.warn("https://svelte.dev/e/derived_inert")}function Gu(a){console.warn("https://svelte.dev/e/hydration_mismatch")}function C6(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function A6(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let fa=!1;function ts(a){fa=a}let ri;function Gn(a){if(a===null)throw Gu(),uc;return ri=a}function lo(){return Gn(sr(ri))}function w(a){if(fa){if(sr(ri)!==null)throw Gu(),uc;ri=a}}function zt(a=1){if(fa){for(var t=a,i=ri;t--;)i=sr(i);ri=i}}function sd(a=!0){for(var t=0,i=ri;;){if(i.nodeType===dc){var n=i.data;if(n===mp){if(t===0)return i;t-=1}else(n===fp||n===pp||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var s=sr(i);a&&i.remove(),i=s}}function gp(a){if(!a||a.nodeType!==dc)throw Gu(),uc;return a.data}function c1(a){return a===this.v}function d1(a,t){return a!=a?t==t:a!==t||a!==null&&typeof a=="object"||typeof a=="function"}function u1(a){return!d1(a,this.v)}let fc=!1,G6=!1;function F6(){fc=!0}let ji=null;function pc(a){ji=a}function M6(a){return z6().get(a)}function Fi(a,t=!1,i){ji={p:ji,i:!1,c:null,e:null,s:a,x:null,r:ti,l:fc&&!t?{s:null,u:null,$:[]}:null}}function Mi(a){var t=ji,i=t.e;if(i!==null){t.e=null;for(var n of i)B1(n)}return a!==void 0&&(t.x=a),t.i=!0,ji=t.p,a??{}}function mc(){return!fc||ji!==null&&ji.l===null}function z6(a){return ji===null&&up(),ji.c??=new Map(E6(ji)||void 0)}function E6(a){let t=a.p;for(;t!==null;){const i=t.c;if(i!==null)return i;t=t.p}return null}let bl=[];function f1(){var a=bl;bl=[],ip(a)}function qr(a){if(bl.length===0&&!od){var t=bl;queueMicrotask(()=>{t===bl&&f1()})}bl.push(a)}function U6(){for(;bl.length>0;)f1()}function p1(a){var t=ti;if(t===null)return vi.f|=zo,a;if((t.f&_l)===0&&(t.f&hl)===0)throw a;Eo(a,t)}function Eo(a,t){if(!(t!==null&&(t.f&Bs)!==0)){for(;t!==null;){if((t.f&sp)!==0){if((t.f&_l)===0)throw a;try{t.b.error(a);return}catch(i){a=i}}t=t.parent}throw a}}const R6=-7169;function pn(a,t){a.f=a.f&R6|t}function hp(a){(a.f&ir)!==0||a.deps===null?pn(a,Bn):pn(a,nr)}function m1(a){if(a!==null)for(const t of a)(t.f&Yn)===0||(t.f&vl)===0||(t.f^=vl,m1(t.deps))}function g1(a,t,i){(a.f&Pn)!==0?t.add(a):(a.f&nr)!==0&&i.add(a),m1(a.deps),pn(a,Bn)}function h1(a,t,i){if(a==null)return t(void 0),Mo;const n=x(()=>a.subscribe(t,i));return n.unsubscribe?()=>n.unsubscribe():n}const gc=[];function yl(a,t=Mo){let i=null;const n=new Set;function s(l){if(d1(a,l)&&(a=l,i)){const c=!gc.length;for(const d of n)d[1](),gc.push(d,a);if(c){for(let d=0;d{n.delete(d),n.size===0&&i&&(i(),i=null)}}return{set:s,update:r,subscribe:o}}function Fu(a){let t;return h1(a,i=>t=i)(),t}let Mu=!1,_p=Symbol("unmounted");function zu(a,t,i){const n=i[t]??={store:null,source:Y(void 0),unsubscribe:Mo};if(n.store!==a&&!(_p in i))if(n.unsubscribe(),n.store=a??null,a==null)n.source.v=void 0,n.unsubscribe=Mo;else{var s=!0;n.unsubscribe=h1(a,r=>{s?n.source.v=r:y(n.source,r)}),s=!1}return a&&_p in i?Fu(a):e(n.source)}function vp(){const a={};function t(){kc(()=>{for(var i in a)a[i].unsubscribe();tp(a,_p,{enumerable:!1,value:!0})})}return[a,t]}function B6(a){var t=Mu;try{return Mu=!1,[a(),Mu]}finally{Mu=t}}function P6(a,t){if(t){const i=document.body;a.autofocus=!0,qr(()=>{document.activeElement===i&&a.focus()})}}function sn(a){fa&&vs(a)!==null&&Gp(a)}let _1=!1;function v1(){_1||(_1=!0,document.addEventListener("reset",a=>{Promise.resolve().then(()=>{if(!a.defaultPrevented)for(const t of a.target.elements)t[td]?.()})},{capture:!0}))}function hc(a){var t=vi,i=ti;or(null),lr(null);try{return a()}finally{or(t),lr(i)}}function bp(a,t,i,n=i){a.addEventListener(t,()=>hc(i));const s=a[td];s?a[td]=()=>{s(),n(!0)}:a[td]=()=>n(!0),v1()}function j6(a){let t=0,i=kl(0),n;return()=>{Fp()&&(e(i),xc(()=>(t===0&&(n=x(()=>a(()=>ld(i)))),t+=1,()=>{qr(()=>{t-=1,t===0&&(n?.(),n=void 0,ld(i))})})))}}var N6=oo|lc;function O6(a,t,i,n){new I6(a,t,i,n)}class I6{parent;is_pending=!1;transform_error;#e;#t=fa?ri:null;#a;#l;#n;#s=null;#i=null;#o=null;#r=null;#g=0;#c=0;#d=!1;#f=new Set;#h=new Set;#u=null;#v=j6(()=>(this.#u=kl(this.#g),()=>{this.#u=null}));constructor(t,i,n,s){this.#e=t,this.#a=i,this.#l=r=>{var o=ti;o.b=this,o.f|=sp,n(r)},this.parent=ti.b,this.transform_error=s??this.parent?.transform_error??(r=>r),this.#n=Ro(()=>{if(fa){const r=this.#t;lo();const o=r.data===pp;if(r.data.startsWith(o1)){const c=JSON.parse(r.data.slice(o1.length));this.#b(c)}else o?this.#k():this.#_()}else this.#p()},N6),fa&&(this.#e=ri)}#_(){try{this.#s=bs(()=>this.#l(this.#e))}catch(t){this.error(t)}}#b(t){const i=this.#a.failed,{reset:n,invoke_onerror:s}=this.#y(t);qr(s),i&&(this.#o=bs(()=>{i(this.#e,()=>t,()=>n)}))}#y(t){var i=!1,n=!1;const s=()=>{if(i){A6();return}i=!0,n&&m6(),this.#o!==null&&Sl(this.#o,()=>{this.#o=null}),this.#m(()=>{this.#p()})};return{reset:s,invoke_onerror:()=>{try{n=!0,this.#a.onerror?.(t,s),n=!1}catch(o){Eo(o,this.#n&&this.#n.parent)}}}}#k(){const t=this.#a.pending;t&&(this.is_pending=!0,this.#i=bs(()=>t(this.#e)),qr(()=>{var i=this.#r=document.createDocumentFragment(),n=ns();i.append(n),this.#s=this.#m(()=>bs(()=>this.#l(n))),this.#c===0&&(this.#e.before(i),this.#r=null,Sl(this.#i,()=>{this.#i=null}),this.#w(ei))}))}#p(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#g=0,this.#s=bs(()=>{this.#l(this.#e)}),this.#c>0){var t=this.#r=document.createDocumentFragment();zp(this.#s,t);const i=this.#a.pending;this.#i=bs(()=>i(this.#e))}else this.#w(ei)}catch(i){this.error(i)}}#w(t){this.is_pending=!1,t.transfer_effects(this.#f,this.#h)}defer_effect(t){g1(t,this.#f,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#a.pending}#m(t){var i=ti,n=vi,s=ji;lr(this.#n),or(this.#n),pc(this.#n.ctx);try{return co.ensure(),t()}catch(r){return p1(r),null}finally{lr(i),or(n),pc(s)}}#x(t,i){if(!this.has_pending_snippet()){this.parent&&this.parent.#x(t,i);return}this.#c+=t,this.#c===0&&(this.#w(i),this.#i&&Sl(this.#i,()=>{this.#i=null}),this.#r&&(this.#e.before(this.#r),this.#r=null))}update_pending_count(t,i){this.#x(t,i),this.#g+=t,!(!this.#u||this.#d)&&(this.#d=!0,qr(()=>{this.#d=!1,this.#u&&xl(this.#u,this.#g)}))}get_effect_pending(){return this.#v(),e(this.#u)}error(t){if(!this.#a.onerror&&!this.#a.failed)throw t;ei?.is_fork?(this.#s&&ei.skip_effect(this.#s),this.#i&&ei.skip_effect(this.#i),this.#o&&ei.skip_effect(this.#o),ei.oncommit(()=>{this.#S(t)})):this.#S(t)}#S(t){this.#s&&(as(this.#s),this.#s=null),this.#i&&(as(this.#i),this.#i=null),this.#o&&(as(this.#o),this.#o=null),fa&&(Gn(this.#t),zt(),Gn(sd()));let i=this.#a.failed;const n=s=>{const{reset:r,invoke_onerror:o}=this.#y(s);o(),i&&(this.#o=this.#m(()=>{try{return bs(()=>{var l=ti;l.b=this,l.f|=sp,i(this.#e,()=>s,()=>r)})}catch(l){return Eo(l,this.#n.parent),null}}))};qr(()=>{var s;try{s=this.transform_error(t)}catch(r){Eo(r,this.#n&&this.#n.parent);return}s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(n,r=>Eo(r,this.#n&&this.#n.parent)):n(s)})}}function yp(a,t,i,n){const s=mc()?_c:Nt;var r=a.filter(p=>!p.settled),o=t.map(s);if(i.length===0&&r.length===0){n(o);return}var l=ti,c=D6(),d=r.length===1?r[0].promise:r.length>1?Promise.all(r.map(p=>p.promise)):null;function g(p){if((l.f&Bs)===0){c();try{n([...o,...p])}catch(u){Eo(u,l)}Eu()}}var h=b1();if(i.length===0){d.then(()=>g([])).finally(h);return}function m(){Promise.all(i.map(p=>L6(p))).then(g).catch(p=>Eo(p,l)).finally(h)}d?d.then(()=>{c(),m(),Eu()}):m()}function D6(){var a=ti,t=vi,i=ji,n=ei;return function(r=!0){lr(a),or(t),pc(i),r&&(a.f&Bs)===0&&(n?.activate(),n?.apply())}}function Eu(a=!0){lr(null),or(null),pc(null),a&&ei?.deactivate()}function b1(){var a=ti,t=a.b,i=ei,n=!!t?.is_rendered();return t?.update_pending_count(1,i),i.increment(n,a),()=>{t?.update_pending_count(-1,i),i.decrement(n,a)}}function _c(a){var t=Yn|Pn;return ti!==null&&(ti.f|=lc),{ctx:ji,deps:null,effects:null,equals:c1,f:t,fn:a,reactions:null,rv:0,v:jn,wv:0,parent:ti,ac:null}}const rd=Symbol("obsolete");function L6(a,t,i){let n=ti;n===null&&i6();var s=void 0,r=kl(jn),o=!vi,l=new Set;return Z6(()=>{var c=ti,d=t1();s=d.promise;try{Promise.resolve(a()).then(d.resolve,p=>{p!==ad&&d.reject(p)}).finally(Eu)}catch(p){d.reject(p),Eu()}var g=ei;if(o){if((c.f&_l)!==0)var h=b1();if(n.b?.is_rendered())g.async_deriveds.get(c)?.reject(rd);else for(const p of l.values())p.reject(rd);l.add(d),g.async_deriveds.set(c,d)}const m=(p,u=void 0)=>{h?.(),l.delete(d),u!==rd&&(g.activate(),u?(r.f|=zo,xl(r,u)):((r.f&zo)!==0&&(r.f^=zo),xl(r,p)),g.deactivate())};d.promise.then(m,p=>m(null,p||"unknown"))}),kc(()=>{for(const c of l)c.reject(rd)}),new Promise(c=>{function d(g){function h(){g===s?c(r):d(s)}g.then(h,h)}d(s)})}function Va(a){const t=_c(a);return V1(t),t}function Nt(a){const t=_c(a);return t.equals=u1,t}function V6(a){var t=a.effects;if(t!==null){a.effects=null;for(var i=0;i{t.ac.abort(ad),t.ac=null}),t.fn!==null&&(t.teardown=Mo),cd(t,0),Mp(t))}function w1(a){if(a.effects!==null)for(const t of a.effects)t.teardown&&t.fn!==null&&ql(t)}let kp=null,vc=null,ei=null,xp=null,Cr=null,Sp=null,od=!1,Tp=!1,bc=null,Uu=null;var k1=0,KP=new Set;let W6=1;class co{id=W6++;#e=!1;linked=!0;#t=null;#a=null;async_deriveds=new Map;current=new Map;previous=new Map;#l=new Set;#n=new Set;#s=0;#i=new Map;#o=null;#r=[];#g=[];#c=new Set;#d=new Set;#f=new Map;#h=new Set;is_fork=!1;#u=!1;constructor(){vc===null?kp=vc=this:(vc.#a=this,this.#t=vc),vc=this}#v(){if(this.is_fork)return!0;for(const n of this.#i.keys()){for(var t=n,i=!1;t.parent!==null;){if(this.#f.has(t)){i=!0;break}t=t.parent}if(!i)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]}),this.#h.delete(t)}unskip_effect(t,i=n=>this.schedule(n)){var n=this.#f.get(t);if(n){this.#f.delete(t);for(var s of n.d)pn(s,Pn),i(s);for(s of n.m)pn(s,nr),i(s)}this.#h.add(t)}#_(){this.#e=!0,k1++>1e3&&(this.#m(),Q6());for(const c of this.#c)this.#d.delete(c),pn(c,Pn),this.schedule(c);for(const c of this.#d)pn(c,nr),this.schedule(c);const t=this.#r;this.#r=[],this.apply();var i=bc=[],n=[],s=Uu=[];for(const c of t)try{this.#b(c,i,n)}catch(d){throw q1(c),this.#v()||this.discard(),d}if(ei=null,s.length>0){var r=co.ensure();for(const c of s)r.schedule(c)}if(bc=null,Uu=null,this.#v()){this.#p(n),this.#p(i);for(const[c,d]of this.#f)$1(c,d);s.length>0&&ei.#_();return}const o=this.#y();if(o){this.#p(n),this.#p(i),o.#k(this);return}this.#c.clear(),this.#d.clear();for(const c of this.#l)c(this);this.#l.clear(),xp=this,S1(n),S1(i),xp=null,this.#o?.resolve();var l=ei;if(this.#s===0&&(this.#r.length===0||l!==null)&&this.#m(),this.#r.length>0)if(l!==null){const c=l;c.#r.push(...this.#r.filter(d=>!c.#r.includes(d)))}else l=this;l!==null&&l.#_()}#b(t,i,n){t.f^=Bn;for(var s=t.first;s!==null;){var r=s.f,o=(r&(ar|ro))!==0,l=o&&(r&Bn)!==0,c=l||(r&_s)!==0||this.#f.has(s);if(!c&&s.fn!==null){o?s.f^=Bn:(r&hl)!==0?i.push(s):Tc(s)&&((r&$r)!==0&&this.#d.add(s),ql(s));var d=s.first;if(d!==null){s=d;continue}}for(;s!==null;){var g=s.next;if(g!==null){s=g;break}s=s.parent}}}#y(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[i,[,n]]of this.current)if(t.current.has(i)&&!n)return t}t=t.#t}return null}#k(t){for(const[n,s]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,s);for(const[n,s]of t.async_deriveds){const r=this.async_deriveds.get(n);r&&s.promise.then(r.resolve).catch(r.reject)}t.async_deriveds.clear(),this.transfer_effects(t.#c,t.#d);const i=n=>{var s=n.reactions;if(s!==null&&!((n.f&Yn)!==0&&(n.f&(Pn|nr))===0))for(const l of s){var r=l.f;if((r&Yn)!==0)i(l);else{var o=l;r&(cc|$r)&&!this.async_deriveds.has(o)&&(this.#d.delete(o),pn(o,Pn),this.schedule(o))}}};for(const n of this.current.keys())i(n);this.oncommit(()=>t.discard()),t.#m(),ei=this,this.#_()}#p(t){for(var i=0;i!h.current.get(m)[1]);if(!(!h.#e||s.length===0)){var r=s.filter(m=>!this.current.has(m));if(r.length===0)t&&h.discard();else if(i.length>0){if(t)for(const m of this.#h)h.unskip_effect(m,p=>{(p.f&($r|cc))!==0?h.schedule(p):h.#p([p])});h.activate();var o=new Set,l=new Map;for(var c of i)T1(c,r,o,l);l=new Map;var d=[...h.current].filter(([m,p])=>{const u=this.current.get(m);return u?u[0]!==p[0]||u[1]!==p[1]:!0}).map(([m])=>m);if(d.length>0)for(const m of this.#g)(m.f&(Bs|_s|Cu))===0&&$p(m,d,l)&&((m.f&(cc|$r))!==0?(pn(m,Pn),h.schedule(m)):h.#c.add(m));if(h.#r.length>0&&!h.#u){h.apply();for(var g of h.#r)h.#b(g,[],[]);h.#r=[]}h.deactivate()}}}}increment(t,i){if(this.#s+=1,t){let n=this.#i.get(i)??0;this.#i.set(i,n+1)}}decrement(t,i){if(this.#s-=1,t){let n=this.#i.get(i)??0;n===1?this.#i.delete(i):this.#i.set(i,n-1)}this.#u||(this.#u=!0,qr(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_effects(t,i){for(const n of t)this.#c.add(n);for(const n of i)this.#d.add(n);t.clear(),i.clear()}oncommit(t){this.#l.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#o??=t1()).promise}static ensure(){if(ei===null){const t=ei=new co;!Tp&&!od&&qr(()=>{t.#e||t.flush()})}return ei}apply(){{Cr=null;return}}schedule(t){if(Sp=t,t.b?.is_pending&&(t.f&(hl|ed|np))!==0&&(t.f&_l)===0){t.b.defer_effect(t);return}for(var i=t;i.parent!==null;){i=i.parent;var n=i.f;if(bc!==null&&i===ti&&(vi===null||(vi.f&Yn)===0))return;if((n&(ro|ar))!==0){if((n&Bn)===0)return;i.f^=Bn}}this.#r.push(i)}#m(){if(this.linked){var t=this.#t,i=this.#a;t===null?kp=i:t.#a=i,i===null?vc=t:i.#t=t,this.linked=!1}}}function x1(a){var t=od;od=!0;try{for(var i;;){if(U6(),ei===null)return i;ei.flush()}}finally{od=t}}function Q6(){try{l6()}catch(a){Eo(a,Sp)}}let uo=null;function S1(a){var t=a.length;if(t!==0){for(var i=0;i0)){wl.clear();for(const s of uo){if((s.f&(Bs|_s))!==0)continue;const r=[s];let o=s.parent;for(;o!==null;)uo.has(o)&&(uo.delete(o),r.push(o)),o=o.parent;for(let l=r.length-1;l>=0;l--){const c=r[l];(c.f&(Bs|_s))===0&&ql(c)}}uo.clear()}}uo=null}}function T1(a,t,i,n){if(!i.has(a)&&(i.add(a),a.reactions!==null))for(const s of a.reactions){const r=s.f;(r&Yn)!==0?T1(s,t,i,n):(r&(cc|$r))!==0&&(r&Pn)===0&&$p(s,t,n)&&(pn(s,Pn),qp(s))}}function $p(a,t,i){const n=i.get(a);if(n!==void 0)return n;if(a.deps!==null)for(const s of a.deps){if($u.call(t,s))return!0;if((s.f&Yn)!==0&&$p(s,t,i))return i.set(s,!0),!0}return i.set(a,!1),!1}function qp(a){ei.schedule(a)}function $1(a,t){if(!((a.f&ar)!==0&&(a.f&Bn)!==0)){(a.f&Pn)!==0?t.d.push(a):(a.f&nr)!==0&&t.m.push(a),pn(a,Bn);for(var i=a.first;i!==null;)$1(i,t),i=i.next}}function q1(a){pn(a,Bn);for(var t=a.first;t!==null;)q1(t),t=t.next}let Ru=new Set;const wl=new Map;let C1=!1;function kl(a,t){var i={f:0,v:a,reactions:null,equals:c1,rv:0,wv:0};return i}function Fn(a,t){const i=kl(a);return V1(i),i}function Y(a,t=!1,i=!0){const n=kl(a);return t||(n.equals=u1),fc&&i&&ji!==null&&ji.l!==null&&(ji.l.s??=[]).push(n),n}function Et(a,t){return y(a,x(()=>e(a))),t}function y(a,t,i=!1){vi!==null&&(!Ar||(vi.f&Cu)!==0)&&mc()&&(vi.f&(Yn|$r|cc|Cu))!==0&&(Ir===null||!Ir.has(a))&&p6();let n=i?yc(t):t;return xl(a,n,Uu)}function xl(a,t,i=null){if(!a.equals(t)){wl.set(a,fo?t:a.v);var n=co.ensure();if(n.capture(a,t),(a.f&Yn)!==0){const s=a;(a.f&Pn)!==0&&wp(s),Cr===null&&hp(s)}a.wv=Q1(),A1(a,Pn,i),mc()&&ti!==null&&(ti.f&Bn)!==0&&(ti.f&(ar|ro))===0&&(cr===null?n4([a]):cr.push(a)),!n.is_fork&&Ru.size>0&&!C1&&K6()}return t}function K6(){C1=!1;for(const a of Ru){(a.f&Bn)!==0&&pn(a,nr);let t;try{t=Tc(a)}catch{t=!0}t&&ql(a)}Ru.clear()}function Bu(a,t=1){var i=e(a),n=t===1?i++:i--;return y(a,i),n}function ld(a){y(a,a.v+1)}function A1(a,t,i){var n=a.reactions;if(n!==null)for(var s=mc(),r=n.length,o=0;o{if($l===r)return l();var c=vi,d=$l;or(null),W1(r);var g=l();return or(c),W1(d),g};return n&&i.set("length",Fn(a.length)),new Proxy(a,{defineProperty(l,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&u6();var g=i.get(c);return g===void 0?o(()=>{var h=Fn(d.value);return i.set(c,h),h}):y(g,d.value,!0),!0},deleteProperty(l,c){var d=i.get(c);if(d===void 0){if(c in l){const g=o(()=>Fn(jn));i.set(c,g),ld(s)}}else y(d,jn),ld(s);return!0},get(l,c,d){if(c===Or)return a;var g=i.get(c),h=c in l;if(g===void 0&&(!h||so(l,c)?.writable)&&(g=o(()=>{var p=yc(h?l[c]:jn),u=Fn(p);return u}),i.set(c,g)),g!==void 0){var m=e(g);return m===jn?void 0:m}return Reflect.get(l,c,d)},getOwnPropertyDescriptor(l,c){var d=Reflect.getOwnPropertyDescriptor(l,c);if(d&&"value"in d){var g=i.get(c);g&&(d.value=e(g))}else if(d===void 0){var h=i.get(c),m=h?.v;if(h!==void 0&&m!==jn)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(l,c){if(c===Or)return!0;var d=i.get(c),g=d!==void 0&&d.v!==jn||Reflect.has(l,c);if(d!==void 0||ti!==null&&(!g||so(l,c)?.writable)){d===void 0&&(d=o(()=>{var m=g?yc(l[c]):jn,p=Fn(m);return p}),i.set(c,d));var h=e(d);if(h===jn)return!1}return g},set(l,c,d,g){var h=i.get(c),m=c in l;if(n&&c==="length")for(var p=d;pFn(jn)),i.set(p+"",u))}if(h===void 0)(!m||so(l,c)?.writable)&&(h=o(()=>Fn(void 0)),y(h,yc(d)),i.set(c,h));else{m=h.v!==jn;var f=o(()=>yc(d));y(h,f)}var _=Reflect.getOwnPropertyDescriptor(l,c);if(_?.set&&_.set.call(g,d),!m){if(n&&typeof c=="string"){var v=i.get("length"),b=Number(c);Number.isInteger(b)&&b>=v.v&&y(v,b+1)}ld(s)}return!0},ownKeys(l){e(s);var c=Reflect.ownKeys(l).filter(h=>{var m=i.get(h);return m===void 0||m.v!==jn});for(var[d,g]of i)g.v!==jn&&!(d in l)&&c.push(d);return c},setPrototypeOf(){f6()}})}function G1(a){try{if(a!==null&&typeof a=="object"&&Or in a)return a[Or]}catch{}return a}function Y6(a,t){return Object.is(G1(a),G1(t))}var wc,Cp,F1,M1,z1;function Ap(){if(wc===void 0){wc=window,Cp=document,F1=/Firefox/.test(navigator.userAgent);var a=Element.prototype,t=Node.prototype,i=Text.prototype;M1=so(t,"firstChild").get,z1=so(t,"nextSibling").get,e1(a)&&(a[lp]=void 0,a[n1]=null,a[cp]=void 0,a.__e=void 0),e1(i)&&(i[dp]=void 0)}}function ns(a=""){return document.createTextNode(a)}function vs(a){return M1.call(a)}function sr(a){return z1.call(a)}function k(a,t){if(!fa)return vs(a);var i=vs(ri);if(i===null)i=ri.appendChild(ns());else if(t&&i.nodeType!==nd){var n=ns();return i?.before(n),Gn(n),n}return t&&Pu(i),Gn(i),i}function ht(a,t=!1){if(!fa){var i=vs(a);return i instanceof Comment&&i.data===""?sr(i):i}if(t){if(ri?.nodeType!==nd){var n=ns();return ri?.before(n),Gn(n),n}Pu(ri)}return ri}function q(a,t=1,i=!1){let n=fa?ri:a;for(var s;t--;)s=n,n=sr(n);if(!fa)return n;if(i){if(n?.nodeType!==nd){var r=ns();return n===null?s?.after(r):n.before(r),Gn(r),r}Pu(n)}return Gn(n),n}function Gp(a){a.textContent=""}function E1(){return!1}function U1(a,t,i){return t==null||t===l1?i?document.createElement(a,{is:i}):document.createElement(a):i?document.createElementNS(t,a,{is:i}):document.createElementNS(t,a)}function Pu(a){if(a.nodeValue.length<65536)return;let t=a.nextSibling;for(;t!==null&&t.nodeType===nd;)t.remove(),a.nodeValue+=t.nodeValue,t=a.nextSibling}function R1(a){ti===null&&(vi===null&&o6(),r6()),fo&&s6()}function J6(a,t){var i=t.last;i===null?t.last=t.first=a:(i.next=a,a.prev=i,t.last=a)}function rr(a,t){var i=ti;i!==null&&(i.f&_s)!==0&&(a|=_s);var n={ctx:ji,deps:null,nodes:null,f:a|Pn|ir,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,wv:0,ac:null};ei?.register_created_effect(n);var s=n;if((a&hl)!==0)bc!==null?bc.push(n):co.ensure().schedule(n);else if(t!==null){try{ql(n)}catch(o){throw as(n),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&lc)===0&&(s=s.first,(a&$r)!==0&&(a&oo)!==0&&s!==null&&(s.f|=oo))}if(s!==null&&(s.parent=i,i!==null&&J6(s,i),vi!==null&&(vi.f&Yn)!==0&&(a&ro)===0)){var r=vi;(r.effects??=[]).push(s)}return n}function Fp(){return vi!==null&&!Ar}function kc(a){const t=rr(ed,null);return pn(t,Bn),t.teardown=a,t}function ju(a){R1();var t=ti.f,i=!vi&&(t&ar)!==0&&ji!==null&&!ji.i;if(i){var n=ji;(n.e??=[]).push(a)}else return B1(a)}function B1(a){return rr(hl|i1,a)}function P1(a){return R1(),rr(ed|i1,a)}function X6(a){co.ensure();const t=rr(ro|lc,a);return(i={})=>new Promise(n=>{i.outro?Sl(t,()=>{as(t),n(void 0)}):(as(t),n(void 0))})}function Uo(a){return rr(hl,a)}function Ue(a,t){var i=ji,n={effect:null,ran:!1,deps:a};i.l.$.push(n),n.effect=xc(()=>{if(a(),!n.ran){n.ran=!0;var s=ti;try{lr(s.parent),x(t)}finally{lr(s)}}})}function wn(){var a=ji;xc(()=>{for(var t of a.l.$){t.deps();var i=t.effect;(i.f&Bn)!==0&&i.deps!==null&&pn(i,nr),Tc(i)&&ql(i),t.ran=!1}})}function Z6(a){return rr(cc|lc,a)}function xc(a,t=0){return rr(ed|t,a)}function ie(a,t=[],i=[],n=[]){yp(n,t,i,s=>{rr(ed,()=>{a(...s.map(e))})})}function e4(a,t=[],i=[],n=[]){yp(n,t,i,s=>{rr(hl,()=>a(...s.map(e)))})}function Ro(a,t=0){var i=rr($r|t,a);return i}function j1(a,t=0){var i=rr(np|t,a);return i}function bs(a){return rr(ar|lc,a)}function N1(a){var t=a.teardown;if(t!==null){const i=fo,n=vi;L1(!0),or(null);try{t.call(null)}finally{L1(i),or(n)}}}function Mp(a,t=!1){var i=a.first;for(a.first=a.last=null;i!==null;){const s=i.ac;s!==null&&hc(()=>{s.abort(ad)});var n=i.next;(i.f&ro)!==0?i.parent=null:as(i,t),i=n}}function t4(a){for(var t=a.first;t!==null;){var i=t.next;(t.f&ar)===0&&as(t),t=i}}function as(a,t=!0){var i=!1;(t||(a.f&a1)!==0)&&a.nodes!==null&&a.nodes.end!==null&&(a4(a.nodes.start,a.nodes.end),i=!0),a.f|=rp,Mp(a,t&&!i),cd(a,0);var n=a.nodes&&a.nodes.t;if(n!==null)for(const r of n)r.stop();N1(a),a.f^=rp,a.f|=Bs;var s=a.parent;s!==null&&s.first!==null&&O1(a),a.next=a.prev=a.teardown=a.ctx=a.deps=a.fn=a.nodes=a.ac=a.b=null}function a4(a,t){for(;a!==null;){var i=a===t?null:sr(a);a.remove(),a=i}}function O1(a){var t=a.parent,i=a.prev,n=a.next;i!==null&&(i.next=n),n!==null&&(n.prev=i),t!==null&&(t.first===a&&(t.first=n),t.last===a&&(t.last=i))}function Sl(a,t,i=!0){var n=[];I1(a,n,!0);var s=()=>{i&&as(a),t&&t()},r=n.length;if(r>0){var o=()=>--r||s();for(var l of n)l.out(o)}else s()}function I1(a,t,i){if((a.f&_s)===0){a.f^=_s;var n=a.nodes&&a.nodes.t;if(n!==null)for(const l of n)(l.is_global||i)&&t.push(l);for(var s=a.first;s!==null;){var r=s.next;if((s.f&ro)===0){var o=(s.f&oo)!==0||(s.f&ar)!==0&&(a.f&$r)!==0;I1(s,t,o?i:!1)}s=r}}}function Nu(a){D1(a,!0)}function D1(a,t){if((a.f&_s)!==0){a.f^=_s,(a.f&Bn)===0&&(pn(a,Pn),co.ensure().schedule(a));for(var i=a.first;i!==null;){var n=i.next,s=(i.f&oo)!==0||(i.f&ar)!==0;D1(i,s?t:!1),i=n}var r=a.nodes&&a.nodes.t;if(r!==null)for(const o of r)(o.is_global||t)&&o.in()}}function zp(a,t){if(a.nodes)for(var i=a.nodes.start,n=a.nodes.end;i!==null;){var s=i===n?null:sr(i);t.append(i),i=s}}let Sc=null;function i4(a){var t=Sc;try{if(Sc=new Set,x(a),t!==null)for(var i of Sc)t.add(i);return Sc}finally{Sc=t}}function Yi(a){for(var t of i4(a))xl(t,t.v)}let Ou=!1,fo=!1;function L1(a){fo=a}let vi=null,Ar=!1;function or(a){vi=a}let ti=null;function lr(a){ti=a}let Ir=null;function V1(a){vi!==null&&(Ir??=new Set).add(a)}let Cs=null,Ps=0,cr=null;function n4(a){cr=a}let H1=1,Tl=0,$l=Tl;function W1(a){$l=a}function Q1(){return++H1}function Tc(a){var t=a.f;if((t&Pn)!==0)return!0;if(t&Yn&&(a.f&=~vl),(t&nr)!==0){for(var i=a.deps,n=i.length,s=0;sa.wv)return!0}(t&ir)!==0&&Cr===null&&pn(a,Bn)}return!1}function K1(a,t,i=!0){var n=a.reactions;if(n!==null&&!(Ir!==null&&Ir.has(a)))for(var s=0;s{a.ac.abort(ad)}),a.ac=null);try{a.f|=Au;var g=a.fn,h=g();a.f|=_l;var m=a.deps,p=ei?.is_fork;if(Cs!==null){var u;if(p||cd(a,Ps),m!==null&&Ps>0)for(m.length=Ps+Cs.length,u=0;u{r.ac.abort(ad),r.ac=null,pn(r,Pn)}),H6(r),cd(r,0)}}function cd(a,t){var i=a.deps;if(i!==null)for(var n=t;ni?.call(this,r))}return a.startsWith("pointer")||a.startsWith("touch")||a==="wheel"?qr(()=>{t.addEventListener(a,s,n)}):t.addEventListener(a,s,n),s}function re(a,t,i,n,s){var r={capture:n,passive:s},o=ev(a,t,i,r);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&kc(()=>{t.removeEventListener(a,o,r)})}function h4(a,t,i){(t[dd]??={})[a]=i}function _4(a){for(var t=0;t{throw f});throw m}}finally{a[dd]=t,delete a.currentTarget,or(g),lr(h)}}}const v4=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:a=>a});function b4(a){return v4?.createHTML(a)??a}function av(a){var t=U1("template");return t.innerHTML=b4(a.replaceAll("","")),t.content}function dr(a,t){var i=ti;i.nodes===null&&(i.nodes={start:a,end:t,a:null,t:null})}function ae(a,t){var i=(t&r1)!==0,n=(t&S6)!==0,s,r=!a.startsWith("");return()=>{if(fa)return dr(ri,null),ri;s===void 0&&(s=av(r?a:""+a),i||(s=vs(s)));var o=n||F1?document.importNode(s,!0):s.cloneNode(!0);if(i){var l=vs(o),c=o.lastChild;dr(l,c)}else dr(o,o);return o}}function y4(a,t,i="svg"){var n=!a.startsWith(""),s=(t&r1)!==0,r=`<${i}>${n?a:""+a}`,o;return()=>{if(fa)return dr(ri,null),ri;if(!o){var l=av(r),c=vs(l);if(s)for(o=document.createDocumentFragment();vs(c);)o.appendChild(vs(c));else o=vs(c)}var d=o.cloneNode(!0);if(s){var g=vs(d),h=d.lastChild;dr(g,h)}else dr(d,d);return d}}function po(a,t){return y4(a,t,"svg")}function Bp(a=""){if(!fa){var t=ns(a+"");return dr(t,t),t}var i=ri;return i.nodeType!==nd?(i.before(i=ns()),Gn(i)):Pu(i),dr(i,i),i}function ys(){if(fa)return dr(ri,null),ri;var a=document.createDocumentFragment(),t=document.createComment(""),i=ns();return a.append(t,i),dr(t,i),a}function J(a,t){if(fa){var i=ti;((i.f&_l)===0||i.nodes.end===null)&&(i.nodes.end=ri),lo();return}a!==null&&a.before(t)}function W(a,t){var i=t==null?"":typeof t=="object"?`${t}`:t;i!==(a[dp]??=a.nodeValue)&&(a[dp]=i,a.nodeValue=`${i}`)}function iv(a,t){return nv(a,t)}function w4(a,t){Ap(),t.intro=t.intro??!1;const i=t.target,n=fa,s=ri;try{for(var r=vs(i);r&&(r.nodeType!==dc||r.data!==fp);)r=sr(r);if(!r)throw uc;ts(!0),Gn(r);const o=nv(a,{...t,anchor:r});return ts(!1),o}catch(o){if(o instanceof Error&&o.message.split(` +`).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==uc&&console.warn("Failed to hydrate: ",o),t.recover===!1&&c6(),Ap(),Gp(i),ts(!1),iv(a,t)}finally{ts(n),Gn(s)}}const Iu=new Map;function nv(a,{target:t,anchor:i,props:n={},events:s,context:r,intro:o=!0,transformError:l}){Ap();var c=void 0,d=X6(()=>{var g=i??t.appendChild(ns());O6(g,{pending:()=>{}},p=>{Fi({});var u=ji;if(r&&(u.c=r),s&&(n.$$events=s),fa&&dr(p,null),c=a(p,n)||{},fa&&(ti.nodes.end=ri,ri===null||ri.nodeType!==dc||ri.data!==mp))throw Gu(),uc;Mi()},l);var h=new Set,m=p=>{for(var u=0;u{for(var p of h)for(const _ of[t,document]){var u=Iu.get(_),f=u.get(p);--f==0?(_.removeEventListener(p,Rp),u.delete(p),u.size===0&&Iu.delete(_)):u.set(p,f)}Up.delete(m),g!==i&&g.parentNode?.removeChild(g)}});return Pp.set(c,d),c}let Pp=new WeakMap;function k4(a,t){const i=Pp.get(a);return i?(Pp.delete(a),i(t)):Promise.resolve()}class ud{anchor;#e=new Map;#t=new Map;#a=new Map;#l=new Set;#n=!0;constructor(t,i=!0){this.anchor=t,this.#n=i}#s=t=>{if(this.#e.has(t)){var i=this.#e.get(t),n=this.#t.get(i);if(n)Nu(n),this.#l.delete(i);else{var s=this.#a.get(i);s&&(Nu(s.effect),this.#t.set(i,s.effect),this.#a.delete(i),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[r,o]of this.#e){if(this.#e.delete(r),r===t)break;const l=this.#a.get(o);l&&(as(l.effect),this.#a.delete(o))}for(const[r,o]of this.#t){if(r===i||this.#l.has(r))continue;const l=()=>{if(Array.from(this.#e.values()).includes(r)){var d=document.createDocumentFragment();zp(o,d),d.append(ns()),this.#a.set(r,{effect:o,fragment:d})}else as(o);this.#l.delete(r),this.#t.delete(r)};this.#n||!n?(this.#l.add(r),Sl(o,l,!1)):l()}}};#i=t=>{this.#e.delete(t);const i=Array.from(this.#e.values());for(const[n,s]of this.#a)i.includes(n)||(as(s.effect),this.#a.delete(n))};ensure(t,i){var n=ei,s=E1();if(i&&!this.#t.has(t)&&!this.#a.has(t))if(s){var r=document.createDocumentFragment(),o=ns();r.append(o),this.#a.set(t,{effect:bs(()=>i(o)),fragment:r})}else this.#t.set(t,bs(()=>i(this.anchor)));if(this.#e.set(n,t),s){for(const[l,c]of this.#t)l===t?n.unskip_effect(c):n.skip_effect(c);for(const[l,c]of this.#a)l===t?n.unskip_effect(c.effect):n.skip_effect(c.effect);n.oncommit(this.#s),n.ondiscard(this.#i)}else fa&&(this.anchor=ri),this.#s(n)}}function ve(a,t,i=!1){var n;fa&&(n=ri,lo());var s=new ud(a),r=i?oo:0;function o(l,c){if(fa){var d=gp(n);if(l!==parseInt(d.substring(1))){var g=sd();Gn(g),s.anchor=g,ts(!1),s.ensure(l,c),ts(!0);return}}s.ensure(l,c)}Ro(()=>{var l=!1;t((c,d=0)=>{l=!0,o(d,c)}),l||o(-1,null)},r)}const x4=Symbol("NaN");function sv(a,t,i){fa&&lo();var n=new ud(a),s=!mc();Ro(()=>{var r=t();r!==r&&(r=x4),s&&r!==null&&typeof r=="object"&&(r={}),n.ensure(r,i)})}function Qt(a,t){return t}function S4(a,t,i){for(var n=[],s=t.length,r,o=t.length,l=0;l{if(r){if(r.pending.delete(h),r.done.add(h),r.pending.size===0){var m=a.outrogroups;jp(a,qu(r.done)),m.delete(r),m.size===0&&(a.outrogroups=null)}}else o-=1},!1)}if(o===0){var c=n.length===0&&i!==null;if(c){var d=i,g=d.parentNode;Gp(g),g.append(d),a.items.clear()}jp(a,t,!c)}else r={pending:new Set(t),done:new Set},(a.outrogroups??=new Set).add(r)}function jp(a,t,i=!0){var n;if(a.pending.size>0){n=new Set;for(const o of a.pending.values())for(const l of o)n.add(a.items.get(l).e)}for(var s=0;s{var S=i();return ep(S)?S:S==null?[]:qu(S)}),m,p=new Map,u=!0;function f(S){(b.effect.f&Bs)===0&&(b.pending.delete(S),b.fallback=g,T4(b,m,o,t,n),g!==null&&(m.length===0?(g.f&Nr)===0?Nu(g):(g.f^=Nr,pd(g,null,o)):Sl(g,()=>{g=null})))}function _(S){b.pending.delete(S)}var v=Ro(()=>{m=e(h);var S=m.length;let $=!1;if(fa){var M=gp(o)===pp;M!==(S===0)&&(o=sd(),Gn(o),ts(!1),$=!0)}for(var N=new Set,P=ei,C=E1(),j=0;jr(o)):(g=bs(()=>r(rv??=ns())),g.f|=Nr)),S>N.size&&n6(),fa&&S>0&&Gn(sd()),!u)if(p.set(P,N),C){for(const[H,U]of l)N.has(H)||P.skip_effect(U.e);P.oncommit(f),P.ondiscard(_)}else f(P);$&&ts(!0),e(h)}),b={effect:v,items:l,pending:p,outrogroups:null,fallback:g};u=!1,fa&&(o=ri)}function fd(a){for(;a!==null&&(a.f&ar)===0;)a=a.next;return a}function T4(a,t,i,n,s){var r=(n&_6)!==0,o=t.length,l=a.items,c=fd(a.effect.first),d,g=null,h,m=[],p=[],u,f,_,v;if(r)for(v=0;v0){var j=(n&s1)!==0&&o===0?i:null;if(r){for(v=0;v{if(h!==void 0)for(_ of h)_.nodes?.a?.apply()})}function $4(a,t,i,n,s,r,o,l){var c=(o&g6)!==0?(o&v6)===0?Y(i,!1,!1):kl(i):null,d=(o&h6)!==0?kl(s):null;return{v:c,i:d,e:bs(()=>(r(t,c??i,d??s,l),()=>{a.delete(n)}))}}function pd(a,t,i){if(a.nodes)for(var n=a.nodes.start,s=a.nodes.end,r=t&&(t.f&Nr)===0?t.nodes.start:i;n!==null;){var o=sr(n);if(r.before(n),n===s)return;n=o}}function Bo(a,t,i){t===null?a.effect.first=i:t.next=i,i===null?a.effect.last=t:i.prev=t}function q4(a,t,i,n,s){fa&&lo();var r=t.$$slots?.[i],o=!1;r===!0&&(r=t.children,o=!0),r===void 0||r(a,o?()=>n:n)}function ov(a,t,...i){var n=new ud(a);Ro(()=>{const s=t()??null;n.ensure(s,s&&(r=>s(r,...i)))},oo)}function md(a,t,i){var n;fa&&(n=ri,lo());var s=new ud(a);Ro(()=>{var r=t()??null;if(fa){var o=gp(n),l=o===fp,c=r!==null;if(l!==c){var d=sd();Gn(d),s.anchor=d,ts(!1),s.ensure(r,r&&(g=>i(g,r))),ts(!0);return}}s.ensure(r,r&&(g=>i(g,r)))},oo)}function C4(a,t,i,n,s,r){let o=fa;fa&&lo();var l=null;fa&&ri.nodeType===a6&&(l=ri,lo());var c=fa?ri:a,d=new ud(c,!1);Ro(()=>{const g=t()||null;var h=T6;if(g===null){d.ensure(null,null);return}return d.ensure(g,m=>{if(g){if(l=fa?l:U1(g,h),dr(l,l),n){var p=null;fa&&g4(g)&&l.append(p=document.createComment(""));var u=fa?vs(l):l.appendChild(ns());fa&&(u===null?ts(!1):Gn(u)),n(l,u),p?.remove()}ti.nodes.end=l,m.before(l)}fa&&Gn(m)}),()=>{}},oo),kc(()=>{}),o&&(ts(!0),Gn(c))}function A4(a,t){let i=null,n=fa;var s;if(fa){i=ri;for(var r=vs(document.head);r!==null&&(r.nodeType!==dc||r.data!==a);)r=sr(r);if(r===null)ts(!1);else{var o=sr(r);r.remove(),Gn(o)}}fa||(s=document.head.appendChild(ns()));try{Ro(()=>{var l=bs(()=>t(s));l.f|=a1})}finally{n&&(ts(!0),Gn(i))}}function Du(a,t,i){Uo(()=>{var n=x(()=>t(a,i?.())||{});if(n?.destroy)return()=>n.destroy()})}function G4(a,t){var i=void 0,n;j1(()=>{i!==(i=t())&&(n&&(as(n),n=null),i&&(n=bs(()=>{Uo(()=>i(a))})))})}function lv(a){var t,i,n="";if(typeof a=="string"||typeof a=="number")n+=a;else if(typeof a=="object")if(Array.isArray(a)){var s=a.length;for(t=0;t=0;){var l=o+r;(o===0||cv.includes(n[o-1]))&&(l===n.length||cv.includes(n[l]))?n=(o===0?"":n.substring(0,o))+n.substring(l+1):o=l}}return n===""?null:n}function dv(a,t=!1){var i=t?" !important;":";",n="";for(var s of Object.keys(a)){var r=a[s];r!=null&&r!==""&&(n+=" "+s+": "+r+i)}return n}function Np(a){return a[0]!=="-"||a[1]!=="-"?a.toLowerCase():a}function E4(a,t){if(t){var i="",n,s;if(Array.isArray(t)?(n=t[0],s=t[1]):n=t,a){a=String(a).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var r=!1,o=0,l=!1,c=[];n&&c.push(...Object.keys(n).map(Np)),s&&c.push(...Object.keys(s).map(Np));var d=0,g=-1;const f=a.length;for(var h=0;h{"__value"in a&&kn(a,a.__value)});t.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),kc(()=>{t.disconnect()})}function ur(a,t,i=t){var n=new WeakSet,s=!0;bp(a,"change",r=>{var o=r?"[selected]":":checked",l;if(a.multiple)l=[].map.call(a.querySelectorAll(o),gd);else{var c=a.querySelector(o)??a.querySelector("option:not([disabled])");l=c&&gd(c)}i(l),a.__value=l,ei!==null&&n.add(ei)}),Uo(()=>{var r=t();if(a===document.activeElement){var o=ei;if(n.has(o))return}if(kn(a,r,s),s&&r===void 0){var l=a.querySelector(":checked");l!==null&&(r=gd(l),i(r))}a.__value=r,s=!1}),Nn(a)}function gd(a){return"__value"in a?a.__value:a.value}const hd=Symbol("class"),_d=Symbol("style"),uv=Symbol("is custom element"),fv=Symbol("is html"),U4=id?"link":"LINK",pv=id?"input":"INPUT",R4=id?"option":"OPTION",B4=id?"select":"SELECT",P4=id?"progress":"PROGRESS";function Pt(a){if(fa){var t=!1,i=()=>{if(!t){if(t=!0,a.hasAttribute("value")){var n=a.value;_e(a,"value",null),a.value=n}if(a.hasAttribute("checked")){var s=a.checked;_e(a,"checked",null),a.checked=s}}};a[td]=i,qr(i),v1()}}function bi(a,t){var i=Lu(a);i.value===(i.value=t??void 0)||a.value===t&&(t!==0||a.nodeName!==P4)||(a.value=t??"")}function Cl(a,t){var i=Lu(a);i.checked!==(i.checked=t??void 0)&&(a.checked=t)}function j4(a,t){t?a.hasAttribute("selected")||a.setAttribute("selected",""):a.removeAttribute("selected")}function _e(a,t,i,n){var s=Lu(a);fa&&(s[t]=a.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&a.nodeName===U4)||s[t]!==(s[t]=i)&&(t==="loading"&&(a[t6]=i),i==null?a.removeAttribute(t):typeof i!="string"&&hv(a).includes(t)?a[t]=i:a.setAttribute(t,i))}function N4(a,t,i,n,s=!1,r=!1){if(fa&&s&&a.nodeName===pv){var o=a,l=o.type==="checkbox"?"defaultChecked":"defaultValue";l in i||Pt(o)}var c=Lu(a),d=c[uv],g=!c[fv];let h=fa&&d;h&&ts(!1);var m=t||{},p=a.nodeName===R4;for(var u in t)u in i||(i[u]=null);i.class?i.class=M4(i.class):i[hd]&&(i.class=null),i[_d]&&(i.style??=null);var f=hv(a);if(a.nodeName===pv&&"type"in i&&("value"in i||"__value"in i)){var _=i.type;(_!==m.type||_===void 0&&a.hasAttribute("type"))&&(m.type=_,_e(a,"type",_))}for(const P in i){let C=i[P];if(p&&P==="value"&&C==null){a.value=a.__value="",m[P]=C;continue}if(P==="class"){var v=a.namespaceURI==="http://www.w3.org/1999/xhtml";ya(a,v,C,n,t?.[hd],i[hd]),m[P]=C,m[hd]=i[hd];continue}if(P==="style"){Ip(a,C,t?.[_d],i[_d]),m[P]=C,m[_d]=i[_d];continue}var b=m[P];if(!(C===b&&!(C===void 0&&a.hasAttribute(P)))){m[P]=C;var S=P[0]+P[1];if(S!=="$$")if(S==="on"){const j={},G="$$"+P;let A=P.slice(2);var $=c4(A);if(o4(A)&&(A=A.slice(0,-7),j.capture=!0),!$&&b){if(C!=null)continue;a.removeEventListener(A,m[G],j),m[G]=null}if($)h4(A,a,C),_4([A]);else if(C!=null){let B=function(H){m[P].call(this,H)};m[G]=ev(A,a,B,j)}}else if(P==="style")_e(a,P,C);else if(P==="autofocus")P6(a,!!C);else if(!d&&(P==="__value"||P==="value"&&C!=null))a.value=a.__value=C;else if(P==="selected"&&p)j4(a,C);else{var M=P;g||(M=u4(M));var N=M==="defaultValue"||M==="defaultChecked";if(C==null&&!d&&!N)if(c[P]=null,M==="value"||M==="checked"){let j=a;const G=t===void 0;if(M==="value"){let A=j.defaultValue;j.removeAttribute(M),j.defaultValue=A,j.value=j.__value=G?A:null}else{let A=j.defaultChecked;j.removeAttribute(M),j.defaultChecked=A,j.checked=G?A:!1}}else a.removeAttribute(P);else N||f.includes(M)&&(d||typeof C!="string")?(a[M]=C,M in c&&(c[M]=jn)):typeof C!="function"&&_e(a,M,C)}}}return h&&ts(!0),m}function mv(a,t,i=[],n=[],s=[],r,o=!1,l=!1){yp(s,i,n,c=>{var d=void 0,g={},h=a.nodeName===B4,m=!1;if(j1(()=>{var u=t(...c.map(e)),f=N4(a,d,u,r,o,l);m&&h&&"value"in u&&kn(a,u.value);for(let v of Object.getOwnPropertySymbols(g))u[v]||as(g[v]);for(let v of Object.getOwnPropertySymbols(u)){var _=u[v];v.description===$6&&(!d||_!==d[v])&&(g[v]&&as(g[v]),g[v]=bs(()=>G4(a,()=>_))),f[v]=_}d=f}),h){var p=a;Uo(()=>{kn(p,d.value,!0),Nn(p)})}m=!0})}function Lu(a){return a[n1]??={[uv]:a.nodeName.includes("-"),[fv]:a.namespaceURI===l1}}var gv=new Map;function hv(a){var t=a.getAttribute("is")||a.nodeName,i=gv.get(t);if(i)return i;gv.set(t,i=[]);for(var n,s=a,r=Element.prototype;r!==s;){n=Z_(s);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&i.push(o);s=ap(s)}return i}function Sa(a,t,i=t){var n=new WeakSet;bp(a,"input",async s=>{var r=s?a.defaultValue:a.value;if(r=Lp(a)?Vp(r):r,i(r),ei!==null&&n.add(ei),await js(),r!==(r=t())){var o=a.selectionStart,l=a.selectionEnd,c=a.value.length;if(a.value=r??"",l!==null){var d=a.value.length;o===l&&l===c&&d>c?(a.selectionStart=d,a.selectionEnd=d):(a.selectionStart=o,a.selectionEnd=Math.min(l,d))}}}),(fa&&a.defaultValue!==a.value||x(t)==null&&a.value)&&(i(Lp(a)?Vp(a.value):a.value),ei!==null&&n.add(ei)),xc(()=>{var s=t();if(a===document.activeElement){var r=ei;if(n.has(r))return}Lp(a)&&s===Vp(a.value)||a.type==="date"&&!s&&!a.value||s!==a.value&&(a.value=s??"")})}function Dp(a,t,i=t){bp(a,"change",n=>{var s=n?a.defaultChecked:a.checked;i(s)}),(fa&&a.defaultChecked!==a.checked||x(t)==null)&&i(a.checked),xc(()=>{var n=t();a.checked=!!n})}function Lp(a){var t=a.type;return t==="number"||t==="range"}function Vp(a){return a===""?null:+a}function Al(a,t,i){var n=so(a,t);n&&n.set&&(a[t]=i,kc(()=>{a[t]=null}))}function Hp(a,t){return a===t||a?.[Or]===t}function Ci(a={},t,i,n){var s=ji.r,r=ti;return Uo(()=>{var o,l;return xc(()=>{o=l,l=n?.()||[],x(()=>{Hp(i(...l),a)||(t(a,...l),o&&Hp(i(...o),a)&&t(null,...o))})}),()=>{let c=r;for(;c!==s&&c.parent!==null&&c.parent.f&rp;)c=c.parent;const d=()=>{l&&Hp(i(...l),a)&&t(null,...l)},g=c.teardown;c.teardown=()=>{d(),g?.()}}}),a}function O4(a){return function(...t){var i=t[0];return i.stopPropagation(),a?.apply(this,t)}}function I4(a){return function(...t){var i=t[0];return i.preventDefault(),a?.apply(this,t)}}function Zi(a=!1){const t=ji,i=t.l.u;if(!i)return;let n=()=>Q(t.s);if(a){let s=0,r={};const o=_c(()=>{let l=!1;const c=t.s;for(const d in c)c[d]!==r[d]&&(r[d]=c[d],l=!0);return l&&s++,s});n=()=>e(o)}i.b.length&&P1(()=>{_v(t,n),ip(i.b)}),ju(()=>{const s=x(()=>i.m.map(Zx));return()=>{for(const r of s)typeof r=="function"&&r()}}),i.a.length&&ju(()=>{_v(t,n),ip(i.a)})}function _v(a,t){if(a.l.s)for(const i of a.l.s)e(i);t()}const D4={get(a,t){if(!a.exclude.has(t))return a.props[t]},set(a,t){return!1},getOwnPropertyDescriptor(a,t){if(!a.exclude.has(t)&&t in a.props)return{enumerable:!0,configurable:!0,value:a.props[t]}},has(a,t){return a.exclude.has(t)?!1:t in a.props},ownKeys(a){return Reflect.ownKeys(a.props).filter(t=>!a.exclude.has(t))}};function Pa(a,t,i){return new Proxy({props:a,exclude:t},D4)}const L4={get(a,t){let i=a.props.length;for(;i--;){let n=a.props[i];if(Xc(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(a,t,i){let n=a.props.length;for(;n--;){let s=a.props[n];Xc(s)&&(s=s());const r=so(s,t);if(r&&r.set)return r.set(i),!0}return!1},getOwnPropertyDescriptor(a,t){let i=a.props.length;for(;i--;){let n=a.props[i];if(Xc(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const s=so(n,t);return s&&!s.configurable&&(s.configurable=!0),s}}},has(a,t){if(t===Or||t===op)return!1;for(let i of a.props)if(Xc(i)&&(i=i()),i!=null&&t in i)return!0;return!1},ownKeys(a){const t=[];for(let i of a.props)if(Xc(i)&&(i=i()),!!i){for(const n in i)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(i))t.includes(n)||t.push(n)}return t}};function Ha(...a){return new Proxy({props:a},L4)}function Se(a,t,i,n){var s=!fc||(i&y6)!==0,r=(i&k6)!==0,o=(i&x6)!==0,l=n,c=!0,d=void 0,g=()=>o&&s?(d??=_c(n),e(d)):(c&&(c=!1,l=o?x(n):n),l);let h;if(r){var m=Or in a||op in a;h=so(a,t)?.set??(m&&t in a?$=>a[t]=$:void 0)}var p,u=!1;r?[p,u]=B6(()=>a[t]):p=a[t],p===void 0&&n!==void 0&&(p=g(),h&&(s&&d6(),h(p)));var f;if(s?f=()=>{var $=a[t];return $===void 0?g():(c=!0,$)}:f=()=>{var $=a[t];return $!==void 0&&(l=void 0),$===void 0?l:$},s&&(i&w6)===0)return f;if(h){var _=a.$$legacy;return(function($,M){return arguments.length>0?((!s||!M||_||u)&&h(M?f():$),$):f()})}var v=!1,b=((i&b6)!==0?_c:Nt)(()=>(v=!1,f()));r&&e(b);var S=ti;return(function($,M){if(arguments.length>0){const N=M?e(b):s&&r?yc($):$;return y(b,N),v=!0,l!==void 0&&(l=N),$}return fo&&v||(S.f&Bs)!==0?b.v:e(b)})}function V4(a){return class extends H4{constructor(t){super({component:a,...t})}}}class H4{#e;#t;constructor(t){var i=new Map,n=(r,o)=>{var l=Y(o,!1,!1);return i.set(r,l),l};const s=new Proxy({...t.props||{},$$events:{}},{get(r,o){return e(i.get(o)??n(o,Reflect.get(r,o)))},has(r,o){return o===op?!0:(e(i.get(o)??n(o,Reflect.get(r,o))),Reflect.has(r,o))},set(r,o,l){return y(i.get(o)??n(o,l),l),Reflect.set(r,o,l)}});this.#t=(t.hydrate?w4:iv)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&x1(),this.#e=s.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||tp(this,r,{get(){return this.#t[r]},set(o){this.#t[r]=o},enumerable:!0});this.#t.$set=r=>{Object.assign(s,r)},this.#t.$destroy=()=>{k4(this.#t)}}$set(t){this.#t.$set(t)}$on(t,i){this.#e[t]=this.#e[t]||[];const n=(...s)=>i.call(this,...s);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(s=>s!==n)}}$destroy(){this.#t.$destroy()}}function Jn(a){ji===null&&up(),fc&&ji.l!==null?W4(ji).m.push(a):ju(()=>{const t=x(a);if(typeof t=="function")return t})}function fr(a){ji===null&&up(),Jn(()=>()=>x(a))}function W4(a){var t=a.l;return t.u??={a:[],b:[],m:[]}}class Wp{constructor(t,i){this.status=t,typeof i=="string"?this.body={message:i}:i?this.body=i:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Qp{constructor(t,i){try{new Headers({location:i})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(i)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=i}}class Kp extends Error{constructor(t,i,n){super(n),this.status=t,this.text=i}}new URL("sveltekit-internal://");function Q4(a,t){return a==="/"||t==="ignore"?a:t==="never"?a.endsWith("/")?a.slice(0,-1):a:t==="always"&&!a.endsWith("/")?a+"/":a}function K4(a){return a.split("%25").map(decodeURI).join("%25")}function Y4(a){for(const t in a)a[t]=decodeURIComponent(a[t]);return a}function Yp({href:a}){return a.split("#")[0]}function Po(){}function J4(...a){let t=5381;for(const i of a)if(typeof i=="string"){let n=i.length;for(;n;)t=t*33^i.charCodeAt(--n)}else if(ArrayBuffer.isView(i)){const n=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);let s=n.length;for(;s;)t=t*33^n[--s]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function X4(a){const t=atob(a),i=new Uint8Array(t.length);for(let n=0;n((a instanceof Request?a.method:t?.method||"GET")!=="GET"&&vd.delete(Jp(a)),Z4(a,t));const vd=new Map;function e5(a,t){const i=Jp(a,t),n=document.querySelector(i);if(n?.textContent){n.remove();let{body:s,...r}=JSON.parse(n.textContent);n.getAttribute("data-b64")!==null&&(s=X4(s));const l=n.getAttribute("data-ttl");return l&&vd.set(i,{body:s,init:r,ttl:1e3*Number(l)}),Promise.resolve(new Response(s,r))}return window.fetch(a,t)}function t5(a,t,i){if(vd.size>0){const n=Jp(a,i),s=vd.get(n);if(s){if(performance.now(){const s=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(n);if(s)return t.push({name:s[1],matcher:s[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(n);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!n)return;const o=n.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,d)=>{if(d%2){if(c.startsWith("x+"))return Xp(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Xp(String.fromCharCode(...c.slice(2).split("-").map(f=>parseInt(f,16))));const g=a5.exec(c),[,h,m,p,u]=g;return t.push({name:p,matcher:u,optional:!!h,rest:!!m,chained:m?d===1&&o[0]==="":!1}),m?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return Xp(c)}).join("")}).join("")}/?$`),params:t}}function s5(a){return a!==""&&!/^\([^)]+\)$/.test(a)}function r5(a){return a.slice(1).split("/").filter(s5)}function o5(a,t,i){const n={},s=a.slice(1),r=s.filter(l=>l!==void 0);let o=0;for(let l=0;lg).join("/"),o=0),d===void 0)if(c.rest)d="";else continue;if(!c.matcher||i[c.matcher](d)){n[c.name]=d;const g=t[l+1],h=s[l+1];g&&!g.rest&&g.optional&&h&&c.chained&&(o=0),!g&&!h&&Object.keys(n).length===r.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return n}function Xp(a){return a.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function l5({nodes:a,server_loads:t,dictionary:i,matchers:n}){const s=new Set(t);return Object.entries(i).map(([l,[c,d,g]])=>{const{pattern:h,params:m}=n5(l),p={id:l,exec:u=>{const f=h.exec(u);if(f)return o5(f,m,n)},errors:[1,...g||[]].map(u=>a[u]),layouts:[0,...d||[]].map(o),leaf:r(c)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function r(l){const c=l<0;return c&&(l=~l),[c,a[l]]}function o(l){return l===void 0?l:[s.has(l),a[l]]}}function vv(a,t=JSON.parse){try{return t(sessionStorage[a])}catch{}}function bv(a,t,i=JSON.stringify){const n=i(t);try{sessionStorage[a]=n}catch{}}const pr=globalThis.__sveltekit_1xyyov?.base??"",c5=globalThis.__sveltekit_1xyyov?.assets??pr??"",d5="0.9.3",yv="sveltekit:snapshot",wv="sveltekit:scroll",kv="sveltekit:states",u5="sveltekit:pageurl",$c="sveltekit:history",bd="sveltekit:navigation",Gl={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Zp=location.origin;function xv(a){if(a instanceof URL)return a;let t=document.baseURI;if(!t){const i=document.getElementsByTagName("base");t=i.length?i[0].href:document.URL}return new URL(a,t)}function Fl(){return{x:pageXOffset,y:pageYOffset}}function qc(a,t){return a.getAttribute(`data-sveltekit-${t}`)}const Sv={...Gl,"":Gl.hover};function Tv(a){let t=a.assignedSlot??a.parentNode;return t?.nodeType===11&&(t=t.host),t}function $v(a,t){for(;a&&a!==t;){if(a.nodeName.toUpperCase()==="A"&&a.hasAttribute("href"))return a;a=Tv(a)}}function em(a,t,i){let n;try{if(n=new URL(a instanceof SVGAElement?a.href.baseVal:a.href,document.baseURI),i&&n.hash.match(/^#[^/]/)){const l=location.hash.split("#")[1]||"/";n.hash=`#${l}${n.hash}`}}catch{}const s=a instanceof SVGAElement?a.target.baseVal:a.target,r=!n||!!s||Hu(n,t,i)||(a.getAttribute("rel")||"").split(/\s+/).includes("external"),o=n?.origin===Zp&&a.hasAttribute("download");return{url:n,external:r,target:s,download:o}}function Vu(a){let t=null,i=null,n=null,s=null,r=null,o=null,l=a;for(;l&&l!==document.documentElement;)n===null&&(n=qc(l,"preload-code")),s===null&&(s=qc(l,"preload-data")),t===null&&(t=qc(l,"keepfocus")),i===null&&(i=qc(l,"noscroll")),r===null&&(r=qc(l,"reload")),o===null&&(o=qc(l,"replacestate")),l=Tv(l);function c(d){switch(d){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Sv[n??"off"],preload_data:Sv[s??"off"],keepfocus:c(t),noscroll:c(i),reload:c(r),replace_state:c(o)}}function qv(a){const t=yl(a);let i=!0;function n(){i=!0,t.update(o=>o)}function s(o){i=!1,t.set(o)}function r(o){let l;return t.subscribe(c=>{(l===void 0||i&&c!==l)&&o(l=c)})}return{notify:n,set:s,subscribe:r}}const Cv={v:Po};function f5(){const{set:a,subscribe:t}=yl(!1);let i;async function n(){clearTimeout(i);try{const s=await fetch(`${c5}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!s.ok)return!1;const o=(await s.json()).version!==d5;return o&&(a(!0),Cv.v(),clearTimeout(i)),o}catch{return!1}}return{subscribe:t,check:n}}function Hu(a,t,i){return a.origin!==Zp||!a.pathname.startsWith(t)?!0:i?a.pathname!==location.pathname:!1}const Av=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Av];const p5=new Set([...Av]);[...p5];function m5(a){return a.filter(t=>t!=null)}function Wu(a,t){return a+"/"+t}function tm(a){return a instanceof Wp||a instanceof Kp?a.status:500}function g5(a){return a instanceof Kp?a.text:"Internal Error"}let As,yd,am;const h5=Jn.toString().includes("$$")||/function \w+\(\) \{\}/.test(Jn.toString()),Gv="a:";h5?(As={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Gv)},yd={current:null},am={current:!1}):(As=new class{#e=Fn({});get data(){return e(this.#e)}set data(t){y(this.#e,t)}#t=Fn(null);get form(){return e(this.#t)}set form(t){y(this.#t,t)}#a=Fn(null);get error(){return e(this.#a)}set error(t){y(this.#a,t)}#l=Fn({});get params(){return e(this.#l)}set params(t){y(this.#l,t)}#n=Fn({id:null});get route(){return e(this.#n)}set route(t){y(this.#n,t)}#s=Fn({});get state(){return e(this.#s)}set state(t){y(this.#s,t)}#i=Fn(-1);get status(){return e(this.#i)}set status(t){y(this.#i,t)}#o=Fn(new URL(Gv));get url(){return e(this.#o)}set url(t){y(this.#o,t)}},yd=new class{#e=Fn(null);get current(){return e(this.#e)}set current(t){y(this.#e,t)}},am=new class{#e=Fn(!1);get current(){return e(this.#e)}set current(t){y(this.#e,t)}},Cv.v=()=>am.current=!0);function Fv(a){Object.assign(As,a)}const _5=new Set(["icon","shortcut icon","apple-touch-icon"]);let wd=null;const jo=vv(wv)??{},kd=vv(yv)??{},mo={url:qv({}),page:qv({}),navigating:yl(null),updated:f5()};function im(a){jo[a]=Fl()}function v5(a,t){let i=a+1;for(;jo[i];)delete jo[i],i+=1;for(i=t+1;kd[i];)delete kd[i],i+=1}function xd(a,t=!1){return t?location.replace(a.href):location.href=a.href,new Promise(Po)}async function Mv(){if("serviceWorker"in navigator){const a=await navigator.serviceWorker.getRegistration(pr||"/");a&&await a.update()}}let nm,sm,Qu,go,rm,Xn;const Ku=[],Yu=[];let mr=null;function Ju(){mr?.fork?.then(a=>a?.discard()),mr=null,Ac={element:void 0,href:void 0}}const Xu=new Map,zv=new Set,b5=new Set,Sd=new Set;let dn={branch:[],error:null,url:null},Ev=!1,Zu=!1,Uv=!0,Td=!1,$d=!1,Rv=!1,om=!1,Bv,is,gr,No;const ef=new Set,Pv=new Map,jv=new Map;async function y5(a,t,i){if(globalThis.__sveltekit_1xyyov.data){const{q:r={},p:o={},l={},f:c={}}=globalThis.__sveltekit_1xyyov.data;for(const d in r)r[d];for(const d in l)l[d];for(const d in c)c[d];for(const d in o)o[d]}document.URL!==location.href&&(location.href=location.href),Xn=a,await a.hooks.init?.(),nm=l5(a),go=document.documentElement,rm=t,sm=a.nodes[0],Qu=a.nodes[1],sm(),Qu(),is=history.state?.[$c],gr=history.state?.[bd],is||(is=gr=Date.now(),history.replaceState({...history.state,[$c]:is,[bd]:gr},""));const n=jo[is];function s(){n&&(history.scrollRestoration="manual",scrollTo(n.x,n.y))}i?(s(),await E5(rm,i)):(await Cc({type:"enter",url:xv(Xn.hash?B5(new URL(location.href)):location.href),replace_state:!0}),s()),z5()}function w5(){Ku.length=0,om=!1}function Nv(a){Yu.some(t=>t?.snapshot)&&(kd[a]=Yu.map(t=>t?.snapshot?.capture()))}function Ov(a){kd[a]?.forEach((t,i)=>{Yu[i]?.snapshot?.restore(t)})}function Iv(){im(is),bv(wv,jo),Nv(gr),bv(yv,kd)}async function k5(a,t,i,n){let s,r;t.invalidateAll&&Ju(),await Cc({type:"goto",url:xv(a),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:i,nav_token:n,accept:()=>{if(t.invalidateAll){om=!0,s=new Set;for(const[o,l]of Pv)for(const[c,d]of l)d.resource?.reset(),s.add(Wu(o,c));r=new Set;for(const[o,l]of jv)for(const c of l.keys())r.add(Wu(o,c))}t.invalidate&&t.invalidate.forEach(M5)}}),t.invalidateAll&&js().then(js).then(()=>{for(const[o,l]of Pv)for(const[c,{resource:d}]of l)s?.has(Wu(o,c))&&d.start();for(const[o,l]of jv)for(const[c,{resource:d}]of l)r?.has(Wu(o,c))&&d.reconnect()})}async function x5(a){if(a.id!==mr?.id){Ju();const t={};ef.add(t),mr={id:a.id,token:t,promise:Lv({...a,preload:t}).then(i=>(ef.delete(t),i.type==="loaded"&&i.state.error&&Ju(),i)),fork:null}}return mr.promise}async function lm(a){const t=(await af(a,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(i=>i[1]()))}async function Dv(a,t,i){const n={params:dn.params,route:{id:dn.route?.id??null},url:new URL(location.href)};if(dn={...a.state,nav:n},Fv(a.props.page),Bv=new Xn.root({target:t,props:{...a.props,stores:mo,components:Yu},hydrate:i,sync:!1,transformError:void 0}),await Promise.resolve(),i){const s={from:null,to:{...n,scroll:jo[is]??Fl()},willUnload:!1,type:"enter",complete:Promise.resolve()};Sd.forEach(r=>r(s))}Ov(gr),Zu=!0}async function tf({url:a,params:t,branch:i,errors:n,status:s,error:r,route:o,form:l}){let c="never";if(pr&&(a.pathname===pr||a.pathname===pr+"/"))c="always";else for(const u of i)u?.slash!==void 0&&(c=u.slash);a.pathname=Q4(a.pathname,c),a.search=a.search;const d={type:"loaded",state:{url:a,params:t,branch:i,error:r,route:o},props:{constructors:m5(i).map(u=>u.node.component),page:mm(As)}};l!==void 0&&(d.props.form=l);let g={},h=!As,m=0;for(let u=0;ul(new URL(o))))return!0;return!1}function dm(a,t){return a?.type==="data"?a:a?.type==="skip"?t??null:null}function $5(a,t){if(!a)return new Set(t.searchParams.keys());const i=new Set([...a.searchParams.keys(),...t.searchParams.keys()]);for(const n of i){const s=a.searchParams.getAll(n),r=t.searchParams.getAll(n);s.every(o=>r.includes(o))&&r.every(o=>s.includes(o))&&i.delete(n)}return i}function q5({error:a,url:t,route:i,params:n}){return{type:"loaded",state:{error:a,url:t,route:i,params:n,branch:[]},props:{page:mm(As),constructors:[]}}}async function Lv({id:a,invalidating:t,url:i,params:n,route:s,preload:r}){if(mr?.id===a)return ef.delete(mr.token),mr.promise;const{errors:o,layouts:l,leaf:c}=s,d=[...l,c];o.forEach(_=>_?.().catch(Po)),d.forEach(_=>_?.[1]().catch(Po));const g=dn.url?a!==nf(dn.url):!1,h=dn.route?s.id!==dn.route.id:!1,m=$5(dn.url,i);let p=!1;const u=d.map(async(_,v)=>{if(!_)return;const b=dn.branch[v];return _[1]===b?.loader&&!T5(p,h,g,m,b.universal?.uses,n)?b:(p=!0,cm({loader:_[1],url:i,params:n,route:s,parent:async()=>{const $={};for(let M=0;MPromise.resolve({}),server_data_node:dm(r)}),l={node:await Qu(),loader:Qu,universal:null,server:null,data:null};return tf({url:i,params:s,branch:[o,l],status:a,error:t,errors:[],route:null})}catch(o){if(o instanceof Qp){await k5(new URL(o.location,location.href),{},0);return}const l=await Xn.get_error_template(),c=await Gc(o,{url:i,params:s,route:n}),d=String(c?.message??"").replace(/&/g,"&").replace(//g,">"),g=l({status:a,message:d}),h=new DOMParser().parseFromString(g,"text/html");throw document.documentElement.replaceChild(document.adoptNode(h.head),document.head),document.documentElement.replaceChild(document.adoptNode(h.body),document.body),o}}async function A5(a){const t=a.href;if(Xu.has(t))return Xu.get(t);let i;try{const n=(async()=>{let s=await Xn.hooks.reroute({url:new URL(a),fetch:async(r,o)=>S5(r,o,a).promise})??a;if(typeof s=="string"){const r=new URL(a);Xn.hash?r.hash=s:r.pathname=s,s=r}return s})();Xu.set(t,n),i=await n}catch{Xu.delete(t);return}return i}async function af(a,t){if(a&&!Hu(a,pr,Xn.hash)){const i=await A5(a);if(!i)return;const n=G5(i);for(const s of nm){const r=s.exec(n);if(r)return{id:nf(a),invalidating:t,route:s,params:Y4(r),url:a}}}}function G5(a){return K4(Xn.hash?a.hash.replace(/^#/,"").replace(/[?#].+/,""):a.pathname.slice(pr.length))||"/"}function nf(a){return(Xn.hash?a.hash.replace(/^#/,""):a.pathname)+a.search}function Vv({url:a,type:t,intent:i,delta:n,event:s,scroll:r}){let o=!1;const l=pm(dn,i,a,t,r??null);n!==void 0&&(l.navigation.delta=n),s!==void 0&&(l.navigation.event=s);const c={...l.navigation,cancel:()=>{o=!0,l.reject(new Error("navigation cancelled"))}};return Td||zv.forEach(d=>d(c)),o?null:l}async function Cc({type:a,url:t,popped:i,keepfocus:n,noscroll:s,replace_state:r,state:o={},redirect_count:l=0,nav_token:c={},accept:d=Po,block:g=Po,event:h}){const m=No;No=c;const p=await af(t,!1),u=a==="enter"?pm(dn,p,t,a):Vv({url:t,type:a,delta:i?.delta,intent:p,scroll:i?.scroll,event:h});if(!u){g(),No===c&&(No=m);return}const f=is,_=gr;d(),Td=!0,Zu&&u.navigation.type!=="enter"&&mo.navigating.set(yd.current=u.navigation);let v=p&&await Lv(p);if(!v){if(Hu(t,pr,Xn.hash))return await xd(t,r);v=await Hv(t,{id:null},await Gc(new Kp(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,r)}if(t=p?.url||t,No!==c){u.reject(new Error("navigation aborted"));return}if(!v)return;if(v.type==="redirect"){if(l<20){await Cc({type:a,url:new URL(v.location,t),popped:i,keepfocus:n,noscroll:s,replace_state:r,state:o,redirect_count:l+1,nav_token:c}),u.fulfil(void 0);return}if(v=await um({status:500,error:await Gc(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!v)return}else if(v.props.page.status>=400&&await mo.updated.check())return await Mv(),await xd(t,r);if(w5(),im(f),Nv(_),v.props.page.url.pathname!==t.pathname&&(t.pathname=v.props.page.url.pathname),o=i?i.state:o,!i){const P=r?0:1,C={[$c]:is+=P,[bd]:gr+=P,[kv]:o};(r?history.replaceState:history.pushState).call(history,C,"",t),r||v5(is,gr)}const b=p&&mr?.id===p.id?mr.fork:null;mr?.fork&&!b?Ju():(mr=null,Ac={element:void 0,href:void 0}),v.props.page.state=o;let S;if(Zu){const P=(await Promise.all(Array.from(b5,G=>G(u.navigation)))).filter(G=>typeof G=="function");if(P.length>0){let G=function(){P.forEach(A=>{Sd.delete(A)})};P.push(G),P.forEach(A=>{Sd.add(A)})}const C=u.navigation.to;dn={...v.state,nav:{params:C.params,route:C.route,url:C.url}},v.props.page&&(v.props.page.url=t),!n&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();const j=b&&await b;j?S=j.commit():(wd=null,Bv.$set(v.props),wd&&Object.assign(v.props.page,wd),Fv(v.props.page),S=r4?.()),Rv=!0}else await Dv(v,rm,!1);const{activeElement:$}=document;if(await S,await js(),await js(),No!==c){u.reject(new Error("navigation aborted"));return}v.props.page&&wd&&Object.assign(v.props.page,wd);let M=null;if(Uv){const P=i?i.scroll:s?Fl():null;P?scrollTo(P.x,P.y):(M=t.hash&&document.getElementById(Wv(t)))?M.scrollIntoView():scrollTo(0,0)}const N=document.activeElement!==$&&document.activeElement!==document.body;!n&&!N&&R5(t,!M),Uv=!0,Td=!1,u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=Fl()),Sd.forEach(P=>P(u.navigation)),a==="popstate"&&Ov(gr),mo.navigating.set(yd.current=null)}async function Hv(a,t,i,n,s){return a.origin===Zp&&a.pathname===location.pathname&&!Ev?await um({status:n,error:i,url:a,route:t}):await xd(a,s)}let Ac={element:void 0,href:void 0};function F5(){let a,t;go.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(a),a=setTimeout(()=>{s(l,Gl.hover)},20)});function i(o){o.defaultPrevented||s(o.composedPath()[0],Gl.tap)}go.addEventListener("mousedown",i),go.addEventListener("touchstart",i,{passive:!0});const n=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(lm(new URL(l.target.href)),n.unobserve(l.target))},{threshold:0});async function s(o,l){const c=$v(o,go),d=c===Ac.element&&c?.href===Ac.href&&l>=t;if(!c||d)return;const{url:g,external:h,download:m}=em(c,pr,Xn.hash);if(h||m)return;const p=Vu(c),u=g&&nf(dn.url)===nf(g);if(!(p.reload||u))if(l<=p.preload_data){Ac={element:c,href:c.href},t=Gl.tap;const f=await af(g,!1);if(!f)return;x5(f)}else l<=p.preload_code&&(Ac={element:c,href:c.href},t=l,lm(g))}function r(){n.disconnect();for(const o of go.querySelectorAll("a")){const{url:l,external:c,download:d}=em(o,pr,Xn.hash);if(c||d)continue;const g=Vu(o);g.reload||(g.preload_code===Gl.viewport&&n.observe(o),g.preload_code===Gl.eager&&lm(l))}}Sd.add(r),r()}function Gc(a,t){if(a instanceof Wp)return a.body;const i=tm(a),n=g5(a);return Xn.hooks.handleError({error:a,event:t,status:i,message:n})??{message:n}}function M5(a){if(typeof a=="function")Ku.push(a);else{const{href:t}=new URL(a,location.href);Ku.push(i=>i.href===t)}}function z5(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let i=!1;if(Iv(),!Td){const n=pm(dn,void 0,null,"leave"),s={...n.navigation,cancel:()=>{i=!0,n.reject(new Error("navigation cancelled"))}};zv.forEach(r=>r(s))}i?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Iv()}),navigator.connection?.saveData||F5(),go.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const i=$v(t.composedPath()[0],go);if(!i)return;const{url:n,external:s,target:r,download:o}=em(i,pr,Xn.hash);if(!n)return;if(r==="_parent"||r==="_top"){if(window.parent!==window)return}else if(r&&r!=="_self")return;const l=Vu(i);if(!(i instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||o)return;const[d,g]=(Xn.hash?n.hash.replace(/^#/,""):n.href).split("#"),h=d===Yp(location);if(s||l.reload&&(!h||!g)){Vv({url:n,type:"link",event:t})?Td=!0:t.preventDefault();return}if(g!==void 0&&h){const[,m]=dn.url.href.split("#");if(m===g){if(t.preventDefault(),g===""||g==="top"&&i.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const p=i.ownerDocument.getElementById(decodeURIComponent(g));p&&(p.scrollIntoView(),p.focus())}return}if($d=!0,im(is),a(n),!l.replace_state)return;$d=!1}t.preventDefault(),await new Promise(m=>{requestAnimationFrame(()=>{setTimeout(m,0)}),setTimeout(m,100)}),await Cc({type:"link",url:n,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??n.href===location.href,event:t})}),go.addEventListener("submit",t=>{if(t.defaultPrevented)return;const i=HTMLFormElement.prototype.cloneNode.call(t.target),n=t.submitter;if((n?.formTarget||i.target)==="_blank"||(n?.formMethod||i.method)!=="get")return;const o=new URL(n?.hasAttribute("formaction")&&n?.formAction||i.action);if(Hu(o,pr,!1))return;const l=t.target,c=Vu(l);if(c.reload)return;t.preventDefault(),t.stopPropagation();const d=new FormData(l,n);o.search=new URLSearchParams(d).toString(),Cc({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!fm){if(t.state?.[$c]){const i=t.state[$c];if(No={},i===is)return;const n=jo[i],s=t.state[kv]??{},r=new URL(t.state[u5]??location.href),o=t.state[bd],l=dn.url?Yp(location)===Yp(dn.url):!1;if(o===gr&&(Rv||l)){s!==As.state&&(As.state=s),a(r),jo[is]=Fl(),n&&scrollTo(n.x,n.y),is=i;return}const d=i-is;await Cc({type:"popstate",url:r,popped:{state:s,scroll:n,delta:d},accept:()=>{is=i,gr=o},block:()=>{history.go(-d)},nav_token:No,event:t})}else if(!$d){const i=new URL(location.href);a(i),Xn.hash&&location.reload()}}}),addEventListener("hashchange",()=>{$d&&($d=!1,history.replaceState({...history.state,[$c]:++is,[bd]:gr},"",location.href))});for(const t of document.querySelectorAll("link"))_5.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&mo.navigating.set(yd.current=null)});function a(t){dn.url=As.url=t,mo.page.set(mm(As)),mo.page.notify()}}async function E5(a,{status:t=200,error:i,node_ids:n,params:s,route:r,server_route:o,data:l,form:c}){Ev=!0;const d=new URL(location.href);let g;({params:s={},route:r={id:null}}=await af(d,!1)||{}),g=nm.find(({id:p})=>p===r.id);let h,m=!0;try{const p=n.map(async(f,_)=>{const v=l[_];return v?.uses&&(v.uses=U5(v.uses)),cm({loader:Xn.nodes[f],url:d,params:s,route:r,parent:async()=>{const b={};for(let S=0;S<_;S+=1)Object.assign(b,(await p[S]).data);return b},server_data_node:dm(v)})}),u=await Promise.all(p);if(g){const f=g.layouts;for(let _=0;_{const l=history.state;fm=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(l,"",a),t&&scrollTo(r,o),fm=!1})}else{const r=document.body,o=r.getAttribute("tabindex");r.tabIndex=-1,r.focus({preventScroll:!0,focusVisible:!1}),o!==null?r.setAttribute("tabindex",o):r.removeAttribute("tabindex")}const s=getSelection();if(s&&s.type!=="None"){const r=[];for(let o=0;o{if(s.rangeCount===r.length){for(let o=0;o{r=d,o=g});return l.catch(Po),{navigation:{from:{params:a.params,route:{id:a.route?.id??null},url:a.url,scroll:Fl()},to:i&&{params:t?.params??null,route:{id:t?.route?.id??null},url:i,scroll:s},willUnload:!t,type:n,complete:l},fulfil:r,reject:o}}function mm(a){return{data:a.data,error:a.error,form:a.form,params:a.params,route:a.route,state:a.state,status:a.status,url:a.url}}function B5(a){const t=new URL(a);return t.hash=decodeURIComponent(a.hash),t}function Wv(a){let t;if(Xn.hash){const[,,i]=a.hash.split("#",3);t=i??""}else t=a.hash.slice(1);return decodeURIComponent(t)}const YP="modulepreload",JP=function(a,t){return new URL(a,t).href},XP={},Ml=function(t,i,n){let s=Promise.resolve();function r(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&r(l.reason);return t().catch(r)})},P5={},j5="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(j5);var N5=ae('
'),O5=ae(" ",1);function I5(a,t){Fi(t,!0);let i=Se(t,"components",23,()=>[]),n=Se(t,"data_0",3,null),s=Se(t,"data_1",3,null);P1(()=>t.stores.page.set(t.page)),ju(()=>{t.stores,t.page,t.constructors,i(),t.form,n(),s(),t.stores.page.notify()});let r=Fn(!1),o=Fn(!1),l=Fn(null);Jn(()=>{const f=t.stores.page.subscribe(()=>{e(r)&&(y(o,!0),js().then(()=>{y(l,document.title||"untitled page",!0)}))});return y(r,!0),f});const c=Va(()=>t.constructors[1]);var d=O5(),g=ht(d);{var h=f=>{const _=Va(()=>t.constructors[0]);var v=ys(),b=ht(v);md(b,()=>e(_),(S,$)=>{Ci($(S,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(M,N)=>{var P=ys(),C=ht(P);md(C,()=>e(c),(j,G)=>{Ci(G(j,{get data(){return s()},get form(){return t.form},get params(){return t.page.params}}),A=>i()[1]=A,()=>i()?.[1])}),J(M,P)},$$slots:{default:!0}}),M=>i()[0]=M,()=>i()?.[0])}),J(f,v)},m=f=>{const _=Va(()=>t.constructors[0]);var v=ys(),b=ht(v);md(b,()=>e(_),(S,$)=>{Ci($(S,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),M=>i()[0]=M,()=>i()?.[0])}),J(f,v)};ve(g,f=>{t.constructors[1]?f(h):f(m,-1)})}var p=q(g,2);{var u=f=>{var _=N5(),v=k(_);{var b=S=>{var $=Bp();ie(()=>W($,e(l))),J(S,$)};ve(v,S=>{e(o)&&S(b)})}w(_),J(f,_)};ve(p,f=>{e(r)&&f(u)})}J(a,d),Mi()}const D5=V4(I5),L5=[()=>Ml(()=>Promise.resolve().then(()=>Y5),void 0,An&&An.tagName.toUpperCase()==="SCRIPT"&&An.src||new URL("_app/immutable/bundle.BpLoWpUY.js",document.baseURI).href),()=>Ml(()=>Promise.resolve().then(()=>eS),void 0,An&&An.tagName.toUpperCase()==="SCRIPT"&&An.src||new URL("_app/immutable/bundle.BpLoWpUY.js",document.baseURI).href),()=>Ml(()=>Promise.resolve().then(()=>Lz),void 0,An&&An.tagName.toUpperCase()==="SCRIPT"&&An.src||new URL("_app/immutable/bundle.BpLoWpUY.js",document.baseURI).href)],V5=[],H5={"/":[2]},gm={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},Qv=Object.fromEntries(Object.entries(gm.transport).map(([a,t])=>[a,t.decode])),W5=Object.fromEntries(Object.entries(gm.transport).map(([a,t])=>[a,t.encode])),Kv=Object.freeze(Object.defineProperty({__proto__:null,decode:(a,t)=>Qv[a](t),decoders:Qv,dictionary:H5,encoders:W5,get_error_template:()=>Ml(()=>Promise.resolve().then(()=>Vz),void 0,An&&An.tagName.toUpperCase()==="SCRIPT"&&An.src||new URL("_app/immutable/bundle.BpLoWpUY.js",document.baseURI).href).then(a=>a.default),hash:!0,hooks:gm,matchers:P5,nodes:L5,root:D5,server_loads:V5},Symbol.toStringTag,{value:"Module"}));function Q5(a,t){y5(Kv,a,t)}function K5(a,t){var i=ys(),n=ht(i);ov(n,()=>t.children),J(a,i)}const Y5=Object.freeze(Object.defineProperty({__proto__:null,component:K5},Symbol.toStringTag,{value:"Module"})),J5={get error(){return As.error},get status(){return As.status}};mo.updated.check;const Yv=J5;var X5=ae("

",1);function Z5(a,t){Fi(t,!0);var i=X5(),n=ht(i),s=k(n,!0);w(n);var r=q(n,2),o=k(r,!0);w(r),ie(()=>{W(s,Yv.status),W(o,Yv.error?.message)}),J(a,i),Mi()}const eS=Object.freeze(Object.defineProperty({__proto__:null,component:Z5},Symbol.toStringTag,{value:"Module"}));F6();const zl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const hm=(...a)=>a.filter((t,i,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===i).join(" ").trim();function _m(a){return a!=null}function tS(a,t={}){const i=t.attributeNames??{},n=m=>i[m]??m,s=a.size??a.width??zl.width,r=a.size??a.height??zl.height,o=a.aliases?.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`)??[],l=[...a.name?[`lucide-${a.name}`]:[],...o],c=t.className?.split(" ").filter(Boolean)??[],d=t.includeDefaultClasses===!1?hm(...c):hm("lucide",...l,...c),g=t.absoluteStrokeWidth?Number(t.strokeWidth??zl["stroke-width"])*Number(a.size??a.width??zl.width)/Number(t.size??t.width??zl.width):t.strokeWidth??zl["stroke-width"];return["svg",{...Object.entries(zl).reduce((m,[p,u])=>(m[n(p)]=u,m),{}),..."color"in t&&t.color&&{[n("stroke")]:t.color},..."size"in t&&_m(t.size)&&{[n("width")]:t.size,[n("height")]:t.size},..."width"in t&&_m(t.width)&&{[n("width")]:t.width},..."height"in t&&_m(t.height)&&{[n("height")]:t.height},[n("stroke-width")]:g,...d&&{[n("class")]:d},[n("viewBox")]:`0 0 ${s} ${r}`,...t.hasA11yProp===!1?{[n("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},a.node.map(m=>{const[p,u,f]=m,_=t.nonScalingStroke?{[n("vector-effect")]:"non-scaling-stroke",...u}:u;return f?[p,_,f]:[p,_]})]}const aS=a=>{for(const t in a)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const iS=Symbol("lucide-context"),nS=()=>M6(iS);var sS=new Set(["$$slots","$$events","$$legacy","color","size","width","height","strokeWidth","absoluteStrokeWidth","nonScalingStroke","iconNode","icon","class","children"]),rS=po("");function Wa(a,t){Fi(t,!0);const i=nS()??{},n=Se(t,"color",19,()=>i.color??"currentColor"),s=Se(t,"size",19,()=>i.size??24),r=Se(t,"width",19,s),o=Se(t,"height",19,s),l=Se(t,"strokeWidth",19,()=>i.strokeWidth??2),c=Se(t,"absoluteStrokeWidth",19,()=>i.absoluteStrokeWidth??!1),d=Se(t,"nonScalingStroke",19,()=>i.nonScalingStroke??!1),g=Se(t,"iconNode",19,()=>[]),h=Se(t,"icon",19,()=>({node:g(),aliases:[],size:24})),m=Pa(t,sS),p=Va(()=>!!t.children||aS(m)),u=Va(()=>tS(h(),{color:n(),width:r(),height:o(),strokeWidth:l(),absoluteStrokeWidth:c(),nonScalingStroke:d(),className:hm("lucide-icon",i.class),hasA11yProp:e(p),attributes:m})),f=Va(()=>Zc(e(u),3)),_=Va(()=>e(f)[1]),v=Va(()=>e6(e(f)[2],()=>[],!0)),b=Va(()=>({...e(_),class:[...e(_).class.split(" "),t.class]}));var S=rS();mv(S,()=>({...e(b)}));var $=k(S);Ct($,17,()=>e(v),Qt,(N,P)=>{var C=Va(()=>Zc(e(P),2));let j=()=>e(C)[0],G=()=>e(C)[1];var A=ys(),B=ht(A);C4(B,j,!0,(H,U)=>{mv(H,()=>({...G()}))}),J(N,A)});var M=q($);ov(M,()=>t.children??Mo),w(S),J(a,S),Mi()}var oS=new Set(["$$slots","$$events","$$legacy"]);function Jv(a,t){let i=Pa(t,oS);const n={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var lS=new Set(["$$slots","$$events","$$legacy"]);function Xv(a,t){let i=Pa(t,lS);const n={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var cS=new Set(["$$slots","$$events","$$legacy"]);function sf(a,t){let i=Pa(t,cS);const n={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3"}],["path",{d:"M6 6v11"}],["path",{d:"M10 3v18"}],["path",{d:"M14 8v7"}],["path",{d:"M18 5v13"}],["path",{d:"M22 10v3"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var dS=new Set(["$$slots","$$events","$$legacy"]);function vm(a,t){let i=Pa(t,dS);const n={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var uS=new Set(["$$slots","$$events","$$legacy"]);function bm(a,t){let i=Pa(t,uS);const n={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var fS=new Set(["$$slots","$$events","$$legacy"]);function rf(a,t){let i=Pa(t,fS);const n={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var pS=new Set(["$$slots","$$events","$$legacy"]);function of(a,t){let i=Pa(t,pS);const n={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var mS=new Set(["$$slots","$$events","$$legacy"]);function Zv(a,t){let i=Pa(t,mS);const n={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var gS=new Set(["$$slots","$$events","$$legacy"]);function hS(a,t){let i=Pa(t,gS);const n={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var _S=new Set(["$$slots","$$events","$$legacy"]);function qd(a,t){let i=Pa(t,_S);const n={name:"download",size:24,node:[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var vS=new Set(["$$slots","$$events","$$legacy"]);function bS(a,t){let i=Pa(t,vS);const n={name:"file-headphone",size:24,node:[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0"}]],aliases:["file-audio","file-audio-2"]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var yS=new Set(["$$slots","$$events","$$legacy"]);function Oo(a,t){let i=Pa(t,yS);const n={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var wS=new Set(["$$slots","$$events","$$legacy"]);function Fc(a,t){let i=Pa(t,wS);const n={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var kS=new Set(["$$slots","$$events","$$legacy"]);function eb(a,t){let i=Pa(t,kS);const n={name:"languages",size:24,node:[["path",{d:"m5 8 6 6"}],["path",{d:"m4 14 6-6 2-3"}],["path",{d:"M2 5h12"}],["path",{d:"M7 2h1"}],["path",{d:"m22 22-5-10-5 10"}],["path",{d:"M14 18h6"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var xS=new Set(["$$slots","$$events","$$legacy"]);function SS(a,t){let i=Pa(t,xS);const n={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]],aliases:["layers-3"]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var TS=new Set(["$$slots","$$events","$$legacy"]);function $S(a,t){let i=Pa(t,TS);const n={name:"list-filter",size:24,node:[["path",{d:"M2 5h20"}],["path",{d:"M6 12h12"}],["path",{d:"M9 19h6"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var qS=new Set(["$$slots","$$events","$$legacy"]);function CS(a,t){let i=Pa(t,qS);const n={name:"list",size:24,node:[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var AS=new Set(["$$slots","$$events","$$legacy"]);function GS(a,t){let i=Pa(t,AS);const n={name:"merge",size:24,node:[["path",{d:"m8 6 4-4 4 4"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22"}],["path",{d:"m20 22-5-5"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var FS=new Set(["$$slots","$$events","$$legacy"]);function Cd(a,t){let i=Pa(t,FS);const n={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var MS=new Set(["$$slots","$$events","$$legacy"]);function ym(a,t){let i=Pa(t,MS);const n={name:"mic",size:24,node:[["path",{d:"M12 19v3"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var zS=new Set(["$$slots","$$events","$$legacy"]);function ES(a,t){let i=Pa(t,zS);const n={name:"minus",size:24,node:[["path",{d:"M5 12h14"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var US=new Set(["$$slots","$$events","$$legacy"]);function tb(a,t){let i=Pa(t,US);const n={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var RS=new Set(["$$slots","$$events","$$legacy"]);function Mc(a,t){let i=Pa(t,RS);const n={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var BS=new Set(["$$slots","$$events","$$legacy"]);function Dr(a,t){let i=Pa(t,BS);const n={name:"plus",size:24,node:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var PS=new Set(["$$slots","$$events","$$legacy"]);function jS(a,t){let i=Pa(t,PS);const n={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var NS=new Set(["$$slots","$$events","$$legacy"]);function OS(a,t){let i=Pa(t,NS);const n={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var IS=new Set(["$$slots","$$events","$$legacy"]);function DS(a,t){let i=Pa(t,IS);const n={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M12 7v5l4 2"}]],aliases:["history"]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var LS=new Set(["$$slots","$$events","$$legacy"]);function ab(a,t){let i=Pa(t,LS);const n={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var VS=new Set(["$$slots","$$events","$$legacy"]);function HS(a,t){let i=Pa(t,VS);const n={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var WS=new Set(["$$slots","$$events","$$legacy"]);function ib(a,t){let i=Pa(t,WS);const n={name:"scissors",size:24,node:[["circle",{cx:"6",cy:"6",r:"3"}],["path",{d:"M8.12 8.12 12 12"}],["path",{d:"M20 4 8.12 15.88"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M14.8 14.8 20 20"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var QS=new Set(["$$slots","$$events","$$legacy"]);function nb(a,t){let i=Pa(t,QS);const n={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var KS=new Set(["$$slots","$$events","$$legacy"]);function sb(a,t){let i=Pa(t,KS);const n={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var YS=new Set(["$$slots","$$events","$$legacy"]);function zc(a,t){let i=Pa(t,YS);const n={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var JS=new Set(["$$slots","$$events","$$legacy"]);function ho(a,t){let i=Pa(t,JS);const n={name:"trash",size:24,node:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],aliases:["trash-2"]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var XS=new Set(["$$slots","$$events","$$legacy"]);function ZS(a,t){let i=Pa(t,XS);const n={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var eT=new Set(["$$slots","$$events","$$legacy"]);function wm(a,t){let i=Pa(t,eT);const n={name:"upload",size:24,node:[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var tT=new Set(["$$slots","$$events","$$legacy"]);function Ad(a,t){let i=Pa(t,tT);const n={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5"}],["path",{d:"M20 21a8 8 0 0 0-16 0"}]],aliases:["user-2"]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var aT=new Set(["$$slots","$$events","$$legacy"]);function lf(a,t){let i=Pa(t,aT);const n={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var iT=new Set(["$$slots","$$events","$$legacy"]);function El(a,t){let i=Pa(t,iT);const n={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var nT=new Set(["$$slots","$$events","$$legacy"]);function sT(a,t){let i=Pa(t,nT);const n={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var rT=new Set(["$$slots","$$events","$$legacy"]);function rb(a,t){let i=Pa(t,rT);const n={name:"x",size:24,node:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var oT=new Set(["$$slots","$$events","$$legacy"]);function lT(a,t){let i=Pa(t,oT);const n={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}var cT=new Set(["$$slots","$$events","$$legacy"]);function dT(a,t){let i=Pa(t,cT);const n={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]]};Wa(a,Ha(()=>i,{get icon(){return n}}))}function cf(a,t,i){for(let n=0;na.getChannelData(c));let o=44;for(let l=0;lt.decodeAudioData(await c.arrayBuffer()))),n=i[0].sampleRate,s=i[0].numberOfChannels;for(const c of i)if(c.sampleRate!==n||c.numberOfChannels!==s)throw new Error("Generated chunks use different audio formats and cannot be joined.");const r=i.reduce((c,d)=>c+d.length,0),o=t.createBuffer(s,r,n);let l=0;for(const c of i){for(let d=0;dt.startsWith("data:")).map(t=>t.slice(t.startsWith("data: ")?6:5)).join(` `)}async function*wT(a,t){const i=await fetch(km("/v1/tasks/stream"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,stream_format:"sse"}),signal:t});if(!i.ok)throw await xm(i);if(!i.body)throw new Error("This browser cannot read a streamed response.");const n=i.body.getReader(),s=new TextDecoder;let r=[],o=!1,l=!1,c=!1,d=!1;try{for(;!d;){let g;try{g=await n.read()}catch(u){if(u?.name==="AbortError")throw u;break}d=g.done;const h=g.done?s.decode():s.decode(g.value,{stream:!0});if(!h||c)continue;const m=[];let p=0;if(o&&h.startsWith(` @@ -48,17 +48,17 @@ `,p);u>=0;u=h.indexOf(` `,p))r.push(h.slice(p,u)),m.push(r.join("")),r=[],p=u+2;if(p{})}if(!l)throw new ub}function mf(a){const t=atob(a),i=new Uint8Array(t.length);for(let n=0;n=1 disable nucleus filtering."},{name:"repetition_penalty",type:"float",default:1,required:!1,description:"Token repetition penalty. Must be positive."},{name:"seed",type:"int",default:42,required:!1,description:"Sampling seed. Parsed as a signed integer and converted to uint32."}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",default:"native",required:!1,description:"Weight storage type; native preserves the packaged tensor types."},{name:"lora",type:"path",required:!1,description:"Matching PEFT LoRA adapter directory or checkpoint file; merged at session creation. Keep adapter_config.json beside the weights."},{name:"lora_scale",type:"float",default:1,required:!1,description:"Multiplier for the adapter's alpha/r scaling."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Audio-Flamingo-GGUF",revision:"main",gated:!1}},packages:[{id:"audio_flamingo_next_q4_k",display_name:"Audio Flamingo Next GGUF Q4_K",default:!0,format:"gguf",precision:"q4_k",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-next-q4_k.gguf"]},{id:"audio_flamingo_next_q8_0",display_name:"Audio Flamingo Next GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-next-q8_0.gguf"]},{id:"audio_flamingo_next_bf16",display_name:"Audio Flamingo Next GGUF BF16",format:"gguf",precision:"bf16",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-next-bf16.gguf"]},{id:"audio_flamingo_3_q4_k",display_name:"Audio Flamingo 3 GGUF Q4_K",format:"gguf",precision:"q4_k",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-3-q4_k.gguf"]},{id:"audio_flamingo_3_q8_0",display_name:"Audio Flamingo 3 GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-3-q8_0.gguf"]},{id:"audio_flamingo_3_bf16",display_name:"Audio Flamingo 3 GGUF BF16",format:"gguf",precision:"bf16",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-3-bf16.gguf"]},{id:"music_flamingo_2601_q8_0",display_name:"Music Flamingo 2601 GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Audio-Flamingo-GGUF",files:["music-flamingo-2601-q8_0.gguf"]}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/audio_flamingo.md"],recommended_package:"audio_flamingo_next_q4_k"},sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",chat_template:"model:chat_template.jinja"},tensors:{weights:{source:"model:model.safetensors"}}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",chat_template:"model:chat_template.jinja"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},CT={schema_version:1,family:"audiosr",display_name:"AudioSR",description:"AudioSR performs latent-diffusion audio super-resolution from an input waveform.",category:"audio_tools",status:"experimental",tasks:["s2s"],modes:["offline"],languages:["auto"],runtime:{tags:["gguf","cuda"]},capabilities:{s2s:["audio_enhancement"]},options:{request:[{name:"num_inference_steps",type:"int",description:"DDIM inference steps. The uniform DDIM schedule must produce exactly this many timesteps; not every count is valid (e.g. 51 fails with 1000 diffusion timesteps).",required:!1,min:1,max:1e3,default:50},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale. Any finite value is accepted.",required:!1,default:3.5},{name:"ddim_eta",type:"float",description:"DDIM eta; 1.0 matches the official AudioSR default. Must be nonnegative; there is no runtime upper bound.",required:!1,min:0,default:1},{name:"audio_chunk_duration_sec",type:"float",description:"Long-audio chunk duration.",required:!1,min:.001,default:15},{name:"audio_chunk_overlap_sec",type:"float",description:"Long-audio chunk overlap; must be smaller than audio_chunk_duration_sec, including after rounding to samples.",required:!1,min:0,default:2},{name:"seed",type:"int",description:"Generation seed; omitted or negative values use the fixed seed 42, not a random seed. Zero is a fixed seed.",required:!1,max:2147483647,default:42}],session:[{name:"weight_type",type:"enum",description:"AudioSR weight storage type.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"audiosr_basic_f32",display_name:"AudioSR Basic F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"AudioSR-GGUF",files:["AudioSR-GGUF/audiosr-basic-f32.gguf"],strip_prefix:"AudioSR-GGUF"}],dependencies:[],ui:{recommended_package:"audiosr_basic_f32",tags:["GGUF"],docs:["docs/models/audiosr.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{weights:{source:"weights:"},frontend:{source:"weights:",prefix:"frontend"}}}]},AT={schema_version:1,family:"auk",display_name:"AuK",description:"Tencent AuK base and AuK-Flash speech generation and editing models.",category:"tts",status:"experimental",tasks:["tts","clone","edit"],modes:["offline"],languages:["auto"],runtime:{tags:["cuda","gguf"]},ui:{recommended_package:"auk_base_f32",tags:["TTS","Edit"],docs:["docs/models/auk.md"]},capabilities:{tts:["speaker_reference"],clone:["speaker_reference"],edit:["prompt_editing"]},options:{request:[{name:"instruct",type:"string",description:"TTS voice description. Without it, text carries the complete upstream instruction; editing instructions always go in text.",required:!1},{name:"duration_sec",type:"float",description:"Positive output duration in seconds. Required without reference audio; otherwise defaults to the valid reference duration.",required:!1},{name:"num_inference_steps",type:"int",description:"Euler sampling steps for AuK base; AuK-Flash always uses its fixed four-step schedule.",required:!1,min:1,default:32},{name:"guidance_scale",type:"float",description:"Batched guidance strength for AuK base; AuK-Flash always disables classifier-free guidance.",required:!1,default:2},{name:"sway_sampling_coef",type:"float",description:"Sway coefficient for AuK base; ignored by AuK-Flash.",required:!1,default:-1},{name:"seed",type:"int",description:"Nonnegative noise seed, or -1 for a random seed.",required:!1,min:-1,default:-1}],session:[{name:"variant",type:"enum",values:["base","flash"],description:"AuK generation schedule; select flash with an AuK-Flash component.",required:!1,default:"base"},{name:"model_gguf",type:"string",description:"AuK base or Flash generator GGUF relative to the model root; defaults to the selected variant's F32 file.",required:!1},{name:"qwen_gguf",type:"string",description:"Qwen2.5-Omni-3B conditioning GGUF relative to the model root.",required:!1,default:"qwen2.5-omni-3b-bf16.gguf"},{name:"vae_gguf",type:"string",description:"AuK VAE GGUF relative to the model root.",required:!1,default:"auk-vae-f32.gguf"},{name:"attention",type:"enum",values:["auto","flash","eager"],description:"Flow-model attention mode.",required:!1,default:"auto"},{name:"mem_saver",type:"bool",description:"Release Qwen conditioning and generation weights between stages to reduce peak VRAM.",required:!1,default:!1}],load:[]},dependencies:[],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/AuK-Base-and-Flash-GGUF",revision:"main",gated:!1}},packages:[{id:"auk_base_f32",display_name:"AuK Base F32",default:!0,format:"gguf",precision:"f32",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-base-f32.gguf"]},{id:"auk_base_f16",display_name:"AuK Base F16",format:"gguf",precision:"f16",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-base-f16.gguf"]},{id:"auk_base_q8_0",display_name:"AuK Base Q8_0",format:"gguf",precision:"q8_0",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-base-q8_0.gguf"]},{id:"auk_flash_f32",display_name:"AuK-Flash F32",format:"gguf",precision:"f32",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-flash-f32.gguf"]},{id:"auk_flash_f16",display_name:"AuK-Flash F16",format:"gguf",precision:"f16",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-flash-f16.gguf"]},{id:"auk_flash_q8_0",display_name:"AuK-Flash Q8_0",format:"gguf",precision:"q8_0",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-flash-q8_0.gguf"]},{id:"auk_qwen_bf16",display_name:"AuK Qwen BF16",format:"gguf",precision:"bf16",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","qwen2.5-omni-3b-bf16.gguf"]},{id:"auk_qwen_q8_0",display_name:"AuK Qwen Q8_0",format:"gguf",precision:"q8_0",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","qwen2.5-omni-3b-q8_0.gguf"]},{id:"auk_vae_f32",display_name:"AuK VAE F32",format:"gguf",precision:"f32",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-vae-f32.gguf"]}],sources:[{format:"gguf",roots:{model:"."},files:{base_config:"model:config/auk-base.yaml",flash_config:"model:config/auk-flash.yaml",tokenizer_json:"model:tokenizer/tokenizer.json",tokenizer_config:"model:tokenizer/tokenizer_config.json"}}]},GT={schema_version:1,family:"breeze_tts",display_name:"BreezeTTS 2",description:"BreezeTTS 2 native GGUF package for instruction-conditioned text-to-speech and prompt-audio voice cloning with T5Gemma text conditioning, Qwen-style acoustic code generation, depth codebook decoding, and Mimi waveform decoding.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["zh","en"],runtime:{tags:["gguf"]},dependencies:[],capabilities:{design:["voice_design"],tts:["style_control"],clone:["speaker_reference"]},options:{request:[{name:"instruct",type:"string",description:"BreezeTTS generation instruction.",required:!1,default:"Speak clearly and naturally."},{name:"reference_text",type:"string",description:"Transcript for prompt/reference audio; required when reference audio codes are used, for either tts or clon.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 600.",required:!1,min:1,default:600},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"max_tokens",type:"int",description:"Maximum generated BreezeTTS acoustic frames.",required:!1,min:1,default:1500},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale.",required:!1,min:0,default:1},{name:"temperature",type:"float",description:"Backbone first-codebook sampling temperature. Must be > 0.",required:!1,min:0,default:.9},{name:"depth_temperature",type:"float",description:"Depth decoder codebook sampling temperature. Must be > 0.",required:!1,min:0,default:.9},{name:"top_k",type:"int",description:"Top-k sampling limit; 0 disables top-k filtering. Nonpositive values disable top-k filtering.",required:!1,default:50},{name:"top_p",type:"float",description:"Positive nucleus sampling cutoff; values >=1 disable nucleus filtering.",required:!1,min:0,default:1},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,default:0},{name:"stream_frames_per_event",type:"int",description:"Maximum generated codec frames per streaming audio event; fixed size with stream_chunk_policy=fixed.",required:!1,min:1,default:16},{name:"stream_lookahead_margin",type:"int",description:"Additional trailing codec frames buffered before streaming emission. The decoder is causal; zero minimizes latency.",required:!1,min:0,default:0},{name:"stream_chunk_policy",type:"enum",description:"Streaming chunk schedule: grow emits 1, 2, 4, ... frames up to stream_frames_per_event; fixed uses that size from the first event.",values:["grow","fixed"],required:!1,default:"grow"}],session:[{name:"weight_type",type:"enum",description:"BreezeTTS matmul weight storage type; default native.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"]},{name:"graph_arena_mb",type:"int",description:"Reusable runtime graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 4.",required:!1,min:1,default:4},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse.",required:!1,min:0,default:1},{name:"attention",type:"enum",description:"Attention lowering; auto probes the backend and falls back to eager on GPUs without a flash kernel (e.g. sm70); default auto.",required:!1,values:["auto","flash","eager"],default:"auto"},{name:"bf16_activations",type:"enum",description:"Reference bf16 activation rounding as the official BreezeTTS 2 inference does it. auto = on for CUDA/HIP/Vulkan and off on Metal, where the cast cost is visible even with the fused round-to-bf16 op (~20% slower AR loop); on/off force it either way. On Metal, on also switches the KV cache to bf16 to match the reference implementation.",required:!1,values:["auto","on","off"],default:"auto"},{name:"perf_mode",type:"enum",description:"AR decode preset. off uses the normal defaults (fused_depth, direct_prefill and skip_cache_round enabled on CUDA, Vulkan and Metal); cuda_perf additionally enables batched_cfg on CUDA. Explicit session options override the preset.",required:!1,values:["off","cuda_perf"],default:"off"},{name:"fused_depth",type:"bool",description:"Decode each frame's depth codebooks in one backend graph with device-side CFG mixing and sampling. Device sampling uses the per-codebook path's torch random draws, so CUDA output normally matches it token for token. Vulkan/Metal sampling uses a different draw mapping. CUDA, Vulkan and Metal only.",required:!1,default:!0},{name:"direct_prefill",type:"bool",description:"Offline generation prefills the backbone straight into the decode cache, as streaming does, instead of exporting the KV state to the host and importing it back. Same computation. CUDA, Vulkan and Metal only.",required:!1,default:!0},{name:"skip_cache_round",type:"bool",description:"Skip re-rounding the F16 KV cache to bf16 after each update, which is an identity because the K/V rows are already bf16-rounded. Applies only with the bf16 reference path and flash attention. CUDA, Vulkan and Metal only.",required:!1,default:!0},{name:"round_bf16_fusion",type:"bool",description:"Fold the bf16 activation rounding into the CUDA RMS-norm, add and SwiGLU kernels that produce it. Bit-identical to the unfused graph, with fewer kernel launches. CUDA only.",required:!1,default:!1},{name:"batched_cfg",type:"bool",description:"With guidance_scale != 1, decode the conditional and unconditional backbone branches as one batch-2 step. Batching changes matmul accumulation order, so output differs from the two-runtime path. CUDA only.",required:!1,default:!1}],load:[]},packages:[{id:"breeze_tts_2_q4_0",display_name:"BreezeTTS 2 Q4_0 GGUF",default:!1,format:"gguf",precision:"q4_0",target_directory:"Breeze-TTS-2-GGUF",files:["Breeze-TTS-2-GGUF/breeze-tts-2-q4_0.gguf"],strip_prefix:"Breeze-TTS-2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"breeze_tts_2_q8_0",display_name:"BreezeTTS 2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Breeze-TTS-2-GGUF",files:["Breeze-TTS-2-GGUF/breeze-tts-2-q8_0.gguf"],strip_prefix:"Breeze-TTS-2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"breeze_tts_2_bf16",display_name:"BreezeTTS 2 BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"Breeze-TTS-2-GGUF",files:["Breeze-TTS-2-GGUF/breeze-tts-2-bf16.gguf"],strip_prefix:"Breeze-TTS-2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}}],ui:{recommended_package:"breeze_tts_2_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config_json:"model:config.json",audio_tokenizer_config_json:"model:audio_tokenizer/config.json",tokenizer_config_json:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{model_weights:{source:"weights:",prefix:"model"}}}]},FT={schema_version:1,family:"bs_roformer",display_name:"BS-RoFormer",description:"Band-Split RoFormer music source-separation model that estimates vocals from explicit non-overlapping frequency bands and derives accompaniment from the input mixture.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},options:{request:[],session:[{name:"weight_type",type:"enum",description:"RoFormer weight storage type. Defaults to f32 when the backend requires a host graph plan, otherwise native.",preset:"weight_type_full",required:!1},{name:"num_overlap",type:"int",description:"Number of overlapping inference windows; defaults to the package configuration. Lower values improve throughput but can reduce boundary quality.",required:!1,min:1}],load:[]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"bs_roformer_q8_0",display_name:"BS-RoFormer ep368 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"BS-RoFormer-ep368-GGUF",files:["BS-RoFormer-ep368-GGUF/bs-roformer-ep368-q8_0.gguf"],strip_prefix:"BS-RoFormer-ep368-GGUF"}],dependencies:[],ui:{recommended_package:"bs_roformer_q8_0",tags:["Sep","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md","tests/bs_roformer/README.md"]}},MT={schema_version:1,family:"builtin_audio_utils",display_name:"Built-in Audio Utilities",description:"Built-in denoise, enhancement, and audio super-resolution utilities with separately downloaded weights.",category:"audio_tools",status:"experimental",tasks:["s2s"],modes:["offline"],languages:["auto"],runtime:{tags:["cpu","cuda"]},capabilities:{s2s:["audio_enhancement"]},options:{request:[],session:[],load:[{name:"utility",type:"enum",values:["deepfilternet2","rnnoise","zipenhancer","gtcrn","gtcrn_streaming","gtcrn_dns3","gtcrn_vctk","flashsr"],required:!0,description:"Utility implementation to load from the model path."}]},packages:[],dependencies:[],ui:{tags:[],docs:["docs/audio_tools.md"]},sources:[]},zT={family:"canary_asr",schema_version:1,display_name:"Canary 180M Flash",description:"NVIDIA Canary multilingual speech recognition and speech translation.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en","de","es","fr"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Input audio language.",required:!1,default:"en"},{name:"target_language",type:"string",description:"Output language: en, de, es, or fr. Defaults to the input language for transcription.",required:!1},{name:"punc",type:"bool",description:"Generate punctuation and capitalization.",required:!1,default:!0},{name:"max_tokens",type:"int",description:"Maximum generated tokens per chunk; zero uses the reference encoder-length-based limit.",required:!1,min:0,max:1015,default:0},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio chunk in seconds.",required:!1,min:.02,max:40,default:40}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage type.",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"],required:!1,default:"native"}],load:[]},runtime:{tags:["gguf","cpu","cuda"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/canary_asr.md"],recommended_package:"canary_180m_flash_f32"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"canary_180m_flash_f32",display_name:"Canary 180M Flash GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"Canary-180M-Flash-GGUF",files:["Canary-180M-Flash-GGUF/canary-180m-flash-f32.gguf"],strip_prefix:"Canary-180M-Flash-GGUF"},{id:"canary_180m_flash_q8_0",display_name:"Canary 180M Flash GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Canary-180M-Flash-GGUF",files:["Canary-180M-Flash-GGUF/canary-180m-flash-q8_0.gguf"],strip_prefix:"Canary-180M-Flash-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_spl_tokens:"model:tokenizer_spl_tokens.model",tokenizer_en:"model:tokenizer_en.model",tokenizer_de:"model:tokenizer_de.model",tokenizer_es:"model:tokenizer_es.model",tokenizer_fr:"model:tokenizer_fr.model"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_spl_tokens:"model:tokenizer_spl_tokens.model",tokenizer_en:"model:tokenizer_en.model",tokenizer_de:"model:tokenizer_de.model",tokenizer_es:"model:tokenizer_es.model",tokenizer_fr:"model:tokenizer_fr.model"},tensors:{weights:"weights:"}}]},ET={schema_version:1,family:"ced",display_name:"CED Audio Tagging",description:"Consistent Ensemble Distillation ViT audio classifiers for 527 AudioSet sound categories.",category:"speech_analysis",status:"supported",tasks:["classify"],modes:["offline"],languages:["language_agnostic"],capabilities:{classify:["scores"]},runtime:{tags:["gguf"]},options:{request:[{name:"top_k",type:"int",description:"Number of highest-scoring AudioSet categories returned.",required:!1,default:10,min:1,max:527}],session:[{name:"attention",type:"enum",description:"Attention implementation; auto selects a supported fast path.",required:!1,default:"auto",values:["auto","flash","eager"]},{name:"weight_type",type:"enum",description:"Weight storage override; native preserves packaged tensor types.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"]}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"ced_tiny_f32",display_name:"CED Tiny F32 GGUF",format:"gguf",precision:"f32",default:!0,target_directory:"CED-GGUF",files:["CED-GGUF/ced-tiny-f32.gguf"],strip_prefix:"CED-GGUF"},{id:"ced_mini_f32",display_name:"CED Mini F32 GGUF",format:"gguf",precision:"f32",target_directory:"CED-GGUF",files:["CED-GGUF/ced-mini-f32.gguf"],strip_prefix:"CED-GGUF"},{id:"ced_small_f32",display_name:"CED Small F32 GGUF",format:"gguf",precision:"f32",target_directory:"CED-GGUF",files:["CED-GGUF/ced-small-f32.gguf"],strip_prefix:"CED-GGUF"},{id:"ced_base_f32",display_name:"CED Base F32 GGUF",format:"gguf",precision:"f32",target_directory:"CED-GGUF",files:["CED-GGUF/ced-base-f32.gguf"],strip_prefix:"CED-GGUF"}],dependencies:[],ui:{recommended_package:"ced_tiny_f32",tags:["Classify","GGUF"],docs:["docs/models/ced.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor:"model:preprocessor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor:"model:preprocessor_config.json"},tensors:{weights:"model:model.safetensors"}}]},UT={family:"chatterbox",display_name:"Chatterbox",description:"Open-source Chatterbox family for expressive TTS and voice conversion, with emotion exaggeration control, fast generation, zero-shot voice cloning, and an integrated multilingual TTS path.",category:"tts",status:"supported",tasks:["tts","clone","vc"],modes:["offline"],languages:["ar","da","de","el","en","es","fi","fr","hi","it","ko","ms","nl","no","pl","pt","sv","sw","tr"],options:{request:[{name:"exaggeration",type:"float",description:"Emotion exaggeration. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.5},{name:"guidance_scale",type:"float",description:"T3 classifier-free guidance scale. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.5},{name:"temperature",type:"float",description:"T3 sampling temperature. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.8},{name:"repetition_penalty",type:"float",description:"T3 repetition penalty. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:1.2},{name:"min_p",type:"float",description:"Minimum sampling probability. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.05},{name:"top_p",type:"float",description:"Nucleus sampling probability. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:1},{name:"flow_guidance_scale",type:"float",description:"S3Gen flow guidance scale. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.7},{name:"max_tokens",type:"int",description:"Maximum generated speech tokens. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,min:1,default:384},{name:"do_sample",type:"bool",description:"Enable sampling. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:!0},{name:"stop_on_eos",type:"bool",description:"Stop token generation on EOS. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:!0},{name:"num_inference_steps",type:"int",description:"Voice conversion flow steps; max_steps is also accepted.",required:!1,min:1,default:10},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,min:0,max:4294967295},{name:"source_audio",type:"audio_path",description:"Voice conversion source WAV path; overrides audio_input.",required:!1},{name:"target_voice",type:"audio_path",description:"Voice conversion target WAV path; overrides the speaker reference.",required:!1},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size.",required:!1,default:128}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; defaults to native.",required:!1,preset:"weight_type_full"},{name:"t3_weight_type",type:"enum",description:"T3 weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"multilingual_t3",type:"enum",description:"Multilingual T3 checkpoint selection.",required:!1,values:["v2","v3"],default:"v2"},{name:"conditionals_cache_slots",type:"int",description:"Cached speaker conditionals; zero disables reuse.",required:!1,min:0,default:1},{name:"mem_saver",type:"bool",description:"Release staged runtime components.",required:!1,default:!1},{name:"encoder_condition_samples",type:"int",description:"Maximum reference samples for the T3 tokenizer; the voice encoder still consumes the full 16 kHz reference.",required:!1,default:96e3},{name:"decoder_condition_samples",type:"int",description:"S3Gen reference sample limit at 24 kHz.",required:!1,default:24e4},{name:"t3_speech_cond_prompt_len",type:"int",description:"T3 reference speech prompt token limit.",required:!1,default:150}],load:[]},capabilities:{clone:["speaker_reference"],vc:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"chatterbox_q8_0",tags:["TTS","Clone","VC","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"chatterbox_q8_0",display_name:"Chatterbox Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Chatterbox-GGUF",files:["Chatterbox-GGUF/chatterbox-q8_0.gguf"],strip_prefix:"Chatterbox-GGUF"},{id:"chatterbox_f16",display_name:"Chatterbox F16 GGUF",format:"gguf",precision:"f16",target_directory:"Chatterbox-GGUF",files:["Chatterbox-GGUF/chatterbox-f16.gguf"],strip_prefix:"Chatterbox-GGUF"},{id:"chatterbox_safetensors",display_name:"Chatterbox Safetensors",format:"safetensors",precision:"native",target_directory:"chatterbox",files:["ve.safetensors","t3_cfg.safetensors","s3gen.safetensors","tokenizer.json","grapheme_mtl_merged_expanded_v1.json","Cangjie5_TC.json","conds.pt","t3_mtl23ls_v2.safetensors","t3_mtl23ls_v3.safetensors"],download:{kind:"huggingface_snapshot",repo:"ResembleAI/chatterbox"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{english_tokenizer:"model:tokenizer.json",multilingual_tokenizer:"model:grapheme_mtl_merged_expanded_v1.json",cangjie_mapping:"model:Cangjie5_TC.json",builtin_conditionals:"model:conds.pt"},tensors:{voice_encoder_weights:{source:"weights:",prefix:"voice_encoder"},s3gen_weights:{source:"weights:",prefix:"s3gen"},t3_english_weights:{source:"weights:",prefix:"t3_english"},t3_multilingual_v2_weights:{source:"weights:",prefix:"t3_multilingual_v2"},t3_multilingual_v3_weights:{source:"weights:",prefix:"t3_multilingual_v3"}}},{format:"safetensors",roots:{model:"."},files:{english_tokenizer:"model:tokenizer.json",multilingual_tokenizer:"model:grapheme_mtl_merged_expanded_v1.json",cangjie_mapping:"model:Cangjie5_TC.json",builtin_conditionals:"model:conds.pt"},tensors:{voice_encoder_weights:"model:ve.safetensors",s3gen_weights:"model:s3gen.safetensors",t3_english_weights:"model:t3_cfg.safetensors",t3_multilingual_v2_weights:"model:t3_mtl23ls_v2.safetensors",t3_multilingual_v3_weights:"model:t3_mtl23ls_v3.safetensors"}}]},RT={family:"chatterbox_turbo",display_name:"Chatterbox Turbo",description:"Resemble AI's distilled 350M Chatterbox Turbo: GPT2 T3 backbone, GPT2 BPE tokenizer, and a 2-step meanflow S3Gen decoder for fast English TTS with a built-in voice.",category:"tts",status:"testing",tasks:["tts"],modes:["offline"],languages:["en"],capabilities:{},options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated tokens; legacy max_new_tokens remains accepted.",required:!1,min:0,default:1e3},{name:"temperature",type:"float",description:"T3 sampling temperature.",required:!1,default:.8},{name:"top_p",type:"float",description:"T3 nucleus sampling cutoff.",required:!1,default:.95},{name:"top_k",type:"int",description:"T3 top-k sampling limit.",required:!1,min:0,default:1e3},{name:"repetition_penalty",type:"float",description:"T3 token repetition penalty.",required:!1,default:1.2},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,max:4294967295,default:0},{name:"text_chunk_size",type:"int",description:"Maximum characters per text chunk; must be positive.",required:!1,min:1,default:128}],session:[],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"chatterbox_turbo_q8_0",tags:["TTS","GGUF"],docs:["docs/models/chatterbox_turbo.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"chatterbox_turbo_q8_0",display_name:"Chatterbox Turbo Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Chatterbox-Turbo-GGUF",files:["Chatterbox-Turbo-GGUF/chatterbox-turbo-q8_0.gguf"],strip_prefix:"Chatterbox-Turbo-GGUF"},{id:"chatterbox_turbo_f16",display_name:"Chatterbox Turbo F16 GGUF",format:"gguf",precision:"f16",target_directory:"Chatterbox-Turbo-GGUF",files:["Chatterbox-Turbo-GGUF/chatterbox-turbo-f16.gguf"],strip_prefix:"Chatterbox-Turbo-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tokenizer_vocab:"model:chatterbox_turbo_vocab.json",tokenizer_merges:"model:chatterbox_turbo_merges.txt",tokenizer_special_tokens:"model:chatterbox_turbo_special_tokens.json"},tensors:{t3_turbo_weights:{source:"weights:",prefix:"t3"},builtin_conditionals_turbo:{source:"weights:",prefix:"conds"},s3gen_weights:{source:"weights:",prefix:"s3gen"}}}]},BT={family:"citrinet_asr",display_name:"Citrinet ASR",description:"NVIDIA CitriNet-family end-to-end English ASR model using a convolutional CTC architecture optimized for transcribing speech segments to text.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en"],capabilities:{},options:{request:[],session:[{name:"weight_type",type:"enum",description:"Weight storage type used by the encoder.",default:"native",preset:"weight_type_full",required:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"citrinet_asr_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"citrinet_asr_q8_0",display_name:"Citrinet ASR Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Citrinet-ASR-GGUF",files:["Citrinet-ASR-GGUF/citrinet-asr-q8_0.gguf"],strip_prefix:"Citrinet-ASR-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:citrinet_256_config.json",tokenizer:"model:citrinet_256_tokenizer.model"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:citrinet_256_config.json",tokenizer:"model:citrinet_256_tokenizer.model"},tensors:{weights:"model:citrinet_256.safetensors"}}]},PT={family:"cohere_asr",schema_version:1,display_name:"Cohere Transcribe",description:"Cohere multilingual speech transcription with punctuation control.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en","fr","de","es","it","pt","nl","pl","el","ar","ja","zh","vi","ko"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Input audio language.",required:!1,default:"en"},{name:"punc",type:"bool",description:"Generate punctuation and capitalization.",required:!1,default:!0},{name:"max_tokens",type:"int",description:"Maximum generated tokens per audio chunk.",required:!1,min:1,max:1014,default:256},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","quiet_energy","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio chunk in seconds.",required:!1,min:.04,max:35,default:35}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage type.",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"],required:!1,default:"native"}],load:[]},runtime:{tags:["gguf","cpu","cuda"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/cohere_asr.md"],recommended_package:"cohere_transcribe_bf16"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"cohere_transcribe_bf16",display_name:"Cohere Transcribe GGUF BF16",default:!0,format:"gguf",precision:"bf16",target_directory:"Cohere-Transcribe-GGUF",files:["Cohere-Transcribe-GGUF/cohere-transcribe-03-2026-bf16.gguf"],strip_prefix:"Cohere-Transcribe-GGUF"},{id:"cohere_transcribe_q8_0",display_name:"Cohere Transcribe GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Cohere-Transcribe-GGUF",files:["Cohere-Transcribe-GGUF/cohere-transcribe-03-2026-q8_0.gguf"],strip_prefix:"Cohere-Transcribe-GGUF"},{id:"cohere_transcribe_q4_0",display_name:"Cohere Transcribe GGUF Q4_0",format:"gguf",precision:"q4_0",target_directory:"Cohere-Transcribe-GGUF",files:["Cohere-Transcribe-GGUF/cohere-transcribe-03-2026-q4_0.gguf"],strip_prefix:"Cohere-Transcribe-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"weights:"}}]},jT={schema_version:1,family:"confucius4_r2t2",display_name:"Confucius4-R2T2",description:"NetEase Youdao Confucius4-R2T2 real-time ASR: a Qwen3-ASR fine-tune with Longest Stable Prefix (LSP) streaming. Low-latency append-only streaming from 80 ms to 2 s chunks, context and hotword prompts, 30 languages.",category:"asr",status:"community",tasks:["asr"],modes:["offline","streaming"],languages:["zh","en","yue","ar","de","fr","es","pt","id","it","ko","ru","th","vi","ja","tr","hi","ms","nl","sv","da","fi","pl","cs","fil","fa","el","hu","mk","ro"],capabilities:{asr:["partial_results"]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"confucius4_r2t2_q8_0",tags:["ASR","Stream"],docs:["docs/models/r2t2.md","docs/asr.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"netease-youdao/Confucius4-R2T2",revision:"main",gated:!1}},packages:[{id:"confucius4_r2t2_q8_0",display_name:"Confucius4-R2T2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Confucius4-R2T2-GGUF",files:["r2t2-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"davidxifeng/Confucius4-R2T2-gguf"}},{id:"confucius4_r2t2_f16",display_name:"Confucius4-R2T2 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Confucius4-R2T2-GGUF",files:["r2t2-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"davidxifeng/Confucius4-R2T2-gguf"}},{id:"confucius4_r2t2_q4_k_m",display_name:"Confucius4-R2T2 Q4_K_M GGUF",description:"Community Q4_K_M quantization by NairoDorian (Hugging Face: Nairod785), pinned to a fixed revision; quantization report in QUANTIZATION.md. Quantized derivative work of netease-youdao/Confucius4-R2T2 under the NetEase Youdao Model Use License - see LICENSE, LICENSE_zh and NOTICE in the download repo.",format:"gguf",precision:"q4_k_m",target_directory:"Confucius4-R2T2-Q4_K_M-GGUF",files:["r2t2-q4_k_m.gguf"],download:{kind:"huggingface_snapshot",repo:"Nairod785/Confucius4-R2T2-Q4_K_M-GGUF",revision:"b1ea19256fb77a8d8ab7b091dc75378e15952605",gated:!1}},{id:"confucius4_r2t2_safetensors",display_name:"Confucius4-R2T2 (HF safetensors)",format:"safetensors",precision:"native",target_directory:"Confucius4-R2T2",files:["added_tokens.json","chat_template.json","config.json","generation_config.json","merges.txt","model.safetensors","preprocessor_config.json","special_tokens_map.json","tokenizer.json","tokenizer_config.json","vocab.json"],download:{kind:"huggingface_snapshot",repo:"netease-youdao/Confucius4-R2T2"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}],options:{request:[{name:"language",type:"string",required:!1,default:"Auto",description:"Recognition language: ISO-639 code (zh/en/ja/...) or canonical name (Chinese/English/...), or Auto for detection."},{name:"max_tokens",type:"int",required:!1,description:"Offline decode budget. Must be positive. Offline omission uses checkpoint configuration (512 fallback).",min:1}],session:[{name:"chunk_size_ms",type:"float",required:!1,default:320,description:"Streaming chunk duration in milliseconds; must be positive."},{name:"unfixed_chunk_num",type:"int",required:!1,default:2,description:"Leading chunks decoded without a stable-prefix prompt.",min:0},{name:"unfixed_token_num",type:"int",required:!1,default:5,description:"Tokens rolled back from the accumulated text before it becomes the prefix prompt.",min:0},{name:"rollback_punctuation",type:"bool",required:!1,default:!1,description:"When punctuation is detected, set rollback to zero and retain the full decoded prefix."},{name:"max_tokens",type:"int",required:!1,default:32,description:"Greedy decode budget per streaming chunk and for the final flush (session-scoped; distinct from the offline request max_tokens).",min:1},{name:"audio_encoder_weight_type",type:"enum",preset:"weight_type_conv",required:!1,default:"native",description:"Audio tower weight storage."},{name:"thinker_weight_type",type:"enum",values:["native","f32","f16","bf16","q8_0"],required:!1,default:"native",description:"Thinker weight storage."},{name:"weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"native",description:"Alias for thinker_weight_type."},{name:"audio_encoder_graph_arena_mb",type:"int",required:!1,default:128,description:"Audio tower graph arena in MB.",min:1},{name:"thinker_prefill_graph_arena_mb",type:"int",required:!1,default:256,description:"Thinker prefill graph arena in MB.",min:1},{name:"thinker_decode_graph_arena_mb",type:"int",required:!1,default:256,description:"Thinker decode graph arena in MB.",min:1},{name:"thinker_weight_context_mb",type:"int",required:!1,default:64,description:"Thinker weight context in MB.",min:1}],load:[]},dependencies:[]},NT={schema_version:1,family:"confucius4_tts",display_name:"Confucius4-TTS",description:"Confucius4-TTS is a multilingual voice-cloning TTS model packaged for audio.cpp with offline and streaming generation. It uses reference speech, language-aware text normalization, T2S semantic generation, S2A flow matching, style encoding, semantic audio features, and BigVGAN vocoding.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline","streaming"],languages:["zh","en","ja","ko","de","fr","es","id","it","th","pt","ru","ms","vi"],runtime:{tags:["gguf","stream"]},capabilities:{clone:["speaker_reference","long_form"]},options:{request:[{name:"language",type:"string",description:"Target synthesis language code used by the text frontend; default zh when no request transcript language or style language is provided.",required:!1,default:"zh"},{name:"temperature",type:"float",description:"T2S sampling temperature; must be > 0, default 0.8.",required:!1,min:0,default:.8},{name:"top_p",type:"float",description:"T2S nucleus sampling probability; must be in (0, 1], default 0.8.",required:!1,min:0,max:1,default:.8},{name:"top_k",type:"int",description:"T2S top-k sampling limit; must be positive, default 30.",required:!1,min:1,default:30},{name:"num_beams",type:"int",description:"T2S beam count; default 3. Set 1 for single-beam sampling.",required:!1,min:1,default:3},{name:"repetition_penalty",type:"float",description:"T2S repetition penalty; must be > 0, default 10.0.",required:!1,min:0,default:10},{name:"max_tokens",type:"int",description:"Maximum T2S semantic sequence length including prompt tokens; default 1520.",required:!1,min:1,default:1520},{name:"num_inference_steps",type:"int",description:"S2A flow-matching step count; default 25.",required:!1,min:1,default:25},{name:"guidance_scale",type:"float",description:"S2A classifier-free guidance scale; default 0.7. Negative values select the no-CFG path.",required:!1,default:.7},{name:"text_chunk_size",type:"int",description:"Maximum text tokens per generated segment; default 80.",required:!1,min:1,default:80},{name:"text_chunk_mode",type:"enum",description:"word_budget/default selects model-local official_segments. Other modes use the framework splitter with a codepoint budget.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"cross_fade_duration_sec",type:"float",description:"Cross-fade duration between generated segments in seconds; default 0.3.",required:!1,min:0,default:.3},{name:"edge_fade_duration_sec",type:"float",description:"Fade duration applied at segment edges in seconds; default 0.1. Currently validated but not applied to generated audio.",required:!1,min:0,default:.1},{name:"edge_pad_duration_sec",type:"float",description:"Silence padding applied at segment edges in seconds; default 0.1. Currently validated but not applied to generated audio.",required:!1,min:0,default:.1},{name:"seed",type:"int",description:"Seed for T2S sampling and S2A noise initialization; default 1234.",required:!1,min:0,default:1234}],session:[{name:"graph_arena_mb",type:"int",description:"Reusable ggml graph arena size in MiB for Confucius stages; default 512.",required:!1,min:1,default:512},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"weight_type",type:"enum",description:"Matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; default 1, set 0 to disable caching.",required:!1,min:0,default:1},{name:"mem_saver",type:"bool",description:"Release staged graphs after request phases; default false.",required:!1,default:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"confucius4_tts_orig",display_name:"Confucius4-TTS Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Confucius4-TTS-GGUF",files:["Confucius4-TTS-GGUF/confucius4-tts-orig.gguf"],strip_prefix:"Confucius4-TTS-GGUF"}],dependencies:[],ui:{recommended_package:"confucius4_tts_orig",tags:["TTS","Clone","GGUF","Stream"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:inference_config.yaml",tokenizer_model:"model:tokenizer.model",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",special_tokens_map:"model:special_tokens_map.json",w2v_preprocessor_config:"model:w2v_preprocessor_config.json",bigvgan_config:"model:bigvgan_config.json"},tensors:{t2s:{source:"weights:",prefix:"t2s"},s2a:{source:"weights:",prefix:"s2a"},semantic_encoder:{source:"weights:",prefix:"semantic_encoder"},semantic_encoder_shaw:{source:"weights:",prefix:"semantic_encoder_shaw"},semantic_stats:{source:"weights:",prefix:"semantic_stats"},style_encoder:{source:"weights:",prefix:"style_encoder"},vocoder:{source:"weights:",prefix:"vocoder"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:inference_config.yaml",tokenizer_model:"model:tokenizer.model",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",special_tokens_map:"model:special_tokens_map.json",w2v_preprocessor_config:"model:w2v_preprocessor_config.json",bigvgan_config:"model:bigvgan_config.json"},tensors:{t2s:"model:t2s.safetensors",s2a:"model:s2a.safetensors",semantic_encoder:"model:semantic_encoder.safetensors",semantic_encoder_shaw:"model:semantic_encoder_shaw.safetensors",semantic_stats:"model:semantic_stats.safetensors",style_encoder:"model:style_encoder.safetensors",vocoder:"model:vocoder.safetensors"}}]},OT={schema_version:1,family:"controlfoley",display_name:"ControlFoley",description:"Multimodal Foley audio generation model.",category:"audio_tools",status:"experimental",tasks:["sfx"],modes:["offline"],languages:["auto"],runtime:{tags:["gguf"]},capabilities:{sfx:["prompt_generation"]},ui:{recommended_package:"controlfoley_large_44k_q8_0",tags:["SFX","GGUF"],docs:["docs/models/controlfoley.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{open_clip_vocab:"model:open_clip_vocab.json",open_clip_merges:"model:open_clip_merges.txt",open_clip_tokenizer_config:"model:open_clip_tokenizer_config.json"},tensors:{flow:{source:"weights:",prefix:"flow"},vae:{source:"weights:",prefix:"vae"},bigvgan:{source:"weights:",prefix:"bigvgan"},open_clip:{source:"weights:",prefix:"open_clip"},cav_mae:{source:"weights:",prefix:"cav_mae"},synchformer:{source:"weights:",prefix:"synchformer"},clap:{source:"weights:",prefix:"clap"},mert:{source:"weights:",prefix:"mert"},musicgen_style:{source:"weights:",prefix:"musicgen_style"}}}],options:{request:[{name:"duration_sec",type:"float",required:!1,default:8,min:.64,description:"Target temporal budget."},{name:"num_inference_steps",type:"int",required:!1,default:25,min:1,description:"Euler flow inference steps."},{name:"guidance_scale",type:"float",required:!1,default:4.5,min:0,description:"Classifier-free guidance strength. Must be > 0. Values strictly between 0 and 1 bypass CFG and negative-prompt conditioning."},{name:"negative_prompt",type:"string",required:!1,default:"",description:"Negative text prompt used for the unconditional guidance text branch."},{name:"video_file",type:"path",required:!1,description:"Optional video path for video-conditioned Foley generation."},{name:"mask_away_clip",type:"bool",required:!1,default:!1,description:"Disable OpenCLIP video conditioning while keeping visual and sync conditioning."},{name:"seed",type:"int",required:!1,default:42,min:0,max:4294967295,description:"Generation seed."}],session:[{name:"weight_type",type:"enum",required:!1,preset:"weight_type_full",default:"native",description:"ControlFoley weight storage type."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"controlfoley_large_44k_f32",display_name:"ControlFoley Large 44k F32 GGUF",format:"gguf",precision:"f32",target_directory:"ControlFoley-GGUF",files:["ControlFoley-GGUF/controlfoley-large-44k-f32.gguf"],strip_prefix:"ControlFoley-GGUF"},{id:"controlfoley_large_44k_q8_0",display_name:"ControlFoley Large 44k Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"ControlFoley-GGUF",files:["ControlFoley-GGUF/controlfoley-large-44k-q8_0.gguf"],strip_prefix:"ControlFoley-GGUF"}],dependencies:[]},IT={schema_version:1,family:"cosyvoice3",display_name:"CosyVoice3",description:"Fun-CosyVoice3 native GGUF package for zero-shot, cross-lingual, and instruction-conditioned text-to-speech using CosyVoice3 speech-token AR generation, causal masked flow mel decoding, CAM++ speaker conditioning, and causal HiFT waveform decoding.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline"],languages:["zh","en","ja","ko","de","es","fr","it","ru","yue"],runtime:{tags:["gguf"]},dependencies:[],capabilities:{tts:["speaker_reference","style_control"],clone:["speaker_reference"]},options:{request:[{name:"template_name",type:"enum",description:"CosyVoice3 request template.",required:!1,values:["zero_shot","cross_lingual","instruct"],default:"zero_shot"},{name:"reference_text",type:"string",description:"Transcript for the prompt audio.",required:!1},{name:"instruct",type:"string",description:"Instruction text for instruct mode.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 600.",required:!1,min:1,default:600},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"max_tokens",type:"int",description:"Maximum generated speech tokens; -1 (default) selects 20 times the target text token count. Explicit limits must be positive.",required:!1,min:-1,default:-1},{name:"min_tokens",type:"int",description:"Minimum generated speech tokens before stop is accepted; -1 (default) selects twice the target text token count. Must not exceed the resolved maximum.",required:!1,min:-1,default:-1},{name:"top_k",type:"int",description:"AR speech-token top-k sampling limit; default 25.",required:!1,min:1,default:25},{name:"num_inference_steps",type:"int",description:"Flow decoder Euler steps; default 10.",required:!1,min:1,default:10},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,default:1986}],session:[{name:"lora",type:"path",description:"PEFT adapter with adapter_config.json, or native lora_weights with config.json and speech_embedding/llm_decoder sidecars. Checkpoints may use safetensors or PyTorch containers.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1. Full-weight replacements are not scaled.",required:!1,default:1},{name:"weight_type",type:"enum",description:"CosyVoice3 matmul weight storage type; default native.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"]},{name:"graph_arena_mb",type:"int",description:"Reusable runtime graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 2048.",required:!1,min:1,default:2048},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse.",required:!1,min:0,default:4},{name:"mem_saver",type:"bool",description:"Release cached runtime graphs after each request to reduce peak VRAM; default false.",required:!1,default:!1},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Component: flow. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn. GGML keeps the session backend. RKNN requires artifacts.main, a comma-separated ladder of estimator engines compiled one per sequence length (tools/rknn/prepare_cosyvoice3_rknn_flow.py), and ENGINE_ENABLE_RKNN; omit backend. An utterance longer than the largest engine runs the CPU graph. Neither implementation takes params.",required:!1,default:"{}"}],load:[]},packages:[{id:"cosyvoice3_q8_0",display_name:"CosyVoice3 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"CosyVoice3-GGUF",files:["CosyVoice3-GGUF/cosyvoice3-q8_0.gguf"],strip_prefix:"CosyVoice3-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"cosyvoice3_f32",display_name:"CosyVoice3 F32 GGUF",default:!1,format:"gguf",precision:"f32",target_directory:"CosyVoice3-GGUF",files:["CosyVoice3-GGUF/cosyvoice3-f32.gguf"],strip_prefix:"CosyVoice3-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}}],ui:{recommended_package:"cosyvoice3_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{cosyvoice3_yaml:"model:cosyvoice3.yaml",qwen_config:"model:CosyVoice-BlankEN/config.json",tokenizer_config:"model:CosyVoice-BlankEN/tokenizer_config.json",vocab_json:"model:CosyVoice-BlankEN/vocab.json",merges_txt:"model:CosyVoice-BlankEN/merges.txt"},tensors:{llm_weights:{source:"weights:",prefix:"llm"},flow_weights:{source:"weights:",prefix:"flow"},hift_weights:{source:"weights:",prefix:"hift"},campplus_weights:{source:"weights:",prefix:"campplus"},speech_tokenizer_weights:{source:"weights:",prefix:"speech_tokenizer"},blank_en_weights:{source:"weights:",prefix:"blank_en"}}}]},DT={schema_version:1,family:"crisperwhisper",display_name:"CrisperWhisper 2.0",description:"Whisper-based verbatim and intended speech transcription.",category:"asr",status:"supported",tasks:["asr","align"],modes:["offline","streaming"],languages:["af","am","ar","as","az","ba","be","bg","bn","bo","br","bs","ca","cs","cy","da","de","el","en","es","et","eu","fa","fi","fo","fr","gl","gu","ha","haw","he","hi","hr","ht","hu","hy","id","is","it","ja","jw","ka","kk","km","kn","ko","la","lb","ln","lo","lt","lv","mg","mi","mk","ml","mn","mr","ms","mt","my","ne","nl","nn","no","oc","pa","pl","ps","pt","ro","ru","sa","sd","si","sk","sl","sn","so","sq","sr","su","sv","sw","ta","te","tg","th","tk","tl","tr","tt","uk","ur","uz","vi","yi","yo","zh"],capabilities:{align:["word_timestamps"],asr:["word_timestamps","partial_results"]},dependencies:[],options:{request:[{name:"return_timestamps",required:!1,type:"bool",description:"Return word-level timestamps.",default:!1},{name:"audio_chunk_mode",required:!1,type:"enum",values:["auto","fixed","none"],description:"Continuation window planning. None requires audio no longer than 30 seconds.",default:"auto"},{name:"audio_chunk_duration_sec",required:!1,type:"float",description:"Duration of each encoder window in seconds. Must be positive and greater than overlap.",max:30,default:30},{name:"audio_chunk_overlap_sec",required:!1,type:"float",description:"Audio overlap between continuation windows in seconds. Must be smaller than chunk duration.",min:0,default:4},{name:"language",required:!1,type:"string",description:"Audio language code.",default:"en"},{name:"transcription_mode",required:!1,type:"enum",description:"Verbatim speech, intended clean text, or transcript-conditioned verbatimize.",values:["verbatim","intended","verbatimize"],default:"verbatim"},{name:"max_tokens",required:!1,type:"int",description:"Maximum generated tokens per window. Positive budget, additionally bounded by remaining checkpoint text positions after the prompt.",min:1,default:256}],session:[{name:"weight_type",required:!1,type:"enum",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","i8"],description:"Matmul weight storage type.",default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/crisperwhisper.md"],recommended_package:"crisperwhisper_2_large_q8_0"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"crisperwhisper_2_large_bf16",display_name:"CrisperWhisper 2.0 Large GGUF BF16",format:"gguf",precision:"bf16",target_directory:"CrisperWhisper2.0-GGUF",files:["CrisperWhisper2.0-GGUF/crisperwhisper-2-large-bf16.gguf"],strip_prefix:"CrisperWhisper2.0-GGUF"},{id:"crisperwhisper_2_large_q8_0",display_name:"CrisperWhisper 2.0 Large GGUF Q8_0",default:!0,format:"gguf",precision:"q8_0",target_directory:"CrisperWhisper2.0-GGUF",files:["CrisperWhisper2.0-GGUF/crisperwhisper-2-large-q8_0.gguf"],strip_prefix:"CrisperWhisper2.0-GGUF"},{id:"crisperwhisper_2_large_q4_k",display_name:"CrisperWhisper 2.0 Large GGUF Q4_K",format:"gguf",precision:"q4_k",target_directory:"CrisperWhisper2.0-GGUF",files:["CrisperWhisper2.0-GGUF/crisperwhisper-2-large-q4_k.gguf"],strip_prefix:"CrisperWhisper2.0-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:"weights:"}}]},LT={schema_version:1,family:"dots_tts",display_name:"DotTTS",description:"DotTTS is a multilingual zero-shot TTS, voice-cloning, and speech-editing model family packaged for audio.cpp with SOAR and MeanFlow generation, prompt-audio plus prompt-text prefill, speaker-reference conditioning, language tags, multiple synthesis templates, long-form text chunking, and true streaming audio output.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["multilingual"],runtime:{tags:["gguf","stream"]},capabilities:{tts:["speaker_reference","style_control","long_form"],clone:["speaker_reference","style_control","long_form"]},options:{request:[{name:"reference_text",type:"string",description:"Transcript for the prompt audio. When set with reference audio, DotTTS uses prompt prefill for higher quality voice cloning.",required:!1},{name:"reference_duration_sec",type:"float",description:"Optional prompt-audio trim duration before reference conditioning and prompt prefill.",required:!1,min:0},{name:"template_name",type:"enum",description:"DotTTS synthesis template. tts is normal text-to-speech; instruction_tts adds instruction conditioning; text_to_audio uses a sound-description template; tts_interleave uses the streaming interleave schedule; edit uses the DotTTS Edit source-audio editing schedule and is offline-only.",values:["tts","instruction_tts","text_to_audio","tts_interleave","edit"],required:!1,default:"tts"},{name:"source_audio",type:"audio_path",description:"Source WAV path for DotTTS Edit. Required when template_name=edit unless audio_input is supplied by the caller.",required:!1},{name:"instruct",type:"string",description:"Structured DotTTS Edit instruction. If omitted with template_name=edit, the request text is used as the instruction.",required:!1},{name:"source_text",type:"string",description:"Optional source transcript override for DotTTS Edit. If omitted, it is rendered from instruction tags.",required:!1},{name:"target_text",type:"string",description:"Edit target transcript override. When omitted, explicit instruction plus text input uses that text; otherwise the target is rendered from instruction tags.",required:!1},{name:"use_xvector",type:"enum",description:"DotTTS Edit speaker conditioning mode. auto follows the upstream tag-based behavior; on/off force or disable source-audio speaker conditioning.",values:["auto","on","off"],required:!1,default:"auto"},{name:"language",type:"string",description:"Optional target language tag. none disables language tagging; otherwise pass a language code such as en or zh.",required:!1,default:"none"},{name:"num_inference_steps",type:"int",description:"SOAR flow-matching inference step count; default 10.",required:!1,min:1,default:10},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale used by SOAR flow matching. Default 1.2.",required:!1,min:0,default:1.2},{name:"speaker_scale",type:"float",description:"Multiplier applied to the prompt speaker embedding; default 1.5.",required:!1,min:0,default:1.5},{name:"sampler_mode",type:"enum",description:"SOAR ODE solver method for flow matching. Fixed-step euler is the default and parity baseline.",values:["euler","midpoint","rk4"],required:!1,default:"euler"},{name:"max_tokens",type:"int",description:"Maximum generated audio patch count per generated segment; default 500. In Edit mode source patches consume this budget; it must exceed the source-patch count.",required:!1,min:1,default:500},{name:"text_chunk_size",type:"int",description:"Maximum text codepoints per generated segment for long-form requests; default 320.",required:!1,min:1,default:320},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode; default tag_aware preserves leading style/control tags across long-form chunks.",values:["default","tag_aware","japanese","endline"],required:!1,default:"tag_aware"},{name:"vocoder_merge_steps",type:"int",description:"Streaming vocoder latent patch merge size after the initial unmerged patches; default 4, matching the Python optimized streaming runtime default.",required:!1,min:1,default:4},{name:"seed",type:"int",description:"Seed for prompt latent sampling and flow noise initialization; default 42.",required:!1,min:0,default:42}],session:[{name:"weight_type",type:"enum",description:"Shared matmul weight storage type for DotTTS components; default native. Component-specific weight options override this value.",preset:"weight_type_full",required:!1,default:"native"},{name:"speaker_encoder_weight_type",type:"enum",description:"Speaker encoder matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"codec_weight_type",type:"enum",description:"AudioVAE vocoder matmul and recurrent weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"patch_encoder_weight_type",type:"enum",description:"Patch encoder transformer matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"llm_weight_type",type:"enum",description:"Autoregressive language model matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"flow_weight_type",type:"enum",description:"SOAR or MeanFlow DiT flow-matching matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"codec_conv_weight_type",type:"enum",description:"Convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse.",required:!1,min:0,default:4},{name:"mem_saver",type:"bool",description:"Load DotTTS components by request phase and release their weights/graphs after last use while keeping reference cache slots alive.",required:!1,default:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"dots_tts_soar_q8_0",display_name:"DotTTS SOAR Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"DotTTS-SOAR-GGUF",files:["DotTTS-SOAR-GGUF/dots-tts-soar-q8_0.gguf"],strip_prefix:"DotTTS-SOAR-GGUF"},{id:"dots_tts_soar_bf16",display_name:"DotTTS SOAR BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"DotTTS-SOAR-GGUF",files:["DotTTS-SOAR-GGUF/dots-tts-soar-bf16.gguf"],strip_prefix:"DotTTS-SOAR-GGUF"},{id:"dots_tts_mf_q8_0",display_name:"DotTTS MeanFlow Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"DotTTS-MF-GGUF",files:["DotTTS-MF-GGUF/dots-tts-mf-q8_0.gguf"],strip_prefix:"DotTTS-MF-GGUF"},{id:"dots_tts_mf_bf16",display_name:"DotTTS MeanFlow BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"DotTTS-MF-GGUF",files:["DotTTS-MF-GGUF/dots-tts-mf-bf16.gguf"],strip_prefix:"DotTTS-MF-GGUF"},{id:"dots_tts_edit_q8_0",display_name:"DotTTS Edit Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"DotTTS-Edit-GGUF",files:["DotTTS-Edit-GGUF/dots-tts-edit-q8_0.gguf"],strip_prefix:"DotTTS-Edit-GGUF"},{id:"dots_tts_edit_bf16",display_name:"DotTTS Edit BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"DotTTS-Edit-GGUF",files:["DotTTS-Edit-GGUF/dots-tts-edit-bf16.gguf"],strip_prefix:"DotTTS-Edit-GGUF"}],dependencies:[],ui:{recommended_package:"dots_tts_soar_q8_0",tags:["TTS","Clone","Stream","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",llm_config:"model:llm_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",added_tokens:"model:added_tokens.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{core_weights:{source:"weights:",prefix:"core"},vocoder_weights:{source:"weights:",prefix:"vocoder"},speaker_encoder_weights:{source:"weights:",prefix:"speaker_encoder"},latent_stats:{source:"weights:",prefix:"latent_stats"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",llm_config:"model:llm_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",added_tokens:"model:added_tokens.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{core_weights:{source:"model:model.safetensors"},vocoder_weights:{source:"model:vocoder.safetensors"},speaker_encoder_weights:{source:"model:speaker_encoder.safetensors"},latent_stats:{source:"model:latent_stats.safetensors"}}}]},VT={schema_version:1,family:"dramabox",display_name:"DramaBox",description:"DramaBox is an English expressive TTS and voice-cloning model packaged for audio.cpp as a standalone GGUF bundle. It combines Gemma text conditioning, diffusion sampling, reference-audio conditioning, long-form chunking, and 48 kHz stereo output.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["speaker_reference","style_control","long_form"],clone:["speaker_reference","style_control","long_form"]},options:{request:[{name:"target_voice",type:"audio_path",description:"Reference voice WAV path for voice cloning. If omitted, DramaBox generates from text without reference-audio conditioning.",required:!1},{name:"negative_prompt",type:"string",description:"Negative text conditioning used when guidance_scale enables classifier-free guidance; omitted uses the built-in quality prompt.",required:!1},{name:"duration_sec",type:"float",description:"Explicit target duration in seconds; default 0 uses the prompt-duration estimator. Above audio_chunk_threshold_sec, long-form generation uses estimated per-chunk durations instead of this explicit target.",required:!1,min:0,default:0},{name:"num_inference_steps",type:"int",description:"Diffusion sampling step count; default comes from config.json, 30 in the current package.",required:!1,min:1,default:30},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; default comes from config.json, 2.5 in the current package. Values greater than 1 enable CFG. Negative values disable this guidance branch.",required:!1,default:2.5},{name:"spatio_temporal_guidance_scale",type:"float",description:"Spatio-temporal guidance scale; default comes from config.json, 1.5 in the current package. Values greater than 0 enable STG. Negative values disable this guidance branch.",required:!1,default:1.5},{name:"duration_scale",type:"float",description:"Multiplier applied to the estimated prompt duration when duration_sec is 0; default comes from config.json, 1.1 in the current package. The resulting duration has a 3-second floor.",required:!1,default:1.1},{name:"reference_duration_sec",type:"float",description:"Reference voice crop/repeat duration in seconds; default comes from config.json, 10.0 in the current package. Must be > 0.",required:!1,min:0,default:10},{name:"guidance_rescale",type:"string",description:"Guidance rescale: auto or any negative value derives it from guidance_scale; nonnegative numeric values select an explicit rescale.",required:!1,default:"auto"},{name:"audio_chunk_threshold_sec",type:"float",description:"Estimated duration threshold that switches a request to long-form chunking; default 45.0 seconds. Must be > 0.",required:!1,min:0,default:45},{name:"audio_chunk_duration_sec",type:"float",description:"Target estimated duration for each long-form chunk; default 37.0 seconds. Must be > 0.",required:!1,min:0,default:37},{name:"cross_fade_duration_sec",type:"float",description:"Equal-power cross-fade between long-form chunks in seconds; default 0.05. Zero still overlaps one sample.",required:!1,min:0,default:.05},{name:"seed",type:"int",description:"Torch-compatible CUDA noise seed for diffusion sampling; default 42.",required:!1,min:0,default:42}],session:[{name:"perf_mode",type:"enum",description:"Attention implementation mode. Default off keeps the exact reference-query attention path; flash_attention enables the optimized path.",values:["off","flash_attention"],required:!1,default:"off"},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs and weights immediately after each request phase to reduce peak and resident VRAM; default false keeps components cached for later reuse.",required:!1,default:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"dramabox_q8_0",display_name:"DramaBox Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"DramaBox-GGUF",files:["DramaBox-GGUF/dramabox-q8_0.gguf"],strip_prefix:"DramaBox-GGUF"}],dependencies:[],ui:{recommended_package:"dramabox_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",audio_components_config:"model:audio_components_config.json",gemma_config:"model:gemma-3-12b-it-bnb-4bit/config.json",gemma_tokenizer_model:"model:gemma-3-12b-it-bnb-4bit/tokenizer.model",gemma_tokenizer_json:"model:gemma-3-12b-it-bnb-4bit/tokenizer.json",gemma_tokenizer_config:"model:gemma-3-12b-it-bnb-4bit/tokenizer_config.json"},tensors:{dit_weights:{source:"weights:",prefix:"dit"},audio_weights:{source:"weights:",prefix:"audio"},gemma_weights:{source:"weights:",prefix:"gemma"},silence_latent:{source:"weights:",prefix:"silence"}}}]},HT={schema_version:1,family:"echo_tts",display_name:"Echo-TTS",description:"Echo-TTS is an English zero-shot voice-cloning TTS model packaged for audio.cpp. A 2.8B diffusion transformer generates 80-D latents in PCA space which the Fish S1-DAC decodes to 44.1 kHz audio. Generation is a fixed 29.72 s window (640 latents).",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{clone:["speaker_reference"]},options:{request:[{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per text chunk; must be positive, default 300.",required:!1,min:1,default:300},{name:"text_guidance_scale",type:"float",description:"Classifier-free guidance scale on the text condition (independent-cfg only). Advertised range is recommended, not enforced by the parser.",required:!1,min:0,default:3},{name:"speaker_guidance_scale",type:"float",description:"Classifier-free guidance scale on the speaker condition (independent-cfg only). Advertised range is recommended, not enforced by the parser.",required:!1,min:0,default:8},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale on the text and speaker condition (join-cfg only). Advertised range is recommended, not enforced by the parser.",required:!1,min:0,default:8},{name:"t_schedule_mode",type:"enum",description:"RF Euler timestep schedule: linear or sway; default linear.",values:["linear","sway"],required:!1,default:"linear"},{name:"sway_coeff",type:"float",description:"Sway Sampling coefficient; must be finite and produce strictly decreasing timesteps. Default -1.0.",required:!1,default:-1},{name:"num_inference_steps",type:"int",description:"Euler sampler steps. Default 40 for linear timestep schedule, 12 for sway.",required:!1,min:1,default:40},{name:"truncation_factor",type:"float",description:"Initial-noise truncation factor. Advertised range is recommended, not enforced by the parser.",required:!1,min:0,max:1,default:.8},{name:"speaker_kv_scale",type:"float",description:"Force-speaker KV scaling. 1.0 disables; 1.5 is the upstream default when enabled. Advertised range is recommended, not parser-enforced; zero is invalid for reciprocal scaling.",required:!1,min:1,default:1},{name:"seed",type:"int",description:"RNG seed for the initial latent. Negative signed-integer values are treated as zero.",required:!1,default:0},{name:"reference_duration_sec",type:"float",required:!1,description:"Trim the speaker reference to at most this many seconds before encoding. Shorter references are cheaper and often clone better; upstream's guidance favours around 10 s. Defaults to 15 s. Values above the trained maximum of 297.1 s are clamped. Set per request, or as a session default from CLI or server config. Must be positive.",default:15},{name:"max_duration_sec",type:"float",description:"Cap the generation window, in seconds (up to 29.7215 s, the trained maximum; larger values are clamped to it). Quantised down to a whole latent frame of 46.44 ms. Left unset, the window is estimated per chunk from text length and widened automatically if the utterance does not finish inside it, which is substantially cheaper for short text. Must be positive; rounded to at least one latent frame.",required:!1,max:29.7215},{name:"guidance_interval",type:"int",description:"Refresh the two unconditional CFG lanes only every Nth step inside the guidance window, reusing the previous guidance correction in between. 1 reproduces upstream exactly. Worth raising to 2 at 30+ steps, where the correction is still measured 8-10 times across the guided phase (roughly 1.3x fewer denoiser evaluations); not recommended below ~20 steps, where it is already coarsely sampled and staleness shows up as degraded timbre and text adherence.",required:!1,min:1,default:1}],session:[{name:"reference_duration_sec",type:"float",required:!1,description:"Trim the speaker reference to at most this many seconds before encoding. Shorter references are cheaper and often clone better; upstream's guidance favours around 10 s. Defaults to 15 s. Values above the trained maximum of 297.1 s are clamped. Set per request, or as a session default from CLI or server config. Must be positive.",default:15},{name:"reference_cache_slots",type:"int",required:!1,description:"How many encoded speaker references to keep. Encoding is linear in reference length, so reusing a voice across requests avoids repeating it. 0 disables caching; default 4."},{name:"mem_saver",type:"bool",required:!1,description:"Release Fish S1-DAC decode graph space before encoding reference speaker audio and encode graph space after. Avoids having both allocations resident simulaneously at the cost of rebuilding the graphs when a speaker cache-miss occurs.",default:!1},{name:"cfg_mode",type:"enum",description:"Type of classifier free guidance used.",values:["independent","joint"],required:!1,default:"independent"}],load:[]},packages:[{id:"echo_tts_q8_0",display_name:"Echo-TTS Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Echo-TTS-GGUF",files:["echo-tts-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"dignome/Echo-TTS",revision:"919681c9906c88963352d5f96e0f732ddd3989ce",gated:!1}},{id:"echo_tts_f16",display_name:"Echo-TTS F16 GGUF",format:"gguf",precision:"f16",target_directory:"Echo-TTS-GGUF",files:["echo-tts-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"dignome/Echo-TTS",revision:"919681c9906c88963352d5f96e0f732ddd3989ce",gated:!1}}],dependencies:[],ui:{recommended_package:"echo_tts_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/echo_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{dit_weights:{source:"weights:",prefix:"dit_weights"},pca:{source:"weights:",prefix:"pca"},codec_weights:{source:"weights:",prefix:"ae"}}}]},WT={schema_version:1,family:"f5_tts",display_name:"F5-TTS",description:"Community F5-TTS flow-matching diffusion transformer for zero-shot voice cloning, including Arabic via the Habibi-TTS finetune (SWivid). Text conv conditioner, RoPE DiT, CFM sampler, Vocos vocoder.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline"],languages:["en","ar"],runtime:{tags:["server"]},capabilities:{clone:["speaker_reference"]},options:{request:[{name:"reference_text",type:"string",description:"Transcript matching the reference voice audio; required by F5-TTS zero-shot cloning.",required:!0},{name:"dialect",type:"string",description:"Habibi dialect token: UNK MSA SAU UAE ALG IRQ EGY MAR OMN TUN LEV SDN LBY; default UNK.",required:!1,default:"UNK"},{name:"sway_sampling_coef",type:"float",description:"Sway sampling coefficient for inference timesteps; default -1.0. Advertised bounds are recommended settings, not parser-enforced limits.",required:!1,min:-5,max:5,default:-1},{name:"speed",type:"float",description:"Speech speed multiplier for duration estimation; default 1.0. Generated text chunks shorter than 10 characters use 0.3 instead. Advertised bounds are recommended settings, not parser-enforced limits.",required:!1,min:.5,max:2,default:1},{name:"seed",type:"int",description:"Non-negative noise seed; omitted selects a random seed. Explicit zero is deterministic.",required:!1,min:0},{name:"num_inference_steps",type:"int",description:"CFM Euler steps (NFE); default 32. The parser rejects nonpositive counts.",required:!1,min:1,default:32},{name:"guidance_scale",type:"float",description:"Classifier-free guidance strength; default 2.0. Advertised bounds are recommended settings, not parser-enforced limits.",required:!1,min:0,max:10,default:2},{name:"strip_diacritics",type:"bool",description:"Strip Arabic combining marks (harakat/tanwin/shadda/tatweel) before synthesis; Habibi is trained on undiacritized ASR transcripts and garbles diacritized input. Default true.",required:!1,default:!0}],session:[{name:"lora",type:"path",description:"PEFT DiT LoRA adapter directory or checkpoint file; merged into session-owned weights and graphs. Vocos is unchanged.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"vocos_path",type:"string",description:"Path to the Vocos vocoder checkpoint (vocos.safetensors); required unless placed next to the DiT checkpoint.",required:!1},{name:"dialect",type:"string",description:"Default Habibi dialect token for requests that do not set it; default UNK.",required:!1,default:"UNK"},{name:"frame_budget",type:"int",description:"Total mel frames per CFM pass (ref + generated); larger budgets allow sentence-scale chunks at higher VRAM. Must be in [256, 8192]; omitted uses 2048. Explicit zero is not accepted. On CPU the allocated DiT graph pool caps a pass at 960 frames (10.2 s), so larger values are clamped there; CUDA keeps the full range.",required:!1,min:256,max:8192,default:2048}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"trklou/audio.cpp",revision:"main",gated:!1}},packages:[{id:"habibi_unified",display_name:"Habibi-TTS Unified (Arabic, multi-dialect)",description:"Unified multi-dialect Arabic checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32).",default:!0,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Unified",files:["habibi-unified/habibi-unified-orig.gguf","habibi-unified/vocab.txt"],strip_prefix:"habibi-unified"},{id:"vocos_mel_24khz",display_name:"Vocos mel 24kHz vocoder (GGUF)",description:"Standalone Vocos vocoder GGUF for use with the original safetensors checkpoints.",default:!1,format:"gguf",precision:"orig",target_directory:"vocos-mel-24khz",files:["vocos-mel-24khz/vocos-mel-24khz-orig.gguf"],strip_prefix:"vocos-mel-24khz"},{id:"habibi_alg",display_name:"Habibi-TTS ALG specialized checkpoint (GGUF)",description:"Single-dialect ALG checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger ALG accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/ALG",files:["habibi-alg/habibi-alg-orig.gguf","habibi-alg/vocab.txt"],strip_prefix:"habibi-alg"},{id:"habibi_egy",display_name:"Habibi-TTS EGY specialized checkpoint (GGUF)",description:"Single-dialect EGY checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger EGY accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/EGY",files:["habibi-egy/habibi-egy-orig.gguf","habibi-egy/vocab.txt"],strip_prefix:"habibi-egy"},{id:"habibi_irq",display_name:"Habibi-TTS IRQ specialized checkpoint (GGUF)",description:"Single-dialect IRQ checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger IRQ accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/IRQ",files:["habibi-irq/habibi-irq-orig.gguf","habibi-irq/vocab.txt"],strip_prefix:"habibi-irq"},{id:"habibi_mar",display_name:"Habibi-TTS MAR specialized checkpoint (GGUF)",description:"Single-dialect MAR checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger MAR accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/MAR",files:["habibi-mar/habibi-mar-orig.gguf","habibi-mar/vocab.txt"],strip_prefix:"habibi-mar"},{id:"habibi_msa",display_name:"Habibi-TTS MSA specialized checkpoint (GGUF)",description:"Single-dialect MSA checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger MSA accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/MSA",files:["habibi-msa/habibi-msa-orig.gguf","habibi-msa/vocab.txt"],strip_prefix:"habibi-msa"},{id:"habibi_sau",display_name:"Habibi-TTS SAU specialized checkpoint (GGUF)",description:"Single-dialect SAU checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger SAU accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/SAU",files:["habibi-sau/habibi-sau-orig.gguf","habibi-sau/vocab.txt"],strip_prefix:"habibi-sau"},{id:"habibi_uae",display_name:"Habibi-TTS UAE specialized checkpoint (GGUF)",description:"Single-dialect UAE checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger UAE accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/UAE",files:["habibi-uae/habibi-uae-orig.gguf","habibi-uae/vocab.txt"],strip_prefix:"habibi-uae"}],dependencies:[],ui:{recommended_package:"habibi_unified",tags:["TTS","Clone"],docs:["docs/models/f5_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{vocab:"model:vocab.txt"},tensors:{transformer:{source:"weights:",prefix:"transformer"}},optional_tensors:{vocos_vocoder:{source:"weights:",prefix:"vocos"}}},{format:"safetensors",roots:{model:"."},files:{vocab:"model:vocab.txt"},tensors:{transformer:{source:"model:model_200000.safetensors",prefix:"ema_model.transformer"}}}]},QT={schema_version:1,family:"firered_audio",display_name:"FireRedAudio",description:"FireRedAudio native GGUF package for generation paths backed by a Qwen3.5 hybrid backbone, FireRed RedAE conditioning, RedPatchEncoder, RedDiT latent flow, and RedAE waveform decoding.",category:"tts",status:"experimental",tasks:["asr","tts","clone","design","edit"],modes:["offline"],languages:["zh","en"],runtime:{tags:["gguf"]},dependencies:[],capabilities:{tts:["speaker_reference","style_control"],clone:["speaker_reference"],design:["voice_design"],edit:["prompt_editing"]},options:{request:[{name:"template_name",type:"enum",description:"Defaults to voice_design for design, acoustic_edit for generation with input audio, tts_clone for other generation, and asr for ASR.",required:!1,values:["tts_clone","voice_design","semantic_edit","acoustic_edit","asr","understand"]},{name:"reference_text",type:"string",description:"Transcript for the prompt audio used by tts_clone.",required:!1},{name:"instruct",type:"string",description:"Voice/delivery conditioning for generation. ASR/understanding uses the text input as its task prompt, not this option.",required:!1},{name:"language",type:"string",description:"FireRedAudio generation language tag.",required:!1,default:"zh"},{name:"num_inference_steps",type:"int",description:"FireRedAudio DiT flow steps per generated latent patch.",required:!1,min:1,default:10},{name:"guidance_scale",type:"float",description:"FireRedAudio DiT classifier-free guidance scale. Must be > 0.",required:!1,min:0,default:2},{name:"max_audio_steps",type:"int",description:"Maximum generated RedAE latent patches.",required:!1,min:1,default:750},{name:"min_audio_steps",type:"int",description:"Minimum generated RedAE latent patches before eosp can stop generation.",required:!1,min:0,default:6},{name:"max_text_tokens",type:"int",description:"Maximum text-mode tokens before audio mode.",required:!1,min:1,default:512},{name:"max_tokens",type:"int",description:"Output token budget; defaults to 300, or 1024 for understand with enable_thinking=true.",required:!1,min:1},{name:"enable_thinking",type:"bool",description:"Leave the understanding think block open for chain-of-thought style answers.",required:!1,default:!1},{name:"top_k",type:"int",description:"Text sampling top-k for understanding.",required:!1,min:0,default:20},{name:"top_p",type:"float",description:"Text sampling top-p for understanding.",required:!1,min:0,max:1,default:.8},{name:"temperature",type:"float",description:"Text sampling temperature for understanding. Understanding-mode sampling requires a positive value; zero does not select greedy decoding.",required:!1,min:0,default:.7},{name:"seed",type:"int",description:"Unsigned 32-bit generation seed in [0, 4294967295]; default 1234.",required:!1,min:0,max:4294967295,default:1234}],session:[{name:"weight_type",type:"enum",description:"FireRedAudio weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"graph_arena_mb",type:"int",description:"Main runtime graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse.",required:!1,min:0,default:2},{name:"mem_saver",type:"bool",description:"Release cached runtime graphs after each request to reduce peak VRAM; default false.",required:!1,default:!1}],load:[]},packages:[{id:"firered_audio_orig",display_name:"FireRedAudio Orig GGUF",format:"gguf",precision:"orig",target_directory:"FireRedAudio-GGUF",files:["FireRedAudio-GGUF/firered-audio-orig.gguf"],strip_prefix:"FireRedAudio-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"firered_audio_q8_0",display_name:"FireRedAudio Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"FireRedAudio-GGUF",files:["FireRedAudio-GGUF/firered-audio-q8_0.gguf"],strip_prefix:"FireRedAudio-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}}],ui:{recommended_package:"firered_audio_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/models/firered_audio.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",processor_config:"model:processor_config.json"},tensors:{model_weights:{source:"weights:",prefix:"model"},redae_decoder_weights:{source:"weights:",prefix:"redae_decoder"}}}]},KT={schema_version:1,family:"firered_vad",display_name:"FireRed VAD",description:"DFSMN speech activity detection with offline and causal Stream-VAD checkpoints.",category:"audio_tools",status:"experimental",tasks:["vad"],modes:["offline","streaming"],languages:["language_agnostic"],capabilities:{vad:["speech_segments"]},runtime:{tags:["gguf"]},options:{request:[{name:"threshold",type:"float",description:"Speech probability threshold; defaults to 0.4 for VAD and 0.5 for Stream-VAD.",required:!1,min:0,max:1},{name:"smooth_window_ms",type:"int",description:"Trailing probability smoothing window in milliseconds, rounded to the nearest 10 ms. Validation occurs after conversion to 10-ms frames; metadata bounds describe intended settings.",required:!1,default:50,min:10},{name:"min_speech_duration_ms",type:"int",description:"Speech confirmation duration, rounded to the nearest 10 ms; defaults to 200 ms for VAD and 80 ms for Stream-VAD. Validation occurs after conversion to 10-ms frames; metadata bounds describe intended settings.",required:!1,min:10},{name:"max_speech_duration_sec",type:"float",description:"Maximum speech duration in seconds, rounded to the nearest 10 ms. Validation occurs after conversion to 10-ms frames; metadata bounds describe intended settings.",required:!1,default:20,min:.02},{name:"min_silence_duration_ms",type:"int",description:"Silence confirmation duration in milliseconds, rounded to the nearest 10 ms. Validation occurs after conversion to 10-ms frames; metadata bounds describe intended settings.",required:!1,default:200,min:0},{name:"merge_silence_duration_ms",type:"int",description:"Merge shorter internal silence gaps in offline VAD; milliseconds rounded to the nearest 10 ms.",required:!1,default:0,min:0},{name:"speech_pad_ms",type:"int",description:"Extend offline VAD segments on each side; milliseconds rounded to the nearest 10 ms.",required:!1,default:0,min:0},{name:"speech_start_pad_ms",type:"int",description:"Stream-VAD start padding in milliseconds, rounded to the nearest 10 ms and at least the smoothing window.",required:!1,default:50,min:0},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum network duration per offline chunk in seconds, rounded to the nearest 10 ms; each chunk resets network history, matching upstream.",required:!1,default:300,min:.01}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"firered_vad_f32",display_name:"FireRed VAD GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"FireRedVAD-GGUF",files:["FireRedVAD-GGUF/firered-vad-f32.gguf"],strip_prefix:"FireRedVAD-GGUF"},{id:"firered_stream_vad_f32",display_name:"FireRed Stream-VAD GGUF F32",format:"gguf",precision:"f32",target_directory:"FireRedVAD-GGUF",files:["FireRedVAD-GGUF/firered-stream-vad-f32.gguf"],strip_prefix:"FireRedVAD-GGUF"}],dependencies:[],ui:{tags:["VAD","GGUF"],docs:["docs/models/firered_vad.md"],recommended_package:"firered_vad_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},YT={schema_version:1,family:"fireredtts3",display_name:"FireRedTTS3",description:"FireRedTTS3 family for Base zero-shot voice cloning and Instruct instruction-conditioned TTS, voice design, semantic edit, and acoustic edit with Qwen3 autoregressive hidden-state generation, FireRed DiT latent patch flow, and RedAE waveform decoding.",category:"tts",status:"experimental",tasks:["tts","clone","design"],modes:["offline"],languages:["Chinese","English","Cantonese","Japanese","Korean","Spanish","French","Russian","Arabic","Turkish","Indonesian","Portuguese","Italian","Dutch","Vietnamese","German","Ukrainian","Thai","Polish","Romanian","Greek","Czech","Finnish","Hindi","ZH_Anhui","ZH_Fujian","ZH_Gansu","ZH_Guizhou","ZH_Hebei","ZH_Henan","ZH_Hubei","ZH_Hunan","ZH_Jiangxi","ZH_Liaoning","ZH_Minnan","ZH_Ningxia","ZH_Shaanxi","ZH_Shandong","ZH_Shanghai","ZH_Shanxi","ZH_Sichuan","ZH_Tianjin","ZH_Wenzhou","ZH_Wu","ZH_Yunnan"],runtime:{tags:["gguf"]},dependencies:[],capabilities:{tts:["speaker_reference","style_control"],clone:["speaker_reference","style_control"],design:["voice_design"]},options:{request:[{name:"template_name",type:"enum",description:"Instruct template; defaults to acoustic_edit with input audio, otherwise instruct_tts.",required:!1,values:["instruct_tts","voice_design","semantic_edit","acoustic_edit"]},{name:"reference_text",type:"string",description:"Transcript for the prompt audio.",required:!1},{name:"instruct",type:"string",description:"FireRedTTS3 instruction for voice design or edit tasks.",required:!1},{name:"language",type:"string",description:"Language tag used by FireRedTTS3.",required:!1,default:"Chinese"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 80 when hanzi, kana and Hangul outnumber other letters and digits (except edits), otherwise 600.",required:!1,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"num_inference_steps",type:"int",description:"FireRed DiT flow steps per generated latent patch.",required:!1,min:1,default:10},{name:"guidance_scale",type:"float",description:"Positive guidance scale; defaults to 1.2 for voice-design/semantic-edit/acoustic-edit templates and 2 otherwise.",required:!1,min:0},{name:"stop_threshold",type:"float",description:"Stop probability threshold for AR patch generation.",required:!1,min:0,max:1,default:.5},{name:"seed",type:"int",description:"Unsigned 32-bit sampling seed in [0, 4294967295]; defaults to 2 for voice design and 1234 otherwise.",required:!1,min:0,max:4294967295}],session:[{name:"weight_type",type:"enum",description:"FireRedTTS3 weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"graph_arena_mb",type:"int",description:"Main runtime graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"helper_graph_arena_mb",type:"int",description:"Helper graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 512.",required:!1,min:1,default:512},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse. Applies only to Base; Instruct does not use this cache.",required:!1,min:0,default:4},{name:"mem_saver",type:"bool",description:"Release cached runtime graphs after each request to reduce peak VRAM; default false.",required:!1,default:!1}],load:[]},packages:[{id:"fireredtts3_instruct_orig",display_name:"FireRedTTS3 Instruct Orig GGUF",format:"gguf",precision:"orig",target_directory:"FireRedTTS3-Instruct-GGUF",files:["FireRedTTS3-Instruct-GGUF/fireredtts3-instruct-orig.gguf"],strip_prefix:"FireRedTTS3-Instruct-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"fireredtts3_instruct_q8_0",display_name:"FireRedTTS3 Instruct Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"FireRedTTS3-Instruct-GGUF",files:["FireRedTTS3-Instruct-GGUF/fireredtts3-instruct-q8_0.gguf"],strip_prefix:"FireRedTTS3-Instruct-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"fireredtts3_base_orig",display_name:"FireRedTTS3 Base Orig GGUF",format:"gguf",precision:"orig",target_directory:"FireRedTTS3-Base-GGUF",files:["FireRedTTS3-Base-GGUF/fireredtts3-base-orig.gguf"],strip_prefix:"FireRedTTS3-Base-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"fireredtts3_base_q8_0",display_name:"FireRedTTS3 Base Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"FireRedTTS3-Base-GGUF",files:["FireRedTTS3-Base-GGUF/fireredtts3-base-q8_0.gguf"],strip_prefix:"FireRedTTS3-Base-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}}],ui:{recommended_package:"fireredtts3_instruct_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/models/fireredtts3.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{redae_config:"model:redae/config.json",tokenizer_json:"model:text_tokenizer/tokenizer.json",tokenizer_config:"model:text_tokenizer/tokenizer_config.json",vocab_json:"model:text_tokenizer/vocab.json"},optional_files:{base_config:"model:fireredtts3_base/config.json",instruct_config:"model:fireredtts3_instruct/config.json"},tensors:{redae_weights:{source:"weights:",prefix:"redae"}},optional_tensors:{base_weights:{source:"weights:",prefix:"base"},campplus_weights:{source:"weights:",prefix:"campplus"},instruct_weights:{source:"weights:",prefix:"instruct"}}}]},JT={family:"fish_audio",display_name:"Fish Audio S2 Pro",description:"Fish Audio S2 Pro text-to-speech model for expressive speech across 80+ languages, with automatic language handling, inline prosody/emotion controls, and rapid voice cloning from short reference samples.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["80+ languages"],capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"reference_text",type:"string",description:"Reference transcript; required with inline reference audio.",required:!1},{name:"multi_reference_cond",type:"string",description:'Fish Audio ordered JSON array of reference conditioning pairs for one generated speaker: [{"audio":"ref1.wav","text":"Transcript one."},{"audio":"ref2.wav","text":"Transcript two."}]. This is not a multi-speaker dialogue routing option.',required:!1},{name:"max_tokens",type:"int",description:"Maximum Fish Audio semantic tokens to generate; default 1024. Zero selects the default token budget.",required:!1,min:0,default:1024},{name:"text_chunk_size",type:"int",description:"Maximum characters per generated text chunk; default 200.",required:!1,min:1,default:200},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode; default word_budget.",preset:"text_chunk_mode_full",required:!1,default:"word_budget"},{name:"top_p",type:"float",description:"Top-p sampling value in (0, 1]; default 0.8.",required:!1,min:0,max:1,default:.8},{name:"top_k",type:"int",description:"Top-k sampling value; default 30.",required:!1,min:1,default:30},{name:"temperature",type:"float",description:"Semantic-token sampling temperature in (0, 2); default 0.8.",required:!1,min:0,max:2,default:.8},{name:"seed",type:"int",description:"Sampling seed for reproducible output; omitted uses a random seed.",required:!1,min:0}],session:[{name:"lora",type:"path",description:"Prepared Fish Speech adapter checkpoint; merged into slow/fast decoder and embedding weights at session creation. Codec weights are unchanged.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"mem_saver",type:"bool",description:"Release cached AR runtime graphs after each request; default false.",required:!1,default:!1},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; default 1.",required:!1,min:0,default:1},{name:"weight_type",type:"enum",description:"AR matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"codec_weight_type",type:"enum",description:"Codec conv/matmul weight storage type; default native.",preset:"weight_type_codec_q8",required:!1,default:"native"},{name:"codec_encoder_bf16_compute",type:"bool",description:"Use BF16 reference-encoder arithmetic on CUDA with F16/BF16 codec weights; default false. Decoding is unchanged.",required:!1,default:!1},{name:"ar_graph_arena_mb",type:"int",description:"AR runtime graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"ar_weight_context_mb",type:"int",description:"AR weight context size in MiB; default 32.",required:!1,min:1,default:32},{name:"codec_graph_arena_mb",type:"int",description:"Codec encode/decode graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"codec_weight_context_mb",type:"int",description:"Codec weight context size in MiB; default 32.",required:!1,min:1,default:32}],load:[]},ui:{recommended_package:"fish_audio_s2_pro_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"fish_audio_s2_pro_q8_0",display_name:"Fish Audio S2 Pro Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Fish-Audio-S2-Pro-GGUF",files:["Fish-Audio-S2-Pro-GGUF/fish-audio-s2-pro-q8_0.gguf"],strip_prefix:"Fish-Audio-S2-Pro-GGUF"},{id:"fish_audio_s2_pro_bf16",display_name:"Fish Audio S2 Pro BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Fish-Audio-S2-Pro-GGUF",files:["Fish-Audio-S2-Pro-GGUF/fish-audio-s2-pro-bf16.gguf"],strip_prefix:"Fish-Audio-S2-Pro-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},codec_weights:{source:"weights:",prefix:"codec_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{model_weights:"model:model_audio_cpp.safetensors.index.json",codec_weights:"model:codec.safetensors"}}]},XT={family:"fish_drama3",display_name:"Fish Audio Drama 3",description:"Fish Audio Drama 3 native MoE speech generation, voice cloning, and continuation.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline","streaming"],languages:["auto"],capabilities:{tts:["long_form"],clone:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"encode_reference_only",type:"bool",description:"Prepare reference VQ codes without generating speech. Use the task API to receive drama3_reference_v1 acoustic-token artifacts.",required:!1,default:!1},{name:"reference_text",type:"string",description:"Transcript of inline reference audio.",required:!1},{name:"multi_reference_cond",type:"string",description:"Ordered references as JSON: [{text, audio_path or vq_codes}]. Speaker tags 0..15 select voices.",required:!1},{name:"references",type:"string",description:"Alias of multi_reference_cond.",required:!1},{name:"previous_takes",type:"string",description:"Continuation/edit history as a JSON array of {text, vq_codes or audio_path}; a string generates that earlier take first.",required:!1},{name:"previous_takes_file",type:"string",description:"JSON history file containing a take object or an ordered array of earlier takes. Avoids the Windows command-line length limit for VQ grids.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated acoustic frames per text chunk (about 21.5 frames/second).",required:!1,min:1,default:1024},{name:"text_chunk_size",type:"int",description:"Maximum characters per long-form chunk.",required:!1,min:1,default:128},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,preset:"text_chunk_mode_full",default:"tag_aware"},{name:"temperature",type:"float",description:"Main and residual sampling temperature. Zero makes the initial draws greedy; semantic repeat redraws retain the fixed Drama 3 RAS settings.",required:!1,min:0,default:1},{name:"top_p",type:"float",description:"Inclusive nucleus cutoff before top-k filtering, matching Drama 3.",required:!1,min:0,max:1,default:.9},{name:"top_k",type:"int",description:"Top-k candidate count. The default 4097 keeps every candidate (no cap), as Fish's Drama 3 Space does; 30 can stall in long silences.",required:!1,min:1,default:4097},{name:"seed",type:"int",description:"Reproducible native sampling seed.",required:!1,min:0}],session:[{name:"perf_mode",type:"enum",description:"AR decode preset. cuda_perf enables fused MoE, 256-row attention buckets and device sampling. F16 KV storage, codec batching/overlap and prefill-cache defaults remain unchanged in both modes. Explicit session options override the preset.",required:!1,values:["off","cuda_perf"],default:"off"},{name:"fused_moe",type:"bool",description:"Fuse cached backbone MoE routing and SwiGLU activations. Fused arithmetic may change sampled output; prompt prefill is unchanged.",required:!1,default:!1},{name:"kv_cache_alignment",type:"int",description:"Cached decode attention prefix bucket size. Values above 1 retain all history while skipping unused KV capacity; execution shapes may change numerical results.",required:!1,min:1,default:1},{name:"kv_cache_type",type:"enum",description:"Storage precision for full-attention backbone KV caches.",required:!1,values:["f32","f16"],default:"f16"},{name:"backbone_prefill_cache_mb",type:"int",description:"Bounded cache of backbone prefill graphs, in MiB. Reuses exact shapes and their CUDA captures. One active graph is retained even if larger than this budget. Zero retains only the active graph.",required:!1,min:0,max:4096,default:256},{name:"tower_prefill_cache_mb",type:"int",description:"Bounded cache of audio-tower prefill graphs, in MiB. Reuses exact shapes and their CUDA captures. Zero disables it.",required:!1,min:0,max:4096,default:256},{name:"codec_batch_frames",type:"int",description:"Streaming codec batch ceiling. Starts at one frame and grows to this size; partial final batches are flushed. Offline decoding is unchanged.",required:!1,min:1,default:4},{name:"codec_async_decode",type:"bool",description:"Overlap streaming codec decoding with AR generation on the dedicated codec backend. Uses a bounded queue and waits for all audio before completing the request.",required:!1,default:!0},{name:"device_sampling",type:"bool",description:"Enable tower decode and codebook sampling in one cached backend graph. Disabled by default; enabled by cuda_perf unless explicitly overridden. Uses F32 probabilities; sampled outputs may differ from the host sampler.",required:!1,default:!1},{name:"profile_first_audio",type:"bool",description:"Emit first-audio stage timings to stderr for performance diagnosis. Disabled by default.",required:!1,default:!1},{name:"context_length",type:"int",description:"Cache capacity for prompt plus generated frames; includes references and history.",required:!1,min:1,default:2048},{name:"cpu_expert_layers",type:"int",description:"Number of the 40 expert banks kept and evaluated on CPU; use 4 for a 24 GB profile or 24 for a 16 GB profile. Dense layers and the tower use the selected backend.",required:!1,min:0,max:40,default:4},{name:"disk_experts",type:"bool",description:"Read routed expert weights from GGUF on demand into a bounded cache instead of keeping full expert banks resident. Trades speed for memory; default false.",required:!1,default:!1},{name:"pin_experts",type:"bool",description:"Keep full expert banks in pinned host RAM for direct cache-miss uploads. Requires disk_experts and pinned host-buffer support; default false.",required:!1,default:!1},{name:"expert_cache_size",type:"int",description:"Resident expert slots per layer in disk_experts mode; 8 to 256. Larger caches trade memory for fewer disk reads; ignored in resident mode.",required:!1,min:8,max:256,default:32},{name:"disk_expert_read_threads",type:"int",description:"Host workers for copying selected GGUF experts into staging when disk_experts is enabled and pin_experts is false. Default 1 preserves serial reads; values above 1 use OpenMP or Apple dispatch.",required:!1,min:1,max:64,default:1},{name:"codec_encoder_f32_accumulation",type:"bool",description:"Use F32 accumulation for F16 reference-encoder GEMMs on Vulkan. Try this if voice cloning produces incomplete speech or reaches the token limit. Other backends and codec decoding are unchanged.",required:!1,default:!1},{name:"codec_encoder_bf16_compute",type:"bool",description:"Use BF16 reference-encoder arithmetic on CUDA with F16/BF16 codec weights; default true. Decoding is unchanged.",required:!1,default:!0},{name:"codec_encoder_chunk_samples",type:"int",description:"Reference-encoder convolution chunk size in samples at the codec sample rate. Use 0 for full encoding or a positive multiple of 512; default 0.",required:!1,min:0,default:0},{name:"codec_backend",type:"enum",description:"Run the codec on the selected backend or on CPU.",required:!1,values:["same","cpu"],default:"same"}],load:[]},ui:{recommended_package:"fish_drama3_q4_experts_q8_backbone",tags:["TTS","Clone","GGUF"],docs:["docs/models/fish_drama3.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"Jmica/Drama-3-GGUF",revision:"main",gated:!1}},packages:[{id:"fish_drama3_q4_experts_q8_backbone",display_name:"Drama 3 Q4_K experts / Q8_0 backbone",description:"Mixed quantization with Q4_K routed experts, Q8_0 backbone matrices, and FP16 audio tower/codec.",default:!0,format:"gguf",precision:"q4_k",target_directory:"Drama-3-GGUF",files:["drama-3-backbone-8bit-experts-Q4_K_S.gguf"]},{id:"fish_drama3_q3_experts_q8_backbone",display_name:"Drama 3 Q3_K experts / Q8_0 backbone",description:"Mixed quantization with Q3_K routed experts, Q8_0 backbone matrices, and FP16 audio tower/codec. Experimental delivery quality.",format:"gguf",precision:"q3_k_s",target_directory:"Drama-3-GGUF",files:["drama-3-backbone-8bit-experts-Q3_K_S.gguf"]},{id:"fish_drama3_q2_experts_q8_backbone",display_name:"Drama 3 Q2_K experts / Q8_0 backbone",description:"Mixed quantization with Q2_K routed experts, Q8_0 backbone matrices, and FP16 audio tower/codec. Use the documented CPU offload settings for smaller GPUs.",format:"gguf",precision:"q2_k",target_directory:"Drama-3-GGUF",files:["drama-3-backbone-8bit-experts-Q2_K.gguf"]},{id:"fish_drama3_q4_backbone",display_name:"Drama 3 Q4_K experts / Q4_K backbone",description:"Q4_K routed experts and backbone matrices, Q4_0 text embedding, and FP16 audio tower/codec. Experimental delivery quality.",format:"gguf",precision:"q4_k",target_directory:"Drama-3-GGUF",files:["drama-3-backbone-4bit-experts-Q4_K_S.gguf"]},{id:"fish_drama3_small_iq3_xxs",display_name:"Drama3-small IQ3_XXS",format:"gguf",precision:"iq3_xxs",target_directory:"Drama3-small-GGUF",files:["drama3-small-IQ3_XXS.gguf"],download:{kind:"huggingface_snapshot",repo:"pentacoxian-dev/drama3-small-GGUF",revision:"main",gated:!1}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},codec_weights:{source:"weights:",prefix:"codec_weights"}}}],schema_version:1,dependencies:[]},ZT={schema_version:1,family:"fun_asr_nano",display_name:"Fun-ASR-Nano",description:"Offline multilingual speech recognition with the FunAudioLLM Fun-ASR-Nano-2512 model.",category:"asr",status:"wip",tasks:["asr"],modes:["offline"],languages:["auto","zh","en","ja"],capabilities:{},options:{request:[{name:"language",type:"string",description:"Recognition language, or auto to let the model infer it.",required:!1,default:"auto"},{name:"enable_itn",type:"bool",description:"Enable inverse text normalization in the transcription prompt.",required:!1,default:!0},{name:"max_tokens",type:"int",description:"Maximum number of generated transcript tokens.",required:!1,min:1,default:512},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode: auto, fixed, or none.",values:["auto","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Fixed chunk duration in seconds. Must be finite and positive, rounding to at least one input sample.",required:!1,default:30}],session:[{name:"weight_type",type:"enum",description:"Shared model weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"encoder_weight_type",type:"enum",description:"Encoder matmul storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"adaptor_weight_type",type:"enum",description:"Adaptor matmul storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"decoder_weight_type",type:"enum",description:"Decoder matmul storage. Without an explicit override, CUDA promotes shared native/f16/q8_0 storage to bf16; other backends inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:512},{name:"adaptor_graph_arena_mb",type:"int",description:"Adaptor graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:128},{name:"decoder_prefill_graph_arena_mb",type:"int",description:"Decoder prefill graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:256},{name:"decoder_decode_graph_arena_mb",type:"int",description:"Decoder cached-step graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:128},{name:"decoder_weight_context_mb",type:"int",description:"Decoder weight metadata context. Size in MiB; must be positive.",required:!1,min:1,default:32}],load:[]},runtime:{tags:["gguf","server","cuda","metal","cpu"]},packages:[{id:"fun_asr_nano_2512_q8_0",display_name:"Fun-ASR-Nano-2512 Q8_0 GGUF",description:"Standalone audio.cpp GGUF built from the pinned official checkpoint; governed by the FunASR Model Open Source License Agreement v1.1.",default:!0,format:"gguf",precision:"q8_0",target_directory:"Fun-ASR-Nano-2512-GGUF",files:["fun-asr-nano-2512-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"FunAudioLLM/Fun-ASR-Nano-2512-GGUF",revision:"ce72677f84900f0dc57f498ace253bfb3c9155b6",gated:!1}},{id:"fun_asr_nano_2512_f16",display_name:"Fun-ASR-Nano-2512 F16 GGUF",description:"Standalone audio.cpp GGUF built from the pinned official checkpoint; governed by the FunASR Model Open Source License Agreement v1.1.",format:"gguf",precision:"f16",target_directory:"Fun-ASR-Nano-2512-GGUF",files:["fun-asr-nano-2512-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"FunAudioLLM/Fun-ASR-Nano-2512-GGUF",revision:"ce72677f84900f0dc57f498ace253bfb3c9155b6",gated:!1}},{id:"fun_asr_nano_2512_safetensors",display_name:"Fun-ASR-Nano-2512 HF Safetensors",description:"Official checkpoint governed by the FunASR Model Open Source License Agreement v1.1.",format:"safetensors",precision:"native",target_directory:"Fun-ASR-Nano-2512-hf",files:["chat_template.jinja","config.json","generation_config.json","model.safetensors","processor_config.json","tokenizer.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"FunAudioLLM/Fun-ASR-Nano-2512-hf",revision:"854d88f94205cd17d2afdb24332130d86fbe654a",gated:!1}}],dependencies:[],ui:{recommended_package:"fun_asr_nano_2512_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"],summary:"Offline Fun-ASR-Nano transcription from official safetensors or audio.cpp GGUF."},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},optional_files:{chat_template_jinja:"model:chat_template.jinja",tokenizer_config:"model:tokenizer_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},optional_files:{chat_template_jinja:"model:chat_template.jinja",tokenizer_config:"model:tokenizer_config.json"},tensors:{weights:"model:model.safetensors"}}]},e8={schema_version:1,family:"gigaam_asr",display_name:"GigaAM ASR",description:"GigaAM v3 and Multilingual Conformer speech recognition with CTC or RNN-T decoding.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["ru","kk","ky","uz","en"],capabilities:{asr:["word_timestamps","vad_chunking"]},dependencies:[],options:{request:[{name:"return_timestamps",type:"bool",description:"Return word timestamps derived from decoder token emission frames.",required:!1,default:!1},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","quiet_energy","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio chunk in seconds.",required:!1,min:.02,max:25,default:25}],session:[{name:"vad_model_path",type:"path",description:"Offline VAD model used only with audio_chunk_mode=vad.",required:!1,default:""},{name:"weight_type",type:"enum",description:"Weight storage type.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"gigaam_v3_ctc_f16",tags:["ASR","GGUF"],docs:["docs/models/gigaam_asr.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"gigaam_v3_ctc_f16",display_name:"GigaAM v3 CTC F16 GGUF",default:!0,format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-v3-ctc-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_v3_rnnt_f16",display_name:"GigaAM v3 RNN-T F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-v3-rnnt-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_v3_e2e_ctc_f16",display_name:"GigaAM v3 E2E CTC F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-v3-e2e-ctc-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_v3_e2e_rnnt_f16",display_name:"GigaAM v3 E2E RNN-T F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-v3-e2e-rnnt-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_multilingual_ctc_f32",display_name:"GigaAM Multilingual CTC F32 GGUF",format:"gguf",precision:"f32",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-multilingual-ctc-f32.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_multilingual_ctc_f16",display_name:"GigaAM Multilingual CTC F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-multilingual-ctc-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_multilingual_large_ctc_f32",display_name:"GigaAM Multilingual Large CTC F32 GGUF",format:"gguf",precision:"f32",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-multilingual-large-ctc-f32.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_multilingual_large_ctc_f16",display_name:"GigaAM Multilingual Large CTC F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-multilingual-large-ctc-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}}]},t8={schema_version:1,family:"glm_tts",display_name:"GLM-TTS",description:"Community Chinese-English zero-shot speech synthesis and voice cloning with native Llama, Whisper-VQ, Flow/DiT, CAMPPlus, and HiFT execution.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline"],languages:["zh","en"],capabilities:{clone:["speaker_reference"]},options:{request:[{name:"reference_text",type:"string",description:"Transcript matching the reference voice audio; required by GLM-TTS zero-shot synthesis.",required:!0},{name:"max_tokens",type:"int",description:"Maximum generated speech tokens; otherwise the official 2x-to-20x text-token bounds are used. Nonpositive values select the automatic text-derived budget.",required:!1,default:0},{name:"temperature",type:"float",description:"Speech-token temperature; official default 1.0. Nonpositive values select greedy decoding.",required:!1,default:1},{name:"top_k",type:"int",description:"Speech-token top-k; official default 25. Nonpositive values disable top-k filtering.",required:!1,default:25},{name:"top_p",type:"float",description:"Speech-token nucleus threshold; official default 0.8. Out-of-range values are not rejected by the parser.",required:!1,default:.8},{name:"seed",type:"int",description:"Speech-token, Flow-noise, and HiFT seed.",required:!1,min:0,default:0},{name:"num_inference_steps",type:"int",description:"Flow Euler steps; defaults to model config, usually official default 10.",required:!1,min:1},{name:"flow_guidance_scale",type:"float",description:"Flow classifier-free guidance rate; defaults to model config, usually official default 0.7. Negative values are accepted and enter the CFG formula.",required:!1},{name:"flow_noise_file",type:"path",description:"Optional raw float32 initial Flow noise for parity tests.",required:!1},{name:"hift_source_random_file",type:"path",description:"Optional raw float32 HiFT phase-uniform and Gaussian values for parity tests.",required:!1},{name:"hift_prior_noise_count",type:"int",description:"Torch RNG value offset used before HiFT source generation; default 0.",required:!1,min:0,default:0}],session:[{name:"weight_type",type:"enum",description:"Requested component weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"mem_saver",type:"bool",description:"Release reference-only encoders after caching the voice while keeping the generation path warm; default false.",required:!1,default:!1},{name:"aggressive_mem_saver",type:"bool",description:"Also release Llama, Flow, and HiFT after every stage. Minimizes VRAM but reloads the generation path on every request; default false.",required:!1,default:!1},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; default 1. Use 0 to disable.",required:!1,min:0,default:1},{name:"llama_weight_context_mb",type:"int",description:"Llama weight metadata context in MiB; default 8192.",required:!1,min:1,default:8192},{name:"constant_context_mb",type:"int",description:"Llama constant tensor context in MiB; default 256.",required:!1,min:1,default:256}],load:[]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{llama_config:"model:llm/config.json",llama_generation_config:"model:llm/generation_config.json",speech_tokenizer_config:"model:speech_tokenizer/config.json",speech_tokenizer_preprocessor:"model:speech_tokenizer/preprocessor_config.json",tokenizer_config:"model:vq32k-phoneme-tokenizer/tokenizer_config.json",tokenizer_vocab:"model:vq32k-phoneme-tokenizer/tokenizer_vocab.json",tokenizer_merges:"model:vq32k-phoneme-tokenizer/tokenizer_merges.txt",flow_config:"model:flow/config.yaml",audio_cpp_config:"model:audio_cpp_config.json"},tensors:{llama_weights:{source:"weights:",prefix:"llama_weights"},speech_tokenizer_weights:{source:"weights:",prefix:"speech_tokenizer_weights"},flow_weights:{source:"weights:",prefix:"flow_weights"},hift_weights:{source:"weights:",prefix:"hift_weights"},campplus_weights:{source:"weights:",prefix:"campplus_weights"}}},{format:"safetensors",roots:{model:"."},files:{llama_config:"model:llm/config.json",llama_generation_config:"model:llm/generation_config.json",speech_tokenizer_config:"model:speech_tokenizer/config.json",speech_tokenizer_preprocessor:"model:speech_tokenizer/preprocessor_config.json",tokenizer_config:"model:vq32k-phoneme-tokenizer/tokenizer_config.json",tokenizer_vocab:"model:vq32k-phoneme-tokenizer/tokenizer_vocab.json",tokenizer_merges:"model:vq32k-phoneme-tokenizer/tokenizer_merges.txt",flow_config:"model:flow/config.yaml",audio_cpp_config:"model:audio_cpp_config.json"},tensors:{llama_weights:"model:llm/model.safetensors.index.json",speech_tokenizer_weights:"model:speech_tokenizer/model.safetensors",flow_weights:"model:flow/model.safetensors",hift_weights:"model:hift/model.safetensors",campplus_weights:"model:frontend/campplus.safetensors"}}],packages:[{id:"glm_tts_q8_0",display_name:"GLM-TTS mixed Q8_0/F16 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"GLM-TTS-Q8",files:["Text to audio (TTS)/GLM-TTS_Q8.gguf"],download:{kind:"huggingface_snapshot",repo:"mirek190/audio.cpp"}}],dependencies:[],ui:{recommended_package:"glm_tts_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/glm_tts.md","docs/reports/glm_tts_validation.md","docs/gguf.md"]}},a8={schema_version:1,family:"gradium_phonon",display_name:"Gradium Phonon",description:"Gradium's Phonon text-to-speech: a small flow-matching language model with a Mimi decoder, a descendant of Kyutai's pocket-tts, for real-time local synthesis on CPU and GPU with prepared voices.",category:"tts",status:"experimental",tasks:["tts"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["built_in_voices","long_form"]},options:{request:[{name:"frames_after_eos",type:"int",description:"Frames kept after EOS, counting the EOS frame; -1 keeps 4 for texts of up to four words and 2 otherwise, as the reference does.",required:!1,min:-1,default:-1},{name:"max_frames",type:"int",description:"Maximum generated audio frames; zero estimates the cap from text length. Captured during session preparation.",required:!1,min:0,default:0},{name:"text_chunk_tokens",type:"int",description:"Tokenizer tokens per text chunk; must be positive, default 50. Set during preparation and overridable per request.",required:!1,min:1,default:50},{name:"temperature",type:"float",description:"Positive flow noise temperature. Captured during session preparation.",required:!1,default:.3},{name:"seed",type:"int",description:"Noise seed; omitted chooses a random seed. Captured during session preparation.",required:!1,min:0,max:4294967295},{name:"noise_clamp",type:"float",description:"Noise clamp; a negative value disables clamping. Captured during session preparation.",required:!1,default:-1},{name:"eos_threshold",type:"float",description:"EOS detection threshold on the EOS logit. Captured during session preparation.",required:!1,default:4},{name:"noise_file",type:"path",description:"Precomputed noise schedule, raw float32 [frames, 32], used as given. Captured during session preparation.",required:!1},{name:"voice_embedding_file",type:"path",description:"Voice file: a speaker_wavs latent file such as those of gradium/phonon-voices, or an exported voice state. Captured during session preparation.",required:!1},{name:"text_chunk_size",type:"int",description:"Optional per-request character chunk size; otherwise use sentence/token budgeting.",required:!1},{name:"export_voice_state_file",type:"path",description:"Export the prepared voice state during session preparation.",required:!1}],session:[{name:"voice_state_cache_slots",type:"int",description:"Cached prepared voice states; zero disables reuse.",required:!1,min:0,default:4},{name:"offline_graph_capacity_mode",type:"enum",description:"Offline graph capacity policy; CPU/Metal default tiered, other backends double.",required:!1,values:["fixed","double","tiered","grow"]},{name:"prompt_graph_capacity",type:"int",description:"Optional reserved prompt capacity.",required:!1,min:1},{name:"generation_graph_capacity",type:"int",description:"Optional reserved generation capacity.",required:!1,min:1},{name:"weight_type",type:"enum",description:"Shared matmul weight storage; component matmul settings inherit it. Convolution storage remains independently native unless overridden.",required:!1,preset:"weight_type_full"},{name:"matmul_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage.",required:!1,preset:"weight_type_conv",default:"native"},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"flow_weight_context_mb",type:"int",description:"Flow weight context in MiB; inherits gradium_phonon.weight_context_mb when omitted.",required:!1,min:1},{name:"mimi_decoder_weight_context_mb",type:"int",description:"Mimi decoder weight context in MiB; inherits gradium_phonon.weight_context_mb when omitted.",required:!1,min:1},{name:"flow_weights_view_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"flow_step_graph_arena_mb",type:"int",description:"Flow-step host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:256},{name:"mimi_conv_graph_arena_mb",type:"int",description:"Mimi convolution host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:32},{name:"mimi_transformer_graph_arena_mb",type:"int",description:"Mimi transformer host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:96},{name:"mimi_tail_graph_arena_mb",type:"int",description:"Mimi tail host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:512},{name:"mimi_full_chunk_frames",type:"int",description:"Full-sequence decoder chunk frames.",required:!1,min:1,default:90},{name:"mimi_stage2_chunk_frames",type:"int",description:"Second-stage decoder chunk frames.",required:!1,min:1,default:900},{name:"use_full_mimi",type:"bool",description:"Use full-sequence Mimi decoding.",required:!1,default:!0}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"gradium/phonon-31m-en-audiocpp",revision:"main",gated:!1}},packages:[{id:"gradium_phonon_31m_en_q8_0",display_name:"Phonon 31m English Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"phonon-31m-en",files:["phonon-31m-en-q8_0.gguf","default-voice.safetensors"]},{id:"gradium_phonon_31m_en_safetensors",display_name:"Phonon 31m English Safetensors",format:"safetensors",precision:"native",target_directory:"phonon-31m-en-safetensors",files:["config.json","tokenizer.model","model.safetensors","default-voice.safetensors"],download:{kind:"huggingface_snapshot",repo:"gradium/phonon-31m-en",revision:"52433c46975bfa13144c56204c9f4ee1c5b148aa",gated:!1}}],dependencies:[],ui:{recommended_package:"gradium_phonon_31m_en_q8_0",default_voice:"default",builtin_voices:["default"],tags:["TTS","GGUF"],docs:["docs/models/gradium_phonon.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"model:model.safetensors"}}]},i8={family:"granite5asr",display_name:"Granite Speech 5.0 470M TurboCTC",description:"IBM Granite Speech 5.0 TurboCTC 470M parameter Conformer CTC model. The current checkpoint transcribes English, French, German, Spanish, Portuguese, Italian, and Japanese with punctuation and capitalization. An older English-only checkpoint still loads.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["en","fr","de","es","pt","it","ja"],capabilities:{asr:["vad_chunking","partial_results","word_timestamps"]},options:{request:[{name:"language",type:"string",description:"Accepted and ignored. Granite has no language input. A result is labelled en unless decoding emits a trained language token such as <|fr|>.",required:!1,default:"en"},{name:"audio_chunk_mode",type:"enum",description:"Offline chunk mode: auto, fixed, vad, or none. VAD requires a regular model file; otherwise fixed chunks are used.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Positive maximum audio chunk duration for fixed and VAD chunking.",required:!1,min:.001,default:30}],session:[{name:"weight_type",type:"enum",description:"Shared model weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MB. Positive MiB allocation; invalid/nonpositive values resolve to 1024 MiB.",required:!1,min:1,default:1024},{name:"vad_model_path",type:"string",description:"Path to a VAD weight file of any built-in VAD family (e.g. silero_vad_16k.safetensors), not a directory; VAD runs only when this path is a regular file.",required:!1}],load:[]},runtime:{tags:["gguf","server","stream","cuda","metal","cpu"]},ui:{recommended_package:"granite5asr_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/models/granite5asr.md","docs/asr.md","docs/gguf.md"],summary:"IBM Granite Speech 5.0 470M TurboCTC multilingual transcription."},package_defaults:{download:{kind:"huggingface_snapshot",repo:"ibm-granite/granite-speech-5.0-470m-turboctc",revision:"main",gated:!1}},packages:[{id:"granite5asr_q8_0",display_name:"Granite Speech 5.0 470M TurboCTC Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Granite-Speech-5.0-470M-TurboCTC-GGUF",files:["Granite-Speech-5.0-470M-TurboCTC-GGUF/granite-speech-5.0-470m-turboctc-q8_0.gguf"],strip_prefix:"Granite-Speech-5.0-470M-TurboCTC-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"granite5asr_safetensors",display_name:"Granite Speech 5.0 470M TurboCTC Native Safetensors",format:"safetensors",precision:"bfloat16",target_directory:"granite5asr",files:["config.json","tokenizer.json","model.safetensors"]}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{weights:"model:model.safetensors"}}]},n8={schema_version:1,family:"heartmula",display_name:"HeartMuLa",description:"Open-source music foundation model for generating complete songs from text, lyric prompts, and style tags, with controllable song structure and broad multilingual lyric conditioning.",category:"audio_generation",status:"supported",tasks:["music"],modes:["offline"],languages:["multilingual"],capabilities:{music:["lyrics","style_control"]},options:{request:[{name:"lyrics",type:"string",description:"Lyrics text.",required:!1},{name:"tags",type:"string",description:"Comma-separated music tags.",required:!1},{name:"duration_sec",type:"float",description:"Maximum generated audio duration in seconds; must be > 0 when set; default 120.",required:!1,min:0,default:120},{name:"temperature",type:"float",description:"Audio-token sampling temperature; must be > 0 when set; default 1.0.",required:!1,min:0,default:1},{name:"top_k",type:"int",description:"Audio-token top-k sampling limit; default 50. Must not exceed the active audio vocabulary size.",required:!1,min:1,default:50},{name:"guidance_scale",type:"float",description:"MuLa classifier-free guidance scale; must be > 0 when set; default 1.5.",required:!1,min:0,default:1.5},{name:"codec_duration_sec",type:"float",description:"Codec detokenization chunk duration in seconds; must be > 0 when set; default 29.76.",required:!1,min:0,default:29.76},{name:"num_inference_steps",type:"int",description:"Codec flow solver steps; default 10.",required:!1,min:1,default:10},{name:"codec_guidance_scale",type:"float",description:"Codec classifier-free guidance scale; must be > 0 when set; default 1.25.",required:!1,min:0,default:1.25},{name:"infinite_mode",type:"bool",description:"Generate long outputs by splitting lyrics into bounded HeartMuLa requests.",required:!1,default:!1},{name:"text_chunk_size",type:"int",description:"Maximum characters per text chunk in infinite mode; default 4096.",required:!1,min:1,default:4096},{name:"infinite_chunk_audio_duration_ms",type:"int",description:"Maximum generated audio duration per infinite-mode chunk in milliseconds; default 240000.",required:!1,min:1,default:24e4},{name:"seed",type:"int",description:"Generation seed for reproducible output; default 1234.",required:!1,min:0,default:1234}],session:[{name:"weight_type",type:"enum",description:"MuLa and codec weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"generator_weight_type",type:"enum",description:"MuLa music-token generator weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_full",required:!1},{name:"codec_weight_type",type:"enum",description:"Codec weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_full",required:!1},{name:"generator_weight_context_mb",type:"int",description:"MuLa music-token generator weight descriptor context size in MiB; default 32.",required:!1,min:1,default:32},{name:"codec_weight_context_mb",type:"int",description:"Codec weight descriptor context size in MiB; default 32.",required:!1,min:1,default:32},{name:"generator_constant_context_mb",type:"int",description:"MuLa music-token generator reusable constant context size in MiB; default 256.",required:!1,min:1,default:256},{name:"backbone_prefill_graph_arena_mb",type:"int",description:"MuLa music-token generator backbone prefill graph arena size in MiB; default 1536.",required:!1,min:1,default:1536},{name:"backbone_step_graph_arena_mb",type:"int",description:"MuLa music-token generator backbone cached-step graph arena size in MiB; default 1536.",required:!1,min:1,default:1536},{name:"decoder_prefill_graph_arena_mb",type:"int",description:"MuLa music-token generator decoder prefill graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"decoder_step_graph_arena_mb",type:"int",description:"MuLa music-token generator decoder cached-step graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"frame_embedding_graph_arena_mb",type:"int",description:"MuLa music-token generator frame-embedding graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"flow_estimator_graph_arena_mb",type:"int",description:"Codec flow-estimator graph arena size in MiB; default 2048.",required:!1,min:1,default:2048},{name:"conditioning_graph_arena_mb",type:"int",description:"Codec conditioning graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"scalar_decoder_graph_arena_mb",type:"int",description:"Codec scalar-decoder graph arena size in MiB; default 1536.",required:!1,min:1,default:1536},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs after each request; default false.",required:!1,default:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"heartmula_q8_0",tags:["Music","GGUF"],docs:["docs/music_generation.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"heartmula_q8_0",display_name:"HeartMuLa Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"HeartMuLa-GGUF",files:["HeartMuLa-GGUF/heartmula-q8_0.gguf"],strip_prefix:"HeartMuLa-GGUF"},{id:"heartmula_f16",display_name:"HeartMuLa F16 GGUF",format:"gguf",precision:"f16",target_directory:"HeartMuLa-GGUF",files:["HeartMuLa-GGUF/heartmula-f16.gguf"],strip_prefix:"HeartMuLa-GGUF"}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tokenizer_json:"model:tokenizer.json",generation_config:"model:gen_config.json",mula_config:"model:HeartMuLa-oss-3B/config.json",codec_config:"model:HeartCodec-oss/config.json"},tensors:{mula_weights:{source:"weights:",prefix:"mula_weights"},codec_weights:{source:"weights:",prefix:"codec_weights"}}},{format:"safetensors",roots:{model:"."},files:{tokenizer_json:"model:tokenizer.json",generation_config:"model:gen_config.json",mula_config:"model:HeartMuLa-oss-3B/config.json",codec_config:"model:HeartCodec-oss/config.json"},tensors:{mula_weights:"model:HeartMuLa-oss-3B/model.safetensors.index.json",codec_weights:"model:HeartCodec-oss/model.safetensors.index.json"}}]},s8={schema_version:1,family:"higgs_audio_stt",display_name:"Higgs Audio v3 STT",description:"Boson AI English speech-to-text model combining a Whisper Large v3 speech encoder with a Qwen decoder for robust ASR.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["en"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Transcript language code metadata; English is used when omitted.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens; default 1024.",required:!1,min:1,default:1024},{name:"enable_thinking",type:"bool",description:"Enable the model thinking prompt; default true.",required:!1,default:!0},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode; default auto uses fixed chunks.",values:["auto","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Fixed audio chunk duration in seconds; must be > 0 when set; default 4.",required:!1,min:0,default:4}],session:[{name:"weight_type",type:"enum",description:"Shared text decoder weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"audio_encoder_weight_type",type:"enum",description:"Audio encoder convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"text_decoder_weight_type",type:"enum",description:"Text decoder matmul weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_full",required:!1},{name:"audio_encoder_graph_arena_mb",type:"int",description:"Audio encoder graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"text_decoder_prefill_graph_arena_mb",type:"int",description:"Text decoder prefill graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"text_decoder_decode_graph_arena_mb",type:"int",description:"Text decoder cached-step graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"text_decoder_weight_context_mb",type:"int",description:"Text decoder weight context in MiB; omitted uses 4096 on 64-bit builds or 1024 on 32-bit builds.",required:!1,min:1}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"higgs_audio_stt_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/models/higgs_audio_stt.md","docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"higgs_audio_stt_q8_0",display_name:"Higgs Audio v3 STT Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Higgs-Audio-v3-STT-GGUF",files:["Higgs-Audio-v3-STT-GGUF/higgs-audio-v3-stt-q8_0.gguf"],strip_prefix:"Higgs-Audio-v3-STT-GGUF"},{id:"higgs_audio_stt_f16",display_name:"Higgs Audio v3 STT F16 GGUF",format:"gguf",precision:"f16",target_directory:"Higgs-Audio-v3-STT-GGUF",files:["Higgs-Audio-v3-STT-GGUF/higgs-audio-v3-stt-f16.gguf"],strip_prefix:"Higgs-Audio-v3-STT-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",preprocessor_config:"model:preprocessor_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:".",whisper:"../whisper-large-v3"},files:{config:"model:config.json",generation_config:"model:generation_config.json",preprocessor_config:"whisper:preprocessor_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:"model:model.safetensors.index.json"}}]},r8={family:"higgs_audio_tts",display_name:"Higgs Audio v3 TTS",description:"Boson AI conversational TTS model for expressive speech across 100+ languages, zero-shot voice cloning, and inline control over emotion, style, prosody, pauses, and sound effects.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["100+ languages"],options:{request:[{name:"stream_frames_per_event",type:"int",description:"Streaming codec frames per event; grow starts at one and increases to this cap. Each frame is 40 ms of audio.",required:!1,min:1,default:32},{name:"stream_chunk_policy",type:"enum",description:"Streaming chunk schedule. The non-causal codec always retains ten frames of left and right context.",required:!1,values:["grow","fixed"],default:"grow"},{name:"max_tokens",type:"int",description:"Maximum generated AR tokens; zero uses the default. Must not exceed the configured context length.",required:!1,min:0,default:2048},{name:"allow_incomplete_generation",type:"bool",description:"Return generated audio with a warning instead of failing when max_tokens is reached before EOC. Audio may be truncated or contain silence/noise.",required:!1,default:!1},{name:"temperature",type:"float",description:"AR sampling temperature. Must be positive.",required:!1,default:.8},{name:"top_p",type:"float",description:"AR nucleus sampling probability. Must be positive.",required:!1,default:.8},{name:"top_k",type:"int",description:"AR top-k sampling limit.",required:!1,default:30,min:0},{name:"filter_nan_logits",type:"bool",description:"Filter NaN and infinity during greedy and stochastic top-k selection. All-invalid logits still fail.",required:!1,default:!1},{name:"repetition_penalty",type:"float",description:"Accepted for Python API compatibility; audio sampling does not consume this value. Compatibility-only, but must be finite and positive.",required:!1,default:1.1},{name:"seed",type:"int",description:"Torch sampling seed; omitted chooses a random seed.",required:!1,min:0},{name:"reference_text",type:"string",description:"Transcript accompanying reference audio.",required:!1,default:""},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size.",required:!1,default:1024,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,values:["default","tag_aware","japanese","endline"],default:"default"}],session:[{name:"reference_prefill_mode",type:"enum",description:"Cached-reference prefill attention. auto preserves existing behavior. Try exact if repeated voice-cloning requests produce excessive repetition or unexpectedly long, mostly silent output. May increase prefill time; not a general generation-quality fix. Full-prompt prefill and AR decoding are unchanged.",required:!1,values:["auto","exact"],default:"auto"},{name:"weight_type",type:"enum",description:"Weight storage type.",required:!1,preset:"weight_type_full",default:"native"},{name:"ar_weight_type",type:"enum",description:"AR weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"codec_weight_type",type:"enum",description:"Codec weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"ar_weight_context_mb",type:"int",description:"AR weight context in MiB; 4096 on 64-bit builds, 1024 on 32-bit builds.",required:!1,min:1},{name:"codec_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:1536},{name:"ar_decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"codec_decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128},{name:"codec_encode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"reference_cache_slots",type:"int",description:"Encoded reference cache slots; zero disables reuse.",required:!1,min:0,default:1},{name:"attention",type:"enum",description:"Attention lowering preference.",required:!1,values:["auto","flash","eager"],default:"auto"}],load:[]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"higgs_audio_tts_4b_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/higgs_audio_tts.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"higgs_audio_tts_4b_q8_0",display_name:"Higgs Audio v3 TTS 4B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Higgs-Audio-v3-TTS-4B-GGUF",files:["Higgs-Audio-v3-TTS-4B-GGUF/higgs-audio-v3-tts-4b-q8_0.gguf"],strip_prefix:"Higgs-Audio-v3-TTS-4B-GGUF"},{id:"higgs_audio_tts_4b_bf16",display_name:"Higgs Audio v3 TTS 4B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Higgs-Audio-v3-TTS-4B-GGUF",files:["Higgs-Audio-v3-TTS-4B-GGUF/higgs-audio-v3-tts-4b-bf16.gguf"],strip_prefix:"Higgs-Audio-v3-TTS-4B-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",chat_template:"model:chat_template.jinja"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",chat_template:"model:chat_template.jinja"},tensors:{weights:"model:model.safetensors.index.json"}}]},o8={schema_version:1,family:"htdemucs",display_name:"HTDemucs",description:"Hybrid Transformer Demucs music source-separation model that combines waveform and spectrogram processing with Transformer layers to split mixtures into vocals, drums, bass, and accompaniment.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},options:{request:[],session:[{name:"weight_type",type:"enum",description:"HTDemucs weight storage type; default is f32 for host graph planning, f16 on CUDA, otherwise native.",preset:"weight_type_full",required:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"htdemucs_q8_0",tags:["Sep","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"htdemucs_q8_0",display_name:"HTDemucs Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"HTDemucs-GGUF",files:["HTDemucs-GGUF/htdemucs-q8_0.gguf"],strip_prefix:"HTDemucs-GGUF"},{id:"htdemucs_f16",display_name:"HTDemucs F16 GGUF",format:"gguf",precision:"f16",target_directory:"HTDemucs-GGUF",files:["HTDemucs-GGUF/htdemucs-f16.gguf"],strip_prefix:"HTDemucs-GGUF"}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{manifest:"model:manifest.json",submodel_config:"model:955717e8/config.json"},tensors:{submodel_weights:{source:"weights:",prefix:"submodel_weights"}}},{format:"safetensors",roots:{model:".",submodel:"955717e8"},files:{manifest:"model:manifest.json",submodel_config:"submodel:config.json"},tensors:{submodel_weights:"submodel:model.safetensors"}}]},l8={schema_version:1,family:"htdemucs_6stems",display_name:"HTDemucs 6-stem",description:"Hybrid Transformer Demucs 6-stem source-separation model that combines waveform and spectrogram processing with Transformer layers to split mixtures into drums, bass, vocals, other, guitar, and piano.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},options:{request:[],session:[{name:"weight_type",type:"enum",description:"HTDemucs 6-stem weight storage type; default is f32 for host graph planning, f16 on CUDA, otherwise native.",preset:"weight_type_full",required:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"htdemucs_6stems_q8_0",tags:["Sep","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"htdemucs_6stems_q8_0",display_name:"HTDemucs 6-stem Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"HTDemucs-6stems-GGUF",files:["HTDemucs-6stems-GGUF/htdemucs-6stems-q8_0.gguf"],strip_prefix:"HTDemucs-6stems-GGUF"},{id:"htdemucs_6stems_f16",display_name:"HTDemucs 6-stem F16 GGUF",format:"gguf",precision:"f16",target_directory:"HTDemucs-6stems-GGUF",files:["HTDemucs-6stems-GGUF/htdemucs-6stems-f16.gguf"],strip_prefix:"HTDemucs-6stems-GGUF"}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{manifest:"model:manifest.json",submodel_config:"model:5c90dfd2/config.json"},tensors:{submodel_weights:{source:"weights:",prefix:"submodel_weights"}}},{format:"safetensors",roots:{model:".",submodel:"5c90dfd2"},files:{manifest:"model:manifest.json",submodel_config:"submodel:config.json"},tensors:{submodel_weights:"submodel:model.safetensors"}}]},c8={family:"hviske_asr",schema_version:1,display_name:"Hviske ASR",description:"Danish-optimized Conformer encoder-decoder ASR model fine-tuned from the Hviske v5 family, with selectable Cohere ASR language prompts.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["ar","da","de","el","en","es","fr","it","ja","ko","nl","pl","pt","vi","zh"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"ASR language code; default da.",required:!1,default:"da"},{name:"punc",type:"bool",description:"Request punctuation and capitalization together through decoder prompt tokens; default true.",required:!1,default:!0},{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens; defaults to the model config.",required:!1,min:1},{name:"num_beams",type:"int",description:"Beam-search beam count; default 1 uses greedy or sampling decode.",required:!1,min:1,default:1},{name:"length_penalty",type:"float",description:"Beam-search length penalty; must be positive when set; default 1.0.",required:!1,min:1e-6,default:1},{name:"do_sample",type:"bool",description:"Enable sampling instead of greedy decode when num_beams is 1; default false.",required:!1,default:!1},{name:"temperature",type:"float",description:"Decoder sampling temperature; must be positive when set; default 1.0.",required:!1,min:1e-6,default:1},{name:"top_k",type:"int",description:"Top-k sampling limit; default 50, 0 disables top-k.",required:!1,min:0,default:50},{name:"top_p",type:"float",description:"Nucleus sampling limit in (0, 1]; default 1.0.",required:!1,min:1e-6,max:1,default:1},{name:"seed",type:"int",description:"Decoder sampling seed; default 0.",required:!1,min:0,default:0},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode; default auto uses quiet-energy splitting only when audio exceeds the model clip window.",values:["auto","fixed","quiet_energy","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum audio chunk duration in seconds; defaults to the model clip window.",required:!1,min:1e-6}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_conv",required:!1},{name:"weight_context_mb",type:"int",description:"Weight descriptor context size in MiB; default 32.",required:!1,min:1,default:32},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"decoder_prefill_graph_arena_mb",type:"int",description:"Decoder prefill graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"decoder_decode_graph_arena_mb",type:"int",description:"Decoder cached-step graph arena size in MiB; default 512.",required:!1,min:1,default:512}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"hviske_asr_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"]},packages:[{id:"hviske_asr_q8_0",display_name:"Hviske v5.3 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Hviske-v5.3-GGUF",files:["Audio to text (ASR)/hviske-v5.3_Q8.gguf"],strip_prefix:"Audio to text (ASR)",download:{kind:"huggingface_snapshot",repo:"mirek190/audio.cpp"}},{id:"hviske_asr_safetensors",display_name:"Hviske v5.3 Safetensors",format:"safetensors",precision:"native",target_directory:"hviske-v5.3",files:["config.json","generation_config.json","model.safetensors","tokenizer.model"],download:{kind:"huggingface_snapshot",repo:"syvai/hviske-v5.3"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"model:model.safetensors"}}]},d8={schema_version:1,family:"hviske_asr_v6",display_name:"Hviske v6",description:"Danish speech recognition with a rotary Whisper encoder and Qwen3 decoder.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["da"],capabilities:{},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_mode",type:"enum",description:"auto preserves silence splitting above 30 seconds; silence splits above the configured duration at silence boundaries; fixed splits at the configured duration; none disables splitting and accepts at most 30 seconds.",required:!1,default:"auto",values:["auto","silence","fixed","none"]},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum chunk duration when splitting. In auto mode the 30-second trigger remains unchanged.",required:!1,default:28,min:.001,max:30},{name:"max_tokens",type:"int",description:"Maximum generated tokens per chunk, also capped to eight tokens per audio second plus twelve.",required:!1,default:440,min:1},{name:"num_beams",type:"int",description:"Beam-search width. One selects greedy decoding.",required:!1,default:2,min:1},{name:"length_penalty",type:"float",description:"Exponent used to normalize beam scores by generated length.",required:!1,default:1},{name:"cased",type:"bool",description:"Request casing separately from punctuation. Both cased and punc must be provided to override automatic formatting.",required:!1},{name:"punc",type:"bool",description:"Request punctuation only, unlike the combined punctuation/casing control in Canary, Cohere and original Hviske. Both cased and punc must be provided to override automatic formatting.",required:!1}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",description:"Weight storage override; native preserves the supplied checkpoint types.",required:!1,default:"native"}],load:[]},packages:[{id:"hviske_asr_v6_bf16",display_name:"Hviske v6 BF16 GGUF",default:!0,format:"gguf",precision:"bf16",target_directory:"Hviske-v6-GGUF",files:["Hviske-v6-GGUF/hviske-v6-bf16.gguf"],strip_prefix:"Hviske-v6-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf"}},{id:"hviske_asr_v6_q8_0",display_name:"Hviske v6 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Hviske-v6-GGUF",files:["Hviske-v6-GGUF/hviske-v6-q8_0.gguf"],strip_prefix:"Hviske-v6-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf"}}],dependencies:[],ui:{recommended_package:"hviske_asr_v6_bf16",tags:["ASR","GGUF"],docs:["docs/models/hviske_asr_v6.md"]},sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:{source:"model:model.safetensors"}}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},u8={schema_version:1,family:"index_echo",display_name:"Index-Echo-S2TT",description:"Index-Echo speech-to-text translation with bilingual timestamped subtitles.",category:"asr",status:"experimental",tasks:["asr"],modes:["offline"],languages:["zh","en","es","ja"],runtime:{tags:["gguf"]},capabilities:{},dependencies:[],options:{request:[{name:"target_language",type:"enum",values:["en","es","ja"],description:"Translation language for Chinese input audio.",required:!1,default:"en"},{name:"max_tokens",type:"int",description:"Maximum translated text tokens per window.",required:!1,min:1,default:2e3},{name:"temperature",type:"float",description:"Sampling temperature; zero selects greedy decoding.",required:!1,min:0,max:2,default:0},{name:"seed",type:"int",description:"Sampling seed when temperature is positive.",required:!1,min:0,max:2147483647,default:0},{name:"glossary",type:"string",description:"Translation glossary entries.",required:!1},{name:"audio_chunk_mode",type:"enum",values:["auto","quiet_energy","fixed","none"],description:"Long-form audio windowing mode.",required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum audio-window duration.",required:!1,min:1,max:60,default:60}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",description:"Weight storage type for runtime matmul operations.",required:!1,default:"native"}],load:[]},packages:[{id:"index_echo_s2tt_2b_orig",display_name:"Index-Echo-S2TT 2B Original",default:!0,format:"gguf",precision:"orig",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-2b-orig.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}},{id:"index_echo_s2tt_2b_q8_0",display_name:"Index-Echo-S2TT 2B Q8_0",format:"gguf",precision:"q8_0",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-2b-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}},{id:"index_echo_s2tt_2b_q4_k",display_name:"Index-Echo-S2TT 2B Q4_K (experimental)",format:"gguf",precision:"q4_k",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-2b-q4_k.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}},{id:"index_echo_s2tt_9b_orig",display_name:"Index-Echo-S2TT 9B Original",format:"gguf",precision:"orig",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-9b-orig.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}},{id:"index_echo_s2tt_9b_q8_0",display_name:"Index-Echo-S2TT 9B Q8_0",format:"gguf",precision:"q8_0",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-9b-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}}],ui:{recommended_package:"index_echo_s2tt_2b_orig",tags:["ASR","GGUF"],docs:["docs/models/index_echo.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{llm_config:"model:llm/config.json",tokenizer:"model:llm/tokenizer.json",tokenizer_config:"model:llm/tokenizer_config.json",audio_config:"model:audio_config.json"},optional_files:{mapper_config:"model:bridge/mapper_config.json"},tensors:{stlm_weights:{source:"weights:",prefix:"stlm"},audio_weights:{source:"weights:",prefix:"audio"},connector_weights:{source:"weights:",prefix:"connector"}},optional_tensors:{mapper_weights:{source:"weights:",prefix:"mapper"}}}]},f8={family:"index_tts2",display_name:"IndexTTS2",description:"Zero-shot TTS system with voice cloning, emotion-speaker decoupling, text or audio emotion control, and explicit duration control. Variant v2 covers Chinese and English; variant v2.5 (config version 2.5) adds multilingual tiktoken tokenization with Japanese, Spanish and Arabic support.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline"],languages:["zh","en","ja","es","ar"],options:{request:[{name:"text",type:"string",description:"Fallback target text when text_input is absent; prompt is also accepted.",required:!1},{name:"language",type:"string",description:"IndexTTS2.5 text language; empty or auto selects from text.",required:!1},{name:"emotion_alpha",type:"float",description:"Emotion conditioning blend strength.",required:!1,min:0,max:1,default:1},{name:"emotion_vector",type:"string",description:"Eight comma-separated finite emotion strengths.",required:!1},{name:"use_emotion_text",type:"bool",description:"Use text-derived emotion conditioning.",required:!1,default:!1},{name:"emotion_text",type:"string",description:"Emotion description.",required:!1},{name:"use_random_emotion",type:"bool",description:"Use random emotion conditioning.",required:!1,default:!1},{name:"interval_silence_ms",type:"int",description:"Silence between generated segments in milliseconds.",required:!1,min:0,default:200},{name:"do_sample",type:"bool",description:"Enable sampling.",required:!1,default:!0},{name:"top_p",type:"float",description:"Nucleus sampling probability. Must be in (0, 1].",required:!1,default:.8},{name:"top_k",type:"int",description:"Top-k sampling limit.",required:!1,min:1,default:30},{name:"temperature",type:"float",description:"Sampling temperature. Must be positive.",required:!1,default:.8},{name:"length_penalty",type:"float",description:"Beam search length penalty.",required:!1,default:0},{name:"num_beams",type:"int",description:"Beam search width.",required:!1,min:1,default:3},{name:"repetition_penalty",type:"float",description:"Sampling repetition penalty.",required:!1,default:10},{name:"max_tokens",type:"int",description:"Maximum generated mel tokens.",required:!1,min:1,default:1500},{name:"duration_scale",type:"float",description:"Positive waveform duration rescaling, supported by both IndexTTS2 and IndexTTS2.5.",required:!1,default:1},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Optional framework long-form text chunk size; omitted keeps the full input together. Must be positive.",required:!1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,values:["default","tag_aware","japanese","endline"],default:"default"}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; defaults to native.",required:!1,preset:"weight_type_full"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage; native on HIP resolves to F16.",required:!1,preset:"weight_type_conv",default:"native"},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs.",required:!1,default:!1},{name:"speaker_cache_slots",type:"int",description:"Reference or emotion cache slots; zero disables reuse.",required:!1,min:0,default:1},{name:"emotion_cache_slots",type:"int",description:"Reference or emotion cache slots; zero disables reuse.",required:!1,min:0,default:1},{name:"emotion_text_cache_slots",type:"int",description:"Reference or emotion cache slots; zero disables reuse.",required:!1,min:0,default:1},{name:"gpt_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:32},{name:"s2mel_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:32},{name:"reference_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"emotion_text_prefill_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:2048},{name:"emotion_text_decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:32},{name:"emotion_text_max_tokens",type:"int",description:"Emotion description generation token limit; emotion_text_max_new_tokens is also accepted.",required:!1,min:1,default:256}],load:[]},capabilities:{tts:["emotion_control"],clone:["speaker_reference","emotion_control"]},runtime:{tags:["gguf"]},ui:{recommended_package:"index_tts2_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/index_tts2.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"index_tts2_q8_0",display_name:"IndexTTS2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"IndexTTS2-GGUF",files:["IndexTTS2-GGUF/index-tts2-q8_0.gguf"],strip_prefix:"IndexTTS2-GGUF"},{id:"index_tts2_f16",display_name:"IndexTTS2 F16 GGUF",format:"gguf",precision:"f16",target_directory:"IndexTTS2-GGUF",files:["IndexTTS2-GGUF/index-tts2-f16.gguf"],strip_prefix:"IndexTTS2-GGUF"},{id:"index_tts2_orig",display_name:"IndexTTS2 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"IndexTTS2-GGUF",files:["IndexTTS2-GGUF/index-tts2-orig.gguf"],strip_prefix:"IndexTTS2-GGUF"},{id:"index_tts2_safetensors",display_name:"IndexTTS2 Safetensors",format:"safetensors",precision:"native",target_directory:"IndexTTS-2",files:["config.yaml","bpe.model","gpt.safetensors","w2v-bert-2.0/config.json","w2v-bert-2.0/preprocessor_config.json","bigvgan/config.json","qwen0.6bemo4-merge/config.json","qwen0.6bemo4-merge/generation_config.json","qwen0.6bemo4-merge/tokenizer.json","qwen0.6bemo4-merge/tokenizer_config.json","qwen0.6bemo4-merge/vocab.json","qwen0.6bemo4-merge/merges.txt","s2mel.safetensors","feat1.safetensors","feat2.safetensors","wav2vec2bert_stats.safetensors","w2v-bert-2.0/model.safetensors","semantic_codec_model.safetensors","campplus.safetensors","bigvgan/model.safetensors","qwen0.6bemo4-merge/model.safetensors"],download:{kind:"huggingface_snapshot",repo:"mlx-community/index-tts2-mlx"}},{id:"index_tts2_5_q8_0",display_name:"IndexTTS2.5 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"IndexTTS2.5-GGUF",files:["IndexTTS2.5-GGUF/index-tts2_5-q8_0.gguf"],strip_prefix:"IndexTTS2.5-GGUF"},{id:"index_tts2_5_f16",display_name:"IndexTTS2.5 F16 GGUF",format:"gguf",precision:"f16",target_directory:"IndexTTS2.5-GGUF",files:["IndexTTS2.5-GGUF/index-tts2_5-f16.gguf"],strip_prefix:"IndexTTS2.5-GGUF"},{id:"index_tts2_5_orig",display_name:"IndexTTS2.5 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"IndexTTS2.5-GGUF",files:["IndexTTS2.5-GGUF/index-tts2_5-orig.gguf"],strip_prefix:"IndexTTS2.5-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.yaml",wav2vec2bert_config:"model:w2v-bert-2.0/config.json",wav2vec2bert_preprocessor_config:"model:w2v-bert-2.0/preprocessor_config.json",bigvgan_config:"model:bigvgan/config.json",qwen_emotion_config:"model:qwen0.6bemo4-merge/config.json",qwen_emotion_generation_config:"model:qwen0.6bemo4-merge/generation_config.json",qwen_emotion_tokenizer:"model:qwen0.6bemo4-merge/tokenizer.json",qwen_emotion_tokenizer_config:"model:qwen0.6bemo4-merge/tokenizer_config.json",qwen_emotion_vocab:"model:qwen0.6bemo4-merge/vocab.json",qwen_emotion_merges:"model:qwen0.6bemo4-merge/merges.txt"},optional_files:{bpe:"model:bpe.model",tiktoken:"model:multilingual_zh_ja_yue_char_del.tiktoken"},tensors:{gpt:{source:"weights:",prefix:"gpt"},s2mel:{source:"weights:",prefix:"s2mel"},speaker_matrix:{source:"weights:",prefix:"speaker_matrix"},emotion_matrix:{source:"weights:",prefix:"emotion_matrix"},wav2vec2bert_stats:{source:"weights:",prefix:"wav2vec2bert_stats"},wav2vec2bert:{source:"weights:",prefix:"wav2vec2bert"},semantic_codec:{source:"weights:",prefix:"semantic_codec"},campplus:{source:"weights:",prefix:"campplus"},bigvgan:{source:"weights:",prefix:"bigvgan"},qwen_emotion:{source:"weights:",prefix:"qwen_emotion"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.yaml",wav2vec2bert_config:"model:w2v-bert-2.0/config.json",wav2vec2bert_preprocessor_config:"model:w2v-bert-2.0/preprocessor_config.json",bigvgan_config:"model:bigvgan/config.json",qwen_emotion_config:"model:qwen0.6bemo4-merge/config.json",qwen_emotion_generation_config:"model:qwen0.6bemo4-merge/generation_config.json",qwen_emotion_tokenizer:"model:qwen0.6bemo4-merge/tokenizer.json",qwen_emotion_tokenizer_config:"model:qwen0.6bemo4-merge/tokenizer_config.json",qwen_emotion_vocab:"model:qwen0.6bemo4-merge/vocab.json",qwen_emotion_merges:"model:qwen0.6bemo4-merge/merges.txt"},optional_files:{bpe:"model:bpe.model",tiktoken:"model:multilingual_zh_ja_yue_char_del.tiktoken"},tensors:{gpt:"model:gpt.safetensors",s2mel:"model:s2mel.safetensors",speaker_matrix:"model:feat1.safetensors",emotion_matrix:"model:feat2.safetensors",wav2vec2bert_stats:"model:wav2vec2bert_stats.safetensors",wav2vec2bert:"model:w2v-bert-2.0/model.safetensors",semantic_codec:"model:semantic_codec_model.safetensors",campplus:"model:campplus.safetensors",bigvgan:"model:bigvgan/model.safetensors",qwen_emotion:"model:qwen0.6bemo4-merge/model.safetensors"}}]},p8={schema_version:1,family:"inflect_v2",display_name:"Inflect Micro v2",description:"Compact English VITS text-to-speech models with a native GGML inference path and an external eSpeak-ng phonemizer.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"speed",type:"float",description:"Speech speed multiplier mapped directly to Inflect speed; default 1.0.",required:!1,min:.5,max:2,default:1},{name:"variation",type:"float",description:"Latent Gaussian variation; default 0.667.",required:!1,min:0,max:1,default:.667},{name:"seed",type:"int",description:"Non-negative latent noise seed; default 0.",required:!1,min:0,default:0},{name:"text_chunk_mode",type:"enum",description:"Long-form text chunking mode.",values:["word_budget"],required:!1,default:"word_budget"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 280.",required:!1,min:1,default:280}],session:[{name:"espeak_library_path",type:"path",description:"Optional explicit path to the eSpeak-ng shared library.",required:!1},{name:"espeak_data_path",type:"path",description:"Optional explicit path to the directory containing espeak-ng-data.",required:!1},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Component: decoder. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn. GGML keeps the session backend. RKNN requires artifacts.main and ENGINE_ENABLE_RKNN; omit backend. Neither implementation takes params.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"inflect_micro_v2_orig",display_name:"Inflect Micro v2 Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Inflect-Micro-v2-GGUF",files:["Inflect-Micro-v2-GGUF/inflect-micro-v2-orig.gguf"],strip_prefix:"Inflect-Micro-v2-GGUF"}],dependencies:[],ui:{recommended_package:"inflect_micro_v2_orig",tags:["TTS","GGUF"],docs:["docs/tts.md","docs/models/inflect_v2.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},m8={schema_version:1,family:"irodori_tts",display_name:"Irodori-TTS",description:"Japanese TTS with RF and MeanFlow checkpoints, supporting zero-shot voice cloning, automatic duration prediction, multimodal voice design, and emoji-style control.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["ja"],capabilities:{clone:["speaker_reference"],design:["voice_design"]},options:{request:[{name:"stream_frames_per_event",type:"int",description:"Codec latent frames per streaming audio event; default 12 (0.48 seconds at 25 Hz).",required:!1,min:1,default:12},{name:"language",type:"string",description:"Text language code; Irodori-TTS supports Japanese only.",required:!1,default:"ja"},{name:"instruct",type:"string",description:"Natural-language voice or style instruction describing target voice identity, style, or emotion; supported only by caption-conditioned checkpoints. Legacy instruction and caption are accepted as aliases.",required:!1},{name:"no_ref",type:"bool",description:"Use no-reference generation; default true unless a speaker reference is provided.",required:!1,default:!0},{name:"speaker_embedding_file",type:"path",description:"Speaker Inversion embedding (*.speaker.safetensors written by Irodori-TTS training) used as the speaker condition instead of reference audio; use it with the base checkpoint it was trained on. Cannot be combined with reference audio or no_ref=true.",required:!1},{name:"reference_duration_sec",type:"float",description:"Trim reference audio to its first reference_duration_sec seconds before encoding it, as Python Irodori-TTS does; default is the checkpoint's ref_max_seconds (30 when it has none); 0 keeps the whole reference.",required:!1,min:0},{name:"t_schedule_mode",type:"string",description:"RF Euler timestep schedule: linear or sway; default linear.",required:!1,default:"linear"},{name:"sway_coeff",type:"float",description:"Sway Sampling coefficient; must be finite and produce strictly decreasing timesteps. Default -1.0.",required:!1,default:-1},{name:"num_inference_steps",type:"int",description:"Sampling steps; omitted uses 40 for RF checkpoints or 4 for MeanFlow checkpoints.",required:!1,min:1},{name:"duration_sec",type:"float",description:"Target duration in seconds; omitted or nonpositive values select predicted duration.",required:!1},{name:"duration_scale",type:"float",description:"Predicted-duration multiplier; must be > 0 when set; default 1.0.",required:!1,min:0,default:1},{name:"text_chunk_mode",type:"enum",description:"Text chunk policy; word_budget also accepts the legacy spelling default.",values:["word_budget","tag_aware","japanese","endline"],required:!1,default:"endline"},{name:"text_chunk_size",type:"int",description:"Maximum characters per text chunk; default 100, or the model text-token window if smaller.",required:!1,min:1},{name:"min_duration_sec",type:"float",description:"Minimum generated duration in seconds; must be > 0 and no greater than max_duration_sec; default 0.5.",required:!1,min:0,default:.5},{name:"max_duration_sec",type:"float",description:"Maximum generated duration in seconds; must be at least min_duration_sec; default 30. Must be > 0.",required:!1,min:0,default:30},{name:"text_guidance_scale",type:"float",description:"Text classifier-free guidance scale; default 3.0. Nonpositive values disable the corresponding CFG branch.",required:!1,default:3},{name:"speaker_guidance_scale",type:"float",description:"Speaker classifier-free guidance scale; default 5.0. Nonpositive values disable the corresponding CFG branch.",required:!1,default:5},{name:"caption_guidance_scale",type:"float",description:"Caption classifier-free guidance scale; default 3.0. Nonpositive values disable the corresponding CFG branch.",required:!1,default:3},{name:"guidance_scale",type:"float",description:"Override all classifier-free guidance scales when set. Nonpositive values disable the corresponding CFG branch.",required:!1},{name:"guidance_mode",type:"enum",description:"Classifier-free guidance combination mode; default independent.",values:["independent","joint","alternating"],required:!1,default:"independent"},{name:"guidance_min_t",type:"float",description:"Minimum diffusion timestep value where guidance is active; default 0.5. The parser does not enforce a nonnegative bound.",required:!1,default:.5},{name:"guidance_max_t",type:"float",description:"Maximum diffusion timestep value where guidance is active; default 1.0. The parser does not enforce a nonnegative bound.",required:!1,default:1},{name:"seed",type:"int",description:"Unsigned 32-bit generation seed in [0, 4294967295]; omitted uses a random seed.",required:!1,min:0,max:4294967295},{name:"trim_tail",type:"bool",description:"Trim trailing silence-like samples; default true.",required:!1,default:!0}],session:[{name:"weight_type",type:"enum",description:"Model weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"codec_weight_type",type:"enum",description:"DACVAE codec weight storage type; default native.",preset:"weight_type_codec_q8",required:!1,default:"native"},{name:"codec_backend",type:"enum",description:"DACVAE codec execution backend. Use cpu as an opt-in workaround for backend-specific codec decoder issues; default same.",values:["same","cpu"],required:!1,default:"same"},{name:"condition_graph_arena_mb",type:"int",description:"Condition encoder graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"rf_graph_arena_mb",type:"int",description:"RF sampler graph arena size in MiB; default 768.",required:!1,min:1,default:768},{name:"codec_graph_arena_mb",type:"int",description:"DACVAE codec graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"codec_decode_chunk_steps",type:"int",description:"Decode the latent in windows of this many frames (25 per second) so the codec's activation memory stops growing with the output length; 0 decodes the whole sequence at once (default).",required:!1,min:0,default:0},{name:"codec_decode_overlap_steps",type:"int",description:"Latent frames of context decoded on each side of a window and then discarded; default 16.",required:!1,min:0,default:16},{name:"codec_encode_chunk_steps",type:"int",description:"Encode reference audio in windows of this many latent frames (25 per second) so the codec's activation memory stops growing with the reference length; 0 encodes the whole reference at once (default).",required:!1,min:0,default:0},{name:"codec_encode_overlap_steps",type:"int",description:"Latent frames of reference audio encoded as context on each side of a window and then discarded; default 16.",required:!1,min:0,default:16},{name:"condition_weight_context_mb",type:"int",description:"Condition encoder weight context size in MiB; default 32.",required:!1,min:1,default:32},{name:"rf_weight_context_mb",type:"int",description:"RF sampler weight context size in MiB; default 32.",required:!1,min:1,default:32},{name:"codec_weight_context_mb",type:"int",description:"DACVAE codec weight context size in MiB; default 32.",required:!1,min:1,default:32},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs after request phases; default true.",required:!1,default:!0},{name:"reference_cache_slots",type:"int",description:"Prepared reference-speaker cache slots; default 1.",required:!1,min:0,default:1}],load:[]},dependencies:[],runtime:{tags:["gguf"]},ui:{recommended_package:"irodori_tts_v4_small_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"irodori_tts_v4_small_q8_0",display_name:"Irodori-TTS v4.1 Small Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4-small-q8_0.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_v4_1_anime_q8_0",display_name:"Irodori-TTS v4.1 Anime Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4.1-anime-q8_0.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_v4_small_f16",display_name:"Irodori-TTS v4.1 Small F16 GGUF",format:"gguf",precision:"f16",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4-small-f16.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_600m_v3_voicedesign_q8_0",display_name:"Irodori-TTS 600M v3 VoiceDesign Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-600M-v3-VoiceDesign-GGUF",files:["Irodori-TTS-600M-v3-VoiceDesign-GGUF/irodori-tts-600m-v3-voicedesign-q8_0.gguf"],strip_prefix:"Irodori-TTS-600M-v3-VoiceDesign-GGUF"},{id:"irodori_tts_600m_v3_voicedesign_f16",display_name:"Irodori-TTS 600M v3 VoiceDesign F16 GGUF",format:"gguf",precision:"f16",target_directory:"Irodori-TTS-600M-v3-VoiceDesign-GGUF",files:["Irodori-TTS-600M-v3-VoiceDesign-GGUF/irodori-tts-600m-v3-voicedesign-f16.gguf"],strip_prefix:"Irodori-TTS-600M-v3-VoiceDesign-GGUF"},{id:"irodori_tts_500m_v3_q8_0",display_name:"Irodori-TTS 500M v3 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-500M-v3-GGUF",files:["Irodori-TTS-500M-v3-GGUF/irodori-tts-500m-v3-q8_0.gguf"],strip_prefix:"Irodori-TTS-500M-v3-GGUF"},{id:"irodori_tts_v4_1_small_mf_q8_0",display_name:"Irodori-TTS v4.1 Small MeanFlow Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4.1-small-mf-q8_0.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_v4_1_small_mf_f16",display_name:"Irodori-TTS v4.1 Small MeanFlow F16 GGUF",format:"gguf",precision:"f16",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4.1-small-mf-f16.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_500m_v3_f16",display_name:"Irodori-TTS 500M v3 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Irodori-TTS-500M-v3-GGUF",files:["Irodori-TTS-500M-v3-GGUF/irodori-tts-500m-v3-f16.gguf"],strip_prefix:"Irodori-TTS-500M-v3-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{model_config:"model:model_config.json"},optional_files:{tokenizer_json:"model:tokenizer.json",tokenizer_v4_json:"model:tokenizer/tokenizer.json",pretrained_text_config:"model:text_encoder_config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},codec_weights:{source:"weights:",prefix:"codec_weights"}}},{format:"safetensors",roots:{model:".",tokenizer:"../llm-jp-3-150m",codec:"../Semantic-DACVAE-Japanese-32dim"},files:{model_config:"model:model_config.json"},optional_files:{tokenizer_json:"tokenizer:tokenizer.json",tokenizer_v4_json:"model:tokenizer/tokenizer.json",pretrained_text_config:"model:text_encoder_config.json"},tensors:{model_weights:"model:model.safetensors",codec_weights:"codec:weights.safetensors"}}]},g8={schema_version:1,family:"kitten_tts",display_name:"KittenTTS Mini 0.8",description:"Native KittenTTS Mini 0.8 English text-to-speech with eight built-in voices and shared eSpeak-ng phonemization.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["built_in_voices","long_form"]},options:{request:[{name:"voice_id",type:"enum",values:["Bella","Bruno","Hugo","Jasper","Kiki","Leo","Luna","Rosie","expr-voice-2-f","expr-voice-2-m","expr-voice-3-f","expr-voice-3-m","expr-voice-4-f","expr-voice-4-m","expr-voice-5-f","expr-voice-5-m"],description:"Built-in voice ID or package alias; structured voice input (CLI --voice-id) takes precedence.",required:!1,default:"expr-voice-5-m"},{name:"speed",type:"float",description:"Speech speed multiplier; larger values produce faster speech. Must be finite and positive.",required:!1,default:1},{name:"seed",type:"int",description:"Decoder noise seed for the current request; omitted requests choose a fresh random seed.",required:!1,min:0},{name:"text_chunk_mode",type:"enum",description:"Long-form text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form chunk.",required:!1,min:1,default:400}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",description:"Storage type for matrix multiplication weights.",required:!1,default:"native"},{name:"conv_weight_type",type:"enum",preset:"weight_type_conv",description:"Storage type for convolution weights.",required:!1,default:"native"},{name:"graph_capacity_mode",type:"enum",description:"Offline graph capacity policy.",values:["fixed","tiered","grow","double"],required:!1,default:"fixed"},{name:"max_input_tokens",type:"int",description:"Maximum predictor input token capacity; defaults to min(512, checkpoint context_length).",required:!1,min:1,max:512,default:512},{name:"pre_tail_tokens",type:"int",description:"Optional prebuilt predictor tail token capacity.",required:!1,min:0,max:512,default:0},{name:"espeak_library_path",type:"path",description:"Optional explicit path to the eSpeak-ng shared library.",required:!1},{name:"espeak_data_path",type:"path",description:"Optional explicit path to espeak-ng-data.",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"kitten_tts_mini_0_8_orig",display_name:"KittenTTS Mini 0.8 Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"KittenTTS-GGUF",files:["KittenTTS-GGUF/kitten-tts-mini-0.8-orig.gguf"],strip_prefix:"KittenTTS-GGUF"}],dependencies:[],ui:{recommended_package:"kitten_tts_mini_0_8_orig",tags:["TTS","GGUF"],builtin_voices:["Bella","Jasper","Luna","Bruno","Rosie","Hugo","Kiki","Leo"],default_voice:"Leo",docs:["docs/models/kitten_tts.md","docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"kitten"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:ggml/kitten_tts.safetensors"}}]},h8={schema_version:1,family:"kitten_tts2",display_name:"Kitten TTS 2",description:"Native multilingual Kitten TTS 2 Qwen3 speech generation, S3 meanflow decoder, and reference-audio voice cloning.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en","ar","zh","fr","de","hi","it","pt","ru","es","nl","id","ja","ko","pl","tr"],runtime:{tags:["gguf","cpu"]},capabilities:{tts:["built_in_voices","long_form"],clone:["speaker_reference"]},options:{request:[{name:"voice_id",type:"enum",values:["Bella","Jasper","Luna","Bruno","Rosie","Hugo","Kiki","Leo","Matthew","Elliot","Willow","Dolores","Victor","Dante","Alfred","Saoirse","Claire","Raven","Marcus","Herbert","Diana","Laurence","Maeve","Walter","Edith","Miles","Grace","Reginald","Iris","Frank","Serena","Julian","Eleanor","Otis","Vincent","Martha","Sable","Victoria","PreparedBruno","Arabic","Chinese","French","German","Hindi","Italian","Portuguese","Russian","Spanish","AirportAnnouncer","ArabicChildSchool","ArabicFalconer","ArabicMother","ArabicNews","AudiobookNarratorFemale","BoredTeenager","CalmHostageNegotiator","ChineseKidSpringFestival","ChineseLivestreamSeller","ChineseNewsCctv","ChineseXianxiaMaster","DutchBaker","DutchGrandpaStory","DutchWeatherPresenter","FairytaleNarratorWhimsical","FrenchDocumentary","FrenchGrandmereRecette","FrenchTeacher","FrenchWaiter","GermanKidBirthday","GermanKneipe","GermanProfessor","GermanTrainAnnouncement","GrandmaBedtimeStory","GriefEulogy","HindiBollywoodDrama","HindiCollegeFriends","HindiDadiKahani","HindiYogaTeacher","IndonesianNewsAnchor","IndonesianTourGuide","ItalianChildSchool","ItalianFashionDesigner","ItalianFootballFan","ItalianGondolier","ItalianNonnaKitchen","ItalianOperaTenor","JapaneseAnimeHeroine","JapaneseGrandma","JapaneseSalarymanApology","JapaneseTrainConductor","KoreanGrandpaAdvice","KoreanKdramaConfession","KoreanNewsAnchor","LittleGirlExplaining","NervousFirstDate","NewsAnchorFemale","PilotCabinAnnouncement","PolishBabciaPierogi","PolishMountainGuide","PolishNewsAnchor","PolishPoetryStudent","PortugueseBeach","PortugueseBusiness","PortugueseFado","PortugueseGrandpaFarm","PortugueseKidFutebol","PortugueseNewsAnchor","RussianBabushka","RussianFairyTale","RussianHockeyCheer","RussianLiteratureTeacher","RussianSpaceControl","RussianTaxiDriver","SarcasticCoworker","SchoolboyPresentation","SpanishAbuela","SpanishBreakupSad","SpanishChildCuento","SpanishNews","SpanishTango","TurkishFisherman","TurkishGrandmaCooking","TurkishNewsAnchor","WeatherPresenterCheerful"],required:!1,default:"Bruno",description:"Prepared voice name available in the loaded package. A supplied reference clip takes precedence."},{name:"preset",type:"enum",values:["stable","expressive"],required:!1,default:"stable",description:"Upstream sampling preset."},{name:"temperature",type:"float",min:0,required:!1,description:"Sampling temperature; zero selects greedy decoding. Otherwise defaults to the preset."},{name:"top_k",type:"int",min:0,required:!1,description:"Top-k sampling cutoff; defaults to the preset."},{name:"top_p",type:"float",max:1,required:!1,description:"Nucleus sampling cutoff; defaults to the preset. Must be in (0, 1]."},{name:"min_p",type:"float",min:0,max:1,required:!1,description:"Minimum relative probability; defaults to the preset."},{name:"repetition_penalty",type:"float",min:1,required:!1,default:1.1,description:"Penalty over the last 50 generated tokens; silence and ending tokens are exempt."},{name:"max_tokens",type:"int",min:1,max:8192,required:!1,description:"Speech-token budget per text chunk. Omitted budgets scale with text length, with a minimum of 200."},{name:"seed",type:"int",min:0,required:!1,description:"Seed for sampling and waveform decoding."},{name:"text_chunk_size",type:"int",min:32,max:1e3,required:!1,default:380,description:"Maximum Unicode codepoints per framework text chunk."},{name:"text_chunk_mode",type:"enum",values:["default","tag_aware","japanese","endline"],required:!1,default:"tag_aware",description:"Framework long-form text chunking mode."},{name:"reference_text",type:"string",required:!1,description:"Transcript of the reference audio; required when cloning from a 1–30 second clip."}],load:[],session:[{name:"exec_plan",type:"string",required:!1,default:"{}",description:"Component execution plan JSON. vocoder accepts impl=ggml (default) or neon with backend=cpu. NEON requires ENGINE_ENABLE_NEON=ON and an AArch64 NEON CPU, and replaces only the HiFT neural convolution stack."},{name:"weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q8_0"],required:!1,default:"native",description:"Qwen projection storage. native preserves the GGUF's intended tensor types. An explicit override changes projection storage only."}]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"dignome/kitten_tts2",revision:"main",gated:!1}},packages:[{id:"kitten_tts2_bf16",display_name:"Kitten TTS 2 BF16 GGUF (Previous Checkpoint)",default:!1,format:"gguf",precision:"bf16",target_directory:"kitten-tts2-v2",files:["kitten-tts2-bf16-multilingual.gguf","LICENSE","NOTICE","native/LICENSE","speaker/LICENSE","SHA256SUMS"]},{id:"kitten_tts2_q8_v2",display_name:"Kitten TTS 2 Q8 GGUF (Previous Checkpoint)",default:!1,format:"gguf",precision:"q8_0",target_directory:"kitten-tts2-v2",files:["kitten-tts2-q8-v2-multilingual.gguf","LICENSE","NOTICE","native/LICENSE","speaker/LICENSE","SHA256SUMS"]},{id:"kitten_tts2_q4",display_name:"Kitten TTS 2 Hybrid Q4 GGUF (Previous Checkpoint, Experimental)",default:!1,format:"gguf",precision:"q4_0",target_directory:"kitten-tts2-v2",files:["kitten-tts2-q4-multilingual.gguf","LICENSE","NOTICE","native/LICENSE","speaker/LICENSE","SHA256SUMS"]},{id:"kitten_tts2_20261021_q8_0",display_name:"Kitten TTS 2 2026-10-21 Q8 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"KittenTTS2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1},files:["KittenTTS2-GGUF/kitten-tts2-20261021-q8_0.gguf"],strip_prefix:"KittenTTS2-GGUF"},{id:"kitten_tts2_20261021_q4_0",display_name:"Kitten TTS 2 2026-10-21 Q4 GGUF (BF16 Embedding)",default:!1,format:"gguf",precision:"q4_0",target_directory:"KittenTTS2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1},files:["KittenTTS2-GGUF/kitten-tts2-20261021-q4_0.gguf"],strip_prefix:"KittenTTS2-GGUF"}],dependencies:[],ui:{recommended_package:"kitten_tts2_20261021_q8_0",min_vram_gb:7,tags:["TTS","GGUF"],builtin_voices:["Bella","Jasper","Luna","Bruno","Rosie","Hugo","Kiki","Leo","Matthew","Elliot","Willow","Dolores","Victor","Dante","Alfred","Saoirse","Claire","Raven","Marcus","Herbert","Diana","Laurence","Maeve","Walter","Edith","Miles","Grace","Reginald","Iris","Frank","Serena","Julian","Eleanor","Otis","Vincent","Martha","Sable","Victoria","Arabic","Chinese","French","German","Hindi","Italian","Portuguese","Russian","Spanish"],default_voice:"Bruno",docs:["docs/models/kitten_tts2.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",lm_config:"model:lm/config.json",tokenizer_config:"model:lm/tokenizer_config.json",tokenizer_json:"model:lm/tokenizer.json",default_voices:"model:cpp/default/voices.json"},tensors:{language_model:{source:"weights:",prefix:"language_model"},s3gen:{source:"weights:",prefix:"s3gen"},speaker:{source:"weights:",prefix:"speaker"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",lm_config:"model:lm/config.json",tokenizer_config:"model:lm/tokenizer_config.json",tokenizer_json:"model:lm/tokenizer.json",default_voices:"model:cpp/default/voices.json"},tensors:{language_model:"model:lm/model.safetensors",s3gen:"model:native/s3gen_meanflow.safetensors",speaker:"model:speaker/model.safetensors"}}]},_8={schema_version:1,family:"kokoro_tts",display_name:"Kokoro 82M",description:"Kokoro 82M multilingual text-to-speech with 54 preset voices, optimized native CPU inference, and shared eSpeak-ng phonemization.",category:"tts",status:"community",tasks:["tts"],modes:["offline","streaming"],languages:["en-us","en-gb","es","fr-fr","hi","it","ja","pt-br","zh"],runtime:{tags:["gguf","stream"]},capabilities:{tts:["built_in_voices","long_form"]},options:{request:[{name:"voice_id",type:"enum",values:["af_alloy","af_aoede","af_bella","af_heart","af_jessica","af_kore","af_nicole","af_nova","af_river","af_sarah","af_sky","am_adam","am_echo","am_eric","am_fenrir","am_liam","am_michael","am_onyx","am_puck","am_santa","bf_alice","bf_emma","bf_isabella","bf_lily","bm_daniel","bm_fable","bm_george","bm_lewis","ef_dora","em_alex","em_santa","ff_siwis","hf_alpha","hf_beta","hm_omega","hm_psi","if_sara","im_nicola","jf_alpha","jf_gongitsune","jf_nezumi","jf_tebukuro","jm_kumo","pf_dora","pm_alex","pm_santa","zf_xiaobei","zf_xiaoni","zf_xiaoxiao","zf_xiaoyi","zm_yunjian","zm_yunxi","zm_yunxia","zm_yunyang"],description:"Built-in voice ID; structured voice input (CLI --voice-id) takes precedence.",required:!1,default:"af_heart"},{name:"language",type:"string",description:"Language selection precedence: voice-style language, transcript language (CLI --language), request-option language, then voice prefix. Must match the first voice in a blend.",required:!1},{name:"seed",type:"int",description:"Decoder noise seed for the current request; omitted requests choose a fresh random seed.",required:!1,min:0},{name:"speed",type:"float",description:"Speech speed multiplier; default 1.0. Must be finite and positive.",required:!1,default:1},{name:"phonemes",type:"string_list",description:"Kokoro-vocabulary phonemes to synthesize directly, bypassing the built-in eSpeak-ng G2P. One entry per chunk: entries are rendered in order and merged into one result, so the caller chooses the split points that only its own G2P knows. Each entry must be at most 510 symbols and must not be empty -- an entry is a chunk to speak, so drop it rather than leaving it blank. Text is still required and its language must still match the voice.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum codepoints per text chunk before synthesis. Default 100 for Chinese and Japanese voices, otherwise 240.",required:!1,min:1},{name:"return_timestamps",type:"bool",description:"Report where each phoneme group lands in the output, from the durations the model predicts before vocoding. Entries are phoneme groups in Kokoro's own alphabet, not written words, and do not map one-to-one onto the input text: see docs/models/kokoro_tts.md. Default false.",required:!1,default:!1}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"native",description:"Storage type for matrix multiplication weights."},{name:"conv_weight_type",type:"enum",preset:"weight_type_conv",required:!1,default:"native",description:"Storage type for convolution weights."},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 512.",required:!1,min:1,default:512},{name:"predictor_duration_graph_arena_mb",type:"int",description:"Predictor duration host graph-metadata arena size in MiB, not device workspace; default 384.",required:!1,min:1,default:384},{name:"predictor_text_graph_arena_mb",type:"int",description:"Predictor text host graph-metadata arena size in MiB, not device workspace; default 256.",required:!1,min:1,default:256},{name:"predictor_tail_graph_arena_mb",type:"int",description:"Predictor tail host graph-metadata arena size in MiB, not device workspace; default 640.",required:!1,min:1,default:640},{name:"graph_capacity_mode",type:"enum",description:"Offline graph capacity policy; default fixed.",values:["fixed","tiered","grow","double"],required:!1,default:"fixed"},{name:"max_input_tokens",type:"int",description:"Predictor graph input token capacity; default min(512, model context length).",required:!1,min:1},{name:"pre_tail_tokens",type:"int",description:"Optional prebuilt predictor tail token capacity; default 0.",required:!1,min:0,default:0},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Component: generator. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn/neon. GGML keeps the session backend. The complete NEON generator requires a CPU session and ENGINE_ENABLE_NEON=ON on AArch64, without artifacts or params. RKNN requires artifacts.main and ENGINE_ENABLE_RKNN; omit backend. RKNN params: overlap (nonnegative integer, default 0, smaller than the emitted window), gain (boolean, default false; keeps a GGML generator reference).",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"kokoro_82m_q8_0",display_name:"Kokoro 82M Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Kokoro-82M-GGUF",files:["Kokoro-82M-GGUF/kokoro-82m-q8_0.gguf"],strip_prefix:"Kokoro-82M-GGUF"},{id:"kokoro_82m_bf16",display_name:"Kokoro 82M BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Kokoro-82M-GGUF",files:["Kokoro-82M-GGUF/kokoro-82m-bf16.gguf"],strip_prefix:"Kokoro-82M-GGUF"},{id:"kokoro_82m_generator_rk3588",display_name:"Kokoro 82M NPU Generator RKNN (RK3588)",format:"rknn",precision:"f16",target_directory:"Kokoro-82M-GGUF",files:["rk3588/generator_w512.rknn"],strip_prefix:"rk3588",description:"Pre-compiled RK3588 engine for the kokoro_tts RKNN generator sidecar (kokoro_tts.exec_plan, artifacts.main); installs beside the GGUF weights and is named by bare file name. Built by tools/rknn from the Kokoro-82M iSTFTNet generator export; see docs/build/rockchip-npu.md.",download:{kind:"huggingface_snapshot",repo:"wOvANAI/rknn-tts-engines",revision:"main",gated:!1}}],dependencies:[],ui:{recommended_package:"kokoro_82m_q8_0",tags:["TTS","GGUF"],builtin_voices:["af_alloy","af_aoede","af_bella","af_heart","af_jessica","af_kore","af_nicole","af_nova","af_river","af_sarah","af_sky","am_adam","am_echo","am_eric","am_fenrir","am_liam","am_michael","am_onyx","am_puck","am_santa","bf_alice","bf_emma","bf_isabella","bf_lily","bm_daniel","bm_fable","bm_george","bm_lewis","ef_dora","em_alex","em_santa","ff_siwis","hf_alpha","hf_beta","hm_omega","hm_psi","if_sara","im_nicola","jf_alpha","jf_gongitsune","jf_nezumi","jf_tebukuro","jm_kumo","pf_dora","pm_alex","pm_santa","zf_xiaobei","zf_xiaoni","zf_xiaoxiao","zf_xiaoyi","zm_yunjian","zm_yunxi","zm_yunxia","zm_yunyang"],default_voice:"af_heart",docs:["tests/kokoro_tts/MULTILINGUAL_GGUF.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",voices:"model:voices.json",vocabulary:"model:vocab.tsv"},tensors:{weights:{source:"weights:",prefix:"kokoro"}}}]},v8={schema_version:1,family:"kroko_asr",display_name:"Kroko Community ASR",description:"Native Zipformer2 RNN-T transcription for the public free Kroko Community single-language packages, with offline and stateful streaming inference, greedy and modified beam decoding, hotwords, endpoint segments, partial results, and word timestamps.",category:"asr",status:"community",tasks:["asr"],modes:["offline","streaming"],languages:["de","en","es","fr","it","he","nl","pt","sv","tr"],capabilities:{asr:["word_timestamps","partial_results","segments"]},options:{request:[{name:"language",type:"string",description:"Language code matching the selected single-language Kroko package; default auto uses the package language.",required:!1,default:"auto"},{name:"decoding_method",type:"enum",description:"RNN-T decoding method; greedy search remains the parity-tested default.",values:["greedy_search","modified_beam_search"],required:!1,default:"greedy_search"},{name:"num_beams",type:"int",description:"Maximum active hypotheses retained by modified beam search.",required:!1,min:1,max:64,default:4},{name:"blank_penalty",type:"float",description:"Non-negative score subtracted from the RNN-T blank logit.",required:!1,min:0,default:0},{name:"hotwords",type:"string",description:"Slash- or newline-separated natural-text phrases; requires modified beam search.",required:!1},{name:"hotwords_score",type:"float",description:"Non-negative per-token context boost for hotword phrases.",required:!1,min:0,default:1.5},{name:"enable_endpoint",type:"bool",description:"Enable automatic endpoint speech segments.",required:!1,default:!1},{name:"rule1_min_trailing_silence_sec",type:"float",description:"Endpoint timeout in seconds even when no speech token was decoded.",required:!1,min:0,default:2.4},{name:"rule2_min_trailing_silence_sec",type:"float",description:"Endpoint silence in seconds after a speech token was decoded.",required:!1,min:0,default:1.2},{name:"rule3_min_utterance_length_sec",type:"float",description:"Maximum utterance duration in seconds before an endpoint.",required:!1,min:0,default:20}],session:[],load:[]},runtime:{tags:["gguf","stream"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokens:"model:tokens.txt"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokens:"model:tokens.txt"},tensors:{weights:"model:model.safetensors"}}],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"kroko_asr_community_q8_0",display_name:"Kroko Community ASR Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Kroko-ASR-GGUF",files:["Kroko-ASR-GGUF/kroko-en-community-64-l-q8_0.gguf"],strip_prefix:"Kroko-ASR-GGUF"}],dependencies:[],ui:{recommended_package:"kroko_asr_community_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/models/kroko_asr.md","docs/gguf.md"]}},b8={schema_version:1,family:"kugelaudio",display_name:"KugelAudio-0-Open",description:"KugelAudio text-to-speech with bundled preset voices and incremental audio output.",category:"tts",status:"experimental",tasks:["tts"],modes:["offline","streaming"],languages:["en","de","fr","es","it","pt","nl","pl","ru","uk","cs","ro","hu","sv","da","fi","no","el","bg","sk","hr","sr","tr"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"voice_id",type:"enum",values:["default","clear","english_female","english_male"],description:"Bundled preset voice.",default:"default",required:!1},{name:"num_inference_steps",type:"int",description:"Diffusion steps per acoustic frame, from 1 to 1000; omitted uses the checkpoint's diffusion_head_config.ddpm_num_inference_steps.",min:1,max:1e3,default:20,required:!1},{name:"guidance_scale",type:"float",description:"Diffusion classifier-free guidance; 1 disables the unconditional pass. Any finite value is accepted; negative values enter CFG arithmetic.",default:3,required:!1},{name:"max_tokens",type:"int",description:"Maximum autoregressive tokens per text chunk.",min:1,default:2048,required:!1},{name:"do_sample",type:"bool",description:"Sample autoregressive speech control tokens instead of greedy decoding.",default:!1,required:!1},{name:"temperature",type:"float",description:"Autoregressive sampling temperature when do_sample is enabled. Any finite value is accepted; negative values disable sampling.",default:1,required:!1},{name:"seed",type:"int",description:"Random seed; -1 chooses a random seed.",min:-1,default:1234,required:!1},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk.",min:1,default:300,required:!1},{name:"text_chunk_mode",type:"enum",values:["default","tag_aware","japanese","endline"],description:"Framework long-form text splitting mode.",default:"default",required:!1}],session:[{name:"weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],description:"Weight storage type; native preserves packaged tensor types.",default:"native",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"kugelaudio_0_open_bf16",display_name:"KugelAudio-0-Open BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"KugelAudio-0-Open-GGUF",files:["KugelAudio-0-Open-GGUF/kugelaudio-0-open-bf16.gguf"],strip_prefix:"KugelAudio-0-Open-GGUF"},{id:"kugelaudio_0_open_q8_0",display_name:"KugelAudio-0-Open Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"KugelAudio-0-Open-GGUF",files:["KugelAudio-0-Open-GGUF/kugelaudio-0-open-q8_0.gguf"],strip_prefix:"KugelAudio-0-Open-GGUF"},{id:"kugelaudio_0_open_q4_k",display_name:"KugelAudio-0-Open Q4_K GGUF",default:!1,format:"gguf",precision:"q4_k",target_directory:"KugelAudio-0-Open-GGUF",files:["KugelAudio-0-Open-GGUF/kugelaudio-0-open-q4_k.gguf"],strip_prefix:"KugelAudio-0-Open-GGUF"}],dependencies:[],ui:{recommended_package:"kugelaudio_0_open_q8_0",default_voice:"default",builtin_voices:["default","clear","english_female","english_male"],tags:["TTS","Stream","GGUF"],docs:["docs/models/kugelaudio.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:text_tokenizer/tokenizer.json",tokenizer_config:"model:text_tokenizer/tokenizer_config.json"},tensors:{model_weights:"weights:"}}]},y8={schema_version:1,family:"latentsync",display_name:"LatentSync 1.6",description:"Audio-conditioned lip synchronization of a reference video.",category:"audio_generation",status:"experimental",tasks:["sfx"],modes:["offline"],languages:["auto"],capabilities:{},runtime:{tags:["gguf"]},options:{request:[{name:"reference_video_file",type:"path",required:!0,description:"Reference video containing the face to synchronize. Requires FFmpeg on PATH."},{name:"num_inference_steps",required:!1,type:"int",min:1,max:999,default:20,description:"Number of DDIM denoising steps."},{name:"cache_interval",required:!1,type:"int",min:1,default:1,description:"DeepCache refresh interval. One disables caching; three matches the upstream DeepCache preset. Higher values trade output fidelity for speed."},{name:"guidance_scale",required:!1,type:"float",min:0,default:1.5,description:"Audio classifier-free guidance scale; values at or below one disable CFG."},{name:"frames_per_chunk",required:!1,type:"int",min:1,max:24,default:16,description:"Frames processed together by the temporal denoiser."},{name:"fps",required:!1,type:"float",min:1,default:25,description:"Video sampling and output frame rate."},{name:"seed",required:!1,type:"int",min:0,default:1247,description:"Random seed for latent noise and VAE posterior sampling."}],session:[{name:"weight_type",required:!1,type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],default:"native",description:"Weight storage type; native preserves packaged tensor types."},{name:"vae_cudnn_f16",required:!1,type:"bool",default:!1,description:"Use cuDNN FP16 VAE execution on CUDA. Requires a build with GGML_CUDA_CUDNN_CONV2D=ON; VAE weights are converted to FP16."},{name:"unet_cudnn_f16",required:!1,type:"bool",default:!1,description:"Use cuDNN FP16 convolutions and residual activations in the U-Net on CUDA. Requires a build with GGML_CUDA_CUDNN_CONV2D=ON and FP16 U-Net weights."},{name:"mem_saver",required:!1,type:"bool",default:!1,description:"Release components between pipeline stages and run CFG branches sequentially to reduce peak VRAM. Reloading the VAE for decoding adds some latency."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/LatentSync-1.6-GGUF",revision:"main",gated:!1}},packages:[{id:"latentsync_1_6_q8_0_f16",display_name:"LatentSync 1.6 Q8/F16",format:"gguf",precision:"q8_0",default:!0,target_directory:"LatentSync-1.6-GGUF",files:["latentsync-1.6-q8_0-f16.gguf"]},{id:"latentsync_1_6_f16",display_name:"LatentSync 1.6 F16",format:"gguf",precision:"f16",default:!1,target_directory:"LatentSync-1.6-GGUF",files:["latentsync-1.6-f16.gguf"]},{id:"latentsync_1_6_f32_f16",display_name:"LatentSync 1.6 F32/F16",format:"gguf",precision:"orig",default:!1,target_directory:"LatentSync-1.6-GGUF",files:["latentsync-1.6-f32-f16.gguf"]}],dependencies:[],ui:{recommended_package:"latentsync_1_6_q8_0_f16",tags:["GGUF"],docs:["docs/models/latentsync.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{detector_config:"model:detector_config.json",landmark_config:"model:landmark_config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},w8={schema_version:1,family:"lfm2_audio",display_name:"LFM2.5-Audio",description:"Liquid AI's LFM2.5-Audio, loaded from the llama.cpp-format GGUF components Liquid publishes. ASR: a FastConformer encoder feeds an LFM2 hybrid short-conv/attention backbone. TTS: the backbone generates audio frames through a depthformer, and an LFM2 detokenizer and ISTFT turn them into 24 kHz audio. S2S: a spoken question goes in as for ASR, and the reply comes out as interleaved text and audio.",category:"asr",status:"experimental",tasks:["asr","tts","s2s"],modes:["offline","streaming"],languages:["en","ja"],capabilities:{asr:["vad_chunking"],tts:["built_in_voices","long_form"]},options:{request:[{name:"language",type:"string",description:"Must match the checkpoint's language (en or ja) when given; each published checkpoint transcribes and speaks one language.",required:!1,default:"auto"},{name:"max_tokens",type:"int",description:"ASR: transcript tokens per audio chunk, 512 by default. TTS: audio frames (80 ms each) per text chunk, 512 by default. S2S: text tokens and audio frames of the reply together, 1024 by default. A transcript, a text chunk's speech or a reply that reaches it is cut off there, with a warning on stderr.",required:!1,min:1},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode. auto transcribes input up to audio_chunk_duration_sec whole and splits longer input at pauses found by the bundled VAD (fixed chunks when the VAD model is absent); vad always splits at pauses and skips silence; fixed cuts every audio_chunk_duration_sec; none transcribes the whole input at once.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Longest chunk in seconds, at least 1. With fixed chunks, a final piece shorter than 1 second joins the previous chunk.",required:!1,min:1,default:30},{name:"temperature",type:"float",description:"TTS and S2S: audio code sampling temperature, 0.8 by default for TTS and 1.0 for S2S; 0 picks the most likely code.",required:!1,min:0},{name:"top_k",type:"int",description:"TTS and S2S: sample audio codes from the k most likely, 64 by default for TTS and 4 for S2S; 0 keeps all, 1 is greedy.",required:!1,min:0},{name:"text_temperature",type:"float",description:"S2S: text token sampling temperature; 0, the default, picks the most likely token, as liquid-audio's README and demo do.",required:!1,min:0,default:0},{name:"text_top_k",type:"int",description:"S2S: with a text_temperature above 0, sample text tokens from the k most likely; 0, the default, keeps all, and 1 is greedy.",required:!1,min:0,default:0},{name:"seed",type:"int",description:"TTS and S2S: sampling seed; omitted requests choose a random seed. TTS text chunk i uses seed + i. S2S text sampling draws from a stream of its own, so with the same seed a reply follows the greedy-text reply until a text token differs.",required:!1,min:0},{name:"text_chunk_mode",type:"enum",description:"TTS: long-form text chunking mode; japanese for the Japanese checkpoint and default otherwise when omitted.",values:["default","tag_aware","japanese","endline"],required:!1},{name:"text_chunk_size",type:"int",description:"TTS: maximum Unicode codepoints per text chunk, each spoken as its own turn.",required:!1,min:1,default:200},{name:"stream_frames_per_event",type:"int",description:"TTS and S2S streaming: audio frames (80 ms each) per event; each event's audio is final. ASR runs offline only.",required:!1,min:1,default:1},{name:"return_codes",type:"bool",description:"S2S: also return the reply's text tokens and audio codes as an lfm2_audio.reply artifact, to send back as history with the conversation's next turn.",required:!1,default:!1}],session:[{name:"model_gguf",type:"string",description:"Backbone GGUF, relative to the model directory. Defaults to the directory's only backbone GGUF.",required:!1,default:""},{name:"mmproj_gguf",type:"string",description:"Audio encoder (mmproj) GGUF, relative to the model directory. Defaults to mmproj-, or else the directory's only mmproj GGUF.",required:!1,default:""},{name:"vocoder_gguf",type:"string",description:"TTS/S2S vocoder GGUF (depthformer), relative to the model directory. Defaults to vocoder-, or the directory's only vocoder GGUF.",required:!1,default:""},{name:"detokenizer_gguf",type:"string",description:"TTS/S2S audio detokenizer GGUF, relative to the model directory. Defaults to tokenizer-, or the directory's only tokenizer GGUF.",required:!1,default:""},{name:"vad_model_path",type:"string",description:"Path to the VAD model (any built-in VAD family; default Silero VAD) used by automatic audio chunking.",required:!1,default:"assets/framework/models/silero_vad"},{name:"max_pass_duration_sec",type:"float",description:"Most audio, in seconds, the encoder takes in one pass: an ASR chunk (the whole input with audio_chunk_mode=none) or the S2S question. Longer audio is rejected before it is encoded.",required:!1,min:1,default:120},{name:"cpu_repack",type:"bool",description:"On the CPU, multiply the matrices with the kernels of ggml's CPU extra buffer types where those take the weight's type and shape: the repacked ones take Q4_0 on x86 with AVX2 and Q4_0, Q8_0 and Q6_K on Arm; where ggml's AMX buffer is built, it comes first and also takes F16, Q8_0 and K-quants. Where the token embedding's type is taken, the text head gets a copy of it. Other backends ignore it.",required:!1,default:!0},{name:"conversation_cache_slots",type:"int",description:"S2S: how many conversations a session keeps the earlier questions' encoder output and prefill blocks of, for their next turns, the least recently used dropped first; 0 keeps none. Each kept conversation takes up to about 350 MiB of host memory at the conversation limit, and a slot that no conversation has used takes nothing. Output does not depend on it.",required:!1,min:0,default:4}],load:[]},runtime:{tags:["gguf","cpu","metal","cuda"]},packages:[{id:"lfm2_audio_1_5b_q8_0",display_name:"LFM2.5-Audio-1.5B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"LFM2.5-Audio-1.5B-GGUF",files:["LFM2.5-Audio-1.5B-Q8_0.gguf","mmproj-LFM2.5-Audio-1.5B-Q8_0.gguf","vocoder-LFM2.5-Audio-1.5B-Q8_0.gguf","tokenizer-LFM2.5-Audio-1.5B-Q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-GGUF",revision:"7d525f883a077e20afb782f2ff618edcae0e39e4",gated:!1}},{id:"lfm2_audio_1_5b_f16",display_name:"LFM2.5-Audio-1.5B F16 GGUF",format:"gguf",precision:"f16",target_directory:"LFM2.5-Audio-1.5B-GGUF",files:["LFM2.5-Audio-1.5B-F16.gguf","mmproj-LFM2.5-Audio-1.5B-F16.gguf","vocoder-LFM2.5-Audio-1.5B-F16.gguf","tokenizer-LFM2.5-Audio-1.5B-F16.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-GGUF",revision:"7d525f883a077e20afb782f2ff618edcae0e39e4",gated:!1}},{id:"lfm2_audio_1_5b_q4_0",display_name:"LFM2.5-Audio-1.5B Q4_0 GGUF",format:"gguf",precision:"q4_0",target_directory:"LFM2.5-Audio-1.5B-GGUF",files:["LFM2.5-Audio-1.5B-Q4_0.gguf","mmproj-LFM2.5-Audio-1.5B-Q4_0.gguf","vocoder-LFM2.5-Audio-1.5B-Q4_0.gguf","tokenizer-LFM2.5-Audio-1.5B-Q4_0.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-GGUF",revision:"7d525f883a077e20afb782f2ff618edcae0e39e4",gated:!1}},{id:"lfm2_audio_1_5b_jp_q8_0",display_name:"LFM2.5-Audio-1.5B-JP Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"LFM2.5-Audio-1.5B-JP-GGUF",files:["LFM2.5-Audio-1.5B-JP-Q8_0.gguf","mmproj-LFM2.5-Audio-1.5B-JP-Q8_0.gguf","vocoder-LFM2.5-Audio-1.5B-JP-Q8_0.gguf","tokenizer-LFM2.5-Audio-1.5B-JP-Q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-JP-GGUF",revision:"64b96718b341dbd5650f9e85627cecdcbd4ac61b",gated:!1}},{id:"lfm2_audio_1_5b_jp_f16",display_name:"LFM2.5-Audio-1.5B-JP F16 GGUF",format:"gguf",precision:"f16",target_directory:"LFM2.5-Audio-1.5B-JP-GGUF",files:["LFM2.5-Audio-1.5B-JP-F16.gguf","mmproj-LFM2.5-Audio-1.5B-JP-F16.gguf","vocoder-LFM2.5-Audio-1.5B-JP-F16.gguf","tokenizer-LFM2.5-Audio-1.5B-JP-F16.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-JP-GGUF",revision:"64b96718b341dbd5650f9e85627cecdcbd4ac61b",gated:!1}},{id:"lfm2_audio_1_5b_jp_f32",display_name:"LFM2.5-Audio-1.5B-JP F32 GGUF",format:"gguf",precision:"f32",target_directory:"LFM2.5-Audio-1.5B-JP-GGUF",files:["LFM2.5-Audio-1.5B-JP-F32.gguf","mmproj-LFM2.5-Audio-1.5B-JP-F32.gguf","vocoder-LFM2.5-Audio-1.5B-JP-F32.gguf","tokenizer-LFM2.5-Audio-1.5B-JP-F32.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-JP-GGUF",revision:"64b96718b341dbd5650f9e85627cecdcbd4ac61b",gated:!1}},{id:"lfm2_audio_1_5b_jp_q4_0",display_name:"LFM2.5-Audio-1.5B-JP Q4_0 GGUF",format:"gguf",precision:"q4_0",target_directory:"LFM2.5-Audio-1.5B-JP-GGUF",files:["LFM2.5-Audio-1.5B-JP-Q4_0.gguf","mmproj-LFM2.5-Audio-1.5B-JP-Q4_0.gguf","vocoder-LFM2.5-Audio-1.5B-JP-Q4_0.gguf","tokenizer-LFM2.5-Audio-1.5B-JP-Q4_0.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-JP-GGUF",revision:"64b96718b341dbd5650f9e85627cecdcbd4ac61b",gated:!1}}],dependencies:[],ui:{tags:["ASR","TTS","GGUF","Stream"],recommended_package:"lfm2_audio_1_5b_q8_0",docs:["docs/models/lfm2_audio.md"],summary:"LFM2.5-Audio transcription, speech and spoken chat (English and Japanese checkpoints) from Liquid's published GGUFs.",builtin_voices:["us_male","us_female","uk_male","uk_female"],default_voice:"us_male"},sources:[{format:"gguf",roots:{model:"."},files:{},optional_files:{},tensors:{}}]},k8={schema_version:1,family:"lfm3_audio",display_name:"LFM3-Audio",description:"Liquid AI's LFM3-Audio-2B, from the llama.cpp-format GGUFs Liquid publishes or the upstream safetensors directory. ASR: a log-mel LFM2 encoder feeds an LFM3 hybrid conv/attention backbone. TTS: the backbone drives a bidirectional MaskGIT depth decoder (12 codebooks, 12.5 Hz) and the LiquidCodec decoder and ISTFT give 24 kHz audio. S2S: a spoken question in, interleaved text and audio out, with client-held multi-turn history.",category:"asr",status:"experimental",tasks:["asr","tts","s2s"],modes:["offline","streaming"],languages:["en","ar","da","de","el","es","fi","fr","he","it","ja","ko","nl","pl","pt","sv","tr","zh"],capabilities:{asr:["vad_chunking"],tts:["built_in_voices","long_form"]},options:{request:[{name:"language",type:"string",description:"ASR: ISO code of the spoken language (prompt 'Perform ASR in .'); auto lets the model infer it ('Perform ASR.'). TTS: picks the default voice of that language when no voice is given.",required:!1,default:"auto"},{name:"max_tokens",type:"int",min:1,description:"ASR: text tokens per audio chunk (max(512, 8 per second of audio); chat 512, or 2048 with enable_thinking). TTS: audio frames (80 ms) per text chunk (512). S2S: text tokens and frames of the reply together (1024).",required:!1},{name:"audio_chunk_mode",type:"enum",values:["auto","fixed","vad","none"],description:"ASR chunking, as lfm2_audio.",required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",min:1,description:"ASR: longest chunk in seconds; auto keeps input up to this long whole and splits longer input at VAD pauses.",required:!1,default:300},{name:"max_audio_tail_frames",type:"int",min:0,description:"S2S: most audio frames after the reply text ends before the turn is closed with an end-of-audio frame; 0 disables the cap.",required:!1,default:375},{name:"temperature",type:"float",min:0,description:"TTS and S2S: audio code temperature; 0 picks the most likely code. The default is the checkpoint's generation_config.json audio_temperature.",required:!1,default:1},{name:"top_k",type:"int",min:0,description:"TTS and S2S: sample audio codes from the k most likely; 0 keeps all. The default is the checkpoint's audio_top_k.",required:!1,default:128},{name:"repetition_penalty",type:"float",min:.01,description:"TTS and S2S: audio repetition penalty over the last 4096 frames (the checkpoint's audio_repetition_window) of each codebook; must be positive, 1 disables it. The default is the checkpoint's audio_repetition_penalty.",required:!1,default:1.1},{name:"text_temperature",type:"float",min:0,description:"ASR and S2S: text token temperature; 0 is greedy.",required:!1,default:0},{name:"text_top_k",type:"int",min:0,description:"ASR and S2S: sample text tokens from the k most likely; 0 keeps all.",required:!1,default:0},{name:"seed",type:"int",description:"Sampling seed (random when absent); TTS text chunk i uses seed + i.",required:!1,min:0},{name:"text_chunk_mode",type:"enum",values:["default","tag_aware","japanese","endline"],description:"TTS long-form text chunking (values as text::parse_text_chunk_mode_override accepts).",required:!1},{name:"text_chunk_size",type:"int",min:1,description:"TTS: target characters per text chunk.",required:!1,default:200},{name:"stream_frames_per_event",type:"int",min:1,description:"TTS and S2S streaming: audio frames per event.",required:!1,default:1},{name:"return_codes",type:"bool",description:"S2S: return the lfm3_audio.reply artifact a client sends back with the next turn.",required:!1,default:!1},{name:"chat",type:"bool",description:"ASR task: answer the spoken input as a text chat reply instead of transcribing it.",required:!1,default:!1},{name:"enable_thinking",type:"bool",description:"ASR chat: let the model think first; only the text after is returned.",required:!1,default:!1}],session:[{name:"weight_type",type:"enum",values:["native","f16","f32"],description:"Weight storage at load. native keeps the file's types (BF16 falls back to F16 where the backend lacks BF16). f32 also uses F32 KV caches and explicit attention, for parity checks.",required:!1,default:"native"},{name:"cpu_repack",type:"bool",description:"CPU: repack matmul weights for ggml's extra buffer kernels.",required:!1,default:!0},{name:"vad_model_path",type:"string",description:"VAD model (any built-in VAD family; default Silero VAD) used by ASR audio_chunk_mode auto/vad.",required:!1,default:"assets/framework/models/silero_vad"},{name:"max_pass_duration_sec",type:"float",min:1,description:"Most audio, in seconds, the encoder takes in one pass (an ASR chunk or the S2S question); longer audio is rejected before it is encoded.",required:!1,default:300}],load:[]},runtime:{tags:["gguf","stream","cpu","metal","cuda"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM3-Audio-2B-GGUF",revision:"fcfae9027c00a6f3f872c48a841cfeb77e2b5a1c",gated:!1}},packages:[{id:"lfm3_audio_2b_q8_0",display_name:"LFM3-Audio-2B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-Q8_0.gguf","mmproj-LFM3-Audio-2B-Q8_0.gguf"]},{id:"lfm3_audio_2b_f16",display_name:"LFM3-Audio-2B F16 GGUF",format:"gguf",precision:"f16",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-F16.gguf","mmproj-LFM3-Audio-2B-F16.gguf"]},{id:"lfm3_audio_2b_bf16",display_name:"LFM3-Audio-2B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-BF16.gguf","mmproj-LFM3-Audio-2B-BF16.gguf"]},{id:"lfm3_audio_2b_q4_k_m",display_name:"LFM3-Audio-2B Q4_K_M GGUF (Q8_0 mmproj)",format:"gguf",precision:"q4_k_m",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-Q4_K_M.gguf","mmproj-LFM3-Audio-2B-Q8_0.gguf"]},{id:"lfm3_audio_2b_q4_0",display_name:"LFM3-Audio-2B Q4_0 GGUF (Q8_0 mmproj)",format:"gguf",precision:"q4_0",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-Q4_0.gguf","mmproj-LFM3-Audio-2B-Q8_0.gguf"]}],dependencies:[],ui:{tags:["ASR","TTS","GGUF","Stream"],recommended_package:"lfm3_audio_2b_q8_0",docs:["docs/models/lfm3_audio.md"],summary:"LFM3-Audio transcription, multilingual speech and spoken chat from Liquid's published GGUFs.",builtin_voices:["arabic_female","arabic_male","danish_female","danish_male","german_female","german_male","greek_female","greek_male","british_english_female","british_english_male","american_english_female","american_english_male","finnish_female","finnish_male","french_female","french_male","hebrew_female","hebrew_male","italian_female","italian_male","japanese_female","japanese_male","korean_female","korean_male","dutch_female","dutch_male","polish_female","polish_male","portuguese_female","portuguese_male","spanish_female","spanish_male","swedish_female","swedish_male","turkish_female","turkish_male","chinese_female","chinese_male"],default_voice:"american_english_female"},sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json",codec_config:"model:audio_tokenizer/config.json"},tensors:{model:"model:model.safetensors",codec:"model:audio_tokenizer/model.safetensors"}}]},x8={schema_version:1,family:"liveavatar",display_name:"LiveAvatar",description:"LiveAvatar audio-driven avatar video generation using the Wan2.2 S2V architecture.",category:"audio_generation",status:"experimental",tasks:["sfx"],modes:["offline","streaming"],languages:["auto"],runtime:{tags:["cuda","gguf","stream"]},capabilities:{sfx:["prompt_generation"]},options:{request:[{name:"reference_image_file",type:"string",description:"Reference image path used as the identity/appearance condition.",required:!0},{name:"generation_mode",type:"enum",values:["offline","liveavatar"],description:"Use whole-clip generation or LiveAvatar blockwise generation.",required:!1,default:"offline"},{name:"height",type:"int",description:"Generated frame height; must be a positive multiple of 16.",required:!1,min:16,default:480},{name:"width",type:"int",description:"Generated frame width; must be a positive multiple of 16.",required:!1,min:16,default:832},{name:"num_frames",type:"int",description:"Frames generated per LiveAvatar segment; must be positive and a multiple of 4 in blockwise mode (streaming or generation_mode=liveavatar).",required:!1,min:1,default:48},{name:"num_clips",type:"int",description:"Maximum LiveAvatar clips to generate from the input audio.",required:!1,min:1,default:1},{name:"num_inference_steps",type:"int",description:"Denoising steps; offline generation uses UniPC, blockwise generation uses Euler. The LiveAvatar DMD adapter is designed for 4 steps.",required:!1,min:1,default:4},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; LiveAvatar blockwise generation requires 0.",required:!1,min:0,default:0},{name:"batched_cfg",type:"bool",description:"Run classifier-free guidance in one denoiser graph.",required:!1,default:!0},{name:"sage_attention",type:"bool",description:"Use CUDA SageAttention when the backend supports it.",required:!1,default:!0},{name:"mem_saver",type:"bool",description:"Reuse immutable condition data and temporary denoiser graph storage across sequential blocks.",required:!1,default:!0},{name:"denoiser_layerwise",type:"bool",description:"Run the denoiser in layerwise mode. Offline generation requires batched_cfg=true and guidance_scale > 1.",required:!1,default:!1},{name:"denoiser_layerwise_batch",type:"int",description:"Layer group size used by layerwise denoising.",required:!1,min:1,default:16},{name:"vae_encoder_chunk_size",type:"int",description:"Cached VAE encoder chunk size.",required:!1,min:1,default:16},{name:"vae_decoder_tile_size",type:"int",description:"Opt-in VAE decoder spatial tile size for large outputs; 0 disables tiling. Enabled tile sizes must be multiples of 8 and larger than the 64-pixel overlap.",required:!1,min:0,default:0},{name:"target_cache_blocks",type:"int",description:"Target KV cache window in block units; 0 keeps the full clip cache.",required:!1,min:0,default:0},{name:"vae_cache_f16",type:"bool",description:"Store cached VAE encoder state in F16.",required:!1,default:!0},{name:"shift",type:"float",description:"Flow scheduler shift; must be > 0.",required:!1,min:0,default:3},{name:"negative_prompt",type:"string",description:"Negative prompt for classifier-free guidance.",required:!1},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,default:420}],session:[{name:"denoiser_weight_streaming",type:"bool",description:"Keep denoiser transformer blocks in host memory and stage layer groups on the accelerator.",required:!1,default:!1}],load:[{name:"support_gguf",type:"string",description:"Support GGUF containing text_encoder/audio_encoder tensors and the embedded tokenizer sidecar.",required:!1,default:"Wan2.2-S2V-Support-Q4_K_S-F16.gguf"},{name:"vae_gguf",type:"string",description:"Wan video VAE component GGUF file relative to the model root.",required:!1,default:"Wan2.2-S2V-VAE-F16.gguf"},{name:"denoiser_gguf",type:"string",description:"Denoiser DiT GGUF file relative to the model root.",required:!1,default:"Wan2.2-S2V-14B-NVFP4-LORA.gguf"}]},dependencies:[],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/LiveAvatar-GGUF",revision:"main",gated:!1}},packages:[{id:"liveavatar_nvfp4_lora",display_name:"LiveAvatar NVFP4 LoRA GGUF",default:!0,format:"gguf",precision:"native",target_directory:"LiveAvatar-GGUF",files:["Wan2.2-S2V-Support-Q4_K_S-F16.gguf","Wan2.2-S2V-VAE-F16.gguf","Wan2.2-S2V-14B-NVFP4-LORA.gguf"]}],sources:[{format:"gguf",roots:{model:"."},files:{tokenizer_model:"model:tokenizer/spiece.model"},tensors:{text_encoder_weights:{source:"model:Wan2.2-S2V-Support-Q4_K_S-F16.gguf",prefix:"text_encoder"},audio_encoder_weights:{source:"model:Wan2.2-S2V-Support-Q4_K_S-F16.gguf",prefix:"audio_encoder"}}},{format:"gguf",roots:{model:"."},tensors:{vae_weights:{source:"model:Wan2.2-S2V-VAE-F16.gguf",prefix:"vae"}}},{format:"gguf",roots:{model:"."},tensors:{denoiser_weights:{source:"model:Wan2.2-S2V-14B-NVFP4-LORA.gguf"}}}],ui:{recommended_package:"liveavatar_nvfp4_lora",tags:["SFX","GGUF","Stream"],docs:["docs/models/liveavatar.md"]}},S8={schema_version:1,family:"magenta_realtime_2",display_name:"Magenta RealTime 2",description:"Frame-autoregressive stereo music generation with text, audio style, and MIDI conditioning.",category:"audio_generation",status:"experimental",tasks:["music"],modes:["offline","streaming"],languages:["auto"],runtime:{tags:["gguf"]},capabilities:{music:["instrumental","style_control"]},options:{request:[{name:"duration_sec",type:"float",description:"Requested music duration in seconds.",min:.04,default:10,required:!1},{name:"temperature",type:"float",description:"Sampling temperature; zero selects greedy decoding.",min:0,default:1.3,required:!1},{name:"top_k",type:"int",description:"Sampling candidate limit; zero keeps all 1024 valid codes.",min:0,max:1024,default:40,required:!1},{name:"seed",type:"int",description:"Generation seed.",min:0,max:4294967295,default:0,required:!1},{name:"guidance_scale",type:"float",description:"MusicCoCa style guidance, discretized to the model's trained conditioning tokens.",min:-1,max:7,default:3,required:!1},{name:"note_guidance_scale",type:"float",description:"MIDI note guidance.",min:-1,max:7,default:1,required:!1},{name:"drum_guidance_scale",type:"float",description:"Drum guidance.",min:-1,max:7,default:1,required:!1},{name:"use_mapper",type:"bool",description:"Map text style embeddings into the audio embedding space.",default:!0,required:!1},{name:"pianoroll_file",type:"string",description:"Optional JSON array of 128 MIDI pitch states per frame at 25 Hz: -1 masked, 0 off, 1 sustain, 2 onset, 3 model chooses.",required:!1},{name:"drums",type:"int",description:"Drum conditioning: -1 leaves drums unspecified, 0 requests no drums, 1 requests drums.",required:!1,min:-1,max:1,default:-1}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",description:"Transformer weight storage type.",default:"native",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Magenta-RealTime-2-GGUF",revision:"main",gated:!1}},packages:[{id:"magenta_realtime_2_small_f16",display_name:"Magenta RealTime 2 Small F16",format:"gguf",precision:"f16",target_directory:"Magenta-RealTime-2-GGUF",files:["magenta-rt2-small-f16.gguf"],default:!0},{id:"magenta_realtime_2_small_q8_0",display_name:"Magenta RealTime 2 Small Q8_0",format:"gguf",precision:"q8_0",target_directory:"Magenta-RealTime-2-GGUF",files:["magenta-rt2-small-q8_0.gguf"]},{id:"magenta_realtime_2_base_f16",display_name:"Magenta RealTime 2 Base F16",format:"gguf",precision:"f16",target_directory:"Magenta-RealTime-2-GGUF",files:["magenta-rt2-base-f16.gguf"]},{id:"magenta_realtime_2_base_q8_0",display_name:"Magenta RealTime 2 Base Q8_0",format:"gguf",precision:"q8_0",target_directory:"Magenta-RealTime-2-GGUF",files:["magenta-rt2-base-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"magenta_realtime_2_small_f16",tags:["Music","GGUF"],docs:["docs/models/magenta_realtime_2.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",musiccoca_config:"model:musiccoca.json",musiccoca_tokenizer:"model:spm.model"},tensors:{weights:{source:"weights:",prefix:"generator"},musiccoca:{source:"weights:",prefix:"musiccoca"}}}]},T8={schema_version:1,family:"magpie_tts",display_name:"MagpieTTS Multilingual 357M",description:"NVIDIA MagpieTTS is a multilingual neural text-to-speech model that generates NanoCodec audio tokens from text using baked speaker context embeddings, a decoder-only transformer, and an autoregressive local transformer before decoding the tokens to waveform audio.",category:"tts",status:"supported",tasks:["tts"],modes:["offline"],languages:["ar-AE","ar-MSA","ar-SA","de","en","es","fr","hi","it","ko","pt-BR","vi","zh"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"language",type:"string",description:"Target synthesis language code used by the Magpie text frontend; default en.",required:!1,default:"en"},{name:"voice_id",type:"enum",description:"Packaged MagpieTTS voice name; default Aria. Numeric speaker index strings are also accepted within the checkpoint speaker count.",values:["Aria","Jason","John","Leo","Sofia"],required:!1,default:"Aria"},{name:"temperature",type:"float",description:"Autoregressive audio-token sampling temperature; default 0.6 from the v2607 model config.",required:!1,min:0,default:.6},{name:"top_k",type:"int",description:"Autoregressive audio-token top-k sampling limit; default 80.",required:!1,min:1,default:80},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale for Magpie decoder logits; default 2.5.",required:!1,min:0,default:2.5},{name:"max_tokens",type:"int",description:"Maximum Magpie decoder frames per text segment; default 500 from the v2607 model config.",required:!1,min:1,default:500},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 100 for zh and ko, otherwise 300.",required:!1,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"seed",type:"int",description:"Seed for audio-token sampling; default 0.",required:!1,min:0,default:0}],session:[{name:"graph_arena_mb",type:"int",description:"Reusable ggml graph arena size in MiB for Magpie stages; default 1024.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 2048.",required:!1,min:1,default:2048},{name:"weight_type",type:"enum",description:"Matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"magpie_tts_orig",display_name:"MagpieTTS Multilingual 357M Original-Dtype GGUF",default:!1,format:"gguf",precision:"orig",target_directory:"MagpieTTS-Multilingual-357M-GGUF",files:["MagpieTTS-Multilingual-357M-GGUF/magpie-tts-multilingual-357m-orig.gguf"],strip_prefix:"MagpieTTS-Multilingual-357M-GGUF"},{id:"magpie_tts_q8_0",display_name:"MagpieTTS Multilingual 357M Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MagpieTTS-Multilingual-357M-GGUF",files:["MagpieTTS-Multilingual-357M-GGUF/magpie-tts-multilingual-357m-q8_0.gguf"],strip_prefix:"MagpieTTS-Multilingual-357M-GGUF"}],dependencies:[],ui:{recommended_package:"magpie_tts_q8_0",tags:["TTS","GGUF"],docs:["docs/models/magpie_tts.md","docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",codec_config:"model:codec_config.json",speakers:"model:speakers.json"},optional_files:{ipa_dict:"model:ipa_dict.txt",cmu_dict:"model:cmu_dict.txt",german_dict:"model:german.dict",german_heteronyms:"model:german.heteronym",spanish_dict:"model:spanish.dict",portuguese_dict:"model:portuguese.dict",hindi_dict:"model:hindi.dict",heteronyms:"model:heteronyms",mandarin_chars:"model:mandarin_data/pinyin_chars.tsv",mandarin_phrases:"model:mandarin_data/pinyin_phrases.tsv",mandarin_jieba_dict:"model:mandarin_data/jieba.dict.utf8",mandarin_hmm:"model:mandarin_data/hmm_model.utf8"},tensors:{model:{source:"weights:",prefix:"model"},codec:{source:"weights:",prefix:"codec"}}},{format:"safetensors",roots:{model:".",codec:"../nemo_nano_codec_22khz_1_89kbps_safetensors"},files:{config:"model:config.json",codec_config:"codec:config.json",speakers:"model:41913ebaa70342058574da74293b7630_magpie_tts_multilingual_357m.nemo.speakers.json"},optional_files:{ipa_dict:"model:74b3e832fe914a569fcd42b51d06b2f1_ipa_dict_nv23.05.txt",cmu_dict:"model:dc7d60d6b15a4651b21c9ca2932b62c6_ipa_cmudict-0.7b_nv23.01.txt",german_dict:"model:cf01ab5c48c84f3282ef7888263361e5_de_nv230119.dict",german_heteronyms:"model:c5e4ec2af5a14ce294f4b9edcc936535_de_nv230119.heteronym",spanish_dict:"model:7dbc31751f224f2486090d59dc95b9f7_es_ES_nv230301.dict",portuguese_dict:"model:05adc40366e149b69319acd4b28a4919_pt_br_prondict-v1.0.dict",hindi_dict:"model:339da71c54b046f98cbcf38ef6d4ff67_hindi_phoneme_merged_phoneme_dict.dict",heteronyms:"model:61d57a4ccb064d1e8e3d9f871c571932_heteronyms-052722"},tensors:{model:"model:model.safetensors",codec:"codec:model.safetensors"}}]},$8={schema_version:1,family:"maya1",display_name:"Maya1",description:"Maya Research's 3B expressive English text-to-speech model with natural-language voice design and inline emotion control.",category:"tts",status:"supported",tasks:["tts","design"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["voice_design","emotion_control","long_form"],design:["voice_design"]},options:{request:[{name:"instruct",type:"string",description:"Natural-language description of the voice, accent, timbre, age, and delivery.",required:!0},{name:"max_tokens",type:"int",description:"Maximum generated audio-token count per text chunk; default 2048.",required:!1,min:1,default:2048},{name:"min_tokens",type:"int",description:"Minimum generated audio-token count before EOS may stop generation; default 28.",required:!1,min:0,default:28},{name:"temperature",type:"float",description:"Autoregressive sampling temperature; default 0.4. Must be > 0.",required:!1,min:0,default:.4},{name:"top_p",type:"float",description:"Autoregressive nucleus sampling probability; must be in (0, 1], default 0.9.",required:!1,min:0,max:1,default:.9},{name:"repetition_penalty",type:"float",description:"Autoregressive repetition penalty; default 1.1. Must be > 0.",required:!1,min:0,default:1.1},{name:"seed",type:"int",description:"Sampling and SNAC decoder noise seed; omitted requests choose a random seed.",required:!1,min:0},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 300.",required:!1,min:1,default:300},{name:"text_chunk_mode",type:"enum",description:"Framework long-form text chunking mode; tag_aware preserves inline emotion tags.",values:["default","tag_aware","japanese","endline"],required:!1,default:"tag_aware"}],session:[{name:"weight_type",type:"enum",description:"Shared AR and SNAC decoder weight storage type; default native.",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],required:!1,default:"native"},{name:"ar_weight_type",type:"enum",description:"AR backbone weight storage type; defaults to weight_type.",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],required:!1},{name:"codec_weight_type",type:"enum",description:"SNAC decoder weight storage type; only native or f32 is supported. Inherits weight_type when omitted; set codec_weight_type=f32 explicitly when using another shared weight_type.",values:["native","f32"],required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"maya1_orig",display_name:"Maya1 Original-Precision GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Maya1-GGUF",files:["Maya1-GGUF/maya1-orig.gguf"],strip_prefix:"Maya1-GGUF"},{id:"maya1_q8_0",display_name:"Maya1 Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"Maya1-GGUF",files:["Maya1-GGUF/maya1-q8_0.gguf"],strip_prefix:"Maya1-GGUF"}],dependencies:[],ui:{recommended_package:"maya1_orig",tags:["TTS","Design","GGUF"],docs:["docs/models/maya1.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},tensors:{model_weights:"weights:",codec_weights:"weights:"}}]},q8={family:"meanvc2",schema_version:1,display_name:"MeanVC2",description:"MeanVC2 is a lightweight streaming zero-shot voice conversion model. The current audio.cpp package covers the recommended 120ms/40ms quality path.",category:"voice_conversion",status:"supported",tasks:["vc"],modes:["offline","streaming"],languages:["language_agnostic"],capabilities:{vc:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"seed",type:"int",description:"Random seed for MeanVC2 flow noise; default 42.",required:!1,min:0,default:42}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"meanvc2_120ms_40ms_f32",display_name:"MeanVC2 120ms/40ms F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"MeanVC2-GGUF",files:["MeanVC2-GGUF/meanvc2-120ms-40ms-fp32.gguf"],strip_prefix:"MeanVC2-GGUF"},{id:"meanvc2_120ms_40ms_q4_k",display_name:"MeanVC2 120ms/40ms Q4_K GGUF",default:!1,format:"gguf",precision:"q4_k",target_directory:"MeanVC2-GGUF",files:["MeanVC2-GGUF/meanvc2-120ms-40ms-q4_k.gguf"],strip_prefix:"MeanVC2-GGUF"}],dependencies:[],ui:{recommended_package:"meanvc2_120ms_40ms_f32",tags:["VC","GGUF"],docs:["docs/models/meanvc2.md","docs/audio_tools.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{weights:"$gguf"},tensors:{vc:{source:"weights:",prefix:"vc"},vocos:{source:"weights:",prefix:"vocos"},asr:{source:"weights:",prefix:"asr"},speaker_wavlm:{source:"weights:",prefix:"speaker_wavlm"},speaker_ecapa:{source:"weights:",prefix:"speaker_ecapa"}}}]},C8={schema_version:1,family:"mel_band_roformer",display_name:"Mel-Band RoFormer",description:"Music source-separation model that uses mel-scaled overlapping frequency bands and RoFormer attention to estimate stems such as vocals, drums, and accompaniment.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},options:{request:[],session:[{name:"weight_type",type:"enum",description:"RoFormer weight storage type. Defaults to f32 when the backend requires a host graph plan, otherwise native.",preset:"weight_type_full",required:!1},{name:"num_overlap",type:"int",description:"Number of overlapping inference windows; defaults to the package configuration. Lower values improve throughput but can reduce boundary quality.",required:!1,min:1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"mel_band_roformer_q8_0",tags:["Sep","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"mel_band_roformer_q8_0",display_name:"Mel-Band RoFormer Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Mel-Band-RoFormer-GGUF",files:["Mel-Band-RoFormer-GGUF/mel-band-roformer-q8_0.gguf"],strip_prefix:"Mel-Band-RoFormer-GGUF"},{id:"mel_band_roformer_f16",display_name:"Mel-Band RoFormer F16 GGUF",format:"gguf",precision:"f16",target_directory:"Mel-Band-RoFormer-GGUF",files:["Mel-Band-RoFormer-GGUF/mel-band-roformer-f16.gguf"],strip_prefix:"Mel-Band-RoFormer-GGUF"},{id:"mel_band_roformer_safetensors",display_name:"Mel RoFormer Safetensors",format:"safetensors",precision:"native",target_directory:"mel-roformer-mlx",files:["config.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"mlx-community/mel-roformer-mlx"}}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},A8={schema_version:1,family:"micro_wake_word",display_name:"microWakeWord",description:"Streaming wake-word detection for trained microWakeWord MixedNet TFLite models converted to GGUF.",category:"audio_tools",status:"experimental",tasks:["wake_word"],modes:["offline","streaming"],languages:["model_dependent"],capabilities:{wake_word:["speech_segments","stream_events"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"threshold",type:"float",description:"Override the converted model manifest's wake-word probability cutoff.",required:!1,min:0,max:1},{name:"sliding_window_size",type:"int",description:"Override the converted model manifest's prediction smoothing window.",required:!1,min:1}],session:[{name:"exec_plan",type:"string",description:"JSON component execution plans. Component network accepts impl ggml/neon (default ggml). GGML retains the session backend; neon runs the stateful CNN on CPU and requires ENGINE_ENABLE_NEON=ON and AArch64 NEON. Frontend and detection logic are unchanged. No artifacts or params are used.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"micro_wake_word_okay_nabu_f32",display_name:"microWakeWord Okay Nabu GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"MicroWakeWord-GGUF",files:["MicroWakeWord-GGUF/micro-wake-word-okay-nabu-f32.gguf"],strip_prefix:"MicroWakeWord-GGUF"}],dependencies:[],ui:{tags:["Wake Word","GGUF","Stream"],docs:["docs/models/micro_wake_word.md"],recommended_package:"micro_wake_word_okay_nabu_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},G8={schema_version:1,family:"midashenglm_gen",display_name:"MiDashengLM-Gen",description:"DashengLM generative audio model for speech, music, sound effects, and ambience prompts.",category:"audio_generation",status:"experimental",tasks:["music"],modes:["offline"],languages:["auto"],runtime:{tags:["gguf","cuda"]},capabilities:{music:["instrumental","style_control"]},options:{request:[{name:"duration_sec",type:"float",description:"Target audio duration budget; omitted derives from the checkpoint sequence length, hop size and sample rate. Must be finite and positive; no fixed runtime upper cap.",required:!1,default:20},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale. Any finite value is accepted.",required:!1,default:2},{name:"stop_threshold",type:"float",description:"Stop probability threshold. Any finite value is accepted.",required:!1,default:.5},{name:"min_stop_step",type:"int",description:"Minimum generated steps before accepting stop.",required:!1,min:1,default:5},{name:"seed",type:"int",description:"Unsigned 32-bit generation seed; default 0 is a fixed seed. Negative values are not accepted.",required:!1,min:0,max:4294967295,default:0}],session:[{name:"weight_type",type:"enum",description:"Shared weight storage type.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"midashenglm_gen_f32",display_name:"MiDashengLM-Gen F32 GGUF",format:"gguf",precision:"f32",target_directory:"MiDashengLM-Gen-GGUF",files:["MiDashengLM-Gen-GGUF/midashenglm-gen-f32.gguf"],strip_prefix:"MiDashengLM-Gen-GGUF"},{id:"midashenglm_gen_q8_0",display_name:"MiDashengLM-Gen Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MiDashengLM-Gen-GGUF",files:["MiDashengLM-Gen-GGUF/midashenglm-gen-q8_0.gguf"],strip_prefix:"MiDashengLM-Gen-GGUF"}],dependencies:[],ui:{recommended_package:"midashenglm_gen_q8_0",tags:["Music","SFX","GGUF"],docs:["docs/models/midashenglm_gen.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json","vocab.json":"model:vocab.json","merges.txt":"model:merges.txt","tokenizer_config.json":"model:tokenizer_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json","vocab.json":"model:vocab.json","merges.txt":"model:merges.txt","tokenizer_config.json":"model:tokenizer_config.json"},tensors:{weights:"model:model.safetensors.index.json"}}]},F8={schema_version:1,family:"ming3_audio",display_name:"Ming 3.0 Audio Tiny",description:"Whisper audio encoder and hybrid KDA/MLA mixture-of-experts Thinker, with a separate continuous-latent Talker for spoken responses.",category:"asr",status:"experimental",tasks:["asr","s2s","tts","clone"],modes:["offline"],languages:["zh","en"],capabilities:{tts:["speaker_reference","built_in_voices"],clone:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"system_prompt",type:"string",required:!1,description:"Thinker system instruction. When supplied, the user prompt precedes audio as in the official chat examples."},{name:"enable_thinking",type:"bool",required:!1,default:!1,description:"Enable the Thinker chat template's detailed thinking mode."},{name:"prompt",type:"string",required:!1,description:"Thinker instruction accompanying the input audio; omitted ASR requests use the official transcription prompt."},{name:"max_tokens",type:"int",required:!1,default:256,min:1,description:"Maximum generated Thinker text tokens."},{name:"max_audio_tokens",type:"int",required:!1,default:1e3,min:1,description:"Maximum generated Talker acoustic patches per text fragment."},{name:"voice_id",type:"enum",values:["US_James","US_Stella","灵小柔","灵楷","US_Emma","UK_George","UK_Charlotte","灵小安","灵语汐","灵小萌","灵小雅","花小呗","灵韵","妩媚妲己","灵婉","灵小月","灵朵儿","灵岩","灵小锋","灵小川","灵小甄","灵小知","灵小惠","灵小晴","灵小琪","灵梦","灵恬","灵小汐","灵小棠","灵小梨","灵舒","灵娇","灵小芸","灵锐","灵空","灵宇","灵朗","灵旭","灵骁","灵江","悲伤女声","皮六","说唱小哥","蜡笔小新","悟空","灵信远_生气","灵信远_厌恶","灵信远_惊讶","灵信远_高兴","灵信远_恐惧","灵信远_中性","灵信远_悲伤","灵思齐_高兴","灵思齐_恐惧","灵思齐_生气","灵思齐_厌恶","灵思齐_中性","灵思齐_惊讶","灵思齐_悲伤","灵叙柔_高兴","灵叙柔_恐惧","灵叙柔_惊讶","灵叙柔_悲伤","灵叙柔_生气","灵叙柔_中性","灵叙柔_厌恶","灵绮木_悲伤","灵绮木_厌恶","灵绮木_中性","灵绮木_恐惧","灵绮木_惊讶","灵绮木_高兴","灵绮木_生气","灵书悦_恐惧","灵书悦_厌恶","灵书悦_高兴","灵书悦_惊讶","灵书悦_悲伤","灵书悦_生气","灵书悦_中性","灵渊霆_厌恶","灵渊霆_中性","灵渊霆_恐惧","灵渊霆_惊讶","灵渊霆_悲伤","灵渊霆_生气","灵渊霆_高兴","灵素心_高兴","灵素心_惊讶","灵素心_恐惧","灵素心_中性","灵素心_生气","灵素心_悲伤","灵素心_厌恶","灵晓声_惊讶","灵晓声_厌恶","灵晓声_高兴","灵晓声_生气","灵晓声_中性","灵晓声_悲伤","灵风信_生气","灵风信_中性","灵风信_厌恶","灵风信_高兴","灵风信_惊讶","灵风信_悲伤","灵风信_恐惧","灵采薇_惊讶","灵采薇_厌恶","灵采薇_恐惧","灵采薇_生气","灵采薇_悲伤","灵采薇_中性","灵采薇_高兴","灵卓然_厌恶","灵卓然_中性","灵卓然_恐惧","灵卓然_惊讶","灵卓然_高兴","灵卓然_悲伤","灵卓然_生气","灵惜梦_中性","灵惜梦_厌恶","灵惜梦_高兴","灵惜梦_悲伤","灵惜梦_恐惧","灵惜梦_惊讶","灵惜梦_生气","灵浅忧_高兴","灵浅忧_生气","灵浅忧_厌恶","灵浅忧_悲伤","灵浅忧_惊讶","灵浅忧_恐惧","灵浅忧_中性","灵昭野_生气","灵昭野_高兴","灵昭野_悲伤","灵昭野_中性","灵昭野_厌恶","灵昭野_恐惧","灵昭野_惊讶","灵心澜_厌恶","灵心澜_惊讶","灵心澜_生气","灵心澜_中性","灵心澜_高兴","灵心澜_悲伤","灵心澜_恐惧","灵犀言_悲伤","灵犀言_厌恶","灵犀言_恐惧","灵犀言_中性","灵犀言_惊讶","灵犀言_高兴","灵犀言_生气","灵语冰_悲伤","灵语冰_厌恶","灵语冰_高兴","灵语冰_恐惧","灵语冰_惊讶","灵语冰_中性","灵语冰_生气","灵逸风_生气","灵逸风_悲伤","灵逸风_惊讶","灵逸风_中性","灵逸风_恐惧","灵逸风_高兴","灵逸风_厌恶","灵悦澜_中性","灵悦澜_高兴","灵悦澜_厌恶","灵悦澜_恐惧","灵悦澜_生气","灵悦澜_悲伤","灵悦澜_惊讶","灵惊鸿_厌恶","灵惊鸿_高兴","灵惊鸿_中性","灵惊鸿_惊讶","灵惊鸿_恐惧","灵惊鸿_生气","灵惊鸿_悲伤","灵御心_高兴","灵御心_中性","灵御心_生气","灵御心_恐惧","灵御心_厌恶","灵御心_惊讶","灵御心_悲伤","灵语恬_厌恶","灵语恬_高兴","灵语恬_恐惧","灵语恬_悲伤","灵语恬_惊讶","灵语恬_生气","灵语恬_中性","灵心恬_厌恶","灵心恬_惊讶","灵心恬_悲伤","灵心恬_中性","灵心恬_恐惧","灵心恬_高兴","灵心恬_生气","灵惜蕊_惊讶","灵惜蕊_厌恶","灵惜蕊_恐惧","灵惜蕊_高兴","灵惜蕊_中性","灵惜蕊_悲伤","灵惜蕊_生气","灵语萱_厌恶","灵语萱_高兴","灵语萱_惊讶","灵语萱_恐惧","灵语萱_生气","灵语萱_悲伤","灵语萱_中性","灵语烟_生气","灵语烟_恐惧","灵语烟_中性","灵语烟_厌恶","灵语烟_惊讶","灵语烟_高兴","灵语烟_悲伤","灵律雅_恐惧","灵律雅_生气","灵律雅_惊讶","灵律雅_高兴","灵律雅_厌恶","灵律雅_中性","灵律雅_悲伤","灵惊涛_厌恶","灵惊涛_恐惧","灵惊涛_高兴","灵惊涛_悲伤","灵惊涛_中性","灵惊涛_惊讶","灵惊涛_生气","灵寒陌_生气","灵寒陌_厌恶","灵寒陌_恐惧","灵寒陌_高兴","灵寒陌_中性","灵寒陌_惊讶","灵寒陌_悲伤","灵决冥_悲伤","灵决冥_厌恶","灵决冥_生气","灵决冥_中性","灵决冥_惊讶","灵决冥_恐惧","灵决冥_高兴","灵亦尘_中性","灵亦尘_厌恶","灵亦尘_高兴","灵亦尘_恐惧","灵亦尘_生气","灵亦尘_悲伤","灵亦尘_惊讶","灵语尘_生气","灵语尘_高兴","灵语尘_厌恶","灵语尘_惊讶","灵语尘_中性","灵语尘_悲伤","灵语尘_恐惧","灵慈萱_高兴","灵慈萱_厌恶","灵慈萱_惊讶","灵慈萱_生气","灵慈萱_中性","灵慈萱_悲伤","灵慈萱_恐惧","灵妙音_中性","灵妙音_悲伤","灵妙音_惊讶","灵妙音_厌恶","灵妙音_生气","灵妙音_高兴","灵妙音_恐惧","灵断尘_悲伤","灵断尘_高兴","灵断尘_惊讶","灵断尘_恐惧","灵断尘_中性","灵断尘_生气","灵断尘_厌恶","灵悦兮_高兴","灵悦兮_中性","灵悦兮_生气","灵悦兮_惊讶","灵悦兮_厌恶","灵悦兮_悲伤","灵悦兮_恐惧","灵若虚_恐惧","灵若虚_惊讶","灵若虚_中性","灵若虚_悲伤","灵若虚_高兴","灵若虚_厌恶","灵若虚_生气","灵熙婉_厌恶","灵熙婉_生气","灵熙婉_惊讶","灵熙婉_高兴","灵熙婉_中性","灵熙婉_恐惧","灵熙婉_悲伤","灵旭扬_中性","灵旭扬_生气","灵旭扬_恐惧","灵旭扬_高兴","灵旭扬_惊讶","灵旭扬_悲伤","灵旭扬_厌恶","灵阅川_生气","灵阅川_悲伤","灵阅川_高兴","灵阅川_厌恶","灵阅川_惊讶","灵阅川_中性","灵阅川_恐惧","灵未央_高兴","灵未央_中性","灵未央_惊讶","灵未央_悲伤","灵未央_厌恶","灵未央_恐惧","灵未央_生气","灵妩月_厌恶","灵妩月_生气","灵妩月_中性","灵妩月_惊讶","灵妩月_恐惧","灵妩月_高兴","灵妩月_悲伤","灵梦瑶_中性","灵梦瑶_恐惧","灵梦瑶_高兴","灵梦瑶_悲伤","灵梦瑶_惊讶","灵梦瑶_生气","灵妙声_中性","灵妙声_恐惧","灵妙声_高兴","灵妙声_悲伤","灵妙声_惊讶","灵妙声_生气","灵烈瑶_中性","灵烈瑶_厌恶","灵烈瑶_恐惧","灵烈瑶_悲伤","灵烈瑶_惊讶","灵烈瑶_生气","灵烈瑶_高兴","灵幽月_中性","灵幽月_厌恶","灵幽月_恐惧","灵幽月_悲伤","灵幽月_惊讶","灵幽月_生气","灵幽月_高兴","灵悦心_中性","灵悦心_厌恶","灵悦心_恐惧","灵悦心_悲伤","灵悦心_惊讶","灵悦心_生气","灵悦心_高兴","灵汐月_中性","灵汐月_厌恶","灵汐月_恐惧","灵汐月_悲伤","灵汐月_惊讶","灵汐月_生气","灵汐月_高兴","灵书意_中性","灵书意_厌恶","灵书意_恐惧","灵书意_悲伤","灵书意_惊讶","灵书意_生气","灵书意_高兴","灵知远_中性","灵知远_厌恶","灵知远_恐惧","灵知远_悲伤","灵知远_惊讶","灵知远_生气","灵知远_高兴","灵温言_中性","灵温言_厌恶","灵温言_恐惧","灵温言_悲伤","灵温言_惊讶","灵温言_生气","灵温言_高兴","灵傲尘_中性","灵傲尘_厌恶","灵傲尘_恐惧","灵傲尘_悲伤","灵傲尘_生气","灵傲尘_高兴","灵佑安_中性","灵佑安_厌恶","灵佑安_恐惧","灵佑安_悲伤","灵佑安_惊讶","灵佑安_生气","灵佑安_高兴","灵惜晨_中性","灵惜晨_厌恶","灵惜晨_恐惧","灵惜晨_悲伤","灵惜晨_惊讶","灵惜晨_生气","灵惜晨_高兴","灵宛溪_中性","灵宛溪_厌恶","灵宛溪_恐惧","灵宛溪_悲伤","灵宛溪_惊讶","灵宛溪_生气","灵宛溪_高兴","灵言澈_中性","灵言澈_厌恶","灵言澈_恐惧","灵言澈_悲伤","灵言澈_惊讶","灵言澈_生气","灵言澈_高兴","灵溯光_中性","灵溯光_厌恶","灵溯光_恐惧","灵溯光_悲伤","灵溯光_惊讶","灵溯光_生气","灵溯光_高兴","灵惊弦_中性","灵惊弦_厌恶","灵惊弦_恐惧","灵惊弦_悲伤","灵惊弦_惊讶","灵惊弦_生气","灵惊弦_高兴","灵嘉肴_中性","灵嘉肴_厌恶","灵嘉肴_恐惧","灵嘉肴_悲伤","灵嘉肴_惊讶","灵嘉肴_生气","灵嘉肴_高兴","灵黛嗔_中性","灵黛嗔_厌恶","灵黛嗔_恐惧","灵黛嗔_悲伤","灵黛嗔_惊讶","灵黛嗔_生气","灵黛嗔_高兴","灵孤影_中性","灵孤影_厌恶","灵孤影_恐惧","灵孤影_悲伤","灵孤影_惊讶","灵孤影_生气","灵孤影_高兴","灵雨汐_中性","灵雨汐_恐惧","灵雨汐_高兴","灵雨汐_悲伤","灵雨汐_惊讶","灵雨汐_生气","蜡笔小新_野原新之助 (小新)","蜡笔小新_野原美伢 (美伢)","小猪佩奇_佩奇","康熙王朝_康熙","西游记_唐僧","甄嬛传_四郎","潜伏_余则成","水浒传_武松","水浒传_潘金莲","雍正王朝_雍正"],required:!1,description:"Talker built-in voice name; ignored when reference audio is supplied."},{name:"reference_text",type:"string",required:!1,description:"Reference transcript enabling acoustic-prefix continuation; without it reference audio supplies speaker conditioning only."},{name:"language",type:"string",required:!1,description:"Talker output language; inferred from its input text when omitted."},{name:"seed",type:"int",required:!1,min:0,default:42,description:"Talker flow and reference-posterior sampling seed. Thinker generation is greedy."},{name:"guidance_scale",type:"float",required:!1,default:2,description:"Talker conditioned prediction plus guidance_scale times its difference from the null prediction."},{name:"sigma",type:"float",required:!1,default:.25,min:0,description:"Talker flow SDE noise scale."},{name:"temperature",type:"float",required:!1,default:0,min:0,description:"Talker flow sampling temperature; zero still uses seeded initial noise."},{name:"raw_text",type:"bool",required:!1,default:!1,description:"Synthesize text as one fragment without framework text chunking."},{name:"trim_silence",type:"bool",required:!1,default:!0,description:"Trim trailing low-energy 100-ms frames per Talker fragment, retaining a 300-ms tail."},{name:"text_chunk_size",type:"int",required:!1,min:1,default:100,description:"Talker text chunk budget in Unicode codepoints."},{name:"text_chunk_mode",type:"enum",required:!1,default:"tag_aware",values:["default","tag_aware","japanese","endline"],description:"Framework Talker text chunking policy."}],session:[{name:"disk_experts",type:"bool",required:!1,default:!1,description:"Keep Thinker expert weights outside GPU memory and stage routed experts into a bounded GPU cache; computation stays on the selected backend."},{name:"pin_experts",type:"bool",required:!1,default:!0,description:"With disk_experts, retain expert payloads in pinned host RAM instead of reading them from the GGUF on each cache miss. Defaults to false on Metal, which uses ordinary host staging."},{name:"expert_cache_size",type:"int",required:!1,default:8,min:8,max:128,description:"With disk_experts, number of GPU-resident expert slots per routed Thinker layer."},{name:"disk_expert_read_threads",type:"int",required:!1,default:1,min:1,max:64,description:"Host workers for copying selected GGUF experts into staging when disk_experts is enabled and pin_experts is false. Default 1 preserves serial reads; values above 1 use OpenMP or Apple dispatch."},{name:"reference_cache",type:"bool",required:!1,default:!0,description:"Reuse speaker features and seeded acoustic conditioning for the most recent reference waveform."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Ming-3.0-Audio-Tiny-GGUF",revision:"main",gated:!1}},packages:[{id:"ming3_audio_tiny_bf16",display_name:"Ming 3.0 Audio Tiny BF16",format:"gguf",precision:"bf16",default:!0,target_directory:"Ming-3.0-Audio-Tiny-GGUF",files:["ming-3.0-audio-tiny-bf16.gguf"]},{id:"ming3_audio_tiny_q8_0",display_name:"Ming 3.0 Audio Tiny Q8_0 Experts",format:"gguf",precision:"q8_0",target_directory:"Ming-3.0-Audio-Tiny-GGUF",files:["ming-3.0-audio-tiny-q8_0.gguf"]},{id:"ming3_audio_tiny_q4_k",display_name:"Ming 3.0 Audio Tiny Q4_K Experts",format:"gguf",precision:"q4_k",target_directory:"Ming-3.0-Audio-Tiny-GGUF",files:["ming-3.0-audio-tiny-q4_k.gguf"]}],dependencies:[],ui:{recommended_package:"ming3_audio_tiny_bf16",tags:["ASR","TTS","GGUF"],docs:["docs/models/ming3_audio.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",generation_config:"model:generation_config.json",talker_config:"model:talker/config.json",talker_llm_config:"model:talker/llm/config.json",talker_tokenizer_json:"model:talker/llm/tokenizer.json",talker_tokenizer_config:"model:talker/llm/tokenizer_config.json",vae_config:"model:talker/vae/config.json"},tensors:{thinker:{source:"weights:",prefix:"thinker"},talker:{source:"weights:",prefix:"talker"},vae:{source:"weights:",prefix:"vae"},speaker:{source:"weights:",prefix:"speaker"}}}]},M8={schema_version:1,family:"ming3_tts",display_name:"Ming 3.0 TTS 0.5B",description:"Multilingual continuous-latent speech synthesis with a Qwen backbone, flow-matching acoustic head, CAMPPlus speaker conditioning and an audio VAE.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["zh","en","ja","ko","de","fr","es"],capabilities:{tts:["long_form","speaker_reference","style_control","emotion_control","built_in_voices"],clone:["long_form","speaker_reference","style_control","emotion_control"],design:["voice_design"]},runtime:{tags:["gguf"]},options:{request:[{name:"template_name",type:"enum",required:!1,description:"Conditioning template; defaults to voice_design on that route, otherwise tts.",values:["tts","multilingual","basic","emotion","dialect","ip","voice_design","freeform"]},{name:"language",type:"string",required:!1,description:"Target language name or code; defaults to the request's language (the server's top-level language field, the CLI's --language). Required by multilingual; ignored by dialect."},{name:"instruct",type:"string",required:!1,description:"Voice description for voice_design; raw conditioning text for freeform or tts."},{name:"instruction_schema",type:"enum",required:!1,description:"Structured instruction field language; defaults to en for dialect, otherwise zh.",values:["en","zh"]},{name:"speed",type:"enum",required:!1,description:"Categorical speaking speed for the basic template, not waveform resampling.",values:["慢速","中速","快速"]},{name:"pitch",type:"enum",required:!1,description:"Categorical pitch for the basic template.",values:["低","中","高"]},{name:"volume",type:"enum",required:!1,description:"Categorical volume for the basic template.",values:["低","中","高"]},{name:"emotion",type:"string",required:!1,description:"Emotion label for the emotion template."},{name:"dialect",type:"enum",required:!1,description:"Dialect for the dialect template.",values:["chuanyu dialect","cantonese"]},{name:"voice_id",type:"enum",required:!1,description:"Built-in English voice for the ip template.",values:["US_Emma","US_James","UK_George","UK_Charlotte"]},{name:"reference_text",type:"string",required:!1,description:"Transcript accompanying voice_ref; enables the acoustic reference prefix. Without a transcript, only speaker conditioning is used."},{name:"speaker_embedding_file",type:"path_list",required:!1,description:"CAMPPlus embedding file or list, with shape [192] or [1, 192]. Supersedes voice_ref audio; zero_speaker_embedding takes precedence."},{name:"export_speaker_embedding_file",type:"path",required:!1,description:"Export the enabled voice_ref CAMPPlus speaker embedding as F32 Safetensors. Requires voice_ref, use_speaker_embedding=true, zero_speaker_embedding=false and no speaker_embedding_file. Does not export acoustic latents or the reference transcript."},{name:"use_speaker_embedding",type:"bool",required:!1,default:!0,description:"Condition on the reference speaker embedding."},{name:"zero_speaker_embedding",type:"bool",required:!1,default:!1,description:"Use a zero projected speaker row instead of reference audio conditioning."},{name:"max_tokens",type:"int",required:!1,default:1e3,min:1,description:"Maximum generated acoustic patches per text chunk, also limited by the 512-position generation context."},{name:"guidance_scale",type:"float",required:!1,default:2,description:"Flow guidance: conditioned prediction plus guidance_scale times its difference from the null prediction."},{name:"sigma",type:"float",required:!1,default:.25,min:0,description:"Flow SDE noise scale."},{name:"temperature",type:"float",required:!1,default:0,min:0,description:"Flow sampling temperature; zero still uses seeded initial noise."},{name:"seed",type:"int",required:!1,default:1895,min:0,description:"Reference-posterior and generation noise seed."},{name:"raw_text",type:"bool",required:!1,default:!1,description:"Send the text as one synthesis fragment without frontend chunking."},{name:"text_chunk_size",type:"int",required:!1,min:1,description:"Framework long-form chunk budget in Unicode codepoints; default 50 when hanzi, kana and Hangul outnumber other letters and digits, otherwise 300; multi-chunk generation without speaker conditioning is capped at 120, including explicit overrides, and anchors later chunks to the first generated voice. Smaller overrides, single-chunk inputs and explicitly conditioned voices retain their chunk size."},{name:"text_chunk_mode",type:"enum",required:!1,default:"tag_aware",description:"Framework text chunking policy.",values:["default","tag_aware","japanese","endline"]},{name:"trim_silence",type:"bool",required:!1,default:!0,description:"Trim trailing low-energy 100-ms frames per fragment, retaining a 300-ms tail."},{name:"stream_frames_per_event",type:"int",description:"Maximum latent patches per streaming audio decode.",required:!1,default:4,min:1,max:64},{name:"stream_chunk_policy",type:"enum",description:"Streaming audio chunk schedule.",required:!1,default:"grow",values:["fixed","grow"]}],session:[{name:"reference_cache",type:"bool",required:!1,default:!0,description:"Reuse prepared conditioning for the most recently used reference waveform."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Ming-3.0-TTS-0.5B-GGUF",revision:"main",gated:!1}},packages:[{id:"ming_3_0_tts_0_5b_bf16",display_name:"Ming 3.0 TTS 0.5B BF16",format:"gguf",precision:"bf16",default:!0,target_directory:"Ming-3.0-TTS-0.5B-GGUF",files:["ming-3.0-tts-0.5b-bf16.gguf"]},{id:"ming_3_0_tts_0_5b_q8_0",display_name:"Ming 3.0 TTS 0.5B Q8_0",format:"gguf",precision:"q8_0",default:!1,target_directory:"Ming-3.0-TTS-0.5B-GGUF",files:["ming-3.0-tts-0.5b-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"ming_3_0_tts_0_5b_bf16",tags:["TTS","GGUF"],docs:["docs/models/ming3_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},tensors:{weights:"weights:",speaker:{source:"weights:",prefix:"speaker"}}}]},z8={schema_version:1,family:"minimax_h3",display_name:"MiniMax-H3",description:"MiniMax-H3 text-to-audio/video generation through the official T2VA pipeline: Qwen3-VL text conditioning, joint audio/video DiT denoising, and MiniMax-H3 audio/video VAE decode.",category:"audio_generation",status:"experimental",tasks:["tts","music","sfx"],modes:["offline"],languages:["auto"],capabilities:{tts:["style_control","multi_speaker"],music:["instrumental","style_control"],sfx:["prompt_generation"]},runtime:{tags:["cuda","gguf"]},ui:{recommended_package:"minimax_h3_q4_k",tags:["TTS","Music","SFX","GGUF"],docs:["docs/models/minimax_h3.md","docs/reports/minimax_h3_performance.md"]},options:{request:[{name:"num_inference_steps",type:"int",description:"Positive joint DiT denoising step count; default 50.",required:!1,min:1,default:50},{name:"seed",type:"int",description:"Unsigned 32-bit generation seed in [0, 4294967295] for deterministic initial latents; default 42.",required:!1,min:0,max:4294967295,default:42},{name:"height",type:"int",description:"Target video canvas height used by the joint T2VA latent layout; omitted or nonpositive values use 768. Smaller positive sizes are rounded up to the supported geometry.",required:!1,default:768},{name:"width",type:"int",description:"Target video canvas width used by the joint T2VA latent layout; omitted or nonpositive values use 1344. Smaller positive sizes are rounded up to the supported geometry.",required:!1,default:1344},{name:"num_frames",type:"int",description:"Target video frame count before H3 alignment; omitted or nonpositive values use 124. MiniMax-H3 video is 24 fps; positive counts are rounded to the supported temporal geometry.",required:!1,default:124},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; 1.0 matches the baseline T2VA audio run.",required:!1,default:1},{name:"sampler_mode",type:"enum",description:"Joint DiT sampler: euler, res_multistep, dpmpp_2m, or unipc.",values:["euler","res_multistep","dpmpp_2m","unipc"],required:!1,default:"euler"},{name:"negative_prompt",type:"string",description:"Negative prompt used by classifier-free guidance when guidance_scale is not 1.0.",required:!1,default:" "},{name:"flow_shift",type:"float",description:"Video FlowMatch scheduler shift.",required:!1,default:12},{name:"audio_flow_shift",type:"float",description:"Audio FlowMatch scheduler shift.",required:!1,default:3},{name:"return_video",type:"bool",description:"Decode and return RGB24 video frames as an output artifact.",required:!1,default:!1},{name:"text_layerwise",type:"bool",description:"Run the prompt encoder with scoped layer-group weights instead of a full prompt encoder weight store.",required:!1,default:!1},{name:"text_layerwise_batch",type:"int",description:"Prompt encoder layer-group size when text_layerwise is enabled.",required:!1,min:1,default:1},{name:"dit_layerwise",type:"bool",description:"Run the DiT denoiser with scoped prelude, block-group, and final weights instead of a full DiT weight store.",required:!1,default:!1},{name:"dit_layerwise_batch",type:"int",description:"DiT block-group size when dit_layerwise is enabled.",required:!1,min:1,default:1},{name:"dit_mlp_chunk_tokens",type:"int",description:"Token chunk size for the per-token DiT MLP in layerwise high-resolution mode. Zero disables chunking.",required:!1,min:0,default:0},{name:"dit_acceleration",type:"string",description:"Optional DiT acceleration mode: none, first_block_cache, or spectrum. Requires dit_layerwise=false and sampler_mode=euler; Spectrum additionally requires guidance_scale=1.",required:!1,default:"none"},{name:"first_block_cache_threshold",type:"float",description:"First-block cache residual-difference threshold.",required:!1,min:0,default:.1},{name:"first_block_cache_start_percent",type:"float",description:"Denoising progress fraction where first-block caching begins; must be below end_percent. Used to derive the sigma window when explicit sigma endpoints are omitted.",required:!1,min:0,max:1,default:.1},{name:"first_block_cache_end_percent",type:"float",description:"Denoising progress fraction where first-block caching ends; must exceed start_percent. Used to derive the sigma window when explicit sigma endpoints are omitted.",required:!1,min:0,max:1,default:.95},{name:"first_block_cache_start_sigma",type:"float",description:"Largest video sigma where first-block cache may be used. Supply together with first_block_cache_end_sigma; otherwise both endpoints are derived from the denoising progress fractions and schedule.",required:!1},{name:"first_block_cache_end_sigma",type:"float",description:"Smallest video sigma where first-block cache may be used. Supply together with first_block_cache_start_sigma; otherwise both endpoints are derived from the denoising progress fractions and schedule.",required:!1},{name:"first_block_cache_max_consecutive",type:"int",description:"Maximum consecutive first-block cache hits before forcing a full DiT step.",required:!1,min:1,default:2},{name:"spectrum_warmup_steps",type:"int",description:"Full DiT warmup steps before spectrum forecasting may skip steps.",required:!1,min:1,default:1},{name:"spectrum_initial_window",type:"float",description:"Initial spectrum forecast scheduling window.",required:!1,min:1,default:2},{name:"spectrum_flex_window",type:"float",description:"Spectrum forecast window growth after actual DiT steps.",required:!1,min:0,default:.75},{name:"spectrum_degree",type:"int",description:"Chebyshev polynomial degree for spectrum forecasting.",required:!1,min:0,default:1},{name:"spectrum_history_size",type:"int",description:"Maximum spectrum forecast history rows.",required:!1,min:1,default:8},{name:"spectrum_ridge_lambda",type:"float",description:"Ridge regularization for spectrum forecasting.",required:!1,min:0,default:.1}],session:[{name:"weight_context_mb",type:"int",description:"MiniMax-H3 staged weight context size in MiB.",required:!1,min:1,default:512},{name:"mem_saver",type:"bool",description:"Release staged DiT, audio VAE, and video VAE weights after their request phase instead of keeping them resident for the session. Prompt encoder weights are always request-scoped.",required:!1,default:!0}],load:[]},dependencies:[],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"minimax_h3_q4_k",display_name:"MiniMax-H3 Q4_K GGUF",default:!0,format:"gguf",precision:"q4_k",target_directory:"MiniMax-H3-Q4-GGUF",files:["MiniMax-H3-Q4-GGUF/configuration.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/chat_template.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/merges.txt","MiniMax-H3-Q4-GGUF/FL2VA/processor/preprocessor_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/tokenizer.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/tokenizer_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/video_preprocessor_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/vocab.json","MiniMax-H3-Q4-GGUF/text_encoder_q4_k.gguf","MiniMax-H3-Q4-GGUF/dit.gguf","MiniMax-H3-Q4-GGUF/audio_vae_folded_f16.gguf","MiniMax-H3-Q4-GGUF/video_vae.gguf"],strip_prefix:"MiniMax-H3-Q4-GGUF"},{id:"minimax_h3_q4_k_int8_dit",display_name:"MiniMax-H3 Q4_K GGUF + INT8 ConvRot DiT",default:!1,format:"gguf",precision:"q4_k",target_directory:"MiniMax-H3-Q4-GGUF",files:["MiniMax-H3-Q4-GGUF/configuration.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/chat_template.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/merges.txt","MiniMax-H3-Q4-GGUF/FL2VA/processor/preprocessor_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/tokenizer.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/tokenizer_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/video_preprocessor_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/vocab.json","MiniMax-H3-Q4-GGUF/text_encoder_q4_k.gguf","MiniMax-H3-Q4-GGUF/dit_int8.gguf","MiniMax-H3-Q4-GGUF/audio_vae_folded_f16.gguf","MiniMax-H3-Q4-GGUF/video_vae.gguf"],strip_prefix:"MiniMax-H3-Q4-GGUF"}],sources:[{format:"gguf",roots:{model:"."},files:{configuration:"model:configuration.json",tokenizer_config:"model:FL2VA/processor/tokenizer_config.json",tokenizer_json:"model:FL2VA/processor/tokenizer.json",vocab:"model:FL2VA/processor/vocab.json",merges:"model:FL2VA/processor/merges.txt",preprocessor_config:"model:FL2VA/processor/preprocessor_config.json"},tensors:{text_encoder_weights:"model:text_encoder_q4_k.gguf",dit_weights:"model:dit.gguf",audio_vae_weights:"model:audio_vae_folded_f16.gguf",video_vae_weights:"model:video_vae.gguf"}}]},E8={schema_version:1,family:"minimax_music3",display_name:"MiniMax Music 3",description:"MiniMax Music 3 text-to-music generation with lyrics conditioning.",category:"audio_generation",status:"experimental",tasks:["music"],modes:["offline"],languages:["auto"],capabilities:{music:["lyrics","style_control"]},runtime:{tags:["gguf"]},options:{request:[{name:"lyrics",type:"string",description:"Lyrics to sing. Structure tags such as [verse] and [chorus] are supported.",required:!0},{name:"duration_sec",type:"float",description:"Positive AR frame budget expressed in seconds; not a hard final waveform duration limit.",required:!1,min:.1,default:20},{name:"num_inference_steps",type:"int",description:"Flow matching Euler steps per chunk.",required:!1,min:1,default:30},{name:"guidance_scale",type:"float",description:"Flow transformer classifier-free guidance scale. Must be > 0.",required:!1,min:0,default:1.7},{name:"ar_guidance_scale",type:"float",description:"Autoregressive semantic and depth CFG scale. Must be > 0.",required:!1,min:0,default:1.5},{name:"top_k",type:"int",description:"Top-k sampling for semantic and residual code sampling.",required:!1,min:1,default:50},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,default:0},{name:"flow_uncond_interval",type:"int",description:"Evaluate unconditional flow CFG every N-th step, reusing the guidance delta between evaluations. Values <= 1 disable reuse and evaluate both branches every step.",required:!1,default:1},{name:"flow_uncond_warmup",type:"int",description:"Initial flow steps that evaluate both CFG branches before guidance-delta reuse; nonpositive values add no warmup.",required:!1,default:2},{name:"ensemble_takes",type:"int",description:"Independent takes in a batched AR pass using consecutive seeds; flow/vocoder decode each take. Named outputs take_01 through take_NN are emitted only when ensemble_takes > 1; otherwise only primary audio is returned.",required:!1,min:1,max:16,default:1},{name:"ensemble_prefix_frames",type:"int",description:"Shared intro frames before ensemble takes fork, approximately 25 frames per second. Zero disables intro locking.",required:!1,min:0,default:0},{name:"flow_chunk_hop_frames",type:"int",description:"Flow chunk hop in AR frames, approximately 25 per second. Zero uses checkpoint configuration; positive values are capped at the configured chunk size.",required:!1,min:0,default:0}],session:[{name:"weight_type",type:"enum",values:["native","bf16","f16","q8_0","q4_0","q4_k"],description:"Shared weight storage type.",required:!1,default:"native"},{name:"language_model_gguf",type:"string",description:"Language model component GGUF file relative to the model root.",required:!1,default:"language_model_q4_0.gguf"},{name:"rvq_depth_decoder_gguf",type:"string",description:"RVQ depth decoder component GGUF file relative to the model root.",required:!1,default:"rvq_depth_decoder_q8_0.gguf"},{name:"flow_transformer_gguf",type:"string",description:"Flow transformer component GGUF file relative to the model root.",required:!1,default:"transformer_q4_0.gguf"},{name:"graph_arena_mb",type:"int",description:"Host graph-metadata arena size in MiB, not device workspace; legacy graph_context_mb remains accepted.",required:!1,min:1,default:32},{name:"weight_context_mb",type:"int",description:"Weight context size in MiB.",required:!1,min:1,default:32},{name:"mem_saver",type:"bool",description:"Load large generation stages only while they are needed to reduce peak VRAM.",required:!1,default:!0},{name:"perf_mode",type:"enum",values:["off","cuda_perf"],description:"Performance preset. cuda_perf selects attention-prefix buckets of 256 rows. Explicit controls override preset values.",required:!1,default:"off"},{name:"kv_cache_alignment",type:"int",description:"Attention-prefix bucket size. 1 preserves full-capacity attention; cuda_perf selects 256. Retains all valid history, but graph shapes may change sampled output. Explicit values override the preset.",required:!1,min:1},{name:"pipeline_overlap",type:"bool",description:"Overlap AR decoding with condition/flow/vocoder work on a second backend stream. Requires mem_saver=false; mem_saver=true is an error. Long requests and nondefault chunk hops use sequential execution.",required:!1,default:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/MiniMax-Music3-GGUF",revision:"main",gated:!1}},packages:[{id:"minimax_music3_q4_0",display_name:"MiniMax Music 3 Q4_0 GGUF",default:!0,format:"gguf",precision:"q4_0",target_directory:"MiniMax-Music3-GGUF",files:["config.json","config/language_model.json","config/rvq_depth_decoder.json","config/condition_encoder.json","config/transformer.json","config/vocoder.json","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","language_model_q4_0.gguf","rvq_depth_decoder_q8_0.gguf","condition_encoder.gguf","transformer_q4_0.gguf","vocoder.gguf"]},{id:"minimax_music3_q8_0",display_name:"MiniMax Music 3 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"MiniMax-Music3-GGUF",files:["config.json","config/language_model.json","config/rvq_depth_decoder.json","config/condition_encoder.json","config/transformer.json","config/vocoder.json","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","language_model_q8_0.gguf","rvq_depth_decoder_q8_0.gguf","condition_encoder.gguf","transformer_q8_0.gguf","vocoder.gguf"]},{id:"minimax_music3_bf16",display_name:"MiniMax Music 3 BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"MiniMax-Music3-GGUF",files:["config.json","config/language_model.json","config/rvq_depth_decoder.json","config/condition_encoder.json","config/transformer.json","config/vocoder.json","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","language_model_bf16.gguf","rvq_depth_decoder_bf16.gguf","condition_encoder.gguf","transformer_bf16.gguf","vocoder.gguf"]}],dependencies:[],ui:{recommended_package:"minimax_music3_q4_0",tags:["Music","GGUF"],docs:["docs/models/minimax_music3.md","docs/music_generation.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:"."},files:{root_config:"model:config.json",language_model_config:"model:config/language_model.json",depth_decoder_config:"model:config/rvq_depth_decoder.json",condition_encoder_config:"model:config/condition_encoder.json",transformer_config:"model:config/transformer.json",vocoder_config:"model:config/vocoder.json",tokenizer_json:"model:tokenizer/tokenizer.json",tokenizer_config:"model:tokenizer/tokenizer_config.json"}},{format:"safetensors",roots:{model:"."},files:{root_config:"model:config.json",language_model_config:"model:config/language_model.json",depth_decoder_config:"model:config/rvq_depth_decoder.json",condition_encoder_config:"model:config/condition_encoder.json",transformer_config:"model:config/transformer.json",vocoder_config:"model:config/vocoder.json",tokenizer_json:"model:tokenizer/tokenizer.json",tokenizer_config:"model:tokenizer/tokenizer_config.json"},tensors:{language_model_weights:{source:"model:language_model/model.safetensors.index.json"},depth_decoder_weights:{source:"model:rvq_depth_decoder/diffusion_pytorch_model.safetensors"},condition_encoder_weights:{source:"model:condition_encoder/diffusion_pytorch_model.safetensors"},transformer_weights:{source:"model:transformer/diffusion_pytorch_model.safetensors.index.json"},vocoder_weights:{source:"model:vocoder/diffusion_pytorch_model.safetensors"}}}]},U8={family:"miocodec",display_name:"MioCodec",description:"Lightweight neural audio codec that encodes 44.1 kHz audio into a low-rate 25 Hz discrete token stream and decodes tokens with speaker conditioning for efficient speech modeling.",category:"audio_tools",status:"supported",tasks:["vc","s2s"],modes:["offline"],languages:["language_agnostic"],options:{request:[],session:[{name:"weight_type",type:"enum",description:"Weight storage type.",required:!1,preset:"weight_type_full",default:"f32"},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"constant_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"content_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"global_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"wave_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512}],load:[]},capabilities:{codec:["encode_decode"],vc:["speaker_reference"],s2s:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"miocodec_q8_0",tags:["Codec","VC","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"miocodec_q8_0",display_name:"MioCodec 25Hz 44.1kHz v2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MioCodec-25Hz-44.1kHz-v2-GGUF",files:["MioCodec-25Hz-44.1kHz-v2-GGUF/miocodec-25hz-44khz-v2-q8_0.gguf"],strip_prefix:"MioCodec-25Hz-44.1kHz-v2-GGUF"},{id:"miocodec_f16",display_name:"MioCodec 25Hz 44.1kHz v2 F16 GGUF",format:"gguf",precision:"f16",target_directory:"MioCodec-25Hz-44.1kHz-v2-GGUF",files:["MioCodec-25Hz-44.1kHz-v2-GGUF/miocodec-25hz-44khz-v2-f16.gguf"],strip_prefix:"MioCodec-25Hz-44.1kHz-v2-GGUF"},{id:"miocodec_orig",display_name:"MioCodec 25Hz 44.1kHz v2 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"MioCodec-25Hz-44.1kHz-v2-GGUF",files:["MioCodec-25Hz-44.1kHz-v2-GGUF/miocodec-25hz-44khz-v2-orig.gguf"],strip_prefix:"MioCodec-25Hz-44.1kHz-v2-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.yaml"},tensors:{weights:{source:"weights:",prefix:"weights"},wavlm_weights:{source:"weights:",prefix:"wavlm_weights"}}},{format:"safetensors",roots:{model:".",wavlm:"wavlm-base-plus-mlx"},files:{config:"model:config.yaml"},tensors:{weights:"model:model.safetensors",wavlm_weights:"wavlm:weights.safetensors"}}]},R8={family:"miotts",display_name:"MioTTS",description:"Lightweight LLM-based English and Japanese TTS family built on MioCodec, supporting low-latency speech generation and zero-shot voice cloning from short reference audio.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline"],languages:["en","ja"],options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated tokens; default 700.",required:!1,min:1},{name:"top_k",type:"int",description:"Generation control; defaults to the checkpoint config.",required:!1},{name:"top_p",type:"float",description:"Generation control; defaults to the checkpoint config.",required:!1,min:0,max:1},{name:"temperature",type:"float",description:"Generation control; defaults to the checkpoint config.",required:!1,min:0,max:2},{name:"repetition_penalty",type:"float",description:"Generation control; defaults to the checkpoint config.",required:!1,min:1,max:1.5},{name:"presence_penalty",type:"float",description:"Presence penalty; default 0.",required:!1,min:0,max:1},{name:"frequency_penalty",type:"float",description:"Frequency penalty; default 0.",required:!1,min:0,max:1},{name:"do_sample",type:"bool",description:"Generation control; defaults to the checkpoint config.",required:!1},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0,max:4294967295},{name:"best_of_n",type:"int",description:"Candidate count, capped by the session maximum; greater than one enables best-of-N.",required:!1,min:1},{name:"best_of_n_enabled",type:"bool",description:"Override the session best-of-N setting.",required:!1},{name:"best_of_n_language",type:"enum",description:"ASR language used to rank candidates.",required:!1,values:["auto","en","ja"]},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size; inherits the session setting.",required:!1,min:1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; defaults to native.",required:!1,preset:"weight_type_full"},{name:"codec_model_path",type:"path",description:"MioCodec model path; defaults to sibling MioCodec-25Hz-44.1kHz-v2.",required:!1},{name:"best_of_n_asr_model_path",type:"path",description:"ASR model path for candidate ranking; defaults to sibling Qwen3-ASR-0.6B.",required:!1},{name:"text_chunk_size",type:"int",description:"Default framework text chunk size; 120 when hanzi, kana and Hangul outnumber other letters and digits, otherwise 180.",required:!1},{name:"best_of_n_enabled",type:"bool",description:"Enable candidate generation and ASR ranking.",required:!1,default:!1},{name:"best_of_n_default",type:"int",description:"Default candidate count.",required:!1,min:1,default:1},{name:"best_of_n_max",type:"int",description:"Maximum candidate count.",required:!1,min:1,default:8},{name:"best_of_n_language",type:"enum",description:"ASR language used to rank candidates.",required:!1,values:["auto","en","ja"],default:"auto"},{name:"prefill_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:1024},{name:"decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"codec_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"codec_constant_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"global_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"wave_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512}],load:[]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"miotts_1_7b_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/miotts.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"miotts_1_7b_q8_0",display_name:"MioTTS 1.7B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MioTTS-1.7B-GGUF",files:["MioTTS-1.7B-GGUF/miotts-1.7b-q8_0.gguf"],strip_prefix:"MioTTS-1.7B-GGUF"},{id:"miotts_1_7b_bf16",display_name:"MioTTS 1.7B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"MioTTS-1.7B-GGUF",files:["MioTTS-1.7B-GGUF/miotts-1.7b-bf16.gguf"],strip_prefix:"MioTTS-1.7B-GGUF"},{id:"miotts_1_7b_orig",display_name:"MioTTS 1.7B Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"MioTTS-1.7B-GGUF",files:["MioTTS-1.7B-GGUF/miotts-1.7b-orig.gguf"],strip_prefix:"MioTTS-1.7B-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},optional_files:{tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},optional_files:{tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},B8={schema_version:1,family:"mira_tts",display_name:"MiraTTS",description:"MiraTTS is a community voice-cloning TTS model with a Qwen2 autoregressive speech-token generator, ECAPA/Perceiver speaker tokenizer, conditional acoustic processor, and DAC decoder.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["speaker_reference"],clone:["speaker_reference"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum autoregressive speech tokens; default 1024.",required:!1,min:1,default:1024},{name:"temperature",type:"float",description:"Sampling temperature; default 0.8. Must be positive.",required:!1,default:.8},{name:"top_k",type:"int",description:"Top-k sampling cutoff; default 50.",required:!1,min:1,default:50},{name:"top_p",type:"float",description:"Nucleus sampling probability; default 0.95. Must be positive.",required:!1,max:1,default:.95},{name:"min_p",type:"float",description:"Minimum probability relative to the most likely token; default 0.05.",required:!1,min:0,max:1,default:.05},{name:"repetition_penalty",type:"float",description:"Autoregressive repetition penalty; default 1.2.",required:!1,min:1,default:1.2},{name:"text_chunk_size",type:"int",description:"Maximum codepoints per progressively emitted streaming segment; default 160.",required:!1,min:1,default:160},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode used by streaming synthesis.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"seed",type:"int",description:"Sampling seed; omitted requests choose a random seed.",required:!1,min:0}],session:[{name:"reference_cache_slots",type:"int",description:"Encoded reference-voice cache slots; default 1. Set to 0 to disable reuse.",required:!1,min:0,default:1},{name:"backbone_weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"native",description:"Storage type for the Qwen2 language-model weights."},{name:"linear_weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"native",description:"Storage type for non-convolutional speaker, processor, and decoder weights."},{name:"conv_weight_type",type:"enum",required:!1,default:"f32",description:"Storage type for speaker and processor convolution weights. The DAC transposed-convolution decoder remains F32 for CUDA compatibility. Applies to the speaker encoder/acoustic processor; waveform decoder remains f32.",values:["native","f32","f16","bf16"]}],load:[]},packages:[],dependencies:[],ui:{tags:["TTS","Clone"],docs:["docs/models/mira_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{language_model:{source:"weights:",prefix:"language_model"},speaker_encoder:{source:"weights:",prefix:"speaker_encoder"},processor:{source:"weights:",prefix:"processor"},decoder:{source:"weights:",prefix:"decoder"},upsampler:{source:"weights:",prefix:"upsampler"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{language_model:"model:language_model.safetensors",speaker_encoder:"model:speaker_encoder.safetensors",processor:"model:processor.safetensors",decoder:"model:decoder.safetensors",upsampler:"model:upsampler.safetensors"}}]},P8={schema_version:1,family:"mms_forced_aligner",display_name:"Meta MMS-300M Forced Aligner",description:"Meta MMS-300M multilingual CTC forced aligner (Wav2Vec2ForCTC) that aligns an exact transcript to mono/stereo audio and returns word timestamps. The checkpoint covers 1,130 languages, but this port's native text normalization supports Dutch (nl/nld) and English (en/eng) Latin script only; text_normalization=pre_romanized accepts caller-supplied ASCII romanization, and unsupported non-Latin input is rejected. Checkpoint license: CC-BY-NC-4.0; GGUF conversion is local-only, no public redistribution is approved.",category:"speech_analysis",status:"community",tasks:["align"],modes:["offline"],languages:["multilingual"],capabilities:{align:["word_timestamps"]},dependencies:[],options:{request:[{name:"language",type:"string",description:"Language code. Built-in normalization supports nl/nld and en/eng; pre_romanized accepts any nonempty code.",required:!0},{name:"text_normalization",type:"enum",description:"Transcript normalization mode; latin handles Dutch/English Latin script natively, pre_romanized trusts caller-supplied ASCII romanization.",values:["latin","pre_romanized"],required:!1,default:"latin"},{name:"star_frequency",type:"enum",description:"Placement of the virtual CTC target between words (segment) or at transcript edges (edges); matches the reference default segment.",values:["segment","edges"],required:!1,default:"segment"},{name:"merge_threshold_sec",type:"float",description:"Close gaps at or below this threshold, rounded to alignment frames, by moving the later word start; word entries remain separate. Default 0.0 disables gap closure.",required:!1,min:0,default:0},{name:"return_timestamps",type:"bool",description:"Compatibility option; word timestamps are always returned, including when false.",required:!1,default:!0}],session:[{name:"emission_window_sec",type:"float",description:"Center emission window length in seconds used to split long waveforms; must be > 0 and at most 3600. Rounded 16 kHz sample count must be a multiple of 320 (20 ms); default 30.",required:!1,min:.02,max:3600,default:30},{name:"emission_context_sec",type:"float",description:"Left/right context appended to each emission window in seconds; must be nonnegative, at most 3600, and below emission_window_sec. Rounded 16 kHz sample count must be a multiple of 320 (20 ms); default 2.",required:!1,min:0,max:3600,default:2},{name:"max_alignment_cells",type:"int",description:"Hard cap on CTC DP cells (frames x states) allocated per request; alignment fails before allocation when exceeded; default 50000000.",required:!1,min:1,default:5e7},{name:"max_target_tokens",type:"int",description:"Hard cap on flattened CTC target tokens per request; default 8192.",required:!1,min:1,default:8192},{name:"weight_type",type:"enum",description:"Weight storage type; default native (tensors kept as stored in the checkpoint).",preset:"weight_type_conv",required:!1,default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"mms_forced_aligner_300m_f16",tags:["Align","GGUF"],docs:["docs/models/mms_forced_aligner.md","docs/speech_analysis.md","docs/gguf.md"]},package_defaults:{download:{kind:"unsupported",reason:"CC-BY-NC-4.0 checkpoint: convert locally with audiocpp_gguf; no public audio.cpp GGUF distribution is approved."}},packages:[{id:"mms_forced_aligner_300m_f16",display_name:"Meta MMS-300M Forced Aligner F16 GGUF",default:!0,format:"gguf",precision:"f16",target_directory:"MMS-Forced-Aligner-GGUF",files:["MMS-Forced-Aligner-GGUF/mms-forced-aligner-f16.gguf"],strip_prefix:"MMS-Forced-Aligner-GGUF"},{id:"mms_forced_aligner_300m_safetensors",display_name:"Meta MMS-300M Forced Aligner Safetensors",format:"safetensors",precision:"native",target_directory:"mms-300m-1130-forced-aligner",files:["config.json","model.safetensors","special_tokens_map.json","tokenizer_config.json","vocab.json"],download:{kind:"huggingface_snapshot",repo:"MahmoudAshraf/mms-300m-1130-forced-aligner",revision:"49402e9577b1158620820667c218cd494cc44486",gated:!1}},{id:"mms_forced_aligner_300m_q8_0",display_name:"Meta MMS-300M Forced Aligner Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"MMS-Forced-Aligner-GGUF",files:["MMS-Forced-Aligner-GGUF/mms-forced-aligner-q8_0.gguf"],strip_prefix:"MMS-Forced-Aligner-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",vocab:"model:vocab.json"},optional_files:{special_tokens_map:"model:special_tokens_map.json",tokenizer_config:"model:tokenizer_config.json",preprocessor_config:"model:preprocessor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",vocab:"model:vocab.json"},optional_files:{special_tokens_map:"model:special_tokens_map.json",tokenizer_config:"model:tokenizer_config.json",preprocessor_config:"model:preprocessor_config.json"},tensors:{weights:"model:model.safetensors"}}]},j8={schema_version:1,family:"moonshine_asr",display_name:"Moonshine Streaming ASR",description:"Moonshine tiny/small/medium streaming English speech recognition models.",category:"asr",status:"experimental",tasks:["asr"],modes:["offline","streaming"],languages:["en"],capabilities:{asr:["vad_chunking"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens. Defaults to audio-duration derived limit. Nonpositive values select the automatic budget.",required:!1,default:0},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio chunk in seconds. Must be positive and round to a nonempty sample count.",required:!1,default:60}],session:[{name:"exec_plan",type:"string",description:"JSON component execution plans. Component decoder accepts impl default/ggml/neon and optional backend. Default retains GGML on the session backend; neon requires ENGINE_ENABLE_NEON=ON and an AArch64 NEON CPU session. No artifacts or params are used.",required:!1,default:"{}"},{name:"weight_type",type:"enum",description:"Shared matmul weight storage type. Omitted uses native, except the CPU encoder with hidden size 620, 10 layers and decoder hidden size 512 uses f16. The decoder defaults to native unless explicitly overridden.",values:["native","f32","f16"],required:!1},{name:"conv_weight_type",type:"enum",description:"Frontend convolution weight storage type.",preset:"weight_type_conv",required:!1},{name:"decoder_weight_type",type:"enum",description:"Decoder matmul weight storage type; inherits an explicit weight_type setting, otherwise native.",values:["native","f32","f16"],required:!1},{name:"encoder_gelu",type:"enum",description:"Encoder GELU lowering.",values:["erf","exact","tanh","quick"],required:!1,default:"quick"},{name:"cpu_blas_scheduler",type:"bool",description:"Use BLAS/Accelerate for supported CPU encoder matmuls.",required:!1,default:!0},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB.",required:!1,min:1,default:256},{name:"graph_arena_mb",type:"int",description:"Graph arena size in MiB.",required:!1,min:1,default:512},{name:"vad_model_path",type:"path",description:"VAD model path used by audio_chunk_mode=vad (any built-in VAD family; default Silero VAD).",required:!1,default:"assets/framework/models/silero_vad"}],load:[]},runtime:{tags:["gguf","cpu","stream"]},ui:{recommended_package:"moonshine_streaming_tiny_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/asr.md","docs/models/moonshine_asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moonshine_streaming_tiny_q8_0",display_name:"Moonshine Streaming Tiny Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Moonshine-Streaming-GGUF",files:["Moonshine-Streaming-GGUF/moonshine-streaming-tiny-q8_0.gguf"],strip_prefix:"Moonshine-Streaming-GGUF"},{id:"moonshine_streaming_small_q8_0",display_name:"Moonshine Streaming Small Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Moonshine-Streaming-GGUF",files:["Moonshine-Streaming-GGUF/moonshine-streaming-small-q8_0.gguf"],strip_prefix:"Moonshine-Streaming-GGUF"},{id:"moonshine_streaming_medium_q8_0",display_name:"Moonshine Streaming Medium Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Moonshine-Streaming-GGUF",files:["Moonshine-Streaming-GGUF/moonshine-streaming-medium-q8_0.gguf"],strip_prefix:"Moonshine-Streaming-GGUF"},{id:"moonshine_streaming_tiny_safetensors",display_name:"Moonshine Streaming Tiny Safetensors",format:"safetensors",precision:"f32",target_directory:"moonshine-streaming-tiny",files:["config.json","tokenizer.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"moonshine-ai/moonshine-streaming-tiny",revision:"main",gated:!1}},{id:"moonshine_streaming_small_safetensors",display_name:"Moonshine Streaming Small Safetensors",format:"safetensors",precision:"f32",target_directory:"moonshine-streaming-small",files:["config.json","tokenizer.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"moonshine-ai/moonshine-streaming-small",revision:"main",gated:!1}},{id:"moonshine_streaming_medium_safetensors",display_name:"Moonshine Streaming Medium Safetensors",format:"safetensors",precision:"f32",target_directory:"moonshine-streaming-medium",files:["config.json","tokenizer.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"moonshine-ai/moonshine-streaming-medium",revision:"main",gated:!1}}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},N8={schema_version:1,family:"moss_transcribe_diarize",display_name:"MOSS-Transcribe-Diarize",description:"Joint transcription, speaker diarization, and timestamps across 50+ languages with a Whisper encoder and Qwen3 decoder.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["auto","50+ languages"],capabilities:{asr:["segments","speaker_turns"]},runtime:{tags:["gguf"]},options:{request:[{name:"max_tokens",type:"int",min:1,required:!1,description:"Maximum generated transcript tokens. Defaults to checkpoint generation_config.max_new_tokens; must be positive."},{name:"instruct",type:"string",required:!1,description:"Transcription instruction; empty uses the upstream diarization prompt."}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moss_transcribe_diarize_bf16",display_name:"MOSS-Transcribe-Diarize GGUF BF16",default:!0,format:"gguf",precision:"bf16",target_directory:"MOSS-Transcribe-Diarize-GGUF",files:["MOSS-Transcribe-Diarize-GGUF/moss-transcribe-diarize-bf16.gguf"],strip_prefix:"MOSS-Transcribe-Diarize-GGUF"},{id:"moss_transcribe_diarize_q8_0",display_name:"MOSS-Transcribe-Diarize GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"MOSS-Transcribe-Diarize-GGUF",files:["MOSS-Transcribe-Diarize-GGUF/moss-transcribe-diarize-q8_0.gguf"],strip_prefix:"MOSS-Transcribe-Diarize-GGUF"},{id:"moss_transcribe_diarize_q4_k",display_name:"MOSS-Transcribe-Diarize GGUF Q4_K",format:"gguf",precision:"q4_k",target_directory:"MOSS-Transcribe-Diarize-GGUF",files:["MOSS-Transcribe-Diarize-GGUF/moss-transcribe-diarize-q4_k.gguf"],strip_prefix:"MOSS-Transcribe-Diarize-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:[],recommended_package:"moss_transcribe_diarize_bf16"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},O8={family:"moss_tts_local",display_name:"MOSS-TTS-Local",description:"Flagship MOSS-TTS model for high-fidelity 31-language and code-switched speech, zero-shot voice cloning, long-form generation, and fine-grained Pinyin, phoneme, and duration control.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline"],languages:["ar","cs","da","de","el","en","es","fa","fi","fr","he","hi","hu","it","ja","ko","mk","ms","nl","pl","pt","ro","ru","sv","sw","th","tl","tr","vi","yue","zh"],options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated audio frames.",required:!1,min:1,default:4096},{name:"do_sample",type:"bool",description:"Enable sampling.",required:!1,default:!0},{name:"temperature",type:"float",description:"Audio sampling temperature. Must be finite and positive when sampling.",required:!1,default:1.7},{name:"top_p",type:"float",description:"Audio nucleus sampling probability.",required:!1,default:.8},{name:"top_k",type:"int",description:"Audio top-k sampling limit.",required:!1,default:25},{name:"repetition_penalty",type:"float",description:"Audio repetition penalty. Must be finite and positive when token history is nonempty.",required:!1,default:1},{name:"text_temperature",type:"float",description:"Text sampling temperature. Must be finite and positive when sampling.",required:!1,default:1},{name:"text_top_p",type:"float",description:"Text nucleus sampling probability.",required:!1,default:1},{name:"text_top_k",type:"int",description:"Text top-k sampling limit.",required:!1,default:50},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size.",required:!1,default:2048,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,values:["default","tag_aware","japanese","endline"],default:"default"}],session:[{name:"weight_type",type:"enum",description:"Backbone weight storage; auto uses F32 on CPU, BF16 on CUDA, native on other backends.",required:!1,values:["auto","native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],default:"auto"},{name:"reference_cache_slots",type:"int",description:"Encoded reference cache slots; zero disables reuse.",required:!1,min:0,default:1}],load:[]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"moss_tts_local_v1_5_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/moss_tts_local.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moss_tts_local_v1_5_q8_0",display_name:"MOSS-TTS-Local v1.5 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MOSS-TTS-Local-v1.5-GGUF",files:["MOSS-TTS-Local-v1.5-GGUF/moss-tts-local-v1.5-q8_0.gguf"],strip_prefix:"MOSS-TTS-Local-v1.5-GGUF"},{id:"moss_tts_local_v1_5_bf16",display_name:"MOSS-TTS-Local v1.5 BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"MOSS-TTS-Local-v1.5-GGUF",files:["MOSS-TTS-Local-v1.5-GGUF/moss-tts-local-v1.5-bf16.gguf"],strip_prefix:"MOSS-TTS-Local-v1.5-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}]},I8={family:"moss_tts_nano",display_name:"MOSS-TTS-Nano",description:"Compact deployment-first MOSS-TTS model for real-time multilingual speech generation, lightweight integration, and zero-shot voice cloning.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["ar","cs","da","de","el","en","es","fa","fr","hu","it","ja","ko","pl","pt","ru","sv","tr","zh"],options:{request:[{name:"reference_text",type:"string",description:"Transcript for reference audio; a nonempty value requires voice reference audio.",required:!1,default:""},{name:"max_tokens",type:"int",description:"Maximum generated audio frames.",required:!1,min:1,default:300},{name:"active_codebooks",type:"int",description:"Active codebooks; defaults to the checkpoint n_vq. Must not exceed checkpoint n_vq; omitted uses n_vq.",required:!1,min:1},{name:"do_sample",type:"bool",description:"Enable sampling.",required:!1,default:!0},{name:"temperature",type:"float",description:"Audio sampling temperature. Must be positive, including when do_sample=false.",required:!1,default:1.7},{name:"top_p",type:"float",description:"Audio nucleus sampling probability.",required:!1,default:.8,min:0,max:1},{name:"top_k",type:"int",description:"Audio top-k sampling limit.",required:!1,default:25,min:0},{name:"repetition_penalty",type:"float",description:"Audio repetition penalty. Must be positive.",required:!1,default:1},{name:"text_temperature",type:"float",description:"Text sampling temperature. Must be positive, including when do_sample=false.",required:!1,default:1.5},{name:"text_top_p",type:"float",description:"Text nucleus sampling probability.",required:!1,default:1,min:0,max:1},{name:"text_top_k",type:"int",description:"Text top-k sampling limit.",required:!1,default:50,min:0},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size; default 50 when hanzi, kana and Hangul outnumber other letters and digits, otherwise 256.",required:!1,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,values:["default","tag_aware","japanese","endline"],default:"default"}],session:[{name:"weight_type",type:"enum",description:"Weight storage type.",required:!1,preset:"weight_type_full",default:"native"},{name:"global_weight_type",type:"enum",description:"Global transformer weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"local_frame_weight_type",type:"enum",description:"Local frame decoder weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"prefill_mode",type:"enum",description:"How prompt rows are forwarded: one batched graph (default, fast) or one row at a time through the decode graph. single_row keeps quantized runs on a single kernel family for numerical self-consistency at a one-time prefill latency cost; see the model docs' quantization notes.",required:!1,values:["batched","single_row"],default:"batched"},{name:"global_prefill_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"global_decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128},{name:"global_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"local_frame_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"local_frame_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128},{name:"audio_tokenizer_encoder_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"audio_tokenizer_decoder_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"audio_tokenizer_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128}],load:[]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"moss_tts_nano_100m_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/moss_tts_nano.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moss_tts_nano_100m_q8_0",display_name:"MOSS-TTS-Nano 100M Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MOSS-TTS-Nano-100M-GGUF",files:["MOSS-TTS-Nano-100M-GGUF/moss-tts-nano-100m-q8_0.gguf"],strip_prefix:"MOSS-TTS-Nano-100M-GGUF"},{id:"moss_tts_nano_100m_bf16",display_name:"MOSS-TTS-Nano 100M BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"MOSS-TTS-Nano-100M-GGUF",files:["MOSS-TTS-Nano-100M-GGUF/moss-tts-nano-100m-bf16.gguf"],strip_prefix:"MOSS-TTS-Nano-100M-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_model:"model:tokenizer.model",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_model:"model:tokenizer.model",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}]},D8={schema_version:1,family:"moss_tts_v15",display_name:"MOSS-TTS-v1.5",description:"8B delay-pattern MOSS-TTS: zero-shot voice cloning from a short reference, 24 kHz, with an explicit duration budget.",category:"community",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en","zh"],capabilities:{tts:["speaker_reference","style_control","long_form"],clone:["speaker_reference"]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors.index.json",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}],options:{request:[{name:"min_frames",type:"int",required:!1,default:0,description:"Minimum generated audio frames per text chunk; nonpositive values derive a text-length-based floor. Separate from duration_frames conditioning."},{name:"max_frames",type:"int",required:!1,default:0,description:"Generated audio-frame ceiling per text chunk; nonpositive values derive a text-length-based ceiling. Runtime raises it to at least the effective min_frames plus the number of codebooks."},{name:"instruct",type:"string",required:!1,description:"Voice description. Followed only loosely on this checkpoint; a reference recording is far more reliable."},{name:"duration_frames",type:"int",required:!1,description:"Duration budget in codec frames at 12.5 a second, the model's own '- Tokens:' field. Nonpositive values disable duration conditioning."},{name:"language",type:"string",required:!1,description:"Full language name; the model does not understand codes like 'en'."},{name:"seed",type:"int",required:!1,description:"Reproduces a take exactly; default 0. Parsed as signed 32-bit integer then converted to uint32; negative values wrap.",default:0},{name:"text_temperature",type:"float",required:!1,default:1.5,description:"Text-token sampling temperature. Must be finite and positive when sampling."},{name:"temperature",type:"float",required:!1,description:"Audio sampling temperature; default 1.5. Must be finite and positive when sampling.",default:1.5},{name:"top_p",type:"float",required:!1,description:"Audio nucleus sampling cutoff; default 0.6.",default:.6},{name:"top_k",type:"int",required:!1,description:"Audio top-k; default 50.",default:50},{name:"repetition_penalty",type:"float",required:!1,description:"Audio repetition penalty; default 1.1. Must be finite and positive when history is nonempty.",default:1.1},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 200.",required:!1,min:1,default:200},{name:"text_chunk_mode",type:"enum",description:"Text chunking policy; word_budget also accepts default.",values:["word_budget","tag_aware","japanese","endline"],required:!1,default:"word_budget"}],session:[{name:"weight_type",type:"enum",values:["native","f32","bf16","q8_0"],required:!1,default:"native",description:"Backbone and head weight storage; default native, which keeps a GGUF package's own type. Forcing bf16 dequantises a quantised package and costs the VRAM the quantisation was meant to save. f16 is rejected: this backbone produces NaN in it."}],load:[]},ui:{tags:["TTS","Clone","GGUF"],docs:["docs/models/moss_tts_v15.md","docs/tts.md","docs/gguf.md"],recommended_package:"moss_tts_v15_q8_0_codec_f16"},packages:[{id:"moss_tts_v15_q8_0_codec_f16",display_name:"MOSS-TTS-v1.5 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MOSS-TTS-v1.5-GGUF",files:["moss_tts_v15_q8_0_codec_f16.gguf"]},{id:"moss_tts_v15_q4_k_codec_f16",display_name:"MOSS-TTS-v1.5 Q4_K GGUF",default:!1,format:"gguf",precision:"q4_k",target_directory:"MOSS-TTS-v1.5-GGUF",files:["moss_tts_v15_q4_k_codec_f16.gguf"]},{id:"moss_tts_v15_bf16_codec_f16",display_name:"MOSS-TTS-v1.5 BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"MOSS-TTS-v1.5-GGUF",files:["moss_tts_v15_bf16_codec_f16.gguf"]}],package_defaults:{download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTS-v1.5-GGUF",revision:"main",gated:!1}},dependencies:[]},L8={schema_version:1,family:"moss_ttsd",display_name:"MOSS-TTSD",description:"8B delay-pattern dialogue TTS: speaker-tagged conversation in one take, with per-speaker zero-shot voice cloning. 24 kHz, 16 codebooks.",category:"community",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en","zh"],capabilities:{tts:["speaker_reference","multi_speaker","long_form"],clone:["speaker_reference","multi_speaker"]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors.index.json",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}],options:{request:[{name:"voice_samples",type:"string",required:!1,description:"Per-speaker reference WAV paths, comma separated and positional: the first is [S1], the second [S2]. Leave an entry empty to let that speaker be invented rather than cloned. Cannot be combined with voice_ref."},{name:"reference_text",type:"string",required:!1,description:"What the reference recordings say, speaker-tagged. Prepended to the dialogue so the continuation carries on from words it has already spoken."},{name:"language",type:"string",required:!1,description:"Full language name; the model does not understand codes like 'en'."},{name:"instruct",type:"string",required:!1,description:"Free-text direction for the delivery."},{name:"seed",type:"int",required:!1,description:"Reproduces a take exactly. Parsed as signed 32-bit integer then converted to uint32; negative values wrap."},{name:"text_temperature",type:"float",required:!1,default:1.5,description:"Text-token sampling temperature. Must be finite and positive when sampling."},{name:"temperature",type:"float",required:!1,min:0,default:1.5,description:"Audio sampling temperature; must be > 0, default 1.5."},{name:"top_p",type:"float",required:!1,min:0,default:.6,description:"Audio nucleus sampling cutoff."},{name:"top_k",type:"int",required:!1,default:50,description:"Audio top-k. Nonpositive values disable filtering."},{name:"repetition_penalty",type:"float",required:!1,min:0,default:1.1,description:"Audio repetition penalty; must be > 0. Checked when token history is present; default 1.1."},{name:"max_frames",type:"int",required:!1,description:"Ceiling on generated codec frames at 12.5/s; 0 derives one from the dialogue length. Nonpositive values derive an automatic ceiling."}],session:[{name:"weight_type",type:"enum",values:["native","f32","bf16","q8_0"],required:!1,default:"native",description:"Backbone and head weight storage; default native, which keeps a GGUF package's own type. Forcing bf16 dequantises a quantised package and costs the VRAM the quantisation was meant to save. f16 is rejected: this backbone produces NaN in it."}],load:[]},ui:{tags:["TTS","Clone","GGUF"],docs:["docs/models/moss_ttsd.md","docs/tts.md","docs/gguf.md"],recommended_package:"moss_ttsd_q8_0_codec_f16"},packages:[{id:"moss_ttsd_q8_0_codec_f16",display_name:"MOSS-TTSD Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MOSS-TTSD-GGUF",download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTSD-GGUF"},files:["moss_ttsd_q8_0_codec_f16.gguf"]},{id:"moss_ttsd_q4_k_codec_f16",display_name:"MOSS-TTSD Q4_K GGUF (f16 heads)",default:!1,format:"gguf",precision:"q4_k",target_directory:"MOSS-TTSD-GGUF",download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTSD-GGUF"},files:["moss_ttsd_q4_k_codec_f16.gguf"]},{id:"moss_ttsd_bf16_codec_f16",display_name:"MOSS-TTSD BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"MOSS-TTSD-GGUF",download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTSD-GGUF"},files:["moss_ttsd_bf16_codec_f16.gguf"]}],package_defaults:{download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTS-v1.5-GGUF",revision:"main",gated:!1}},dependencies:[]},V8={family:"moss_voicegen",display_name:"MOSS-VoiceGenerator",description:"MOSS voice design model: creates a speaker from a written instruction instead of a reference recording, then speaks the supplied text in that voice.",category:"community",status:"community",tasks:["design"],modes:["offline"],languages:["en","zh"],capabilities:{design:["voice_design"]},options:{request:[{name:"min_frames",type:"int",required:!1,default:0,description:"Minimum generated audio frames per text chunk; nonpositive values derive a text-length-based floor."},{name:"max_frames",type:"int",required:!1,default:0,description:"Generated audio-frame ceiling per text chunk; nonpositive values derive a text-length-based ceiling. Runtime raises it to at least the effective min_frames plus the number of codebooks."},{name:"instruct",type:"string",required:!1,description:"Voice description: timbre, age, pace, emotion."},{name:"text_temperature",type:"float",required:!1,default:1.5,description:"Text-token sampling temperature. Must be finite and positive when sampling."},{name:"language",type:"string",description:"Optional full language name, such as English or Chinese; not an ISO language code.",required:!1},{name:"seed",type:"int",description:"Generation seed; later text chunks add their chunk index. Parsed as signed 32-bit integer then converted to uint32; negative values wrap.",required:!1,default:0},{name:"temperature",type:"float",description:"Audio-token sampling temperature. Must be finite and positive when sampling.",required:!1,default:1.5},{name:"top_p",type:"float",description:"Audio-token nucleus sampling cutoff.",required:!1,default:.6},{name:"top_k",type:"int",description:"Audio-token top-k sampling limit.",required:!1,default:50},{name:"repetition_penalty",type:"float",description:"Audio-token repetition penalty. Must be finite and positive when history is nonempty.",required:!1,default:1.1},{name:"text_chunk_size",type:"int",description:"Maximum characters per generated text chunk; must be positive.",required:!1,min:1,default:200},{name:"text_chunk_mode",type:"enum",description:"Text chunking policy.",required:!1,preset:"text_chunk_mode_full",default:"word_budget"}],session:[{name:"weight_type",type:"enum",description:"Backbone weight storage. f16 is not supported.",required:!1,values:["native","f32","bf16","q8_0"],default:"bf16"}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"moss_voicegen_bf16_codec_f16_decode",tags:["Voice Design","GGUF"],docs:["docs/models/moss_voicegen.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moss_voicegen_bf16_codec_f16_decode",display_name:"MOSS-VoiceGenerator BF16 GGUF",default:!0,format:"gguf",precision:"bf16",target_directory:"MOSS-VoiceGenerator-GGUF",files:["MOSS-VoiceGenerator-GGUF/moss_voicegen_bf16_codec_f16_decode.gguf"],strip_prefix:"MOSS-VoiceGenerator-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}]},H8={schema_version:1,family:"mossformer2",display_name:"MossFormer2",description:"MossFormer2 overlapping speech separation at 16 kHz.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_duration_sec",type:"float",description:"Separation window duration; zero selects whole-file inference.",min:0,default:2,required:!1},{name:"audio_chunk_overlap_sec",type:"float",description:"Overlap between adjacent audio chunks, in seconds; must be smaller than audio_chunk_duration_sec when chunking is enabled. Recommended: 25% of audio_chunk_duration_sec, matching the official Python settings. Overlapping edges are trimmed rather than averaged. Ignored for whole-file inference.",min:0,default:.5,required:!1},{name:"normalize_output",type:"bool",description:"Match each trimmed track RMS to the input as in ClearVoice's NumPy interface.",default:!0,required:!1}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"mossformer2_ss_16k_f32",display_name:"MossFormer2 SS 16K F32",default:!0,format:"gguf",precision:"f32",target_directory:"MossFormer2-GGUF",files:["MossFormer2-GGUF/mossformer2-ss-16k-f32.gguf"],strip_prefix:"MossFormer2-GGUF"},{id:"mossformer2_ss_16k_f16",display_name:"MossFormer2 SS 16K F16",default:!1,format:"gguf",precision:"f16",target_directory:"MossFormer2-GGUF",files:["MossFormer2-GGUF/mossformer2-ss-16k-f16.gguf"],strip_prefix:"MossFormer2-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/mossformer2.md"],recommended_package:"mossformer2_ss_16k_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},W8={schema_version:1,family:"muscriptor",display_name:"MuScriptor",description:"MuScriptor is an audio-to-symbolic model that converts music audio into symbolic note events or MIDI files, with instrument constraints, sampling, beam search, batch chunk decoding, and streaming final-result output.",category:"audio_tools",status:"supported",tasks:["midi"],modes:["offline","streaming"],languages:["music"],runtime:{tags:["gguf","stream"]},capabilities:{},options:{request:[{name:"instruments",type:"string",description:"Comma-separated instrument group names to constrain generated MIDI events; empty allows all instruments.",required:!1,default:""},{name:"output_format",type:"enum",description:"Primary output serialization written by --out; midi writes a MIDI file, json writes generated note events. Default midi.",values:["midi","json"],required:!1,default:"midi"},{name:"max_tokens",type:"int",description:"Maximum generated MIDI-event token count per chunk; default 2000.",required:!1,min:1,default:2e3},{name:"do_sample",type:"bool",description:"Use temperature sampling instead of greedy token selection; default false.",required:!1,default:!1},{name:"temperature",type:"float",description:"Sampling temperature when do_sample=true; 0 is accepted for compatibility and behaves deterministically, default 1.0.",required:!1,min:0,default:1},{name:"guidance_scale",type:"float",description:"Classifier-free guidance coefficient; 1 disables CFG, default 1.0.",required:!1,default:1},{name:"batch_size",type:"int",description:"Number of audio chunks processed per batch when prelude_forcing=false; default 1.",required:!1,min:1,default:1},{name:"num_beams",type:"int",description:"Beam-search width; 1 disables beam search, default 1. Beam search requires guidance_scale=1, do_sample=false, and an actual graph batch of one.",required:!1,min:1,default:1},{name:"prelude_forcing",type:"bool",description:"Force open-note prelude tokens between sequential chunks; default true.",required:!1,default:!0},{name:"seed",type:"int",description:"Sampling seed; default 0. Parsed as int64 and converted to uint64; negative values wrap.",required:!1,default:0}],session:[{name:"weight_type",type:"enum",description:"Transformer weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"perf_mode",type:"enum",description:"Decoder attention mode; flash_attention uses the CUDA fast path, off keeps the exact attention path. Default flash_attention.",values:["off","flash_attention"],required:!1,default:"flash_attention"},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"conditioning_graph_arena_mb",type:"int",description:"Condition graph arena size in MiB; default 128.",required:!1,min:1,default:128},{name:"decoder_prefill_graph_arena_mb",type:"int",description:"Decoder prefill graph arena size in MiB; default 768.",required:!1,min:1,default:768},{name:"decoder_decode_graph_arena_mb",type:"int",description:"Decoder cached-step graph arena size in MiB; default 512.",required:!1,min:1,default:512}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"muscriptor_small_f32",display_name:"MuScriptor Small F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"MuScriptor-Small-GGUF",files:["MuScriptor-Small-GGUF/muscriptor-small-f32.gguf"],strip_prefix:"MuScriptor-Small-GGUF"}],dependencies:[],ui:{recommended_package:"muscriptor_small_f32",tags:["Music","MIDI","GGUF","Stream"],docs:["docs/models/muscriptor.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},Q8={schema_version:1,family:"nemotron_3_diar",display_name:"Nemotron 3 Diarization",description:"NVIDIA eight-speaker streaming diarization model with arrival-order speaker identities and configurable latency profiles.",category:"speech_analysis",status:"supported",tasks:["diar"],modes:["offline","streaming"],languages:["multilingual"],capabilities:{diar:["speaker_turns"]},dependencies:[],options:{request:[{name:"speaker_threshold",type:"float",description:"Speaker activity threshold used for turn decoding.",required:!1,min:0,max:1,default:.5},{name:"speaker_min_frames",type:"int",description:"Minimum decoded turn duration in 10 ms output frames.",required:!1,min:0,default:0},{name:"speaker_pad_frames",type:"int",description:"Padding applied to decoded turns in 10 ms output frames.",required:!1,min:0,default:0},{name:"return_frame_probabilities",type:"bool",description:"Attach the raw 10 ms speaker-activity timeline as the speaker_probabilities.safetensors artifact (F32 [frames, speakers] plus streaming-geometry metadata), the input for nemotron_asr speaker tagging.",required:!1,default:!1}],session:[{name:"latency_profile",type:"enum",description:"Streaming latency profile: the official very_high, low, very_low and ultra_low presets, asr_la0/3/6/13 for nemotron_asr speaker masking at that ASR lookahead, or custom.",values:["very_high","low","very_low","ultra_low","asr_la0","asr_la3","asr_la6","asr_la13","custom"],required:!1,default:"very_high"},{name:"spkcache_len",type:"int",description:"Speaker-cache length in 80 ms encoder frames for the custom profile.",required:!1,min:16},{name:"fifo_len",type:"int",description:"FIFO length in 80 ms encoder frames for the custom profile.",required:!1,min:0},{name:"chunk_len",type:"int",description:"Chunk length in 80 ms encoder frames for the custom profile.",required:!1,min:1},{name:"chunk_right_context",type:"int",description:"Future context in 80 ms encoder frames for the custom profile.",required:!1,min:0},{name:"spkcache_update_period",type:"int",description:"FIFO-to-cache update period in 80 ms encoder frames for the custom profile.",required:!1,min:1},{name:"attention",type:"enum",values:["auto","flash","eager"],description:"Encoder attention lowering; auto uses flash attention where the backend supports it.",required:!1,default:"auto"},{name:"graph_arena_mb",type:"int",description:"Inference graph arena size in MiB.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight context size in MiB.",required:!1,min:1,default:1024},{name:"weight_type",type:"enum",description:"Default model weight storage type.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"nemotron_3_diar_bf16",tags:["Diar","Stream","GGUF"],docs:["docs/models/nemotron_3_diar.md","docs/speech_analysis.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Nemotron-3-Diarization-GGUF",revision:"main",gated:!1}},packages:[{id:"nemotron_3_diar_bf16",display_name:"Nemotron 3 Diarization BF16 GGUF",default:!0,format:"gguf",precision:"bf16",target_directory:"Nemotron-3-Diarization-GGUF",files:["nemotron-3-diarization-bf16.gguf"]},{id:"nemotron_3_diar_q8_0",display_name:"Nemotron 3 Diarization Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Nemotron-3-Diarization-GGUF",files:["nemotron-3-diarization-q8_0.gguf"]}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"model:model.safetensors"}}]},K8={schema_version:1,family:"nemotron_asr",display_name:"Nemotron 3.5 ASR",description:"NVIDIA 600M streaming ASR model for low-latency and batch transcription across 40 language-locales, with native punctuation, capitalization, automatic language detection, and configurable chunk sizes.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["ar-AR","bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-GB","en-US","es-ES","es-US","et-EE","fi-FI","fr-CA","fr-FR","he-IL","hi-IN","hr-HR","hu-HU","it-IT","ja-JP","ko-KR","lt-LT","lv-LV","mt-MT","nb-NO","nl-NL","nn-NO","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","sv-SE","th-TH","tr-TR","uk-UA","vi-VN","zh-CN"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"ASR prompt language such as en-US, da-DK, or auto; default is the model's default prompt.",required:!1},{name:"lookahead_tokens",type:"int",description:"Chunk-limited encoder right context in 80 ms frames; supported values and the default come from processor_config (0, 3, 6 or 13; default 3 for the published model). In masked speaker mode, omission derives lookahead from diarizer geometry (13 fallback).",required:!1,min:0},{name:"max_tokens",type:"int",description:"Maximum RNNT generated tokens; 0 or omitted uses the model-derived limit.",required:!1,min:0,default:0},{name:"keep_language_tags",type:"bool",description:"Keep language tag tokens in decoded text; default false.",required:!1,default:!1},{name:"return_timestamps",type:"bool",description:"Compatibility/advisory flag; false does not suppress decoder token timestamps.",required:!1,default:!1},{name:"streaming",type:"bool",description:"Request a streaming run; must be false for offline sessions.",required:!1,default:!1},{name:"speaker_probabilities",type:"path",description:"nemotron_3_diar speaker_probabilities.safetensors for the same audio (diarize with return_frame_probabilities=true). Setting it enables speaker-tagged output: speaker turns with text and a SegLST artifact.",required:!1},{name:"speaker_mode",type:"enum",values:["masked","attribution"],description:"masked runs one ASR stream per active speaker on speaker-masked features (NeMo masked multitalker ASR) and transcribes overlapping speech; attribution assigns each word of one transcript to the most active speaker and is cheaper.",required:!1,default:"masked"},{name:"speaker_mask",type:"enum",values:["mel","audio"],description:"Masked mode only: mask log-mel features (NeMo mask_features) or zero the waveform of inactive 80 ms frames.",required:!1,default:"mel"},{name:"speaker_segment_gap_sec",type:"float",description:"Start a new segment for a speaker after a pause longer than this; default 1.0 (NeMo sent_break_sec).",required:!1,min:0,default:1},{name:"speaker_segment_max_sec",type:"float",description:"Streaming only: force-close a speaker-turn event after this many seconds; the final result keeps the full segments. Default 10. Must be positive.",required:!1,default:10}],session:[{name:"weight_type",type:"enum",description:"Shared matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"matmul_weight_type",type:"enum",description:"Encoder and decoder matmul weight storage type (native, f32, f16, bf16 or q8_0); defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type (native, f32 or f16); default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB; default 3072.",required:!1,min:1,default:3072},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"decoder_graph_arena_mb",type:"int",description:"Decoder graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"mem_saver",type:"bool",description:"Release the offline encoder graph after each offline request; default false.",required:!1,default:!1}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"nemotron_asr_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"nemotron_asr_q8_0",display_name:"Nemotron 3.5 ASR Streaming 0.6B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Nemotron-3.5-ASR-Streaming-0.6B-GGUF",files:["Nemotron-3.5-ASR-Streaming-0.6B-GGUF/nemotron-3.5-asr-streaming-0.6b-q8_0.gguf"],strip_prefix:"Nemotron-3.5-ASR-Streaming-0.6B-GGUF"},{id:"nemotron_asr_f16",display_name:"Nemotron 3.5 ASR Streaming 0.6B F16 GGUF",format:"gguf",precision:"f16",target_directory:"Nemotron-3.5-ASR-Streaming-0.6B-GGUF",files:["Nemotron-3.5-ASR-Streaming-0.6B-GGUF/nemotron-3.5-asr-streaming-0.6b-f16.gguf"],strip_prefix:"Nemotron-3.5-ASR-Streaming-0.6B-GGUF"},{id:"nemotron_asr_safetensors",display_name:"Nemotron 3.5 ASR Streaming 0.6B Safetensors",format:"safetensors",precision:"native",target_directory:"nemotron-3.5-asr-streaming-0.6b",files:["config.json","model.safetensors","processor_config.json","tokenizer.json"],download:{kind:"huggingface_snapshot",repo:"nvidia/nemotron-3.5-asr-streaming-0.6b"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},Y8={schema_version:1,family:"neutts",display_name:"NeuTTS",description:"NeuTTS is an English text-to-speech family from Neuphonic. The current 2E package uses a Qwen3-style autoregressive speech-token backbone, NeuCodec waveform decoding, built-in speaker prompts, and emotion-token control.",category:"tts",status:"supported",tasks:["tts"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf","stream"]},capabilities:{tts:["built_in_voices","emotion_control","long_form"]},options:{request:[{name:"voice_id",type:"enum",description:"Built-in NeuTTS speaker prompt; default emily.",values:["dave","emily","greta","jo","juliette","mateo","paul","sophie","steven"],required:!1,default:"emily"},{name:"emotion",type:"enum",description:"Optional emotion token inserted between reference text and target text; neutral inserts no emotion token.",values:["angry","disgusted","sad","happy","fearful","neutral","surprised"],required:!1,default:"neutral"},{name:"max_tokens",type:"int",description:"Maximum generated speech-token count for the autoregressive generator; 0 uses the remaining model context, default 0. Total generation context is capped at min(checkpoint context, 2048).",required:!1,min:0,default:0},{name:"min_tokens",type:"int",description:"Minimum generated speech-token count before EOS may stop generation; default 50.",required:!1,min:0,default:50},{name:"temperature",type:"float",description:"Autoregressive sampling temperature; must be > 0, default 1.0.",required:!1,min:0,default:1},{name:"top_k",type:"int",description:"Autoregressive top-k sampling limit; default 50.",required:!1,min:1,default:50},{name:"seed",type:"int",description:"Autoregressive sampling seed; omitted requests choose a random seed.",required:!1,min:0},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode for long-form synthesis.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 600.",required:!1,min:1,default:600}],session:[{name:"weight_type",type:"enum",description:"Shared matmul weight storage type for the backbone and codec decoder; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"generator_weight_type",type:"enum",description:"Generator weight storage; inherits explicit weight_type, otherwise F32 on CPU and native on other backends.",preset:"weight_type_full",required:!1},{name:"codec_weight_type",type:"enum",description:"NeuCodec decoder matmul weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_full",required:!1},{name:"codec_conv_weight_type",type:"enum",description:"NeuCodec convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"runtime_graph_arena_mb",type:"int",description:"Reusable ggml graph arena size in MiB for NeuTTS runtime graphs; default 1024.",required:!1,min:1,default:1024}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"neutts_2e_orig",display_name:"NeuTTS 2E Original-Precision GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"NeuTTS-2E-GGUF",files:["NeuTTS-2E-GGUF/neutts-2e-orig.gguf"],strip_prefix:"NeuTTS-2E-GGUF"}],dependencies:[],ui:{recommended_package:"neutts_2e_orig",tags:["TTS","GGUF","Stream"],docs:["docs/tts.md","docs/models/neutts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",chat_template:"model:chat_template.jinja",codec_config:"model:neucodec_config.json",codec_preprocessor_config:"model:neucodec_preprocessor_config.json",speaker_text_dave:"model:samples/dave.txt",speaker_text_emily:"model:samples/emily.txt",speaker_text_greta:"model:samples/greta.txt",speaker_text_jo:"model:samples/jo.txt",speaker_text_juliette:"model:samples/juliette.txt",speaker_text_mateo:"model:samples/mateo.txt",speaker_text_paul:"model:samples/paul.txt",speaker_text_sophie:"model:samples/sophie.txt",speaker_text_steven:"model:samples/steven.txt"},tensors:{backbone:{source:"weights:",prefix:"backbone"},codec:{source:"weights:",prefix:"codec"},speaker_prompts:{source:"weights:",prefix:"speaker_prompts"}}},{format:"safetensors",roots:{model:".",codec:"../NeuCodec"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",chat_template:"model:chat_template.jinja",codec_config:"codec:config.json",codec_preprocessor_config:"codec:preprocessor_config.json",speaker_text_dave:"model:samples/dave.txt",speaker_text_emily:"model:samples/emily.txt",speaker_text_greta:"model:samples/greta.txt",speaker_text_jo:"model:samples/jo.txt",speaker_text_juliette:"model:samples/juliette.txt",speaker_text_mateo:"model:samples/mateo.txt",speaker_text_paul:"model:samples/paul.txt",speaker_text_sophie:"model:samples/sophie.txt",speaker_text_steven:"model:samples/steven.txt"},tensors:{backbone:"model:model.safetensors",codec:"codec:model.safetensors",speaker_prompts:"model:samples/speaker_prompts.safetensors"}}]},J8={family:"niagara_asr",schema_version:1,display_name:"Niagara ASR",description:"ABR Niagara English batch ASR state-space models with attention, greedy CTC decoding, and SentencePiece tokenization.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Compatibility-only; recognition is English and output is always labelled en.",required:!1,default:"en"},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode.",values:["none"],required:!1,default:"none"}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage type.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"]},{name:"graph_arena_mb",type:"int",description:"Inference graph arena size in MiB.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight descriptor context size in MiB.",required:!1,min:1,default:256}],load:[]},runtime:{tags:["gguf","cpu"]},ui:{recommended_package:"niagara_19m_f32",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"],summary:"ABR Niagara compact English speech recognition."},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf"}},packages:[{id:"niagara_19m_f32",display_name:"Niagara 19M Batch English F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"Niagara-ASR-GGUF",files:["Niagara-ASR-GGUF/niagara-19m-batch.en-f32.gguf"],strip_prefix:"Niagara-ASR-GGUF"},{id:"niagara_38m_f32",display_name:"Niagara 38M Batch English F32 GGUF",format:"gguf",precision:"f32",target_directory:"Niagara-ASR-GGUF",files:["Niagara-ASR-GGUF/niagara-38m-batch.en-f32.gguf"],strip_prefix:"Niagara-ASR-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",preprocessor_config:"model:preprocessor_config.json",tokenizer_spm:"model:sentencepiece.model"},tensors:{weights:"weights:"}}]},X8={family:"omnivoice",display_name:"OmniVoice",description:"Massively multilingual zero-shot TTS model from k2-fsa for 600+ languages, supporting short-reference voice cloning, attribute-based voice design, pronunciation controls, and nonverbal tags.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["600+ languages"],capabilities:{clone:["speaker_reference"],design:["voice_design"]},options:{request:[{name:"language",type:"string",description:"Synthesis language code or label; omitted uses automatic language selection.",required:!1},{name:"reference_text",type:"string",description:"Transcript for speaker reference audio used in voice cloning.",required:!1},{name:"instruct",type:"string",description:"Voice-design instruction such as speaker attributes, accent, style, or delivery.",required:!1},{name:"seed",type:"int",description:"Generation seed for reproducible output; omitted value keeps the session RNG state.",required:!1,min:0,max:4294967295},{name:"num_inference_steps",type:"int",description:"Diffusion language-model inference steps; default 32.",required:!1,min:1,default:32},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; default 2.0.",required:!1,default:2},{name:"speed",type:"float",description:"Speech speed multiplier used for target-length estimation; default 1.0.",required:!1,default:1},{name:"duration_sec",type:"float",description:"Target output duration in seconds; omitted uses the model's estimated duration.",required:!1,min:0},{name:"shift",type:"float",description:"Diffusion timestep schedule shift; default 0.1.",required:!1,default:.1},{name:"denoise",type:"bool",description:"Add the denoise control token when reference audio is present; default true.",required:!1,default:!0},{name:"preprocess_prompt",type:"bool",description:"Preprocess speaker reference audio before tokenization; default true.",required:!1,default:!0},{name:"postprocess_output",type:"bool",description:"Apply output postprocessing and trimming; default true.",required:!1,default:!0},{name:"layer_penalty_factor",type:"float",description:"Layer-order penalty used while selecting masked audio-codebook positions; default 5.0.",required:!1,default:5},{name:"position_temperature",type:"float",description:"Gumbel temperature for masked-position selection; default 5.0.",required:!1,default:5},{name:"class_temperature",type:"float",description:"Audio-token class sampling temperature; default 0 for greedy class selection.",required:!1,min:0,default:0},{name:"audio_chunk_duration_sec",type:"float",description:"Target chunk duration for automatic long-form splitting; default 15 seconds.",required:!1,min:0,default:15},{name:"audio_chunk_threshold_sec",type:"float",description:"Estimated duration above which long-form generation is split into chunks; default 30 seconds.",required:!1,min:0,default:30},{name:"text_chunk_size",type:"int",description:"Explicit long-form text chunk size in Unicode codepoints. Omitted value uses duration-based automatic chunking.",required:!1,min:1},{name:"text_chunk_mode",type:"enum",description:"Text chunking mode; default tag_aware.",preset:"text_chunk_mode_full",required:!1,default:"tag_aware"}],session:[{name:"weight_type",type:"enum",description:"Shared generator weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"generator_weight_type",type:"enum",description:"Generator weight storage type; defaults to weight_type, which defaults to native.",preset:"weight_type_full",required:!1},{name:"audio_tokenizer_weight_type",type:"enum",description:"Audio tokenizer weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"audio_tokenizer_graph_arena_mb",type:"int",description:"Audio tokenizer graph arena size in MiB; default 128.",required:!1,min:1,default:128},{name:"generator_prefill_graph_arena_mb",type:"int",description:"Generator prefill graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"generator_decode_graph_arena_mb",type:"int",description:"Generator decode graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"audio_tokenizer_weight_context_mb",type:"int",description:"Audio tokenizer weight context size in MiB; default 128.",required:!1,min:1,default:128},{name:"generator_weight_context_mb",type:"int",description:"Generator weight context size in MiB; default 256.",required:!1,min:1,default:256},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs after request phases; default false. Cannot be combined with perf_mode=flash_attention.",required:!1,default:!1},{name:"perf_mode",type:"enum",description:"Generator performance mode; default off keeps the exact-safe attention path. flash_attention requires mem_saver=false.",preset:"perf_mode_flash_attention",required:!1,default:"off"}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"omnivoice_q8_0",tags:["TTS","Clone","Design","GGUF","Stream"],docs:["docs/models/omnivoice.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"omnivoice_q8_0",display_name:"OmniVoice Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"OmniVoice-GGUF",files:["OmniVoice-GGUF/omnivoice-q8_0.gguf"],strip_prefix:"OmniVoice-GGUF"},{id:"omnivoice_bf16",display_name:"OmniVoice BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"OmniVoice-GGUF",files:["OmniVoice-GGUF/omnivoice-bf16.gguf"],strip_prefix:"OmniVoice-GGUF"},{id:"omnivoice_f16",display_name:"OmniVoice F16 GGUF",format:"gguf",precision:"f16",target_directory:"OmniVoice-GGUF",files:["OmniVoice-GGUF/omnivoice-f16.gguf"],strip_prefix:"OmniVoice-GGUF"},{id:"omnivoice_safetensors",display_name:"OmniVoice Safetensors",format:"safetensors",precision:"native",target_directory:"OmniVoice",files:["config.json","model.safetensors","tokenizer.json","tokenizer_config.json","audio_tokenizer/config.json","audio_tokenizer/preprocessor_config.json","audio_tokenizer/model.safetensors"],download:{kind:"huggingface_snapshot",repo:"k2-fsa/OmniVoice"}},{id:"voicetut_tts_q8_0",display_name:"VoiceTut-TTS Egyptian Arabic Q8_0 GGUF",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of OmniVoice from mohammedaly22/VoiceTut-TTS (same architecture and audio tokenizer as OmniVoice). Use language=arz.",format:"gguf",precision:"q8_0",target_directory:"VoiceTut-TTS-GGUF",files:["voicetut-tts-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/VoiceTut-TTS-GGUF"}},{id:"voicetut_tts_f16",display_name:"VoiceTut-TTS Egyptian Arabic F16 GGUF",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of OmniVoice from mohammedaly22/VoiceTut-TTS (same architecture and audio tokenizer as OmniVoice). Use language=arz.",format:"gguf",precision:"f16",target_directory:"VoiceTut-TTS-GGUF",files:["voicetut-tts-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/VoiceTut-TTS-GGUF"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",audio_tokenizer_config:"model:audio_tokenizer/config.json",audio_tokenizer_preprocessor:"model:audio_tokenizer/preprocessor_config.json"},optional_files:{chat_template:"model:chat_template.jinja"},tensors:{weights:{source:"weights:",prefix:"weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",audio_tokenizer_config:"model:audio_tokenizer/config.json",audio_tokenizer_preprocessor:"model:audio_tokenizer/preprocessor_config.json"},optional_files:{chat_template:"model:chat_template.jinja"},tensors:{weights:"model:model.safetensors",audio_tokenizer_weights:"model:audio_tokenizer/model.safetensors"}}]},Z8={schema_version:1,family:"open_wake_word",display_name:"OpenWakeWord",description:"OpenWakeWord wake-word detection with a shared speech embedding CNN and a converted classifier.",category:"audio_tools",status:"experimental",tasks:["wake_word"],modes:["offline","streaming"],languages:["en"],capabilities:{wake_word:["speech_segments","stream_events"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"threshold",type:"float",required:!1,min:0,max:1,description:"Wake-word detection probability threshold."}],session:[{name:"exec_plan",type:"string",required:!1,default:"{}",description:"JSON component execution plans. Component embedding accepts impl default/ggml/neon and optional backend. Default retains GGML on the session backend; neon requires ENGINE_ENABLE_NEON=ON and an AArch64 NEON CPU session. No artifacts or params are used."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"open_wake_word_alexa_f32",display_name:"OpenWakeWord Alexa GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"OpenWakeWord-GGUF",files:["OpenWakeWord-GGUF/open-wake-word-alexa-f32.gguf"],strip_prefix:"OpenWakeWord-GGUF"}],dependencies:[],ui:{tags:["Wake Word","GGUF","Stream"],docs:["docs/models/open_wake_word.md"],recommended_package:"open_wake_word_alexa_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}}]},e$={schema_version:1,family:"outetts",display_name:"Llama-OuteTTS 1.0",description:"Llama-based open-weight TTS model for 23-language speech synthesis with one-shot voice cloning from short reference audio and automatic word-alignment support.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline"],languages:["ar","be","bn","de","en","es","fa","fr","hu","it","ja","ka","ko","lt","lv","nl","pl","pt","ru","sw","ta","uk","zh"],capabilities:{clone:["speaker_reference"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated audio tokens per chunk. When omitted, OuteTTS estimates a safe value from each chunk.",required:!1,min:1},{name:"temperature",type:"float",description:"Sampling temperature; default 0.4 for cloning, otherwise model config default.",required:!1,min:0},{name:"top_k",type:"int",description:"Top-k sampling; default 40 for cloning, otherwise model config default.",required:!1,min:0},{name:"top_p",type:"float",description:"Nucleus sampling in (0, 1]; default 0.9 for cloning, otherwise model config default.",required:!1,min:0,max:1},{name:"min_p",type:"float",description:"Minimum probability relative to the best token; default 0.05 for cloning, otherwise model config default.",required:!1,min:0,max:1},{name:"repetition_penalty",type:"float",description:"Windowed repetition penalty; must be > 0, default 1.1.",required:!1,min:0,default:1.1},{name:"repetition_window",type:"int",description:"Recent-token penalty window; default 64.",required:!1,min:0,default:64},{name:"seed",type:"int",description:"Sampling seed; cloning defaults to 4099 for native weights and 42 for quantized weights.",required:!1,min:0,max:4294967295},{name:"reference_text",type:"string",description:"Transcript matching the reference voice audio for voice cloning.",required:!1},{name:"reference_language",type:"string",description:"Language code used to align the reference transcript; omitted inherits the request text language, then falls back to en.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum UTF-8 codepoints per long-form text chunk; default 256. Chunks are split further when required by max_tokens or context budget.",required:!1,min:1,default:256},{name:"text_chunk_mode",type:"enum",description:"Framework long-form text chunking mode; default word_budget.",preset:"text_chunk_mode_full",required:!1,default:"word_budget"}],session:[{name:"lora",type:"path",description:"PEFT LoRA adapter directory or checkpoint file for the same OuteTTS checkpoint; merged into the language model at session creation.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"weight_type",type:"enum",description:"Language-model weight storage type. Quantized CUDA voice cloning is expanded to F32 in memory for generation correctness.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","nvfp4"]},{name:"llama_weight_context_mb",type:"int",description:"Language-model weight context size in MiB; default 4096.",required:!1,min:1,default:4096},{name:"constant_context_mb",type:"int",description:"Language-model constant tensor context size in MiB; default 256.",required:!1,min:1,default:256},{name:"dac_weight_context_mb",type:"int",description:"DAC decoder weight context size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"dac_graph_arena_mb",type:"int",description:"DAC decoder graph arena size in MiB; default 1536.",required:!1,min:1,default:1536},{name:"forced_aligner_path",type:"path",description:"Optional Qwen3 Forced Aligner override. Cloning automatically uses the aligner embedded in a standalone OuteTTS GGUF when present.",required:!1},{name:"reference_cache_slots",type:"int",description:"Prepared reference-profile cache slots; default 1, set 0 to disable.",required:!1,min:0,default:1},{name:"mem_saver",type:"bool",description:"Release cached-step and aligner runtime state after use; default false.",required:!1,default:!1}],load:[]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",special_tokens_map:"model:special_tokens_map.json",dac_config:"model:dac/config.json"},optional_files:{aligner_config:"model:aligner/config.json",aligner_generation_config:"model:aligner/generation_config.json",aligner_tokenizer_config:"model:aligner/tokenizer_config.json",aligner_preprocessor_config:"model:aligner/preprocessor_config.json",aligner_processor_config:"model:aligner/processor_config.json",aligner_chat_template:"model:aligner/chat_template.json",aligner_chat_template_jinja:"model:aligner/chat_template.jinja",aligner_vocab:"model:aligner/vocab.json",aligner_merges:"model:aligner/merges.txt",aligner_tokenizer_json:"model:aligner/tokenizer.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},dac_weights:{source:"weights:",prefix:"dac_weights"},aligner_weights:{source:"weights:",prefix:"aligner_weights"}}},{format:"safetensors",roots:{model:".",dac:"../DAC.speech.v1.0"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",special_tokens_map:"model:special_tokens_map.json",dac_config:"dac:config.json"},tensors:{model_weights:"model:model.safetensors",dac_weights:"dac:model.safetensors"}}],packages:[{id:"outetts_1_0_1b_q8_0",display_name:"Llama-OuteTTS 1.0 1B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Llama-OuteTTS-1.0-1B_Q8",files:["Text to audio (TTS)/Llama-OuteTTS-1.0-1B_Q8.gguf"],download:{kind:"huggingface_snapshot",repo:"mirek190/audio.cpp"}}],dependencies:[],ui:{recommended_package:"outetts_1_0_1b_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/outetts.md","docs/reports/outetts_validation.md","docs/gguf.md"]}},t$={family:"owsm",schema_version:1,display_name:"OWSM",description:"ESPnet Open Whisper-style multilingual speech recognition and speech translation.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["abk","afr","amh","ara","asm","ast","aze","bak","bas","bel","ben","bos","bre","bul","cat","ceb","ces","chv","ckb","cmn","cnh","cym","dan","deu","dgd","div","ell","eng","epo","est","eus","fas","fil","fin","fra","frr","ful","gle","glg","grn","guj","hat","hau","heb","hin","hrv","hsb","hun","hye","ibo","ina","ind","isl","ita","jav","jpn","kab","kam","kan","kat","kaz","kea","khm","kin","kir","kmr","kor","lao","lav","lga","lin","lit","ltz","lug","luo","mal","mar","mas","mdf","mhr","mkd","mlt","mon","mri","mrj","mya","myv","nan","nep","nld","nno","nob","npi","nso","nya","oci","ori","orm","ory","pan","pol","por","pus","quy","roh","ron","rus","sah","sat","sin","skr","slk","slv","sna","snd","som","sot","spa","srd","srp","sun","swa","swe","swh","tam","tat","tel","tgk","tgl","tha","tig","tir","tok","tpi","tsn","tuk","tur","twi","uig","ukr","umb","urd","uzb","vie","vot","wol","xho","yor","yue","zho","zul"],capabilities:{asr:["segments"]},dependencies:[],options:{request:[{name:"language",type:"string",description:"Input language as an OWSM ISO 639-3 code, such as eng, jpn, or zho; auto detects it from the first window.",required:!1,default:"eng"},{name:"target_language",type:"string",description:"Optional OWSM translation target code. Omit for transcription.",required:!1},{name:"return_timestamps",type:"bool",description:"Return OWSM utterance-level timestamp segments.",required:!1,default:!1},{name:"condition_on_previous_text",type:"bool",description:"Condition each long-form chunk on the previous chunk transcript.",required:!1,default:!1},{name:"num_beams",type:"int",description:"Decoder beam width; one selects greedy decoding.",required:!1,min:1,max:50002,default:1},{name:"max_tokens",type:"int",description:"Maximum generated tokens per 30-second window; zero uses the model limit.",required:!1,min:0,max:374,default:0},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio window. Must be positive.",required:!1,max:30,default:30}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage override.",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"],required:!1,default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/owsm.md"],recommended_package:"owsm_v4_base_102m_f32"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"owsm_v4_base_102m_f32",display_name:"OWSM v4 Base 102M F32",default:!0,format:"gguf",precision:"f32",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-base-102m-f32.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_base_102m_q8_0",display_name:"OWSM v4 Base 102M Q8_0",default:!1,format:"gguf",precision:"q8_0",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-base-102m-q8_0.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_small_370m_f32",display_name:"OWSM v4 Small 370M F32",default:!1,format:"gguf",precision:"f32",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-small-370m-f32.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_small_370m_q8_0",display_name:"OWSM v4 Small 370M Q8_0",default:!1,format:"gguf",precision:"q8_0",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-small-370m-q8_0.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_small_370m_q4_k",display_name:"OWSM v4 Small 370M Q4_K",default:!1,format:"gguf",precision:"q4_k",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-small-370m-q4_k.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_medium_1b_f32",display_name:"OWSM v4 Medium 1B F32",default:!1,format:"gguf",precision:"f32",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-medium-1b-f32.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_medium_1b_q8_0",display_name:"OWSM v4 Medium 1B Q8_0",default:!1,format:"gguf",precision:"q8_0",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-medium-1b-q8_0.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_medium_1b_q4_k",display_name:"OWSM v4 Medium 1B Q4_K",default:!1,format:"gguf",precision:"q4_k",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-medium-1b-q4_k.gguf"],strip_prefix:"OWSM-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:bpe.model"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:bpe.model"},tensors:{weights:"weights:"}}]},a$={family:"owsm_ctc",schema_version:1,display_name:"OWSM-CTC",description:"ESPnet non-autoregressive multilingual speech recognition and speech translation with self-conditioned CTC.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["abk","afr","amh","ara","asm","ast","aze","bak","bas","bel","ben","bos","bre","bul","cat","ceb","ces","chv","ckb","cmn","cnh","cym","dan","deu","dgd","div","ell","eng","epo","est","eus","fas","fil","fin","fra","frr","ful","gle","glg","grn","guj","hat","hau","heb","hin","hrv","hsb","hun","hye","ibo","ina","ind","isl","ita","jav","jpn","kab","kam","kan","kat","kaz","kea","khm","kin","kir","kmr","kor","lao","lav","lga","lin","lit","ltz","lug","luo","mal","mar","mas","mdf","mhr","mkd","mlt","mon","mri","mrj","mya","myv","nan","nep","nld","nno","nob","npi","nso","nya","oci","ori","orm","ory","pan","pol","por","pus","quy","roh","ron","rus","sah","sat","sin","skr","slk","slv","sna","snd","som","sot","spa","srd","srp","sun","swa","swe","swh","tam","tat","tel","tgk","tgl","tha","tig","tir","tok","tpi","tsn","tuk","tur","twi","uig","ukr","umb","urd","uzb","vie","vot","wol","xho","yor","yue","zho","zul"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Input ISO 639-3 language code, such as eng, jpn, or zho. auto uses unknown-language conditioning.",required:!1,default:"eng"},{name:"target_language",type:"string",description:"Optional OWSM translation target code. Omit for transcription.",required:!1},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","none"],required:!1,default:"auto"}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage override.",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"],required:!1,default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/owsm_ctc.md"],recommended_package:"owsm_ctc_v4_1b_f32"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"owsm_ctc_v4_1b_f32",display_name:"OWSM-CTC v4 1B F32",default:!0,format:"gguf",precision:"f32",target_directory:"OWSM-CTC-GGUF",files:["OWSM-CTC-GGUF/owsm-ctc-v4-1b-f32.gguf"],strip_prefix:"OWSM-CTC-GGUF"},{id:"owsm_ctc_v4_1b_q8_0",display_name:"OWSM-CTC v4 1B Q8_0",default:!1,format:"gguf",precision:"q8_0",target_directory:"OWSM-CTC-GGUF",files:["OWSM-CTC-GGUF/owsm-ctc-v4-1b-q8_0.gguf"],strip_prefix:"OWSM-CTC-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:bpe.model"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:bpe.model"},tensors:{weights:"weights:"}}]},i$={schema_version:1,family:"parakeet_tdt",display_name:"Parakeet-TDT 0.6B v3",description:"NVIDIA Parakeet-TDT 0.6B v3 FastConformer-TDT ASR covering 25 European languages with automatic language detection. Supports the upstream Transformers-compatible safetensors package and standalone audio.cpp GGUF, with offline full-context, bounded-window long-form, and buffered streaming; the checkpoint uses unlimited bidirectional attention and is not a native cache-aware streaming model.",category:"asr",status:"community",tasks:["asr"],modes:["offline","streaming"],languages:["bg","cs","da","de","el","en","es","et","fi","fr","hr","hu","it","lt","lv","mt","nl","pl","pt","ro","ru","sk","sl","sv","uk"],runtime:{tags:["gguf","stream"]},capabilities:{asr:["word_timestamps","partial_results","vad_chunking"]},options:{request:[{name:"return_timestamps",type:"bool",description:"Accepted for CLI --words-out compatibility. Word timestamps are always returned, including when false or omitted.",required:!1},{name:"max_tokens",type:"int",description:"Maximum TDT generated tokens; 0 or omitted uses the model-derived limit.",required:!1,min:0,default:0},{name:"keep_language_tags",type:"bool",description:"Keep language tag tokens in decoded text; default false.",required:!1,default:!1},{name:"audio_chunk_mode",type:"enum",description:"Offline audio chunking mode. fixed selects overlapping long-form windows regardless of offline_mode; vad uses the configured VAD model (Silero by default) to skip silence; auto follows offline_mode. Offline input is downmixed and resampled as needed.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"VAD maximum chunk duration; omitted inherits the session duration. Fixed/long_form windows use the session setting, not this request override.",required:!1,min:.001},{name:"hotwords",type:"string",description:"Phonon-2 only: optional vocabulary list, comma-separated or a JSON array of strings / word-spoken objects. Up to 25 terms; an explicit empty list disables prompt biasing.",required:!1},{name:"hotwords_score",type:"float",description:"Phonon-2 matching-piece logit bonus; duration scores and blank are not biased.",required:!1,min:0,max:100,default:2}],session:[{name:"weight_type",type:"enum",description:"Shared matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"matmul_weight_type",type:"enum",description:"Encoder and decoder matmul weight storage type; defaults to weight_type, which defaults to native. Q8_0 measured 1.79x faster on the tested CPU and changed roughly 8 percent of transcripts without moving aggregate word error rate.",preset:"weight_type_full",required:!1},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"perf_mode",type:"enum",description:"Encoder attention implementation. Default off uses the validated relative-attention path; flash_attention enables the fused implementation, which was numerically validated but slower on the tested hardware.",preset:"perf_mode_flash_attention",required:!1,default:"off"},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB; default 3072.",required:!1,min:1,default:3072},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"decoder_graph_arena_mb",type:"int",description:"Decoder graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"audio_chunk_duration_sec",type:"float",description:"Center-region duration for buffered streaming in seconds; default 2. Fixed context windows are re-encoded rather than cache-aware. Also sizes offline fixed/long_form windows.",required:!1,min:.001,default:2},{name:"left_context_sec",type:"float",description:"Past context included when re-encoding each buffered-streaming window in seconds; default 10. Also applies to offline fixed/long_form windows.",required:!1,min:0,default:10},{name:"right_context_sec",type:"float",description:"Future lookahead included when re-encoding each buffered-streaming window in seconds; default 2 and adds equivalent partial-result latency. Also applies to offline fixed/long_form windows.",required:!1,min:0,default:2},{name:"streaming_attention_mode",type:"enum",description:"Attention policy inside each buffered window. full_context preserves bidirectional attention over the bounded window.",values:["full_context"],required:!1,default:"full_context"},{name:"offline_mode",type:"enum",description:"Offline encoder scheduling. full_context encodes the whole utterance, long_form uses bounded overlapping windows, and auto selects long_form beyond audio_chunk_threshold_sec.",values:["full_context","long_form","auto"],required:!1,default:"full_context"},{name:"audio_chunk_threshold_sec",type:"float",description:"Duration threshold used by offline_mode=auto before switching to bounded-window long-form execution; default 30 seconds.",required:!1,min:.001,default:30},{name:"vad_model_path",type:"path",description:"VAD model path used by audio_chunk_mode=vad (any built-in VAD family); default assets/framework/models/silero_vad.",required:!1,default:"assets/framework/models/silero_vad"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"parakeet_tdt_q8_0",display_name:"Parakeet-TDT 0.6B v3 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Parakeet-TDT-0.6B-v3-GGUF",files:["Parakeet-TDT-0.6B-v3-GGUF/parakeet-tdt-0.6b-v3-q8_0.gguf"],strip_prefix:"Parakeet-TDT-0.6B-v3-GGUF"},{id:"parakeet_tdt_f16",display_name:"Parakeet-TDT 0.6B v3 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Parakeet-TDT-0.6B-v3-GGUF",files:["Parakeet-TDT-0.6B-v3-GGUF/parakeet-tdt-0.6b-v3-f16.gguf"],strip_prefix:"Parakeet-TDT-0.6B-v3-GGUF"},{id:"orukeet_q8_0",display_name:"Orukeet r3 Q8_0 GGUF (Parakeet-TDT 0.6B v3 fine-tune)",format:"gguf",precision:"q8_0",target_directory:"Orukeet-GGUF",files:["Orukeet-GGUF/orukeet-q8_0.gguf"],strip_prefix:"Orukeet-GGUF"},{id:"orukeet_f16",display_name:"Orukeet r3 F16 GGUF (Parakeet-TDT 0.6B v3 fine-tune)",format:"gguf",precision:"f16",target_directory:"Orukeet-GGUF",files:["Orukeet-GGUF/orukeet-f16.gguf"],strip_prefix:"Orukeet-GGUF"}],dependencies:[],ui:{recommended_package:"parakeet_tdt_q8_0",tags:["ASR","GGUF"],docs:["docs/models/parakeet_tdt.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},n$={schema_version:1,family:"personaplex",display_name:"PersonaPlex",description:"PersonaPlex is a Moshi-style full-duplex speech-to-speech conversational model with Mimi audio tokenization, packaged speaker/persona prompts, streaming audio input, text generation, and generated assistant speech.",category:"tts",status:"supported",tasks:["s2s"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf","stream"]},capabilities:{s2s:["speaker_reference"]},options:{request:[{name:"voice_id",type:"enum",description:"Packaged PersonaPlex voice prompt id such as NATF2 or NATM1. If omitted, NATF2 is used.",values:["NATF0","NATF1","NATF2","NATF3","NATM0","NATM1","NATM2","NATM3","VARF0","VARF1","VARF2","VARF3","VARF4","VARM0","VARM1","VARM2","VARM3","VARM4"],required:!1,default:"NATF2"},{name:"system_prompt",type:"string",description:"System persona prompt. Plain text is wrapped with the required tags.",required:!1},{name:"temperature",type:"float",description:"Audio token sampling temperature; must be nonnegative, and positive when do_sample=true. Ignored when do_sample=false; default 0.8.",required:!1,min:0,default:.8},{name:"text_temperature",type:"float",description:"Text token sampling temperature; must be nonnegative, and positive when do_sample=true. Ignored when do_sample=false; default follows temperature.",required:!1,min:0},{name:"top_k",type:"int",description:"Audio token top-k sampling limit; default 250.",required:!1,min:0,default:250},{name:"text_top_k",type:"int",description:"Text token top-k sampling limit; default follows top_k.",required:!1,min:0},{name:"do_sample",type:"bool",description:"Enable stochastic token sampling; default true. Set false for greedy decoding.",required:!1,default:!0},{name:"seed",type:"int",description:"uint32 seed. Session RNG starts at 42424242; explicit values reseed it, while omission on later conversations continues RNG state.",required:!1,min:0,max:4294967295}],session:[{name:"graph_arena_mb",type:"int",description:"Reusable ggml graph arena size in MiB for PersonaPlex LM, depformer, and Mimi graphs; default 1024.",required:!1,min:1,default:1024},{name:"lm_weight_context_mb",type:"int",description:"Main LM weight metadata arena size in MiB; default 64.",required:!1,min:1,default:64},{name:"depformer_weight_context_mb",type:"int",description:"Depth transformer weight metadata arena size in MiB; default 64.",required:!1,min:1,default:64},{name:"mimi_weight_context_mb",type:"int",description:"Mimi codec weight metadata arena size in MiB; default 64.",required:!1,min:1,default:64},{name:"weight_type",type:"enum",description:"LM and Mimi matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"personaplex_7b_v1_q4_k",display_name:"PersonaPlex 7B v1 Q4_K GGUF",default:!0,format:"gguf",precision:"q4_k",target_directory:"PersonaPlex-GGUF",files:["PersonaPlex-GGUF/personaplex-7b-v1-q4_k.gguf"],strip_prefix:"PersonaPlex-GGUF"},{id:"personaplex_7b_v1_q8_0",display_name:"PersonaPlex 7B v1 Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"PersonaPlex-GGUF",files:["PersonaPlex-GGUF/personaplex-7b-v1-q8_0.gguf"],strip_prefix:"PersonaPlex-GGUF"}],dependencies:[],ui:{recommended_package:"personaplex_7b_v1_q4_k",tags:["TTS","Stream","GGUF"],docs:["docs/models/personaplex.md","docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_model:"model:tokenizer_spm_32k_3.model",voice_NATF0:"model:voices_safetensors/NATF0.safetensors",voice_NATF1:"model:voices_safetensors/NATF1.safetensors",voice_NATF2:"model:voices_safetensors/NATF2.safetensors",voice_NATF3:"model:voices_safetensors/NATF3.safetensors",voice_NATM0:"model:voices_safetensors/NATM0.safetensors",voice_NATM1:"model:voices_safetensors/NATM1.safetensors",voice_NATM2:"model:voices_safetensors/NATM2.safetensors",voice_NATM3:"model:voices_safetensors/NATM3.safetensors",voice_VARF0:"model:voices_safetensors/VARF0.safetensors",voice_VARF1:"model:voices_safetensors/VARF1.safetensors",voice_VARF2:"model:voices_safetensors/VARF2.safetensors",voice_VARF3:"model:voices_safetensors/VARF3.safetensors",voice_VARF4:"model:voices_safetensors/VARF4.safetensors",voice_VARM0:"model:voices_safetensors/VARM0.safetensors",voice_VARM1:"model:voices_safetensors/VARM1.safetensors",voice_VARM2:"model:voices_safetensors/VARM2.safetensors",voice_VARM3:"model:voices_safetensors/VARM3.safetensors",voice_VARM4:"model:voices_safetensors/VARM4.safetensors"},tensors:{lm_weights:{source:"weights:",prefix:"lm"},mimi_weights:{source:"weights:",prefix:"mimi"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_model:"model:tokenizer_spm_32k_3.model",voice_NATF0:"model:voices_safetensors/NATF0.safetensors",voice_NATF1:"model:voices_safetensors/NATF1.safetensors",voice_NATF2:"model:voices_safetensors/NATF2.safetensors",voice_NATF3:"model:voices_safetensors/NATF3.safetensors",voice_NATM0:"model:voices_safetensors/NATM0.safetensors",voice_NATM1:"model:voices_safetensors/NATM1.safetensors",voice_NATM2:"model:voices_safetensors/NATM2.safetensors",voice_NATM3:"model:voices_safetensors/NATM3.safetensors",voice_VARF0:"model:voices_safetensors/VARF0.safetensors",voice_VARF1:"model:voices_safetensors/VARF1.safetensors",voice_VARF2:"model:voices_safetensors/VARF2.safetensors",voice_VARF3:"model:voices_safetensors/VARF3.safetensors",voice_VARF4:"model:voices_safetensors/VARF4.safetensors",voice_VARM0:"model:voices_safetensors/VARM0.safetensors",voice_VARM1:"model:voices_safetensors/VARM1.safetensors",voice_VARM2:"model:voices_safetensors/VARM2.safetensors",voice_VARM3:"model:voices_safetensors/VARM3.safetensors",voice_VARM4:"model:voices_safetensors/VARM4.safetensors"},tensors:{lm_weights:"model:model.safetensors",mimi_weights:"model:tokenizer-e351c8d8-checkpoint125.safetensors"}}]},s$={schema_version:1,family:"piper_tts",display_name:"Piper TTS",description:"Native VITS inference for Piper text-to-speech voices using the shared eSpeak-ng frontend.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"speed",type:"float",description:"Speech speed multiplier; larger values produce faster speech.",required:!1,min:.5,max:2,default:1},{name:"variation",type:"float",description:"Acoustic latent noise scale.",required:!1,min:0,max:1,default:.667},{name:"duration_variation",type:"float",description:"Stochastic duration noise scale.",required:!1,min:0,max:2,default:.8},{name:"seed",type:"int",description:"Non-negative generation seed.",required:!1,min:0,default:1234,max:4294967295},{name:"text_chunk_mode",type:"enum",description:"Long-form text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form chunk.",required:!1,min:1,default:280}],session:[{name:"espeak_library_path",type:"path",description:"Optional explicit path to the eSpeak-ng shared library.",required:!1},{name:"espeak_data_path",type:"path",description:"Optional explicit path to espeak-ng-data.",required:!1},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Components: decoder, duration_encoder, duration_flows. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn. Default keeps existing execution. The decoder's GGML impl supports the session backend; RKNN requires artifacts.main and ENGINE_ENABLE_RKNN, with no backend field. The two duration stages are GGML-only and accept the session backend (device) or cpu (host); with no backend field the text encoder runs on the host on CUDA and on the session backend elsewhere, and the flow graphs run on the session backend. No implementation takes params.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"piper_lessac_medium_orig",display_name:"Piper Lessac Medium Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Piper-TTS-GGUF",files:["Piper-TTS-GGUF/piper-en-us-lessac-medium-orig.gguf"],strip_prefix:"Piper-TTS-GGUF"},{id:"piper_lessac_medium_decoder_rk3588",display_name:"Piper Lessac Medium NPU Decoder RKNN (RK3588)",format:"rknn",precision:"f16",target_directory:"Piper-TTS-GGUF",files:["rk3588/piper-lessac-w93.rknn"],strip_prefix:"rk3588",description:"Pre-compiled RK3588 engine for the piper_tts RKNN decoder sidecar (piper_tts.exec_plan, artifacts.main); installs beside the GGUF weights and is named by bare file name. Built by tools/rknn from the en_US-lessac-medium streaming decoder export; see docs/build/rockchip-npu.md.",download:{kind:"huggingface_snapshot",repo:"wOvANAI/rknn-tts-engines",revision:"main",gated:!1}}],dependencies:[],ui:{recommended_package:"piper_lessac_medium_orig",tags:["TTS","GGUF"],docs:["docs/tts.md","docs/models/piper_tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},r$={schema_version:1,family:"plapre",display_name:"Plapre 3",description:"Danish speech synthesis with a Llama autoregressive decoder and Kanade audio codec. Streaming emits completed text chunks, not incremental codec frames.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["da"],capabilities:{tts:["long_form","speaker_reference","built_in_voices"],clone:["speaker_reference","long_form"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"voice_id",type:"enum",description:"Built-in speaker.",required:!1,default:"tor",values:["tor","ida","liv","ask","kaj"]},{name:"reference_text",type:"string",description:"Transcript of the reference audio, used for voice cloning.",required:!1,default:""},{name:"x_vector_only_mode",type:"bool",description:"Use only the reference speaker embedding, without the reference transcript/audio-token prefix.",required:!1,default:!1},{name:"word_duration_frames",type:"string",description:"JSON array of per-word integer durations, from 0 to 399 frames at 25 Hz. Duration-controlled text is generated in one chunk.",required:!1},{name:"context_text",type:"string",description:"Previous utterance for prosodic context.",required:!1},{name:"context_audio_file",type:"audio_path",description:"Optional previous-utterance WAV accompanying context_text.",required:!1},{name:"same_speaker",type:"bool",description:"Whether context_text belongs to the target speaker.",required:!1,default:!0},{name:"pronunciations",type:"string",description:'Ordered JSON array of pronunciation references: [{"word":"morgen","audio_file":"morgen.wav"}]. Up to 10 references, 60 codes each and 200 total codes are used.',required:!1},{name:"edit_start_frame",type:"int",description:"Start of the masked span in voice_ref, in 25-Hz codec frames. Supply both edit boundaries and the complete desired text.",required:!1,min:0},{name:"edit_end_frame",type:"int",description:"Exclusive end of the masked span in voice_ref. Editing runs in one text chunk.",required:!1,min:0},{name:"max_tokens",type:"int",description:"Maximum generated tokens per text chunk; each audio token represents 40 ms.",required:!1,default:500,min:1},{name:"min_tokens",type:"int",description:"Minimum generated tokens before a stop token can be selected.",required:!1,default:0,min:0},{name:"temperature",type:"float",description:"Sampling temperature; zero selects greedy decoding.",required:!1,default:.8,min:0},{name:"top_p",type:"float",description:"Nucleus sampling probability in (0, 1].",required:!1,default:.95,min:0,max:1},{name:"top_k",type:"int",description:"Top-k sampling; -1 or zero disables filtering.",required:!1,default:50,min:-1},{name:"seed",type:"int",description:"Sampling and vocoder noise seed.",required:!1,default:0,min:0},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk.",required:!1,default:300,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking policy.",required:!1,default:"default",values:["default","tag_aware","japanese","endline"]},{name:"silence_duration_sec",type:"float",description:"Silence inserted between text chunks.",required:!1,default:.1,min:0}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"plapre_3_bf16",display_name:"Plapre 3 BF16",format:"gguf",precision:"bf16",default:!0,target_directory:"Plapre-3-GGUF",files:["Plapre-3-GGUF/plapre-3-bf16.gguf"],strip_prefix:"Plapre-3-GGUF"},{id:"plapre_3_f32",display_name:"Plapre 3 F32",format:"gguf",precision:"f32",default:!1,target_directory:"Plapre-3-GGUF",files:["Plapre-3-GGUF/plapre-3-f32.gguf"],strip_prefix:"Plapre-3-GGUF"}],dependencies:[],ui:{recommended_package:"plapre_3_bf16",builtin_voices:["tor","ida","liv","ask","kaj"],default_voice:"tor",tags:["TTS","GGUF"],docs:["docs/models/plapre.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",kanade_config:"model:kanade_config.json",speakers:"model:speakers.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},tensors:{ar:"weights:",speaker_projection:{source:"weights:",prefix:"speaker_proj"},kanade:{source:"weights:",prefix:"kanade"},wavlm:{source:"weights:",prefix:"wavlm"},hift:{source:"weights:",prefix:"hift"}}}]},o$={family:"pocket_tts",display_name:"PocketTTS",description:"Kyutai 100M-parameter CPU-friendly TTS package set for real-time local synthesis and small-footprint voice cloning in English, French, German, Italian, Portuguese, and Spanish.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["en","fr","de","it","pt","es"],options:{request:[{name:"frames_after_eos",type:"int",description:"Extra frames after EOS; -1 uses the model-derived value.",required:!1,min:-1,default:-1},{name:"max_frames",type:"int",description:"Maximum generated audio frames; zero estimates the cap from text length. Captured during session preparation.",required:!1,min:0,default:0},{name:"text_chunk_tokens",type:"int",description:"Tokenizer tokens per text chunk; must be positive, default 50. Set during preparation and overridable per request.",required:!1,min:1,default:50},{name:"temperature",type:"float",description:"Positive flow noise temperature; defaults to the model configuration. Captured during session preparation.",required:!1},{name:"seed",type:"int",description:"Noise seed; omitted chooses a random seed. Captured during session preparation.",required:!1,min:0,max:4294967295},{name:"noise_clamp",type:"float",description:"Noise clamp; a negative value disables clamping. Captured during session preparation.",required:!1,default:-1},{name:"eos_threshold",type:"float",description:"EOS detection threshold. Captured during session preparation.",required:!1,default:-4},{name:"noise_file",type:"path",description:"Precomputed noise schedule file. Captured during session preparation.",required:!1},{name:"voice_embedding_file",type:"path",description:"Precomputed voice-state embedding path. Captured during session preparation.",required:!1},{name:"truncate_clone_audio",type:"bool",description:"Truncate voice clone audio. Captured during session preparation.",required:!1,default:!1},{name:"text_chunk_size",type:"int",description:"Optional per-request character chunk size; otherwise use sentence/token budgeting.",required:!1},{name:"export_voice_state_file",type:"path",description:"Export the prepared voice state during session preparation.",required:!1}],session:[{name:"voice_state_cache_slots",type:"int",description:"Cached prepared voice states; zero disables reuse.",required:!1,min:0,default:4},{name:"offline_graph_capacity_mode",type:"enum",description:"Offline graph capacity policy; CPU/Metal default tiered, other backends double.",required:!1,values:["fixed","double","tiered","grow"]},{name:"prompt_graph_capacity",type:"int",description:"Optional reserved prompt capacity.",required:!1,min:1},{name:"generation_graph_capacity",type:"int",description:"Optional reserved generation capacity.",required:!1,min:1},{name:"weight_type",type:"enum",description:"Shared matmul weight storage; component matmul settings inherit it. Convolution storage remains independently native unless overridden.",required:!1,preset:"weight_type_full"},{name:"matmul_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage.",required:!1,preset:"weight_type_conv",default:"native"},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"flow_weight_context_mb",type:"int",description:"Flow weight context in MiB; inherits pocket_tts.weight_context_mb when omitted.",required:!1,min:1},{name:"mimi_encoder_weight_context_mb",type:"int",description:"Mimi encoder weight context in MiB; inherits pocket_tts.weight_context_mb when omitted.",required:!1,min:1},{name:"mimi_decoder_weight_context_mb",type:"int",description:"Mimi decoder weight context in MiB; inherits pocket_tts.weight_context_mb when omitted.",required:!1,min:1},{name:"flow_weights_view_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"flow_step_graph_arena_mb",type:"int",description:"Flow-step host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:256},{name:"mimi_encoder_graph_arena_mb",type:"int",description:"Mimi encoder host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:512},{name:"mimi_conv_graph_arena_mb",type:"int",description:"Mimi convolution host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:32},{name:"mimi_transformer_graph_arena_mb",type:"int",description:"Mimi transformer host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:96},{name:"mimi_tail_graph_arena_mb",type:"int",description:"Mimi tail host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:512},{name:"mimi_full_chunk_frames",type:"int",description:"Full-sequence decoder chunk frames.",required:!1,min:1,default:90},{name:"mimi_stage2_chunk_frames",type:"int",description:"Second-stage decoder chunk frames.",required:!1,min:1,default:900},{name:"use_full_mimi",type:"bool",description:"Use full-sequence Mimi decoding.",required:!1,default:!0}],load:[{name:"language",type:"string",description:"Model language selection.",required:!1,default:"english"}]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"pocket_tts_english_q8_0",default_voice:"alba",builtin_voices:["alba"],tags:["TTS","Clone","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"pocket_tts_english_q8_0",display_name:"PocketTTS English Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/english",files:["PocketTTS-GGUF/english/pocket-tts-english-q8_0.gguf","PocketTTS-GGUF/english/embeddings/alba.safetensors"],strip_prefix:"PocketTTS-GGUF/english"},{id:"pocket_tts_english_bf16",display_name:"PocketTTS English BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/english",files:["PocketTTS-GGUF/english/pocket-tts-english-bf16.gguf","PocketTTS-GGUF/english/embeddings/alba.safetensors"],strip_prefix:"PocketTTS-GGUF/english"},{id:"pocket_tts_french_q8_0",display_name:"PocketTTS French Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/french",files:["PocketTTS-GGUF/french/pocket-tts-french-q8_0.gguf","PocketTTS-GGUF/french/embeddings/cosette.safetensors"],strip_prefix:"PocketTTS-GGUF/french"},{id:"pocket_tts_french_bf16",display_name:"PocketTTS French BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/french",files:["PocketTTS-GGUF/french/pocket-tts-french-bf16.gguf","PocketTTS-GGUF/french/embeddings/cosette.safetensors"],strip_prefix:"PocketTTS-GGUF/french"},{id:"pocket_tts_german_q8_0",display_name:"PocketTTS German Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/german",files:["PocketTTS-GGUF/german/pocket-tts-german-q8_0.gguf"],strip_prefix:"PocketTTS-GGUF/german"},{id:"pocket_tts_german_bf16",display_name:"PocketTTS German BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/german",files:["PocketTTS-GGUF/german/pocket-tts-german-bf16.gguf"],strip_prefix:"PocketTTS-GGUF/german"},{id:"pocket_tts_italian_q8_0",display_name:"PocketTTS Italian Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/italian",files:["PocketTTS-GGUF/italian/pocket-tts-italian-q8_0.gguf"],strip_prefix:"PocketTTS-GGUF/italian"},{id:"pocket_tts_italian_bf16",display_name:"PocketTTS Italian BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/italian",files:["PocketTTS-GGUF/italian/pocket-tts-italian-bf16.gguf"],strip_prefix:"PocketTTS-GGUF/italian"},{id:"pocket_tts_portuguese_q8_0",display_name:"PocketTTS Portuguese Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/portuguese",files:["PocketTTS-GGUF/portuguese/pocket-tts-portuguese-q8_0.gguf"],strip_prefix:"PocketTTS-GGUF/portuguese"},{id:"pocket_tts_portuguese_bf16",display_name:"PocketTTS Portuguese BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/portuguese",files:["PocketTTS-GGUF/portuguese/pocket-tts-portuguese-bf16.gguf"],strip_prefix:"PocketTTS-GGUF/portuguese"},{id:"pocket_tts_spanish_q8_0",display_name:"PocketTTS Spanish Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/spanish",files:["PocketTTS-GGUF/spanish/pocket-tts-spanish-q8_0.gguf"],strip_prefix:"PocketTTS-GGUF/spanish"},{id:"pocket_tts_spanish_bf16",display_name:"PocketTTS Spanish BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/spanish",files:["PocketTTS-GGUF/spanish/pocket-tts-spanish-bf16.gguf"],strip_prefix:"PocketTTS-GGUF/spanish"},{id:"pocket_tts_english_safetensors",display_name:"PocketTTS English Safetensors",format:"safetensors",precision:"native",target_directory:"pocket-tts",files:["languages/english/embeddings/alba.safetensors","languages/english/embeddings/anna.safetensors","languages/english/embeddings/azelma.safetensors","languages/english/embeddings/bill_boerst.safetensors","languages/english/embeddings/caro_davy.safetensors","languages/english/embeddings/charles.safetensors","languages/english/embeddings/cosette.safetensors","languages/english/embeddings/eponine.safetensors","languages/english/embeddings/estelle.safetensors","languages/english/embeddings/eve.safetensors","languages/english/embeddings/fantine.safetensors","languages/english/embeddings/george.safetensors","languages/english/embeddings/giovanni.safetensors","languages/english/embeddings/jane.safetensors","languages/english/embeddings/javert.safetensors","languages/english/embeddings/jean.safetensors","languages/english/embeddings/juergen.safetensors","languages/english/embeddings/lola.safetensors","languages/english/embeddings/marius.safetensors","languages/english/embeddings/mary.safetensors","languages/english/embeddings/michael.safetensors","languages/english/embeddings/paul.safetensors","languages/english/embeddings/peter_yearsley.safetensors","languages/english/embeddings/rafael.safetensors","languages/english/embeddings/stuart_bell.safetensors","languages/english/embeddings/vera.safetensors","languages/english/model.safetensors","languages/english/tokenizer.model"],download:{kind:"huggingface_snapshot",repo:"kyutai/pocket-tts",gated:!0}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tokenizer:"model:tokenizer.model"},optional_files:{config:"model:config.yaml"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{language:"languages/english"},files:{tokenizer:"language:tokenizer.model"},optional_files:{config:"language:config.yaml"},tensors:{weights:"language:model.safetensors"}}]},l$={schema_version:1,family:"pulsevad",display_name:"PulseVAD",description:"Speech activity detection for 16 kHz mono audio with 2.1K student and 81K teacher weights.",category:"audio_tools",status:"supported",tasks:["vad"],modes:["offline"],languages:["language_agnostic"],capabilities:{vad:["speech_segments"]},runtime:{tags:["gguf"]},options:{request:[{name:"threshold",type:"float",description:"Speech probability threshold.",required:!1,default:.5,min:0,max:1},{name:"hop_size_samples",type:"int",description:"Window step in samples; 1600 samples is 100 ms at 16 kHz.",required:!1,default:1600,min:1},{name:"min_speech_duration_ms",type:"int",description:"Minimum speech segment duration in milliseconds. Not applied to the short-input path (<3200 samples), which classifies the whole clip by threshold.",required:!1,default:100,min:0},{name:"min_silence_duration_ms",type:"int",description:"Minimum silence before closing a speech segment, in milliseconds.",required:!1,default:100,min:0}],session:[{name:"weight_type",type:"enum",description:"Weight storage override; native preserves the packaged tensor types.",values:["native","f32","f16","bf16"],required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"pulsevad_2_1k_f32",display_name:"PulseVAD 2.1K GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"PulseVAD-GGUF",files:["PulseVAD-GGUF/pulsevad-2.1k-f32.gguf"],strip_prefix:"PulseVAD-GGUF"},{id:"pulsevad_81k_f32",display_name:"PulseVAD 81K GGUF F32",format:"gguf",precision:"f32",target_directory:"PulseVAD-GGUF",files:["PulseVAD-GGUF/pulsevad-81k-f32.gguf"],strip_prefix:"PulseVAD-GGUF"}],dependencies:[],ui:{tags:["VAD","GGUF"],docs:["docs/models/pulsevad.md"],recommended_package:"pulsevad_2_1k_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},tensors:{weights:"model:pulsevad-f32.safetensors"}}]},c$={family:"qwen3_asr",display_name:"Qwen3-ASR",description:"Qwen ASR model family for language identification and speech recognition across 30 languages, 22 Chinese dialects, and multiple English accents, with robustness for noisy, long-form, and singing audio.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["zh","en","yue","ar","de","fr","es","pt","id","it","ko","ru","th","vi","ja","tr","hi","ms","nl","sv","da","fi","pl","cs","fil","fa","el","hu","mk","ro","zh dialects"],capabilities:{asr:["word_timestamps","vad_chunking","partial_results"]},options:{request:[{name:"language",type:"string",description:"Recognition language code or label. Omit to detect language automatically; Auto also selects automatic detection.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens; omitted uses the checkpoint generation_config.json (512 when absent).",required:!1,min:1},{name:"return_timestamps",type:"bool",description:"Return word-level timestamps by running Qwen3 ForcedAligner after ASR; default false and requires forced_aligner_path when enabled. Offline only; streaming rejects true even when an aligner is configured.",required:!1,default:!1},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode; default auto uses fixed chunks normally and VAD chunks when timestamps are requested. Offline only; streaming uses fixed-duration windows regardless of this selection.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum audio chunk duration in seconds; must be > 0 when chunking or streaming. Ignored with audio_chunk_mode=none offline. Default 30 for streaming and offline transcription, or 15 for offline timestamps/VAD chunking.",required:!1,min:0},{name:"clamp_timestamps_to_audio",type:"bool",description:"Opt-in guard for word timestamp output: keep repaired forced-aligner word spans inside the local audio chunk. Defaults to false to preserve existing timestamp repair behavior.",required:!1,default:!1},{name:"preserve_punctuation",type:"bool",description:"Opt-in text output mode for timestamped chunked ASR: preserve ASR punctuation in text_output instead of rebuilding text from aligned words.",required:!1,default:!1}],session:[{name:"lora",type:"path",description:"PEFT LoRA adapter directory or checkpoint file; merged into matching encoder/decoder weights at session creation.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"forced_aligner_path",type:"path",description:"Optional Qwen3 ForcedAligner model path required for return_timestamps.",required:!1},{name:"vad_model_path",type:"path",description:"Optional VAD model path for VAD chunking (any built-in VAD family); default assets/framework/models/silero_vad.",required:!1,default:"assets/framework/models/silero_vad"},{name:"weight_type",type:"enum",description:"Shared text decoder weight storage fallback; default native.",required:!1,default:"native",preset:"weight_type_full"},{name:"audio_encoder_weight_type",type:"enum",description:"Audio encoder weight storage type; default native.",required:!1,default:"native",preset:"weight_type_conv"},{name:"text_decoder_weight_type",type:"enum",description:"Text decoder matmul weight storage type; defaults to weight_type when set, otherwise native.",required:!1,preset:"weight_type_full"},{name:"audio_encoder_graph_arena_mb",type:"int",description:"Audio encoder graph arena size in MiB; default 128.",required:!1,min:1,default:128},{name:"text_decoder_prefill_graph_arena_mb",type:"int",description:"Text decoder prefill graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"text_decoder_decode_graph_arena_mb",type:"int",description:"Text decoder cached-step graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"text_decoder_weight_context_mb",type:"int",description:"Text decoder weight context size in MiB; default 64.",required:!1,min:1,default:64}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"qwen3_asr_1_7b_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/models/qwen3_asr.md","docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"qwen3_asr_1_7b_q8_0",display_name:"Qwen3-ASR 1.7B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Qwen3-ASR-1.7B-GGUF",files:["Qwen3-ASR-1.7B-GGUF/qwen3-asr-1.7b-q8_0.gguf"],strip_prefix:"Qwen3-ASR-1.7B-GGUF"},{id:"qwen3_asr_1_7b_f16",display_name:"Qwen3-ASR 1.7B F16 GGUF",format:"gguf",precision:"f16",target_directory:"Qwen3-ASR-1.7B-GGUF",files:["Qwen3-ASR-1.7B-GGUF/qwen3-asr-1.7b-f16.gguf"],strip_prefix:"Qwen3-ASR-1.7B-GGUF"},{id:"qwen3_asr_0_6b_q8_0",display_name:"Qwen3-ASR 0.6B Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Qwen3-ASR-0.6B-GGUF",files:["Qwen3-ASR-0.6B-GGUF/qwen3-asr-0.6b-q8_0.gguf"],strip_prefix:"Qwen3-ASR-0.6B-GGUF"},{id:"qwen3_asr_0_6b_f16",display_name:"Qwen3-ASR 0.6B F16 GGUF",format:"gguf",precision:"f16",target_directory:"Qwen3-ASR-0.6B-GGUF",files:["Qwen3-ASR-0.6B-GGUF/qwen3-asr-0.6b-f16.gguf"],strip_prefix:"Qwen3-ASR-0.6B-GGUF"},{id:"qwen3_asr_1_7b_safetensors",display_name:"Qwen3-ASR 1.7B HF Safetensors",format:"safetensors",precision:"native",target_directory:"Qwen3-ASR-1.7B-hf",files:["config.json","generation_config.json","model.safetensors","processor_config.json","tokenizer_config.json","tokenizer.json"],download:{kind:"huggingface_snapshot",repo:"Qwen/Qwen3-ASR-1.7B-hf"}},{id:"qwen3_asr_0_6b_safetensors",display_name:"Qwen3-ASR 0.6B Safetensors",format:"safetensors",precision:"native",target_directory:"Qwen3-ASR-0.6B",files:["config.json","generation_config.json","model.safetensors","preprocessor_config.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"Qwen/Qwen3-ASR-0.6B"}},{id:"qwencleo_asr_q8_0",display_name:"QwenCleo-ASR Egyptian Arabic Q8_0 GGUF",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of Qwen3-ASR-1.7B from mohammedaly22/QwenCleo-ASR. Use language=Arabic.",format:"gguf",precision:"q8_0",target_directory:"QwenCleo-ASR-GGUF",files:["qwencleo-asr-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/QwenCleo-ASR-GGUF"}},{id:"qwencleo_asr_f16",display_name:"QwenCleo-ASR Egyptian Arabic F16 GGUF",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of Qwen3-ASR-1.7B from mohammedaly22/QwenCleo-ASR. Use language=Arabic.",format:"gguf",precision:"f16",target_directory:"QwenCleo-ASR-GGUF",files:["qwencleo-asr-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/QwenCleo-ASR-GGUF"}},{id:"qwencleo_asr_safetensors",display_name:"QwenCleo-ASR Egyptian Arabic Safetensors",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of Qwen3-ASR-1.7B from mohammedaly22/QwenCleo-ASR. Use language=Arabic.",format:"safetensors",precision:"native",target_directory:"QwenCleo-ASR",files:["config.json","generation_config.json","model.safetensors","preprocessor_config.json","tokenizer_config.json","tokenizer.json","vocab.json","merges.txt","chat_template.json"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/QwenCleo-ASR"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},d$={family:"qwen3_forced_aligner",display_name:"Qwen3 Forced Aligner",description:"Qwen3 non-autoregressive forced aligner that aligns transcript text to speech and returns word- or character-level timestamps across 11 supported languages.",category:"speech_analysis",status:"supported",tasks:["align"],modes:["offline"],languages:["zh","en","yue","fr","de","it","ja","ko","pt","ru","es"],capabilities:{align:["word_timestamps"]},options:{request:[{name:"clamp_timestamps_to_audio",type:"bool",description:"Opt-in guard for word timestamp output: keep repaired word spans inside the local audio input. Defaults to false to preserve existing timestamp repair behavior.",required:!1,default:!1}],session:[{name:"weight_type",type:"enum",description:"Shared thinker matmul storage; does not override audio encoder storage.",required:!1,preset:"weight_type_full",default:"native"},{name:"audio_encoder_weight_type",type:"enum",description:"Audio encoder matmul storage.",required:!1,values:["native","f32","f16"],default:"native"},{name:"thinker_weight_type",type:"enum",description:"Thinker matmul storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"audio_encoder_graph_arena_mb",type:"int",description:"Audio encoder graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:128},{name:"thinker_prefill_graph_arena_mb",type:"int",description:"Thinker prefill graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:256},{name:"thinker_decode_graph_arena_mb",type:"int",description:"Thinker cached-step graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:256},{name:"thinker_weight_context_mb",type:"int",description:"Thinker weight metadata context. Size in MiB; must be positive.",required:!1,min:1,default:64}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"qwen3_forced_aligner_0_6b_q8_0",tags:["Align","GGUF"],docs:["docs/models/qwen3_forced_aligner.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"qwen3_forced_aligner_0_6b_q8_0",display_name:"Qwen3 Forced Aligner 0.6B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Qwen3-ForcedAligner-0.6B-GGUF",files:["Qwen3-ForcedAligner-0.6B-GGUF/qwen3-forced-aligner-0.6b-q8_0.gguf"],strip_prefix:"Qwen3-ForcedAligner-0.6B-GGUF"},{id:"qwen3_forced_aligner_0_6b_f16",display_name:"Qwen3 Forced Aligner 0.6B F16 GGUF",format:"gguf",precision:"f16",target_directory:"Qwen3-ForcedAligner-0.6B-GGUF",files:["Qwen3-ForcedAligner-0.6B-GGUF/qwen3-forced-aligner-0.6b-f16.gguf"],strip_prefix:"Qwen3-ForcedAligner-0.6B-GGUF"},{id:"qwen3_forced_aligner_0_6b_safetensors",display_name:"Qwen3 Forced Aligner 0.6B Safetensors",format:"safetensors",precision:"native",target_directory:"Qwen3-ForcedAligner-0.6B",files:["config.json","generation_config.json","model.safetensors","preprocessor_config.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"Qwen/Qwen3-ForcedAligner-0.6B"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},u$={family:"qwen3_tts",display_name:"Qwen3-TTS",description:"Qwen3-TTS for controllable 10-language synthesis, 3-second voice cloning, CustomVoice, and VoiceDesign.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["zh","en","ja","ko","de","fr","ru","pt","es","it"],capabilities:{clone:["speaker_reference"],design:["voice_design"]},options:{request:[{name:"stream_chunk_policy",type:"enum",description:"Streaming codec chunk schedule: grow starts with one frame and doubles to stream_frames_per_event; fixed uses that size throughout.",required:!1,default:"grow",values:["grow","fixed"]},{name:"stream_frames_per_event",type:"int",description:"Codec frames per fixed streaming event, or the maximum for growing events. Smaller values reduce chunk latency but increase decoding overhead.",required:!1,default:12,min:1},{name:"language",type:"string",description:"Target synthesis language code or label; default auto lets the model infer from text and voice settings.",required:!1,default:"auto"},{name:"max_tokens",type:"int",description:"Maximum generated codec frames per text chunk; omitted uses the checkpoint generation_config.json (2048 when absent).",required:!1,min:1},{name:"do_sample",type:"bool",description:"Sample the main codec stream instead of greedy decoding; default true.",required:!1,default:!0},{name:"temperature",type:"float",description:"Main codec sampling temperature; must be > 0 when do_sample=true. Ignored when do_sample=false; default 0.9.",required:!1,min:0,default:.9},{name:"top_k",type:"int",description:"Main codec top-k sampling limit; default 50, 0 disables top-k filtering.",required:!1,min:0,default:50},{name:"top_p",type:"float",description:"Main codec nucleus sampling limit; default 1.0.",required:!1,min:0,max:1,default:1},{name:"repetition_penalty",type:"float",description:"Main codec repetition penalty; must be > 0, default 1.05.",required:!1,min:0,default:1.05},{name:"subtalker_do_sample",type:"bool",description:"Enable subtalker sampling for the remaining audio codebooks instead of greedy decoding; default true.",required:!1,default:!0},{name:"subtalker_temperature",type:"float",description:"Subtalker sampling temperature; must be > 0 when subtalker_do_sample=true. Ignored when subtalker_do_sample=false; default 0.9.",required:!1,min:0,default:.9},{name:"subtalker_top_k",type:"int",description:"Subtalker top-k sampling limit; default 50, 0 disables top-k filtering.",required:!1,min:0,default:50},{name:"subtalker_top_p",type:"float",description:"Subtalker nucleus sampling limit; default 1.0.",required:!1,min:0,max:1,default:1},{name:"seed",type:"int",description:"Codec sampling seed; omitted requests choose a random seed.",required:!1,min:0,max:4294967295},{name:"reference_text",type:"string",description:"Transcript matching the reference audio for voice cloning; required unless x_vector_only_mode=true.",required:!1},{name:"x_vector_only_mode",type:"bool",description:"Use only the speaker embedding for voice cloning instead of ICL reference codec prompting; default false.",required:!1,default:!1},{name:"instruct",type:"string",description:"Optional natural-language voice or style instruction for VoiceDesign and CustomVoice variants; empty instructions are accepted.",required:!1},{name:"voice_id",type:"enum",description:"Named preset speaker from the CustomVoice checkpoint. Legacy speaker remains accepted.",values:["aiden","dylan","eric","ono_anna","ryan","serena","sohee","uncle_fu","vivian"],required:!1},{name:"text_chunk_size",type:"int",description:"Maximum UTF-8 codepoints per long-form text chunk; default 8192.",required:!1,min:1,default:8192}],session:[{name:"lora",type:"path",description:"PEFT LoRA adapter directory or checkpoint file; optional speaker_embedding and tts_config.json sidecars provide a trained custom voice.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"mem_saver",type:"bool",description:"Release the talker cached-step graph after each request; default false.",required:!1,default:!1},{name:"stitch_decode",type:"bool",description:"Voice the concatenated speech codes of all text chunks in one decoder pass instead of voicing each chunk separately; default false. Per-chunk voicing re-voices the voice-clone reference once per chunk and restarts the stateful vocoder cache at every chunk boundary; the stitched pass costs device memory proportional to the utterance.",required:!1,default:!1},{name:"attention",type:"enum",description:"Attention preference; default mixed uses manual prefill and contiguous-K/V flash cached decoding in the talker and code predictor, with eager speech tokenization. auto uses the shared backend policy; eager disables flash; flash uses flash with K/V views. Explicit values override perf_mode.",values:["mixed","auto","eager","flash"],required:!1,default:"mixed"},{name:"packed_projections",type:"bool",description:"Pack QKV and gate/up projections in the talker and code predictor without changing weight dtype; default false, true with cuda_perf. Explicit values override the preset.",required:!1},{name:"kv_cache_write",type:"enum",description:"Talker and code-predictor cache writes: standard by default, optimized with cuda_perf. Optimized uses backend-friendly views and I64 indices to allow fusion where supported. Explicit values override the preset.",values:["standard","optimized"],required:!1},{name:"kv_cache_type",type:"enum",description:"Talker and code-predictor KV storage: f32 by default, f16 with cuda_perf. Explicit values override the preset. F16 reduces cache memory and may change numerical results.",values:["f32","f16"],required:!1},{name:"talker_kv_cache_alignment",type:"int",description:"Round talker KV capacity to this many rows. Defaults to 1 (no padding), or 256 with perf_mode=cuda_perf. Explicit values override the preset. Larger alignments may use more memory and change numerical results.",min:1,default:1,required:!1},{name:"stream_decoder",type:"enum",description:"GGML streaming decoder; stateful carries convolution and attention history and caches graphs for exact chunk lengths. Uses more graph memory and can change audio; default windowed preserves existing behavior.",values:["windowed","stateful"],default:"windowed",required:!1},{name:"perf_mode",type:"enum",description:"Performance preset; default off. flash_attention selects flash attention. cuda_perf also selects packed projections, optimized cache writes, f16 KV and convolution weights, stateful streaming decoding, and KV alignment 256. Explicit session options override the preset. May change audio and memory use.",values:["off","flash_attention","cuda_perf"],required:!1,default:"off"},{name:"voice_prompt_cache_slots",type:"int",description:"Voice prompt cache slots; default 1.",required:!1,min:0,default:1},{name:"weight_type",type:"enum",description:"Shared talker matmul weight storage type; default native.",required:!1,default:"native",preset:"weight_type_full"},{name:"talker_weight_type",type:"enum",description:"Talker weight storage type; defaults to weight_type when set, otherwise native.",required:!1,preset:"weight_type_full"},{name:"speech_encoder_weight_type",type:"enum",description:"Reference speech encoder matmul weight storage type; default native.",required:!1,default:"native",preset:"weight_type_full"},{name:"speech_decoder_weight_type",type:"enum",description:"Speech decoder matmul weight storage type; default native.",required:!1,default:"native",preset:"weight_type_full"},{name:"conv_weight_type",type:"enum",description:"Speech tokenizer and speaker-encoder convolution weight storage type; default f32.",required:!1,default:"f32",preset:"weight_type_conv"},{name:"exec_plan",type:"string",required:!1,default:"{}",description:"JSON object of component execution plans. Component: speech_decoder. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn. GGML supports the session backend. RKNN requires artifacts.main, optionally artifacts.first for the first streaming group, and ENGINE_ENABLE_RKNN; omit backend. RKNN skips GGML decoder weights. Neither implementation takes params."},{name:"talker_graph_arena_mb",type:"int",description:"Talker graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"speech_encoder_graph_arena_mb",type:"int",description:"Reference speech encoder graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"speech_decoder_graph_arena_mb",type:"int",description:"Speech decoder graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"speaker_encoder_graph_arena_mb",type:"int",description:"Speaker encoder graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"talker_constant_context_mb",type:"int",description:"Talker constant tensor context size in MiB; default 4.",required:!1,min:1,default:4},{name:"code_predictor_constant_context_mb",type:"int",description:"Code predictor constant tensor context size in MiB; default 4.",required:!1,min:1,default:4},{name:"speech_decoder_constant_context_mb",type:"int",description:"Speech decoder constant tensor context size in MiB; default 4.",required:!1,min:1,default:4}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"qwen3_tts_1_7b_base_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/models/qwen3_tts.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"qwen3_tts_1_7b_base_q8_0",display_name:"Qwen3 TTS 12Hz 1.7B Base Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Qwen3-TTS-12Hz-1.7B-Base-GGUF",files:["Qwen3-TTS-12Hz-1.7B-Base-GGUF/qwen3-tts-12hz-1.7b-base-q8_0_v2.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-Base-GGUF"},{id:"qwen3_tts_1_7b_base_bf16",display_name:"Qwen3 TTS 12Hz 1.7B Base BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Qwen3-TTS-12Hz-1.7B-Base-GGUF",files:["Qwen3-TTS-12Hz-1.7B-Base-GGUF/qwen3-tts-12hz-1.7b-base-bf16.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-Base-GGUF"},{id:"qwen3_tts_1_7b_base_orig",display_name:"Qwen3 TTS 12Hz 1.7B Base Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"Qwen3-TTS-12Hz-1.7B-Base-GGUF",files:["Qwen3-TTS-12Hz-1.7B-Base-GGUF/qwen3-tts-12hz-1.7b-base-orig.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-Base-GGUF"},{id:"qwen3_tts_1_7b_customvoice_q8_0",display_name:"Qwen3 TTS 12Hz 1.7B CustomVoice Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF",files:["Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF/qwen3-tts-12hz-1.7b-customvoice-q8_0.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF"},{id:"qwen3_tts_1_7b_customvoice_bf16",display_name:"Qwen3 TTS 12Hz 1.7B CustomVoice BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF",files:["Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF/qwen3-tts-12hz-1.7b-customvoice-bf16.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF"},{id:"qwen3_tts_1_7b_voicedesign_q8_0",display_name:"Qwen3 TTS 12Hz 1.7B VoiceDesign Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF",files:["Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF/qwen3-tts-12hz-1.7b-voicedesign-q8_0.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF"},{id:"qwen3_tts_1_7b_voicedesign_bf16",display_name:"Qwen3 TTS 12Hz 1.7B VoiceDesign BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF",files:["Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF/qwen3-tts-12hz-1.7b-voicedesign-bf16.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF"},{id:"qwen3_tts_0_6b_base_q8_0",display_name:"Qwen3 TTS 12Hz 0.6B Base Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Qwen3-TTS-12Hz-0.6B-Base-GGUF",files:["Qwen3-TTS-12Hz-0.6B-Base-GGUF/qwen3-tts-12hz-0.6b-base-q8_0.gguf"],strip_prefix:"Qwen3-TTS-12Hz-0.6B-Base-GGUF"},{id:"qwen3_tts_0_6b_base_bf16",display_name:"Qwen3 TTS 12Hz 0.6B Base BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Qwen3-TTS-12Hz-0.6B-Base-GGUF",files:["Qwen3-TTS-12Hz-0.6B-Base-GGUF/qwen3-tts-12hz-0.6b-base-bf16.gguf"],strip_prefix:"Qwen3-TTS-12Hz-0.6B-Base-GGUF"},{id:"qwen3_tts_1_7b_base_safetensors",display_name:"Qwen3 TTS 12Hz 1.7B Base Safetensors",format:"safetensors",precision:"native",target_directory:"Qwen3-TTS-12Hz-1.7B-Base",files:["config.json","generation_config.json","model.safetensors","speech_tokenizer/config.json","speech_tokenizer/model.safetensors","tokenizer_config.json","vocab.json","merges.txt"],download:{kind:"huggingface_snapshot",repo:"Qwen/Qwen3-TTS-12Hz-1.7B-Base"}},{id:"qwen3_tts_0_6b_base_speech_decoder_rk3588",display_name:"Qwen3 TTS 12Hz 0.6B NPU Speech Decoder RKNN Pair (RK3588)",format:"rknn",precision:"f16",target_directory:"Qwen3-TTS-12Hz-0.6B-Base-GGUF",files:["rk3588/qwen3-tts/vocoder_stateful_16_fp16.rknn","rk3588/qwen3-tts/vocoder_stateful_64b_fp16.rknn"],strip_prefix:"rk3588/qwen3-tts",description:"Pre-compiled RK3588 engine pair (chunk 16 for the first streaming group, chunk 64 for the rest) for the qwen3_tts RKNN speech decoder (qwen3_tts.exec_plan, artifacts.main/first); installs beside the 0.6B GGUF weights and is named by bare file name. Built by tools/rknn from the Qwen3-TTS-12Hz speech tokenizer decoder; see docs/build/rockchip-npu.md.",download:{kind:"huggingface_snapshot",repo:"wOvANAI/rknn-tts-engines",revision:"main",gated:!1}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",speech_tokenizer_config:"model:speech_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},speech_tokenizer_weights:{source:"weights:",prefix:"speech_tokenizer_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",speech_tokenizer_config:"model:speech_tokenizer/config.json"},tensors:{model_weights:"model:model.safetensors",speech_tokenizer_weights:"model:speech_tokenizer/model.safetensors"}}]},f$={schema_version:1,family:"reuse",display_name:"RE-USE",description:"Sample-rate-independent speech restoration with bidirectional Mamba.",category:"audio_tools",status:"supported",tasks:["s2s"],modes:["offline"],languages:["language_agnostic"],capabilities:{s2s:["audio_enhancement"]},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_duration_sec",type:"float",description:"Chunk duration in seconds; zero processes the whole recording. When enabled, the chunk sample count must exceed sample_rate/50. Chunking changes bidirectional and normalization context. Native batching requires zero; positive chunk durations are supported only for single requests.",min:0,default:0,required:!1},{name:"audio_chunk_overlap_sec",type:"float",description:"Hann-weighted overlap in seconds, shorter than the chunk duration. Applies only to single-request chunking; native batching ignores this setting.",min:0,default:1,required:!1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; native preserves GGUF tensor types.",preset:"weight_type_full",default:"native",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/RE-USE-GGUF",revision:"main",gated:!1}},packages:[{id:"reuse_f32",display_name:"RE-USE F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"RE-USE-GGUF",files:["reuse-f32.gguf"]},{id:"reuse_f16",display_name:"RE-USE F16 GGUF",default:!1,format:"gguf",precision:"f16",target_directory:"RE-USE-GGUF",files:["reuse-f16.gguf"]},{id:"reuse_q8_0",display_name:"RE-USE Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"RE-USE-GGUF",files:["reuse-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"reuse_f32",tags:["GGUF"],docs:["docs/models/reuse.md","docs/audio_tools.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},p$={schema_version:1,family:"rvc",display_name:"RVC",description:"RVC is an offline retrieval-based voice conversion family packaged for audio.cpp with native HuBERT content features, RMVPE pitch extraction, optional IVF retrieval blending, packaged v1/v2 voices, and support for user-supplied RVC checkpoints.",category:"voice_conversion",status:"experimental",tasks:["vc"],modes:["offline"],languages:["language_agnostic"],runtime:{tags:["gguf"]},capabilities:{},options:{request:[{name:"voice_id",type:"enum",description:"Packaged RVC voice id; default selects the v2 default voice. Ignored when voice_model_path is provided.",values:["default","manthos","chocola","fraise"],required:!1,default:"default"},{name:"voice_model_path",type:"path",description:"Optional user RVC .pth or .pt voice checkpoint path. When set, this overrides the packaged voice id.",required:!1},{name:"pitch_extractor",type:"enum",description:"Pitch extraction method for F0-enabled voices; the native path currently supports rmvpe only.",values:["rmvpe"],required:!1,default:"rmvpe"},{name:"pitch_file",type:"path",description:"Optional CSV F0 override file with time,Hz rows sorted by time.",required:!1},{name:"retrieval_index_file",type:"path",description:"Optional user FAISS .index retrieval path used when retrieval_blend is greater than 0 for a user voice model.",required:!1},{name:"retrieval_blend",type:"float",description:"IVF retrieval feature blend rate; default 0 disables retrieval blending.",required:!1,min:0,max:1,default:0},{name:"semitone_shift",type:"int",description:"Semitone pitch shift applied before synthesis; default 0.",required:!1,default:0},{name:"pitch_filter_radius",type:"int",description:"Pitch median-filter switch: values >2 enable a radius-1 filter; values <=2 disable it.",required:!1,default:3},{name:"output_sample_rate",type:"int",description:"Output sample rate in Hz; default 0 keeps the selected voice model sample rate. Nonpositive values preserve the voice sample rate.",required:!1,default:0},{name:"rms_mix_rate",type:"float",description:"RMS envelope mix rate applied after conversion; default 0.25.",required:!1,default:.25},{name:"unvoiced_protection",type:"float",description:"Unvoiced consonant protection strength; must be in [0, 1], default 0.33.",required:!1,min:0,max:1,default:.33},{name:"speaker_id",type:"int",description:"Speaker embedding id for multi-speaker RVC checkpoints; default 0.",required:!1,min:0,default:0},{name:"audio_pad_duration_sec",type:"int",description:"Long-audio chunk pad duration in seconds; default 1.",required:!1,min:1,default:1},{name:"split_query_sec",type:"int",description:"Quiet-point query window in seconds for long-audio splitting; default 5.",required:!1,min:1,default:5},{name:"split_center_sec",type:"int",description:"Long-audio split center stride in seconds; default 30.",required:!1,min:1,default:30},{name:"split_threshold_sec",type:"int",description:"Input duration in seconds before quiet-point splitting is used; default 32.",required:!1,min:1,default:32}],session:[{name:"weight_type",type:"enum",description:"Tensor storage type for native RVC, HuBERT, and RMVPE weights; default f32.",preset:"weight_type_full",required:!1,default:"f32"},{name:"voice_cache_slots",type:"int",description:"User voice model cache slots; default 4, set 0 to disable caching.",required:!1,min:0,default:4}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"rvc_f16",display_name:"RVC F16 GGUF",default:!0,format:"gguf",precision:"f16",target_directory:"RVC-GGUF",files:["RVC-GGUF/rvc-f16.gguf"],strip_prefix:"RVC-GGUF"}],dependencies:[],ui:{recommended_package:"rvc_f16",tags:["VC","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{voice_v1_chocola_index:"model:voices/v1/chocola/added_IVF732_Flat_nprobe_1.index",voice_v1_fraise_index:"model:voices/v1/fraise/added_IVF802_Flat_nprobe_1.index",voice_v2_default_index:"model:voices/v2/default/added_IVF511_Flat_nprobe_1_default_v2.index",voice_v2_manthos_index:"model:voices/v2/manthos/added_IVF2586_Flat_nprobe_1_manthos_v2.index"},tensors:{support_hubert_base:{source:"weights:",prefix:"support_hubert_base"},support_rmvpe:{source:"weights:",prefix:"support_rmvpe"},voice_v1_chocola_checkpoint:{source:"weights:",prefix:"voice_v1_chocola_checkpoint"},voice_v1_chocola_index_vectors:{source:"weights:",prefix:"voice_v1_chocola_index_vectors"},voice_v1_fraise_checkpoint:{source:"weights:",prefix:"voice_v1_fraise_checkpoint"},voice_v1_fraise_index_vectors:{source:"weights:",prefix:"voice_v1_fraise_index_vectors"},voice_v2_default_checkpoint:{source:"weights:",prefix:"voice_v2_default_checkpoint"},voice_v2_default_index_vectors:{source:"weights:",prefix:"voice_v2_default_index_vectors"},voice_v2_manthos_checkpoint:{source:"weights:",prefix:"voice_v2_manthos_checkpoint"},voice_v2_manthos_index_vectors:{source:"weights:",prefix:"voice_v2_manthos_index_vectors"}}},{format:"safetensors",roots:{safetensors:"../safetensors"},files:{voice_v1_chocola_index:"safetensors:voices/v1/chocola/added_IVF732_Flat_nprobe_1.index",voice_v1_fraise_index:"safetensors:voices/v1/fraise/added_IVF802_Flat_nprobe_1.index",voice_v2_default_index:"safetensors:voices/v2/default/added_IVF511_Flat_nprobe_1_default_v2.index",voice_v2_manthos_index:"safetensors:voices/v2/manthos/added_IVF2586_Flat_nprobe_1_manthos_v2.index"},tensors:{support_hubert_base:"safetensors:support/hubert_base.safetensors",support_rmvpe:"safetensors:support/rmvpe.safetensors",voice_v1_chocola_checkpoint:"safetensors:voices/v1/chocola/chocola2333333.safetensors",voice_v1_chocola_index_vectors:"safetensors:voices/v1/chocola/added_IVF732_Flat_nprobe_1.ivf.safetensors",voice_v1_fraise_checkpoint:"safetensors:voices/v1/fraise/fraise2333333.safetensors",voice_v1_fraise_index_vectors:"safetensors:voices/v1/fraise/added_IVF802_Flat_nprobe_1.ivf.safetensors",voice_v2_default_checkpoint:"safetensors:voices/v2/default/default.safetensors",voice_v2_default_index_vectors:"safetensors:voices/v2/default/added_IVF511_Flat_nprobe_1_default_v2.ivf.safetensors",voice_v2_manthos_checkpoint:"safetensors:voices/v2/manthos/manthos.safetensors",voice_v2_manthos_index_vectors:"safetensors:voices/v2/manthos/added_IVF2586_Flat_nprobe_1_manthos_v2.ivf.safetensors"}}]},m$={schema_version:1,family:"sam_audio",display_name:"SAM Audio",description:"Prompt-conditioned audio separation.",category:"audio_tools",status:"supported",tasks:["s2s"],modes:["offline"],languages:["language_agnostic"],capabilities:{},runtime:{tags:["gguf"]},options:{request:[{name:"reference_video_file",type:"path",description:"Masked video identifying the target source; frames are matched to audio by nearest timestamp. Requires libav runtime libraries. Mutually exclusive with reference_image_file.",required:!1},{name:"reference_image_file",type:"path",description:"Masked RGB image identifying the target sound source, used as a constant visual prompt throughout the recording. Mask unwanted regions before supplying the image.",required:!1},{name:"anchors",type:"string",description:'Optional JSON array of time spans: [["+", start_seconds, end_seconds], ["-", start_seconds, end_seconds]]. Positive spans identify the target; negative spans identify sounds to exclude.',required:!1},{name:"seed",type:"int",description:"Random seed; -1 selects a random seed.",min:-1,max:4294967295,default:42,required:!1},{name:"num_inference_steps",type:"int",description:"Midpoint integration steps; each step evaluates the denoiser twice.",min:1,default:16,required:!1}],session:[{name:"memory_bounded",type:"bool",description:"Experimental bounded-workspace execution with full recording context. Provisional option name.",default:!1,required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/SAM-Audio-GGUF",revision:"main",gated:!1}},packages:[{id:"sam_audio_small_f32",display_name:"SAM Audio Small F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"SAM-Audio-GGUF",files:["sam-audio-small-f32.gguf"]},{id:"sam_audio_small_bf16",display_name:"SAM Audio Small BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"SAM-Audio-GGUF",files:["sam-audio-small-bf16.gguf"]},{id:"sam_audio_small_q8_0",display_name:"SAM Audio Small Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"SAM-Audio-GGUF",files:["sam-audio-small-q8_0.gguf"]},{id:"sam_audio_base_f32",display_name:"SAM Audio Base F32 GGUF",format:"gguf",precision:"f32",target_directory:"SAM-Audio-GGUF",files:["sam-audio-base-f32.gguf"]},{id:"sam_audio_base_bf16",display_name:"SAM Audio Base BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"SAM-Audio-GGUF",files:["sam-audio-base-bf16.gguf"]},{id:"sam_audio_base_q8_0",display_name:"SAM Audio Base Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"SAM-Audio-GGUF",files:["sam-audio-base-q8_0.gguf"]},{id:"sam_audio_large_f32",display_name:"SAM Audio Large F32 GGUF",format:"gguf",precision:"f32",target_directory:"SAM-Audio-GGUF",files:["sam-audio-large-f32.gguf"]},{id:"sam_audio_large_bf16",display_name:"SAM Audio Large BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"SAM-Audio-GGUF",files:["sam-audio-large-bf16.gguf"]},{id:"sam_audio_large_q8_0",display_name:"SAM Audio Large Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"SAM-Audio-GGUF",files:["sam-audio-large-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"sam_audio_small_f32",tags:["GGUF"],docs:["docs/models/sam_audio.md","docs/audio_tools.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",t5_config:"model:t5_config.json",tokenizer:"model:tokenizer/spiece.model"},tensors:{weights:{source:"weights:"}}}]},g$={schema_version:1,family:"samsone",display_name:"SAMSONE",description:"Compact audio-language models for audio captioning, question answering, and sound, music, and speech understanding.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en"],capabilities:{},runtime:{tags:["gguf"]},options:{request:[{name:"instruct",type:"string",default:"describe the audio",required:!1,description:"Question or instruction about the input audio."},{name:"max_tokens",type:"int",min:1,default:100,required:!1,description:"Maximum response tokens. Must be positive; audio/prompt tokens plus this budget must fit checkpoint max_position_embeddings."}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"samsone_99m_bf16",display_name:"SAMSONE 99M GGUF BF16",default:!0,format:"gguf",precision:"bf16",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-99m-bf16.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_99m_q8_0",display_name:"SAMSONE 99M GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-99m-q8_0.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_134m_bf16",display_name:"SAMSONE 134M GGUF BF16",format:"gguf",precision:"bf16",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-134m-bf16.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_134m_q8_0",display_name:"SAMSONE 134M GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-134m-q8_0.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_356m_bf16",display_name:"SAMSONE 356M GGUF BF16",format:"gguf",precision:"bf16",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-356m-bf16.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_356m_q8_0",display_name:"SAMSONE 356M GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-356m-q8_0.gguf"],strip_prefix:"Samsone-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/samsone.md"],recommended_package:"samsone_99m_bf16"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",token_map:"model:token_map.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},h$={schema_version:1,family:"sanotts",display_name:"sanoTTS Nano",description:"Very small multilingual text-to-speech across fourteen languages. Two graphs: the nano lineage (duration student, contextual acoustic student to mel-100, noise-fed ConvNeXt-1D decoder with an iSTFT head; voices heart 2.27M and heart-nano 294k, English, 24 kHz) and the deterministic piperlite lineage (duration student, acoustic student to a 192-channel latent, optionally through a calibration adapter, then a 3-stage ConvTranspose1d decoder with dilated residual banks; voices amy, hfc and kristin for English, vi, id, cs, de, es, fr, it, pt, ro, ru, tr, ne and hi at 1.1-1.8M parameters, 22.05 kHz). Uses an external eSpeak-ng phonemizer.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en","vi","id","cs","de","es","fr","it","pt","ro","ru","tr","ne","hi"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"speed",type:"float",description:"Speech speed multiplier; larger is faster. Its reciprocal scales the voice's tuned length scale before the per-token clamp.",required:!1,min:.5,max:2,default:1},{name:"seed",type:"int",description:"Decoder noise seed. The decoder is noise-fed, so a given seed picks one of many valid renderings; 0 derives it from the text as sha256(text)[:8], which is what the reference implementations do. Piperlite voices are deterministic and ignore the seed.",required:!1,min:0,default:0},{name:"text_chunk_mode",type:"enum",description:"Long-form text chunking mode.",values:["word_budget"],required:!1,default:"word_budget"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 280.",required:!1,min:1,default:280}],session:[{name:"espeak_library_path",type:"path",description:"Optional explicit path to the eSpeak-ng shared library.",required:!1},{name:"espeak_data_path",type:"path",description:"Optional explicit path to the directory containing espeak-ng-data.",required:!1},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Component: decoder. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/neon; no artifacts or params are used. Default retains automatic NEON selection on supported Nano-lineage AArch64 CPU sessions. GGML supports the session backend; explicit NEON requires a Nano-lineage model, AArch64 NEON, and a CPU session.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"ampixa/sanoTTS",revision:"main",gated:!1}},packages:[{id:"sanotts_heart_nano_orig",display_name:"sanoTTS heart-nano 294k FP32 GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"sanoTTS-heart-nano-GGUF",files:["gguf/heart-nano-f32.gguf","gguf/config.json"],strip_prefix:"gguf"},{id:"sanotts_heart_orig",display_name:"sanoTTS heart 2.27M FP32 GGUF",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-heart-GGUF",files:["gguf/heart/heart-f32.gguf","gguf/heart/config.json"],strip_prefix:"gguf/heart"},{id:"sanotts_amy_orig",display_name:"sanoTTS amy 1.46M FP32 GGUF (English, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-amy-GGUF",files:["gguf/amy/amy-f32.gguf","gguf/amy/config.json"],strip_prefix:"gguf/amy"},{id:"sanotts_hfc_orig",display_name:"sanoTTS hfc 1.83M FP32 GGUF (English, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-hfc-GGUF",files:["gguf/hfc/hfc-f32.gguf","gguf/hfc/config.json"],strip_prefix:"gguf/hfc"},{id:"sanotts_kristin_orig",display_name:"sanoTTS kristin 1.40M FP32 GGUF (English, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-kristin-GGUF",files:["gguf/kristin/kristin-f32.gguf","gguf/kristin/config.json"],strip_prefix:"gguf/kristin"},{id:"sanotts_vi_orig",display_name:"sanoTTS vi 1.57M FP32 GGUF (Vietnamese, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-vi-GGUF",files:["gguf/vi/vi-f32.gguf","gguf/vi/config.json"],strip_prefix:"gguf/vi"},{id:"sanotts_id_orig",display_name:"sanoTTS id 1.56M FP32 GGUF (Indonesian, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-id-GGUF",files:["gguf/id/id-f32.gguf","gguf/id/config.json"],strip_prefix:"gguf/id"},{id:"sanotts_cs_orig",display_name:"sanoTTS cs 1.57M FP32 GGUF (Czech, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-cs-GGUF",files:["gguf/cs/cs-f32.gguf","gguf/cs/config.json"],strip_prefix:"gguf/cs"},{id:"sanotts_de_orig",display_name:"sanoTTS de 1.57M FP32 GGUF (German, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-de-GGUF",files:["gguf/de/de-f32.gguf","gguf/de/config.json"],strip_prefix:"gguf/de"},{id:"sanotts_es_orig",display_name:"sanoTTS es 1.56M FP32 GGUF (Spanish, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-es-GGUF",files:["gguf/es/es-f32.gguf","gguf/es/config.json"],strip_prefix:"gguf/es"},{id:"sanotts_fr_orig",display_name:"sanoTTS fr 1.57M FP32 GGUF (French, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-fr-GGUF",files:["gguf/fr/fr-f32.gguf","gguf/fr/config.json"],strip_prefix:"gguf/fr"},{id:"sanotts_it_orig",display_name:"sanoTTS it 1.57M FP32 GGUF (Italian, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-it-GGUF",files:["gguf/it/it-f32.gguf","gguf/it/config.json"],strip_prefix:"gguf/it"},{id:"sanotts_pt_orig",display_name:"sanoTTS pt 1.57M FP32 GGUF (Portuguese (Brazil), piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-pt-GGUF",files:["gguf/pt/pt-f32.gguf","gguf/pt/config.json"],strip_prefix:"gguf/pt"},{id:"sanotts_ro_orig",display_name:"sanoTTS ro 1.57M FP32 GGUF (Romanian, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-ro-GGUF",files:["gguf/ro/ro-f32.gguf","gguf/ro/config.json"],strip_prefix:"gguf/ro"},{id:"sanotts_ru_orig",display_name:"sanoTTS ru 1.57M FP32 GGUF (Russian, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-ru-GGUF",files:["gguf/ru/ru-f32.gguf","gguf/ru/config.json"],strip_prefix:"gguf/ru"},{id:"sanotts_tr_orig",display_name:"sanoTTS tr 1.56M FP32 GGUF (Turkish, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-tr-GGUF",files:["gguf/tr/tr-f32.gguf","gguf/tr/config.json"],strip_prefix:"gguf/tr"},{id:"sanotts_ne_orig",display_name:"sanoTTS ne 1.47M FP32 GGUF (Nepali, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-ne-GGUF",files:["gguf/ne/ne-f32.gguf","gguf/ne/config.json"],strip_prefix:"gguf/ne"},{id:"sanotts_hi_orig",display_name:"sanoTTS hi 1.50M FP32 GGUF (Hindi, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-hi-GGUF",files:["gguf/hi/hi-f32.gguf","gguf/hi/config.json"],strip_prefix:"gguf/hi"}],dependencies:[],ui:{recommended_package:"sanotts_heart_nano_orig",tags:["TTS","GGUF"],docs:["docs/tts.md","docs/models/sanotts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}}]},_$={family:"seed_vc",schema_version:1,display_name:"Seed-VC",description:"Zero-shot voice conversion and singing voice conversion model for transferring timbre and style from reference audio, with low-latency realtime conversion and optional lightweight fine-tuning.",category:"voice_conversion",status:"supported",tasks:["vc","svc"],modes:["offline"],languages:["language_agnostic"],capabilities:{vc:["speaker_reference"],svc:["speaker_reference","singing"]},dependencies:[],runtime:{tags:["gguf"]},ui:{recommended_package:"seed_vc_mlx_q8_0",tags:["VC","GGUF"],docs:["docs/models/seed_vc.md","docs/audio_tools.md","docs/gguf.md"]},options:{request:[{name:"route",type:"enum",description:"Select the Seed-VC conversion route. Defaults to v2_vc for VC and v1_svc for SVC.",values:["v2_vc","v1_svc","v1_whisper_bigvgan_vc","v1_xlsr_hift_vc"],required:!1},{name:"duration_scale",type:"float",description:"V1 output duration multiplier; must be finite and positive, default 1.0. V2 validates this option but does not apply it.",required:!1,min:0,default:1},{name:"num_inference_steps",type:"int",description:"Diffusion steps; default 30.",required:!1,min:1,default:30},{name:"inference_guidance_scale",type:"float",description:"V1 classifier-free guidance scale; default 0.7. Any finite value is accepted; V1 disables CFG for nonpositive values.",required:!1,default:.7},{name:"intelligibility_guidance_scale",type:"float",description:"V2 classifier-free guidance scale for source-content intelligibility; default 0.7. Any finite value is accepted and used in V2 guidance arithmetic.",required:!1,default:.7},{name:"similarity_guidance_scale",type:"float",description:"V2 classifier-free guidance scale for target-speaker similarity; default 0.7. Any finite value is accepted and used in V2 guidance arithmetic.",required:!1,default:.7},{name:"voice_anonymization",type:"bool",description:"Use randomized average-voice conditioning instead of target-speaker conditioning for V2 anonymization; default false.",required:!1,default:!1},{name:"seed",type:"int",description:"Seed for V1/V2 diffusion noise and HiFT stochastic source excitation; omitted requests choose a random seed.",required:!1,min:0},{name:"noise_file",type:"path",description:"Optional raw f32 noise file for deterministic V1/V2 diffusion noise and XLSR/HiFT source excitation.",required:!1},{name:"f0_condition",type:"bool",description:"Enable V1 F0 conditioning. Defaults to true for v1_svc and false for the V1 voice-conversion routes.",required:!1},{name:"auto_f0_adjust",type:"bool",description:"Automatically adjust V1 source pitch toward the target pitch level; default false.",required:!1,default:!1},{name:"semitone_shift",type:"int",description:"V1 pitch shift in semitones for singing voice conversion; default 0.",required:!1,default:0}],session:[{name:"weight_type",type:"enum",description:"Shared Seed-VC component weight storage type; default native, except RMVPE uses f32 unless overridden.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"seed_vc_mlx_q8_0",display_name:"SeedVC-MLX Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"SeedVC-MLX-GGUF",files:["SeedVC-MLX-GGUF/seed-vc-mlx-q8_0.gguf"],strip_prefix:"SeedVC-MLX-GGUF"},{id:"seed_vc_mlx_f16",display_name:"SeedVC-MLX F16 GGUF",format:"gguf",precision:"f16",target_directory:"SeedVC-MLX-GGUF",files:["SeedVC-MLX-GGUF/seed-vc-mlx-f16.gguf"],strip_prefix:"SeedVC-MLX-GGUF"},{id:"seed_vc_mlx_orig",display_name:"SeedVC-MLX Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"SeedVC-MLX-GGUF",files:["SeedVC-MLX-GGUF/seed-vc-mlx-orig.gguf"],strip_prefix:"SeedVC-MLX-GGUF"},{id:"seed_vc_mlx_safetensors",display_name:"SeedVC-MLX Safetensors",format:"safetensors",precision:"native",target_directory:"SeedVC-MLX",files:["seed_vc_manifest.json","v2/ar.safetensors","v2/cfm.safetensors","v2/vc_wrapper.json","astral/bsq32.json","astral/bsq2048.json","v1/svc.json","v1/whisper_bigvgan.json","v1/xlsr_hift.json","hift/config.json","bigvgan/v2_22khz_80band_256x/config.json","bigvgan/v2_44khz_128band_512x/config.json","whisper-small/config.json","hubert-large-ll60k/config.json","wav2vec2-xls-r-300m/config.json","v1/svc.safetensors","v1/whisper_bigvgan.safetensors","v1/xlsr_hift.safetensors","astral/bsq32.safetensors","astral/bsq2048.safetensors","campplus/model.safetensors","rmvpe/model.safetensors","hift/model.safetensors","bigvgan/v2_22khz_80band_256x/model.safetensors","bigvgan/v2_44khz_128band_512x/model.safetensors","whisper-small/model.safetensors","hubert-large-ll60k/model.safetensors","wav2vec2-xls-r-300m/model.safetensors"],download:{kind:"huggingface_snapshot",repo:"mlx-community/SeedVC-MLX"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{manifest:"model:seed_vc_manifest.json",v2_wrapper_config:"model:v2/vc_wrapper.json",astral_bsq32_config:"model:astral/bsq32.json",astral_bsq2048_config:"model:astral/bsq2048.json",v1_svc_config:"model:v1/svc.json",v1_whisper_bigvgan_config:"model:v1/whisper_bigvgan.json",v1_xlsr_hift_config:"model:v1/xlsr_hift.json",hift_config:"model:hift/config.json",bigvgan_22k_config:"model:bigvgan/v2_22khz_80band_256x/config.json",bigvgan_44k_config:"model:bigvgan/v2_44khz_128band_512x/config.json",whisper_small_config:"model:whisper-small/config.json",hubert_large_config:"model:hubert-large-ll60k/config.json",wav2vec2_xlsr_config:"model:wav2vec2-xls-r-300m/config.json"},tensors:{v2_ar_weights:{source:"weights:",prefix:"v2_ar_weights"},v2_cfm_weights:{source:"weights:",prefix:"v2_cfm_weights"},v1_svc_weights:{source:"weights:",prefix:"v1_svc_weights"},v1_whisper_bigvgan_weights:{source:"weights:",prefix:"v1_whisper_bigvgan_weights"},v1_xlsr_hift_weights:{source:"weights:",prefix:"v1_xlsr_hift_weights"},astral_bsq32_weights:{source:"weights:",prefix:"astral_bsq32_weights"},astral_bsq2048_weights:{source:"weights:",prefix:"astral_bsq2048_weights"},campplus_weights:{source:"weights:",prefix:"campplus_weights"},rmvpe_weights:{source:"weights:",prefix:"rmvpe_weights"},hift_weights:{source:"weights:",prefix:"hift_weights"},bigvgan_22k_weights:{source:"weights:",prefix:"bigvgan_22k_weights"},bigvgan_44k_weights:{source:"weights:",prefix:"bigvgan_44k_weights"},whisper_small_weights:{source:"weights:",prefix:"whisper_small_weights"},hubert_large_weights:{source:"weights:",prefix:"hubert_large_weights"},wav2vec2_xlsr_weights:{source:"weights:",prefix:"wav2vec2_xlsr_weights"}}},{format:"safetensors",roots:{model:"."},files:{manifest:"model:seed_vc_manifest.json",v2_wrapper_config:"model:v2/vc_wrapper.json",astral_bsq32_config:"model:astral/bsq32.json",astral_bsq2048_config:"model:astral/bsq2048.json",v1_svc_config:"model:v1/svc.json",v1_whisper_bigvgan_config:"model:v1/whisper_bigvgan.json",v1_xlsr_hift_config:"model:v1/xlsr_hift.json",hift_config:"model:hift/config.json",bigvgan_22k_config:"model:bigvgan/v2_22khz_80band_256x/config.json",bigvgan_44k_config:"model:bigvgan/v2_44khz_128band_512x/config.json",whisper_small_config:"model:whisper-small/config.json",hubert_large_config:"model:hubert-large-ll60k/config.json",wav2vec2_xlsr_config:"model:wav2vec2-xls-r-300m/config.json"},tensors:{v2_ar_weights:"model:v2/ar.safetensors",v2_cfm_weights:"model:v2/cfm.safetensors",v1_svc_weights:"model:v1/svc.safetensors",v1_whisper_bigvgan_weights:"model:v1/whisper_bigvgan.safetensors",v1_xlsr_hift_weights:"model:v1/xlsr_hift.safetensors",astral_bsq32_weights:"model:astral/bsq32.safetensors",astral_bsq2048_weights:"model:astral/bsq2048.safetensors",campplus_weights:"model:campplus/model.safetensors",rmvpe_weights:"model:rmvpe/model.safetensors",hift_weights:"model:hift/model.safetensors",bigvgan_22k_weights:"model:bigvgan/v2_22khz_80band_256x/model.safetensors",bigvgan_44k_weights:"model:bigvgan/v2_44khz_128band_512x/model.safetensors",whisper_small_weights:"model:whisper-small/model.safetensors",hubert_large_weights:"model:hubert-large-ll60k/model.safetensors",wav2vec2_xlsr_weights:"model:wav2vec2-xls-r-300m/model.safetensors"}}]},v$={schema_version:1,family:"sense_asr",display_name:"SenseVoice-Small",description:"SenseVoice-Small multilingual speech recognition with rich event/emotion/ITN tags via a SAN-M encoder and CTC head, ported to audio.cpp.",category:"asr",status:"community",tasks:["asr"],modes:["offline","streaming"],languages:["auto","zh","en","yue","ja","ko","pt","ru","es","it","fr","de","nl","pl","tr","ar","hi","vi","th","id","ms","fa","nospeech"],capabilities:{asr:["vad_chunking","partial_results"]},options:{request:[{name:"language",type:"string",description:"Recognition language, or auto to let the model infer it from the audio.",required:!1,default:"auto"},{name:"enable_itn",type:"bool",description:"Enable inverse text normalization (adds the withitn query token).",required:!1,default:!0},{name:"keep_tags",type:"bool",description:"Keep <|event|>/<|emotion|>/<|language|> tags inline in the output text.",required:!1,default:!1},{name:"audio_chunk_mode",type:"enum",description:"Offline chunk mode: auto, fixed, vad, or none. Streaming always uses fixed-duration windows.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Positive duration rounding to at least one sample; sets fixed windows and the VAD maximum chunk length.",required:!1,default:30}],session:[{name:"weight_type",type:"enum",description:"Shared model weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MB.",required:!1,min:1,default:1024},{name:"vad_model_path",type:"string",description:"Path to the VAD model (any built-in VAD family; default Silero VAD) used by automatic audio chunking.",required:!1,default:"assets/framework/models/silero_vad"}],load:[]},runtime:{tags:["gguf","server","stream","cuda","metal","cpu"]},packages:[{id:"sensevoice_small_q8",display_name:"SenseVoice-Small Q8 GGUF",description:"audio.cpp GGUF built from the SenseVoice-Small checkpoint via the SenseVoice llama.cpp export script.",default:!0,format:"gguf",precision:"q8_0",target_directory:"SenseVoice-Small-GGUF",files:["sensevoice-small-q8-audiocpp-v1.gguf"],download:{kind:"huggingface_snapshot",repo:"FunAudioLLM/SenseVoiceSmall-GGUF-audiocpp",revision:"5c3fcfe748a8714216bc135476d5863084fddb72",gated:!1}}],dependencies:[],ui:{recommended_package:"sensevoice_small_q8",tags:["ASR","GGUF","Stream"],docs:["docs/models/sense_asr.md"],summary:"SenseVoice-Small transcription with event/emotion tags and ITN."},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{},optional_files:{},tensors:{weights:"weights:"}}]},b$={schema_version:1,family:"sheetsage2",display_name:"SheetSage2",description:"SheetSage2 audio-to-symbolic transcription. This native path consumes an input recording from a self-contained GGUF and emits an ABC score artifact.",category:"audio_tools",status:"supported",tasks:["midi"],modes:["offline"],languages:["music"],runtime:{tags:["gguf","cuda"]},capabilities:{midi:["midi_artifact"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum total decoder sequence length; default follows the embedded model context. Omitted uses checkpoint max_output_seq_len.",required:!1,min:1}],session:[{name:"attention_tile_rows",type:"int",description:"Query rows per encoder attention tile on any backend; 0 disables tiling. Use 1024 to bound each score tensor below 512 MiB for the 300-second window.",required:!1,min:0,default:0},{name:"weight_type",type:"enum",description:"Encoder and decoder weight storage override.",required:!1,default:"native",values:["native","f32","f16","bf16","q4_0","q4_k"]},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"decoder_graph_arena_mb",type:"int",description:"Encoder/decoder graph arena size in MiB; default 1536.",required:!1,min:1,default:1536}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/SheetSage2-GGUF",revision:"main",gated:!1}},packages:[{id:"sheetsage2_orig",display_name:"SheetSage2 Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"SheetSage2-GGUF",files:["sheetsage2-orig.gguf"]}],dependencies:[],ui:{recommended_package:"sheetsage2_orig",tags:["Music","MIDI","GGUF"],docs:[]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}}]},y$={schema_version:1,family:"sherpa_kws",display_name:"sherpa-onnx Zipformer KWS",description:"Streaming Zipformer transducer keyword spotting from sherpa-onnx model exports.",category:"audio_tools",status:"experimental",tasks:["wake_word"],modes:["offline","streaming"],languages:["model_dependent"],capabilities:{wake_word:["speech_segments","stream_events"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"keywords",type:"string",description:"Newline- or slash-separated tokenized keyword rows; each row may include :score, #threshold, and @label fields.",required:!1},{name:"max_active_paths",type:"int",description:"Maximum keyword decoder hypotheses.",required:!1,default:4,min:1,max:64},{name:"keywords_score",type:"float",description:"Default context score added for each matched keyword token. Negative values are accepted but token scores are clamped to at least zero.",required:!1,default:1},{name:"keywords_threshold",type:"float",description:"Default mean acoustic probability required to trigger a keyword.",required:!1,default:.25,min:0,max:1},{name:"num_trailing_blanks",type:"int",description:"Emit after strictly more than this many trailing blank frames; 1 requires 2 blanks, 0 requires 1.",required:!1,default:1,min:0}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"sherpa_kws_zipformer_zh_en_3m_f32",display_name:"Sherpa KWS Zipformer Chinese-English 3M GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"Sherpa-KWS-GGUF",files:["Sherpa-KWS-GGUF/sherpa-kws-zipformer-zh-en-3m-f32.gguf"],strip_prefix:"Sherpa-KWS-GGUF"}],dependencies:[],ui:{tags:["Wake Word","GGUF","Stream"],docs:["docs/models/sherpa_kws.md"],recommended_package:"sherpa_kws_zipformer_zh_en_3m_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokens:"model:tokens.txt",keywords:"model:keywords.txt"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokens:"model:tokens.txt",keywords:"model:keywords.txt"},tensors:{weights:"model:model.safetensors"}}]},w$={schema_version:1,family:"sidon",display_name:"Sidon v0.1",description:"Single-speaker speech restoration with 48 kHz output.",category:"audio_tools",status:"supported",tasks:["s2s"],modes:["offline"],languages:["language_agnostic"],capabilities:{s2s:["audio_enhancement"]},runtime:{tags:["gguf"]},options:{request:[],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"sidon_f32",display_name:"Sidon v0.1 F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"Sidon-GGUF",files:["Sidon-GGUF/sidon-v0.1-f32.gguf"],strip_prefix:"Sidon-GGUF"}],dependencies:[],ui:{recommended_package:"sidon_f32",tags:["GGUF"],docs:["docs/models/sidon.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},k$={schema_version:1,family:"smart_turn",display_name:"Smart Turn v3.2",description:"Audio-native conversational turn-completion detection using a Whisper-Tiny encoder and attention-pooling classifier.",category:"audio_tools",status:"supported",tasks:["turn"],modes:["offline"],languages:["auto"],capabilities:{turn:["turn_decision"]},runtime:{tags:["gguf"]},options:{request:[{name:"threshold",type:"float",description:"Completion probability threshold; a decision is complete only when probability exceeds this value.",required:!1,default:.5,min:0,max:1}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"smart_turn_v3_2_f32",display_name:"Smart Turn v3.2 F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"Smart-Turn-v3-GGUF",files:["Smart-Turn-v3-GGUF/smart-turn-v3.2-f32.gguf"],strip_prefix:"Smart-Turn-v3-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/smart_turn.md"],recommended_package:"smart_turn_v3_2_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},x$={schema_version:1,family:"soprano_tts",display_name:"Soprano",description:"Soprano is an ultra-lightweight (~80M) English-only text-to-speech model. Syntax uses a 17-layer Qwen3-style causal LM (hidden 512, vocab 8192) that autoregressively emits per-frame 512-dimensional features; a non-iterative Vocos-style decoder (ConvNeXt backbone + single ISTFT head, n_fft 2048 / hop 512) turns those features into 32 kHz audio. No diffusion refinement is performed in the decoder.",category:"tts",status:"community",tasks:["tts"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf","stream"]},capabilities:{tts:["long_form"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated audio frames for the autoregressive LM; default 512.",required:!1,min:1,default:512},{name:"temperature",type:"float",description:"Autoregressive sampling temperature; must be > 0, default 0.3.",required:!1,min:0,default:.3},{name:"top_p",type:"float",description:"Nucleus sampling probability; default 0.95. Values >=1 disable nucleus filtering.",required:!1,min:0,default:.95},{name:"repetition_penalty",type:"float",description:"Repetition penalty applied to the LM head; default 1.2. Must be positive; values below 1 are accepted.",required:!1,default:1.2},{name:"eos_bias",type:"float",description:"Additive bias on the EOS token logit during generation. Positive values make the model stop sooner when speech ends (mitigating runaway generations that hit max_tokens); negative values encourage longer utterances. Default 0 disables the adjustment.",required:!1,default:0},{name:"seed",type:"int",description:"Autoregressive sampling seed; omitted requests choose a random seed.",required:!1,min:0}],session:[{name:"text_chunk_size",type:"int",description:"Maximum codepoints per sentence chunk before the model generates and decodes separately. Smaller values keep prompts short (more reliable EOS) but increase overhead. Default 200.",required:!1,min:1,default:200},{name:"backbone_weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"f32",description:"Storage type for the Qwen3 LM backbone weights."},{name:"decoder_weight_type",type:"enum",preset:"weight_type_conv",required:!1,default:"f32",description:"Storage type for the Vocos decoder weights."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"WalkingCat/Soprano-1.1-80M-GGUF",revision:"main",gated:!1}},packages:[{id:"soprano_1_1_80m_q8_0",display_name:"Soprano-1.1-80M Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Soprano-1.1-80M-GGUF",files:["Soprano-1.1-80M-GGUF/soprano-1.1-80m-q8_0.gguf"],strip_prefix:"Soprano-1.1-80M-GGUF"},{id:"soprano_1_1_80m_bf16",display_name:"Soprano-1.1-80M BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Soprano-1.1-80M-GGUF",files:["Soprano-1.1-80M-GGUF/soprano-1.1-80m-bf16.gguf"],strip_prefix:"Soprano-1.1-80M-GGUF"}],dependencies:[],ui:{recommended_package:"soprano_1_1_80m_q8_0",tags:["TTS","Stream"],docs:["docs/models/soprano_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{backbone:"weights:",decoder:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{backbone:"model:combined.safetensors",decoder:"model:combined.safetensors"}}]},S$={schema_version:1,family:"sopro_tts",display_name:"Sopro V2 Turbo",description:"Community Sopro V2 Turbo (samuel-vitorino/sopro-v2-turbo): a 120M zero-shot voice-cloning TTS. SentencePiece text tokenizer, style-prefix conditioned autoregressive semantic LM over FSQ tokens, rectified-flow acoustic DiT and a Vocos ISTFT vocoder at 24 kHz.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline","streaming"],languages:["en","pt","fr","de"],runtime:{tags:["server"]},capabilities:{clone:["speaker_reference"]},options:{request:[{name:"language",type:"string",description:"Language tag (en, pt, fr, de); omitted inherits transcript language, then the session default.",required:!1},{name:"temperature",type:"float",description:"Semantic sampling temperature; nonpositive selects greedy decoding. Omitted uses checkpoint generation.temperature.",required:!1},{name:"top_p",type:"float",description:"Semantic nucleus cutoff; values outside [0,1] are disabled/clamped by the sampler. Omitted uses checkpoint generation.top_p.",required:!1},{name:"top_k",type:"int",description:"Semantic top-k; nonpositive disables filtering. Omitted uses checkpoint generation.top_k.",required:!1},{name:"num_inference_steps",type:"int",description:"Positive acoustic sampling steps; omitted uses checkpoint generation.steps.",required:!1,min:1},{name:"max_duration_sec",type:"float",description:"Positive maximum segment duration; must be >= min_duration_sec. Omitted uses checkpoint generation.max_seconds.",required:!1},{name:"min_duration_sec",type:"float",description:"Nonnegative minimum duration; must be <= max_duration_sec. Omitted uses checkpoint generation.min_seconds.",required:!1,min:0},{name:"reference_duration_sec",type:"float",description:"Positive reference window in seconds; omitted uses checkpoint generation.ref_seconds.",required:!1},{name:"text_chunk_size",type:"int",description:"Positive codepoint budget per segment; omitted uses checkpoint generation.max_segment_chars.",required:!1,min:1},{name:"seed",type:"int",description:"Non-negative seed for semantic sampling and the acoustic noise prior; omit for a random seed.",required:!1,min:0}],session:[{name:"language",type:"string",description:"Default language tag for requests that do not set one.",required:!1,default:""},{name:"voice_cache_slots",type:"int",description:"Reference voices kept prepared between requests, so a repeated voice skips the encoders and, when streaming, the prompt solve. Output is identical with or without it. A streamed 10 s voice holds about 60 MB. Default 0 (off).",required:!1,min:0,default:0},{name:"matmul_weight_type",type:"enum",preset:"weight_type_full",description:"Storage type for the matmul weights of every stage (semantic LM, acoustic DiT, encoders, vocoder head).",required:!1,default:"f32"},{name:"conv_weight_type",type:"enum",preset:"weight_type_conv",description:"Storage type for convolution weights (speaker/semantic encoders and the Vocos backbone).",required:!1,default:"f32"}],load:[]},packages:[{id:"sopro_v2_turbo_f16",display_name:"Sopro V2 Turbo F16 GGUF",description:"Single-file GGUF of all four stages with the config and tokenizer embedded: f16 weights, mel front ends kept in f32.",default:!0,format:"gguf",precision:"f16",target_directory:"sopro-v2-turbo-GGUF",files:["sopro-v2-turbo-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"samuel-vitorino/sopro-v2-turbo",revision:"main",gated:!1}},{id:"sopro_v2_turbo_safetensors",display_name:"Sopro V2 Turbo (upstream safetensors)",description:"Upstream checkpoint from samuel-vitorino/sopro-v2-turbo: config.json, tokenizer.model and the four safetensors stages. Runs directly, no conversion needed.",format:"safetensors",precision:"orig",target_directory:"sopro-v2-turbo",files:["config.json","tokenizer.model","model.safetensors","semantic_encoder.safetensors","speaker_encoder.safetensors","vocoder.safetensors"],download:{kind:"huggingface_snapshot",repo:"samuel-vitorino/sopro-v2-turbo",revision:"main",gated:!1}}],dependencies:[],ui:{recommended_package:"sopro_v2_turbo_safetensors",tags:["TTS","Clone"],docs:["docs/models/sopro_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{model:{source:"weights:",prefix:"model"},semantic_encoder:{source:"weights:",prefix:"semantic_encoder"},speaker_encoder:{source:"weights:",prefix:"speaker_encoder"},vocoder:{source:"weights:",prefix:"vocoder"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{model:{source:"model:model.safetensors"},semantic_encoder:{source:"model:semantic_encoder.safetensors"},speaker_encoder:{source:"model:speaker_encoder.safetensors"},vocoder:{source:"model:vocoder.safetensors"}}}]},T$={schema_version:1,family:"sortformer_diar",display_name:"Sortformer Diarization",description:"NVIDIA Transformer-based end-to-end speaker diarization model trained primarily on English speech, predicting speaker labels directly from audio and resolving speaker ordering by arrival time for up to four speakers.",category:"speech_analysis",status:"supported",tasks:["diar"],modes:["offline"],languages:["en"],capabilities:{diar:["speaker_turns"]},dependencies:[],options:{request:[{name:"speaker_threshold",type:"float",description:"Speaker activity probability threshold used when decoding speaker turns; default 0.5.",required:!1,min:0,max:1,default:.5},{name:"speaker_min_frames",type:"int",description:"Minimum decoded segment length in model output frames; default 0 disables short-segment filtering.",required:!1,min:0,default:0},{name:"speaker_pad_frames",type:"int",description:"Pad each decoded speaker segment by this many model output frames before filtering and merging; default 0.",required:!1,min:0,default:0}],session:[{name:"graph_arena_mb",type:"int",description:"Inference graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"weight_context_mb",type:"int",description:"Weight context size in MiB; default 128.",required:!1,min:1,default:128},{name:"session_len_sec",type:"float",description:"Base offline graph context length in seconds; must be > 0, default 20.",required:!1,min:0,default:20},{name:"graph_capacity_mode",type:"enum",description:"Offline graph capacity policy; defaults to tiered on host-graph backends and fixed otherwise.",values:["fixed","tiered","grow","double"],required:!1},{name:"speaker_threshold",type:"float",description:"Default speaker activity probability threshold for decoded speaker turns; default 0.5.",required:!1,min:0,max:1,default:.5},{name:"speaker_min_frames",type:"int",description:"Default minimum decoded segment length in model output frames; default 0 disables short-segment filtering.",required:!1,min:0,default:0},{name:"speaker_pad_frames",type:"int",description:"Default decoded segment padding in model output frames; default 0.",required:!1,min:0,default:0},{name:"weight_type",type:"enum",description:"All weight storage type; default f32.",preset:"weight_type_full",required:!1,default:"f32"},{name:"matmul_weight_type",type:"enum",description:"Matmul weight storage type; defaults to weight_type when set, otherwise f32.",preset:"weight_type_full",required:!1},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; defaults to weight_type when set, otherwise f32.",preset:"weight_type_full",required:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"sortformer_diar_4spk_v1_q8_0",tags:["Diar","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"sortformer_diar_4spk_v1_q8_0",display_name:"Sortformer Diar 4spk v1 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Sortformer-Diar-4spk-v1-GGUF",files:["Sortformer-Diar-4spk-v1-GGUF/sortformer-diar-4spk-v1-q8_0.gguf"],strip_prefix:"Sortformer-Diar-4spk-v1-GGUF"},{id:"sortformer_diar_4spk_v1_f16",display_name:"Sortformer Diar 4spk v1 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Sortformer-Diar-4spk-v1-GGUF",files:["Sortformer-Diar-4spk-v1-GGUF/sortformer-diar-4spk-v1-f16.gguf"],strip_prefix:"Sortformer-Diar-4spk-v1-GGUF"},{id:"sortformer_diar_4spk_v1_safetensors",display_name:"Sortformer Diar 4spk v1 Safetensors",format:"safetensors",precision:"native",target_directory:"diar_sortformer_4spk-v1",files:["config.json","model.safetensors","processor_config.json"],download:{kind:"huggingface_snapshot",repo:"nvidia/diar_sortformer_4spk-v1"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"model:model.safetensors"}}]},$$={schema_version:1,family:"sortformer_diar_v2",display_name:"Sortformer Diarization v2.1",description:"NVIDIA Sortformer v2.1 streaming speaker diarization model with four speaker channels, AOSC state, stable arrival-order speaker identities, and bounded-context offline and streaming execution. The model has no published language whitelist: it was trained primarily on English speech, includes non-English meeting data such as AISHELL-4 and AliMeeting, and may degrade on other languages. The checkpoint is governed by the NVIDIA Open Model License and is local-use only until redistribution approval.",category:"speech_analysis",status:"community",tasks:["diar"],modes:["offline","streaming"],languages:["multilingual"],capabilities:{diar:["speaker_turns"]},dependencies:[],options:{request:[{name:"speaker_threshold",type:"float",description:"Speaker activity threshold used for turn decoding; default 0.5.",required:!1,min:0,max:1,default:.5},{name:"speaker_min_frames",type:"int",description:"Minimum decoded turn duration in 80 ms model frames; default 0.",required:!1,min:0,default:0},{name:"speaker_pad_frames",type:"int",description:"Padding applied to decoded turns in model frames; default 0.",required:!1,min:0,default:0}],session:[{name:"graph_arena_mb",type:"int",description:"Inference graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight context size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"geometry",type:"enum",description:"Streaming geometry preset; default uses the checkpoint geometry.",values:["model","streaming","very_high_latency","high_latency","low_latency"],required:!1,default:"model"},{name:"weight_type",type:"enum",description:"Default storage type for all model weights; default f32. With bf16/q8_0, also set conv_weight_type explicitly to native/f32/f16; convolution storage cannot inherit bf16/q8_0.",preset:"weight_type_full",required:!1,default:"f32"},{name:"matmul_weight_type",type:"enum",description:"Matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; defaults to weight_type.",preset:"weight_type_conv",required:!1}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"sortformer_diar_v2_1_f32_gguf_local",tags:["Diar","Stream","GGUF"],docs:["docs/models/sortformer_diar_v2.md","docs/speech_analysis.md","docs/gguf.md"]},package_defaults:{download:{kind:"unsupported",reason:"NVIDIA Open Model License checkpoint: convert or stage locally until redistribution approval is complete."}},packages:[{id:"sortformer_diar_v2_1_f32_local",display_name:"Sortformer Diar v2.1 F32 local package",format:"safetensors",precision:"f32",target_directory:"Sortformer-Diar-v2.1-local",files:["Sortformer-Diar-v2.1-local/config.json","Sortformer-Diar-v2.1-local/processor_config.json","Sortformer-Diar-v2.1-local/model.safetensors"],strip_prefix:"Sortformer-Diar-v2.1-local"},{id:"sortformer_diar_v2_1_f32_gguf_local",display_name:"Sortformer Diar v2.1 F32 GGUF local package",default:!0,format:"gguf",precision:"f32",target_directory:"Sortformer-Diar-v2.1-local",files:["Sortformer-Diar-v2.1-local/sortformer-v2.1-f32.gguf"],strip_prefix:"Sortformer-Diar-v2.1-local"},{id:"sortformer_diar_v2_1_f16_mixed_gguf_local",display_name:"Sortformer Diar v2.1 mixed F16/F32 GGUF local package",format:"gguf",precision:"f16",target_directory:"Sortformer-Diar-v2.1-local",files:["Sortformer-Diar-v2.1-local/sortformer-v2.1-f16-mixed.gguf"],strip_prefix:"Sortformer-Diar-v2.1-local"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"model:model.safetensors"}}]},q$={family:"stable_audio",display_name:"Stable Audio 3",description:"Stability AI generative audio model family for text-to-music, sound effects, audio-to-audio editing, inpainting, continuation, variable-length generation, and LoRA personalization.",category:"audio_generation",status:"supported",tasks:["music","sfx","edit"],modes:["offline"],languages:["en"],options:{request:[{name:"prompt",type:"string",description:"Fallback text prompt when text_input is absent; pipe separates batch prompts.",required:!1},{name:"negative_prompt",type:"string",description:"Negative prompt; pipe separates batch prompts.",required:!1},{name:"duration_sec",type:"float",description:"Positive duration in seconds; batch requests also accept a comma-separated string matching the prompt count, not a JSON array.",required:!1,default:120},{name:"batch_size",type:"int",description:"Prompt batch size.",required:!1,min:1,default:1},{name:"num_inference_steps",type:"int",description:"Diffusion steps.",required:!1,min:1,default:8},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale.",required:!1,default:1},{name:"apg_scale",type:"float",description:"Adaptive projected guidance scale.",required:!1,default:1},{name:"sampler_mode",type:"enum",description:"Stable Audio 3 diffusion sampler.",required:!1,values:["pingpong","euler"]},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0},{name:"duration_padding_sec",type:"float",description:"Generated padding before truncation.",required:!1,min:0,default:6},{name:"truncate_output_to_duration",type:"bool",description:"Trim decoded audio to requested duration.",required:!1,default:!0},{name:"chunked_decode",type:"bool",description:"Decode audio in chunks.",required:!1,default:!0},{name:"init_noise_level",type:"float",description:"Audio-conditioned generation strength in [0, 1].",required:!1,min:0,max:1,default:1},{name:"audio_input_kind",type:"enum",description:"How to use audio_input.",required:!1,values:["init_audio","inpaint_audio"],default:"init_audio"},{name:"inpaint_mask_start_sec",type:"string",description:"Comma-separated inpaint region starts in seconds.",required:!1},{name:"inpaint_mask_end_sec",type:"string",description:"Comma-separated inpaint region ends in seconds.",required:!1}],session:[{name:"max_batch",type:"int",description:"Maximum prompt batch size.",required:!1,min:1,default:1},{name:"weight_type",type:"enum",description:"Weight storage type; defaults to native.",required:!1,preset:"weight_type_full"},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs after each request.",required:!1,default:!1}],load:[]},capabilities:{music:["lyrics"],sfx:["prompt_generation"],edit:["prompt_editing"]},runtime:{tags:["gguf"]},ui:{recommended_package:"stable_audio_3_medium_q8_0",tags:["Music","SFX","Edit","GGUF"],docs:["docs/models/stable_audio.md","docs/music_generation.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"stable_audio_3_medium_q8_0",display_name:"Stable Audio 3 Medium Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Stable-Audio-3-Medium-GGUF",files:["Stable-Audio-3-Medium-GGUF/stable-audio-3-medium-q8_0.gguf"],strip_prefix:"Stable-Audio-3-Medium-GGUF"},{id:"stable_audio_3_medium_f16",display_name:"Stable Audio 3 Medium F16 GGUF",format:"gguf",precision:"f16",target_directory:"Stable-Audio-3-Medium-GGUF",files:["Stable-Audio-3-Medium-GGUF/stable-audio-3-medium-f16.gguf"],strip_prefix:"Stable-Audio-3-Medium-GGUF"},{id:"stable_audio_3_small_music_q8_0",display_name:"Stable Audio 3 Small Music Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Stable-Audio-3-Small-Music-GGUF",files:["Stable-Audio-3-Small-Music-GGUF/stable-audio-3-small-music-q8_0.gguf"],strip_prefix:"Stable-Audio-3-Small-Music-GGUF"},{id:"stable_audio_3_small_music_f16",display_name:"Stable Audio 3 Small Music F16 GGUF",format:"gguf",precision:"f16",target_directory:"Stable-Audio-3-Small-Music-GGUF",files:["Stable-Audio-3-Small-Music-GGUF/stable-audio-3-small-music-f16.gguf"],strip_prefix:"Stable-Audio-3-Small-Music-GGUF"},{id:"stable_audio_3_small_sfx_q8_0",display_name:"Stable Audio 3 Small SFX Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Stable-Audio-3-Small-SFX-GGUF",files:["Stable-Audio-3-Small-SFX-GGUF/stable-audio-3-small-sfx-q8_0.gguf"],strip_prefix:"Stable-Audio-3-Small-SFX-GGUF"},{id:"stable_audio_3_small_sfx_f16",display_name:"Stable Audio 3 Small SFX F16 GGUF",format:"gguf",precision:"f16",target_directory:"Stable-Audio-3-Small-SFX-GGUF",files:["Stable-Audio-3-Small-SFX-GGUF/stable-audio-3-small-sfx-f16.gguf"],strip_prefix:"Stable-Audio-3-Small-SFX-GGUF"},{id:"stable_audio_3_medium_safetensors",display_name:"Stable Audio 3 Medium Safetensors",format:"safetensors",precision:"native",target_directory:"stable-audio-3-medium",files:["model_config.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"stabilityai/stable-audio-3-medium",gated:!0}},{id:"stable_audio_3_small_music_safetensors",display_name:"Stable Audio 3 Small Music Safetensors",format:"safetensors",precision:"native",target_directory:"stable-audio-3-small-music",files:["model_config.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"stabilityai/stable-audio-3-small-music",gated:!0}},{id:"stable_audio_3_small_sfx_safetensors",display_name:"Stable Audio 3 Small SFX Safetensors",format:"safetensors",precision:"native",target_directory:"stable-audio-3-small-sfx",files:["model_config.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"stabilityai/stable-audio-3-small-sfx",gated:!0}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{model_config:"model:model_config.json",t5_config:"model:t5gemma-b-b-ul2/config.json",t5_tokenizer_json:"model:t5gemma-b-b-ul2/tokenizer.json",t5_tokenizer_model:"model:t5gemma-b-b-ul2/tokenizer.model",t5_tokenizer_config:"model:t5gemma-b-b-ul2/tokenizer_config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},t5_weights:{source:"weights:",prefix:"t5_weights"}}},{format:"safetensors",roots:{model:".",t5:"t5gemma-b-b-ul2"},files:{model_config:"model:model_config.json",t5_config:"t5:config.json",t5_tokenizer_json:"t5:tokenizer.json",t5_tokenizer_model:"t5:tokenizer.model",t5_tokenizer_config:"t5:tokenizer_config.json"},tensors:{model_weights:"model:model.safetensors",t5_weights:"t5:model.safetensors"}}]},C$={family:"supertonic",display_name:"Supertonic 3",description:"Supertone on-device TTS model designed for fast local speech synthesis across 31 languages, with preset voices and compact deployment for browser, mobile, and desktop applications.",category:"tts",status:"supported",tasks:["tts"],modes:["offline","streaming"],languages:["en","ko","ja","ar","bg","cs","da","de","el","es","et","fi","fr","hi","hr","hu","id","it","lt","lv","nl","pl","pt","ro","ru","sk","sl","sv","tr","uk","vi"],capabilities:{tts:["built_in_voices","long_form"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"voice_id",type:"enum",values:["M1","M2","M3","M4","M5","F1","F2","F3","F4","F5"],default:"M1",description:"Built-in voice preset; --voice-id takes precedence.",required:!1},{name:"num_inference_steps",type:"int",min:1,default:8,description:"Flow denoising steps.",required:!1},{name:"speed",type:"float",min:0,default:1.05,description:"Positive speech speed multiplier; voice.style.speaking_rate takes precedence.",required:!1},{name:"seed",type:"int",min:0,max:4294967295,default:1234,description:"Noise seed.",required:!1},{name:"text_chunk_size",type:"int",description:"Framework text chunk size; defaults to 120 for Korean/Japanese, otherwise 300.",required:!1},{name:"text_chunk_mode",type:"enum",values:["default","tag_aware","japanese","endline"],default:"default",description:"Framework text chunking mode.",required:!1}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",default:"native",description:"Weight storage type.",required:!1},{name:"style_cache_slots",type:"int",min:0,default:4,description:"Cached preset style slots; zero disables reuse.",required:!1}],load:[]},ui:{recommended_package:"supertonic_3_orig",tags:["TTS","GGUF","Stream"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"supertonic_3_q8_0",display_name:"Supertonic 3 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Supertonic-3-GGUF",files:["Supertonic-3-GGUF/supertonic-3-q8_0.gguf"],strip_prefix:"Supertonic-3-GGUF"},{id:"supertonic_3_f16",display_name:"Supertonic 3 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Supertonic-3-GGUF",files:["Supertonic-3-GGUF/supertonic-3-f16.gguf"],strip_prefix:"Supertonic-3-GGUF"},{id:"supertonic_3_orig",display_name:"Supertonic 3 Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Supertonic-3-GGUF",files:["Supertonic-3-GGUF/supertonic-3-orig.gguf"],strip_prefix:"Supertonic-3-GGUF"},{id:"supertonic_3_safetensors",display_name:"Supertonic 3 Safetensors",format:"safetensors",precision:"native",target_directory:"supertonic-3",files:["config/tts.json","config/unicode_indexer.json","ggml/supertonic.safetensors","voice_styles/F1.json","voice_styles/F2.json","voice_styles/F3.json","voice_styles/F4.json","voice_styles/F5.json","voice_styles/M1.json","voice_styles/M2.json","voice_styles/M3.json","voice_styles/M4.json","voice_styles/M5.json"],download:{kind:"huggingface_snapshot",repo:"mlx-community/supertonic-3-mlx"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tts_config:"model:config/tts.json",unicode_indexer:"model:config/unicode_indexer.json",voice_style_F1:"model:voice_styles/F1.json",voice_style_F2:"model:voice_styles/F2.json",voice_style_F3:"model:voice_styles/F3.json",voice_style_F4:"model:voice_styles/F4.json",voice_style_F5:"model:voice_styles/F5.json",voice_style_M1:"model:voice_styles/M1.json",voice_style_M2:"model:voice_styles/M2.json",voice_style_M3:"model:voice_styles/M3.json",voice_style_M4:"model:voice_styles/M4.json",voice_style_M5:"model:voice_styles/M5.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{tts_config:"model:config/tts.json",unicode_indexer:"model:config/unicode_indexer.json",voice_style_F1:"model:voice_styles/F1.json",voice_style_F2:"model:voice_styles/F2.json",voice_style_F3:"model:voice_styles/F3.json",voice_style_F4:"model:voice_styles/F4.json",voice_style_F5:"model:voice_styles/F5.json",voice_style_M1:"model:voice_styles/M1.json",voice_style_M2:"model:voice_styles/M2.json",voice_style_M3:"model:voice_styles/M3.json",voice_style_M4:"model:voice_styles/M4.json",voice_style_M5:"model:voice_styles/M5.json"},tensors:{weights:"model:ggml/supertonic.safetensors"}}]},A$={schema_version:1,family:"tf_gridnet",display_name:"TF-GridNet",description:"Time-frequency GridNet overlapping speech separation.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_duration_sec",type:"float",description:"Separation window duration; zero selects whole-file inference. When enabled, the chunk sample count must exceed n_fft/2.",min:0,default:2.4,required:!1},{name:"audio_chunk_overlap_sec",type:"float",description:"Nonnegative overlap used to match speaker order and stitch adjacent windows. When chunking is enabled, overlap sample count must be > 0 and smaller than the chunk. Ignored for whole-file inference.",min:0,default:1.6,required:!1},{name:"normalize_output",type:"bool",description:"Normalize each separated waveform to a peak of 0.9, as in ESPnet's example.",default:!0,required:!1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"]}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"tf_gridnet_wsj0_2mix_f32",display_name:"TF-GridNet WSJ0-2mix F32",default:!0,format:"gguf",precision:"f32",target_directory:"TF-GridNet-GGUF",files:["TF-GridNet-GGUF/tf-gridnet-wsj0-2mix-f32.gguf"],strip_prefix:"TF-GridNet-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/tf_gridnet.md"],recommended_package:"tf_gridnet_wsj0_2mix_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"},frontend:{source:"weights:",prefix:"frontend"}}}]},G$={family:"tone_color_vc",schema_version:1,display_name:"Tone Color VC",description:"Standalone voice conversion with a reference speaker recording.",category:"voice_conversion",status:"experimental",tasks:["vc"],modes:["offline"],languages:["language_agnostic"],capabilities:{vc:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"seed",type:"int",required:!1,description:"Random seed for posterior sampling; -1 chooses a random seed.",default:1234,min:-1},{name:"temperature",type:"float",required:!1,description:"Posterior sampling noise scale.",default:.3,min:0}],session:[{name:"exec_plan",type:"string",required:!1,default:"{}",description:"Component execution plan: decoder accepts default/ggml/neon. Default retains the session backend. The complete NEON HiFi-GAN decoder requires a CPU session and ENGINE_ENABLE_NEON=ON on AArch64. No artifacts or params."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"tone_color_vc_f32",display_name:"Tone Color VC F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"Tone-Color-VC-GGUF",files:["Tone-Color-VC-GGUF/tone-color-vc-f32.gguf"],strip_prefix:"Tone-Color-VC-GGUF"},{id:"tone_color_vc_f16",display_name:"Tone Color VC F16 GGUF",default:!1,format:"gguf",precision:"f16",target_directory:"Tone-Color-VC-GGUF",files:["Tone-Color-VC-GGUF/tone-color-vc-f16.gguf"],strip_prefix:"Tone-Color-VC-GGUF"}],dependencies:[],ui:{recommended_package:"tone_color_vc_f32",tags:["VC","GGUF"],docs:["docs/models/tone_color_vc.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},F$={schema_version:1,family:"universr",display_name:"UniverSR",description:"Complex-STFT flow-matching audio super-resolution to 48 kHz.",category:"audio_tools",status:"supported",tasks:["s2s"],modes:["offline"],languages:["language_agnostic"],capabilities:{s2s:["audio_enhancement"]},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_duration_sec",type:"float",description:"Independent audio segments concatenated after inference; zero processes the whole file. Chunking changes global normalization context.",min:0,default:0,required:!1},{name:"input_sample_rate",type:"int",description:"Effective input bandwidth sample rate: 8000, 12000, 16000, or 24000 Hz.",required:!1},{name:"sampler_mode",type:"enum",description:"Fixed-step ODE integration method.",values:["euler","midpoint","rk4"],default:"midpoint",required:!1},{name:"num_inference_steps",type:"int",description:"ODE integration steps.",min:1,default:4,required:!1},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; zero disables guidance.",min:0,default:1.5,required:!1},{name:"seed",type:"int",description:"Initial flow noise seed.",min:0,default:42,required:!1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; native preserves the GGUF tensor types.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"]}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"universr_audio_orig",display_name:"UniverSR Audio GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"UniverSR-GGUF",files:["UniverSR-GGUF/universr-audio-orig.gguf"],strip_prefix:"UniverSR-GGUF"},{id:"universr_speech_orig",display_name:"UniverSR Speech GGUF F32",format:"gguf",precision:"f32",target_directory:"UniverSR-GGUF",files:["UniverSR-GGUF/universr-speech-orig.gguf"],strip_prefix:"UniverSR-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:[],recommended_package:"universr_audio_orig"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"},frontend:{source:"weights:",prefix:"frontend"}}}]},M$={family:"vevo2",display_name:"Vevo2",description:"Unified controllable framework for English and Chinese speech and singing voice generation, voice conversion, and editing, with tokenizers that disentangle content, prosody, melody, style, and timbre.",category:"voice_conversion",status:"supported",tasks:["tts","music","vc","edit","svc","s2s"],modes:["offline"],languages:["en","zh"],capabilities:{music:["lyrics"],vc:["speaker_reference"],svc:["speaker_reference","singing"],s2s:["speaker_reference"],edit:["prompt_editing"]},runtime:{tags:["gguf"]},options:{request:[{name:"route",type:"enum",description:"Generation route; omitted selects the task default.",required:!1,values:["zero_shot_tts","text_to_singing","svs","style_preserved_vc","style_preserved_svc","style_converted_vc","style_converted_svc","editing","singing_style_conversion","humming_to_singing","instrument_to_singing"]},{name:"source_audio",type:"audio_path",description:"Source audio file for conversion or editing.",required:!1},{name:"target_voice",type:"audio_path",description:"Target voice audio file; overrides structured speaker audio.",required:!1},{name:"prosody_ref",type:"audio_path",description:"Prosody or melody reference audio file.",required:!1},{name:"style_ref",type:"audio_path",description:"Style reference audio file.",required:!1},{name:"target_text",type:"string",description:"Text or lyrics; overrides structured text input.",required:!1},{name:"style_ref_text",type:"string",description:"Style-reference transcript; reference_text is also accepted.",required:!1},{name:"use_prosody_code",type:"bool",description:"Use prosody codes; default depends on route and requires prosody audio when enabled.",required:!1},{name:"use_pitch_shift",type:"bool",description:"Align reference pitch to the target voice; default depends on route.",required:!1},{name:"source_shift_steps",type:"int",description:"Manual source reference pitch shift in semitones.",required:!1,default:0},{name:"prosody_shift_steps",type:"int",description:"Manual prosody reference pitch shift in semitones.",required:!1,default:0},{name:"style_shift_steps",type:"int",description:"Manual style reference pitch shift in semitones.",required:!1,default:0},{name:"duration_sec",type:"float",description:"Rescale prosody-code conditioning to this duration; not a general output-length limit. Legacy target_duration_seconds is accepted.",required:!1},{name:"reference_duration_sec",type:"float",description:"Trim target voice reference before conditioning. Legacy reference_duration_seconds is accepted.",required:!1,min:0},{name:"temperature",type:"float",description:"Positive AR sampling temperature; default comes from the checkpoint.",required:!1},{name:"top_k",type:"int",description:"AR top-k sampling; default comes from the checkpoint.",required:!1},{name:"top_p",type:"float",description:"AR nucleus sampling; default comes from the checkpoint.",required:!1},{name:"repetition_penalty",type:"float",description:"Positive AR repetition penalty; default comes from the checkpoint.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated AR tokens.",required:!1,min:1,default:500},{name:"num_inference_steps",type:"int",description:"Flow-matching denoising steps.",required:!1,min:1,default:32},{name:"seed",type:"int",description:"Sampling seed; random when omitted.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Character budget per text chunk.",required:!1,min:1,default:128},{name:"audio_chunk_mode",type:"enum",description:"Source-audio chunking for style_preserved_vc/svc requires audio_chunk_duration_sec. Auto uses fixed chunks; none disables chunking.",required:!1,values:["auto","fixed","none"],default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Source-audio chunk duration for style_preserved_vc/svc; zero or omitted keeps one-shot processing.",required:!1,min:0},{name:"cross_fade_duration_sec",type:"float",description:"Source chunk overlap and output crossfade; must be smaller than chunk duration.",required:!1,default:1}],session:[{name:"weight_type",type:"enum",description:"Shared matmul storage override; omitted preserves component defaults.",required:!1,values:["native","f32","f16","bf16","q8_0"]},{name:"conv_weight_type",type:"enum",description:"Shared convolution storage override; omitted preserves native storage.",required:!1,values:["native","f32","f16"]}],load:[{name:"whisper_model_path",type:"path",description:"External Whisper model directory for feature extraction when not bundled.",required:!1}]},ui:{recommended_package:"vevo2_q8_0",tags:["TTS","Music","VC","Edit","GGUF"],docs:["docs/models/vevo2.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"vevo2_q8_0",display_name:"Vevo2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Vevo2-GGUF",files:["Vevo2-GGUF/vevo2-q8_0.gguf"],strip_prefix:"Vevo2-GGUF"},{id:"vevo2_f16",display_name:"Vevo2 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Vevo2-GGUF",files:["Vevo2-GGUF/vevo2-f16.gguf"],strip_prefix:"Vevo2-GGUF"},{id:"vevo2_orig",display_name:"Vevo2 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"Vevo2-GGUF",files:["Vevo2-GGUF/vevo2-orig.gguf"],strip_prefix:"Vevo2-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{ar_config:"model:contentstyle_modeling/posttrained/config.json",ar_amphion_config:"model:contentstyle_modeling/posttrained/amphion_config.json",ar_generation_config:"model:contentstyle_modeling/posttrained/generation_config.json",ar_tokenizer_config:"model:contentstyle_modeling/posttrained/tokenizer_config.json",ar_tokenizer_json:"model:contentstyle_modeling/posttrained/tokenizer.json",ar_vocab:"model:contentstyle_modeling/posttrained/vocab.json",ar_merges:"model:contentstyle_modeling/posttrained/merges.txt",ar_added_tokens:"model:contentstyle_modeling/posttrained/added_tokens.json",ar_special_tokens:"model:contentstyle_modeling/posttrained/special_tokens_map.json",fm_config:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa/config.json",fm_text_config:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa_text/config.json",vocoder_config:"model:vocoder/config.json",whisper_config:"model:whisper-medium/config.json"},tensors:{content_style_tokenizer_weights:{source:"weights:",prefix:"content_style_tokenizer_weights"},prosody_tokenizer_weights:{source:"weights:",prefix:"prosody_tokenizer_weights"},ar_weights:{source:"weights:",prefix:"ar_weights"},fm_weights:{source:"weights:",prefix:"fm_weights"},fm_whisper_stats:{source:"weights:",prefix:"fm_whisper_stats"},fm_text_weights:{source:"weights:",prefix:"fm_text_weights"},fm_text_whisper_stats:{source:"weights:",prefix:"fm_text_whisper_stats"},vocoder_weights_0:{source:"weights:",prefix:"vocoder_weights_0"},vocoder_weights_1:{source:"weights:",prefix:"vocoder_weights_1"},vocoder_weights_2:{source:"weights:",prefix:"vocoder_weights_2"},whisper_weights:{source:"weights:",prefix:"whisper_weights"}}},{format:"safetensors",roots:{model:".",whisper:"../whisper-medium"},files:{ar_config:"model:contentstyle_modeling/posttrained/config.json",ar_amphion_config:"model:contentstyle_modeling/posttrained/amphion_config.json",ar_generation_config:"model:contentstyle_modeling/posttrained/generation_config.json",ar_tokenizer_config:"model:contentstyle_modeling/posttrained/tokenizer_config.json",ar_tokenizer_json:"model:contentstyle_modeling/posttrained/tokenizer.json",ar_vocab:"model:contentstyle_modeling/posttrained/vocab.json",ar_merges:"model:contentstyle_modeling/posttrained/merges.txt",ar_added_tokens:"model:contentstyle_modeling/posttrained/added_tokens.json",ar_special_tokens:"model:contentstyle_modeling/posttrained/special_tokens_map.json",fm_config:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa/config.json",fm_text_config:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa_text/config.json",vocoder_config:"model:vocoder/config.json",whisper_config:"whisper:config.json"},tensors:{content_style_tokenizer_weights:"model:tokenizer/contentstyle_fvq16384_12.5hz/model.safetensors",prosody_tokenizer_weights:"model:tokenizer/prosody_fvq512_6.25hz/model.safetensors",ar_weights:"model:contentstyle_modeling/posttrained/model.safetensors",fm_weights:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa/model.safetensors",fm_whisper_stats:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa/whisper_stats.safetensors",fm_text_weights:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa_text/model.safetensors",fm_text_whisper_stats:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa_text/whisper_stats.safetensors",vocoder_weights_0:"model:vocoder/model.safetensors",vocoder_weights_1:"model:vocoder/model_1.safetensors",vocoder_weights_2:"model:vocoder/model_2.safetensors",whisper_weights:"whisper:model.safetensors"}}]},z$={schema_version:1,family:"vibeasr",display_name:"VibeVoice-ASR-BitNet",description:"VibeASR.cpp's CPU-first VibeVoice ASR port: an INT8 (I8_S) audio VAE encoder feeding a ternary (I2_S) Qwen2 decoder, ported to audio.cpp.",category:"asr",status:"community",tasks:["asr"],modes:["offline"],languages:["en","zh","fr","it","ko","pt","vi"],capabilities:{},options:{request:[{name:"output_format",type:"enum",description:"Prompt suffix asked of the decoder: plain transcription text, or JSON rows with Start/End/Speaker/Content.",values:["text","json"],required:!1,default:"text"},{name:"context",type:"string",description:"Extra context injected into the prompt (names, jargon) to bias the transcription.",required:!1,default:""},{name:"max_tokens",type:"int",description:"Cap on decoded tokens for one request.",required:!1,min:1,default:1024}],session:[{name:"encoder_graph_arena_mb",type:"int",description:"VAE encoder graph arena size in MB. Must be positive; sufficient capacity depends on the graph.",required:!1,min:1,default:64},{name:"prefill_graph_arena_mb",type:"int",description:"Decoder prefill graph arena size in MB. Must be positive; sufficient capacity depends on the graph.",required:!1,min:1,default:256},{name:"decode_graph_arena_mb",type:"int",description:"Decoder single-step graph arena size in MB. Must be positive; sufficient capacity depends on the graph.",required:!1,min:1,default:256}],load:[]},runtime:{tags:["gguf","cpu"]},packages:[{id:"vibeasr_bitnet_i2_s",display_name:"VibeVoice-ASR-BitNet I8_S encoder + I2_S decoder",description:"Upstream VibeASR.cpp GGUF package. The two GGUFs carry the VibeASR ggml fork's type ids and need one pass of tools/community_models/convert_vibeasr_gguf.py --in-place before audio.cpp can load them.",default:!0,format:"gguf",precision:"native",target_directory:"VibeVoice-ASR-BitNet",files:["vibeasr-vae-encoder-i8_s.gguf","vibeasr-lm-i2_s-embed-q6_k.gguf","tokenizer.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"microsoft/VibeVoice-ASR-BitNet",revision:"main",gated:!1}}],dependencies:[],ui:{recommended_package:"vibeasr_bitnet_i2_s",tags:["ASR","GGUF"],docs:["docs/models/vibeasr.md"],summary:"INT8 encoder plus ternary Qwen2 decoder transcription on CPU."},sources:[{format:"gguf",roots:{model:"."},files:{tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{},tensors:{vae_weights:"model:vibeasr-vae-encoder-i8_s.gguf",lm_weights:"model:vibeasr-lm-i2_s-embed-q6_k.gguf"}}]},E$={family:"vibevoice",display_name:"VibeVoice",description:"Microsoft long-form multi-speaker TTS model for expressive conversational audio such as podcasts, supporting up to 90 minutes of speech with as many as four speakers.",category:"tts",status:"supported",tasks:["tts"],modes:["offline","streaming"],languages:["en","zh"],options:{request:[{name:"voice_samples",type:"string",description:"Comma-separated reference WAV paths ordered by speaker ID; cannot be combined with voice_ref.",required:!1},{name:"num_inference_steps",type:"int",description:"Diffusion steps; defaults to the checkpoint configuration.",required:!1,min:1},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale.",required:!1,min:0,default:1.3},{name:"max_length_times",type:"float",description:"Positive generation length multiplier.",required:!1,default:2},{name:"max_tokens",type:"int",description:"Maximum generated tokens; zero uses the model-derived limit.",required:!1,min:0,default:0},{name:"do_sample",type:"bool",description:"Enable sampling.",required:!1,default:!1},{name:"temperature",type:"float",description:"Positive sampling temperature.",required:!1,default:1},{name:"top_k",type:"int",description:"Top-k sampling limit; zero disables filtering.",required:!1,min:0,default:50},{name:"top_p",type:"float",description:"Nucleus probability in (0, 1].",required:!1,default:1},{name:"seed",type:"int",description:"Sampling seed.",required:!1,min:0,max:4294967295,default:1234},{name:"prompt_noise_file",type:"path",description:"F32 prompt acoustic noise file.",required:!1},{name:"diffusion_noise_file",type:"path",description:"F32 initial diffusion noise file.",required:!1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"tokenizer_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"connector_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"decoder_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"diffusion_head_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"lora",type:"path",description:"Decoder adapter file or PEFT directory applied when creating the session; do not also supply the load option.",required:!1},{name:"lora_scale",type:"float",description:"Session adapter scale override; omitted uses lora_alpha / r. Must be strictly positive when an adapter is supplied.",required:!1}],load:[{name:"lora",type:"path",description:"Decoder adapter file or PEFT directory, merged at load time.",required:!1},{name:"lora_scale",type:"float",description:"LoRA scale override; omitted uses lora_alpha / r. Must be strictly positive when an adapter is supplied.",required:!1}]},capabilities:{tts:["multi_speaker","long_form"]},runtime:{tags:["gguf"]},ui:{recommended_package:"vibevoice_1_5b_q8_0",tags:["TTS","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"vibevoice_1_5b_q8_0",display_name:"VibeVoice 1.5B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VibeVoice-1.5B-GGUF",files:["VibeVoice-1.5B-GGUF/vibevoice-1.5b-q8_0.gguf"],strip_prefix:"VibeVoice-1.5B-GGUF"},{id:"vibevoice_1_5b_bf16",display_name:"VibeVoice 1.5B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VibeVoice-1.5B-GGUF",files:["VibeVoice-1.5B-GGUF/vibevoice-1.5b-bf16.gguf"],strip_prefix:"VibeVoice-1.5B-GGUF"},{id:"vibevoice_7b_q8_0",display_name:"VibeVoice 7B Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"VibeVoice-7B-GGUF",files:["vibevoice-7b-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/VibeVoice-7B-GGUF",revision:"main",gated:!1}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",preprocessor_config:"model:preprocessor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},tensors:{model_weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",preprocessor_config:"model:preprocessor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},tensors:{model_weights:"model:model.safetensors.index.json"}}]},U$={family:"vibevoice_asr",display_name:"VibeVoice ASR",description:"Microsoft long-form speech-to-text model that processes up to 60 minutes of audio in one pass and produces structured transcripts with speakers, timestamps, content, hotwords, and 50+ language support.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["auto","51 languages"],options:{request:[{name:"context",type:"string",description:"Context hint; context_info is also accepted.",required:!1},{name:"language",type:"string",description:"ASR language label.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated text tokens.",required:!1,min:1,default:32768},{name:"temperature",type:"float",description:"Sampling temperature; zero uses deterministic decoding.",required:!1,min:0,default:0},{name:"top_p",type:"float",description:"Nucleus probability in (0, 1].",required:!1,default:1},{name:"top_k",type:"int",description:"Top-k sampling limit; zero disables filtering.",required:!1,min:0,default:50},{name:"num_beams",type:"int",description:"Deterministic beam search width.",required:!1,min:1,default:1},{name:"repetition_penalty",type:"float",description:"Positive generation repetition penalty.",required:!1,default:1},{name:"seed",type:"int",description:"Acoustic latent sampling seed.",required:!1,min:0,default:1234},{name:"audio_chunk_mode",type:"enum",description:"Pre-encoder audio splitting; auto uses fixed chunks.",required:!1,values:["auto","fixed","vad","none"],default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Positive audio chunk duration in seconds.",required:!1,default:1200}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"tokenizer_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"connector_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"decoder_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"tokenizer_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"connector_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128},{name:"decoder_weight_context_mb",type:"int",description:"Decoder weight context in MiB; 4096 on 64-bit builds, 1024 on 32-bit builds.",required:!1,min:1},{name:"max_history_steps",type:"int",description:"Maximum retained decoder history; zero uses the model limit. Cannot exceed checkpoint position capacity; zero uses that capacity.",required:!1,default:0,min:0},{name:"vad_model_path",type:"path",description:"VAD model (any built-in VAD family; default Silero VAD) used with audio_chunk_mode=vad.",required:!1,default:"assets/framework/models/silero_vad"}],load:[]},capabilities:{asr:["segments","speaker_turns","vad_chunking"]},runtime:{tags:["gguf"]},ui:{recommended_package:"vibevoice_asr_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"vibevoice_asr_q8_0",display_name:"VibeVoice ASR Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VibeVoice-ASR-GGUF",files:["VibeVoice-ASR-GGUF/vibevoice-asr-q8_0.gguf"],strip_prefix:"VibeVoice-ASR-GGUF"},{id:"vibevoice_asr_f16",display_name:"VibeVoice ASR F16 GGUF",format:"gguf",precision:"f16",target_directory:"VibeVoice-ASR-GGUF",files:["VibeVoice-ASR-GGUF/vibevoice-asr-f16.gguf"],strip_prefix:"VibeVoice-ASR-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{model_weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{model_weights:"model:model.safetensors.index.json"}}]},R$={family:"vibevoice_asr_streaming",display_name:"VibeVoice ASR Streaming",description:"Microsoft VibeVoice ASR Streaming models (7B and 1.5B) for chunked streaming speech-to-text with persistent decoder state.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["en","zh","es","pt","de","ja","ko","fr","ru","it"],capabilities:{asr:["speaker_turns"]},options:{request:[{name:"language",type:"string",description:"ASR language label; empty unless provided in the request.",required:!1,default:""},{name:"context",type:"string",description:"Extra context or hotwords injected into the streaming prompt.",required:!1,default:""},{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens per chunk.",required:!1,min:1,default:256},{name:"temperature",type:"float",description:"Sampling temperature; 0 uses deterministic decoding.",required:!1,min:0,default:0},{name:"top_p",type:"float",description:"Nucleus sampling probability.",required:!1,min:.001,max:1,default:1},{name:"top_k",type:"int",description:"Top-k sampling limit; default 50. Zero disables top-k filtering.",required:!1,min:0,default:50},{name:"num_beams",type:"int",description:"Compatibility-only; this checkpoint ignores beam search and uses its incremental decoder.",required:!1,min:1,default:1},{name:"repetition_penalty",type:"float",description:"Generation repetition penalty.",required:!1,min:.001,default:1},{name:"seed",type:"int",description:"Acoustic latent sampling seed; default 1234.",required:!1,default:1234},{name:"audio_chunk_mode",type:"enum",description:"Compatibility-only; ignored in offline and streaming modes. Processor chunk/lookahead settings determine segmentation.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Compatibility-only; ignored in offline and streaming modes. Processor settings determine segmentation.",required:!1,min:.001,default:1200}],session:[{name:"weight_type",type:"enum",description:"Shared component weight storage.",required:!1,preset:"weight_type_full",default:"native"},{name:"tokenizer_weight_type",type:"enum",description:"Speech tokenizer weight storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"connector_weight_type",type:"enum",description:"Speech connector weight storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"decoder_weight_type",type:"enum",description:"Text decoder weight storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"tokenizer_weight_context_mb",type:"int",description:"Speech tokenizer weight metadata context. Size in MiB; must be positive.",required:!1,min:1,default:512},{name:"connector_weight_context_mb",type:"int",description:"Speech connector weight metadata context. Size in MiB; must be positive.",required:!1,min:1,default:128},{name:"decoder_weight_context_mb",type:"int",description:"Text decoder weight metadata context. Default 4096 on 64-bit builds and 1024 on 32-bit builds. Size in MiB; must be positive.",required:!1,min:1},{name:"max_history_steps",type:"int",description:"Decoder history limit; zero uses the model position capacity. Must be nonnegative and not exceed that capacity.",required:!1,min:0,default:0}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"vibevoice_asr_streaming_7b_q8_0",tags:["ASR","Streaming","GGUF"],docs:["docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/VibeVoice-ASR-Streaming-7B-GGUF",revision:"main",gated:!1}},packages:[{id:"vibevoice_asr_streaming_7b_q8_0",display_name:"VibeVoice ASR Streaming 7B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VibeVoice-ASR-Streaming-7B-GGUF",files:["vibevoice-asr-streaming-7b-q8_0.gguf"]},{id:"vibevoice_asr_streaming_7b_bf16",display_name:"VibeVoice ASR Streaming 7B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VibeVoice-ASR-Streaming-7B-GGUF",files:["vibevoice-asr-streaming-7b-bf16.gguf"]},{id:"vibevoice_asr_streaming_7b_q4_k",display_name:"VibeVoice ASR Streaming 7B Q4_K GGUF",format:"gguf",precision:"q4_k",target_directory:"VibeVoice-ASR-Streaming-7B-GGUF",files:["vibevoice-asr-streaming-7b-q4_k.gguf"]},{id:"vibevoice_asr_streaming_1_5b_q8_0",display_name:"VibeVoice ASR Streaming 1.5B Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"VibeVoice-ASR-Streaming-1.5B-GGUF",files:["vibevoice-asr-streaming-1.5b-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"christopherthompson81/VibeVoice-ASR-Streaming-1.5B-GGUF",revision:"main",gated:!1}},{id:"vibevoice_asr_streaming_1_5b_bf16",display_name:"VibeVoice ASR Streaming 1.5B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VibeVoice-ASR-Streaming-1.5B-GGUF",files:["vibevoice-asr-streaming-1.5b-bf16.gguf"],download:{kind:"huggingface_snapshot",repo:"christopherthompson81/VibeVoice-ASR-Streaming-1.5B-GGUF",revision:"main",gated:!1}},{id:"vibevoice_asr_streaming_1_5b_q4_k",display_name:"VibeVoice ASR Streaming 1.5B Q4_K GGUF",format:"gguf",precision:"q4_k",target_directory:"VibeVoice-ASR-Streaming-1.5B-GGUF",files:["vibevoice-asr-streaming-1.5b-q4_k.gguf"],download:{kind:"huggingface_snapshot",repo:"christopherthompson81/VibeVoice-ASR-Streaming-1.5B-GGUF",revision:"main",gated:!1}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{model_weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{model_weights:"model:model.safetensors.index.json"}}]},B$={family:"vieneu_v3_turbo",display_name:"VieNeu-TTS v3 Turbo",description:"On-device Vietnamese/English TTS (48 kHz) with instant voice cloning from 3-5 s of reference audio, by Phạm Nguyễn Ngọc Bảo (pnnbao97). Takes SEA-G2P phonemes as text input.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline"],languages:["vi","en"],capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"auto_frame_cap",type:"bool",description:"Cap the generation budget using the chunk's phoneme count. Legacy frame_cap remains accepted.",required:!1,default:!0},{name:"text_chunk_min_size",type:"int",description:"Phoneme-string chunks shorter than this character count join a neighbour. Legacy text_chunk_min remains accepted.",required:!1,default:20},{name:"speaker_embedding_file",type:"path",description:"File containing a comma-separated 192-dimensional speaker embedding.",required:!1},{name:"speaker_embedding",type:"string",description:"Inline comma-separated 192-dimensional speaker embedding.",required:!1},{name:"reference_codes",type:"string",description:"Pre-encoded reference codes in row-major order, comma- or space-separated; codebooks per frame come from the checkpoint.",required:!1},{name:"reference_codes_file",type:"path",description:"Pre-encoded reference codes, one frame per line. Replaces audio encoding and can be used with a speaker embedding instead of reference audio.",required:!1},{name:"x_vector_only_mode",type:"bool",description:"Clone using only the speaker embedding. Defaults to true for embedding-only input, otherwise false.",required:!1},{name:"encode_reference_only",type:"bool",description:"Encode reference audio and return an acoustic-tokens artifact without generating speech.",required:!1,default:!1},{name:"max_tokens",type:"int",description:"Maximum generated frames per text chunk; uses the checkpoint max_new_tokens setting (300 fallback). Each frame represents 80 ms.",required:!1,min:1},{name:"do_sample",type:"bool",description:"Enable sampling for all codebooks unless subtalker_do_sample overrides later codebooks.",required:!1,default:!0},{name:"temperature",type:"float",description:"Sampling temperature for all codebooks unless overridden for the subtalker.",required:!1,default:.8},{name:"top_k",type:"int",description:"Top-k sampling limit for all codebooks unless overridden for the subtalker.",required:!1,default:25},{name:"top_p",type:"float",description:"Nucleus cutoff within top-k candidates, unless overridden for the subtalker.",required:!1,default:.95},{name:"repetition_penalty",type:"float",description:"Repetition penalty applied independently to each codebook.",required:!1,default:1.2},{name:"repetition_window",type:"int",description:"Recent frames remembered per codebook for repetition penalties; zero uses all history.",required:!1,min:0,default:64},{name:"babble_retries",type:"int",description:"Regenerations for short chunks that exceed their text; zero disables the guard.",required:!1,min:0,default:2},{name:"subtalker_temperature",type:"float",description:"Temperature override for later codebooks; omitted or negative inherits temperature.",required:!1},{name:"subtalker_top_k",type:"int",description:"Top-k override for later codebooks; omitted or negative inherits top_k.",required:!1},{name:"subtalker_top_p",type:"float",description:"Nucleus cutoff override for later codebooks; omitted or negative inherits top_p.",required:!1},{name:"subtalker_do_sample",type:"bool",description:"Sampling override for later codebooks; inherits do_sample when omitted.",required:!1},{name:"seed",type:"int",description:"Sampling seed; omitted draws a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Maximum character budget per phoneme-string chunk; must be positive.",required:!1,min:1,default:200}],session:[{name:"g2p_dict_file",type:"path",description:"SEA-G2P dictionary file (sea_g2p.bin). When set, input is Vietnamese/English text rather than precomputed phonemes.",required:!1},{name:"g2p_library",type:"path",description:"SEA-G2P shared library used with g2p_dict_file; searched by library name when omitted.",required:!1},{name:"mem_saver",type:"bool",description:"Release the talker cached-step graph after each request.",required:!1,default:!1},{name:"voice_prompt_cache_slots",type:"int",description:"Prepared voice-prompt cache slots; zero disables caching.",required:!1,min:0,default:1},{name:"weight_type",type:"enum",description:"Shared talker matmul storage.",required:!1,preset:"weight_type_full",default:"native"},{name:"conv_weight_type",type:"enum",description:"Speaker encoder convolution weight storage.",required:!1,values:["native","f32","f16"],default:"f32"},{name:"talker_weight_type",type:"enum",description:"Talker matmul storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"talker_graph_arena_mb",type:"int",description:"Talker graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:256},{name:"speech_decoder_graph_arena_mb",type:"int",description:"Codec decoder graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:32},{name:"speaker_encoder_graph_arena_mb",type:"int",description:"Speaker encoder graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:32},{name:"talker_constant_context_mb",type:"int",description:"Talker constant metadata context. Size in MiB; must be positive.",required:!1,min:1,default:4096},{name:"code_predictor_constant_context_mb",type:"int",description:"Code predictor constant metadata context. Size in MiB; must be positive.",required:!1,min:1,default:1536},{name:"speech_decoder_constant_context_mb",type:"int",description:"Codec decoder constant metadata context. Size in MiB; must be positive.",required:!1,min:1,default:1536}],load:[]},ui:{recommended_package:"vieneu_v3_turbo_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/vieneu_v3_turbo.md","docs/tts.md","docs/gguf.md"]},packages:[{id:"vieneu_v3_turbo_q8_0",display_name:"VieNeu-TTS v3 Turbo Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VieNeu-TTS-v3-Turbo-GGUF",files:["gguf/vieneu-v3-turbo-q8_0.gguf","gguf/voices/manifest.json","gguf/voices/minh_quan_pro/ref_codes.txt","gguf/voices/minh_quan_pro/speaker.emb.txt"],download:{kind:"huggingface_snapshot",repo:"pnnbao-ump/VieNeu-TTS-v3-Turbo"},strip_prefix:"gguf"},{id:"vieneu_v3_turbo_bf16",display_name:"VieNeu-TTS v3 Turbo BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VieNeu-TTS-v3-Turbo-GGUF",files:["gguf/vieneu-v3-turbo-bf16.gguf","gguf/voices/manifest.json","gguf/voices/minh_quan_pro/ref_codes.txt","gguf/voices/minh_quan_pro/speaker.emb.txt"],download:{kind:"huggingface_snapshot",repo:"pnnbao-ump/VieNeu-TTS-v3-Turbo"},strip_prefix:"gguf"},{id:"vietneu_tts_v3_turbo_q8_0",display_name:"VieNeu-TTS v3 Turbo Q8_0 GGUF (first community port, July 2026 weights)",format:"gguf",precision:"q8_0",target_directory:"VieNeu-TTS-v3-Turbo-GGUF-2026-07",files:["model.gguf"],download:{kind:"huggingface_snapshot",repo:"phuocnguyen90/VieNeu-TTS-v3-Turbo-GGUF"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",speech_tokenizer_config:"model:speech_tokenizer/config.json"},optional_files:{generation_config:"model:generation_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},speech_tokenizer_weights:{source:"weights:",prefix:"speech_tokenizer_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",speech_tokenizer_config:"model:speech_tokenizer/config.json"},optional_files:{generation_config:"model:generation_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{model_weights:"model:model.safetensors",speech_tokenizer_weights:"model:speech_tokenizer/model.safetensors"}}]},P$={schema_version:1,family:"voxcpm1",display_name:"VoxCPM1",description:"OpenBMB VoxCPM 0.5B tokenizer-free TTS model supporting short-reference voice cloning and streaming output (16kHz).",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["zh","en","ja","ko"],capabilities:{clone:["speaker_reference"]},dependencies:[],options:{request:[{name:"text_chunk_mode",type:"enum",description:"Text chunking mode; default tag_aware.",preset:"text_chunk_mode_full",required:!1,default:"tag_aware"},{name:"seed",type:"int",description:"Random seed for MiniCPM and diffusion sampling.",required:!1},{name:"max_tokens",type:"int",description:"Maximum MiniCPM output tokens; default 4096. Zero selects model max_length; negative counts are rejected.",required:!1,default:4096},{name:"min_tokens",type:"int",description:"Minimum MiniCPM output tokens before an EOS stop is honored; default 2.",required:!1,default:2},{name:"num_inference_steps",type:"int",description:"CFM diffusion sampling steps; default 10. Must be positive.",required:!1,default:10},{name:"guidance_scale",type:"float",description:"CFM classifier-free guidance rate. Must be nonnegative.",required:!1,default:2},{name:"retry_badcase",type:"bool",description:"Retry when generation is detected as a bad case; defaults to true offline and false in streaming. Streaming ignores an explicit true value with a warning.",required:!1},{name:"retry_badcase_max_times",type:"int",description:"Maximum total generation attempts when retrying bad cases, including the initial attempt; default 3. Must be positive.",required:!1,default:3},{name:"retry_badcase_ratio_threshold",type:"float",description:"Bad-case ratio threshold for retry decisions. Must be positive.",required:!1},{name:"prompt_text",type:"string",description:"Text prompt for prompt-continuation voice cloning.",required:!1},{name:"reference_text",type:"string",description:"Alias for prompt_text; text prompt for prompt-continuation voice cloning.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum characters per offline text chunk; must be positive. Does not control streaming chunk cadence.",required:!1,min:1,default:2048},{name:"language",type:"string",description:"Language hint for Chinese-script normalization; Cantonese/yue preserves Traditional characters. Inherits structured transcript or voice language when provided.",required:!1}],session:[{name:"lora",type:"path",description:"Native LoRA directory or checkpoint file with adjacent lora_config.json; merged into generator weights at session creation.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's configured alpha/r scaling; default 1.",required:!1,default:1},{name:"mem_saver",type:"bool",description:"Use tighter graph workspaces and release request runtime graphs; default false.",required:!1,default:!1},{name:"prompt_cache_slots",type:"int",description:"Prompt and prompt-audio embedding cache slots; default 1.",required:!1,default:1},{name:"weight_type",type:"enum",description:"Model weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"audiovae_weight_type",type:"enum",description:"AudioVAE weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"weight_context_mb",type:"int",description:"Model weight graph context size in MB.",required:!1},{name:"text_embedding_graph_arena_mb",type:"int",description:"Text embedding host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"lm_step_graph_arena_mb",type:"int",description:"LM step host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"projection_graph_arena_mb",type:"int",description:"Projection host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"local_encoder_graph_arena_mb",type:"int",description:"Local encoder host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"dit_graph_arena_mb",type:"int",description:"DiT estimator host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"audiovae_weight_context_mb",type:"int",description:"AudioVAE weight graph context size in MB.",required:!1},{name:"audiovae_graph_arena_mb",type:"int",description:"AudioVAE decoder host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"audiovae_encoder_graph_arena_mb",type:"int",description:"AudioVAE encoder host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"audiovae_latent_capacity",type:"int",description:"AudioVAE decoder latent frame capacity.",required:!1},{name:"audiovae_encoder_sample_capacity",type:"int",description:"AudioVAE encoder sample capacity.",required:!1}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"voxcpm1_0_5b_q8_0",tags:["TTS","Clone","GGUF","Stream"],docs:["docs/models/voxcpm1.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"voxcpm1_0_5b_q8_0",display_name:"VoxCPM 0.5B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VoxCPM1-GGUF",files:["VoxCPM1-GGUF/voxcpm-0.5b-q8_0-audiovae-f16.gguf"],strip_prefix:"VoxCPM1-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{special_tokens_map:"model:special_tokens_map.json"},tensors:{weights:{source:"weights:"},audiovae_weights:{source:"weights:"}}}]},j$={family:"voxcpm2",display_name:"VoxCPM2",description:"OpenBMB tokenizer-free TTS model supporting 30 languages and 9 Chinese dialects, with 48 kHz output, natural-language voice design, controllable short-reference voice cloning, and expressive style guidance.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["ar","my","zh","zh dialects","da","nl","en","fi","fr","de","el","he","hi","id","it","ja","km","ko","lo","ms","no","pl","pt","ru","es","sw","sv","tl","th","tr","vi"],options:{request:[{name:"min_tokens",type:"int",description:"Minimum generated audio tokens.",required:!1,min:0,default:2},{name:"max_tokens",type:"int",description:"Maximum generated audio tokens. Zero resolves to model max_length; requires min_tokens <= resolved max_tokens <= model limit.",required:!1,min:0,default:4096},{name:"num_inference_steps",type:"int",description:"Flow sampling steps. Must be positive.",required:!1,default:10},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale. Must be nonnegative.",required:!1,default:2},{name:"retry_badcase",type:"bool",description:"Retry detected bad generations. Offline only; streaming requires false.",required:!1,default:!0},{name:"retry_badcase_max_times",type:"int",description:"Total attempts including the initial attempt, not extra retries; must be positive.",required:!1,default:3},{name:"retry_badcase_ratio_threshold",type:"float",description:"Bad-case audio/text length ratio threshold. Must be positive.",required:!1,default:6},{name:"seed",type:"int",description:"Sampling seed.",required:!1,min:0,max:4294967295,default:1234},{name:"cfm_noise_file",type:"path",description:"Precomputed flow noise file.",required:!1},{name:"stream_chunk_policy",type:"enum",description:"Streaming decoder cadence: grow emits one patch first, then doubles toward stream_frames_per_event; fixed uses the configured size. Ignored offline.",required:!1,values:["grow","fixed"],default:"grow"},{name:"stream_frames_per_event",type:"int",description:"Maximum generated latent patches per streaming decoder event. Set to 1 for one-patch emission. Ignored offline.",required:!1,min:1,default:4},{name:"stream_left_context",type:"int",description:"Previous patches decoded as streaming left context.",required:!1,min:0,max:8,default:3},{name:"ultimate_clone",type:"bool",description:"Use the voice reference itself as the continuation prompt. Requires reference audio and reference_text or prompt_text; cannot be combined with explicit prompt audio.",required:!1,default:!1},{name:"prompt_text",type:"string",description:"Transcript for continuation prompt audio, distinct from the base voice reference.",required:!1},{name:"chunk_strategy",type:"enum",description:"Long-form continuation or independent generation per chunk. Offline only.",required:!1,values:["continuation","stateless"],default:"continuation"},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size. Offline only.",required:!1,default:2048},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode. Offline only.",required:!1,values:["default","tag_aware","japanese","endline"],default:"tag_aware"}],session:[{name:"audiovae_tile_frames",type:"int",description:"Opt-in causal AudioVAE tiling. Maximum new latent frames per tile; zero preserves full decoding.",required:!1,default:0,min:0},{name:"perf_mode",type:"enum",description:"Opt-in packed attention and MLP projections. May change numerical results; off preserves standard execution.",required:!1,values:["off","cuda_perf"],default:"off"},{name:"lora",type:"path",description:"Native LoRA directory or checkpoint file with adjacent lora_config.json; merged into generator weights at session creation.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's configured alpha/r scaling; default 1.",required:!1,default:1},{name:"weight_type",type:"enum",description:"Language-model weight storage; does not override AudioVAE storage.",required:!1,preset:"weight_type_full"},{name:"audiovae_weight_type",type:"enum",description:"AudioVAE weight storage; defaults independently to native, not the shared weight_type.",required:!1,preset:"weight_type_full"},{name:"prompt_cache_slots",type:"int",description:"Cached encoded prompt slots; zero disables reuse.",required:!1,min:0,default:1},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs.",required:!1,default:!0},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:3072},{name:"text_embedding_graph_arena_mb",type:"int",description:"Text embedding host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:64},{name:"lm_step_graph_arena_mb",type:"int",description:"LM step host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:1024},{name:"projection_graph_arena_mb",type:"int",description:"Projection host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:256},{name:"local_encoder_graph_arena_mb",type:"int",description:"Local encoder host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:512},{name:"dit_graph_arena_mb",type:"int",description:"DiT estimator host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:1024},{name:"audiovae_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:768},{name:"audiovae_graph_arena_mb",type:"int",description:"AudioVAE decoder host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:1024},{name:"audiovae_encoder_graph_arena_mb",type:"int",description:"AudioVAE encoder host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:1024},{name:"audiovae_latent_capacity",type:"int",description:"Optional decoder graph reservation in latent frames, reused by shorter requests and doubled when exceeded; omitted builds the graph at each request's own frame count.",required:!1,min:1},{name:"exec_plan",type:"string",description:"JSON component execution plans. audiovae: impl=default/ggml; backend must match the session; no artifacts. params.threads is a nonnegative int: positive values require a CPU session and enable a dedicated AudioVAE backend with streaming decode overlap; also controls offline decoding and prompt encoding threads. Omitted/0 shares the session backend.",required:!1,default:"{}"},{name:"audiovae_encoder_sample_capacity",type:"int",description:"Reserved encoder sample capacity.",required:!1,min:1,default:24e4}],load:[]},capabilities:{clone:["speaker_reference"],design:["voice_design"]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"voxcpm2_q8_0",tags:["TTS","Clone","Design","GGUF","Stream"],docs:["docs/tts.md","docs/gguf.md","docs/models/vocalrender.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"voxcpm2_q8_0",display_name:"VoxCPM2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VoxCPM2-GGUF",files:["VoxCPM2-GGUF/voxcpm2-q8_0.gguf"],strip_prefix:"VoxCPM2-GGUF"},{id:"voxcpm2_bf16",display_name:"VoxCPM2 BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VoxCPM2-GGUF",files:["VoxCPM2-GGUF/voxcpm2-bf16.gguf"],strip_prefix:"VoxCPM2-GGUF"},{id:"voxcpm2_orig",display_name:"VoxCPM2 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"VoxCPM2-GGUF",files:["VoxCPM2-GGUF/voxcpm2-orig.gguf"],strip_prefix:"VoxCPM2-GGUF"},{id:"voxcpm2_vocalrender_pro",display_name:"VocalRender-Pro (VoxCPM2) Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"VoxCPM2-GGUF",files:["VoxCPM2-GGUF/finetune/vocalrender-pro-orig.gguf"],strip_prefix:"VoxCPM2-GGUF"},{id:"voxcpm2_safetensors",display_name:"VoxCPM2 Safetensors",format:"safetensors",precision:"native",target_directory:"VoxCPM2",files:["config.json","model.safetensors","tokenizer.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"OpenBMB/VoxCPM2"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{weights:{source:"weights:",prefix:"weights"},audiovae_weights:{source:"weights:",prefix:"audiovae_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{weights:"model:model.safetensors",audiovae_weights:"model:audiovae.safetensors"}}]},N$={family:"voxtral_realtime",display_name:"Voxtral Mini 4B Realtime",description:"Mistral 13-language realtime ASR model with a natively streaming causal audio encoder, configurable low-latency transcription delay, and accuracy competitive with offline open-source systems.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["en","zh","hi","es","ar","fr","pt","ru","de","ja","ko","it","nl"],options:{request:[{name:"max_tokens",type:"int",min:1,description:"Maximum generated transcript tokens; omitted uses the audio-derived limit. Offline decoding only; ignored by live streaming.",required:!1},{name:"do_sample",type:"bool",default:!1,description:"Sample rather than greedily decode.",required:!1},{name:"temperature",type:"float",min:0,default:1,description:"Sampling temperature; must be > 0.",required:!1},{name:"top_p",type:"float",min:0,max:1,default:1,description:"Nucleus sampling probability in (0, 1].",required:!1},{name:"top_k",type:"int",min:0,default:50,description:"Top-k sampling limit; zero disables filtering.",required:!1},{name:"seed",type:"int",min:0,default:1234,description:"Sampling seed.",required:!1}],session:[{name:"weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],default:"native",description:"Shared weight storage type.",required:!1},{name:"audio_encoder_weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],description:"Audio encoder weight storage; inherits weight_type.",required:!1},{name:"text_decoder_weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],description:"Text decoder weight storage; inherits weight_type.",required:!1},{name:"audio_encoder_graph_arena_mb",type:"int",min:1,default:512,description:"Audio encoder graph arena in MiB.",required:!1},{name:"audio_encoder_weight_context_mb",type:"int",min:1,default:128,description:"Audio encoder weight context in MiB.",required:!1},{name:"text_decoder_prefill_graph_arena_mb",type:"int",min:1,default:512,description:"Decoder prefill graph arena in MiB. Decoder uses the maximum of prefill and decode arena settings.",required:!1},{name:"text_decoder_decode_graph_arena_mb",type:"int",min:1,default:512,description:"Decoder step graph arena in MiB. Decoder uses the maximum of prefill and decode arena settings.",required:!1},{name:"text_decoder_weight_context_mb",type:"int",min:1,default:128,description:"Decoder weight context in MiB.",required:!1},{name:"stream_decode_cache_steps",type:"int",default:1024,description:"Streaming decoder cache capacity in 80 ms steps. Must be positive and no greater than checkpoint sliding_window.",required:!1},{name:"stream_batch_tokens",type:"int",min:1,default:1,description:"Audio tokens per streaming encoder forward.",required:!1}],load:[]},capabilities:{asr:["partial_results"]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"voxtral_realtime_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/models/voxtral_realtime.md","docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"voxtral_realtime_q8_0",display_name:"Voxtral Mini 4B Realtime Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Voxtral-Mini-4B-Realtime-2602-GGUF",files:["Voxtral-Mini-4B-Realtime-2602-GGUF/voxtral-mini-4b-realtime-2602-q8_0.gguf"],strip_prefix:"Voxtral-Mini-4B-Realtime-2602-GGUF"},{id:"voxtral_realtime_q4_k",display_name:"Voxtral Mini 4B Realtime Q4_K GGUF",format:"gguf",precision:"q4_k",target_directory:"Voxtral-Mini-4B-Realtime-2602-GGUF",files:["Voxtral-Mini-4B-Realtime-2602-GGUF/voxtral-mini-4b-realtime-2602-q4_k.gguf"],strip_prefix:"Voxtral-Mini-4B-Realtime-2602-GGUF"},{id:"voxtral_realtime_bf16",display_name:"Voxtral Mini 4B Realtime BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Voxtral-Mini-4B-Realtime-2602-GGUF",files:["Voxtral-Mini-4B-Realtime-2602-GGUF/voxtral-mini-4b-realtime-2602-bf16.gguf"],strip_prefix:"Voxtral-Mini-4B-Realtime-2602-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tekken:"model:tekken.json"},optional_files:{params:"model:params.json",readme:"model:README.md"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tekken:"model:tekken.json"},optional_files:{params:"model:params.json",readme:"model:README.md"},tensors:{weights:"model:model.safetensors"}}]},O$={schema_version:1,family:"voxtral_tts",display_name:"Voxtral 4B TTS",description:"Mistral's Ministral-based autoregressive and flow-matching TTS model with 20 embedded preset voices.",category:"tts",status:"supported",tasks:["tts"],modes:["offline","streaming"],languages:["en","fr","es","de","it","pt","nl","ar","hi"],runtime:{tags:["gguf"]},capabilities:{tts:["built_in_voices","long_form"]},options:{request:[{name:"voice_id",type:"enum",description:"Embedded preset voice; the released checkpoint does not contain the encoder needed for reference-audio cloning.",values:["casual_female","casual_male","cheerful_female","neutral_female","neutral_male","pt_male","pt_female","nl_male","nl_female","it_male","it_female","fr_male","fr_female","es_male","es_female","de_male","de_female","ar_male","hi_male","hi_female"],required:!1,default:"casual_male"},{name:"max_tokens",type:"int",description:"Maximum generated audio frames per text chunk; each frame represents 80 ms.",required:!1,min:1,default:2048},{name:"num_inference_steps",type:"int",description:"Euler integration steps for the per-frame acoustic flow model.",required:!1,min:1,default:7},{name:"guidance_scale",type:"float",description:"Acoustic classifier-free guidance scale; the AR backbone does not use CFG.",required:!1,min:0,default:1.2},{name:"seed",type:"int",description:"Acoustic noise seed; omitted requests select a random seed.",required:!1,min:0},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per framework long-form text chunk.",required:!1,min:1,default:300},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; native preserves the package's tensor types.",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],required:!1,default:"native"},{name:"kv_cache_type",type:"enum",description:"AR key/value cache storage type.",values:["f32","f16","bf16"],required:!1,default:"f16"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"voxtral_4b_tts_2603_bf16",display_name:"Voxtral 4B TTS 2603 BF16 GGUF",default:!0,format:"gguf",precision:"bf16",target_directory:"Voxtral-4B-TTS-2603-GGUF",files:["Voxtral-4B-TTS-2603-GGUF/voxtral-4b-tts-2603-bf16.gguf"],strip_prefix:"Voxtral-4B-TTS-2603-GGUF"},{id:"voxtral_4b_tts_2603_q8_0",display_name:"Voxtral 4B TTS 2603 Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"Voxtral-4B-TTS-2603-GGUF",files:["Voxtral-4B-TTS-2603-GGUF/voxtral-4b-tts-2603-q8_0.gguf"],strip_prefix:"Voxtral-4B-TTS-2603-GGUF"}],dependencies:[],ui:{recommended_package:"voxtral_4b_tts_2603_bf16",tags:["TTS","GGUF"],docs:["docs/models/voxtral_tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:params.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},tensors:{model_weights:"weights:"}}]},I$={schema_version:1,family:"whistle_asr",display_name:"Whistle ASR",description:"Whistle offline speech recognition with FP32 GGUF weights, a GGML encoder and a host decoder.",category:"asr",status:"experimental",tasks:["asr"],modes:["offline"],languages:["en","de","fr","es","it","nl","pl"],runtime:{tags:["gguf"]},capabilities:{},options:{request:[{name:"language",type:"string",description:"Force one supported language; omit to detect the language.",required:!1}],session:[{name:"exec_plan",type:"string",description:"JSON component execution plans. Component decoder accepts impl host/neon (default host), both on CPU independently of the encoder backend. The experimental neon implementation accelerates the vocabulary projection with the framework NEON library and requires ENGINE_ENABLE_NEON=ON and AArch64 NEON. No artifacts or params are used.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"whistle_asr_f32",display_name:"Whistle ASR GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"Whistle-GGUF",files:["Whistle-GGUF/whistle-f32.gguf"],strip_prefix:"Whistle-GGUF"}],dependencies:[],ui:{tags:["ASR","GGUF"],docs:["docs/models/whistle_asr.md"],recommended_package:"whistle_asr_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_blob:"model:tokenizer.blob",mel_filterbank:"model:mel_filterbank_80.f32",hadamard_perm1:"model:hadamard_perm1.f32",hadamard_perm2:"model:hadamard_perm2.f32"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_blob:"model:tokenizer.blob",mel_filterbank:"model:mel_filterbank_80.f32",hadamard_perm1:"model:hadamard_perm1.f32",hadamard_perm2:"model:hadamard_perm2.f32"},tensors:{weights:"model:whistle.safetensors"}}]},D$={schema_version:1,family:"xtts_v2",display_name:"XTTS v2",description:"Coqui XTTS v2 cross-lingual text-to-speech with voice cloning: GPT-2 mel-code generator, perceiver conditioning resampler, HiFi-GAN decoder, and speaker encoder.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en","es","fr","de","it","pt","pl","tr","ru","nl","cs","ar","zh-cn","hu","ko","ja","hi"],capabilities:{tts:["speaker_reference"]},options:{request:[{name:"language",type:"string",description:"Source language for text conditioning (e.g. 'en'); also selects tokenizer normalization.",required:!1,default:"en"},{name:"temperature",type:"float",description:"AR sampling temperature; official default 0.75.",required:!1,min:0,default:.75},{name:"top_k",type:"int",description:"AR top-k sampling; official default 50.",required:!1,min:0,default:50},{name:"top_p",type:"float",description:"AR nucleus sampling threshold; official default 0.85.",required:!1,min:0,max:1,default:.85},{name:"repetition_penalty",type:"float",description:"AR repetition penalty; official default 10.0.",required:!1,min:1,default:10},{name:"max_mel_tokens",type:"int",description:"Maximum mel codes to generate; official default 605.",required:!1,min:1,default:605},{name:"seed",type:"int",description:"Sampling seed; omitted selects a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per framework text chunk; default 256.",required:!1,min:1,default:256},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",preset:"text_chunk_mode_full",required:!1,default:"word_budget"}],session:[{name:"conditionals_cache_slots",type:"int",description:"Prepared voice-conditioning cache slots; 0 disables caching.",required:!1,min:0,default:1}],load:[]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{vocoder:"model:xtts-v2-vocoder-f16.gguf"},tensors:{gpt_weights:{source:"weights:"},vocoder_weights:{source:"model:xtts-v2-vocoder-f16.gguf"}}}],packages:[{id:"xtts_v2_gguf_q8_0",display_name:"XTTS v2 GGUF (Q8_0)",default:!0,format:"gguf",precision:"q8_0",target_directory:"XTTS-v2-Q8",files:["q8_0/xtts-v2-gpt-q8_0.gguf","q8_0/xtts-v2-vocoder-f16.gguf","q8_0/mel_norms.bin"],download:{kind:"huggingface_snapshot",repo:"onicubag/xTTSv2-GGUF"},strip_prefix:"q8_0"},{id:"xtts_v2_gguf",display_name:"XTTS v2 GGUF (Original)",default:!1,format:"gguf",precision:"orig",target_directory:"XTTS-v2",files:["xtts-v2-gpt.gguf","xtts-v2-vocoder-f16.gguf","mel_norms.bin"],download:{kind:"huggingface_snapshot",repo:"onicubag/xTTSv2-GGUF"}},{id:"xtts_v2_gguf_q4_k_m",display_name:"XTTS v2 GGUF (Q4_K_M)",default:!1,format:"gguf",precision:"q4_k_m",target_directory:"XTTS-v2-Q4_K_M",files:["q4_k_m/xtts-v2-gpt-q4_k_m.gguf","q4_k_m/xtts-v2-vocoder-f16.gguf","q4_k_m/mel_norms.bin"],download:{kind:"huggingface_snapshot",repo:"onicubag/xTTSv2-GGUF"},strip_prefix:"q4_k_m"}],dependencies:[],ui:{tags:["TTS","Clone","GGUF"],docs:["docs/community_models/xtts_v2.md"],recommended_package:"xtts_v2_gguf_q8_0"}},L$={schema_version:1,family:"yue2",display_name:"YuE2",description:"YuE2 music generation model with symbolic ABC planning, semantic codec generation, NAR acoustic flow synthesis, and Oobleck VAE decode.",category:"audio_generation",status:"supported",tasks:["music"],modes:["offline"],languages:["en"],capabilities:{music:["lyrics","style_control"]},runtime:{tags:["gguf"]},dependencies:[],ui:{recommended_package:"yue2_main_q8_0",tags:["Music","GGUF"],docs:["docs/models/yue2.md","docs/music_generation.md","docs/gguf.md"]},options:{request:[{name:"style",type:"string",description:"Song style/tags.",required:!0},{name:"lyrics",type:"string",description:"Lyrics text. Leave empty for instrumental generation; if omitted, the CLI text input is used.",required:!1},{name:"cot",type:"enum",values:["off","melody","full"],description:"Symbolic planning route. off skips ABC generation; melody/full generate or consume ABC before music tokens.",required:!1,default:"full"},{name:"stop_after",type:"enum",values:["abc","semantic","audio"],description:"Last stage to run. abc writes the generated score only; semantic also writes the semantic token export; audio renders the full song.",required:!1,default:"audio"},{name:"abc",type:"string",description:"External ABC score text for melody/full routes.",required:!1},{name:"abc_file",type:"string",description:"Path to an external ABC score file for melody/full routes.",required:!1},{name:"semantic_prefix",type:"string",description:"JSON array of semantic codec indices to force as the start of the music stream.",required:!1},{name:"semantic_prefix_file",type:"string",description:"Path to a JSON array of semantic codec indices to force as the start of the music stream.",required:!1},{name:"nar_noise_file",type:"string",description:"Path to a raw float32 noise file for NAR generation, shaped [frames,64].",required:!1},{name:"export_semantic",type:"bool",description:"Attach the semantic token stream as a semantic artifact (JSON array of codec indices); default false.",required:!1,default:!1},{name:"guidance_scale",type:"float",description:"Semantic classifier-free guidance scale. Default follows the upstream route defaults. Omitted defaults to 1.01 with cot=off, otherwise 1.0.",required:!1,min:0,max:20},{name:"seed",type:"int",description:"Generation seed. Must be nonnegative and less than 2^63.",required:!1,min:0,default:1234},{name:"num_inference_steps",type:"int",description:"NAR midpoint ODE steps.",required:!1,min:1,default:8},{name:"abc_temperature",type:"float",description:"ABC planner sampling temperature.",required:!1,min:0,max:5},{name:"abc_top_p",type:"float",description:"ABC planner nucleus sampling probability. Must be in (0, 1].",required:!1,max:1},{name:"abc_top_k",type:"int",description:"ABC planner top-k sampling limit.",required:!1,min:1},{name:"abc_repetition_penalty",type:"float",description:"ABC planner repetition penalty. Must be positive.",required:!1},{name:"abc_penalty_window",type:"int",description:"ABC planner repetition penalty window.",required:!1,min:1},{name:"abc_min_tokens",type:"int",description:"Minimum ABC planner tokens before EOS is accepted.",required:!1,min:0},{name:"abc_max_tokens",type:"int",description:"Maximum ABC planner tokens. Zero is allowed when min_tokens is also zero.",required:!1,min:0},{name:"semantic_temperature",type:"float",description:"Semantic codec sampling temperature.",required:!1,min:0,max:5},{name:"semantic_top_p",type:"float",description:"Semantic codec nucleus sampling probability. Must be in (0, 1].",required:!1,max:1},{name:"semantic_top_k",type:"int",description:"Semantic codec top-k sampling limit.",required:!1,min:1},{name:"semantic_repetition_penalty",type:"float",description:"Semantic codec repetition penalty. Must be positive.",required:!1},{name:"semantic_penalty_window",type:"int",description:"Semantic codec repetition penalty window.",required:!1,min:1},{name:"semantic_min_tokens",type:"int",description:"Minimum semantic tokens before EOS is accepted.",required:!1,min:0},{name:"semantic_max_tokens",type:"int",description:"Maximum semantic codec tokens. Zero is allowed when min_tokens is also zero.",required:!1,min:0}],session:[{name:"ar_lora",type:"string",description:"AR adapter safetensors file; native, PEFT, and ComfyUI LoRA layouts. Absolute path or relative to the model root. Requires session reload.",required:!1},{name:"ar_lora_scale",type:"float",description:"AR LoRA delta scale; zero disables the adapter. Requires session reload.",required:!1,default:1},{name:"nar_lora",type:"string",description:"NAR adapter safetensors file. Absolute path or relative to the model root. Requires session reload.",required:!1},{name:"nar_lora_scale",type:"float",description:"NAR LoRA delta scale; full vae2llm/llm2vae replacements are unscaled. Zero disables the entire adapter. Requires session reload.",required:!1,default:1},{name:"weight_type",type:"enum",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"],description:"Shared weight storage type.",required:!1,default:"native"},{name:"model_weight_type",type:"enum",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"],description:"YuE2 MoT weight storage type. Omitted inherits weight_type.",required:!1},{name:"model_gguf",type:"string",description:"Yue2 main AR/NAR component GGUF file relative to the model root.",required:!1,default:"yue2-3b-q8_0.gguf"},{name:"vae_gguf",type:"string",description:"Yue2 VAE component GGUF file relative to the model root.",required:!1,default:"yue2-vae-f16.gguf"},{name:"vae_weight_type",type:"enum",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"],description:"YuE2 VAE weight storage type. Omitted inherits weight_type.",required:!1},{name:"model_weight_context_mb",type:"int",description:"YuE2 MoT weight context size in MiB.",required:!1,min:1,default:32},{name:"vae_weight_context_mb",type:"int",description:"YuE2 VAE weight context size in MiB.",required:!1,min:1,default:32},{name:"ar_prefill_graph_arena_mb",type:"int",description:"AR prefill graph arena size in MiB.",required:!1,min:1,default:32},{name:"ar_decode_graph_arena_mb",type:"int",description:"AR one-token decode graph arena size in MiB.",required:!1,min:1,default:32},{name:"nar_graph_arena_mb",type:"int",description:"NAR acoustic flow graph arena size in MiB.",required:!1,min:1,default:32},{name:"vae_graph_arena_mb",type:"int",description:"VAE decode graph arena size in MiB.",required:!1,min:1,default:32},{name:"attention",type:"enum",description:"NAR acoustic-flow attention lowering; auto selects the backend-appropriate implementation.",required:!1,values:["auto","flash","eager"],default:"auto"},{name:"perf_mode",type:"enum",description:"Performance preset; cuda_perf packs AR projections, aligns KV capacity to 256 tokens, retains stages and caps VAE tiles at 512 frames. Explicit controls override the preset. May change audio and substantially increase peak VRAM.",values:["off","cuda_perf"],required:!1,default:"off"},{name:"packed_projections",type:"bool",description:"Pack AR QKV and gate/up projections without changing weight dtype. Default false, true with cuda_perf. Explicit values override the preset.",required:!1},{name:"kv_cache_alignment",type:"int",description:"AR KV capacity alignment in tokens; values above 1 also use cached CUDA CFG attention windows of this size. Default 1, or 256 with cuda_perf; may use more memory and change numerics. Explicit values override the preset.",required:!1,min:1},{name:"mem_saver",type:"bool",description:"Release AR/NAR runtimes and VAE graphs after generation. Default true, false with cuda_perf. Disabling retains stages and can substantially increase peak VRAM.",required:!1},{name:"vae_tile_frames",type:"int",description:"Latent core frames per VAE tile; defaults to model configuration, capped at 512 with cuda_perf. Explicit values override the cap. The halo is unchanged; different boundaries can change numerical results.",required:!1,min:1},{name:"attention_tile_rows",type:"int",description:"Query rows per eager NAR attention tile; nonpositive values select automatic tiling to keep each score matrix below 3 GiB.",required:!1,default:0}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Yue2-3B-GGUF",revision:"main",gated:!1}},packages:[{id:"yue2_main_q8_0",display_name:"Yue2 3B Main Q8_0",default:!0,format:"gguf",precision:"q8_0",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-3b-q8_0.gguf"]},{id:"yue2_main_bf16",display_name:"Yue2 3B Main BF16",format:"gguf",precision:"bf16",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-3b-bf16.gguf"]},{id:"yue2_main_q4_0",display_name:"Yue2 3B Main Q4_0",format:"gguf",precision:"q4_0",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-3b-q4_0.gguf"]},{id:"yue2_vae_f16",display_name:"Yue2 VAE F16",format:"gguf",precision:"f16",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-vae-f16.gguf"]},{id:"yue2_vae_f32",display_name:"Yue2 VAE F32",format:"gguf",precision:"f32",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-vae-f32.gguf"]}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{model_config:"model:sidecars/yue2-model-config.json",generation_config:"model:sidecars/yue2-generation-config.json",tiktoken:"model:sidecars/yue2-qwen.tiktoken",vae_config:"model:sidecars/yue2-vae-config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"}}},{format:"safetensors",roots:{model:"YuE2-3B",vae:"YuE2-Vae"},files:{model_config:"model:config.json",generation_config:"model:yue2_generation_config.json",tiktoken:"model:qwen.tiktoken",vae_config:"vae:config.json"},tensors:{model_weights:"model:model.safetensors",vae_weights:"vae:model.safetensors"}}]},V$={schema_version:1,family:"zipvoice",display_name:"ZipVoice",description:"Community ZipVoice / ZipVoice-Distill flow-matching TTS with a TTSZipformer backbone (U-Net downsampling stacks, compact relative position attention), duration prediction from prompt ratio, Euler solver with t-shift and classifier-free guidance, and Vocos mel-24kHz vocoder (k2-fsa/ZipVoice).",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline","streaming"],languages:["en","zh"],runtime:{tags:["server","stream"]},capabilities:{clone:["speaker_reference"]},options:{request:[{name:"reference_text",type:"string",description:"Transcript matching the reference voice audio; required for zero-shot cloning.",required:!0},{name:"text_chunk_size",type:"int",description:"Maximum characters per generated text chunk; default 128.",required:!1,min:1,default:128},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",preset:"text_chunk_mode_full",required:!1,default:"word_budget"},{name:"guidance_scale",type:"float",description:"Guidance scale; inherits the session default (3.0 for both variants). ZipVoice-Distill uses a guidance-scale embedding; ZipVoice uses batched CFG. Zero disables guidance. Any finite nonnegative value is accepted.",required:!1,min:0,default:3},{name:"num_inference_steps",type:"int",description:"Euler ODE steps; inherits the session default (8 for both variants).",required:!1,min:1,max:64,default:8},{name:"shift",type:"float",description:"Shift timesteps toward low SNR (smaller = stronger shift); default 0.5. Must be finite and positive.",required:!1,default:.5},{name:"speed",type:"float",description:"Speech speed multiplier applied through the prompt-duration ratio; default 1.0. Must be finite and positive.",required:!1,default:1},{name:"feat_scale",type:"float",description:"Feature scale applied to log-mel features; default 0.1 (reference default). Must be finite and positive.",required:!1,default:.1},{name:"target_rms",type:"float",description:"Target RMS for prompt loudness normalization; 0 disables. Default 0.1. Negative values disable normalization; values above 1 are accepted.",required:!1,default:.1},{name:"seed",type:"int",description:"Noise seed; default 666 (reference default).",required:!1,min:0,default:666},{name:"language",type:"string",description:"espeak language for phonemization; default en-us.",required:!1,default:"en-us"}],session:[{name:"vocos_path",type:"string",description:"Path to the Vocos vocoder checkpoint (vocos.safetensors or GGUF); required unless bundled in the model GGUF or placed next to the checkpoint.",required:!1},{name:"guidance_scale",type:"float",description:"Default guidance scale for requests that do not set it; must be finite and nonnegative.",required:!1,min:0,default:3},{name:"num_inference_steps",type:"int",description:"Default Euler steps for requests that do not set it.",required:!1,min:1,max:64,default:8},{name:"shift",type:"float",description:"Default timestep shift for requests that do not set it; must be finite and positive.",required:!1,default:.5},{name:"espeak_library_path",type:"string",description:"Path to the espeak-ng shared library (e.g. /opt/homebrew/lib/libespeak-ng.dylib) for tokenizer=espeak.",required:!1},{name:"espeak_data_path",type:"string",description:"Path to the espeak-ng data directory or package for tokenizer=espeak.",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"davidxifeng/zipvoice-gguf",revision:"main",gated:!1}},packages:[{id:"zipvoice_distill_gguf",display_name:"ZipVoice-Distill GGUF (local conversion)",description:"Self-contained GGUF: flow-matching model, bundled Vocos vocoder and the embedded text-frontend sidecars (tokens, config, zh tables) in one file. Converted from k2-fsa/ZipVoice with export_zipvoice_zh_dict.py + convert_zipvoice.py.",default:!0,format:"gguf",precision:"orig",target_directory:"ZipVoice-Distill-GGUF",files:["zipvoice-distill-orig.gguf"]},{id:"zipvoice_distill_q8_0",display_name:"ZipVoice-Distill GGUF (Q8_0)",description:"Self-contained Q8_0 GGUF with bundled Vocos and embedded text-frontend sidecars.",format:"gguf",precision:"q8_0",target_directory:"ZipVoice-Distill-GGUF",files:["zipvoice-distill-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"zipvoice_distill_gguf",tags:["TTS","Clone"],docs:["docs/models/zipvoice.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tokens:"model:tokens.txt",model_config:"model:model.json"},optional_files:{zh_chars:"model:zh_chars.tsv",zh_phrases:"model:zh_phrases.tsv",zh_syllables:"model:zh_syllables.tsv",zh_jieba_dict:"model:zh_jieba_dict.txt",zh_hmm_model:"model:zh_hmm_model.txt"},tensors:{model:{source:"weights:",prefix:"model"}},optional_tensors:{vocos_vocoder:{source:"weights:",prefix:"vocos"}}}]},H$={models:JSON.parse('[{"id":"ace-step","display_name":"ACE-Step 1.5 (music gen)","family":"ace_step","path":"models/Ace-Step1.5","task":"gen","mode":"offline","download_id":"ace_step","default_text":"upbeat pop music with bright vocals and energetic drums","session_options":{"ace_step.mem_saver":"true","ace_step.dit_weight_type":"q8_0","ace_step.text_encoder_weight_type":"q8_0","ace_step.planner_weight_type":"q8_0"},"min_vram_gb":8},{"id":"ming3-tts","display_name":"Ming 3.0 TTS 0.5B","family":"ming3_tts","path":"models/Ming-3.0-TTS-0.5B-GGUF","task":"tts","mode":"offline","download_id":"ming_3_0_tts_0_5b_bf16","default_options":{"language":"en"},"default_text":"Good evening. The harbor is quiet tonight."},{"id":"ming3-tts-clone","display_name":"Ming 3.0 TTS 0.5B Clone","family":"ming3_tts","path":"models/Ming-3.0-TTS-0.5B-GGUF","task":"clon","mode":"offline","download_id":"ming_3_0_tts_0_5b_bf16","default_options":{"language":"en"},"input_hint_en":"Upload a reference voice. Its transcript is optional and enables acoustic-prefix conditioning."},{"id":"ming3-tts-design","display_name":"Ming 3.0 TTS 0.5B Voice Design","family":"ming3_tts","path":"models/Ming-3.0-TTS-0.5B-GGUF","task":"vdes","mode":"offline","download_id":"ming_3_0_tts_0_5b_bf16","default_options":{"language":"en"}},{"id":"ming3-audio-asr","display_name":"Ming 3.0 Audio Tiny ASR","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"asr","mode":"offline","download_id":"ming3_audio_tiny_bf16"},{"id":"ming3-audio-understanding","display_name":"Ming 3.0 Audio Tiny Understanding","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"asr","workflow":"analysis","mode":"offline","download_id":"ming3_audio_tiny_bf16","default_options":{"prompt":"Describe the sounds in this recording."}},{"id":"ming3-audio-response","display_name":"Ming 3.0 Audio Tiny Spoken Response","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"s2s","mode":"offline","download_id":"ming3_audio_tiny_bf16","default_options":{"voice_id":"US_James","language":"en"}},{"id":"ming3-audio-tts","display_name":"Ming 3.0 Audio Tiny TTS","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"tts","mode":"offline","download_id":"ming3_audio_tiny_bf16","default_options":{"voice_id":"US_James","language":"en"}},{"id":"ming3-audio-clone","display_name":"Ming 3.0 Audio Tiny Clone","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"clon","mode":"offline","download_id":"ming3_audio_tiny_bf16","default_options":{"language":"en"},"input_hint_en":"Upload a reference voice. Add its transcript to enable acoustic-prefix conditioning."},{"id":"xtts-v2","display_name":"XTTS v2","family":"xtts_v2","path":"models/XTTS-v2-Q8","task":"tts","mode":"offline","download_id":"xtts_v2_gguf_q8_0","input_hint_en":"Upload a reference voice for multilingual speech synthesis."},{"id":"latentsync","display_name":"LatentSync 1.6 Lip Sync","family":"latentsync","path":"models/LatentSync-1.6-GGUF","task":"gen","mode":"offline","download_id":"latentsync_1_6_q8_0_f16","arena":false,"input_hint_en":"Choose a face video and driving speech audio."},{"id":"apollo","display_name":"Apollo","family":"apollo","path":"models/Apollo-GGUF","task":"s2s","mode":"offline","download_id":"apollo_orig"},{"id":"ast-audioset","display_name":"AST AudioSet","family":"ast_audioset","path":"models/AST-AudioSet-GGUF/ast-audioset-f32.gguf","task":"cls","mode":"offline","download_id":"ast_audioset_f32"},{"id":"audio-flamingo-3","display_name":"Audio Flamingo 3","family":"audio_flamingo","path":"models/Audio-Flamingo-GGUF/audio-flamingo-3-q4_k.gguf","task":"asr","mode":"offline","download_id":"audio_flamingo_3_q4_k","workflow":"analysis"},{"id":"audio-flamingo-next","display_name":"Audio Flamingo Next","family":"audio_flamingo","path":"models/Audio-Flamingo-GGUF/audio-flamingo-next-q4_k.gguf","task":"asr","mode":"offline","download_id":"audio_flamingo_next_q4_k","workflow":"analysis"},{"id":"audio8-tts","display_name":"Audio8 TTS Preview 0.6B (tts 克隆, GGUF Q8)","display_name_en":"Audio8 TTS Preview 0.6B (tts + clone, GGUF Q8)","family":"audio8_tts","path":"models/Audio8-TTS-Preview-0.6B-GGUF","task":"tts","mode":"offline","download_id":"audio8_tts_preview_0_6b_q8_0","min_vram_gb":4,"input_hint":"**Audio8 TTS Preview 0.6B**:多语种 TTS / 零样本克隆(支持 yue/zh/nl/en/fr/de/it/ja/ko/pl/es/auto);上传参考音色+参考文本即克隆,留空为普通 TTS;长文本自动分句。","input_hint_en":"**Audio8 TTS Preview 0.6B**: multilingual TTS and zero-shot clone (yue/zh/nl/en/fr/de/it/ja/ko/pl/es/auto). Upload a reference voice + transcript to clone; leave empty for plain TTS. Long text is chunked automatically."},{"id":"audiosr","display_name":"AudioSR (audio super-resolution)","family":"audiosr","path":"models/AudioSR-GGUF/audiosr-basic-f32.gguf","task":"s2s","mode":"offline","download_id":"audiosr_basic_f32","min_vram_gb":8,"input_hint_en":"**AudioSR**: upload a source audio file to generate a super-resolved output."},{"id":"auk-edit","display_name":"AuK (audio editing, community)","family":"auk","path":"models/AuK-Base-and-Flash-GGUF","task":"gen","mode":"offline","arena":false,"download_id":"auk_base_f32","default_text":"Remove the background noise and make the voice clearer.","min_vram_gb":20,"input_hint_en":"**AuK audio editing** (community): upload source audio and describe the requested speech, singing, acoustic, paralinguistic, enhancement, or separation edit."},{"id":"auk-tts","display_name":"AuK (speech generation, community)","family":"auk","path":"models/AuK-Base-and-Flash-GGUF","task":"tts","mode":"offline","arena":false,"download_id":"auk_base_f32","default_text":"The next train leaves in ten minutes.","min_vram_gb":20,"input_hint_en":"**AuK** (community): enter text plus a voice description, or provide an optional reference voice for zero-shot speech generation. Select compatible Base or AuK-Flash, Qwen, and VAE components before loading."},{"id":"breeze-tts-clone","display_name":"BreezeTTS 2 Clone","family":"breeze_tts","path":"models/Breeze-TTS-2-GGUF/breeze-tts-2-q8_0.gguf","task":"clon","mode":"offline","download_id":"breeze_tts_2_q8_0","min_vram_gb":8,"input_hint_en":"**BreezeTTS 2 Clone**: upload a reference voice and provide the matching reference transcript."},{"id":"breeze-tts","display_name":"BreezeTTS 2 VoiceDesign","family":"breeze_tts","path":"models/Breeze-TTS-2-GGUF/breeze-tts-2-q8_0.gguf","task":"vdes","mode":"offline","download_id":"breeze_tts_2_q8_0","min_vram_gb":8,"input_hint_en":"**BreezeTTS 2 VoiceDesign**: enter text and describe the target voice in Model parameters. No reference voice is required."},{"id":"bs-roformer","display_name":"BS-RoFormer (sep 人声分离)","display_name_en":"BS-RoFormer (vocal separation)","family":"bs_roformer","path":"models/BS-RoFormer-ep368-GGUF/bs-roformer-ep368-q8_0.gguf","task":"sep","mode":"offline","download_id":"bs_roformer_q8_0","min_vram_gb":3},{"id":"canary-asr","display_name":"Canary 180M Flash","family":"canary_asr","path":"models/Canary-180M-Flash-GGUF","task":"asr","mode":"offline","download_id":"canary_180m_flash_f32"},{"id":"ced-base","display_name":"CED Base","family":"ced","path":"models/CED-GGUF/ced-base-f32.gguf","task":"cls","mode":"offline","download_id":"ced_base_f32"},{"id":"ced-mini","display_name":"CED Mini","family":"ced","path":"models/CED-GGUF/ced-mini-f32.gguf","task":"cls","mode":"offline","download_id":"ced_mini_f32"},{"id":"ced-small","display_name":"CED Small","family":"ced","path":"models/CED-GGUF/ced-small-f32.gguf","task":"cls","mode":"offline","download_id":"ced_small_f32"},{"id":"ced-tiny","display_name":"CED Tiny","family":"ced","path":"models/CED-GGUF/ced-tiny-f32.gguf","task":"cls","mode":"offline","download_id":"ced_tiny_f32"},{"id":"chatterbox-vc","display_name":"Chatterbox (vc 声音转换)","display_name_en":"Chatterbox (voice conversion)","family":"chatterbox","path":"models/chatterbox","task":"vc","mode":"offline","download_id":"chatterbox","min_vram_gb":12,"input_hint":"**Chatterbox VC**:上传源语音和目标音色参考;模型保留源语音内容,将说话人音色转换为目标音色,输出 24kHz 单声道。","input_hint_en":"**Chatterbox VC**: upload source speech and a target-voice reference. It preserves the source content and converts the speaker identity; output is 24 kHz mono."},{"id":"chatterbox","display_name":"Chatterbox (voice clone)","family":"chatterbox","path":"models/chatterbox","task":"clon","mode":"offline","download_id":"chatterbox","min_vram_gb":12},{"id":"chatterbox-turbo","display_name":"Chatterbox Turbo (tts)","family":"chatterbox_turbo","path":"models/Chatterbox-Turbo-GGUF/chatterbox-turbo-q8_0.gguf","task":"tts","mode":"offline","download_id":"chatterbox_turbo_q8_0","min_vram_gb":4,"input_hint_en":"**Chatterbox Turbo**: fast English TTS with the built-in voice. No reference voice is required."},{"id":"citrinet-asr","display_name":"Citrinet ASR (asr)","family":"citrinet_asr","path":"models/citrinet","task":"asr","mode":"offline","download_id":"citrinet_asr","min_vram_gb":2},{"id":"cohere-asr","display_name":"Cohere Transcribe","family":"cohere_asr","path":"models/Cohere-Transcribe-GGUF","task":"asr","mode":"offline","download_id":"cohere_transcribe_bf16"},{"id":"r2t2-asr","display_name":"Confucius4-R2T2 (asr, 实时流式)","display_name_en":"Confucius4-R2T2 (asr, real-time streaming)","family":"confucius4_r2t2","path":"models/Confucius4-R2T2-GGUF/r2t2-q8_0.gguf","task":"asr","mode":"offline","download_id":"confucius4_r2t2_q8_0","min_vram_gb":5,"input_hint":"**Confucius4-R2T2**:网易有道实时流式 ASR,Qwen3-ASR-1.7B 微调,LSP 稳定前缀解码;提交文本永不回改,支持 80ms-2s 分块;Q8_0 GGUF(2.3G,自包含单文件),也支持 F16。","input_hint_en":"**Confucius4-R2T2**: NetEase Youdao real-time streaming ASR, a Qwen3-ASR 1.7B fine-tune with Longest Stable Prefix decoding. Committed text is never revised; 80 ms-2 s chunks; Q8_0 GGUF (2.3 GB, self-contained single file), F16 also available."},{"id":"confucius4-tts","display_name":"Confucius4-TTS (voice clone, GGUF)","display_name_en":"Confucius4-TTS (voice clone, GGUF)","family":"confucius4_tts","path":"models/Confucius4-TTS-GGUF","task":"clon","mode":"offline","download_id":"confucius4_tts_orig","min_vram_gb":8,"input_hint":"**Confucius4-TTS**:需要参考音色;当前中文/英语路径更可靠,非中英语种仍在验证中。","input_hint_en":"**Confucius4-TTS**: requires a reference voice. Chinese/English are the most reliable paths; other languages are still being validated."},{"id":"controlfoley","display_name":"ControlFoley (Foley/SFX)","family":"controlfoley","path":"models/ControlFoley-GGUF/controlfoley-large-44k-q8_0.gguf","task":"gen","mode":"offline","download_id":"controlfoley_large_44k_q8_0","min_vram_gb":12,"request_options":["video"],"input_hint_en":"**ControlFoley**: Foley generation from text, video, text+video, audio+video, or video only. Upload video in the Video field; upload source audio for AC-V2A."},{"id":"cosyvoice3","display_name":"CosyVoice3 Clone","family":"cosyvoice3","path":"models/CosyVoice3-GGUF/cosyvoice3-q8_0.gguf","task":"clon","mode":"offline","download_id":"cosyvoice3_q8_0","min_vram_gb":8,"input_hint_en":"**CosyVoice3 Clone**: upload a reference voice and provide the matching reference transcript. Use `template_name` for zero-shot or cross-lingual requests."},{"id":"cosyvoice3-instruct","display_name":"CosyVoice3 Instruct","family":"cosyvoice3","path":"models/CosyVoice3-GGUF/cosyvoice3-q8_0.gguf","task":"tts","mode":"offline","download_id":"cosyvoice3_q8_0","min_vram_gb":8,"input_hint_en":"**CosyVoice3 Instruct**: upload a reference voice, provide its transcript, and set `template_name=instruct` with an instruction."},{"id":"crisperwhisper","display_name":"CrisperWhisper 2.0 Large","family":"crisperwhisper","path":"models/CrisperWhisper2.0-GGUF/crisperwhisper-2-large-q8_0.gguf","task":"asr","mode":"offline","download_id":"crisperwhisper_2_large_q8_0"},{"id":"crisperwhisper-align","display_name":"CrisperWhisper 2.0 Large (alignment)","family":"crisperwhisper","path":"models/CrisperWhisper2.0-GGUF/crisperwhisper-2-large-q8_0.gguf","task":"align","mode":"offline","download_id":"crisperwhisper_2_large_q8_0","workflow":"analysis"},{"id":"deepfilternet2","display_name":"DeepFilterNet2","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/deepfilternet2/deepfilternet2.safetensors","load_options":{"utility":"deepfilternet2"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/deepfilternet2/deepfilternet2.safetensors"},{"id":"dots-tts-meanflow","display_name":"DotTTS MeanFlow (tts + clone)","family":"dots_tts","path":"models/DotTTS-MF-GGUF","task":"tts","mode":"offline","download_id":"dots_tts_mf_q8_0","min_vram_gb":8},{"id":"dots-tts-soar","display_name":"DotTTS SOAR (tts + clone)","family":"dots_tts","path":"models/DotTTS-SOAR-GGUF","task":"tts","mode":"offline","download_id":"dots_tts_soar_q8_0","min_vram_gb":8},{"id":"dramabox","display_name":"DramaBox (tts 克隆, GGUF Q8)","display_name_en":"DramaBox (tts + clone, GGUF Q8)","family":"dramabox","path":"models/DramaBox-GGUF","task":"tts","mode":"offline","download_id":"dramabox_q8_0","min_vram_gb":16,"input_hint":"**DramaBox**:英语 TTS / voice clone;上传参考音色可克隆,长文本建议写清楚说话人描述。","input_hint_en":"**DramaBox**: English TTS and voice clone. Upload a reference voice to clone; for long text, keep speaker wording explicit."},{"id":"echo-tts","display_name":"Echo-TTS (voice clone)","family":"echo_tts","path":"models/Echo-TTS-GGUF","task":"clon","mode":"offline","download_id":"echo_tts_q8_0","min_vram_gb":8,"input_hint_en":"**Echo-TTS**: English zero-shot cloning at 44.1 kHz. Upload a reference voice -- no transcript needed. Output is CC-BY-NC-SA and may not be used commercially."},{"id":"firered-stream-vad","display_name":"FireRed Stream-VAD","family":"firered_vad","path":"models/FireRedVAD-GGUF/firered-stream-vad-f32.gguf","task":"vad","mode":"offline","download_id":"firered_stream_vad_f32"},{"id":"firered-vad","display_name":"FireRed VAD","family":"firered_vad","path":"models/FireRedVAD-GGUF/firered-vad-f32.gguf","task":"vad","mode":"offline","download_id":"firered_vad_f32"},{"id":"firered-audio-asr","display_name":"FireRedAudio (ASR / audio QA)","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"asr","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio ASR**: upload audio, then use the text box as the transcription or audio-understanding instruction."},{"id":"firered-audio-acoustic-edit","display_name":"FireRedAudio Acoustic Edit","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"gen","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio Acoustic Edit**: upload source audio and use a trained acoustic instruction such as `shift the pitch by 3 steps`."},{"id":"firered-audio-tts","display_name":"FireRedAudio Clone","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"clon","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio Clone**: upload a reference voice and provide the matching reference transcript. For no-reference voice design, use the VoiceDesign entry."},{"id":"firered-audio-semantic-edit","display_name":"FireRedAudio Semantic Edit","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"gen","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio Semantic Edit**: upload source audio and describe the content edit in Model parameters."},{"id":"firered-audio-vdesign","display_name":"FireRedAudio VoiceDesign","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"vdes","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio VoiceDesign**: describe the target voice in Voice description, then enter the text to synthesize."},{"id":"fireredtts3-base","display_name":"FireRedTTS3 Base (voice clone)","family":"fireredtts3","path":"models/FireRedTTS3-Base-GGUF/fireredtts3-base-q8_0.gguf","task":"clon","mode":"offline","download_id":"fireredtts3_base_q8_0","min_vram_gb":8,"input_hint_en":"**FireRedTTS3 Base**: zero-shot voice cloning. Upload a reference voice and provide the matching reference transcript."},{"id":"fireredtts3-instruct","display_name":"FireRedTTS3 Instruct Clone","family":"fireredtts3","path":"models/FireRedTTS3-Instruct-GGUF/fireredtts3-instruct-q8_0.gguf","task":"clon","mode":"offline","download_id":"fireredtts3_instruct_q8_0","min_vram_gb":8,"input_hint_en":"**FireRedTTS3 Instruct Clone**: official Instruct `generate_tts` path. Upload a reference voice and provide the matching reference transcript. For no-reference voice design, use the VoiceDesign entry."},{"id":"fireredtts3-instruct-vdesign","display_name":"FireRedTTS3 Instruct VoiceDesign","family":"fireredtts3","path":"models/FireRedTTS3-Instruct-GGUF/fireredtts3-instruct-q8_0.gguf","task":"vdes","mode":"offline","download_id":"fireredtts3_instruct_q8_0","min_vram_gb":8,"input_hint_en":"**FireRedTTS3 VoiceDesign**: describe the target voice in Voice description, then enter the text to synthesize."},{"id":"fish-drama3","display_name":"Fish Audio Drama 3","family":"fish_drama3","path":"models/Drama-3-GGUF/drama-3-backbone-4bit-experts-Q4_K_S.gguf","task":"tts","mode":"offline","arena":false,"download_id":"fish_drama3_q4_backbone","min_vram_gb":8,"session_options":{"fish_drama3.disk_experts":"true","fish_drama3.pin_experts":"true","fish_drama3.expert_cache_size":"8","fish_drama3.cpu_expert_layers":"0","fish_drama3.codec_backend":"same","fish_drama3.context_length":"4096"},"request_options":["reference_text","multi_reference_cond","text_chunk_size","temperature","top_p","top_k","max_tokens","seed"]},{"id":"fish-drama3-small","display_name":"Fish Audio Drama3-small","family":"fish_drama3","path":"models/Drama3-small-GGUF/drama3-small-IQ3_XXS.gguf","task":"tts","mode":"offline","arena":false,"download_id":"fish_drama3_small_iq3_xxs","min_vram_gb":7,"session_options":{"fish_drama3.disk_experts":"true","fish_drama3.pin_experts":"true","fish_drama3.expert_cache_size":"8","fish_drama3.cpu_expert_layers":"0","fish_drama3.codec_backend":"same","fish_drama3.context_length":"4096"}},{"id":"fish-audio-s2-pro","display_name":"Fish Audio S2 Pro (tts 克隆/控制标记, GGUF Q8)","display_name_en":"Fish Audio S2 Pro (tts + clone/control tags, GGUF Q8)","family":"fish_audio","path":"models/Fish-Audio-S2-Pro-GGUF","task":"tts","mode":"offline","download_id":"fish_audio_s2_pro","min_vram_gb":8,"input_hint":"**Fish Audio S2 Pro**:Q8_0 GGUF 包;中英+自动语种;上传参考音色即克隆;正文里可写行内控制标记(如 (laugh))。","input_hint_en":"**Fish Audio S2 Pro**: Q8_0 GGUF package; English/Chinese plus auto language. Upload a reference voice to clone; inline control tags such as (laugh) can be written in the text."},{"id":"flashsr","display_name":"FlashSR","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/flashsr/flashsr.safetensors","load_options":{"utility":"flashsr"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/flashsr/flashsr.safetensors"},{"id":"fun-asr-nano","display_name":"Fun-ASR-Nano 2512 (asr, GGUF Q8)","display_name_en":"Fun-ASR-Nano 2512 (asr, GGUF Q8)","family":"fun_asr_nano","path":"models/Fun-ASR-Nano-2512-GGUF","task":"asr","mode":"offline","download_id":"fun_asr_nano_2512_q8_0","min_vram_gb":4,"input_hint":"**Fun-ASR-Nano**:轻量离线 ASR;支持 auto/中文/英语/日语。","input_hint_en":"**Fun-ASR-Nano**: lightweight offline ASR; supports auto, Chinese, English and Japanese."},{"id":"gigaam-multilingual","display_name":"GigaAM Multilingual","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-multilingual-ctc-f16.gguf","download_id":"gigaam_multilingual_ctc_f16"},{"id":"gigaam-multilingual-large","display_name":"GigaAM Multilingual Large","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-multilingual-large-ctc-f16.gguf","download_id":"gigaam_multilingual_large_ctc_f16"},{"id":"gigaam-v3-ctc","display_name":"GigaAM v3 CTC","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-v3-ctc-f16.gguf","download_id":"gigaam_v3_ctc_f16"},{"id":"gigaam-v3-e2e-ctc","display_name":"GigaAM v3 E2E CTC","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-v3-e2e-ctc-f16.gguf","download_id":"gigaam_v3_e2e_ctc_f16"},{"id":"gigaam-v3-e2e-rnnt","display_name":"GigaAM v3 E2E RNN-T","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-v3-e2e-rnnt-f16.gguf","download_id":"gigaam_v3_e2e_rnnt_f16"},{"id":"gigaam-v3-rnnt","display_name":"GigaAM v3 RNN-T","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-v3-rnnt-f16.gguf","download_id":"gigaam_v3_rnnt_f16"},{"id":"glm-tts","display_name":"GLM-TTS (tts 克隆, 社区)","display_name_en":"GLM-TTS (tts + clone, community)","family":"glm_tts","path":"models/GLM-TTS","task":"tts","mode":"offline","download_id":"glm_tts","min_vram_gb":8,"input_hint":"**GLM-TTS**(社区模型):中英 TTS / voice clone;上传参考音色即克隆。","input_hint_en":"**GLM-TTS** (community): Chinese/English TTS and voice clone. Upload a reference voice to clone."},{"id":"gradium-phonon-31m-en","display_name":"Gradium Phonon 31m English (tts)","family":"gradium_phonon","path":"models/phonon-31m-en","task":"tts","mode":"offline","download_id":"gradium_phonon_31m_en_q8_0","min_vram_gb":1},{"id":"granite5asr","display_name":"Granite Speech 5.0 470M TurboCTC (asr)","display_name_en":"Granite Speech 5.0 470M TurboCTC (asr)","family":"granite5asr","path":"models/Granite-Speech-5.0-470M-TurboCTC-GGUF/granite-speech-5.0-470m-turboctc-q8_0.gguf","task":"asr","mode":"offline","download_id":"granite5asr_q8_0","min_vram_gb":4,"input_hint":"**Granite Speech 5.0 TurboCTC**:IBM 470M 英语 ASR;超快 Conformer CTC 转写;支持长音频自动分段与流式模式。","input_hint_en":"**Granite Speech 5.0 TurboCTC**: IBM 470M English ASR with ultra-fast Conformer CTC architecture, supporting long-form audio segmentation and streaming mode."},{"id":"gtcrn-dns3","display_name":"GTCRN DNS3","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/gtcrn/gtcrn_dns3.safetensors","load_options":{"utility":"gtcrn_dns3"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/gtcrn/gtcrn_dns3.safetensors"},{"id":"gtcrn-streaming","display_name":"GTCRN Streaming","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/gtcrn/gtcrn_streaming.safetensors","load_options":{"utility":"gtcrn_streaming"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/gtcrn/gtcrn_streaming.safetensors"},{"id":"gtcrn-vctk","display_name":"GTCRN VCTK","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/gtcrn/gtcrn_vctk.safetensors","load_options":{"utility":"gtcrn_vctk"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/gtcrn/gtcrn_vctk.safetensors"},{"id":"heartmula","display_name":"HeartMuLa 3B (music gen)","family":"heartmula","path":"models/HeartMuLa","task":"gen","mode":"offline","download_id":"heartmula","session_options":{"heartmula.mem_saver":"true"},"min_vram_gb":24},{"id":"higgs-audio-stt","display_name":"Higgs Audio v3 STT (asr, 英语)","display_name_en":"Higgs Audio v3 STT (asr, English)","family":"higgs_audio_stt","path":"models/higgs-audio-v3-stt","task":"asr","mode":"offline","download_id":"higgs_audio_stt","min_vram_gb":8,"input_hint":"**Higgs Audio STT**:英语转写;可在文本框填指令(默认相当于 Transcribe the speech.);离线模式自动切分长音频。","input_hint_en":"**Higgs Audio STT**: English transcription. The text box accepts an instruction; offline mode automatically chunks long audio."},{"id":"higgs-audio-tts","display_name":"Higgs Audio v3 TTS 4B (tts 克隆, GGUF Q8)","display_name_en":"Higgs Audio v3 TTS 4B (tts + clone, GGUF Q8)","family":"higgs_audio_tts","path":"models/Higgs-Audio-v3-TTS-4B-GGUF","task":"tts","mode":"offline","download_id":"higgs_audio_v3_tts_4b","min_vram_gb":6,"input_hint":"**Higgs Audio v3 TTS**:Q8_0 GGUF 包(权重已量化,不用再设 weight_type);上传参考音色即声音克隆,留空用默认音色;长文本自动分段。","input_hint_en":"**Higgs Audio v3 TTS**: Q8_0 GGUF package (already quantized — no weight_type needed). Upload a reference voice to clone, or leave it empty for the default voice; long text is chunked automatically."},{"id":"htdemucs","display_name":"HTDemucs (sep 音源分离)","display_name_en":"HTDemucs (source separation)","family":"htdemucs","path":"models/htdemucs","task":"sep","mode":"offline","download_id":"htdemucs","min_vram_gb":3},{"id":"htdemucs_6stems","display_name":"HTDemucs 6-stem (sep 音源分离)","display_name_en":"HTDemucs 6-stem (source separation)","family":"htdemucs_6stems","path":"models/htdemucs_6stems","task":"sep","mode":"offline","download_id":"htdemucs_6stems","min_vram_gb":4},{"id":"hviske-asr","display_name":"Hviske v5.3 (asr, 丹麦语)","display_name_en":"Hviske v5.3 (asr, Danish)","family":"hviske_asr","path":"models/hviske-v5.3","task":"asr","mode":"offline","download_id":"hviske_asr","min_vram_gb":6,"input_hint":"**Hviske ASR**:丹麦语专用;模型侧自动分段。","input_hint_en":"**Hviske ASR**: dedicated Danish transcription with automatic model-side segmentation."},{"id":"hviske-v6","display_name":"Hviske v6 (Danish ASR)","family":"hviske_asr_v6","path":"models/Hviske-v6-GGUF/hviske-v6-bf16.gguf","task":"asr","mode":"offline","download_id":"hviske_asr_v6_bf16"},{"id":"index-echo-2b","display_name":"Index-Echo S2TT 2B","family":"index_echo","path":"models/Index-Echo-S2TT-GGUF/index-echo-s2tt-2b-orig.gguf","task":"asr","mode":"offline","download_id":"index_echo_s2tt_2b_orig"},{"id":"index-echo-9b","display_name":"Index-Echo S2TT 9B","family":"index_echo","path":"models/Index-Echo-S2TT-GGUF/index-echo-s2tt-9b-orig.gguf","task":"asr","mode":"offline","download_id":"index_echo_s2tt_9b_orig"},{"id":"index-tts2","display_name":"IndexTTS2 (tts 中英克隆+情感)","display_name_en":"IndexTTS2 (tts, zh/en clone + emotion)","family":"index_tts2","path":"models/IndexTTS-2","task":"tts","mode":"offline","download_id":"index_tts2","min_vram_gb":8},{"id":"index-tts2.5","display_name":"IndexTTS2.5 (tts 多语种克隆+情感, GGUF Q8)","display_name_en":"IndexTTS2.5 (tts, zh/en/ja/es/ar clone + emotion, GGUF Q8)","family":"index_tts2","path":"models/IndexTTS2.5-GGUF","task":"tts","mode":"offline","download_id":"index_tts2_5_q8_0","min_vram_gb":8,"input_hint":"**IndexTTS2.5**:中/英/日/西/阿零样本克隆;上传参考音色即克隆;可在『其它参数(JSON)』里传 `lang`(默认 auto:含汉字按中文,否则按英文)与情感选项。许可证为 bilibili Model Use License(非 OSI),商用前请确认条款。","input_hint_en":"**IndexTTS2.5**: zero-shot cloning in zh/en/ja/es/ar. Upload a reference voice to clone; pass `lang` (default auto: zh when the text contains Han characters, otherwise en) and emotion options through the JSON box. Weights are under the bilibili Model Use License (not OSI-approved) — check terms before commercial use."},{"id":"inflect-v2","display_name":"Inflect Micro v2 (tts 英语, 社区)","display_name_en":"Inflect Micro v2 (en tts, community)","family":"inflect_v2","path":"models/Inflect-Micro-v2","task":"tts","mode":"offline","download_id":"inflect_micro_v2","min_vram_gb":2,"input_hint":"**Inflect Micro v2**(社区模型):英语离线 TTS;Micro 是默认包,Nano 可通过模型管理器另装后手动选择路径。","input_hint_en":"**Inflect Micro v2** (community): English offline TTS. Micro is the default package; Nano can be installed separately and selected manually."},{"id":"irodori-tts-v3-500m","display_name":"Irodori-TTS 500M v3 (tts 日语)","display_name_en":"Irodori-TTS 500M v3 (ja tts)","family":"irodori_tts","path":"models/Irodori-TTS-500M-v3-GGUF","task":"tts","mode":"offline","download_id":"irodori_tts_500m_v3_q8_0","min_vram_gb":4},{"id":"irodori-tts-v3-vdesign","display_name":"Irodori-TTS 600M v3 VoiceDesign (vdes 日语)","display_name_en":"Irodori-TTS 600M v3 VoiceDesign (ja vdes)","family":"irodori_tts","path":"models/Irodori-TTS-600M-v3-VoiceDesign-GGUF","task":"vdes","mode":"offline","download_id":"irodori_tts_600m_v3_voicedesign_q8_0","min_vram_gb":4,"input_hint":"**Irodori-TTS v3 VoiceDesign**(日语):『音色描述』用日语 caption 描述音色(如「落ち着いた大人の男性。深く響く声。」),文本填要念的日语内容,无需参考音频。","input_hint_en":"**Irodori-TTS v3 VoiceDesign**: provide a Japanese voice caption and Japanese synthesis text. No reference recording is required."},{"id":"irodori-tts","display_name":"Irodori-TTS v4.1 Small (tts 日语, GGUF Q8)","display_name_en":"Irodori-TTS v4.1 Small (ja tts, GGUF Q8)","family":"irodori_tts","path":"models/Irodori-TTS-v4-Small-GGUF","task":"tts","mode":"offline","download_id":"irodori_tts_v4_small_q8_0","min_vram_gb":4,"input_hint":"**Irodori-TTS v4.1 Small**:日语 TTS;可不上传参考音色直接生成,也可上传参考音色进行克隆;可在声音设计页用日语 caption 描述音色。","input_hint_en":"**Irodori-TTS v4.1 Small**: Japanese TTS. Generate without a reference voice, clone from an uploaded reference, or use the voice-design page with a Japanese voice caption."},{"id":"irodori-tts-vdesign","display_name":"Irodori-TTS v4.1 Small VoiceDesign (vdes 日语, GGUF Q8)","display_name_en":"Irodori-TTS v4.1 Small VoiceDesign (ja vdes, GGUF Q8)","family":"irodori_tts","path":"models/Irodori-TTS-v4-Small-GGUF","task":"vdes","mode":"offline","download_id":"irodori_tts_v4_small_q8_0","min_vram_gb":4,"input_hint":"**Irodori-TTS v4.1 VoiceDesign**(日语):『音色描述』用日语 caption 描述音色(如「落ち着いた大人の男性。深く響く声。」),文本填要念的日语内容,无需参考音频。","input_hint_en":"**Irodori-TTS v4.1 VoiceDesign**: provide a Japanese voice caption and Japanese synthesis text. No reference recording is required."},{"id":"kitten-tts2","display_name":"Kitten TTS 2","family":"kitten_tts2","path":"models/kitten-tts2/kitten-tts2-q8-v2-multilingual.gguf","task":"tts","mode":"offline","download_id":"kitten_tts2_q8_v2","min_vram_gb":7,"input_hint":"Multilingual speech: choose a matching language preset or supply a reference clip and its transcript. Write numbers and abbreviations as spoken words."},{"id":"kitten-tts2-20261021","display_name":"Kitten TTS 2 (2026-10-21)","family":"kitten_tts2","path":"models/KittenTTS2-GGUF","task":"tts","mode":"offline","download_id":"kitten_tts2_20261021_q8_0","input_hint_en":"Updated multilingual checkpoint. Choose Q8 or Q4, then a voice preset or reference recording."},{"id":"kitten-tts","display_name":"KittenTTS Mini 0.8 (tts 英语, 社区)","display_name_en":"KittenTTS Mini 0.8 (en tts, community)","family":"kitten_tts","path":"models/KittenTTS-GGUF/kitten-tts-mini-0.8-orig.gguf","task":"tts","mode":"offline","download_id":"kitten_tts_mini_0_8_orig","min_vram_gb":1,"input_hint":"**KittenTTS Mini 0.8**(社区模型):轻量英语 TTS,内置八种音色,不需要上传参考音频。","input_hint_en":"**KittenTTS Mini 0.8** (community): lightweight English TTS with eight built-in voices; no reference audio is needed."},{"id":"kokoro-tts","display_name":"Kokoro 82M (tts, preset voices)","family":"kokoro_tts","path":"models/Kokoro-82M-GGUF/kokoro-82m-q8_0.gguf","task":"tts","mode":"offline","download_id":"kokoro_82m_q8_0","min_vram_gb":1,"input_hint_en":"**Kokoro 82M**: multilingual TTS with built-in preset voices. Choose a language and voice; no reference audio is needed."},{"id":"kroko-asr","display_name":"Kroko Community ASR (asr, GGUF Q8)","display_name_en":"Kroko Community ASR (asr, GGUF Q8)","family":"kroko_asr","path":"models/Kroko-ASR-GGUF","task":"asr","mode":"offline","download_id":"kroko_asr_community_q8_0","min_vram_gb":4,"input_hint":"**Kroko Community ASR**:GGUF Q8 包;离线转写,支持时间戳。","input_hint_en":"**Kroko Community ASR**: GGUF Q8 package for offline transcription with timestamps."},{"id":"kugelaudio","display_name":"KugelAudio-0-Open","family":"kugelaudio","path":"models/KugelAudio-0-Open-GGUF/kugelaudio-0-open-q8_0.gguf","task":"tts","mode":"offline","download_id":"kugelaudio_0_open_q8_0","builtin_voices":["default","clear","english_female","english_male"],"default_voice":"default"},{"id":"lfm2-audio-asr","display_name":"LFM2.5-Audio 1.5B (asr, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-GGUF","task":"asr","mode":"offline","download_id":"lfm2_audio_1_5b_q8_0","min_vram_gb":4,"input_hint_en":"**LFM2.5-Audio** (community): Liquid AI\'s English speech recognition from Liquid\'s published GGUFs. Audio longer than 30 s is split at pauses. Leave language empty."},{"id":"lfm2-audio-s2s","display_name":"LFM2.5-Audio 1.5B (s2s, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-GGUF","task":"s2s","mode":"offline","download_id":"lfm2_audio_1_5b_q8_0","min_vram_gb":4,"builtin_voices":[],"default_voice":"","input_hint_en":"**LFM2.5-Audio** (community): Liquid AI\'s English spoken chat from Liquid\'s published GGUFs. Record or choose a spoken question under Source audio and press Run: the reply streams in as speech and text, and each Run continues the conversation until New conversation. Replies use liquid-audio\'s system prompt, `Respond with interleaved text and audio.`"},{"id":"lfm2-audio-tts","display_name":"LFM2.5-Audio 1.5B (tts, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-GGUF","task":"tts","mode":"offline","download_id":"lfm2_audio_1_5b_q8_0","min_vram_gb":4,"default_text":"The next train leaves in ten minutes.","input_hint_en":"**LFM2.5-Audio** (community): Liquid AI\'s English speech from Liquid\'s published GGUFs, with four built-in voices (US or UK, male or female); no reference audio."},{"id":"lfm2-audio-jp-asr","display_name":"LFM2.5-Audio 1.5B JP (asr, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-JP-GGUF","task":"asr","mode":"offline","download_id":"lfm2_audio_1_5b_jp_q8_0","min_vram_gb":4,"input_hint_en":"**LFM2.5-Audio JP** (community): Liquid AI\'s Japanese speech recognition from Liquid\'s published GGUFs. Audio longer than 30 s is split at pauses. Leave language empty."},{"id":"lfm2-audio-jp-s2s","display_name":"LFM2.5-Audio 1.5B JP (s2s, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-JP-GGUF","task":"s2s","mode":"offline","download_id":"lfm2_audio_1_5b_jp_q8_0","min_vram_gb":4,"builtin_voices":[],"default_voice":"","input_hint_en":"**LFM2.5-Audio JP** (community): Liquid AI\'s Japanese spoken chat from Liquid\'s published GGUFs. Record or choose a spoken question under Source audio and press Run: the reply streams in as speech and text, and each Run continues the conversation until New conversation. Replies use liquid-audio\'s system prompt, `Respond with interleaved text and audio.`"},{"id":"lfm2-audio-jp-tts","display_name":"LFM2.5-Audio 1.5B JP (tts, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-JP-GGUF","task":"tts","mode":"offline","download_id":"lfm2_audio_1_5b_jp_q8_0","min_vram_gb":4,"builtin_voices":[],"default_voice":"","default_text":"今日は天気がいいので、公園まで散歩に行きました。","input_hint_en":"**LFM2.5-Audio JP** (community): Liquid AI\'s Japanese speech from Liquid\'s published GGUFs, in the checkpoint\'s one voice; no reference audio."},{"id":"lfm3-audio-asr","display_name":"LFM3-Audio 2B (asr, community)","family":"lfm3_audio","path":"models/LFM3-Audio-2B-GGUF/LFM3-Audio-2B-Q8_0.gguf","task":"asr","mode":"offline","download_id":"lfm3_audio_2b_q8_0","min_vram_gb":4,"input_hint_en":"**LFM3-Audio** (community): Liquid AI\'s LFM3-Audio-2B from Liquid\'s published GGUFs. Speech recognition in 18 languages: leave language empty or set auto to detect it. The chat parameter answers the spoken input as text instead of transcribing it."},{"id":"lfm3-audio-s2s","display_name":"LFM3-Audio 2B (s2s, community)","family":"lfm3_audio","path":"models/LFM3-Audio-2B-GGUF/LFM3-Audio-2B-Q8_0.gguf","task":"s2s","mode":"offline","download_id":"lfm3_audio_2b_q8_0","min_vram_gb":4,"builtin_voices":[],"default_voice":"","input_hint_en":"**LFM3-Audio** (community): Liquid AI\'s LFM3-Audio-2B from Liquid\'s published GGUFs. Record or choose a spoken question under Source audio and press Run: the reply streams in as speech and text, and each Run continues the conversation until New conversation. Replies use the system prompt `Respond with interleaved text and audio.`"},{"id":"lfm3-audio-tts","display_name":"LFM3-Audio 2B (tts, community)","family":"lfm3_audio","path":"models/LFM3-Audio-2B-GGUF/LFM3-Audio-2B-Q8_0.gguf","task":"tts","mode":"offline","download_id":"lfm3_audio_2b_q8_0","min_vram_gb":4,"default_text":"The next train leaves in ten minutes.","input_hint_en":"**LFM3-Audio** (community): Liquid AI\'s LFM3-Audio-2B from Liquid\'s published GGUFs. Speech in 38 built-in voices across 19 languages; no reference audio."},{"id":"liveavatar","display_name":"LiveAvatar (audio to video, 社区)","display_name_en":"LiveAvatar (audio to video, community)","family":"liveavatar","path":"models/LiveAvatar-GGUF","task":"gen","mode":"offline","download_id":"liveavatar_nvfp4_lora","default_text":"A cheerful green cyclops baker in a warm rustic bakery, smiling and speaking to the camera while holding a tray of freshly baked pies. High-quality animated film style, expressive face, natural gestures, warm cinematic lighting.","min_vram_gb":24,"input_hint":"**LiveAvatar**(社区模型):上传驱动音频和参考人物图像,再输入场景描述以生成动画视频。","input_hint_en":"**LiveAvatar** (community): upload driving audio and a reference portrait, then describe the subject and scene to generate an animated video."},{"id":"outetts","display_name":"Llama-OuteTTS 1.0 1B (tts 克隆, 社区)","display_name_en":"Llama-OuteTTS 1.0 1B (tts + clone, community)","family":"outetts","path":"models/Llama-OuteTTS-1.0-1B","task":"tts","mode":"offline","download_id":"outetts_1_0_1b","min_vram_gb":4,"input_hint":"**OuteTTS 1.0 1B**(社区模型):23 种语言,DAC 编解码;上传参考音色即克隆。","input_hint_en":"**OuteTTS 1.0 1B** (community): 23 languages, IBM DAC codec. Upload a reference voice to clone."},{"id":"magpie-tts","display_name":"MagpieTTS Multilingual 357M v2607 (tts, preset voices)","display_name_en":"MagpieTTS Multilingual 357M v2607 (tts, preset voices)","family":"magpie_tts","path":"models/MagpieTTS-Multilingual-357M-GGUF","task":"tts","mode":"offline","download_id":"magpie_tts_q8_0","min_vram_gb":4,"input_hint":"**MagpieTTS**:多语种离线 TTS;使用打包 speaker map 里的 `voice_id`,不需要上传参考音频。当前 GGUF 包不包含日语 phoneme 表,因此日语路径不可用。","input_hint_en":"**MagpieTTS**: multilingual offline TTS with packaged speaker prompts selected by `voice_id`; no reference upload is needed. The current GGUF package does not include the Japanese phoneme table, so Japanese is not available."},{"id":"marblenet-vad","display_name":"MarbleNet VAD (vad, bundled)","family":"marblenet_vad","path":"assets/framework/models/marblenet_vad","task":"vad","mode":"offline","min_vram_gb":1},{"id":"maya1","display_name":"Maya1","family":"maya1","task":"tts","mode":"offline","path":"models/Maya1-GGUF/maya1-q8_0.gguf","download_id":"maya1_q8_0","arena":false},{"id":"meanvc2","display_name":"MeanVC2 (voice conversion)","display_name_en":"MeanVC2 (voice conversion)","family":"meanvc2","path":"models/MeanVC2-GGUF/meanvc2-120ms-40ms-fp32.gguf","task":"vc","mode":"offline","download_id":"meanvc2_120ms_40ms_f32","min_vram_gb":6,"input_hint":"**MeanVC2**:上传源语音和目标音色参考;默认 120 ms / 40 ms checkpoint 使用 F32 GGUF。","input_hint_en":"**MeanVC2**: upload source speech and a target-voice reference. The default 120 ms / 40 ms checkpoint uses F32 GGUF."},{"id":"mel-band-roformer","display_name":"Mel-Band RoFormer (sep 人声分离)","display_name_en":"Mel-Band RoFormer (vocal separation)","family":"mel_band_roformer","path":"models/mel-roformer-mlx","task":"sep","mode":"offline","download_id":"mel_band_roformer","min_vram_gb":3},{"id":"micro-wake-word","display_name":"microWakeWord (Okay Nabu)","family":"micro_wake_word","path":"models/MicroWakeWord-GGUF/micro-wake-word-okay-nabu-f32.gguf","task":"wake","mode":"offline","download_id":"micro_wake_word_okay_nabu_f32"},{"id":"midashenglm-gen","display_name":"MiDashengLM-Gen (audio generation)","family":"midashenglm_gen","path":"models/MiDashengLM-Gen-GGUF/midashenglm-gen-q8_0.gguf","task":"gen","mode":"offline","download_id":"midashenglm_gen_q8_0","min_vram_gb":8,"input_hint_en":"**MiDashengLM-Gen**: text-conditioned audio generation. The duration field controls the generation budget."},{"id":"minimax-h3","display_name":"MiniMax-H3 Q4 (sound generation)","family":"minimax_h3","path":"models/MiniMax-H3-Q4-GGUF/dit.gguf","task":"gen","mode":"offline","download_id":"minimax_h3","min_vram_gb":20,"default_options":{"num_inference_steps":12,"height":32,"width":32,"num_frames":241,"guidance_scale":1,"dit_acceleration":"none","return_video":false},"input_hint_en":"MiniMax-H3 uses a joint audio/video DiT. The default Q4 DiT is the quality-first choice; the optional CUDA-only INT8 ConvRot DiT trades slightly more VRAM for higher speed. Native Studio uses 12 denoising steps, a 32x32 latent canvas, quality-first full-DiT execution, and disables video decoding for practical audio-only generation on a 24 GB GPU."},{"id":"minimax-music3","display_name":"MiniMax-Music3 (song gen)","family":"minimax_music3","path":"models/MiniMax-Music3-GGUF","task":"gen","mode":"offline","download_id":"minimax_music3_q4_0","min_vram_gb":12},{"id":"miocodec","display_name":"MioCodec (vc; codec dependency)","family":"miocodec","path":"models/MioCodec-25Hz-44.1kHz-v2","task":"vc","mode":"offline","download_id":"miocodec_25hz_44k_v2","min_vram_gb":3},{"id":"miotts","display_name":"MioTTS 1.7B (tts; needs MioCodec)","family":"miotts","path":"models/MioTTS-1.7B","task":"tts","mode":"offline","download_id":"miotts_1_7b","min_vram_gb":8},{"id":"moonshine-asr-medium","display_name":"Moonshine Streaming Medium (asr, GGUF Q8)","display_name_en":"Moonshine Streaming Medium (asr, GGUF Q8)","family":"moonshine_asr","path":"models/Moonshine-Streaming-GGUF/moonshine-streaming-medium-q8_0.gguf","task":"asr","mode":"offline","download_id":"moonshine_streaming_medium_q8_0","min_vram_gb":2,"input_hint":"**Moonshine Streaming Medium**:英语 ASR,GGUF Q8 包;支持离线与流式模式。","input_hint_en":"**Moonshine Streaming Medium**: English ASR GGUF Q8 package with offline and streaming support."},{"id":"moonshine-asr-small","display_name":"Moonshine Streaming Small (asr, GGUF Q8)","display_name_en":"Moonshine Streaming Small (asr, GGUF Q8)","family":"moonshine_asr","path":"models/Moonshine-Streaming-GGUF/moonshine-streaming-small-q8_0.gguf","task":"asr","mode":"offline","download_id":"moonshine_streaming_small_q8_0","min_vram_gb":2,"input_hint":"**Moonshine Streaming Small**:英语 ASR,GGUF Q8 包;支持离线与流式模式。","input_hint_en":"**Moonshine Streaming Small**: English ASR GGUF Q8 package with offline and streaming support."},{"id":"moonshine-asr-tiny","display_name":"Moonshine Streaming Tiny (asr, GGUF Q8)","display_name_en":"Moonshine Streaming Tiny (asr, GGUF Q8)","family":"moonshine_asr","path":"models/Moonshine-Streaming-GGUF/moonshine-streaming-tiny-q8_0.gguf","task":"asr","mode":"offline","download_id":"moonshine_streaming_tiny_q8_0","min_vram_gb":1,"input_hint":"**Moonshine Streaming Tiny**:英语 ASR,轻量 GGUF Q8 包;支持离线与流式模式。","input_hint_en":"**Moonshine Streaming Tiny**: lightweight English ASR GGUF Q8 package with offline and streaming support."},{"id":"moss-transcribe-diarize","display_name":"MOSS-Transcribe-Diarize","family":"moss_transcribe_diarize","path":"models/MOSS-Transcribe-Diarize-GGUF","task":"asr","mode":"offline","download_id":"moss_transcribe_diarize_bf16"},{"id":"moss-tts-v15","display_name":"MOSS-TTS v1.5 8B (tts 克隆, 社区)","display_name_en":"MOSS-TTS v1.5 8B (tts + clone, community)","family":"moss_tts_v15","path":"models/MOSS-TTS-v1.5-GGUF/moss_tts_v15_q8_0_codec_f16.gguf","task":"tts","mode":"offline","download_id":"moss_tts_v15_q8_0_codec_f16","min_vram_gb":18,"input_hint":"**MOSS-TTS v1.5 8B**(社区模型):中英 TTS;上传短参考音频进行声音克隆,留空则使用模型生成的音色。Q8 克隆约需 18 GB 显存。","input_hint_en":"**MOSS-TTS v1.5 8B** (community): English/Chinese TTS. Upload a short reference clip for voice cloning, or leave it empty for a model-generated voice. Q8 cloning needs about 18 GB VRAM."},{"id":"moss-tts-local","display_name":"MOSS-TTS-Local v1.5 (tts)","family":"moss_tts_local","path":"models/MOSS-TTS-Local-Transformer-v1.5","task":"tts","mode":"offline","download_id":"moss_tts_local_v1_5","min_vram_gb":8},{"id":"moss-tts-nano","display_name":"MOSS-TTS-Nano 100M (tts)","family":"moss_tts_nano","path":"models/MOSS-TTS-Nano-100M","task":"tts","mode":"offline","download_id":"moss_tts_nano_100m","min_vram_gb":2},{"id":"moss-ttsd","display_name":"MOSS-TTSD","family":"moss_ttsd","task":"tts","mode":"offline","path":"models/MOSS-TTSD-GGUF/moss_ttsd_q8_0_codec_f16.gguf","download_id":"moss_ttsd_q8_0_codec_f16","arena":false,"default_text":"[S1] Hello, how are you? [S2] I am doing well, thank you."},{"id":"moss-voicegen","display_name":"MOSS-VoiceGenerator","family":"moss_voicegen","task":"vdes","mode":"offline","path":"models/MOSS-VoiceGenerator-GGUF/moss_voicegen_bf16_codec_f16_decode.gguf","download_id":"moss_voicegen_bf16_codec_f16_decode","arena":false},{"id":"mossformer2","display_name":"MossFormer2 (two-speaker separation)","family":"mossformer2","path":"models/MossFormer2-GGUF/mossformer2-ss-16k-f32.gguf","task":"sep","mode":"offline","download_id":"mossformer2_ss_16k_f32"},{"id":"muscriptor-small","display_name":"MuScriptor Small (audio to MIDI)","family":"muscriptor","path":"models/MuScriptor-Small-GGUF","task":"midi","mode":"offline","download_id":"muscriptor_small_f32","min_vram_gb":4},{"id":"nemotron-3-diar","display_name":"Nemotron 3 Diarization","family":"nemotron_3_diar","path":"models/Nemotron-3-Diarization-GGUF/nemotron-3-diarization-bf16.gguf","task":"diar","mode":"offline","download_id":"nemotron_3_diar_bf16","min_vram_gb":2,"input_hint_en":"**Nemotron 3 Diarization**: upload speech audio to produce speaker turns for up to eight speakers. It supports offline and streaming diarization."},{"id":"nemotron-asr","display_name":"Nemotron 3.5 ASR 0.6B (asr, 100+语种)","display_name_en":"Nemotron 3.5 ASR 0.6B (asr, 100+ languages)","family":"nemotron_asr","path":"models/nemotron-3.5-asr-streaming-0.6b","task":"asr","mode":"offline","download_id":"nemotron_asr","min_vram_gb":4,"input_hint":"**Nemotron ASR**:100+ 语种,语种码为 BCP-47(如 en-US / zh-CN),留空=auto;模型自带长音频处理。","input_hint_en":"**Nemotron ASR**: supports more than 100 languages using BCP-47 codes such as en-US or zh-CN. Leave language blank for automatic detection; long audio is handled by the model."},{"id":"neutts-2e","display_name":"NeuTTS 2E (tts, preset voices)","family":"neutts","path":"models/NeuTTS-2E-GGUF","task":"tts","mode":"offline","download_id":"neutts_2e_orig","min_vram_gb":4},{"id":"niagara-asr-19m","display_name":"Niagara ASR 19M (asr)","display_name_en":"Niagara ASR 19M (asr)","family":"niagara_asr","path":"models/Niagara-ASR-GGUF/niagara-19m-batch.en-f32.gguf","task":"asr","mode":"offline","download_id":"niagara_19m_f32","min_vram_gb":1,"input_hint":"**Niagara ASR 19M**:ABR 英语离线 ASR,F32 GGUF 权重。","input_hint_en":"**Niagara ASR 19M**: ABR English offline ASR with F32 GGUF weights."},{"id":"niagara-asr-38m","display_name":"Niagara ASR 38M (asr)","display_name_en":"Niagara ASR 38M (asr)","family":"niagara_asr","path":"models/Niagara-ASR-GGUF/niagara-38m-batch.en-f32.gguf","task":"asr","mode":"offline","download_id":"niagara_38m_f32","min_vram_gb":1,"input_hint":"**Niagara ASR 38M**:ABR 英语离线 ASR,F32 GGUF 权重。","input_hint_en":"**Niagara ASR 38M**: ABR English offline ASR with F32 GGUF weights."},{"id":"omnivoice","display_name":"OmniVoice (tts)","family":"omnivoice","path":"models/OmniVoice","task":"tts","mode":"offline","download_id":"omnivoice","min_vram_gb":10},{"id":"open-wake-word","display_name":"OpenWakeWord (Alexa)","family":"open_wake_word","path":"models/OpenWakeWord-GGUF/open-wake-word-alexa-f32.gguf","task":"wake","mode":"offline","download_id":"open_wake_word_alexa_f32"},{"id":"orukeet","display_name":"Orukeet r3 (asr, Parakeet 微调)","display_name_en":"Orukeet r3 (asr, Parakeet fine-tune)","family":"parakeet_tdt","path":"models/Orukeet-GGUF/orukeet-q8_0.gguf","task":"asr","mode":"offline","download_id":"orukeet_q8_0","min_vram_gb":4,"input_hint":"**Orukeet r3**:Parakeet-TDT 0.6B v3 微调权重,同引擎/同分词器;CC BY-SA 4.0,留空=自动语种。","input_hint_en":"**Orukeet r3**: fine-tuned Parakeet-TDT 0.6B v3 weights on the same engine and tokenizer; CC BY-SA 4.0, leave language empty for auto."},{"id":"owsm-base","display_name":"OWSM v4 Base 102M","family":"owsm","path":"models/OWSM-GGUF/owsm-v4-base-102m-f32.gguf","task":"asr","mode":"offline","download_id":"owsm_v4_base_102m_f32"},{"id":"owsm-medium","display_name":"OWSM v4 Medium 1B","family":"owsm","path":"models/OWSM-GGUF/owsm-v4-medium-1b-f32.gguf","task":"asr","mode":"offline","download_id":"owsm_v4_medium_1b_f32"},{"id":"owsm-small","display_name":"OWSM v4 Small 370M","family":"owsm","path":"models/OWSM-GGUF/owsm-v4-small-370m-f32.gguf","task":"asr","mode":"offline","download_id":"owsm_v4_small_370m_f32"},{"id":"owsm-ctc","display_name":"OWSM-CTC v4 1B","family":"owsm_ctc","path":"models/OWSM-CTC-GGUF/owsm-ctc-v4-1b-f32.gguf","task":"asr","mode":"offline","download_id":"owsm_ctc_v4_1b_f32"},{"id":"parakeet-tdt","display_name":"Parakeet-TDT 0.6B v3 (asr, 流式)","display_name_en":"Parakeet-TDT 0.6B v3 (asr + streaming)","family":"parakeet_tdt","path":"models/parakeet-tdt-0.6b-v3","task":"asr","mode":"offline","download_id":"parakeet_tdt","min_vram_gb":4,"input_hint":"**Parakeet-TDT**:离线/长音频/流式 ASR;支持多种欧洲语言,留空=自动。","input_hint_en":"**Parakeet-TDT**: offline, long-form and streaming ASR for many European languages; leave language empty for auto."},{"id":"personaplex","display_name":"PersonaPlex 7B v1 (speech conversation)","display_name_en":"PersonaPlex 7B v1 (speech conversation)","family":"personaplex","path":"models/PersonaPlex-GGUF","task":"s2s","mode":"offline","download_id":"personaplex_7b_v1_q4_k","min_vram_gb":8,"request_options":["voice_id","system_prompt","temperature","text_temperature","top_k","text_top_k","do_sample","seed"],"input_hint":"**PersonaPlex**:上传用户语音,模型返回语音回复;文本框可填写 assistant system/persona prompt;`voice_id` 选择打包音色,也可上传参考音色覆盖。","input_hint_en":"**PersonaPlex**: upload user speech and receive a spoken response. The text box provides the assistant system/persona prompt; `voice_id` selects a packaged voice, and an uploaded reference voice overrides it."},{"id":"piper-tts","display_name":"Piper Lessac Medium (tts 英语, 社区)","display_name_en":"Piper Lessac Medium (en tts, community)","family":"piper_tts","path":"models/Piper-TTS-GGUF/piper-en-us-lessac-medium-orig.gguf","task":"tts","mode":"offline","download_id":"piper_lessac_medium_orig","min_vram_gb":1,"input_hint":"**Piper Lessac Medium**(社区模型):轻量英语 TTS,使用打包的 Lessac 音色,不需要上传参考音频。","input_hint_en":"**Piper Lessac Medium** (community): lightweight English TTS with the packaged Lessac voice; no reference audio is needed."},{"id":"plapre","display_name":"Plapre 3 (Danish TTS)","family":"plapre","path":"models/Plapre-3-GGUF/plapre-3-bf16.gguf","task":"tts","mode":"offline","download_id":"plapre_3_bf16","default_text":"Godmorgen. Solen skinner, og vi tager en tur til havnen."},{"id":"pocket-tts","display_name":"Pocket TTS (tts)","family":"pocket_tts","path":"models/pocket-tts","task":"tts","mode":"offline","download_id":"pocket_tts","min_vram_gb":2},{"id":"pulsevad-2.1k","display_name":"PulseVAD 2.1K","family":"pulsevad","path":"models/PulseVAD-GGUF","task":"vad","mode":"offline","download_id":"pulsevad_2_1k_f32"},{"id":"pulsevad-81k","display_name":"PulseVAD 81K","family":"pulsevad","path":"models/PulseVAD-GGUF","task":"vad","mode":"offline","download_id":"pulsevad_81k_f32"},{"id":"qwen3-forced-aligner","display_name":"Qwen3 Forced Aligner (align)","family":"qwen3_forced_aligner","path":"models/Qwen3-ForcedAligner-0.6B","task":"align","mode":"offline","download_id":"qwen3_forced_aligner_0_6b","min_vram_gb":3},{"id":"qwen3-asr","display_name":"Qwen3-ASR 0.6B (asr)","family":"qwen3_asr","path":"models/Qwen3-ASR-0.6B","task":"asr","mode":"offline","download_id":"qwen3_asr_0_6b","min_vram_gb":3},{"id":"qwen3-asr-1.7b","display_name":"Qwen3-ASR 1.7B HF (asr)","family":"qwen3_asr","path":"models/Qwen3-ASR-1.7B-hf","task":"asr","mode":"offline","download_id":"qwen3_asr_1_7b_hf","min_vram_gb":6,"input_hint":"**Qwen3-ASR 1.7B**(HF 原生权重,免转换):精度高于 0.6B;长音频自动分段转写;8G 卡显存偏紧,长音频建议先短段试跑。","input_hint_en":"**Qwen3-ASR 1.7B**: native Hugging Face weights with no conversion required. It is more accurate than the 0.6B model and automatically chunks long audio; test short clips first on an 8 GB GPU."},{"id":"qwen3-tts","display_name":"Qwen3-TTS 0.6B (tts)","family":"qwen3_tts","path":"models/Qwen3-TTS-12Hz-0.6B-Base","task":"tts","mode":"offline","download_id":"qwen3_tts_0_6b_base","min_vram_gb":5},{"id":"qwen3-tts-1.7b","display_name":"Qwen3-TTS 1.7B Base (tts)","family":"qwen3_tts","path":"models/Qwen3-TTS-12Hz-1.7B-Base","task":"tts","mode":"offline","download_id":"qwen3_tts_1_7b_base","min_vram_gb":8},{"id":"qwen3-tts-1.7b-custom","display_name":"Qwen3-TTS 1.7B CustomVoice (tts)","family":"qwen3_tts","path":"models/Qwen3-TTS-12Hz-1.7B-CustomVoice","task":"tts","mode":"offline","download_id":"qwen3_tts_1_7b_custom_voice","min_vram_gb":8},{"id":"qwen3-tts-1.7b-vdesign","display_name":"Qwen3-TTS 1.7B VoiceDesign (vdes)","family":"qwen3_tts","path":"models/Qwen3-TTS-12Hz-1.7B-VoiceDesign","task":"vdes","mode":"offline","download_id":"qwen3_tts_1_7b_voice_design","min_vram_gb":8,"input_hint":"**Qwen3-TTS VoiceDesign**:在『音色描述』里用文字描述想要的声音(如“低沉磁性的中年男声,语速偏慢”),配上要念的文本即可,无需参考音频。","input_hint_en":"**Qwen3-TTS VoiceDesign**: describe the desired voice, then enter the text to synthesize. No reference recording is required."},{"id":"reuse","display_name":"RE-USE","family":"reuse","path":"models/RE-USE-GGUF/reuse-f32.gguf","task":"s2s","mode":"offline","download_id":"reuse_f32","workflow":"enhancement"},{"id":"rnnoise","display_name":"RNNoise","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/rnnoise/rnnoise10Gb_15.safetensors","load_options":{"utility":"rnnoise"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/rnnoise/rnnoise10Gb_15.safetensors"},{"id":"rvc","display_name":"RVC (vc, GGUF F16)","display_name_en":"RVC (voice conversion, GGUF F16)","family":"rvc","path":"models/RVC-GGUF","task":"vc","mode":"offline","download_id":"rvc_f16","min_vram_gb":4,"input_hint":"**RVC**:所选 GGUF 即目标音色;上传源语音即可转换;索引/音高等选项可用 JSON 传。","input_hint_en":"**RVC**: the selected GGUF is the target voice; upload source speech to convert. Index and pitch options can be passed through the JSON box."},{"id":"sam-audio-base","display_name":"SAM Audio Base","family":"sam_audio","task":"s2s","workflow":"separation","mode":"offline","path":"models/SAM-Audio-GGUF/sam-audio-base-q8_0.gguf","download_id":"sam_audio_base_q8_0","default_text":"man speaking"},{"id":"sam-audio-large","display_name":"SAM Audio Large","family":"sam_audio","task":"s2s","workflow":"separation","mode":"offline","path":"models/SAM-Audio-GGUF/sam-audio-large-q8_0.gguf","download_id":"sam_audio_large_q8_0","default_text":"man speaking"},{"id":"sam-audio-small","display_name":"SAM Audio Small","family":"sam_audio","task":"s2s","workflow":"separation","mode":"offline","path":"models/SAM-Audio-GGUF/sam-audio-small-q8_0.gguf","download_id":"sam_audio_small_q8_0","default_text":"man speaking"},{"id":"samsone-99m","display_name":"SAMSONE 99M","family":"samsone","task":"asr","workflow":"analysis","arena":false,"mode":"offline","path":"models/Samsone-GGUF/samsone-99m-q8_0.gguf","download_id":"samsone_99m_q8_0"},{"id":"samsone-134m","display_name":"SAMSONE 134M","family":"samsone","task":"asr","workflow":"analysis","arena":false,"mode":"offline","path":"models/Samsone-GGUF/samsone-134m-q8_0.gguf","download_id":"samsone_134m_q8_0"},{"id":"samsone-356m","display_name":"SAMSONE 356M","family":"samsone","task":"asr","workflow":"analysis","arena":false,"mode":"offline","path":"models/Samsone-GGUF/samsone-356m-q8_0.gguf","download_id":"samsone_356m_q8_0"},{"id":"sanotts","display_name":"sanoTTS voice family (tts, community)","family":"sanotts","path":"models/sanoTTS-heart-nano-GGUF/heart-nano-f32.gguf","task":"tts","mode":"offline","download_id":"sanotts_heart_nano_orig","min_vram_gb":1},{"id":"seed-vc-svc","display_name":"Seed-VC (svc 歌声转换)","display_name_en":"Seed-VC (singing voice conversion)","family":"seed_vc","path":"models/SeedVC-MLX","task":"svc","mode":"offline","download_id":"seed_vc","min_vram_gb":4,"input_hint":"**Seed-VC 歌声转换 (svc)**:上传源歌声 + 目标歌手参考音色,默认 route=v1_svc(带 F0 条件)。可在『其它参数(JSON)』里调 `auto_f0_adjust` / `semi_tone_shift` / `f0_condition`。","input_hint_en":"**Seed-VC singing conversion**: upload source singing and a target-singer reference. The default route is v1_svc with F0 conditioning."},{"id":"seed-vc","display_name":"Seed-VC (vc 语音转换)","display_name_en":"Seed-VC (voice conversion)","family":"seed_vc","path":"models/SeedVC-MLX","task":"vc","mode":"offline","download_id":"seed_vc","min_vram_gb":4},{"id":"sense-asr","display_name":"SenseVoice-Small (asr, 流式, 社区)","display_name_en":"SenseVoice-Small (asr + streaming, community)","family":"sense_asr","path":"models/SenseVoice-Small-GGUF","task":"asr","mode":"offline","download_id":"sensevoice_small_q8","min_vram_gb":4,"input_hint":"**SenseVoice-Small**(社区模型):多语种 ASR,事件/情感/语言标签,ITN 可开关;离线与流式模式。","input_hint_en":"**SenseVoice-Small** (community): multilingual ASR with event/emotion/language tags, optional ITN; offline and streaming modes."},{"id":"sheetsage2","display_name":"SheetSage2 (audio to ABC)","family":"sheetsage2","path":"models/SheetSage2-GGUF/sheetsage2-orig.gguf","task":"midi","mode":"offline","download_id":"sheetsage2_orig","min_vram_gb":8,"input_hint_en":"**SheetSage2**: upload a song or instrumental recording to transcribe it into an ABC score artifact."},{"id":"sherpa-kws","display_name":"Sherpa Zipformer KWS (Chinese / English)","family":"sherpa_kws","path":"models/Sherpa-KWS-GGUF/sherpa-kws-zipformer-zh-en-3m-f32.gguf","task":"wake","mode":"offline","download_id":"sherpa_kws_zipformer_zh_en_3m_f32"},{"id":"sidon","display_name":"Sidon","family":"sidon","path":"models/Sidon-GGUF/sidon-v0.1-f32.gguf","task":"s2s","mode":"offline","download_id":"sidon_f32","workflow":"enhancement"},{"id":"silero-vad","display_name":"Silero VAD (vad, bundled)","family":"silero_vad","path":"assets/framework/models/silero_vad","task":"vad","mode":"offline","min_vram_gb":1},{"id":"smart-turn","display_name":"Smart Turn v3.2","family":"smart_turn","path":"models/Smart-Turn-v3-GGUF/smart-turn-v3.2-f32.gguf","task":"turn","mode":"offline","download_id":"smart_turn_v3_2_f32","workflow":"analysis"},{"id":"soprano-tts","display_name":"Soprano TTS (tts)","family":"soprano_tts","path":"models/Soprano-1.1-80M-GGUF","task":"tts","mode":"offline","download_id":"soprano_1_1_80m_q8_0","min_vram_gb":1},{"id":"sopro-tts","display_name":"Sopro V2 Turbo (tts + clone)","family":"sopro_tts","path":"models/sopro-v2-turbo-GGUF/sopro-v2-turbo-f16.gguf","task":"tts","mode":"offline","download_id":"sopro_v2_turbo_f16","min_vram_gb":2,"request_options":["language","temperature","top_p","top_k","num_inference_steps","max_seconds","min_seconds","ref_seconds","text_chunk_size","seed"]},{"id":"sortformer-diar","display_name":"Sortformer Diarization 4spk (diar)","family":"sortformer_diar","path":"models/diar_sortformer_4spk-v1","task":"diar","mode":"offline","download_id":"sortformer_diar_4spk_v1","min_vram_gb":2},{"id":"stable-audio-medium","display_name":"Stable Audio 3 Medium (gen)","family":"stable_audio","path":"models/stable-audio-3-medium","task":"gen","mode":"offline","download_id":"stable_audio_3_medium","session_options":{"stable_audio.mem_saver":"true"},"min_vram_gb":10},{"id":"stable-audio-small-music","display_name":"Stable Audio 3 Small Music (gen)","family":"stable_audio","path":"models/stable-audio-3-small-music","task":"gen","mode":"offline","download_id":"stable_audio_3_small_music","min_vram_gb":4},{"id":"stable-audio-small-sfx","display_name":"Stable Audio 3 Small SFX (gen)","family":"stable_audio","path":"models/stable-audio-3-small-sfx","task":"gen","mode":"offline","download_id":"stable_audio_3_small_sfx","min_vram_gb":4},{"id":"supertonic","display_name":"Supertonic 3 (tts 预置音色/多语种)","display_name_en":"Supertonic 3 (tts, preset voices)","family":"supertonic","path":"models/supertonic-3","task":"tts","mode":"offline","download_id":"supertonic_3","min_vram_gb":2},{"id":"tf-gridnet","display_name":"TF-GridNet (two-speaker separation)","family":"tf_gridnet","path":"models/TF-GridNet-GGUF/tf-gridnet-wsj0-2mix-f32.gguf","task":"sep","mode":"offline","download_id":"tf_gridnet_wsj0_2mix_f32"},{"id":"tone-color-vc","display_name":"Tone Color VC","family":"tone_color_vc","task":"vc","mode":"offline","path":"models/Tone-Color-VC-GGUF/tone-color-vc-f32.gguf","download_id":"tone_color_vc_f32"},{"id":"universr-audio","display_name":"UniverSR Audio","family":"universr","path":"models/UniverSR-GGUF","task":"s2s","mode":"offline","download_id":"universr_audio_orig"},{"id":"universr-speech","display_name":"UniverSR Speech","family":"universr","path":"models/UniverSR-GGUF","task":"s2s","mode":"offline","download_id":"universr_speech_orig"},{"id":"vevo2-s2s","display_name":"Vevo2 (s2s 语音编辑, GGUF Q8)","display_name_en":"Vevo2 (speech editing, GGUF Q8)","family":"vevo2","path":"models/Vevo2-GGUF","task":"s2s","mode":"offline","download_id":"vevo2_gguf","min_vram_gb":6,"input_hint":"**Vevo2 语音编辑 (s2s)**:上传要编辑的源语音,并在『其它参数(JSON)』里填 `{\\"target_text\\": \\"替换后的完整句子\\"}`(编辑保持原说话人音色,可不上传目标音色)。","input_hint_en":"**Vevo2 speech editing**: upload source speech and set target_text to the complete replacement sentence in Additional options. Editing preserves the original speaker and does not require a target-voice reference."},{"id":"vevo2-svc","display_name":"Vevo2 (svc 歌声转换, GGUF Q8)","display_name_en":"Vevo2 (singing voice conversion, GGUF Q8)","family":"vevo2","path":"models/Vevo2-GGUF","task":"svc","mode":"offline","download_id":"vevo2_gguf","min_vram_gb":6,"input_hint":"**Vevo2 歌声转换 (svc)**:上传源歌声 + 目标歌手参考音色,默认 route=style_preserved_svc。style_converted_svc / singing_style_conversion 等风格转换 route 需在『其它参数(JSON)』里补 `style_ref`(服务器本地 wav 路径)/ `style_ref_text` / `target_text`。","input_hint_en":"**Vevo2 singing conversion**: upload source singing and a target-singer reference. The default route is style_preserved_svc; style-conversion routes also accept style_ref, style_ref_text and target_text in Additional options."},{"id":"vevo2","display_name":"Vevo2 (vc 语音转换, GGUF Q8)","display_name_en":"Vevo2 (voice conversion, GGUF Q8)","family":"vevo2","path":"models/Vevo2-GGUF","task":"vc","mode":"offline","download_id":"vevo2_gguf","min_vram_gb":6},{"id":"vibevoice","display_name":"VibeVoice 1.5B/7B (tts, long-form/multi-speaker)","family":"vibevoice","path":"models/VibeVoice-1.5B","task":"tts","mode":"offline","download_id":"vibevoice_1_5b","min_vram_gb":7},{"id":"vibevoice-7b","display_name":"VibeVoice 7B (tts, long-form/multi-speaker)","family":"vibevoice","path":"models/VibeVoice-7B-GGUF","task":"tts","mode":"offline","download_id":"vibevoice_7b_q8_0","min_vram_gb":16},{"id":"vibevoice-asr","display_name":"VibeVoice ASR (asr, 多语种+说话人分段)","display_name_en":"VibeVoice ASR (asr, multilingual + speaker turns)","family":"vibevoice_asr","path":"models/VibeVoice-ASR","task":"asr","mode":"offline","download_id":"vibevoice_asr","min_vram_gb":20,"input_hint":"**VibeVoice ASR**:自动语种,可输出分段/说话人轮次;文本框可填上下文提示(如 The recording is a meeting conversation.)。权重 17.3G,8G 卡跑不动。","input_hint_en":"**VibeVoice ASR**: automatic language detection with segment and speaker-turn output. The text box accepts a context prompt. Its 17.3 GB weights require substantially more than 8 GB VRAM."},{"id":"vibevoice-asr-streaming-1.5b","display_name":"VibeVoice ASR Streaming 1.5B (asr, 多语种+流式)","display_name_en":"VibeVoice ASR Streaming 1.5B (asr, multilingual + streaming)","family":"vibevoice_asr_streaming","path":"models/VibeVoice-ASR-Streaming-1.5B-GGUF/vibevoice-asr-streaming-1.5b-q8_0.gguf","task":"asr","mode":"offline","download_id":"vibevoice_asr_streaming_1_5b_q8_0","min_vram_gb":6,"input_hint":"**VibeVoice ASR Streaming 1.5B**:7B 的较小版本,功能相同,显存占用更低,准确率略低;文本框可填上下文提示。","input_hint_en":"**VibeVoice ASR Streaming 1.5B**: the smaller sibling of the 7B with the same features, lower VRAM use, and somewhat lower accuracy. The text box accepts a context prompt."},{"id":"vibevoice-asr-streaming-7b","display_name":"VibeVoice ASR Streaming 7B (asr, 多语种+流式)","display_name_en":"VibeVoice ASR Streaming 7B (asr, multilingual + streaming)","family":"vibevoice_asr_streaming","path":"models/VibeVoice-ASR-Streaming-7B-GGUF/vibevoice-asr-streaming-7b-q8_0.gguf","task":"asr","mode":"offline","download_id":"vibevoice_asr_streaming_7b_q8_0","min_vram_gb":18,"input_hint":"**VibeVoice ASR Streaming 7B**:多语种 ASR,支持长音频流式解码和说话人轮次;文本框可填上下文提示。","input_hint_en":"**VibeVoice ASR Streaming 7B**: multilingual ASR with long-audio streaming decode and speaker-turn output. The text box accepts a context prompt."},{"id":"vieneu-tts","display_name":"VieNeu-TTS v3 Turbo (tts 越南语, 社区)","display_name_en":"VieNeu-TTS v3 Turbo (vi tts, community)","family":"vieneu_v3_turbo","path":"models/VieNeu-TTS-v3-Turbo","task":"tts","mode":"offline","download_id":"vieneu_v3_turbo_v3_turbo","min_vram_gb":4,"input_hint":"**VieNeu-TTS v3 Turbo**(社区模型):越南语 / 英语;上传参考音色即克隆。","input_hint_en":"**VieNeu-TTS v3 Turbo** (community): Vietnamese and English. Upload a reference voice to clone."},{"id":"voxcpm1","display_name":"VoxCPM1 0.5B (tts + clone)","family":"voxcpm1","path":"models/VoxCPM1-GGUF","task":"tts","mode":"offline","download_id":"voxcpm1_0_5b_q8_0","min_vram_gb":4},{"id":"voxcpm2","display_name":"VoxCPM2 (tts)","family":"voxcpm2","path":"models/VoxCPM2","task":"tts","mode":"offline","download_id":"voxcpm2","session_options":{"voxcpm2.weight_type":"q8_0"},"min_vram_gb":6},{"id":"voxtral-realtime","display_name":"Voxtral Mini 4B Realtime (asr, 自动语种+流式)","display_name_en":"Voxtral Mini 4B Realtime (asr, auto + streaming)","family":"voxtral_realtime","path":"models/Voxtral-Mini-4B-Realtime-2602-GGUF","task":"asr","mode":"offline","download_id":"voxtral_realtime","min_vram_gb":8},{"id":"voxtral-tts","display_name":"Voxtral 4B TTS","family":"voxtral_tts","path":"models/Voxtral-4B-TTS-2603-GGUF/voxtral-4b-tts-2603-bf16.gguf","task":"tts","mode":"offline","download_id":"voxtral_4b_tts_2603_bf16","default_text":"The next train leaves in ten minutes. Please wait by platform five."},{"id":"whistle-asr","display_name":"Whistle ASR","family":"whistle_asr","path":"models/Whistle-GGUF/whistle-f32.gguf","task":"asr","mode":"offline","download_id":"whistle_asr_f32"},{"id":"yue2","display_name":"Yue2 3B (song gen)","family":"yue2","path":"models/Yue2-3B-GGUF","task":"gen","mode":"offline","download_id":"yue2_main_q8_0","default_text":"[Verse]\\nSoft morning light is touching the window.\\nI hear the city waking below.\\n[Chorus]\\nStay with the rhythm, let it carry us home.\\nSing with the sunrise, we are never alone.","min_vram_gb":12,"input_hint_en":"**Yue2 3B**: provide lyrics and a style prompt. The default inference combo is Main Q8_0 + VAE F16; choose other main/VAE files from Model parameters before loading."},{"id":"zipenhancer","display_name":"ZipEnhancer","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/zipenhancer/zipenhancer.safetensors","load_options":{"utility":"zipenhancer"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/zipenhancer/zipenhancer.safetensors"},{"id":"zipvoice","display_name":"ZipVoice (中英零样本克隆)","display_name_en":"ZipVoice (zh/en zero-shot cloning)","family":"zipvoice","path":"models/ZipVoice-Distill-GGUF","task":"clon","mode":"offline","download_id":"zipvoice_distill_gguf","min_vram_gb":4,"input_hint":"**ZipVoice**:中/英零样本声音克隆(k2-fsa TTSZipformer flow-matching + Vocos,蒸馏版 8 步采样)。上传参考音频,并在『参考文本’里填入它的逐字转写——参考音频与参考文本必须配对;合成文本支持中文、英文及混排。权重 Apache-2.0。","input_hint_en":"**ZipVoice**: zero-shot voice cloning in zh/en (k2-fsa TTSZipformer flow matching + Vocos, distilled 8-step sampling). Upload a reference clip and put its exact transcript in the reference-text box — the clip and the transcript must match; synthesis text supports zh/en/mixed. Weights are Apache-2.0."}]')},W$={ming3_tts:[{name:"template_name",type:"text",label:"Prompt template",placeholder:"Automatic"},{name:"voice_id",type:"text",label:"IP voice name",placeholder:"US_James (IP template only)"},{name:"temperature",type:"number",label:"Temperature",default:0,minimum:0,step:.1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:2,step:.1},{name:"sigma",type:"number",label:"SDE noise scale",default:.25,minimum:0,step:.05},{name:"trim_silence",type:"bool",label:"Trim trailing silence",default:!0}],ming3_audio:[{name:"voice_id",type:"text",label:"Voice name",placeholder:"US_James"},{name:"prompt",type:"text",label:"Audio task prompt",placeholder:"Use task default"},{name:"system_prompt",type:"text",label:"System prompt"},{name:"enable_thinking",type:"bool",label:"Enable thinking",default:!1},{name:"max_audio_tokens",type:"number",label:"Maximum acoustic patches per chunk",default:1e3,minimum:1,step:1},{name:"temperature",type:"number",label:"Temperature",default:0,minimum:0,step:.1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:2,step:.1},{name:"disk_experts",scope:"session",session_option:"ming3_audio.disk_experts",type:"bool",label:"Offload expert weights",default:!1},{name:"pin_experts",scope:"session",session_option:"ming3_audio.pin_experts",type:"bool",label:"Keep experts in pinned host RAM",default:!1}],xtts_v2:[{name:"temperature",type:"slider",label:"Temperature",default:.75,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"Top-k",default:50,minimum:0,step:1},{name:"top_p",type:"slider",label:"Top-p",default:.85,minimum:0,maximum:1,step:.01},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:10,minimum:1,step:.5},{name:"max_mel_tokens",type:"number",label:"Maximum mel tokens",default:605,minimum:1,step:1}],latentsync:[{name:"num_inference_steps",type:"number",label:"Denoising steps",default:20,minimum:1,maximum:999,step:1},{name:"cache_interval",type:"number",label:"DeepCache interval",default:1,minimum:1,step:1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:1.5,minimum:0,step:.1},{name:"frames_per_chunk",type:"number",label:"Frames per chunk",default:16,minimum:1,maximum:24,step:1},{name:"fps",type:"number",label:"Frames per second",default:25,minimum:1,step:1},{name:"mem_saver",scope:"session",session_option:"latentsync.mem_saver",type:"bool",label:"Memory saver",default:!1}],ast_audioset:[{name:"top_k",type:"number",label:"Top classes",default:10,minimum:1,maximum:527,step:1}],ced:[{name:"top_k",type:"number",label:"Top classes",default:10,minimum:1,maximum:527,step:1}],fish_drama3:[{name:"text_chunk_size",type:"number",label:"Characters per chunk",default:128,minimum:1,step:1,info:"Smaller chunks reduce waveform-decoder peak memory; larger chunks reduce repeated prefills."},{name:"temperature",type:"slider",label:"Temperature",default:1,minimum:0,maximum:2,step:.05},{name:"top_p",type:"slider",label:"Top-p",default:.9,minimum:.01,maximum:1,step:.01},{name:"top_k",type:"number",label:"Top-k",default:4097,minimum:1,step:1},{name:"disk_experts",type:"bool",scope:"session",session_option:"fish_drama3.disk_experts",label:"Offload expert weights",default:!0,info:"Keep only selected expert weights on the GPU. Expert computation stays on the selected backend; changing this reloads the model."},{name:"pin_experts",type:"bool",scope:"session",session_option:"fish_drama3.pin_experts",label:"Preload experts in pinned host RAM",default:!0,info:"Requires expert offload. Faster uploads, but holds the full expert banks in pinned host RAM."},{name:"expert_cache_size",type:"number",scope:"session",session_option:"fish_drama3.expert_cache_size",label:"GPU expert slots per layer",default:8,minimum:8,maximum:256,step:1},{name:"context_length",type:"number",scope:"session",session_option:"fish_drama3.context_length",label:"Context capacity",default:4096,minimum:1,step:1,info:"Prompt and generated frames share this capacity, including all voice references and dialogue history."}],firered_vad:[{name:"threshold",type:"number",label:"Speech threshold",minimum:0,maximum:1,step:.05},{name:"min_silence_duration_ms",type:"number",label:"Minimum silence (ms)",default:200,minimum:0,step:10},{name:"speech_pad_ms",type:"number",label:"Speech padding (ms)",default:0,minimum:0,step:10}],hviske_asr_v6:[{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","silence","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s)",default:28,minimum:.001,maximum:30,step:.1},{name:"max_tokens",type:"number",label:"Maximum tokens",default:440,minimum:1,step:1},{name:"num_beams",type:"number",label:"Beam count",default:2,minimum:1,step:1},{name:"length_penalty",type:"number",label:"Length penalty",default:1,minimum:0,step:.1}],micro_wake_word:[{name:"threshold",type:"number",label:"Detection threshold",minimum:0,maximum:1,step:.05},{name:"sliding_window_size",type:"number",label:"Sliding window frames",minimum:1,step:1}],open_wake_word:[{name:"threshold",type:"number",label:"Detection threshold",default:.5,minimum:0,maximum:1,step:.05}],plapre:[{name:"temperature",type:"number",label:"Temperature",default:.8,minimum:0,step:.05},{name:"top_p",type:"number",label:"Top-p",default:.95,minimum:.01,maximum:1,step:.01},{name:"top_k",type:"number",label:"Top-k",default:50,minimum:-1,step:1},{name:"x_vector_only_mode",type:"bool",label:"Reference speaker embedding only",default:!1}],mossformer2:[{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s, 0 = whole recording)",default:2,minimum:0,step:.1},{name:"audio_chunk_overlap_sec",type:"number",label:"Chunk overlap (s)",default:.5,minimum:0,step:.1},{name:"normalize_output",type:"bool",label:"Normalize output",default:!0}],sherpa_kws:[{name:"keywords",type:"text",label:"Keyword tokens (one phrase per line)",lines:3,placeholder:"Leave empty to use embedded keywords"},{name:"max_active_paths",type:"number",label:"Active decoding paths",default:4,minimum:1,step:1},{name:"keywords_score",type:"number",label:"Keyword score",default:1,minimum:0,step:.1},{name:"keywords_threshold",type:"number",label:"Keyword threshold",default:.25,minimum:0,maximum:1,step:.05},{name:"num_trailing_blanks",type:"number",label:"Trailing blanks",default:1,minimum:0,step:1}],tf_gridnet:[{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s, 0 = whole recording)",default:2.4,minimum:0,step:.1},{name:"audio_chunk_overlap_sec",type:"number",label:"Chunk overlap (s)",default:1.6,minimum:0,step:.1},{name:"normalize_output",type:"bool",label:"Normalize output",default:!0}],voxtral_tts:[{name:"voice_id",type:"choice",label:"Voice preset",default:"casual_male",choices:["casual_female","casual_male","cheerful_female","neutral_female","neutral_male","pt_male","pt_female","nl_male","nl_female","it_male","it_female","fr_male","fr_female","es_male","es_female","de_male","de_female","ar_male","hi_male","hi_female"]},{name:"num_inference_steps",type:"number",label:"Diffusion steps",default:7,minimum:1,step:1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:1.2,minimum:0,step:.1},{name:"max_tokens",type:"number",label:"Maximum tokens",default:2048,minimum:1,step:1}],kugelaudio:[{name:"num_inference_steps",type:"number",label:"Diffusion steps",default:20,minimum:1,maximum:1e3,step:1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:3,minimum:0,step:.1},{name:"max_tokens",type:"number",label:"Maximum tokens",default:2048,minimum:1,step:1},{name:"do_sample",type:"bool",label:"Sample AR tokens",default:!1},{name:"temperature",type:"number",label:"Temperature",default:1,minimum:0,step:.1},{name:"text_chunk_size",type:"number",label:"Text chunk size",default:300,minimum:1,step:1},{name:"text_chunk_mode",type:"choice",label:"Text chunk mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],crisperwhisper:[{name:"transcription_mode",type:"choice",label:"Transcription mode",default:"verbatim",choices:["verbatim","intended","verbatimize"]},{name:"return_timestamps",type:"bool",label:"Word timestamps",default:!1},{name:"max_tokens",type:"number",label:"Maximum tokens",default:256,minimum:1,maximum:439,step:1},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s)",default:30,minimum:.02,maximum:30,step:.1},{name:"audio_chunk_overlap_sec",type:"number",label:"Chunk overlap (s)",default:4,minimum:0,step:.1}],index_echo:[{name:"target_language",type:"choice",label:"Translation language",default:"en",choices:["en","es","ja"]},{name:"max_text_tokens",type:"number",label:"Maximum text tokens",default:2e3,minimum:1,step:1},{name:"temperature",type:"number",label:"Temperature",default:0,minimum:0,maximum:2,step:.1},{name:"glossary",type:"text",label:"Glossary",default:""},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","quiet_energy","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s)",default:60,minimum:1,maximum:60,step:1}],audio_flamingo:[{name:"instruct",type:"text",label:"Question or instruction",default:"Transcribe the input speech.",lines:3},{name:"max_tokens",type:"number",label:"Maximum tokens",default:2048,minimum:1,step:1},{name:"do_sample",type:"bool",label:"Sample tokens",default:!1},{name:"temperature",type:"number",label:"Temperature",default:1,minimum:.01,step:.1},{name:"top_k",type:"number",label:"Top K",default:50,minimum:0,step:1},{name:"top_p",type:"number",label:"Top P",default:1,minimum:.01,maximum:1,step:.05},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:1,minimum:.01,step:.05}],owsm:[{name:"language",type:"text",label:"Input language (ISO 639-3)",default:"eng",placeholder:"eng, jpn, zho, auto"},{name:"target_language",type:"text",label:"Translation language (ISO 639-3)",default:""},{name:"return_timestamps",type:"bool",label:"Timestamp segments",default:!1},{name:"condition_on_previous_text",type:"bool",label:"Condition on previous text",default:!1},{name:"beam_size",type:"number",label:"Beam size",default:1,minimum:1,maximum:50002,step:1},{name:"max_tokens",type:"number",label:"Maximum tokens (0 = model limit)",default:0,minimum:0,maximum:374,step:1},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s)",default:30,minimum:.2,maximum:30,step:.1}],owsm_ctc:[{name:"language",type:"text",label:"Input language (ISO 639-3)",default:"eng",placeholder:"eng, jpn, zho, auto"},{name:"target_language",type:"text",label:"Translation language (ISO 639-3)",default:""},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","none"]}],reuse:[{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s, 0 = whole recording)",default:0,minimum:0,step:1},{name:"audio_chunk_overlap_sec",type:"number",label:"Chunk overlap (s)",default:1,minimum:0,step:.1}],smart_turn:[{name:"threshold",type:"number",label:"Completion threshold",default:.5,minimum:0,maximum:1,step:.05}],maya1:[{name:"instruct",type:"text",label:"Voice description",default:"Warm female voice with an American accent and conversational pacing.",lines:3},{name:"temperature",type:"number",label:"Temperature",default:.4,minimum:.01,step:.05},{name:"top_p",type:"number",label:"Top P",default:.9,minimum:0,maximum:1,step:.05},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:1.1,minimum:.01,step:.05}],gigaam_asr:[{name:"return_timestamps",type:"bool",label:"Word timestamps",default:!1},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","quiet_energy","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:25,minimum:.02,maximum:25,step:.1}],samsone:[{name:"instruct",type:"text",label:"Question or instruction",default:"describe the audio",lines:3},{name:"max_tokens",type:"number",label:"Maximum tokens",default:100,minimum:1,maximum:512,step:1}],sam_audio:[{name:"num_inference_steps",type:"number",label:"Inference steps",default:16,minimum:1,step:1},{name:"anchors",type:"text",label:"Time anchors (JSON)",default:"",placeholder:'[["+",0.5,2.0],["-",3.0,4.0]]'}],tone_color_vc:[{name:"temperature",type:"number",label:"Temperature",default:.3,minimum:0,step:.05}],moss_ttsd:[{name:"instruct",type:"text",label:"Delivery instruction",default:""},{name:"temperature",type:"number",label:"Temperature",default:1.5,minimum:0,step:.1},{name:"top_p",type:"number",label:"Top P",default:.6,minimum:0,maximum:1,step:.05},{name:"top_k",type:"number",label:"Top K",default:50,minimum:0,step:1},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:1.1,minimum:0,step:.05},{name:"max_frames",type:"number",label:"Maximum audio frames (0 = automatic)",default:0,minimum:0,step:1}],moss_voicegen:[{name:"temperature",type:"number",label:"Temperature",default:1.5,minimum:0,step:.1},{name:"top_p",type:"number",label:"Top P",default:.6,minimum:0,maximum:1,step:.05},{name:"top_k",type:"number",label:"Top K",default:50,minimum:0,step:1},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:1.1,minimum:0,step:.05}],canary_asr:[{name:"target_language",type:"choice",label:"Target language",default:"",choices:["","en","de","es","fr"]},{name:"pnc",type:"bool",label:"Punctuation and capitalization",default:!0},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:40,minimum:.02,maximum:40,step:.1}],cohere_asr:[{name:"pnc",type:"bool",label:"Punctuation and capitalization",default:!0},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","quiet_energy","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:35,minimum:.04,maximum:35,step:.1}],moss_transcribe_diarize:[{name:"instruct",type:"text",label:"Instruction",default:"",lines:3}],apollo:[{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:0,minimum:0,step:1},{name:"audio_chunk_overlap_sec",type:"number",label:"Audio chunk overlap (s)",default:1,minimum:0,step:.1},{name:"edge_pad_duration_sec",type:"number",label:"Edge padding (s)",default:0,minimum:0,step:.1}],universr:[{name:"input_sample_rate",type:"choice",label:"Input bandwidth (Hz)",default:"",choices:["",8e3,12e3,16e3,24e3]},{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:0,minimum:0,step:1},{name:"sampler_mode",type:"choice",label:"Sampler",default:"midpoint",choices:["euler","midpoint","rk4"]},{name:"num_inference_steps",type:"number",label:"Inference steps",default:4,minimum:1,step:1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:1.5,minimum:0,step:.1}],liveavatar:[{name:"reference_image_path",type:"text",label:"Reference image",default:""},{name:"generation_mode",type:"choice",label:"Generation mode",default:"offline",choices:["offline","liveavatar"]},{name:"height",type:"number",label:"Height",default:480,minimum:16,step:16,precision:0},{name:"width",type:"number",label:"Width",default:832,minimum:16,step:16,precision:0},{name:"num_frames",type:"number",label:"Frames per clip",default:48,minimum:1,step:1,precision:0},{name:"num_clips",type:"number",label:"Maximum clips",default:1,minimum:1,step:1,precision:0},{name:"num_inference_steps",type:"number",label:"Denoising steps",default:4,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"Guidance scale",default:0,minimum:0,maximum:10,step:.1},{name:"shift",type:"slider",label:"Scheduler shift",default:3,minimum:0,maximum:10,step:.1},{name:"negative_prompt",type:"text",label:"Negative prompt",default:""},{name:"fused_cfg",type:"bool",label:"Fused CFG",default:!0},{name:"sage_attention",type:"bool",label:"SageAttention",default:!0},{name:"memory_saver",type:"bool",label:"Memory saver",default:!0},{name:"denoiser_layerwise",type:"bool",label:"Layerwise denoiser",default:!1},{name:"denoiser_layerwise_batch",type:"number",label:"Layerwise batch",default:16,minimum:1,step:1,precision:0},{name:"vae_encoder_chunk_size",type:"number",label:"VAE encoder chunk",default:16,minimum:1,step:1,precision:0},{name:"vae_decoder_tile_size",type:"number",label:"VAE decoder tile",default:0,minimum:0,step:16,precision:0},{name:"target_cache_blocks",type:"number",label:"Target cache blocks",default:2,minimum:0,step:1,precision:0},{name:"vae_cache_f16",type:"bool",label:"F16 VAE cache",default:!0},{name:"denoiser_weight_streaming",type:"bool",scope:"session",session_option:"liveavatar.denoiser_weight_streaming",label:"Stream denoiser weights",default:!1}],pulsevad:[{name:"threshold",type:"slider",label:"Speech threshold",default:.5,minimum:0,maximum:1,step:.01},{name:"hop_size_samples",type:"number",label:"Hop size (samples)",default:1600,minimum:1,step:1},{name:"min_speech_duration_ms",type:"number",label:"Minimum speech (ms)",default:100,minimum:0,step:1},{name:"min_silence_duration_ms",type:"number",label:"Minimum silence (ms)",default:100,minimum:0,step:1}],echo_tts:[{name:"num_inference_steps",type:"slider",label:"num_inference_steps",label_en:"Sampling steps",default:40,minimum:8,maximum:40,step:1,precision:0,info:"Euler sampler steps."},{name:"text_guidance_scale",type:"slider",label:"text_guidance_scale",label_en:"Text guidance",default:3,minimum:0,maximum:10,step:.1},{name:"speaker_guidance_scale",type:"slider",label:"speaker_guidance_scale",label_en:"Speaker guidance",default:8,minimum:0,maximum:15,step:.1},{name:"truncation_factor",type:"slider",label:"truncation_factor",label_en:"Noise truncation",default:.8,minimum:0,maximum:1,step:.05},{name:"guidance_interval",type:"slider",label:"guidance_interval",label_en:"Guidance interval",default:1,minimum:1,maximum:3,step:1,precision:0,info:"Refresh the unconditional CFG lanes every Nth guided step. Higher is faster and works best with more steps; 1 is highest fidelity."},{name:"reference_duration_sec",type:"slider",label:"reference_duration_sec",label_en:"Reference trim (s)",default:15,minimum:1,maximum:60,step:1,info:"Trim the speaker reference before encoding. Around 10 s usually clones best."},{name:"seed",type:"number",label:"seed",label_en:"Seed",default:0,minimum:0,step:1,precision:0}],_comment:"WebUI TTS 高级参数控件配置:按模型 family 动态生成控件(gr.render)。每项字段:name=选项键;type=slider|number|bool|text|choice;scope=session 时写入 session_options,否则随请求 options 透传给模型;label/info=显示文案;default=默认值(应等于模型默认,已按 src/models//*.cpp 校对);minimum/maximum/step=数值范围;precision=0 表示整数;choices=下拉候选。seed/max_tokens 已有专用输入框,勿在此重复;参考文本用『参考文本』框(reference_text);文件路径/parity 类参数(如 *_noise_file)未纳入,可用『其它参数(JSON)』兜底框传。",qwen3_tts:[{name:"temperature",type:"slider",label:"temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:0,maximum:1,step:.01},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1.05,minimum:1,maximum:2,step:.01},{name:"do_sample",type:"bool",label:"do_sample",default:!0},{name:"instruct",type:"text",label:"instruct(仅 VoiceDesign/CustomVoice)",default:"",placeholder:"风格/音色指令,Base 版忽略"},{name:"speaker",type:"text",label:"speaker(仅 CustomVoice)",default:"",placeholder:"内置音色名,其它版忽略"}],vibevoice:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0,info:"扩散步数(官方默认 10),越大越慢越稳"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1.3,minimum:0,maximum:5,step:.1,info:"CFG 引导强度"},{name:"max_length_times",type:"number",label:"max_length_times",default:2,minimum:.1,step:.1,info:"最大输出长度倍数"},{name:"temperature",type:"slider",label:"temperature",default:1,minimum:.05,maximum:2,step:.05},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:.05,maximum:1,step:.01},{name:"do_sample",type:"bool",label:"do_sample",default:!1},{name:"voice_samples",type:"text",label:"voice_samples(多说话人,逗号分隔 wav,≤4)",default:"",placeholder:"D:/a.wav,D:/b.wav — 用此项时勿再上传参考音色"}],voxcpm2:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0,info:"CFM/DiT 步数"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:5,step:.1},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"tag_aware",choices:["default","tag_aware","japanese","endline"]},{name:"min_tokens",type:"number",label:"min_tokens",default:2,minimum:0,step:1,precision:0},{name:"retry_badcase",type:"bool",label:"retry_badcase(自动重试异常输出)",default:!0}],voxcpm1:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0,info:"CFM/DiT 步数"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:5,step:.1},{name:"min_tokens",type:"number",label:"min_tokens",default:2,minimum:0,step:1,precision:0},{name:"retry_badcase",type:"bool",label:"retry_badcase(自动重试异常输出)",default:!0}],miotts:[{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:0,maximum:1,step:.01},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1,minimum:1,maximum:1.5,step:.01},{name:"best_of_n",type:"number",label:"best_of_n(候选数,>1 自动开启)",default:1,minimum:1,maximum:8,step:1,precision:0}],chatterbox:[{name:"exaggeration",type:"slider",label:"exaggeration",default:.5,minimum:0,maximum:2,step:.05,info:"改动后需重新『加载模型』才生效"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:.5,minimum:0,maximum:1,step:.05,info:"改动后需重新『加载模型』才生效"},{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1.2,minimum:1,maximum:2,step:.01}],"chatterbox-vc":[{name:"s3gen_cfg_rate",type:"slider",label:"s3gen_cfg_rate(音色引导强度)",label_en:"s3gen_cfg_rate (voice guidance)",default:.7,minimum:0,maximum:2,step:.05},{name:"num_inference_steps",type:"number",label:"num_inference_steps(生成步数)",label_en:"num_inference_steps",default:10,minimum:1,maximum:100,step:1,precision:0}],kokoro_tts:[{name:"speed",type:"slider",label:"speed(语速倍率)",label_en:"speed (speech rate)",default:1,minimum:.5,maximum:2,step:.05}],kitten_tts:[{name:"speed",type:"slider",label:"speed(语速倍率)",label_en:"speed (speech rate)",default:1,minimum:.01,maximum:2,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size(长文本分段字符数)",label_en:"text_chunk_size",default:400,minimum:32,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],piper_tts:[{name:"speed",type:"slider",label:"speed(语速倍率)",label_en:"speed (speech rate)",default:1,minimum:.5,maximum:2,step:.05},{name:"variation",type:"slider",label:"variation(音色变化)",label_en:"variation",default:.667,minimum:0,maximum:1,step:.01},{name:"duration_variation",type:"slider",label:"duration_variation(时长变化)",label_en:"duration_variation",default:.8,minimum:0,maximum:2,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size(长文本分段字符数)",label_en:"text_chunk_size",default:280,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],omnivoice:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:32,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:5,step:.1},{name:"speed",type:"slider",label:"speed",default:1,minimum:.5,maximum:2,step:.05},{name:"instruct",type:"text",label:"instruct(风格/音色指令)",default:"",placeholder:"如:以轻快的语气朗读"}],sense_asr:[{name:"enable_itn",type:"bool",label:"enable_itn(逆文本规范化)",label_en:"enable_itn",default:!0},{name:"keep_tags",type:"bool",label:"keep_tags(保留语言/情绪/事件标签)",label_en:"keep_tags",default:!1},{name:"audio_chunk_mode",type:"choice",label:"audio_chunk_mode",default:"auto",choices:["auto","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec",default:30,minimum:.001,step:1}],"lfm2-audio-tts":[{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05,info_en:"Audio code sampling temperature; 0 is greedy."},{name:"top_k",type:"number",label:"top_k",default:64,minimum:0,step:1,precision:0},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:200,minimum:32,step:1,precision:0,info_en:"Codepoints of text per spoken turn."}],"lfm2-audio-jp-tts":[{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05,info_en:"Audio code sampling temperature; 0 is greedy."},{name:"top_k",type:"number",label:"top_k",default:64,minimum:0,step:1,precision:0},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:200,minimum:32,step:1,precision:0,info_en:"Codepoints of text per spoken turn."}],"lfm2-audio-s2s":[{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05,info_en:"Audio code sampling temperature; 0 is greedy."},{name:"top_k",type:"number",label:"top_k",default:4,minimum:0,step:1,precision:0},{name:"text_temperature",type:"slider",label:"text_temperature",default:0,minimum:0,maximum:2,step:.05,info_en:"Text token sampling temperature; 0 picks the most likely token, as liquid-audio does."},{name:"text_top_k",type:"number",label:"text_top_k",default:0,minimum:0,step:1,precision:0,info_en:"With text_temperature above 0, sample text tokens from the k most likely; 0 keeps all."}],"lfm2-audio-jp-s2s":[{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05,info_en:"Audio code sampling temperature; 0 is greedy."},{name:"top_k",type:"number",label:"top_k",default:4,minimum:0,step:1,precision:0},{name:"text_temperature",type:"slider",label:"text_temperature",default:0,minimum:0,maximum:2,step:.05,info_en:"Text token sampling temperature; 0 picks the most likely token, as liquid-audio does."},{name:"text_top_k",type:"number",label:"text_top_k",default:0,minimum:0,step:1,precision:0,info_en:"With text_temperature above 0, sample text tokens from the k most likely; 0 keeps all."}],lfm2_audio:[{name:"audio_chunk_mode",type:"choice",label:"audio_chunk_mode",default:"auto",choices:["auto","vad","fixed","none"],info_en:"auto keeps audio up to audio_chunk_seconds whole and splits longer audio at pauses; none transcribes it in one pass, which the model handles up to about a minute."},{name:"audio_chunk_seconds",type:"number",label:"audio_chunk_seconds",default:30,minimum:1,step:1},{name:"max_tokens",type:"number",label:"max_tokens",default:512,minimum:1,step:1,precision:0,info_en:"Transcript tokens allowed per chunk; a transcript that reaches it is cut off there."}],"lfm3-audio-tts":[{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05,info_en:"Audio code temperature; 0 picks the most likely code."},{name:"top_k",type:"number",label:"top_k",default:128,minimum:0,step:1,precision:0,info_en:"Sample audio codes from the k most likely; 0 keeps all."},{name:"repetition_penalty",type:"number",label:"repetition_penalty",default:1.1,minimum:.01,step:.05,info_en:"Audio repetition penalty over the last 4096 frames of each codebook; must be positive, 1 disables it."},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:200,minimum:1,step:1,precision:0,info_en:"Target characters per text chunk; each chunk is its own spoken turn."}],"lfm3-audio-s2s":[{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05,info_en:"Audio code temperature; 0 picks the most likely code."},{name:"top_k",type:"number",label:"top_k",default:128,minimum:0,step:1,precision:0,info_en:"Sample audio codes from the k most likely; 0 keeps all."},{name:"repetition_penalty",type:"number",label:"repetition_penalty",default:1.1,minimum:.01,step:.05,info_en:"Audio repetition penalty over the last 4096 frames of each codebook; must be positive, 1 disables it."},{name:"text_temperature",type:"slider",label:"text_temperature",default:0,minimum:0,maximum:2,step:.05,info_en:"Text token temperature; 0 is greedy."},{name:"text_top_k",type:"number",label:"text_top_k",default:0,minimum:0,step:1,precision:0,info_en:"Sample text tokens from the k most likely; 0 keeps all."},{name:"max_audio_tail_frames",type:"number",label:"max_audio_tail_frames",default:375,minimum:0,step:1,precision:0,info_en:"Most audio frames after the reply text ends before the turn is closed with an end-of-audio frame; 0 disables the cap."}],lfm3_audio:[{name:"audio_chunk_mode",type:"choice",label:"audio_chunk_mode",default:"auto",choices:["auto","vad","fixed","none"],info_en:"auto keeps audio up to audio_chunk_duration_sec whole and splits longer audio at VAD pauses; none transcribes it in one pass."},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec",minimum:1,step:1,info_en:"Longest chunk in seconds; empty uses 300 or lfm3_audio.max_pass_duration_sec, whichever is lower."},{name:"chat",type:"bool",label:"chat",default:!1,info_en:"Answer the spoken input as a text chat reply instead of transcribing it."},{name:"enable_thinking",type:"bool",label:"enable_thinking",default:!1,info_en:"Needs chat. Let the model think first; only the text after is returned."},{name:"max_tokens",type:"number",label:"max_tokens",minimum:1,step:1,precision:0,info_en:"Text tokens allowed per chunk; empty uses 512 or 8 per second of audio, whichever is more (chat 512, 2048 with thinking). A reply that reaches it is cut off there."}],confucius4_r2t2:[{name:"chunk_size_ms",type:"slider",scope:"session",session_option:"confucius4_r2t2.chunk_size_ms",label:"chunk_size_ms(流式分块毫秒)",label_en:"chunk_size_ms (streaming chunk, ms)",default:320,minimum:80,maximum:2e3,step:10,precision:0,info:"80-2000ms:越小延迟越低;320ms 在 Apple Silicon 上延迟与速度较均衡。",info_en:"80-2000 ms. Lower means lower latency; 320 ms balances latency and speed on Apple Silicon."},{name:"unfixed_chunk_num",type:"number",scope:"session",session_option:"confucius4_r2t2.unfixed_chunk_num",label:"unfixed_chunk_num(前 N 块不用稳定前缀)",label_en:"unfixed_chunk_num (leading chunks without prefix)",default:2,minimum:0,maximum:10,step:1,precision:0,info:"开头若干块不使用已识别文本作为前缀提示。",info_en:"Leading chunks that decode without a stable-prefix prompt."},{name:"unfixed_token_num",type:"number",scope:"session",session_option:"confucius4_r2t2.unfixed_token_num",label:"unfixed_token_num(回滚 token 数)",label_en:"unfixed_token_num (rollback tokens)",default:5,minimum:0,maximum:20,step:1,precision:0,info:"作为前缀前从累积文本回滚的 token 数,用于降低边界抖动。",info_en:"Tokens rolled back from the accumulated text before it is used as the prefix prompt."},{name:"rollback_punctuation",type:"bool",scope:"session",session_option:"confucius4_r2t2.rollback_punctuation",label:"rollback_punctuation(句末标点不回滚)",label_en:"rollback_punctuation (keep trailing punctuation)",default:!1,info:"输出已以标点结尾时不再回滚 token。",info_en:"Do not roll back tokens when the output already ends with punctuation."},{name:"max_new_tokens",type:"number",scope:"session",session_option:"confucius4_r2t2.max_tokens",label:"max_new_tokens(每分块解码上限)",label_en:"max_new_tokens (per-chunk decode budget)",default:32,minimum:1,maximum:256,step:1,precision:0,info:"每个流式分块的贪婪解码上限(会话级,区别于离线 max_tokens)。",info_en:"Greedy decode budget per streaming chunk (session-scoped; distinct from offline max_tokens)."}],pocket_tts:[{name:"frames_after_eos",type:"number",label:"frames_after_eos(-1=自动)",default:-1,minimum:-1,step:1,precision:0}],gradium_phonon:[{name:"frames_after_eos",type:"number",label:"frames_after_eos(-1=自动)",label_en:"frames_after_eos (-1 = auto)",default:-1,minimum:-1,step:1,precision:0},{name:"temperature",type:"slider",label:"temperature",default:.3,minimum:.05,maximum:1,step:.05}],neutts:[{name:"voice_id",type:"choice",label:"voice_id(内置音色)",label_en:"voice_id (built-in voice)",default:"emily",choices:["dave","emily","greta","jo","juliette","mateo","paul","sophie","steven"]},{name:"emotion",type:"choice",label:"emotion(情绪)",label_en:"emotion",default:"neutral",choices:["angry","disgusted","sad","happy","fearful","neutral","surprised"]}],magpie_tts:[{name:"language",type:"choice",label:"language",default:"en",choices:["en","ar-AE","ar-MSA","ar-SA","de","es","fr","hi","it","ko","pt-BR","vi","zh"]},{name:"voice_id",type:"choice",label:"voice_id(打包音色)",label_en:"voice_id (packaged voice)",default:"Aria",choices:["Aria","Jason","John","Leo","Sofia"]},{name:"temperature",type:"slider",label:"temperature",default:.6,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:80,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2.5,minimum:0,maximum:6,step:.1},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:300,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],breeze_tts:[{name:"instruction",type:"text",label:"instruction",label_en:"Instruction",default:"",placeholder:"Describe the target voice for VoiceDesign."},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:600,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1,minimum:0,maximum:10,step:.1},{name:"temperature",type:"slider",label:"temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"depth_temperature",type:"slider",label:"depth_temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:0,maximum:1,step:.01}],"breeze-tts":[{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:600,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1,minimum:0,maximum:10,step:.1},{name:"temperature",type:"slider",label:"temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"depth_temperature",type:"slider",label:"depth_temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:0,maximum:1,step:.01}],cosyvoice3:[{name:"template_name",type:"choice",label:"template_name",default:"zero_shot",choices:["zero_shot","cross_lingual","instruct"]},{name:"instruction",type:"text",label:"instruction",label_en:"Instruction",default:"",placeholder:"Used by template_name=instruct."},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:600,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"min_tokens",type:"number",label:"min_tokens",default:0,minimum:0,step:1,precision:0},{name:"top_k",type:"number",label:"top_k",default:25,minimum:1,step:1,precision:0}],inflect_v2:[{name:"speaking_rate",type:"slider",label:"speaking_rate(语速倍率)",label_en:"speaking_rate",default:1,minimum:.5,maximum:2,step:.05},{name:"variation",type:"slider",label:"variation(音色变化)",label_en:"variation",default:.667,minimum:0,maximum:1,step:.01},{name:"text_chunk_size",type:"number",label:"text_chunk_size(长文本分段字符数)",label_en:"text_chunk_size",default:280,minimum:1,step:1,precision:0}],sanotts:[{name:"speaking_rate",type:"slider",label:"speaking_rate(语速倍率)",label_en:"speaking_rate",default:1,minimum:.5,maximum:2,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size(长文本分段字符数)",label_en:"text_chunk_size",default:280,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"word_budget",choices:["word_budget"]}],dramabox:[{name:"negative_prompt",type:"text",label:"negative_prompt(负向提示)",label_en:"negative_prompt",default:"",placeholder:"留空=模型内置质量提示",placeholder_en:"Blank = built-in quality prompt"},{name:"duration_sec",type:"number",label:"duration_sec(0=自动估时)",label_en:"duration_sec (0 = auto)",default:0,minimum:0,step:.5},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:30,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2.5,minimum:0,maximum:8,step:.1},{name:"spatio_temporal_guidance_scale",type:"slider",label:"spatio_temporal_guidance_scale",default:1.5,minimum:0,maximum:5,step:.1},{name:"duration_scale",type:"slider",label:"duration_scale(自动估时倍率)",label_en:"duration_scale",default:1.1,minimum:.5,maximum:2,step:.05},{name:"reference_duration_sec",type:"number",label:"reference_duration_sec(参考音频裁剪/重复秒数)",label_en:"reference_duration_sec",default:10,minimum:0,step:.5},{name:"guidance_rescale",type:"text",label:"guidance_rescale",default:"auto",placeholder:"auto 或数值"},{name:"audio_chunk_threshold_sec",type:"number",label:"audio_chunk_threshold_sec(长文本阈值)",label_en:"audio_chunk_threshold_sec",default:45,minimum:0,step:1},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec(长文本分段目标时长)",label_en:"audio_chunk_duration_sec",default:37,minimum:0,step:1},{name:"cross_fade_duration_sec",type:"number",label:"cross_fade_duration_sec(分段交叉淡化)",label_en:"cross_fade_duration_sec",default:.05,minimum:0,step:.01}],confucius4_tts:[{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:30,minimum:1,step:1,precision:0},{name:"num_beams",type:"number",label:"num_beams",default:3,minimum:1,step:1,precision:0},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:10,minimum:0,maximum:20,step:.1},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:25,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:.7,minimum:0,maximum:2,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:80,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]},{name:"cross_fade_duration_sec",type:"number",label:"cross_fade_duration_sec",default:.3,minimum:0,step:.05},{name:"edge_fade_duration_sec",type:"number",label:"edge_fade_duration_sec",default:.1,minimum:0,step:.05},{name:"edge_pad_duration_sec",type:"number",label:"edge_pad_duration_sec",default:.1,minimum:0,step:.05}],ace_step:[{name:"lora",type:"text",scope:"session",session_option:"ace_step.lora",label:"LoRA adapter",default:"",info:"Adapter file or PEFT directory on the server; relative paths use the model root."},{name:"lora_scale",type:"number",scope:"session",session_option:"ace_step.lora_scale",label:"LoRA strength",default:1,step:.1,info:"Multiplies the adapter metadata scale; zero disables the adapter."},{name:"route",type:"choice",label:"route(操作类型)",default:"text2music",choices:["text2music","complete","lego","extract","cover","cover-nofsq","repaint","remix"],info:"cover/remix=换词翻唱,非 text2music 需上传源音频;详见 webui/README.md"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:8,minimum:1,maximum:20,step:1,precision:0,info:"扩散步数(turbo 上限 20);remix 路由不填时默认 16,其他路由默认 8"},{name:"shift",type:"slider",label:"shift(时间步弯曲)",default:3,minimum:1,maximum:5,step:.5,info:"原版 turbo 默认 3.0;1.0 会明显劣化 remix 换词咬字"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1,minimum:0,maximum:5,step:.1},{name:"audio_cover_strength",type:"slider",label:"【cover】audio_cover_strength",default:1,minimum:0,maximum:1,step:.05,info:"1=贴近原曲,0=自由发挥;建议 0.5"},{name:"cover_noise_strength",type:"slider",label:"【cover】cover_noise_strength",default:0,minimum:0,maximum:1,step:.05,info:"保旋律强度;推荐 0.1~0.25"},{name:"source_caption",type:"text",label:"【remix】source_caption",default:"",placeholder:"源歌曲描述;『🔍 分析』自动填"},{name:"source_lyrics",type:"text",lines:4,label:"【remix】source_lyrics",default:"",placeholder:"源歌曲原歌词;『🔍 分析』自动填"},{name:"flow_edit_n_min",type:"slider",label:"【remix】flow_edit_n_min",default:0,minimum:0,maximum:1,step:.05,info:"调大更保源曲、换词更弱"},{name:"flow_edit_n_max",type:"slider",label:"【remix】flow_edit_n_max",default:1,minimum:0,maximum:1,step:.05,info:"唱不出新歌词时降到 0.7~0.9"},{name:"flow_edit_n_avg",type:"number",label:"【remix】flow_edit_n_avg",default:2,minimum:1,maximum:4,step:1,precision:0,info:"每步多次采样取平均(remix 默认 2);1=最快"},{name:"bpm",type:"number",label:"【曲谱】BPM",default:0,minimum:0,step:1,precision:0,info:"0=不指定"},{name:"keyscale",type:"text",label:"【曲谱】keyscale",default:"",placeholder:"如 F major"},{name:"timesignature",type:"text",label:"【曲谱】timesignature",default:"",placeholder:"如 4"}],minimax_music3:[{name:"num_inference_steps",type:"number",label:"Flow steps per window",default:30,minimum:1,maximum:200,step:1,precision:0,info:"Flow-matching Euler steps per 200-frame denoising window."},{name:"guidance_scale",type:"slider",label:"Flow guidance scale",default:1.7,minimum:0,maximum:10,step:.1},{name:"ar_guidance_scale",type:"slider",label:"AR guidance scale",default:1.5,minimum:0,maximum:10,step:.1,info:"Classifier-free guidance of the semantic and residual code sampling."},{name:"top_k",type:"number",label:"top_k",default:50,minimum:1,maximum:1024,step:1,precision:0}],auk:[{name:"model_gguf",type:"choice",scope:"session",session_option:"auk.model_gguf",label:"model_gguf",label_en:"Generator weights",default:"auk-base-f32.gguf",choices:["auk-base-f32.gguf","auk-base-f16.gguf","auk-base-q8_0.gguf","auk-flash-f32.gguf","auk-flash-f16.gguf","auk-flash-q8_0.gguf"],info:"Selects Base or AuK-Flash automatically. Reload the model after changing this value."},{name:"qwen_gguf",type:"choice",scope:"session",session_option:"auk.qwen_gguf",label:"qwen_gguf",label_en:"Qwen conditioner",default:"qwen2.5-omni-3b-bf16.gguf",choices:["qwen2.5-omni-3b-bf16.gguf","qwen2.5-omni-3b-q8_0.gguf"],info:"Reload the model after changing this value."},{name:"vae_gguf",type:"choice",scope:"session",session_option:"auk.vae_gguf",label:"vae_gguf",label_en:"VAE weights",default:"auk-vae-f32.gguf",choices:["auk-vae-f32.gguf"],info:"Reload the model after changing this value."},{name:"attention",type:"choice",scope:"session",session_option:"auk.attention",label:"attention",label_en:"Attention",default:"auto",choices:["auto","flash","eager"],info:"Flow-model attention mode. Reload the model after changing this value."},{name:"mem_saver",type:"bool",scope:"session",session_option:"auk.mem_saver",label:"mem_saver",label_en:"Memory saver",default:!1,info:"Release Qwen and generation weights between stages. Warm requests reload weights and rebuild graphs."},{name:"instruct",type:"text",label:"instruct",label_en:"Voice description",default:"",placeholder:"A warm male voice speaking clear English.",info:"Optional for TTS only. Without it, text carries the complete upstream instruction."},{name:"duration_sec",type:"number",label:"duration_sec",label_en:"Output duration (s)",default:"",minimum:.02,step:.02,info:"Required for speech generation without reference audio; otherwise the reference duration is used."},{name:"num_inference_steps",type:"number",label:"num_inference_steps",label_en:"Sampling steps",default:32,minimum:1,step:1,precision:0,info:"Base Euler steps. AuK-Flash always uses its fixed four-step schedule."},{name:"guidance_scale",type:"slider",label:"guidance_scale",label_en:"Guidance scale",default:2,minimum:0,maximum:10,step:.1,info:"Base guidance strength. AuK-Flash disables classifier-free guidance."},{name:"sway_sampling_coef",type:"number",label:"sway_sampling_coef",label_en:"Sway coefficient",default:-1,step:.1,info:"Base sampling schedule sway. AuK-Flash uses its fixed time grid."}],yue2:[{name:"ar_lora",type:"text",scope:"session",session_option:"yue2.ar_lora",label:"ar_lora",label_en:"AR LoRA adapter",default:"",placeholder:"/path/to/ar_lora_inst_v3abc.safetensors",info:"Unfused AR adapter for score and semantic planning; relative paths resolve against the model root. Reload the model after changing this value."},{name:"ar_lora_scale",type:"number",scope:"session",session_option:"yue2.ar_lora_scale",label:"ar_lora_scale",label_en:"AR LoRA strength",default:1,step:.1,info:"Scales the AR adapter deltas; 0 disables it. Reload the model after changing this value."},{name:"nar_lora",type:"text",scope:"session",session_option:"yue2.nar_lora",label:"nar_lora",label_en:"NAR LoRA adapter",default:"",placeholder:"/path/to/nar_lora_joint_v4.safetensors",info:"Unfused NAR adapter for acoustic detail; relative paths resolve against the model root. Reload the model after changing this value."},{name:"nar_lora_scale",type:"number",scope:"session",session_option:"yue2.nar_lora_scale",label:"nar_lora_scale",label_en:"NAR LoRA strength",default:1,step:.1,info:"Scales the LoRA deltas only; any full vae2llm/llm2vae projection replacements in the adapter stay at full strength. 0 disables the entire adapter. Reload the model after changing this value."},{name:"main_gguf",type:"choice",scope:"session",session_option:"yue2.model_gguf",label:"main_gguf",label_en:"Main weights",default:"yue2-3b-q8_0.gguf",choices:["yue2-3b-q8_0.gguf","yue2-3b-q4_0.gguf","yue2-3b-bf16.gguf"],info:"Reload the model after changing this value."},{name:"vae_gguf",type:"choice",scope:"session",session_option:"yue2.vae_gguf",label:"vae_gguf",label_en:"VAE weights",default:"yue2-vae-f16.gguf",choices:["yue2-vae-f16.gguf","yue2-vae-f32.gguf"],info:"Reload the model after changing this value."},{name:"style",type:"text",label:"style",label_en:"Style",default:"English, indie pop, bright acoustic guitar, soft drums, warm lead vocal, polished demo mix",placeholder:"English, city pop, groovy bass, synth, energetic vocal"},{name:"abc",type:"text",label:"abc",label_en:"ABC score",default:"",placeholder:"Optional ABC notation. Use cot=melody or cot=full.",lines:4},{name:"abc_file",type:"text",label:"abc_file",label_en:"ABC file path",default:"",placeholder:"/path/to/score.abc"},{name:"cot",type:"choice",label:"cot",label_en:"Planning route",default:"off",choices:["off","melody","full"],info:"off = direct generation; melody/full use or generate ABC planning."},{name:"guidance_scale",type:"slider",label:"guidance_scale",label_en:"Semantic guidance",default:1.01,minimum:0,maximum:5,step:.01},{name:"num_inference_steps",type:"number",label:"num_inference_steps",label_en:"NAR steps",default:8,minimum:1,maximum:64,step:1,precision:0},{name:"abc_temperature",type:"slider",label:"abc_temperature",label_en:"ABC temperature",default:.7,minimum:0,maximum:2,step:.05},{name:"abc_top_p",type:"slider",label:"abc_top_p",label_en:"ABC top-p",default:.9,minimum:.01,maximum:1,step:.01},{name:"abc_top_k",type:"number",label:"abc_top_k",label_en:"ABC top-k",default:30,minimum:1,step:1,precision:0},{name:"abc_repetition_penalty",type:"slider",label:"abc_repetition_penalty",label_en:"ABC repetition penalty",default:1.005,minimum:.1,maximum:2,step:.001},{name:"abc_penalty_window",type:"number",label:"abc_penalty_window",label_en:"ABC penalty window",default:100,minimum:1,step:1,precision:0},{name:"abc_min_tokens",type:"number",label:"abc_min_tokens",label_en:"ABC min tokens",default:32,minimum:0,step:1,precision:0},{name:"abc_max_tokens",type:"number",label:"abc_max_tokens",label_en:"ABC max tokens",default:4096,minimum:1,step:1,precision:0},{name:"semantic_temperature",type:"slider",label:"semantic_temperature",label_en:"Semantic temperature",default:1,minimum:0,maximum:2,step:.05},{name:"semantic_top_p",type:"slider",label:"semantic_top_p",label_en:"Semantic top-p",default:.95,minimum:.01,maximum:1,step:.01},{name:"semantic_top_k",type:"number",label:"semantic_top_k",label_en:"Semantic top-k",default:100,minimum:1,step:1,precision:0},{name:"semantic_repetition_penalty",type:"slider",label:"semantic_repetition_penalty",label_en:"Semantic repetition penalty",default:1.2,minimum:.1,maximum:2,step:.01},{name:"semantic_penalty_window",type:"number",label:"semantic_penalty_window",label_en:"Semantic penalty window",default:50,minimum:1,step:1,precision:0},{name:"semantic_min_tokens",type:"number",label:"semantic_min_tokens",label_en:"Semantic min tokens",default:200,minimum:0,step:1,precision:0},{name:"semantic_max_tokens",type:"number",label:"semantic_max_tokens",label_en:"Semantic max tokens",default:9e3,minimum:1,step:1,precision:0}],minimax_h3:[{name:"num_inference_steps",type:"number",label:"Denoising steps",default:12,minimum:1,maximum:50,step:1,precision:0,info:"Twelve denoising steps provide a practical quality and performance balance."},{name:"num_frames",type:"number",label:"Output frames",default:241,minimum:5,maximum:1441,step:4,precision:0,info:"Approximately 24 frames per output second; 241 frames produces about 10 seconds of audio."},{name:"guidance_scale",type:"slider",label:"Guidance scale",default:1,minimum:0,maximum:5,step:.1},{name:"sampler",type:"choice",label:"Sampler",default:"euler",choices:["euler","res_multistep","dpmpp_2m","unipc"]},{name:"dit_acceleration",type:"choice",label:"DiT acceleration",default:"none",choices:["none","spectrum","first_block_cache"],info:"None uses the quality-first full-DiT path. Acceleration modes are experimental and may distort some outputs."},{name:"return_video",type:"bool",label:"Decode video",default:!1,info:"Disabled by default to reduce memory use and return audio only."}],stable_audio:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:8,minimum:1,step:1,precision:0,info:"RF 扩散步数"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1,minimum:0,maximum:5,step:.1},{name:"audio_input_kind",type:"choice",label:"audio_input_kind(仅上传源音频时生效)",default:"init_audio",choices:["init_audio","inpaint_audio"]},{name:"init_noise_level",type:"slider",label:"init_noise_level(init_audio 强度)",default:1,minimum:0,maximum:1,step:.05}],seed_vc:[{name:"route",type:"choice",label:"route(转换路径)",default:"",choices:["","v2_vc","v1_whisper_bigvgan_vc","v1_xlsr_hift_vc","v1_svc"],info:"留空=按任务默认"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:30,minimum:1,step:1,precision:0,info:"CFM 扩散步数"},{name:"length_adjust",type:"slider",label:"length_adjust(时长伸缩)",default:1,minimum:.5,maximum:2,step:.05},{name:"intelligibility_cfg_rate",type:"slider",label:"intelligibility_cfg_rate(仅 v2_vc)",default:.7,minimum:0,maximum:1,step:.05},{name:"similarity_cfg_rate",type:"slider",label:"similarity_cfg_rate(仅 v2_vc)",default:.7,minimum:0,maximum:1,step:.05},{name:"inference_cfg_rate",type:"slider",label:"inference_cfg_rate(仅 v1 路径)",default:.7,minimum:0,maximum:1,step:.05}],rvc:[{name:"voice_id",type:"choice",label:"voice_id(打包音色)",label_en:"voice_id",default:"default",choices:["default","manthos","chocola","fraise"]},{name:"voice_model_path",type:"text",label:"voice_model_path(自定义 RVC .pth/.pt)",label_en:"voice_model_path",default:"",placeholder:"留空=使用打包音色"},{name:"retrieval_index_path",type:"text",label:"retrieval_index_path(FAISS index)",label_en:"retrieval_index_path",default:"",placeholder:"可选 .index 路径"},{name:"retrieval_blend",type:"slider",label:"retrieval_blend",default:0,minimum:0,maximum:1,step:.05},{name:"semitone_shift",type:"number",label:"semitone_shift(半音变调)",label_en:"semitone_shift",default:0,step:1,precision:0},{name:"pitch_filter_radius",type:"number",label:"pitch_filter_radius",default:3,minimum:0,step:1,precision:0},{name:"output_sample_rate",type:"number",label:"output_sample_rate(0=跟随音色)",label_en:"output_sample_rate (0 = voice default)",default:0,minimum:0,step:1e3,precision:0},{name:"rms_mix_rate",type:"slider",label:"rms_mix_rate",default:.25,minimum:0,maximum:1,step:.05},{name:"unvoiced_protection",type:"slider",label:"unvoiced_protection",default:.33,minimum:0,maximum:1,step:.01},{name:"speaker_id",type:"number",label:"speaker_id",default:0,minimum:0,step:1,precision:0},{name:"audio_pad_duration_sec",type:"number",label:"audio_pad_duration_sec",default:1,minimum:1,step:1,precision:0},{name:"split_query_sec",type:"number",label:"split_query_sec",default:5,minimum:1,step:1,precision:0},{name:"split_center_sec",type:"number",label:"split_center_sec",default:30,minimum:1,step:1,precision:0},{name:"split_threshold_sec",type:"number",label:"split_threshold_sec",default:32,minimum:1,step:1,precision:0}],meanvc2:[{name:"seed",type:"number",label:"seed",default:42,minimum:0,step:1,precision:0}],personaplex:[{name:"voice_id",type:"choice",label:"voice_id(打包音色)",label_en:"voice_id (packaged voice)",default:"NATF2",choices:["NATF0","NATF1","NATF2","NATF3","NATM0","NATM1","NATM2","NATM3","VARF0","VARF1","VARF2","VARF3","VARF4","VARM0","VARM1","VARM2","VARM3","VARM4"]},{name:"system_prompt",type:"text",label:"system_prompt",default:"",placeholder:"Leave blank to use the text box as the system prompt."},{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"text_temperature",type:"slider",label:"text_temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:250,minimum:0,step:1,precision:0},{name:"text_top_k",type:"number",label:"text_top_k",default:250,minimum:0,step:1,precision:0},{name:"do_sample",type:"bool",label:"do_sample",default:!0}],vevo2:[{name:"route",type:"choice",label:"route(任务路线)",default:"",choices:["","style_preserved_vc","style_converted_vc","style_preserved_svc","style_converted_svc","singing_style_conversion","editing"],info:"留空=按任务默认;详见 webui/README.md"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:32,minimum:1,step:1,precision:0,info:"流匹配步数"},{name:"use_pitch_shift",type:"choice",label:"use_pitch_shift(自动音高对齐)",default:"",choices:["","true","false"],info:"留空=按路线默认"},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec(源音频分段秒数)",default:0,minimum:0,step:1,info:"0=关闭;仅用于 source-audio VC/SVC 路线"},{name:"cross_fade_duration_sec",type:"number",label:"cross_fade_duration_sec(分段重叠/淡化秒数)",default:1,minimum:0,step:.1,info:"source-audio 分段启用时作为输入重叠和输出交叉淡化时长"},{name:"temperature",type:"slider",label:"temperature(AR 路线用)",default:.7,minimum:0,maximum:2,step:.05,info:"默认取自模型 generation_config.json"},{name:"top_k",type:"number",label:"top_k(AR 路线用)",default:20,minimum:0,step:1,precision:0,info:"默认取自模型 generation_config.json"},{name:"top_p",type:"slider",label:"top_p(AR 路线用)",default:.8,minimum:0,maximum:1,step:.01}],heartmula:[{name:"tags",type:"text",label:"tags(逗号分隔)",default:"pop",placeholder:"pop,bright,drums,female vocals",info:"风格/情绪/乐器/人声标签"},{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale(MuLa CFG)",default:1.5,minimum:0,maximum:5,step:.1},{name:"num_inference_steps",type:"number",label:"num_inference_steps(codec 步数)",default:10,minimum:1,step:1,precision:0},{name:"infinite_mode",type:"bool",label:"infinite_mode(长输出分段生成)",default:!1},{name:"codec_guidance_scale",type:"slider",label:"codec_guidance_scale",default:1.25,minimum:0,maximum:5,step:.05}],index_tts2:[{name:"lang",type:"choice",label:"lang(语种提示, 仅 IndexTTS2.5 模型)",label_en:"lang (language hint, IndexTTS2.5 models only)",default:"auto",choices:["auto","zh","en","ja","es","ar"],info:"仅对 IndexTTS2.5(多语种)模型生效:auto 含汉字按中文,否则按英文;日/西/阿建议显式选择",info_en:"Only applies to IndexTTS2.5 (multilingual) models: auto picks zh when the text contains Han characters, otherwise en; set ja/es/ar explicitly"},{name:"emotion_text",type:"text",label:"emotion_text(情绪参考文本)",label_en:"emotion_text (emotion reference text)",default:"",placeholder:"例:你吓死我了!你是鬼吗?",placeholder_en:"e.g. You scared me to death!",info:"填写后自动开启情感条件(use_emotion_text)",info_en:"Setting this enables emotion conditioning."},{name:"emotion_alpha",type:"slider",label:"emotion_alpha(情感强度)",label_en:"emotion_alpha",default:1,minimum:0,maximum:1,step:.05},{name:"use_emotion_text",type:"bool",label:"use_emotion_text(从朗读文本推断情感)",label_en:"use_emotion_text (infer from text)",default:!1},{name:"use_random_emotion",type:"bool",label:"use_random_emotion(随机情感)",label_en:"use_random_emotion",default:!1},{name:"interval_silence_ms",type:"number",label:"interval_silence_ms(分段间静音)",label_en:"interval_silence_ms",default:200,minimum:0,step:50,precision:0},{name:"duration_factor",type:"slider",label:"duration_factor(语速/时长倍率,>1 更慢,<1 更快)",label_en:"duration_factor (duration multiplier; >1 slower, <1 faster)",default:1,minimum:.5,maximum:2,step:.05,info:"对齐官方 IndexTTS2.5 的 duration_factor:缩放输出时长,不改变音色/内容",info_en:"Matches official IndexTTS2.5 duration_factor: scales output duration without changing timbre or content"}],zipvoice:[{name:"guidance_scale",type:"slider",label:"guidance_scale(引导强度,0=关闭)",label_en:"guidance_scale (0 disables CFG)",default:3,minimum:0,maximum:10,step:.5},{name:"num_inference_steps",type:"number",label:"num_inference_steps(Euler 步数)",label_en:"num_inference_steps",default:8,minimum:1,maximum:64,step:1,precision:0},{name:"t_shift",type:"slider",label:"t_shift(时间步偏移,越小越偏低 SNR)",label_en:"t_shift (timestep shift)",default:.5,minimum:.05,maximum:1,step:.05},{name:"speed",type:"slider",label:"speed(语速倍率)",label_en:"speed (duration multiplier)",default:1,minimum:.5,maximum:2,step:.05},{name:"lang",type:"text",label:"lang(英文段 espeak 语言)",label_en:"lang (espeak voice for English runs)",default:"en-us",placeholder:"en-us"}],irodori_tts:[{name:"num_inference_steps",type:"number",label:"num_inference_steps(RF 扩散步数)",label_en:"num_inference_steps",default:40,minimum:1,step:1,precision:0},{name:"duration_sec",type:"number",label:"duration_sec(0=模型自动预测时长)",label_en:"duration_sec (0 = auto)",default:0,minimum:0,step:.5},{name:"duration_scale",type:"slider",label:"duration_scale(语速倒数,越大越慢)",label_en:"duration_scale",default:1,minimum:.5,maximum:2,step:.05}],moss_tts_local:[{name:"do_sample",type:"bool",label:"do_sample",default:!0},{name:"temperature",type:"slider",label:"temperature",default:1.7,minimum:0,maximum:2.5,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:25,minimum:0,step:1,precision:0},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1,minimum:1,maximum:2,step:.01}],moss_tts_v15:[{name:"instruct",type:"text",label:"instruct(音色描述)",label_en:"instruct (voice description)",default:"",placeholder:"参考音频比文字描述更可靠",placeholder_en:"A reference recording is more reliable than a description."},{name:"language",type:"choice",label:"language(语言)",label_en:"language",default:"",choices:["","English","Chinese"]},{name:"temperature",type:"slider",label:"temperature",default:1.5,minimum:0,maximum:3,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.6,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1.1,minimum:1,maximum:2,step:.01}],moss_tts_nano:[{name:"do_sample",type:"bool",label:"do_sample",default:!0},{name:"temperature",type:"slider",label:"temperature",default:1.7,minimum:0,maximum:2.5,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:25,minimum:0,step:1,precision:0},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1,minimum:1,maximum:2,step:.01}],audiosr:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:50,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:3.5,minimum:0,maximum:10,step:.1},{name:"ddim_eta",type:"slider",label:"ddim_eta",default:1,minimum:0,maximum:1,step:.05},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec",default:15,minimum:1,step:1},{name:"audio_chunk_overlap_sec",type:"number",label:"audio_chunk_overlap_sec",default:2,minimum:0,step:.5}],controlfoley:[{name:"duration_sec",type:"number",label:"duration_sec",default:8,minimum:.1,step:.5},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:25,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:4.5,minimum:0,maximum:10,step:.1},{name:"negative_prompt",type:"text",label:"negative_prompt",default:"",placeholder:"optional negative prompt"},{name:"mask_away_clip",type:"bool",label:"mask_away_clip",default:!1}],midashenglm_gen:[{name:"duration_sec",type:"number",label:"duration_sec",default:20,minimum:.1,step:.5},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"stop_threshold",type:"slider",label:"stop_threshold",default:.5,minimum:0,maximum:1,step:.05},{name:"min_stop_step",type:"number",label:"min_stop_step",default:5,minimum:0,step:1,precision:0}],"fireredtts3-base":[{name:"language",type:"choice",label:"language",default:"Chinese",choices:["Chinese","English","Cantonese","Japanese","Korean","Spanish","French","Russian","Arabic","Turkish","Indonesian","Portuguese","Italian","Dutch","Vietnamese","German","Ukrainian","Thai","Polish","Romanian","Greek","Czech","Finnish","Hindi","ZH_Anhui","ZH_Fujian","ZH_Gansu","ZH_Guizhou","ZH_Hebei","ZH_Henan","ZH_Hubei","ZH_Hunan","ZH_Jiangxi","ZH_Liaoning","ZH_Minnan","ZH_Ningxia","ZH_Shaanxi","ZH_Shandong","ZH_Shanghai","ZH_Shanxi","ZH_Sichuan","ZH_Tianjin","ZH_Wenzhou","ZH_Wu","ZH_Yunnan"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"stop_threshold",type:"slider",label:"stop_threshold",default:.5,minimum:0,maximum:1,step:.05}],"fireredtts3-instruct":[{name:"template_name",type:"choice",label:"template_name",default:"instruct_tts",choices:["instruct_tts"]},{name:"language",type:"choice",label:"language",default:"Chinese",choices:["Chinese","English","Cantonese","Japanese","Korean","Spanish","French","Russian","Arabic","Turkish","Indonesian","Portuguese","Italian","Dutch","Vietnamese","German","Ukrainian","Thai","Polish","Romanian","Greek","Czech","Finnish","Hindi","ZH_Anhui","ZH_Fujian","ZH_Gansu","ZH_Guizhou","ZH_Hebei","ZH_Henan","ZH_Hubei","ZH_Hunan","ZH_Jiangxi","ZH_Liaoning","ZH_Minnan","ZH_Ningxia","ZH_Shaanxi","ZH_Shandong","ZH_Shanghai","ZH_Shanxi","ZH_Tianjin","ZH_Wenzhou","ZH_Wu","ZH_Yunnan"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"stop_threshold",type:"slider",label:"stop_threshold",default:.5,minimum:0,maximum:1,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:600,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],"fireredtts3-instruct-vdesign":[{name:"template_name",type:"choice",label:"template_name",default:"voice_design",choices:["voice_design"]},{name:"language",type:"choice",label:"language",default:"Chinese",choices:["Chinese","English","Cantonese","Japanese","Korean","Spanish","French","Russian","Arabic","Turkish","Indonesian","Portuguese","Italian","Dutch","Vietnamese","German","Ukrainian","Thai","Polish","Romanian","Greek","Czech","Finnish","Hindi","ZH_Anhui","ZH_Fujian","ZH_Gansu","ZH_Guizhou","ZH_Hebei","ZH_Henan","ZH_Hubei","ZH_Hunan","ZH_Jiangxi","ZH_Liaoning","ZH_Minnan","ZH_Ningxia","ZH_Shaanxi","ZH_Shandong","ZH_Shanghai","ZH_Shanxi","ZH_Tianjin","ZH_Wenzhou","ZH_Wu","ZH_Yunnan"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"stop_threshold",type:"slider",label:"stop_threshold",default:.5,minimum:0,maximum:1,step:.05}],"firered-audio-tts":[{name:"template_name",type:"choice",label:"template_name",default:"tts_clone",choices:["tts_clone"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"max_new_audio_steps",type:"number",label:"max_new_audio_steps",default:750,minimum:1,step:1,precision:0},{name:"top_k",type:"number",label:"top_k",default:20,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"temperature",type:"slider",label:"temperature",default:.7,minimum:0,maximum:2,step:.05}],"firered-audio-vdesign":[{name:"template_name",type:"choice",label:"template_name",default:"voice_design",choices:["voice_design"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"max_new_audio_steps",type:"number",label:"max_new_audio_steps",default:750,minimum:1,step:1,precision:0}],"firered-audio-semantic-edit":[{name:"template_name",type:"choice",label:"template_name",default:"semantic_edit",choices:["semantic_edit"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"instruction",type:"text",label:"instruction",default:"",placeholder:"delete '比普通的茶叶要'"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"max_new_audio_steps",type:"number",label:"max_new_audio_steps",default:750,minimum:1,step:1,precision:0},{name:"max_new_text_tokens",type:"number",label:"max_new_text_tokens",default:512,minimum:1,step:1,precision:0}],"firered-audio-acoustic-edit":[{name:"template_name",type:"choice",label:"template_name",default:"acoustic_edit",choices:["acoustic_edit"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"instruction",type:"text",label:"instruction",default:"shift the pitch by 3 steps",placeholder:"shift the pitch by 3 steps"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"max_new_audio_steps",type:"number",label:"max_new_audio_steps",default:750,minimum:1,step:1,precision:0}],"firered-audio-asr":[{name:"template_name",type:"choice",label:"template_name",default:"asr",choices:["asr","understand"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"enable_thinking",type:"bool",label:"enable_thinking",default:!1},{name:"max_new_tokens",type:"number",label:"max_new_tokens",default:512,minimum:1,step:1,precision:0},{name:"top_k",type:"number",label:"top_k",default:20,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"temperature",type:"slider",label:"temperature",default:.7,minimum:0,maximum:2,step:.05}],sopro_tts:[{name:"language",type:"choice",label:"language",label_en:"Language tag",default:"",choices:["","en","pt","fr","de"],info:"Optional <|lang_xx|> tag; helps pronunciation on ambiguous text."},{name:"temperature",type:"slider",label:"temperature",label_en:"Temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"top_p",type:"slider",label:"top_p",label_en:"Top-p",default:.9,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",label_en:"Top-k",default:25,minimum:0,step:1,precision:0,info:"0 disables top-k truncation."},{name:"num_inference_steps",type:"number",label:"num_inference_steps",label_en:"Acoustic steps",default:2,minimum:1,maximum:32,step:1,precision:0,info:"Rectified-flow Euler steps for the acoustic head."},{name:"max_seconds",type:"number",label:"max_seconds",label_en:"Max seconds per segment",default:30,minimum:1,maximum:60,step:.5,precision:1},{name:"min_seconds",type:"number",label:"min_seconds",label_en:"Min seconds per segment",default:.4,minimum:0,maximum:10,step:.1,precision:1,info:"Must not exceed max_seconds."},{name:"ref_seconds",type:"number",label:"ref_seconds",label_en:"Reference seconds",default:10,minimum:1,maximum:30,step:.5,precision:1,info:"Reference window used for cloning."},{name:"text_chunk_size",type:"number",label:"text_chunk_size",label_en:"Segment size",default:300,minimum:20,maximum:2e3,step:10,precision:0,info:"Max codepoints per synthesis segment."}],supertonic:[{name:"voice",type:"choice",label:"voice(预置音色:M 男声 / F 女声)",label_en:"voice (M = male, F = female presets)",default:"M1",choices:["M1","M2","M3","M4","M5","F1","F2","F3","F4","F5"]},{name:"speaking_rate",type:"slider",label:"speaking_rate(语速倍率)",label_en:"speaking_rate",default:1.05,minimum:.5,maximum:2,step:.05},{name:"num_inference_steps",type:"number",label:"num_inference_steps(流匹配步数)",label_en:"num_inference_steps",default:8,minimum:1,step:1,precision:0}],audio8_tts:[{name:"temperature",type:"slider",label:"temperature",default:.7,minimum:0,maximum:2,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.9,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"max_tokens",type:"number",label:"max_tokens",default:1024,minimum:1,step:1,precision:0}]};function Md(a,t){const i=t?.load_target??void 0;return{...a,path:i?.model_path??a.path,load_target:i,load_target_error:t?.load_target_error??void 0,load_options:i?.load_options,session_options:i?.session_options}}function Tm(a){if(!a.load_target)throw new Error(a.load_target_error||`Package load target is not ready: ${a.label}`);return a.load_target}const $m=Object.assign({"../../../../model_specs/ace_step.json":kT,"../../../../model_specs/apollo.json":xT,"../../../../model_specs/ast_audioset.json":ST,"../../../../model_specs/audio8_asr.json":TT,"../../../../model_specs/audio8_tts.json":$T,"../../../../model_specs/audio_flamingo.json":qT,"../../../../model_specs/audiosr.json":CT,"../../../../model_specs/auk.json":AT,"../../../../model_specs/breeze_tts.json":GT,"../../../../model_specs/bs_roformer.json":FT,"../../../../model_specs/builtin_audio_utils.json":MT,"../../../../model_specs/canary_asr.json":zT,"../../../../model_specs/ced.json":ET,"../../../../model_specs/chatterbox.json":UT,"../../../../model_specs/chatterbox_turbo.json":RT,"../../../../model_specs/citrinet_asr.json":BT,"../../../../model_specs/cohere_asr.json":PT,"../../../../model_specs/confucius4_r2t2.json":jT,"../../../../model_specs/confucius4_tts.json":NT,"../../../../model_specs/controlfoley.json":OT,"../../../../model_specs/cosyvoice3.json":IT,"../../../../model_specs/crisperwhisper.json":DT,"../../../../model_specs/dots_tts.json":LT,"../../../../model_specs/dramabox.json":VT,"../../../../model_specs/echo_tts.json":HT,"../../../../model_specs/f5_tts.json":WT,"../../../../model_specs/firered_audio.json":QT,"../../../../model_specs/firered_vad.json":KT,"../../../../model_specs/fireredtts3.json":YT,"../../../../model_specs/fish_audio.json":JT,"../../../../model_specs/fish_drama3.json":XT,"../../../../model_specs/fun_asr_nano.json":ZT,"../../../../model_specs/gigaam_asr.json":e8,"../../../../model_specs/glm_tts.json":t8,"../../../../model_specs/gradium_phonon.json":a8,"../../../../model_specs/granite5asr.json":i8,"../../../../model_specs/heartmula.json":n8,"../../../../model_specs/higgs_audio_stt.json":s8,"../../../../model_specs/higgs_audio_tts.json":r8,"../../../../model_specs/htdemucs.json":o8,"../../../../model_specs/htdemucs_6stems.json":l8,"../../../../model_specs/hviske_asr.json":c8,"../../../../model_specs/hviske_asr_v6.json":d8,"../../../../model_specs/index_echo.json":u8,"../../../../model_specs/index_tts2.json":f8,"../../../../model_specs/inflect_v2.json":p8,"../../../../model_specs/irodori_tts.json":m8,"../../../../model_specs/kitten_tts.json":g8,"../../../../model_specs/kitten_tts2.json":h8,"../../../../model_specs/kokoro_tts.json":_8,"../../../../model_specs/kroko_asr.json":v8,"../../../../model_specs/kugelaudio.json":b8,"../../../../model_specs/latentsync.json":y8,"../../../../model_specs/lfm2_audio.json":w8,"../../../../model_specs/lfm3_audio.json":k8,"../../../../model_specs/liveavatar.json":x8,"../../../../model_specs/magenta_realtime_2.json":S8,"../../../../model_specs/magpie_tts.json":T8,"../../../../model_specs/maya1.json":$8,"../../../../model_specs/meanvc2.json":q8,"../../../../model_specs/mel_band_roformer.json":C8,"../../../../model_specs/micro_wake_word.json":A8,"../../../../model_specs/midashenglm_gen.json":G8,"../../../../model_specs/ming3_audio.json":F8,"../../../../model_specs/ming3_tts.json":M8,"../../../../model_specs/minimax_h3.json":z8,"../../../../model_specs/minimax_music3.json":E8,"../../../../model_specs/miocodec.json":U8,"../../../../model_specs/miotts.json":R8,"../../../../model_specs/mira_tts.json":B8,"../../../../model_specs/mms_forced_aligner.json":P8,"../../../../model_specs/moonshine_asr.json":j8,"../../../../model_specs/moss_transcribe_diarize.json":N8,"../../../../model_specs/moss_tts_local.json":O8,"../../../../model_specs/moss_tts_nano.json":I8,"../../../../model_specs/moss_tts_v15.json":D8,"../../../../model_specs/moss_ttsd.json":L8,"../../../../model_specs/moss_voicegen.json":V8,"../../../../model_specs/mossformer2.json":H8,"../../../../model_specs/muscriptor.json":W8,"../../../../model_specs/nemotron_3_diar.json":Q8,"../../../../model_specs/nemotron_asr.json":K8,"../../../../model_specs/neutts.json":Y8,"../../../../model_specs/niagara_asr.json":J8,"../../../../model_specs/omnivoice.json":X8,"../../../../model_specs/open_wake_word.json":Z8,"../../../../model_specs/outetts.json":e$,"../../../../model_specs/owsm.json":t$,"../../../../model_specs/owsm_ctc.json":a$,"../../../../model_specs/parakeet_tdt.json":i$,"../../../../model_specs/personaplex.json":n$,"../../../../model_specs/piper_tts.json":s$,"../../../../model_specs/plapre.json":r$,"../../../../model_specs/pocket_tts.json":o$,"../../../../model_specs/pulsevad.json":l$,"../../../../model_specs/qwen3_asr.json":c$,"../../../../model_specs/qwen3_forced_aligner.json":d$,"../../../../model_specs/qwen3_tts.json":u$,"../../../../model_specs/reuse.json":f$,"../../../../model_specs/rvc.json":p$,"../../../../model_specs/sam_audio.json":m$,"../../../../model_specs/samsone.json":g$,"../../../../model_specs/sanotts.json":h$,"../../../../model_specs/seed_vc.json":_$,"../../../../model_specs/sense_asr.json":v$,"../../../../model_specs/sheetsage2.json":b$,"../../../../model_specs/sherpa_kws.json":y$,"../../../../model_specs/sidon.json":w$,"../../../../model_specs/smart_turn.json":k$,"../../../../model_specs/soprano_tts.json":x$,"../../../../model_specs/sopro_tts.json":S$,"../../../../model_specs/sortformer_diar.json":T$,"../../../../model_specs/sortformer_diar_v2.json":$$,"../../../../model_specs/stable_audio.json":q$,"../../../../model_specs/supertonic.json":C$,"../../../../model_specs/tf_gridnet.json":A$,"../../../../model_specs/tone_color_vc.json":G$,"../../../../model_specs/universr.json":F$,"../../../../model_specs/vevo2.json":M$,"../../../../model_specs/vibeasr.json":z$,"../../../../model_specs/vibevoice.json":E$,"../../../../model_specs/vibevoice_asr.json":U$,"../../../../model_specs/vibevoice_asr_streaming.json":R$,"../../../../model_specs/vieneu_v3_turbo.json":B$,"../../../../model_specs/voxcpm1.json":P$,"../../../../model_specs/voxcpm2.json":j$,"../../../../model_specs/voxtral_realtime.json":N$,"../../../../model_specs/voxtral_tts.json":O$,"../../../../model_specs/whistle_asr.json":I$,"../../../../model_specs/xtts_v2.json":D$,"../../../../model_specs/yue2.json":L$,"../../../../model_specs/zipvoice.json":V$}),zd=Object.values($m).flatMap(a=>(a.packages||[]).map(t=>({...t,family:a.family}))),fb=new Map(Object.values($m).map(a=>[a.family,a])),Yo=Object.fromEntries(Object.values($m).map(a=>[a.family,[...new Set(Object.values(a.capabilities||{}).flat())]])),Q$=new Set(["ming3_tts","ming3_audio","latentsync","xtts_v2","canary_asr","cohere_asr","moss_transcribe_diarize","confucius4_r2t2","audiosr","controlfoley","breeze_tts","cosyvoice3","firered_audio","fireredtts3","irodori_tts","kitten_tts2","kokoro_tts","meanvc2","midashenglm_gen","sanotts","mossformer2","plapre","voxtral_tts"]),K$=/[\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff]/u;function Ed(a,t){for(const i of[a,t])if(i&&!K$.test(i))return i;return""}function Y$(a,t,i){return Ed(t,i)||a.replace(/_/g," ")}const pb=a=>a.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^models\//i,"").replace(/\/$/,"").toLowerCase(),mb=a=>a.toLowerCase().replace(/[^a-z0-9]/g,"");function qm(a){return a.find(t=>t.default)||a.find(t=>t.precision==="q8_0")||a[0]}function gb(a){const t=zd.filter(l=>l.family===a.family);if(!t.length)return[];if(a.family==="ace_step"||a.family==="minimax_music3"||!a.download_id)return t;const i=t.find(l=>l.id===a.download_id);if(i){const l=i.id.replace(/_(?:q8_0|q8|f16|fp16|bf16|safetensors|orig)$/i,""),c=t.filter(d=>d.id.replace(/_(?:q8_0|q8|f16|fp16|bf16|safetensors|orig)$/i,"")===l);return c.length?c:[i]}const n=mb(a.download_id),s=t.filter(l=>{const c=mb(l.id);return c.startsWith(n)||n.startsWith(c)});if(s.length)return s;const r=pb(a.path),o=t.filter(l=>pb(l.target_directory)===r);if(o.length){const l=new Set(o.map(d=>d.id.replace(/_(?:q8_0|q8|f16|fp16|bf16|safetensors|orig)$/i,""))),c=t.filter(d=>l.has(d.id.replace(/_(?:q8_0|q8|f16|fp16|bf16|safetensors|orig)$/i,"")));return c.length?c:o}return t}function J$(a){const t=zd.filter(s=>s.family===a.family&&s.format==="gguf");if(!t.length)return[];if(a.family==="sanotts"||a.family==="xtts_v2"||!a.download_id)return t;const i=t.find(s=>s.id===a.download_id);if(!i)return gb(a);const n=t.filter(s=>s.target_directory===i.target_directory);return n.length?n:[i]}function hb(a,t){return t&&a.id===t?0:a.default?1:["q4_k","q4_0","q8_0","q8"].includes(a.precision)?2:["f16","fp16","bf16"].includes(a.precision)?3:a.precision==="f32"?4:a.precision==="orig"?5:6}function Ud(a){if(a.family==="sanotts"){if(a.id.includes("_heart_nano_"))return"Heart Nano";if(a.id.includes("_heart_"))return"Heart";if(a.id.includes("_amy_"))return"Amy";if(a.id.includes("_hfc_"))return"HFC";if(a.id.includes("_kristin_"))return"Kristin";if(a.id.includes("_vi_"))return"Vietnamese";if(a.id.includes("_id_"))return"Indonesian";if(a.id.includes("_cs_"))return"Czech";if(a.id.includes("_de_"))return"German";if(a.id.includes("_es_"))return"Spanish";if(a.id.includes("_fr_"))return"French";if(a.id.includes("_it_"))return"Italian";if(a.id.includes("_pt_"))return"Portuguese (Brazil)";if(a.id.includes("_ro_"))return"Romanian";if(a.id.includes("_ru_"))return"Russian";if(a.id.includes("_tr_"))return"Turkish";if(a.id.includes("_ne_"))return"Nepali";if(a.id.includes("_hi_"))return"Hindi"}if(a.family==="ace_step"){const t=a.precision==="bf16"?"BF16":["q8_0","q8"].includes(a.precision)?"Q8":a.precision.toUpperCase();return a.id.includes("_xl_turbo_")?`GGUF Turbo XL ${t}`:a.id.includes("_xl_sft_")?`GGUF Turbo XL SFT ${t}`:a.id.includes("_turbo_")?`GGUF Turbo ${t}`:`GGUF ${t}`}return a.family==="irodori_tts"&&a.id.includes("_anime_")?"Anime Q8":a.family==="yue2"?a.id==="yue2_main_q8_0"?"Main Q8_0":a.id==="yue2_main_q4_0"?"Main Q4_0":a.id==="yue2_main_bf16"?"Main BF16":a.id==="yue2_vae_f16"?"VAE F16":a.id==="yue2_vae_f32"?"VAE F32":a.display_name||"Yue2 component":a.family==="auk"?a.id==="auk_base_f32"?"Base F32":a.id==="auk_base_f16"?"Base F16":a.id==="auk_base_q8_0"?"Base Q8_0":a.id==="auk_flash_f32"?"AuK-Flash F32":a.id==="auk_flash_f16"?"AuK-Flash F16":a.id==="auk_flash_q8_0"?"AuK-Flash Q8_0":a.id==="auk_qwen_bf16"?"Qwen BF16":a.id==="auk_qwen_q8_0"?"Qwen Q8_0":a.id==="auk_vae_f32"?"VAE F32":a.display_name||"AuK component":a.format==="safetensors"?"Safetensors":a.id.includes("int8_dit")?"GGUF Q4 ConvRot":a.precision==="q4_k"||a.precision==="q4_0"?"GGUF Q4":a.precision==="q8_0"||a.precision==="q8"?"GGUF Q8":a.precision==="bf16"?"GGUF BF16":a.precision==="f16"||a.precision==="fp16"?"GGUF FP16":`GGUF ${a.precision.toUpperCase()}`}function Rd(a){const t=a.format==="gguf"?a.files?.find(s=>s.toLowerCase().endsWith(".gguf")):void 0;if(!t)return`models/${a.target_directory}`;let i=t.replace(/\\/g,"/");const n=(a.strip_prefix||"").replace(/\\/g,"/").replace(/\/$/,"");return n&&i.startsWith(`${n}/`)&&(i=i.slice(n.length+1)),`models/${a.target_directory}/${i}`.replace(/\/+/g,"/")}function X$(a){if(["maya1","gigaam_asr","samsone","sam_audio","tone_color_vc","moss_ttsd","moss_voicegen","kugelaudio","crisperwhisper","index_echo","audio_flamingo","owsm","owsm_ctc","reuse","sidon","smart_turn"].includes(a.family)){const o=(a.download_id||"").replace(/_(?:q8_0|q4_k|bf16|f16|f32|orig)(?:_codec_f16(?:_decode)?)?$/,"");return zd.filter(l=>l.family===a.family&&l.format==="gguf"&&l.id.replace(/_(?:q8_0|q4_k|bf16|f16|f32|orig)(?:_codec_f16(?:_decode)?)?$/,"")===o).sort((l,c)=>+(c.id===a.download_id)-+(l.id===a.download_id)).map(l=>({id:l.id,label:Ud(l),path:Rd(l),format:l.format,precision:l.precision}))}const t=Q$.has(a.family);if(a.family==="auk"){const o=zd.filter(c=>c.family===a.family&&c.format==="gguf"),l=new Map([["auk_base_f32",0],["auk_base_f16",1],["auk_base_q8_0",2],["auk_flash_f32",3],["auk_flash_f16",4],["auk_flash_q8_0",5],["auk_qwen_bf16",6],["auk_qwen_q8_0",7],["auk_vae_f32",8]]);return o.sort((c,d)=>(l.get(c.id)??99)-(l.get(d.id)??99)).map(c=>({id:c.id,label:Ud(c),path:Rd(c),format:c.format,precision:c.precision}))}if(a.family==="yue2"){const o=zd.filter(c=>c.family===a.family&&c.format==="gguf"),l=new Map([["yue2_main_q8_0",0],["yue2_main_q4_0",1],["yue2_main_bf16",2],["yue2_vae_f16",3],["yue2_vae_f32",4]]);return o.filter(c=>c.format==="gguf").sort((c,d)=>(l.get(c.id)??99)-(l.get(d.id)??99)).map(c=>({id:c.id,label:Ud(c),path:Rd(c),format:c.format,precision:c.precision}))}const i=t?J$(a):gb(a);if(a.family==="ace_step"||a.family==="minimax_music3"||t)return i.filter(o=>o.format==="gguf").sort((o,l)=>t?hb(o,a.download_id)-hb(l,a.download_id):+(l.default===!0)-+(o.default===!0)).map(o=>({id:o.id,label:Ud(o),path:Rd(o),format:o.format,precision:o.precision}));const n=qm(i.filter(o=>o.format==="gguf"&&["q8_0","q8"].includes(o.precision))),s=qm(i.filter(o=>o.format==="gguf"&&["f16","fp16"].includes(o.precision)))||qm(i.filter(o=>o.format==="gguf"&&o.precision==="bf16")),r=!n&&!s?i.filter(o=>o.format==="gguf"):[];return[n,s,...r].filter(o=>o!==void 0).map(o=>({id:o.id,label:Ud(o),path:Rd(o),format:o.format,precision:o.precision}))}const Li=H$.models.flatMap(a=>{const t=X$(a);if(a.download_id&&t.length===0)return[];const i=t[0],n=fb.get(a.family);return[{...a,display_name:Ed(a.display_name_en,a.display_name)||a.id,input_hint:Ed(a.input_hint_en,a.input_hint),download_id:i?.id||a.download_id,install_packages:t,path:i?.path||a.path,request_options:n?.options?.request?.map(s=>s.name),required_request_options:n?.options?.request?.filter(s=>s.required===!0).map(s=>s.name),builtin_voices:a.builtin_voices??n?.ui?.builtin_voices,default_voice:a.default_voice??n?.ui?.default_voice}]}),Jo=Object.fromEntries(Object.entries(W$).filter(a=>Array.isArray(a[1])).map(([a,t])=>[a,t.map(i=>({...i,label:Y$(i.name,i.label_en,i.label),placeholder:Ed(i.placeholder_en,i.placeholder),info:Ed(i.info_en,i.info)}))]));for(const[a,t]of fb){const i=t.options?.session?.find(r=>r.name==="lora"),n=t.options?.session?.find(r=>r.name==="lora_scale"),s=Jo[a]||[];!i||!n||s.some(r=>r.session_option===`${a}.lora`)||(Jo[a]=[...s,{name:"lora",group:"lora",scope:"session",session_option:`${a}.lora`,type:"text",label:"Adapter path",default:"",info:i.description},{name:"lora_scale",group:"lora",scope:"session",session_option:`${a}.lora_scale`,type:"number",label:"Strength",default:n.default??"",minimum:n.min,maximum:n.max,step:.1,info:n.description}])}const Z$={tts:"Text to speech",clon:"Voice cloning",asr:"Transcription",gen:"Music & sound",midi:"Audio to MIDI",vc:"Voice conversion",svc:"Singing conversion",s2s:"Speech editing",sep:"Source separation",vad:"Voice activity",diar:"Speaker diarization",align:"Forced alignment",vdes:"Voice design",spk:"Speaker analysis",turn:"Turn detection",wake:"Wake-word detection",cls:"Audio classification"},eq={code:"it",name:"Italiano",translations:JSON.parse(`{"request.minimaxFrames":"{frames} fotogrammi di output allineati","param.minimax_h3.num_inference_steps.label":"Passaggi di denoising","param.minimax_h3.num_inference_steps.info":"Dodici passaggi di denoising offrono un buon equilibrio tra qualità e prestazioni.","param.minimax_h3.num_frames.label":"Fotogrammi di output","param.minimax_h3.num_frames.info":"Calcolati dalla durata a circa 24 fotogrammi per secondo di output. Modificando i fotogrammi si aggiorna anche la durata.","param.minimax_h3.guidance_scale.label":"Scala di guida","param.minimax_h3.sampler.label":"Campionatore","param.minimax_h3.dit_acceleration.label":"Accelerazione DiT","param.minimax_h3.dit_acceleration.info":"None usa il percorso DiT completo orientato alla qualità. Le modalità accelerate sono sperimentali e possono distorcere alcuni risultati.","param.minimax_h3.return_video.label":"Decodifica video","param.minimax_h3.return_video.info":"Disattivata per impostazione predefinita per ridurre l'uso della memoria e restituire solo l'audio.","model.minimax_h3.hint":"MiniMax-H3 usa un DiT audio/video congiunto. GGUF Q4 privilegia la qualità; GGUF Q4 ConvRot, solo CUDA, usa un po' più VRAM per una maggiore velocità. Il percorso DiT completo predefinito privilegia la qualità audio e disattiva la decodifica video.","status.modelReady":"{model} è caricato e pronto.","status.runningTask":"Esecuzione di {task}...","status.completeIn":"Completato in {seconds} s.","status.packageAvailable":"{model} userà {format}. Ora è disponibile nello Studio.","app.nativeStudio":"Studio nativo","nav.studio":"Studio","nav.arena":"Arena","nav.models":"Modelli","nav.runtime":"Runtime","language.label":"Lingua dell'interfaccia","theme.label":"Tema","theme.system":"Sistema","theme.dark":"Scuro","theme.light":"Chiaro","workflow.tts":"Sintesi vocale","workflow.asr":"ASR / Trascrizione","workflow.music":"Generazione di musica e video","workflow.vc":"Conversione vocale","workflow.sep":"Separazione sorgenti","workflow.analysis":"Analisi audio","workflow.design":"Progettazione voce","studio.eyebrow":"INTELLIGENZA AUDIO LOCALE","studio.title":"Studio audio","studio.subtitle.tts":"Genera una voce naturale dal testo, con voci predefinite e clonazione quando supportate.","studio.subtitle.asr":"Trascrivi l'audio parlato in testo, con controlli di lingua e timestamp quando supportati.","studio.subtitle.music":"Crea musica e suoni da una descrizione, un testo o un audio di riferimento.","studio.subtitle.vc":"Trasforma una registrazione in un'altra voce conservando l'interpretazione parlata o cantata.","studio.subtitle.sep":"Separa una registrazione in voce, strumenti o altre tracce audio disponibili.","studio.subtitle.analysis":"Analizza attività vocale, parlanti, tempi e allineamento dell'audio.","studio.subtitle.design":"Crea o perfeziona una voce da una descrizione e dai controlli di riferimento supportati.","studio.model":"Modello","studio.noModel":"Nessun modello selezionato","studio.resident":"Caricato","studio.notInstalled":"Non installato","studio.available":"Disponibile","studio.chooseInstalled":"Scegli un modello installato","studio.notDownloaded":"non scaricato","studio.pathFound":"Percorso trovato","studio.pathMissing":"Percorso mancante","studio.pathUnknown":"Percorso non verificato","studio.load":"Carica modello","studio.unload":"Scarica modello","studio.working":"Elaborazione…","studio.bundledLoaded":"Integrato · caricato","request.label":"RICHIESTA","request.title":"Input e controlli","request.prompt":"Prompt","request.text":"Testo","request.splitLongText":"Dividi e unisci testi lunghi","request.charactersPerChunk":"Caratteri per segmento","request.language":"Lingua","request.autoLanguage":"vuoto = automatico","request.seed":"Seed","request.randomSeed":"-1 = casuale","request.maxTokens":"Token massimi","request.sourceAudio":"Audio sorgente","request.recordMicrophone":"Registra microfono","voice.quickStart":"Voci demo per avvio rapido","voice.useReference":"Usa un file audio di riferimento qui sotto","voice.reference":"Voce di riferimento","voice.required":"obbligatoria","voice.optional":"opzionale","voice.referenceText":"Testo di riferimento","voice.transcript":"Trascrizione di riferimento","voice.saved":"Voci salvate","voice.browserOnly":"solo in questo browser","voice.chooseSaved":"Scegli una voce salvata...","voice.libraryName":"Nome nella libreria","voice.save":"Salva voce","common.delete":"Elimina","common.cancel":"Annulla","common.close":"Chiudi","common.refresh":"Aggiorna","common.browse":"Sfoglia","common.apply":"Applica","options.modelParameters":"Parametri del modello","options.additional":"Opzioni aggiuntive","run.run":"Esegui","run.cancel":"Annulla","run.working":"Elaborazione…","result.title":"Risultato","result.label":"RISULTATO","result.saveWav":"Salva WAV","result.empty":"L'audio generato e i risultati strutturati appariranno qui.","models.eyebrow":"LIBRERIA MODELLI","models.title":"Pacchetti locali","models.subtitle":"Scarica e gestisci i pacchetti dei modelli senza uscire dall'interfaccia.","models.folder":"Cartella modelli","models.useDefault":"Usa predefinita","models.showTypes":"Mostra tipi di modello","models.stopDownload":"Interrompi download","models.cleanPartial":"Elimina download parziale","runtime.title":"Registro sessione","runtime.status":"Stato","runtime.backend":"Backend","runtime.registered":"Registrati","runtime.resident":"Caricati","runtime.noEvents":"Nessun evento.","folder.title":"Scegli una cartella","folder.up":"Livello superiore","folder.select":"Seleziona questa cartella","common.applying":"Applicazione…","common.disabled":"Disabilitato","common.enabled":"Abilitato","file.choose":"Scegli file","file.none":"Nessun file selezionato","folder.closeLabel":"Chiudi selettore cartelle","folder.empty":"Questa cartella non contiene sottocartelle.","folder.eyebrow":"CARTELLA MODELLI","folder.loading":"Caricamento...","folder.loadingFolders":"Caricamento cartelle...","footer.embedded":"SvelteKit · incorporato in audiocpp_server","models.checkingSize":"verifica dimensione…","models.default":"Predefinita","models.downloaded":"Scaricato","models.folderHint":"download, rilevamento locale e caricamento dei modelli","models.folderPlaceholder":"cartella models accanto ad audiocpp_server","models.hfAccess":"Accesso HF richiesto","models.model":"modello","models.queued":"in coda","models.reinstall":"Reinstalla","models.selected":"Selezionato","models.sharedPackage":"Usa il pacchetto condiviso {name} mostrato sopra.","models.sizeUnavailable":"dimensione non disponibile","models.stopping":"arresto","models.update":"Aggiorna","models.updateAvailable":"Aggiornamento disponibile","models.upToDate":"Aggiornato","models.variants":"varianti","models.versionUnknown":"Versione sconosciuta","nav.primary":"Navigazione principale","nav.workflows":"Flussi di lavoro audio","arena.eyebrow":"ARENA","arena.title.tts":"Confronto TTS","arena.title.vc":"Confronto conversione vocale","arena.title.asr":"Confronto ASR","arena.subtitle":"Esegue lo stesso input sui modelli installati e sui pacchetti scelti, uno dopo l'altro.","arena.subtitle.tts":"Esegue lo stesso testo sui modelli TTS e sui pacchetti scelti.","arena.subtitle.vc":"Esegue lo stesso audio sorgente sui modelli di conversione vocale scelti.","arena.subtitle.asr":"Esegue lo stesso audio sorgente sui modelli ASR scelti e confronta le trascrizioni.","arena.mode.tts":"TTS","arena.mode.vc":"Conversione vocale","arena.mode.asr":"ASR","arena.input.label":"Input","arena.input.title":"Richiesta condivisa","arena.input.textPlaceholder":"Inserisci un prompt da confrontare tra modelli TTS","arena.input.groundTruth":"Testo atteso","arena.input.groundTruthPlaceholder":"Incolla la trascrizione attesa per calcolare il WER","arena.shared":"condivisa","arena.voice.label":"Voce","arena.voice.modelDefault":"Predefinita del modello","arena.voice.builtin":"Voce demo integrata","arena.voice.reference":"Audio di riferimento","arena.voice.builtinNote":"Le voci integrate vengono passate come voice ID a ogni modello. Questo tipo di voce non richiede testo di riferimento.","arena.voice.targetSpeaker":"Audio parlante target","arena.voice.clearTarget":"Cancella target","arena.voice.clearReference":"Cancella riferimento","arena.options.shared":"Opzioni condivise","arena.queue.label":"Coda","arena.queue.title":"Modelli","arena.queue.add":"Aggiungi","arena.queue.remove":"Rimuovi","arena.queue.clear":"Cancella","arena.queue.empty":"Aggiungi modelli installati o pacchetti di precisione da confrontare.","arena.run":"Esegui arena","arena.package.label":"Pacchetto","arena.package.configured":"Configurato","arena.results.title":"Confronta output","arena.results.empty":"Nessun risultato arena.","arena.metric.wall":"tempo","arena.metric.rtf":"rtf","arena.metric.wer":"wer","arena.itemStatus.queued":"in coda","arena.itemStatus.loading":"caricamento","arena.itemStatus.running":"esecuzione","arena.itemStatus.done":"completato","arena.itemStatus.failed":"fallito","arena.itemStatus.skipped":"saltato","arena.status.duplicate":"{model} {package} è già nell'arena.","arena.status.loadingModel":"Caricamento modello","arena.status.runningRequest":"Esecuzione richiesta","arena.status.addModel":"Aggiungi almeno un modello all'arena.","arena.status.running":"Esecuzione arena {mode}...","arena.status.complete":"Esecuzione arena completata.","arena.note.skippedTargetVoice":"Saltato perché questo modello VC richiede audio del parlante target.","arena.note.skippedReferenceText":"Saltato perché questo modello richiede testo di riferimento per l'input voce selezionato.","arena.note.builtinVoice":"Voce integrata usata: {voice}.","arena.note.referenceVoice":"Voce di riferimento usata.","arena.note.referenceUnsupported":"Voce predefinita usata; la voce di riferimento non è supportata.","arena.note.defaultVoice":"Voce predefinita usata: {voice}.","arena.note.skippedReferenceVoice":"Saltato perché questo modello richiede una voce di riferimento.","arena.error.seed":"Il seed deve essere -1 o un intero unsigned a 32 bit (0-4294967295).","arena.error.jsonObject":"deve essere un oggetto","arena.error.invalidJson":"JSON opzioni arena non valido: {error}","arena.error.unregistered":"Il modello configurato non è registrato da questo server.","arena.error.notDownloaded":"{package} non è scaricato.","arena.error.loadFailed":"Il modello non è stato caricato.","arena.error.missingCatalog":"Il modello non è più nel catalogo.","arena.error.enterTtsText":"Inserisci testo per l'arena TTS.","arena.error.chooseAsrSource":"Scegli audio sorgente per l'arena ASR.","arena.error.chooseVcSource":"Scegli audio sorgente per l'arena VC.","arena.error.noAudio":"La risposta non include audio.","request.alignmentText":"Testo di allineamento","request.context":"Prompt di contesto","request.contextHint":"terminologia o nomi opzionali","request.duration":"Durata in secondi","request.liveDescription":"Elabora richieste consecutive di quattro secondi usando la modalità streaming del modello.","request.liveTitle":"Trascrizione microfono in diretta","request.lyrics":"Testo della canzone","request.optional":"opzionale","request.recordingMicrophone":"Registrazione microfono","request.soundPlaceholder":"Descrivi il suono o la musica…","request.startLive":"Avvia diretta","request.stopLive":"Ferma diretta","request.stopRecording":"Ferma registrazione","request.textPlaceholder":"Inserisci il testo…","request.voiceDescription":"Descrizione della voce","request.voiceDescriptionPlaceholder":"Una voce calda e calma con ritmo misurato…","result.track":"traccia","result.tracks":"tracce","runtime.eyebrow":"RUNTIME","runtime.subtitle":"Eventi del ciclo di vita e delle richieste nel browser.","status.ready":"Pronto","studio.estimatedVram":"VRAM stimata: {value} GB","studio.vram":"VRAM —","task.align":"Allineamento forzato","task.asr":"Trascrizione","task.clon":"Clonazione vocale","task.diar":"Diarizzazione parlanti","task.gen":"Generazione musicale","task.s2s":"Modifica del parlato","task.sep":"Separazione sorgenti","task.svc":"Conversione della voce cantata","task.tts":"Sintesi vocale","task.vad":"Attività vocale","task.vc":"Conversione vocale","task.vdes":"Progettazione voce","voice.bundledNote":"L'audio di riferimento incluso e la relativa trascrizione vengono forniti automaticamente.","voice.namePlaceholder":"La mia voce di riferimento","voice.recommendedClone":"consigliata per la clonazione","voice.recording":"Registrazione voce di riferimento","voice.requiredClone":"obbligatoria per questa clonazione vocale","voice.transcriptPlaceholder":"Digita le parole esatte dell'audio di riferimento oppure carica il file .txt corrispondente."}`)},tq={code:"ja",name:"日本語",translations:{"request.minimaxFrames":"位置合わせ済みの出力フレーム数: {frames}","param.minimax_h3.num_inference_steps.label":"ノイズ除去ステップ数","param.minimax_h3.num_inference_steps.info":"ノイズ除去を12ステップにすると、品質と処理速度のバランスがよくなります。","param.minimax_h3.num_frames.label":"出力フレーム数","param.minimax_h3.num_frames.info":"出力の長さから、毎秒約24フレームとして計算します。フレーム数を変更すると、出力の長さも更新されます。","param.minimax_h3.guidance_scale.label":"ガイダンススケール","param.minimax_h3.sampler.label":"サンプラー","param.minimax_h3.dit_acceleration.label":"DiT高速化","param.minimax_h3.dit_acceleration.info":"Noneでは、品質を重視した完全なDiT処理を使用します。高速化モードは実験的な機能であり、出力に歪みが生じる場合があります。","param.minimax_h3.return_video.label":"動画のデコード","param.minimax_h3.return_video.info":"メモリ使用量を抑えて音声のみを返すため、デフォルトでは無効になっています。","model.minimax_h3.hint":"MiniMax-H3は音声と動画を統合したDiTを使用します。GGUF Q4は品質を重視します。CUDA専用のGGUF Q4 ConvRotは、VRAM使用量がやや増える代わりに処理が高速になります。デフォルトの完全なDiT処理では音声品質を重視し、動画のデコードを無効にします。","status.modelReady":"{model}の読み込みが完了し、使用可能になりました。","status.runningTask":"{task}を実行中…","status.completeIn":"{seconds}秒で完了しました。","status.packageAvailable":"{model}は{format}を使用します。スタジオで利用できるようになりました。","app.nativeStudio":"ネイティブスタジオ","nav.studio":"スタジオ","nav.arena":"アリーナ","nav.models":"モデル","nav.runtime":"ランタイム","language.label":"表示言語","theme.label":"テーマ","theme.system":"システム設定に従う","theme.dark":"ダーク","theme.light":"ライト","workflow.tts":"音声合成","workflow.asr":"音声認識 / 文字起こし","workflow.music":"音楽・動画生成","workflow.vc":"声質変換","workflow.sep":"音源分離","workflow.analysis":"音声解析","workflow.design":"声のデザイン","studio.eyebrow":"ローカル音声AI","studio.title":"オーディオスタジオ","studio.subtitle.tts":"テキストから自然な音声を生成します。対応モデルでは、プリセット音声や音声クローンを利用できます。","studio.subtitle.asr":"音声をテキストに書き起こします。対応モデルでは、言語やタイムスタンプを設定できます。","studio.subtitle.music":"説明文、歌詞、参照音声から音楽やサウンドを作成します。","studio.subtitle.vc":"話し方や歌い方を保ちながら、録音した音声を別の声に変換します。","studio.subtitle.sep":"録音した音声を、ボーカル、楽器などの対応する音声トラックに分離します。","studio.subtitle.analysis":"音声の発話区間、話者、タイミング、アラインメントを解析します。","studio.subtitle.design":"説明文と対応する参照設定を使って、声を作成・調整します。","studio.model":"モデル","studio.noModel":"モデルが選択されていません","studio.resident":"読み込み済み","studio.notInstalled":"未インストール","studio.available":"利用可能","studio.chooseInstalled":"インストール済みのモデルを選択","studio.notDownloaded":"未ダウンロード","studio.pathFound":"パスが見つかりました","studio.pathMissing":"パスが見つかりません","studio.pathUnknown":"パス未確認","studio.load":"モデルを読み込む","studio.unload":"モデルを解放","studio.working":"処理中…","studio.bundledLoaded":"内蔵 · 読み込み済み","request.label":"リクエスト","request.title":"入力と設定","request.prompt":"プロンプト","request.text":"テキスト","request.splitLongText":"長文を分割して結果を結合","request.charactersPerChunk":"セグメントあたりの文字数","request.language":"言語","request.autoLanguage":"空欄 = 自動","request.seed":"シード値","request.randomSeed":"-1 = ランダム","request.maxTokens":"最大トークン数","request.sourceAudio":"入力音声","request.recordMicrophone":"マイクで録音","voice.quickStart":"すぐに試せるデモ音声","voice.configured":"設定済みの音声","voice.useReference":"以下の参照音声ファイルを使用","voice.reference":"参照音声","voice.required":"必須","voice.optional":"任意","voice.referenceText":"参照テキスト","voice.transcript":"参照音声の文字起こし","voice.saved":"保存済みの音声","voice.browserOnly":"このブラウザー内のみ","voice.chooseSaved":"保存済みの音声を選択…","voice.libraryName":"ライブラリ内の名前","voice.save":"音声を保存","common.delete":"削除","common.cancel":"キャンセル","common.close":"閉じる","common.refresh":"更新","common.browse":"参照","common.apply":"適用","options.modelParameters":"モデルのパラメーター","options.additional":"追加オプション","run.run":"実行","run.cancel":"キャンセル","run.working":"処理中…","result.title":"結果","result.label":"結果","result.saveWav":"WAVを保存","result.empty":"生成された音声と構造化された結果がここに表示されます。","models.eyebrow":"モデルライブラリ","models.title":"ローカルパッケージ","models.subtitle":"この画面からモデルパッケージをダウンロード・管理できます。","models.folder":"モデルフォルダー","models.useDefault":"デフォルトを使用","models.showTypes":"モデルの種類を表示","models.stopDownload":"ダウンロードを停止","models.cleanPartial":"未完了のダウンロードを削除","runtime.title":"セッションログ","runtime.status":"状態","runtime.backend":"バックエンド","runtime.registered":"登録済み","runtime.resident":"読み込み済み","runtime.noEvents":"イベントはありません。","folder.title":"フォルダーを選択","folder.up":"上の階層へ","folder.select":"このフォルダーを選択","common.applying":"適用中…","common.disabled":"無効","common.enabled":"有効","file.choose":"ファイルを選択","file.none":"ファイルが選択されていません","folder.closeLabel":"フォルダー選択を閉じる","folder.empty":"このフォルダーにはサブフォルダーがありません。","folder.eyebrow":"モデルフォルダー","folder.loading":"読み込み中…","folder.loadingFolders":"フォルダーを読み込み中…","footer.embedded":"SvelteKit · audiocpp_serverに組み込み","models.checkingSize":"サイズを確認中…","models.default":"デフォルト","models.downloaded":"ダウンロード済み","models.folderHint":"モデルのダウンロード、ローカルでの検出、読み込みに使用","models.folderPlaceholder":"audiocpp_serverと同じ場所にあるmodelsフォルダー","models.hfAccess":"HFへのアクセスが必要","models.model":"モデル","models.queued":"待機中","models.reinstall":"再インストール","models.selected":"選択済み","models.sharedPackage":"上に表示されている共有パッケージ{name}を使用します。","models.sizeUnavailable":"サイズを取得できません","models.stopping":"停止中","models.update":"更新","models.updateAvailable":"更新があります","models.upToDate":"最新です","models.variants":"バリエーション","models.versionUnknown":"バージョン不明","nav.primary":"メインナビゲーション","nav.workflows":"音声ワークフロー","arena.eyebrow":"アリーナ","arena.title.tts":"音声合成の比較","arena.title.vc":"声質変換の比較","arena.title.asr":"音声認識の比較","arena.subtitle":"インストール済みのモデルと選択したパッケージで、同じ入力を順番に処理します。","arena.subtitle.tts":"選択した音声合成モデルとパッケージで、同じテキストを処理します。","arena.subtitle.vc":"選択した声質変換モデルで、同じ入力音声を処理します。","arena.subtitle.asr":"選択した音声認識モデルで同じ入力音声を処理し、文字起こし結果を比較します。","arena.mode.tts":"音声合成","arena.mode.vc":"声質変換","arena.mode.asr":"音声認識","arena.input.label":"入力","arena.input.title":"共通のリクエスト","arena.input.textPlaceholder":"音声合成モデル間で比較するプロンプトを入力","arena.input.groundTruth":"正解テキスト","arena.input.groundTruthPlaceholder":"単語誤り率(WER)を計算するための正解の文字起こしを貼り付け","arena.shared":"共通","arena.voice.label":"声","arena.voice.modelDefault":"モデルのデフォルト","arena.voice.builtin":"内蔵デモ音声","arena.voice.reference":"参照音声","arena.voice.builtinNote":"内蔵音声は、音声IDとして各モデルに渡されます。この種類の音声には参照テキストは不要です。","arena.voice.targetSpeaker":"変換先の話者の音声","arena.voice.clearTarget":"変換先の音声をクリア","arena.voice.clearReference":"参照音声をクリア","arena.options.shared":"共通オプション","arena.queue.label":"キュー","arena.queue.title":"モデル","arena.queue.add":"追加","arena.queue.remove":"削除","arena.queue.clear":"クリア","arena.queue.empty":"比較するインストール済みモデル、または精度別のパッケージを追加してください。","arena.run":"比較を実行","arena.package.label":"パッケージ","arena.package.configured":"設定済み","arena.results.title":"出力を比較","arena.results.empty":"比較結果はありません。","arena.metric.wall":"経過時間","arena.metric.rtf":"RTF","arena.metric.wer":"WER","arena.itemStatus.queued":"待機中","arena.itemStatus.loading":"読み込み中","arena.itemStatus.running":"実行中","arena.itemStatus.done":"完了","arena.itemStatus.failed":"失敗","arena.itemStatus.skipped":"スキップ","arena.status.duplicate":"{model} {package}はすでにアリーナに追加されています。","arena.status.loadingModel":"モデルを読み込み中","arena.status.runningRequest":"リクエストを実行中","arena.status.addModel":"アリーナにモデルを1つ以上追加してください。","arena.status.running":"アリーナで{mode}を実行中…","arena.status.complete":"アリーナでの実行が完了しました。","arena.note.skippedTargetVoice":"この声質変換モデルには変換先の話者の音声が必要なため、スキップしました。","arena.note.skippedReferenceText":"このモデルでは、選択した音声入力に参照テキストが必要なため、スキップしました。","arena.note.builtinVoice":"内蔵音声を使用しました: {voice}。","arena.note.referenceVoice":"参照音声を使用しました。","arena.note.referenceUnsupported":"参照音声に対応していないため、デフォルトの音声を使用しました。","arena.note.defaultVoice":"デフォルトの音声を使用しました: {voice}。","arena.note.skippedReferenceVoice":"このモデルには参照音声が必要なため、スキップしました。","arena.error.seed":"シード値は-1、または32ビット符号なし整数(0~4294967295)で指定してください。","arena.error.jsonObject":"オブジェクトである必要があります","arena.error.invalidJson":"アリーナのオプションJSONが無効です: {error}","arena.error.unregistered":"設定されたモデルは、このサーバーに登録されていません。","arena.error.notDownloaded":"{package}はダウンロードされていません。","arena.error.loadFailed":"モデルを読み込めませんでした。","arena.error.missingCatalog":"モデルはカタログに存在しなくなりました。","arena.error.enterTtsText":"音声合成の比較に使用するテキストを入力してください。","arena.error.chooseAsrSource":"音声認識の比較に使用する入力音声を選択してください。","arena.error.chooseVcSource":"声質変換の比較に使用する入力音声を選択してください。","arena.error.noAudio":"応答に音声が含まれていません。","request.alignmentText":"アラインメント用テキスト","request.context":"コンテキストプロンプト","request.contextHint":"用語や名前など(任意)","request.duration":"長さ(秒)","request.liveDescription":"モデルのストリーミングモードを使い、4秒ごとのリクエストを連続して処理します。","request.liveTitle":"マイク音声のリアルタイム文字起こし","request.lyrics":"歌詞","request.optional":"任意","request.recordingMicrophone":"マイクで録音中","request.soundPlaceholder":"サウンドや音楽の特徴を入力…","request.startLive":"リアルタイム文字起こしを開始","request.stopLive":"リアルタイム文字起こしを停止","request.stopRecording":"録音を停止","request.textPlaceholder":"テキストを入力…","request.voiceDescription":"声の説明","request.voiceDescriptionPlaceholder":"温かみのある落ち着いた声で、ゆったりとしたテンポ…","result.track":"トラック","result.tracks":"トラック","runtime.eyebrow":"ランタイム","runtime.subtitle":"ブラウザー内のライフサイクルとリクエストに関するイベント。","status.ready":"準備完了","studio.estimatedVram":"推定VRAM使用量: {value} GB","studio.vram":"VRAM —","task.align":"強制アラインメント","task.asr":"文字起こし","task.clon":"音声クローン","task.diar":"話者ダイアライゼーション","task.gen":"音楽生成","task.s2s":"発話の編集","task.sep":"音源分離","task.svc":"歌声変換","task.tts":"音声合成","task.vad":"音声区間検出","task.vc":"声質変換","task.vdes":"声のデザイン","voice.bundledNote":"同梱の参照音声と対応する文字起こしが自動的に入力されます。","voice.namePlaceholder":"自分の参照音声","voice.recommendedClone":"音声クローンに推奨","voice.recording":"参照音声を録音中","voice.requiredClone":"この音声クローンには必須","voice.transcriptPlaceholder":"参照音声で話されている内容を正確に入力するか、対応する.txtファイルを読み込んでください。"}},aq={code:"pl",name:"Polski",translations:JSON.parse('{"request.minimaxFrames":"{frames} wyrównanych klatek wyjściowych","param.minimax_h3.num_inference_steps.label":"Kroki odszumiania","param.minimax_h3.num_inference_steps.info":"Dwanaście kroków odszumiania zapewnia praktyczną równowagę jakości i wydajności.","param.minimax_h3.num_frames.label":"Klatki wyjściowe","param.minimax_h3.num_frames.info":"Obliczane z czasu trwania przy około 24 klatkach na sekundę wyjścia. Zmiana liczby klatek aktualizuje również czas trwania.","param.minimax_h3.guidance_scale.label":"Skala naprowadzania","param.minimax_h3.sampler.label":"Próbnik","param.minimax_h3.dit_acceleration.label":"Przyspieszenie DiT","param.minimax_h3.dit_acceleration.info":"None używa pełnej ścieżki DiT nastawionej na jakość. Tryby przyspieszone są eksperymentalne i mogą zniekształcać niektóre wyniki.","param.minimax_h3.return_video.label":"Dekoduj wideo","param.minimax_h3.return_video.info":"Domyślnie wyłączone, aby zmniejszyć zużycie pamięci i zwracać tylko dźwięk.","model.minimax_h3.hint":"MiniMax-H3 korzysta ze wspólnego DiT audio/wideo. GGUF Q4 stawia na jakość; dostępny tylko dla CUDA GGUF Q4 ConvRot używa nieco więcej VRAM, aby działać szybciej. Domyślna pełna ścieżka DiT nadaje priorytet jakości dźwięku, a dekodowanie wideo jest wyłączone.","status.modelReady":"{model} jest załadowany i gotowy.","status.runningTask":"Uruchamianie: {task}...","status.completeIn":"Ukończono w {seconds} s.","status.packageAvailable":"{model} użyje {format}. Model jest dostępny w Studio.","app.nativeStudio":"Studio natywne","nav.studio":"Studio","nav.arena":"Arena","nav.models":"Modele","nav.runtime":"Środowisko","language.label":"Język interfejsu","theme.label":"Motyw","theme.system":"System","theme.dark":"Ciemny","theme.light":"Jasny","workflow.tts":"Synteza mowy","workflow.asr":"ASR / Transkrypcja","workflow.music":"Generowanie muzyki i wideo","workflow.vc":"Konwersja głosu","workflow.sep":"Separacja źródeł","workflow.analysis":"Analiza dźwięku","workflow.design":"Projektowanie głosu","studio.eyebrow":"LOKALNA INTELIGENCJA AUDIO","studio.title":"Studio audio","studio.subtitle.tts":"Generuj naturalną mowę z tekstu, korzystając z gotowych głosów i klonowania, gdy model je obsługuje.","studio.subtitle.asr":"Transkrybuj mowę z nagrań na tekst, korzystając z ustawień języka i znaczników czasu, gdy są obsługiwane.","studio.subtitle.music":"Twórz muzykę i dźwięki na podstawie opisu, tekstu piosenki lub nagrania referencyjnego.","studio.subtitle.vc":"Przekształcaj nagranie w inny głos, zachowując sposób mówienia lub śpiewania.","studio.subtitle.sep":"Rozdzielaj nagranie na wokal, instrumenty lub inne dostępne ścieżki.","studio.subtitle.analysis":"Analizuj aktywność mowy, mówców, czas i wyrównanie nagrania.","studio.subtitle.design":"Twórz lub dopracowuj głos na podstawie opisu i obsługiwanych ustawień referencyjnych.","studio.model":"Model","studio.noModel":"Nie wybrano modelu","studio.resident":"Załadowany","studio.notInstalled":"Nie zainstalowano","studio.available":"Dostępny","studio.chooseInstalled":"Wybierz zainstalowany model","studio.notDownloaded":"nie pobrano","studio.pathFound":"Ścieżka znaleziona","studio.pathMissing":"Brak ścieżki","studio.pathUnknown":"Ścieżka niesprawdzona","studio.load":"Załaduj model","studio.unload":"Wyładuj model","studio.working":"Przetwarzanie…","studio.bundledLoaded":"Wbudowany · załadowany","request.label":"ŻĄDANIE","request.title":"Dane wejściowe i ustawienia","request.prompt":"Polecenie","request.text":"Tekst","request.splitLongText":"Dziel i łącz długi tekst","request.charactersPerChunk":"Znaki na fragment","request.language":"Język","request.autoLanguage":"puste = automatycznie","request.seed":"Ziarno","request.randomSeed":"-1 = losowe","request.maxTokens":"Maksymalna liczba tokenów","request.sourceAudio":"Dźwięk źródłowy","request.recordMicrophone":"Nagraj mikrofon","voice.quickStart":"Szybkie głosy demonstracyjne","voice.useReference":"Użyj pliku dźwiękowego poniżej","voice.reference":"Głos referencyjny","voice.required":"wymagany","voice.optional":"opcjonalny","voice.referenceText":"Tekst referencyjny","voice.transcript":"Transkrypcja referencyjna","voice.saved":"Zapisane głosy","voice.browserOnly":"tylko w tej przeglądarce","voice.chooseSaved":"Wybierz zapisany głos...","voice.libraryName":"Nazwa w bibliotece","voice.save":"Zapisz głos","common.delete":"Usuń","common.cancel":"Anuluj","common.close":"Zamknij","common.refresh":"Odśwież","common.browse":"Przeglądaj","common.apply":"Zastosuj","options.modelParameters":"Parametry modelu","options.additional":"Dodatkowe opcje","run.run":"Uruchom","run.cancel":"Anuluj","run.working":"Przetwarzanie…","result.title":"Wynik","result.label":"WYNIK","result.saveWav":"Zapisz WAV","result.empty":"W tym miejscu pojawi się wygenerowany dźwięk i wyniki strukturalne.","models.eyebrow":"BIBLIOTEKA MODELI","models.title":"Pakiety lokalne","models.subtitle":"Pobieraj i zarządzaj pakietami modeli bez opuszczania interfejsu.","models.folder":"Folder modeli","models.useDefault":"Użyj domyślnego","models.showTypes":"Pokaż typy modeli","models.stopDownload":"Zatrzymaj pobieranie","models.cleanPartial":"Usuń częściowe pobieranie","runtime.title":"Dziennik sesji","runtime.status":"Stan","runtime.backend":"Backend","runtime.registered":"Zarejestrowane","runtime.resident":"Załadowane","runtime.noEvents":"Brak zdarzeń.","folder.title":"Wybierz folder","folder.up":"Poziom wyżej","folder.select":"Wybierz ten folder","common.applying":"Stosowanie…","common.disabled":"Wyłączone","common.enabled":"Włączone","file.choose":"Wybierz plik","file.none":"Nie wybrano pliku","folder.closeLabel":"Zamknij przeglądarkę folderów","folder.empty":"Ten folder nie zawiera podfolderów.","folder.eyebrow":"FOLDER MODELI","folder.loading":"Ładowanie...","folder.loadingFolders":"Ładowanie folderów...","footer.embedded":"SvelteKit · wbudowany w audiocpp_server","models.checkingSize":"sprawdzanie rozmiaru…","models.default":"Domyślnie","models.downloaded":"Pobrano","models.folderHint":"pobieranie, wykrywanie lokalne i ładowanie modeli","models.folderPlaceholder":"folder models obok audiocpp_server","models.hfAccess":"Wymagany dostęp do HF","models.model":"model","models.queued":"w kolejce","models.reinstall":"Zainstaluj ponownie","models.selected":"Wybrano","models.sharedPackage":"Używa wspólnego pakietu {name} pokazanego powyżej.","models.sizeUnavailable":"rozmiar niedostępny","models.stopping":"zatrzymywanie","models.update":"Aktualizuj","models.updateAvailable":"Dostępna aktualizacja","models.upToDate":"Aktualny","models.variants":"warianty","models.versionUnknown":"Nieznana wersja","nav.primary":"Główna nawigacja","nav.workflows":"Przepływy pracy audio","arena.eyebrow":"ARENA","arena.title.tts":"Porównanie TTS","arena.title.vc":"Porównanie konwersji głosu","arena.title.asr":"Porównanie ASR","arena.subtitle":"Uruchamia ten sam input na wybranych zainstalowanych modelach i wariantach pakietów, jeden po drugim.","arena.subtitle.tts":"Uruchamia ten sam tekst na wybranych modelach TTS i wariantach pakietów.","arena.subtitle.vc":"Uruchamia to samo audio źródłowe na wybranych modelach konwersji głosu.","arena.subtitle.asr":"Uruchamia to samo audio źródłowe na wybranych modelach ASR i porównuje transkrypcje.","arena.mode.tts":"TTS","arena.mode.vc":"Konwersja głosu","arena.mode.asr":"ASR","arena.input.label":"Dane wejściowe","arena.input.title":"Wspólne żądanie","arena.input.textPlaceholder":"Wpisz jeden prompt do porównania modeli TTS","arena.input.groundTruth":"Tekst referencyjny","arena.input.groundTruthPlaceholder":"Wklej oczekiwaną transkrypcję, aby obliczyć WER","arena.shared":"wspólne","arena.voice.label":"Głos","arena.voice.modelDefault":"Domyślny modelu","arena.voice.builtin":"Wbudowany głos demo","arena.voice.reference":"Audio referencyjne","arena.voice.builtinNote":"Wbudowane głosy są przekazywane jako voice ID do każdego modelu. Ten typ głosu nie wymaga tekstu referencyjnego.","arena.voice.targetSpeaker":"Audio głosu docelowego","arena.voice.clearTarget":"Wyczyść cel","arena.voice.clearReference":"Wyczyść referencję","arena.options.shared":"Wspólne opcje","arena.queue.label":"Kolejka","arena.queue.title":"Modele","arena.queue.add":"Dodaj","arena.queue.remove":"Usuń","arena.queue.clear":"Wyczyść","arena.queue.empty":"Dodaj zainstalowane modele lub pakiety precyzji do porównania.","arena.run":"Uruchom arenę","arena.package.label":"Pakiet","arena.package.configured":"Skonfigurowany","arena.results.title":"Porównaj wyniki","arena.results.empty":"Brak wyników areny.","arena.metric.wall":"czas","arena.metric.rtf":"rtf","arena.metric.wer":"wer","arena.itemStatus.queued":"w kolejce","arena.itemStatus.loading":"ładowanie","arena.itemStatus.running":"uruchomione","arena.itemStatus.done":"gotowe","arena.itemStatus.failed":"błąd","arena.itemStatus.skipped":"pominięto","arena.status.duplicate":"{model} {package} jest już w arenie.","arena.status.loadingModel":"Ładowanie modelu","arena.status.runningRequest":"Uruchamianie żądania","arena.status.addModel":"Dodaj co najmniej jeden model do areny.","arena.status.running":"Uruchamianie areny {mode}...","arena.status.complete":"Arena zakończona.","arena.note.skippedTargetVoice":"Pominięto, ponieważ ten model VC wymaga audio głosu docelowego.","arena.note.skippedReferenceText":"Pominięto, ponieważ ten model wymaga tekstu referencyjnego dla wybranego wejścia głosu.","arena.note.builtinVoice":"Użyto wbudowanego głosu: {voice}.","arena.note.referenceVoice":"Użyto głosu referencyjnego.","arena.note.referenceUnsupported":"Użyto domyślnego głosu; głos referencyjny nie jest obsługiwany.","arena.note.defaultVoice":"Użyto domyślnego głosu: {voice}.","arena.note.skippedReferenceVoice":"Pominięto, ponieważ ten model wymaga głosu referencyjnego.","arena.error.seed":"Ziarno musi być -1 albo 32-bitową liczbą unsigned (0-4294967295).","arena.error.jsonObject":"musi być obiektem","arena.error.invalidJson":"Nieprawidłowy JSON opcji areny: {error}","arena.error.unregistered":"Skonfigurowany model nie jest zarejestrowany przez ten serwer.","arena.error.notDownloaded":"{package} nie został pobrany.","arena.error.loadFailed":"Model nie został załadowany.","arena.error.missingCatalog":"Modelu nie ma już w katalogu.","arena.error.enterTtsText":"Wpisz tekst dla areny TTS.","arena.error.chooseAsrSource":"Wybierz audio źródłowe dla areny ASR.","arena.error.chooseVcSource":"Wybierz audio źródłowe dla areny VC.","arena.error.noAudio":"Odpowiedź nie zawiera audio.","request.alignmentText":"Tekst do wyrównania","request.context":"Kontekst","request.contextHint":"opcjonalna terminologia lub nazwy","request.duration":"Czas trwania w sekundach","request.liveDescription":"Przetwarza kolejne czterosekundowe żądania w trybie strumieniowym modelu.","request.liveTitle":"Transkrypcja mikrofonu na żywo","request.lyrics":"Tekst utworu","request.optional":"opcjonalne","request.recordingMicrophone":"Nagrywanie mikrofonu","request.soundPlaceholder":"Opisz dźwięk lub muzykę…","request.startLive":"Uruchom na żywo","request.stopLive":"Zatrzymaj na żywo","request.stopRecording":"Zatrzymaj nagrywanie","request.textPlaceholder":"Wprowadź tekst…","request.voiceDescription":"Opis głosu","request.voiceDescriptionPlaceholder":"Ciepły, spokojny głos o umiarkowanym tempie…","result.track":"ścieżka","result.tracks":"ścieżki","runtime.eyebrow":"ŚRODOWISKO","runtime.subtitle":"Zdarzenia cyklu życia i żądań po stronie przeglądarki.","status.ready":"Gotowe","studio.estimatedVram":"Szacowane VRAM: {value} GB","studio.vram":"VRAM —","task.align":"Wymuszone wyrównanie","task.asr":"Transkrypcja","task.clon":"Klonowanie głosu","task.diar":"Diarizacja mówców","task.gen":"Generowanie muzyki","task.s2s":"Edycja mowy","task.sep":"Separacja źródeł","task.svc":"Konwersja głosu śpiewanego","task.tts":"Synteza mowy","task.vad":"Aktywność głosowa","task.vc":"Konwersja głosu","task.vdes":"Projektowanie głosu","voice.bundledNote":"Dołączone audio referencyjne i jego transkrypcja zostaną użyte automatycznie.","voice.namePlaceholder":"Mój głos referencyjny","voice.recommendedClone":"zalecana do klonowania","voice.recording":"Nagrywanie głosu referencyjnego","voice.requiredClone":"wymagana dla tego klonowania głosu","voice.transcriptPlaceholder":"Wpisz dokładne słowa z audio referencyjnego lub wczytaj pasujący plik .txt powyżej."}')},iq={code:"ru",name:"Русский",translations:JSON.parse('{"request.minimaxFrames":"{frames} выровненных выходных кадров","param.minimax_h3.num_inference_steps.label":"Шаги шумоподавления","param.minimax_h3.num_inference_steps.info":"Двенадцать шагов обеспечивают практичный баланс качества и производительности.","param.minimax_h3.num_frames.label":"Выходные кадры","param.minimax_h3.num_frames.info":"Рассчитываются из длительности примерно по 24 кадра на секунду вывода. Изменение числа кадров также обновляет длительность.","param.minimax_h3.guidance_scale.label":"Масштаб управления","param.minimax_h3.sampler.label":"Сэмплер","param.minimax_h3.dit_acceleration.label":"Ускорение DiT","param.minimax_h3.dit_acceleration.info":"None использует полный DiT с приоритетом качества. Режимы ускорения экспериментальны и могут искажать некоторые результаты.","param.minimax_h3.return_video.label":"Декодировать видео","param.minimax_h3.return_video.info":"По умолчанию выключено для снижения расхода памяти и возврата только аудио.","model.minimax_h3.hint":"MiniMax-H3 использует совместный аудио/видео DiT. GGUF Q4 ориентирован на качество; доступный только в CUDA GGUF Q4 ConvRot использует немного больше VRAM ради скорости. Полный DiT по умолчанию отдаёт приоритет качеству звука, а декодирование видео отключено.","status.modelReady":"{model} загружен и готов.","status.runningTask":"Выполняется: {task}...","status.completeIn":"Завершено за {seconds} с.","status.packageAvailable":"{model} будет использовать {format}. Модель доступна в Studio.","app.nativeStudio":"Нативная студия","nav.studio":"Студия","nav.arena":"Арена","nav.models":"Модели","nav.runtime":"Среда","language.label":"Язык интерфейса","theme.label":"Тема","theme.system":"Системная","theme.dark":"Тёмная","theme.light":"Светлая","workflow.tts":"Синтез речи","workflow.asr":"ASR / Распознавание","workflow.music":"Генерация музыки и видео","workflow.vc":"Преобразование голоса","workflow.sep":"Разделение источников","workflow.analysis":"Анализ аудио","workflow.design":"Дизайн голоса","studio.eyebrow":"ЛОКАЛЬНЫЙ АУДИО ИНТЕЛЛЕКТ","studio.title":"Аудиостудия","studio.subtitle.tts":"Создавайте естественную речь из текста с готовыми голосами и клонированием, если они поддерживаются.","studio.subtitle.asr":"Преобразуйте речь из аудио в текст с настройками языка и временных меток, если они поддерживаются.","studio.subtitle.music":"Создавайте музыку и звуки по описанию, тексту песни или эталонному аудио.","studio.subtitle.vc":"Преобразуйте запись в другой голос, сохраняя манеру речи или пения.","studio.subtitle.sep":"Разделяйте запись на вокал, инструменты и другие доступные аудиодорожки.","studio.subtitle.analysis":"Анализируйте речевую активность, говорящих, время и выравнивание аудио.","studio.subtitle.design":"Создавайте и настраивайте голос по текстовому описанию и поддерживаемым эталонным параметрам.","studio.model":"Модель","studio.noModel":"Модель не выбрана","studio.resident":"Загружена","studio.notInstalled":"Не установлена","studio.available":"Доступна","studio.chooseInstalled":"Выберите установленную модель","studio.notDownloaded":"не скачана","studio.pathFound":"Путь найден","studio.pathMissing":"Путь отсутствует","studio.pathUnknown":"Путь не проверен","studio.load":"Загрузить модель","studio.unload":"Выгрузить модель","studio.working":"Обработка…","studio.bundledLoaded":"Встроена · загружена","request.label":"ЗАПРОС","request.title":"Ввод и управление","request.prompt":"Запрос","request.text":"Текст","request.splitLongText":"Разделять и объединять длинный текст","request.charactersPerChunk":"Символов в части","request.language":"Язык","request.autoLanguage":"пусто = автоматически","request.seed":"Seed","request.randomSeed":"-1 = случайно","request.maxTokens":"Максимум токенов","request.sourceAudio":"Исходное аудио","request.recordMicrophone":"Записать микрофон","voice.quickStart":"Демонстрационные голоса","voice.useReference":"Использовать файл эталонного аудио ниже","voice.reference":"Эталонный голос","voice.required":"обязательно","voice.optional":"необязательно","voice.referenceText":"Эталонный текст","voice.transcript":"Эталонная расшифровка","voice.saved":"Сохранённые голоса","voice.browserOnly":"только в этом браузере","voice.chooseSaved":"Выберите сохранённый голос...","voice.libraryName":"Имя в библиотеке","voice.save":"Сохранить голос","common.delete":"Удалить","common.cancel":"Отмена","common.close":"Закрыть","common.refresh":"Обновить","common.browse":"Обзор","common.apply":"Применить","options.modelParameters":"Параметры модели","options.additional":"Дополнительные параметры","run.run":"Запустить","run.cancel":"Отмена","run.working":"Обработка…","result.title":"Результат","result.label":"РЕЗУЛЬТАТ","result.saveWav":"Сохранить WAV","result.empty":"Здесь появятся созданное аудио и структурированные результаты.","models.eyebrow":"БИБЛИОТЕКА МОДЕЛЕЙ","models.title":"Локальные пакеты","models.subtitle":"Скачивайте пакеты моделей и управляйте ими прямо в интерфейсе.","models.folder":"Папка моделей","models.useDefault":"По умолчанию","models.showTypes":"Типы моделей","models.stopDownload":"Остановить загрузку","models.cleanPartial":"Удалить частичную загрузку","runtime.title":"Журнал сеанса","runtime.status":"Состояние","runtime.backend":"Backend","runtime.registered":"Зарегистрировано","runtime.resident":"Загружено","runtime.noEvents":"Событий пока нет.","folder.title":"Выберите папку","folder.up":"На уровень выше","folder.select":"Выбрать эту папку","common.applying":"Применение…","common.disabled":"Выключено","common.enabled":"Включено","file.choose":"Выбрать файл","file.none":"Файл не выбран","folder.closeLabel":"Закрыть выбор папки","folder.empty":"В этой папке нет вложенных папок.","folder.eyebrow":"ПАПКА МОДЕЛЕЙ","folder.loading":"Загрузка...","folder.loadingFolders":"Загрузка папок...","footer.embedded":"SvelteKit · встроен в audiocpp_server","models.checkingSize":"проверка размера…","models.default":"По умолчанию","models.downloaded":"Скачано","models.folderHint":"загрузка, локальное обнаружение и загрузка моделей","models.folderPlaceholder":"папка models рядом с audiocpp_server","models.hfAccess":"Требуется доступ HF","models.model":"модель","models.queued":"в очереди","models.reinstall":"Переустановить","models.selected":"Выбрано","models.sharedPackage":"Использует общий пакет {name}, показанный выше.","models.sizeUnavailable":"размер недоступен","models.stopping":"остановка","models.update":"Обновить","models.updateAvailable":"Доступно обновление","models.upToDate":"Актуально","models.variants":"варианты","models.versionUnknown":"Версия неизвестна","nav.primary":"Основная навигация","nav.workflows":"Рабочие процессы аудио","arena.eyebrow":"АРЕНА","arena.title.tts":"Сравнение TTS","arena.title.vc":"Сравнение преобразования голоса","arena.title.asr":"Сравнение ASR","arena.subtitle":"Запускает один и тот же ввод через выбранные установленные модели и варианты пакетов по очереди.","arena.subtitle.tts":"Запускает один и тот же текст через выбранные модели TTS и варианты пакетов.","arena.subtitle.vc":"Запускает одно и то же исходное аудио через выбранные модели преобразования голоса.","arena.subtitle.asr":"Запускает одно и то же исходное аудио через выбранные модели ASR и сравнивает расшифровки.","arena.mode.tts":"TTS","arena.mode.vc":"Преобразование голоса","arena.mode.asr":"ASR","arena.input.label":"Ввод","arena.input.title":"Общий запрос","arena.input.textPlaceholder":"Введите один запрос для сравнения моделей TTS","arena.input.groundTruth":"Эталонный текст","arena.input.groundTruthPlaceholder":"Вставьте ожидаемую расшифровку для расчёта WER","arena.shared":"общий","arena.voice.label":"Голос","arena.voice.modelDefault":"По умолчанию модели","arena.voice.builtin":"Встроенный демо-голос","arena.voice.reference":"Эталонное аудио","arena.voice.builtinNote":"Встроенные голоса передаются каждой модели как voice ID. Для этого источника голоса эталонный текст не требуется.","arena.voice.targetSpeaker":"Аудио целевого говорящего","arena.voice.clearTarget":"Очистить цель","arena.voice.clearReference":"Очистить эталон","arena.options.shared":"Общие параметры","arena.queue.label":"Очередь","arena.queue.title":"Модели","arena.queue.add":"Добавить","arena.queue.remove":"Удалить","arena.queue.clear":"Очистить","arena.queue.empty":"Добавьте установленные модели или пакеты точности для сравнения.","arena.run":"Запустить арену","arena.package.label":"Пакет","arena.package.configured":"Настроено","arena.results.title":"Сравнить вывод","arena.results.empty":"Результатов арены пока нет.","arena.metric.wall":"время","arena.metric.rtf":"rtf","arena.metric.wer":"wer","arena.itemStatus.queued":"в очереди","arena.itemStatus.loading":"загрузка","arena.itemStatus.running":"выполняется","arena.itemStatus.done":"готово","arena.itemStatus.failed":"ошибка","arena.itemStatus.skipped":"пропущено","arena.status.duplicate":"{model} {package} уже есть в арене.","arena.status.loadingModel":"Загрузка модели","arena.status.runningRequest":"Выполнение запроса","arena.status.addModel":"Добавьте хотя бы одну модель в арену.","arena.status.running":"Выполняется арена {mode}...","arena.status.complete":"Выполнение арены завершено.","arena.note.skippedTargetVoice":"Пропущено: этой VC-модели нужно аудио целевого говорящего.","arena.note.skippedReferenceText":"Пропущено: этой модели нужен эталонный текст для выбранного голосового ввода.","arena.note.builtinVoice":"Использован встроенный голос: {voice}.","arena.note.referenceVoice":"Использован эталонный голос.","arena.note.referenceUnsupported":"Использован голос по умолчанию; эталонный голос не поддерживается.","arena.note.defaultVoice":"Использован голос по умолчанию: {voice}.","arena.note.skippedReferenceVoice":"Пропущено: этой модели нужен эталонный голос.","arena.error.seed":"Seed должен быть -1 или 32-битным unsigned-целым (0-4294967295).","arena.error.jsonObject":"должен быть объектом","arena.error.invalidJson":"Недопустимый JSON параметров арены: {error}","arena.error.unregistered":"Настроенная модель не зарегистрирована этим сервером.","arena.error.notDownloaded":"{package} не скачан.","arena.error.loadFailed":"Модель не загрузилась.","arena.error.missingCatalog":"Модели больше нет в каталоге.","arena.error.enterTtsText":"Введите текст для арены TTS.","arena.error.chooseAsrSource":"Выберите исходное аудио для арены ASR.","arena.error.chooseVcSource":"Выберите исходное аудио для арены VC.","arena.error.noAudio":"Ответ не содержит аудио.","request.alignmentText":"Текст для выравнивания","request.context":"Контекстный запрос","request.contextHint":"необязательные термины или имена","request.duration":"Длительность в секундах","request.liveDescription":"Обрабатывает последовательные четырёхсекундные запросы в потоковом режиме модели.","request.liveTitle":"Распознавание с микрофона в реальном времени","request.lyrics":"Текст песни","request.optional":"необязательно","request.recordingMicrophone":"Запись микрофона","request.soundPlaceholder":"Опишите звук или музыку…","request.startLive":"Запустить","request.stopLive":"Остановить","request.stopRecording":"Остановить запись","request.textPlaceholder":"Введите текст…","request.voiceDescription":"Описание голоса","request.voiceDescriptionPlaceholder":"Тёплый спокойный голос с размеренным темпом…","result.track":"дорожка","result.tracks":"дорожки","runtime.eyebrow":"СРЕДА","runtime.subtitle":"События жизненного цикла и запросов в браузере.","status.ready":"Готово","studio.estimatedVram":"Оценка VRAM: {value} ГБ","studio.vram":"VRAM —","task.align":"Принудительное выравнивание","task.asr":"Распознавание речи","task.clon":"Клонирование голоса","task.diar":"Диаризация говорящих","task.gen":"Генерация музыки","task.s2s":"Редактирование речи","task.sep":"Разделение источников","task.svc":"Преобразование вокала","task.tts":"Синтез речи","task.vad":"Голосовая активность","task.vc":"Преобразование голоса","task.vdes":"Дизайн голоса","voice.bundledNote":"Встроенное эталонное аудио и соответствующая расшифровка подставляются автоматически.","voice.namePlaceholder":"Мой эталонный голос","voice.recommendedClone":"рекомендуется для клонирования","voice.recording":"Запись эталонного голоса","voice.requiredClone":"требуется для этого клонирования","voice.transcriptPlaceholder":"Введите точные слова из эталонного аудио или загрузите соответствующий файл .txt выше."}')},nq={code:"vi",name:"Tiếng Việt",translations:JSON.parse('{"app.nativeStudio":"Phòng thu trên máy","nav.studio":"Phòng thu","nav.arena":"So sánh","nav.models":"Model","nav.runtime":"Trạng thái","nav.configuration":"Cấu hình","nav.primary":"Điều hướng chính","nav.workflows":"Các tác vụ âm thanh","language.label":"Ngôn ngữ giao diện","theme.label":"Giao diện","theme.system":"Theo hệ thống","theme.dark":"Tối","theme.mocha":"Catppuccin Mocha","theme.light":"Sáng","arena.eyebrow":"SO SÁNH","arena.title.tts":"So sánh giọng đọc","arena.title.vc":"So sánh chuyển đổi giọng","arena.title.asr":"So sánh nhận dạng giọng nói","arena.subtitle":"Chạy lần lượt cùng một đầu vào với các model và biến thể đã cài được chọn.","arena.subtitle.tts":"Đọc cùng một văn bản bằng các model giọng đọc và biến thể được chọn.","arena.subtitle.vc":"Chuyển đổi cùng một âm thanh nguồn bằng các model được chọn.","arena.subtitle.asr":"Nhận dạng cùng một âm thanh nguồn bằng các model được chọn và so sánh bản chép lời.","arena.mode.tts":"Đọc văn bản","arena.mode.vc":"Chuyển đổi giọng","arena.mode.asr":"Nhận dạng giọng nói","arena.input.label":"Đầu vào","arena.input.title":"Yêu cầu dùng chung","arena.input.textPlaceholder":"Nhập văn bản để so sánh các model giọng đọc","arena.input.groundTruth":"Bản chép lời chuẩn","arena.input.groundTruthPlaceholder":"Dán bản chép lời chuẩn để tính tỷ lệ lỗi từ (WER)","arena.shared":"dùng chung","arena.voice.label":"Giọng","arena.voice.modelDefault":"Mặc định của model","arena.voice.builtin":"Giọng mẫu có sẵn","arena.voice.reference":"Âm thanh tham chiếu","arena.voice.builtinNote":"Giọng có sẵn được gửi dưới dạng mã giọng cho từng model. Không cần bản chép lời với nguồn giọng này.","arena.voice.targetSpeaker":"Âm thanh giọng đích","arena.voice.clearTarget":"Bỏ giọng đích","arena.voice.clearReference":"Bỏ tham chiếu","arena.options.shared":"Tùy chọn dùng chung","arena.queue.label":"Hàng đợi","arena.queue.title":"Model","arena.queue.add":"Thêm","arena.queue.remove":"Bỏ","arena.queue.clear":"Xóa hàng đợi","arena.queue.empty":"Thêm model hoặc biến thể kiểu dữ liệu đã cài để so sánh.","arena.run":"Chạy so sánh","arena.package.label":"Gói","arena.package.configured":"Đã cấu hình","arena.results.title":"So sánh kết quả","arena.results.empty":"Chưa có kết quả so sánh.","arena.metric.wall":"thời gian","arena.metric.rtf":"RTF","arena.metric.wer":"WER","arena.itemStatus.queued":"đang chờ","arena.itemStatus.loading":"đang nạp","arena.itemStatus.running":"đang chạy","arena.itemStatus.done":"hoàn tất","arena.itemStatus.failed":"thất bại","arena.itemStatus.skipped":"đã bỏ qua","arena.status.duplicate":"{model} {package} đã có trong danh sách so sánh.","arena.status.loadingModel":"Đang nạp model","arena.status.runningRequest":"Đang chạy yêu cầu","arena.status.addModel":"Thêm ít nhất một model để so sánh.","arena.status.running":"Đang chạy so sánh {mode}...","arena.status.complete":"Đã hoàn tất so sánh.","arena.note.skippedTargetVoice":"Đã bỏ qua vì model chuyển đổi giọng này cần âm thanh giọng đích.","arena.note.skippedReferenceText":"Đã bỏ qua vì model này cần bản chép lời cho giọng tham chiếu đã chọn.","arena.note.builtinVoice":"Đã dùng giọng có sẵn: {voice}.","arena.note.referenceVoice":"Đã dùng giọng tham chiếu.","arena.note.referenceUnsupported":"Đã dùng giọng mặc định; model không hỗ trợ giọng tham chiếu.","arena.note.defaultVoice":"Đã dùng giọng mặc định: {voice}.","arena.note.skippedReferenceVoice":"Đã bỏ qua vì model này cần giọng tham chiếu.","arena.error.seed":"Seed phải là -1 hoặc số nguyên không dấu 32 bit (từ 0 đến 4294967295).","arena.error.jsonObject":"phải là một đối tượng JSON","arena.error.invalidJson":"JSON tùy chọn so sánh không hợp lệ: {error}","arena.error.unregistered":"Model đã cấu hình chưa được đăng ký trên máy chủ này.","arena.error.notDownloaded":"Chưa tải {package}.","arena.error.loadFailed":"Không nạp được model.","arena.error.missingCatalog":"Model không còn trong danh mục.","arena.error.enterTtsText":"Nhập văn bản để so sánh giọng đọc.","arena.error.chooseAsrSource":"Chọn âm thanh nguồn để so sánh nhận dạng giọng nói.","arena.error.chooseVcSource":"Chọn âm thanh nguồn để so sánh chuyển đổi giọng.","arena.error.noAudio":"Phản hồi không có âm thanh.","workflow.tts":"Đọc văn bản","workflow.asr":"Nhận dạng / Chép lời","workflow.music":"Tạo nhạc / video","workflow.vc":"Chuyển đổi giọng / S2S","workflow.enhancement":"Cải thiện / Khử nhiễu","models.tools":"công cụ","workflow.sep":"Tách nguồn âm thanh","workflow.analysis":"Phân tích âm thanh","workflow.design":"Thiết kế giọng","task.tts":"Đọc văn bản","task.clon":"Sao chép giọng","task.asr":"Chép lời","task.gen":"Tạo nhạc","task.midi":"Âm thanh sang MIDI","task.vc":"Chuyển đổi giọng","task.svc":"Chuyển đổi giọng hát","task.s2s":"Chỉnh sửa lời nói","task.sep":"Tách nguồn âm thanh","task.vad":"Phát hiện giọng nói","task.diar":"Phân tách người nói","task.align":"Căn chỉnh lời và âm thanh","task.vdes":"Thiết kế giọng","studio.eyebrow":"XỬ LÝ ÂM THANH TẠI MÁY","studio.title":"Phòng thu âm thanh","studio.subtitle.tts":"Tạo giọng đọc tự nhiên từ văn bản, với giọng có sẵn và sao chép giọng khi model hỗ trợ.","studio.subtitle.asr":"Chuyển lời nói thành văn bản, với tùy chọn ngôn ngữ và mốc thời gian khi model hỗ trợ.","studio.subtitle.music":"Tạo nhạc và âm thanh từ mô tả, lời bài hát hoặc âm thanh tham chiếu khi model hỗ trợ.","studio.subtitle.vc":"Chuyển đổi giọng nói, giọng hát hoặc nhận câu trả lời bằng giọng nói từ âm thanh đầu vào.","studio.subtitle.sep":"Tách bản ghi thành giọng hát, nhạc cụ hoặc các nguồn âm thanh mà model hỗ trợ.","studio.subtitle.analysis":"Phân tích giọng nói, người nói, mốc thời gian và căn chỉnh lời với âm thanh.","studio.subtitle.enhancement":"Cải thiện âm thanh, loại bỏ tiếng ồn nền hoặc khôi phục dải tần.","studio.subtitle.design":"Tạo hoặc tinh chỉnh giọng từ mô tả bằng văn bản và các tùy chọn tham chiếu được hỗ trợ.","studio.model":"Model","studio.noModel":"Chưa chọn model","studio.resident":"Đã nạp","studio.notInstalled":"Chưa cài","studio.available":"Có sẵn","studio.chooseInstalled":"Chọn một model đã cài","studio.notDownloaded":"chưa tải","studio.pathFound":"Đã tìm thấy đường dẫn","studio.pathMissing":"Không tìm thấy đường dẫn","studio.pathUnknown":"Chưa kiểm tra đường dẫn","studio.estimatedVram":"VRAM ước tính: {value} GB","studio.vram":"VRAM —","studio.load":"Nạp model","studio.unload":"Giải phóng model","studio.working":"Đang xử lý…","studio.bundledLoaded":"Có sẵn · đã nạp","request.label":"YÊU CẦU","request.title":"Đầu vào và tùy chọn","request.prompt":"Mô tả","request.alignmentText":"Văn bản cần căn chỉnh","request.text":"Văn bản","request.soundPlaceholder":"Mô tả âm thanh hoặc bản nhạc…","request.textPlaceholder":"Nhập văn bản…","request.splitLongText":"Chia và ghép văn bản dài","request.charactersPerChunk":"Số ký tự mỗi đoạn","request.lyrics":"Lời bài hát","request.optional":"không bắt buộc","request.context":"Ngữ cảnh","request.contextHint":"thuật ngữ hoặc tên riêng, không bắt buộc","request.voiceDescription":"Mô tả giọng","request.voiceDescriptionPlaceholder":"Giọng ấm áp, điềm tĩnh, nhịp đọc vừa phải…","request.language":"Ngôn ngữ","request.autoLanguage":"để trống = tự nhận dạng","request.seed":"Seed","request.randomSeed":"-1 = ngẫu nhiên","request.maxTokens":"Số token tối đa","request.duration":"Thời lượng (giây)","request.autoDuration":"-1 = tự động","request.rewriteCaption":"Viết lại mô tả","request.rewritingCaption":"Đang viết lại mô tả...","request.minimaxFrames":"{frames} khung hình đầu ra đã căn chỉnh","request.sourceAudio":"Âm thanh nguồn","request.stopRecording":"Dừng ghi âm","request.recordingMicrophone":"Đang ghi âm từ micro","request.recordMicrophone":"Ghi âm từ micro","request.liveTitle":"Chép lời trực tiếp từ micro","request.liveDescription":"Xử lý liên tiếp các đoạn âm thanh dài bốn giây bằng chế độ phát trực tiếp của model.","request.stopLive":"Dừng chép lời trực tiếp","request.startLive":"Bắt đầu chép lời trực tiếp","voice.quickStart":"Giọng có sẵn để thử nhanh","voice.configured":"Giọng đã cấu hình","voice.useReference":"Dùng tệp âm thanh tham chiếu bên dưới","voice.bundledNote":"Âm thanh tham chiếu có sẵn và bản chép lời tương ứng được cung cấp tự động.","voice.reference":"Giọng tham chiếu","voice.required":"bắt buộc","voice.optional":"không bắt buộc","voice.referenceText":"Văn bản tham chiếu","voice.recording":"Đang ghi âm giọng tham chiếu","voice.transcript":"Bản chép lời mẫu","voice.requiredClone":"bắt buộc để sao chép giọng này","voice.recommendedClone":"nên có để sao chép giọng","voice.transcriptPlaceholder":"Nhập đúng lời nói trong âm thanh mẫu, hoặc tải tệp .txt tương ứng ở trên.","voice.saved":"Giọng đã lưu","voice.browserOnly":"chỉ lưu trong trình duyệt này","voice.chooseSaved":"Chọn giọng đã lưu...","voice.libraryName":"Tên giọng trong thư viện","voice.namePlaceholder":"Giọng tham chiếu của tôi","voice.save":"Lưu giọng","voice.clearReference":"Bỏ giọng tham chiếu","voice.preset":"Giọng có sẵn","voice.speakerReferences":"Giọng tham chiếu của người nói","voice.upToFour":"không bắt buộc, tối đa 4","voice.speaker":"Người nói {number}","voice.dialoguePlaceholder":"[S1] Lời trong giọng tham chiếu của người nói 1. [S2] Lời trong giọng tham chiếu của người nói 2.","settings.load":"Nạp thiết lập JSON","settings.save":"Lưu thiết lập JSON","history.title":"Lịch sử chạy (Thử nghiệm)","history.clear":"Xóa lịch sử","history.deleteRun":"Xóa lần chạy {id}","history.wrongModel":"Không thể mở lịch sử của {label}: model hiện tại là {model}.","history.wait":"Chờ yêu cầu hiện tại hoặc việc khôi phục thiết lập hoàn tất.","configuration.history":"Lịch sử chạy","configuration.historyLimit":"Số lần chạy tối đa được lưu","configuration.save":"Lưu cấu hình","configuration.saved":"Đã lưu cấu hình.","studio.weightsPath":"Đường dẫn trọng số trên máy chủ","studio.downloadWeights":"Tải trọng số SafeTensors","studio.format":"Định dạng model","studio.configured":"Đã cấu hình","studio.serverConfigured":"Được thiết lập trong cấu hình máy chủ","studio.loadPackage":"Nạp {package}","studio.unloadPackage":"Giải phóng {package}","studio.packageNotDownloaded":"Chưa tải {package}","run.chooseModel":"Chọn một model đã cài trước","run.installModel":"Cài model này trong mục Model trước","run.elapsed":"Thời gian xử lý đã trôi qua","result.saveArtifact":"Lưu {format}","result.videoPreview":"Xem trước video","param.omnivoice.num_inference_steps.label":"Số bước tạo giọng","param.omnivoice.guidance_scale.label":"Mức bám sát tham chiếu","param.omnivoice.speed.label":"Tốc độ đọc","param.omnivoice.instruct.label":"Chỉ dẫn phong cách / chất giọng","param.omnivoice.instruct.placeholder":"Ví dụ: Đọc với giọng nhẹ nhàng, chậm rãi","common.delete":"Xóa","common.enabled":"Đã bật","common.disabled":"Đã tắt","common.cancel":"Hủy","common.close":"Đóng","common.refresh":"Làm mới","common.browse":"Duyệt thư mục","common.apply":"Áp dụng","common.applying":"Đang áp dụng…","file.choose":"Chọn tệp","file.none":"Chưa chọn tệp","file.preview":"Nghe / xem trước","file.clear":"Bỏ tệp","options.modelParameters":"Tham số model","options.additional":"Tùy chọn bổ sung","param.minimax_h3.num_inference_steps.label":"Số bước khử nhiễu","param.minimax_h3.num_inference_steps.info":"Mười hai bước khử nhiễu giúp cân bằng chất lượng và tốc độ.","param.minimax_h3.num_frames.label":"Số khung hình đầu ra","param.minimax_h3.num_frames.info":"Được tính từ thời lượng với khoảng 24 khung hình mỗi giây đầu ra. Đổi số khung hình cũng cập nhật thời lượng.","param.minimax_h3.guidance_scale.label":"Mức bám sát mô tả","param.minimax_h3.sampler.label":"Bộ lấy mẫu","param.minimax_h3.dit_acceleration.label":"Tăng tốc DiT","param.minimax_h3.dit_acceleration.info":"None dùng toàn bộ DiT để ưu tiên chất lượng. Các chế độ tăng tốc đang thử nghiệm và có thể làm méo một số kết quả.","param.minimax_h3.return_video.label":"Giải mã video","param.minimax_h3.return_video.info":"Mặc định tắt để giảm bộ nhớ sử dụng và chỉ trả về âm thanh.","model.minimax_h3.hint":"MiniMax-H3 dùng DiT kết hợp âm thanh và video. GGUF Q4 ưu tiên chất lượng; GGUF Q4 ConvRot chỉ chạy trên CUDA, dùng thêm một ít VRAM để tăng tốc. Chế độ DiT đầy đủ mặc định ưu tiên chất lượng âm thanh và tắt giải mã video.","run.run":"Chạy","run.cancel":"Hủy","run.working":"Đang xử lý…","result.label":"KẾT QUẢ","result.title":"Đầu ra","result.track":"bản âm thanh","result.tracks":"bản âm thanh","result.saveWav":"Lưu WAV","result.empty":"Âm thanh và kết quả xử lý sẽ xuất hiện ở đây.","models.eyebrow":"THƯ VIỆN MODEL","models.title":"Các gói trên máy","models.subtitle":"Tải và quản lý các gói model ngay trong giao diện này.","models.folder":"Thư mục model","models.folderHint":"nơi tải, tìm và nạp model","models.folderPlaceholder":"thư mục models bên cạnh audiocpp_server","models.default":"Mặc định","models.useDefault":"Dùng mặc định","models.showTypes":"Hiện các loại model","models.model":"model","models.variants":"biến thể","models.update":"Cập nhật","models.reinstall":"Cài lại","models.upToDate":"Đã cập nhật","models.updateAvailable":"Có bản cập nhật","models.versionUnknown":"Chưa rõ phiên bản","models.selected":"Đã chọn","models.downloaded":"Đã tải","models.queued":"đang chờ","models.stopping":"đang dừng","models.checkingSize":"đang kiểm tra dung lượng…","models.hfAccess":"Cần quyền truy cập Hugging Face","models.sizeUnavailable":"chưa rõ dung lượng","models.stopDownload":"Dừng tải","models.cleanPartial":"Xóa phần tải dở","models.sharedPackage":"Dùng chung gói {name} ở trên.","runtime.eyebrow":"TRẠNG THÁI","runtime.title":"Nhật ký phiên","runtime.subtitle":"Các sự kiện hoạt động và yêu cầu từ trình duyệt.","runtime.status":"Trạng thái","runtime.backend":"Bộ xử lý","runtime.registered":"Đã đăng ký","runtime.resident":"Đã nạp","runtime.noEvents":"Chưa có sự kiện.","status.ready":"Sẵn sàng","status.modelReady":"{model} đã nạp và sẵn sàng.","status.runningTask":"Đang chạy {task}...","status.completeIn":"Hoàn tất sau {seconds} giây.","status.packageAvailable":"{model} sẽ dùng {format}. Đã có thể dùng trong Phòng thu.","folder.eyebrow":"THƯ MỤC MODEL","folder.title":"Chọn thư mục","folder.closeLabel":"Đóng trình duyệt thư mục","folder.loading":"Đang tải...","folder.up":"Lên một cấp","folder.loadingFolders":"Đang tải danh sách thư mục...","folder.empty":"Thư mục này không có thư mục con.","folder.select":"Chọn thư mục này","footer.embedded":"SvelteKit · tích hợp trong audiocpp_server"}')},sq={code:"zh",name:"中文",translations:{"request.minimaxFrames":"{frames} 个对齐输出帧","param.minimax_h3.num_inference_steps.label":"去噪步数","param.minimax_h3.num_inference_steps.info":"十二个去噪步骤可在质量和性能之间取得实用的平衡。","param.minimax_h3.num_frames.label":"输出帧数","param.minimax_h3.num_frames.info":"根据时长自动计算,每秒输出约 24 帧。编辑帧数也会更新时长。","param.minimax_h3.guidance_scale.label":"引导强度","param.minimax_h3.sampler.label":"采样器","param.minimax_h3.dit_acceleration.label":"DiT 加速","param.minimax_h3.dit_acceleration.info":"“none”使用质量优先的完整 DiT 路径。加速模式为实验性功能,可能使某些输出失真。","param.minimax_h3.return_video.label":"解码视频","param.minimax_h3.return_video.info":"默认禁用以减少内存占用,并仅返回音频。","model.minimax_h3.hint":"MiniMax-H3 使用联合音频/视频 DiT。GGUF Q4 是质量优先版本;仅支持 CUDA 的 GGUF Q4 ConvRot 使用稍多显存以提高速度。默认完整 DiT 路径优先保证音频质量,并禁用视频解码。","status.modelReady":"{model} 已加载并准备就绪。","status.runningTask":"正在运行{task}...","status.completeIn":"已在 {seconds} 秒内完成。","status.packageAvailable":"{model} 将使用 {format},现可在工作室中使用。","app.nativeStudio":"原生工作室","nav.studio":"工作室","nav.arena":"对比场","nav.models":"模型","nav.runtime":"运行环境","language.label":"界面语言","theme.label":"主题","theme.system":"跟随系统","theme.dark":"深色","theme.light":"浅色","workflow.tts":"文本转语音","workflow.asr":"ASR / 转录","workflow.music":"音乐 / 视频生成","workflow.vc":"语音转换","workflow.sep":"音源分离","workflow.analysis":"音频分析","workflow.design":"音色设计","studio.eyebrow":"本地音频智能","studio.title":"音频工作室","studio.subtitle.tts":"从文本生成自然语音,并在模型支持时使用预设音色或声音克隆。","studio.subtitle.asr":"将语音音频转为文本,并在模型支持时设置语言和时间戳。","studio.subtitle.music":"根据描述、歌词或参考音频创作音乐和声音。","studio.subtitle.vc":"将录音转换为另一种声音,同时保留原有的说话或演唱表现。","studio.subtitle.sep":"将录音分离为人声、乐器或其他可用音轨。","studio.subtitle.analysis":"分析语音活动、说话人、时间信息和音频对齐。","studio.subtitle.design":"根据文字描述和支持的参考控制创建或调整声音。","studio.model":"模型","studio.noModel":"未选择模型","studio.resident":"已加载","studio.notInstalled":"未安装","studio.available":"可用","studio.chooseInstalled":"选择已安装的模型","studio.notDownloaded":"未下载","studio.pathFound":"已找到路径","studio.pathMissing":"路径不存在","studio.pathUnknown":"尚未检查路径","studio.load":"加载模型","studio.unload":"卸载模型","studio.working":"处理中…","studio.bundledLoaded":"内置 · 已加载","request.label":"请求","request.title":"输入与控制","request.prompt":"提示词","request.text":"文本","request.splitLongText":"拆分并合并长文本","request.charactersPerChunk":"每段字符数","request.language":"语言","request.autoLanguage":"留空 = 自动","request.seed":"随机种子","request.randomSeed":"-1 = 随机","request.maxTokens":"最大令牌数","request.sourceAudio":"源音频","request.recordMicrophone":"录制麦克风","voice.quickStart":"快速开始演示音色","voice.useReference":"使用下方参考音频文件","voice.reference":"参考音色","voice.required":"必需","voice.optional":"可选","voice.referenceText":"参考文本","voice.transcript":"参考转录","voice.saved":"已保存音色","voice.browserOnly":"仅存储在此浏览器中","voice.chooseSaved":"选择已保存音色...","voice.libraryName":"库名称","voice.save":"保存音色","common.delete":"删除","common.cancel":"取消","common.close":"关闭","common.refresh":"刷新","common.browse":"浏览","common.apply":"应用","options.modelParameters":"模型参数","options.additional":"其他选项","run.run":"运行","run.cancel":"取消","run.working":"处理中…","result.title":"输出","result.label":"结果","result.saveWav":"保存 WAV","result.empty":"生成的音频和结构化结果将显示在这里。","models.eyebrow":"模型库","models.title":"本地软件包","models.subtitle":"无需离开原生界面即可下载和管理模型包。","models.folder":"模型文件夹","models.useDefault":"使用默认值","models.showTypes":"显示模型类型","models.stopDownload":"停止下载","models.cleanPartial":"清理部分下载","runtime.title":"会话日志","runtime.status":"状态","runtime.backend":"后端","runtime.registered":"已注册","runtime.resident":"已加载","runtime.noEvents":"暂无事件。","folder.title":"选择文件夹","folder.up":"上一级","folder.select":"选择此文件夹","common.applying":"正在应用…","common.disabled":"已禁用","common.enabled":"已启用","file.choose":"选择文件","file.none":"未选择文件","folder.closeLabel":"关闭文件夹浏览器","folder.empty":"此文件夹没有子文件夹。","folder.eyebrow":"模型文件夹","folder.loading":"正在加载...","folder.loadingFolders":"正在加载文件夹...","footer.embedded":"SvelteKit · 内置于 audiocpp_server","models.checkingSize":"正在检查大小…","models.default":"默认","models.downloaded":"已下载","models.folderHint":"用于下载、本地检测和模型加载","models.folderPlaceholder":"audiocpp_server 旁的 models 文件夹","models.hfAccess":"需要 HF 访问权限","models.model":"模型","models.queued":"排队中","models.reinstall":"重新安装","models.selected":"已选择","models.sharedPackage":"使用上方显示的共享 {name} 软件包。","models.sizeUnavailable":"大小不可用","models.stopping":"正在停止","models.update":"更新","models.updateAvailable":"有可用更新","models.upToDate":"已是最新","models.variants":"变体","models.versionUnknown":"版本未知","nav.primary":"主导航","nav.workflows":"音频工作流程","arena.eyebrow":"对比场","arena.title.tts":"TTS 对比","arena.title.vc":"语音转换对比","arena.title.asr":"ASR 对比","arena.subtitle":"用同一输入依次运行已选择的已安装模型和精度包,方便比较输出。","arena.subtitle.tts":"用同一文本依次运行已选择的 TTS 模型和精度包。","arena.subtitle.vc":"用同一源音频依次运行已选择的语音转换模型。","arena.subtitle.asr":"用同一源音频依次运行已选择的 ASR 模型并比较转录结果。","arena.mode.tts":"TTS","arena.mode.vc":"语音转换","arena.mode.asr":"ASR","arena.input.label":"输入","arena.input.title":"共享请求","arena.input.textPlaceholder":"输入一段文本,用于对比多个 TTS 模型","arena.input.groundTruth":"真实文本","arena.input.groundTruthPlaceholder":"粘贴期望转录文本以计算 WER","arena.shared":"共享","arena.voice.label":"声音","arena.voice.modelDefault":"模型默认","arena.voice.builtin":"内置演示声音","arena.voice.reference":"参考音频","arena.voice.builtinNote":"内置声音会作为 voice ID 传给每个模型。此声音来源不需要参考文本。","arena.voice.targetSpeaker":"目标说话人音频","arena.voice.clearTarget":"清除目标","arena.voice.clearReference":"清除参考","arena.options.shared":"共享选项","arena.queue.label":"队列","arena.queue.title":"模型","arena.queue.add":"添加","arena.queue.remove":"移除","arena.queue.clear":"清空","arena.queue.empty":"添加已安装模型或精度包进行对比。","arena.run":"运行对比","arena.package.label":"软件包","arena.package.configured":"已配置","arena.results.title":"比较输出","arena.results.empty":"暂无对比结果。","arena.metric.wall":"耗时","arena.metric.rtf":"RTF","arena.metric.wer":"WER","arena.itemStatus.queued":"排队中","arena.itemStatus.loading":"加载中","arena.itemStatus.running":"运行中","arena.itemStatus.done":"完成","arena.itemStatus.failed":"失败","arena.itemStatus.skipped":"跳过","arena.status.duplicate":"{model} {package} 已在对比队列中。","arena.status.loadingModel":"正在加载模型","arena.status.runningRequest":"正在运行请求","arena.status.addModel":"请至少添加一个模型到对比场。","arena.status.running":"正在运行 {mode} 对比...","arena.status.complete":"对比运行完成。","arena.note.skippedTargetVoice":"已跳过:此语音转换模型需要目标说话人音频。","arena.note.skippedReferenceText":"已跳过:此模型对所选声音输入需要参考文本。","arena.note.builtinVoice":"使用内置声音:{voice}。","arena.note.referenceVoice":"使用参考声音。","arena.note.referenceUnsupported":"使用模型默认声音;此模型不支持参考声音。","arena.note.defaultVoice":"使用默认声音:{voice}。","arena.note.skippedReferenceVoice":"已跳过:此模型需要参考声音。","arena.error.seed":"Seed 必须为 -1 或 0 到 4294967295 的无符号 32 位整数。","arena.error.jsonObject":"必须是对象","arena.error.invalidJson":"对比场选项 JSON 无效:{error}","arena.error.unregistered":"此服务器未注册已配置模型。","arena.error.notDownloaded":"{package} 未下载。","arena.error.loadFailed":"模型未加载。","arena.error.missingCatalog":"模型已不在目录中。","arena.error.enterTtsText":"请输入 TTS 对比文本。","arena.error.chooseAsrSource":"请选择 ASR 对比的源音频。","arena.error.chooseVcSource":"请选择语音转换对比的源音频。","arena.error.noAudio":"响应中没有音频。","request.alignmentText":"对齐文本","request.context":"上下文提示","request.contextHint":"可选术语或名称","request.duration":"持续时间(秒)","request.liveDescription":"使用模型的流式模式连续处理四秒请求。","request.liveTitle":"实时麦克风转录","request.lyrics":"歌词","request.optional":"可选","request.recordingMicrophone":"正在录制麦克风","request.soundPlaceholder":"描述声音或音乐…","request.startLive":"开始实时处理","request.stopLive":"停止实时处理","request.stopRecording":"停止录制","request.textPlaceholder":"输入文本…","request.voiceDescription":"音色描述","request.voiceDescriptionPlaceholder":"温暖、平静且语速适中的声音…","result.track":"音轨","result.tracks":"音轨","runtime.eyebrow":"运行环境","runtime.subtitle":"浏览器端生命周期和请求事件。","status.ready":"就绪","studio.estimatedVram":"预计 VRAM:{value} GB","studio.vram":"VRAM —","task.align":"强制对齐","task.asr":"语音转录","task.clon":"声音克隆","task.diar":"说话人分离","task.gen":"音乐生成","task.s2s":"语音编辑","task.sep":"音源分离","task.svc":"歌声音色转换","task.tts":"文本转语音","task.vad":"语音活动检测","task.vc":"语音转换","task.vdes":"音色设计","voice.bundledNote":"内置参考音频及其匹配转录将自动提供。","voice.namePlaceholder":"我的参考音色","voice.recommendedClone":"建议用于克隆","voice.recording":"正在录制参考音色","voice.requiredClone":"此声音克隆必需","voice.transcriptPlaceholder":"输入参考音频中的准确文字,或加载上方匹配的 .txt 文件。"}},Cm={"app.nativeStudio":"Native Studio","nav.apps":"Apps","nav.studio":"Studio","nav.arena":"Arena","nav.library":"Lib","nav.models":"Models","nav.runtime":"Runtime","nav.configuration":"Configuration","nav.primary":"Primary navigation","nav.workflows":"Audio workflows","language.label":"Interface language","theme.label":"Theme","theme.system":"System","theme.dark":"Dark","theme.mocha":"Catppuccin Mocha","theme.light":"Light","theme.paper":"Paper","arena.eyebrow":"ARENA","arena.title.tts":"TTS comparison","arena.title.vc":"Voice conversion comparison","arena.title.asr":"ASR comparison","arena.subtitle":"Run the same input through selected installed models and package variants, one after another.","arena.subtitle.tts":"Run the same text through selected TTS models and package variants.","arena.subtitle.vc":"Run the same source audio through selected voice conversion models.","arena.subtitle.asr":"Run the same source audio through selected ASR models and compare transcripts.","arena.mode.tts":"TTS","arena.mode.vc":"Voice conversion","arena.mode.asr":"ASR","arena.input.label":"Input","arena.input.title":"Shared request","arena.input.textPlaceholder":"Enter one prompt to compare across TTS models","arena.input.groundTruth":"Ground truth text","arena.input.groundTruthPlaceholder":"Paste the expected transcript to calculate WER","arena.shared":"shared","arena.voice.label":"Voice","arena.voice.modelDefault":"Model default","arena.voice.builtin":"Built-in demo voice","arena.voice.reference":"Reference audio","arena.voice.builtinNote":"Built-in voices are passed as voice IDs for each model. Reference text is not required for this voice source.","arena.voice.targetSpeaker":"Target speaker audio","arena.voice.clearTarget":"Clear target","arena.voice.clearReference":"Clear reference","arena.options.shared":"Shared options","arena.queue.label":"Queue","arena.queue.title":"Models","arena.queue.add":"Add","arena.queue.remove":"Remove","arena.queue.clear":"Clear","arena.queue.empty":"Add installed models or dtype packages to compare.","arena.run":"Run arena","arena.package.label":"Package","arena.package.configured":"Configured","arena.results.title":"Compare outputs","arena.results.orderSelection":"Order: selection order","arena.results.orderRtf":"Order: RTF, lowest first · completed results first","arena.results.empty":"No arena results yet.","arena.metric.wall":"wall","arena.metric.rtf":"rtf","arena.metric.wer":"wer","arena.itemStatus.queued":"queued","arena.itemStatus.loading":"loading","arena.itemStatus.running":"running","arena.itemStatus.done":"done","arena.itemStatus.failed":"failed","arena.itemStatus.skipped":"skipped","arena.status.duplicate":"{model} {package} is already in the arena.","arena.status.loadingModel":"Loading model","arena.status.runningRequest":"Running request","arena.status.addModel":"Add at least one model to the arena.","arena.status.running":"Running {mode} arena...","arena.status.complete":"Arena run complete.","arena.note.skippedTargetVoice":"Skipped because this VC model requires target speaker audio.","arena.note.skippedReferenceText":"Skipped because this model requires reference text for the selected voice input.","arena.note.builtinVoice":"Used built-in voice: {voice}.","arena.note.referenceVoice":"Used reference voice.","arena.note.referenceUnsupported":"Used default voice; reference voice is not supported.","arena.note.defaultVoice":"Used default voice: {voice}.","arena.note.skippedReferenceVoice":"Skipped because this model requires a reference voice.","arena.error.seed":"Seed must be -1 or an unsigned 32-bit integer (0 to 4294967295).","arena.error.jsonObject":"must be an object","arena.error.invalidJson":"Arena options JSON is invalid: {error}","arena.error.unregistered":"Configured model is not registered by this server.","arena.error.notDownloaded":"{package} is not downloaded.","arena.error.loadFailed":"Model did not load.","arena.error.missingCatalog":"Model is no longer in the catalog.","arena.error.enterTtsText":"Enter text for the TTS arena.","arena.error.chooseAsrSource":"Choose source audio for the ASR arena.","arena.error.chooseVcSource":"Choose source audio for the VC arena.","arena.error.noAudio":"Response did not include audio.","workflow.tts":"Text to speech","workflow.asr":"ASR / Transcription","workflow.music":"Music / video generation","workflow.vc":"Voice Conversion / S2S","workflow.enhancement":"Enhancement / denoising","models.tools":"tools","workflow.sep":"Source separation","workflow.analysis":"Audio analysis","workflow.design":"Voice design","task.tts":"Text to speech","task.clon":"Voice cloning","task.asr":"Transcription","task.gen":"Music generation","task.midi":"Audio to MIDI","task.vc":"Voice conversion","task.svc":"Singing voice conversion","task.s2s":"Speech editing","task.sep":"Source separation","task.vad":"Voice activity","task.diar":"Speaker diarization","task.align":"Forced alignment","task.vdes":"Voice design","task.wake":"Wake-word detection","task.cls":"Audio classification","studio.eyebrow":"LOCAL AUDIO INTELLIGENCE","studio.title":"Audio studio","studio.subtitle.tts":"Generate natural speech from text, with voice presets and cloning when supported.","studio.subtitle.asr":"Transcribe spoken audio into text, with language and timestamp controls when supported.","studio.subtitle.music":"Create music and sound from a prompt, lyrics, or reference audio when supported.","studio.subtitle.vc":"Convert spoken or sung voices, or get a spoken reply to audio input.","studio.subtitle.sep":"Split a recording into vocals, instruments, or other available audio stems.","studio.subtitle.analysis":"Analyze audio for speech activity, speakers, timing, and alignment.","studio.subtitle.enhancement":"Enhance audio, remove background noise, or restore bandwidth.","studio.subtitle.design":"Create or refine a voice from a written description and supported reference controls.","studio.model":"Model","studio.noModel":"No model selected","studio.resident":"Resident","studio.notInstalled":"Not installed","studio.available":"Available","studio.chooseInstalled":"Choose an installed model","studio.notDownloaded":"not downloaded","studio.pathFound":"Path found","studio.pathMissing":"Path missing","studio.pathUnknown":"Path not inspected","studio.estimatedVram":"{value} GB estimated VRAM","studio.vram":"VRAM —","studio.load":"Load model","studio.unload":"Unload model","studio.working":"Working…","studio.bundledLoaded":"Bundled · loaded","request.label":"REQUEST","request.title":"Input & controls","request.prompt":"Prompt","request.alignmentText":"Alignment text","request.text":"Text","request.soundPlaceholder":"Describe the sound or music…","request.textPlaceholder":"Enter the text…","request.splitLongText":"Split and merge long text","request.charactersPerChunk":"Characters per chunk","request.lyrics":"Lyrics","request.optional":"optional","request.context":"Context prompt","request.contextHint":"optional terminology or names","request.voiceDescription":"Voice description","request.voiceDescriptionPlaceholder":"A warm, calm voice with measured pacing…","request.language":"Language","request.autoLanguage":"blank = auto","request.seed":"Seed","request.randomSeed":"-1 = random","request.maxTokens":"Maximum tokens","request.duration":"Duration seconds","request.autoDuration":"-1 = auto","request.rewriteCaption":"Rewrite caption","request.rewritingCaption":"Rewriting caption...","request.minimaxFrames":"{frames} aligned output frames","request.sourceAudio":"Source audio","request.stopRecording":"Stop recording","request.recordingMicrophone":"Recording microphone","request.recordMicrophone":"Record microphone","request.liveTitle":"Live microphone transcription","request.liveDescription":"Processes consecutive four-second requests using the model's streaming mode.","request.stopLive":"Stop live","request.startLive":"Start live","voice.quickStart":"Quick-start voice presets (demo voices)","voice.configured":"Configured voices","voice.useReference":"Use a reference audio file below","voice.bundledNote":"The bundled reference audio and its matching transcript are supplied automatically.","voice.reference":"Reference voice","voice.required":"required","voice.optional":"optional","voice.referenceText":"Reference text","voice.recording":"Recording voice reference","voice.transcript":"Reference transcript","voice.requiredClone":"required for this voice clone","voice.recommendedClone":"recommended for cloning","voice.transcriptPlaceholder":"Type the exact words spoken in the reference audio, or load a matching .txt file above.","voice.saved":"Saved voices","voice.browserOnly":"stored only in this browser","voice.chooseSaved":"Choose a saved voice...","voice.libraryName":"Library name","voice.namePlaceholder":"My reference voice","voice.save":"Save voice","voice.clearReference":"Clear reference","voice.preset":"Voice preset","voice.speakerReferences":"Speaker references","voice.upToFour":"optional, up to 4","voice.speaker":"Speaker {number}","voice.dialoguePlaceholder":"[S1] Words spoken in Speaker 1's reference. [S2] Words spoken in Speaker 2's reference.","settings.load":"Load settings JSON","settings.save":"Save settings JSON","history.title":"Run history (Experimental)","history.clear":"Clear history","history.deleteRun":"Delete generation {id}","history.wrongModel":"Cannot open history for {label}: the current model is {model}.","history.wait":"Wait for the current request or settings restore to finish.","configuration.history":"Run History","configuration.historyLimit":"Maximum retained runs","configuration.save":"Save configuration","configuration.saved":"Configuration saved.","studio.weightsPath":"Weights path on server","studio.downloadWeights":"Download SafeTensors weights","studio.format":"Model format","studio.configured":"Configured","studio.serverConfigured":"Configured by server config","studio.loadPackage":"Load {package}","studio.unloadPackage":"Unload {package}","studio.packageNotDownloaded":"{package} is not downloaded","run.chooseModel":"Choose an installed model first","run.installModel":"Install this model from the Models tab first","run.elapsed":"Elapsed generation time","result.saveArtifact":"Save {format}","result.videoPreview":"Video preview","common.delete":"Delete","common.enabled":"Enabled","common.disabled":"Disabled","common.cancel":"Cancel","common.close":"Close","common.refresh":"Refresh","common.browse":"Browse","common.apply":"Apply","common.applying":"Applying…","file.choose":"Choose file","file.none":"No file chosen","file.preview":"Preview","file.clear":"Clear file","options.modelParameters":"Model parameters","options.additional":"Additional options","param.minimax_h3.num_inference_steps.label":"Denoising steps","param.minimax_h3.num_inference_steps.info":"Twelve denoising steps provide a practical quality and performance balance.","param.minimax_h3.num_frames.label":"Output frames","param.minimax_h3.num_frames.info":"Calculated from duration at approximately 24 frames per output second. Editing frames also updates duration.","param.minimax_h3.guidance_scale.label":"Guidance scale","param.minimax_h3.sampler.label":"Sampler","param.minimax_h3.dit_acceleration.label":"DiT acceleration","param.minimax_h3.dit_acceleration.info":"None uses the quality-first full-DiT path. Acceleration modes are experimental and may distort some outputs.","param.minimax_h3.return_video.label":"Decode video","param.minimax_h3.return_video.info":"Disabled by default to reduce memory use and return audio only.","model.minimax_h3.hint":"MiniMax-H3 uses a joint audio/video DiT. GGUF Q4 is the quality-first choice; CUDA-only GGUF Q4 ConvRot uses slightly more VRAM for higher speed. The default full-DiT path prioritizes audio quality and video decoding is disabled.","run.run":"Run","run.cancel":"Cancel","run.working":"Working…","result.label":"RESULT","result.title":"Output","result.track":"track","result.tracks":"tracks","result.saveWav":"Save WAV","result.empty":"Generated audio and structured results appear here.","models.eyebrow":"MODEL LIBRARY","models.title":"Local packages","models.subtitle":"Download and manage model packages without leaving the native interface.","models.folder":"Models folder","models.folderHint":"downloads, local detection, and model loading","models.folderPlaceholder":"models folder beside audiocpp_server","models.default":"Default","models.useDefault":"Use default","models.showTypes":"Show model types","models.model":"model","models.variants":"variants","models.update":"Update","models.reinstall":"Reinstall","models.upToDate":"Up to date","models.updateAvailable":"Update available","models.versionUnknown":"Version unknown","models.selected":"Selected","models.downloaded":"Downloaded","models.queued":"queued","models.stopping":"stopping","models.checkingSize":"checking size…","models.hfAccess":"HF access required","models.sizeUnavailable":"size unavailable","models.stopDownload":"Stop download","models.cleanPartial":"Clean partial download","models.sharedPackage":"Uses the shared {name} package shown above.","runtime.eyebrow":"RUNTIME","runtime.title":"Session log","runtime.subtitle":"Browser-side lifecycle and request events.","runtime.status":"Status","runtime.backend":"Backend","runtime.registered":"Registered","runtime.resident":"Resident","runtime.noEvents":"No events yet.","runtime.serverLogNotice":"This panel shows UI events, not server logs. Add --log --log-file server.log to your server startup command, then open server.log on the server machine.","status.ready":"Ready","status.modelReady":"{model} is resident and ready.","status.runningTask":"Running {task}...","status.completeIn":"Complete in {seconds}s.","status.packageAvailable":"{model} will use {format}. It is available in Studio.","folder.eyebrow":"MODELS FOLDER","folder.title":"Choose a folder","folder.closeLabel":"Close folder browser","folder.loading":"Loading...","folder.up":"Up one level","folder.loadingFolders":"Loading folders...","folder.empty":"This folder has no subfolders.","folder.select":"Select this folder","footer.embedded":"SvelteKit · embedded in audiocpp_server"},rq=Object.assign({"../../lang/lang_it.json":eq,"../../lang/lang_ja.json":tq,"../../lang/lang_pl.json":aq,"../../lang/lang_ru.json":iq,"../../lang/lang_vi.json":nq,"../../lang/lang_zh.json":sq}),gf=new Map([["en",Cm]]),_b=[{code:"en",name:"English"}];for(const[a,t]of Object.entries(rq).sort(([i],[n])=>i.localeCompare(n))){const i=a.match(/lang_([^/\\.]+)\.json$/)?.[1]?.toLowerCase(),n=(t.code||i||"").trim().toLowerCase();!n||n==="en"||!t.name||!t.translations||(gf.set(n,t.translations),_b.push({code:n,name:t.name}))}const oq=_b;function vb(a){const t=gf.get(a)||Cm;return(i,n={},s=i)=>{let r=t[i]||Cm[i]||s;for(const[o,l]of Object.entries(n))r=r.replaceAll(`{${o}}`,String(l));return r}}function bb(a){for(const t of a){const i=t.toLowerCase();if(gf.has(i))return i;const n=i.split("-")[0];if(gf.has(n))return n}return"en"}var lq=ae(' '),cq=ae('',2),dq=ae(''),uq=ae('
');function rs(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y();let r=xe(t,"file",8,null),o=xe(t,"src",8,""),l=xe(t,"name",8,""),c=xe(t,"kind",8,"audio"),d=xe(t,"label",8,"Preview"),g=Y(""),h=Y(null),m=Y("");function p(){e(g)&&(URL.revokeObjectURL(e(g)),y(g,""))}ur(p),Ee(()=>(K(r()),e(h)),()=>{r()!==e(h)&&(p(),y(h,r()),r()&&y(g,URL.createObjectURL(r())))}),Ee(()=>(e(g),K(o())),()=>{y(i,e(g)||o())}),Ee(()=>(e(i),e(m)),()=>{y(n,!!e(i)&&e(m)===e(i))}),Ee(()=>(K(r()),K(l())),()=>{y(s,r()?.name||l())}),kn(),Xi();var u=ys(),f=ht(u);{var _=b=>{var v=uq(),T=k(v),S=k(T),M=k(S,!0);w(S);var P=q(S,2);{var B=A=>{var N=lq(),H=k(N,!0);w(N),ie(()=>W(H,e(s))),J(A,N)};ve(P,A=>{e(s)&&A(B)})}w(T);var C=q(T,2);{var j=A=>{var N=cq();ie(()=>_e(N,"src",e(i))),re("error",N,()=>y(m,e(i))),J(A,N)},G=A=>{var N=dq();ie(()=>_e(N,"src",e(i))),re("error",N,()=>y(m,e(i))),J(A,N)};ve(C,A=>{c()==="video"?A(j):A(G,-1)})}w(v),ie(()=>W(M,d())),J(b,v)};ve(f,b=>{e(i)&&!e(n)&&b(_)})}J(a,u),Ei()}var fq=ae('
LoRA adapter
');function Am(a,t){let i=xe(t,"selected",8,0);var n=fq(),s=k(n),r=k(s);SS(r,{size:16});var o=q(r,2),l=k(o,!0);w(o),w(s);var c=q(s,2),d=k(c);q4(d,t,"default",{}),w(c),w(n),ie(()=>W(l,i()>1?`${i()} selected`:i()?"Selected":"None")),J(a,n)}var yb=ae(" "),pq=ae('

',1);function mq(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y();let r=xe(t,"specs",8),o=xe(t,"values",8),l=xe(t,"editable",8,!1),c=xe(t,"busy",8,!1),d=xe(t,"onChange",8),g=xe(t,"onBrowse",8);Ee(()=>K(r()),()=>{y(i,r().find(u=>u.name==="lora"))}),Ee(()=>K(r()),()=>{y(n,r().find(u=>u.name==="lora_scale"))}),Ee(()=>K(o()),()=>{y(s,String(o().lora??"").trim())}),kn(),Xi();var h=ys(),m=ht(h);{var p=u=>{{let f=Lt(()=>e(s)?1:0);Am(u,{get selected(){return e(f)},children:(_,b)=>{var v=pq(),T=ht(v),S=k(T,!0);w(T);var M=q(T,2),P=k(M),B=q(k(P),2),C=k(B);Pt(C);var j=q(C,2);w(B),w(P);var G=q(P,2),A=q(k(G),2);Pt(A),w(G),w(M);var N=q(M,2);{var H=V=>{var D=yb(),$=k(D,!0);w(D),ie(()=>W($,(e(i),x(()=>e(i).info)))),J(V,D)};ve(N,V=>{e(i),x(()=>e(i).info)&&V(H)})}var E=q(N,2);{var U=V=>{var D=yb(),$=k(D,!0);w(D),ie(()=>W($,(e(n),x(()=>e(n).info)))),J(V,D)};ve(E,V=>{e(n),x(()=>e(n).info)&&V(U)})}var O=q(E,2);ie((V,D)=>{W(S,l()?"Applied when the model loads. Reload or generate to apply changes.":"Managed by the server configuration. Set the adapter and strength in its session options."),bi(C,V),C.disabled=c()||!l(),j.disabled=c()||!l(),_e(A,"step",(e(n),x(()=>e(n).step))),_e(A,"min",(e(n),x(()=>e(n).minimum))),_e(A,"max",(e(n),x(()=>e(n).maximum))),bi(A,D),A.disabled=c()||!l()||!e(s),O.disabled=c()||!l()||!e(s)},[()=>(K(o()),x(()=>String(o().lora??""))),()=>(K(o()),x(()=>String(o().lora_scale??"")))]),re("input",C,V=>d()(e(i),V.currentTarget.value.trim())),re("click",j,()=>g()(e(i))),re("input",A,V=>{V.currentTarget.value===""?d()(e(n),""):Number.isFinite(V.currentTarget.valueAsNumber)&&d()(e(n),V.currentTarget.valueAsNumber)}),re("click",O,()=>{d()(e(i),""),d()(e(n),e(n).default??"")}),J(_,v)},$$slots:{default:!0}})}};ve(m,u=>{e(i)&&e(n)&&u(p)})}J(a,h),Ei()}var hf=ae(""),wb=ae(""),gq=ae(" ",1);function kb(a,t){zi(t,!1);let i=xe(t,"id",8),n=xe(t,"value",8,""),s=xe(t,"presets",24,()=>[]),r=xe(t,"savedVoices",24,()=>[]),o=xe(t,"presetLabel",8),l=xe(t,"emptyLabel",8),c=xe(t,"allowEmpty",8,!0),d=xe(t,"referenceOption",8,!1),g=xe(t,"disabled",8,!1),h=xe(t,"tr",8),m=xe(t,"onselect",8);Xi();var p=gq(),u=ht(p),f=k(u,!0);w(u);var _=q(u,2),b=k(_);{var v=G=>{var A=hf(),N=k(A,!0);w(A),A.value=A.__value="",ie(()=>W(N,l())),J(G,A)};ve(b,G=>{c()&&G(v)})}var T=q(b);{var S=G=>{var A=hf(),N=k(A,!0);w(A),A.value=A.__value="reference",ie(H=>W(N,H),[()=>(K(h()),x(()=>h()("arena.voice.reference")))]),J(G,A)};ve(T,G=>{d()&&G(S)})}var M=q(T);{var P=G=>{var A=wb();Ct(A,5,s,Kt,(N,H)=>{var E=hf(),U=k(E,!0);w(E);var O={};ie(()=>{W(U,e(H)),O!==(O=`preset:${e(H)}`)&&(E.value=E.__value=`preset:${e(H)}`)}),J(N,E)}),w(A),ie(()=>_e(A,"label",o())),J(G,A)};ve(M,G=>{K(s()),x(()=>s().length)&&G(P)})}var B=q(M);{var C=G=>{var A=wb();Ct(A,5,r,Kt,(N,H)=>{var E=hf(),U=k(E,!0);w(E);var O={};ie(()=>{W(U,(e(H),x(()=>e(H).name))),O!==(O=(e(H),x(()=>`saved:${e(H).id}`)))&&(E.value=(E.__value=(e(H),x(()=>`saved:${e(H).id}`)))??"")}),J(N,E)}),w(A),ie(N=>_e(A,"label",N),[()=>(K(h()),x(()=>h()("voice.saved")))]),J(G,A)};ve(B,G=>{K(r()),x(()=>r().length)&&G(C)})}w(_);var j;On(_),ie(G=>{_e(u,"for",i()),W(f,G),_e(_,"id",i()),_.disabled=g(),j!==(j=n())&&(_.value=(_.__value=n())??"",xn(_,n()))},[()=>(K(h()),x(()=>h()("arena.voice.label")))]),re("change",_,G=>m()(G.currentTarget.value)),J(a,p),Ei()}const hq=/^\s*(Speaker\s+\d+\s*:)\s*(.*)$/i,xb=new Set(["。","!","?","!","?",";",";","…","."]),_q=new Set(["mr","mrs","ms","dr","prof","sr","jr","st","mt","rev","hon","vs","etc","eg","ie","approx","dept","est","fig","no","vol","jan","feb","mar","apr","jun","jul","aug","sep","sept","oct","nov","dec","inc","ltd","co","corp"]);function Sb(a){return a>="0"&&a<="9"}function vq(a){return/[\p{L}\p{N}']/u.test(a)}function bq(a,t){const i=a[t+1];if(i!==void 0&&!/\s/.test(i)||t>0&&Sb(a[t-1])&&i!==void 0&&Sb(i))return!1;let n=t;for(;n>0&&vq(a[n-1]);)n-=1;const s=a.slice(n,t);return s.length===1&&/\p{L}/u.test(s)?!1:!_q.has(s.toLowerCase())}function yq(a){const t=[];let i=0;for(let n=0;nt;){let s=n.lastIndexOf(" ",t);s<=0&&(s=t);const r=n.slice(0,s).trim();r&&i.push(r),n=n.slice(s).trim()}return n&&i.push(n),i}function kq(a,t){const i=hq.exec(a),n=i?`${i[1]} `:"",s=i?i[2]:a.trim(),r=Math.max(1,t-n.length),o=yq(s);o.length||o.push(s);const l=[];let c="",d="";for(const g of o){const h=g.trimEnd();if(!h)continue;const m=g.slice(h.length);if(c&&c.length+d.length+h.length>r&&(l.push(n+c.trim()),c="",d=""),h.length<=r){c=c?`${c}${d}${h}`:h,d=m;continue}c&&(l.push(n+c.trim()),c="",d="");for(const p of wq(h,r))l.push(n+p)}return c&&l.push(n+c.trim()),l.length?l:[a]}function _f(a,t){const i=[];for(const o of a.split(/\r?\n/))o.trim()&&i.push(...o.length>t?kq(o,t):[o]);const n=[];let s=[],r=0;for(const o of i){const l=s.length?1:0;s.length&&r+l+o.length>t&&(n.push(s.join(` +`)}else o=!1;for(const u of m){const f=yT(u);if(!f)continue;if(f==="[DONE]"){c=!0;break}const _=JSON.parse(f);if(_?.type==="error")throw new Error(_.error?.message||"The stream failed.");(_?.type==="task.stream.event"||_?.type==="task.stream.done")&&(_.type==="task.stream.done"&&(l=!0),yield _)}}}finally{d||await n.cancel().catch(()=>{})}if(!l)throw new ub}function mf(a){const t=atob(a),i=new Uint8Array(t.length);for(let n=0;n=1 disable nucleus filtering."},{name:"repetition_penalty",type:"float",default:1,required:!1,description:"Token repetition penalty. Must be positive."},{name:"seed",type:"int",default:42,required:!1,description:"Sampling seed. Parsed as a signed integer and converted to uint32."}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",default:"native",required:!1,description:"Weight storage type; native preserves the packaged tensor types."},{name:"lora",type:"path",required:!1,description:"Matching PEFT LoRA adapter directory or checkpoint file; merged at session creation. Keep adapter_config.json beside the weights."},{name:"lora_scale",type:"float",default:1,required:!1,description:"Multiplier for the adapter's alpha/r scaling."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Audio-Flamingo-GGUF",revision:"main",gated:!1}},packages:[{id:"audio_flamingo_next_q4_k",display_name:"Audio Flamingo Next GGUF Q4_K",default:!0,format:"gguf",precision:"q4_k",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-next-q4_k.gguf"]},{id:"audio_flamingo_next_q8_0",display_name:"Audio Flamingo Next GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-next-q8_0.gguf"]},{id:"audio_flamingo_next_bf16",display_name:"Audio Flamingo Next GGUF BF16",format:"gguf",precision:"bf16",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-next-bf16.gguf"]},{id:"audio_flamingo_3_q4_k",display_name:"Audio Flamingo 3 GGUF Q4_K",format:"gguf",precision:"q4_k",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-3-q4_k.gguf"]},{id:"audio_flamingo_3_q8_0",display_name:"Audio Flamingo 3 GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-3-q8_0.gguf"]},{id:"audio_flamingo_3_bf16",display_name:"Audio Flamingo 3 GGUF BF16",format:"gguf",precision:"bf16",target_directory:"Audio-Flamingo-GGUF",files:["audio-flamingo-3-bf16.gguf"]},{id:"music_flamingo_2601_q8_0",display_name:"Music Flamingo 2601 GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Audio-Flamingo-GGUF",files:["music-flamingo-2601-q8_0.gguf"]}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/audio_flamingo.md"],recommended_package:"audio_flamingo_next_q4_k"},sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",chat_template:"model:chat_template.jinja"},tensors:{weights:{source:"model:model.safetensors"}}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",chat_template:"model:chat_template.jinja"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},CT={schema_version:1,family:"audiosr",display_name:"AudioSR",description:"AudioSR performs latent-diffusion audio super-resolution from an input waveform.",category:"audio_tools",status:"experimental",tasks:["s2s"],modes:["offline"],languages:["auto"],runtime:{tags:["gguf","cuda"]},capabilities:{s2s:["audio_enhancement"]},options:{request:[{name:"num_inference_steps",type:"int",description:"DDIM inference steps. The uniform DDIM schedule must produce exactly this many timesteps; not every count is valid (e.g. 51 fails with 1000 diffusion timesteps).",required:!1,min:1,max:1e3,default:50},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale. Any finite value is accepted.",required:!1,default:3.5},{name:"ddim_eta",type:"float",description:"DDIM eta; 1.0 matches the official AudioSR default. Must be nonnegative; there is no runtime upper bound.",required:!1,min:0,default:1},{name:"audio_chunk_duration_sec",type:"float",description:"Long-audio chunk duration.",required:!1,min:.001,default:15},{name:"audio_chunk_overlap_sec",type:"float",description:"Long-audio chunk overlap; must be smaller than audio_chunk_duration_sec, including after rounding to samples.",required:!1,min:0,default:2},{name:"seed",type:"int",description:"Generation seed; omitted or negative values use the fixed seed 42, not a random seed. Zero is a fixed seed.",required:!1,max:2147483647,default:42}],session:[{name:"weight_type",type:"enum",description:"AudioSR weight storage type.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"audiosr_basic_f32",display_name:"AudioSR Basic F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"AudioSR-GGUF",files:["AudioSR-GGUF/audiosr-basic-f32.gguf"],strip_prefix:"AudioSR-GGUF"}],dependencies:[],ui:{recommended_package:"audiosr_basic_f32",tags:["GGUF"],docs:["docs/models/audiosr.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{weights:{source:"weights:"},frontend:{source:"weights:",prefix:"frontend"}}}]},AT={schema_version:1,family:"auk",display_name:"AuK",description:"Tencent AuK base and AuK-Flash speech generation and editing models.",category:"tts",status:"experimental",tasks:["tts","clone","edit"],modes:["offline"],languages:["auto"],runtime:{tags:["cuda","gguf"]},ui:{recommended_package:"auk_base_f32",tags:["TTS","Edit"],docs:["docs/models/auk.md"]},capabilities:{tts:["speaker_reference"],clone:["speaker_reference"],edit:["prompt_editing"]},options:{request:[{name:"instruct",type:"string",description:"TTS voice description. Without it, text carries the complete upstream instruction; editing instructions always go in text.",required:!1},{name:"duration_sec",type:"float",description:"Positive output duration in seconds. Required without reference audio; otherwise defaults to the valid reference duration.",required:!1},{name:"num_inference_steps",type:"int",description:"Euler sampling steps for AuK base; AuK-Flash always uses its fixed four-step schedule.",required:!1,min:1,default:32},{name:"guidance_scale",type:"float",description:"Batched guidance strength for AuK base; AuK-Flash always disables classifier-free guidance.",required:!1,default:2},{name:"sway_sampling_coef",type:"float",description:"Sway coefficient for AuK base; ignored by AuK-Flash.",required:!1,default:-1},{name:"seed",type:"int",description:"Nonnegative noise seed, or -1 for a random seed.",required:!1,min:-1,default:-1}],session:[{name:"variant",type:"enum",values:["base","flash"],description:"AuK generation schedule; select flash with an AuK-Flash component.",required:!1,default:"base"},{name:"model_gguf",type:"string",description:"AuK base or Flash generator GGUF relative to the model root; defaults to the selected variant's F32 file.",required:!1},{name:"qwen_gguf",type:"string",description:"Qwen2.5-Omni-3B conditioning GGUF relative to the model root.",required:!1,default:"qwen2.5-omni-3b-bf16.gguf"},{name:"vae_gguf",type:"string",description:"AuK VAE GGUF relative to the model root.",required:!1,default:"auk-vae-f32.gguf"},{name:"attention",type:"enum",values:["auto","flash","eager"],description:"Flow-model attention mode.",required:!1,default:"auto"},{name:"mem_saver",type:"bool",description:"Release Qwen conditioning and generation weights between stages to reduce peak VRAM.",required:!1,default:!1}],load:[]},dependencies:[],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/AuK-Base-and-Flash-GGUF",revision:"main",gated:!1}},packages:[{id:"auk_base_f32",display_name:"AuK Base F32",default:!0,format:"gguf",precision:"f32",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-base-f32.gguf"]},{id:"auk_base_f16",display_name:"AuK Base F16",format:"gguf",precision:"f16",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-base-f16.gguf"]},{id:"auk_base_q8_0",display_name:"AuK Base Q8_0",format:"gguf",precision:"q8_0",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-base-q8_0.gguf"]},{id:"auk_flash_f32",display_name:"AuK-Flash F32",format:"gguf",precision:"f32",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-flash-f32.gguf"]},{id:"auk_flash_f16",display_name:"AuK-Flash F16",format:"gguf",precision:"f16",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-flash-f16.gguf"]},{id:"auk_flash_q8_0",display_name:"AuK-Flash Q8_0",format:"gguf",precision:"q8_0",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-flash-q8_0.gguf"]},{id:"auk_qwen_bf16",display_name:"AuK Qwen BF16",format:"gguf",precision:"bf16",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","qwen2.5-omni-3b-bf16.gguf"]},{id:"auk_qwen_q8_0",display_name:"AuK Qwen Q8_0",format:"gguf",precision:"q8_0",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","qwen2.5-omni-3b-q8_0.gguf"]},{id:"auk_vae_f32",display_name:"AuK VAE F32",format:"gguf",precision:"f32",target_directory:"AuK-Base-and-Flash-GGUF",files:["config/auk-base.yaml","config/auk-flash.yaml","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","auk-vae-f32.gguf"]}],sources:[{format:"gguf",roots:{model:"."},files:{base_config:"model:config/auk-base.yaml",flash_config:"model:config/auk-flash.yaml",tokenizer_json:"model:tokenizer/tokenizer.json",tokenizer_config:"model:tokenizer/tokenizer_config.json"}}]},GT={schema_version:1,family:"breeze_tts",display_name:"BreezeTTS 2",description:"BreezeTTS 2 native GGUF package for instruction-conditioned text-to-speech and prompt-audio voice cloning with T5Gemma text conditioning, Qwen-style acoustic code generation, depth codebook decoding, and Mimi waveform decoding.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["zh","en"],runtime:{tags:["gguf"]},dependencies:[],capabilities:{design:["voice_design"],tts:["style_control"],clone:["speaker_reference"]},options:{request:[{name:"instruct",type:"string",description:"BreezeTTS generation instruction.",required:!1,default:"Speak clearly and naturally."},{name:"reference_text",type:"string",description:"Transcript for prompt/reference audio; required when reference audio codes are used, for either tts or clon.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 600.",required:!1,min:1,default:600},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"max_tokens",type:"int",description:"Maximum generated BreezeTTS acoustic frames.",required:!1,min:1,default:1500},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale.",required:!1,min:0,default:1},{name:"temperature",type:"float",description:"Backbone first-codebook sampling temperature. Must be > 0.",required:!1,min:0,default:.9},{name:"depth_temperature",type:"float",description:"Depth decoder codebook sampling temperature. Must be > 0.",required:!1,min:0,default:.9},{name:"top_k",type:"int",description:"Top-k sampling limit; 0 disables top-k filtering. Nonpositive values disable top-k filtering.",required:!1,default:50},{name:"top_p",type:"float",description:"Positive nucleus sampling cutoff; values >=1 disable nucleus filtering.",required:!1,min:0,default:1},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,default:0},{name:"stream_frames_per_event",type:"int",description:"Maximum generated codec frames per streaming audio event; fixed size with stream_chunk_policy=fixed.",required:!1,min:1,default:16},{name:"stream_lookahead_margin",type:"int",description:"Additional trailing codec frames buffered before streaming emission. The decoder is causal; zero minimizes latency.",required:!1,min:0,default:0},{name:"stream_chunk_policy",type:"enum",description:"Streaming chunk schedule: grow emits 1, 2, 4, ... frames up to stream_frames_per_event; fixed uses that size from the first event.",values:["grow","fixed"],required:!1,default:"grow"}],session:[{name:"weight_type",type:"enum",description:"BreezeTTS matmul weight storage type; default native.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"]},{name:"graph_arena_mb",type:"int",description:"Reusable runtime graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 4.",required:!1,min:1,default:4},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse.",required:!1,min:0,default:1},{name:"attention",type:"enum",description:"Attention lowering; auto probes the backend and falls back to eager on GPUs without a flash kernel (e.g. sm70); default auto.",required:!1,values:["auto","flash","eager"],default:"auto"},{name:"bf16_activations",type:"enum",description:"Reference bf16 activation rounding as the official BreezeTTS 2 inference does it. auto = on for CUDA/HIP/Vulkan and off on Metal, where the cast cost is visible even with the fused round-to-bf16 op (~20% slower AR loop); on/off force it either way. On Metal, on also switches the KV cache to bf16 to match the reference implementation.",required:!1,values:["auto","on","off"],default:"auto"},{name:"perf_mode",type:"enum",description:"AR decode preset. off uses the normal defaults (fused_depth, direct_prefill and skip_cache_round enabled on CUDA, Vulkan and Metal); cuda_perf additionally enables batched_cfg on CUDA. Explicit session options override the preset.",required:!1,values:["off","cuda_perf"],default:"off"},{name:"fused_depth",type:"bool",description:"Decode each frame's depth codebooks in one backend graph with device-side CFG mixing and sampling. Device sampling uses the per-codebook path's torch random draws, so CUDA output normally matches it token for token. Vulkan/Metal sampling uses a different draw mapping. CUDA, Vulkan and Metal only.",required:!1,default:!0},{name:"direct_prefill",type:"bool",description:"Offline generation prefills the backbone straight into the decode cache, as streaming does, instead of exporting the KV state to the host and importing it back. Same computation. CUDA, Vulkan and Metal only.",required:!1,default:!0},{name:"skip_cache_round",type:"bool",description:"Skip re-rounding the F16 KV cache to bf16 after each update, which is an identity because the K/V rows are already bf16-rounded. Applies only with the bf16 reference path and flash attention. CUDA, Vulkan and Metal only.",required:!1,default:!0},{name:"round_bf16_fusion",type:"bool",description:"Fold the bf16 activation rounding into the CUDA RMS-norm, add and SwiGLU kernels that produce it. Bit-identical to the unfused graph, with fewer kernel launches. CUDA only.",required:!1,default:!1},{name:"batched_cfg",type:"bool",description:"With guidance_scale != 1, decode the conditional and unconditional backbone branches as one batch-2 step. Batching changes matmul accumulation order, so output differs from the two-runtime path. CUDA only.",required:!1,default:!1}],load:[]},packages:[{id:"breeze_tts_2_q4_0",display_name:"BreezeTTS 2 Q4_0 GGUF",default:!1,format:"gguf",precision:"q4_0",target_directory:"Breeze-TTS-2-GGUF",files:["Breeze-TTS-2-GGUF/breeze-tts-2-q4_0.gguf"],strip_prefix:"Breeze-TTS-2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"breeze_tts_2_q8_0",display_name:"BreezeTTS 2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Breeze-TTS-2-GGUF",files:["Breeze-TTS-2-GGUF/breeze-tts-2-q8_0.gguf"],strip_prefix:"Breeze-TTS-2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"breeze_tts_2_bf16",display_name:"BreezeTTS 2 BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"Breeze-TTS-2-GGUF",files:["Breeze-TTS-2-GGUF/breeze-tts-2-bf16.gguf"],strip_prefix:"Breeze-TTS-2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}}],ui:{recommended_package:"breeze_tts_2_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config_json:"model:config.json",audio_tokenizer_config_json:"model:audio_tokenizer/config.json",tokenizer_config_json:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{model_weights:{source:"weights:",prefix:"model"}}}]},FT={schema_version:1,family:"bs_roformer",display_name:"BS-RoFormer",description:"Band-Split RoFormer music source-separation model that estimates vocals from explicit non-overlapping frequency bands and derives accompaniment from the input mixture.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},options:{request:[],session:[{name:"weight_type",type:"enum",description:"RoFormer weight storage type. Defaults to f32 when the backend requires a host graph plan, otherwise native.",preset:"weight_type_full",required:!1},{name:"num_overlap",type:"int",description:"Number of overlapping inference windows; defaults to the package configuration. Lower values improve throughput but can reduce boundary quality.",required:!1,min:1}],load:[]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"bs_roformer_q8_0",display_name:"BS-RoFormer ep368 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"BS-RoFormer-ep368-GGUF",files:["BS-RoFormer-ep368-GGUF/bs-roformer-ep368-q8_0.gguf"],strip_prefix:"BS-RoFormer-ep368-GGUF"}],dependencies:[],ui:{recommended_package:"bs_roformer_q8_0",tags:["Sep","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md","tests/bs_roformer/README.md"]}},MT={schema_version:1,family:"builtin_audio_utils",display_name:"Built-in Audio Utilities",description:"Built-in denoise, enhancement, and audio super-resolution utilities with separately downloaded weights.",category:"audio_tools",status:"experimental",tasks:["s2s"],modes:["offline"],languages:["auto"],runtime:{tags:["cpu","cuda"]},capabilities:{s2s:["audio_enhancement"]},options:{request:[],session:[],load:[{name:"utility",type:"enum",values:["deepfilternet2","rnnoise","zipenhancer","gtcrn","gtcrn_streaming","gtcrn_dns3","gtcrn_vctk","flashsr"],required:!0,description:"Utility implementation to load from the model path."}]},packages:[],dependencies:[],ui:{tags:[],docs:["docs/audio_tools.md"]},sources:[]},zT={family:"canary_asr",schema_version:1,display_name:"Canary 180M Flash",description:"NVIDIA Canary multilingual speech recognition and speech translation.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en","de","es","fr"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Input audio language.",required:!1,default:"en"},{name:"target_language",type:"string",description:"Output language: en, de, es, or fr. Defaults to the input language for transcription.",required:!1},{name:"punc",type:"bool",description:"Generate punctuation and capitalization.",required:!1,default:!0},{name:"max_tokens",type:"int",description:"Maximum generated tokens per chunk; zero uses the reference encoder-length-based limit.",required:!1,min:0,max:1015,default:0},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio chunk in seconds.",required:!1,min:.02,max:40,default:40}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage type.",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"],required:!1,default:"native"}],load:[]},runtime:{tags:["gguf","cpu","cuda"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/canary_asr.md"],recommended_package:"canary_180m_flash_f32"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"canary_180m_flash_f32",display_name:"Canary 180M Flash GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"Canary-180M-Flash-GGUF",files:["Canary-180M-Flash-GGUF/canary-180m-flash-f32.gguf"],strip_prefix:"Canary-180M-Flash-GGUF"},{id:"canary_180m_flash_q8_0",display_name:"Canary 180M Flash GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Canary-180M-Flash-GGUF",files:["Canary-180M-Flash-GGUF/canary-180m-flash-q8_0.gguf"],strip_prefix:"Canary-180M-Flash-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_spl_tokens:"model:tokenizer_spl_tokens.model",tokenizer_en:"model:tokenizer_en.model",tokenizer_de:"model:tokenizer_de.model",tokenizer_es:"model:tokenizer_es.model",tokenizer_fr:"model:tokenizer_fr.model"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_spl_tokens:"model:tokenizer_spl_tokens.model",tokenizer_en:"model:tokenizer_en.model",tokenizer_de:"model:tokenizer_de.model",tokenizer_es:"model:tokenizer_es.model",tokenizer_fr:"model:tokenizer_fr.model"},tensors:{weights:"weights:"}}]},ET={schema_version:1,family:"ced",display_name:"CED Audio Tagging",description:"Consistent Ensemble Distillation ViT audio classifiers for 527 AudioSet sound categories.",category:"speech_analysis",status:"supported",tasks:["classify"],modes:["offline"],languages:["language_agnostic"],capabilities:{classify:["scores"]},runtime:{tags:["gguf"]},options:{request:[{name:"top_k",type:"int",description:"Number of highest-scoring AudioSet categories returned.",required:!1,default:10,min:1,max:527}],session:[{name:"attention",type:"enum",description:"Attention implementation; auto selects a supported fast path.",required:!1,default:"auto",values:["auto","flash","eager"]},{name:"weight_type",type:"enum",description:"Weight storage override; native preserves packaged tensor types.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"]}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"ced_tiny_f32",display_name:"CED Tiny F32 GGUF",format:"gguf",precision:"f32",default:!0,target_directory:"CED-GGUF",files:["CED-GGUF/ced-tiny-f32.gguf"],strip_prefix:"CED-GGUF"},{id:"ced_mini_f32",display_name:"CED Mini F32 GGUF",format:"gguf",precision:"f32",target_directory:"CED-GGUF",files:["CED-GGUF/ced-mini-f32.gguf"],strip_prefix:"CED-GGUF"},{id:"ced_small_f32",display_name:"CED Small F32 GGUF",format:"gguf",precision:"f32",target_directory:"CED-GGUF",files:["CED-GGUF/ced-small-f32.gguf"],strip_prefix:"CED-GGUF"},{id:"ced_base_f32",display_name:"CED Base F32 GGUF",format:"gguf",precision:"f32",target_directory:"CED-GGUF",files:["CED-GGUF/ced-base-f32.gguf"],strip_prefix:"CED-GGUF"}],dependencies:[],ui:{recommended_package:"ced_tiny_f32",tags:["Classify","GGUF"],docs:["docs/models/ced.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor:"model:preprocessor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor:"model:preprocessor_config.json"},tensors:{weights:"model:model.safetensors"}}]},UT={family:"chatterbox",display_name:"Chatterbox",description:"Open-source Chatterbox family for expressive TTS and voice conversion, with emotion exaggeration control, fast generation, zero-shot voice cloning, and an integrated multilingual TTS path.",category:"tts",status:"supported",tasks:["tts","clone","vc"],modes:["offline"],languages:["ar","da","de","el","en","es","fi","fr","hi","it","ko","ms","nl","no","pl","pt","sv","sw","tr"],options:{request:[{name:"exaggeration",type:"float",description:"Emotion exaggeration. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.5},{name:"guidance_scale",type:"float",description:"T3 classifier-free guidance scale. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.5},{name:"temperature",type:"float",description:"T3 sampling temperature. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.8},{name:"repetition_penalty",type:"float",description:"T3 repetition penalty. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:1.2},{name:"min_p",type:"float",description:"Minimum sampling probability. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.05},{name:"top_p",type:"float",description:"Nucleus sampling probability. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:1},{name:"flow_guidance_scale",type:"float",description:"S3Gen flow guidance scale. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:.7},{name:"max_tokens",type:"int",description:"Maximum generated speech tokens. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,min:1,default:384},{name:"do_sample",type:"bool",description:"Enable sampling. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:!0},{name:"stop_on_eos",type:"bool",description:"Stop token generation on EOS. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,default:!0},{name:"num_inference_steps",type:"int",description:"Voice conversion flow steps; max_steps is also accepted.",required:!1,min:1,default:10},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed. Captured during clone preparation; changing it on the same prepared session is rejected.",required:!1,min:0,max:4294967295},{name:"source_audio",type:"audio_path",description:"Voice conversion source WAV path; overrides audio_input.",required:!1},{name:"target_voice",type:"audio_path",description:"Voice conversion target WAV path; overrides the speaker reference.",required:!1},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size.",required:!1,default:128}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; defaults to native.",required:!1,preset:"weight_type_full"},{name:"t3_weight_type",type:"enum",description:"T3 weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"multilingual_t3",type:"enum",description:"Multilingual T3 checkpoint selection.",required:!1,values:["v2","v3"],default:"v2"},{name:"conditionals_cache_slots",type:"int",description:"Cached speaker conditionals; zero disables reuse.",required:!1,min:0,default:1},{name:"mem_saver",type:"bool",description:"Release staged runtime components.",required:!1,default:!1},{name:"encoder_condition_samples",type:"int",description:"Maximum reference samples for the T3 tokenizer; the voice encoder still consumes the full 16 kHz reference.",required:!1,default:96e3},{name:"decoder_condition_samples",type:"int",description:"S3Gen reference sample limit at 24 kHz.",required:!1,default:24e4},{name:"t3_speech_cond_prompt_len",type:"int",description:"T3 reference speech prompt token limit.",required:!1,default:150}],load:[]},capabilities:{clone:["speaker_reference"],vc:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"chatterbox_q8_0",tags:["TTS","Clone","VC","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"chatterbox_q8_0",display_name:"Chatterbox Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Chatterbox-GGUF",files:["Chatterbox-GGUF/chatterbox-q8_0.gguf"],strip_prefix:"Chatterbox-GGUF"},{id:"chatterbox_f16",display_name:"Chatterbox F16 GGUF",format:"gguf",precision:"f16",target_directory:"Chatterbox-GGUF",files:["Chatterbox-GGUF/chatterbox-f16.gguf"],strip_prefix:"Chatterbox-GGUF"},{id:"chatterbox_safetensors",display_name:"Chatterbox Safetensors",format:"safetensors",precision:"native",target_directory:"chatterbox",files:["ve.safetensors","t3_cfg.safetensors","s3gen.safetensors","tokenizer.json","grapheme_mtl_merged_expanded_v1.json","Cangjie5_TC.json","conds.pt","t3_mtl23ls_v2.safetensors","t3_mtl23ls_v3.safetensors"],download:{kind:"huggingface_snapshot",repo:"ResembleAI/chatterbox"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{english_tokenizer:"model:tokenizer.json",multilingual_tokenizer:"model:grapheme_mtl_merged_expanded_v1.json",cangjie_mapping:"model:Cangjie5_TC.json",builtin_conditionals:"model:conds.pt"},tensors:{voice_encoder_weights:{source:"weights:",prefix:"voice_encoder"},s3gen_weights:{source:"weights:",prefix:"s3gen"},t3_english_weights:{source:"weights:",prefix:"t3_english"},t3_multilingual_v2_weights:{source:"weights:",prefix:"t3_multilingual_v2"},t3_multilingual_v3_weights:{source:"weights:",prefix:"t3_multilingual_v3"}}},{format:"safetensors",roots:{model:"."},files:{english_tokenizer:"model:tokenizer.json",multilingual_tokenizer:"model:grapheme_mtl_merged_expanded_v1.json",cangjie_mapping:"model:Cangjie5_TC.json",builtin_conditionals:"model:conds.pt"},tensors:{voice_encoder_weights:"model:ve.safetensors",s3gen_weights:"model:s3gen.safetensors",t3_english_weights:"model:t3_cfg.safetensors",t3_multilingual_v2_weights:"model:t3_mtl23ls_v2.safetensors",t3_multilingual_v3_weights:"model:t3_mtl23ls_v3.safetensors"}}]},RT={family:"chatterbox_turbo",display_name:"Chatterbox Turbo",description:"Resemble AI's distilled 350M Chatterbox Turbo: GPT2 T3 backbone, GPT2 BPE tokenizer, and a 2-step meanflow S3Gen decoder for fast English TTS with a built-in voice.",category:"tts",status:"testing",tasks:["tts"],modes:["offline"],languages:["en"],capabilities:{},options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated tokens; legacy max_new_tokens remains accepted.",required:!1,min:0,default:1e3},{name:"temperature",type:"float",description:"T3 sampling temperature.",required:!1,default:.8},{name:"top_p",type:"float",description:"T3 nucleus sampling cutoff.",required:!1,default:.95},{name:"top_k",type:"int",description:"T3 top-k sampling limit.",required:!1,min:0,default:1e3},{name:"repetition_penalty",type:"float",description:"T3 token repetition penalty.",required:!1,default:1.2},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,max:4294967295,default:0},{name:"text_chunk_size",type:"int",description:"Maximum characters per text chunk; must be positive.",required:!1,min:1,default:128}],session:[],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"chatterbox_turbo_q8_0",tags:["TTS","GGUF"],docs:["docs/models/chatterbox_turbo.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"chatterbox_turbo_q8_0",display_name:"Chatterbox Turbo Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Chatterbox-Turbo-GGUF",files:["Chatterbox-Turbo-GGUF/chatterbox-turbo-q8_0.gguf"],strip_prefix:"Chatterbox-Turbo-GGUF"},{id:"chatterbox_turbo_f16",display_name:"Chatterbox Turbo F16 GGUF",format:"gguf",precision:"f16",target_directory:"Chatterbox-Turbo-GGUF",files:["Chatterbox-Turbo-GGUF/chatterbox-turbo-f16.gguf"],strip_prefix:"Chatterbox-Turbo-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tokenizer_vocab:"model:chatterbox_turbo_vocab.json",tokenizer_merges:"model:chatterbox_turbo_merges.txt",tokenizer_special_tokens:"model:chatterbox_turbo_special_tokens.json"},tensors:{t3_turbo_weights:{source:"weights:",prefix:"t3"},builtin_conditionals_turbo:{source:"weights:",prefix:"conds"},s3gen_weights:{source:"weights:",prefix:"s3gen"}}}]},BT={family:"citrinet_asr",display_name:"Citrinet ASR",description:"NVIDIA CitriNet-family end-to-end English ASR model using a convolutional CTC architecture optimized for transcribing speech segments to text.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en"],capabilities:{},options:{request:[],session:[{name:"weight_type",type:"enum",description:"Weight storage type used by the encoder.",default:"native",preset:"weight_type_full",required:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"citrinet_asr_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"citrinet_asr_q8_0",display_name:"Citrinet ASR Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Citrinet-ASR-GGUF",files:["Citrinet-ASR-GGUF/citrinet-asr-q8_0.gguf"],strip_prefix:"Citrinet-ASR-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:citrinet_256_config.json",tokenizer:"model:citrinet_256_tokenizer.model"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:citrinet_256_config.json",tokenizer:"model:citrinet_256_tokenizer.model"},tensors:{weights:"model:citrinet_256.safetensors"}}]},PT={family:"cohere_asr",schema_version:1,display_name:"Cohere Transcribe",description:"Cohere multilingual speech transcription with punctuation control.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en","fr","de","es","it","pt","nl","pl","el","ar","ja","zh","vi","ko"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Input audio language.",required:!1,default:"en"},{name:"punc",type:"bool",description:"Generate punctuation and capitalization.",required:!1,default:!0},{name:"max_tokens",type:"int",description:"Maximum generated tokens per audio chunk.",required:!1,min:1,max:1014,default:256},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","quiet_energy","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio chunk in seconds.",required:!1,min:.04,max:35,default:35}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage type.",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"],required:!1,default:"native"}],load:[]},runtime:{tags:["gguf","cpu","cuda"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/cohere_asr.md"],recommended_package:"cohere_transcribe_bf16"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"cohere_transcribe_bf16",display_name:"Cohere Transcribe GGUF BF16",default:!0,format:"gguf",precision:"bf16",target_directory:"Cohere-Transcribe-GGUF",files:["Cohere-Transcribe-GGUF/cohere-transcribe-03-2026-bf16.gguf"],strip_prefix:"Cohere-Transcribe-GGUF"},{id:"cohere_transcribe_q8_0",display_name:"Cohere Transcribe GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Cohere-Transcribe-GGUF",files:["Cohere-Transcribe-GGUF/cohere-transcribe-03-2026-q8_0.gguf"],strip_prefix:"Cohere-Transcribe-GGUF"},{id:"cohere_transcribe_q4_0",display_name:"Cohere Transcribe GGUF Q4_0",format:"gguf",precision:"q4_0",target_directory:"Cohere-Transcribe-GGUF",files:["Cohere-Transcribe-GGUF/cohere-transcribe-03-2026-q4_0.gguf"],strip_prefix:"Cohere-Transcribe-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"weights:"}}]},jT={schema_version:1,family:"confucius4_r2t2",display_name:"Confucius4-R2T2",description:"NetEase Youdao Confucius4-R2T2 real-time ASR: a Qwen3-ASR fine-tune with Longest Stable Prefix (LSP) streaming. Low-latency append-only streaming from 80 ms to 2 s chunks, context and hotword prompts, 30 languages.",category:"asr",status:"community",tasks:["asr"],modes:["offline","streaming"],languages:["zh","en","yue","ar","de","fr","es","pt","id","it","ko","ru","th","vi","ja","tr","hi","ms","nl","sv","da","fi","pl","cs","fil","fa","el","hu","mk","ro"],capabilities:{asr:["partial_results"]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"confucius4_r2t2_q8_0",tags:["ASR","Stream"],docs:["docs/models/r2t2.md","docs/asr.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"netease-youdao/Confucius4-R2T2",revision:"main",gated:!1}},packages:[{id:"confucius4_r2t2_q8_0",display_name:"Confucius4-R2T2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Confucius4-R2T2-GGUF",files:["r2t2-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"davidxifeng/Confucius4-R2T2-gguf"}},{id:"confucius4_r2t2_f16",display_name:"Confucius4-R2T2 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Confucius4-R2T2-GGUF",files:["r2t2-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"davidxifeng/Confucius4-R2T2-gguf"}},{id:"confucius4_r2t2_q4_k_m",display_name:"Confucius4-R2T2 Q4_K_M GGUF",description:"Community Q4_K_M quantization by NairoDorian (Hugging Face: Nairod785), pinned to a fixed revision; quantization report in QUANTIZATION.md. Quantized derivative work of netease-youdao/Confucius4-R2T2 under the NetEase Youdao Model Use License - see LICENSE, LICENSE_zh and NOTICE in the download repo.",format:"gguf",precision:"q4_k_m",target_directory:"Confucius4-R2T2-Q4_K_M-GGUF",files:["r2t2-q4_k_m.gguf"],download:{kind:"huggingface_snapshot",repo:"Nairod785/Confucius4-R2T2-Q4_K_M-GGUF",revision:"b1ea19256fb77a8d8ab7b091dc75378e15952605",gated:!1}},{id:"confucius4_r2t2_safetensors",display_name:"Confucius4-R2T2 (HF safetensors)",format:"safetensors",precision:"native",target_directory:"Confucius4-R2T2",files:["added_tokens.json","chat_template.json","config.json","generation_config.json","merges.txt","model.safetensors","preprocessor_config.json","special_tokens_map.json","tokenizer.json","tokenizer_config.json","vocab.json"],download:{kind:"huggingface_snapshot",repo:"netease-youdao/Confucius4-R2T2"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}],options:{request:[{name:"language",type:"string",required:!1,default:"Auto",description:"Recognition language: ISO-639 code (zh/en/ja/...) or canonical name (Chinese/English/...), or Auto for detection."},{name:"max_tokens",type:"int",required:!1,description:"Offline decode budget. Must be positive. Offline omission uses checkpoint configuration (512 fallback).",min:1}],session:[{name:"chunk_size_ms",type:"float",required:!1,default:320,description:"Streaming chunk duration in milliseconds; must be positive."},{name:"unfixed_chunk_num",type:"int",required:!1,default:2,description:"Leading chunks decoded without a stable-prefix prompt.",min:0},{name:"unfixed_token_num",type:"int",required:!1,default:5,description:"Tokens rolled back from the accumulated text before it becomes the prefix prompt.",min:0},{name:"rollback_punctuation",type:"bool",required:!1,default:!1,description:"When punctuation is detected, set rollback to zero and retain the full decoded prefix."},{name:"max_tokens",type:"int",required:!1,default:32,description:"Greedy decode budget per streaming chunk and for the final flush (session-scoped; distinct from the offline request max_tokens).",min:1},{name:"audio_encoder_weight_type",type:"enum",preset:"weight_type_conv",required:!1,default:"native",description:"Audio tower weight storage."},{name:"thinker_weight_type",type:"enum",values:["native","f32","f16","bf16","q8_0"],required:!1,default:"native",description:"Thinker weight storage."},{name:"weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"native",description:"Alias for thinker_weight_type."},{name:"audio_encoder_graph_arena_mb",type:"int",required:!1,default:128,description:"Audio tower graph arena in MB.",min:1},{name:"thinker_prefill_graph_arena_mb",type:"int",required:!1,default:256,description:"Thinker prefill graph arena in MB.",min:1},{name:"thinker_decode_graph_arena_mb",type:"int",required:!1,default:256,description:"Thinker decode graph arena in MB.",min:1},{name:"thinker_weight_context_mb",type:"int",required:!1,default:64,description:"Thinker weight context in MB.",min:1}],load:[]},dependencies:[]},NT={schema_version:1,family:"confucius4_tts",display_name:"Confucius4-TTS",description:"Confucius4-TTS is a multilingual voice-cloning TTS model packaged for audio.cpp with offline and streaming generation. It uses reference speech, language-aware text normalization, T2S semantic generation, S2A flow matching, style encoding, semantic audio features, and BigVGAN vocoding.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline","streaming"],languages:["zh","en","ja","ko","de","fr","es","id","it","th","pt","ru","ms","vi"],runtime:{tags:["gguf","stream"]},capabilities:{clone:["speaker_reference","long_form"]},options:{request:[{name:"language",type:"string",description:"Target synthesis language code used by the text frontend; default zh when no request transcript language or style language is provided.",required:!1,default:"zh"},{name:"temperature",type:"float",description:"T2S sampling temperature; must be > 0, default 0.8.",required:!1,min:0,default:.8},{name:"top_p",type:"float",description:"T2S nucleus sampling probability; must be in (0, 1], default 0.8.",required:!1,min:0,max:1,default:.8},{name:"top_k",type:"int",description:"T2S top-k sampling limit; must be positive, default 30.",required:!1,min:1,default:30},{name:"num_beams",type:"int",description:"T2S beam count; default 3. Set 1 for single-beam sampling.",required:!1,min:1,default:3},{name:"repetition_penalty",type:"float",description:"T2S repetition penalty; must be > 0, default 10.0.",required:!1,min:0,default:10},{name:"max_tokens",type:"int",description:"Maximum T2S semantic sequence length including prompt tokens; default 1520.",required:!1,min:1,default:1520},{name:"num_inference_steps",type:"int",description:"S2A flow-matching step count; default 25.",required:!1,min:1,default:25},{name:"guidance_scale",type:"float",description:"S2A classifier-free guidance scale; default 0.7. Negative values select the no-CFG path.",required:!1,default:.7},{name:"text_chunk_size",type:"int",description:"Maximum text tokens per generated segment; default 80.",required:!1,min:1,default:80},{name:"text_chunk_mode",type:"enum",description:"word_budget/default selects model-local official_segments. Other modes use the framework splitter with a codepoint budget.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"cross_fade_duration_sec",type:"float",description:"Cross-fade duration between generated segments in seconds; default 0.3.",required:!1,min:0,default:.3},{name:"edge_fade_duration_sec",type:"float",description:"Fade duration applied at segment edges in seconds; default 0.1. Currently validated but not applied to generated audio.",required:!1,min:0,default:.1},{name:"edge_pad_duration_sec",type:"float",description:"Silence padding applied at segment edges in seconds; default 0.1. Currently validated but not applied to generated audio.",required:!1,min:0,default:.1},{name:"seed",type:"int",description:"Seed for T2S sampling and S2A noise initialization; default 1234.",required:!1,min:0,default:1234}],session:[{name:"graph_arena_mb",type:"int",description:"Reusable ggml graph arena size in MiB for Confucius stages; default 512.",required:!1,min:1,default:512},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"weight_type",type:"enum",description:"Matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; default 1, set 0 to disable caching.",required:!1,min:0,default:1},{name:"mem_saver",type:"bool",description:"Release staged graphs after request phases; default false.",required:!1,default:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"confucius4_tts_orig",display_name:"Confucius4-TTS Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Confucius4-TTS-GGUF",files:["Confucius4-TTS-GGUF/confucius4-tts-orig.gguf"],strip_prefix:"Confucius4-TTS-GGUF"}],dependencies:[],ui:{recommended_package:"confucius4_tts_orig",tags:["TTS","Clone","GGUF","Stream"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:inference_config.yaml",tokenizer_model:"model:tokenizer.model",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",special_tokens_map:"model:special_tokens_map.json",w2v_preprocessor_config:"model:w2v_preprocessor_config.json",bigvgan_config:"model:bigvgan_config.json"},tensors:{t2s:{source:"weights:",prefix:"t2s"},s2a:{source:"weights:",prefix:"s2a"},semantic_encoder:{source:"weights:",prefix:"semantic_encoder"},semantic_encoder_shaw:{source:"weights:",prefix:"semantic_encoder_shaw"},semantic_stats:{source:"weights:",prefix:"semantic_stats"},style_encoder:{source:"weights:",prefix:"style_encoder"},vocoder:{source:"weights:",prefix:"vocoder"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:inference_config.yaml",tokenizer_model:"model:tokenizer.model",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",special_tokens_map:"model:special_tokens_map.json",w2v_preprocessor_config:"model:w2v_preprocessor_config.json",bigvgan_config:"model:bigvgan_config.json"},tensors:{t2s:"model:t2s.safetensors",s2a:"model:s2a.safetensors",semantic_encoder:"model:semantic_encoder.safetensors",semantic_encoder_shaw:"model:semantic_encoder_shaw.safetensors",semantic_stats:"model:semantic_stats.safetensors",style_encoder:"model:style_encoder.safetensors",vocoder:"model:vocoder.safetensors"}}]},OT={schema_version:1,family:"controlfoley",display_name:"ControlFoley",description:"Multimodal Foley audio generation model.",category:"audio_tools",status:"experimental",tasks:["sfx"],modes:["offline"],languages:["auto"],runtime:{tags:["gguf"]},capabilities:{sfx:["prompt_generation"]},ui:{recommended_package:"controlfoley_large_44k_q8_0",tags:["SFX","GGUF"],docs:["docs/models/controlfoley.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{open_clip_vocab:"model:open_clip_vocab.json",open_clip_merges:"model:open_clip_merges.txt",open_clip_tokenizer_config:"model:open_clip_tokenizer_config.json"},tensors:{flow:{source:"weights:",prefix:"flow"},vae:{source:"weights:",prefix:"vae"},bigvgan:{source:"weights:",prefix:"bigvgan"},open_clip:{source:"weights:",prefix:"open_clip"},cav_mae:{source:"weights:",prefix:"cav_mae"},synchformer:{source:"weights:",prefix:"synchformer"},clap:{source:"weights:",prefix:"clap"},mert:{source:"weights:",prefix:"mert"},musicgen_style:{source:"weights:",prefix:"musicgen_style"}}}],options:{request:[{name:"duration_sec",type:"float",required:!1,default:8,min:.64,description:"Target temporal budget."},{name:"num_inference_steps",type:"int",required:!1,default:25,min:1,description:"Euler flow inference steps."},{name:"guidance_scale",type:"float",required:!1,default:4.5,min:0,description:"Classifier-free guidance strength. Must be > 0. Values strictly between 0 and 1 bypass CFG and negative-prompt conditioning."},{name:"negative_prompt",type:"string",required:!1,default:"",description:"Negative text prompt used for the unconditional guidance text branch."},{name:"video_file",type:"path",required:!1,description:"Optional video path for video-conditioned Foley generation."},{name:"mask_away_clip",type:"bool",required:!1,default:!1,description:"Disable OpenCLIP video conditioning while keeping visual and sync conditioning."},{name:"seed",type:"int",required:!1,default:42,min:0,max:4294967295,description:"Generation seed."}],session:[{name:"weight_type",type:"enum",required:!1,preset:"weight_type_full",default:"native",description:"ControlFoley weight storage type."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"controlfoley_large_44k_f32",display_name:"ControlFoley Large 44k F32 GGUF",format:"gguf",precision:"f32",target_directory:"ControlFoley-GGUF",files:["ControlFoley-GGUF/controlfoley-large-44k-f32.gguf"],strip_prefix:"ControlFoley-GGUF"},{id:"controlfoley_large_44k_q8_0",display_name:"ControlFoley Large 44k Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"ControlFoley-GGUF",files:["ControlFoley-GGUF/controlfoley-large-44k-q8_0.gguf"],strip_prefix:"ControlFoley-GGUF"}],dependencies:[]},IT={schema_version:1,family:"cosyvoice3",display_name:"CosyVoice3",description:"Fun-CosyVoice3 native GGUF package for zero-shot, cross-lingual, and instruction-conditioned text-to-speech using CosyVoice3 speech-token AR generation, causal masked flow mel decoding, CAM++ speaker conditioning, and causal HiFT waveform decoding.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline"],languages:["zh","en","ja","ko","de","es","fr","it","ru","yue"],runtime:{tags:["gguf"]},dependencies:[],capabilities:{tts:["speaker_reference","style_control"],clone:["speaker_reference"]},options:{request:[{name:"template_name",type:"enum",description:"CosyVoice3 request template.",required:!1,values:["zero_shot","cross_lingual","instruct"],default:"zero_shot"},{name:"reference_text",type:"string",description:"Transcript for the prompt audio.",required:!1},{name:"instruct",type:"string",description:"Instruction text for instruct mode.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 600.",required:!1,min:1,default:600},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"max_tokens",type:"int",description:"Maximum generated speech tokens; -1 (default) selects 20 times the target text token count. Explicit limits must be positive.",required:!1,min:-1,default:-1},{name:"min_tokens",type:"int",description:"Minimum generated speech tokens before stop is accepted; -1 (default) selects twice the target text token count. Must not exceed the resolved maximum.",required:!1,min:-1,default:-1},{name:"top_k",type:"int",description:"AR speech-token top-k sampling limit; default 25.",required:!1,min:1,default:25},{name:"num_inference_steps",type:"int",description:"Flow decoder Euler steps; default 10.",required:!1,min:1,default:10},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,default:1986}],session:[{name:"lora",type:"path",description:"PEFT adapter with adapter_config.json, or native lora_weights with config.json and speech_embedding/llm_decoder sidecars. Checkpoints may use safetensors or PyTorch containers.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1. Full-weight replacements are not scaled.",required:!1,default:1},{name:"weight_type",type:"enum",description:"CosyVoice3 matmul weight storage type; default native.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"]},{name:"graph_arena_mb",type:"int",description:"Reusable runtime graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 2048.",required:!1,min:1,default:2048},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse.",required:!1,min:0,default:4},{name:"mem_saver",type:"bool",description:"Release cached runtime graphs after each request to reduce peak VRAM; default false.",required:!1,default:!1},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Component: flow. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn. GGML keeps the session backend. RKNN requires artifacts.main, a comma-separated ladder of estimator engines compiled one per sequence length (tools/rknn/prepare_cosyvoice3_rknn_flow.py), and ENGINE_ENABLE_RKNN; omit backend. An utterance longer than the largest engine runs the CPU graph. Neither implementation takes params.",required:!1,default:"{}"}],load:[]},packages:[{id:"cosyvoice3_q8_0",display_name:"CosyVoice3 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"CosyVoice3-GGUF",files:["CosyVoice3-GGUF/cosyvoice3-q8_0.gguf"],strip_prefix:"CosyVoice3-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"cosyvoice3_f32",display_name:"CosyVoice3 F32 GGUF",default:!1,format:"gguf",precision:"f32",target_directory:"CosyVoice3-GGUF",files:["CosyVoice3-GGUF/cosyvoice3-f32.gguf"],strip_prefix:"CosyVoice3-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}}],ui:{recommended_package:"cosyvoice3_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{cosyvoice3_yaml:"model:cosyvoice3.yaml",qwen_config:"model:CosyVoice-BlankEN/config.json",tokenizer_config:"model:CosyVoice-BlankEN/tokenizer_config.json",vocab_json:"model:CosyVoice-BlankEN/vocab.json",merges_txt:"model:CosyVoice-BlankEN/merges.txt"},tensors:{llm_weights:{source:"weights:",prefix:"llm"},flow_weights:{source:"weights:",prefix:"flow"},hift_weights:{source:"weights:",prefix:"hift"},campplus_weights:{source:"weights:",prefix:"campplus"},speech_tokenizer_weights:{source:"weights:",prefix:"speech_tokenizer"},blank_en_weights:{source:"weights:",prefix:"blank_en"}}}]},DT={schema_version:1,family:"crisperwhisper",display_name:"CrisperWhisper 2.0",description:"Whisper-based verbatim and intended speech transcription.",category:"asr",status:"supported",tasks:["asr","align"],modes:["offline","streaming"],languages:["af","am","ar","as","az","ba","be","bg","bn","bo","br","bs","ca","cs","cy","da","de","el","en","es","et","eu","fa","fi","fo","fr","gl","gu","ha","haw","he","hi","hr","ht","hu","hy","id","is","it","ja","jw","ka","kk","km","kn","ko","la","lb","ln","lo","lt","lv","mg","mi","mk","ml","mn","mr","ms","mt","my","ne","nl","nn","no","oc","pa","pl","ps","pt","ro","ru","sa","sd","si","sk","sl","sn","so","sq","sr","su","sv","sw","ta","te","tg","th","tk","tl","tr","tt","uk","ur","uz","vi","yi","yo","zh"],capabilities:{align:["word_timestamps"],asr:["word_timestamps","partial_results"]},dependencies:[],options:{request:[{name:"return_timestamps",required:!1,type:"bool",description:"Return word-level timestamps.",default:!1},{name:"audio_chunk_mode",required:!1,type:"enum",values:["auto","fixed","none"],description:"Continuation window planning. None requires audio no longer than 30 seconds.",default:"auto"},{name:"audio_chunk_duration_sec",required:!1,type:"float",description:"Duration of each encoder window in seconds. Must be positive and greater than overlap.",max:30,default:30},{name:"audio_chunk_overlap_sec",required:!1,type:"float",description:"Audio overlap between continuation windows in seconds. Must be smaller than chunk duration.",min:0,default:4},{name:"language",required:!1,type:"string",description:"Audio language code.",default:"en"},{name:"transcription_mode",required:!1,type:"enum",description:"Verbatim speech, intended clean text, or transcript-conditioned verbatimize.",values:["verbatim","intended","verbatimize"],default:"verbatim"},{name:"max_tokens",required:!1,type:"int",description:"Maximum generated tokens per window. Positive budget, additionally bounded by remaining checkpoint text positions after the prompt.",min:1,default:256}],session:[{name:"weight_type",required:!1,type:"enum",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","i8"],description:"Matmul weight storage type.",default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/crisperwhisper.md"],recommended_package:"crisperwhisper_2_large_q8_0"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"crisperwhisper_2_large_bf16",display_name:"CrisperWhisper 2.0 Large GGUF BF16",format:"gguf",precision:"bf16",target_directory:"CrisperWhisper2.0-GGUF",files:["CrisperWhisper2.0-GGUF/crisperwhisper-2-large-bf16.gguf"],strip_prefix:"CrisperWhisper2.0-GGUF"},{id:"crisperwhisper_2_large_q8_0",display_name:"CrisperWhisper 2.0 Large GGUF Q8_0",default:!0,format:"gguf",precision:"q8_0",target_directory:"CrisperWhisper2.0-GGUF",files:["CrisperWhisper2.0-GGUF/crisperwhisper-2-large-q8_0.gguf"],strip_prefix:"CrisperWhisper2.0-GGUF"},{id:"crisperwhisper_2_large_q4_k",display_name:"CrisperWhisper 2.0 Large GGUF Q4_K",format:"gguf",precision:"q4_k",target_directory:"CrisperWhisper2.0-GGUF",files:["CrisperWhisper2.0-GGUF/crisperwhisper-2-large-q4_k.gguf"],strip_prefix:"CrisperWhisper2.0-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:"weights:"}}]},LT={schema_version:1,family:"dots_tts",display_name:"DotTTS",description:"DotTTS is a multilingual zero-shot TTS, voice-cloning, and speech-editing model family packaged for audio.cpp with SOAR and MeanFlow generation, prompt-audio plus prompt-text prefill, speaker-reference conditioning, language tags, multiple synthesis templates, long-form text chunking, and true streaming audio output.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["multilingual"],runtime:{tags:["gguf","stream"]},capabilities:{tts:["speaker_reference","style_control","long_form"],clone:["speaker_reference","style_control","long_form"]},options:{request:[{name:"reference_text",type:"string",description:"Transcript for the prompt audio. When set with reference audio, DotTTS uses prompt prefill for higher quality voice cloning.",required:!1},{name:"reference_duration_sec",type:"float",description:"Optional prompt-audio trim duration before reference conditioning and prompt prefill.",required:!1,min:0},{name:"template_name",type:"enum",description:"DotTTS synthesis template. tts is normal text-to-speech; instruction_tts adds instruction conditioning; text_to_audio uses a sound-description template; tts_interleave uses the streaming interleave schedule; edit uses the DotTTS Edit source-audio editing schedule and is offline-only.",values:["tts","instruction_tts","text_to_audio","tts_interleave","edit"],required:!1,default:"tts"},{name:"source_audio",type:"audio_path",description:"Source WAV path for DotTTS Edit. Required when template_name=edit unless audio_input is supplied by the caller.",required:!1},{name:"instruct",type:"string",description:"Structured DotTTS Edit instruction. If omitted with template_name=edit, the request text is used as the instruction.",required:!1},{name:"source_text",type:"string",description:"Optional source transcript override for DotTTS Edit. If omitted, it is rendered from instruction tags.",required:!1},{name:"target_text",type:"string",description:"Edit target transcript override. When omitted, explicit instruction plus text input uses that text; otherwise the target is rendered from instruction tags.",required:!1},{name:"use_xvector",type:"enum",description:"DotTTS Edit speaker conditioning mode. auto follows the upstream tag-based behavior; on/off force or disable source-audio speaker conditioning.",values:["auto","on","off"],required:!1,default:"auto"},{name:"language",type:"string",description:"Optional target language tag. none disables language tagging; otherwise pass a language code such as en or zh.",required:!1,default:"none"},{name:"num_inference_steps",type:"int",description:"SOAR flow-matching inference step count; default 10.",required:!1,min:1,default:10},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale used by SOAR flow matching. Default 1.2.",required:!1,min:0,default:1.2},{name:"speaker_scale",type:"float",description:"Multiplier applied to the prompt speaker embedding; default 1.5.",required:!1,min:0,default:1.5},{name:"sampler_mode",type:"enum",description:"SOAR ODE solver method for flow matching. Fixed-step euler is the default and parity baseline.",values:["euler","midpoint","rk4"],required:!1,default:"euler"},{name:"max_tokens",type:"int",description:"Maximum generated audio patch count per generated segment; default 500. In Edit mode source patches consume this budget; it must exceed the source-patch count.",required:!1,min:1,default:500},{name:"text_chunk_size",type:"int",description:"Maximum text codepoints per generated segment for long-form requests; default 320.",required:!1,min:1,default:320},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode; default tag_aware preserves leading style/control tags across long-form chunks.",values:["default","tag_aware","japanese","endline"],required:!1,default:"tag_aware"},{name:"vocoder_merge_steps",type:"int",description:"Streaming vocoder latent patch merge size after the initial unmerged patches; default 4, matching the Python optimized streaming runtime default.",required:!1,min:1,default:4},{name:"seed",type:"int",description:"Seed for prompt latent sampling and flow noise initialization; default 42.",required:!1,min:0,default:42}],session:[{name:"weight_type",type:"enum",description:"Shared matmul weight storage type for DotTTS components; default native. Component-specific weight options override this value.",preset:"weight_type_full",required:!1,default:"native"},{name:"speaker_encoder_weight_type",type:"enum",description:"Speaker encoder matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"codec_weight_type",type:"enum",description:"AudioVAE vocoder matmul and recurrent weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"patch_encoder_weight_type",type:"enum",description:"Patch encoder transformer matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"llm_weight_type",type:"enum",description:"Autoregressive language model matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"flow_weight_type",type:"enum",description:"SOAR or MeanFlow DiT flow-matching matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"codec_conv_weight_type",type:"enum",description:"Convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse.",required:!1,min:0,default:4},{name:"mem_saver",type:"bool",description:"Load DotTTS components by request phase and release their weights/graphs after last use while keeping reference cache slots alive.",required:!1,default:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"dots_tts_soar_q8_0",display_name:"DotTTS SOAR Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"DotTTS-SOAR-GGUF",files:["DotTTS-SOAR-GGUF/dots-tts-soar-q8_0.gguf"],strip_prefix:"DotTTS-SOAR-GGUF"},{id:"dots_tts_soar_bf16",display_name:"DotTTS SOAR BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"DotTTS-SOAR-GGUF",files:["DotTTS-SOAR-GGUF/dots-tts-soar-bf16.gguf"],strip_prefix:"DotTTS-SOAR-GGUF"},{id:"dots_tts_mf_q8_0",display_name:"DotTTS MeanFlow Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"DotTTS-MF-GGUF",files:["DotTTS-MF-GGUF/dots-tts-mf-q8_0.gguf"],strip_prefix:"DotTTS-MF-GGUF"},{id:"dots_tts_mf_bf16",display_name:"DotTTS MeanFlow BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"DotTTS-MF-GGUF",files:["DotTTS-MF-GGUF/dots-tts-mf-bf16.gguf"],strip_prefix:"DotTTS-MF-GGUF"},{id:"dots_tts_edit_q8_0",display_name:"DotTTS Edit Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"DotTTS-Edit-GGUF",files:["DotTTS-Edit-GGUF/dots-tts-edit-q8_0.gguf"],strip_prefix:"DotTTS-Edit-GGUF"},{id:"dots_tts_edit_bf16",display_name:"DotTTS Edit BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"DotTTS-Edit-GGUF",files:["DotTTS-Edit-GGUF/dots-tts-edit-bf16.gguf"],strip_prefix:"DotTTS-Edit-GGUF"}],dependencies:[],ui:{recommended_package:"dots_tts_soar_q8_0",tags:["TTS","Clone","Stream","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",llm_config:"model:llm_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",added_tokens:"model:added_tokens.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{core_weights:{source:"weights:",prefix:"core"},vocoder_weights:{source:"weights:",prefix:"vocoder"},speaker_encoder_weights:{source:"weights:",prefix:"speaker_encoder"},latent_stats:{source:"weights:",prefix:"latent_stats"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",llm_config:"model:llm_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",added_tokens:"model:added_tokens.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{core_weights:{source:"model:model.safetensors"},vocoder_weights:{source:"model:vocoder.safetensors"},speaker_encoder_weights:{source:"model:speaker_encoder.safetensors"},latent_stats:{source:"model:latent_stats.safetensors"}}}]},VT={schema_version:1,family:"dramabox",display_name:"DramaBox",description:"DramaBox is an English expressive TTS and voice-cloning model packaged for audio.cpp as a standalone GGUF bundle. It combines Gemma text conditioning, diffusion sampling, reference-audio conditioning, long-form chunking, and 48 kHz stereo output.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["speaker_reference","style_control","long_form"],clone:["speaker_reference","style_control","long_form"]},options:{request:[{name:"target_voice",type:"audio_path",description:"Reference voice WAV path for voice cloning. If omitted, DramaBox generates from text without reference-audio conditioning.",required:!1},{name:"negative_prompt",type:"string",description:"Negative text conditioning used when guidance_scale enables classifier-free guidance; omitted uses the built-in quality prompt.",required:!1},{name:"duration_sec",type:"float",description:"Explicit target duration in seconds; default 0 uses the prompt-duration estimator. Above audio_chunk_threshold_sec, long-form generation uses estimated per-chunk durations instead of this explicit target.",required:!1,min:0,default:0},{name:"num_inference_steps",type:"int",description:"Diffusion sampling step count; default comes from config.json, 30 in the current package.",required:!1,min:1,default:30},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; default comes from config.json, 2.5 in the current package. Values greater than 1 enable CFG. Negative values disable this guidance branch.",required:!1,default:2.5},{name:"spatio_temporal_guidance_scale",type:"float",description:"Spatio-temporal guidance scale; default comes from config.json, 1.5 in the current package. Values greater than 0 enable STG. Negative values disable this guidance branch.",required:!1,default:1.5},{name:"duration_scale",type:"float",description:"Multiplier applied to the estimated prompt duration when duration_sec is 0; default comes from config.json, 1.1 in the current package. The resulting duration has a 3-second floor.",required:!1,default:1.1},{name:"reference_duration_sec",type:"float",description:"Reference voice crop/repeat duration in seconds; default comes from config.json, 10.0 in the current package. Must be > 0.",required:!1,min:0,default:10},{name:"guidance_rescale",type:"string",description:"Guidance rescale: auto or any negative value derives it from guidance_scale; nonnegative numeric values select an explicit rescale.",required:!1,default:"auto"},{name:"audio_chunk_threshold_sec",type:"float",description:"Estimated duration threshold that switches a request to long-form chunking; default 45.0 seconds. Must be > 0.",required:!1,min:0,default:45},{name:"audio_chunk_duration_sec",type:"float",description:"Target estimated duration for each long-form chunk; default 37.0 seconds. Must be > 0.",required:!1,min:0,default:37},{name:"cross_fade_duration_sec",type:"float",description:"Equal-power cross-fade between long-form chunks in seconds; default 0.05. Zero still overlaps one sample.",required:!1,min:0,default:.05},{name:"seed",type:"int",description:"Torch-compatible CUDA noise seed for diffusion sampling; default 42.",required:!1,min:0,default:42}],session:[{name:"perf_mode",type:"enum",description:"Attention implementation mode. Default off keeps the exact reference-query attention path; flash_attention enables the optimized path.",values:["off","flash_attention"],required:!1,default:"off"},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs and weights immediately after each request phase to reduce peak and resident VRAM; default false keeps components cached for later reuse.",required:!1,default:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"dramabox_q8_0",display_name:"DramaBox Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"DramaBox-GGUF",files:["DramaBox-GGUF/dramabox-q8_0.gguf"],strip_prefix:"DramaBox-GGUF"}],dependencies:[],ui:{recommended_package:"dramabox_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",audio_components_config:"model:audio_components_config.json",gemma_config:"model:gemma-3-12b-it-bnb-4bit/config.json",gemma_tokenizer_model:"model:gemma-3-12b-it-bnb-4bit/tokenizer.model",gemma_tokenizer_json:"model:gemma-3-12b-it-bnb-4bit/tokenizer.json",gemma_tokenizer_config:"model:gemma-3-12b-it-bnb-4bit/tokenizer_config.json"},tensors:{dit_weights:{source:"weights:",prefix:"dit"},audio_weights:{source:"weights:",prefix:"audio"},gemma_weights:{source:"weights:",prefix:"gemma"},silence_latent:{source:"weights:",prefix:"silence"}}}]},HT={schema_version:1,family:"echo_tts",display_name:"Echo-TTS",description:"Echo-TTS is an English zero-shot voice-cloning TTS model packaged for audio.cpp. A 2.8B diffusion transformer generates 80-D latents in PCA space which the Fish S1-DAC decodes to 44.1 kHz audio. Generation is a fixed 29.72 s window (640 latents).",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{clone:["speaker_reference"]},options:{request:[{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per text chunk; must be positive, default 300.",required:!1,min:1,default:300},{name:"text_guidance_scale",type:"float",description:"Classifier-free guidance scale on the text condition (independent-cfg only). Advertised range is recommended, not enforced by the parser.",required:!1,min:0,default:3},{name:"speaker_guidance_scale",type:"float",description:"Classifier-free guidance scale on the speaker condition (independent-cfg only). Advertised range is recommended, not enforced by the parser.",required:!1,min:0,default:8},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale on the text and speaker condition (join-cfg only). Advertised range is recommended, not enforced by the parser.",required:!1,min:0,default:8},{name:"t_schedule_mode",type:"enum",description:"RF Euler timestep schedule: linear or sway; default linear.",values:["linear","sway"],required:!1,default:"linear"},{name:"sway_coeff",type:"float",description:"Sway Sampling coefficient; must be finite and produce strictly decreasing timesteps. Default -1.0.",required:!1,default:-1},{name:"num_inference_steps",type:"int",description:"Euler sampler steps. Default 40 for linear timestep schedule, 12 for sway.",required:!1,min:1,default:40},{name:"truncation_factor",type:"float",description:"Initial-noise truncation factor. Advertised range is recommended, not enforced by the parser.",required:!1,min:0,max:1,default:.8},{name:"speaker_kv_scale",type:"float",description:"Force-speaker KV scaling. 1.0 disables; 1.5 is the upstream default when enabled. Advertised range is recommended, not parser-enforced; zero is invalid for reciprocal scaling.",required:!1,min:1,default:1},{name:"seed",type:"int",description:"RNG seed for the initial latent. Negative signed-integer values are treated as zero.",required:!1,default:0},{name:"reference_duration_sec",type:"float",required:!1,description:"Trim the speaker reference to at most this many seconds before encoding. Shorter references are cheaper and often clone better; upstream's guidance favours around 10 s. Defaults to 15 s. Values above the trained maximum of 297.1 s are clamped. Set per request, or as a session default from CLI or server config. Must be positive.",default:15},{name:"max_duration_sec",type:"float",description:"Cap the generation window, in seconds (up to 29.7215 s, the trained maximum; larger values are clamped to it). Quantised down to a whole latent frame of 46.44 ms. Left unset, the window is estimated per chunk from text length and widened automatically if the utterance does not finish inside it, which is substantially cheaper for short text. Must be positive; rounded to at least one latent frame.",required:!1,max:29.7215},{name:"guidance_interval",type:"int",description:"Refresh the two unconditional CFG lanes only every Nth step inside the guidance window, reusing the previous guidance correction in between. 1 reproduces upstream exactly. Worth raising to 2 at 30+ steps, where the correction is still measured 8-10 times across the guided phase (roughly 1.3x fewer denoiser evaluations); not recommended below ~20 steps, where it is already coarsely sampled and staleness shows up as degraded timbre and text adherence.",required:!1,min:1,default:1}],session:[{name:"reference_duration_sec",type:"float",required:!1,description:"Trim the speaker reference to at most this many seconds before encoding. Shorter references are cheaper and often clone better; upstream's guidance favours around 10 s. Defaults to 15 s. Values above the trained maximum of 297.1 s are clamped. Set per request, or as a session default from CLI or server config. Must be positive.",default:15},{name:"reference_cache_slots",type:"int",required:!1,description:"How many encoded speaker references to keep. Encoding is linear in reference length, so reusing a voice across requests avoids repeating it. 0 disables caching; default 4."},{name:"mem_saver",type:"bool",required:!1,description:"Release Fish S1-DAC decode graph space before encoding reference speaker audio and encode graph space after. Avoids having both allocations resident simulaneously at the cost of rebuilding the graphs when a speaker cache-miss occurs.",default:!1},{name:"cfg_mode",type:"enum",description:"Type of classifier free guidance used.",values:["independent","joint"],required:!1,default:"independent"}],load:[]},packages:[{id:"echo_tts_q8_0",display_name:"Echo-TTS Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Echo-TTS-GGUF",files:["echo-tts-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"dignome/Echo-TTS",revision:"919681c9906c88963352d5f96e0f732ddd3989ce",gated:!1}},{id:"echo_tts_f16",display_name:"Echo-TTS F16 GGUF",format:"gguf",precision:"f16",target_directory:"Echo-TTS-GGUF",files:["echo-tts-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"dignome/Echo-TTS",revision:"919681c9906c88963352d5f96e0f732ddd3989ce",gated:!1}}],dependencies:[],ui:{recommended_package:"echo_tts_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/echo_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{dit_weights:{source:"weights:",prefix:"dit_weights"},pca:{source:"weights:",prefix:"pca"},codec_weights:{source:"weights:",prefix:"ae"}}}]},WT={schema_version:1,family:"f5_tts",display_name:"F5-TTS",description:"Community F5-TTS flow-matching diffusion transformer for zero-shot voice cloning, including Arabic via the Habibi-TTS finetune (SWivid). Text conv conditioner, RoPE DiT, CFM sampler, Vocos vocoder.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline"],languages:["en","ar"],runtime:{tags:["server"]},capabilities:{clone:["speaker_reference"]},options:{request:[{name:"reference_text",type:"string",description:"Transcript matching the reference voice audio; required by F5-TTS zero-shot cloning.",required:!0},{name:"dialect",type:"string",description:"Habibi dialect token: UNK MSA SAU UAE ALG IRQ EGY MAR OMN TUN LEV SDN LBY; default UNK.",required:!1,default:"UNK"},{name:"sway_sampling_coef",type:"float",description:"Sway sampling coefficient for inference timesteps; default -1.0. Advertised bounds are recommended settings, not parser-enforced limits.",required:!1,min:-5,max:5,default:-1},{name:"speed",type:"float",description:"Speech speed multiplier for duration estimation; default 1.0. Generated text chunks shorter than 10 characters use 0.3 instead. Advertised bounds are recommended settings, not parser-enforced limits.",required:!1,min:.5,max:2,default:1},{name:"seed",type:"int",description:"Non-negative noise seed; omitted selects a random seed. Explicit zero is deterministic.",required:!1,min:0},{name:"num_inference_steps",type:"int",description:"CFM Euler steps (NFE); default 32. The parser rejects nonpositive counts.",required:!1,min:1,default:32},{name:"guidance_scale",type:"float",description:"Classifier-free guidance strength; default 2.0. Advertised bounds are recommended settings, not parser-enforced limits.",required:!1,min:0,max:10,default:2},{name:"strip_diacritics",type:"bool",description:"Strip Arabic combining marks (harakat/tanwin/shadda/tatweel) before synthesis; Habibi is trained on undiacritized ASR transcripts and garbles diacritized input. Default true.",required:!1,default:!0}],session:[{name:"lora",type:"path",description:"PEFT DiT LoRA adapter directory or checkpoint file; merged into session-owned weights and graphs. Vocos is unchanged.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"vocos_path",type:"string",description:"Path to the Vocos vocoder checkpoint (vocos.safetensors); required unless placed next to the DiT checkpoint.",required:!1},{name:"dialect",type:"string",description:"Default Habibi dialect token for requests that do not set it; default UNK.",required:!1,default:"UNK"},{name:"frame_budget",type:"int",description:"Total mel frames per CFM pass (ref + generated); larger budgets allow sentence-scale chunks at higher VRAM. Must be in [256, 8192]; omitted uses 2048. Explicit zero is not accepted. On CPU the allocated DiT graph pool caps a pass at 960 frames (10.2 s), so larger values are clamped there; CUDA keeps the full range.",required:!1,min:256,max:8192,default:2048}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"trklou/audio.cpp",revision:"main",gated:!1}},packages:[{id:"habibi_unified",display_name:"Habibi-TTS Unified (Arabic, multi-dialect)",description:"Unified multi-dialect Arabic checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32).",default:!0,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Unified",files:["habibi-unified/habibi-unified-orig.gguf","habibi-unified/vocab.txt"],strip_prefix:"habibi-unified"},{id:"vocos_mel_24khz",display_name:"Vocos mel 24kHz vocoder (GGUF)",description:"Standalone Vocos vocoder GGUF for use with the original safetensors checkpoints.",default:!1,format:"gguf",precision:"orig",target_directory:"vocos-mel-24khz",files:["vocos-mel-24khz/vocos-mel-24khz-orig.gguf"],strip_prefix:"vocos-mel-24khz"},{id:"habibi_alg",display_name:"Habibi-TTS ALG specialized checkpoint (GGUF)",description:"Single-dialect ALG checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger ALG accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/ALG",files:["habibi-alg/habibi-alg-orig.gguf","habibi-alg/vocab.txt"],strip_prefix:"habibi-alg"},{id:"habibi_egy",display_name:"Habibi-TTS EGY specialized checkpoint (GGUF)",description:"Single-dialect EGY checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger EGY accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/EGY",files:["habibi-egy/habibi-egy-orig.gguf","habibi-egy/vocab.txt"],strip_prefix:"habibi-egy"},{id:"habibi_irq",display_name:"Habibi-TTS IRQ specialized checkpoint (GGUF)",description:"Single-dialect IRQ checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger IRQ accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/IRQ",files:["habibi-irq/habibi-irq-orig.gguf","habibi-irq/vocab.txt"],strip_prefix:"habibi-irq"},{id:"habibi_mar",display_name:"Habibi-TTS MAR specialized checkpoint (GGUF)",description:"Single-dialect MAR checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger MAR accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/MAR",files:["habibi-mar/habibi-mar-orig.gguf","habibi-mar/vocab.txt"],strip_prefix:"habibi-mar"},{id:"habibi_msa",display_name:"Habibi-TTS MSA specialized checkpoint (GGUF)",description:"Single-dialect MSA checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger MSA accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/MSA",files:["habibi-msa/habibi-msa-orig.gguf","habibi-msa/vocab.txt"],strip_prefix:"habibi-msa"},{id:"habibi_sau",display_name:"Habibi-TTS SAU specialized checkpoint (GGUF)",description:"Single-dialect SAU checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger SAU accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/SAU",files:["habibi-sau/habibi-sau-orig.gguf","habibi-sau/vocab.txt"],strip_prefix:"habibi-sau"},{id:"habibi_uae",display_name:"Habibi-TTS UAE specialized checkpoint (GGUF)",description:"Single-dialect UAE checkpoint from SWivid/Habibi-TTS, converted to GGUF (DiT transformer + Vocos vocoder namespaces, f32). Stronger UAE accent than the unified model.",default:!1,format:"gguf",precision:"orig",target_directory:"Habibi-TTS/Specialized/UAE",files:["habibi-uae/habibi-uae-orig.gguf","habibi-uae/vocab.txt"],strip_prefix:"habibi-uae"}],dependencies:[],ui:{recommended_package:"habibi_unified",tags:["TTS","Clone"],docs:["docs/models/f5_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{vocab:"model:vocab.txt"},tensors:{transformer:{source:"weights:",prefix:"transformer"}},optional_tensors:{vocos_vocoder:{source:"weights:",prefix:"vocos"}}},{format:"safetensors",roots:{model:"."},files:{vocab:"model:vocab.txt"},tensors:{transformer:{source:"model:model_200000.safetensors",prefix:"ema_model.transformer"}}}]},QT={schema_version:1,family:"firered_audio",display_name:"FireRedAudio",description:"FireRedAudio native GGUF package for generation paths backed by a Qwen3.5 hybrid backbone, FireRed RedAE conditioning, RedPatchEncoder, RedDiT latent flow, and RedAE waveform decoding.",category:"tts",status:"experimental",tasks:["asr","tts","clone","design","edit"],modes:["offline"],languages:["zh","en"],runtime:{tags:["gguf"]},dependencies:[],capabilities:{tts:["speaker_reference","style_control"],clone:["speaker_reference"],design:["voice_design"],edit:["prompt_editing"]},options:{request:[{name:"template_name",type:"enum",description:"Defaults to voice_design for design, acoustic_edit for generation with input audio, tts_clone for other generation, and asr for ASR.",required:!1,values:["tts_clone","voice_design","semantic_edit","acoustic_edit","asr","understand"]},{name:"reference_text",type:"string",description:"Transcript for the prompt audio used by tts_clone.",required:!1},{name:"instruct",type:"string",description:"Voice/delivery conditioning for generation. ASR/understanding uses the text input as its task prompt, not this option.",required:!1},{name:"language",type:"string",description:"FireRedAudio generation language tag.",required:!1,default:"zh"},{name:"num_inference_steps",type:"int",description:"FireRedAudio DiT flow steps per generated latent patch.",required:!1,min:1,default:10},{name:"guidance_scale",type:"float",description:"FireRedAudio DiT classifier-free guidance scale. Must be > 0.",required:!1,min:0,default:2},{name:"max_audio_steps",type:"int",description:"Maximum generated RedAE latent patches.",required:!1,min:1,default:750},{name:"min_audio_steps",type:"int",description:"Minimum generated RedAE latent patches before eosp can stop generation.",required:!1,min:0,default:6},{name:"max_text_tokens",type:"int",description:"Maximum text-mode tokens before audio mode.",required:!1,min:1,default:512},{name:"max_tokens",type:"int",description:"Output token budget; defaults to 300, or 1024 for understand with enable_thinking=true.",required:!1,min:1},{name:"enable_thinking",type:"bool",description:"Leave the understanding think block open for chain-of-thought style answers.",required:!1,default:!1},{name:"top_k",type:"int",description:"Text sampling top-k for understanding.",required:!1,min:0,default:20},{name:"top_p",type:"float",description:"Text sampling top-p for understanding.",required:!1,min:0,max:1,default:.8},{name:"temperature",type:"float",description:"Text sampling temperature for understanding. Understanding-mode sampling requires a positive value; zero does not select greedy decoding.",required:!1,min:0,default:.7},{name:"seed",type:"int",description:"Unsigned 32-bit generation seed in [0, 4294967295]; default 1234.",required:!1,min:0,max:4294967295,default:1234}],session:[{name:"weight_type",type:"enum",description:"FireRedAudio weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"graph_arena_mb",type:"int",description:"Main runtime graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse.",required:!1,min:0,default:2},{name:"mem_saver",type:"bool",description:"Release cached runtime graphs after each request to reduce peak VRAM; default false.",required:!1,default:!1}],load:[]},packages:[{id:"firered_audio_orig",display_name:"FireRedAudio Orig GGUF",format:"gguf",precision:"orig",target_directory:"FireRedAudio-GGUF",files:["FireRedAudio-GGUF/firered-audio-orig.gguf"],strip_prefix:"FireRedAudio-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"firered_audio_q8_0",display_name:"FireRedAudio Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"FireRedAudio-GGUF",files:["FireRedAudio-GGUF/firered-audio-q8_0.gguf"],strip_prefix:"FireRedAudio-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}}],ui:{recommended_package:"firered_audio_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/models/firered_audio.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",processor_config:"model:processor_config.json"},tensors:{model_weights:{source:"weights:",prefix:"model"},redae_decoder_weights:{source:"weights:",prefix:"redae_decoder"}}}]},KT={schema_version:1,family:"firered_vad",display_name:"FireRed VAD",description:"DFSMN speech activity detection with offline and causal Stream-VAD checkpoints.",category:"audio_tools",status:"experimental",tasks:["vad"],modes:["offline","streaming"],languages:["language_agnostic"],capabilities:{vad:["speech_segments"]},runtime:{tags:["gguf"]},options:{request:[{name:"threshold",type:"float",description:"Speech probability threshold; defaults to 0.4 for VAD and 0.5 for Stream-VAD.",required:!1,min:0,max:1},{name:"smooth_window_ms",type:"int",description:"Trailing probability smoothing window in milliseconds, rounded to the nearest 10 ms. Validation occurs after conversion to 10-ms frames; metadata bounds describe intended settings.",required:!1,default:50,min:10},{name:"min_speech_duration_ms",type:"int",description:"Speech confirmation duration, rounded to the nearest 10 ms; defaults to 200 ms for VAD and 80 ms for Stream-VAD. Validation occurs after conversion to 10-ms frames; metadata bounds describe intended settings.",required:!1,min:10},{name:"max_speech_duration_sec",type:"float",description:"Maximum speech duration in seconds, rounded to the nearest 10 ms. Validation occurs after conversion to 10-ms frames; metadata bounds describe intended settings.",required:!1,default:20,min:.02},{name:"min_silence_duration_ms",type:"int",description:"Silence confirmation duration in milliseconds, rounded to the nearest 10 ms. Validation occurs after conversion to 10-ms frames; metadata bounds describe intended settings.",required:!1,default:200,min:0},{name:"merge_silence_duration_ms",type:"int",description:"Merge shorter internal silence gaps in offline VAD; milliseconds rounded to the nearest 10 ms.",required:!1,default:0,min:0},{name:"speech_pad_ms",type:"int",description:"Extend offline VAD segments on each side; milliseconds rounded to the nearest 10 ms.",required:!1,default:0,min:0},{name:"speech_start_pad_ms",type:"int",description:"Stream-VAD start padding in milliseconds, rounded to the nearest 10 ms and at least the smoothing window.",required:!1,default:50,min:0},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum network duration per offline chunk in seconds, rounded to the nearest 10 ms; each chunk resets network history, matching upstream.",required:!1,default:300,min:.01}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"firered_vad_f32",display_name:"FireRed VAD GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"FireRedVAD-GGUF",files:["FireRedVAD-GGUF/firered-vad-f32.gguf"],strip_prefix:"FireRedVAD-GGUF"},{id:"firered_stream_vad_f32",display_name:"FireRed Stream-VAD GGUF F32",format:"gguf",precision:"f32",target_directory:"FireRedVAD-GGUF",files:["FireRedVAD-GGUF/firered-stream-vad-f32.gguf"],strip_prefix:"FireRedVAD-GGUF"}],dependencies:[],ui:{tags:["VAD","GGUF"],docs:["docs/models/firered_vad.md"],recommended_package:"firered_vad_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},YT={schema_version:1,family:"fireredtts3",display_name:"FireRedTTS3",description:"FireRedTTS3 family for Base zero-shot voice cloning and Instruct instruction-conditioned TTS, voice design, semantic edit, and acoustic edit with Qwen3 autoregressive hidden-state generation, FireRed DiT latent patch flow, and RedAE waveform decoding.",category:"tts",status:"experimental",tasks:["tts","clone","design"],modes:["offline"],languages:["Chinese","English","Cantonese","Japanese","Korean","Spanish","French","Russian","Arabic","Turkish","Indonesian","Portuguese","Italian","Dutch","Vietnamese","German","Ukrainian","Thai","Polish","Romanian","Greek","Czech","Finnish","Hindi","ZH_Anhui","ZH_Fujian","ZH_Gansu","ZH_Guizhou","ZH_Hebei","ZH_Henan","ZH_Hubei","ZH_Hunan","ZH_Jiangxi","ZH_Liaoning","ZH_Minnan","ZH_Ningxia","ZH_Shaanxi","ZH_Shandong","ZH_Shanghai","ZH_Shanxi","ZH_Sichuan","ZH_Tianjin","ZH_Wenzhou","ZH_Wu","ZH_Yunnan"],runtime:{tags:["gguf"]},dependencies:[],capabilities:{tts:["speaker_reference","style_control"],clone:["speaker_reference","style_control"],design:["voice_design"]},options:{request:[{name:"template_name",type:"enum",description:"Instruct template; defaults to acoustic_edit with input audio, otherwise instruct_tts.",required:!1,values:["instruct_tts","voice_design","semantic_edit","acoustic_edit"]},{name:"reference_text",type:"string",description:"Transcript for the prompt audio.",required:!1},{name:"instruct",type:"string",description:"FireRedTTS3 instruction for voice design or edit tasks.",required:!1},{name:"language",type:"string",description:"Language tag used by FireRedTTS3.",required:!1,default:"Chinese"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 80 when hanzi, kana and Hangul outnumber other letters and digits (except edits), otherwise 600.",required:!1,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"num_inference_steps",type:"int",description:"FireRed DiT flow steps per generated latent patch.",required:!1,min:1,default:10},{name:"guidance_scale",type:"float",description:"Positive guidance scale; defaults to 1.2 for voice-design/semantic-edit/acoustic-edit templates and 2 otherwise.",required:!1,min:0},{name:"stop_threshold",type:"float",description:"Stop probability threshold for AR patch generation.",required:!1,min:0,max:1,default:.5},{name:"seed",type:"int",description:"Unsigned 32-bit sampling seed in [0, 4294967295]; defaults to 2 for voice design and 1234 otherwise.",required:!1,min:0,max:4294967295}],session:[{name:"weight_type",type:"enum",description:"FireRedTTS3 weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"graph_arena_mb",type:"int",description:"Main runtime graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"helper_graph_arena_mb",type:"int",description:"Helper graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 512.",required:!1,min:1,default:512},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; set 0 to disable reuse. Applies only to Base; Instruct does not use this cache.",required:!1,min:0,default:4},{name:"mem_saver",type:"bool",description:"Release cached runtime graphs after each request to reduce peak VRAM; default false.",required:!1,default:!1}],load:[]},packages:[{id:"fireredtts3_instruct_orig",display_name:"FireRedTTS3 Instruct Orig GGUF",format:"gguf",precision:"orig",target_directory:"FireRedTTS3-Instruct-GGUF",files:["FireRedTTS3-Instruct-GGUF/fireredtts3-instruct-orig.gguf"],strip_prefix:"FireRedTTS3-Instruct-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"fireredtts3_instruct_q8_0",display_name:"FireRedTTS3 Instruct Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"FireRedTTS3-Instruct-GGUF",files:["FireRedTTS3-Instruct-GGUF/fireredtts3-instruct-q8_0.gguf"],strip_prefix:"FireRedTTS3-Instruct-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"fireredtts3_base_orig",display_name:"FireRedTTS3 Base Orig GGUF",format:"gguf",precision:"orig",target_directory:"FireRedTTS3-Base-GGUF",files:["FireRedTTS3-Base-GGUF/fireredtts3-base-orig.gguf"],strip_prefix:"FireRedTTS3-Base-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"fireredtts3_base_q8_0",display_name:"FireRedTTS3 Base Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"FireRedTTS3-Base-GGUF",files:["FireRedTTS3-Base-GGUF/fireredtts3-base-q8_0.gguf"],strip_prefix:"FireRedTTS3-Base-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}}],ui:{recommended_package:"fireredtts3_instruct_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/models/fireredtts3.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{redae_config:"model:redae/config.json",tokenizer_json:"model:text_tokenizer/tokenizer.json",tokenizer_config:"model:text_tokenizer/tokenizer_config.json",vocab_json:"model:text_tokenizer/vocab.json"},optional_files:{base_config:"model:fireredtts3_base/config.json",instruct_config:"model:fireredtts3_instruct/config.json"},tensors:{redae_weights:{source:"weights:",prefix:"redae"}},optional_tensors:{base_weights:{source:"weights:",prefix:"base"},campplus_weights:{source:"weights:",prefix:"campplus"},instruct_weights:{source:"weights:",prefix:"instruct"}}}]},JT={family:"fish_audio",display_name:"Fish Audio S2 Pro",description:"Fish Audio S2 Pro text-to-speech model for expressive speech across 80+ languages, with automatic language handling, inline prosody/emotion controls, and rapid voice cloning from short reference samples.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["80+ languages"],capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"reference_text",type:"string",description:"Reference transcript; required with inline reference audio.",required:!1},{name:"multi_reference_cond",type:"string",description:'Fish Audio ordered JSON array of reference conditioning pairs for one generated speaker: [{"audio":"ref1.wav","text":"Transcript one."},{"audio":"ref2.wav","text":"Transcript two."}]. This is not a multi-speaker dialogue routing option.',required:!1},{name:"max_tokens",type:"int",description:"Maximum Fish Audio semantic tokens to generate; default 1024. Zero selects the default token budget.",required:!1,min:0,default:1024},{name:"text_chunk_size",type:"int",description:"Maximum characters per generated text chunk; default 200.",required:!1,min:1,default:200},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode; default word_budget.",preset:"text_chunk_mode_full",required:!1,default:"word_budget"},{name:"top_p",type:"float",description:"Top-p sampling value in (0, 1]; default 0.8.",required:!1,min:0,max:1,default:.8},{name:"top_k",type:"int",description:"Top-k sampling value; default 30.",required:!1,min:1,default:30},{name:"temperature",type:"float",description:"Semantic-token sampling temperature in (0, 2); default 0.8.",required:!1,min:0,max:2,default:.8},{name:"seed",type:"int",description:"Sampling seed for reproducible output; omitted uses a random seed.",required:!1,min:0}],session:[{name:"lora",type:"path",description:"Prepared Fish Speech adapter checkpoint; merged into slow/fast decoder and embedding weights at session creation. Codec weights are unchanged.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"mem_saver",type:"bool",description:"Release cached AR runtime graphs after each request; default false.",required:!1,default:!1},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; default 1.",required:!1,min:0,default:1},{name:"weight_type",type:"enum",description:"AR matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"codec_weight_type",type:"enum",description:"Codec conv/matmul weight storage type; default native.",preset:"weight_type_codec_q8",required:!1,default:"native"},{name:"codec_encoder_bf16_compute",type:"bool",description:"Use BF16 reference-encoder arithmetic on CUDA with F16/BF16 codec weights; default false. Decoding is unchanged.",required:!1,default:!1},{name:"ar_graph_arena_mb",type:"int",description:"AR runtime graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"ar_weight_context_mb",type:"int",description:"AR weight context size in MiB; default 32.",required:!1,min:1,default:32},{name:"codec_graph_arena_mb",type:"int",description:"Codec encode/decode graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"codec_weight_context_mb",type:"int",description:"Codec weight context size in MiB; default 32.",required:!1,min:1,default:32}],load:[]},ui:{recommended_package:"fish_audio_s2_pro_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"fish_audio_s2_pro_q8_0",display_name:"Fish Audio S2 Pro Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Fish-Audio-S2-Pro-GGUF",files:["Fish-Audio-S2-Pro-GGUF/fish-audio-s2-pro-q8_0.gguf"],strip_prefix:"Fish-Audio-S2-Pro-GGUF"},{id:"fish_audio_s2_pro_bf16",display_name:"Fish Audio S2 Pro BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Fish-Audio-S2-Pro-GGUF",files:["Fish-Audio-S2-Pro-GGUF/fish-audio-s2-pro-bf16.gguf"],strip_prefix:"Fish-Audio-S2-Pro-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},codec_weights:{source:"weights:",prefix:"codec_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{model_weights:"model:model_audio_cpp.safetensors.index.json",codec_weights:"model:codec.safetensors"}}]},XT={family:"fish_drama3",display_name:"Fish Audio Drama 3",description:"Fish Audio Drama 3 native MoE speech generation, voice cloning, and continuation.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline","streaming"],languages:["auto"],capabilities:{tts:["long_form"],clone:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"encode_reference_only",type:"bool",description:"Prepare reference VQ codes without generating speech. Use the task API to receive drama3_reference_v1 acoustic-token artifacts.",required:!1,default:!1},{name:"reference_text",type:"string",description:"Transcript of inline reference audio.",required:!1},{name:"multi_reference_cond",type:"string",description:"Ordered references as JSON: [{text, audio_path or vq_codes}]. Speaker tags 0..15 select voices.",required:!1},{name:"references",type:"string",description:"Alias of multi_reference_cond.",required:!1},{name:"previous_takes",type:"string",description:"Continuation/edit history as a JSON array of {text, vq_codes or audio_path}; a string generates that earlier take first.",required:!1},{name:"previous_takes_file",type:"string",description:"JSON history file containing a take object or an ordered array of earlier takes. Avoids the Windows command-line length limit for VQ grids.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated acoustic frames per text chunk (about 21.5 frames/second).",required:!1,min:1,default:1024},{name:"text_chunk_size",type:"int",description:"Maximum characters per long-form chunk.",required:!1,min:1,default:128},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,preset:"text_chunk_mode_full",default:"tag_aware"},{name:"temperature",type:"float",description:"Main and residual sampling temperature. Zero makes the initial draws greedy; semantic repeat redraws retain the fixed Drama 3 RAS settings.",required:!1,min:0,default:1},{name:"top_p",type:"float",description:"Inclusive nucleus cutoff before top-k filtering, matching Drama 3.",required:!1,min:0,max:1,default:.9},{name:"top_k",type:"int",description:"Top-k candidate count. The default 4097 keeps every candidate (no cap), as Fish's Drama 3 Space does; 30 can stall in long silences.",required:!1,min:1,default:4097},{name:"seed",type:"int",description:"Reproducible native sampling seed.",required:!1,min:0}],session:[{name:"perf_mode",type:"enum",description:"AR decode preset. cuda_perf enables fused MoE, 256-row attention buckets and device sampling. F16 KV storage, codec batching/overlap and prefill-cache defaults remain unchanged in both modes. Explicit session options override the preset.",required:!1,values:["off","cuda_perf"],default:"off"},{name:"fused_moe",type:"bool",description:"Fuse cached backbone MoE routing and SwiGLU activations. Fused arithmetic may change sampled output; prompt prefill is unchanged.",required:!1,default:!1},{name:"kv_cache_alignment",type:"int",description:"Cached decode attention prefix bucket size. Values above 1 retain all history while skipping unused KV capacity; execution shapes may change numerical results.",required:!1,min:1,default:1},{name:"kv_cache_type",type:"enum",description:"Storage precision for full-attention backbone KV caches.",required:!1,values:["f32","f16"],default:"f16"},{name:"backbone_prefill_cache_mb",type:"int",description:"Bounded cache of backbone prefill graphs, in MiB. Reuses exact shapes and their CUDA captures. One active graph is retained even if larger than this budget. Zero retains only the active graph.",required:!1,min:0,max:4096,default:256},{name:"tower_prefill_cache_mb",type:"int",description:"Bounded cache of audio-tower prefill graphs, in MiB. Reuses exact shapes and their CUDA captures. Zero disables it.",required:!1,min:0,max:4096,default:256},{name:"codec_batch_frames",type:"int",description:"Streaming codec batch ceiling. Starts at one frame and grows to this size; partial final batches are flushed. Offline decoding is unchanged.",required:!1,min:1,default:4},{name:"codec_async_decode",type:"bool",description:"Overlap streaming codec decoding with AR generation on the dedicated codec backend. Uses a bounded queue and waits for all audio before completing the request.",required:!1,default:!0},{name:"device_sampling",type:"bool",description:"Enable tower decode and codebook sampling in one cached backend graph. Disabled by default; enabled by cuda_perf unless explicitly overridden. Uses F32 probabilities; sampled outputs may differ from the host sampler.",required:!1,default:!1},{name:"profile_first_audio",type:"bool",description:"Emit first-audio stage timings to stderr for performance diagnosis. Disabled by default.",required:!1,default:!1},{name:"context_length",type:"int",description:"Cache capacity for prompt plus generated frames; includes references and history.",required:!1,min:1,default:2048},{name:"cpu_expert_layers",type:"int",description:"Number of the 40 expert banks kept and evaluated on CPU; use 4 for a 24 GB profile or 24 for a 16 GB profile. Dense layers and the tower use the selected backend.",required:!1,min:0,max:40,default:4},{name:"disk_experts",type:"bool",description:"Read routed expert weights from GGUF on demand into a bounded cache instead of keeping full expert banks resident. Trades speed for memory; default false.",required:!1,default:!1},{name:"pin_experts",type:"bool",description:"Keep full expert banks in pinned host RAM for direct cache-miss uploads. Requires disk_experts and pinned host-buffer support; default false.",required:!1,default:!1},{name:"expert_cache_size",type:"int",description:"Resident expert slots per layer in disk_experts mode; 8 to 256. Larger caches trade memory for fewer disk reads; ignored in resident mode.",required:!1,min:8,max:256,default:32},{name:"disk_expert_read_threads",type:"int",description:"Host workers for copying selected GGUF experts into staging when disk_experts is enabled and pin_experts is false. Default 1 preserves serial reads; values above 1 use OpenMP or Apple dispatch.",required:!1,min:1,max:64,default:1},{name:"codec_encoder_f32_accumulation",type:"bool",description:"Use F32 accumulation for F16 reference-encoder GEMMs on Vulkan. Try this if voice cloning produces incomplete speech or reaches the token limit. Other backends and codec decoding are unchanged.",required:!1,default:!1},{name:"codec_encoder_bf16_compute",type:"bool",description:"Use BF16 reference-encoder arithmetic on CUDA with F16/BF16 codec weights; default true. Decoding is unchanged.",required:!1,default:!0},{name:"codec_encoder_chunk_samples",type:"int",description:"Reference-encoder convolution chunk size in samples at the codec sample rate. Use 0 for full encoding or a positive multiple of 512; default 0.",required:!1,min:0,default:0},{name:"codec_backend",type:"enum",description:"Run the codec on the selected backend or on CPU.",required:!1,values:["same","cpu"],default:"same"}],load:[]},ui:{recommended_package:"fish_drama3_q4_experts_q8_backbone",tags:["TTS","Clone","GGUF"],docs:["docs/models/fish_drama3.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"Jmica/Drama-3-GGUF",revision:"main",gated:!1}},packages:[{id:"fish_drama3_q4_experts_q8_backbone",display_name:"Drama 3 Q4_K experts / Q8_0 backbone",description:"Mixed quantization with Q4_K routed experts, Q8_0 backbone matrices, and FP16 audio tower/codec.",default:!0,format:"gguf",precision:"q4_k",target_directory:"Drama-3-GGUF",files:["drama-3-backbone-8bit-experts-Q4_K_S.gguf"]},{id:"fish_drama3_q3_experts_q8_backbone",display_name:"Drama 3 Q3_K experts / Q8_0 backbone",description:"Mixed quantization with Q3_K routed experts, Q8_0 backbone matrices, and FP16 audio tower/codec. Experimental delivery quality.",format:"gguf",precision:"q3_k_s",target_directory:"Drama-3-GGUF",files:["drama-3-backbone-8bit-experts-Q3_K_S.gguf"]},{id:"fish_drama3_q2_experts_q8_backbone",display_name:"Drama 3 Q2_K experts / Q8_0 backbone",description:"Mixed quantization with Q2_K routed experts, Q8_0 backbone matrices, and FP16 audio tower/codec. Use the documented CPU offload settings for smaller GPUs.",format:"gguf",precision:"q2_k",target_directory:"Drama-3-GGUF",files:["drama-3-backbone-8bit-experts-Q2_K.gguf"]},{id:"fish_drama3_q4_backbone",display_name:"Drama 3 Q4_K experts / Q4_K backbone",description:"Q4_K routed experts and backbone matrices, Q4_0 text embedding, and FP16 audio tower/codec. Experimental delivery quality.",format:"gguf",precision:"q4_k",target_directory:"Drama-3-GGUF",files:["drama-3-backbone-4bit-experts-Q4_K_S.gguf"]},{id:"fish_drama3_small_iq3_xxs",display_name:"Drama3-small IQ3_XXS",format:"gguf",precision:"iq3_xxs",target_directory:"Drama3-small-GGUF",files:["drama3-small-IQ3_XXS.gguf"],download:{kind:"huggingface_snapshot",repo:"pentacoxian-dev/drama3-small-GGUF",revision:"main",gated:!1}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},codec_weights:{source:"weights:",prefix:"codec_weights"}}}],schema_version:1,dependencies:[]},ZT={schema_version:1,family:"fun_asr_nano",display_name:"Fun-ASR-Nano",description:"Offline multilingual speech recognition with the FunAudioLLM Fun-ASR-Nano-2512 model.",category:"asr",status:"wip",tasks:["asr"],modes:["offline"],languages:["auto","zh","en","ja"],capabilities:{},options:{request:[{name:"language",type:"string",description:"Recognition language, or auto to let the model infer it.",required:!1,default:"auto"},{name:"enable_itn",type:"bool",description:"Enable inverse text normalization in the transcription prompt.",required:!1,default:!0},{name:"max_tokens",type:"int",description:"Maximum number of generated transcript tokens.",required:!1,min:1,default:512},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode: auto, fixed, or none.",values:["auto","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Fixed chunk duration in seconds. Must be finite and positive, rounding to at least one input sample.",required:!1,default:30}],session:[{name:"weight_type",type:"enum",description:"Shared model weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"encoder_weight_type",type:"enum",description:"Encoder matmul storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"adaptor_weight_type",type:"enum",description:"Adaptor matmul storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"decoder_weight_type",type:"enum",description:"Decoder matmul storage. Without an explicit override, CUDA promotes shared native/f16/q8_0 storage to bf16; other backends inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:512},{name:"adaptor_graph_arena_mb",type:"int",description:"Adaptor graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:128},{name:"decoder_prefill_graph_arena_mb",type:"int",description:"Decoder prefill graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:256},{name:"decoder_decode_graph_arena_mb",type:"int",description:"Decoder cached-step graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:128},{name:"decoder_weight_context_mb",type:"int",description:"Decoder weight metadata context. Size in MiB; must be positive.",required:!1,min:1,default:32}],load:[]},runtime:{tags:["gguf","server","cuda","metal","cpu"]},packages:[{id:"fun_asr_nano_2512_q8_0",display_name:"Fun-ASR-Nano-2512 Q8_0 GGUF",description:"Standalone audio.cpp GGUF built from the pinned official checkpoint; governed by the FunASR Model Open Source License Agreement v1.1.",default:!0,format:"gguf",precision:"q8_0",target_directory:"Fun-ASR-Nano-2512-GGUF",files:["fun-asr-nano-2512-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"FunAudioLLM/Fun-ASR-Nano-2512-GGUF",revision:"ce72677f84900f0dc57f498ace253bfb3c9155b6",gated:!1}},{id:"fun_asr_nano_2512_f16",display_name:"Fun-ASR-Nano-2512 F16 GGUF",description:"Standalone audio.cpp GGUF built from the pinned official checkpoint; governed by the FunASR Model Open Source License Agreement v1.1.",format:"gguf",precision:"f16",target_directory:"Fun-ASR-Nano-2512-GGUF",files:["fun-asr-nano-2512-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"FunAudioLLM/Fun-ASR-Nano-2512-GGUF",revision:"ce72677f84900f0dc57f498ace253bfb3c9155b6",gated:!1}},{id:"fun_asr_nano_2512_safetensors",display_name:"Fun-ASR-Nano-2512 HF Safetensors",description:"Official checkpoint governed by the FunASR Model Open Source License Agreement v1.1.",format:"safetensors",precision:"native",target_directory:"Fun-ASR-Nano-2512-hf",files:["chat_template.jinja","config.json","generation_config.json","model.safetensors","processor_config.json","tokenizer.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"FunAudioLLM/Fun-ASR-Nano-2512-hf",revision:"854d88f94205cd17d2afdb24332130d86fbe654a",gated:!1}}],dependencies:[],ui:{recommended_package:"fun_asr_nano_2512_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"],summary:"Offline Fun-ASR-Nano transcription from official safetensors or audio.cpp GGUF."},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},optional_files:{chat_template_jinja:"model:chat_template.jinja",tokenizer_config:"model:tokenizer_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},optional_files:{chat_template_jinja:"model:chat_template.jinja",tokenizer_config:"model:tokenizer_config.json"},tensors:{weights:"model:model.safetensors"}}]},e8={schema_version:1,family:"gigaam_asr",display_name:"GigaAM ASR",description:"GigaAM v3 and Multilingual Conformer speech recognition with CTC or RNN-T decoding.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["ru","kk","ky","uz","en"],capabilities:{asr:["word_timestamps","vad_chunking"]},dependencies:[],options:{request:[{name:"return_timestamps",type:"bool",description:"Return word timestamps derived from decoder token emission frames.",required:!1,default:!1},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","quiet_energy","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio chunk in seconds.",required:!1,min:.02,max:25,default:25}],session:[{name:"vad_model_path",type:"path",description:"Offline VAD model used only with audio_chunk_mode=vad.",required:!1,default:""},{name:"weight_type",type:"enum",description:"Weight storage type.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"gigaam_v3_ctc_f16",tags:["ASR","GGUF"],docs:["docs/models/gigaam_asr.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"gigaam_v3_ctc_f16",display_name:"GigaAM v3 CTC F16 GGUF",default:!0,format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-v3-ctc-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_v3_rnnt_f16",display_name:"GigaAM v3 RNN-T F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-v3-rnnt-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_v3_e2e_ctc_f16",display_name:"GigaAM v3 E2E CTC F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-v3-e2e-ctc-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_v3_e2e_rnnt_f16",display_name:"GigaAM v3 E2E RNN-T F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-v3-e2e-rnnt-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_multilingual_ctc_f32",display_name:"GigaAM Multilingual CTC F32 GGUF",format:"gguf",precision:"f32",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-multilingual-ctc-f32.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_multilingual_ctc_f16",display_name:"GigaAM Multilingual CTC F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-multilingual-ctc-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_multilingual_large_ctc_f32",display_name:"GigaAM Multilingual Large CTC F32 GGUF",format:"gguf",precision:"f32",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-multilingual-large-ctc-f32.gguf"],strip_prefix:"GigaAM-ASR-GGUF"},{id:"gigaam_multilingual_large_ctc_f16",display_name:"GigaAM Multilingual Large CTC F16 GGUF",format:"gguf",precision:"f16",target_directory:"GigaAM-ASR-GGUF",files:["GigaAM-ASR-GGUF/gigaam-multilingual-large-ctc-f16.gguf"],strip_prefix:"GigaAM-ASR-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}}]},t8={schema_version:1,family:"glm_tts",display_name:"GLM-TTS",description:"Community Chinese-English zero-shot speech synthesis and voice cloning with native Llama, Whisper-VQ, Flow/DiT, CAMPPlus, and HiFT execution.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline"],languages:["zh","en"],capabilities:{clone:["speaker_reference"]},options:{request:[{name:"reference_text",type:"string",description:"Transcript matching the reference voice audio; required by GLM-TTS zero-shot synthesis.",required:!0},{name:"max_tokens",type:"int",description:"Maximum generated speech tokens; otherwise the official 2x-to-20x text-token bounds are used. Nonpositive values select the automatic text-derived budget.",required:!1,default:0},{name:"temperature",type:"float",description:"Speech-token temperature; official default 1.0. Nonpositive values select greedy decoding.",required:!1,default:1},{name:"top_k",type:"int",description:"Speech-token top-k; official default 25. Nonpositive values disable top-k filtering.",required:!1,default:25},{name:"top_p",type:"float",description:"Speech-token nucleus threshold; official default 0.8. Out-of-range values are not rejected by the parser.",required:!1,default:.8},{name:"seed",type:"int",description:"Speech-token, Flow-noise, and HiFT seed.",required:!1,min:0,default:0},{name:"num_inference_steps",type:"int",description:"Flow Euler steps; defaults to model config, usually official default 10.",required:!1,min:1},{name:"flow_guidance_scale",type:"float",description:"Flow classifier-free guidance rate; defaults to model config, usually official default 0.7. Negative values are accepted and enter the CFG formula.",required:!1},{name:"flow_noise_file",type:"path",description:"Optional raw float32 initial Flow noise for parity tests.",required:!1},{name:"hift_source_random_file",type:"path",description:"Optional raw float32 HiFT phase-uniform and Gaussian values for parity tests.",required:!1},{name:"hift_prior_noise_count",type:"int",description:"Torch RNG value offset used before HiFT source generation; default 0.",required:!1,min:0,default:0}],session:[{name:"weight_type",type:"enum",description:"Requested component weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"mem_saver",type:"bool",description:"Release reference-only encoders after caching the voice while keeping the generation path warm; default false.",required:!1,default:!1},{name:"aggressive_mem_saver",type:"bool",description:"Also release Llama, Flow, and HiFT after every stage. Minimizes VRAM but reloads the generation path on every request; default false.",required:!1,default:!1},{name:"reference_cache_slots",type:"int",description:"Prepared reference-audio cache slots; default 1. Use 0 to disable.",required:!1,min:0,default:1},{name:"llama_weight_context_mb",type:"int",description:"Llama weight metadata context in MiB; default 8192.",required:!1,min:1,default:8192},{name:"constant_context_mb",type:"int",description:"Llama constant tensor context in MiB; default 256.",required:!1,min:1,default:256}],load:[]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{llama_config:"model:llm/config.json",llama_generation_config:"model:llm/generation_config.json",speech_tokenizer_config:"model:speech_tokenizer/config.json",speech_tokenizer_preprocessor:"model:speech_tokenizer/preprocessor_config.json",tokenizer_config:"model:vq32k-phoneme-tokenizer/tokenizer_config.json",tokenizer_vocab:"model:vq32k-phoneme-tokenizer/tokenizer_vocab.json",tokenizer_merges:"model:vq32k-phoneme-tokenizer/tokenizer_merges.txt",flow_config:"model:flow/config.yaml",audio_cpp_config:"model:audio_cpp_config.json"},tensors:{llama_weights:{source:"weights:",prefix:"llama_weights"},speech_tokenizer_weights:{source:"weights:",prefix:"speech_tokenizer_weights"},flow_weights:{source:"weights:",prefix:"flow_weights"},hift_weights:{source:"weights:",prefix:"hift_weights"},campplus_weights:{source:"weights:",prefix:"campplus_weights"}}},{format:"safetensors",roots:{model:"."},files:{llama_config:"model:llm/config.json",llama_generation_config:"model:llm/generation_config.json",speech_tokenizer_config:"model:speech_tokenizer/config.json",speech_tokenizer_preprocessor:"model:speech_tokenizer/preprocessor_config.json",tokenizer_config:"model:vq32k-phoneme-tokenizer/tokenizer_config.json",tokenizer_vocab:"model:vq32k-phoneme-tokenizer/tokenizer_vocab.json",tokenizer_merges:"model:vq32k-phoneme-tokenizer/tokenizer_merges.txt",flow_config:"model:flow/config.yaml",audio_cpp_config:"model:audio_cpp_config.json"},tensors:{llama_weights:"model:llm/model.safetensors.index.json",speech_tokenizer_weights:"model:speech_tokenizer/model.safetensors",flow_weights:"model:flow/model.safetensors",hift_weights:"model:hift/model.safetensors",campplus_weights:"model:frontend/campplus.safetensors"}}],packages:[{id:"glm_tts_q8_0",display_name:"GLM-TTS mixed Q8_0/F16 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"GLM-TTS-Q8",files:["Text to audio (TTS)/GLM-TTS_Q8.gguf"],download:{kind:"huggingface_snapshot",repo:"mirek190/audio.cpp"}}],dependencies:[],ui:{recommended_package:"glm_tts_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/glm_tts.md","docs/reports/glm_tts_validation.md","docs/gguf.md"]}},a8={schema_version:1,family:"gradium_phonon",display_name:"Gradium Phonon",description:"Gradium's Phonon text-to-speech: a small flow-matching language model with a Mimi decoder, a descendant of Kyutai's pocket-tts, for real-time local synthesis on CPU and GPU with prepared voices.",category:"tts",status:"experimental",tasks:["tts"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["built_in_voices","long_form"]},options:{request:[{name:"frames_after_eos",type:"int",description:"Frames kept after EOS, counting the EOS frame; -1 keeps 4 for texts of up to four words and 2 otherwise, as the reference does.",required:!1,min:-1,default:-1},{name:"max_frames",type:"int",description:"Maximum generated audio frames; zero estimates the cap from text length. Captured during session preparation.",required:!1,min:0,default:0},{name:"text_chunk_tokens",type:"int",description:"Tokenizer tokens per text chunk; must be positive, default 50. Set during preparation and overridable per request.",required:!1,min:1,default:50},{name:"temperature",type:"float",description:"Positive flow noise temperature. Captured during session preparation.",required:!1,default:.3},{name:"seed",type:"int",description:"Noise seed; omitted chooses a random seed. Captured during session preparation.",required:!1,min:0,max:4294967295},{name:"noise_clamp",type:"float",description:"Noise clamp; a negative value disables clamping. Captured during session preparation.",required:!1,default:-1},{name:"eos_threshold",type:"float",description:"EOS detection threshold on the EOS logit. Captured during session preparation.",required:!1,default:4},{name:"noise_file",type:"path",description:"Precomputed noise schedule, raw float32 [frames, 32], used as given. Captured during session preparation.",required:!1},{name:"voice_embedding_file",type:"path",description:"Voice file: a speaker_wavs latent file such as those of gradium/phonon-voices, or an exported voice state. Captured during session preparation.",required:!1},{name:"text_chunk_size",type:"int",description:"Optional per-request character chunk size; otherwise use sentence/token budgeting.",required:!1},{name:"export_voice_state_file",type:"path",description:"Export the prepared voice state during session preparation.",required:!1}],session:[{name:"voice_state_cache_slots",type:"int",description:"Cached prepared voice states; zero disables reuse.",required:!1,min:0,default:4},{name:"offline_graph_capacity_mode",type:"enum",description:"Offline graph capacity policy; CPU/Metal default tiered, other backends double.",required:!1,values:["fixed","double","tiered","grow"]},{name:"prompt_graph_capacity",type:"int",description:"Optional reserved prompt capacity.",required:!1,min:1},{name:"generation_graph_capacity",type:"int",description:"Optional reserved generation capacity.",required:!1,min:1},{name:"weight_type",type:"enum",description:"Shared matmul weight storage; component matmul settings inherit it. Convolution storage remains independently native unless overridden.",required:!1,preset:"weight_type_full"},{name:"matmul_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage.",required:!1,preset:"weight_type_conv",default:"native"},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"flow_weight_context_mb",type:"int",description:"Flow weight context in MiB; inherits gradium_phonon.weight_context_mb when omitted.",required:!1,min:1},{name:"mimi_decoder_weight_context_mb",type:"int",description:"Mimi decoder weight context in MiB; inherits gradium_phonon.weight_context_mb when omitted.",required:!1,min:1},{name:"flow_weights_view_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"flow_step_graph_arena_mb",type:"int",description:"Flow-step host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:256},{name:"mimi_conv_graph_arena_mb",type:"int",description:"Mimi convolution host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:32},{name:"mimi_transformer_graph_arena_mb",type:"int",description:"Mimi transformer host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:96},{name:"mimi_tail_graph_arena_mb",type:"int",description:"Mimi tail host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:512},{name:"mimi_full_chunk_frames",type:"int",description:"Full-sequence decoder chunk frames.",required:!1,min:1,default:90},{name:"mimi_stage2_chunk_frames",type:"int",description:"Second-stage decoder chunk frames.",required:!1,min:1,default:900},{name:"use_full_mimi",type:"bool",description:"Use full-sequence Mimi decoding.",required:!1,default:!0}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"gradium/phonon-31m-en-audiocpp",revision:"main",gated:!1}},packages:[{id:"gradium_phonon_31m_en_q8_0",display_name:"Phonon 31m English Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"phonon-31m-en",files:["phonon-31m-en-q8_0.gguf","default-voice.safetensors"]},{id:"gradium_phonon_31m_en_safetensors",display_name:"Phonon 31m English Safetensors",format:"safetensors",precision:"native",target_directory:"phonon-31m-en-safetensors",files:["config.json","tokenizer.model","model.safetensors","default-voice.safetensors"],download:{kind:"huggingface_snapshot",repo:"gradium/phonon-31m-en",revision:"52433c46975bfa13144c56204c9f4ee1c5b148aa",gated:!1}}],dependencies:[],ui:{recommended_package:"gradium_phonon_31m_en_q8_0",default_voice:"default",builtin_voices:["default"],tags:["TTS","GGUF"],docs:["docs/models/gradium_phonon.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"model:model.safetensors"}}]},i8={family:"granite5asr",display_name:"Granite Speech 5.0 470M TurboCTC",description:"IBM Granite Speech 5.0 TurboCTC 470M parameter Conformer CTC model. The current checkpoint transcribes English, French, German, Spanish, Portuguese, Italian, and Japanese with punctuation and capitalization. An older English-only checkpoint still loads.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["en","fr","de","es","pt","it","ja"],capabilities:{asr:["vad_chunking","partial_results","word_timestamps"]},options:{request:[{name:"language",type:"string",description:"Accepted and ignored. Granite has no language input. A result is labelled en unless decoding emits a trained language token such as <|fr|>.",required:!1,default:"en"},{name:"audio_chunk_mode",type:"enum",description:"Offline chunk mode: auto, fixed, vad, or none. VAD requires a regular model file; otherwise fixed chunks are used.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Positive maximum audio chunk duration for fixed and VAD chunking.",required:!1,min:.001,default:30}],session:[{name:"weight_type",type:"enum",description:"Shared model weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MB. Positive MiB allocation; invalid/nonpositive values resolve to 1024 MiB.",required:!1,min:1,default:1024},{name:"vad_model_path",type:"string",description:"Path to a VAD weight file of any built-in VAD family (e.g. silero_vad_16k.safetensors), not a directory; VAD runs only when this path is a regular file.",required:!1}],load:[]},runtime:{tags:["gguf","server","stream","cuda","metal","cpu"]},ui:{recommended_package:"granite5asr_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/models/granite5asr.md","docs/asr.md","docs/gguf.md"],summary:"IBM Granite Speech 5.0 470M TurboCTC multilingual transcription."},package_defaults:{download:{kind:"huggingface_snapshot",repo:"ibm-granite/granite-speech-5.0-470m-turboctc",revision:"main",gated:!1}},packages:[{id:"granite5asr_q8_0",display_name:"Granite Speech 5.0 470M TurboCTC Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Granite-Speech-5.0-470M-TurboCTC-GGUF",files:["Granite-Speech-5.0-470M-TurboCTC-GGUF/granite-speech-5.0-470m-turboctc-q8_0.gguf"],strip_prefix:"Granite-Speech-5.0-470M-TurboCTC-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},{id:"granite5asr_safetensors",display_name:"Granite Speech 5.0 470M TurboCTC Native Safetensors",format:"safetensors",precision:"bfloat16",target_directory:"granite5asr",files:["config.json","tokenizer.json","model.safetensors"]}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{weights:"model:model.safetensors"}}]},n8={schema_version:1,family:"heartmula",display_name:"HeartMuLa",description:"Open-source music foundation model for generating complete songs from text, lyric prompts, and style tags, with controllable song structure and broad multilingual lyric conditioning.",category:"audio_generation",status:"supported",tasks:["music"],modes:["offline"],languages:["multilingual"],capabilities:{music:["lyrics","style_control"]},options:{request:[{name:"lyrics",type:"string",description:"Lyrics text.",required:!1},{name:"tags",type:"string",description:"Comma-separated music tags.",required:!1},{name:"duration_sec",type:"float",description:"Maximum generated audio duration in seconds; must be > 0 when set; default 120.",required:!1,min:0,default:120},{name:"temperature",type:"float",description:"Audio-token sampling temperature; must be > 0 when set; default 1.0.",required:!1,min:0,default:1},{name:"top_k",type:"int",description:"Audio-token top-k sampling limit; default 50. Must not exceed the active audio vocabulary size.",required:!1,min:1,default:50},{name:"guidance_scale",type:"float",description:"MuLa classifier-free guidance scale; must be > 0 when set; default 1.5.",required:!1,min:0,default:1.5},{name:"codec_duration_sec",type:"float",description:"Codec detokenization chunk duration in seconds; must be > 0 when set; default 29.76.",required:!1,min:0,default:29.76},{name:"num_inference_steps",type:"int",description:"Codec flow solver steps; default 10.",required:!1,min:1,default:10},{name:"codec_guidance_scale",type:"float",description:"Codec classifier-free guidance scale; must be > 0 when set; default 1.25.",required:!1,min:0,default:1.25},{name:"infinite_mode",type:"bool",description:"Generate long outputs by splitting lyrics into bounded HeartMuLa requests.",required:!1,default:!1},{name:"text_chunk_size",type:"int",description:"Maximum characters per text chunk in infinite mode; default 4096.",required:!1,min:1,default:4096},{name:"infinite_chunk_audio_duration_ms",type:"int",description:"Maximum generated audio duration per infinite-mode chunk in milliseconds; default 240000.",required:!1,min:1,default:24e4},{name:"seed",type:"int",description:"Generation seed for reproducible output; default 1234.",required:!1,min:0,default:1234}],session:[{name:"weight_type",type:"enum",description:"MuLa and codec weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"generator_weight_type",type:"enum",description:"MuLa music-token generator weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_full",required:!1},{name:"codec_weight_type",type:"enum",description:"Codec weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_full",required:!1},{name:"generator_weight_context_mb",type:"int",description:"MuLa music-token generator weight descriptor context size in MiB; default 32.",required:!1,min:1,default:32},{name:"codec_weight_context_mb",type:"int",description:"Codec weight descriptor context size in MiB; default 32.",required:!1,min:1,default:32},{name:"generator_constant_context_mb",type:"int",description:"MuLa music-token generator reusable constant context size in MiB; default 256.",required:!1,min:1,default:256},{name:"backbone_prefill_graph_arena_mb",type:"int",description:"MuLa music-token generator backbone prefill graph arena size in MiB; default 1536.",required:!1,min:1,default:1536},{name:"backbone_step_graph_arena_mb",type:"int",description:"MuLa music-token generator backbone cached-step graph arena size in MiB; default 1536.",required:!1,min:1,default:1536},{name:"decoder_prefill_graph_arena_mb",type:"int",description:"MuLa music-token generator decoder prefill graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"decoder_step_graph_arena_mb",type:"int",description:"MuLa music-token generator decoder cached-step graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"frame_embedding_graph_arena_mb",type:"int",description:"MuLa music-token generator frame-embedding graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"flow_estimator_graph_arena_mb",type:"int",description:"Codec flow-estimator graph arena size in MiB; default 2048.",required:!1,min:1,default:2048},{name:"conditioning_graph_arena_mb",type:"int",description:"Codec conditioning graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"scalar_decoder_graph_arena_mb",type:"int",description:"Codec scalar-decoder graph arena size in MiB; default 1536.",required:!1,min:1,default:1536},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs after each request; default false.",required:!1,default:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"heartmula_q8_0",tags:["Music","GGUF"],docs:["docs/music_generation.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"heartmula_q8_0",display_name:"HeartMuLa Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"HeartMuLa-GGUF",files:["HeartMuLa-GGUF/heartmula-q8_0.gguf"],strip_prefix:"HeartMuLa-GGUF"},{id:"heartmula_f16",display_name:"HeartMuLa F16 GGUF",format:"gguf",precision:"f16",target_directory:"HeartMuLa-GGUF",files:["HeartMuLa-GGUF/heartmula-f16.gguf"],strip_prefix:"HeartMuLa-GGUF"}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tokenizer_json:"model:tokenizer.json",generation_config:"model:gen_config.json",mula_config:"model:HeartMuLa-oss-3B/config.json",codec_config:"model:HeartCodec-oss/config.json"},tensors:{mula_weights:{source:"weights:",prefix:"mula_weights"},codec_weights:{source:"weights:",prefix:"codec_weights"}}},{format:"safetensors",roots:{model:"."},files:{tokenizer_json:"model:tokenizer.json",generation_config:"model:gen_config.json",mula_config:"model:HeartMuLa-oss-3B/config.json",codec_config:"model:HeartCodec-oss/config.json"},tensors:{mula_weights:"model:HeartMuLa-oss-3B/model.safetensors.index.json",codec_weights:"model:HeartCodec-oss/model.safetensors.index.json"}}]},s8={schema_version:1,family:"higgs_audio_stt",display_name:"Higgs Audio v3 STT",description:"Boson AI English speech-to-text model combining a Whisper Large v3 speech encoder with a Qwen decoder for robust ASR.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["en"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Transcript language code metadata; English is used when omitted.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens; default 1024.",required:!1,min:1,default:1024},{name:"enable_thinking",type:"bool",description:"Enable the model thinking prompt; default true.",required:!1,default:!0},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode; default auto uses fixed chunks.",values:["auto","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Fixed audio chunk duration in seconds; must be > 0 when set; default 4.",required:!1,min:0,default:4}],session:[{name:"weight_type",type:"enum",description:"Shared text decoder weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"audio_encoder_weight_type",type:"enum",description:"Audio encoder convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"text_decoder_weight_type",type:"enum",description:"Text decoder matmul weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_full",required:!1},{name:"audio_encoder_graph_arena_mb",type:"int",description:"Audio encoder graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"text_decoder_prefill_graph_arena_mb",type:"int",description:"Text decoder prefill graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"text_decoder_decode_graph_arena_mb",type:"int",description:"Text decoder cached-step graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"text_decoder_weight_context_mb",type:"int",description:"Text decoder weight context in MiB; omitted uses 4096 on 64-bit builds or 1024 on 32-bit builds.",required:!1,min:1}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"higgs_audio_stt_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/models/higgs_audio_stt.md","docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"higgs_audio_stt_q8_0",display_name:"Higgs Audio v3 STT Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Higgs-Audio-v3-STT-GGUF",files:["Higgs-Audio-v3-STT-GGUF/higgs-audio-v3-stt-q8_0.gguf"],strip_prefix:"Higgs-Audio-v3-STT-GGUF"},{id:"higgs_audio_stt_f16",display_name:"Higgs Audio v3 STT F16 GGUF",format:"gguf",precision:"f16",target_directory:"Higgs-Audio-v3-STT-GGUF",files:["Higgs-Audio-v3-STT-GGUF/higgs-audio-v3-stt-f16.gguf"],strip_prefix:"Higgs-Audio-v3-STT-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",preprocessor_config:"model:preprocessor_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:".",whisper:"../whisper-large-v3"},files:{config:"model:config.json",generation_config:"model:generation_config.json",preprocessor_config:"whisper:preprocessor_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:"model:model.safetensors.index.json"}}]},r8={family:"higgs_audio_tts",display_name:"Higgs Audio v3 TTS",description:"Boson AI conversational TTS model for expressive speech across 100+ languages, zero-shot voice cloning, and inline control over emotion, style, prosody, pauses, and sound effects.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["100+ languages"],options:{request:[{name:"stream_frames_per_event",type:"int",description:"Streaming codec frames per event; grow starts at one and increases to this cap. Each frame is 40 ms of audio.",required:!1,min:1,default:32},{name:"stream_chunk_policy",type:"enum",description:"Streaming chunk schedule. The non-causal codec always retains ten frames of left and right context.",required:!1,values:["grow","fixed"],default:"grow"},{name:"max_tokens",type:"int",description:"Maximum generated AR tokens; zero uses the default. Must not exceed the configured context length.",required:!1,min:0,default:2048},{name:"allow_incomplete_generation",type:"bool",description:"Return generated audio with a warning instead of failing when max_tokens is reached before EOC. Audio may be truncated or contain silence/noise.",required:!1,default:!1},{name:"temperature",type:"float",description:"AR sampling temperature. Must be positive.",required:!1,default:.8},{name:"top_p",type:"float",description:"AR nucleus sampling probability. Must be positive.",required:!1,default:.8},{name:"top_k",type:"int",description:"AR top-k sampling limit.",required:!1,default:30,min:0},{name:"filter_nan_logits",type:"bool",description:"Filter NaN and infinity during greedy and stochastic top-k selection. All-invalid logits still fail.",required:!1,default:!1},{name:"repetition_penalty",type:"float",description:"Accepted for Python API compatibility; audio sampling does not consume this value. Compatibility-only, but must be finite and positive.",required:!1,default:1.1},{name:"seed",type:"int",description:"Torch sampling seed; omitted chooses a random seed.",required:!1,min:0},{name:"reference_text",type:"string",description:"Transcript accompanying reference audio.",required:!1,default:""},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size.",required:!1,default:1024,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,values:["default","tag_aware","japanese","endline"],default:"default"}],session:[{name:"reference_prefill_mode",type:"enum",description:"Cached-reference prefill attention. auto preserves existing behavior. Try exact if repeated voice-cloning requests produce excessive repetition or unexpectedly long, mostly silent output. May increase prefill time; not a general generation-quality fix. Full-prompt prefill and AR decoding are unchanged.",required:!1,values:["auto","exact"],default:"auto"},{name:"weight_type",type:"enum",description:"Weight storage type.",required:!1,preset:"weight_type_full",default:"native"},{name:"ar_weight_type",type:"enum",description:"AR weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"codec_weight_type",type:"enum",description:"Codec weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"ar_weight_context_mb",type:"int",description:"AR weight context in MiB; 4096 on 64-bit builds, 1024 on 32-bit builds.",required:!1,min:1},{name:"codec_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:1536},{name:"ar_decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"codec_decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128},{name:"codec_encode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"reference_cache_slots",type:"int",description:"Encoded reference cache slots; zero disables reuse.",required:!1,min:0,default:1},{name:"attention",type:"enum",description:"Attention lowering preference.",required:!1,values:["auto","flash","eager"],default:"auto"}],load:[]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"higgs_audio_tts_4b_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/higgs_audio_tts.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"higgs_audio_tts_4b_q8_0",display_name:"Higgs Audio v3 TTS 4B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Higgs-Audio-v3-TTS-4B-GGUF",files:["Higgs-Audio-v3-TTS-4B-GGUF/higgs-audio-v3-tts-4b-q8_0.gguf"],strip_prefix:"Higgs-Audio-v3-TTS-4B-GGUF"},{id:"higgs_audio_tts_4b_bf16",display_name:"Higgs Audio v3 TTS 4B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Higgs-Audio-v3-TTS-4B-GGUF",files:["Higgs-Audio-v3-TTS-4B-GGUF/higgs-audio-v3-tts-4b-bf16.gguf"],strip_prefix:"Higgs-Audio-v3-TTS-4B-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",chat_template:"model:chat_template.jinja"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",chat_template:"model:chat_template.jinja"},tensors:{weights:"model:model.safetensors.index.json"}}]},o8={schema_version:1,family:"htdemucs",display_name:"HTDemucs",description:"Hybrid Transformer Demucs music source-separation model that combines waveform and spectrogram processing with Transformer layers to split mixtures into vocals, drums, bass, and accompaniment.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},options:{request:[],session:[{name:"weight_type",type:"enum",description:"HTDemucs weight storage type; default is f32 for host graph planning, f16 on CUDA, otherwise native.",preset:"weight_type_full",required:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"htdemucs_q8_0",tags:["Sep","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"htdemucs_q8_0",display_name:"HTDemucs Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"HTDemucs-GGUF",files:["HTDemucs-GGUF/htdemucs-q8_0.gguf"],strip_prefix:"HTDemucs-GGUF"},{id:"htdemucs_f16",display_name:"HTDemucs F16 GGUF",format:"gguf",precision:"f16",target_directory:"HTDemucs-GGUF",files:["HTDemucs-GGUF/htdemucs-f16.gguf"],strip_prefix:"HTDemucs-GGUF"}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{manifest:"model:manifest.json",submodel_config:"model:955717e8/config.json"},tensors:{submodel_weights:{source:"weights:",prefix:"submodel_weights"}}},{format:"safetensors",roots:{model:".",submodel:"955717e8"},files:{manifest:"model:manifest.json",submodel_config:"submodel:config.json"},tensors:{submodel_weights:"submodel:model.safetensors"}}]},l8={schema_version:1,family:"htdemucs_6stems",display_name:"HTDemucs 6-stem",description:"Hybrid Transformer Demucs 6-stem source-separation model that combines waveform and spectrogram processing with Transformer layers to split mixtures into drums, bass, vocals, other, guitar, and piano.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},options:{request:[],session:[{name:"weight_type",type:"enum",description:"HTDemucs 6-stem weight storage type; default is f32 for host graph planning, f16 on CUDA, otherwise native.",preset:"weight_type_full",required:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"htdemucs_6stems_q8_0",tags:["Sep","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"htdemucs_6stems_q8_0",display_name:"HTDemucs 6-stem Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"HTDemucs-6stems-GGUF",files:["HTDemucs-6stems-GGUF/htdemucs-6stems-q8_0.gguf"],strip_prefix:"HTDemucs-6stems-GGUF"},{id:"htdemucs_6stems_f16",display_name:"HTDemucs 6-stem F16 GGUF",format:"gguf",precision:"f16",target_directory:"HTDemucs-6stems-GGUF",files:["HTDemucs-6stems-GGUF/htdemucs-6stems-f16.gguf"],strip_prefix:"HTDemucs-6stems-GGUF"}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{manifest:"model:manifest.json",submodel_config:"model:5c90dfd2/config.json"},tensors:{submodel_weights:{source:"weights:",prefix:"submodel_weights"}}},{format:"safetensors",roots:{model:".",submodel:"5c90dfd2"},files:{manifest:"model:manifest.json",submodel_config:"submodel:config.json"},tensors:{submodel_weights:"submodel:model.safetensors"}}]},c8={family:"hviske_asr",schema_version:1,display_name:"Hviske ASR",description:"Danish-optimized Conformer encoder-decoder ASR model fine-tuned from the Hviske v5 family, with selectable Cohere ASR language prompts.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["ar","da","de","el","en","es","fr","it","ja","ko","nl","pl","pt","vi","zh"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"ASR language code; default da.",required:!1,default:"da"},{name:"punc",type:"bool",description:"Request punctuation and capitalization together through decoder prompt tokens; default true.",required:!1,default:!0},{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens; defaults to the model config.",required:!1,min:1},{name:"num_beams",type:"int",description:"Beam-search beam count; default 1 uses greedy or sampling decode.",required:!1,min:1,default:1},{name:"length_penalty",type:"float",description:"Beam-search length penalty; must be positive when set; default 1.0.",required:!1,min:1e-6,default:1},{name:"do_sample",type:"bool",description:"Enable sampling instead of greedy decode when num_beams is 1; default false.",required:!1,default:!1},{name:"temperature",type:"float",description:"Decoder sampling temperature; must be positive when set; default 1.0.",required:!1,min:1e-6,default:1},{name:"top_k",type:"int",description:"Top-k sampling limit; default 50, 0 disables top-k.",required:!1,min:0,default:50},{name:"top_p",type:"float",description:"Nucleus sampling limit in (0, 1]; default 1.0.",required:!1,min:1e-6,max:1,default:1},{name:"seed",type:"int",description:"Decoder sampling seed; default 0.",required:!1,min:0,default:0},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode; default auto uses quiet-energy splitting only when audio exceeds the model clip window.",values:["auto","fixed","quiet_energy","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum audio chunk duration in seconds; defaults to the model clip window.",required:!1,min:1e-6}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_conv",required:!1},{name:"weight_context_mb",type:"int",description:"Weight descriptor context size in MiB; default 32.",required:!1,min:1,default:32},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"decoder_prefill_graph_arena_mb",type:"int",description:"Decoder prefill graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"decoder_decode_graph_arena_mb",type:"int",description:"Decoder cached-step graph arena size in MiB; default 512.",required:!1,min:1,default:512}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"hviske_asr_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"]},packages:[{id:"hviske_asr_q8_0",display_name:"Hviske v5.3 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Hviske-v5.3-GGUF",files:["Audio to text (ASR)/hviske-v5.3_Q8.gguf"],strip_prefix:"Audio to text (ASR)",download:{kind:"huggingface_snapshot",repo:"mirek190/audio.cpp"}},{id:"hviske_asr_safetensors",display_name:"Hviske v5.3 Safetensors",format:"safetensors",precision:"native",target_directory:"hviske-v5.3",files:["config.json","generation_config.json","model.safetensors","tokenizer.model"],download:{kind:"huggingface_snapshot",repo:"syvai/hviske-v5.3"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.model"},tensors:{weights:"model:model.safetensors"}}]},d8={schema_version:1,family:"hviske_asr_v6",display_name:"Hviske v6",description:"Danish speech recognition with a rotary Whisper encoder and Qwen3 decoder.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["da"],capabilities:{},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_mode",type:"enum",description:"auto preserves silence splitting above 30 seconds; silence splits above the configured duration at silence boundaries; fixed splits at the configured duration; none disables splitting and accepts at most 30 seconds.",required:!1,default:"auto",values:["auto","silence","fixed","none"]},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum chunk duration when splitting. In auto mode the 30-second trigger remains unchanged.",required:!1,default:28,min:.001,max:30},{name:"max_tokens",type:"int",description:"Maximum generated tokens per chunk, also capped to eight tokens per audio second plus twelve.",required:!1,default:440,min:1},{name:"num_beams",type:"int",description:"Beam-search width. One selects greedy decoding.",required:!1,default:2,min:1},{name:"length_penalty",type:"float",description:"Exponent used to normalize beam scores by generated length.",required:!1,default:1},{name:"cased",type:"bool",description:"Request casing separately from punctuation. Both cased and punc must be provided to override automatic formatting.",required:!1},{name:"punc",type:"bool",description:"Request punctuation only, unlike the combined punctuation/casing control in Canary, Cohere and original Hviske. Both cased and punc must be provided to override automatic formatting.",required:!1}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",description:"Weight storage override; native preserves the supplied checkpoint types.",required:!1,default:"native"}],load:[]},packages:[{id:"hviske_asr_v6_bf16",display_name:"Hviske v6 BF16 GGUF",default:!0,format:"gguf",precision:"bf16",target_directory:"Hviske-v6-GGUF",files:["Hviske-v6-GGUF/hviske-v6-bf16.gguf"],strip_prefix:"Hviske-v6-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf"}},{id:"hviske_asr_v6_q8_0",display_name:"Hviske v6 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Hviske-v6-GGUF",files:["Hviske-v6-GGUF/hviske-v6-q8_0.gguf"],strip_prefix:"Hviske-v6-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf"}}],dependencies:[],ui:{recommended_package:"hviske_asr_v6_bf16",tags:["ASR","GGUF"],docs:["docs/models/hviske_asr_v6.md"]},sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:{source:"model:model.safetensors"}}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},u8={schema_version:1,family:"index_echo",display_name:"Index-Echo-S2TT",description:"Index-Echo speech-to-text translation with bilingual timestamped subtitles.",category:"asr",status:"experimental",tasks:["asr"],modes:["offline"],languages:["zh","en","es","ja"],runtime:{tags:["gguf"]},capabilities:{},dependencies:[],options:{request:[{name:"target_language",type:"enum",values:["en","es","ja"],description:"Translation language for Chinese input audio.",required:!1,default:"en"},{name:"max_tokens",type:"int",description:"Maximum translated text tokens per window.",required:!1,min:1,default:2e3},{name:"temperature",type:"float",description:"Sampling temperature; zero selects greedy decoding.",required:!1,min:0,max:2,default:0},{name:"seed",type:"int",description:"Sampling seed when temperature is positive.",required:!1,min:0,max:2147483647,default:0},{name:"glossary",type:"string",description:"Translation glossary entries.",required:!1},{name:"audio_chunk_mode",type:"enum",values:["auto","quiet_energy","fixed","none"],description:"Long-form audio windowing mode.",required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum audio-window duration.",required:!1,min:1,max:60,default:60}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",description:"Weight storage type for runtime matmul operations.",required:!1,default:"native"}],load:[]},packages:[{id:"index_echo_s2tt_2b_orig",display_name:"Index-Echo-S2TT 2B Original",default:!0,format:"gguf",precision:"orig",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-2b-orig.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}},{id:"index_echo_s2tt_2b_q8_0",display_name:"Index-Echo-S2TT 2B Q8_0",format:"gguf",precision:"q8_0",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-2b-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}},{id:"index_echo_s2tt_2b_q4_k",display_name:"Index-Echo-S2TT 2B Q4_K (experimental)",format:"gguf",precision:"q4_k",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-2b-q4_k.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}},{id:"index_echo_s2tt_9b_orig",display_name:"Index-Echo-S2TT 9B Original",format:"gguf",precision:"orig",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-9b-orig.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}},{id:"index_echo_s2tt_9b_q8_0",display_name:"Index-Echo-S2TT 9B Q8_0",format:"gguf",precision:"q8_0",target_directory:"Index-Echo-S2TT-GGUF",files:["index-echo-s2tt-9b-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/Index-Echo-S2TT-GGUF",revision:"main",gated:!1}}],ui:{recommended_package:"index_echo_s2tt_2b_orig",tags:["ASR","GGUF"],docs:["docs/models/index_echo.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{llm_config:"model:llm/config.json",tokenizer:"model:llm/tokenizer.json",tokenizer_config:"model:llm/tokenizer_config.json",audio_config:"model:audio_config.json"},optional_files:{mapper_config:"model:bridge/mapper_config.json"},tensors:{stlm_weights:{source:"weights:",prefix:"stlm"},audio_weights:{source:"weights:",prefix:"audio"},connector_weights:{source:"weights:",prefix:"connector"}},optional_tensors:{mapper_weights:{source:"weights:",prefix:"mapper"}}}]},f8={family:"index_tts2",display_name:"IndexTTS2",description:"Zero-shot TTS system with voice cloning, emotion-speaker decoupling, text or audio emotion control, and explicit duration control. Variant v2 covers Chinese and English; variant v2.5 (config version 2.5) adds multilingual tiktoken tokenization with Japanese, Spanish and Arabic support.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline"],languages:["zh","en","ja","es","ar"],options:{request:[{name:"text",type:"string",description:"Fallback target text when text_input is absent; prompt is also accepted.",required:!1},{name:"language",type:"string",description:"IndexTTS2.5 text language; empty or auto selects from text.",required:!1},{name:"emotion_alpha",type:"float",description:"Emotion conditioning blend strength.",required:!1,min:0,max:1,default:1},{name:"emotion_vector",type:"string",description:"Eight comma-separated finite emotion strengths.",required:!1},{name:"use_emotion_text",type:"bool",description:"Use text-derived emotion conditioning.",required:!1,default:!1},{name:"emotion_text",type:"string",description:"Emotion description.",required:!1},{name:"use_random_emotion",type:"bool",description:"Use random emotion conditioning.",required:!1,default:!1},{name:"interval_silence_ms",type:"int",description:"Silence between generated segments in milliseconds.",required:!1,min:0,default:200},{name:"do_sample",type:"bool",description:"Enable sampling.",required:!1,default:!0},{name:"top_p",type:"float",description:"Nucleus sampling probability. Must be in (0, 1].",required:!1,default:.8},{name:"top_k",type:"int",description:"Top-k sampling limit.",required:!1,min:1,default:30},{name:"temperature",type:"float",description:"Sampling temperature. Must be positive.",required:!1,default:.8},{name:"length_penalty",type:"float",description:"Beam search length penalty.",required:!1,default:0},{name:"num_beams",type:"int",description:"Beam search width.",required:!1,min:1,default:3},{name:"repetition_penalty",type:"float",description:"Sampling repetition penalty.",required:!1,default:10},{name:"max_tokens",type:"int",description:"Maximum generated mel tokens.",required:!1,min:1,default:1500},{name:"duration_scale",type:"float",description:"Positive waveform duration rescaling, supported by both IndexTTS2 and IndexTTS2.5.",required:!1,default:1},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Optional framework long-form text chunk size; omitted keeps the full input together. Must be positive.",required:!1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,values:["default","tag_aware","japanese","endline"],default:"default"}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; defaults to native.",required:!1,preset:"weight_type_full"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage; native on HIP resolves to F16.",required:!1,preset:"weight_type_conv",default:"native"},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs.",required:!1,default:!1},{name:"speaker_cache_slots",type:"int",description:"Reference or emotion cache slots; zero disables reuse.",required:!1,min:0,default:1},{name:"emotion_cache_slots",type:"int",description:"Reference or emotion cache slots; zero disables reuse.",required:!1,min:0,default:1},{name:"emotion_text_cache_slots",type:"int",description:"Reference or emotion cache slots; zero disables reuse.",required:!1,min:0,default:1},{name:"gpt_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:32},{name:"s2mel_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:32},{name:"reference_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"emotion_text_prefill_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:2048},{name:"emotion_text_decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:32},{name:"emotion_text_max_tokens",type:"int",description:"Emotion description generation token limit; emotion_text_max_new_tokens is also accepted.",required:!1,min:1,default:256}],load:[]},capabilities:{tts:["emotion_control"],clone:["speaker_reference","emotion_control"]},runtime:{tags:["gguf"]},ui:{recommended_package:"index_tts2_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/index_tts2.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"index_tts2_q8_0",display_name:"IndexTTS2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"IndexTTS2-GGUF",files:["IndexTTS2-GGUF/index-tts2-q8_0.gguf"],strip_prefix:"IndexTTS2-GGUF"},{id:"index_tts2_f16",display_name:"IndexTTS2 F16 GGUF",format:"gguf",precision:"f16",target_directory:"IndexTTS2-GGUF",files:["IndexTTS2-GGUF/index-tts2-f16.gguf"],strip_prefix:"IndexTTS2-GGUF"},{id:"index_tts2_orig",display_name:"IndexTTS2 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"IndexTTS2-GGUF",files:["IndexTTS2-GGUF/index-tts2-orig.gguf"],strip_prefix:"IndexTTS2-GGUF"},{id:"index_tts2_safetensors",display_name:"IndexTTS2 Safetensors",format:"safetensors",precision:"native",target_directory:"IndexTTS-2",files:["config.yaml","bpe.model","gpt.safetensors","w2v-bert-2.0/config.json","w2v-bert-2.0/preprocessor_config.json","bigvgan/config.json","qwen0.6bemo4-merge/config.json","qwen0.6bemo4-merge/generation_config.json","qwen0.6bemo4-merge/tokenizer.json","qwen0.6bemo4-merge/tokenizer_config.json","qwen0.6bemo4-merge/vocab.json","qwen0.6bemo4-merge/merges.txt","s2mel.safetensors","feat1.safetensors","feat2.safetensors","wav2vec2bert_stats.safetensors","w2v-bert-2.0/model.safetensors","semantic_codec_model.safetensors","campplus.safetensors","bigvgan/model.safetensors","qwen0.6bemo4-merge/model.safetensors"],download:{kind:"huggingface_snapshot",repo:"mlx-community/index-tts2-mlx"}},{id:"index_tts2_5_q8_0",display_name:"IndexTTS2.5 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"IndexTTS2.5-GGUF",files:["IndexTTS2.5-GGUF/index-tts2_5-q8_0.gguf"],strip_prefix:"IndexTTS2.5-GGUF"},{id:"index_tts2_5_f16",display_name:"IndexTTS2.5 F16 GGUF",format:"gguf",precision:"f16",target_directory:"IndexTTS2.5-GGUF",files:["IndexTTS2.5-GGUF/index-tts2_5-f16.gguf"],strip_prefix:"IndexTTS2.5-GGUF"},{id:"index_tts2_5_orig",display_name:"IndexTTS2.5 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"IndexTTS2.5-GGUF",files:["IndexTTS2.5-GGUF/index-tts2_5-orig.gguf"],strip_prefix:"IndexTTS2.5-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.yaml",wav2vec2bert_config:"model:w2v-bert-2.0/config.json",wav2vec2bert_preprocessor_config:"model:w2v-bert-2.0/preprocessor_config.json",bigvgan_config:"model:bigvgan/config.json",qwen_emotion_config:"model:qwen0.6bemo4-merge/config.json",qwen_emotion_generation_config:"model:qwen0.6bemo4-merge/generation_config.json",qwen_emotion_tokenizer:"model:qwen0.6bemo4-merge/tokenizer.json",qwen_emotion_tokenizer_config:"model:qwen0.6bemo4-merge/tokenizer_config.json",qwen_emotion_vocab:"model:qwen0.6bemo4-merge/vocab.json",qwen_emotion_merges:"model:qwen0.6bemo4-merge/merges.txt"},optional_files:{bpe:"model:bpe.model",tiktoken:"model:multilingual_zh_ja_yue_char_del.tiktoken"},tensors:{gpt:{source:"weights:",prefix:"gpt"},s2mel:{source:"weights:",prefix:"s2mel"},speaker_matrix:{source:"weights:",prefix:"speaker_matrix"},emotion_matrix:{source:"weights:",prefix:"emotion_matrix"},wav2vec2bert_stats:{source:"weights:",prefix:"wav2vec2bert_stats"},wav2vec2bert:{source:"weights:",prefix:"wav2vec2bert"},semantic_codec:{source:"weights:",prefix:"semantic_codec"},campplus:{source:"weights:",prefix:"campplus"},bigvgan:{source:"weights:",prefix:"bigvgan"},qwen_emotion:{source:"weights:",prefix:"qwen_emotion"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.yaml",wav2vec2bert_config:"model:w2v-bert-2.0/config.json",wav2vec2bert_preprocessor_config:"model:w2v-bert-2.0/preprocessor_config.json",bigvgan_config:"model:bigvgan/config.json",qwen_emotion_config:"model:qwen0.6bemo4-merge/config.json",qwen_emotion_generation_config:"model:qwen0.6bemo4-merge/generation_config.json",qwen_emotion_tokenizer:"model:qwen0.6bemo4-merge/tokenizer.json",qwen_emotion_tokenizer_config:"model:qwen0.6bemo4-merge/tokenizer_config.json",qwen_emotion_vocab:"model:qwen0.6bemo4-merge/vocab.json",qwen_emotion_merges:"model:qwen0.6bemo4-merge/merges.txt"},optional_files:{bpe:"model:bpe.model",tiktoken:"model:multilingual_zh_ja_yue_char_del.tiktoken"},tensors:{gpt:"model:gpt.safetensors",s2mel:"model:s2mel.safetensors",speaker_matrix:"model:feat1.safetensors",emotion_matrix:"model:feat2.safetensors",wav2vec2bert_stats:"model:wav2vec2bert_stats.safetensors",wav2vec2bert:"model:w2v-bert-2.0/model.safetensors",semantic_codec:"model:semantic_codec_model.safetensors",campplus:"model:campplus.safetensors",bigvgan:"model:bigvgan/model.safetensors",qwen_emotion:"model:qwen0.6bemo4-merge/model.safetensors"}}]},p8={schema_version:1,family:"inflect_v2",display_name:"Inflect Micro v2",description:"Compact English VITS text-to-speech models with a native GGML inference path and an external eSpeak-ng phonemizer.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"speed",type:"float",description:"Speech speed multiplier mapped directly to Inflect speed; default 1.0.",required:!1,min:.5,max:2,default:1},{name:"variation",type:"float",description:"Latent Gaussian variation; default 0.667.",required:!1,min:0,max:1,default:.667},{name:"seed",type:"int",description:"Non-negative latent noise seed; default 0.",required:!1,min:0,default:0},{name:"text_chunk_mode",type:"enum",description:"Long-form text chunking mode.",values:["word_budget"],required:!1,default:"word_budget"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 280.",required:!1,min:1,default:280}],session:[{name:"espeak_library_path",type:"path",description:"Optional explicit path to the eSpeak-ng shared library.",required:!1},{name:"espeak_data_path",type:"path",description:"Optional explicit path to the directory containing espeak-ng-data.",required:!1},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Component: decoder. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn. GGML keeps the session backend. RKNN requires artifacts.main and ENGINE_ENABLE_RKNN; omit backend. Neither implementation takes params.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"inflect_micro_v2_orig",display_name:"Inflect Micro v2 Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Inflect-Micro-v2-GGUF",files:["Inflect-Micro-v2-GGUF/inflect-micro-v2-orig.gguf"],strip_prefix:"Inflect-Micro-v2-GGUF"}],dependencies:[],ui:{recommended_package:"inflect_micro_v2_orig",tags:["TTS","GGUF"],docs:["docs/tts.md","docs/models/inflect_v2.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},m8={schema_version:1,family:"irodori_tts",display_name:"Irodori-TTS",description:"Japanese TTS with RF and MeanFlow checkpoints, supporting zero-shot voice cloning, automatic duration prediction, multimodal voice design, and emoji-style control.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["ja"],capabilities:{clone:["speaker_reference"],design:["voice_design"]},options:{request:[{name:"stream_frames_per_event",type:"int",description:"Codec latent frames per streaming audio event; default 12 (0.48 seconds at 25 Hz).",required:!1,min:1,default:12},{name:"language",type:"string",description:"Text language code; Irodori-TTS supports Japanese only.",required:!1,default:"ja"},{name:"instruct",type:"string",description:"Natural-language voice or style instruction describing target voice identity, style, or emotion; supported only by caption-conditioned checkpoints. Legacy instruction and caption are accepted as aliases.",required:!1},{name:"no_ref",type:"bool",description:"Use no-reference generation; default true unless a speaker reference is provided.",required:!1,default:!0},{name:"speaker_embedding_file",type:"path",description:"Speaker Inversion embedding (*.speaker.safetensors written by Irodori-TTS training) used as the speaker condition instead of reference audio; use it with the base checkpoint it was trained on. Cannot be combined with reference audio or no_ref=true.",required:!1},{name:"reference_duration_sec",type:"float",description:"Trim reference audio to its first reference_duration_sec seconds before encoding it, as Python Irodori-TTS does; default is the checkpoint's ref_max_seconds (30 when it has none); 0 keeps the whole reference.",required:!1,min:0},{name:"t_schedule_mode",type:"string",description:"RF Euler timestep schedule: linear or sway; default linear.",required:!1,default:"linear"},{name:"sway_coeff",type:"float",description:"Sway Sampling coefficient; must be finite and produce strictly decreasing timesteps. Default -1.0.",required:!1,default:-1},{name:"num_inference_steps",type:"int",description:"Sampling steps; omitted uses 40 for RF checkpoints or 4 for MeanFlow checkpoints.",required:!1,min:1},{name:"duration_sec",type:"float",description:"Target duration in seconds; omitted or nonpositive values select predicted duration.",required:!1},{name:"duration_scale",type:"float",description:"Predicted-duration multiplier; must be > 0 when set; default 1.0.",required:!1,min:0,default:1},{name:"text_chunk_mode",type:"enum",description:"Text chunk policy; word_budget also accepts the legacy spelling default.",values:["word_budget","tag_aware","japanese","endline"],required:!1,default:"endline"},{name:"text_chunk_size",type:"int",description:"Maximum characters per text chunk; default 100, or the model text-token window if smaller.",required:!1,min:1},{name:"min_duration_sec",type:"float",description:"Minimum generated duration in seconds; must be > 0 and no greater than max_duration_sec; default 0.5.",required:!1,min:0,default:.5},{name:"max_duration_sec",type:"float",description:"Maximum generated duration in seconds; must be at least min_duration_sec; default 30. Must be > 0.",required:!1,min:0,default:30},{name:"text_guidance_scale",type:"float",description:"Text classifier-free guidance scale; default 3.0. Nonpositive values disable the corresponding CFG branch.",required:!1,default:3},{name:"speaker_guidance_scale",type:"float",description:"Speaker classifier-free guidance scale; default 5.0. Nonpositive values disable the corresponding CFG branch.",required:!1,default:5},{name:"caption_guidance_scale",type:"float",description:"Caption classifier-free guidance scale; default 3.0. Nonpositive values disable the corresponding CFG branch.",required:!1,default:3},{name:"guidance_scale",type:"float",description:"Override all classifier-free guidance scales when set. Nonpositive values disable the corresponding CFG branch.",required:!1},{name:"guidance_mode",type:"enum",description:"Classifier-free guidance combination mode; default independent.",values:["independent","joint","alternating"],required:!1,default:"independent"},{name:"guidance_min_t",type:"float",description:"Minimum diffusion timestep value where guidance is active; default 0.5. The parser does not enforce a nonnegative bound.",required:!1,default:.5},{name:"guidance_max_t",type:"float",description:"Maximum diffusion timestep value where guidance is active; default 1.0. The parser does not enforce a nonnegative bound.",required:!1,default:1},{name:"seed",type:"int",description:"Unsigned 32-bit generation seed in [0, 4294967295]; omitted uses a random seed.",required:!1,min:0,max:4294967295},{name:"trim_tail",type:"bool",description:"Trim trailing silence-like samples; default true.",required:!1,default:!0}],session:[{name:"weight_type",type:"enum",description:"Model weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"codec_weight_type",type:"enum",description:"DACVAE codec weight storage type; default native.",preset:"weight_type_codec_q8",required:!1,default:"native"},{name:"codec_backend",type:"enum",description:"DACVAE codec execution backend. Use cpu as an opt-in workaround for backend-specific codec decoder issues; default same.",values:["same","cpu"],required:!1,default:"same"},{name:"condition_graph_arena_mb",type:"int",description:"Condition encoder graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"rf_graph_arena_mb",type:"int",description:"RF sampler graph arena size in MiB; default 768.",required:!1,min:1,default:768},{name:"codec_graph_arena_mb",type:"int",description:"DACVAE codec graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"codec_decode_chunk_steps",type:"int",description:"Decode the latent in windows of this many frames (25 per second) so the codec's activation memory stops growing with the output length; 0 decodes the whole sequence at once (default).",required:!1,min:0,default:0},{name:"codec_decode_overlap_steps",type:"int",description:"Latent frames of context decoded on each side of a window and then discarded; default 16.",required:!1,min:0,default:16},{name:"codec_encode_chunk_steps",type:"int",description:"Encode reference audio in windows of this many latent frames (25 per second) so the codec's activation memory stops growing with the reference length; 0 encodes the whole reference at once (default).",required:!1,min:0,default:0},{name:"codec_encode_overlap_steps",type:"int",description:"Latent frames of reference audio encoded as context on each side of a window and then discarded; default 16.",required:!1,min:0,default:16},{name:"condition_weight_context_mb",type:"int",description:"Condition encoder weight context size in MiB; default 32.",required:!1,min:1,default:32},{name:"rf_weight_context_mb",type:"int",description:"RF sampler weight context size in MiB; default 32.",required:!1,min:1,default:32},{name:"codec_weight_context_mb",type:"int",description:"DACVAE codec weight context size in MiB; default 32.",required:!1,min:1,default:32},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs after request phases; default true.",required:!1,default:!0},{name:"reference_cache_slots",type:"int",description:"Prepared reference-speaker cache slots; default 1.",required:!1,min:0,default:1}],load:[]},dependencies:[],runtime:{tags:["gguf"]},ui:{recommended_package:"irodori_tts_v4_small_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"irodori_tts_v4_small_q8_0",display_name:"Irodori-TTS v4.1 Small Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4-small-q8_0.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_v4_1_anime_q8_0",display_name:"Irodori-TTS v4.1 Anime Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4.1-anime-q8_0.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_v4_small_f16",display_name:"Irodori-TTS v4.1 Small F16 GGUF",format:"gguf",precision:"f16",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4-small-f16.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_600m_v3_voicedesign_q8_0",display_name:"Irodori-TTS 600M v3 VoiceDesign Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-600M-v3-VoiceDesign-GGUF",files:["Irodori-TTS-600M-v3-VoiceDesign-GGUF/irodori-tts-600m-v3-voicedesign-q8_0.gguf"],strip_prefix:"Irodori-TTS-600M-v3-VoiceDesign-GGUF"},{id:"irodori_tts_600m_v3_voicedesign_f16",display_name:"Irodori-TTS 600M v3 VoiceDesign F16 GGUF",format:"gguf",precision:"f16",target_directory:"Irodori-TTS-600M-v3-VoiceDesign-GGUF",files:["Irodori-TTS-600M-v3-VoiceDesign-GGUF/irodori-tts-600m-v3-voicedesign-f16.gguf"],strip_prefix:"Irodori-TTS-600M-v3-VoiceDesign-GGUF"},{id:"irodori_tts_500m_v3_q8_0",display_name:"Irodori-TTS 500M v3 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-500M-v3-GGUF",files:["Irodori-TTS-500M-v3-GGUF/irodori-tts-500m-v3-q8_0.gguf"],strip_prefix:"Irodori-TTS-500M-v3-GGUF"},{id:"irodori_tts_v4_1_small_mf_q8_0",display_name:"Irodori-TTS v4.1 Small MeanFlow Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4.1-small-mf-q8_0.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_v4_1_small_mf_f16",display_name:"Irodori-TTS v4.1 Small MeanFlow F16 GGUF",format:"gguf",precision:"f16",target_directory:"Irodori-TTS-v4-Small-GGUF",files:["Irodori-TTS-v4-Small-GGUF/irodori-tts-v4.1-small-mf-f16.gguf"],strip_prefix:"Irodori-TTS-v4-Small-GGUF"},{id:"irodori_tts_500m_v3_f16",display_name:"Irodori-TTS 500M v3 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Irodori-TTS-500M-v3-GGUF",files:["Irodori-TTS-500M-v3-GGUF/irodori-tts-500m-v3-f16.gguf"],strip_prefix:"Irodori-TTS-500M-v3-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{model_config:"model:model_config.json"},optional_files:{tokenizer_json:"model:tokenizer.json",tokenizer_v4_json:"model:tokenizer/tokenizer.json",pretrained_text_config:"model:text_encoder_config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},codec_weights:{source:"weights:",prefix:"codec_weights"}}},{format:"safetensors",roots:{model:".",tokenizer:"../llm-jp-3-150m",codec:"../Semantic-DACVAE-Japanese-32dim"},files:{model_config:"model:model_config.json"},optional_files:{tokenizer_json:"tokenizer:tokenizer.json",tokenizer_v4_json:"model:tokenizer/tokenizer.json",pretrained_text_config:"model:text_encoder_config.json"},tensors:{model_weights:"model:model.safetensors",codec_weights:"codec:weights.safetensors"}}]},g8={schema_version:1,family:"kitten_tts",display_name:"KittenTTS Mini 0.8",description:"Native KittenTTS Mini 0.8 English text-to-speech with eight built-in voices and shared eSpeak-ng phonemization.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["built_in_voices","long_form"]},options:{request:[{name:"voice_id",type:"enum",values:["Bella","Bruno","Hugo","Jasper","Kiki","Leo","Luna","Rosie","expr-voice-2-f","expr-voice-2-m","expr-voice-3-f","expr-voice-3-m","expr-voice-4-f","expr-voice-4-m","expr-voice-5-f","expr-voice-5-m"],description:"Built-in voice ID or package alias; structured voice input (CLI --voice-id) takes precedence.",required:!1,default:"expr-voice-5-m"},{name:"speed",type:"float",description:"Speech speed multiplier; larger values produce faster speech. Must be finite and positive.",required:!1,default:1},{name:"seed",type:"int",description:"Decoder noise seed for the current request; omitted requests choose a fresh random seed.",required:!1,min:0},{name:"text_chunk_mode",type:"enum",description:"Long-form text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form chunk.",required:!1,min:1,default:400}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",description:"Storage type for matrix multiplication weights.",required:!1,default:"native"},{name:"conv_weight_type",type:"enum",preset:"weight_type_conv",description:"Storage type for convolution weights.",required:!1,default:"native"},{name:"graph_capacity_mode",type:"enum",description:"Offline graph capacity policy.",values:["fixed","tiered","grow","double"],required:!1,default:"fixed"},{name:"max_input_tokens",type:"int",description:"Maximum predictor input token capacity; defaults to min(512, checkpoint context_length).",required:!1,min:1,max:512,default:512},{name:"pre_tail_tokens",type:"int",description:"Optional prebuilt predictor tail token capacity.",required:!1,min:0,max:512,default:0},{name:"espeak_library_path",type:"path",description:"Optional explicit path to the eSpeak-ng shared library.",required:!1},{name:"espeak_data_path",type:"path",description:"Optional explicit path to espeak-ng-data.",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"kitten_tts_mini_0_8_orig",display_name:"KittenTTS Mini 0.8 Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"KittenTTS-GGUF",files:["KittenTTS-GGUF/kitten-tts-mini-0.8-orig.gguf"],strip_prefix:"KittenTTS-GGUF"}],dependencies:[],ui:{recommended_package:"kitten_tts_mini_0_8_orig",tags:["TTS","GGUF"],builtin_voices:["Bella","Jasper","Luna","Bruno","Rosie","Hugo","Kiki","Leo"],default_voice:"Leo",docs:["docs/models/kitten_tts.md","docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"kitten"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:ggml/kitten_tts.safetensors"}}]},h8={schema_version:1,family:"kitten_tts2",display_name:"Kitten TTS 2",description:"Native multilingual Kitten TTS 2 Qwen3 speech generation, S3 meanflow decoder, and reference-audio voice cloning.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en","ar","zh","fr","de","hi","it","pt","ru","es","nl","id","ja","ko","pl","tr"],runtime:{tags:["gguf","cpu"]},capabilities:{tts:["built_in_voices","long_form"],clone:["speaker_reference"]},options:{request:[{name:"voice_id",type:"enum",values:["Bella","Jasper","Luna","Bruno","Rosie","Hugo","Kiki","Leo","Matthew","Elliot","Willow","Dolores","Victor","Dante","Alfred","Saoirse","Claire","Raven","Marcus","Herbert","Diana","Laurence","Maeve","Walter","Edith","Miles","Grace","Reginald","Iris","Frank","Serena","Julian","Eleanor","Otis","Vincent","Martha","Sable","Victoria","PreparedBruno","Arabic","Chinese","French","German","Hindi","Italian","Portuguese","Russian","Spanish","AirportAnnouncer","ArabicChildSchool","ArabicFalconer","ArabicMother","ArabicNews","AudiobookNarratorFemale","BoredTeenager","CalmHostageNegotiator","ChineseKidSpringFestival","ChineseLivestreamSeller","ChineseNewsCctv","ChineseXianxiaMaster","DutchBaker","DutchGrandpaStory","DutchWeatherPresenter","FairytaleNarratorWhimsical","FrenchDocumentary","FrenchGrandmereRecette","FrenchTeacher","FrenchWaiter","GermanKidBirthday","GermanKneipe","GermanProfessor","GermanTrainAnnouncement","GrandmaBedtimeStory","GriefEulogy","HindiBollywoodDrama","HindiCollegeFriends","HindiDadiKahani","HindiYogaTeacher","IndonesianNewsAnchor","IndonesianTourGuide","ItalianChildSchool","ItalianFashionDesigner","ItalianFootballFan","ItalianGondolier","ItalianNonnaKitchen","ItalianOperaTenor","JapaneseAnimeHeroine","JapaneseGrandma","JapaneseSalarymanApology","JapaneseTrainConductor","KoreanGrandpaAdvice","KoreanKdramaConfession","KoreanNewsAnchor","LittleGirlExplaining","NervousFirstDate","NewsAnchorFemale","PilotCabinAnnouncement","PolishBabciaPierogi","PolishMountainGuide","PolishNewsAnchor","PolishPoetryStudent","PortugueseBeach","PortugueseBusiness","PortugueseFado","PortugueseGrandpaFarm","PortugueseKidFutebol","PortugueseNewsAnchor","RussianBabushka","RussianFairyTale","RussianHockeyCheer","RussianLiteratureTeacher","RussianSpaceControl","RussianTaxiDriver","SarcasticCoworker","SchoolboyPresentation","SpanishAbuela","SpanishBreakupSad","SpanishChildCuento","SpanishNews","SpanishTango","TurkishFisherman","TurkishGrandmaCooking","TurkishNewsAnchor","WeatherPresenterCheerful"],required:!1,default:"Bruno",description:"Prepared voice name available in the loaded package. A supplied reference clip takes precedence."},{name:"preset",type:"enum",values:["stable","expressive"],required:!1,default:"stable",description:"Upstream sampling preset."},{name:"temperature",type:"float",min:0,required:!1,description:"Sampling temperature; zero selects greedy decoding. Otherwise defaults to the preset."},{name:"top_k",type:"int",min:0,required:!1,description:"Top-k sampling cutoff; defaults to the preset."},{name:"top_p",type:"float",max:1,required:!1,description:"Nucleus sampling cutoff; defaults to the preset. Must be in (0, 1]."},{name:"min_p",type:"float",min:0,max:1,required:!1,description:"Minimum relative probability; defaults to the preset."},{name:"repetition_penalty",type:"float",min:1,required:!1,default:1.1,description:"Penalty over the last 50 generated tokens; silence and ending tokens are exempt."},{name:"max_tokens",type:"int",min:1,max:8192,required:!1,description:"Speech-token budget per text chunk. Omitted budgets scale with text length, with a minimum of 200."},{name:"seed",type:"int",min:0,required:!1,description:"Seed for sampling and waveform decoding."},{name:"text_chunk_size",type:"int",min:32,max:1e3,required:!1,default:380,description:"Maximum Unicode codepoints per framework text chunk."},{name:"text_chunk_mode",type:"enum",values:["default","tag_aware","japanese","endline"],required:!1,default:"tag_aware",description:"Framework long-form text chunking mode."},{name:"reference_text",type:"string",required:!1,description:"Transcript of the reference audio; required when cloning from a 1–30 second clip."}],load:[],session:[{name:"exec_plan",type:"string",required:!1,default:"{}",description:"Component execution plan JSON. vocoder accepts impl=ggml (default) or neon with backend=cpu. NEON requires ENGINE_ENABLE_NEON=ON and an AArch64 NEON CPU, and replaces only the HiFT neural convolution stack."},{name:"weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q8_0"],required:!1,default:"native",description:"Qwen projection storage. native preserves the GGUF's intended tensor types. An explicit override changes projection storage only."}]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"dignome/kitten_tts2",revision:"main",gated:!1}},packages:[{id:"kitten_tts2_bf16",display_name:"Kitten TTS 2 BF16 GGUF (Previous Checkpoint)",default:!1,format:"gguf",precision:"bf16",target_directory:"kitten-tts2-v2",files:["kitten-tts2-bf16-multilingual.gguf","LICENSE","NOTICE","native/LICENSE","speaker/LICENSE","SHA256SUMS"]},{id:"kitten_tts2_q8_v2",display_name:"Kitten TTS 2 Q8 GGUF (Previous Checkpoint)",default:!1,format:"gguf",precision:"q8_0",target_directory:"kitten-tts2-v2",files:["kitten-tts2-q8-v2-multilingual.gguf","LICENSE","NOTICE","native/LICENSE","speaker/LICENSE","SHA256SUMS"]},{id:"kitten_tts2_q4",display_name:"Kitten TTS 2 Hybrid Q4 GGUF (Previous Checkpoint, Experimental)",default:!1,format:"gguf",precision:"q4_0",target_directory:"kitten-tts2-v2",files:["kitten-tts2-q4-multilingual.gguf","LICENSE","NOTICE","native/LICENSE","speaker/LICENSE","SHA256SUMS"]},{id:"kitten_tts2_20261021_q8_0",display_name:"Kitten TTS 2 2026-10-21 Q8 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"KittenTTS2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1},files:["KittenTTS2-GGUF/kitten-tts2-20261021-q8_0.gguf"],strip_prefix:"KittenTTS2-GGUF"},{id:"kitten_tts2_20261021_q4_0",display_name:"Kitten TTS 2 2026-10-21 Q4 GGUF (BF16 Embedding)",default:!1,format:"gguf",precision:"q4_0",target_directory:"KittenTTS2-GGUF",download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1},files:["KittenTTS2-GGUF/kitten-tts2-20261021-q4_0.gguf"],strip_prefix:"KittenTTS2-GGUF"}],dependencies:[],ui:{recommended_package:"kitten_tts2_20261021_q8_0",min_vram_gb:7,tags:["TTS","GGUF"],builtin_voices:["Bella","Jasper","Luna","Bruno","Rosie","Hugo","Kiki","Leo","Matthew","Elliot","Willow","Dolores","Victor","Dante","Alfred","Saoirse","Claire","Raven","Marcus","Herbert","Diana","Laurence","Maeve","Walter","Edith","Miles","Grace","Reginald","Iris","Frank","Serena","Julian","Eleanor","Otis","Vincent","Martha","Sable","Victoria","Arabic","Chinese","French","German","Hindi","Italian","Portuguese","Russian","Spanish"],default_voice:"Bruno",docs:["docs/models/kitten_tts2.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",lm_config:"model:lm/config.json",tokenizer_config:"model:lm/tokenizer_config.json",tokenizer_json:"model:lm/tokenizer.json",default_voices:"model:cpp/default/voices.json"},tensors:{language_model:{source:"weights:",prefix:"language_model"},s3gen:{source:"weights:",prefix:"s3gen"},speaker:{source:"weights:",prefix:"speaker"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",lm_config:"model:lm/config.json",tokenizer_config:"model:lm/tokenizer_config.json",tokenizer_json:"model:lm/tokenizer.json",default_voices:"model:cpp/default/voices.json"},tensors:{language_model:"model:lm/model.safetensors",s3gen:"model:native/s3gen_meanflow.safetensors",speaker:"model:speaker/model.safetensors"}}]},_8={schema_version:1,family:"kokoro_tts",display_name:"Kokoro 82M",description:"Kokoro 82M multilingual text-to-speech with 54 preset voices, optimized native CPU inference, and shared eSpeak-ng phonemization.",category:"tts",status:"community",tasks:["tts"],modes:["offline","streaming"],languages:["en-us","en-gb","es","fr-fr","hi","it","ja","pt-br","zh"],runtime:{tags:["gguf","stream"]},capabilities:{tts:["built_in_voices","long_form"]},options:{request:[{name:"voice_id",type:"enum",values:["af_alloy","af_aoede","af_bella","af_heart","af_jessica","af_kore","af_nicole","af_nova","af_river","af_sarah","af_sky","am_adam","am_echo","am_eric","am_fenrir","am_liam","am_michael","am_onyx","am_puck","am_santa","bf_alice","bf_emma","bf_isabella","bf_lily","bm_daniel","bm_fable","bm_george","bm_lewis","ef_dora","em_alex","em_santa","ff_siwis","hf_alpha","hf_beta","hm_omega","hm_psi","if_sara","im_nicola","jf_alpha","jf_gongitsune","jf_nezumi","jf_tebukuro","jm_kumo","pf_dora","pm_alex","pm_santa","zf_xiaobei","zf_xiaoni","zf_xiaoxiao","zf_xiaoyi","zm_yunjian","zm_yunxi","zm_yunxia","zm_yunyang"],description:"Built-in voice ID; structured voice input (CLI --voice-id) takes precedence.",required:!1,default:"af_heart"},{name:"language",type:"string",description:"Language selection precedence: voice-style language, transcript language (CLI --language), request-option language, then voice prefix. Must match the first voice in a blend.",required:!1},{name:"seed",type:"int",description:"Decoder noise seed for the current request; omitted requests choose a fresh random seed.",required:!1,min:0},{name:"speed",type:"float",description:"Speech speed multiplier; default 1.0. Must be finite and positive.",required:!1,default:1},{name:"phonemes",type:"string_list",description:"Kokoro-vocabulary phonemes to synthesize directly, bypassing the built-in eSpeak-ng G2P. One entry per chunk: entries are rendered in order and merged into one result, so the caller chooses the split points that only its own G2P knows. Each entry must be at most 510 symbols and must not be empty -- an entry is a chunk to speak, so drop it rather than leaving it blank. Text is still required and its language must still match the voice.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum codepoints per text chunk before synthesis. Default 100 for Chinese and Japanese voices, otherwise 240.",required:!1,min:1},{name:"return_timestamps",type:"bool",description:"Report where each phoneme group lands in the output, from the durations the model predicts before vocoding. Entries are phoneme groups in Kokoro's own alphabet, not written words, and do not map one-to-one onto the input text: see docs/models/kokoro_tts.md. Default false.",required:!1,default:!1}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"native",description:"Storage type for matrix multiplication weights."},{name:"conv_weight_type",type:"enum",preset:"weight_type_conv",required:!1,default:"native",description:"Storage type for convolution weights."},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 512.",required:!1,min:1,default:512},{name:"predictor_duration_graph_arena_mb",type:"int",description:"Predictor duration host graph-metadata arena size in MiB, not device workspace; default 384.",required:!1,min:1,default:384},{name:"predictor_text_graph_arena_mb",type:"int",description:"Predictor text host graph-metadata arena size in MiB, not device workspace; default 256.",required:!1,min:1,default:256},{name:"predictor_tail_graph_arena_mb",type:"int",description:"Predictor tail host graph-metadata arena size in MiB, not device workspace; default 640.",required:!1,min:1,default:640},{name:"graph_capacity_mode",type:"enum",description:"Offline graph capacity policy; default fixed.",values:["fixed","tiered","grow","double"],required:!1,default:"fixed"},{name:"max_input_tokens",type:"int",description:"Predictor graph input token capacity; default min(512, model context length).",required:!1,min:1},{name:"pre_tail_tokens",type:"int",description:"Optional prebuilt predictor tail token capacity; default 0.",required:!1,min:0,default:0},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Component: generator. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn/neon. GGML keeps the session backend. The complete NEON generator requires a CPU session and ENGINE_ENABLE_NEON=ON on AArch64, without artifacts or params. RKNN requires artifacts.main and ENGINE_ENABLE_RKNN; omit backend. RKNN params: overlap (nonnegative integer, default 0, smaller than the emitted window), gain (boolean, default false; keeps a GGML generator reference).",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"kokoro_82m_q8_0",display_name:"Kokoro 82M Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Kokoro-82M-GGUF",files:["Kokoro-82M-GGUF/kokoro-82m-q8_0.gguf"],strip_prefix:"Kokoro-82M-GGUF"},{id:"kokoro_82m_bf16",display_name:"Kokoro 82M BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Kokoro-82M-GGUF",files:["Kokoro-82M-GGUF/kokoro-82m-bf16.gguf"],strip_prefix:"Kokoro-82M-GGUF"},{id:"kokoro_82m_generator_rk3588",display_name:"Kokoro 82M NPU Generator RKNN (RK3588)",format:"rknn",precision:"f16",target_directory:"Kokoro-82M-GGUF",files:["rk3588/generator_w512.rknn"],strip_prefix:"rk3588",description:"Pre-compiled RK3588 engine for the kokoro_tts RKNN generator sidecar (kokoro_tts.exec_plan, artifacts.main); installs beside the GGUF weights and is named by bare file name. Built by tools/rknn from the Kokoro-82M iSTFTNet generator export; see docs/build/rockchip-npu.md.",download:{kind:"huggingface_snapshot",repo:"wOvANAI/rknn-tts-engines",revision:"main",gated:!1}}],dependencies:[],ui:{recommended_package:"kokoro_82m_q8_0",tags:["TTS","GGUF"],builtin_voices:["af_alloy","af_aoede","af_bella","af_heart","af_jessica","af_kore","af_nicole","af_nova","af_river","af_sarah","af_sky","am_adam","am_echo","am_eric","am_fenrir","am_liam","am_michael","am_onyx","am_puck","am_santa","bf_alice","bf_emma","bf_isabella","bf_lily","bm_daniel","bm_fable","bm_george","bm_lewis","ef_dora","em_alex","em_santa","ff_siwis","hf_alpha","hf_beta","hm_omega","hm_psi","if_sara","im_nicola","jf_alpha","jf_gongitsune","jf_nezumi","jf_tebukuro","jm_kumo","pf_dora","pm_alex","pm_santa","zf_xiaobei","zf_xiaoni","zf_xiaoxiao","zf_xiaoyi","zm_yunjian","zm_yunxi","zm_yunxia","zm_yunyang"],default_voice:"af_heart",docs:["tests/kokoro_tts/MULTILINGUAL_GGUF.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",voices:"model:voices.json",vocabulary:"model:vocab.tsv"},tensors:{weights:{source:"weights:",prefix:"kokoro"}}}]},v8={schema_version:1,family:"kroko_asr",display_name:"Kroko Community ASR",description:"Native Zipformer2 RNN-T transcription for the public free Kroko Community single-language packages, with offline and stateful streaming inference, greedy and modified beam decoding, hotwords, endpoint segments, partial results, and word timestamps.",category:"asr",status:"community",tasks:["asr"],modes:["offline","streaming"],languages:["de","en","es","fr","it","he","nl","pt","sv","tr"],capabilities:{asr:["word_timestamps","partial_results","segments"]},options:{request:[{name:"language",type:"string",description:"Language code matching the selected single-language Kroko package; default auto uses the package language.",required:!1,default:"auto"},{name:"decoding_method",type:"enum",description:"RNN-T decoding method; greedy search remains the parity-tested default.",values:["greedy_search","modified_beam_search"],required:!1,default:"greedy_search"},{name:"num_beams",type:"int",description:"Maximum active hypotheses retained by modified beam search.",required:!1,min:1,max:64,default:4},{name:"blank_penalty",type:"float",description:"Non-negative score subtracted from the RNN-T blank logit.",required:!1,min:0,default:0},{name:"hotwords",type:"string",description:"Slash- or newline-separated natural-text phrases; requires modified beam search.",required:!1},{name:"hotwords_score",type:"float",description:"Non-negative per-token context boost for hotword phrases.",required:!1,min:0,default:1.5},{name:"enable_endpoint",type:"bool",description:"Enable automatic endpoint speech segments.",required:!1,default:!1},{name:"rule1_min_trailing_silence_sec",type:"float",description:"Endpoint timeout in seconds even when no speech token was decoded.",required:!1,min:0,default:2.4},{name:"rule2_min_trailing_silence_sec",type:"float",description:"Endpoint silence in seconds after a speech token was decoded.",required:!1,min:0,default:1.2},{name:"rule3_min_utterance_length_sec",type:"float",description:"Maximum utterance duration in seconds before an endpoint.",required:!1,min:0,default:20}],session:[],load:[]},runtime:{tags:["gguf","stream"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokens:"model:tokens.txt"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokens:"model:tokens.txt"},tensors:{weights:"model:model.safetensors"}}],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"kroko_asr_community_q8_0",display_name:"Kroko Community ASR Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Kroko-ASR-GGUF",files:["Kroko-ASR-GGUF/kroko-en-community-64-l-q8_0.gguf"],strip_prefix:"Kroko-ASR-GGUF"}],dependencies:[],ui:{recommended_package:"kroko_asr_community_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/models/kroko_asr.md","docs/gguf.md"]}},b8={schema_version:1,family:"kugelaudio",display_name:"KugelAudio-0-Open",description:"KugelAudio text-to-speech with bundled preset voices and incremental audio output.",category:"tts",status:"experimental",tasks:["tts"],modes:["offline","streaming"],languages:["en","de","fr","es","it","pt","nl","pl","ru","uk","cs","ro","hu","sv","da","fi","no","el","bg","sk","hr","sr","tr"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"voice_id",type:"enum",values:["default","clear","english_female","english_male"],description:"Bundled preset voice.",default:"default",required:!1},{name:"num_inference_steps",type:"int",description:"Diffusion steps per acoustic frame, from 1 to 1000; omitted uses the checkpoint's diffusion_head_config.ddpm_num_inference_steps.",min:1,max:1e3,default:20,required:!1},{name:"guidance_scale",type:"float",description:"Diffusion classifier-free guidance; 1 disables the unconditional pass. Any finite value is accepted; negative values enter CFG arithmetic.",default:3,required:!1},{name:"max_tokens",type:"int",description:"Maximum autoregressive tokens per text chunk.",min:1,default:2048,required:!1},{name:"do_sample",type:"bool",description:"Sample autoregressive speech control tokens instead of greedy decoding.",default:!1,required:!1},{name:"temperature",type:"float",description:"Autoregressive sampling temperature when do_sample is enabled. Any finite value is accepted; negative values disable sampling.",default:1,required:!1},{name:"seed",type:"int",description:"Random seed; -1 chooses a random seed.",min:-1,default:1234,required:!1},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk.",min:1,default:300,required:!1},{name:"text_chunk_mode",type:"enum",values:["default","tag_aware","japanese","endline"],description:"Framework long-form text splitting mode.",default:"default",required:!1}],session:[{name:"weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],description:"Weight storage type; native preserves packaged tensor types.",default:"native",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"kugelaudio_0_open_bf16",display_name:"KugelAudio-0-Open BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"KugelAudio-0-Open-GGUF",files:["KugelAudio-0-Open-GGUF/kugelaudio-0-open-bf16.gguf"],strip_prefix:"KugelAudio-0-Open-GGUF"},{id:"kugelaudio_0_open_q8_0",display_name:"KugelAudio-0-Open Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"KugelAudio-0-Open-GGUF",files:["KugelAudio-0-Open-GGUF/kugelaudio-0-open-q8_0.gguf"],strip_prefix:"KugelAudio-0-Open-GGUF"},{id:"kugelaudio_0_open_q4_k",display_name:"KugelAudio-0-Open Q4_K GGUF",default:!1,format:"gguf",precision:"q4_k",target_directory:"KugelAudio-0-Open-GGUF",files:["KugelAudio-0-Open-GGUF/kugelaudio-0-open-q4_k.gguf"],strip_prefix:"KugelAudio-0-Open-GGUF"}],dependencies:[],ui:{recommended_package:"kugelaudio_0_open_q8_0",default_voice:"default",builtin_voices:["default","clear","english_female","english_male"],tags:["TTS","Stream","GGUF"],docs:["docs/models/kugelaudio.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:text_tokenizer/tokenizer.json",tokenizer_config:"model:text_tokenizer/tokenizer_config.json"},tensors:{model_weights:"weights:"}}]},y8={schema_version:1,family:"latentsync",display_name:"LatentSync 1.6",description:"Audio-conditioned lip synchronization of a reference video.",category:"audio_generation",status:"experimental",tasks:["sfx"],modes:["offline"],languages:["auto"],capabilities:{},runtime:{tags:["gguf"]},options:{request:[{name:"reference_video_file",type:"path",required:!0,description:"Reference video containing the face to synchronize. Requires FFmpeg on PATH."},{name:"num_inference_steps",required:!1,type:"int",min:1,max:999,default:20,description:"Number of DDIM denoising steps."},{name:"cache_interval",required:!1,type:"int",min:1,default:1,description:"DeepCache refresh interval. One disables caching; three matches the upstream DeepCache preset. Higher values trade output fidelity for speed."},{name:"guidance_scale",required:!1,type:"float",min:0,default:1.5,description:"Audio classifier-free guidance scale; values at or below one disable CFG."},{name:"frames_per_chunk",required:!1,type:"int",min:1,max:24,default:16,description:"Frames processed together by the temporal denoiser."},{name:"fps",required:!1,type:"float",min:1,default:25,description:"Video sampling and output frame rate."},{name:"seed",required:!1,type:"int",min:0,default:1247,description:"Random seed for latent noise and VAE posterior sampling."}],session:[{name:"weight_type",required:!1,type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],default:"native",description:"Weight storage type; native preserves packaged tensor types."},{name:"vae_cudnn_f16",required:!1,type:"bool",default:!1,description:"Use cuDNN FP16 VAE execution on CUDA. Requires a build with GGML_CUDA_CUDNN_CONV2D=ON; VAE weights are converted to FP16."},{name:"unet_cudnn_f16",required:!1,type:"bool",default:!1,description:"Use cuDNN FP16 convolutions and residual activations in the U-Net on CUDA. Requires a build with GGML_CUDA_CUDNN_CONV2D=ON and FP16 U-Net weights."},{name:"mem_saver",required:!1,type:"bool",default:!1,description:"Release components between pipeline stages and run CFG branches sequentially to reduce peak VRAM. Reloading the VAE for decoding adds some latency."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/LatentSync-1.6-GGUF",revision:"main",gated:!1}},packages:[{id:"latentsync_1_6_q8_0_f16",display_name:"LatentSync 1.6 Q8/F16",format:"gguf",precision:"q8_0",default:!0,target_directory:"LatentSync-1.6-GGUF",files:["latentsync-1.6-q8_0-f16.gguf"]},{id:"latentsync_1_6_f16",display_name:"LatentSync 1.6 F16",format:"gguf",precision:"f16",default:!1,target_directory:"LatentSync-1.6-GGUF",files:["latentsync-1.6-f16.gguf"]},{id:"latentsync_1_6_f32_f16",display_name:"LatentSync 1.6 F32/F16",format:"gguf",precision:"orig",default:!1,target_directory:"LatentSync-1.6-GGUF",files:["latentsync-1.6-f32-f16.gguf"]}],dependencies:[],ui:{recommended_package:"latentsync_1_6_q8_0_f16",tags:["GGUF"],docs:["docs/models/latentsync.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{detector_config:"model:detector_config.json",landmark_config:"model:landmark_config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},w8={schema_version:1,family:"lfm2_audio",display_name:"LFM2.5-Audio",description:"Liquid AI's LFM2.5-Audio, loaded from the llama.cpp-format GGUF components Liquid publishes. ASR: a FastConformer encoder feeds an LFM2 hybrid short-conv/attention backbone. TTS: the backbone generates audio frames through a depthformer, and an LFM2 detokenizer and ISTFT turn them into 24 kHz audio. S2S: a spoken question goes in as for ASR, and the reply comes out as interleaved text and audio.",category:"asr",status:"experimental",tasks:["asr","tts","s2s"],modes:["offline","streaming"],languages:["en","ja"],capabilities:{asr:["vad_chunking"],tts:["built_in_voices","long_form"]},options:{request:[{name:"language",type:"string",description:"Must match the checkpoint's language (en or ja) when given; each published checkpoint transcribes and speaks one language.",required:!1,default:"auto"},{name:"max_tokens",type:"int",description:"ASR: transcript tokens per audio chunk, 512 by default. TTS: audio frames (80 ms each) per text chunk, 512 by default. S2S: text tokens and audio frames of the reply together, 1024 by default. A transcript, a text chunk's speech or a reply that reaches it is cut off there, with a warning on stderr.",required:!1,min:1},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode. auto transcribes input up to audio_chunk_duration_sec whole and splits longer input at pauses found by the bundled VAD (fixed chunks when the VAD model is absent); vad always splits at pauses and skips silence; fixed cuts every audio_chunk_duration_sec; none transcribes the whole input at once.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Longest chunk in seconds, at least 1. With fixed chunks, a final piece shorter than 1 second joins the previous chunk.",required:!1,min:1,default:30},{name:"temperature",type:"float",description:"TTS and S2S: audio code sampling temperature, 0.8 by default for TTS and 1.0 for S2S; 0 picks the most likely code.",required:!1,min:0},{name:"top_k",type:"int",description:"TTS and S2S: sample audio codes from the k most likely, 64 by default for TTS and 4 for S2S; 0 keeps all, 1 is greedy.",required:!1,min:0},{name:"text_temperature",type:"float",description:"S2S: text token sampling temperature; 0, the default, picks the most likely token, as liquid-audio's README and demo do.",required:!1,min:0,default:0},{name:"text_top_k",type:"int",description:"S2S: with a text_temperature above 0, sample text tokens from the k most likely; 0, the default, keeps all, and 1 is greedy.",required:!1,min:0,default:0},{name:"seed",type:"int",description:"TTS and S2S: sampling seed; omitted requests choose a random seed. TTS text chunk i uses seed + i. S2S text sampling draws from a stream of its own, so with the same seed a reply follows the greedy-text reply until a text token differs.",required:!1,min:0},{name:"text_chunk_mode",type:"enum",description:"TTS: long-form text chunking mode; japanese for the Japanese checkpoint and default otherwise when omitted.",values:["default","tag_aware","japanese","endline"],required:!1},{name:"text_chunk_size",type:"int",description:"TTS: maximum Unicode codepoints per text chunk, each spoken as its own turn.",required:!1,min:1,default:200},{name:"stream_frames_per_event",type:"int",description:"TTS and S2S streaming: audio frames (80 ms each) per event; each event's audio is final. ASR runs offline only.",required:!1,min:1,default:1},{name:"return_codes",type:"bool",description:"S2S: also return the reply's text tokens and audio codes as an lfm2_audio.reply artifact, to send back as history with the conversation's next turn.",required:!1,default:!1}],session:[{name:"model_gguf",type:"string",description:"Backbone GGUF, relative to the model directory. Defaults to the directory's only backbone GGUF.",required:!1,default:""},{name:"mmproj_gguf",type:"string",description:"Audio encoder (mmproj) GGUF, relative to the model directory. Defaults to mmproj-, or else the directory's only mmproj GGUF.",required:!1,default:""},{name:"vocoder_gguf",type:"string",description:"TTS/S2S vocoder GGUF (depthformer), relative to the model directory. Defaults to vocoder-, or the directory's only vocoder GGUF.",required:!1,default:""},{name:"detokenizer_gguf",type:"string",description:"TTS/S2S audio detokenizer GGUF, relative to the model directory. Defaults to tokenizer-, or the directory's only tokenizer GGUF.",required:!1,default:""},{name:"vad_model_path",type:"string",description:"Path to the VAD model (any built-in VAD family; default Silero VAD) used by automatic audio chunking.",required:!1,default:"assets/framework/models/silero_vad"},{name:"max_pass_duration_sec",type:"float",description:"Most audio, in seconds, the encoder takes in one pass: an ASR chunk (the whole input with audio_chunk_mode=none) or the S2S question. Longer audio is rejected before it is encoded.",required:!1,min:1,default:120},{name:"cpu_repack",type:"bool",description:"On the CPU, multiply the matrices with the kernels of ggml's CPU extra buffer types where those take the weight's type and shape: the repacked ones take Q4_0 on x86 with AVX2 and Q4_0, Q8_0 and Q6_K on Arm; where ggml's AMX buffer is built, it comes first and also takes F16, Q8_0 and K-quants. Where the token embedding's type is taken, the text head gets a copy of it. Other backends ignore it.",required:!1,default:!0},{name:"conversation_cache_slots",type:"int",description:"S2S: how many conversations a session keeps the earlier questions' encoder output and prefill blocks of, for their next turns, the least recently used dropped first; 0 keeps none. Each kept conversation takes up to about 350 MiB of host memory at the conversation limit, and a slot that no conversation has used takes nothing. Output does not depend on it.",required:!1,min:0,default:4}],load:[]},runtime:{tags:["gguf","cpu","metal","cuda"]},packages:[{id:"lfm2_audio_1_5b_q8_0",display_name:"LFM2.5-Audio-1.5B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"LFM2.5-Audio-1.5B-GGUF",files:["LFM2.5-Audio-1.5B-Q8_0.gguf","mmproj-LFM2.5-Audio-1.5B-Q8_0.gguf","vocoder-LFM2.5-Audio-1.5B-Q8_0.gguf","tokenizer-LFM2.5-Audio-1.5B-Q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-GGUF",revision:"7d525f883a077e20afb782f2ff618edcae0e39e4",gated:!1}},{id:"lfm2_audio_1_5b_f16",display_name:"LFM2.5-Audio-1.5B F16 GGUF",format:"gguf",precision:"f16",target_directory:"LFM2.5-Audio-1.5B-GGUF",files:["LFM2.5-Audio-1.5B-F16.gguf","mmproj-LFM2.5-Audio-1.5B-F16.gguf","vocoder-LFM2.5-Audio-1.5B-F16.gguf","tokenizer-LFM2.5-Audio-1.5B-F16.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-GGUF",revision:"7d525f883a077e20afb782f2ff618edcae0e39e4",gated:!1}},{id:"lfm2_audio_1_5b_q4_0",display_name:"LFM2.5-Audio-1.5B Q4_0 GGUF",format:"gguf",precision:"q4_0",target_directory:"LFM2.5-Audio-1.5B-GGUF",files:["LFM2.5-Audio-1.5B-Q4_0.gguf","mmproj-LFM2.5-Audio-1.5B-Q4_0.gguf","vocoder-LFM2.5-Audio-1.5B-Q4_0.gguf","tokenizer-LFM2.5-Audio-1.5B-Q4_0.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-GGUF",revision:"7d525f883a077e20afb782f2ff618edcae0e39e4",gated:!1}},{id:"lfm2_audio_1_5b_jp_q8_0",display_name:"LFM2.5-Audio-1.5B-JP Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"LFM2.5-Audio-1.5B-JP-GGUF",files:["LFM2.5-Audio-1.5B-JP-Q8_0.gguf","mmproj-LFM2.5-Audio-1.5B-JP-Q8_0.gguf","vocoder-LFM2.5-Audio-1.5B-JP-Q8_0.gguf","tokenizer-LFM2.5-Audio-1.5B-JP-Q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-JP-GGUF",revision:"64b96718b341dbd5650f9e85627cecdcbd4ac61b",gated:!1}},{id:"lfm2_audio_1_5b_jp_f16",display_name:"LFM2.5-Audio-1.5B-JP F16 GGUF",format:"gguf",precision:"f16",target_directory:"LFM2.5-Audio-1.5B-JP-GGUF",files:["LFM2.5-Audio-1.5B-JP-F16.gguf","mmproj-LFM2.5-Audio-1.5B-JP-F16.gguf","vocoder-LFM2.5-Audio-1.5B-JP-F16.gguf","tokenizer-LFM2.5-Audio-1.5B-JP-F16.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-JP-GGUF",revision:"64b96718b341dbd5650f9e85627cecdcbd4ac61b",gated:!1}},{id:"lfm2_audio_1_5b_jp_f32",display_name:"LFM2.5-Audio-1.5B-JP F32 GGUF",format:"gguf",precision:"f32",target_directory:"LFM2.5-Audio-1.5B-JP-GGUF",files:["LFM2.5-Audio-1.5B-JP-F32.gguf","mmproj-LFM2.5-Audio-1.5B-JP-F32.gguf","vocoder-LFM2.5-Audio-1.5B-JP-F32.gguf","tokenizer-LFM2.5-Audio-1.5B-JP-F32.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-JP-GGUF",revision:"64b96718b341dbd5650f9e85627cecdcbd4ac61b",gated:!1}},{id:"lfm2_audio_1_5b_jp_q4_0",display_name:"LFM2.5-Audio-1.5B-JP Q4_0 GGUF",format:"gguf",precision:"q4_0",target_directory:"LFM2.5-Audio-1.5B-JP-GGUF",files:["LFM2.5-Audio-1.5B-JP-Q4_0.gguf","mmproj-LFM2.5-Audio-1.5B-JP-Q4_0.gguf","vocoder-LFM2.5-Audio-1.5B-JP-Q4_0.gguf","tokenizer-LFM2.5-Audio-1.5B-JP-Q4_0.gguf"],download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM2.5-Audio-1.5B-JP-GGUF",revision:"64b96718b341dbd5650f9e85627cecdcbd4ac61b",gated:!1}}],dependencies:[],ui:{tags:["ASR","TTS","GGUF","Stream"],recommended_package:"lfm2_audio_1_5b_q8_0",docs:["docs/models/lfm2_audio.md"],summary:"LFM2.5-Audio transcription, speech and spoken chat (English and Japanese checkpoints) from Liquid's published GGUFs.",builtin_voices:["us_male","us_female","uk_male","uk_female"],default_voice:"us_male"},sources:[{format:"gguf",roots:{model:"."},files:{},optional_files:{},tensors:{}}]},k8={schema_version:1,family:"lfm3_audio",display_name:"LFM3-Audio",description:"Liquid AI's LFM3-Audio-2B, from the llama.cpp-format GGUFs Liquid publishes or the upstream safetensors directory. ASR: a log-mel LFM2 encoder feeds an LFM3 hybrid conv/attention backbone. TTS: the backbone drives a bidirectional MaskGIT depth decoder (12 codebooks, 12.5 Hz) and the LiquidCodec decoder and ISTFT give 24 kHz audio. S2S: a spoken question in, interleaved text and audio out, with client-held multi-turn history.",category:"asr",status:"experimental",tasks:["asr","tts","s2s"],modes:["offline","streaming"],languages:["en","ar","da","de","el","es","fi","fr","he","it","ja","ko","nl","pl","pt","sv","tr","zh"],capabilities:{asr:["vad_chunking"],tts:["built_in_voices","long_form"]},options:{request:[{name:"language",type:"string",description:"ASR: ISO code of the spoken language (prompt 'Perform ASR in .'); auto lets the model infer it ('Perform ASR.'). TTS: picks the default voice of that language when no voice is given.",required:!1,default:"auto"},{name:"max_tokens",type:"int",min:1,description:"ASR: text tokens per audio chunk (max(512, 8 per second of audio); chat 512, or 2048 with enable_thinking). TTS: audio frames (80 ms) per text chunk (512). S2S: text tokens and frames of the reply together (1024).",required:!1},{name:"audio_chunk_mode",type:"enum",values:["auto","fixed","vad","none"],description:"ASR chunking, as lfm2_audio.",required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",min:1,description:"ASR: longest chunk in seconds; auto keeps input up to this long whole and splits longer input at VAD pauses.",required:!1,default:300},{name:"max_audio_tail_frames",type:"int",min:0,description:"S2S: most audio frames after the reply text ends before the turn is closed with an end-of-audio frame; 0 disables the cap.",required:!1,default:375},{name:"temperature",type:"float",min:0,description:"TTS and S2S: audio code temperature; 0 picks the most likely code. The default is the checkpoint's generation_config.json audio_temperature.",required:!1,default:1},{name:"top_k",type:"int",min:0,description:"TTS and S2S: sample audio codes from the k most likely; 0 keeps all. The default is the checkpoint's audio_top_k.",required:!1,default:128},{name:"repetition_penalty",type:"float",min:.01,description:"TTS and S2S: audio repetition penalty over the last 4096 frames (the checkpoint's audio_repetition_window) of each codebook; must be positive, 1 disables it. The default is the checkpoint's audio_repetition_penalty.",required:!1,default:1.1},{name:"text_temperature",type:"float",min:0,description:"ASR and S2S: text token temperature; 0 is greedy.",required:!1,default:0},{name:"text_top_k",type:"int",min:0,description:"ASR and S2S: sample text tokens from the k most likely; 0 keeps all.",required:!1,default:0},{name:"seed",type:"int",description:"Sampling seed (random when absent); TTS text chunk i uses seed + i.",required:!1,min:0},{name:"text_chunk_mode",type:"enum",values:["default","tag_aware","japanese","endline"],description:"TTS long-form text chunking (values as text::parse_text_chunk_mode_override accepts).",required:!1},{name:"text_chunk_size",type:"int",min:1,description:"TTS: target characters per text chunk.",required:!1,default:200},{name:"stream_frames_per_event",type:"int",min:1,description:"TTS and S2S streaming: audio frames per event.",required:!1,default:1},{name:"return_codes",type:"bool",description:"S2S: return the lfm3_audio.reply artifact a client sends back with the next turn.",required:!1,default:!1},{name:"chat",type:"bool",description:"ASR task: answer the spoken input as a text chat reply instead of transcribing it.",required:!1,default:!1},{name:"enable_thinking",type:"bool",description:"ASR chat: let the model think first; only the text after is returned.",required:!1,default:!1}],session:[{name:"weight_type",type:"enum",values:["native","f16","f32"],description:"Weight storage at load. native keeps the file's types (BF16 falls back to F16 where the backend lacks BF16). f32 also uses F32 KV caches and explicit attention, for parity checks.",required:!1,default:"native"},{name:"cpu_repack",type:"bool",description:"CPU: repack matmul weights for ggml's extra buffer kernels.",required:!1,default:!0},{name:"vad_model_path",type:"string",description:"VAD model (any built-in VAD family; default Silero VAD) used by ASR audio_chunk_mode auto/vad.",required:!1,default:"assets/framework/models/silero_vad"},{name:"max_pass_duration_sec",type:"float",min:1,description:"Most audio, in seconds, the encoder takes in one pass (an ASR chunk or the S2S question); longer audio is rejected before it is encoded.",required:!1,default:300}],load:[]},runtime:{tags:["gguf","stream","cpu","metal","cuda"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"LiquidAI/LFM3-Audio-2B-GGUF",revision:"fcfae9027c00a6f3f872c48a841cfeb77e2b5a1c",gated:!1}},packages:[{id:"lfm3_audio_2b_q8_0",display_name:"LFM3-Audio-2B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-Q8_0.gguf","mmproj-LFM3-Audio-2B-Q8_0.gguf"]},{id:"lfm3_audio_2b_f16",display_name:"LFM3-Audio-2B F16 GGUF",format:"gguf",precision:"f16",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-F16.gguf","mmproj-LFM3-Audio-2B-F16.gguf"]},{id:"lfm3_audio_2b_bf16",display_name:"LFM3-Audio-2B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-BF16.gguf","mmproj-LFM3-Audio-2B-BF16.gguf"]},{id:"lfm3_audio_2b_q4_k_m",display_name:"LFM3-Audio-2B Q4_K_M GGUF (Q8_0 mmproj)",format:"gguf",precision:"q4_k_m",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-Q4_K_M.gguf","mmproj-LFM3-Audio-2B-Q8_0.gguf"]},{id:"lfm3_audio_2b_q4_0",display_name:"LFM3-Audio-2B Q4_0 GGUF (Q8_0 mmproj)",format:"gguf",precision:"q4_0",target_directory:"LFM3-Audio-2B-GGUF",files:["LFM3-Audio-2B-Q4_0.gguf","mmproj-LFM3-Audio-2B-Q8_0.gguf"]}],dependencies:[],ui:{tags:["ASR","TTS","GGUF","Stream"],recommended_package:"lfm3_audio_2b_q8_0",docs:["docs/models/lfm3_audio.md"],summary:"LFM3-Audio transcription, multilingual speech and spoken chat from Liquid's published GGUFs.",builtin_voices:["arabic_female","arabic_male","danish_female","danish_male","german_female","german_male","greek_female","greek_male","british_english_female","british_english_male","american_english_female","american_english_male","finnish_female","finnish_male","french_female","french_male","hebrew_female","hebrew_male","italian_female","italian_male","japanese_female","japanese_male","korean_female","korean_male","dutch_female","dutch_male","polish_female","polish_male","portuguese_female","portuguese_male","spanish_female","spanish_male","swedish_female","swedish_male","turkish_female","turkish_male","chinese_female","chinese_male"],default_voice:"american_english_female"},sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json",codec_config:"model:audio_tokenizer/config.json"},tensors:{model:"model:model.safetensors",codec:"model:audio_tokenizer/model.safetensors"}}]},x8={schema_version:1,family:"liveavatar",display_name:"LiveAvatar",description:"LiveAvatar audio-driven avatar video generation using the Wan2.2 S2V architecture.",category:"audio_generation",status:"experimental",tasks:["sfx"],modes:["offline","streaming"],languages:["auto"],runtime:{tags:["cuda","gguf","stream"]},capabilities:{sfx:["prompt_generation"]},options:{request:[{name:"reference_image_file",type:"string",description:"Reference image path used as the identity/appearance condition.",required:!0},{name:"generation_mode",type:"enum",values:["offline","liveavatar"],description:"Use whole-clip generation or LiveAvatar blockwise generation.",required:!1,default:"offline"},{name:"height",type:"int",description:"Generated frame height; must be a positive multiple of 16.",required:!1,min:16,default:480},{name:"width",type:"int",description:"Generated frame width; must be a positive multiple of 16.",required:!1,min:16,default:832},{name:"num_frames",type:"int",description:"Frames generated per LiveAvatar segment; must be positive and a multiple of 4 in blockwise mode (streaming or generation_mode=liveavatar).",required:!1,min:1,default:48},{name:"num_clips",type:"int",description:"Maximum LiveAvatar clips to generate from the input audio.",required:!1,min:1,default:1},{name:"num_inference_steps",type:"int",description:"Denoising steps; offline generation uses UniPC, blockwise generation uses Euler. The LiveAvatar DMD adapter is designed for 4 steps.",required:!1,min:1,default:4},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; LiveAvatar blockwise generation requires 0.",required:!1,min:0,default:0},{name:"batched_cfg",type:"bool",description:"Run classifier-free guidance in one denoiser graph.",required:!1,default:!0},{name:"sage_attention",type:"bool",description:"Use CUDA SageAttention when the backend supports it.",required:!1,default:!0},{name:"mem_saver",type:"bool",description:"Reuse immutable condition data and temporary denoiser graph storage across sequential blocks.",required:!1,default:!0},{name:"denoiser_layerwise",type:"bool",description:"Run the denoiser in layerwise mode. Offline generation requires batched_cfg=true and guidance_scale > 1.",required:!1,default:!1},{name:"denoiser_layerwise_batch",type:"int",description:"Layer group size used by layerwise denoising.",required:!1,min:1,default:16},{name:"vae_encoder_chunk_size",type:"int",description:"Cached VAE encoder chunk size.",required:!1,min:1,default:16},{name:"vae_decoder_tile_size",type:"int",description:"Opt-in VAE decoder spatial tile size for large outputs; 0 disables tiling. Enabled tile sizes must be multiples of 8 and larger than the 64-pixel overlap.",required:!1,min:0,default:0},{name:"target_cache_blocks",type:"int",description:"Target KV cache window in block units; 0 keeps the full clip cache.",required:!1,min:0,default:0},{name:"vae_cache_f16",type:"bool",description:"Store cached VAE encoder state in F16.",required:!1,default:!0},{name:"shift",type:"float",description:"Flow scheduler shift; must be > 0.",required:!1,min:0,default:3},{name:"negative_prompt",type:"string",description:"Negative prompt for classifier-free guidance.",required:!1},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,default:420}],session:[{name:"denoiser_weight_streaming",type:"bool",description:"Keep denoiser transformer blocks in host memory and stage layer groups on the accelerator.",required:!1,default:!1}],load:[{name:"support_gguf",type:"string",description:"Support GGUF containing text_encoder/audio_encoder tensors and the embedded tokenizer sidecar.",required:!1,default:"Wan2.2-S2V-Support-Q4_K_S-F16.gguf"},{name:"vae_gguf",type:"string",description:"Wan video VAE component GGUF file relative to the model root.",required:!1,default:"Wan2.2-S2V-VAE-F16.gguf"},{name:"denoiser_gguf",type:"string",description:"Denoiser DiT GGUF file relative to the model root.",required:!1,default:"Wan2.2-S2V-14B-NVFP4-LORA.gguf"}]},dependencies:[],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/LiveAvatar-GGUF",revision:"main",gated:!1}},packages:[{id:"liveavatar_nvfp4_lora",display_name:"LiveAvatar NVFP4 LoRA GGUF",default:!0,format:"gguf",precision:"native",target_directory:"LiveAvatar-GGUF",files:["Wan2.2-S2V-Support-Q4_K_S-F16.gguf","Wan2.2-S2V-VAE-F16.gguf","Wan2.2-S2V-14B-NVFP4-LORA.gguf"]}],sources:[{format:"gguf",roots:{model:"."},files:{tokenizer_model:"model:tokenizer/spiece.model"},tensors:{text_encoder_weights:{source:"model:Wan2.2-S2V-Support-Q4_K_S-F16.gguf",prefix:"text_encoder"},audio_encoder_weights:{source:"model:Wan2.2-S2V-Support-Q4_K_S-F16.gguf",prefix:"audio_encoder"}}},{format:"gguf",roots:{model:"."},tensors:{vae_weights:{source:"model:Wan2.2-S2V-VAE-F16.gguf",prefix:"vae"}}},{format:"gguf",roots:{model:"."},tensors:{denoiser_weights:{source:"model:Wan2.2-S2V-14B-NVFP4-LORA.gguf"}}}],ui:{recommended_package:"liveavatar_nvfp4_lora",tags:["SFX","GGUF","Stream"],docs:["docs/models/liveavatar.md"]}},S8={schema_version:1,family:"magenta_realtime_2",display_name:"Magenta RealTime 2",description:"Frame-autoregressive stereo music generation with text, audio style, and MIDI conditioning.",category:"audio_generation",status:"experimental",tasks:["music"],modes:["offline","streaming"],languages:["auto"],runtime:{tags:["gguf"]},capabilities:{music:["instrumental","style_control"]},options:{request:[{name:"duration_sec",type:"float",description:"Requested music duration in seconds.",min:.04,default:10,required:!1},{name:"temperature",type:"float",description:"Sampling temperature; zero selects greedy decoding.",min:0,default:1.3,required:!1},{name:"top_k",type:"int",description:"Sampling candidate limit; zero keeps all 1024 valid codes.",min:0,max:1024,default:40,required:!1},{name:"seed",type:"int",description:"Generation seed.",min:0,max:4294967295,default:0,required:!1},{name:"guidance_scale",type:"float",description:"MusicCoCa style guidance, discretized to the model's trained conditioning tokens.",min:-1,max:7,default:3,required:!1},{name:"note_guidance_scale",type:"float",description:"MIDI note guidance.",min:-1,max:7,default:1,required:!1},{name:"drum_guidance_scale",type:"float",description:"Drum guidance.",min:-1,max:7,default:1,required:!1},{name:"use_mapper",type:"bool",description:"Map text style embeddings into the audio embedding space.",default:!0,required:!1},{name:"pianoroll_file",type:"string",description:"Optional JSON array of 128 MIDI pitch states per frame at 25 Hz: -1 masked, 0 off, 1 sustain, 2 onset, 3 model chooses.",required:!1},{name:"drums",type:"int",description:"Drum conditioning: -1 leaves drums unspecified, 0 requests no drums, 1 requests drums.",required:!1,min:-1,max:1,default:-1}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",description:"Transformer weight storage type.",default:"native",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Magenta-RealTime-2-GGUF",revision:"main",gated:!1}},packages:[{id:"magenta_realtime_2_small_f16",display_name:"Magenta RealTime 2 Small F16",format:"gguf",precision:"f16",target_directory:"Magenta-RealTime-2-GGUF",files:["magenta-rt2-small-f16.gguf"],default:!0},{id:"magenta_realtime_2_small_q8_0",display_name:"Magenta RealTime 2 Small Q8_0",format:"gguf",precision:"q8_0",target_directory:"Magenta-RealTime-2-GGUF",files:["magenta-rt2-small-q8_0.gguf"]},{id:"magenta_realtime_2_base_f16",display_name:"Magenta RealTime 2 Base F16",format:"gguf",precision:"f16",target_directory:"Magenta-RealTime-2-GGUF",files:["magenta-rt2-base-f16.gguf"]},{id:"magenta_realtime_2_base_q8_0",display_name:"Magenta RealTime 2 Base Q8_0",format:"gguf",precision:"q8_0",target_directory:"Magenta-RealTime-2-GGUF",files:["magenta-rt2-base-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"magenta_realtime_2_small_f16",tags:["Music","GGUF"],docs:["docs/models/magenta_realtime_2.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",musiccoca_config:"model:musiccoca.json",musiccoca_tokenizer:"model:spm.model"},tensors:{weights:{source:"weights:",prefix:"generator"},musiccoca:{source:"weights:",prefix:"musiccoca"}}}]},T8={schema_version:1,family:"magpie_tts",display_name:"MagpieTTS Multilingual 357M",description:"NVIDIA MagpieTTS is a multilingual neural text-to-speech model that generates NanoCodec audio tokens from text using baked speaker context embeddings, a decoder-only transformer, and an autoregressive local transformer before decoding the tokens to waveform audio.",category:"tts",status:"supported",tasks:["tts"],modes:["offline"],languages:["ar-AE","ar-MSA","ar-SA","de","en","es","fr","hi","it","ko","pt-BR","vi","zh"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"language",type:"string",description:"Target synthesis language code used by the Magpie text frontend; default en.",required:!1,default:"en"},{name:"voice_id",type:"enum",description:"Packaged MagpieTTS voice name; default Aria. Numeric speaker index strings are also accepted within the checkpoint speaker count.",values:["Aria","Jason","John","Leo","Sofia"],required:!1,default:"Aria"},{name:"temperature",type:"float",description:"Autoregressive audio-token sampling temperature; default 0.6 from the v2607 model config.",required:!1,min:0,default:.6},{name:"top_k",type:"int",description:"Autoregressive audio-token top-k sampling limit; default 80.",required:!1,min:1,default:80},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale for Magpie decoder logits; default 2.5.",required:!1,min:0,default:2.5},{name:"max_tokens",type:"int",description:"Maximum Magpie decoder frames per text segment; default 500 from the v2607 model config.",required:!1,min:1,default:500},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 100 for zh and ko, otherwise 300.",required:!1,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"seed",type:"int",description:"Seed for audio-token sampling; default 0.",required:!1,min:0,default:0}],session:[{name:"graph_arena_mb",type:"int",description:"Reusable ggml graph arena size in MiB for Magpie stages; default 1024.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight loading context size in MiB; default 2048.",required:!1,min:1,default:2048},{name:"weight_type",type:"enum",description:"Matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"magpie_tts_orig",display_name:"MagpieTTS Multilingual 357M Original-Dtype GGUF",default:!1,format:"gguf",precision:"orig",target_directory:"MagpieTTS-Multilingual-357M-GGUF",files:["MagpieTTS-Multilingual-357M-GGUF/magpie-tts-multilingual-357m-orig.gguf"],strip_prefix:"MagpieTTS-Multilingual-357M-GGUF"},{id:"magpie_tts_q8_0",display_name:"MagpieTTS Multilingual 357M Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MagpieTTS-Multilingual-357M-GGUF",files:["MagpieTTS-Multilingual-357M-GGUF/magpie-tts-multilingual-357m-q8_0.gguf"],strip_prefix:"MagpieTTS-Multilingual-357M-GGUF"}],dependencies:[],ui:{recommended_package:"magpie_tts_q8_0",tags:["TTS","GGUF"],docs:["docs/models/magpie_tts.md","docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",codec_config:"model:codec_config.json",speakers:"model:speakers.json"},optional_files:{ipa_dict:"model:ipa_dict.txt",cmu_dict:"model:cmu_dict.txt",german_dict:"model:german.dict",german_heteronyms:"model:german.heteronym",spanish_dict:"model:spanish.dict",portuguese_dict:"model:portuguese.dict",hindi_dict:"model:hindi.dict",heteronyms:"model:heteronyms",mandarin_chars:"model:mandarin_data/pinyin_chars.tsv",mandarin_phrases:"model:mandarin_data/pinyin_phrases.tsv",mandarin_jieba_dict:"model:mandarin_data/jieba.dict.utf8",mandarin_hmm:"model:mandarin_data/hmm_model.utf8"},tensors:{model:{source:"weights:",prefix:"model"},codec:{source:"weights:",prefix:"codec"}}},{format:"safetensors",roots:{model:".",codec:"../nemo_nano_codec_22khz_1_89kbps_safetensors"},files:{config:"model:config.json",codec_config:"codec:config.json",speakers:"model:41913ebaa70342058574da74293b7630_magpie_tts_multilingual_357m.nemo.speakers.json"},optional_files:{ipa_dict:"model:74b3e832fe914a569fcd42b51d06b2f1_ipa_dict_nv23.05.txt",cmu_dict:"model:dc7d60d6b15a4651b21c9ca2932b62c6_ipa_cmudict-0.7b_nv23.01.txt",german_dict:"model:cf01ab5c48c84f3282ef7888263361e5_de_nv230119.dict",german_heteronyms:"model:c5e4ec2af5a14ce294f4b9edcc936535_de_nv230119.heteronym",spanish_dict:"model:7dbc31751f224f2486090d59dc95b9f7_es_ES_nv230301.dict",portuguese_dict:"model:05adc40366e149b69319acd4b28a4919_pt_br_prondict-v1.0.dict",hindi_dict:"model:339da71c54b046f98cbcf38ef6d4ff67_hindi_phoneme_merged_phoneme_dict.dict",heteronyms:"model:61d57a4ccb064d1e8e3d9f871c571932_heteronyms-052722"},tensors:{model:"model:model.safetensors",codec:"codec:model.safetensors"}}]},$8={schema_version:1,family:"maya1",display_name:"Maya1",description:"Maya Research's 3B expressive English text-to-speech model with natural-language voice design and inline emotion control.",category:"tts",status:"supported",tasks:["tts","design"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["voice_design","emotion_control","long_form"],design:["voice_design"]},options:{request:[{name:"instruct",type:"string",description:"Natural-language description of the voice, accent, timbre, age, and delivery.",required:!0},{name:"max_tokens",type:"int",description:"Maximum generated audio-token count per text chunk; default 2048.",required:!1,min:1,default:2048},{name:"min_tokens",type:"int",description:"Minimum generated audio-token count before EOS may stop generation; default 28.",required:!1,min:0,default:28},{name:"temperature",type:"float",description:"Autoregressive sampling temperature; default 0.4. Must be > 0.",required:!1,min:0,default:.4},{name:"top_p",type:"float",description:"Autoregressive nucleus sampling probability; must be in (0, 1], default 0.9.",required:!1,min:0,max:1,default:.9},{name:"repetition_penalty",type:"float",description:"Autoregressive repetition penalty; default 1.1. Must be > 0.",required:!1,min:0,default:1.1},{name:"seed",type:"int",description:"Sampling and SNAC decoder noise seed; omitted requests choose a random seed.",required:!1,min:0},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 300.",required:!1,min:1,default:300},{name:"text_chunk_mode",type:"enum",description:"Framework long-form text chunking mode; tag_aware preserves inline emotion tags.",values:["default","tag_aware","japanese","endline"],required:!1,default:"tag_aware"}],session:[{name:"weight_type",type:"enum",description:"Shared AR and SNAC decoder weight storage type; default native.",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],required:!1,default:"native"},{name:"ar_weight_type",type:"enum",description:"AR backbone weight storage type; defaults to weight_type.",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],required:!1},{name:"codec_weight_type",type:"enum",description:"SNAC decoder weight storage type; only native or f32 is supported. Inherits weight_type when omitted; set codec_weight_type=f32 explicitly when using another shared weight_type.",values:["native","f32"],required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"maya1_orig",display_name:"Maya1 Original-Precision GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Maya1-GGUF",files:["Maya1-GGUF/maya1-orig.gguf"],strip_prefix:"Maya1-GGUF"},{id:"maya1_q8_0",display_name:"Maya1 Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"Maya1-GGUF",files:["Maya1-GGUF/maya1-q8_0.gguf"],strip_prefix:"Maya1-GGUF"}],dependencies:[],ui:{recommended_package:"maya1_orig",tags:["TTS","Design","GGUF"],docs:["docs/models/maya1.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},tensors:{model_weights:"weights:",codec_weights:"weights:"}}]},q8={family:"meanvc2",schema_version:1,display_name:"MeanVC2",description:"MeanVC2 is a lightweight streaming zero-shot voice conversion model. The current audio.cpp package covers the recommended 120ms/40ms quality path.",category:"voice_conversion",status:"supported",tasks:["vc"],modes:["offline","streaming"],languages:["language_agnostic"],capabilities:{vc:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"seed",type:"int",description:"Random seed for MeanVC2 flow noise; default 42.",required:!1,min:0,default:42}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"meanvc2_120ms_40ms_f32",display_name:"MeanVC2 120ms/40ms F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"MeanVC2-GGUF",files:["MeanVC2-GGUF/meanvc2-120ms-40ms-fp32.gguf"],strip_prefix:"MeanVC2-GGUF"},{id:"meanvc2_120ms_40ms_q4_k",display_name:"MeanVC2 120ms/40ms Q4_K GGUF",default:!1,format:"gguf",precision:"q4_k",target_directory:"MeanVC2-GGUF",files:["MeanVC2-GGUF/meanvc2-120ms-40ms-q4_k.gguf"],strip_prefix:"MeanVC2-GGUF"}],dependencies:[],ui:{recommended_package:"meanvc2_120ms_40ms_f32",tags:["VC","GGUF"],docs:["docs/models/meanvc2.md","docs/audio_tools.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{weights:"$gguf"},tensors:{vc:{source:"weights:",prefix:"vc"},vocos:{source:"weights:",prefix:"vocos"},asr:{source:"weights:",prefix:"asr"},speaker_wavlm:{source:"weights:",prefix:"speaker_wavlm"},speaker_ecapa:{source:"weights:",prefix:"speaker_ecapa"}}}]},C8={schema_version:1,family:"mel_band_roformer",display_name:"Mel-Band RoFormer",description:"Music source-separation model that uses mel-scaled overlapping frequency bands and RoFormer attention to estimate stems such as vocals, drums, and accompaniment.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},options:{request:[],session:[{name:"weight_type",type:"enum",description:"RoFormer weight storage type. Defaults to f32 when the backend requires a host graph plan, otherwise native.",preset:"weight_type_full",required:!1},{name:"num_overlap",type:"int",description:"Number of overlapping inference windows; defaults to the package configuration. Lower values improve throughput but can reduce boundary quality.",required:!1,min:1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"mel_band_roformer_q8_0",tags:["Sep","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"mel_band_roformer_q8_0",display_name:"Mel-Band RoFormer Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Mel-Band-RoFormer-GGUF",files:["Mel-Band-RoFormer-GGUF/mel-band-roformer-q8_0.gguf"],strip_prefix:"Mel-Band-RoFormer-GGUF"},{id:"mel_band_roformer_f16",display_name:"Mel-Band RoFormer F16 GGUF",format:"gguf",precision:"f16",target_directory:"Mel-Band-RoFormer-GGUF",files:["Mel-Band-RoFormer-GGUF/mel-band-roformer-f16.gguf"],strip_prefix:"Mel-Band-RoFormer-GGUF"},{id:"mel_band_roformer_safetensors",display_name:"Mel RoFormer Safetensors",format:"safetensors",precision:"native",target_directory:"mel-roformer-mlx",files:["config.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"mlx-community/mel-roformer-mlx"}}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},A8={schema_version:1,family:"micro_wake_word",display_name:"microWakeWord",description:"Streaming wake-word detection for trained microWakeWord MixedNet TFLite models converted to GGUF.",category:"audio_tools",status:"experimental",tasks:["wake_word"],modes:["offline","streaming"],languages:["model_dependent"],capabilities:{wake_word:["speech_segments","stream_events"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"threshold",type:"float",description:"Override the converted model manifest's wake-word probability cutoff.",required:!1,min:0,max:1},{name:"sliding_window_size",type:"int",description:"Override the converted model manifest's prediction smoothing window.",required:!1,min:1}],session:[{name:"exec_plan",type:"string",description:"JSON component execution plans. Component network accepts impl ggml/neon (default ggml). GGML retains the session backend; neon runs the stateful CNN on CPU and requires ENGINE_ENABLE_NEON=ON and AArch64 NEON. Frontend and detection logic are unchanged. No artifacts or params are used.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"micro_wake_word_okay_nabu_f32",display_name:"microWakeWord Okay Nabu GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"MicroWakeWord-GGUF",files:["MicroWakeWord-GGUF/micro-wake-word-okay-nabu-f32.gguf"],strip_prefix:"MicroWakeWord-GGUF"}],dependencies:[],ui:{tags:["Wake Word","GGUF","Stream"],docs:["docs/models/micro_wake_word.md"],recommended_package:"micro_wake_word_okay_nabu_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},G8={schema_version:1,family:"midashenglm_gen",display_name:"MiDashengLM-Gen",description:"DashengLM generative audio model for speech, music, sound effects, and ambience prompts.",category:"audio_generation",status:"experimental",tasks:["music"],modes:["offline"],languages:["auto"],runtime:{tags:["gguf","cuda"]},capabilities:{music:["instrumental","style_control"]},options:{request:[{name:"duration_sec",type:"float",description:"Target audio duration budget; omitted derives from the checkpoint sequence length, hop size and sample rate. Must be finite and positive; no fixed runtime upper cap.",required:!1,default:20},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale. Any finite value is accepted.",required:!1,default:2},{name:"stop_threshold",type:"float",description:"Stop probability threshold. Any finite value is accepted.",required:!1,default:.5},{name:"min_stop_step",type:"int",description:"Minimum generated steps before accepting stop.",required:!1,min:1,default:5},{name:"seed",type:"int",description:"Unsigned 32-bit generation seed; default 0 is a fixed seed. Negative values are not accepted.",required:!1,min:0,max:4294967295,default:0}],session:[{name:"weight_type",type:"enum",description:"Shared weight storage type.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"midashenglm_gen_f32",display_name:"MiDashengLM-Gen F32 GGUF",format:"gguf",precision:"f32",target_directory:"MiDashengLM-Gen-GGUF",files:["MiDashengLM-Gen-GGUF/midashenglm-gen-f32.gguf"],strip_prefix:"MiDashengLM-Gen-GGUF"},{id:"midashenglm_gen_q8_0",display_name:"MiDashengLM-Gen Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MiDashengLM-Gen-GGUF",files:["MiDashengLM-Gen-GGUF/midashenglm-gen-q8_0.gguf"],strip_prefix:"MiDashengLM-Gen-GGUF"}],dependencies:[],ui:{recommended_package:"midashenglm_gen_q8_0",tags:["Music","SFX","GGUF"],docs:["docs/models/midashenglm_gen.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json","vocab.json":"model:vocab.json","merges.txt":"model:merges.txt","tokenizer_config.json":"model:tokenizer_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json","vocab.json":"model:vocab.json","merges.txt":"model:merges.txt","tokenizer_config.json":"model:tokenizer_config.json"},tensors:{weights:"model:model.safetensors.index.json"}}]},F8={schema_version:1,family:"ming3_audio",display_name:"Ming 3.0 Audio Tiny",description:"Whisper audio encoder and hybrid KDA/MLA mixture-of-experts Thinker, with a separate continuous-latent Talker for spoken responses.",category:"asr",status:"experimental",tasks:["asr","s2s","tts","clone"],modes:["offline"],languages:["zh","en"],capabilities:{tts:["speaker_reference","built_in_voices"],clone:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"system_prompt",type:"string",required:!1,description:"Thinker system instruction. When supplied, the user prompt precedes audio as in the official chat examples."},{name:"enable_thinking",type:"bool",required:!1,default:!1,description:"Enable the Thinker chat template's detailed thinking mode."},{name:"prompt",type:"string",required:!1,description:"Thinker instruction accompanying the input audio; omitted ASR requests use the official transcription prompt."},{name:"max_tokens",type:"int",required:!1,default:256,min:1,description:"Maximum generated Thinker text tokens."},{name:"max_audio_tokens",type:"int",required:!1,default:1e3,min:1,description:"Maximum generated Talker acoustic patches per text fragment."},{name:"voice_id",type:"enum",values:["US_James","US_Stella","灵小柔","灵楷","US_Emma","UK_George","UK_Charlotte","灵小安","灵语汐","灵小萌","灵小雅","花小呗","灵韵","妩媚妲己","灵婉","灵小月","灵朵儿","灵岩","灵小锋","灵小川","灵小甄","灵小知","灵小惠","灵小晴","灵小琪","灵梦","灵恬","灵小汐","灵小棠","灵小梨","灵舒","灵娇","灵小芸","灵锐","灵空","灵宇","灵朗","灵旭","灵骁","灵江","悲伤女声","皮六","说唱小哥","蜡笔小新","悟空","灵信远_生气","灵信远_厌恶","灵信远_惊讶","灵信远_高兴","灵信远_恐惧","灵信远_中性","灵信远_悲伤","灵思齐_高兴","灵思齐_恐惧","灵思齐_生气","灵思齐_厌恶","灵思齐_中性","灵思齐_惊讶","灵思齐_悲伤","灵叙柔_高兴","灵叙柔_恐惧","灵叙柔_惊讶","灵叙柔_悲伤","灵叙柔_生气","灵叙柔_中性","灵叙柔_厌恶","灵绮木_悲伤","灵绮木_厌恶","灵绮木_中性","灵绮木_恐惧","灵绮木_惊讶","灵绮木_高兴","灵绮木_生气","灵书悦_恐惧","灵书悦_厌恶","灵书悦_高兴","灵书悦_惊讶","灵书悦_悲伤","灵书悦_生气","灵书悦_中性","灵渊霆_厌恶","灵渊霆_中性","灵渊霆_恐惧","灵渊霆_惊讶","灵渊霆_悲伤","灵渊霆_生气","灵渊霆_高兴","灵素心_高兴","灵素心_惊讶","灵素心_恐惧","灵素心_中性","灵素心_生气","灵素心_悲伤","灵素心_厌恶","灵晓声_惊讶","灵晓声_厌恶","灵晓声_高兴","灵晓声_生气","灵晓声_中性","灵晓声_悲伤","灵风信_生气","灵风信_中性","灵风信_厌恶","灵风信_高兴","灵风信_惊讶","灵风信_悲伤","灵风信_恐惧","灵采薇_惊讶","灵采薇_厌恶","灵采薇_恐惧","灵采薇_生气","灵采薇_悲伤","灵采薇_中性","灵采薇_高兴","灵卓然_厌恶","灵卓然_中性","灵卓然_恐惧","灵卓然_惊讶","灵卓然_高兴","灵卓然_悲伤","灵卓然_生气","灵惜梦_中性","灵惜梦_厌恶","灵惜梦_高兴","灵惜梦_悲伤","灵惜梦_恐惧","灵惜梦_惊讶","灵惜梦_生气","灵浅忧_高兴","灵浅忧_生气","灵浅忧_厌恶","灵浅忧_悲伤","灵浅忧_惊讶","灵浅忧_恐惧","灵浅忧_中性","灵昭野_生气","灵昭野_高兴","灵昭野_悲伤","灵昭野_中性","灵昭野_厌恶","灵昭野_恐惧","灵昭野_惊讶","灵心澜_厌恶","灵心澜_惊讶","灵心澜_生气","灵心澜_中性","灵心澜_高兴","灵心澜_悲伤","灵心澜_恐惧","灵犀言_悲伤","灵犀言_厌恶","灵犀言_恐惧","灵犀言_中性","灵犀言_惊讶","灵犀言_高兴","灵犀言_生气","灵语冰_悲伤","灵语冰_厌恶","灵语冰_高兴","灵语冰_恐惧","灵语冰_惊讶","灵语冰_中性","灵语冰_生气","灵逸风_生气","灵逸风_悲伤","灵逸风_惊讶","灵逸风_中性","灵逸风_恐惧","灵逸风_高兴","灵逸风_厌恶","灵悦澜_中性","灵悦澜_高兴","灵悦澜_厌恶","灵悦澜_恐惧","灵悦澜_生气","灵悦澜_悲伤","灵悦澜_惊讶","灵惊鸿_厌恶","灵惊鸿_高兴","灵惊鸿_中性","灵惊鸿_惊讶","灵惊鸿_恐惧","灵惊鸿_生气","灵惊鸿_悲伤","灵御心_高兴","灵御心_中性","灵御心_生气","灵御心_恐惧","灵御心_厌恶","灵御心_惊讶","灵御心_悲伤","灵语恬_厌恶","灵语恬_高兴","灵语恬_恐惧","灵语恬_悲伤","灵语恬_惊讶","灵语恬_生气","灵语恬_中性","灵心恬_厌恶","灵心恬_惊讶","灵心恬_悲伤","灵心恬_中性","灵心恬_恐惧","灵心恬_高兴","灵心恬_生气","灵惜蕊_惊讶","灵惜蕊_厌恶","灵惜蕊_恐惧","灵惜蕊_高兴","灵惜蕊_中性","灵惜蕊_悲伤","灵惜蕊_生气","灵语萱_厌恶","灵语萱_高兴","灵语萱_惊讶","灵语萱_恐惧","灵语萱_生气","灵语萱_悲伤","灵语萱_中性","灵语烟_生气","灵语烟_恐惧","灵语烟_中性","灵语烟_厌恶","灵语烟_惊讶","灵语烟_高兴","灵语烟_悲伤","灵律雅_恐惧","灵律雅_生气","灵律雅_惊讶","灵律雅_高兴","灵律雅_厌恶","灵律雅_中性","灵律雅_悲伤","灵惊涛_厌恶","灵惊涛_恐惧","灵惊涛_高兴","灵惊涛_悲伤","灵惊涛_中性","灵惊涛_惊讶","灵惊涛_生气","灵寒陌_生气","灵寒陌_厌恶","灵寒陌_恐惧","灵寒陌_高兴","灵寒陌_中性","灵寒陌_惊讶","灵寒陌_悲伤","灵决冥_悲伤","灵决冥_厌恶","灵决冥_生气","灵决冥_中性","灵决冥_惊讶","灵决冥_恐惧","灵决冥_高兴","灵亦尘_中性","灵亦尘_厌恶","灵亦尘_高兴","灵亦尘_恐惧","灵亦尘_生气","灵亦尘_悲伤","灵亦尘_惊讶","灵语尘_生气","灵语尘_高兴","灵语尘_厌恶","灵语尘_惊讶","灵语尘_中性","灵语尘_悲伤","灵语尘_恐惧","灵慈萱_高兴","灵慈萱_厌恶","灵慈萱_惊讶","灵慈萱_生气","灵慈萱_中性","灵慈萱_悲伤","灵慈萱_恐惧","灵妙音_中性","灵妙音_悲伤","灵妙音_惊讶","灵妙音_厌恶","灵妙音_生气","灵妙音_高兴","灵妙音_恐惧","灵断尘_悲伤","灵断尘_高兴","灵断尘_惊讶","灵断尘_恐惧","灵断尘_中性","灵断尘_生气","灵断尘_厌恶","灵悦兮_高兴","灵悦兮_中性","灵悦兮_生气","灵悦兮_惊讶","灵悦兮_厌恶","灵悦兮_悲伤","灵悦兮_恐惧","灵若虚_恐惧","灵若虚_惊讶","灵若虚_中性","灵若虚_悲伤","灵若虚_高兴","灵若虚_厌恶","灵若虚_生气","灵熙婉_厌恶","灵熙婉_生气","灵熙婉_惊讶","灵熙婉_高兴","灵熙婉_中性","灵熙婉_恐惧","灵熙婉_悲伤","灵旭扬_中性","灵旭扬_生气","灵旭扬_恐惧","灵旭扬_高兴","灵旭扬_惊讶","灵旭扬_悲伤","灵旭扬_厌恶","灵阅川_生气","灵阅川_悲伤","灵阅川_高兴","灵阅川_厌恶","灵阅川_惊讶","灵阅川_中性","灵阅川_恐惧","灵未央_高兴","灵未央_中性","灵未央_惊讶","灵未央_悲伤","灵未央_厌恶","灵未央_恐惧","灵未央_生气","灵妩月_厌恶","灵妩月_生气","灵妩月_中性","灵妩月_惊讶","灵妩月_恐惧","灵妩月_高兴","灵妩月_悲伤","灵梦瑶_中性","灵梦瑶_恐惧","灵梦瑶_高兴","灵梦瑶_悲伤","灵梦瑶_惊讶","灵梦瑶_生气","灵妙声_中性","灵妙声_恐惧","灵妙声_高兴","灵妙声_悲伤","灵妙声_惊讶","灵妙声_生气","灵烈瑶_中性","灵烈瑶_厌恶","灵烈瑶_恐惧","灵烈瑶_悲伤","灵烈瑶_惊讶","灵烈瑶_生气","灵烈瑶_高兴","灵幽月_中性","灵幽月_厌恶","灵幽月_恐惧","灵幽月_悲伤","灵幽月_惊讶","灵幽月_生气","灵幽月_高兴","灵悦心_中性","灵悦心_厌恶","灵悦心_恐惧","灵悦心_悲伤","灵悦心_惊讶","灵悦心_生气","灵悦心_高兴","灵汐月_中性","灵汐月_厌恶","灵汐月_恐惧","灵汐月_悲伤","灵汐月_惊讶","灵汐月_生气","灵汐月_高兴","灵书意_中性","灵书意_厌恶","灵书意_恐惧","灵书意_悲伤","灵书意_惊讶","灵书意_生气","灵书意_高兴","灵知远_中性","灵知远_厌恶","灵知远_恐惧","灵知远_悲伤","灵知远_惊讶","灵知远_生气","灵知远_高兴","灵温言_中性","灵温言_厌恶","灵温言_恐惧","灵温言_悲伤","灵温言_惊讶","灵温言_生气","灵温言_高兴","灵傲尘_中性","灵傲尘_厌恶","灵傲尘_恐惧","灵傲尘_悲伤","灵傲尘_生气","灵傲尘_高兴","灵佑安_中性","灵佑安_厌恶","灵佑安_恐惧","灵佑安_悲伤","灵佑安_惊讶","灵佑安_生气","灵佑安_高兴","灵惜晨_中性","灵惜晨_厌恶","灵惜晨_恐惧","灵惜晨_悲伤","灵惜晨_惊讶","灵惜晨_生气","灵惜晨_高兴","灵宛溪_中性","灵宛溪_厌恶","灵宛溪_恐惧","灵宛溪_悲伤","灵宛溪_惊讶","灵宛溪_生气","灵宛溪_高兴","灵言澈_中性","灵言澈_厌恶","灵言澈_恐惧","灵言澈_悲伤","灵言澈_惊讶","灵言澈_生气","灵言澈_高兴","灵溯光_中性","灵溯光_厌恶","灵溯光_恐惧","灵溯光_悲伤","灵溯光_惊讶","灵溯光_生气","灵溯光_高兴","灵惊弦_中性","灵惊弦_厌恶","灵惊弦_恐惧","灵惊弦_悲伤","灵惊弦_惊讶","灵惊弦_生气","灵惊弦_高兴","灵嘉肴_中性","灵嘉肴_厌恶","灵嘉肴_恐惧","灵嘉肴_悲伤","灵嘉肴_惊讶","灵嘉肴_生气","灵嘉肴_高兴","灵黛嗔_中性","灵黛嗔_厌恶","灵黛嗔_恐惧","灵黛嗔_悲伤","灵黛嗔_惊讶","灵黛嗔_生气","灵黛嗔_高兴","灵孤影_中性","灵孤影_厌恶","灵孤影_恐惧","灵孤影_悲伤","灵孤影_惊讶","灵孤影_生气","灵孤影_高兴","灵雨汐_中性","灵雨汐_恐惧","灵雨汐_高兴","灵雨汐_悲伤","灵雨汐_惊讶","灵雨汐_生气","蜡笔小新_野原新之助 (小新)","蜡笔小新_野原美伢 (美伢)","小猪佩奇_佩奇","康熙王朝_康熙","西游记_唐僧","甄嬛传_四郎","潜伏_余则成","水浒传_武松","水浒传_潘金莲","雍正王朝_雍正"],required:!1,description:"Talker built-in voice name; ignored when reference audio is supplied."},{name:"reference_text",type:"string",required:!1,description:"Reference transcript enabling acoustic-prefix continuation; without it reference audio supplies speaker conditioning only."},{name:"language",type:"string",required:!1,description:"Talker output language; inferred from its input text when omitted."},{name:"seed",type:"int",required:!1,min:0,default:42,description:"Talker flow and reference-posterior sampling seed. Thinker generation is greedy."},{name:"guidance_scale",type:"float",required:!1,default:2,description:"Talker conditioned prediction plus guidance_scale times its difference from the null prediction."},{name:"sigma",type:"float",required:!1,default:.25,min:0,description:"Talker flow SDE noise scale."},{name:"temperature",type:"float",required:!1,default:0,min:0,description:"Talker flow sampling temperature; zero still uses seeded initial noise."},{name:"raw_text",type:"bool",required:!1,default:!1,description:"Synthesize text as one fragment without framework text chunking."},{name:"trim_silence",type:"bool",required:!1,default:!0,description:"Trim trailing low-energy 100-ms frames per Talker fragment, retaining a 300-ms tail."},{name:"text_chunk_size",type:"int",required:!1,min:1,default:100,description:"Talker text chunk budget in Unicode codepoints."},{name:"text_chunk_mode",type:"enum",required:!1,default:"tag_aware",values:["default","tag_aware","japanese","endline"],description:"Framework Talker text chunking policy."}],session:[{name:"disk_experts",type:"bool",required:!1,default:!1,description:"Keep Thinker expert weights outside GPU memory and stage routed experts into a bounded GPU cache; computation stays on the selected backend."},{name:"pin_experts",type:"bool",required:!1,default:!0,description:"With disk_experts, retain expert payloads in pinned host RAM instead of reading them from the GGUF on each cache miss. Defaults to false on Metal, which uses ordinary host staging."},{name:"expert_cache_size",type:"int",required:!1,default:8,min:8,max:128,description:"With disk_experts, number of GPU-resident expert slots per routed Thinker layer."},{name:"disk_expert_read_threads",type:"int",required:!1,default:1,min:1,max:64,description:"Host workers for copying selected GGUF experts into staging when disk_experts is enabled and pin_experts is false. Default 1 preserves serial reads; values above 1 use OpenMP or Apple dispatch."},{name:"reference_cache",type:"bool",required:!1,default:!0,description:"Reuse speaker features and seeded acoustic conditioning for the most recent reference waveform."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Ming-3.0-Audio-Tiny-GGUF",revision:"main",gated:!1}},packages:[{id:"ming3_audio_tiny_bf16",display_name:"Ming 3.0 Audio Tiny BF16",format:"gguf",precision:"bf16",default:!0,target_directory:"Ming-3.0-Audio-Tiny-GGUF",files:["ming-3.0-audio-tiny-bf16.gguf"]},{id:"ming3_audio_tiny_q8_0",display_name:"Ming 3.0 Audio Tiny Q8_0 Experts",format:"gguf",precision:"q8_0",target_directory:"Ming-3.0-Audio-Tiny-GGUF",files:["ming-3.0-audio-tiny-q8_0.gguf"]},{id:"ming3_audio_tiny_q4_k",display_name:"Ming 3.0 Audio Tiny Q4_K Experts",format:"gguf",precision:"q4_k",target_directory:"Ming-3.0-Audio-Tiny-GGUF",files:["ming-3.0-audio-tiny-q4_k.gguf"]}],dependencies:[],ui:{recommended_package:"ming3_audio_tiny_bf16",tags:["ASR","TTS","GGUF"],docs:["docs/models/ming3_audio.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",generation_config:"model:generation_config.json",talker_config:"model:talker/config.json",talker_llm_config:"model:talker/llm/config.json",talker_tokenizer_json:"model:talker/llm/tokenizer.json",talker_tokenizer_config:"model:talker/llm/tokenizer_config.json",vae_config:"model:talker/vae/config.json"},tensors:{thinker:{source:"weights:",prefix:"thinker"},talker:{source:"weights:",prefix:"talker"},vae:{source:"weights:",prefix:"vae"},speaker:{source:"weights:",prefix:"speaker"}}}]},M8={schema_version:1,family:"ming3_tts",display_name:"Ming 3.0 TTS 0.5B",description:"Multilingual continuous-latent speech synthesis with a Qwen backbone, flow-matching acoustic head, CAMPPlus speaker conditioning and an audio VAE.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["zh","en","ja","ko","de","fr","es"],capabilities:{tts:["long_form","speaker_reference","style_control","emotion_control","built_in_voices"],clone:["long_form","speaker_reference","style_control","emotion_control"],design:["voice_design"]},runtime:{tags:["gguf"]},options:{request:[{name:"template_name",type:"enum",required:!1,description:"Conditioning template; defaults to voice_design on that route, otherwise tts.",values:["tts","multilingual","basic","emotion","dialect","ip","voice_design","freeform"]},{name:"language",type:"string",required:!1,description:"Target language name or code; defaults to the request's language (the server's top-level language field, the CLI's --language). Required by multilingual; ignored by dialect."},{name:"instruct",type:"string",required:!1,description:"Voice description for voice_design; raw conditioning text for freeform or tts."},{name:"instruction_schema",type:"enum",required:!1,description:"Structured instruction field language; defaults to en for dialect, otherwise zh.",values:["en","zh"]},{name:"speed",type:"enum",required:!1,description:"Categorical speaking speed for the basic template, not waveform resampling.",values:["慢速","中速","快速"]},{name:"pitch",type:"enum",required:!1,description:"Categorical pitch for the basic template.",values:["低","中","高"]},{name:"volume",type:"enum",required:!1,description:"Categorical volume for the basic template.",values:["低","中","高"]},{name:"emotion",type:"string",required:!1,description:"Emotion label for the emotion template."},{name:"dialect",type:"enum",required:!1,description:"Dialect for the dialect template.",values:["chuanyu dialect","cantonese"]},{name:"voice_id",type:"enum",required:!1,description:"Built-in English voice for the ip template.",values:["US_Emma","US_James","UK_George","UK_Charlotte"]},{name:"reference_text",type:"string",required:!1,description:"Transcript accompanying voice_ref; enables the acoustic reference prefix. Without a transcript, only speaker conditioning is used."},{name:"speaker_embedding_file",type:"path_list",required:!1,description:"CAMPPlus embedding file or list, with shape [192] or [1, 192]. Supersedes voice_ref audio; zero_speaker_embedding takes precedence."},{name:"export_speaker_embedding_file",type:"path",required:!1,description:"Export the enabled voice_ref CAMPPlus speaker embedding as F32 Safetensors. Requires voice_ref, use_speaker_embedding=true, zero_speaker_embedding=false and no speaker_embedding_file. Does not export acoustic latents or the reference transcript."},{name:"use_speaker_embedding",type:"bool",required:!1,default:!0,description:"Condition on the reference speaker embedding."},{name:"zero_speaker_embedding",type:"bool",required:!1,default:!1,description:"Use a zero projected speaker row instead of reference audio conditioning."},{name:"max_tokens",type:"int",required:!1,default:1e3,min:1,description:"Maximum generated acoustic patches per text chunk, also limited by the 512-position generation context."},{name:"guidance_scale",type:"float",required:!1,default:2,description:"Flow guidance: conditioned prediction plus guidance_scale times its difference from the null prediction."},{name:"sigma",type:"float",required:!1,default:.25,min:0,description:"Flow SDE noise scale."},{name:"temperature",type:"float",required:!1,default:0,min:0,description:"Flow sampling temperature; zero still uses seeded initial noise."},{name:"seed",type:"int",required:!1,default:1895,min:0,description:"Reference-posterior and generation noise seed."},{name:"raw_text",type:"bool",required:!1,default:!1,description:"Send the text as one synthesis fragment without frontend chunking."},{name:"text_chunk_size",type:"int",required:!1,min:1,description:"Framework long-form chunk budget in Unicode codepoints; default 50 when hanzi, kana and Hangul outnumber other letters and digits, otherwise 300; multi-chunk generation without speaker conditioning is capped at 120, including explicit overrides, and anchors later chunks to the first generated voice. Smaller overrides, single-chunk inputs and explicitly conditioned voices retain their chunk size."},{name:"text_chunk_mode",type:"enum",required:!1,default:"tag_aware",description:"Framework text chunking policy.",values:["default","tag_aware","japanese","endline"]},{name:"trim_silence",type:"bool",required:!1,default:!0,description:"Trim trailing low-energy 100-ms frames per fragment, retaining a 300-ms tail."},{name:"stream_frames_per_event",type:"int",description:"Maximum latent patches per streaming audio decode.",required:!1,default:4,min:1,max:64},{name:"stream_chunk_policy",type:"enum",description:"Streaming audio chunk schedule.",required:!1,default:"grow",values:["fixed","grow"]}],session:[{name:"reference_cache",type:"bool",required:!1,default:!0,description:"Reuse prepared conditioning for the most recently used reference waveform."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Ming-3.0-TTS-0.5B-GGUF",revision:"main",gated:!1}},packages:[{id:"ming_3_0_tts_0_5b_bf16",display_name:"Ming 3.0 TTS 0.5B BF16",format:"gguf",precision:"bf16",default:!0,target_directory:"Ming-3.0-TTS-0.5B-GGUF",files:["ming-3.0-tts-0.5b-bf16.gguf"]},{id:"ming_3_0_tts_0_5b_q8_0",display_name:"Ming 3.0 TTS 0.5B Q8_0",format:"gguf",precision:"q8_0",default:!1,target_directory:"Ming-3.0-TTS-0.5B-GGUF",files:["ming-3.0-tts-0.5b-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"ming_3_0_tts_0_5b_bf16",tags:["TTS","GGUF"],docs:["docs/models/ming3_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},tensors:{weights:"weights:",speaker:{source:"weights:",prefix:"speaker"}}}]},z8={schema_version:1,family:"minimax_h3",display_name:"MiniMax-H3",description:"MiniMax-H3 text-to-audio/video generation through the official T2VA pipeline: Qwen3-VL text conditioning, joint audio/video DiT denoising, and MiniMax-H3 audio/video VAE decode.",category:"audio_generation",status:"experimental",tasks:["tts","music","sfx"],modes:["offline"],languages:["auto"],capabilities:{tts:["style_control","multi_speaker"],music:["instrumental","style_control"],sfx:["prompt_generation"]},runtime:{tags:["cuda","gguf"]},ui:{recommended_package:"minimax_h3_q4_k",tags:["TTS","Music","SFX","GGUF"],docs:["docs/models/minimax_h3.md","docs/reports/minimax_h3_performance.md"]},options:{request:[{name:"num_inference_steps",type:"int",description:"Positive joint DiT denoising step count; default 50.",required:!1,min:1,default:50},{name:"seed",type:"int",description:"Unsigned 32-bit generation seed in [0, 4294967295] for deterministic initial latents; default 42.",required:!1,min:0,max:4294967295,default:42},{name:"height",type:"int",description:"Target video canvas height used by the joint T2VA latent layout; omitted or nonpositive values use 768. Smaller positive sizes are rounded up to the supported geometry.",required:!1,default:768},{name:"width",type:"int",description:"Target video canvas width used by the joint T2VA latent layout; omitted or nonpositive values use 1344. Smaller positive sizes are rounded up to the supported geometry.",required:!1,default:1344},{name:"num_frames",type:"int",description:"Target video frame count before H3 alignment; omitted or nonpositive values use 124. MiniMax-H3 video is 24 fps; positive counts are rounded to the supported temporal geometry.",required:!1,default:124},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; 1.0 matches the baseline T2VA audio run.",required:!1,default:1},{name:"sampler_mode",type:"enum",description:"Joint DiT sampler: euler, res_multistep, dpmpp_2m, or unipc.",values:["euler","res_multistep","dpmpp_2m","unipc"],required:!1,default:"euler"},{name:"negative_prompt",type:"string",description:"Negative prompt used by classifier-free guidance when guidance_scale is not 1.0.",required:!1,default:" "},{name:"flow_shift",type:"float",description:"Video FlowMatch scheduler shift.",required:!1,default:12},{name:"audio_flow_shift",type:"float",description:"Audio FlowMatch scheduler shift.",required:!1,default:3},{name:"return_video",type:"bool",description:"Decode and return RGB24 video frames as an output artifact.",required:!1,default:!1},{name:"text_layerwise",type:"bool",description:"Run the prompt encoder with scoped layer-group weights instead of a full prompt encoder weight store.",required:!1,default:!1},{name:"text_layerwise_batch",type:"int",description:"Prompt encoder layer-group size when text_layerwise is enabled.",required:!1,min:1,default:1},{name:"dit_layerwise",type:"bool",description:"Run the DiT denoiser with scoped prelude, block-group, and final weights instead of a full DiT weight store.",required:!1,default:!1},{name:"dit_layerwise_batch",type:"int",description:"DiT block-group size when dit_layerwise is enabled.",required:!1,min:1,default:1},{name:"dit_mlp_chunk_tokens",type:"int",description:"Token chunk size for the per-token DiT MLP in layerwise high-resolution mode. Zero disables chunking.",required:!1,min:0,default:0},{name:"dit_acceleration",type:"string",description:"Optional DiT acceleration mode: none, first_block_cache, or spectrum. Requires dit_layerwise=false and sampler_mode=euler; Spectrum additionally requires guidance_scale=1.",required:!1,default:"none"},{name:"first_block_cache_threshold",type:"float",description:"First-block cache residual-difference threshold.",required:!1,min:0,default:.1},{name:"first_block_cache_start_percent",type:"float",description:"Denoising progress fraction where first-block caching begins; must be below end_percent. Used to derive the sigma window when explicit sigma endpoints are omitted.",required:!1,min:0,max:1,default:.1},{name:"first_block_cache_end_percent",type:"float",description:"Denoising progress fraction where first-block caching ends; must exceed start_percent. Used to derive the sigma window when explicit sigma endpoints are omitted.",required:!1,min:0,max:1,default:.95},{name:"first_block_cache_start_sigma",type:"float",description:"Largest video sigma where first-block cache may be used. Supply together with first_block_cache_end_sigma; otherwise both endpoints are derived from the denoising progress fractions and schedule.",required:!1},{name:"first_block_cache_end_sigma",type:"float",description:"Smallest video sigma where first-block cache may be used. Supply together with first_block_cache_start_sigma; otherwise both endpoints are derived from the denoising progress fractions and schedule.",required:!1},{name:"first_block_cache_max_consecutive",type:"int",description:"Maximum consecutive first-block cache hits before forcing a full DiT step.",required:!1,min:1,default:2},{name:"spectrum_warmup_steps",type:"int",description:"Full DiT warmup steps before spectrum forecasting may skip steps.",required:!1,min:1,default:1},{name:"spectrum_initial_window",type:"float",description:"Initial spectrum forecast scheduling window.",required:!1,min:1,default:2},{name:"spectrum_flex_window",type:"float",description:"Spectrum forecast window growth after actual DiT steps.",required:!1,min:0,default:.75},{name:"spectrum_degree",type:"int",description:"Chebyshev polynomial degree for spectrum forecasting.",required:!1,min:0,default:1},{name:"spectrum_history_size",type:"int",description:"Maximum spectrum forecast history rows.",required:!1,min:1,default:8},{name:"spectrum_ridge_lambda",type:"float",description:"Ridge regularization for spectrum forecasting.",required:!1,min:0,default:.1}],session:[{name:"weight_context_mb",type:"int",description:"MiniMax-H3 staged weight context size in MiB.",required:!1,min:1,default:512},{name:"mem_saver",type:"bool",description:"Release staged DiT, audio VAE, and video VAE weights after their request phase instead of keeping them resident for the session. Prompt encoder weights are always request-scoped.",required:!1,default:!0}],load:[]},dependencies:[],package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"minimax_h3_q4_k",display_name:"MiniMax-H3 Q4_K GGUF",default:!0,format:"gguf",precision:"q4_k",target_directory:"MiniMax-H3-Q4-GGUF",files:["MiniMax-H3-Q4-GGUF/configuration.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/chat_template.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/merges.txt","MiniMax-H3-Q4-GGUF/FL2VA/processor/preprocessor_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/tokenizer.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/tokenizer_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/video_preprocessor_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/vocab.json","MiniMax-H3-Q4-GGUF/text_encoder_q4_k.gguf","MiniMax-H3-Q4-GGUF/dit.gguf","MiniMax-H3-Q4-GGUF/audio_vae_folded_f16.gguf","MiniMax-H3-Q4-GGUF/video_vae.gguf"],strip_prefix:"MiniMax-H3-Q4-GGUF"},{id:"minimax_h3_q4_k_int8_dit",display_name:"MiniMax-H3 Q4_K GGUF + INT8 ConvRot DiT",default:!1,format:"gguf",precision:"q4_k",target_directory:"MiniMax-H3-Q4-GGUF",files:["MiniMax-H3-Q4-GGUF/configuration.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/chat_template.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/merges.txt","MiniMax-H3-Q4-GGUF/FL2VA/processor/preprocessor_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/tokenizer.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/tokenizer_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/video_preprocessor_config.json","MiniMax-H3-Q4-GGUF/FL2VA/processor/vocab.json","MiniMax-H3-Q4-GGUF/text_encoder_q4_k.gguf","MiniMax-H3-Q4-GGUF/dit_int8.gguf","MiniMax-H3-Q4-GGUF/audio_vae_folded_f16.gguf","MiniMax-H3-Q4-GGUF/video_vae.gguf"],strip_prefix:"MiniMax-H3-Q4-GGUF"}],sources:[{format:"gguf",roots:{model:"."},files:{configuration:"model:configuration.json",tokenizer_config:"model:FL2VA/processor/tokenizer_config.json",tokenizer_json:"model:FL2VA/processor/tokenizer.json",vocab:"model:FL2VA/processor/vocab.json",merges:"model:FL2VA/processor/merges.txt",preprocessor_config:"model:FL2VA/processor/preprocessor_config.json"},tensors:{text_encoder_weights:"model:text_encoder_q4_k.gguf",dit_weights:"model:dit.gguf",audio_vae_weights:"model:audio_vae_folded_f16.gguf",video_vae_weights:"model:video_vae.gguf"}}]},E8={schema_version:1,family:"minimax_music3",display_name:"MiniMax Music 3",description:"MiniMax Music 3 text-to-music generation with lyrics conditioning.",category:"audio_generation",status:"experimental",tasks:["music"],modes:["offline"],languages:["auto"],capabilities:{music:["lyrics","style_control"]},runtime:{tags:["gguf"]},options:{request:[{name:"lyrics",type:"string",description:"Lyrics to sing. Structure tags such as [verse] and [chorus] are supported.",required:!0},{name:"duration_sec",type:"float",description:"Positive AR frame budget expressed in seconds; not a hard final waveform duration limit.",required:!1,min:.1,default:20},{name:"num_inference_steps",type:"int",description:"Flow matching Euler steps per chunk.",required:!1,min:1,default:30},{name:"guidance_scale",type:"float",description:"Flow transformer classifier-free guidance scale. Must be > 0.",required:!1,min:0,default:1.7},{name:"ar_guidance_scale",type:"float",description:"Autoregressive semantic and depth CFG scale. Must be > 0.",required:!1,min:0,default:1.5},{name:"top_k",type:"int",description:"Top-k sampling for semantic and residual code sampling.",required:!1,min:1,default:50},{name:"seed",type:"int",description:"Generation seed.",required:!1,min:0,default:0},{name:"flow_uncond_interval",type:"int",description:"Evaluate unconditional flow CFG every N-th step, reusing the guidance delta between evaluations. Values <= 1 disable reuse and evaluate both branches every step.",required:!1,default:1},{name:"flow_uncond_warmup",type:"int",description:"Initial flow steps that evaluate both CFG branches before guidance-delta reuse; nonpositive values add no warmup.",required:!1,default:2},{name:"ensemble_takes",type:"int",description:"Independent takes in a batched AR pass using consecutive seeds; flow/vocoder decode each take. Named outputs take_01 through take_NN are emitted only when ensemble_takes > 1; otherwise only primary audio is returned.",required:!1,min:1,max:16,default:1},{name:"ensemble_prefix_frames",type:"int",description:"Shared intro frames before ensemble takes fork, approximately 25 frames per second. Zero disables intro locking.",required:!1,min:0,default:0},{name:"flow_chunk_hop_frames",type:"int",description:"Flow chunk hop in AR frames, approximately 25 per second. Zero uses checkpoint configuration; positive values are capped at the configured chunk size.",required:!1,min:0,default:0}],session:[{name:"weight_type",type:"enum",values:["native","bf16","f16","q8_0","q4_0","q4_k"],description:"Shared weight storage type.",required:!1,default:"native"},{name:"language_model_gguf",type:"string",description:"Language model component GGUF file relative to the model root.",required:!1,default:"language_model_q4_0.gguf"},{name:"rvq_depth_decoder_gguf",type:"string",description:"RVQ depth decoder component GGUF file relative to the model root.",required:!1,default:"rvq_depth_decoder_q8_0.gguf"},{name:"flow_transformer_gguf",type:"string",description:"Flow transformer component GGUF file relative to the model root.",required:!1,default:"transformer_q4_0.gguf"},{name:"graph_arena_mb",type:"int",description:"Host graph-metadata arena size in MiB, not device workspace; legacy graph_context_mb remains accepted.",required:!1,min:1,default:32},{name:"weight_context_mb",type:"int",description:"Weight context size in MiB.",required:!1,min:1,default:32},{name:"mem_saver",type:"bool",description:"Load large generation stages only while they are needed to reduce peak VRAM.",required:!1,default:!0},{name:"perf_mode",type:"enum",values:["off","cuda_perf"],description:"Performance preset. cuda_perf selects attention-prefix buckets of 256 rows. Explicit controls override preset values.",required:!1,default:"off"},{name:"kv_cache_alignment",type:"int",description:"Attention-prefix bucket size. 1 preserves full-capacity attention; cuda_perf selects 256. Retains all valid history, but graph shapes may change sampled output. Explicit values override the preset.",required:!1,min:1},{name:"pipeline_overlap",type:"bool",description:"Overlap AR decoding with condition/flow/vocoder work on a second backend stream. Requires mem_saver=false; mem_saver=true is an error. Long requests and nondefault chunk hops use sequential execution.",required:!1,default:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/MiniMax-Music3-GGUF",revision:"main",gated:!1}},packages:[{id:"minimax_music3_q4_0",display_name:"MiniMax Music 3 Q4_0 GGUF",default:!0,format:"gguf",precision:"q4_0",target_directory:"MiniMax-Music3-GGUF",files:["config.json","config/language_model.json","config/rvq_depth_decoder.json","config/condition_encoder.json","config/transformer.json","config/vocoder.json","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","language_model_q4_0.gguf","rvq_depth_decoder_q8_0.gguf","condition_encoder.gguf","transformer_q4_0.gguf","vocoder.gguf"]},{id:"minimax_music3_q8_0",display_name:"MiniMax Music 3 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"MiniMax-Music3-GGUF",files:["config.json","config/language_model.json","config/rvq_depth_decoder.json","config/condition_encoder.json","config/transformer.json","config/vocoder.json","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","language_model_q8_0.gguf","rvq_depth_decoder_q8_0.gguf","condition_encoder.gguf","transformer_q8_0.gguf","vocoder.gguf"]},{id:"minimax_music3_bf16",display_name:"MiniMax Music 3 BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"MiniMax-Music3-GGUF",files:["config.json","config/language_model.json","config/rvq_depth_decoder.json","config/condition_encoder.json","config/transformer.json","config/vocoder.json","tokenizer/tokenizer.json","tokenizer/tokenizer_config.json","language_model_bf16.gguf","rvq_depth_decoder_bf16.gguf","condition_encoder.gguf","transformer_bf16.gguf","vocoder.gguf"]}],dependencies:[],ui:{recommended_package:"minimax_music3_q4_0",tags:["Music","GGUF"],docs:["docs/models/minimax_music3.md","docs/music_generation.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:"."},files:{root_config:"model:config.json",language_model_config:"model:config/language_model.json",depth_decoder_config:"model:config/rvq_depth_decoder.json",condition_encoder_config:"model:config/condition_encoder.json",transformer_config:"model:config/transformer.json",vocoder_config:"model:config/vocoder.json",tokenizer_json:"model:tokenizer/tokenizer.json",tokenizer_config:"model:tokenizer/tokenizer_config.json"}},{format:"safetensors",roots:{model:"."},files:{root_config:"model:config.json",language_model_config:"model:config/language_model.json",depth_decoder_config:"model:config/rvq_depth_decoder.json",condition_encoder_config:"model:config/condition_encoder.json",transformer_config:"model:config/transformer.json",vocoder_config:"model:config/vocoder.json",tokenizer_json:"model:tokenizer/tokenizer.json",tokenizer_config:"model:tokenizer/tokenizer_config.json"},tensors:{language_model_weights:{source:"model:language_model/model.safetensors.index.json"},depth_decoder_weights:{source:"model:rvq_depth_decoder/diffusion_pytorch_model.safetensors"},condition_encoder_weights:{source:"model:condition_encoder/diffusion_pytorch_model.safetensors"},transformer_weights:{source:"model:transformer/diffusion_pytorch_model.safetensors.index.json"},vocoder_weights:{source:"model:vocoder/diffusion_pytorch_model.safetensors"}}}]},U8={family:"miocodec",display_name:"MioCodec",description:"Lightweight neural audio codec that encodes 44.1 kHz audio into a low-rate 25 Hz discrete token stream and decodes tokens with speaker conditioning for efficient speech modeling.",category:"audio_tools",status:"supported",tasks:["vc","s2s"],modes:["offline"],languages:["language_agnostic"],options:{request:[],session:[{name:"weight_type",type:"enum",description:"Weight storage type.",required:!1,preset:"weight_type_full",default:"f32"},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"constant_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"content_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"global_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"wave_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512}],load:[]},capabilities:{codec:["encode_decode"],vc:["speaker_reference"],s2s:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"miocodec_q8_0",tags:["Codec","VC","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"miocodec_q8_0",display_name:"MioCodec 25Hz 44.1kHz v2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MioCodec-25Hz-44.1kHz-v2-GGUF",files:["MioCodec-25Hz-44.1kHz-v2-GGUF/miocodec-25hz-44khz-v2-q8_0.gguf"],strip_prefix:"MioCodec-25Hz-44.1kHz-v2-GGUF"},{id:"miocodec_f16",display_name:"MioCodec 25Hz 44.1kHz v2 F16 GGUF",format:"gguf",precision:"f16",target_directory:"MioCodec-25Hz-44.1kHz-v2-GGUF",files:["MioCodec-25Hz-44.1kHz-v2-GGUF/miocodec-25hz-44khz-v2-f16.gguf"],strip_prefix:"MioCodec-25Hz-44.1kHz-v2-GGUF"},{id:"miocodec_orig",display_name:"MioCodec 25Hz 44.1kHz v2 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"MioCodec-25Hz-44.1kHz-v2-GGUF",files:["MioCodec-25Hz-44.1kHz-v2-GGUF/miocodec-25hz-44khz-v2-orig.gguf"],strip_prefix:"MioCodec-25Hz-44.1kHz-v2-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.yaml"},tensors:{weights:{source:"weights:",prefix:"weights"},wavlm_weights:{source:"weights:",prefix:"wavlm_weights"}}},{format:"safetensors",roots:{model:".",wavlm:"wavlm-base-plus-mlx"},files:{config:"model:config.yaml"},tensors:{weights:"model:model.safetensors",wavlm_weights:"wavlm:weights.safetensors"}}]},R8={family:"miotts",display_name:"MioTTS",description:"Lightweight LLM-based English and Japanese TTS family built on MioCodec, supporting low-latency speech generation and zero-shot voice cloning from short reference audio.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline"],languages:["en","ja"],options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated tokens; default 700.",required:!1,min:1},{name:"top_k",type:"int",description:"Generation control; defaults to the checkpoint config.",required:!1},{name:"top_p",type:"float",description:"Generation control; defaults to the checkpoint config.",required:!1,min:0,max:1},{name:"temperature",type:"float",description:"Generation control; defaults to the checkpoint config.",required:!1,min:0,max:2},{name:"repetition_penalty",type:"float",description:"Generation control; defaults to the checkpoint config.",required:!1,min:1,max:1.5},{name:"presence_penalty",type:"float",description:"Presence penalty; default 0.",required:!1,min:0,max:1},{name:"frequency_penalty",type:"float",description:"Frequency penalty; default 0.",required:!1,min:0,max:1},{name:"do_sample",type:"bool",description:"Generation control; defaults to the checkpoint config.",required:!1},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0,max:4294967295},{name:"best_of_n",type:"int",description:"Candidate count, capped by the session maximum; greater than one enables best-of-N.",required:!1,min:1},{name:"best_of_n_enabled",type:"bool",description:"Override the session best-of-N setting.",required:!1},{name:"best_of_n_language",type:"enum",description:"ASR language used to rank candidates.",required:!1,values:["auto","en","ja"]},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size; inherits the session setting.",required:!1,min:1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; defaults to native.",required:!1,preset:"weight_type_full"},{name:"codec_model_path",type:"path",description:"MioCodec model path; defaults to sibling MioCodec-25Hz-44.1kHz-v2.",required:!1},{name:"best_of_n_asr_model_path",type:"path",description:"ASR model path for candidate ranking; defaults to sibling Qwen3-ASR-0.6B.",required:!1},{name:"text_chunk_size",type:"int",description:"Default framework text chunk size; 120 when hanzi, kana and Hangul outnumber other letters and digits, otherwise 180.",required:!1},{name:"best_of_n_enabled",type:"bool",description:"Enable candidate generation and ASR ranking.",required:!1,default:!1},{name:"best_of_n_default",type:"int",description:"Default candidate count.",required:!1,min:1,default:1},{name:"best_of_n_max",type:"int",description:"Maximum candidate count.",required:!1,min:1,default:8},{name:"best_of_n_language",type:"enum",description:"ASR language used to rank candidates.",required:!1,values:["auto","en","ja"],default:"auto"},{name:"prefill_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:1024},{name:"decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"codec_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"codec_constant_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"global_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"wave_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512}],load:[]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"miotts_1_7b_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/miotts.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"miotts_1_7b_q8_0",display_name:"MioTTS 1.7B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MioTTS-1.7B-GGUF",files:["MioTTS-1.7B-GGUF/miotts-1.7b-q8_0.gguf"],strip_prefix:"MioTTS-1.7B-GGUF"},{id:"miotts_1_7b_bf16",display_name:"MioTTS 1.7B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"MioTTS-1.7B-GGUF",files:["MioTTS-1.7B-GGUF/miotts-1.7b-bf16.gguf"],strip_prefix:"MioTTS-1.7B-GGUF"},{id:"miotts_1_7b_orig",display_name:"MioTTS 1.7B Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"MioTTS-1.7B-GGUF",files:["MioTTS-1.7B-GGUF/miotts-1.7b-orig.gguf"],strip_prefix:"MioTTS-1.7B-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},optional_files:{tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt"},optional_files:{tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},B8={schema_version:1,family:"mira_tts",display_name:"MiraTTS",description:"MiraTTS is a community voice-cloning TTS model with a Qwen2 autoregressive speech-token generator, ECAPA/Perceiver speaker tokenizer, conditional acoustic processor, and DAC decoder.",category:"tts",status:"experimental",tasks:["tts","clone"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["speaker_reference"],clone:["speaker_reference"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum autoregressive speech tokens; default 1024.",required:!1,min:1,default:1024},{name:"temperature",type:"float",description:"Sampling temperature; default 0.8. Must be positive.",required:!1,default:.8},{name:"top_k",type:"int",description:"Top-k sampling cutoff; default 50.",required:!1,min:1,default:50},{name:"top_p",type:"float",description:"Nucleus sampling probability; default 0.95. Must be positive.",required:!1,max:1,default:.95},{name:"min_p",type:"float",description:"Minimum probability relative to the most likely token; default 0.05.",required:!1,min:0,max:1,default:.05},{name:"repetition_penalty",type:"float",description:"Autoregressive repetition penalty; default 1.2.",required:!1,min:1,default:1.2},{name:"text_chunk_size",type:"int",description:"Maximum codepoints per progressively emitted streaming segment; default 160.",required:!1,min:1,default:160},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode used by streaming synthesis.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"seed",type:"int",description:"Sampling seed; omitted requests choose a random seed.",required:!1,min:0}],session:[{name:"reference_cache_slots",type:"int",description:"Encoded reference-voice cache slots; default 1. Set to 0 to disable reuse.",required:!1,min:0,default:1},{name:"backbone_weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"native",description:"Storage type for the Qwen2 language-model weights."},{name:"linear_weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"native",description:"Storage type for non-convolutional speaker, processor, and decoder weights."},{name:"conv_weight_type",type:"enum",required:!1,default:"f32",description:"Storage type for speaker and processor convolution weights. The DAC transposed-convolution decoder remains F32 for CUDA compatibility. Applies to the speaker encoder/acoustic processor; waveform decoder remains f32.",values:["native","f32","f16","bf16"]}],load:[]},packages:[],dependencies:[],ui:{tags:["TTS","Clone"],docs:["docs/models/mira_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{language_model:{source:"weights:",prefix:"language_model"},speaker_encoder:{source:"weights:",prefix:"speaker_encoder"},processor:{source:"weights:",prefix:"processor"},decoder:{source:"weights:",prefix:"decoder"},upsampler:{source:"weights:",prefix:"upsampler"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{language_model:"model:language_model.safetensors",speaker_encoder:"model:speaker_encoder.safetensors",processor:"model:processor.safetensors",decoder:"model:decoder.safetensors",upsampler:"model:upsampler.safetensors"}}]},P8={schema_version:1,family:"mms_forced_aligner",display_name:"Meta MMS-300M Forced Aligner",description:"Meta MMS-300M multilingual CTC forced aligner (Wav2Vec2ForCTC) that aligns an exact transcript to mono/stereo audio and returns word timestamps. The checkpoint covers 1,130 languages, but this port's native text normalization supports Dutch (nl/nld) and English (en/eng) Latin script only; text_normalization=pre_romanized accepts caller-supplied ASCII romanization, and unsupported non-Latin input is rejected. Checkpoint license: CC-BY-NC-4.0; GGUF conversion is local-only, no public redistribution is approved.",category:"speech_analysis",status:"community",tasks:["align"],modes:["offline"],languages:["multilingual"],capabilities:{align:["word_timestamps"]},dependencies:[],options:{request:[{name:"language",type:"string",description:"Language code. Built-in normalization supports nl/nld and en/eng; pre_romanized accepts any nonempty code.",required:!0},{name:"text_normalization",type:"enum",description:"Transcript normalization mode; latin handles Dutch/English Latin script natively, pre_romanized trusts caller-supplied ASCII romanization.",values:["latin","pre_romanized"],required:!1,default:"latin"},{name:"star_frequency",type:"enum",description:"Placement of the virtual CTC target between words (segment) or at transcript edges (edges); matches the reference default segment.",values:["segment","edges"],required:!1,default:"segment"},{name:"merge_threshold_sec",type:"float",description:"Close gaps at or below this threshold, rounded to alignment frames, by moving the later word start; word entries remain separate. Default 0.0 disables gap closure.",required:!1,min:0,default:0},{name:"return_timestamps",type:"bool",description:"Compatibility option; word timestamps are always returned, including when false.",required:!1,default:!0}],session:[{name:"emission_window_sec",type:"float",description:"Center emission window length in seconds used to split long waveforms; must be > 0 and at most 3600. Rounded 16 kHz sample count must be a multiple of 320 (20 ms); default 30.",required:!1,min:.02,max:3600,default:30},{name:"emission_context_sec",type:"float",description:"Left/right context appended to each emission window in seconds; must be nonnegative, at most 3600, and below emission_window_sec. Rounded 16 kHz sample count must be a multiple of 320 (20 ms); default 2.",required:!1,min:0,max:3600,default:2},{name:"max_alignment_cells",type:"int",description:"Hard cap on CTC DP cells (frames x states) allocated per request; alignment fails before allocation when exceeded; default 50000000.",required:!1,min:1,default:5e7},{name:"max_target_tokens",type:"int",description:"Hard cap on flattened CTC target tokens per request; default 8192.",required:!1,min:1,default:8192},{name:"weight_type",type:"enum",description:"Weight storage type; default native (tensors kept as stored in the checkpoint).",preset:"weight_type_conv",required:!1,default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"mms_forced_aligner_300m_f16",tags:["Align","GGUF"],docs:["docs/models/mms_forced_aligner.md","docs/speech_analysis.md","docs/gguf.md"]},package_defaults:{download:{kind:"unsupported",reason:"CC-BY-NC-4.0 checkpoint: convert locally with audiocpp_gguf; no public audio.cpp GGUF distribution is approved."}},packages:[{id:"mms_forced_aligner_300m_f16",display_name:"Meta MMS-300M Forced Aligner F16 GGUF",default:!0,format:"gguf",precision:"f16",target_directory:"MMS-Forced-Aligner-GGUF",files:["MMS-Forced-Aligner-GGUF/mms-forced-aligner-f16.gguf"],strip_prefix:"MMS-Forced-Aligner-GGUF"},{id:"mms_forced_aligner_300m_safetensors",display_name:"Meta MMS-300M Forced Aligner Safetensors",format:"safetensors",precision:"native",target_directory:"mms-300m-1130-forced-aligner",files:["config.json","model.safetensors","special_tokens_map.json","tokenizer_config.json","vocab.json"],download:{kind:"huggingface_snapshot",repo:"MahmoudAshraf/mms-300m-1130-forced-aligner",revision:"49402e9577b1158620820667c218cd494cc44486",gated:!1}},{id:"mms_forced_aligner_300m_q8_0",display_name:"Meta MMS-300M Forced Aligner Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"MMS-Forced-Aligner-GGUF",files:["MMS-Forced-Aligner-GGUF/mms-forced-aligner-q8_0.gguf"],strip_prefix:"MMS-Forced-Aligner-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",vocab:"model:vocab.json"},optional_files:{special_tokens_map:"model:special_tokens_map.json",tokenizer_config:"model:tokenizer_config.json",preprocessor_config:"model:preprocessor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",vocab:"model:vocab.json"},optional_files:{special_tokens_map:"model:special_tokens_map.json",tokenizer_config:"model:tokenizer_config.json",preprocessor_config:"model:preprocessor_config.json"},tensors:{weights:"model:model.safetensors"}}]},j8={schema_version:1,family:"moonshine_asr",display_name:"Moonshine Streaming ASR",description:"Moonshine tiny/small/medium streaming English speech recognition models.",category:"asr",status:"experimental",tasks:["asr"],modes:["offline","streaming"],languages:["en"],capabilities:{asr:["vad_chunking"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens. Defaults to audio-duration derived limit. Nonpositive values select the automatic budget.",required:!1,default:0},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio chunk in seconds. Must be positive and round to a nonempty sample count.",required:!1,default:60}],session:[{name:"exec_plan",type:"string",description:"JSON component execution plans. Component decoder accepts impl default/ggml/neon and optional backend. Default retains GGML on the session backend; neon requires ENGINE_ENABLE_NEON=ON and an AArch64 NEON CPU session. No artifacts or params are used.",required:!1,default:"{}"},{name:"weight_type",type:"enum",description:"Shared matmul weight storage type. Omitted uses native, except the CPU encoder with hidden size 620, 10 layers and decoder hidden size 512 uses f16. The decoder defaults to native unless explicitly overridden.",values:["native","f32","f16"],required:!1},{name:"conv_weight_type",type:"enum",description:"Frontend convolution weight storage type.",preset:"weight_type_conv",required:!1},{name:"decoder_weight_type",type:"enum",description:"Decoder matmul weight storage type; inherits an explicit weight_type setting, otherwise native.",values:["native","f32","f16"],required:!1},{name:"encoder_gelu",type:"enum",description:"Encoder GELU lowering.",values:["erf","exact","tanh","quick"],required:!1,default:"quick"},{name:"cpu_blas_scheduler",type:"bool",description:"Use BLAS/Accelerate for supported CPU encoder matmuls.",required:!1,default:!0},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB.",required:!1,min:1,default:256},{name:"graph_arena_mb",type:"int",description:"Graph arena size in MiB.",required:!1,min:1,default:512},{name:"vad_model_path",type:"path",description:"VAD model path used by audio_chunk_mode=vad (any built-in VAD family; default Silero VAD).",required:!1,default:"assets/framework/models/silero_vad"}],load:[]},runtime:{tags:["gguf","cpu","stream"]},ui:{recommended_package:"moonshine_streaming_tiny_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/asr.md","docs/models/moonshine_asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moonshine_streaming_tiny_q8_0",display_name:"Moonshine Streaming Tiny Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Moonshine-Streaming-GGUF",files:["Moonshine-Streaming-GGUF/moonshine-streaming-tiny-q8_0.gguf"],strip_prefix:"Moonshine-Streaming-GGUF"},{id:"moonshine_streaming_small_q8_0",display_name:"Moonshine Streaming Small Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Moonshine-Streaming-GGUF",files:["Moonshine-Streaming-GGUF/moonshine-streaming-small-q8_0.gguf"],strip_prefix:"Moonshine-Streaming-GGUF"},{id:"moonshine_streaming_medium_q8_0",display_name:"Moonshine Streaming Medium Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Moonshine-Streaming-GGUF",files:["Moonshine-Streaming-GGUF/moonshine-streaming-medium-q8_0.gguf"],strip_prefix:"Moonshine-Streaming-GGUF"},{id:"moonshine_streaming_tiny_safetensors",display_name:"Moonshine Streaming Tiny Safetensors",format:"safetensors",precision:"f32",target_directory:"moonshine-streaming-tiny",files:["config.json","tokenizer.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"moonshine-ai/moonshine-streaming-tiny",revision:"main",gated:!1}},{id:"moonshine_streaming_small_safetensors",display_name:"Moonshine Streaming Small Safetensors",format:"safetensors",precision:"f32",target_directory:"moonshine-streaming-small",files:["config.json","tokenizer.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"moonshine-ai/moonshine-streaming-small",revision:"main",gated:!1}},{id:"moonshine_streaming_medium_safetensors",display_name:"Moonshine Streaming Medium Safetensors",format:"safetensors",precision:"f32",target_directory:"moonshine-streaming-medium",files:["config.json","tokenizer.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"moonshine-ai/moonshine-streaming-medium",revision:"main",gated:!1}}],dependencies:[],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},N8={schema_version:1,family:"moss_transcribe_diarize",display_name:"MOSS-Transcribe-Diarize",description:"Joint transcription, speaker diarization, and timestamps across 50+ languages with a Whisper encoder and Qwen3 decoder.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["auto","50+ languages"],capabilities:{asr:["segments","speaker_turns"]},runtime:{tags:["gguf"]},options:{request:[{name:"max_tokens",type:"int",min:1,required:!1,description:"Maximum generated transcript tokens. Defaults to checkpoint generation_config.max_new_tokens; must be positive."},{name:"instruct",type:"string",required:!1,description:"Transcription instruction; empty uses the upstream diarization prompt."}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moss_transcribe_diarize_bf16",display_name:"MOSS-Transcribe-Diarize GGUF BF16",default:!0,format:"gguf",precision:"bf16",target_directory:"MOSS-Transcribe-Diarize-GGUF",files:["MOSS-Transcribe-Diarize-GGUF/moss-transcribe-diarize-bf16.gguf"],strip_prefix:"MOSS-Transcribe-Diarize-GGUF"},{id:"moss_transcribe_diarize_q8_0",display_name:"MOSS-Transcribe-Diarize GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"MOSS-Transcribe-Diarize-GGUF",files:["MOSS-Transcribe-Diarize-GGUF/moss-transcribe-diarize-q8_0.gguf"],strip_prefix:"MOSS-Transcribe-Diarize-GGUF"},{id:"moss_transcribe_diarize_q4_k",display_name:"MOSS-Transcribe-Diarize GGUF Q4_K",format:"gguf",precision:"q4_k",target_directory:"MOSS-Transcribe-Diarize-GGUF",files:["MOSS-Transcribe-Diarize-GGUF/moss-transcribe-diarize-q4_k.gguf"],strip_prefix:"MOSS-Transcribe-Diarize-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:[],recommended_package:"moss_transcribe_diarize_bf16"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",vocab:"model:vocab.json",merges:"model:merges.txt"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},O8={family:"moss_tts_local",display_name:"MOSS-TTS-Local",description:"Flagship MOSS-TTS model for high-fidelity 31-language and code-switched speech, zero-shot voice cloning, long-form generation, and fine-grained Pinyin, phoneme, and duration control.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline"],languages:["ar","cs","da","de","el","en","es","fa","fi","fr","he","hi","hu","it","ja","ko","mk","ms","nl","pl","pt","ro","ru","sv","sw","th","tl","tr","vi","yue","zh"],options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated audio frames.",required:!1,min:1,default:4096},{name:"do_sample",type:"bool",description:"Enable sampling.",required:!1,default:!0},{name:"temperature",type:"float",description:"Audio sampling temperature. Must be finite and positive when sampling.",required:!1,default:1.7},{name:"top_p",type:"float",description:"Audio nucleus sampling probability.",required:!1,default:.8},{name:"top_k",type:"int",description:"Audio top-k sampling limit.",required:!1,default:25},{name:"repetition_penalty",type:"float",description:"Audio repetition penalty. Must be finite and positive when token history is nonempty.",required:!1,default:1},{name:"text_temperature",type:"float",description:"Text sampling temperature. Must be finite and positive when sampling.",required:!1,default:1},{name:"text_top_p",type:"float",description:"Text nucleus sampling probability.",required:!1,default:1},{name:"text_top_k",type:"int",description:"Text top-k sampling limit.",required:!1,default:50},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size.",required:!1,default:2048,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,values:["default","tag_aware","japanese","endline"],default:"default"}],session:[{name:"weight_type",type:"enum",description:"Backbone weight storage; auto uses F32 on CPU, BF16 on CUDA, native on other backends.",required:!1,values:["auto","native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],default:"auto"},{name:"reference_cache_slots",type:"int",description:"Encoded reference cache slots; zero disables reuse.",required:!1,min:0,default:1}],load:[]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"moss_tts_local_v1_5_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/moss_tts_local.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moss_tts_local_v1_5_q8_0",display_name:"MOSS-TTS-Local v1.5 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MOSS-TTS-Local-v1.5-GGUF",files:["MOSS-TTS-Local-v1.5-GGUF/moss-tts-local-v1.5-q8_0.gguf"],strip_prefix:"MOSS-TTS-Local-v1.5-GGUF"},{id:"moss_tts_local_v1_5_bf16",display_name:"MOSS-TTS-Local v1.5 BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"MOSS-TTS-Local-v1.5-GGUF",files:["MOSS-TTS-Local-v1.5-GGUF/moss-tts-local-v1.5-bf16.gguf"],strip_prefix:"MOSS-TTS-Local-v1.5-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}]},I8={family:"moss_tts_nano",display_name:"MOSS-TTS-Nano",description:"Compact deployment-first MOSS-TTS model for real-time multilingual speech generation, lightweight integration, and zero-shot voice cloning.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["ar","cs","da","de","el","en","es","fa","fr","hu","it","ja","ko","pl","pt","ru","sv","tr","zh"],options:{request:[{name:"reference_text",type:"string",description:"Transcript for reference audio; a nonempty value requires voice reference audio.",required:!1,default:""},{name:"max_tokens",type:"int",description:"Maximum generated audio frames.",required:!1,min:1,default:300},{name:"active_codebooks",type:"int",description:"Active codebooks; defaults to the checkpoint n_vq. Must not exceed checkpoint n_vq; omitted uses n_vq.",required:!1,min:1},{name:"do_sample",type:"bool",description:"Enable sampling.",required:!1,default:!0},{name:"temperature",type:"float",description:"Audio sampling temperature. Must be positive, including when do_sample=false.",required:!1,default:1.7},{name:"top_p",type:"float",description:"Audio nucleus sampling probability.",required:!1,default:.8,min:0,max:1},{name:"top_k",type:"int",description:"Audio top-k sampling limit.",required:!1,default:25,min:0},{name:"repetition_penalty",type:"float",description:"Audio repetition penalty. Must be positive.",required:!1,default:1},{name:"text_temperature",type:"float",description:"Text sampling temperature. Must be positive, including when do_sample=false.",required:!1,default:1.5},{name:"text_top_p",type:"float",description:"Text nucleus sampling probability.",required:!1,default:1,min:0,max:1},{name:"text_top_k",type:"int",description:"Text top-k sampling limit.",required:!1,default:50,min:0},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size; default 50 when hanzi, kana and Hangul outnumber other letters and digits, otherwise 256.",required:!1,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",required:!1,values:["default","tag_aware","japanese","endline"],default:"default"}],session:[{name:"weight_type",type:"enum",description:"Weight storage type.",required:!1,preset:"weight_type_full",default:"native"},{name:"global_weight_type",type:"enum",description:"Global transformer weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"local_frame_weight_type",type:"enum",description:"Local frame decoder weight storage; inherits weight_type.",required:!1,preset:"weight_type_full"},{name:"prefill_mode",type:"enum",description:"How prompt rows are forwarded: one batched graph (default, fast) or one row at a time through the decode graph. single_row keeps quantized runs on a single kernel family for numerical self-consistency at a one-time prefill latency cost; see the model docs' quantization notes.",required:!1,values:["batched","single_row"],default:"batched"},{name:"global_prefill_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"global_decode_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128},{name:"global_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"local_frame_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"local_frame_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128},{name:"audio_tokenizer_encoder_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"audio_tokenizer_decoder_graph_arena_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"audio_tokenizer_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128}],load:[]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"moss_tts_nano_100m_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/moss_tts_nano.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moss_tts_nano_100m_q8_0",display_name:"MOSS-TTS-Nano 100M Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MOSS-TTS-Nano-100M-GGUF",files:["MOSS-TTS-Nano-100M-GGUF/moss-tts-nano-100m-q8_0.gguf"],strip_prefix:"MOSS-TTS-Nano-100M-GGUF"},{id:"moss_tts_nano_100m_bf16",display_name:"MOSS-TTS-Nano 100M BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"MOSS-TTS-Nano-100M-GGUF",files:["MOSS-TTS-Nano-100M-GGUF/moss-tts-nano-100m-bf16.gguf"],strip_prefix:"MOSS-TTS-Nano-100M-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_model:"model:tokenizer.model",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_model:"model:tokenizer.model",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}]},D8={schema_version:1,family:"moss_tts_v15",display_name:"MOSS-TTS-v1.5",description:"8B delay-pattern MOSS-TTS: zero-shot voice cloning from a short reference, 24 kHz, with an explicit duration budget.",category:"community",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en","zh"],capabilities:{tts:["speaker_reference","style_control","long_form"],clone:["speaker_reference"]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors.index.json",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}],options:{request:[{name:"min_frames",type:"int",required:!1,default:0,description:"Minimum generated audio frames per text chunk; nonpositive values derive a text-length-based floor. Separate from duration_frames conditioning."},{name:"max_frames",type:"int",required:!1,default:0,description:"Generated audio-frame ceiling per text chunk; nonpositive values derive a text-length-based ceiling. Runtime raises it to at least the effective min_frames plus the number of codebooks."},{name:"instruct",type:"string",required:!1,description:"Voice description. Followed only loosely on this checkpoint; a reference recording is far more reliable."},{name:"duration_frames",type:"int",required:!1,description:"Duration budget in codec frames at 12.5 a second, the model's own '- Tokens:' field. Nonpositive values disable duration conditioning."},{name:"language",type:"string",required:!1,description:"Full language name; the model does not understand codes like 'en'."},{name:"seed",type:"int",required:!1,description:"Reproduces a take exactly; default 0. Parsed as signed 32-bit integer then converted to uint32; negative values wrap.",default:0},{name:"text_temperature",type:"float",required:!1,default:1.5,description:"Text-token sampling temperature. Must be finite and positive when sampling."},{name:"temperature",type:"float",required:!1,description:"Audio sampling temperature; default 1.5. Must be finite and positive when sampling.",default:1.5},{name:"top_p",type:"float",required:!1,description:"Audio nucleus sampling cutoff; default 0.6.",default:.6},{name:"top_k",type:"int",required:!1,description:"Audio top-k; default 50.",default:50},{name:"repetition_penalty",type:"float",required:!1,description:"Audio repetition penalty; default 1.1. Must be finite and positive when history is nonempty.",default:1.1},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 200.",required:!1,min:1,default:200},{name:"text_chunk_mode",type:"enum",description:"Text chunking policy; word_budget also accepts default.",values:["word_budget","tag_aware","japanese","endline"],required:!1,default:"word_budget"}],session:[{name:"weight_type",type:"enum",values:["native","f32","bf16","q8_0"],required:!1,default:"native",description:"Backbone and head weight storage; default native, which keeps a GGUF package's own type. Forcing bf16 dequantises a quantised package and costs the VRAM the quantisation was meant to save. f16 is rejected: this backbone produces NaN in it."}],load:[]},ui:{tags:["TTS","Clone","GGUF"],docs:["docs/models/moss_tts_v15.md","docs/tts.md","docs/gguf.md"],recommended_package:"moss_tts_v15_q8_0_codec_f16"},packages:[{id:"moss_tts_v15_q8_0_codec_f16",display_name:"MOSS-TTS-v1.5 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MOSS-TTS-v1.5-GGUF",files:["moss_tts_v15_q8_0_codec_f16.gguf"]},{id:"moss_tts_v15_q4_k_codec_f16",display_name:"MOSS-TTS-v1.5 Q4_K GGUF",default:!1,format:"gguf",precision:"q4_k",target_directory:"MOSS-TTS-v1.5-GGUF",files:["moss_tts_v15_q4_k_codec_f16.gguf"]},{id:"moss_tts_v15_bf16_codec_f16",display_name:"MOSS-TTS-v1.5 BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"MOSS-TTS-v1.5-GGUF",files:["moss_tts_v15_bf16_codec_f16.gguf"]}],package_defaults:{download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTS-v1.5-GGUF",revision:"main",gated:!1}},dependencies:[]},L8={schema_version:1,family:"moss_ttsd",display_name:"MOSS-TTSD",description:"8B delay-pattern dialogue TTS: speaker-tagged conversation in one take, with per-speaker zero-shot voice cloning. 24 kHz, 16 codebooks.",category:"community",status:"experimental",tasks:["tts","clone"],modes:["offline"],languages:["en","zh"],capabilities:{tts:["speaker_reference","multi_speaker","long_form"],clone:["speaker_reference","multi_speaker"]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors.index.json",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}],options:{request:[{name:"voice_samples",type:"string",required:!1,description:"Per-speaker reference WAV paths, comma separated and positional: the first is [S1], the second [S2]. Leave an entry empty to let that speaker be invented rather than cloned. Cannot be combined with voice_ref."},{name:"reference_text",type:"string",required:!1,description:"What the reference recordings say, speaker-tagged. Prepended to the dialogue so the continuation carries on from words it has already spoken."},{name:"language",type:"string",required:!1,description:"Full language name; the model does not understand codes like 'en'."},{name:"instruct",type:"string",required:!1,description:"Free-text direction for the delivery."},{name:"seed",type:"int",required:!1,description:"Reproduces a take exactly. Parsed as signed 32-bit integer then converted to uint32; negative values wrap."},{name:"text_temperature",type:"float",required:!1,default:1.5,description:"Text-token sampling temperature. Must be finite and positive when sampling."},{name:"temperature",type:"float",required:!1,min:0,default:1.5,description:"Audio sampling temperature; must be > 0, default 1.5."},{name:"top_p",type:"float",required:!1,min:0,default:.6,description:"Audio nucleus sampling cutoff."},{name:"top_k",type:"int",required:!1,default:50,description:"Audio top-k. Nonpositive values disable filtering."},{name:"repetition_penalty",type:"float",required:!1,min:0,default:1.1,description:"Audio repetition penalty; must be > 0. Checked when token history is present; default 1.1."},{name:"max_frames",type:"int",required:!1,description:"Ceiling on generated codec frames at 12.5/s; 0 derives one from the dialogue length. Nonpositive values derive an automatic ceiling."}],session:[{name:"weight_type",type:"enum",values:["native","f32","bf16","q8_0"],required:!1,default:"native",description:"Backbone and head weight storage; default native, which keeps a GGUF package's own type. Forcing bf16 dequantises a quantised package and costs the VRAM the quantisation was meant to save. f16 is rejected: this backbone produces NaN in it."}],load:[]},ui:{tags:["TTS","Clone","GGUF"],docs:["docs/models/moss_ttsd.md","docs/tts.md","docs/gguf.md"],recommended_package:"moss_ttsd_q8_0_codec_f16"},packages:[{id:"moss_ttsd_q8_0_codec_f16",display_name:"MOSS-TTSD Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"MOSS-TTSD-GGUF",download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTSD-GGUF"},files:["moss_ttsd_q8_0_codec_f16.gguf"]},{id:"moss_ttsd_q4_k_codec_f16",display_name:"MOSS-TTSD Q4_K GGUF (f16 heads)",default:!1,format:"gguf",precision:"q4_k",target_directory:"MOSS-TTSD-GGUF",download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTSD-GGUF"},files:["moss_ttsd_q4_k_codec_f16.gguf"]},{id:"moss_ttsd_bf16_codec_f16",display_name:"MOSS-TTSD BF16 GGUF",default:!1,format:"gguf",precision:"bf16",target_directory:"MOSS-TTSD-GGUF",download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTSD-GGUF"},files:["moss_ttsd_bf16_codec_f16.gguf"]}],package_defaults:{download:{kind:"huggingface_snapshot",repo:"christopherthompson81/MOSS-TTS-v1.5-GGUF",revision:"main",gated:!1}},dependencies:[]},V8={family:"moss_voicegen",display_name:"MOSS-VoiceGenerator",description:"MOSS voice design model: creates a speaker from a written instruction instead of a reference recording, then speaks the supplied text in that voice.",category:"community",status:"community",tasks:["design"],modes:["offline"],languages:["en","zh"],capabilities:{design:["voice_design"]},options:{request:[{name:"min_frames",type:"int",required:!1,default:0,description:"Minimum generated audio frames per text chunk; nonpositive values derive a text-length-based floor."},{name:"max_frames",type:"int",required:!1,default:0,description:"Generated audio-frame ceiling per text chunk; nonpositive values derive a text-length-based ceiling. Runtime raises it to at least the effective min_frames plus the number of codebooks."},{name:"instruct",type:"string",required:!1,description:"Voice description: timbre, age, pace, emotion."},{name:"text_temperature",type:"float",required:!1,default:1.5,description:"Text-token sampling temperature. Must be finite and positive when sampling."},{name:"language",type:"string",description:"Optional full language name, such as English or Chinese; not an ISO language code.",required:!1},{name:"seed",type:"int",description:"Generation seed; later text chunks add their chunk index. Parsed as signed 32-bit integer then converted to uint32; negative values wrap.",required:!1,default:0},{name:"temperature",type:"float",description:"Audio-token sampling temperature. Must be finite and positive when sampling.",required:!1,default:1.5},{name:"top_p",type:"float",description:"Audio-token nucleus sampling cutoff.",required:!1,default:.6},{name:"top_k",type:"int",description:"Audio-token top-k sampling limit.",required:!1,default:50},{name:"repetition_penalty",type:"float",description:"Audio-token repetition penalty. Must be finite and positive when history is nonempty.",required:!1,default:1.1},{name:"text_chunk_size",type:"int",description:"Maximum characters per generated text chunk; must be positive.",required:!1,min:1,default:200},{name:"text_chunk_mode",type:"enum",description:"Text chunking policy.",required:!1,preset:"text_chunk_mode_full",default:"word_budget"}],session:[{name:"weight_type",type:"enum",description:"Backbone weight storage. f16 is not supported.",required:!1,values:["native","f32","bf16","q8_0"],default:"bf16"}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"moss_voicegen_bf16_codec_f16_decode",tags:["Voice Design","GGUF"],docs:["docs/models/moss_voicegen.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"moss_voicegen_bf16_codec_f16_decode",display_name:"MOSS-VoiceGenerator BF16 GGUF",default:!0,format:"gguf",precision:"bf16",target_directory:"MOSS-VoiceGenerator-GGUF",files:["MOSS-VoiceGenerator-GGUF/moss_voicegen_bf16_codec_f16_decode.gguf"],strip_prefix:"MOSS-VoiceGenerator-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"model:audio_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:".",audio_tokenizer:"audio_tokenizer"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_merges:"model:merges.txt",audio_tokenizer_config:"audio_tokenizer:config.json"},tensors:{model_weights:"model:model.safetensors",audio_tokenizer_weights:"audio_tokenizer:model.safetensors.index.json"}}]},H8={schema_version:1,family:"mossformer2",display_name:"MossFormer2",description:"MossFormer2 overlapping speech separation at 16 kHz.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_duration_sec",type:"float",description:"Separation window duration; zero selects whole-file inference.",min:0,default:2,required:!1},{name:"audio_chunk_overlap_sec",type:"float",description:"Overlap between adjacent audio chunks, in seconds; must be smaller than audio_chunk_duration_sec when chunking is enabled. Recommended: 25% of audio_chunk_duration_sec, matching the official Python settings. Overlapping edges are trimmed rather than averaged. Ignored for whole-file inference.",min:0,default:.5,required:!1},{name:"normalize_output",type:"bool",description:"Match each trimmed track RMS to the input as in ClearVoice's NumPy interface.",default:!0,required:!1}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"mossformer2_ss_16k_f32",display_name:"MossFormer2 SS 16K F32",default:!0,format:"gguf",precision:"f32",target_directory:"MossFormer2-GGUF",files:["MossFormer2-GGUF/mossformer2-ss-16k-f32.gguf"],strip_prefix:"MossFormer2-GGUF"},{id:"mossformer2_ss_16k_f16",display_name:"MossFormer2 SS 16K F16",default:!1,format:"gguf",precision:"f16",target_directory:"MossFormer2-GGUF",files:["MossFormer2-GGUF/mossformer2-ss-16k-f16.gguf"],strip_prefix:"MossFormer2-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/mossformer2.md"],recommended_package:"mossformer2_ss_16k_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},W8={schema_version:1,family:"muscriptor",display_name:"MuScriptor",description:"MuScriptor is an audio-to-symbolic model that converts music audio into symbolic note events or MIDI files, with instrument constraints, sampling, beam search, batch chunk decoding, and streaming final-result output.",category:"audio_tools",status:"supported",tasks:["midi"],modes:["offline","streaming"],languages:["music"],runtime:{tags:["gguf","stream"]},capabilities:{},options:{request:[{name:"instruments",type:"string",description:"Comma-separated instrument group names to constrain generated MIDI events; empty allows all instruments.",required:!1,default:""},{name:"output_format",type:"enum",description:"Primary output serialization written by --out; midi writes a MIDI file, json writes generated note events. Default midi.",values:["midi","json"],required:!1,default:"midi"},{name:"max_tokens",type:"int",description:"Maximum generated MIDI-event token count per chunk; default 2000.",required:!1,min:1,default:2e3},{name:"do_sample",type:"bool",description:"Use temperature sampling instead of greedy token selection; default false.",required:!1,default:!1},{name:"temperature",type:"float",description:"Sampling temperature when do_sample=true; 0 is accepted for compatibility and behaves deterministically, default 1.0.",required:!1,min:0,default:1},{name:"guidance_scale",type:"float",description:"Classifier-free guidance coefficient; 1 disables CFG, default 1.0.",required:!1,default:1},{name:"batch_size",type:"int",description:"Number of audio chunks processed per batch when prelude_forcing=false; default 1.",required:!1,min:1,default:1},{name:"num_beams",type:"int",description:"Beam-search width; 1 disables beam search, default 1. Beam search requires guidance_scale=1, do_sample=false, and an actual graph batch of one.",required:!1,min:1,default:1},{name:"prelude_forcing",type:"bool",description:"Force open-note prelude tokens between sequential chunks; default true.",required:!1,default:!0},{name:"seed",type:"int",description:"Sampling seed; default 0. Parsed as int64 and converted to uint64; negative values wrap.",required:!1,default:0}],session:[{name:"weight_type",type:"enum",description:"Transformer weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"perf_mode",type:"enum",description:"Decoder attention mode; flash_attention uses the CUDA fast path, off keeps the exact attention path. Default flash_attention.",values:["off","flash_attention"],required:!1,default:"flash_attention"},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"conditioning_graph_arena_mb",type:"int",description:"Condition graph arena size in MiB; default 128.",required:!1,min:1,default:128},{name:"decoder_prefill_graph_arena_mb",type:"int",description:"Decoder prefill graph arena size in MiB; default 768.",required:!1,min:1,default:768},{name:"decoder_decode_graph_arena_mb",type:"int",description:"Decoder cached-step graph arena size in MiB; default 512.",required:!1,min:1,default:512}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"muscriptor_small_f32",display_name:"MuScriptor Small F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"MuScriptor-Small-GGUF",files:["MuScriptor-Small-GGUF/muscriptor-small-f32.gguf"],strip_prefix:"MuScriptor-Small-GGUF"}],dependencies:[],ui:{recommended_package:"muscriptor_small_f32",tags:["Music","MIDI","GGUF","Stream"],docs:["docs/models/muscriptor.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},Q8={schema_version:1,family:"nemotron_3_diar",display_name:"Nemotron 3 Diarization",description:"NVIDIA eight-speaker streaming diarization model with arrival-order speaker identities and configurable latency profiles.",category:"speech_analysis",status:"supported",tasks:["diar"],modes:["offline","streaming"],languages:["multilingual"],capabilities:{diar:["speaker_turns"]},dependencies:[],options:{request:[{name:"speaker_threshold",type:"float",description:"Speaker activity threshold used for turn decoding.",required:!1,min:0,max:1,default:.5},{name:"speaker_min_frames",type:"int",description:"Minimum decoded turn duration in 10 ms output frames.",required:!1,min:0,default:0},{name:"speaker_pad_frames",type:"int",description:"Padding applied to decoded turns in 10 ms output frames.",required:!1,min:0,default:0},{name:"return_frame_probabilities",type:"bool",description:"Attach the raw 10 ms speaker-activity timeline as the speaker_probabilities.safetensors artifact (F32 [frames, speakers] plus streaming-geometry metadata), the input for nemotron_asr speaker tagging.",required:!1,default:!1}],session:[{name:"latency_profile",type:"enum",description:"Streaming latency profile: the official very_high, low, very_low and ultra_low presets, asr_la0/3/6/13 for nemotron_asr speaker masking at that ASR lookahead, or custom.",values:["very_high","low","very_low","ultra_low","asr_la0","asr_la3","asr_la6","asr_la13","custom"],required:!1,default:"very_high"},{name:"spkcache_len",type:"int",description:"Speaker-cache length in 80 ms encoder frames for the custom profile.",required:!1,min:16},{name:"fifo_len",type:"int",description:"FIFO length in 80 ms encoder frames for the custom profile.",required:!1,min:0},{name:"chunk_len",type:"int",description:"Chunk length in 80 ms encoder frames for the custom profile.",required:!1,min:1},{name:"chunk_right_context",type:"int",description:"Future context in 80 ms encoder frames for the custom profile.",required:!1,min:0},{name:"spkcache_update_period",type:"int",description:"FIFO-to-cache update period in 80 ms encoder frames for the custom profile.",required:!1,min:1},{name:"attention",type:"enum",values:["auto","flash","eager"],description:"Encoder attention lowering; auto uses flash attention where the backend supports it.",required:!1,default:"auto"},{name:"graph_arena_mb",type:"int",description:"Inference graph arena size in MiB.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight context size in MiB.",required:!1,min:1,default:1024},{name:"weight_type",type:"enum",description:"Default model weight storage type.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"nemotron_3_diar_bf16",tags:["Diar","Stream","GGUF"],docs:["docs/models/nemotron_3_diar.md","docs/speech_analysis.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Nemotron-3-Diarization-GGUF",revision:"main",gated:!1}},packages:[{id:"nemotron_3_diar_bf16",display_name:"Nemotron 3 Diarization BF16 GGUF",default:!0,format:"gguf",precision:"bf16",target_directory:"Nemotron-3-Diarization-GGUF",files:["nemotron-3-diarization-bf16.gguf"]},{id:"nemotron_3_diar_q8_0",display_name:"Nemotron 3 Diarization Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Nemotron-3-Diarization-GGUF",files:["nemotron-3-diarization-q8_0.gguf"]}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"model:model.safetensors"}}]},K8={schema_version:1,family:"nemotron_asr",display_name:"Nemotron 3.5 ASR",description:"NVIDIA 600M streaming ASR model for low-latency and batch transcription across 40 language-locales, with native punctuation, capitalization, automatic language detection, and configurable chunk sizes.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["ar-AR","bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-GB","en-US","es-ES","es-US","et-EE","fi-FI","fr-CA","fr-FR","he-IL","hi-IN","hr-HR","hu-HU","it-IT","ja-JP","ko-KR","lt-LT","lv-LV","mt-MT","nb-NO","nl-NL","nn-NO","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","sv-SE","th-TH","tr-TR","uk-UA","vi-VN","zh-CN"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"ASR prompt language such as en-US, da-DK, or auto; default is the model's default prompt.",required:!1},{name:"lookahead_tokens",type:"int",description:"Chunk-limited encoder right context in 80 ms frames; supported values and the default come from processor_config (0, 3, 6 or 13; default 3 for the published model). In masked speaker mode, omission derives lookahead from diarizer geometry (13 fallback).",required:!1,min:0},{name:"max_tokens",type:"int",description:"Maximum RNNT generated tokens; 0 or omitted uses the model-derived limit.",required:!1,min:0,default:0},{name:"keep_language_tags",type:"bool",description:"Keep language tag tokens in decoded text; default false.",required:!1,default:!1},{name:"return_timestamps",type:"bool",description:"Compatibility/advisory flag; false does not suppress decoder token timestamps.",required:!1,default:!1},{name:"streaming",type:"bool",description:"Request a streaming run; must be false for offline sessions.",required:!1,default:!1},{name:"speaker_probabilities",type:"path",description:"nemotron_3_diar speaker_probabilities.safetensors for the same audio (diarize with return_frame_probabilities=true). Setting it enables speaker-tagged output: speaker turns with text and a SegLST artifact.",required:!1},{name:"speaker_mode",type:"enum",values:["masked","attribution"],description:"masked runs one ASR stream per active speaker on speaker-masked features (NeMo masked multitalker ASR) and transcribes overlapping speech; attribution assigns each word of one transcript to the most active speaker and is cheaper.",required:!1,default:"masked"},{name:"speaker_mask",type:"enum",values:["mel","audio"],description:"Masked mode only: mask log-mel features (NeMo mask_features) or zero the waveform of inactive 80 ms frames.",required:!1,default:"mel"},{name:"speaker_segment_gap_sec",type:"float",description:"Start a new segment for a speaker after a pause longer than this; default 1.0 (NeMo sent_break_sec).",required:!1,min:0,default:1},{name:"speaker_segment_max_sec",type:"float",description:"Streaming only: force-close a speaker-turn event after this many seconds; the final result keeps the full segments. Default 10. Must be positive.",required:!1,default:10}],session:[{name:"weight_type",type:"enum",description:"Shared matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"matmul_weight_type",type:"enum",description:"Encoder and decoder matmul weight storage type (native, f32, f16, bf16 or q8_0); defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type (native, f32 or f16); default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB; default 3072.",required:!1,min:1,default:3072},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"decoder_graph_arena_mb",type:"int",description:"Decoder graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"mem_saver",type:"bool",description:"Release the offline encoder graph after each offline request; default false.",required:!1,default:!1}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"nemotron_asr_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"nemotron_asr_q8_0",display_name:"Nemotron 3.5 ASR Streaming 0.6B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Nemotron-3.5-ASR-Streaming-0.6B-GGUF",files:["Nemotron-3.5-ASR-Streaming-0.6B-GGUF/nemotron-3.5-asr-streaming-0.6b-q8_0.gguf"],strip_prefix:"Nemotron-3.5-ASR-Streaming-0.6B-GGUF"},{id:"nemotron_asr_f16",display_name:"Nemotron 3.5 ASR Streaming 0.6B F16 GGUF",format:"gguf",precision:"f16",target_directory:"Nemotron-3.5-ASR-Streaming-0.6B-GGUF",files:["Nemotron-3.5-ASR-Streaming-0.6B-GGUF/nemotron-3.5-asr-streaming-0.6b-f16.gguf"],strip_prefix:"Nemotron-3.5-ASR-Streaming-0.6B-GGUF"},{id:"nemotron_asr_safetensors",display_name:"Nemotron 3.5 ASR Streaming 0.6B Safetensors",format:"safetensors",precision:"native",target_directory:"nemotron-3.5-asr-streaming-0.6b",files:["config.json","model.safetensors","processor_config.json","tokenizer.json"],download:{kind:"huggingface_snapshot",repo:"nvidia/nemotron-3.5-asr-streaming-0.6b"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},Y8={schema_version:1,family:"neutts",display_name:"NeuTTS",description:"NeuTTS is an English text-to-speech family from Neuphonic. The current 2E package uses a Qwen3-style autoregressive speech-token backbone, NeuCodec waveform decoding, built-in speaker prompts, and emotion-token control.",category:"tts",status:"supported",tasks:["tts"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf","stream"]},capabilities:{tts:["built_in_voices","emotion_control","long_form"]},options:{request:[{name:"voice_id",type:"enum",description:"Built-in NeuTTS speaker prompt; default emily.",values:["dave","emily","greta","jo","juliette","mateo","paul","sophie","steven"],required:!1,default:"emily"},{name:"emotion",type:"enum",description:"Optional emotion token inserted between reference text and target text; neutral inserts no emotion token.",values:["angry","disgusted","sad","happy","fearful","neutral","surprised"],required:!1,default:"neutral"},{name:"max_tokens",type:"int",description:"Maximum generated speech-token count for the autoregressive generator; 0 uses the remaining model context, default 0. Total generation context is capped at min(checkpoint context, 2048).",required:!1,min:0,default:0},{name:"min_tokens",type:"int",description:"Minimum generated speech-token count before EOS may stop generation; default 50.",required:!1,min:0,default:50},{name:"temperature",type:"float",description:"Autoregressive sampling temperature; must be > 0, default 1.0.",required:!1,min:0,default:1},{name:"top_k",type:"int",description:"Autoregressive top-k sampling limit; default 50.",required:!1,min:1,default:50},{name:"seed",type:"int",description:"Autoregressive sampling seed; omitted requests choose a random seed.",required:!1,min:0},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode for long-form synthesis.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 600.",required:!1,min:1,default:600}],session:[{name:"weight_type",type:"enum",description:"Shared matmul weight storage type for the backbone and codec decoder; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"generator_weight_type",type:"enum",description:"Generator weight storage; inherits explicit weight_type, otherwise F32 on CPU and native on other backends.",preset:"weight_type_full",required:!1},{name:"codec_weight_type",type:"enum",description:"NeuCodec decoder matmul weight storage type; defaults to weight_type when set, otherwise native.",preset:"weight_type_full",required:!1},{name:"codec_conv_weight_type",type:"enum",description:"NeuCodec convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"runtime_graph_arena_mb",type:"int",description:"Reusable ggml graph arena size in MiB for NeuTTS runtime graphs; default 1024.",required:!1,min:1,default:1024}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"neutts_2e_orig",display_name:"NeuTTS 2E Original-Precision GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"NeuTTS-2E-GGUF",files:["NeuTTS-2E-GGUF/neutts-2e-orig.gguf"],strip_prefix:"NeuTTS-2E-GGUF"}],dependencies:[],ui:{recommended_package:"neutts_2e_orig",tags:["TTS","GGUF","Stream"],docs:["docs/tts.md","docs/models/neutts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",chat_template:"model:chat_template.jinja",codec_config:"model:neucodec_config.json",codec_preprocessor_config:"model:neucodec_preprocessor_config.json",speaker_text_dave:"model:samples/dave.txt",speaker_text_emily:"model:samples/emily.txt",speaker_text_greta:"model:samples/greta.txt",speaker_text_jo:"model:samples/jo.txt",speaker_text_juliette:"model:samples/juliette.txt",speaker_text_mateo:"model:samples/mateo.txt",speaker_text_paul:"model:samples/paul.txt",speaker_text_sophie:"model:samples/sophie.txt",speaker_text_steven:"model:samples/steven.txt"},tensors:{backbone:{source:"weights:",prefix:"backbone"},codec:{source:"weights:",prefix:"codec"},speaker_prompts:{source:"weights:",prefix:"speaker_prompts"}}},{format:"safetensors",roots:{model:".",codec:"../NeuCodec"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",chat_template:"model:chat_template.jinja",codec_config:"codec:config.json",codec_preprocessor_config:"codec:preprocessor_config.json",speaker_text_dave:"model:samples/dave.txt",speaker_text_emily:"model:samples/emily.txt",speaker_text_greta:"model:samples/greta.txt",speaker_text_jo:"model:samples/jo.txt",speaker_text_juliette:"model:samples/juliette.txt",speaker_text_mateo:"model:samples/mateo.txt",speaker_text_paul:"model:samples/paul.txt",speaker_text_sophie:"model:samples/sophie.txt",speaker_text_steven:"model:samples/steven.txt"},tensors:{backbone:"model:model.safetensors",codec:"codec:model.safetensors",speaker_prompts:"model:samples/speaker_prompts.safetensors"}}]},J8={family:"niagara_asr",schema_version:1,display_name:"Niagara ASR",description:"ABR Niagara English batch ASR state-space models with attention, greedy CTC decoding, and SentencePiece tokenization.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Compatibility-only; recognition is English and output is always labelled en.",required:!1,default:"en"},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode.",values:["none"],required:!1,default:"none"}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage type.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"]},{name:"graph_arena_mb",type:"int",description:"Inference graph arena size in MiB.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight descriptor context size in MiB.",required:!1,min:1,default:256}],load:[]},runtime:{tags:["gguf","cpu"]},ui:{recommended_package:"niagara_19m_f32",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"],summary:"ABR Niagara compact English speech recognition."},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf"}},packages:[{id:"niagara_19m_f32",display_name:"Niagara 19M Batch English F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"Niagara-ASR-GGUF",files:["Niagara-ASR-GGUF/niagara-19m-batch.en-f32.gguf"],strip_prefix:"Niagara-ASR-GGUF"},{id:"niagara_38m_f32",display_name:"Niagara 38M Batch English F32 GGUF",format:"gguf",precision:"f32",target_directory:"Niagara-ASR-GGUF",files:["Niagara-ASR-GGUF/niagara-38m-batch.en-f32.gguf"],strip_prefix:"Niagara-ASR-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",preprocessor_config:"model:preprocessor_config.json",tokenizer_spm:"model:sentencepiece.model"},tensors:{weights:"weights:"}}]},X8={family:"omnivoice",display_name:"OmniVoice",description:"Massively multilingual zero-shot TTS model from k2-fsa for 600+ languages, supporting short-reference voice cloning, attribute-based voice design, pronunciation controls, and nonverbal tags.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["600+ languages"],capabilities:{clone:["speaker_reference"],design:["voice_design"]},options:{request:[{name:"language",type:"string",description:"Synthesis language code or label; omitted uses automatic language selection.",required:!1},{name:"reference_text",type:"string",description:"Transcript for speaker reference audio used in voice cloning.",required:!1},{name:"instruct",type:"string",description:"Voice-design instruction such as speaker attributes, accent, style, or delivery.",required:!1},{name:"seed",type:"int",description:"Generation seed for reproducible output; omitted value keeps the session RNG state.",required:!1,min:0,max:4294967295},{name:"num_inference_steps",type:"int",description:"Diffusion language-model inference steps; default 32.",required:!1,min:1,default:32},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; default 2.0.",required:!1,default:2},{name:"speed",type:"float",description:"Speech speed multiplier used for target-length estimation; default 1.0.",required:!1,default:1},{name:"duration_sec",type:"float",description:"Target output duration in seconds; omitted uses the model's estimated duration.",required:!1,min:0},{name:"shift",type:"float",description:"Diffusion timestep schedule shift; default 0.1.",required:!1,default:.1},{name:"denoise",type:"bool",description:"Add the denoise control token when reference audio is present; default true.",required:!1,default:!0},{name:"preprocess_prompt",type:"bool",description:"Preprocess speaker reference audio before tokenization; default true.",required:!1,default:!0},{name:"postprocess_output",type:"bool",description:"Apply output postprocessing and trimming; default true.",required:!1,default:!0},{name:"layer_penalty_factor",type:"float",description:"Layer-order penalty used while selecting masked audio-codebook positions; default 5.0.",required:!1,default:5},{name:"position_temperature",type:"float",description:"Gumbel temperature for masked-position selection; default 5.0.",required:!1,default:5},{name:"class_temperature",type:"float",description:"Audio-token class sampling temperature; default 0 for greedy class selection.",required:!1,min:0,default:0},{name:"audio_chunk_duration_sec",type:"float",description:"Target chunk duration for automatic long-form splitting; default 15 seconds.",required:!1,min:0,default:15},{name:"audio_chunk_threshold_sec",type:"float",description:"Estimated duration above which long-form generation is split into chunks; default 30 seconds.",required:!1,min:0,default:30},{name:"text_chunk_size",type:"int",description:"Explicit long-form text chunk size in Unicode codepoints. Omitted value uses duration-based automatic chunking.",required:!1,min:1},{name:"text_chunk_mode",type:"enum",description:"Text chunking mode; default tag_aware.",preset:"text_chunk_mode_full",required:!1,default:"tag_aware"}],session:[{name:"weight_type",type:"enum",description:"Shared generator weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"generator_weight_type",type:"enum",description:"Generator weight storage type; defaults to weight_type, which defaults to native.",preset:"weight_type_full",required:!1},{name:"audio_tokenizer_weight_type",type:"enum",description:"Audio tokenizer weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"audio_tokenizer_graph_arena_mb",type:"int",description:"Audio tokenizer graph arena size in MiB; default 128.",required:!1,min:1,default:128},{name:"generator_prefill_graph_arena_mb",type:"int",description:"Generator prefill graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"generator_decode_graph_arena_mb",type:"int",description:"Generator decode graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"audio_tokenizer_weight_context_mb",type:"int",description:"Audio tokenizer weight context size in MiB; default 128.",required:!1,min:1,default:128},{name:"generator_weight_context_mb",type:"int",description:"Generator weight context size in MiB; default 256.",required:!1,min:1,default:256},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs after request phases; default false. Cannot be combined with perf_mode=flash_attention.",required:!1,default:!1},{name:"perf_mode",type:"enum",description:"Generator performance mode; default off keeps the exact-safe attention path. flash_attention requires mem_saver=false.",preset:"perf_mode_flash_attention",required:!1,default:"off"}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"omnivoice_q8_0",tags:["TTS","Clone","Design","GGUF","Stream"],docs:["docs/models/omnivoice.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"omnivoice_q8_0",display_name:"OmniVoice Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"OmniVoice-GGUF",files:["OmniVoice-GGUF/omnivoice-q8_0.gguf"],strip_prefix:"OmniVoice-GGUF"},{id:"omnivoice_bf16",display_name:"OmniVoice BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"OmniVoice-GGUF",files:["OmniVoice-GGUF/omnivoice-bf16.gguf"],strip_prefix:"OmniVoice-GGUF"},{id:"omnivoice_f16",display_name:"OmniVoice F16 GGUF",format:"gguf",precision:"f16",target_directory:"OmniVoice-GGUF",files:["OmniVoice-GGUF/omnivoice-f16.gguf"],strip_prefix:"OmniVoice-GGUF"},{id:"omnivoice_safetensors",display_name:"OmniVoice Safetensors",format:"safetensors",precision:"native",target_directory:"OmniVoice",files:["config.json","model.safetensors","tokenizer.json","tokenizer_config.json","audio_tokenizer/config.json","audio_tokenizer/preprocessor_config.json","audio_tokenizer/model.safetensors"],download:{kind:"huggingface_snapshot",repo:"k2-fsa/OmniVoice"}},{id:"voicetut_tts_q8_0",display_name:"VoiceTut-TTS Egyptian Arabic Q8_0 GGUF",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of OmniVoice from mohammedaly22/VoiceTut-TTS (same architecture and audio tokenizer as OmniVoice). Use language=arz.",format:"gguf",precision:"q8_0",target_directory:"VoiceTut-TTS-GGUF",files:["voicetut-tts-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/VoiceTut-TTS-GGUF"}},{id:"voicetut_tts_f16",display_name:"VoiceTut-TTS Egyptian Arabic F16 GGUF",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of OmniVoice from mohammedaly22/VoiceTut-TTS (same architecture and audio tokenizer as OmniVoice). Use language=arz.",format:"gguf",precision:"f16",target_directory:"VoiceTut-TTS-GGUF",files:["voicetut-tts-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/VoiceTut-TTS-GGUF"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",audio_tokenizer_config:"model:audio_tokenizer/config.json",audio_tokenizer_preprocessor:"model:audio_tokenizer/preprocessor_config.json"},optional_files:{chat_template:"model:chat_template.jinja"},tensors:{weights:{source:"weights:",prefix:"weights"},audio_tokenizer_weights:{source:"weights:",prefix:"audio_tokenizer_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",audio_tokenizer_config:"model:audio_tokenizer/config.json",audio_tokenizer_preprocessor:"model:audio_tokenizer/preprocessor_config.json"},optional_files:{chat_template:"model:chat_template.jinja"},tensors:{weights:"model:model.safetensors",audio_tokenizer_weights:"model:audio_tokenizer/model.safetensors"}}]},Z8={schema_version:1,family:"open_wake_word",display_name:"OpenWakeWord",description:"OpenWakeWord wake-word detection with a shared speech embedding CNN and a converted classifier.",category:"audio_tools",status:"experimental",tasks:["wake_word"],modes:["offline","streaming"],languages:["en"],capabilities:{wake_word:["speech_segments","stream_events"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"threshold",type:"float",required:!1,min:0,max:1,description:"Wake-word detection probability threshold."}],session:[{name:"exec_plan",type:"string",required:!1,default:"{}",description:"JSON component execution plans. Component embedding accepts impl default/ggml/neon and optional backend. Default retains GGML on the session backend; neon requires ENGINE_ENABLE_NEON=ON and an AArch64 NEON CPU session. No artifacts or params are used."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"open_wake_word_alexa_f32",display_name:"OpenWakeWord Alexa GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"OpenWakeWord-GGUF",files:["OpenWakeWord-GGUF/open-wake-word-alexa-f32.gguf"],strip_prefix:"OpenWakeWord-GGUF"}],dependencies:[],ui:{tags:["Wake Word","GGUF","Stream"],docs:["docs/models/open_wake_word.md"],recommended_package:"open_wake_word_alexa_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}}]},e$={schema_version:1,family:"outetts",display_name:"Llama-OuteTTS 1.0",description:"Llama-based open-weight TTS model for 23-language speech synthesis with one-shot voice cloning from short reference audio and automatic word-alignment support.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline"],languages:["ar","be","bn","de","en","es","fa","fr","hu","it","ja","ka","ko","lt","lv","nl","pl","pt","ru","sw","ta","uk","zh"],capabilities:{clone:["speaker_reference"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated audio tokens per chunk. When omitted, OuteTTS estimates a safe value from each chunk.",required:!1,min:1},{name:"temperature",type:"float",description:"Sampling temperature; default 0.4 for cloning, otherwise model config default.",required:!1,min:0},{name:"top_k",type:"int",description:"Top-k sampling; default 40 for cloning, otherwise model config default.",required:!1,min:0},{name:"top_p",type:"float",description:"Nucleus sampling in (0, 1]; default 0.9 for cloning, otherwise model config default.",required:!1,min:0,max:1},{name:"min_p",type:"float",description:"Minimum probability relative to the best token; default 0.05 for cloning, otherwise model config default.",required:!1,min:0,max:1},{name:"repetition_penalty",type:"float",description:"Windowed repetition penalty; must be > 0, default 1.1.",required:!1,min:0,default:1.1},{name:"repetition_window",type:"int",description:"Recent-token penalty window; default 64.",required:!1,min:0,default:64},{name:"seed",type:"int",description:"Sampling seed; cloning defaults to 4099 for native weights and 42 for quantized weights.",required:!1,min:0,max:4294967295},{name:"reference_text",type:"string",description:"Transcript matching the reference voice audio for voice cloning.",required:!1},{name:"reference_language",type:"string",description:"Language code used to align the reference transcript; omitted inherits the request text language, then falls back to en.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum UTF-8 codepoints per long-form text chunk; default 256. Chunks are split further when required by max_tokens or context budget.",required:!1,min:1,default:256},{name:"text_chunk_mode",type:"enum",description:"Framework long-form text chunking mode; default word_budget.",preset:"text_chunk_mode_full",required:!1,default:"word_budget"}],session:[{name:"lora",type:"path",description:"PEFT LoRA adapter directory or checkpoint file for the same OuteTTS checkpoint; merged into the language model at session creation.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"weight_type",type:"enum",description:"Language-model weight storage type. Quantized CUDA voice cloning is expanded to F32 in memory for generation correctness.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","nvfp4"]},{name:"llama_weight_context_mb",type:"int",description:"Language-model weight context size in MiB; default 4096.",required:!1,min:1,default:4096},{name:"constant_context_mb",type:"int",description:"Language-model constant tensor context size in MiB; default 256.",required:!1,min:1,default:256},{name:"dac_weight_context_mb",type:"int",description:"DAC decoder weight context size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"dac_graph_arena_mb",type:"int",description:"DAC decoder graph arena size in MiB; default 1536.",required:!1,min:1,default:1536},{name:"forced_aligner_path",type:"path",description:"Optional Qwen3 Forced Aligner override. Cloning automatically uses the aligner embedded in a standalone OuteTTS GGUF when present.",required:!1},{name:"reference_cache_slots",type:"int",description:"Prepared reference-profile cache slots; default 1, set 0 to disable.",required:!1,min:0,default:1},{name:"mem_saver",type:"bool",description:"Release cached-step and aligner runtime state after use; default false.",required:!1,default:!1}],load:[]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",special_tokens_map:"model:special_tokens_map.json",dac_config:"model:dac/config.json"},optional_files:{aligner_config:"model:aligner/config.json",aligner_generation_config:"model:aligner/generation_config.json",aligner_tokenizer_config:"model:aligner/tokenizer_config.json",aligner_preprocessor_config:"model:aligner/preprocessor_config.json",aligner_processor_config:"model:aligner/processor_config.json",aligner_chat_template:"model:aligner/chat_template.json",aligner_chat_template_jinja:"model:aligner/chat_template.jinja",aligner_vocab:"model:aligner/vocab.json",aligner_merges:"model:aligner/merges.txt",aligner_tokenizer_json:"model:aligner/tokenizer.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},dac_weights:{source:"weights:",prefix:"dac_weights"},aligner_weights:{source:"weights:",prefix:"aligner_weights"}}},{format:"safetensors",roots:{model:".",dac:"../DAC.speech.v1.0"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json",special_tokens_map:"model:special_tokens_map.json",dac_config:"dac:config.json"},tensors:{model_weights:"model:model.safetensors",dac_weights:"dac:model.safetensors"}}],packages:[{id:"outetts_1_0_1b_q8_0",display_name:"Llama-OuteTTS 1.0 1B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Llama-OuteTTS-1.0-1B_Q8",files:["Text to audio (TTS)/Llama-OuteTTS-1.0-1B_Q8.gguf"],download:{kind:"huggingface_snapshot",repo:"mirek190/audio.cpp"}}],dependencies:[],ui:{recommended_package:"outetts_1_0_1b_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/outetts.md","docs/reports/outetts_validation.md","docs/gguf.md"]}},t$={family:"owsm",schema_version:1,display_name:"OWSM",description:"ESPnet Open Whisper-style multilingual speech recognition and speech translation.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["abk","afr","amh","ara","asm","ast","aze","bak","bas","bel","ben","bos","bre","bul","cat","ceb","ces","chv","ckb","cmn","cnh","cym","dan","deu","dgd","div","ell","eng","epo","est","eus","fas","fil","fin","fra","frr","ful","gle","glg","grn","guj","hat","hau","heb","hin","hrv","hsb","hun","hye","ibo","ina","ind","isl","ita","jav","jpn","kab","kam","kan","kat","kaz","kea","khm","kin","kir","kmr","kor","lao","lav","lga","lin","lit","ltz","lug","luo","mal","mar","mas","mdf","mhr","mkd","mlt","mon","mri","mrj","mya","myv","nan","nep","nld","nno","nob","npi","nso","nya","oci","ori","orm","ory","pan","pol","por","pus","quy","roh","ron","rus","sah","sat","sin","skr","slk","slv","sna","snd","som","sot","spa","srd","srp","sun","swa","swe","swh","tam","tat","tel","tgk","tgl","tha","tig","tir","tok","tpi","tsn","tuk","tur","twi","uig","ukr","umb","urd","uzb","vie","vot","wol","xho","yor","yue","zho","zul"],capabilities:{asr:["segments"]},dependencies:[],options:{request:[{name:"language",type:"string",description:"Input language as an OWSM ISO 639-3 code, such as eng, jpn, or zho; auto detects it from the first window.",required:!1,default:"eng"},{name:"target_language",type:"string",description:"Optional OWSM translation target code. Omit for transcription.",required:!1},{name:"return_timestamps",type:"bool",description:"Return OWSM utterance-level timestamp segments.",required:!1,default:!1},{name:"condition_on_previous_text",type:"bool",description:"Condition each long-form chunk on the previous chunk transcript.",required:!1,default:!1},{name:"num_beams",type:"int",description:"Decoder beam width; one selects greedy decoding.",required:!1,min:1,max:50002,default:1},{name:"max_tokens",type:"int",description:"Maximum generated tokens per 30-second window; zero uses the model limit.",required:!1,min:0,max:374,default:0},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum duration of each audio window. Must be positive.",required:!1,max:30,default:30}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage override.",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"],required:!1,default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/owsm.md"],recommended_package:"owsm_v4_base_102m_f32"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"owsm_v4_base_102m_f32",display_name:"OWSM v4 Base 102M F32",default:!0,format:"gguf",precision:"f32",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-base-102m-f32.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_base_102m_q8_0",display_name:"OWSM v4 Base 102M Q8_0",default:!1,format:"gguf",precision:"q8_0",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-base-102m-q8_0.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_small_370m_f32",display_name:"OWSM v4 Small 370M F32",default:!1,format:"gguf",precision:"f32",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-small-370m-f32.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_small_370m_q8_0",display_name:"OWSM v4 Small 370M Q8_0",default:!1,format:"gguf",precision:"q8_0",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-small-370m-q8_0.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_small_370m_q4_k",display_name:"OWSM v4 Small 370M Q4_K",default:!1,format:"gguf",precision:"q4_k",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-small-370m-q4_k.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_medium_1b_f32",display_name:"OWSM v4 Medium 1B F32",default:!1,format:"gguf",precision:"f32",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-medium-1b-f32.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_medium_1b_q8_0",display_name:"OWSM v4 Medium 1B Q8_0",default:!1,format:"gguf",precision:"q8_0",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-medium-1b-q8_0.gguf"],strip_prefix:"OWSM-GGUF"},{id:"owsm_v4_medium_1b_q4_k",display_name:"OWSM v4 Medium 1B Q4_K",default:!1,format:"gguf",precision:"q4_k",target_directory:"OWSM-GGUF",files:["OWSM-GGUF/owsm-v4-medium-1b-q4_k.gguf"],strip_prefix:"OWSM-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:bpe.model"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:bpe.model"},tensors:{weights:"weights:"}}]},a$={family:"owsm_ctc",schema_version:1,display_name:"OWSM-CTC",description:"ESPnet non-autoregressive multilingual speech recognition and speech translation with self-conditioned CTC.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["abk","afr","amh","ara","asm","ast","aze","bak","bas","bel","ben","bos","bre","bul","cat","ceb","ces","chv","ckb","cmn","cnh","cym","dan","deu","dgd","div","ell","eng","epo","est","eus","fas","fil","fin","fra","frr","ful","gle","glg","grn","guj","hat","hau","heb","hin","hrv","hsb","hun","hye","ibo","ina","ind","isl","ita","jav","jpn","kab","kam","kan","kat","kaz","kea","khm","kin","kir","kmr","kor","lao","lav","lga","lin","lit","ltz","lug","luo","mal","mar","mas","mdf","mhr","mkd","mlt","mon","mri","mrj","mya","myv","nan","nep","nld","nno","nob","npi","nso","nya","oci","ori","orm","ory","pan","pol","por","pus","quy","roh","ron","rus","sah","sat","sin","skr","slk","slv","sna","snd","som","sot","spa","srd","srp","sun","swa","swe","swh","tam","tat","tel","tgk","tgl","tha","tig","tir","tok","tpi","tsn","tuk","tur","twi","uig","ukr","umb","urd","uzb","vie","vot","wol","xho","yor","yue","zho","zul"],capabilities:{},dependencies:[],options:{request:[{name:"language",type:"string",description:"Input ISO 639-3 language code, such as eng, jpn, or zho. auto uses unknown-language conditioning.",required:!1,default:"eng"},{name:"target_language",type:"string",description:"Optional OWSM translation target code. Omit for transcription.",required:!1},{name:"audio_chunk_mode",type:"enum",description:"Long-form audio chunking mode.",values:["auto","fixed","none"],required:!1,default:"auto"}],session:[{name:"weight_type",type:"enum",description:"Matmul weight storage override.",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"],required:!1,default:"native"}],load:[]},runtime:{tags:["gguf"]},ui:{tags:["ASR","GGUF"],docs:["docs/models/owsm_ctc.md"],recommended_package:"owsm_ctc_v4_1b_f32"},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"owsm_ctc_v4_1b_f32",display_name:"OWSM-CTC v4 1B F32",default:!0,format:"gguf",precision:"f32",target_directory:"OWSM-CTC-GGUF",files:["OWSM-CTC-GGUF/owsm-ctc-v4-1b-f32.gguf"],strip_prefix:"OWSM-CTC-GGUF"},{id:"owsm_ctc_v4_1b_q8_0",display_name:"OWSM-CTC v4 1B Q8_0",default:!1,format:"gguf",precision:"q8_0",target_directory:"OWSM-CTC-GGUF",files:["OWSM-CTC-GGUF/owsm-ctc-v4-1b-q8_0.gguf"],strip_prefix:"OWSM-CTC-GGUF"}],sources:[{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:bpe.model"},tensors:{weights:"model:model.safetensors"}},{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:bpe.model"},tensors:{weights:"weights:"}}]},i$={schema_version:1,family:"parakeet_tdt",display_name:"Parakeet-TDT 0.6B v3",description:"NVIDIA Parakeet-TDT 0.6B v3 FastConformer-TDT ASR covering 25 European languages with automatic language detection. Supports the upstream Transformers-compatible safetensors package and standalone audio.cpp GGUF, with offline full-context, bounded-window long-form, and buffered streaming; the checkpoint uses unlimited bidirectional attention and is not a native cache-aware streaming model.",category:"asr",status:"community",tasks:["asr"],modes:["offline","streaming"],languages:["bg","cs","da","de","el","en","es","et","fi","fr","hr","hu","it","lt","lv","mt","nl","pl","pt","ro","ru","sk","sl","sv","uk"],runtime:{tags:["gguf","stream"]},capabilities:{asr:["word_timestamps","partial_results","vad_chunking"]},options:{request:[{name:"return_timestamps",type:"bool",description:"Accepted for CLI --words-out compatibility. Word timestamps are always returned, including when false or omitted.",required:!1},{name:"max_tokens",type:"int",description:"Maximum TDT generated tokens; 0 or omitted uses the model-derived limit.",required:!1,min:0,default:0},{name:"keep_language_tags",type:"bool",description:"Keep language tag tokens in decoded text; default false.",required:!1,default:!1},{name:"audio_chunk_mode",type:"enum",description:"Offline audio chunking mode. fixed selects overlapping long-form windows regardless of offline_mode; vad uses the configured VAD model (Silero by default) to skip silence; auto follows offline_mode. Offline input is downmixed and resampled as needed.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"VAD maximum chunk duration; omitted inherits the session duration. Fixed/long_form windows use the session setting, not this request override.",required:!1,min:.001},{name:"hotwords",type:"string",description:"Phonon-2 only: optional vocabulary list, comma-separated or a JSON array of strings / word-spoken objects. Up to 25 terms; an explicit empty list disables prompt biasing.",required:!1},{name:"hotwords_score",type:"float",description:"Phonon-2 matching-piece logit bonus; duration scores and blank are not biased.",required:!1,min:0,max:100,default:2}],session:[{name:"weight_type",type:"enum",description:"Shared matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"},{name:"matmul_weight_type",type:"enum",description:"Encoder and decoder matmul weight storage type; defaults to weight_type, which defaults to native. Q8_0 measured 1.79x faster on the tested CPU and changed roughly 8 percent of transcripts without moving aggregate word error rate.",preset:"weight_type_full",required:!1},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; default native.",preset:"weight_type_conv",required:!1,default:"native"},{name:"perf_mode",type:"enum",description:"Encoder attention implementation. Default off uses the validated relative-attention path; flash_attention enables the fused implementation, which was numerically validated but slower on the tested hardware.",preset:"perf_mode_flash_attention",required:!1,default:"off"},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB; default 3072.",required:!1,min:1,default:3072},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"decoder_graph_arena_mb",type:"int",description:"Decoder graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"audio_chunk_duration_sec",type:"float",description:"Center-region duration for buffered streaming in seconds; default 2. Fixed context windows are re-encoded rather than cache-aware. Also sizes offline fixed/long_form windows.",required:!1,min:.001,default:2},{name:"left_context_sec",type:"float",description:"Past context included when re-encoding each buffered-streaming window in seconds; default 10. Also applies to offline fixed/long_form windows.",required:!1,min:0,default:10},{name:"right_context_sec",type:"float",description:"Future lookahead included when re-encoding each buffered-streaming window in seconds; default 2 and adds equivalent partial-result latency. Also applies to offline fixed/long_form windows.",required:!1,min:0,default:2},{name:"streaming_attention_mode",type:"enum",description:"Attention policy inside each buffered window. full_context preserves bidirectional attention over the bounded window.",values:["full_context"],required:!1,default:"full_context"},{name:"offline_mode",type:"enum",description:"Offline encoder scheduling. full_context encodes the whole utterance, long_form uses bounded overlapping windows, and auto selects long_form beyond audio_chunk_threshold_sec.",values:["full_context","long_form","auto"],required:!1,default:"full_context"},{name:"audio_chunk_threshold_sec",type:"float",description:"Duration threshold used by offline_mode=auto before switching to bounded-window long-form execution; default 30 seconds.",required:!1,min:.001,default:30},{name:"vad_model_path",type:"path",description:"VAD model path used by audio_chunk_mode=vad (any built-in VAD family); default assets/framework/models/silero_vad.",required:!1,default:"assets/framework/models/silero_vad"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"parakeet_tdt_q8_0",display_name:"Parakeet-TDT 0.6B v3 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Parakeet-TDT-0.6B-v3-GGUF",files:["Parakeet-TDT-0.6B-v3-GGUF/parakeet-tdt-0.6b-v3-q8_0.gguf"],strip_prefix:"Parakeet-TDT-0.6B-v3-GGUF"},{id:"parakeet_tdt_f16",display_name:"Parakeet-TDT 0.6B v3 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Parakeet-TDT-0.6B-v3-GGUF",files:["Parakeet-TDT-0.6B-v3-GGUF/parakeet-tdt-0.6b-v3-f16.gguf"],strip_prefix:"Parakeet-TDT-0.6B-v3-GGUF"},{id:"orukeet_q8_0",display_name:"Orukeet r3 Q8_0 GGUF (Parakeet-TDT 0.6B v3 fine-tune)",format:"gguf",precision:"q8_0",target_directory:"Orukeet-GGUF",files:["Orukeet-GGUF/orukeet-q8_0.gguf"],strip_prefix:"Orukeet-GGUF"},{id:"orukeet_f16",display_name:"Orukeet r3 F16 GGUF (Parakeet-TDT 0.6B v3 fine-tune)",format:"gguf",precision:"f16",target_directory:"Orukeet-GGUF",files:["Orukeet-GGUF/orukeet-f16.gguf"],strip_prefix:"Orukeet-GGUF"}],dependencies:[],ui:{recommended_package:"parakeet_tdt_q8_0",tags:["ASR","GGUF"],docs:["docs/models/parakeet_tdt.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor_config:"model:processor_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},n$={schema_version:1,family:"personaplex",display_name:"PersonaPlex",description:"PersonaPlex is a Moshi-style full-duplex speech-to-speech conversational model with Mimi audio tokenization, packaged speaker/persona prompts, streaming audio input, text generation, and generated assistant speech.",category:"tts",status:"supported",tasks:["s2s"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf","stream"]},capabilities:{s2s:["speaker_reference"]},options:{request:[{name:"voice_id",type:"enum",description:"Packaged PersonaPlex voice prompt id such as NATF2 or NATM1. If omitted, NATF2 is used.",values:["NATF0","NATF1","NATF2","NATF3","NATM0","NATM1","NATM2","NATM3","VARF0","VARF1","VARF2","VARF3","VARF4","VARM0","VARM1","VARM2","VARM3","VARM4"],required:!1,default:"NATF2"},{name:"system_prompt",type:"string",description:"System persona prompt. Plain text is wrapped with the required tags.",required:!1},{name:"temperature",type:"float",description:"Audio token sampling temperature; must be nonnegative, and positive when do_sample=true. Ignored when do_sample=false; default 0.8.",required:!1,min:0,default:.8},{name:"text_temperature",type:"float",description:"Text token sampling temperature; must be nonnegative, and positive when do_sample=true. Ignored when do_sample=false; default follows temperature.",required:!1,min:0},{name:"top_k",type:"int",description:"Audio token top-k sampling limit; default 250.",required:!1,min:0,default:250},{name:"text_top_k",type:"int",description:"Text token top-k sampling limit; default follows top_k.",required:!1,min:0},{name:"do_sample",type:"bool",description:"Enable stochastic token sampling; default true. Set false for greedy decoding.",required:!1,default:!0},{name:"seed",type:"int",description:"uint32 seed. Session RNG starts at 42424242; explicit values reseed it, while omission on later conversations continues RNG state.",required:!1,min:0,max:4294967295}],session:[{name:"graph_arena_mb",type:"int",description:"Reusable ggml graph arena size in MiB for PersonaPlex LM, depformer, and Mimi graphs; default 1024.",required:!1,min:1,default:1024},{name:"lm_weight_context_mb",type:"int",description:"Main LM weight metadata arena size in MiB; default 64.",required:!1,min:1,default:64},{name:"depformer_weight_context_mb",type:"int",description:"Depth transformer weight metadata arena size in MiB; default 64.",required:!1,min:1,default:64},{name:"mimi_weight_context_mb",type:"int",description:"Mimi codec weight metadata arena size in MiB; default 64.",required:!1,min:1,default:64},{name:"weight_type",type:"enum",description:"LM and Mimi matmul weight storage type; default native.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"personaplex_7b_v1_q4_k",display_name:"PersonaPlex 7B v1 Q4_K GGUF",default:!0,format:"gguf",precision:"q4_k",target_directory:"PersonaPlex-GGUF",files:["PersonaPlex-GGUF/personaplex-7b-v1-q4_k.gguf"],strip_prefix:"PersonaPlex-GGUF"},{id:"personaplex_7b_v1_q8_0",display_name:"PersonaPlex 7B v1 Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"PersonaPlex-GGUF",files:["PersonaPlex-GGUF/personaplex-7b-v1-q8_0.gguf"],strip_prefix:"PersonaPlex-GGUF"}],dependencies:[],ui:{recommended_package:"personaplex_7b_v1_q4_k",tags:["TTS","Stream","GGUF"],docs:["docs/models/personaplex.md","docs/tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_model:"model:tokenizer_spm_32k_3.model",voice_NATF0:"model:voices_safetensors/NATF0.safetensors",voice_NATF1:"model:voices_safetensors/NATF1.safetensors",voice_NATF2:"model:voices_safetensors/NATF2.safetensors",voice_NATF3:"model:voices_safetensors/NATF3.safetensors",voice_NATM0:"model:voices_safetensors/NATM0.safetensors",voice_NATM1:"model:voices_safetensors/NATM1.safetensors",voice_NATM2:"model:voices_safetensors/NATM2.safetensors",voice_NATM3:"model:voices_safetensors/NATM3.safetensors",voice_VARF0:"model:voices_safetensors/VARF0.safetensors",voice_VARF1:"model:voices_safetensors/VARF1.safetensors",voice_VARF2:"model:voices_safetensors/VARF2.safetensors",voice_VARF3:"model:voices_safetensors/VARF3.safetensors",voice_VARF4:"model:voices_safetensors/VARF4.safetensors",voice_VARM0:"model:voices_safetensors/VARM0.safetensors",voice_VARM1:"model:voices_safetensors/VARM1.safetensors",voice_VARM2:"model:voices_safetensors/VARM2.safetensors",voice_VARM3:"model:voices_safetensors/VARM3.safetensors",voice_VARM4:"model:voices_safetensors/VARM4.safetensors"},tensors:{lm_weights:{source:"weights:",prefix:"lm"},mimi_weights:{source:"weights:",prefix:"mimi"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_model:"model:tokenizer_spm_32k_3.model",voice_NATF0:"model:voices_safetensors/NATF0.safetensors",voice_NATF1:"model:voices_safetensors/NATF1.safetensors",voice_NATF2:"model:voices_safetensors/NATF2.safetensors",voice_NATF3:"model:voices_safetensors/NATF3.safetensors",voice_NATM0:"model:voices_safetensors/NATM0.safetensors",voice_NATM1:"model:voices_safetensors/NATM1.safetensors",voice_NATM2:"model:voices_safetensors/NATM2.safetensors",voice_NATM3:"model:voices_safetensors/NATM3.safetensors",voice_VARF0:"model:voices_safetensors/VARF0.safetensors",voice_VARF1:"model:voices_safetensors/VARF1.safetensors",voice_VARF2:"model:voices_safetensors/VARF2.safetensors",voice_VARF3:"model:voices_safetensors/VARF3.safetensors",voice_VARF4:"model:voices_safetensors/VARF4.safetensors",voice_VARM0:"model:voices_safetensors/VARM0.safetensors",voice_VARM1:"model:voices_safetensors/VARM1.safetensors",voice_VARM2:"model:voices_safetensors/VARM2.safetensors",voice_VARM3:"model:voices_safetensors/VARM3.safetensors",voice_VARM4:"model:voices_safetensors/VARM4.safetensors"},tensors:{lm_weights:"model:model.safetensors",mimi_weights:"model:tokenizer-e351c8d8-checkpoint125.safetensors"}}]},s$={schema_version:1,family:"piper_tts",display_name:"Piper TTS",description:"Native VITS inference for Piper text-to-speech voices using the shared eSpeak-ng frontend.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"speed",type:"float",description:"Speech speed multiplier; larger values produce faster speech.",required:!1,min:.5,max:2,default:1},{name:"variation",type:"float",description:"Acoustic latent noise scale.",required:!1,min:0,max:1,default:.667},{name:"duration_variation",type:"float",description:"Stochastic duration noise scale.",required:!1,min:0,max:2,default:.8},{name:"seed",type:"int",description:"Non-negative generation seed.",required:!1,min:0,default:1234,max:4294967295},{name:"text_chunk_mode",type:"enum",description:"Long-form text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form chunk.",required:!1,min:1,default:280}],session:[{name:"espeak_library_path",type:"path",description:"Optional explicit path to the eSpeak-ng shared library.",required:!1},{name:"espeak_data_path",type:"path",description:"Optional explicit path to espeak-ng-data.",required:!1},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Components: decoder, duration_encoder, duration_flows. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn. Default keeps existing execution. The decoder's GGML impl supports the session backend; RKNN requires artifacts.main and ENGINE_ENABLE_RKNN, with no backend field. The two duration stages are GGML-only and accept the session backend (device) or cpu (host); with no backend field the text encoder runs on the host on CUDA and on the session backend elsewhere, and the flow graphs run on the session backend. No implementation takes params.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"piper_lessac_medium_orig",display_name:"Piper Lessac Medium Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Piper-TTS-GGUF",files:["Piper-TTS-GGUF/piper-en-us-lessac-medium-orig.gguf"],strip_prefix:"Piper-TTS-GGUF"},{id:"piper_lessac_medium_decoder_rk3588",display_name:"Piper Lessac Medium NPU Decoder RKNN (RK3588)",format:"rknn",precision:"f16",target_directory:"Piper-TTS-GGUF",files:["rk3588/piper-lessac-w93.rknn"],strip_prefix:"rk3588",description:"Pre-compiled RK3588 engine for the piper_tts RKNN decoder sidecar (piper_tts.exec_plan, artifacts.main); installs beside the GGUF weights and is named by bare file name. Built by tools/rknn from the en_US-lessac-medium streaming decoder export; see docs/build/rockchip-npu.md.",download:{kind:"huggingface_snapshot",repo:"wOvANAI/rknn-tts-engines",revision:"main",gated:!1}}],dependencies:[],ui:{recommended_package:"piper_lessac_medium_orig",tags:["TTS","GGUF"],docs:["docs/tts.md","docs/models/piper_tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json"},tensors:{weights:"model:model.safetensors"}}]},r$={schema_version:1,family:"plapre",display_name:"Plapre 3",description:"Danish speech synthesis with a Llama autoregressive decoder and Kanade audio codec. Streaming emits completed text chunks, not incremental codec frames.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["da"],capabilities:{tts:["long_form","speaker_reference","built_in_voices"],clone:["speaker_reference","long_form"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"voice_id",type:"enum",description:"Built-in speaker.",required:!1,default:"tor",values:["tor","ida","liv","ask","kaj"]},{name:"reference_text",type:"string",description:"Transcript of the reference audio, used for voice cloning.",required:!1,default:""},{name:"x_vector_only_mode",type:"bool",description:"Use only the reference speaker embedding, without the reference transcript/audio-token prefix.",required:!1,default:!1},{name:"word_duration_frames",type:"string",description:"JSON array of per-word integer durations, from 0 to 399 frames at 25 Hz. Duration-controlled text is generated in one chunk.",required:!1},{name:"context_text",type:"string",description:"Previous utterance for prosodic context.",required:!1},{name:"context_audio_file",type:"audio_path",description:"Optional previous-utterance WAV accompanying context_text.",required:!1},{name:"same_speaker",type:"bool",description:"Whether context_text belongs to the target speaker.",required:!1,default:!0},{name:"pronunciations",type:"string",description:'Ordered JSON array of pronunciation references: [{"word":"morgen","audio_file":"morgen.wav"}]. Up to 10 references, 60 codes each and 200 total codes are used.',required:!1},{name:"edit_start_frame",type:"int",description:"Start of the masked span in voice_ref, in 25-Hz codec frames. Supply both edit boundaries and the complete desired text.",required:!1,min:0},{name:"edit_end_frame",type:"int",description:"Exclusive end of the masked span in voice_ref. Editing runs in one text chunk.",required:!1,min:0},{name:"max_tokens",type:"int",description:"Maximum generated tokens per text chunk; each audio token represents 40 ms.",required:!1,default:500,min:1},{name:"min_tokens",type:"int",description:"Minimum generated tokens before a stop token can be selected.",required:!1,default:0,min:0},{name:"temperature",type:"float",description:"Sampling temperature; zero selects greedy decoding.",required:!1,default:.8,min:0},{name:"top_p",type:"float",description:"Nucleus sampling probability in (0, 1].",required:!1,default:.95,min:0,max:1},{name:"top_k",type:"int",description:"Top-k sampling; -1 or zero disables filtering.",required:!1,default:50,min:-1},{name:"seed",type:"int",description:"Sampling and vocoder noise seed.",required:!1,default:0,min:0},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk.",required:!1,default:300,min:1},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking policy.",required:!1,default:"default",values:["default","tag_aware","japanese","endline"]},{name:"silence_duration_sec",type:"float",description:"Silence inserted between text chunks.",required:!1,default:.1,min:0}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"plapre_3_bf16",display_name:"Plapre 3 BF16",format:"gguf",precision:"bf16",default:!0,target_directory:"Plapre-3-GGUF",files:["Plapre-3-GGUF/plapre-3-bf16.gguf"],strip_prefix:"Plapre-3-GGUF"},{id:"plapre_3_f32",display_name:"Plapre 3 F32",format:"gguf",precision:"f32",default:!1,target_directory:"Plapre-3-GGUF",files:["Plapre-3-GGUF/plapre-3-f32.gguf"],strip_prefix:"Plapre-3-GGUF"}],dependencies:[],ui:{recommended_package:"plapre_3_bf16",builtin_voices:["tor","ida","liv","ask","kaj"],default_voice:"tor",tags:["TTS","GGUF"],docs:["docs/models/plapre.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",kanade_config:"model:kanade_config.json",speakers:"model:speakers.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},tensors:{ar:"weights:",speaker_projection:{source:"weights:",prefix:"speaker_proj"},kanade:{source:"weights:",prefix:"kanade"},wavlm:{source:"weights:",prefix:"wavlm"},hift:{source:"weights:",prefix:"hift"}}}]},o$={family:"pocket_tts",display_name:"PocketTTS",description:"Kyutai 100M-parameter CPU-friendly TTS package set for real-time local synthesis and small-footprint voice cloning in English, French, German, Italian, Portuguese, and Spanish.",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["en","fr","de","it","pt","es"],options:{request:[{name:"frames_after_eos",type:"int",description:"Extra frames after EOS; -1 uses the model-derived value.",required:!1,min:-1,default:-1},{name:"max_frames",type:"int",description:"Maximum generated audio frames; zero estimates the cap from text length. Captured during session preparation.",required:!1,min:0,default:0},{name:"text_chunk_tokens",type:"int",description:"Tokenizer tokens per text chunk; must be positive, default 50. Set during preparation and overridable per request.",required:!1,min:1,default:50},{name:"temperature",type:"float",description:"Positive flow noise temperature; defaults to the model configuration. Captured during session preparation.",required:!1},{name:"seed",type:"int",description:"Noise seed; omitted chooses a random seed. Captured during session preparation.",required:!1,min:0,max:4294967295},{name:"noise_clamp",type:"float",description:"Noise clamp; a negative value disables clamping. Captured during session preparation.",required:!1,default:-1},{name:"eos_threshold",type:"float",description:"EOS detection threshold. Captured during session preparation.",required:!1,default:-4},{name:"noise_file",type:"path",description:"Precomputed noise schedule file. Captured during session preparation.",required:!1},{name:"voice_embedding_file",type:"path",description:"Precomputed voice-state embedding path. Captured during session preparation.",required:!1},{name:"truncate_clone_audio",type:"bool",description:"Truncate voice clone audio. Captured during session preparation.",required:!1,default:!1},{name:"text_chunk_size",type:"int",description:"Optional per-request character chunk size; otherwise use sentence/token budgeting.",required:!1},{name:"export_voice_state_file",type:"path",description:"Export the prepared voice state during session preparation.",required:!1}],session:[{name:"voice_state_cache_slots",type:"int",description:"Cached prepared voice states; zero disables reuse.",required:!1,min:0,default:4},{name:"offline_graph_capacity_mode",type:"enum",description:"Offline graph capacity policy; CPU/Metal default tiered, other backends double.",required:!1,values:["fixed","double","tiered","grow"]},{name:"prompt_graph_capacity",type:"int",description:"Optional reserved prompt capacity.",required:!1,min:1},{name:"generation_graph_capacity",type:"int",description:"Optional reserved generation capacity.",required:!1,min:1},{name:"weight_type",type:"enum",description:"Shared matmul weight storage; component matmul settings inherit it. Convolution storage remains independently native unless overridden.",required:!1,preset:"weight_type_full"},{name:"matmul_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage.",required:!1,preset:"weight_type_conv",default:"native"},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:64},{name:"flow_weight_context_mb",type:"int",description:"Flow weight context in MiB; inherits pocket_tts.weight_context_mb when omitted.",required:!1,min:1},{name:"mimi_encoder_weight_context_mb",type:"int",description:"Mimi encoder weight context in MiB; inherits pocket_tts.weight_context_mb when omitted.",required:!1,min:1},{name:"mimi_decoder_weight_context_mb",type:"int",description:"Mimi decoder weight context in MiB; inherits pocket_tts.weight_context_mb when omitted.",required:!1,min:1},{name:"flow_weights_view_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:256},{name:"flow_step_graph_arena_mb",type:"int",description:"Flow-step host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:256},{name:"mimi_encoder_graph_arena_mb",type:"int",description:"Mimi encoder host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:512},{name:"mimi_conv_graph_arena_mb",type:"int",description:"Mimi convolution host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:32},{name:"mimi_transformer_graph_arena_mb",type:"int",description:"Mimi transformer host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:96},{name:"mimi_tail_graph_arena_mb",type:"int",description:"Mimi tail host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:512},{name:"mimi_full_chunk_frames",type:"int",description:"Full-sequence decoder chunk frames.",required:!1,min:1,default:90},{name:"mimi_stage2_chunk_frames",type:"int",description:"Second-stage decoder chunk frames.",required:!1,min:1,default:900},{name:"use_full_mimi",type:"bool",description:"Use full-sequence Mimi decoding.",required:!1,default:!0}],load:[{name:"language",type:"string",description:"Model language selection.",required:!1,default:"english"}]},capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},ui:{recommended_package:"pocket_tts_english_q8_0",default_voice:"alba",builtin_voices:["alba"],tags:["TTS","Clone","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"pocket_tts_english_q8_0",display_name:"PocketTTS English Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/english",files:["PocketTTS-GGUF/english/pocket-tts-english-q8_0.gguf","PocketTTS-GGUF/english/embeddings/alba.safetensors"],strip_prefix:"PocketTTS-GGUF/english"},{id:"pocket_tts_english_bf16",display_name:"PocketTTS English BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/english",files:["PocketTTS-GGUF/english/pocket-tts-english-bf16.gguf","PocketTTS-GGUF/english/embeddings/alba.safetensors"],strip_prefix:"PocketTTS-GGUF/english"},{id:"pocket_tts_french_q8_0",display_name:"PocketTTS French Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/french",files:["PocketTTS-GGUF/french/pocket-tts-french-q8_0.gguf","PocketTTS-GGUF/french/embeddings/cosette.safetensors"],strip_prefix:"PocketTTS-GGUF/french"},{id:"pocket_tts_french_bf16",display_name:"PocketTTS French BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/french",files:["PocketTTS-GGUF/french/pocket-tts-french-bf16.gguf","PocketTTS-GGUF/french/embeddings/cosette.safetensors"],strip_prefix:"PocketTTS-GGUF/french"},{id:"pocket_tts_german_q8_0",display_name:"PocketTTS German Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/german",files:["PocketTTS-GGUF/german/pocket-tts-german-q8_0.gguf"],strip_prefix:"PocketTTS-GGUF/german"},{id:"pocket_tts_german_bf16",display_name:"PocketTTS German BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/german",files:["PocketTTS-GGUF/german/pocket-tts-german-bf16.gguf"],strip_prefix:"PocketTTS-GGUF/german"},{id:"pocket_tts_italian_q8_0",display_name:"PocketTTS Italian Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/italian",files:["PocketTTS-GGUF/italian/pocket-tts-italian-q8_0.gguf"],strip_prefix:"PocketTTS-GGUF/italian"},{id:"pocket_tts_italian_bf16",display_name:"PocketTTS Italian BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/italian",files:["PocketTTS-GGUF/italian/pocket-tts-italian-bf16.gguf"],strip_prefix:"PocketTTS-GGUF/italian"},{id:"pocket_tts_portuguese_q8_0",display_name:"PocketTTS Portuguese Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/portuguese",files:["PocketTTS-GGUF/portuguese/pocket-tts-portuguese-q8_0.gguf"],strip_prefix:"PocketTTS-GGUF/portuguese"},{id:"pocket_tts_portuguese_bf16",display_name:"PocketTTS Portuguese BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/portuguese",files:["PocketTTS-GGUF/portuguese/pocket-tts-portuguese-bf16.gguf"],strip_prefix:"PocketTTS-GGUF/portuguese"},{id:"pocket_tts_spanish_q8_0",display_name:"PocketTTS Spanish Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"PocketTTS-GGUF/spanish",files:["PocketTTS-GGUF/spanish/pocket-tts-spanish-q8_0.gguf"],strip_prefix:"PocketTTS-GGUF/spanish"},{id:"pocket_tts_spanish_bf16",display_name:"PocketTTS Spanish BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"PocketTTS-GGUF/spanish",files:["PocketTTS-GGUF/spanish/pocket-tts-spanish-bf16.gguf"],strip_prefix:"PocketTTS-GGUF/spanish"},{id:"pocket_tts_english_safetensors",display_name:"PocketTTS English Safetensors",format:"safetensors",precision:"native",target_directory:"pocket-tts",files:["languages/english/embeddings/alba.safetensors","languages/english/embeddings/anna.safetensors","languages/english/embeddings/azelma.safetensors","languages/english/embeddings/bill_boerst.safetensors","languages/english/embeddings/caro_davy.safetensors","languages/english/embeddings/charles.safetensors","languages/english/embeddings/cosette.safetensors","languages/english/embeddings/eponine.safetensors","languages/english/embeddings/estelle.safetensors","languages/english/embeddings/eve.safetensors","languages/english/embeddings/fantine.safetensors","languages/english/embeddings/george.safetensors","languages/english/embeddings/giovanni.safetensors","languages/english/embeddings/jane.safetensors","languages/english/embeddings/javert.safetensors","languages/english/embeddings/jean.safetensors","languages/english/embeddings/juergen.safetensors","languages/english/embeddings/lola.safetensors","languages/english/embeddings/marius.safetensors","languages/english/embeddings/mary.safetensors","languages/english/embeddings/michael.safetensors","languages/english/embeddings/paul.safetensors","languages/english/embeddings/peter_yearsley.safetensors","languages/english/embeddings/rafael.safetensors","languages/english/embeddings/stuart_bell.safetensors","languages/english/embeddings/vera.safetensors","languages/english/model.safetensors","languages/english/tokenizer.model"],download:{kind:"huggingface_snapshot",repo:"kyutai/pocket-tts",gated:!0}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tokenizer:"model:tokenizer.model"},optional_files:{config:"model:config.yaml"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{language:"languages/english"},files:{tokenizer:"language:tokenizer.model"},optional_files:{config:"language:config.yaml"},tensors:{weights:"language:model.safetensors"}}]},l$={schema_version:1,family:"pulsevad",display_name:"PulseVAD",description:"Speech activity detection for 16 kHz mono audio with 2.1K student and 81K teacher weights.",category:"audio_tools",status:"supported",tasks:["vad"],modes:["offline"],languages:["language_agnostic"],capabilities:{vad:["speech_segments"]},runtime:{tags:["gguf"]},options:{request:[{name:"threshold",type:"float",description:"Speech probability threshold.",required:!1,default:.5,min:0,max:1},{name:"hop_size_samples",type:"int",description:"Window step in samples; 1600 samples is 100 ms at 16 kHz.",required:!1,default:1600,min:1},{name:"min_speech_duration_ms",type:"int",description:"Minimum speech segment duration in milliseconds. Not applied to the short-input path (<3200 samples), which classifies the whole clip by threshold.",required:!1,default:100,min:0},{name:"min_silence_duration_ms",type:"int",description:"Minimum silence before closing a speech segment, in milliseconds.",required:!1,default:100,min:0}],session:[{name:"weight_type",type:"enum",description:"Weight storage override; native preserves the packaged tensor types.",values:["native","f32","f16","bf16"],required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"pulsevad_2_1k_f32",display_name:"PulseVAD 2.1K GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"PulseVAD-GGUF",files:["PulseVAD-GGUF/pulsevad-2.1k-f32.gguf"],strip_prefix:"PulseVAD-GGUF"},{id:"pulsevad_81k_f32",display_name:"PulseVAD 81K GGUF F32",format:"gguf",precision:"f32",target_directory:"PulseVAD-GGUF",files:["PulseVAD-GGUF/pulsevad-81k-f32.gguf"],strip_prefix:"PulseVAD-GGUF"}],dependencies:[],ui:{tags:["VAD","GGUF"],docs:["docs/models/pulsevad.md"],recommended_package:"pulsevad_2_1k_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},tensors:{weights:"model:pulsevad-f32.safetensors"}}]},c$={family:"qwen3_asr",display_name:"Qwen3-ASR",description:"Qwen ASR model family for language identification and speech recognition across 30 languages, 22 Chinese dialects, and multiple English accents, with robustness for noisy, long-form, and singing audio.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["zh","en","yue","ar","de","fr","es","pt","id","it","ko","ru","th","vi","ja","tr","hi","ms","nl","sv","da","fi","pl","cs","fil","fa","el","hu","mk","ro","zh dialects"],capabilities:{asr:["word_timestamps","vad_chunking","partial_results"]},options:{request:[{name:"language",type:"string",description:"Recognition language code or label. Omit to detect language automatically; Auto also selects automatic detection.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens; omitted uses the checkpoint generation_config.json (512 when absent).",required:!1,min:1},{name:"return_timestamps",type:"bool",description:"Return word-level timestamps by running Qwen3 ForcedAligner after ASR; default false and requires forced_aligner_path when enabled. Offline only; streaming rejects true even when an aligner is configured.",required:!1,default:!1},{name:"audio_chunk_mode",type:"enum",description:"Audio chunking mode; default auto uses fixed chunks normally and VAD chunks when timestamps are requested. Offline only; streaming uses fixed-duration windows regardless of this selection.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Maximum audio chunk duration in seconds; must be > 0 when chunking or streaming. Ignored with audio_chunk_mode=none offline. Default 30 for streaming and offline transcription, or 15 for offline timestamps/VAD chunking.",required:!1,min:0},{name:"clamp_timestamps_to_audio",type:"bool",description:"Opt-in guard for word timestamp output: keep repaired forced-aligner word spans inside the local audio chunk. Defaults to false to preserve existing timestamp repair behavior.",required:!1,default:!1},{name:"preserve_punctuation",type:"bool",description:"Opt-in text output mode for timestamped chunked ASR: preserve ASR punctuation in text_output instead of rebuilding text from aligned words.",required:!1,default:!1}],session:[{name:"lora",type:"path",description:"PEFT LoRA adapter directory or checkpoint file; merged into matching encoder/decoder weights at session creation.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"forced_aligner_path",type:"path",description:"Optional Qwen3 ForcedAligner model path required for return_timestamps.",required:!1},{name:"vad_model_path",type:"path",description:"Optional VAD model path for VAD chunking (any built-in VAD family); default assets/framework/models/silero_vad.",required:!1,default:"assets/framework/models/silero_vad"},{name:"weight_type",type:"enum",description:"Shared text decoder weight storage fallback; default native.",required:!1,default:"native",preset:"weight_type_full"},{name:"audio_encoder_weight_type",type:"enum",description:"Audio encoder weight storage type; default native.",required:!1,default:"native",preset:"weight_type_conv"},{name:"text_decoder_weight_type",type:"enum",description:"Text decoder matmul weight storage type; defaults to weight_type when set, otherwise native.",required:!1,preset:"weight_type_full"},{name:"audio_encoder_graph_arena_mb",type:"int",description:"Audio encoder graph arena size in MiB; default 128.",required:!1,min:1,default:128},{name:"text_decoder_prefill_graph_arena_mb",type:"int",description:"Text decoder prefill graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"text_decoder_decode_graph_arena_mb",type:"int",description:"Text decoder cached-step graph arena size in MiB; default 256.",required:!1,min:1,default:256},{name:"text_decoder_weight_context_mb",type:"int",description:"Text decoder weight context size in MiB; default 64.",required:!1,min:1,default:64}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"qwen3_asr_1_7b_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/models/qwen3_asr.md","docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"qwen3_asr_1_7b_q8_0",display_name:"Qwen3-ASR 1.7B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Qwen3-ASR-1.7B-GGUF",files:["Qwen3-ASR-1.7B-GGUF/qwen3-asr-1.7b-q8_0.gguf"],strip_prefix:"Qwen3-ASR-1.7B-GGUF"},{id:"qwen3_asr_1_7b_f16",display_name:"Qwen3-ASR 1.7B F16 GGUF",format:"gguf",precision:"f16",target_directory:"Qwen3-ASR-1.7B-GGUF",files:["Qwen3-ASR-1.7B-GGUF/qwen3-asr-1.7b-f16.gguf"],strip_prefix:"Qwen3-ASR-1.7B-GGUF"},{id:"qwen3_asr_0_6b_q8_0",display_name:"Qwen3-ASR 0.6B Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Qwen3-ASR-0.6B-GGUF",files:["Qwen3-ASR-0.6B-GGUF/qwen3-asr-0.6b-q8_0.gguf"],strip_prefix:"Qwen3-ASR-0.6B-GGUF"},{id:"qwen3_asr_0_6b_f16",display_name:"Qwen3-ASR 0.6B F16 GGUF",format:"gguf",precision:"f16",target_directory:"Qwen3-ASR-0.6B-GGUF",files:["Qwen3-ASR-0.6B-GGUF/qwen3-asr-0.6b-f16.gguf"],strip_prefix:"Qwen3-ASR-0.6B-GGUF"},{id:"qwen3_asr_1_7b_safetensors",display_name:"Qwen3-ASR 1.7B HF Safetensors",format:"safetensors",precision:"native",target_directory:"Qwen3-ASR-1.7B-hf",files:["config.json","generation_config.json","model.safetensors","processor_config.json","tokenizer_config.json","tokenizer.json"],download:{kind:"huggingface_snapshot",repo:"Qwen/Qwen3-ASR-1.7B-hf"}},{id:"qwen3_asr_0_6b_safetensors",display_name:"Qwen3-ASR 0.6B Safetensors",format:"safetensors",precision:"native",target_directory:"Qwen3-ASR-0.6B",files:["config.json","generation_config.json","model.safetensors","preprocessor_config.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"Qwen/Qwen3-ASR-0.6B"}},{id:"qwencleo_asr_q8_0",display_name:"QwenCleo-ASR Egyptian Arabic Q8_0 GGUF",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of Qwen3-ASR-1.7B from mohammedaly22/QwenCleo-ASR. Use language=Arabic.",format:"gguf",precision:"q8_0",target_directory:"QwenCleo-ASR-GGUF",files:["qwencleo-asr-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/QwenCleo-ASR-GGUF"}},{id:"qwencleo_asr_f16",display_name:"QwenCleo-ASR Egyptian Arabic F16 GGUF",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of Qwen3-ASR-1.7B from mohammedaly22/QwenCleo-ASR. Use language=Arabic.",format:"gguf",precision:"f16",target_directory:"QwenCleo-ASR-GGUF",files:["qwencleo-asr-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/QwenCleo-ASR-GGUF"}},{id:"qwencleo_asr_safetensors",display_name:"QwenCleo-ASR Egyptian Arabic Safetensors",description:"Egyptian Arabic and Arabic-English code-switching fine-tune of Qwen3-ASR-1.7B from mohammedaly22/QwenCleo-ASR. Use language=Arabic.",format:"safetensors",precision:"native",target_directory:"QwenCleo-ASR",files:["config.json","generation_config.json","model.safetensors","preprocessor_config.json","tokenizer_config.json","tokenizer.json","vocab.json","merges.txt","chat_template.json"],download:{kind:"huggingface_snapshot",repo:"mohammedaly22/QwenCleo-ASR"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},d$={family:"qwen3_forced_aligner",display_name:"Qwen3 Forced Aligner",description:"Qwen3 non-autoregressive forced aligner that aligns transcript text to speech and returns word- or character-level timestamps across 11 supported languages.",category:"speech_analysis",status:"supported",tasks:["align"],modes:["offline"],languages:["zh","en","yue","fr","de","it","ja","ko","pt","ru","es"],capabilities:{align:["word_timestamps"]},options:{request:[{name:"clamp_timestamps_to_audio",type:"bool",description:"Opt-in guard for word timestamp output: keep repaired word spans inside the local audio input. Defaults to false to preserve existing timestamp repair behavior.",required:!1,default:!1}],session:[{name:"weight_type",type:"enum",description:"Shared thinker matmul storage; does not override audio encoder storage.",required:!1,preset:"weight_type_full",default:"native"},{name:"audio_encoder_weight_type",type:"enum",description:"Audio encoder matmul storage.",required:!1,values:["native","f32","f16"],default:"native"},{name:"thinker_weight_type",type:"enum",description:"Thinker matmul storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"audio_encoder_graph_arena_mb",type:"int",description:"Audio encoder graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:128},{name:"thinker_prefill_graph_arena_mb",type:"int",description:"Thinker prefill graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:256},{name:"thinker_decode_graph_arena_mb",type:"int",description:"Thinker cached-step graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:256},{name:"thinker_weight_context_mb",type:"int",description:"Thinker weight metadata context. Size in MiB; must be positive.",required:!1,min:1,default:64}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"qwen3_forced_aligner_0_6b_q8_0",tags:["Align","GGUF"],docs:["docs/models/qwen3_forced_aligner.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"qwen3_forced_aligner_0_6b_q8_0",display_name:"Qwen3 Forced Aligner 0.6B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Qwen3-ForcedAligner-0.6B-GGUF",files:["Qwen3-ForcedAligner-0.6B-GGUF/qwen3-forced-aligner-0.6b-q8_0.gguf"],strip_prefix:"Qwen3-ForcedAligner-0.6B-GGUF"},{id:"qwen3_forced_aligner_0_6b_f16",display_name:"Qwen3 Forced Aligner 0.6B F16 GGUF",format:"gguf",precision:"f16",target_directory:"Qwen3-ForcedAligner-0.6B-GGUF",files:["Qwen3-ForcedAligner-0.6B-GGUF/qwen3-forced-aligner-0.6b-f16.gguf"],strip_prefix:"Qwen3-ForcedAligner-0.6B-GGUF"},{id:"qwen3_forced_aligner_0_6b_safetensors",display_name:"Qwen3 Forced Aligner 0.6B Safetensors",format:"safetensors",precision:"native",target_directory:"Qwen3-ForcedAligner-0.6B",files:["config.json","generation_config.json","model.safetensors","preprocessor_config.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"Qwen/Qwen3-ForcedAligner-0.6B"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{preprocessor_config:"model:preprocessor_config.json",processor_config:"model:processor_config.json",chat_template:"model:chat_template.json",chat_template_jinja:"model:chat_template.jinja",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json"},tensors:{weights:"model:model.safetensors"}}]},u$={family:"qwen3_tts",display_name:"Qwen3-TTS",description:"Qwen3-TTS for controllable 10-language synthesis, 3-second voice cloning, CustomVoice, and VoiceDesign.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["zh","en","ja","ko","de","fr","ru","pt","es","it"],capabilities:{clone:["speaker_reference"],design:["voice_design"]},options:{request:[{name:"stream_chunk_policy",type:"enum",description:"Streaming codec chunk schedule: grow starts with one frame and doubles to stream_frames_per_event; fixed uses that size throughout.",required:!1,default:"grow",values:["grow","fixed"]},{name:"stream_frames_per_event",type:"int",description:"Codec frames per fixed streaming event, or the maximum for growing events. Smaller values reduce chunk latency but increase decoding overhead.",required:!1,default:12,min:1},{name:"language",type:"string",description:"Target synthesis language code or label; default auto lets the model infer from text and voice settings.",required:!1,default:"auto"},{name:"max_tokens",type:"int",description:"Maximum generated codec frames per text chunk; omitted uses the checkpoint generation_config.json (2048 when absent).",required:!1,min:1},{name:"do_sample",type:"bool",description:"Sample the main codec stream instead of greedy decoding; default true.",required:!1,default:!0},{name:"temperature",type:"float",description:"Main codec sampling temperature; must be > 0 when do_sample=true. Ignored when do_sample=false; default 0.9.",required:!1,min:0,default:.9},{name:"top_k",type:"int",description:"Main codec top-k sampling limit; default 50, 0 disables top-k filtering.",required:!1,min:0,default:50},{name:"top_p",type:"float",description:"Main codec nucleus sampling limit; default 1.0.",required:!1,min:0,max:1,default:1},{name:"repetition_penalty",type:"float",description:"Main codec repetition penalty; must be > 0, default 1.05.",required:!1,min:0,default:1.05},{name:"subtalker_do_sample",type:"bool",description:"Enable subtalker sampling for the remaining audio codebooks instead of greedy decoding; default true.",required:!1,default:!0},{name:"subtalker_temperature",type:"float",description:"Subtalker sampling temperature; must be > 0 when subtalker_do_sample=true. Ignored when subtalker_do_sample=false; default 0.9.",required:!1,min:0,default:.9},{name:"subtalker_top_k",type:"int",description:"Subtalker top-k sampling limit; default 50, 0 disables top-k filtering.",required:!1,min:0,default:50},{name:"subtalker_top_p",type:"float",description:"Subtalker nucleus sampling limit; default 1.0.",required:!1,min:0,max:1,default:1},{name:"seed",type:"int",description:"Codec sampling seed; omitted requests choose a random seed.",required:!1,min:0,max:4294967295},{name:"reference_text",type:"string",description:"Transcript matching the reference audio for voice cloning; required unless x_vector_only_mode=true.",required:!1},{name:"x_vector_only_mode",type:"bool",description:"Use only the speaker embedding for voice cloning instead of ICL reference codec prompting; default false.",required:!1,default:!1},{name:"instruct",type:"string",description:"Optional natural-language voice or style instruction for VoiceDesign and CustomVoice variants; empty instructions are accepted.",required:!1},{name:"voice_id",type:"enum",description:"Named preset speaker from the CustomVoice checkpoint. Legacy speaker remains accepted.",values:["aiden","dylan","eric","ono_anna","ryan","serena","sohee","uncle_fu","vivian"],required:!1},{name:"text_chunk_size",type:"int",description:"Maximum UTF-8 codepoints per long-form text chunk; default 8192.",required:!1,min:1,default:8192}],session:[{name:"lora",type:"path",description:"PEFT LoRA adapter directory or checkpoint file; optional speaker_embedding and tts_config.json sidecars provide a trained custom voice.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's alpha/r scaling; default 1.",required:!1,default:1},{name:"mem_saver",type:"bool",description:"Release the talker cached-step graph after each request; default false.",required:!1,default:!1},{name:"stitch_decode",type:"bool",description:"Voice the concatenated speech codes of all text chunks in one decoder pass instead of voicing each chunk separately; default false. Per-chunk voicing re-voices the voice-clone reference once per chunk and restarts the stateful vocoder cache at every chunk boundary; the stitched pass costs device memory proportional to the utterance.",required:!1,default:!1},{name:"attention",type:"enum",description:"Attention preference; default mixed uses manual prefill and contiguous-K/V flash cached decoding in the talker and code predictor, with eager speech tokenization. auto uses the shared backend policy; eager disables flash; flash uses flash with K/V views. Explicit values override perf_mode.",values:["mixed","auto","eager","flash"],required:!1,default:"mixed"},{name:"packed_projections",type:"bool",description:"Pack QKV and gate/up projections in the talker and code predictor without changing weight dtype; default false, true with cuda_perf. Explicit values override the preset.",required:!1},{name:"kv_cache_write",type:"enum",description:"Talker and code-predictor cache writes: standard by default, optimized with cuda_perf. Optimized uses backend-friendly views and I64 indices to allow fusion where supported. Explicit values override the preset.",values:["standard","optimized"],required:!1},{name:"kv_cache_type",type:"enum",description:"Talker and code-predictor KV storage: f32 by default, f16 with cuda_perf. Explicit values override the preset. F16 reduces cache memory and may change numerical results.",values:["f32","f16"],required:!1},{name:"talker_kv_cache_alignment",type:"int",description:"Round talker KV capacity to this many rows. Defaults to 1 (no padding), or 256 with perf_mode=cuda_perf. Explicit values override the preset. Larger alignments may use more memory and change numerical results.",min:1,default:1,required:!1},{name:"stream_decoder",type:"enum",description:"GGML streaming decoder; stateful carries convolution and attention history and caches graphs for exact chunk lengths. Uses more graph memory and can change audio; default windowed preserves existing behavior.",values:["windowed","stateful"],default:"windowed",required:!1},{name:"perf_mode",type:"enum",description:"Performance preset; default off. flash_attention selects flash attention. cuda_perf also selects packed projections, optimized cache writes, f16 KV and convolution weights, stateful streaming decoding, and KV alignment 256. Explicit session options override the preset. May change audio and memory use.",values:["off","flash_attention","cuda_perf"],required:!1,default:"off"},{name:"voice_prompt_cache_slots",type:"int",description:"Voice prompt cache slots; default 1.",required:!1,min:0,default:1},{name:"weight_type",type:"enum",description:"Shared talker matmul weight storage type; default native.",required:!1,default:"native",preset:"weight_type_full"},{name:"talker_weight_type",type:"enum",description:"Talker weight storage type; defaults to weight_type when set, otherwise native.",required:!1,preset:"weight_type_full"},{name:"speech_encoder_weight_type",type:"enum",description:"Reference speech encoder matmul weight storage type; default native.",required:!1,default:"native",preset:"weight_type_full"},{name:"speech_decoder_weight_type",type:"enum",description:"Speech decoder matmul weight storage type; default native.",required:!1,default:"native",preset:"weight_type_full"},{name:"conv_weight_type",type:"enum",description:"Speech tokenizer and speaker-encoder convolution weight storage type; default f32.",required:!1,default:"f32",preset:"weight_type_conv"},{name:"exec_plan",type:"string",required:!1,default:"{}",description:"JSON object of component execution plans. Component: speech_decoder. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/rknn. GGML supports the session backend. RKNN requires artifacts.main, optionally artifacts.first for the first streaming group, and ENGINE_ENABLE_RKNN; omit backend. RKNN skips GGML decoder weights. Neither implementation takes params."},{name:"talker_graph_arena_mb",type:"int",description:"Talker graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"speech_encoder_graph_arena_mb",type:"int",description:"Reference speech encoder graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"speech_decoder_graph_arena_mb",type:"int",description:"Speech decoder graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"speaker_encoder_graph_arena_mb",type:"int",description:"Speaker encoder graph arena size in MiB; default 32.",required:!1,min:1,default:32},{name:"talker_constant_context_mb",type:"int",description:"Talker constant tensor context size in MiB; default 4.",required:!1,min:1,default:4},{name:"code_predictor_constant_context_mb",type:"int",description:"Code predictor constant tensor context size in MiB; default 4.",required:!1,min:1,default:4},{name:"speech_decoder_constant_context_mb",type:"int",description:"Speech decoder constant tensor context size in MiB; default 4.",required:!1,min:1,default:4}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"qwen3_tts_1_7b_base_q8_0",tags:["TTS","Clone","Design","GGUF"],docs:["docs/models/qwen3_tts.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"qwen3_tts_1_7b_base_q8_0",display_name:"Qwen3 TTS 12Hz 1.7B Base Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Qwen3-TTS-12Hz-1.7B-Base-GGUF",files:["Qwen3-TTS-12Hz-1.7B-Base-GGUF/qwen3-tts-12hz-1.7b-base-q8_0_v2.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-Base-GGUF"},{id:"qwen3_tts_1_7b_base_bf16",display_name:"Qwen3 TTS 12Hz 1.7B Base BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Qwen3-TTS-12Hz-1.7B-Base-GGUF",files:["Qwen3-TTS-12Hz-1.7B-Base-GGUF/qwen3-tts-12hz-1.7b-base-bf16.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-Base-GGUF"},{id:"qwen3_tts_1_7b_base_orig",display_name:"Qwen3 TTS 12Hz 1.7B Base Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"Qwen3-TTS-12Hz-1.7B-Base-GGUF",files:["Qwen3-TTS-12Hz-1.7B-Base-GGUF/qwen3-tts-12hz-1.7b-base-orig.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-Base-GGUF"},{id:"qwen3_tts_1_7b_customvoice_q8_0",display_name:"Qwen3 TTS 12Hz 1.7B CustomVoice Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF",files:["Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF/qwen3-tts-12hz-1.7b-customvoice-q8_0.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF"},{id:"qwen3_tts_1_7b_customvoice_bf16",display_name:"Qwen3 TTS 12Hz 1.7B CustomVoice BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF",files:["Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF/qwen3-tts-12hz-1.7b-customvoice-bf16.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-CustomVoice-GGUF"},{id:"qwen3_tts_1_7b_voicedesign_q8_0",display_name:"Qwen3 TTS 12Hz 1.7B VoiceDesign Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF",files:["Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF/qwen3-tts-12hz-1.7b-voicedesign-q8_0.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF"},{id:"qwen3_tts_1_7b_voicedesign_bf16",display_name:"Qwen3 TTS 12Hz 1.7B VoiceDesign BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF",files:["Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF/qwen3-tts-12hz-1.7b-voicedesign-bf16.gguf"],strip_prefix:"Qwen3-TTS-12Hz-1.7B-VoiceDesign-GGUF"},{id:"qwen3_tts_0_6b_base_q8_0",display_name:"Qwen3 TTS 12Hz 0.6B Base Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Qwen3-TTS-12Hz-0.6B-Base-GGUF",files:["Qwen3-TTS-12Hz-0.6B-Base-GGUF/qwen3-tts-12hz-0.6b-base-q8_0.gguf"],strip_prefix:"Qwen3-TTS-12Hz-0.6B-Base-GGUF"},{id:"qwen3_tts_0_6b_base_bf16",display_name:"Qwen3 TTS 12Hz 0.6B Base BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Qwen3-TTS-12Hz-0.6B-Base-GGUF",files:["Qwen3-TTS-12Hz-0.6B-Base-GGUF/qwen3-tts-12hz-0.6b-base-bf16.gguf"],strip_prefix:"Qwen3-TTS-12Hz-0.6B-Base-GGUF"},{id:"qwen3_tts_1_7b_base_safetensors",display_name:"Qwen3 TTS 12Hz 1.7B Base Safetensors",format:"safetensors",precision:"native",target_directory:"Qwen3-TTS-12Hz-1.7B-Base",files:["config.json","generation_config.json","model.safetensors","speech_tokenizer/config.json","speech_tokenizer/model.safetensors","tokenizer_config.json","vocab.json","merges.txt"],download:{kind:"huggingface_snapshot",repo:"Qwen/Qwen3-TTS-12Hz-1.7B-Base"}},{id:"qwen3_tts_0_6b_base_speech_decoder_rk3588",display_name:"Qwen3 TTS 12Hz 0.6B NPU Speech Decoder RKNN Pair (RK3588)",format:"rknn",precision:"f16",target_directory:"Qwen3-TTS-12Hz-0.6B-Base-GGUF",files:["rk3588/qwen3-tts/vocoder_stateful_16_fp16.rknn","rk3588/qwen3-tts/vocoder_stateful_64b_fp16.rknn"],strip_prefix:"rk3588/qwen3-tts",description:"Pre-compiled RK3588 engine pair (chunk 16 for the first streaming group, chunk 64 for the rest) for the qwen3_tts RKNN speech decoder (qwen3_tts.exec_plan, artifacts.main/first); installs beside the 0.6B GGUF weights and is named by bare file name. Built by tools/rknn from the Qwen3-TTS-12Hz speech tokenizer decoder; see docs/build/rockchip-npu.md.",download:{kind:"huggingface_snapshot",repo:"wOvANAI/rknn-tts-engines",revision:"main",gated:!1}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",speech_tokenizer_config:"model:speech_tokenizer/config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},speech_tokenizer_weights:{source:"weights:",prefix:"speech_tokenizer_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_config:"model:tokenizer_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",speech_tokenizer_config:"model:speech_tokenizer/config.json"},tensors:{model_weights:"model:model.safetensors",speech_tokenizer_weights:"model:speech_tokenizer/model.safetensors"}}]},f$={schema_version:1,family:"reuse",display_name:"RE-USE",description:"Sample-rate-independent speech restoration with bidirectional Mamba.",category:"audio_tools",status:"supported",tasks:["s2s"],modes:["offline"],languages:["language_agnostic"],capabilities:{s2s:["audio_enhancement"]},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_duration_sec",type:"float",description:"Chunk duration in seconds; zero processes the whole recording. When enabled, the chunk sample count must exceed sample_rate/50. Chunking changes bidirectional and normalization context. Native batching requires zero; positive chunk durations are supported only for single requests.",min:0,default:0,required:!1},{name:"audio_chunk_overlap_sec",type:"float",description:"Hann-weighted overlap in seconds, shorter than the chunk duration. Applies only to single-request chunking; native batching ignores this setting.",min:0,default:1,required:!1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; native preserves GGUF tensor types.",preset:"weight_type_full",default:"native",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/RE-USE-GGUF",revision:"main",gated:!1}},packages:[{id:"reuse_f32",display_name:"RE-USE F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"RE-USE-GGUF",files:["reuse-f32.gguf"]},{id:"reuse_f16",display_name:"RE-USE F16 GGUF",default:!1,format:"gguf",precision:"f16",target_directory:"RE-USE-GGUF",files:["reuse-f16.gguf"]},{id:"reuse_q8_0",display_name:"RE-USE Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"RE-USE-GGUF",files:["reuse-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"reuse_f32",tags:["GGUF"],docs:["docs/models/reuse.md","docs/audio_tools.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},p$={schema_version:1,family:"rvc",display_name:"RVC",description:"RVC is an offline retrieval-based voice conversion family packaged for audio.cpp with native HuBERT content features, RMVPE pitch extraction, optional IVF retrieval blending, packaged v1/v2 voices, and support for user-supplied RVC checkpoints.",category:"voice_conversion",status:"experimental",tasks:["vc"],modes:["offline"],languages:["language_agnostic"],runtime:{tags:["gguf"]},capabilities:{},options:{request:[{name:"voice_id",type:"enum",description:"Packaged RVC voice id; default selects the v2 default voice. Ignored when voice_model_path is provided.",values:["default","manthos","chocola","fraise"],required:!1,default:"default"},{name:"voice_model_path",type:"path",description:"Optional user RVC .pth or .pt voice checkpoint path. When set, this overrides the packaged voice id.",required:!1},{name:"pitch_extractor",type:"enum",description:"Pitch extraction method for F0-enabled voices; the native path currently supports rmvpe only.",values:["rmvpe"],required:!1,default:"rmvpe"},{name:"pitch_file",type:"path",description:"Optional CSV F0 override file with time,Hz rows sorted by time.",required:!1},{name:"retrieval_index_file",type:"path",description:"Optional user FAISS .index retrieval path used when retrieval_blend is greater than 0 for a user voice model.",required:!1},{name:"retrieval_blend",type:"float",description:"IVF retrieval feature blend rate; default 0 disables retrieval blending.",required:!1,min:0,max:1,default:0},{name:"semitone_shift",type:"int",description:"Semitone pitch shift applied before synthesis; default 0.",required:!1,default:0},{name:"pitch_filter_radius",type:"int",description:"Pitch median-filter switch: values >2 enable a radius-1 filter; values <=2 disable it.",required:!1,default:3},{name:"output_sample_rate",type:"int",description:"Output sample rate in Hz; default 0 keeps the selected voice model sample rate. Nonpositive values preserve the voice sample rate.",required:!1,default:0},{name:"rms_mix_rate",type:"float",description:"RMS envelope mix rate applied after conversion; default 0.25.",required:!1,default:.25},{name:"unvoiced_protection",type:"float",description:"Unvoiced consonant protection strength; must be in [0, 1], default 0.33.",required:!1,min:0,max:1,default:.33},{name:"speaker_id",type:"int",description:"Speaker embedding id for multi-speaker RVC checkpoints; default 0.",required:!1,min:0,default:0},{name:"audio_pad_duration_sec",type:"int",description:"Long-audio chunk pad duration in seconds; default 1.",required:!1,min:1,default:1},{name:"split_query_sec",type:"int",description:"Quiet-point query window in seconds for long-audio splitting; default 5.",required:!1,min:1,default:5},{name:"split_center_sec",type:"int",description:"Long-audio split center stride in seconds; default 30.",required:!1,min:1,default:30},{name:"split_threshold_sec",type:"int",description:"Input duration in seconds before quiet-point splitting is used; default 32.",required:!1,min:1,default:32}],session:[{name:"weight_type",type:"enum",description:"Tensor storage type for native RVC, HuBERT, and RMVPE weights; default f32.",preset:"weight_type_full",required:!1,default:"f32"},{name:"voice_cache_slots",type:"int",description:"User voice model cache slots; default 4, set 0 to disable caching.",required:!1,min:0,default:4}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"rvc_f16",display_name:"RVC F16 GGUF",default:!0,format:"gguf",precision:"f16",target_directory:"RVC-GGUF",files:["RVC-GGUF/rvc-f16.gguf"],strip_prefix:"RVC-GGUF"}],dependencies:[],ui:{recommended_package:"rvc_f16",tags:["VC","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{voice_v1_chocola_index:"model:voices/v1/chocola/added_IVF732_Flat_nprobe_1.index",voice_v1_fraise_index:"model:voices/v1/fraise/added_IVF802_Flat_nprobe_1.index",voice_v2_default_index:"model:voices/v2/default/added_IVF511_Flat_nprobe_1_default_v2.index",voice_v2_manthos_index:"model:voices/v2/manthos/added_IVF2586_Flat_nprobe_1_manthos_v2.index"},tensors:{support_hubert_base:{source:"weights:",prefix:"support_hubert_base"},support_rmvpe:{source:"weights:",prefix:"support_rmvpe"},voice_v1_chocola_checkpoint:{source:"weights:",prefix:"voice_v1_chocola_checkpoint"},voice_v1_chocola_index_vectors:{source:"weights:",prefix:"voice_v1_chocola_index_vectors"},voice_v1_fraise_checkpoint:{source:"weights:",prefix:"voice_v1_fraise_checkpoint"},voice_v1_fraise_index_vectors:{source:"weights:",prefix:"voice_v1_fraise_index_vectors"},voice_v2_default_checkpoint:{source:"weights:",prefix:"voice_v2_default_checkpoint"},voice_v2_default_index_vectors:{source:"weights:",prefix:"voice_v2_default_index_vectors"},voice_v2_manthos_checkpoint:{source:"weights:",prefix:"voice_v2_manthos_checkpoint"},voice_v2_manthos_index_vectors:{source:"weights:",prefix:"voice_v2_manthos_index_vectors"}}},{format:"safetensors",roots:{safetensors:"../safetensors"},files:{voice_v1_chocola_index:"safetensors:voices/v1/chocola/added_IVF732_Flat_nprobe_1.index",voice_v1_fraise_index:"safetensors:voices/v1/fraise/added_IVF802_Flat_nprobe_1.index",voice_v2_default_index:"safetensors:voices/v2/default/added_IVF511_Flat_nprobe_1_default_v2.index",voice_v2_manthos_index:"safetensors:voices/v2/manthos/added_IVF2586_Flat_nprobe_1_manthos_v2.index"},tensors:{support_hubert_base:"safetensors:support/hubert_base.safetensors",support_rmvpe:"safetensors:support/rmvpe.safetensors",voice_v1_chocola_checkpoint:"safetensors:voices/v1/chocola/chocola2333333.safetensors",voice_v1_chocola_index_vectors:"safetensors:voices/v1/chocola/added_IVF732_Flat_nprobe_1.ivf.safetensors",voice_v1_fraise_checkpoint:"safetensors:voices/v1/fraise/fraise2333333.safetensors",voice_v1_fraise_index_vectors:"safetensors:voices/v1/fraise/added_IVF802_Flat_nprobe_1.ivf.safetensors",voice_v2_default_checkpoint:"safetensors:voices/v2/default/default.safetensors",voice_v2_default_index_vectors:"safetensors:voices/v2/default/added_IVF511_Flat_nprobe_1_default_v2.ivf.safetensors",voice_v2_manthos_checkpoint:"safetensors:voices/v2/manthos/manthos.safetensors",voice_v2_manthos_index_vectors:"safetensors:voices/v2/manthos/added_IVF2586_Flat_nprobe_1_manthos_v2.ivf.safetensors"}}]},m$={schema_version:1,family:"sam_audio",display_name:"SAM Audio",description:"Prompt-conditioned audio separation.",category:"audio_tools",status:"supported",tasks:["s2s"],modes:["offline"],languages:["language_agnostic"],capabilities:{},runtime:{tags:["gguf"]},options:{request:[{name:"reference_video_file",type:"path",description:"Masked video identifying the target source; frames are matched to audio by nearest timestamp. Requires libav runtime libraries. Mutually exclusive with reference_image_file.",required:!1},{name:"reference_image_file",type:"path",description:"Masked RGB image identifying the target sound source, used as a constant visual prompt throughout the recording. Mask unwanted regions before supplying the image.",required:!1},{name:"anchors",type:"string",description:'Optional JSON array of time spans: [["+", start_seconds, end_seconds], ["-", start_seconds, end_seconds]]. Positive spans identify the target; negative spans identify sounds to exclude.',required:!1},{name:"seed",type:"int",description:"Random seed; -1 selects a random seed.",min:-1,max:4294967295,default:42,required:!1},{name:"num_inference_steps",type:"int",description:"Midpoint integration steps; each step evaluates the denoiser twice.",min:1,default:16,required:!1}],session:[{name:"memory_bounded",type:"bool",description:"Experimental bounded-workspace execution with full recording context. Provisional option name.",default:!1,required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/SAM-Audio-GGUF",revision:"main",gated:!1}},packages:[{id:"sam_audio_small_f32",display_name:"SAM Audio Small F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"SAM-Audio-GGUF",files:["sam-audio-small-f32.gguf"]},{id:"sam_audio_small_bf16",display_name:"SAM Audio Small BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"SAM-Audio-GGUF",files:["sam-audio-small-bf16.gguf"]},{id:"sam_audio_small_q8_0",display_name:"SAM Audio Small Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"SAM-Audio-GGUF",files:["sam-audio-small-q8_0.gguf"]},{id:"sam_audio_base_f32",display_name:"SAM Audio Base F32 GGUF",format:"gguf",precision:"f32",target_directory:"SAM-Audio-GGUF",files:["sam-audio-base-f32.gguf"]},{id:"sam_audio_base_bf16",display_name:"SAM Audio Base BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"SAM-Audio-GGUF",files:["sam-audio-base-bf16.gguf"]},{id:"sam_audio_base_q8_0",display_name:"SAM Audio Base Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"SAM-Audio-GGUF",files:["sam-audio-base-q8_0.gguf"]},{id:"sam_audio_large_f32",display_name:"SAM Audio Large F32 GGUF",format:"gguf",precision:"f32",target_directory:"SAM-Audio-GGUF",files:["sam-audio-large-f32.gguf"]},{id:"sam_audio_large_bf16",display_name:"SAM Audio Large BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"SAM-Audio-GGUF",files:["sam-audio-large-bf16.gguf"]},{id:"sam_audio_large_q8_0",display_name:"SAM Audio Large Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"SAM-Audio-GGUF",files:["sam-audio-large-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"sam_audio_small_f32",tags:["GGUF"],docs:["docs/models/sam_audio.md","docs/audio_tools.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",t5_config:"model:t5_config.json",tokenizer:"model:tokenizer/spiece.model"},tensors:{weights:{source:"weights:"}}}]},g$={schema_version:1,family:"samsone",display_name:"SAMSONE",description:"Compact audio-language models for audio captioning, question answering, and sound, music, and speech understanding.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["en"],capabilities:{},runtime:{tags:["gguf"]},options:{request:[{name:"instruct",type:"string",default:"describe the audio",required:!1,description:"Question or instruction about the input audio."},{name:"max_tokens",type:"int",min:1,default:100,required:!1,description:"Maximum response tokens. Must be positive; audio/prompt tokens plus this budget must fit checkpoint max_position_embeddings."}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"samsone_99m_bf16",display_name:"SAMSONE 99M GGUF BF16",default:!0,format:"gguf",precision:"bf16",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-99m-bf16.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_99m_q8_0",display_name:"SAMSONE 99M GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-99m-q8_0.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_134m_bf16",display_name:"SAMSONE 134M GGUF BF16",format:"gguf",precision:"bf16",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-134m-bf16.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_134m_q8_0",display_name:"SAMSONE 134M GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-134m-q8_0.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_356m_bf16",display_name:"SAMSONE 356M GGUF BF16",format:"gguf",precision:"bf16",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-356m-bf16.gguf"],strip_prefix:"Samsone-GGUF"},{id:"samsone_356m_q8_0",display_name:"SAMSONE 356M GGUF Q8_0",format:"gguf",precision:"q8_0",target_directory:"Samsone-GGUF",files:["Samsone-GGUF/samsone-356m-q8_0.gguf"],strip_prefix:"Samsone-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/samsone.md"],recommended_package:"samsone_99m_bf16"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",token_map:"model:token_map.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},h$={schema_version:1,family:"sanotts",display_name:"sanoTTS Nano",description:"Very small multilingual text-to-speech across fourteen languages. Two graphs: the nano lineage (duration student, contextual acoustic student to mel-100, noise-fed ConvNeXt-1D decoder with an iSTFT head; voices heart 2.27M and heart-nano 294k, English, 24 kHz) and the deterministic piperlite lineage (duration student, acoustic student to a 192-channel latent, optionally through a calibration adapter, then a 3-stage ConvTranspose1d decoder with dilated residual banks; voices amy, hfc and kristin for English, vi, id, cs, de, es, fr, it, pt, ro, ru, tr, ne and hi at 1.1-1.8M parameters, 22.05 kHz). Uses an external eSpeak-ng phonemizer.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en","vi","id","cs","de","es","fr","it","pt","ro","ru","tr","ne","hi"],runtime:{tags:["gguf"]},capabilities:{tts:["long_form"]},options:{request:[{name:"speed",type:"float",description:"Speech speed multiplier; larger is faster. Its reciprocal scales the voice's tuned length scale before the per-token clamp.",required:!1,min:.5,max:2,default:1},{name:"seed",type:"int",description:"Decoder noise seed. The decoder is noise-fed, so a given seed picks one of many valid renderings; 0 derives it from the text as sha256(text)[:8], which is what the reference implementations do. Piperlite voices are deterministic and ignore the seed.",required:!1,min:0,default:0},{name:"text_chunk_mode",type:"enum",description:"Long-form text chunking mode.",values:["word_budget"],required:!1,default:"word_budget"},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per long-form text chunk; default 280.",required:!1,min:1,default:280}],session:[{name:"espeak_library_path",type:"path",description:"Optional explicit path to the eSpeak-ng shared library.",required:!1},{name:"espeak_data_path",type:"path",description:"Optional explicit path to the directory containing espeak-ng-data.",required:!1},{name:"exec_plan",type:"string",description:"JSON object of component execution plans. Component: decoder. Each plan accepts impl, backend, artifacts, and params. impl is default/ggml/neon; no artifacts or params are used. Default retains automatic NEON selection on supported Nano-lineage AArch64 CPU sessions. GGML supports the session backend; explicit NEON requires a Nano-lineage model, AArch64 NEON, and a CPU session.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"ampixa/sanoTTS",revision:"main",gated:!1}},packages:[{id:"sanotts_heart_nano_orig",display_name:"sanoTTS heart-nano 294k FP32 GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"sanoTTS-heart-nano-GGUF",files:["gguf/heart-nano-f32.gguf","gguf/config.json"],strip_prefix:"gguf"},{id:"sanotts_heart_orig",display_name:"sanoTTS heart 2.27M FP32 GGUF",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-heart-GGUF",files:["gguf/heart/heart-f32.gguf","gguf/heart/config.json"],strip_prefix:"gguf/heart"},{id:"sanotts_amy_orig",display_name:"sanoTTS amy 1.46M FP32 GGUF (English, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-amy-GGUF",files:["gguf/amy/amy-f32.gguf","gguf/amy/config.json"],strip_prefix:"gguf/amy"},{id:"sanotts_hfc_orig",display_name:"sanoTTS hfc 1.83M FP32 GGUF (English, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-hfc-GGUF",files:["gguf/hfc/hfc-f32.gguf","gguf/hfc/config.json"],strip_prefix:"gguf/hfc"},{id:"sanotts_kristin_orig",display_name:"sanoTTS kristin 1.40M FP32 GGUF (English, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-kristin-GGUF",files:["gguf/kristin/kristin-f32.gguf","gguf/kristin/config.json"],strip_prefix:"gguf/kristin"},{id:"sanotts_vi_orig",display_name:"sanoTTS vi 1.57M FP32 GGUF (Vietnamese, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-vi-GGUF",files:["gguf/vi/vi-f32.gguf","gguf/vi/config.json"],strip_prefix:"gguf/vi"},{id:"sanotts_id_orig",display_name:"sanoTTS id 1.56M FP32 GGUF (Indonesian, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-id-GGUF",files:["gguf/id/id-f32.gguf","gguf/id/config.json"],strip_prefix:"gguf/id"},{id:"sanotts_cs_orig",display_name:"sanoTTS cs 1.57M FP32 GGUF (Czech, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-cs-GGUF",files:["gguf/cs/cs-f32.gguf","gguf/cs/config.json"],strip_prefix:"gguf/cs"},{id:"sanotts_de_orig",display_name:"sanoTTS de 1.57M FP32 GGUF (German, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-de-GGUF",files:["gguf/de/de-f32.gguf","gguf/de/config.json"],strip_prefix:"gguf/de"},{id:"sanotts_es_orig",display_name:"sanoTTS es 1.56M FP32 GGUF (Spanish, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-es-GGUF",files:["gguf/es/es-f32.gguf","gguf/es/config.json"],strip_prefix:"gguf/es"},{id:"sanotts_fr_orig",display_name:"sanoTTS fr 1.57M FP32 GGUF (French, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-fr-GGUF",files:["gguf/fr/fr-f32.gguf","gguf/fr/config.json"],strip_prefix:"gguf/fr"},{id:"sanotts_it_orig",display_name:"sanoTTS it 1.57M FP32 GGUF (Italian, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-it-GGUF",files:["gguf/it/it-f32.gguf","gguf/it/config.json"],strip_prefix:"gguf/it"},{id:"sanotts_pt_orig",display_name:"sanoTTS pt 1.57M FP32 GGUF (Portuguese (Brazil), piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-pt-GGUF",files:["gguf/pt/pt-f32.gguf","gguf/pt/config.json"],strip_prefix:"gguf/pt"},{id:"sanotts_ro_orig",display_name:"sanoTTS ro 1.57M FP32 GGUF (Romanian, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-ro-GGUF",files:["gguf/ro/ro-f32.gguf","gguf/ro/config.json"],strip_prefix:"gguf/ro"},{id:"sanotts_ru_orig",display_name:"sanoTTS ru 1.57M FP32 GGUF (Russian, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-ru-GGUF",files:["gguf/ru/ru-f32.gguf","gguf/ru/config.json"],strip_prefix:"gguf/ru"},{id:"sanotts_tr_orig",display_name:"sanoTTS tr 1.56M FP32 GGUF (Turkish, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-tr-GGUF",files:["gguf/tr/tr-f32.gguf","gguf/tr/config.json"],strip_prefix:"gguf/tr"},{id:"sanotts_ne_orig",display_name:"sanoTTS ne 1.47M FP32 GGUF (Nepali, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-ne-GGUF",files:["gguf/ne/ne-f32.gguf","gguf/ne/config.json"],strip_prefix:"gguf/ne"},{id:"sanotts_hi_orig",display_name:"sanoTTS hi 1.50M FP32 GGUF (Hindi, piperlite)",default:!1,format:"gguf",precision:"orig",target_directory:"sanoTTS-hi-GGUF",files:["gguf/hi/hi-f32.gguf","gguf/hi/config.json"],strip_prefix:"gguf/hi"}],dependencies:[],ui:{recommended_package:"sanotts_heart_nano_orig",tags:["TTS","GGUF"],docs:["docs/tts.md","docs/models/sanotts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}}]},_$={family:"seed_vc",schema_version:1,display_name:"Seed-VC",description:"Zero-shot voice conversion and singing voice conversion model for transferring timbre and style from reference audio, with low-latency realtime conversion and optional lightweight fine-tuning.",category:"voice_conversion",status:"supported",tasks:["vc","svc"],modes:["offline"],languages:["language_agnostic"],capabilities:{vc:["speaker_reference"],svc:["speaker_reference","singing"]},dependencies:[],runtime:{tags:["gguf"]},ui:{recommended_package:"seed_vc_mlx_q8_0",tags:["VC","GGUF"],docs:["docs/models/seed_vc.md","docs/audio_tools.md","docs/gguf.md"]},options:{request:[{name:"route",type:"enum",description:"Select the Seed-VC conversion route. Defaults to v2_vc for VC and v1_svc for SVC.",values:["v2_vc","v1_svc","v1_whisper_bigvgan_vc","v1_xlsr_hift_vc"],required:!1},{name:"duration_scale",type:"float",description:"V1 output duration multiplier; must be finite and positive, default 1.0. V2 validates this option but does not apply it.",required:!1,min:0,default:1},{name:"num_inference_steps",type:"int",description:"Diffusion steps; default 30.",required:!1,min:1,default:30},{name:"inference_guidance_scale",type:"float",description:"V1 classifier-free guidance scale; default 0.7. Any finite value is accepted; V1 disables CFG for nonpositive values.",required:!1,default:.7},{name:"intelligibility_guidance_scale",type:"float",description:"V2 classifier-free guidance scale for source-content intelligibility; default 0.7. Any finite value is accepted and used in V2 guidance arithmetic.",required:!1,default:.7},{name:"similarity_guidance_scale",type:"float",description:"V2 classifier-free guidance scale for target-speaker similarity; default 0.7. Any finite value is accepted and used in V2 guidance arithmetic.",required:!1,default:.7},{name:"voice_anonymization",type:"bool",description:"Use randomized average-voice conditioning instead of target-speaker conditioning for V2 anonymization; default false.",required:!1,default:!1},{name:"seed",type:"int",description:"Seed for V1/V2 diffusion noise and HiFT stochastic source excitation; omitted requests choose a random seed.",required:!1,min:0},{name:"noise_file",type:"path",description:"Optional raw f32 noise file for deterministic V1/V2 diffusion noise and XLSR/HiFT source excitation.",required:!1},{name:"f0_condition",type:"bool",description:"Enable V1 F0 conditioning. Defaults to true for v1_svc and false for the V1 voice-conversion routes.",required:!1},{name:"auto_f0_adjust",type:"bool",description:"Automatically adjust V1 source pitch toward the target pitch level; default false.",required:!1,default:!1},{name:"semitone_shift",type:"int",description:"V1 pitch shift in semitones for singing voice conversion; default 0.",required:!1,default:0}],session:[{name:"weight_type",type:"enum",description:"Shared Seed-VC component weight storage type; default native, except RMVPE uses f32 unless overridden.",preset:"weight_type_full",required:!1,default:"native"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"seed_vc_mlx_q8_0",display_name:"SeedVC-MLX Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"SeedVC-MLX-GGUF",files:["SeedVC-MLX-GGUF/seed-vc-mlx-q8_0.gguf"],strip_prefix:"SeedVC-MLX-GGUF"},{id:"seed_vc_mlx_f16",display_name:"SeedVC-MLX F16 GGUF",format:"gguf",precision:"f16",target_directory:"SeedVC-MLX-GGUF",files:["SeedVC-MLX-GGUF/seed-vc-mlx-f16.gguf"],strip_prefix:"SeedVC-MLX-GGUF"},{id:"seed_vc_mlx_orig",display_name:"SeedVC-MLX Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"SeedVC-MLX-GGUF",files:["SeedVC-MLX-GGUF/seed-vc-mlx-orig.gguf"],strip_prefix:"SeedVC-MLX-GGUF"},{id:"seed_vc_mlx_safetensors",display_name:"SeedVC-MLX Safetensors",format:"safetensors",precision:"native",target_directory:"SeedVC-MLX",files:["seed_vc_manifest.json","v2/ar.safetensors","v2/cfm.safetensors","v2/vc_wrapper.json","astral/bsq32.json","astral/bsq2048.json","v1/svc.json","v1/whisper_bigvgan.json","v1/xlsr_hift.json","hift/config.json","bigvgan/v2_22khz_80band_256x/config.json","bigvgan/v2_44khz_128band_512x/config.json","whisper-small/config.json","hubert-large-ll60k/config.json","wav2vec2-xls-r-300m/config.json","v1/svc.safetensors","v1/whisper_bigvgan.safetensors","v1/xlsr_hift.safetensors","astral/bsq32.safetensors","astral/bsq2048.safetensors","campplus/model.safetensors","rmvpe/model.safetensors","hift/model.safetensors","bigvgan/v2_22khz_80band_256x/model.safetensors","bigvgan/v2_44khz_128band_512x/model.safetensors","whisper-small/model.safetensors","hubert-large-ll60k/model.safetensors","wav2vec2-xls-r-300m/model.safetensors"],download:{kind:"huggingface_snapshot",repo:"mlx-community/SeedVC-MLX"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{manifest:"model:seed_vc_manifest.json",v2_wrapper_config:"model:v2/vc_wrapper.json",astral_bsq32_config:"model:astral/bsq32.json",astral_bsq2048_config:"model:astral/bsq2048.json",v1_svc_config:"model:v1/svc.json",v1_whisper_bigvgan_config:"model:v1/whisper_bigvgan.json",v1_xlsr_hift_config:"model:v1/xlsr_hift.json",hift_config:"model:hift/config.json",bigvgan_22k_config:"model:bigvgan/v2_22khz_80band_256x/config.json",bigvgan_44k_config:"model:bigvgan/v2_44khz_128band_512x/config.json",whisper_small_config:"model:whisper-small/config.json",hubert_large_config:"model:hubert-large-ll60k/config.json",wav2vec2_xlsr_config:"model:wav2vec2-xls-r-300m/config.json"},tensors:{v2_ar_weights:{source:"weights:",prefix:"v2_ar_weights"},v2_cfm_weights:{source:"weights:",prefix:"v2_cfm_weights"},v1_svc_weights:{source:"weights:",prefix:"v1_svc_weights"},v1_whisper_bigvgan_weights:{source:"weights:",prefix:"v1_whisper_bigvgan_weights"},v1_xlsr_hift_weights:{source:"weights:",prefix:"v1_xlsr_hift_weights"},astral_bsq32_weights:{source:"weights:",prefix:"astral_bsq32_weights"},astral_bsq2048_weights:{source:"weights:",prefix:"astral_bsq2048_weights"},campplus_weights:{source:"weights:",prefix:"campplus_weights"},rmvpe_weights:{source:"weights:",prefix:"rmvpe_weights"},hift_weights:{source:"weights:",prefix:"hift_weights"},bigvgan_22k_weights:{source:"weights:",prefix:"bigvgan_22k_weights"},bigvgan_44k_weights:{source:"weights:",prefix:"bigvgan_44k_weights"},whisper_small_weights:{source:"weights:",prefix:"whisper_small_weights"},hubert_large_weights:{source:"weights:",prefix:"hubert_large_weights"},wav2vec2_xlsr_weights:{source:"weights:",prefix:"wav2vec2_xlsr_weights"}}},{format:"safetensors",roots:{model:"."},files:{manifest:"model:seed_vc_manifest.json",v2_wrapper_config:"model:v2/vc_wrapper.json",astral_bsq32_config:"model:astral/bsq32.json",astral_bsq2048_config:"model:astral/bsq2048.json",v1_svc_config:"model:v1/svc.json",v1_whisper_bigvgan_config:"model:v1/whisper_bigvgan.json",v1_xlsr_hift_config:"model:v1/xlsr_hift.json",hift_config:"model:hift/config.json",bigvgan_22k_config:"model:bigvgan/v2_22khz_80band_256x/config.json",bigvgan_44k_config:"model:bigvgan/v2_44khz_128band_512x/config.json",whisper_small_config:"model:whisper-small/config.json",hubert_large_config:"model:hubert-large-ll60k/config.json",wav2vec2_xlsr_config:"model:wav2vec2-xls-r-300m/config.json"},tensors:{v2_ar_weights:"model:v2/ar.safetensors",v2_cfm_weights:"model:v2/cfm.safetensors",v1_svc_weights:"model:v1/svc.safetensors",v1_whisper_bigvgan_weights:"model:v1/whisper_bigvgan.safetensors",v1_xlsr_hift_weights:"model:v1/xlsr_hift.safetensors",astral_bsq32_weights:"model:astral/bsq32.safetensors",astral_bsq2048_weights:"model:astral/bsq2048.safetensors",campplus_weights:"model:campplus/model.safetensors",rmvpe_weights:"model:rmvpe/model.safetensors",hift_weights:"model:hift/model.safetensors",bigvgan_22k_weights:"model:bigvgan/v2_22khz_80band_256x/model.safetensors",bigvgan_44k_weights:"model:bigvgan/v2_44khz_128band_512x/model.safetensors",whisper_small_weights:"model:whisper-small/model.safetensors",hubert_large_weights:"model:hubert-large-ll60k/model.safetensors",wav2vec2_xlsr_weights:"model:wav2vec2-xls-r-300m/model.safetensors"}}]},v$={schema_version:1,family:"sense_asr",display_name:"SenseVoice-Small",description:"SenseVoice-Small multilingual speech recognition with rich event/emotion/ITN tags via a SAN-M encoder and CTC head, ported to audio.cpp.",category:"asr",status:"community",tasks:["asr"],modes:["offline","streaming"],languages:["auto","zh","en","yue","ja","ko","pt","ru","es","it","fr","de","nl","pl","tr","ar","hi","vi","th","id","ms","fa","nospeech"],capabilities:{asr:["vad_chunking","partial_results"]},options:{request:[{name:"language",type:"string",description:"Recognition language, or auto to let the model infer it from the audio.",required:!1,default:"auto"},{name:"enable_itn",type:"bool",description:"Enable inverse text normalization (adds the withitn query token).",required:!1,default:!0},{name:"keep_tags",type:"bool",description:"Keep <|event|>/<|emotion|>/<|language|> tags inline in the output text.",required:!1,default:!1},{name:"audio_chunk_mode",type:"enum",description:"Offline chunk mode: auto, fixed, vad, or none. Streaming always uses fixed-duration windows.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Positive duration rounding to at least one sample; sets fixed windows and the VAD maximum chunk length.",required:!1,default:30}],session:[{name:"weight_type",type:"enum",description:"Shared model weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"encoder_graph_arena_mb",type:"int",description:"Encoder graph arena size in MB.",required:!1,min:1,default:1024},{name:"vad_model_path",type:"string",description:"Path to the VAD model (any built-in VAD family; default Silero VAD) used by automatic audio chunking.",required:!1,default:"assets/framework/models/silero_vad"}],load:[]},runtime:{tags:["gguf","server","stream","cuda","metal","cpu"]},packages:[{id:"sensevoice_small_q8",display_name:"SenseVoice-Small Q8 GGUF",description:"audio.cpp GGUF built from the SenseVoice-Small checkpoint via the SenseVoice llama.cpp export script.",default:!0,format:"gguf",precision:"q8_0",target_directory:"SenseVoice-Small-GGUF",files:["sensevoice-small-q8-audiocpp-v1.gguf"],download:{kind:"huggingface_snapshot",repo:"FunAudioLLM/SenseVoiceSmall-GGUF-audiocpp",revision:"5c3fcfe748a8714216bc135476d5863084fddb72",gated:!1}}],dependencies:[],ui:{recommended_package:"sensevoice_small_q8",tags:["ASR","GGUF","Stream"],docs:["docs/models/sense_asr.md"],summary:"SenseVoice-Small transcription with event/emotion tags and ITN."},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{},optional_files:{},tensors:{weights:"weights:"}}]},b$={schema_version:1,family:"sheetsage2",display_name:"SheetSage2",description:"SheetSage2 audio-to-symbolic transcription. This native path consumes an input recording from a self-contained GGUF and emits an ABC score artifact.",category:"audio_tools",status:"supported",tasks:["midi"],modes:["offline"],languages:["music"],runtime:{tags:["gguf","cuda"]},capabilities:{midi:["midi_artifact"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum total decoder sequence length; default follows the embedded model context. Omitted uses checkpoint max_output_seq_len.",required:!1,min:1}],session:[{name:"attention_tile_rows",type:"int",description:"Query rows per encoder attention tile on any backend; 0 disables tiling. Use 1024 to bound each score tensor below 512 MiB for the 300-second window.",required:!1,min:0,default:0},{name:"weight_type",type:"enum",description:"Encoder and decoder weight storage override.",required:!1,default:"native",values:["native","f32","f16","bf16","q4_0","q4_k"]},{name:"weight_context_mb",type:"int",description:"Weight context arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"decoder_graph_arena_mb",type:"int",description:"Encoder/decoder graph arena size in MiB; default 1536.",required:!1,min:1,default:1536}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/SheetSage2-GGUF",revision:"main",gated:!1}},packages:[{id:"sheetsage2_orig",display_name:"SheetSage2 Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"SheetSage2-GGUF",files:["sheetsage2-orig.gguf"]}],dependencies:[],ui:{recommended_package:"sheetsage2_orig",tags:["Music","MIDI","GGUF"],docs:[]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:"weights:"}}]},y$={schema_version:1,family:"sherpa_kws",display_name:"sherpa-onnx Zipformer KWS",description:"Streaming Zipformer transducer keyword spotting from sherpa-onnx model exports.",category:"audio_tools",status:"experimental",tasks:["wake_word"],modes:["offline","streaming"],languages:["model_dependent"],capabilities:{wake_word:["speech_segments","stream_events"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"keywords",type:"string",description:"Newline- or slash-separated tokenized keyword rows; each row may include :score, #threshold, and @label fields.",required:!1},{name:"max_active_paths",type:"int",description:"Maximum keyword decoder hypotheses.",required:!1,default:4,min:1,max:64},{name:"keywords_score",type:"float",description:"Default context score added for each matched keyword token. Negative values are accepted but token scores are clamped to at least zero.",required:!1,default:1},{name:"keywords_threshold",type:"float",description:"Default mean acoustic probability required to trigger a keyword.",required:!1,default:.25,min:0,max:1},{name:"num_trailing_blanks",type:"int",description:"Emit after strictly more than this many trailing blank frames; 1 requires 2 blanks, 0 requires 1.",required:!1,default:1,min:0}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"sherpa_kws_zipformer_zh_en_3m_f32",display_name:"Sherpa KWS Zipformer Chinese-English 3M GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"Sherpa-KWS-GGUF",files:["Sherpa-KWS-GGUF/sherpa-kws-zipformer-zh-en-3m-f32.gguf"],strip_prefix:"Sherpa-KWS-GGUF"}],dependencies:[],ui:{tags:["Wake Word","GGUF","Stream"],docs:["docs/models/sherpa_kws.md"],recommended_package:"sherpa_kws_zipformer_zh_en_3m_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokens:"model:tokens.txt",keywords:"model:keywords.txt"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokens:"model:tokens.txt",keywords:"model:keywords.txt"},tensors:{weights:"model:model.safetensors"}}]},w$={schema_version:1,family:"sidon",display_name:"Sidon v0.1",description:"Single-speaker speech restoration with 48 kHz output.",category:"audio_tools",status:"supported",tasks:["s2s"],modes:["offline"],languages:["language_agnostic"],capabilities:{s2s:["audio_enhancement"]},runtime:{tags:["gguf"]},options:{request:[],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"sidon_f32",display_name:"Sidon v0.1 F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"Sidon-GGUF",files:["Sidon-GGUF/sidon-v0.1-f32.gguf"],strip_prefix:"Sidon-GGUF"}],dependencies:[],ui:{recommended_package:"sidon_f32",tags:["GGUF"],docs:["docs/models/sidon.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},k$={schema_version:1,family:"smart_turn",display_name:"Smart Turn v3.2",description:"Audio-native conversational turn-completion detection using a Whisper-Tiny encoder and attention-pooling classifier.",category:"audio_tools",status:"supported",tasks:["turn"],modes:["offline"],languages:["auto"],capabilities:{turn:["turn_decision"]},runtime:{tags:["gguf"]},options:{request:[{name:"threshold",type:"float",description:"Completion probability threshold; a decision is complete only when probability exceeds this value.",required:!1,default:.5,min:0,max:1}],session:[],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"smart_turn_v3_2_f32",display_name:"Smart Turn v3.2 F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"Smart-Turn-v3-GGUF",files:["Smart-Turn-v3-GGUF/smart-turn-v3.2-f32.gguf"],strip_prefix:"Smart-Turn-v3-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/smart_turn.md"],recommended_package:"smart_turn_v3_2_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},x$={schema_version:1,family:"soprano_tts",display_name:"Soprano",description:"Soprano is an ultra-lightweight (~80M) English-only text-to-speech model. Syntax uses a 17-layer Qwen3-style causal LM (hidden 512, vocab 8192) that autoregressively emits per-frame 512-dimensional features; a non-iterative Vocos-style decoder (ConvNeXt backbone + single ISTFT head, n_fft 2048 / hop 512) turns those features into 32 kHz audio. No diffusion refinement is performed in the decoder.",category:"tts",status:"community",tasks:["tts"],modes:["offline","streaming"],languages:["en"],runtime:{tags:["gguf","stream"]},capabilities:{tts:["long_form"]},options:{request:[{name:"max_tokens",type:"int",description:"Maximum generated audio frames for the autoregressive LM; default 512.",required:!1,min:1,default:512},{name:"temperature",type:"float",description:"Autoregressive sampling temperature; must be > 0, default 0.3.",required:!1,min:0,default:.3},{name:"top_p",type:"float",description:"Nucleus sampling probability; default 0.95. Values >=1 disable nucleus filtering.",required:!1,min:0,default:.95},{name:"repetition_penalty",type:"float",description:"Repetition penalty applied to the LM head; default 1.2. Must be positive; values below 1 are accepted.",required:!1,default:1.2},{name:"eos_bias",type:"float",description:"Additive bias on the EOS token logit during generation. Positive values make the model stop sooner when speech ends (mitigating runaway generations that hit max_tokens); negative values encourage longer utterances. Default 0 disables the adjustment.",required:!1,default:0},{name:"seed",type:"int",description:"Autoregressive sampling seed; omitted requests choose a random seed.",required:!1,min:0}],session:[{name:"text_chunk_size",type:"int",description:"Maximum codepoints per sentence chunk before the model generates and decodes separately. Smaller values keep prompts short (more reliable EOS) but increase overhead. Default 200.",required:!1,min:1,default:200},{name:"backbone_weight_type",type:"enum",preset:"weight_type_full",required:!1,default:"f32",description:"Storage type for the Qwen3 LM backbone weights."},{name:"decoder_weight_type",type:"enum",preset:"weight_type_conv",required:!1,default:"f32",description:"Storage type for the Vocos decoder weights."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"WalkingCat/Soprano-1.1-80M-GGUF",revision:"main",gated:!1}},packages:[{id:"soprano_1_1_80m_q8_0",display_name:"Soprano-1.1-80M Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Soprano-1.1-80M-GGUF",files:["Soprano-1.1-80M-GGUF/soprano-1.1-80m-q8_0.gguf"],strip_prefix:"Soprano-1.1-80M-GGUF"},{id:"soprano_1_1_80m_bf16",display_name:"Soprano-1.1-80M BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Soprano-1.1-80M-GGUF",files:["Soprano-1.1-80M-GGUF/soprano-1.1-80m-bf16.gguf"],strip_prefix:"Soprano-1.1-80M-GGUF"}],dependencies:[],ui:{recommended_package:"soprano_1_1_80m_q8_0",tags:["TTS","Stream"],docs:["docs/models/soprano_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{backbone:"weights:",decoder:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",tokenizer_json:"model:tokenizer.json"},tensors:{backbone:"model:combined.safetensors",decoder:"model:combined.safetensors"}}]},S$={schema_version:1,family:"sopro_tts",display_name:"Sopro V2 Turbo",description:"Community Sopro V2 Turbo (samuel-vitorino/sopro-v2-turbo): a 120M zero-shot voice-cloning TTS. SentencePiece text tokenizer, style-prefix conditioned autoregressive semantic LM over FSQ tokens, rectified-flow acoustic DiT and a Vocos ISTFT vocoder at 24 kHz.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline","streaming"],languages:["en","pt","fr","de"],runtime:{tags:["server"]},capabilities:{clone:["speaker_reference"]},options:{request:[{name:"language",type:"string",description:"Language tag (en, pt, fr, de); omitted inherits transcript language, then the session default.",required:!1},{name:"temperature",type:"float",description:"Semantic sampling temperature; nonpositive selects greedy decoding. Omitted uses checkpoint generation.temperature.",required:!1},{name:"top_p",type:"float",description:"Semantic nucleus cutoff; values outside [0,1] are disabled/clamped by the sampler. Omitted uses checkpoint generation.top_p.",required:!1},{name:"top_k",type:"int",description:"Semantic top-k; nonpositive disables filtering. Omitted uses checkpoint generation.top_k.",required:!1},{name:"num_inference_steps",type:"int",description:"Positive acoustic sampling steps; omitted uses checkpoint generation.steps.",required:!1,min:1},{name:"max_duration_sec",type:"float",description:"Positive maximum segment duration; must be >= min_duration_sec. Omitted uses checkpoint generation.max_seconds.",required:!1},{name:"min_duration_sec",type:"float",description:"Nonnegative minimum duration; must be <= max_duration_sec. Omitted uses checkpoint generation.min_seconds.",required:!1,min:0},{name:"reference_duration_sec",type:"float",description:"Positive reference window in seconds; omitted uses checkpoint generation.ref_seconds.",required:!1},{name:"text_chunk_size",type:"int",description:"Positive codepoint budget per segment; omitted uses checkpoint generation.max_segment_chars.",required:!1,min:1},{name:"seed",type:"int",description:"Non-negative seed for semantic sampling and the acoustic noise prior; omit for a random seed.",required:!1,min:0}],session:[{name:"language",type:"string",description:"Default language tag for requests that do not set one.",required:!1,default:""},{name:"voice_cache_slots",type:"int",description:"Reference voices kept prepared between requests, so a repeated voice skips the encoders and, when streaming, the prompt solve. Output is identical with or without it. A streamed 10 s voice holds about 60 MB. Default 0 (off).",required:!1,min:0,default:0},{name:"matmul_weight_type",type:"enum",preset:"weight_type_full",description:"Storage type for the matmul weights of every stage (semantic LM, acoustic DiT, encoders, vocoder head).",required:!1,default:"f32"},{name:"conv_weight_type",type:"enum",preset:"weight_type_conv",description:"Storage type for convolution weights (speaker/semantic encoders and the Vocos backbone).",required:!1,default:"f32"}],load:[]},packages:[{id:"sopro_v2_turbo_f16",display_name:"Sopro V2 Turbo F16 GGUF",description:"Single-file GGUF of all four stages with the config and tokenizer embedded: f16 weights, mel front ends kept in f32.",default:!0,format:"gguf",precision:"f16",target_directory:"sopro-v2-turbo-GGUF",files:["sopro-v2-turbo-f16.gguf"],download:{kind:"huggingface_snapshot",repo:"samuel-vitorino/sopro-v2-turbo",revision:"main",gated:!1}},{id:"sopro_v2_turbo_safetensors",display_name:"Sopro V2 Turbo (upstream safetensors)",description:"Upstream checkpoint from samuel-vitorino/sopro-v2-turbo: config.json, tokenizer.model and the four safetensors stages. Runs directly, no conversion needed.",format:"safetensors",precision:"orig",target_directory:"sopro-v2-turbo",files:["config.json","tokenizer.model","model.safetensors","semantic_encoder.safetensors","speaker_encoder.safetensors","vocoder.safetensors"],download:{kind:"huggingface_snapshot",repo:"samuel-vitorino/sopro-v2-turbo",revision:"main",gated:!1}}],dependencies:[],ui:{recommended_package:"sopro_v2_turbo_safetensors",tags:["TTS","Clone"],docs:["docs/models/sopro_tts.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{model:{source:"weights:",prefix:"model"},semantic_encoder:{source:"weights:",prefix:"semantic_encoder"},speaker_encoder:{source:"weights:",prefix:"speaker_encoder"},vocoder:{source:"weights:",prefix:"vocoder"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer:"model:tokenizer.model"},tensors:{model:{source:"model:model.safetensors"},semantic_encoder:{source:"model:semantic_encoder.safetensors"},speaker_encoder:{source:"model:speaker_encoder.safetensors"},vocoder:{source:"model:vocoder.safetensors"}}}]},T$={schema_version:1,family:"sortformer_diar",display_name:"Sortformer Diarization",description:"NVIDIA Transformer-based end-to-end speaker diarization model trained primarily on English speech, predicting speaker labels directly from audio and resolving speaker ordering by arrival time for up to four speakers.",category:"speech_analysis",status:"supported",tasks:["diar"],modes:["offline"],languages:["en"],capabilities:{diar:["speaker_turns"]},dependencies:[],options:{request:[{name:"speaker_threshold",type:"float",description:"Speaker activity probability threshold used when decoding speaker turns; default 0.5.",required:!1,min:0,max:1,default:.5},{name:"speaker_min_frames",type:"int",description:"Minimum decoded segment length in model output frames; default 0 disables short-segment filtering.",required:!1,min:0,default:0},{name:"speaker_pad_frames",type:"int",description:"Pad each decoded speaker segment by this many model output frames before filtering and merging; default 0.",required:!1,min:0,default:0}],session:[{name:"graph_arena_mb",type:"int",description:"Inference graph arena size in MiB; default 512.",required:!1,min:1,default:512},{name:"weight_context_mb",type:"int",description:"Weight context size in MiB; default 128.",required:!1,min:1,default:128},{name:"session_len_sec",type:"float",description:"Base offline graph context length in seconds; must be > 0, default 20.",required:!1,min:0,default:20},{name:"graph_capacity_mode",type:"enum",description:"Offline graph capacity policy; defaults to tiered on host-graph backends and fixed otherwise.",values:["fixed","tiered","grow","double"],required:!1},{name:"speaker_threshold",type:"float",description:"Default speaker activity probability threshold for decoded speaker turns; default 0.5.",required:!1,min:0,max:1,default:.5},{name:"speaker_min_frames",type:"int",description:"Default minimum decoded segment length in model output frames; default 0 disables short-segment filtering.",required:!1,min:0,default:0},{name:"speaker_pad_frames",type:"int",description:"Default decoded segment padding in model output frames; default 0.",required:!1,min:0,default:0},{name:"weight_type",type:"enum",description:"All weight storage type; default f32.",preset:"weight_type_full",required:!1,default:"f32"},{name:"matmul_weight_type",type:"enum",description:"Matmul weight storage type; defaults to weight_type when set, otherwise f32.",preset:"weight_type_full",required:!1},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; defaults to weight_type when set, otherwise f32.",preset:"weight_type_full",required:!1}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"sortformer_diar_4spk_v1_q8_0",tags:["Diar","GGUF"],docs:["docs/audio_tools.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"sortformer_diar_4spk_v1_q8_0",display_name:"Sortformer Diar 4spk v1 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Sortformer-Diar-4spk-v1-GGUF",files:["Sortformer-Diar-4spk-v1-GGUF/sortformer-diar-4spk-v1-q8_0.gguf"],strip_prefix:"Sortformer-Diar-4spk-v1-GGUF"},{id:"sortformer_diar_4spk_v1_f16",display_name:"Sortformer Diar 4spk v1 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Sortformer-Diar-4spk-v1-GGUF",files:["Sortformer-Diar-4spk-v1-GGUF/sortformer-diar-4spk-v1-f16.gguf"],strip_prefix:"Sortformer-Diar-4spk-v1-GGUF"},{id:"sortformer_diar_4spk_v1_safetensors",display_name:"Sortformer Diar 4spk v1 Safetensors",format:"safetensors",precision:"native",target_directory:"diar_sortformer_4spk-v1",files:["config.json","model.safetensors","processor_config.json"],download:{kind:"huggingface_snapshot",repo:"nvidia/diar_sortformer_4spk-v1"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"model:model.safetensors"}}]},$$={schema_version:1,family:"sortformer_diar_v2",display_name:"Sortformer Diarization v2.1",description:"NVIDIA Sortformer v2.1 streaming speaker diarization model with four speaker channels, AOSC state, stable arrival-order speaker identities, and bounded-context offline and streaming execution. The model has no published language whitelist: it was trained primarily on English speech, includes non-English meeting data such as AISHELL-4 and AliMeeting, and may degrade on other languages. The checkpoint is governed by the NVIDIA Open Model License and is local-use only until redistribution approval.",category:"speech_analysis",status:"community",tasks:["diar"],modes:["offline","streaming"],languages:["multilingual"],capabilities:{diar:["speaker_turns"]},dependencies:[],options:{request:[{name:"speaker_threshold",type:"float",description:"Speaker activity threshold used for turn decoding; default 0.5.",required:!1,min:0,max:1,default:.5},{name:"speaker_min_frames",type:"int",description:"Minimum decoded turn duration in 80 ms model frames; default 0.",required:!1,min:0,default:0},{name:"speaker_pad_frames",type:"int",description:"Padding applied to decoded turns in model frames; default 0.",required:!1,min:0,default:0}],session:[{name:"graph_arena_mb",type:"int",description:"Inference graph arena size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"weight_context_mb",type:"int",description:"Weight context size in MiB; default 1024.",required:!1,min:1,default:1024},{name:"geometry",type:"enum",description:"Streaming geometry preset; default uses the checkpoint geometry.",values:["model","streaming","very_high_latency","high_latency","low_latency"],required:!1,default:"model"},{name:"weight_type",type:"enum",description:"Default storage type for all model weights; default f32. With bf16/q8_0, also set conv_weight_type explicitly to native/f32/f16; convolution storage cannot inherit bf16/q8_0.",preset:"weight_type_full",required:!1,default:"f32"},{name:"matmul_weight_type",type:"enum",description:"Matmul weight storage type; defaults to weight_type.",preset:"weight_type_full",required:!1},{name:"conv_weight_type",type:"enum",description:"Convolution weight storage type; defaults to weight_type.",preset:"weight_type_conv",required:!1}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"sortformer_diar_v2_1_f32_gguf_local",tags:["Diar","Stream","GGUF"],docs:["docs/models/sortformer_diar_v2.md","docs/speech_analysis.md","docs/gguf.md"]},package_defaults:{download:{kind:"unsupported",reason:"NVIDIA Open Model License checkpoint: convert or stage locally until redistribution approval is complete."}},packages:[{id:"sortformer_diar_v2_1_f32_local",display_name:"Sortformer Diar v2.1 F32 local package",format:"safetensors",precision:"f32",target_directory:"Sortformer-Diar-v2.1-local",files:["Sortformer-Diar-v2.1-local/config.json","Sortformer-Diar-v2.1-local/processor_config.json","Sortformer-Diar-v2.1-local/model.safetensors"],strip_prefix:"Sortformer-Diar-v2.1-local"},{id:"sortformer_diar_v2_1_f32_gguf_local",display_name:"Sortformer Diar v2.1 F32 GGUF local package",default:!0,format:"gguf",precision:"f32",target_directory:"Sortformer-Diar-v2.1-local",files:["Sortformer-Diar-v2.1-local/sortformer-v2.1-f32.gguf"],strip_prefix:"Sortformer-Diar-v2.1-local"},{id:"sortformer_diar_v2_1_f16_mixed_gguf_local",display_name:"Sortformer Diar v2.1 mixed F16/F32 GGUF local package",format:"gguf",precision:"f16",target_directory:"Sortformer-Diar-v2.1-local",files:["Sortformer-Diar-v2.1-local/sortformer-v2.1-f16-mixed.gguf"],strip_prefix:"Sortformer-Diar-v2.1-local"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",processor:"model:processor_config.json"},tensors:{weights:"model:model.safetensors"}}]},q$={family:"stable_audio",display_name:"Stable Audio 3",description:"Stability AI generative audio model family for text-to-music, sound effects, audio-to-audio editing, inpainting, continuation, variable-length generation, and LoRA personalization.",category:"audio_generation",status:"supported",tasks:["music","sfx","edit"],modes:["offline"],languages:["en"],options:{request:[{name:"prompt",type:"string",description:"Fallback text prompt when text_input is absent; pipe separates batch prompts.",required:!1},{name:"negative_prompt",type:"string",description:"Negative prompt; pipe separates batch prompts.",required:!1},{name:"duration_sec",type:"float",description:"Positive duration in seconds; batch requests also accept a comma-separated string matching the prompt count, not a JSON array.",required:!1,default:120},{name:"batch_size",type:"int",description:"Prompt batch size.",required:!1,min:1,default:1},{name:"num_inference_steps",type:"int",description:"Diffusion steps.",required:!1,min:1,default:8},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale.",required:!1,default:1},{name:"apg_scale",type:"float",description:"Adaptive projected guidance scale.",required:!1,default:1},{name:"sampler_mode",type:"enum",description:"Stable Audio 3 diffusion sampler.",required:!1,values:["pingpong","euler"]},{name:"seed",type:"int",description:"Sampling seed; omitted chooses a random seed.",required:!1,min:0},{name:"duration_padding_sec",type:"float",description:"Generated padding before truncation.",required:!1,min:0,default:6},{name:"truncate_output_to_duration",type:"bool",description:"Trim decoded audio to requested duration.",required:!1,default:!0},{name:"chunked_decode",type:"bool",description:"Decode audio in chunks.",required:!1,default:!0},{name:"init_noise_level",type:"float",description:"Audio-conditioned generation strength in [0, 1].",required:!1,min:0,max:1,default:1},{name:"audio_input_kind",type:"enum",description:"How to use audio_input.",required:!1,values:["init_audio","inpaint_audio"],default:"init_audio"},{name:"inpaint_mask_start_sec",type:"string",description:"Comma-separated inpaint region starts in seconds.",required:!1},{name:"inpaint_mask_end_sec",type:"string",description:"Comma-separated inpaint region ends in seconds.",required:!1}],session:[{name:"max_batch",type:"int",description:"Maximum prompt batch size.",required:!1,min:1,default:1},{name:"weight_type",type:"enum",description:"Weight storage type; defaults to native.",required:!1,preset:"weight_type_full"},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs after each request.",required:!1,default:!1}],load:[]},capabilities:{music:["lyrics"],sfx:["prompt_generation"],edit:["prompt_editing"]},runtime:{tags:["gguf"]},ui:{recommended_package:"stable_audio_3_medium_q8_0",tags:["Music","SFX","Edit","GGUF"],docs:["docs/models/stable_audio.md","docs/music_generation.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"stable_audio_3_medium_q8_0",display_name:"Stable Audio 3 Medium Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Stable-Audio-3-Medium-GGUF",files:["Stable-Audio-3-Medium-GGUF/stable-audio-3-medium-q8_0.gguf"],strip_prefix:"Stable-Audio-3-Medium-GGUF"},{id:"stable_audio_3_medium_f16",display_name:"Stable Audio 3 Medium F16 GGUF",format:"gguf",precision:"f16",target_directory:"Stable-Audio-3-Medium-GGUF",files:["Stable-Audio-3-Medium-GGUF/stable-audio-3-medium-f16.gguf"],strip_prefix:"Stable-Audio-3-Medium-GGUF"},{id:"stable_audio_3_small_music_q8_0",display_name:"Stable Audio 3 Small Music Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Stable-Audio-3-Small-Music-GGUF",files:["Stable-Audio-3-Small-Music-GGUF/stable-audio-3-small-music-q8_0.gguf"],strip_prefix:"Stable-Audio-3-Small-Music-GGUF"},{id:"stable_audio_3_small_music_f16",display_name:"Stable Audio 3 Small Music F16 GGUF",format:"gguf",precision:"f16",target_directory:"Stable-Audio-3-Small-Music-GGUF",files:["Stable-Audio-3-Small-Music-GGUF/stable-audio-3-small-music-f16.gguf"],strip_prefix:"Stable-Audio-3-Small-Music-GGUF"},{id:"stable_audio_3_small_sfx_q8_0",display_name:"Stable Audio 3 Small SFX Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Stable-Audio-3-Small-SFX-GGUF",files:["Stable-Audio-3-Small-SFX-GGUF/stable-audio-3-small-sfx-q8_0.gguf"],strip_prefix:"Stable-Audio-3-Small-SFX-GGUF"},{id:"stable_audio_3_small_sfx_f16",display_name:"Stable Audio 3 Small SFX F16 GGUF",format:"gguf",precision:"f16",target_directory:"Stable-Audio-3-Small-SFX-GGUF",files:["Stable-Audio-3-Small-SFX-GGUF/stable-audio-3-small-sfx-f16.gguf"],strip_prefix:"Stable-Audio-3-Small-SFX-GGUF"},{id:"stable_audio_3_medium_safetensors",display_name:"Stable Audio 3 Medium Safetensors",format:"safetensors",precision:"native",target_directory:"stable-audio-3-medium",files:["model_config.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"stabilityai/stable-audio-3-medium",gated:!0}},{id:"stable_audio_3_small_music_safetensors",display_name:"Stable Audio 3 Small Music Safetensors",format:"safetensors",precision:"native",target_directory:"stable-audio-3-small-music",files:["model_config.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"stabilityai/stable-audio-3-small-music",gated:!0}},{id:"stable_audio_3_small_sfx_safetensors",display_name:"Stable Audio 3 Small SFX Safetensors",format:"safetensors",precision:"native",target_directory:"stable-audio-3-small-sfx",files:["model_config.json","model.safetensors"],download:{kind:"huggingface_snapshot",repo:"stabilityai/stable-audio-3-small-sfx",gated:!0}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{model_config:"model:model_config.json",t5_config:"model:t5gemma-b-b-ul2/config.json",t5_tokenizer_json:"model:t5gemma-b-b-ul2/tokenizer.json",t5_tokenizer_model:"model:t5gemma-b-b-ul2/tokenizer.model",t5_tokenizer_config:"model:t5gemma-b-b-ul2/tokenizer_config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},t5_weights:{source:"weights:",prefix:"t5_weights"}}},{format:"safetensors",roots:{model:".",t5:"t5gemma-b-b-ul2"},files:{model_config:"model:model_config.json",t5_config:"t5:config.json",t5_tokenizer_json:"t5:tokenizer.json",t5_tokenizer_model:"t5:tokenizer.model",t5_tokenizer_config:"t5:tokenizer_config.json"},tensors:{model_weights:"model:model.safetensors",t5_weights:"t5:model.safetensors"}}]},C$={family:"supertonic",display_name:"Supertonic 3",description:"Supertone on-device TTS model designed for fast local speech synthesis across 31 languages, with preset voices and compact deployment for browser, mobile, and desktop applications.",category:"tts",status:"supported",tasks:["tts"],modes:["offline","streaming"],languages:["en","ko","ja","ar","bg","cs","da","de","el","es","et","fi","fr","hi","hr","hu","id","it","lt","lv","nl","pl","pt","ro","ru","sk","sl","sv","tr","uk","vi"],capabilities:{tts:["built_in_voices","long_form"]},runtime:{tags:["gguf","stream"]},options:{request:[{name:"voice_id",type:"enum",values:["M1","M2","M3","M4","M5","F1","F2","F3","F4","F5"],default:"M1",description:"Built-in voice preset; --voice-id takes precedence.",required:!1},{name:"num_inference_steps",type:"int",min:1,default:8,description:"Flow denoising steps.",required:!1},{name:"speed",type:"float",min:0,default:1.05,description:"Positive speech speed multiplier; voice.style.speaking_rate takes precedence.",required:!1},{name:"seed",type:"int",min:0,max:4294967295,default:1234,description:"Noise seed.",required:!1},{name:"text_chunk_size",type:"int",description:"Framework text chunk size; defaults to 120 for Korean/Japanese, otherwise 300.",required:!1},{name:"text_chunk_mode",type:"enum",values:["default","tag_aware","japanese","endline"],default:"default",description:"Framework text chunking mode.",required:!1}],session:[{name:"weight_type",type:"enum",preset:"weight_type_full",default:"native",description:"Weight storage type.",required:!1},{name:"style_cache_slots",type:"int",min:0,default:4,description:"Cached preset style slots; zero disables reuse.",required:!1}],load:[]},ui:{recommended_package:"supertonic_3_orig",tags:["TTS","GGUF","Stream"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"supertonic_3_q8_0",display_name:"Supertonic 3 Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"Supertonic-3-GGUF",files:["Supertonic-3-GGUF/supertonic-3-q8_0.gguf"],strip_prefix:"Supertonic-3-GGUF"},{id:"supertonic_3_f16",display_name:"Supertonic 3 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Supertonic-3-GGUF",files:["Supertonic-3-GGUF/supertonic-3-f16.gguf"],strip_prefix:"Supertonic-3-GGUF"},{id:"supertonic_3_orig",display_name:"Supertonic 3 Original-Dtype GGUF",default:!0,format:"gguf",precision:"orig",target_directory:"Supertonic-3-GGUF",files:["Supertonic-3-GGUF/supertonic-3-orig.gguf"],strip_prefix:"Supertonic-3-GGUF"},{id:"supertonic_3_safetensors",display_name:"Supertonic 3 Safetensors",format:"safetensors",precision:"native",target_directory:"supertonic-3",files:["config/tts.json","config/unicode_indexer.json","ggml/supertonic.safetensors","voice_styles/F1.json","voice_styles/F2.json","voice_styles/F3.json","voice_styles/F4.json","voice_styles/F5.json","voice_styles/M1.json","voice_styles/M2.json","voice_styles/M3.json","voice_styles/M4.json","voice_styles/M5.json"],download:{kind:"huggingface_snapshot",repo:"mlx-community/supertonic-3-mlx"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tts_config:"model:config/tts.json",unicode_indexer:"model:config/unicode_indexer.json",voice_style_F1:"model:voice_styles/F1.json",voice_style_F2:"model:voice_styles/F2.json",voice_style_F3:"model:voice_styles/F3.json",voice_style_F4:"model:voice_styles/F4.json",voice_style_F5:"model:voice_styles/F5.json",voice_style_M1:"model:voice_styles/M1.json",voice_style_M2:"model:voice_styles/M2.json",voice_style_M3:"model:voice_styles/M3.json",voice_style_M4:"model:voice_styles/M4.json",voice_style_M5:"model:voice_styles/M5.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}},{format:"safetensors",roots:{model:"."},files:{tts_config:"model:config/tts.json",unicode_indexer:"model:config/unicode_indexer.json",voice_style_F1:"model:voice_styles/F1.json",voice_style_F2:"model:voice_styles/F2.json",voice_style_F3:"model:voice_styles/F3.json",voice_style_F4:"model:voice_styles/F4.json",voice_style_F5:"model:voice_styles/F5.json",voice_style_M1:"model:voice_styles/M1.json",voice_style_M2:"model:voice_styles/M2.json",voice_style_M3:"model:voice_styles/M3.json",voice_style_M4:"model:voice_styles/M4.json",voice_style_M5:"model:voice_styles/M5.json"},tensors:{weights:"model:ggml/supertonic.safetensors"}}]},A$={schema_version:1,family:"tf_gridnet",display_name:"TF-GridNet",description:"Time-frequency GridNet overlapping speech separation.",category:"audio_tools",status:"supported",tasks:["sep"],modes:["offline"],languages:["language_agnostic"],capabilities:{sep:["stems"]},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_duration_sec",type:"float",description:"Separation window duration; zero selects whole-file inference. When enabled, the chunk sample count must exceed n_fft/2.",min:0,default:2.4,required:!1},{name:"audio_chunk_overlap_sec",type:"float",description:"Nonnegative overlap used to match speaker order and stitch adjacent windows. When chunking is enabled, overlap sample count must be > 0 and smaller than the chunk. Ignored for whole-file inference.",min:0,default:1.6,required:!1},{name:"normalize_output",type:"bool",description:"Normalize each separated waveform to a peak of 0.9, as in ESPnet's example.",default:!0,required:!1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"]}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"tf_gridnet_wsj0_2mix_f32",display_name:"TF-GridNet WSJ0-2mix F32",default:!0,format:"gguf",precision:"f32",target_directory:"TF-GridNet-GGUF",files:["TF-GridNet-GGUF/tf-gridnet-wsj0-2mix-f32.gguf"],strip_prefix:"TF-GridNet-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:["docs/models/tf_gridnet.md"],recommended_package:"tf_gridnet_wsj0_2mix_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"},frontend:{source:"weights:",prefix:"frontend"}}}]},G$={family:"tone_color_vc",schema_version:1,display_name:"Tone Color VC",description:"Standalone voice conversion with a reference speaker recording.",category:"voice_conversion",status:"experimental",tasks:["vc"],modes:["offline"],languages:["language_agnostic"],capabilities:{vc:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"seed",type:"int",required:!1,description:"Random seed for posterior sampling; -1 chooses a random seed.",default:1234,min:-1},{name:"temperature",type:"float",required:!1,description:"Posterior sampling noise scale.",default:.3,min:0}],session:[{name:"exec_plan",type:"string",required:!1,default:"{}",description:"Component execution plan: decoder accepts default/ggml/neon. Default retains the session backend. The complete NEON HiFi-GAN decoder requires a CPU session and ENGINE_ENABLE_NEON=ON on AArch64. No artifacts or params."}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"tone_color_vc_f32",display_name:"Tone Color VC F32 GGUF",default:!0,format:"gguf",precision:"f32",target_directory:"Tone-Color-VC-GGUF",files:["Tone-Color-VC-GGUF/tone-color-vc-f32.gguf"],strip_prefix:"Tone-Color-VC-GGUF"},{id:"tone_color_vc_f16",display_name:"Tone Color VC F16 GGUF",default:!1,format:"gguf",precision:"f16",target_directory:"Tone-Color-VC-GGUF",files:["Tone-Color-VC-GGUF/tone-color-vc-f16.gguf"],strip_prefix:"Tone-Color-VC-GGUF"}],dependencies:[],ui:{recommended_package:"tone_color_vc_f32",tags:["VC","GGUF"],docs:["docs/models/tone_color_vc.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"}}}]},F$={schema_version:1,family:"universr",display_name:"UniverSR",description:"Complex-STFT flow-matching audio super-resolution to 48 kHz.",category:"audio_tools",status:"supported",tasks:["s2s"],modes:["offline"],languages:["language_agnostic"],capabilities:{s2s:["audio_enhancement"]},runtime:{tags:["gguf"]},options:{request:[{name:"audio_chunk_duration_sec",type:"float",description:"Independent audio segments concatenated after inference; zero processes the whole file. Chunking changes global normalization context.",min:0,default:0,required:!1},{name:"input_sample_rate",type:"int",description:"Effective input bandwidth sample rate: 8000, 12000, 16000, or 24000 Hz.",required:!1},{name:"sampler_mode",type:"enum",description:"Fixed-step ODE integration method.",values:["euler","midpoint","rk4"],default:"midpoint",required:!1},{name:"num_inference_steps",type:"int",description:"ODE integration steps.",min:1,default:4,required:!1},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale; zero disables guidance.",min:0,default:1.5,required:!1},{name:"seed",type:"int",description:"Initial flow noise seed.",min:0,default:42,required:!1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; native preserves the GGUF tensor types.",required:!1,default:"native",values:["native","f32","f16","bf16","q8_0","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k"]}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"universr_audio_orig",display_name:"UniverSR Audio GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"UniverSR-GGUF",files:["UniverSR-GGUF/universr-audio-orig.gguf"],strip_prefix:"UniverSR-GGUF"},{id:"universr_speech_orig",display_name:"UniverSR Speech GGUF F32",format:"gguf",precision:"f32",target_directory:"UniverSR-GGUF",files:["UniverSR-GGUF/universr-speech-orig.gguf"],strip_prefix:"UniverSR-GGUF"}],dependencies:[],ui:{tags:["GGUF"],docs:[],recommended_package:"universr_audio_orig"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json"},tensors:{weights:{source:"weights:",prefix:"weights"},frontend:{source:"weights:",prefix:"frontend"}}}]},M$={family:"vevo2",display_name:"Vevo2",description:"Unified controllable framework for English and Chinese speech and singing voice generation, voice conversion, and editing, with tokenizers that disentangle content, prosody, melody, style, and timbre.",category:"voice_conversion",status:"supported",tasks:["tts","music","vc","edit","svc","s2s"],modes:["offline"],languages:["en","zh"],capabilities:{music:["lyrics"],vc:["speaker_reference"],svc:["speaker_reference","singing"],s2s:["speaker_reference"],edit:["prompt_editing"]},runtime:{tags:["gguf"]},options:{request:[{name:"route",type:"enum",description:"Generation route; omitted selects the task default.",required:!1,values:["zero_shot_tts","text_to_singing","svs","style_preserved_vc","style_preserved_svc","style_converted_vc","style_converted_svc","editing","singing_style_conversion","humming_to_singing","instrument_to_singing"]},{name:"source_audio",type:"audio_path",description:"Source audio file for conversion or editing.",required:!1},{name:"target_voice",type:"audio_path",description:"Target voice audio file; overrides structured speaker audio.",required:!1},{name:"prosody_ref",type:"audio_path",description:"Prosody or melody reference audio file.",required:!1},{name:"style_ref",type:"audio_path",description:"Style reference audio file.",required:!1},{name:"target_text",type:"string",description:"Text or lyrics; overrides structured text input.",required:!1},{name:"style_ref_text",type:"string",description:"Style-reference transcript; reference_text is also accepted.",required:!1},{name:"use_prosody_code",type:"bool",description:"Use prosody codes; default depends on route and requires prosody audio when enabled.",required:!1},{name:"use_pitch_shift",type:"bool",description:"Align reference pitch to the target voice; default depends on route.",required:!1},{name:"source_shift_steps",type:"int",description:"Manual source reference pitch shift in semitones.",required:!1,default:0},{name:"prosody_shift_steps",type:"int",description:"Manual prosody reference pitch shift in semitones.",required:!1,default:0},{name:"style_shift_steps",type:"int",description:"Manual style reference pitch shift in semitones.",required:!1,default:0},{name:"duration_sec",type:"float",description:"Rescale prosody-code conditioning to this duration; not a general output-length limit. Legacy target_duration_seconds is accepted.",required:!1},{name:"reference_duration_sec",type:"float",description:"Trim target voice reference before conditioning. Legacy reference_duration_seconds is accepted.",required:!1,min:0},{name:"temperature",type:"float",description:"Positive AR sampling temperature; default comes from the checkpoint.",required:!1},{name:"top_k",type:"int",description:"AR top-k sampling; default comes from the checkpoint.",required:!1},{name:"top_p",type:"float",description:"AR nucleus sampling; default comes from the checkpoint.",required:!1},{name:"repetition_penalty",type:"float",description:"Positive AR repetition penalty; default comes from the checkpoint.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated AR tokens.",required:!1,min:1,default:500},{name:"num_inference_steps",type:"int",description:"Flow-matching denoising steps.",required:!1,min:1,default:32},{name:"seed",type:"int",description:"Sampling seed; random when omitted.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Character budget per text chunk.",required:!1,min:1,default:128},{name:"audio_chunk_mode",type:"enum",description:"Source-audio chunking for style_preserved_vc/svc requires audio_chunk_duration_sec. Auto uses fixed chunks; none disables chunking.",required:!1,values:["auto","fixed","none"],default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Source-audio chunk duration for style_preserved_vc/svc; zero or omitted keeps one-shot processing.",required:!1,min:0},{name:"cross_fade_duration_sec",type:"float",description:"Source chunk overlap and output crossfade; must be smaller than chunk duration.",required:!1,default:1}],session:[{name:"weight_type",type:"enum",description:"Shared matmul storage override; omitted preserves component defaults.",required:!1,values:["native","f32","f16","bf16","q8_0"]},{name:"conv_weight_type",type:"enum",description:"Shared convolution storage override; omitted preserves native storage.",required:!1,values:["native","f32","f16"]}],load:[{name:"whisper_model_path",type:"path",description:"External Whisper model directory for feature extraction when not bundled.",required:!1}]},ui:{recommended_package:"vevo2_q8_0",tags:["TTS","Music","VC","Edit","GGUF"],docs:["docs/models/vevo2.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"vevo2_q8_0",display_name:"Vevo2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Vevo2-GGUF",files:["Vevo2-GGUF/vevo2-q8_0.gguf"],strip_prefix:"Vevo2-GGUF"},{id:"vevo2_f16",display_name:"Vevo2 F16 GGUF",format:"gguf",precision:"f16",target_directory:"Vevo2-GGUF",files:["Vevo2-GGUF/vevo2-f16.gguf"],strip_prefix:"Vevo2-GGUF"},{id:"vevo2_orig",display_name:"Vevo2 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"Vevo2-GGUF",files:["Vevo2-GGUF/vevo2-orig.gguf"],strip_prefix:"Vevo2-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{ar_config:"model:contentstyle_modeling/posttrained/config.json",ar_amphion_config:"model:contentstyle_modeling/posttrained/amphion_config.json",ar_generation_config:"model:contentstyle_modeling/posttrained/generation_config.json",ar_tokenizer_config:"model:contentstyle_modeling/posttrained/tokenizer_config.json",ar_tokenizer_json:"model:contentstyle_modeling/posttrained/tokenizer.json",ar_vocab:"model:contentstyle_modeling/posttrained/vocab.json",ar_merges:"model:contentstyle_modeling/posttrained/merges.txt",ar_added_tokens:"model:contentstyle_modeling/posttrained/added_tokens.json",ar_special_tokens:"model:contentstyle_modeling/posttrained/special_tokens_map.json",fm_config:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa/config.json",fm_text_config:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa_text/config.json",vocoder_config:"model:vocoder/config.json",whisper_config:"model:whisper-medium/config.json"},tensors:{content_style_tokenizer_weights:{source:"weights:",prefix:"content_style_tokenizer_weights"},prosody_tokenizer_weights:{source:"weights:",prefix:"prosody_tokenizer_weights"},ar_weights:{source:"weights:",prefix:"ar_weights"},fm_weights:{source:"weights:",prefix:"fm_weights"},fm_whisper_stats:{source:"weights:",prefix:"fm_whisper_stats"},fm_text_weights:{source:"weights:",prefix:"fm_text_weights"},fm_text_whisper_stats:{source:"weights:",prefix:"fm_text_whisper_stats"},vocoder_weights_0:{source:"weights:",prefix:"vocoder_weights_0"},vocoder_weights_1:{source:"weights:",prefix:"vocoder_weights_1"},vocoder_weights_2:{source:"weights:",prefix:"vocoder_weights_2"},whisper_weights:{source:"weights:",prefix:"whisper_weights"}}},{format:"safetensors",roots:{model:".",whisper:"../whisper-medium"},files:{ar_config:"model:contentstyle_modeling/posttrained/config.json",ar_amphion_config:"model:contentstyle_modeling/posttrained/amphion_config.json",ar_generation_config:"model:contentstyle_modeling/posttrained/generation_config.json",ar_tokenizer_config:"model:contentstyle_modeling/posttrained/tokenizer_config.json",ar_tokenizer_json:"model:contentstyle_modeling/posttrained/tokenizer.json",ar_vocab:"model:contentstyle_modeling/posttrained/vocab.json",ar_merges:"model:contentstyle_modeling/posttrained/merges.txt",ar_added_tokens:"model:contentstyle_modeling/posttrained/added_tokens.json",ar_special_tokens:"model:contentstyle_modeling/posttrained/special_tokens_map.json",fm_config:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa/config.json",fm_text_config:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa_text/config.json",vocoder_config:"model:vocoder/config.json",whisper_config:"whisper:config.json"},tensors:{content_style_tokenizer_weights:"model:tokenizer/contentstyle_fvq16384_12.5hz/model.safetensors",prosody_tokenizer_weights:"model:tokenizer/prosody_fvq512_6.25hz/model.safetensors",ar_weights:"model:contentstyle_modeling/posttrained/model.safetensors",fm_weights:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa/model.safetensors",fm_whisper_stats:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa/whisper_stats.safetensors",fm_text_weights:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa_text/model.safetensors",fm_text_whisper_stats:"model:acoustic_modeling/fm_emilia101k_singnet7k_repa_text/whisper_stats.safetensors",vocoder_weights_0:"model:vocoder/model.safetensors",vocoder_weights_1:"model:vocoder/model_1.safetensors",vocoder_weights_2:"model:vocoder/model_2.safetensors",whisper_weights:"whisper:model.safetensors"}}]},z$={schema_version:1,family:"vibeasr",display_name:"VibeVoice-ASR-BitNet",description:"VibeASR.cpp's CPU-first VibeVoice ASR port: an INT8 (I8_S) audio VAE encoder feeding a ternary (I2_S) Qwen2 decoder, ported to audio.cpp.",category:"asr",status:"community",tasks:["asr"],modes:["offline"],languages:["en","zh","fr","it","ko","pt","vi"],capabilities:{},options:{request:[{name:"output_format",type:"enum",description:"Prompt suffix asked of the decoder: plain transcription text, or JSON rows with Start/End/Speaker/Content.",values:["text","json"],required:!1,default:"text"},{name:"context",type:"string",description:"Extra context injected into the prompt (names, jargon) to bias the transcription.",required:!1,default:""},{name:"max_tokens",type:"int",description:"Cap on decoded tokens for one request.",required:!1,min:1,default:1024}],session:[{name:"encoder_graph_arena_mb",type:"int",description:"VAE encoder graph arena size in MB. Must be positive; sufficient capacity depends on the graph.",required:!1,min:1,default:64},{name:"prefill_graph_arena_mb",type:"int",description:"Decoder prefill graph arena size in MB. Must be positive; sufficient capacity depends on the graph.",required:!1,min:1,default:256},{name:"decode_graph_arena_mb",type:"int",description:"Decoder single-step graph arena size in MB. Must be positive; sufficient capacity depends on the graph.",required:!1,min:1,default:256}],load:[]},runtime:{tags:["gguf","cpu"]},packages:[{id:"vibeasr_bitnet_i2_s",display_name:"VibeVoice-ASR-BitNet I8_S encoder + I2_S decoder",description:"Upstream VibeASR.cpp GGUF package. The two GGUFs carry the VibeASR ggml fork's type ids and need one pass of tools/community_models/convert_vibeasr_gguf.py --in-place before audio.cpp can load them.",default:!0,format:"gguf",precision:"native",target_directory:"VibeVoice-ASR-BitNet",files:["vibeasr-vae-encoder-i8_s.gguf","vibeasr-lm-i2_s-embed-q6_k.gguf","tokenizer.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"microsoft/VibeVoice-ASR-BitNet",revision:"main",gated:!1}}],dependencies:[],ui:{recommended_package:"vibeasr_bitnet_i2_s",tags:["ASR","GGUF"],docs:["docs/models/vibeasr.md"],summary:"INT8 encoder plus ternary Qwen2 decoder transcription on CPU."},sources:[{format:"gguf",roots:{model:"."},files:{tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{},tensors:{vae_weights:"model:vibeasr-vae-encoder-i8_s.gguf",lm_weights:"model:vibeasr-lm-i2_s-embed-q6_k.gguf"}}]},E$={family:"vibevoice",display_name:"VibeVoice",description:"Microsoft long-form multi-speaker TTS model for expressive conversational audio such as podcasts, supporting up to 90 minutes of speech with as many as four speakers.",category:"tts",status:"supported",tasks:["tts"],modes:["offline","streaming"],languages:["en","zh"],options:{request:[{name:"voice_samples",type:"string",description:"Comma-separated reference WAV paths ordered by speaker ID; cannot be combined with voice_ref.",required:!1},{name:"num_inference_steps",type:"int",description:"Diffusion steps; defaults to the checkpoint configuration.",required:!1,min:1},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale.",required:!1,min:0,default:1.3},{name:"max_length_times",type:"float",description:"Positive generation length multiplier.",required:!1,default:2},{name:"max_tokens",type:"int",description:"Maximum generated tokens; zero uses the model-derived limit.",required:!1,min:0,default:0},{name:"do_sample",type:"bool",description:"Enable sampling.",required:!1,default:!1},{name:"temperature",type:"float",description:"Positive sampling temperature.",required:!1,default:1},{name:"top_k",type:"int",description:"Top-k sampling limit; zero disables filtering.",required:!1,min:0,default:50},{name:"top_p",type:"float",description:"Nucleus probability in (0, 1].",required:!1,default:1},{name:"seed",type:"int",description:"Sampling seed.",required:!1,min:0,max:4294967295,default:1234},{name:"prompt_noise_file",type:"path",description:"F32 prompt acoustic noise file.",required:!1},{name:"diffusion_noise_file",type:"path",description:"F32 initial diffusion noise file.",required:!1}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"tokenizer_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"connector_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"decoder_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"diffusion_head_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"lora",type:"path",description:"Decoder adapter file or PEFT directory applied when creating the session; do not also supply the load option.",required:!1},{name:"lora_scale",type:"float",description:"Session adapter scale override; omitted uses lora_alpha / r. Must be strictly positive when an adapter is supplied.",required:!1}],load:[{name:"lora",type:"path",description:"Decoder adapter file or PEFT directory, merged at load time.",required:!1},{name:"lora_scale",type:"float",description:"LoRA scale override; omitted uses lora_alpha / r. Must be strictly positive when an adapter is supplied.",required:!1}]},capabilities:{tts:["multi_speaker","long_form"]},runtime:{tags:["gguf"]},ui:{recommended_package:"vibevoice_1_5b_q8_0",tags:["TTS","GGUF"],docs:["docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"vibevoice_1_5b_q8_0",display_name:"VibeVoice 1.5B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VibeVoice-1.5B-GGUF",files:["VibeVoice-1.5B-GGUF/vibevoice-1.5b-q8_0.gguf"],strip_prefix:"VibeVoice-1.5B-GGUF"},{id:"vibevoice_1_5b_bf16",display_name:"VibeVoice 1.5B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VibeVoice-1.5B-GGUF",files:["VibeVoice-1.5B-GGUF/vibevoice-1.5b-bf16.gguf"],strip_prefix:"VibeVoice-1.5B-GGUF"},{id:"vibevoice_7b_q8_0",display_name:"VibeVoice 7B Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"VibeVoice-7B-GGUF",files:["vibevoice-7b-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"audio-cpp/VibeVoice-7B-GGUF",revision:"main",gated:!1}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",preprocessor_config:"model:preprocessor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},tensors:{model_weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",preprocessor_config:"model:preprocessor_config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},tensors:{model_weights:"model:model.safetensors.index.json"}}]},U$={family:"vibevoice_asr",display_name:"VibeVoice ASR",description:"Microsoft long-form speech-to-text model that processes up to 60 minutes of audio in one pass and produces structured transcripts with speakers, timestamps, content, hotwords, and 50+ language support.",category:"asr",status:"supported",tasks:["asr"],modes:["offline"],languages:["auto","51 languages"],options:{request:[{name:"context",type:"string",description:"Context hint; context_info is also accepted.",required:!1},{name:"language",type:"string",description:"ASR language label.",required:!1},{name:"max_tokens",type:"int",description:"Maximum generated text tokens.",required:!1,min:1,default:32768},{name:"temperature",type:"float",description:"Sampling temperature; zero uses deterministic decoding.",required:!1,min:0,default:0},{name:"top_p",type:"float",description:"Nucleus probability in (0, 1].",required:!1,default:1},{name:"top_k",type:"int",description:"Top-k sampling limit; zero disables filtering.",required:!1,min:0,default:50},{name:"num_beams",type:"int",description:"Deterministic beam search width.",required:!1,min:1,default:1},{name:"repetition_penalty",type:"float",description:"Positive generation repetition penalty.",required:!1,default:1},{name:"seed",type:"int",description:"Acoustic latent sampling seed.",required:!1,min:0,default:1234},{name:"audio_chunk_mode",type:"enum",description:"Pre-encoder audio splitting; auto uses fixed chunks.",required:!1,values:["auto","fixed","vad","none"],default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Positive audio chunk duration in seconds.",required:!1,default:1200}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"tokenizer_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"connector_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"decoder_weight_type",type:"enum",description:"Weight storage type; component-specific settings inherit weight_type.",required:!1,preset:"weight_type_full"},{name:"tokenizer_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:512},{name:"connector_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:128},{name:"decoder_weight_context_mb",type:"int",description:"Decoder weight context in MiB; 4096 on 64-bit builds, 1024 on 32-bit builds.",required:!1,min:1},{name:"max_history_steps",type:"int",description:"Maximum retained decoder history; zero uses the model limit. Cannot exceed checkpoint position capacity; zero uses that capacity.",required:!1,default:0,min:0},{name:"vad_model_path",type:"path",description:"VAD model (any built-in VAD family; default Silero VAD) used with audio_chunk_mode=vad.",required:!1,default:"assets/framework/models/silero_vad"}],load:[]},capabilities:{asr:["segments","speaker_turns","vad_chunking"]},runtime:{tags:["gguf"]},ui:{recommended_package:"vibevoice_asr_q8_0",tags:["ASR","GGUF"],docs:["docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"vibevoice_asr_q8_0",display_name:"VibeVoice ASR Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VibeVoice-ASR-GGUF",files:["VibeVoice-ASR-GGUF/vibevoice-asr-q8_0.gguf"],strip_prefix:"VibeVoice-ASR-GGUF"},{id:"vibevoice_asr_f16",display_name:"VibeVoice ASR F16 GGUF",format:"gguf",precision:"f16",target_directory:"VibeVoice-ASR-GGUF",files:["VibeVoice-ASR-GGUF/vibevoice-asr-f16.gguf"],strip_prefix:"VibeVoice-ASR-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{model_weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{model_weights:"model:model.safetensors.index.json"}}]},R$={family:"vibevoice_asr_streaming",display_name:"VibeVoice ASR Streaming",description:"Microsoft VibeVoice ASR Streaming models (7B and 1.5B) for chunked streaming speech-to-text with persistent decoder state.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["en","zh","es","pt","de","ja","ko","fr","ru","it"],capabilities:{asr:["speaker_turns"]},options:{request:[{name:"language",type:"string",description:"ASR language label; empty unless provided in the request.",required:!1,default:""},{name:"context",type:"string",description:"Extra context or hotwords injected into the streaming prompt.",required:!1,default:""},{name:"max_tokens",type:"int",description:"Maximum generated transcript tokens per chunk.",required:!1,min:1,default:256},{name:"temperature",type:"float",description:"Sampling temperature; 0 uses deterministic decoding.",required:!1,min:0,default:0},{name:"top_p",type:"float",description:"Nucleus sampling probability.",required:!1,min:.001,max:1,default:1},{name:"top_k",type:"int",description:"Top-k sampling limit; default 50. Zero disables top-k filtering.",required:!1,min:0,default:50},{name:"num_beams",type:"int",description:"Compatibility-only; this checkpoint ignores beam search and uses its incremental decoder.",required:!1,min:1,default:1},{name:"repetition_penalty",type:"float",description:"Generation repetition penalty.",required:!1,min:.001,default:1},{name:"seed",type:"int",description:"Acoustic latent sampling seed; default 1234.",required:!1,default:1234},{name:"audio_chunk_mode",type:"enum",description:"Compatibility-only; ignored in offline and streaming modes. Processor chunk/lookahead settings determine segmentation.",values:["auto","fixed","vad","none"],required:!1,default:"auto"},{name:"audio_chunk_duration_sec",type:"float",description:"Compatibility-only; ignored in offline and streaming modes. Processor settings determine segmentation.",required:!1,min:.001,default:1200}],session:[{name:"weight_type",type:"enum",description:"Shared component weight storage.",required:!1,preset:"weight_type_full",default:"native"},{name:"tokenizer_weight_type",type:"enum",description:"Speech tokenizer weight storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"connector_weight_type",type:"enum",description:"Speech connector weight storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"decoder_weight_type",type:"enum",description:"Text decoder weight storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"tokenizer_weight_context_mb",type:"int",description:"Speech tokenizer weight metadata context. Size in MiB; must be positive.",required:!1,min:1,default:512},{name:"connector_weight_context_mb",type:"int",description:"Speech connector weight metadata context. Size in MiB; must be positive.",required:!1,min:1,default:128},{name:"decoder_weight_context_mb",type:"int",description:"Text decoder weight metadata context. Default 4096 on 64-bit builds and 1024 on 32-bit builds. Size in MiB; must be positive.",required:!1,min:1},{name:"max_history_steps",type:"int",description:"Decoder history limit; zero uses the model position capacity. Must be nonnegative and not exceed that capacity.",required:!1,min:0,default:0}],load:[]},runtime:{tags:["gguf"]},ui:{recommended_package:"vibevoice_asr_streaming_7b_q8_0",tags:["ASR","Streaming","GGUF"],docs:["docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/VibeVoice-ASR-Streaming-7B-GGUF",revision:"main",gated:!1}},packages:[{id:"vibevoice_asr_streaming_7b_q8_0",display_name:"VibeVoice ASR Streaming 7B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VibeVoice-ASR-Streaming-7B-GGUF",files:["vibevoice-asr-streaming-7b-q8_0.gguf"]},{id:"vibevoice_asr_streaming_7b_bf16",display_name:"VibeVoice ASR Streaming 7B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VibeVoice-ASR-Streaming-7B-GGUF",files:["vibevoice-asr-streaming-7b-bf16.gguf"]},{id:"vibevoice_asr_streaming_7b_q4_k",display_name:"VibeVoice ASR Streaming 7B Q4_K GGUF",format:"gguf",precision:"q4_k",target_directory:"VibeVoice-ASR-Streaming-7B-GGUF",files:["vibevoice-asr-streaming-7b-q4_k.gguf"]},{id:"vibevoice_asr_streaming_1_5b_q8_0",display_name:"VibeVoice ASR Streaming 1.5B Q8_0 GGUF",format:"gguf",precision:"q8_0",target_directory:"VibeVoice-ASR-Streaming-1.5B-GGUF",files:["vibevoice-asr-streaming-1.5b-q8_0.gguf"],download:{kind:"huggingface_snapshot",repo:"christopherthompson81/VibeVoice-ASR-Streaming-1.5B-GGUF",revision:"main",gated:!1}},{id:"vibevoice_asr_streaming_1_5b_bf16",display_name:"VibeVoice ASR Streaming 1.5B BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VibeVoice-ASR-Streaming-1.5B-GGUF",files:["vibevoice-asr-streaming-1.5b-bf16.gguf"],download:{kind:"huggingface_snapshot",repo:"christopherthompson81/VibeVoice-ASR-Streaming-1.5B-GGUF",revision:"main",gated:!1}},{id:"vibevoice_asr_streaming_1_5b_q4_k",display_name:"VibeVoice ASR Streaming 1.5B Q4_K GGUF",format:"gguf",precision:"q4_k",target_directory:"VibeVoice-ASR-Streaming-1.5B-GGUF",files:["vibevoice-asr-streaming-1.5b-q4_k.gguf"],download:{kind:"huggingface_snapshot",repo:"christopherthompson81/VibeVoice-ASR-Streaming-1.5B-GGUF",revision:"main",gated:!1}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{model_weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",tokenizer_vocab:"model:vocab.json",tokenizer_merges:"model:merges.txt"},optional_files:{preprocessor_config:"model:preprocessor_config.json"},tensors:{model_weights:"model:model.safetensors.index.json"}}]},B$={family:"vieneu_v3_turbo",display_name:"VieNeu-TTS v3 Turbo",description:"On-device Vietnamese/English TTS (48 kHz) with instant voice cloning from 3-5 s of reference audio, by Phạm Nguyễn Ngọc Bảo (pnnbao97). Takes SEA-G2P phonemes as text input.",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline"],languages:["vi","en"],capabilities:{clone:["speaker_reference"]},runtime:{tags:["gguf"]},options:{request:[{name:"auto_frame_cap",type:"bool",description:"Cap the generation budget using the chunk's phoneme count. Legacy frame_cap remains accepted.",required:!1,default:!0},{name:"text_chunk_min_size",type:"int",description:"Phoneme-string chunks shorter than this character count join a neighbour. Legacy text_chunk_min remains accepted.",required:!1,default:20},{name:"speaker_embedding_file",type:"path",description:"File containing a comma-separated 192-dimensional speaker embedding.",required:!1},{name:"speaker_embedding",type:"string",description:"Inline comma-separated 192-dimensional speaker embedding.",required:!1},{name:"reference_codes",type:"string",description:"Pre-encoded reference codes in row-major order, comma- or space-separated; codebooks per frame come from the checkpoint.",required:!1},{name:"reference_codes_file",type:"path",description:"Pre-encoded reference codes, one frame per line. Replaces audio encoding and can be used with a speaker embedding instead of reference audio.",required:!1},{name:"x_vector_only_mode",type:"bool",description:"Clone using only the speaker embedding. Defaults to true for embedding-only input, otherwise false.",required:!1},{name:"encode_reference_only",type:"bool",description:"Encode reference audio and return an acoustic-tokens artifact without generating speech.",required:!1,default:!1},{name:"max_tokens",type:"int",description:"Maximum generated frames per text chunk; uses the checkpoint max_new_tokens setting (300 fallback). Each frame represents 80 ms.",required:!1,min:1},{name:"do_sample",type:"bool",description:"Enable sampling for all codebooks unless subtalker_do_sample overrides later codebooks.",required:!1,default:!0},{name:"temperature",type:"float",description:"Sampling temperature for all codebooks unless overridden for the subtalker.",required:!1,default:.8},{name:"top_k",type:"int",description:"Top-k sampling limit for all codebooks unless overridden for the subtalker.",required:!1,default:25},{name:"top_p",type:"float",description:"Nucleus cutoff within top-k candidates, unless overridden for the subtalker.",required:!1,default:.95},{name:"repetition_penalty",type:"float",description:"Repetition penalty applied independently to each codebook.",required:!1,default:1.2},{name:"repetition_window",type:"int",description:"Recent frames remembered per codebook for repetition penalties; zero uses all history.",required:!1,min:0,default:64},{name:"babble_retries",type:"int",description:"Regenerations for short chunks that exceed their text; zero disables the guard.",required:!1,min:0,default:2},{name:"subtalker_temperature",type:"float",description:"Temperature override for later codebooks; omitted or negative inherits temperature.",required:!1},{name:"subtalker_top_k",type:"int",description:"Top-k override for later codebooks; omitted or negative inherits top_k.",required:!1},{name:"subtalker_top_p",type:"float",description:"Nucleus cutoff override for later codebooks; omitted or negative inherits top_p.",required:!1},{name:"subtalker_do_sample",type:"bool",description:"Sampling override for later codebooks; inherits do_sample when omitted.",required:!1},{name:"seed",type:"int",description:"Sampling seed; omitted draws a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Maximum character budget per phoneme-string chunk; must be positive.",required:!1,min:1,default:200}],session:[{name:"g2p_dict_file",type:"path",description:"SEA-G2P dictionary file (sea_g2p.bin). When set, input is Vietnamese/English text rather than precomputed phonemes.",required:!1},{name:"g2p_library",type:"path",description:"SEA-G2P shared library used with g2p_dict_file; searched by library name when omitted.",required:!1},{name:"mem_saver",type:"bool",description:"Release the talker cached-step graph after each request.",required:!1,default:!1},{name:"voice_prompt_cache_slots",type:"int",description:"Prepared voice-prompt cache slots; zero disables caching.",required:!1,min:0,default:1},{name:"weight_type",type:"enum",description:"Shared talker matmul storage.",required:!1,preset:"weight_type_full",default:"native"},{name:"conv_weight_type",type:"enum",description:"Speaker encoder convolution weight storage.",required:!1,values:["native","f32","f16"],default:"f32"},{name:"talker_weight_type",type:"enum",description:"Talker matmul storage; inherits weight_type when omitted.",required:!1,preset:"weight_type_full"},{name:"talker_graph_arena_mb",type:"int",description:"Talker graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:256},{name:"speech_decoder_graph_arena_mb",type:"int",description:"Codec decoder graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:32},{name:"speaker_encoder_graph_arena_mb",type:"int",description:"Speaker encoder graph metadata arena. Size in MiB; must be positive.",required:!1,min:1,default:32},{name:"talker_constant_context_mb",type:"int",description:"Talker constant metadata context. Size in MiB; must be positive.",required:!1,min:1,default:4096},{name:"code_predictor_constant_context_mb",type:"int",description:"Code predictor constant metadata context. Size in MiB; must be positive.",required:!1,min:1,default:1536},{name:"speech_decoder_constant_context_mb",type:"int",description:"Codec decoder constant metadata context. Size in MiB; must be positive.",required:!1,min:1,default:1536}],load:[]},ui:{recommended_package:"vieneu_v3_turbo_q8_0",tags:["TTS","Clone","GGUF"],docs:["docs/models/vieneu_v3_turbo.md","docs/tts.md","docs/gguf.md"]},packages:[{id:"vieneu_v3_turbo_q8_0",display_name:"VieNeu-TTS v3 Turbo Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VieNeu-TTS-v3-Turbo-GGUF",files:["gguf/vieneu-v3-turbo-q8_0.gguf","gguf/voices/manifest.json","gguf/voices/minh_quan_pro/ref_codes.txt","gguf/voices/minh_quan_pro/speaker.emb.txt"],download:{kind:"huggingface_snapshot",repo:"pnnbao-ump/VieNeu-TTS-v3-Turbo"},strip_prefix:"gguf"},{id:"vieneu_v3_turbo_bf16",display_name:"VieNeu-TTS v3 Turbo BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VieNeu-TTS-v3-Turbo-GGUF",files:["gguf/vieneu-v3-turbo-bf16.gguf","gguf/voices/manifest.json","gguf/voices/minh_quan_pro/ref_codes.txt","gguf/voices/minh_quan_pro/speaker.emb.txt"],download:{kind:"huggingface_snapshot",repo:"pnnbao-ump/VieNeu-TTS-v3-Turbo"},strip_prefix:"gguf"},{id:"vietneu_tts_v3_turbo_q8_0",display_name:"VieNeu-TTS v3 Turbo Q8_0 GGUF (first community port, July 2026 weights)",format:"gguf",precision:"q8_0",target_directory:"VieNeu-TTS-v3-Turbo-GGUF-2026-07",files:["model.gguf"],download:{kind:"huggingface_snapshot",repo:"phuocnguyen90/VieNeu-TTS-v3-Turbo-GGUF"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",speech_tokenizer_config:"model:speech_tokenizer/config.json"},optional_files:{generation_config:"model:generation_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"},speech_tokenizer_weights:{source:"weights:",prefix:"speech_tokenizer_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",speech_tokenizer_config:"model:speech_tokenizer/config.json"},optional_files:{generation_config:"model:generation_config.json",vocab:"model:vocab.json",merges:"model:merges.txt",tokenizer_json:"model:tokenizer.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{model_weights:"model:model.safetensors",speech_tokenizer_weights:"model:speech_tokenizer/model.safetensors"}}]},P$={schema_version:1,family:"voxcpm1",display_name:"VoxCPM1",description:"OpenBMB VoxCPM 0.5B tokenizer-free TTS model supporting short-reference voice cloning and streaming output (16kHz).",category:"tts",status:"supported",tasks:["tts","clone"],modes:["offline","streaming"],languages:["zh","en","ja","ko"],capabilities:{clone:["speaker_reference"]},dependencies:[],options:{request:[{name:"text_chunk_mode",type:"enum",description:"Text chunking mode; default tag_aware.",preset:"text_chunk_mode_full",required:!1,default:"tag_aware"},{name:"seed",type:"int",description:"Random seed for MiniCPM and diffusion sampling.",required:!1},{name:"max_tokens",type:"int",description:"Maximum MiniCPM output tokens; default 4096. Zero selects model max_length; negative counts are rejected.",required:!1,default:4096},{name:"min_tokens",type:"int",description:"Minimum MiniCPM output tokens before an EOS stop is honored; default 2.",required:!1,default:2},{name:"num_inference_steps",type:"int",description:"CFM diffusion sampling steps; default 10. Must be positive.",required:!1,default:10},{name:"guidance_scale",type:"float",description:"CFM classifier-free guidance rate. Must be nonnegative.",required:!1,default:2},{name:"retry_badcase",type:"bool",description:"Retry when generation is detected as a bad case; defaults to true offline and false in streaming. Streaming ignores an explicit true value with a warning.",required:!1},{name:"retry_badcase_max_times",type:"int",description:"Maximum total generation attempts when retrying bad cases, including the initial attempt; default 3. Must be positive.",required:!1,default:3},{name:"retry_badcase_ratio_threshold",type:"float",description:"Bad-case ratio threshold for retry decisions. Must be positive.",required:!1},{name:"prompt_text",type:"string",description:"Text prompt for prompt-continuation voice cloning.",required:!1},{name:"reference_text",type:"string",description:"Alias for prompt_text; text prompt for prompt-continuation voice cloning.",required:!1},{name:"text_chunk_size",type:"int",description:"Maximum characters per offline text chunk; must be positive. Does not control streaming chunk cadence.",required:!1,min:1,default:2048},{name:"language",type:"string",description:"Language hint for Chinese-script normalization; Cantonese/yue preserves Traditional characters. Inherits structured transcript or voice language when provided.",required:!1}],session:[{name:"lora",type:"path",description:"Native LoRA directory or checkpoint file with adjacent lora_config.json; merged into generator weights at session creation.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's configured alpha/r scaling; default 1.",required:!1,default:1},{name:"mem_saver",type:"bool",description:"Use tighter graph workspaces and release request runtime graphs; default false.",required:!1,default:!1},{name:"prompt_cache_slots",type:"int",description:"Prompt and prompt-audio embedding cache slots; default 1.",required:!1,default:1},{name:"weight_type",type:"enum",description:"Model weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"audiovae_weight_type",type:"enum",description:"AudioVAE weight storage type.",preset:"weight_type_full",required:!1,default:"native"},{name:"weight_context_mb",type:"int",description:"Model weight graph context size in MB.",required:!1},{name:"text_embedding_graph_arena_mb",type:"int",description:"Text embedding host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"lm_step_graph_arena_mb",type:"int",description:"LM step host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"projection_graph_arena_mb",type:"int",description:"Projection host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"local_encoder_graph_arena_mb",type:"int",description:"Local encoder host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"dit_graph_arena_mb",type:"int",description:"DiT estimator host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"audiovae_weight_context_mb",type:"int",description:"AudioVAE weight graph context size in MB.",required:!1},{name:"audiovae_graph_arena_mb",type:"int",description:"AudioVAE decoder host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"audiovae_encoder_graph_arena_mb",type:"int",description:"AudioVAE encoder host graph-metadata arena size in MiB, not device workspace.",required:!1},{name:"audiovae_latent_capacity",type:"int",description:"AudioVAE decoder latent frame capacity.",required:!1},{name:"audiovae_encoder_sample_capacity",type:"int",description:"AudioVAE encoder sample capacity.",required:!1}],load:[]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"voxcpm1_0_5b_q8_0",tags:["TTS","Clone","GGUF","Stream"],docs:["docs/models/voxcpm1.md","docs/tts.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"voxcpm1_0_5b_q8_0",display_name:"VoxCPM 0.5B Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VoxCPM1-GGUF",files:["VoxCPM1-GGUF/voxcpm-0.5b-q8_0-audiovae-f16.gguf"],strip_prefix:"VoxCPM1-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},optional_files:{special_tokens_map:"model:special_tokens_map.json"},tensors:{weights:{source:"weights:"},audiovae_weights:{source:"weights:"}}}]},j$={family:"voxcpm2",display_name:"VoxCPM2",description:"OpenBMB tokenizer-free TTS model supporting 30 languages and 9 Chinese dialects, with 48 kHz output, natural-language voice design, controllable short-reference voice cloning, and expressive style guidance.",category:"tts",status:"supported",tasks:["tts","clone","design"],modes:["offline","streaming"],languages:["ar","my","zh","zh dialects","da","nl","en","fi","fr","de","el","he","hi","id","it","ja","km","ko","lo","ms","no","pl","pt","ru","es","sw","sv","tl","th","tr","vi"],options:{request:[{name:"min_tokens",type:"int",description:"Minimum generated audio tokens.",required:!1,min:0,default:2},{name:"max_tokens",type:"int",description:"Maximum generated audio tokens. Zero resolves to model max_length; requires min_tokens <= resolved max_tokens <= model limit.",required:!1,min:0,default:4096},{name:"num_inference_steps",type:"int",description:"Flow sampling steps. Must be positive.",required:!1,default:10},{name:"guidance_scale",type:"float",description:"Classifier-free guidance scale. Must be nonnegative.",required:!1,default:2},{name:"retry_badcase",type:"bool",description:"Retry detected bad generations. Offline only; streaming requires false.",required:!1,default:!0},{name:"retry_badcase_max_times",type:"int",description:"Total attempts including the initial attempt, not extra retries; must be positive.",required:!1,default:3},{name:"retry_badcase_ratio_threshold",type:"float",description:"Bad-case audio/text length ratio threshold. Must be positive.",required:!1,default:6},{name:"seed",type:"int",description:"Sampling seed.",required:!1,min:0,max:4294967295,default:1234},{name:"cfm_noise_file",type:"path",description:"Precomputed flow noise file.",required:!1},{name:"stream_chunk_policy",type:"enum",description:"Streaming decoder cadence: grow emits one patch first, then doubles toward stream_frames_per_event; fixed uses the configured size. Ignored offline.",required:!1,values:["grow","fixed"],default:"grow"},{name:"stream_frames_per_event",type:"int",description:"Maximum generated latent patches per streaming decoder event. Set to 1 for one-patch emission. Ignored offline.",required:!1,min:1,default:4},{name:"stream_left_context",type:"int",description:"Previous patches decoded as streaming left context.",required:!1,min:0,max:8,default:3},{name:"ultimate_clone",type:"bool",description:"Use the voice reference itself as the continuation prompt. Requires reference audio and reference_text or prompt_text; cannot be combined with explicit prompt audio.",required:!1,default:!1},{name:"prompt_text",type:"string",description:"Transcript for continuation prompt audio, distinct from the base voice reference.",required:!1},{name:"chunk_strategy",type:"enum",description:"Long-form continuation or independent generation per chunk. Offline only.",required:!1,values:["continuation","stateless"],default:"continuation"},{name:"text_chunk_size",type:"int",description:"Framework long-form text chunk size. Offline only.",required:!1,default:2048},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode. Offline only.",required:!1,values:["default","tag_aware","japanese","endline"],default:"tag_aware"}],session:[{name:"audiovae_tile_frames",type:"int",description:"Opt-in causal AudioVAE tiling. Maximum new latent frames per tile; zero preserves full decoding.",required:!1,default:0,min:0},{name:"perf_mode",type:"enum",description:"Opt-in packed attention and MLP projections. May change numerical results; off preserves standard execution.",required:!1,values:["off","cuda_perf"],default:"off"},{name:"lora",type:"path",description:"Native LoRA directory or checkpoint file with adjacent lora_config.json; merged into generator weights at session creation.",required:!1},{name:"lora_scale",type:"float",description:"Multiplier for the adapter's configured alpha/r scaling; default 1.",required:!1,default:1},{name:"weight_type",type:"enum",description:"Language-model weight storage; does not override AudioVAE storage.",required:!1,preset:"weight_type_full"},{name:"audiovae_weight_type",type:"enum",description:"AudioVAE weight storage; defaults independently to native, not the shared weight_type.",required:!1,preset:"weight_type_full"},{name:"prompt_cache_slots",type:"int",description:"Cached encoded prompt slots; zero disables reuse.",required:!1,min:0,default:1},{name:"mem_saver",type:"bool",description:"Release staged runtime graphs.",required:!1,default:!0},{name:"weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:3072},{name:"text_embedding_graph_arena_mb",type:"int",description:"Text embedding host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:64},{name:"lm_step_graph_arena_mb",type:"int",description:"LM step host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:1024},{name:"projection_graph_arena_mb",type:"int",description:"Projection host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:256},{name:"local_encoder_graph_arena_mb",type:"int",description:"Local encoder host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:512},{name:"dit_graph_arena_mb",type:"int",description:"DiT estimator host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:1024},{name:"audiovae_weight_context_mb",type:"int",description:"Context or graph arena size in MiB.",required:!1,min:1,default:768},{name:"audiovae_graph_arena_mb",type:"int",description:"AudioVAE decoder host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:1024},{name:"audiovae_encoder_graph_arena_mb",type:"int",description:"AudioVAE encoder host graph-metadata arena size in MiB, not device workspace.",required:!1,min:1,default:1024},{name:"audiovae_latent_capacity",type:"int",description:"Optional decoder graph reservation in latent frames, reused by shorter requests and doubled when exceeded; omitted builds the graph at each request's own frame count.",required:!1,min:1},{name:"exec_plan",type:"string",description:"JSON component execution plans. audiovae: impl=default/ggml; backend must match the session; no artifacts. params.threads is a nonnegative int: positive values require a CPU session and enable a dedicated AudioVAE backend with streaming decode overlap; also controls offline decoding and prompt encoding threads. Omitted/0 shares the session backend.",required:!1,default:"{}"},{name:"audiovae_encoder_sample_capacity",type:"int",description:"Reserved encoder sample capacity.",required:!1,min:1,default:24e4}],load:[]},capabilities:{clone:["speaker_reference"],design:["voice_design"]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"voxcpm2_q8_0",tags:["TTS","Clone","Design","GGUF","Stream"],docs:["docs/tts.md","docs/gguf.md","docs/models/vocalrender.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"voxcpm2_q8_0",display_name:"VoxCPM2 Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"VoxCPM2-GGUF",files:["VoxCPM2-GGUF/voxcpm2-q8_0.gguf"],strip_prefix:"VoxCPM2-GGUF"},{id:"voxcpm2_bf16",display_name:"VoxCPM2 BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"VoxCPM2-GGUF",files:["VoxCPM2-GGUF/voxcpm2-bf16.gguf"],strip_prefix:"VoxCPM2-GGUF"},{id:"voxcpm2_orig",display_name:"VoxCPM2 Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"VoxCPM2-GGUF",files:["VoxCPM2-GGUF/voxcpm2-orig.gguf"],strip_prefix:"VoxCPM2-GGUF"},{id:"voxcpm2_vocalrender_pro",display_name:"VocalRender-Pro (VoxCPM2) Original-Dtype GGUF",format:"gguf",precision:"orig",target_directory:"VoxCPM2-GGUF",files:["VoxCPM2-GGUF/finetune/vocalrender-pro-orig.gguf"],strip_prefix:"VoxCPM2-GGUF"},{id:"voxcpm2_safetensors",display_name:"VoxCPM2 Safetensors",format:"safetensors",precision:"native",target_directory:"VoxCPM2",files:["config.json","model.safetensors","tokenizer.json","tokenizer_config.json"],download:{kind:"huggingface_snapshot",repo:"OpenBMB/VoxCPM2"}}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{weights:{source:"weights:",prefix:"weights"},audiovae_weights:{source:"weights:",prefix:"audiovae_weights"}}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_config:"model:tokenizer_config.json",tokenizer_json:"model:tokenizer.json",special_tokens_map:"model:special_tokens_map.json"},tensors:{weights:"model:model.safetensors",audiovae_weights:"model:audiovae.safetensors"}}]},N$={family:"voxtral_realtime",display_name:"Voxtral Mini 4B Realtime",description:"Mistral 13-language realtime ASR model with a natively streaming causal audio encoder, configurable low-latency transcription delay, and accuracy competitive with offline open-source systems.",category:"asr",status:"supported",tasks:["asr"],modes:["offline","streaming"],languages:["en","zh","hi","es","ar","fr","pt","ru","de","ja","ko","it","nl"],options:{request:[{name:"max_tokens",type:"int",min:1,description:"Maximum generated transcript tokens; omitted uses the audio-derived limit. Offline decoding only; ignored by live streaming.",required:!1},{name:"do_sample",type:"bool",default:!1,description:"Sample rather than greedily decode.",required:!1},{name:"temperature",type:"float",min:0,default:1,description:"Sampling temperature; must be > 0.",required:!1},{name:"top_p",type:"float",min:0,max:1,default:1,description:"Nucleus sampling probability in (0, 1].",required:!1},{name:"top_k",type:"int",min:0,default:50,description:"Top-k sampling limit; zero disables filtering.",required:!1},{name:"seed",type:"int",min:0,default:1234,description:"Sampling seed.",required:!1}],session:[{name:"weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],default:"native",description:"Shared weight storage type.",required:!1},{name:"audio_encoder_weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],description:"Audio encoder weight storage; inherits weight_type.",required:!1},{name:"text_decoder_weight_type",type:"enum",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],description:"Text decoder weight storage; inherits weight_type.",required:!1},{name:"audio_encoder_graph_arena_mb",type:"int",min:1,default:512,description:"Audio encoder graph arena in MiB.",required:!1},{name:"audio_encoder_weight_context_mb",type:"int",min:1,default:128,description:"Audio encoder weight context in MiB.",required:!1},{name:"text_decoder_prefill_graph_arena_mb",type:"int",min:1,default:512,description:"Decoder prefill graph arena in MiB. Decoder uses the maximum of prefill and decode arena settings.",required:!1},{name:"text_decoder_decode_graph_arena_mb",type:"int",min:1,default:512,description:"Decoder step graph arena in MiB. Decoder uses the maximum of prefill and decode arena settings.",required:!1},{name:"text_decoder_weight_context_mb",type:"int",min:1,default:128,description:"Decoder weight context in MiB.",required:!1},{name:"stream_decode_cache_steps",type:"int",default:1024,description:"Streaming decoder cache capacity in 80 ms steps. Must be positive and no greater than checkpoint sliding_window.",required:!1},{name:"stream_batch_tokens",type:"int",min:1,default:1,description:"Audio tokens per streaming encoder forward.",required:!1}],load:[]},capabilities:{asr:["partial_results"]},runtime:{tags:["gguf","stream"]},ui:{recommended_package:"voxtral_realtime_q8_0",tags:["ASR","GGUF","Stream"],docs:["docs/models/voxtral_realtime.md","docs/asr.md","docs/gguf.md"]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"voxtral_realtime_q8_0",display_name:"Voxtral Mini 4B Realtime Q8_0 GGUF",default:!0,format:"gguf",precision:"q8_0",target_directory:"Voxtral-Mini-4B-Realtime-2602-GGUF",files:["Voxtral-Mini-4B-Realtime-2602-GGUF/voxtral-mini-4b-realtime-2602-q8_0.gguf"],strip_prefix:"Voxtral-Mini-4B-Realtime-2602-GGUF"},{id:"voxtral_realtime_q4_k",display_name:"Voxtral Mini 4B Realtime Q4_K GGUF",format:"gguf",precision:"q4_k",target_directory:"Voxtral-Mini-4B-Realtime-2602-GGUF",files:["Voxtral-Mini-4B-Realtime-2602-GGUF/voxtral-mini-4b-realtime-2602-q4_k.gguf"],strip_prefix:"Voxtral-Mini-4B-Realtime-2602-GGUF"},{id:"voxtral_realtime_bf16",display_name:"Voxtral Mini 4B Realtime BF16 GGUF",format:"gguf",precision:"bf16",target_directory:"Voxtral-Mini-4B-Realtime-2602-GGUF",files:["Voxtral-Mini-4B-Realtime-2602-GGUF/voxtral-mini-4b-realtime-2602-bf16.gguf"],strip_prefix:"Voxtral-Mini-4B-Realtime-2602-GGUF"}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tekken:"model:tekken.json"},optional_files:{params:"model:params.json",readme:"model:README.md"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",generation_config:"model:generation_config.json",processor_config:"model:processor_config.json",tekken:"model:tekken.json"},optional_files:{params:"model:params.json",readme:"model:README.md"},tensors:{weights:"model:model.safetensors"}}]},O$={schema_version:1,family:"voxtral_tts",display_name:"Voxtral 4B TTS",description:"Mistral's Ministral-based autoregressive and flow-matching TTS model with 20 embedded preset voices.",category:"tts",status:"supported",tasks:["tts"],modes:["offline","streaming"],languages:["en","fr","es","de","it","pt","nl","ar","hi"],runtime:{tags:["gguf"]},capabilities:{tts:["built_in_voices","long_form"]},options:{request:[{name:"voice_id",type:"enum",description:"Embedded preset voice; the released checkpoint does not contain the encoder needed for reference-audio cloning.",values:["casual_female","casual_male","cheerful_female","neutral_female","neutral_male","pt_male","pt_female","nl_male","nl_female","it_male","it_female","fr_male","fr_female","es_male","es_female","de_male","de_female","ar_male","hi_male","hi_female"],required:!1,default:"casual_male"},{name:"max_tokens",type:"int",description:"Maximum generated audio frames per text chunk; each frame represents 80 ms.",required:!1,min:1,default:2048},{name:"num_inference_steps",type:"int",description:"Euler integration steps for the per-frame acoustic flow model.",required:!1,min:1,default:7},{name:"guidance_scale",type:"float",description:"Acoustic classifier-free guidance scale; the AR backbone does not use CFG.",required:!1,min:0,default:1.2},{name:"seed",type:"int",description:"Acoustic noise seed; omitted requests select a random seed.",required:!1,min:0},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per framework long-form text chunk.",required:!1,min:1,default:300},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",values:["default","tag_aware","japanese","endline"],required:!1,default:"default"}],session:[{name:"weight_type",type:"enum",description:"Weight storage type; native preserves the package's tensor types.",values:["native","f32","f16","bf16","q4_0","q4_1","q5_0","q5_1","q2_k","q3_k","q4_k","q5_k","q6_k","q8_0","nvfp4"],required:!1,default:"native"},{name:"kv_cache_type",type:"enum",description:"AR key/value cache storage type.",values:["f32","f16","bf16"],required:!1,default:"f16"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"voxtral_4b_tts_2603_bf16",display_name:"Voxtral 4B TTS 2603 BF16 GGUF",default:!0,format:"gguf",precision:"bf16",target_directory:"Voxtral-4B-TTS-2603-GGUF",files:["Voxtral-4B-TTS-2603-GGUF/voxtral-4b-tts-2603-bf16.gguf"],strip_prefix:"Voxtral-4B-TTS-2603-GGUF"},{id:"voxtral_4b_tts_2603_q8_0",display_name:"Voxtral 4B TTS 2603 Q8_0 GGUF",default:!1,format:"gguf",precision:"q8_0",target_directory:"Voxtral-4B-TTS-2603-GGUF",files:["Voxtral-4B-TTS-2603-GGUF/voxtral-4b-tts-2603-q8_0.gguf"],strip_prefix:"Voxtral-4B-TTS-2603-GGUF"}],dependencies:[],ui:{recommended_package:"voxtral_4b_tts_2603_bf16",tags:["TTS","GGUF"],docs:["docs/models/voxtral_tts.md","docs/gguf.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:params.json",tokenizer_json:"model:tokenizer.json",tokenizer_config:"model:tokenizer_config.json"},tensors:{model_weights:"weights:"}}]},I$={schema_version:1,family:"whistle_asr",display_name:"Whistle ASR",description:"Whistle offline speech recognition with FP32 GGUF weights, a GGML encoder and a host decoder.",category:"asr",status:"experimental",tasks:["asr"],modes:["offline"],languages:["en","de","fr","es","it","nl","pl"],runtime:{tags:["gguf"]},capabilities:{},options:{request:[{name:"language",type:"string",description:"Force one supported language; omit to detect the language.",required:!1}],session:[{name:"exec_plan",type:"string",description:"JSON component execution plans. Component decoder accepts impl host/neon (default host), both on CPU independently of the encoder backend. The experimental neon implementation accelerates the vocabulary projection with the framework NEON library and requires ENGINE_ENABLE_NEON=ON and AArch64 NEON. No artifacts or params are used.",required:!1,default:"{}"}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/audio.cpp-gguf",revision:"main",gated:!1}},packages:[{id:"whistle_asr_f32",display_name:"Whistle ASR GGUF F32",default:!0,format:"gguf",precision:"f32",target_directory:"Whistle-GGUF",files:["Whistle-GGUF/whistle-f32.gguf"],strip_prefix:"Whistle-GGUF"}],dependencies:[],ui:{tags:["ASR","GGUF"],docs:["docs/models/whistle_asr.md"],recommended_package:"whistle_asr_f32"},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{config:"model:config.json",tokenizer_blob:"model:tokenizer.blob",mel_filterbank:"model:mel_filterbank_80.f32",hadamard_perm1:"model:hadamard_perm1.f32",hadamard_perm2:"model:hadamard_perm2.f32"},tensors:{weights:"weights:"}},{format:"safetensors",roots:{model:"."},files:{config:"model:config.json",tokenizer_blob:"model:tokenizer.blob",mel_filterbank:"model:mel_filterbank_80.f32",hadamard_perm1:"model:hadamard_perm1.f32",hadamard_perm2:"model:hadamard_perm2.f32"},tensors:{weights:"model:whistle.safetensors"}}]},D$={schema_version:1,family:"xtts_v2",display_name:"XTTS v2",description:"Coqui XTTS v2 cross-lingual text-to-speech with voice cloning: GPT-2 mel-code generator, perceiver conditioning resampler, HiFi-GAN decoder, and speaker encoder.",category:"tts",status:"community",tasks:["tts"],modes:["offline"],languages:["en","es","fr","de","it","pt","pl","tr","ru","nl","cs","ar","zh-cn","hu","ko","ja","hi"],capabilities:{tts:["speaker_reference"]},options:{request:[{name:"language",type:"string",description:"Source language for text conditioning (e.g. 'en'); also selects tokenizer normalization.",required:!1,default:"en"},{name:"temperature",type:"float",description:"AR sampling temperature; official default 0.75.",required:!1,min:0,default:.75},{name:"top_k",type:"int",description:"AR top-k sampling; official default 50.",required:!1,min:0,default:50},{name:"top_p",type:"float",description:"AR nucleus sampling threshold; official default 0.85.",required:!1,min:0,max:1,default:.85},{name:"repetition_penalty",type:"float",description:"AR repetition penalty; official default 10.0.",required:!1,min:1,default:10},{name:"max_mel_tokens",type:"int",description:"Maximum mel codes to generate; official default 605.",required:!1,min:1,default:605},{name:"seed",type:"int",description:"Sampling seed; omitted selects a random seed.",required:!1,min:0,max:4294967295},{name:"text_chunk_size",type:"int",description:"Maximum Unicode codepoints per framework text chunk; default 256.",required:!1,min:1,default:256},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",preset:"text_chunk_mode_full",required:!1,default:"word_budget"}],session:[{name:"conditionals_cache_slots",type:"int",description:"Prepared voice-conditioning cache slots; 0 disables caching.",required:!1,min:0,default:1}],load:[]},runtime:{tags:["gguf"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{vocoder:"model:xtts-v2-vocoder-f16.gguf"},tensors:{gpt_weights:{source:"weights:"},vocoder_weights:{source:"model:xtts-v2-vocoder-f16.gguf"}}}],packages:[{id:"xtts_v2_gguf_q8_0",display_name:"XTTS v2 GGUF (Q8_0)",default:!0,format:"gguf",precision:"q8_0",target_directory:"XTTS-v2-Q8",files:["q8_0/xtts-v2-gpt-q8_0.gguf","q8_0/xtts-v2-vocoder-f16.gguf","q8_0/mel_norms.bin"],download:{kind:"huggingface_snapshot",repo:"onicubag/xTTSv2-GGUF"},strip_prefix:"q8_0"},{id:"xtts_v2_gguf",display_name:"XTTS v2 GGUF (Original)",default:!1,format:"gguf",precision:"orig",target_directory:"XTTS-v2",files:["xtts-v2-gpt.gguf","xtts-v2-vocoder-f16.gguf","mel_norms.bin"],download:{kind:"huggingface_snapshot",repo:"onicubag/xTTSv2-GGUF"}},{id:"xtts_v2_gguf_q4_k_m",display_name:"XTTS v2 GGUF (Q4_K_M)",default:!1,format:"gguf",precision:"q4_k_m",target_directory:"XTTS-v2-Q4_K_M",files:["q4_k_m/xtts-v2-gpt-q4_k_m.gguf","q4_k_m/xtts-v2-vocoder-f16.gguf","q4_k_m/mel_norms.bin"],download:{kind:"huggingface_snapshot",repo:"onicubag/xTTSv2-GGUF"},strip_prefix:"q4_k_m"}],dependencies:[],ui:{tags:["TTS","Clone","GGUF"],docs:["docs/community_models/xtts_v2.md"],recommended_package:"xtts_v2_gguf_q8_0"}},L$={schema_version:1,family:"yue2",display_name:"YuE2",description:"YuE2 music generation model with symbolic ABC planning, semantic codec generation, NAR acoustic flow synthesis, and Oobleck VAE decode.",category:"audio_generation",status:"supported",tasks:["music"],modes:["offline"],languages:["en"],capabilities:{music:["lyrics","style_control"]},runtime:{tags:["gguf"]},dependencies:[],ui:{recommended_package:"yue2_main_q8_0",tags:["Music","GGUF"],docs:["docs/models/yue2.md","docs/music_generation.md","docs/gguf.md"]},options:{request:[{name:"style",type:"string",description:"Song style/tags.",required:!0},{name:"lyrics",type:"string",description:"Lyrics text. Leave empty for instrumental generation; if omitted, the CLI text input is used.",required:!1},{name:"cot",type:"enum",values:["off","melody","full"],description:"Symbolic planning route. off skips ABC generation; melody/full generate or consume ABC before music tokens.",required:!1,default:"full"},{name:"stop_after",type:"enum",values:["abc","semantic","audio"],description:"Last stage to run. abc writes the generated score only; semantic also writes the semantic token export; audio renders the full song.",required:!1,default:"audio"},{name:"abc",type:"string",description:"External ABC score text for melody/full routes.",required:!1},{name:"abc_file",type:"string",description:"Path to an external ABC score file for melody/full routes.",required:!1},{name:"semantic_prefix",type:"string",description:"JSON array of semantic codec indices to force as the start of the music stream.",required:!1},{name:"semantic_prefix_file",type:"string",description:"Path to a JSON array of semantic codec indices to force as the start of the music stream.",required:!1},{name:"nar_noise_file",type:"string",description:"Path to a raw float32 noise file for NAR generation, shaped [frames,64].",required:!1},{name:"export_semantic",type:"bool",description:"Attach the semantic token stream as a semantic artifact (JSON array of codec indices); default false.",required:!1,default:!1},{name:"guidance_scale",type:"float",description:"Semantic classifier-free guidance scale. Default follows the upstream route defaults. Omitted defaults to 1.01 with cot=off, otherwise 1.0.",required:!1,min:0,max:20},{name:"seed",type:"int",description:"Generation seed. Must be nonnegative and less than 2^63.",required:!1,min:0,default:1234},{name:"num_inference_steps",type:"int",description:"NAR midpoint ODE steps.",required:!1,min:1,default:8},{name:"abc_temperature",type:"float",description:"ABC planner sampling temperature.",required:!1,min:0,max:5},{name:"abc_top_p",type:"float",description:"ABC planner nucleus sampling probability. Must be in (0, 1].",required:!1,max:1},{name:"abc_top_k",type:"int",description:"ABC planner top-k sampling limit.",required:!1,min:1},{name:"abc_repetition_penalty",type:"float",description:"ABC planner repetition penalty. Must be positive.",required:!1},{name:"abc_penalty_window",type:"int",description:"ABC planner repetition penalty window.",required:!1,min:1},{name:"abc_min_tokens",type:"int",description:"Minimum ABC planner tokens before EOS is accepted.",required:!1,min:0},{name:"abc_max_tokens",type:"int",description:"Maximum ABC planner tokens. Zero is allowed when min_tokens is also zero.",required:!1,min:0},{name:"semantic_temperature",type:"float",description:"Semantic codec sampling temperature.",required:!1,min:0,max:5},{name:"semantic_top_p",type:"float",description:"Semantic codec nucleus sampling probability. Must be in (0, 1].",required:!1,max:1},{name:"semantic_top_k",type:"int",description:"Semantic codec top-k sampling limit.",required:!1,min:1},{name:"semantic_repetition_penalty",type:"float",description:"Semantic codec repetition penalty. Must be positive.",required:!1},{name:"semantic_penalty_window",type:"int",description:"Semantic codec repetition penalty window.",required:!1,min:1},{name:"semantic_min_tokens",type:"int",description:"Minimum semantic tokens before EOS is accepted.",required:!1,min:0},{name:"semantic_max_tokens",type:"int",description:"Maximum semantic codec tokens. Zero is allowed when min_tokens is also zero.",required:!1,min:0}],session:[{name:"ar_lora",type:"string",description:"AR adapter safetensors file; native, PEFT, and ComfyUI LoRA layouts. Absolute path or relative to the model root. Requires session reload.",required:!1},{name:"ar_lora_scale",type:"float",description:"AR LoRA delta scale; zero disables the adapter. Requires session reload.",required:!1,default:1},{name:"nar_lora",type:"string",description:"NAR adapter safetensors file. Absolute path or relative to the model root. Requires session reload.",required:!1},{name:"nar_lora_scale",type:"float",description:"NAR LoRA delta scale; full vae2llm/llm2vae replacements are unscaled. Zero disables the entire adapter. Requires session reload.",required:!1,default:1},{name:"weight_type",type:"enum",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"],description:"Shared weight storage type.",required:!1,default:"native"},{name:"model_weight_type",type:"enum",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"],description:"YuE2 MoT weight storage type. Omitted inherits weight_type.",required:!1},{name:"model_gguf",type:"string",description:"Yue2 main AR/NAR component GGUF file relative to the model root.",required:!1,default:"yue2-3b-q8_0.gguf"},{name:"vae_gguf",type:"string",description:"Yue2 VAE component GGUF file relative to the model root.",required:!1,default:"yue2-vae-f16.gguf"},{name:"vae_weight_type",type:"enum",values:["native","f32","f16","bf16","q8_0","q4_0","q4_k"],description:"YuE2 VAE weight storage type. Omitted inherits weight_type.",required:!1},{name:"model_weight_context_mb",type:"int",description:"YuE2 MoT weight context size in MiB.",required:!1,min:1,default:32},{name:"vae_weight_context_mb",type:"int",description:"YuE2 VAE weight context size in MiB.",required:!1,min:1,default:32},{name:"ar_prefill_graph_arena_mb",type:"int",description:"AR prefill graph arena size in MiB.",required:!1,min:1,default:32},{name:"ar_decode_graph_arena_mb",type:"int",description:"AR one-token decode graph arena size in MiB.",required:!1,min:1,default:32},{name:"nar_graph_arena_mb",type:"int",description:"NAR acoustic flow graph arena size in MiB.",required:!1,min:1,default:32},{name:"vae_graph_arena_mb",type:"int",description:"VAE decode graph arena size in MiB.",required:!1,min:1,default:32},{name:"attention",type:"enum",description:"NAR acoustic-flow attention lowering; auto selects the backend-appropriate implementation.",required:!1,values:["auto","flash","eager"],default:"auto"},{name:"perf_mode",type:"enum",description:"Performance preset; cuda_perf packs AR projections, aligns KV capacity to 256 tokens, retains stages and caps VAE tiles at 512 frames. Explicit controls override the preset. May change audio and substantially increase peak VRAM.",values:["off","cuda_perf"],required:!1,default:"off"},{name:"packed_projections",type:"bool",description:"Pack AR QKV and gate/up projections without changing weight dtype. Default false, true with cuda_perf. Explicit values override the preset.",required:!1},{name:"kv_cache_alignment",type:"int",description:"AR KV capacity alignment in tokens; values above 1 also use cached CUDA CFG attention windows of this size. Default 1, or 256 with cuda_perf; may use more memory and change numerics. Explicit values override the preset.",required:!1,min:1},{name:"mem_saver",type:"bool",description:"Release AR/NAR runtimes and VAE graphs after generation. Default true, false with cuda_perf. Disabling retains stages and can substantially increase peak VRAM.",required:!1},{name:"vae_tile_frames",type:"int",description:"Latent core frames per VAE tile; defaults to model configuration, capped at 512 with cuda_perf. Explicit values override the cap. The halo is unchanged; different boundaries can change numerical results.",required:!1,min:1},{name:"attention_tile_rows",type:"int",description:"Query rows per eager NAR attention tile; nonpositive values select automatic tiling to keep each score matrix below 3 GiB.",required:!1,default:0}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"audio-cpp/Yue2-3B-GGUF",revision:"main",gated:!1}},packages:[{id:"yue2_main_q8_0",display_name:"Yue2 3B Main Q8_0",default:!0,format:"gguf",precision:"q8_0",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-3b-q8_0.gguf"]},{id:"yue2_main_bf16",display_name:"Yue2 3B Main BF16",format:"gguf",precision:"bf16",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-3b-bf16.gguf"]},{id:"yue2_main_q4_0",display_name:"Yue2 3B Main Q4_0",format:"gguf",precision:"q4_0",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-3b-q4_0.gguf"]},{id:"yue2_vae_f16",display_name:"Yue2 VAE F16",format:"gguf",precision:"f16",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-vae-f16.gguf"]},{id:"yue2_vae_f32",display_name:"Yue2 VAE F32",format:"gguf",precision:"f32",target_directory:"Yue2-3B-GGUF",files:["sidecars/yue2-model-config.json","sidecars/yue2-generation-config.json","sidecars/yue2-qwen.tiktoken","sidecars/yue2-vae-config.json","yue2-vae-f32.gguf"]}],sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{model_config:"model:sidecars/yue2-model-config.json",generation_config:"model:sidecars/yue2-generation-config.json",tiktoken:"model:sidecars/yue2-qwen.tiktoken",vae_config:"model:sidecars/yue2-vae-config.json"},tensors:{model_weights:{source:"weights:",prefix:"model_weights"}}},{format:"safetensors",roots:{model:"YuE2-3B",vae:"YuE2-Vae"},files:{model_config:"model:config.json",generation_config:"model:yue2_generation_config.json",tiktoken:"model:qwen.tiktoken",vae_config:"vae:config.json"},tensors:{model_weights:"model:model.safetensors",vae_weights:"vae:model.safetensors"}}]},V$={schema_version:1,family:"zipvoice",display_name:"ZipVoice",description:"Community ZipVoice / ZipVoice-Distill flow-matching TTS with a TTSZipformer backbone (U-Net downsampling stacks, compact relative position attention), duration prediction from prompt ratio, Euler solver with t-shift and classifier-free guidance, and Vocos mel-24kHz vocoder (k2-fsa/ZipVoice).",category:"tts",status:"community",tasks:["tts","clone"],modes:["offline","streaming"],languages:["en","zh"],runtime:{tags:["server","stream"]},capabilities:{clone:["speaker_reference"]},options:{request:[{name:"reference_text",type:"string",description:"Transcript matching the reference voice audio; required for zero-shot cloning.",required:!0},{name:"text_chunk_size",type:"int",description:"Maximum characters per generated text chunk; default 128.",required:!1,min:1,default:128},{name:"text_chunk_mode",type:"enum",description:"Framework text chunking mode.",preset:"text_chunk_mode_full",required:!1,default:"word_budget"},{name:"guidance_scale",type:"float",description:"Guidance scale; inherits the session default (3.0 for both variants). ZipVoice-Distill uses a guidance-scale embedding; ZipVoice uses batched CFG. Zero disables guidance. Any finite nonnegative value is accepted.",required:!1,min:0,default:3},{name:"num_inference_steps",type:"int",description:"Euler ODE steps; inherits the session default (8 for both variants).",required:!1,min:1,max:64,default:8},{name:"shift",type:"float",description:"Shift timesteps toward low SNR (smaller = stronger shift); default 0.5. Must be finite and positive.",required:!1,default:.5},{name:"speed",type:"float",description:"Speech speed multiplier applied through the prompt-duration ratio; default 1.0. Must be finite and positive.",required:!1,default:1},{name:"feat_scale",type:"float",description:"Feature scale applied to log-mel features; default 0.1 (reference default). Must be finite and positive.",required:!1,default:.1},{name:"target_rms",type:"float",description:"Target RMS for prompt loudness normalization; 0 disables. Default 0.1. Negative values disable normalization; values above 1 are accepted.",required:!1,default:.1},{name:"seed",type:"int",description:"Noise seed; default 666 (reference default).",required:!1,min:0,default:666},{name:"language",type:"string",description:"espeak language for phonemization; default en-us.",required:!1,default:"en-us"}],session:[{name:"vocos_path",type:"string",description:"Path to the Vocos vocoder checkpoint (vocos.safetensors or GGUF); required unless bundled in the model GGUF or placed next to the checkpoint.",required:!1},{name:"guidance_scale",type:"float",description:"Default guidance scale for requests that do not set it; must be finite and nonnegative.",required:!1,min:0,default:3},{name:"num_inference_steps",type:"int",description:"Default Euler steps for requests that do not set it.",required:!1,min:1,max:64,default:8},{name:"shift",type:"float",description:"Default timestep shift for requests that do not set it; must be finite and positive.",required:!1,default:.5},{name:"espeak_library_path",type:"string",description:"Path to the espeak-ng shared library (e.g. /opt/homebrew/lib/libespeak-ng.dylib) for tokenizer=espeak.",required:!1},{name:"espeak_data_path",type:"string",description:"Path to the espeak-ng data directory or package for tokenizer=espeak.",required:!1}],load:[]},package_defaults:{download:{kind:"huggingface_snapshot",repo:"davidxifeng/zipvoice-gguf",revision:"main",gated:!1}},packages:[{id:"zipvoice_distill_gguf",display_name:"ZipVoice-Distill GGUF (local conversion)",description:"Self-contained GGUF: flow-matching model, bundled Vocos vocoder and the embedded text-frontend sidecars (tokens, config, zh tables) in one file. Converted from k2-fsa/ZipVoice with export_zipvoice_zh_dict.py + convert_zipvoice.py.",default:!0,format:"gguf",precision:"orig",target_directory:"ZipVoice-Distill-GGUF",files:["zipvoice-distill-orig.gguf"]},{id:"zipvoice_distill_q8_0",display_name:"ZipVoice-Distill GGUF (Q8_0)",description:"Self-contained Q8_0 GGUF with bundled Vocos and embedded text-frontend sidecars.",format:"gguf",precision:"q8_0",target_directory:"ZipVoice-Distill-GGUF",files:["zipvoice-distill-q8_0.gguf"]}],dependencies:[],ui:{recommended_package:"zipvoice_distill_gguf",tags:["TTS","Clone"],docs:["docs/models/zipvoice.md"]},sources:[{format:"gguf",roots:{model:".",weights:"$gguf"},files:{tokens:"model:tokens.txt",model_config:"model:model.json"},optional_files:{zh_chars:"model:zh_chars.tsv",zh_phrases:"model:zh_phrases.tsv",zh_syllables:"model:zh_syllables.tsv",zh_jieba_dict:"model:zh_jieba_dict.txt",zh_hmm_model:"model:zh_hmm_model.txt"},tensors:{model:{source:"weights:",prefix:"model"}},optional_tensors:{vocos_vocoder:{source:"weights:",prefix:"vocos"}}}]},H$={models:JSON.parse('[{"id":"ace-step","display_name":"ACE-Step 1.5 (music gen)","family":"ace_step","path":"models/Ace-Step1.5","task":"gen","mode":"offline","download_id":"ace_step","default_text":"upbeat pop music with bright vocals and energetic drums","session_options":{"ace_step.mem_saver":"true","ace_step.dit_weight_type":"q8_0","ace_step.text_encoder_weight_type":"q8_0","ace_step.planner_weight_type":"q8_0"},"min_vram_gb":8},{"id":"ming3-tts","display_name":"Ming 3.0 TTS 0.5B","family":"ming3_tts","path":"models/Ming-3.0-TTS-0.5B-GGUF","task":"tts","mode":"offline","download_id":"ming_3_0_tts_0_5b_bf16","default_options":{"language":"en"},"default_text":"Good evening. The harbor is quiet tonight."},{"id":"ming3-tts-clone","display_name":"Ming 3.0 TTS 0.5B Clone","family":"ming3_tts","path":"models/Ming-3.0-TTS-0.5B-GGUF","task":"clon","mode":"offline","download_id":"ming_3_0_tts_0_5b_bf16","default_options":{"language":"en"},"input_hint_en":"Upload a reference voice. Its transcript is optional and enables acoustic-prefix conditioning."},{"id":"ming3-tts-design","display_name":"Ming 3.0 TTS 0.5B Voice Design","family":"ming3_tts","path":"models/Ming-3.0-TTS-0.5B-GGUF","task":"vdes","mode":"offline","download_id":"ming_3_0_tts_0_5b_bf16","default_options":{"language":"en"}},{"id":"ming3-audio-asr","display_name":"Ming 3.0 Audio Tiny ASR","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"asr","mode":"offline","download_id":"ming3_audio_tiny_bf16"},{"id":"ming3-audio-understanding","display_name":"Ming 3.0 Audio Tiny Understanding","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"asr","workflow":"analysis","mode":"offline","download_id":"ming3_audio_tiny_bf16","default_options":{"prompt":"Describe the sounds in this recording."}},{"id":"ming3-audio-response","display_name":"Ming 3.0 Audio Tiny Spoken Response","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"s2s","mode":"offline","download_id":"ming3_audio_tiny_bf16","default_options":{"voice_id":"US_James","language":"en"}},{"id":"ming3-audio-tts","display_name":"Ming 3.0 Audio Tiny TTS","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"tts","mode":"offline","download_id":"ming3_audio_tiny_bf16","default_options":{"voice_id":"US_James","language":"en"}},{"id":"ming3-audio-clone","display_name":"Ming 3.0 Audio Tiny Clone","family":"ming3_audio","path":"models/Ming-3.0-Audio-Tiny-GGUF","task":"clon","mode":"offline","download_id":"ming3_audio_tiny_bf16","default_options":{"language":"en"},"input_hint_en":"Upload a reference voice. Add its transcript to enable acoustic-prefix conditioning."},{"id":"xtts-v2","display_name":"XTTS v2","family":"xtts_v2","path":"models/XTTS-v2-Q8","task":"tts","mode":"offline","download_id":"xtts_v2_gguf_q8_0","input_hint_en":"Upload a reference voice for multilingual speech synthesis."},{"id":"latentsync","display_name":"LatentSync 1.6 Lip Sync","family":"latentsync","path":"models/LatentSync-1.6-GGUF","task":"gen","mode":"offline","download_id":"latentsync_1_6_q8_0_f16","arena":false,"input_hint_en":"Choose a face video and driving speech audio."},{"id":"apollo","display_name":"Apollo","family":"apollo","path":"models/Apollo-GGUF","task":"s2s","mode":"offline","download_id":"apollo_orig"},{"id":"ast-audioset","display_name":"AST AudioSet","family":"ast_audioset","path":"models/AST-AudioSet-GGUF/ast-audioset-f32.gguf","task":"cls","mode":"offline","download_id":"ast_audioset_f32"},{"id":"audio-flamingo-3","display_name":"Audio Flamingo 3","family":"audio_flamingo","path":"models/Audio-Flamingo-GGUF/audio-flamingo-3-q4_k.gguf","task":"asr","mode":"offline","download_id":"audio_flamingo_3_q4_k","workflow":"analysis"},{"id":"audio-flamingo-next","display_name":"Audio Flamingo Next","family":"audio_flamingo","path":"models/Audio-Flamingo-GGUF/audio-flamingo-next-q4_k.gguf","task":"asr","mode":"offline","download_id":"audio_flamingo_next_q4_k","workflow":"analysis"},{"id":"audio8-tts","display_name":"Audio8 TTS Preview 0.6B (tts 克隆, GGUF Q8)","display_name_en":"Audio8 TTS Preview 0.6B (tts + clone, GGUF Q8)","family":"audio8_tts","path":"models/Audio8-TTS-Preview-0.6B-GGUF","task":"tts","mode":"offline","download_id":"audio8_tts_preview_0_6b_q8_0","min_vram_gb":4,"input_hint":"**Audio8 TTS Preview 0.6B**:多语种 TTS / 零样本克隆(支持 yue/zh/nl/en/fr/de/it/ja/ko/pl/es/auto);上传参考音色+参考文本即克隆,留空为普通 TTS;长文本自动分句。","input_hint_en":"**Audio8 TTS Preview 0.6B**: multilingual TTS and zero-shot clone (yue/zh/nl/en/fr/de/it/ja/ko/pl/es/auto). Upload a reference voice + transcript to clone; leave empty for plain TTS. Long text is chunked automatically."},{"id":"audiosr","display_name":"AudioSR (audio super-resolution)","family":"audiosr","path":"models/AudioSR-GGUF/audiosr-basic-f32.gguf","task":"s2s","mode":"offline","download_id":"audiosr_basic_f32","min_vram_gb":8,"input_hint_en":"**AudioSR**: upload a source audio file to generate a super-resolved output."},{"id":"auk-edit","display_name":"AuK (audio editing, community)","family":"auk","path":"models/AuK-Base-and-Flash-GGUF","task":"gen","mode":"offline","arena":false,"download_id":"auk_base_f32","default_text":"Remove the background noise and make the voice clearer.","min_vram_gb":20,"input_hint_en":"**AuK audio editing** (community): upload source audio and describe the requested speech, singing, acoustic, paralinguistic, enhancement, or separation edit."},{"id":"auk-tts","display_name":"AuK (speech generation, community)","family":"auk","path":"models/AuK-Base-and-Flash-GGUF","task":"tts","mode":"offline","arena":false,"download_id":"auk_base_f32","default_text":"The next train leaves in ten minutes.","min_vram_gb":20,"input_hint_en":"**AuK** (community): enter text plus a voice description, or provide an optional reference voice for zero-shot speech generation. Select compatible Base or AuK-Flash, Qwen, and VAE components before loading."},{"id":"breeze-tts-clone","display_name":"BreezeTTS 2 Clone","family":"breeze_tts","path":"models/Breeze-TTS-2-GGUF/breeze-tts-2-q8_0.gguf","task":"clon","mode":"offline","download_id":"breeze_tts_2_q8_0","min_vram_gb":8,"input_hint_en":"**BreezeTTS 2 Clone**: upload a reference voice and provide the matching reference transcript."},{"id":"breeze-tts","display_name":"BreezeTTS 2 VoiceDesign","family":"breeze_tts","path":"models/Breeze-TTS-2-GGUF/breeze-tts-2-q8_0.gguf","task":"vdes","mode":"offline","download_id":"breeze_tts_2_q8_0","min_vram_gb":8,"input_hint_en":"**BreezeTTS 2 VoiceDesign**: enter text and describe the target voice in Model parameters. No reference voice is required."},{"id":"bs-roformer","display_name":"BS-RoFormer (sep 人声分离)","display_name_en":"BS-RoFormer (vocal separation)","family":"bs_roformer","path":"models/BS-RoFormer-ep368-GGUF/bs-roformer-ep368-q8_0.gguf","task":"sep","mode":"offline","download_id":"bs_roformer_q8_0","min_vram_gb":3},{"id":"canary-asr","display_name":"Canary 180M Flash","family":"canary_asr","path":"models/Canary-180M-Flash-GGUF","task":"asr","mode":"offline","download_id":"canary_180m_flash_f32"},{"id":"ced-base","display_name":"CED Base","family":"ced","path":"models/CED-GGUF/ced-base-f32.gguf","task":"cls","mode":"offline","download_id":"ced_base_f32"},{"id":"ced-mini","display_name":"CED Mini","family":"ced","path":"models/CED-GGUF/ced-mini-f32.gguf","task":"cls","mode":"offline","download_id":"ced_mini_f32"},{"id":"ced-small","display_name":"CED Small","family":"ced","path":"models/CED-GGUF/ced-small-f32.gguf","task":"cls","mode":"offline","download_id":"ced_small_f32"},{"id":"ced-tiny","display_name":"CED Tiny","family":"ced","path":"models/CED-GGUF/ced-tiny-f32.gguf","task":"cls","mode":"offline","download_id":"ced_tiny_f32"},{"id":"chatterbox-vc","display_name":"Chatterbox (vc 声音转换)","display_name_en":"Chatterbox (voice conversion)","family":"chatterbox","path":"models/chatterbox","task":"vc","mode":"offline","download_id":"chatterbox","min_vram_gb":12,"input_hint":"**Chatterbox VC**:上传源语音和目标音色参考;模型保留源语音内容,将说话人音色转换为目标音色,输出 24kHz 单声道。","input_hint_en":"**Chatterbox VC**: upload source speech and a target-voice reference. It preserves the source content and converts the speaker identity; output is 24 kHz mono."},{"id":"chatterbox","display_name":"Chatterbox (voice clone)","family":"chatterbox","path":"models/chatterbox","task":"clon","mode":"offline","download_id":"chatterbox","min_vram_gb":12},{"id":"chatterbox-turbo","display_name":"Chatterbox Turbo (tts)","family":"chatterbox_turbo","path":"models/Chatterbox-Turbo-GGUF/chatterbox-turbo-q8_0.gguf","task":"tts","mode":"offline","download_id":"chatterbox_turbo_q8_0","min_vram_gb":4,"input_hint_en":"**Chatterbox Turbo**: fast English TTS with the built-in voice. No reference voice is required."},{"id":"citrinet-asr","display_name":"Citrinet ASR (asr)","family":"citrinet_asr","path":"models/citrinet","task":"asr","mode":"offline","download_id":"citrinet_asr","min_vram_gb":2},{"id":"cohere-asr","display_name":"Cohere Transcribe","family":"cohere_asr","path":"models/Cohere-Transcribe-GGUF","task":"asr","mode":"offline","download_id":"cohere_transcribe_bf16"},{"id":"r2t2-asr","display_name":"Confucius4-R2T2 (asr, 实时流式)","display_name_en":"Confucius4-R2T2 (asr, real-time streaming)","family":"confucius4_r2t2","path":"models/Confucius4-R2T2-GGUF/r2t2-q8_0.gguf","task":"asr","mode":"offline","download_id":"confucius4_r2t2_q8_0","min_vram_gb":5,"input_hint":"**Confucius4-R2T2**:网易有道实时流式 ASR,Qwen3-ASR-1.7B 微调,LSP 稳定前缀解码;提交文本永不回改,支持 80ms-2s 分块;Q8_0 GGUF(2.3G,自包含单文件),也支持 F16。","input_hint_en":"**Confucius4-R2T2**: NetEase Youdao real-time streaming ASR, a Qwen3-ASR 1.7B fine-tune with Longest Stable Prefix decoding. Committed text is never revised; 80 ms-2 s chunks; Q8_0 GGUF (2.3 GB, self-contained single file), F16 also available."},{"id":"confucius4-tts","display_name":"Confucius4-TTS (voice clone, GGUF)","display_name_en":"Confucius4-TTS (voice clone, GGUF)","family":"confucius4_tts","path":"models/Confucius4-TTS-GGUF","task":"clon","mode":"offline","download_id":"confucius4_tts_orig","min_vram_gb":8,"input_hint":"**Confucius4-TTS**:需要参考音色;当前中文/英语路径更可靠,非中英语种仍在验证中。","input_hint_en":"**Confucius4-TTS**: requires a reference voice. Chinese/English are the most reliable paths; other languages are still being validated."},{"id":"controlfoley","display_name":"ControlFoley (Foley/SFX)","family":"controlfoley","path":"models/ControlFoley-GGUF/controlfoley-large-44k-q8_0.gguf","task":"gen","mode":"offline","download_id":"controlfoley_large_44k_q8_0","min_vram_gb":12,"request_options":["video"],"input_hint_en":"**ControlFoley**: Foley generation from text, video, text+video, audio+video, or video only. Upload video in the Video field; upload source audio for AC-V2A."},{"id":"cosyvoice3","display_name":"CosyVoice3 Clone","family":"cosyvoice3","path":"models/CosyVoice3-GGUF/cosyvoice3-q8_0.gguf","task":"clon","mode":"offline","download_id":"cosyvoice3_q8_0","min_vram_gb":8,"input_hint_en":"**CosyVoice3 Clone**: upload a reference voice and provide the matching reference transcript. Use `template_name` for zero-shot or cross-lingual requests."},{"id":"cosyvoice3-instruct","display_name":"CosyVoice3 Instruct","family":"cosyvoice3","path":"models/CosyVoice3-GGUF/cosyvoice3-q8_0.gguf","task":"tts","mode":"offline","download_id":"cosyvoice3_q8_0","min_vram_gb":8,"input_hint_en":"**CosyVoice3 Instruct**: upload a reference voice, provide its transcript, and set `template_name=instruct` with an instruction."},{"id":"crisperwhisper","display_name":"CrisperWhisper 2.0 Large","family":"crisperwhisper","path":"models/CrisperWhisper2.0-GGUF/crisperwhisper-2-large-q8_0.gguf","task":"asr","mode":"offline","download_id":"crisperwhisper_2_large_q8_0"},{"id":"crisperwhisper-align","display_name":"CrisperWhisper 2.0 Large (alignment)","family":"crisperwhisper","path":"models/CrisperWhisper2.0-GGUF/crisperwhisper-2-large-q8_0.gguf","task":"align","mode":"offline","download_id":"crisperwhisper_2_large_q8_0","workflow":"analysis"},{"id":"deepfilternet2","display_name":"DeepFilterNet2","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/deepfilternet2/deepfilternet2.safetensors","load_options":{"utility":"deepfilternet2"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/deepfilternet2/deepfilternet2.safetensors"},{"id":"dots-tts-meanflow","display_name":"DotTTS MeanFlow (tts + clone)","family":"dots_tts","path":"models/DotTTS-MF-GGUF","task":"tts","mode":"offline","download_id":"dots_tts_mf_q8_0","min_vram_gb":8},{"id":"dots-tts-soar","display_name":"DotTTS SOAR (tts + clone)","family":"dots_tts","path":"models/DotTTS-SOAR-GGUF","task":"tts","mode":"offline","download_id":"dots_tts_soar_q8_0","min_vram_gb":8},{"id":"dramabox","display_name":"DramaBox (tts 克隆, GGUF Q8)","display_name_en":"DramaBox (tts + clone, GGUF Q8)","family":"dramabox","path":"models/DramaBox-GGUF","task":"tts","mode":"offline","download_id":"dramabox_q8_0","min_vram_gb":16,"input_hint":"**DramaBox**:英语 TTS / voice clone;上传参考音色可克隆,长文本建议写清楚说话人描述。","input_hint_en":"**DramaBox**: English TTS and voice clone. Upload a reference voice to clone; for long text, keep speaker wording explicit."},{"id":"echo-tts","display_name":"Echo-TTS (voice clone)","family":"echo_tts","path":"models/Echo-TTS-GGUF","task":"clon","mode":"offline","download_id":"echo_tts_q8_0","min_vram_gb":8,"input_hint_en":"**Echo-TTS**: English zero-shot cloning at 44.1 kHz. Upload a reference voice -- no transcript needed. Output is CC-BY-NC-SA and may not be used commercially."},{"id":"firered-stream-vad","display_name":"FireRed Stream-VAD","family":"firered_vad","path":"models/FireRedVAD-GGUF/firered-stream-vad-f32.gguf","task":"vad","mode":"offline","download_id":"firered_stream_vad_f32"},{"id":"firered-vad","display_name":"FireRed VAD","family":"firered_vad","path":"models/FireRedVAD-GGUF/firered-vad-f32.gguf","task":"vad","mode":"offline","download_id":"firered_vad_f32"},{"id":"firered-audio-asr","display_name":"FireRedAudio (ASR / audio QA)","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"asr","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio ASR**: upload audio, then use the text box as the transcription or audio-understanding instruction."},{"id":"firered-audio-acoustic-edit","display_name":"FireRedAudio Acoustic Edit","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"gen","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio Acoustic Edit**: upload source audio and use a trained acoustic instruction such as `shift the pitch by 3 steps`."},{"id":"firered-audio-tts","display_name":"FireRedAudio Clone","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"clon","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio Clone**: upload a reference voice and provide the matching reference transcript. For no-reference voice design, use the VoiceDesign entry."},{"id":"firered-audio-semantic-edit","display_name":"FireRedAudio Semantic Edit","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"gen","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio Semantic Edit**: upload source audio and describe the content edit in Model parameters."},{"id":"firered-audio-vdesign","display_name":"FireRedAudio VoiceDesign","family":"firered_audio","path":"models/FireRedAudio-GGUF/firered-audio-q8_0.gguf","task":"vdes","mode":"offline","download_id":"firered_audio_q8_0","min_vram_gb":10,"input_hint_en":"**FireRedAudio VoiceDesign**: describe the target voice in Voice description, then enter the text to synthesize."},{"id":"fireredtts3-base","display_name":"FireRedTTS3 Base (voice clone)","family":"fireredtts3","path":"models/FireRedTTS3-Base-GGUF/fireredtts3-base-q8_0.gguf","task":"clon","mode":"offline","download_id":"fireredtts3_base_q8_0","min_vram_gb":8,"input_hint_en":"**FireRedTTS3 Base**: zero-shot voice cloning. Upload a reference voice and provide the matching reference transcript."},{"id":"fireredtts3-instruct","display_name":"FireRedTTS3 Instruct Clone","family":"fireredtts3","path":"models/FireRedTTS3-Instruct-GGUF/fireredtts3-instruct-q8_0.gguf","task":"clon","mode":"offline","download_id":"fireredtts3_instruct_q8_0","min_vram_gb":8,"input_hint_en":"**FireRedTTS3 Instruct Clone**: official Instruct `generate_tts` path. Upload a reference voice and provide the matching reference transcript. For no-reference voice design, use the VoiceDesign entry."},{"id":"fireredtts3-instruct-vdesign","display_name":"FireRedTTS3 Instruct VoiceDesign","family":"fireredtts3","path":"models/FireRedTTS3-Instruct-GGUF/fireredtts3-instruct-q8_0.gguf","task":"vdes","mode":"offline","download_id":"fireredtts3_instruct_q8_0","min_vram_gb":8,"input_hint_en":"**FireRedTTS3 VoiceDesign**: describe the target voice in Voice description, then enter the text to synthesize."},{"id":"fish-drama3","display_name":"Fish Audio Drama 3","family":"fish_drama3","path":"models/Drama-3-GGUF/drama-3-backbone-4bit-experts-Q4_K_S.gguf","task":"tts","mode":"offline","arena":false,"download_id":"fish_drama3_q4_backbone","min_vram_gb":8,"session_options":{"fish_drama3.disk_experts":"true","fish_drama3.pin_experts":"true","fish_drama3.expert_cache_size":"8","fish_drama3.cpu_expert_layers":"0","fish_drama3.codec_backend":"same","fish_drama3.context_length":"4096"},"request_options":["reference_text","multi_reference_cond","text_chunk_size","temperature","top_p","top_k","max_tokens","seed"]},{"id":"fish-drama3-small","display_name":"Fish Audio Drama3-small","family":"fish_drama3","path":"models/Drama3-small-GGUF/drama3-small-IQ3_XXS.gguf","task":"tts","mode":"offline","arena":false,"download_id":"fish_drama3_small_iq3_xxs","min_vram_gb":7,"session_options":{"fish_drama3.disk_experts":"true","fish_drama3.pin_experts":"true","fish_drama3.expert_cache_size":"8","fish_drama3.cpu_expert_layers":"0","fish_drama3.codec_backend":"same","fish_drama3.context_length":"4096"}},{"id":"fish-audio-s2-pro","display_name":"Fish Audio S2 Pro (tts 克隆/控制标记, GGUF Q8)","display_name_en":"Fish Audio S2 Pro (tts + clone/control tags, GGUF Q8)","family":"fish_audio","path":"models/Fish-Audio-S2-Pro-GGUF","task":"tts","mode":"offline","download_id":"fish_audio_s2_pro","min_vram_gb":8,"input_hint":"**Fish Audio S2 Pro**:Q8_0 GGUF 包;中英+自动语种;上传参考音色即克隆;正文里可写行内控制标记(如 (laugh))。","input_hint_en":"**Fish Audio S2 Pro**: Q8_0 GGUF package; English/Chinese plus auto language. Upload a reference voice to clone; inline control tags such as (laugh) can be written in the text."},{"id":"flashsr","display_name":"FlashSR","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/flashsr/flashsr.safetensors","load_options":{"utility":"flashsr"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/flashsr/flashsr.safetensors"},{"id":"fun-asr-nano","display_name":"Fun-ASR-Nano 2512 (asr, GGUF Q8)","display_name_en":"Fun-ASR-Nano 2512 (asr, GGUF Q8)","family":"fun_asr_nano","path":"models/Fun-ASR-Nano-2512-GGUF","task":"asr","mode":"offline","download_id":"fun_asr_nano_2512_q8_0","min_vram_gb":4,"input_hint":"**Fun-ASR-Nano**:轻量离线 ASR;支持 auto/中文/英语/日语。","input_hint_en":"**Fun-ASR-Nano**: lightweight offline ASR; supports auto, Chinese, English and Japanese."},{"id":"gigaam-multilingual","display_name":"GigaAM Multilingual","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-multilingual-ctc-f16.gguf","download_id":"gigaam_multilingual_ctc_f16"},{"id":"gigaam-multilingual-large","display_name":"GigaAM Multilingual Large","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-multilingual-large-ctc-f16.gguf","download_id":"gigaam_multilingual_large_ctc_f16"},{"id":"gigaam-v3-ctc","display_name":"GigaAM v3 CTC","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-v3-ctc-f16.gguf","download_id":"gigaam_v3_ctc_f16"},{"id":"gigaam-v3-e2e-ctc","display_name":"GigaAM v3 E2E CTC","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-v3-e2e-ctc-f16.gguf","download_id":"gigaam_v3_e2e_ctc_f16"},{"id":"gigaam-v3-e2e-rnnt","display_name":"GigaAM v3 E2E RNN-T","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-v3-e2e-rnnt-f16.gguf","download_id":"gigaam_v3_e2e_rnnt_f16"},{"id":"gigaam-v3-rnnt","display_name":"GigaAM v3 RNN-T","family":"gigaam_asr","task":"asr","mode":"offline","path":"models/GigaAM-ASR-GGUF/gigaam-v3-rnnt-f16.gguf","download_id":"gigaam_v3_rnnt_f16"},{"id":"glm-tts","display_name":"GLM-TTS (tts 克隆, 社区)","display_name_en":"GLM-TTS (tts + clone, community)","family":"glm_tts","path":"models/GLM-TTS","task":"tts","mode":"offline","download_id":"glm_tts","min_vram_gb":8,"input_hint":"**GLM-TTS**(社区模型):中英 TTS / voice clone;上传参考音色即克隆。","input_hint_en":"**GLM-TTS** (community): Chinese/English TTS and voice clone. Upload a reference voice to clone."},{"id":"gradium-phonon-31m-en","display_name":"Gradium Phonon 31m English (tts)","family":"gradium_phonon","path":"models/phonon-31m-en","task":"tts","mode":"offline","download_id":"gradium_phonon_31m_en_q8_0","min_vram_gb":1},{"id":"granite5asr","display_name":"Granite Speech 5.0 470M TurboCTC (asr)","display_name_en":"Granite Speech 5.0 470M TurboCTC (asr)","family":"granite5asr","path":"models/Granite-Speech-5.0-470M-TurboCTC-GGUF/granite-speech-5.0-470m-turboctc-q8_0.gguf","task":"asr","mode":"offline","download_id":"granite5asr_q8_0","min_vram_gb":4,"input_hint":"**Granite Speech 5.0 TurboCTC**:IBM 470M 英语 ASR;超快 Conformer CTC 转写;支持长音频自动分段与流式模式。","input_hint_en":"**Granite Speech 5.0 TurboCTC**: IBM 470M English ASR with ultra-fast Conformer CTC architecture, supporting long-form audio segmentation and streaming mode."},{"id":"gtcrn-dns3","display_name":"GTCRN DNS3","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/gtcrn/gtcrn_dns3.safetensors","load_options":{"utility":"gtcrn_dns3"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/gtcrn/gtcrn_dns3.safetensors"},{"id":"gtcrn-streaming","display_name":"GTCRN Streaming","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/gtcrn/gtcrn_streaming.safetensors","load_options":{"utility":"gtcrn_streaming"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/gtcrn/gtcrn_streaming.safetensors"},{"id":"gtcrn-vctk","display_name":"GTCRN VCTK","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/gtcrn/gtcrn_vctk.safetensors","load_options":{"utility":"gtcrn_vctk"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/gtcrn/gtcrn_vctk.safetensors"},{"id":"heartmula","display_name":"HeartMuLa 3B (music gen)","family":"heartmula","path":"models/HeartMuLa","task":"gen","mode":"offline","download_id":"heartmula","session_options":{"heartmula.mem_saver":"true"},"min_vram_gb":24},{"id":"higgs-audio-stt","display_name":"Higgs Audio v3 STT (asr, 英语)","display_name_en":"Higgs Audio v3 STT (asr, English)","family":"higgs_audio_stt","path":"models/higgs-audio-v3-stt","task":"asr","mode":"offline","download_id":"higgs_audio_stt","min_vram_gb":8,"input_hint":"**Higgs Audio STT**:英语转写;可在文本框填指令(默认相当于 Transcribe the speech.);离线模式自动切分长音频。","input_hint_en":"**Higgs Audio STT**: English transcription. The text box accepts an instruction; offline mode automatically chunks long audio."},{"id":"higgs-audio-tts","display_name":"Higgs Audio v3 TTS 4B (tts 克隆, GGUF Q8)","display_name_en":"Higgs Audio v3 TTS 4B (tts + clone, GGUF Q8)","family":"higgs_audio_tts","path":"models/Higgs-Audio-v3-TTS-4B-GGUF","task":"tts","mode":"offline","download_id":"higgs_audio_v3_tts_4b","min_vram_gb":6,"input_hint":"**Higgs Audio v3 TTS**:Q8_0 GGUF 包(权重已量化,不用再设 weight_type);上传参考音色即声音克隆,留空用默认音色;长文本自动分段。","input_hint_en":"**Higgs Audio v3 TTS**: Q8_0 GGUF package (already quantized — no weight_type needed). Upload a reference voice to clone, or leave it empty for the default voice; long text is chunked automatically."},{"id":"htdemucs","display_name":"HTDemucs (sep 音源分离)","display_name_en":"HTDemucs (source separation)","family":"htdemucs","path":"models/htdemucs","task":"sep","mode":"offline","download_id":"htdemucs","min_vram_gb":3},{"id":"htdemucs_6stems","display_name":"HTDemucs 6-stem (sep 音源分离)","display_name_en":"HTDemucs 6-stem (source separation)","family":"htdemucs_6stems","path":"models/htdemucs_6stems","task":"sep","mode":"offline","download_id":"htdemucs_6stems","min_vram_gb":4},{"id":"hviske-asr","display_name":"Hviske v5.3 (asr, 丹麦语)","display_name_en":"Hviske v5.3 (asr, Danish)","family":"hviske_asr","path":"models/hviske-v5.3","task":"asr","mode":"offline","download_id":"hviske_asr","min_vram_gb":6,"input_hint":"**Hviske ASR**:丹麦语专用;模型侧自动分段。","input_hint_en":"**Hviske ASR**: dedicated Danish transcription with automatic model-side segmentation."},{"id":"hviske-v6","display_name":"Hviske v6 (Danish ASR)","family":"hviske_asr_v6","path":"models/Hviske-v6-GGUF/hviske-v6-bf16.gguf","task":"asr","mode":"offline","download_id":"hviske_asr_v6_bf16"},{"id":"index-echo-2b","display_name":"Index-Echo S2TT 2B","family":"index_echo","path":"models/Index-Echo-S2TT-GGUF/index-echo-s2tt-2b-orig.gguf","task":"asr","mode":"offline","download_id":"index_echo_s2tt_2b_orig"},{"id":"index-echo-9b","display_name":"Index-Echo S2TT 9B","family":"index_echo","path":"models/Index-Echo-S2TT-GGUF/index-echo-s2tt-9b-orig.gguf","task":"asr","mode":"offline","download_id":"index_echo_s2tt_9b_orig"},{"id":"index-tts2","display_name":"IndexTTS2 (tts 中英克隆+情感)","display_name_en":"IndexTTS2 (tts, zh/en clone + emotion)","family":"index_tts2","path":"models/IndexTTS-2","task":"tts","mode":"offline","download_id":"index_tts2","min_vram_gb":8},{"id":"index-tts2.5","display_name":"IndexTTS2.5 (tts 多语种克隆+情感, GGUF Q8)","display_name_en":"IndexTTS2.5 (tts, zh/en/ja/es/ar clone + emotion, GGUF Q8)","family":"index_tts2","path":"models/IndexTTS2.5-GGUF","task":"tts","mode":"offline","download_id":"index_tts2_5_q8_0","min_vram_gb":8,"input_hint":"**IndexTTS2.5**:中/英/日/西/阿零样本克隆;上传参考音色即克隆;可在『其它参数(JSON)』里传 `lang`(默认 auto:含汉字按中文,否则按英文)与情感选项。许可证为 bilibili Model Use License(非 OSI),商用前请确认条款。","input_hint_en":"**IndexTTS2.5**: zero-shot cloning in zh/en/ja/es/ar. Upload a reference voice to clone; pass `lang` (default auto: zh when the text contains Han characters, otherwise en) and emotion options through the JSON box. Weights are under the bilibili Model Use License (not OSI-approved) — check terms before commercial use."},{"id":"inflect-v2","display_name":"Inflect Micro v2 (tts 英语, 社区)","display_name_en":"Inflect Micro v2 (en tts, community)","family":"inflect_v2","path":"models/Inflect-Micro-v2","task":"tts","mode":"offline","download_id":"inflect_micro_v2","min_vram_gb":2,"input_hint":"**Inflect Micro v2**(社区模型):英语离线 TTS;Micro 是默认包,Nano 可通过模型管理器另装后手动选择路径。","input_hint_en":"**Inflect Micro v2** (community): English offline TTS. Micro is the default package; Nano can be installed separately and selected manually."},{"id":"irodori-tts-v3-500m","display_name":"Irodori-TTS 500M v3 (tts 日语)","display_name_en":"Irodori-TTS 500M v3 (ja tts)","family":"irodori_tts","path":"models/Irodori-TTS-500M-v3-GGUF","task":"tts","mode":"offline","download_id":"irodori_tts_500m_v3_q8_0","min_vram_gb":4},{"id":"irodori-tts-v3-vdesign","display_name":"Irodori-TTS 600M v3 VoiceDesign (vdes 日语)","display_name_en":"Irodori-TTS 600M v3 VoiceDesign (ja vdes)","family":"irodori_tts","path":"models/Irodori-TTS-600M-v3-VoiceDesign-GGUF","task":"vdes","mode":"offline","download_id":"irodori_tts_600m_v3_voicedesign_q8_0","min_vram_gb":4,"input_hint":"**Irodori-TTS v3 VoiceDesign**(日语):『音色描述』用日语 caption 描述音色(如「落ち着いた大人の男性。深く響く声。」),文本填要念的日语内容,无需参考音频。","input_hint_en":"**Irodori-TTS v3 VoiceDesign**: provide a Japanese voice caption and Japanese synthesis text. No reference recording is required."},{"id":"irodori-tts","display_name":"Irodori-TTS v4.1 Small (tts 日语, GGUF Q8)","display_name_en":"Irodori-TTS v4.1 Small (ja tts, GGUF Q8)","family":"irodori_tts","path":"models/Irodori-TTS-v4-Small-GGUF","task":"tts","mode":"offline","download_id":"irodori_tts_v4_small_q8_0","min_vram_gb":4,"input_hint":"**Irodori-TTS v4.1 Small**:日语 TTS;可不上传参考音色直接生成,也可上传参考音色进行克隆;可在声音设计页用日语 caption 描述音色。","input_hint_en":"**Irodori-TTS v4.1 Small**: Japanese TTS. Generate without a reference voice, clone from an uploaded reference, or use the voice-design page with a Japanese voice caption."},{"id":"irodori-tts-vdesign","display_name":"Irodori-TTS v4.1 Small VoiceDesign (vdes 日语, GGUF Q8)","display_name_en":"Irodori-TTS v4.1 Small VoiceDesign (ja vdes, GGUF Q8)","family":"irodori_tts","path":"models/Irodori-TTS-v4-Small-GGUF","task":"vdes","mode":"offline","download_id":"irodori_tts_v4_small_q8_0","min_vram_gb":4,"input_hint":"**Irodori-TTS v4.1 VoiceDesign**(日语):『音色描述』用日语 caption 描述音色(如「落ち着いた大人の男性。深く響く声。」),文本填要念的日语内容,无需参考音频。","input_hint_en":"**Irodori-TTS v4.1 VoiceDesign**: provide a Japanese voice caption and Japanese synthesis text. No reference recording is required."},{"id":"kitten-tts2","display_name":"Kitten TTS 2","family":"kitten_tts2","path":"models/kitten-tts2/kitten-tts2-q8-v2-multilingual.gguf","task":"tts","mode":"offline","download_id":"kitten_tts2_q8_v2","min_vram_gb":7,"input_hint":"Multilingual speech: choose a matching language preset or supply a reference clip and its transcript. Write numbers and abbreviations as spoken words."},{"id":"kitten-tts2-20261021","display_name":"Kitten TTS 2 (2026-10-21)","family":"kitten_tts2","path":"models/KittenTTS2-GGUF","task":"tts","mode":"offline","download_id":"kitten_tts2_20261021_q8_0","input_hint_en":"Updated multilingual checkpoint. Choose Q8 or Q4, then a voice preset or reference recording."},{"id":"kitten-tts","display_name":"KittenTTS Mini 0.8 (tts 英语, 社区)","display_name_en":"KittenTTS Mini 0.8 (en tts, community)","family":"kitten_tts","path":"models/KittenTTS-GGUF/kitten-tts-mini-0.8-orig.gguf","task":"tts","mode":"offline","download_id":"kitten_tts_mini_0_8_orig","min_vram_gb":1,"input_hint":"**KittenTTS Mini 0.8**(社区模型):轻量英语 TTS,内置八种音色,不需要上传参考音频。","input_hint_en":"**KittenTTS Mini 0.8** (community): lightweight English TTS with eight built-in voices; no reference audio is needed."},{"id":"kokoro-tts","display_name":"Kokoro 82M (tts, preset voices)","family":"kokoro_tts","path":"models/Kokoro-82M-GGUF/kokoro-82m-q8_0.gguf","task":"tts","mode":"offline","download_id":"kokoro_82m_q8_0","min_vram_gb":1,"input_hint_en":"**Kokoro 82M**: multilingual TTS with built-in preset voices. Choose a language and voice; no reference audio is needed."},{"id":"kroko-asr","display_name":"Kroko Community ASR (asr, GGUF Q8)","display_name_en":"Kroko Community ASR (asr, GGUF Q8)","family":"kroko_asr","path":"models/Kroko-ASR-GGUF","task":"asr","mode":"offline","download_id":"kroko_asr_community_q8_0","min_vram_gb":4,"input_hint":"**Kroko Community ASR**:GGUF Q8 包;离线转写,支持时间戳。","input_hint_en":"**Kroko Community ASR**: GGUF Q8 package for offline transcription with timestamps."},{"id":"kugelaudio","display_name":"KugelAudio-0-Open","family":"kugelaudio","path":"models/KugelAudio-0-Open-GGUF/kugelaudio-0-open-q8_0.gguf","task":"tts","mode":"offline","download_id":"kugelaudio_0_open_q8_0","builtin_voices":["default","clear","english_female","english_male"],"default_voice":"default"},{"id":"lfm2-audio-asr","display_name":"LFM2.5-Audio 1.5B (asr, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-GGUF","task":"asr","mode":"offline","download_id":"lfm2_audio_1_5b_q8_0","min_vram_gb":4,"input_hint_en":"**LFM2.5-Audio** (community): Liquid AI\'s English speech recognition from Liquid\'s published GGUFs. Audio longer than 30 s is split at pauses. Leave language empty."},{"id":"lfm2-audio-s2s","display_name":"LFM2.5-Audio 1.5B (s2s, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-GGUF","task":"s2s","mode":"offline","download_id":"lfm2_audio_1_5b_q8_0","min_vram_gb":4,"builtin_voices":[],"default_voice":"","input_hint_en":"**LFM2.5-Audio** (community): Liquid AI\'s English spoken chat from Liquid\'s published GGUFs. Record or choose a spoken question under Source audio and press Run: the reply streams in as speech and text, and each Run continues the conversation until New conversation. Replies use liquid-audio\'s system prompt, `Respond with interleaved text and audio.`"},{"id":"lfm2-audio-tts","display_name":"LFM2.5-Audio 1.5B (tts, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-GGUF","task":"tts","mode":"offline","download_id":"lfm2_audio_1_5b_q8_0","min_vram_gb":4,"default_text":"The next train leaves in ten minutes.","input_hint_en":"**LFM2.5-Audio** (community): Liquid AI\'s English speech from Liquid\'s published GGUFs, with four built-in voices (US or UK, male or female); no reference audio."},{"id":"lfm2-audio-jp-asr","display_name":"LFM2.5-Audio 1.5B JP (asr, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-JP-GGUF","task":"asr","mode":"offline","download_id":"lfm2_audio_1_5b_jp_q8_0","min_vram_gb":4,"input_hint_en":"**LFM2.5-Audio JP** (community): Liquid AI\'s Japanese speech recognition from Liquid\'s published GGUFs. Audio longer than 30 s is split at pauses. Leave language empty."},{"id":"lfm2-audio-jp-s2s","display_name":"LFM2.5-Audio 1.5B JP (s2s, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-JP-GGUF","task":"s2s","mode":"offline","download_id":"lfm2_audio_1_5b_jp_q8_0","min_vram_gb":4,"builtin_voices":[],"default_voice":"","input_hint_en":"**LFM2.5-Audio JP** (community): Liquid AI\'s Japanese spoken chat from Liquid\'s published GGUFs. Record or choose a spoken question under Source audio and press Run: the reply streams in as speech and text, and each Run continues the conversation until New conversation. Replies use liquid-audio\'s system prompt, `Respond with interleaved text and audio.`"},{"id":"lfm2-audio-jp-tts","display_name":"LFM2.5-Audio 1.5B JP (tts, community)","family":"lfm2_audio","path":"models/LFM2.5-Audio-1.5B-JP-GGUF","task":"tts","mode":"offline","download_id":"lfm2_audio_1_5b_jp_q8_0","min_vram_gb":4,"builtin_voices":[],"default_voice":"","default_text":"今日は天気がいいので、公園まで散歩に行きました。","input_hint_en":"**LFM2.5-Audio JP** (community): Liquid AI\'s Japanese speech from Liquid\'s published GGUFs, in the checkpoint\'s one voice; no reference audio."},{"id":"lfm3-audio-asr","display_name":"LFM3-Audio 2B (asr, community)","family":"lfm3_audio","path":"models/LFM3-Audio-2B-GGUF/LFM3-Audio-2B-Q8_0.gguf","task":"asr","mode":"offline","download_id":"lfm3_audio_2b_q8_0","min_vram_gb":4,"input_hint_en":"**LFM3-Audio** (community): Liquid AI\'s LFM3-Audio-2B from Liquid\'s published GGUFs. Speech recognition in 18 languages: leave language empty or set auto to detect it. The chat parameter answers the spoken input as text instead of transcribing it."},{"id":"lfm3-audio-s2s","display_name":"LFM3-Audio 2B (s2s, community)","family":"lfm3_audio","path":"models/LFM3-Audio-2B-GGUF/LFM3-Audio-2B-Q8_0.gguf","task":"s2s","mode":"offline","download_id":"lfm3_audio_2b_q8_0","min_vram_gb":4,"builtin_voices":[],"default_voice":"","input_hint_en":"**LFM3-Audio** (community): Liquid AI\'s LFM3-Audio-2B from Liquid\'s published GGUFs. Record or choose a spoken question under Source audio and press Run: the reply streams in as speech and text, and each Run continues the conversation until New conversation. Replies use the system prompt `Respond with interleaved text and audio.`"},{"id":"lfm3-audio-tts","display_name":"LFM3-Audio 2B (tts, community)","family":"lfm3_audio","path":"models/LFM3-Audio-2B-GGUF/LFM3-Audio-2B-Q8_0.gguf","task":"tts","mode":"offline","download_id":"lfm3_audio_2b_q8_0","min_vram_gb":4,"default_text":"The next train leaves in ten minutes.","input_hint_en":"**LFM3-Audio** (community): Liquid AI\'s LFM3-Audio-2B from Liquid\'s published GGUFs. Speech in 38 built-in voices across 19 languages; no reference audio."},{"id":"liveavatar","display_name":"LiveAvatar (audio to video, 社区)","display_name_en":"LiveAvatar (audio to video, community)","family":"liveavatar","path":"models/LiveAvatar-GGUF","task":"gen","mode":"offline","download_id":"liveavatar_nvfp4_lora","default_text":"A cheerful green cyclops baker in a warm rustic bakery, smiling and speaking to the camera while holding a tray of freshly baked pies. High-quality animated film style, expressive face, natural gestures, warm cinematic lighting.","min_vram_gb":24,"input_hint":"**LiveAvatar**(社区模型):上传驱动音频和参考人物图像,再输入场景描述以生成动画视频。","input_hint_en":"**LiveAvatar** (community): upload driving audio and a reference portrait, then describe the subject and scene to generate an animated video."},{"id":"outetts","display_name":"Llama-OuteTTS 1.0 1B (tts 克隆, 社区)","display_name_en":"Llama-OuteTTS 1.0 1B (tts + clone, community)","family":"outetts","path":"models/Llama-OuteTTS-1.0-1B","task":"tts","mode":"offline","download_id":"outetts_1_0_1b","min_vram_gb":4,"input_hint":"**OuteTTS 1.0 1B**(社区模型):23 种语言,DAC 编解码;上传参考音色即克隆。","input_hint_en":"**OuteTTS 1.0 1B** (community): 23 languages, IBM DAC codec. Upload a reference voice to clone."},{"id":"magpie-tts","display_name":"MagpieTTS Multilingual 357M v2607 (tts, preset voices)","display_name_en":"MagpieTTS Multilingual 357M v2607 (tts, preset voices)","family":"magpie_tts","path":"models/MagpieTTS-Multilingual-357M-GGUF","task":"tts","mode":"offline","download_id":"magpie_tts_q8_0","min_vram_gb":4,"input_hint":"**MagpieTTS**:多语种离线 TTS;使用打包 speaker map 里的 `voice_id`,不需要上传参考音频。当前 GGUF 包不包含日语 phoneme 表,因此日语路径不可用。","input_hint_en":"**MagpieTTS**: multilingual offline TTS with packaged speaker prompts selected by `voice_id`; no reference upload is needed. The current GGUF package does not include the Japanese phoneme table, so Japanese is not available."},{"id":"marblenet-vad","display_name":"MarbleNet VAD (vad, bundled)","family":"marblenet_vad","path":"assets/framework/models/marblenet_vad","task":"vad","mode":"offline","min_vram_gb":1},{"id":"maya1","display_name":"Maya1","family":"maya1","task":"tts","mode":"offline","path":"models/Maya1-GGUF/maya1-q8_0.gguf","download_id":"maya1_q8_0","arena":false},{"id":"meanvc2","display_name":"MeanVC2 (voice conversion)","display_name_en":"MeanVC2 (voice conversion)","family":"meanvc2","path":"models/MeanVC2-GGUF/meanvc2-120ms-40ms-fp32.gguf","task":"vc","mode":"offline","download_id":"meanvc2_120ms_40ms_f32","min_vram_gb":6,"input_hint":"**MeanVC2**:上传源语音和目标音色参考;默认 120 ms / 40 ms checkpoint 使用 F32 GGUF。","input_hint_en":"**MeanVC2**: upload source speech and a target-voice reference. The default 120 ms / 40 ms checkpoint uses F32 GGUF."},{"id":"mel-band-roformer","display_name":"Mel-Band RoFormer (sep 人声分离)","display_name_en":"Mel-Band RoFormer (vocal separation)","family":"mel_band_roformer","path":"models/mel-roformer-mlx","task":"sep","mode":"offline","download_id":"mel_band_roformer","min_vram_gb":3},{"id":"micro-wake-word","display_name":"microWakeWord (Okay Nabu)","family":"micro_wake_word","path":"models/MicroWakeWord-GGUF/micro-wake-word-okay-nabu-f32.gguf","task":"wake","mode":"offline","download_id":"micro_wake_word_okay_nabu_f32"},{"id":"midashenglm-gen","display_name":"MiDashengLM-Gen (audio generation)","family":"midashenglm_gen","path":"models/MiDashengLM-Gen-GGUF/midashenglm-gen-q8_0.gguf","task":"gen","mode":"offline","download_id":"midashenglm_gen_q8_0","min_vram_gb":8,"input_hint_en":"**MiDashengLM-Gen**: text-conditioned audio generation. The duration field controls the generation budget."},{"id":"minimax-h3","display_name":"MiniMax-H3 Q4 (sound generation)","family":"minimax_h3","path":"models/MiniMax-H3-Q4-GGUF/dit.gguf","task":"gen","mode":"offline","download_id":"minimax_h3","min_vram_gb":20,"default_options":{"num_inference_steps":12,"height":32,"width":32,"num_frames":241,"guidance_scale":1,"dit_acceleration":"none","return_video":false},"input_hint_en":"MiniMax-H3 uses a joint audio/video DiT. The default Q4 DiT is the quality-first choice; the optional CUDA-only INT8 ConvRot DiT trades slightly more VRAM for higher speed. Native Studio uses 12 denoising steps, a 32x32 latent canvas, quality-first full-DiT execution, and disables video decoding for practical audio-only generation on a 24 GB GPU."},{"id":"minimax-music3","display_name":"MiniMax-Music3 (song gen)","family":"minimax_music3","path":"models/MiniMax-Music3-GGUF","task":"gen","mode":"offline","download_id":"minimax_music3_q4_0","min_vram_gb":12},{"id":"miocodec","display_name":"MioCodec (vc; codec dependency)","family":"miocodec","path":"models/MioCodec-25Hz-44.1kHz-v2","task":"vc","mode":"offline","download_id":"miocodec_25hz_44k_v2","min_vram_gb":3},{"id":"miotts","display_name":"MioTTS 1.7B (tts; needs MioCodec)","family":"miotts","path":"models/MioTTS-1.7B","task":"tts","mode":"offline","download_id":"miotts_1_7b","min_vram_gb":8},{"id":"moonshine-asr-medium","display_name":"Moonshine Streaming Medium (asr, GGUF Q8)","display_name_en":"Moonshine Streaming Medium (asr, GGUF Q8)","family":"moonshine_asr","path":"models/Moonshine-Streaming-GGUF/moonshine-streaming-medium-q8_0.gguf","task":"asr","mode":"offline","download_id":"moonshine_streaming_medium_q8_0","min_vram_gb":2,"input_hint":"**Moonshine Streaming Medium**:英语 ASR,GGUF Q8 包;支持离线与流式模式。","input_hint_en":"**Moonshine Streaming Medium**: English ASR GGUF Q8 package with offline and streaming support."},{"id":"moonshine-asr-small","display_name":"Moonshine Streaming Small (asr, GGUF Q8)","display_name_en":"Moonshine Streaming Small (asr, GGUF Q8)","family":"moonshine_asr","path":"models/Moonshine-Streaming-GGUF/moonshine-streaming-small-q8_0.gguf","task":"asr","mode":"offline","download_id":"moonshine_streaming_small_q8_0","min_vram_gb":2,"input_hint":"**Moonshine Streaming Small**:英语 ASR,GGUF Q8 包;支持离线与流式模式。","input_hint_en":"**Moonshine Streaming Small**: English ASR GGUF Q8 package with offline and streaming support."},{"id":"moonshine-asr-tiny","display_name":"Moonshine Streaming Tiny (asr, GGUF Q8)","display_name_en":"Moonshine Streaming Tiny (asr, GGUF Q8)","family":"moonshine_asr","path":"models/Moonshine-Streaming-GGUF/moonshine-streaming-tiny-q8_0.gguf","task":"asr","mode":"offline","download_id":"moonshine_streaming_tiny_q8_0","min_vram_gb":1,"input_hint":"**Moonshine Streaming Tiny**:英语 ASR,轻量 GGUF Q8 包;支持离线与流式模式。","input_hint_en":"**Moonshine Streaming Tiny**: lightweight English ASR GGUF Q8 package with offline and streaming support."},{"id":"moss-transcribe-diarize","display_name":"MOSS-Transcribe-Diarize","family":"moss_transcribe_diarize","path":"models/MOSS-Transcribe-Diarize-GGUF","task":"asr","mode":"offline","download_id":"moss_transcribe_diarize_bf16"},{"id":"moss-tts-v15","display_name":"MOSS-TTS v1.5 8B (tts 克隆, 社区)","display_name_en":"MOSS-TTS v1.5 8B (tts + clone, community)","family":"moss_tts_v15","path":"models/MOSS-TTS-v1.5-GGUF/moss_tts_v15_q8_0_codec_f16.gguf","task":"tts","mode":"offline","download_id":"moss_tts_v15_q8_0_codec_f16","min_vram_gb":18,"input_hint":"**MOSS-TTS v1.5 8B**(社区模型):中英 TTS;上传短参考音频进行声音克隆,留空则使用模型生成的音色。Q8 克隆约需 18 GB 显存。","input_hint_en":"**MOSS-TTS v1.5 8B** (community): English/Chinese TTS. Upload a short reference clip for voice cloning, or leave it empty for a model-generated voice. Q8 cloning needs about 18 GB VRAM."},{"id":"moss-tts-local","display_name":"MOSS-TTS-Local v1.5 (tts)","family":"moss_tts_local","path":"models/MOSS-TTS-Local-Transformer-v1.5","task":"tts","mode":"offline","download_id":"moss_tts_local_v1_5","min_vram_gb":8},{"id":"moss-tts-nano","display_name":"MOSS-TTS-Nano 100M (tts)","family":"moss_tts_nano","path":"models/MOSS-TTS-Nano-100M","task":"tts","mode":"offline","download_id":"moss_tts_nano_100m","min_vram_gb":2},{"id":"moss-ttsd","display_name":"MOSS-TTSD","family":"moss_ttsd","task":"tts","mode":"offline","path":"models/MOSS-TTSD-GGUF/moss_ttsd_q8_0_codec_f16.gguf","download_id":"moss_ttsd_q8_0_codec_f16","arena":false,"default_text":"[S1] Hello, how are you? [S2] I am doing well, thank you."},{"id":"moss-voicegen","display_name":"MOSS-VoiceGenerator","family":"moss_voicegen","task":"vdes","mode":"offline","path":"models/MOSS-VoiceGenerator-GGUF/moss_voicegen_bf16_codec_f16_decode.gguf","download_id":"moss_voicegen_bf16_codec_f16_decode","arena":false},{"id":"mossformer2","display_name":"MossFormer2 (two-speaker separation)","family":"mossformer2","path":"models/MossFormer2-GGUF/mossformer2-ss-16k-f32.gguf","task":"sep","mode":"offline","download_id":"mossformer2_ss_16k_f32"},{"id":"muscriptor-small","display_name":"MuScriptor Small (audio to MIDI)","family":"muscriptor","path":"models/MuScriptor-Small-GGUF","task":"midi","mode":"offline","download_id":"muscriptor_small_f32","min_vram_gb":4},{"id":"nemotron-3-diar","display_name":"Nemotron 3 Diarization","family":"nemotron_3_diar","path":"models/Nemotron-3-Diarization-GGUF/nemotron-3-diarization-bf16.gguf","task":"diar","mode":"offline","download_id":"nemotron_3_diar_bf16","min_vram_gb":2,"input_hint_en":"**Nemotron 3 Diarization**: upload speech audio to produce speaker turns for up to eight speakers. It supports offline and streaming diarization."},{"id":"nemotron-asr","display_name":"Nemotron 3.5 ASR 0.6B (asr, 100+语种)","display_name_en":"Nemotron 3.5 ASR 0.6B (asr, 100+ languages)","family":"nemotron_asr","path":"models/nemotron-3.5-asr-streaming-0.6b","task":"asr","mode":"offline","download_id":"nemotron_asr","min_vram_gb":4,"input_hint":"**Nemotron ASR**:100+ 语种,语种码为 BCP-47(如 en-US / zh-CN),留空=auto;模型自带长音频处理。","input_hint_en":"**Nemotron ASR**: supports more than 100 languages using BCP-47 codes such as en-US or zh-CN. Leave language blank for automatic detection; long audio is handled by the model."},{"id":"neutts-2e","display_name":"NeuTTS 2E (tts, preset voices)","family":"neutts","path":"models/NeuTTS-2E-GGUF","task":"tts","mode":"offline","download_id":"neutts_2e_orig","min_vram_gb":4},{"id":"niagara-asr-19m","display_name":"Niagara ASR 19M (asr)","display_name_en":"Niagara ASR 19M (asr)","family":"niagara_asr","path":"models/Niagara-ASR-GGUF/niagara-19m-batch.en-f32.gguf","task":"asr","mode":"offline","download_id":"niagara_19m_f32","min_vram_gb":1,"input_hint":"**Niagara ASR 19M**:ABR 英语离线 ASR,F32 GGUF 权重。","input_hint_en":"**Niagara ASR 19M**: ABR English offline ASR with F32 GGUF weights."},{"id":"niagara-asr-38m","display_name":"Niagara ASR 38M (asr)","display_name_en":"Niagara ASR 38M (asr)","family":"niagara_asr","path":"models/Niagara-ASR-GGUF/niagara-38m-batch.en-f32.gguf","task":"asr","mode":"offline","download_id":"niagara_38m_f32","min_vram_gb":1,"input_hint":"**Niagara ASR 38M**:ABR 英语离线 ASR,F32 GGUF 权重。","input_hint_en":"**Niagara ASR 38M**: ABR English offline ASR with F32 GGUF weights."},{"id":"omnivoice","display_name":"OmniVoice (tts)","family":"omnivoice","path":"models/OmniVoice","task":"tts","mode":"offline","download_id":"omnivoice","min_vram_gb":10},{"id":"open-wake-word","display_name":"OpenWakeWord (Alexa)","family":"open_wake_word","path":"models/OpenWakeWord-GGUF/open-wake-word-alexa-f32.gguf","task":"wake","mode":"offline","download_id":"open_wake_word_alexa_f32"},{"id":"orukeet","display_name":"Orukeet r3 (asr, Parakeet 微调)","display_name_en":"Orukeet r3 (asr, Parakeet fine-tune)","family":"parakeet_tdt","path":"models/Orukeet-GGUF/orukeet-q8_0.gguf","task":"asr","mode":"offline","download_id":"orukeet_q8_0","min_vram_gb":4,"input_hint":"**Orukeet r3**:Parakeet-TDT 0.6B v3 微调权重,同引擎/同分词器;CC BY-SA 4.0,留空=自动语种。","input_hint_en":"**Orukeet r3**: fine-tuned Parakeet-TDT 0.6B v3 weights on the same engine and tokenizer; CC BY-SA 4.0, leave language empty for auto."},{"id":"owsm-base","display_name":"OWSM v4 Base 102M","family":"owsm","path":"models/OWSM-GGUF/owsm-v4-base-102m-f32.gguf","task":"asr","mode":"offline","download_id":"owsm_v4_base_102m_f32"},{"id":"owsm-medium","display_name":"OWSM v4 Medium 1B","family":"owsm","path":"models/OWSM-GGUF/owsm-v4-medium-1b-f32.gguf","task":"asr","mode":"offline","download_id":"owsm_v4_medium_1b_f32"},{"id":"owsm-small","display_name":"OWSM v4 Small 370M","family":"owsm","path":"models/OWSM-GGUF/owsm-v4-small-370m-f32.gguf","task":"asr","mode":"offline","download_id":"owsm_v4_small_370m_f32"},{"id":"owsm-ctc","display_name":"OWSM-CTC v4 1B","family":"owsm_ctc","path":"models/OWSM-CTC-GGUF/owsm-ctc-v4-1b-f32.gguf","task":"asr","mode":"offline","download_id":"owsm_ctc_v4_1b_f32"},{"id":"parakeet-tdt","display_name":"Parakeet-TDT 0.6B v3 (asr, 流式)","display_name_en":"Parakeet-TDT 0.6B v3 (asr + streaming)","family":"parakeet_tdt","path":"models/parakeet-tdt-0.6b-v3","task":"asr","mode":"offline","download_id":"parakeet_tdt","min_vram_gb":4,"input_hint":"**Parakeet-TDT**:离线/长音频/流式 ASR;支持多种欧洲语言,留空=自动。","input_hint_en":"**Parakeet-TDT**: offline, long-form and streaming ASR for many European languages; leave language empty for auto."},{"id":"personaplex","display_name":"PersonaPlex 7B v1 (speech conversation)","display_name_en":"PersonaPlex 7B v1 (speech conversation)","family":"personaplex","path":"models/PersonaPlex-GGUF","task":"s2s","mode":"offline","download_id":"personaplex_7b_v1_q4_k","min_vram_gb":8,"request_options":["voice_id","system_prompt","temperature","text_temperature","top_k","text_top_k","do_sample","seed"],"input_hint":"**PersonaPlex**:上传用户语音,模型返回语音回复;文本框可填写 assistant system/persona prompt;`voice_id` 选择打包音色,也可上传参考音色覆盖。","input_hint_en":"**PersonaPlex**: upload user speech and receive a spoken response. The text box provides the assistant system/persona prompt; `voice_id` selects a packaged voice, and an uploaded reference voice overrides it."},{"id":"piper-tts","display_name":"Piper Lessac Medium (tts 英语, 社区)","display_name_en":"Piper Lessac Medium (en tts, community)","family":"piper_tts","path":"models/Piper-TTS-GGUF/piper-en-us-lessac-medium-orig.gguf","task":"tts","mode":"offline","download_id":"piper_lessac_medium_orig","min_vram_gb":1,"input_hint":"**Piper Lessac Medium**(社区模型):轻量英语 TTS,使用打包的 Lessac 音色,不需要上传参考音频。","input_hint_en":"**Piper Lessac Medium** (community): lightweight English TTS with the packaged Lessac voice; no reference audio is needed."},{"id":"plapre","display_name":"Plapre 3 (Danish TTS)","family":"plapre","path":"models/Plapre-3-GGUF/plapre-3-bf16.gguf","task":"tts","mode":"offline","download_id":"plapre_3_bf16","default_text":"Godmorgen. Solen skinner, og vi tager en tur til havnen."},{"id":"pocket-tts","display_name":"Pocket TTS (tts)","family":"pocket_tts","path":"models/pocket-tts","task":"tts","mode":"offline","download_id":"pocket_tts","min_vram_gb":2},{"id":"pulsevad-2.1k","display_name":"PulseVAD 2.1K","family":"pulsevad","path":"models/PulseVAD-GGUF","task":"vad","mode":"offline","download_id":"pulsevad_2_1k_f32"},{"id":"pulsevad-81k","display_name":"PulseVAD 81K","family":"pulsevad","path":"models/PulseVAD-GGUF","task":"vad","mode":"offline","download_id":"pulsevad_81k_f32"},{"id":"qwen3-forced-aligner","display_name":"Qwen3 Forced Aligner (align)","family":"qwen3_forced_aligner","path":"models/Qwen3-ForcedAligner-0.6B","task":"align","mode":"offline","download_id":"qwen3_forced_aligner_0_6b","min_vram_gb":3},{"id":"qwen3-asr","display_name":"Qwen3-ASR 0.6B (asr)","family":"qwen3_asr","path":"models/Qwen3-ASR-0.6B","task":"asr","mode":"offline","download_id":"qwen3_asr_0_6b","min_vram_gb":3},{"id":"qwen3-asr-1.7b","display_name":"Qwen3-ASR 1.7B HF (asr)","family":"qwen3_asr","path":"models/Qwen3-ASR-1.7B-hf","task":"asr","mode":"offline","download_id":"qwen3_asr_1_7b_hf","min_vram_gb":6,"input_hint":"**Qwen3-ASR 1.7B**(HF 原生权重,免转换):精度高于 0.6B;长音频自动分段转写;8G 卡显存偏紧,长音频建议先短段试跑。","input_hint_en":"**Qwen3-ASR 1.7B**: native Hugging Face weights with no conversion required. It is more accurate than the 0.6B model and automatically chunks long audio; test short clips first on an 8 GB GPU."},{"id":"qwen3-tts","display_name":"Qwen3-TTS 0.6B (tts)","family":"qwen3_tts","path":"models/Qwen3-TTS-12Hz-0.6B-Base","task":"tts","mode":"offline","download_id":"qwen3_tts_0_6b_base","min_vram_gb":5},{"id":"qwen3-tts-1.7b","display_name":"Qwen3-TTS 1.7B Base (tts)","family":"qwen3_tts","path":"models/Qwen3-TTS-12Hz-1.7B-Base","task":"tts","mode":"offline","download_id":"qwen3_tts_1_7b_base","min_vram_gb":8},{"id":"qwen3-tts-1.7b-custom","display_name":"Qwen3-TTS 1.7B CustomVoice (tts)","family":"qwen3_tts","path":"models/Qwen3-TTS-12Hz-1.7B-CustomVoice","task":"tts","mode":"offline","download_id":"qwen3_tts_1_7b_custom_voice","min_vram_gb":8},{"id":"qwen3-tts-1.7b-vdesign","display_name":"Qwen3-TTS 1.7B VoiceDesign (vdes)","family":"qwen3_tts","path":"models/Qwen3-TTS-12Hz-1.7B-VoiceDesign","task":"vdes","mode":"offline","download_id":"qwen3_tts_1_7b_voice_design","min_vram_gb":8,"input_hint":"**Qwen3-TTS VoiceDesign**:在『音色描述』里用文字描述想要的声音(如“低沉磁性的中年男声,语速偏慢”),配上要念的文本即可,无需参考音频。","input_hint_en":"**Qwen3-TTS VoiceDesign**: describe the desired voice, then enter the text to synthesize. No reference recording is required."},{"id":"reuse","display_name":"RE-USE","family":"reuse","path":"models/RE-USE-GGUF/reuse-f32.gguf","task":"s2s","mode":"offline","download_id":"reuse_f32","workflow":"enhancement"},{"id":"rnnoise","display_name":"RNNoise","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/rnnoise/rnnoise10Gb_15.safetensors","load_options":{"utility":"rnnoise"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/rnnoise/rnnoise10Gb_15.safetensors"},{"id":"rvc","display_name":"RVC (vc, GGUF F16)","display_name_en":"RVC (voice conversion, GGUF F16)","family":"rvc","path":"models/RVC-GGUF","task":"vc","mode":"offline","download_id":"rvc_f16","min_vram_gb":4,"input_hint":"**RVC**:所选 GGUF 即目标音色;上传源语音即可转换;索引/音高等选项可用 JSON 传。","input_hint_en":"**RVC**: the selected GGUF is the target voice; upload source speech to convert. Index and pitch options can be passed through the JSON box."},{"id":"sam-audio-base","display_name":"SAM Audio Base","family":"sam_audio","task":"s2s","workflow":"separation","mode":"offline","path":"models/SAM-Audio-GGUF/sam-audio-base-q8_0.gguf","download_id":"sam_audio_base_q8_0","default_text":"man speaking"},{"id":"sam-audio-large","display_name":"SAM Audio Large","family":"sam_audio","task":"s2s","workflow":"separation","mode":"offline","path":"models/SAM-Audio-GGUF/sam-audio-large-q8_0.gguf","download_id":"sam_audio_large_q8_0","default_text":"man speaking"},{"id":"sam-audio-small","display_name":"SAM Audio Small","family":"sam_audio","task":"s2s","workflow":"separation","mode":"offline","path":"models/SAM-Audio-GGUF/sam-audio-small-q8_0.gguf","download_id":"sam_audio_small_q8_0","default_text":"man speaking"},{"id":"samsone-99m","display_name":"SAMSONE 99M","family":"samsone","task":"asr","workflow":"analysis","arena":false,"mode":"offline","path":"models/Samsone-GGUF/samsone-99m-q8_0.gguf","download_id":"samsone_99m_q8_0"},{"id":"samsone-134m","display_name":"SAMSONE 134M","family":"samsone","task":"asr","workflow":"analysis","arena":false,"mode":"offline","path":"models/Samsone-GGUF/samsone-134m-q8_0.gguf","download_id":"samsone_134m_q8_0"},{"id":"samsone-356m","display_name":"SAMSONE 356M","family":"samsone","task":"asr","workflow":"analysis","arena":false,"mode":"offline","path":"models/Samsone-GGUF/samsone-356m-q8_0.gguf","download_id":"samsone_356m_q8_0"},{"id":"sanotts","display_name":"sanoTTS voice family (tts, community)","family":"sanotts","path":"models/sanoTTS-heart-nano-GGUF/heart-nano-f32.gguf","task":"tts","mode":"offline","download_id":"sanotts_heart_nano_orig","min_vram_gb":1},{"id":"seed-vc-svc","display_name":"Seed-VC (svc 歌声转换)","display_name_en":"Seed-VC (singing voice conversion)","family":"seed_vc","path":"models/SeedVC-MLX","task":"svc","mode":"offline","download_id":"seed_vc","min_vram_gb":4,"input_hint":"**Seed-VC 歌声转换 (svc)**:上传源歌声 + 目标歌手参考音色,默认 route=v1_svc(带 F0 条件)。可在『其它参数(JSON)』里调 `auto_f0_adjust` / `semi_tone_shift` / `f0_condition`。","input_hint_en":"**Seed-VC singing conversion**: upload source singing and a target-singer reference. The default route is v1_svc with F0 conditioning."},{"id":"seed-vc","display_name":"Seed-VC (vc 语音转换)","display_name_en":"Seed-VC (voice conversion)","family":"seed_vc","path":"models/SeedVC-MLX","task":"vc","mode":"offline","download_id":"seed_vc","min_vram_gb":4},{"id":"sense-asr","display_name":"SenseVoice-Small (asr, 流式, 社区)","display_name_en":"SenseVoice-Small (asr + streaming, community)","family":"sense_asr","path":"models/SenseVoice-Small-GGUF","task":"asr","mode":"offline","download_id":"sensevoice_small_q8","min_vram_gb":4,"input_hint":"**SenseVoice-Small**(社区模型):多语种 ASR,事件/情感/语言标签,ITN 可开关;离线与流式模式。","input_hint_en":"**SenseVoice-Small** (community): multilingual ASR with event/emotion/language tags, optional ITN; offline and streaming modes."},{"id":"sheetsage2","display_name":"SheetSage2 (audio to ABC)","family":"sheetsage2","path":"models/SheetSage2-GGUF/sheetsage2-orig.gguf","task":"midi","mode":"offline","download_id":"sheetsage2_orig","min_vram_gb":8,"input_hint_en":"**SheetSage2**: upload a song or instrumental recording to transcribe it into an ABC score artifact."},{"id":"sherpa-kws","display_name":"Sherpa Zipformer KWS (Chinese / English)","family":"sherpa_kws","path":"models/Sherpa-KWS-GGUF/sherpa-kws-zipformer-zh-en-3m-f32.gguf","task":"wake","mode":"offline","download_id":"sherpa_kws_zipformer_zh_en_3m_f32"},{"id":"sidon","display_name":"Sidon","family":"sidon","path":"models/Sidon-GGUF/sidon-v0.1-f32.gguf","task":"s2s","mode":"offline","download_id":"sidon_f32","workflow":"enhancement"},{"id":"silero-vad","display_name":"Silero VAD (vad, bundled)","family":"silero_vad","path":"assets/framework/models/silero_vad","task":"vad","mode":"offline","min_vram_gb":1},{"id":"smart-turn","display_name":"Smart Turn v3.2","family":"smart_turn","path":"models/Smart-Turn-v3-GGUF/smart-turn-v3.2-f32.gguf","task":"turn","mode":"offline","download_id":"smart_turn_v3_2_f32","workflow":"analysis"},{"id":"soprano-tts","display_name":"Soprano TTS (tts)","family":"soprano_tts","path":"models/Soprano-1.1-80M-GGUF","task":"tts","mode":"offline","download_id":"soprano_1_1_80m_q8_0","min_vram_gb":1},{"id":"sopro-tts","display_name":"Sopro V2 Turbo (tts + clone)","family":"sopro_tts","path":"models/sopro-v2-turbo-GGUF/sopro-v2-turbo-f16.gguf","task":"tts","mode":"offline","download_id":"sopro_v2_turbo_f16","min_vram_gb":2,"request_options":["language","temperature","top_p","top_k","num_inference_steps","max_seconds","min_seconds","ref_seconds","text_chunk_size","seed"]},{"id":"sortformer-diar","display_name":"Sortformer Diarization 4spk (diar)","family":"sortformer_diar","path":"models/diar_sortformer_4spk-v1","task":"diar","mode":"offline","download_id":"sortformer_diar_4spk_v1","min_vram_gb":2},{"id":"stable-audio-medium","display_name":"Stable Audio 3 Medium (gen)","family":"stable_audio","path":"models/stable-audio-3-medium","task":"gen","mode":"offline","download_id":"stable_audio_3_medium","session_options":{"stable_audio.mem_saver":"true"},"min_vram_gb":10},{"id":"stable-audio-small-music","display_name":"Stable Audio 3 Small Music (gen)","family":"stable_audio","path":"models/stable-audio-3-small-music","task":"gen","mode":"offline","download_id":"stable_audio_3_small_music","min_vram_gb":4},{"id":"stable-audio-small-sfx","display_name":"Stable Audio 3 Small SFX (gen)","family":"stable_audio","path":"models/stable-audio-3-small-sfx","task":"gen","mode":"offline","download_id":"stable_audio_3_small_sfx","min_vram_gb":4},{"id":"supertonic","display_name":"Supertonic 3 (tts 预置音色/多语种)","display_name_en":"Supertonic 3 (tts, preset voices)","family":"supertonic","path":"models/supertonic-3","task":"tts","mode":"offline","download_id":"supertonic_3","min_vram_gb":2},{"id":"tf-gridnet","display_name":"TF-GridNet (two-speaker separation)","family":"tf_gridnet","path":"models/TF-GridNet-GGUF/tf-gridnet-wsj0-2mix-f32.gguf","task":"sep","mode":"offline","download_id":"tf_gridnet_wsj0_2mix_f32"},{"id":"tone-color-vc","display_name":"Tone Color VC","family":"tone_color_vc","task":"vc","mode":"offline","path":"models/Tone-Color-VC-GGUF/tone-color-vc-f32.gguf","download_id":"tone_color_vc_f32"},{"id":"universr-audio","display_name":"UniverSR Audio","family":"universr","path":"models/UniverSR-GGUF","task":"s2s","mode":"offline","download_id":"universr_audio_orig"},{"id":"universr-speech","display_name":"UniverSR Speech","family":"universr","path":"models/UniverSR-GGUF","task":"s2s","mode":"offline","download_id":"universr_speech_orig"},{"id":"vevo2-s2s","display_name":"Vevo2 (s2s 语音编辑, GGUF Q8)","display_name_en":"Vevo2 (speech editing, GGUF Q8)","family":"vevo2","path":"models/Vevo2-GGUF","task":"s2s","mode":"offline","download_id":"vevo2_gguf","min_vram_gb":6,"input_hint":"**Vevo2 语音编辑 (s2s)**:上传要编辑的源语音,并在『其它参数(JSON)』里填 `{\\"target_text\\": \\"替换后的完整句子\\"}`(编辑保持原说话人音色,可不上传目标音色)。","input_hint_en":"**Vevo2 speech editing**: upload source speech and set target_text to the complete replacement sentence in Additional options. Editing preserves the original speaker and does not require a target-voice reference."},{"id":"vevo2-svc","display_name":"Vevo2 (svc 歌声转换, GGUF Q8)","display_name_en":"Vevo2 (singing voice conversion, GGUF Q8)","family":"vevo2","path":"models/Vevo2-GGUF","task":"svc","mode":"offline","download_id":"vevo2_gguf","min_vram_gb":6,"input_hint":"**Vevo2 歌声转换 (svc)**:上传源歌声 + 目标歌手参考音色,默认 route=style_preserved_svc。style_converted_svc / singing_style_conversion 等风格转换 route 需在『其它参数(JSON)』里补 `style_ref`(服务器本地 wav 路径)/ `style_ref_text` / `target_text`。","input_hint_en":"**Vevo2 singing conversion**: upload source singing and a target-singer reference. The default route is style_preserved_svc; style-conversion routes also accept style_ref, style_ref_text and target_text in Additional options."},{"id":"vevo2","display_name":"Vevo2 (vc 语音转换, GGUF Q8)","display_name_en":"Vevo2 (voice conversion, GGUF Q8)","family":"vevo2","path":"models/Vevo2-GGUF","task":"vc","mode":"offline","download_id":"vevo2_gguf","min_vram_gb":6},{"id":"vibevoice","display_name":"VibeVoice 1.5B/7B (tts, long-form/multi-speaker)","family":"vibevoice","path":"models/VibeVoice-1.5B","task":"tts","mode":"offline","download_id":"vibevoice_1_5b","min_vram_gb":7},{"id":"vibevoice-7b","display_name":"VibeVoice 7B (tts, long-form/multi-speaker)","family":"vibevoice","path":"models/VibeVoice-7B-GGUF","task":"tts","mode":"offline","download_id":"vibevoice_7b_q8_0","min_vram_gb":16},{"id":"vibevoice-asr","display_name":"VibeVoice ASR (asr, 多语种+说话人分段)","display_name_en":"VibeVoice ASR (asr, multilingual + speaker turns)","family":"vibevoice_asr","path":"models/VibeVoice-ASR","task":"asr","mode":"offline","download_id":"vibevoice_asr","min_vram_gb":20,"input_hint":"**VibeVoice ASR**:自动语种,可输出分段/说话人轮次;文本框可填上下文提示(如 The recording is a meeting conversation.)。权重 17.3G,8G 卡跑不动。","input_hint_en":"**VibeVoice ASR**: automatic language detection with segment and speaker-turn output. The text box accepts a context prompt. Its 17.3 GB weights require substantially more than 8 GB VRAM."},{"id":"vibevoice-asr-streaming-1.5b","display_name":"VibeVoice ASR Streaming 1.5B (asr, 多语种+流式)","display_name_en":"VibeVoice ASR Streaming 1.5B (asr, multilingual + streaming)","family":"vibevoice_asr_streaming","path":"models/VibeVoice-ASR-Streaming-1.5B-GGUF/vibevoice-asr-streaming-1.5b-q8_0.gguf","task":"asr","mode":"offline","download_id":"vibevoice_asr_streaming_1_5b_q8_0","min_vram_gb":6,"input_hint":"**VibeVoice ASR Streaming 1.5B**:7B 的较小版本,功能相同,显存占用更低,准确率略低;文本框可填上下文提示。","input_hint_en":"**VibeVoice ASR Streaming 1.5B**: the smaller sibling of the 7B with the same features, lower VRAM use, and somewhat lower accuracy. The text box accepts a context prompt."},{"id":"vibevoice-asr-streaming-7b","display_name":"VibeVoice ASR Streaming 7B (asr, 多语种+流式)","display_name_en":"VibeVoice ASR Streaming 7B (asr, multilingual + streaming)","family":"vibevoice_asr_streaming","path":"models/VibeVoice-ASR-Streaming-7B-GGUF/vibevoice-asr-streaming-7b-q8_0.gguf","task":"asr","mode":"offline","download_id":"vibevoice_asr_streaming_7b_q8_0","min_vram_gb":18,"input_hint":"**VibeVoice ASR Streaming 7B**:多语种 ASR,支持长音频流式解码和说话人轮次;文本框可填上下文提示。","input_hint_en":"**VibeVoice ASR Streaming 7B**: multilingual ASR with long-audio streaming decode and speaker-turn output. The text box accepts a context prompt."},{"id":"vieneu-tts","display_name":"VieNeu-TTS v3 Turbo (tts 越南语, 社区)","display_name_en":"VieNeu-TTS v3 Turbo (vi tts, community)","family":"vieneu_v3_turbo","path":"models/VieNeu-TTS-v3-Turbo","task":"tts","mode":"offline","download_id":"vieneu_v3_turbo_v3_turbo","min_vram_gb":4,"input_hint":"**VieNeu-TTS v3 Turbo**(社区模型):越南语 / 英语;上传参考音色即克隆。","input_hint_en":"**VieNeu-TTS v3 Turbo** (community): Vietnamese and English. Upload a reference voice to clone."},{"id":"voxcpm1","display_name":"VoxCPM1 0.5B (tts + clone)","family":"voxcpm1","path":"models/VoxCPM1-GGUF","task":"tts","mode":"offline","download_id":"voxcpm1_0_5b_q8_0","min_vram_gb":4},{"id":"voxcpm2","display_name":"VoxCPM2 (tts)","family":"voxcpm2","path":"models/VoxCPM2","task":"tts","mode":"offline","download_id":"voxcpm2","session_options":{"voxcpm2.weight_type":"q8_0"},"min_vram_gb":6},{"id":"voxtral-realtime","display_name":"Voxtral Mini 4B Realtime (asr, 自动语种+流式)","display_name_en":"Voxtral Mini 4B Realtime (asr, auto + streaming)","family":"voxtral_realtime","path":"models/Voxtral-Mini-4B-Realtime-2602-GGUF","task":"asr","mode":"offline","download_id":"voxtral_realtime","min_vram_gb":8},{"id":"voxtral-tts","display_name":"Voxtral 4B TTS","family":"voxtral_tts","path":"models/Voxtral-4B-TTS-2603-GGUF/voxtral-4b-tts-2603-bf16.gguf","task":"tts","mode":"offline","download_id":"voxtral_4b_tts_2603_bf16","default_text":"The next train leaves in ten minutes. Please wait by platform five."},{"id":"whistle-asr","display_name":"Whistle ASR","family":"whistle_asr","path":"models/Whistle-GGUF/whistle-f32.gguf","task":"asr","mode":"offline","download_id":"whistle_asr_f32"},{"id":"yue2","display_name":"Yue2 3B (song gen)","family":"yue2","path":"models/Yue2-3B-GGUF","task":"gen","mode":"offline","download_id":"yue2_main_q8_0","default_text":"[Verse]\\nSoft morning light is touching the window.\\nI hear the city waking below.\\n[Chorus]\\nStay with the rhythm, let it carry us home.\\nSing with the sunrise, we are never alone.","min_vram_gb":12,"input_hint_en":"**Yue2 3B**: provide lyrics and a style prompt. The default inference combo is Main Q8_0 + VAE F16; choose other main/VAE files from Model parameters before loading."},{"id":"zipenhancer","display_name":"ZipEnhancer","family":"builtin_audio_utils","task":"s2s","workflow":"enhancement","mode":"offline","path":"models/Audio-Utilities/zipenhancer/zipenhancer.safetensors","load_options":{"utility":"zipenhancer"},"weights_url":"https://raw.githubusercontent.com/0xShug0/audio.cpp/main/assets/framework/audio_utilities/zipenhancer/zipenhancer.safetensors"},{"id":"zipvoice","display_name":"ZipVoice (中英零样本克隆)","display_name_en":"ZipVoice (zh/en zero-shot cloning)","family":"zipvoice","path":"models/ZipVoice-Distill-GGUF","task":"clon","mode":"offline","download_id":"zipvoice_distill_gguf","min_vram_gb":4,"input_hint":"**ZipVoice**:中/英零样本声音克隆(k2-fsa TTSZipformer flow-matching + Vocos,蒸馏版 8 步采样)。上传参考音频,并在『参考文本’里填入它的逐字转写——参考音频与参考文本必须配对;合成文本支持中文、英文及混排。权重 Apache-2.0。","input_hint_en":"**ZipVoice**: zero-shot voice cloning in zh/en (k2-fsa TTSZipformer flow matching + Vocos, distilled 8-step sampling). Upload a reference clip and put its exact transcript in the reference-text box — the clip and the transcript must match; synthesis text supports zh/en/mixed. Weights are Apache-2.0."}]')},W$={ming3_tts:[{name:"template_name",type:"text",label:"Prompt template",placeholder:"Automatic"},{name:"voice_id",type:"text",label:"IP voice name",placeholder:"US_James (IP template only)"},{name:"temperature",type:"number",label:"Temperature",default:0,minimum:0,step:.1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:2,step:.1},{name:"sigma",type:"number",label:"SDE noise scale",default:.25,minimum:0,step:.05},{name:"trim_silence",type:"bool",label:"Trim trailing silence",default:!0}],ming3_audio:[{name:"voice_id",type:"text",label:"Voice name",placeholder:"US_James"},{name:"prompt",type:"text",label:"Audio task prompt",placeholder:"Use task default"},{name:"system_prompt",type:"text",label:"System prompt"},{name:"enable_thinking",type:"bool",label:"Enable thinking",default:!1},{name:"max_audio_tokens",type:"number",label:"Maximum acoustic patches per chunk",default:1e3,minimum:1,step:1},{name:"temperature",type:"number",label:"Temperature",default:0,minimum:0,step:.1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:2,step:.1},{name:"disk_experts",scope:"session",session_option:"ming3_audio.disk_experts",type:"bool",label:"Offload expert weights",default:!1},{name:"pin_experts",scope:"session",session_option:"ming3_audio.pin_experts",type:"bool",label:"Keep experts in pinned host RAM",default:!1}],xtts_v2:[{name:"temperature",type:"slider",label:"Temperature",default:.75,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"Top-k",default:50,minimum:0,step:1},{name:"top_p",type:"slider",label:"Top-p",default:.85,minimum:0,maximum:1,step:.01},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:10,minimum:1,step:.5},{name:"max_mel_tokens",type:"number",label:"Maximum mel tokens",default:605,minimum:1,step:1}],latentsync:[{name:"num_inference_steps",type:"number",label:"Denoising steps",default:20,minimum:1,maximum:999,step:1},{name:"cache_interval",type:"number",label:"DeepCache interval",default:1,minimum:1,step:1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:1.5,minimum:0,step:.1},{name:"frames_per_chunk",type:"number",label:"Frames per chunk",default:16,minimum:1,maximum:24,step:1},{name:"fps",type:"number",label:"Frames per second",default:25,minimum:1,step:1},{name:"mem_saver",scope:"session",session_option:"latentsync.mem_saver",type:"bool",label:"Memory saver",default:!1}],ast_audioset:[{name:"top_k",type:"number",label:"Top classes",default:10,minimum:1,maximum:527,step:1}],ced:[{name:"top_k",type:"number",label:"Top classes",default:10,minimum:1,maximum:527,step:1}],fish_drama3:[{name:"text_chunk_size",type:"number",label:"Characters per chunk",default:128,minimum:1,step:1,info:"Smaller chunks reduce waveform-decoder peak memory; larger chunks reduce repeated prefills."},{name:"temperature",type:"slider",label:"Temperature",default:1,minimum:0,maximum:2,step:.05},{name:"top_p",type:"slider",label:"Top-p",default:.9,minimum:.01,maximum:1,step:.01},{name:"top_k",type:"number",label:"Top-k",default:4097,minimum:1,step:1},{name:"disk_experts",type:"bool",scope:"session",session_option:"fish_drama3.disk_experts",label:"Offload expert weights",default:!0,info:"Keep only selected expert weights on the GPU. Expert computation stays on the selected backend; changing this reloads the model."},{name:"pin_experts",type:"bool",scope:"session",session_option:"fish_drama3.pin_experts",label:"Preload experts in pinned host RAM",default:!0,info:"Requires expert offload. Faster uploads, but holds the full expert banks in pinned host RAM."},{name:"expert_cache_size",type:"number",scope:"session",session_option:"fish_drama3.expert_cache_size",label:"GPU expert slots per layer",default:8,minimum:8,maximum:256,step:1},{name:"context_length",type:"number",scope:"session",session_option:"fish_drama3.context_length",label:"Context capacity",default:4096,minimum:1,step:1,info:"Prompt and generated frames share this capacity, including all voice references and dialogue history."}],firered_vad:[{name:"threshold",type:"number",label:"Speech threshold",minimum:0,maximum:1,step:.05},{name:"min_silence_duration_ms",type:"number",label:"Minimum silence (ms)",default:200,minimum:0,step:10},{name:"speech_pad_ms",type:"number",label:"Speech padding (ms)",default:0,minimum:0,step:10}],hviske_asr_v6:[{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","silence","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s)",default:28,minimum:.001,maximum:30,step:.1},{name:"max_tokens",type:"number",label:"Maximum tokens",default:440,minimum:1,step:1},{name:"num_beams",type:"number",label:"Beam count",default:2,minimum:1,step:1},{name:"length_penalty",type:"number",label:"Length penalty",default:1,minimum:0,step:.1}],micro_wake_word:[{name:"threshold",type:"number",label:"Detection threshold",minimum:0,maximum:1,step:.05},{name:"sliding_window_size",type:"number",label:"Sliding window frames",minimum:1,step:1}],open_wake_word:[{name:"threshold",type:"number",label:"Detection threshold",default:.5,minimum:0,maximum:1,step:.05}],plapre:[{name:"temperature",type:"number",label:"Temperature",default:.8,minimum:0,step:.05},{name:"top_p",type:"number",label:"Top-p",default:.95,minimum:.01,maximum:1,step:.01},{name:"top_k",type:"number",label:"Top-k",default:50,minimum:-1,step:1},{name:"x_vector_only_mode",type:"bool",label:"Reference speaker embedding only",default:!1}],mossformer2:[{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s, 0 = whole recording)",default:2,minimum:0,step:.1},{name:"audio_chunk_overlap_sec",type:"number",label:"Chunk overlap (s)",default:.5,minimum:0,step:.1},{name:"normalize_output",type:"bool",label:"Normalize output",default:!0}],sherpa_kws:[{name:"keywords",type:"text",label:"Keyword tokens (one phrase per line)",lines:3,placeholder:"Leave empty to use embedded keywords"},{name:"max_active_paths",type:"number",label:"Active decoding paths",default:4,minimum:1,step:1},{name:"keywords_score",type:"number",label:"Keyword score",default:1,minimum:0,step:.1},{name:"keywords_threshold",type:"number",label:"Keyword threshold",default:.25,minimum:0,maximum:1,step:.05},{name:"num_trailing_blanks",type:"number",label:"Trailing blanks",default:1,minimum:0,step:1}],tf_gridnet:[{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s, 0 = whole recording)",default:2.4,minimum:0,step:.1},{name:"audio_chunk_overlap_sec",type:"number",label:"Chunk overlap (s)",default:1.6,minimum:0,step:.1},{name:"normalize_output",type:"bool",label:"Normalize output",default:!0}],voxtral_tts:[{name:"voice_id",type:"choice",label:"Voice preset",default:"casual_male",choices:["casual_female","casual_male","cheerful_female","neutral_female","neutral_male","pt_male","pt_female","nl_male","nl_female","it_male","it_female","fr_male","fr_female","es_male","es_female","de_male","de_female","ar_male","hi_male","hi_female"]},{name:"num_inference_steps",type:"number",label:"Diffusion steps",default:7,minimum:1,step:1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:1.2,minimum:0,step:.1},{name:"max_tokens",type:"number",label:"Maximum tokens",default:2048,minimum:1,step:1}],kugelaudio:[{name:"num_inference_steps",type:"number",label:"Diffusion steps",default:20,minimum:1,maximum:1e3,step:1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:3,minimum:0,step:.1},{name:"max_tokens",type:"number",label:"Maximum tokens",default:2048,minimum:1,step:1},{name:"do_sample",type:"bool",label:"Sample AR tokens",default:!1},{name:"temperature",type:"number",label:"Temperature",default:1,minimum:0,step:.1},{name:"text_chunk_size",type:"number",label:"Text chunk size",default:300,minimum:1,step:1},{name:"text_chunk_mode",type:"choice",label:"Text chunk mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],crisperwhisper:[{name:"transcription_mode",type:"choice",label:"Transcription mode",default:"verbatim",choices:["verbatim","intended","verbatimize"]},{name:"return_timestamps",type:"bool",label:"Word timestamps",default:!1},{name:"max_tokens",type:"number",label:"Maximum tokens",default:256,minimum:1,maximum:439,step:1},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s)",default:30,minimum:.02,maximum:30,step:.1},{name:"audio_chunk_overlap_sec",type:"number",label:"Chunk overlap (s)",default:4,minimum:0,step:.1}],index_echo:[{name:"target_language",type:"choice",label:"Translation language",default:"en",choices:["en","es","ja"]},{name:"max_text_tokens",type:"number",label:"Maximum text tokens",default:2e3,minimum:1,step:1},{name:"temperature",type:"number",label:"Temperature",default:0,minimum:0,maximum:2,step:.1},{name:"glossary",type:"text",label:"Glossary",default:""},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","quiet_energy","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s)",default:60,minimum:1,maximum:60,step:1}],audio_flamingo:[{name:"instruct",type:"text",label:"Question or instruction",default:"Transcribe the input speech.",lines:3},{name:"max_tokens",type:"number",label:"Maximum tokens",default:2048,minimum:1,step:1},{name:"do_sample",type:"bool",label:"Sample tokens",default:!1},{name:"temperature",type:"number",label:"Temperature",default:1,minimum:.01,step:.1},{name:"top_k",type:"number",label:"Top K",default:50,minimum:0,step:1},{name:"top_p",type:"number",label:"Top P",default:1,minimum:.01,maximum:1,step:.05},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:1,minimum:.01,step:.05}],owsm:[{name:"language",type:"text",label:"Input language (ISO 639-3)",default:"eng",placeholder:"eng, jpn, zho, auto"},{name:"target_language",type:"text",label:"Translation language (ISO 639-3)",default:""},{name:"return_timestamps",type:"bool",label:"Timestamp segments",default:!1},{name:"condition_on_previous_text",type:"bool",label:"Condition on previous text",default:!1},{name:"beam_size",type:"number",label:"Beam size",default:1,minimum:1,maximum:50002,step:1},{name:"max_tokens",type:"number",label:"Maximum tokens (0 = model limit)",default:0,minimum:0,maximum:374,step:1},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s)",default:30,minimum:.2,maximum:30,step:.1}],owsm_ctc:[{name:"language",type:"text",label:"Input language (ISO 639-3)",default:"eng",placeholder:"eng, jpn, zho, auto"},{name:"target_language",type:"text",label:"Translation language (ISO 639-3)",default:""},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","none"]}],reuse:[{name:"audio_chunk_duration_sec",type:"number",label:"Chunk duration (s, 0 = whole recording)",default:0,minimum:0,step:1},{name:"audio_chunk_overlap_sec",type:"number",label:"Chunk overlap (s)",default:1,minimum:0,step:.1}],smart_turn:[{name:"threshold",type:"number",label:"Completion threshold",default:.5,minimum:0,maximum:1,step:.05}],maya1:[{name:"instruct",type:"text",label:"Voice description",default:"Warm female voice with an American accent and conversational pacing.",lines:3},{name:"temperature",type:"number",label:"Temperature",default:.4,minimum:.01,step:.05},{name:"top_p",type:"number",label:"Top P",default:.9,minimum:0,maximum:1,step:.05},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:1.1,minimum:.01,step:.05}],gigaam_asr:[{name:"return_timestamps",type:"bool",label:"Word timestamps",default:!1},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","quiet_energy","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:25,minimum:.02,maximum:25,step:.1}],samsone:[{name:"instruct",type:"text",label:"Question or instruction",default:"describe the audio",lines:3},{name:"max_tokens",type:"number",label:"Maximum tokens",default:100,minimum:1,maximum:512,step:1}],sam_audio:[{name:"num_inference_steps",type:"number",label:"Inference steps",default:16,minimum:1,step:1},{name:"anchors",type:"text",label:"Time anchors (JSON)",default:"",placeholder:'[["+",0.5,2.0],["-",3.0,4.0]]'}],tone_color_vc:[{name:"temperature",type:"number",label:"Temperature",default:.3,minimum:0,step:.05}],moss_ttsd:[{name:"instruct",type:"text",label:"Delivery instruction",default:""},{name:"temperature",type:"number",label:"Temperature",default:1.5,minimum:0,step:.1},{name:"top_p",type:"number",label:"Top P",default:.6,minimum:0,maximum:1,step:.05},{name:"top_k",type:"number",label:"Top K",default:50,minimum:0,step:1},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:1.1,minimum:0,step:.05},{name:"max_frames",type:"number",label:"Maximum audio frames (0 = automatic)",default:0,minimum:0,step:1}],moss_voicegen:[{name:"temperature",type:"number",label:"Temperature",default:1.5,minimum:0,step:.1},{name:"top_p",type:"number",label:"Top P",default:.6,minimum:0,maximum:1,step:.05},{name:"top_k",type:"number",label:"Top K",default:50,minimum:0,step:1},{name:"repetition_penalty",type:"number",label:"Repetition penalty",default:1.1,minimum:0,step:.05}],canary_asr:[{name:"target_language",type:"choice",label:"Target language",default:"",choices:["","en","de","es","fr"]},{name:"pnc",type:"bool",label:"Punctuation and capitalization",default:!0},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:40,minimum:.02,maximum:40,step:.1}],cohere_asr:[{name:"pnc",type:"bool",label:"Punctuation and capitalization",default:!0},{name:"audio_chunk_mode",type:"choice",label:"Audio chunk mode",default:"auto",choices:["auto","quiet_energy","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:35,minimum:.04,maximum:35,step:.1}],moss_transcribe_diarize:[{name:"instruct",type:"text",label:"Instruction",default:"",lines:3}],apollo:[{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:0,minimum:0,step:1},{name:"audio_chunk_overlap_sec",type:"number",label:"Audio chunk overlap (s)",default:1,minimum:0,step:.1},{name:"edge_pad_duration_sec",type:"number",label:"Edge padding (s)",default:0,minimum:0,step:.1}],universr:[{name:"input_sample_rate",type:"choice",label:"Input bandwidth (Hz)",default:"",choices:["",8e3,12e3,16e3,24e3]},{name:"audio_chunk_duration_sec",type:"number",label:"Audio chunk duration (s)",default:0,minimum:0,step:1},{name:"sampler_mode",type:"choice",label:"Sampler",default:"midpoint",choices:["euler","midpoint","rk4"]},{name:"num_inference_steps",type:"number",label:"Inference steps",default:4,minimum:1,step:1},{name:"guidance_scale",type:"number",label:"Guidance scale",default:1.5,minimum:0,step:.1}],liveavatar:[{name:"reference_image_path",type:"text",label:"Reference image",default:""},{name:"generation_mode",type:"choice",label:"Generation mode",default:"offline",choices:["offline","liveavatar"]},{name:"height",type:"number",label:"Height",default:480,minimum:16,step:16,precision:0},{name:"width",type:"number",label:"Width",default:832,minimum:16,step:16,precision:0},{name:"num_frames",type:"number",label:"Frames per clip",default:48,minimum:1,step:1,precision:0},{name:"num_clips",type:"number",label:"Maximum clips",default:1,minimum:1,step:1,precision:0},{name:"num_inference_steps",type:"number",label:"Denoising steps",default:4,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"Guidance scale",default:0,minimum:0,maximum:10,step:.1},{name:"shift",type:"slider",label:"Scheduler shift",default:3,minimum:0,maximum:10,step:.1},{name:"negative_prompt",type:"text",label:"Negative prompt",default:""},{name:"fused_cfg",type:"bool",label:"Fused CFG",default:!0},{name:"sage_attention",type:"bool",label:"SageAttention",default:!0},{name:"memory_saver",type:"bool",label:"Memory saver",default:!0},{name:"denoiser_layerwise",type:"bool",label:"Layerwise denoiser",default:!1},{name:"denoiser_layerwise_batch",type:"number",label:"Layerwise batch",default:16,minimum:1,step:1,precision:0},{name:"vae_encoder_chunk_size",type:"number",label:"VAE encoder chunk",default:16,minimum:1,step:1,precision:0},{name:"vae_decoder_tile_size",type:"number",label:"VAE decoder tile",default:0,minimum:0,step:16,precision:0},{name:"target_cache_blocks",type:"number",label:"Target cache blocks",default:2,minimum:0,step:1,precision:0},{name:"vae_cache_f16",type:"bool",label:"F16 VAE cache",default:!0},{name:"denoiser_weight_streaming",type:"bool",scope:"session",session_option:"liveavatar.denoiser_weight_streaming",label:"Stream denoiser weights",default:!1}],pulsevad:[{name:"threshold",type:"slider",label:"Speech threshold",default:.5,minimum:0,maximum:1,step:.01},{name:"hop_size_samples",type:"number",label:"Hop size (samples)",default:1600,minimum:1,step:1},{name:"min_speech_duration_ms",type:"number",label:"Minimum speech (ms)",default:100,minimum:0,step:1},{name:"min_silence_duration_ms",type:"number",label:"Minimum silence (ms)",default:100,minimum:0,step:1}],echo_tts:[{name:"num_inference_steps",type:"slider",label:"num_inference_steps",label_en:"Sampling steps",default:40,minimum:8,maximum:40,step:1,precision:0,info:"Euler sampler steps."},{name:"text_guidance_scale",type:"slider",label:"text_guidance_scale",label_en:"Text guidance",default:3,minimum:0,maximum:10,step:.1},{name:"speaker_guidance_scale",type:"slider",label:"speaker_guidance_scale",label_en:"Speaker guidance",default:8,minimum:0,maximum:15,step:.1},{name:"truncation_factor",type:"slider",label:"truncation_factor",label_en:"Noise truncation",default:.8,minimum:0,maximum:1,step:.05},{name:"guidance_interval",type:"slider",label:"guidance_interval",label_en:"Guidance interval",default:1,minimum:1,maximum:3,step:1,precision:0,info:"Refresh the unconditional CFG lanes every Nth guided step. Higher is faster and works best with more steps; 1 is highest fidelity."},{name:"reference_duration_sec",type:"slider",label:"reference_duration_sec",label_en:"Reference trim (s)",default:15,minimum:1,maximum:60,step:1,info:"Trim the speaker reference before encoding. Around 10 s usually clones best."},{name:"seed",type:"number",label:"seed",label_en:"Seed",default:0,minimum:0,step:1,precision:0}],_comment:"WebUI TTS 高级参数控件配置:按模型 family 动态生成控件(gr.render)。每项字段:name=选项键;type=slider|number|bool|text|choice;scope=session 时写入 session_options,否则随请求 options 透传给模型;label/info=显示文案;default=默认值(应等于模型默认,已按 src/models//*.cpp 校对);minimum/maximum/step=数值范围;precision=0 表示整数;choices=下拉候选。seed/max_tokens 已有专用输入框,勿在此重复;参考文本用『参考文本』框(reference_text);文件路径/parity 类参数(如 *_noise_file)未纳入,可用『其它参数(JSON)』兜底框传。",qwen3_tts:[{name:"temperature",type:"slider",label:"temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:0,maximum:1,step:.01},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1.05,minimum:1,maximum:2,step:.01},{name:"do_sample",type:"bool",label:"do_sample",default:!0},{name:"instruct",type:"text",label:"instruct(仅 VoiceDesign/CustomVoice)",default:"",placeholder:"风格/音色指令,Base 版忽略"},{name:"speaker",type:"text",label:"speaker(仅 CustomVoice)",default:"",placeholder:"内置音色名,其它版忽略"}],vibevoice:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0,info:"扩散步数(官方默认 10),越大越慢越稳"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1.3,minimum:0,maximum:5,step:.1,info:"CFG 引导强度"},{name:"max_length_times",type:"number",label:"max_length_times",default:2,minimum:.1,step:.1,info:"最大输出长度倍数"},{name:"temperature",type:"slider",label:"temperature",default:1,minimum:.05,maximum:2,step:.05},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:.05,maximum:1,step:.01},{name:"do_sample",type:"bool",label:"do_sample",default:!1},{name:"voice_samples",type:"text",label:"voice_samples(多说话人,逗号分隔 wav,≤4)",default:"",placeholder:"D:/a.wav,D:/b.wav — 用此项时勿再上传参考音色"}],voxcpm2:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0,info:"CFM/DiT 步数"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:5,step:.1},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"tag_aware",choices:["default","tag_aware","japanese","endline"]},{name:"min_tokens",type:"number",label:"min_tokens",default:2,minimum:0,step:1,precision:0},{name:"retry_badcase",type:"bool",label:"retry_badcase(自动重试异常输出)",default:!0}],voxcpm1:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0,info:"CFM/DiT 步数"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:5,step:.1},{name:"min_tokens",type:"number",label:"min_tokens",default:2,minimum:0,step:1,precision:0},{name:"retry_badcase",type:"bool",label:"retry_badcase(自动重试异常输出)",default:!0}],miotts:[{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:0,maximum:1,step:.01},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1,minimum:1,maximum:1.5,step:.01},{name:"best_of_n",type:"number",label:"best_of_n(候选数,>1 自动开启)",default:1,minimum:1,maximum:8,step:1,precision:0}],chatterbox:[{name:"exaggeration",type:"slider",label:"exaggeration",default:.5,minimum:0,maximum:2,step:.05,info:"改动后需重新『加载模型』才生效"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:.5,minimum:0,maximum:1,step:.05,info:"改动后需重新『加载模型』才生效"},{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1.2,minimum:1,maximum:2,step:.01}],"chatterbox-vc":[{name:"s3gen_cfg_rate",type:"slider",label:"s3gen_cfg_rate(音色引导强度)",label_en:"s3gen_cfg_rate (voice guidance)",default:.7,minimum:0,maximum:2,step:.05},{name:"num_inference_steps",type:"number",label:"num_inference_steps(生成步数)",label_en:"num_inference_steps",default:10,minimum:1,maximum:100,step:1,precision:0}],kokoro_tts:[{name:"speed",type:"slider",label:"speed(语速倍率)",label_en:"speed (speech rate)",default:1,minimum:.5,maximum:2,step:.05}],kitten_tts:[{name:"speed",type:"slider",label:"speed(语速倍率)",label_en:"speed (speech rate)",default:1,minimum:.01,maximum:2,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size(长文本分段字符数)",label_en:"text_chunk_size",default:400,minimum:32,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],piper_tts:[{name:"speed",type:"slider",label:"speed(语速倍率)",label_en:"speed (speech rate)",default:1,minimum:.5,maximum:2,step:.05},{name:"variation",type:"slider",label:"variation(音色变化)",label_en:"variation",default:.667,minimum:0,maximum:1,step:.01},{name:"duration_variation",type:"slider",label:"duration_variation(时长变化)",label_en:"duration_variation",default:.8,minimum:0,maximum:2,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size(长文本分段字符数)",label_en:"text_chunk_size",default:280,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],omnivoice:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:32,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:5,step:.1},{name:"speed",type:"slider",label:"speed",default:1,minimum:.5,maximum:2,step:.05},{name:"instruct",type:"text",label:"instruct(风格/音色指令)",default:"",placeholder:"如:以轻快的语气朗读"}],sense_asr:[{name:"enable_itn",type:"bool",label:"enable_itn(逆文本规范化)",label_en:"enable_itn",default:!0},{name:"keep_tags",type:"bool",label:"keep_tags(保留语言/情绪/事件标签)",label_en:"keep_tags",default:!1},{name:"audio_chunk_mode",type:"choice",label:"audio_chunk_mode",default:"auto",choices:["auto","fixed","none"]},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec",default:30,minimum:.001,step:1}],"lfm2-audio-tts":[{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05,info_en:"Audio code sampling temperature; 0 is greedy."},{name:"top_k",type:"number",label:"top_k",default:64,minimum:0,step:1,precision:0},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:200,minimum:32,step:1,precision:0,info_en:"Codepoints of text per spoken turn."}],"lfm2-audio-jp-tts":[{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05,info_en:"Audio code sampling temperature; 0 is greedy."},{name:"top_k",type:"number",label:"top_k",default:64,minimum:0,step:1,precision:0},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:200,minimum:32,step:1,precision:0,info_en:"Codepoints of text per spoken turn."}],"lfm2-audio-s2s":[{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05,info_en:"Audio code sampling temperature; 0 is greedy."},{name:"top_k",type:"number",label:"top_k",default:4,minimum:0,step:1,precision:0},{name:"text_temperature",type:"slider",label:"text_temperature",default:0,minimum:0,maximum:2,step:.05,info_en:"Text token sampling temperature; 0 picks the most likely token, as liquid-audio does."},{name:"text_top_k",type:"number",label:"text_top_k",default:0,minimum:0,step:1,precision:0,info_en:"With text_temperature above 0, sample text tokens from the k most likely; 0 keeps all."}],"lfm2-audio-jp-s2s":[{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05,info_en:"Audio code sampling temperature; 0 is greedy."},{name:"top_k",type:"number",label:"top_k",default:4,minimum:0,step:1,precision:0},{name:"text_temperature",type:"slider",label:"text_temperature",default:0,minimum:0,maximum:2,step:.05,info_en:"Text token sampling temperature; 0 picks the most likely token, as liquid-audio does."},{name:"text_top_k",type:"number",label:"text_top_k",default:0,minimum:0,step:1,precision:0,info_en:"With text_temperature above 0, sample text tokens from the k most likely; 0 keeps all."}],lfm2_audio:[{name:"audio_chunk_mode",type:"choice",label:"audio_chunk_mode",default:"auto",choices:["auto","vad","fixed","none"],info_en:"auto keeps audio up to audio_chunk_seconds whole and splits longer audio at pauses; none transcribes it in one pass, which the model handles up to about a minute."},{name:"audio_chunk_seconds",type:"number",label:"audio_chunk_seconds",default:30,minimum:1,step:1},{name:"max_tokens",type:"number",label:"max_tokens",default:512,minimum:1,step:1,precision:0,info_en:"Transcript tokens allowed per chunk; a transcript that reaches it is cut off there."}],"lfm3-audio-tts":[{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05,info_en:"Audio code temperature; 0 picks the most likely code."},{name:"top_k",type:"number",label:"top_k",default:128,minimum:0,step:1,precision:0,info_en:"Sample audio codes from the k most likely; 0 keeps all."},{name:"repetition_penalty",type:"number",label:"repetition_penalty",default:1.1,minimum:.01,step:.05,info_en:"Audio repetition penalty over the last 4096 frames of each codebook; must be positive, 1 disables it."},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:200,minimum:1,step:1,precision:0,info_en:"Target characters per text chunk; each chunk is its own spoken turn."}],"lfm3-audio-s2s":[{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05,info_en:"Audio code temperature; 0 picks the most likely code."},{name:"top_k",type:"number",label:"top_k",default:128,minimum:0,step:1,precision:0,info_en:"Sample audio codes from the k most likely; 0 keeps all."},{name:"repetition_penalty",type:"number",label:"repetition_penalty",default:1.1,minimum:.01,step:.05,info_en:"Audio repetition penalty over the last 4096 frames of each codebook; must be positive, 1 disables it."},{name:"text_temperature",type:"slider",label:"text_temperature",default:0,minimum:0,maximum:2,step:.05,info_en:"Text token temperature; 0 is greedy."},{name:"text_top_k",type:"number",label:"text_top_k",default:0,minimum:0,step:1,precision:0,info_en:"Sample text tokens from the k most likely; 0 keeps all."},{name:"max_audio_tail_frames",type:"number",label:"max_audio_tail_frames",default:375,minimum:0,step:1,precision:0,info_en:"Most audio frames after the reply text ends before the turn is closed with an end-of-audio frame; 0 disables the cap."}],lfm3_audio:[{name:"audio_chunk_mode",type:"choice",label:"audio_chunk_mode",default:"auto",choices:["auto","vad","fixed","none"],info_en:"auto keeps audio up to audio_chunk_duration_sec whole and splits longer audio at VAD pauses; none transcribes it in one pass."},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec",minimum:1,step:1,info_en:"Longest chunk in seconds; empty uses 300 or lfm3_audio.max_pass_duration_sec, whichever is lower."},{name:"chat",type:"bool",label:"chat",default:!1,info_en:"Answer the spoken input as a text chat reply instead of transcribing it."},{name:"enable_thinking",type:"bool",label:"enable_thinking",default:!1,info_en:"Needs chat. Let the model think first; only the text after is returned."},{name:"max_tokens",type:"number",label:"max_tokens",minimum:1,step:1,precision:0,info_en:"Text tokens allowed per chunk; empty uses 512 or 8 per second of audio, whichever is more (chat 512, 2048 with thinking). A reply that reaches it is cut off there."}],confucius4_r2t2:[{name:"chunk_size_ms",type:"slider",scope:"session",session_option:"confucius4_r2t2.chunk_size_ms",label:"chunk_size_ms(流式分块毫秒)",label_en:"chunk_size_ms (streaming chunk, ms)",default:320,minimum:80,maximum:2e3,step:10,precision:0,info:"80-2000ms:越小延迟越低;320ms 在 Apple Silicon 上延迟与速度较均衡。",info_en:"80-2000 ms. Lower means lower latency; 320 ms balances latency and speed on Apple Silicon."},{name:"unfixed_chunk_num",type:"number",scope:"session",session_option:"confucius4_r2t2.unfixed_chunk_num",label:"unfixed_chunk_num(前 N 块不用稳定前缀)",label_en:"unfixed_chunk_num (leading chunks without prefix)",default:2,minimum:0,maximum:10,step:1,precision:0,info:"开头若干块不使用已识别文本作为前缀提示。",info_en:"Leading chunks that decode without a stable-prefix prompt."},{name:"unfixed_token_num",type:"number",scope:"session",session_option:"confucius4_r2t2.unfixed_token_num",label:"unfixed_token_num(回滚 token 数)",label_en:"unfixed_token_num (rollback tokens)",default:5,minimum:0,maximum:20,step:1,precision:0,info:"作为前缀前从累积文本回滚的 token 数,用于降低边界抖动。",info_en:"Tokens rolled back from the accumulated text before it is used as the prefix prompt."},{name:"rollback_punctuation",type:"bool",scope:"session",session_option:"confucius4_r2t2.rollback_punctuation",label:"rollback_punctuation(句末标点不回滚)",label_en:"rollback_punctuation (keep trailing punctuation)",default:!1,info:"输出已以标点结尾时不再回滚 token。",info_en:"Do not roll back tokens when the output already ends with punctuation."},{name:"max_new_tokens",type:"number",scope:"session",session_option:"confucius4_r2t2.max_tokens",label:"max_new_tokens(每分块解码上限)",label_en:"max_new_tokens (per-chunk decode budget)",default:32,minimum:1,maximum:256,step:1,precision:0,info:"每个流式分块的贪婪解码上限(会话级,区别于离线 max_tokens)。",info_en:"Greedy decode budget per streaming chunk (session-scoped; distinct from offline max_tokens)."}],pocket_tts:[{name:"frames_after_eos",type:"number",label:"frames_after_eos(-1=自动)",default:-1,minimum:-1,step:1,precision:0}],gradium_phonon:[{name:"frames_after_eos",type:"number",label:"frames_after_eos(-1=自动)",label_en:"frames_after_eos (-1 = auto)",default:-1,minimum:-1,step:1,precision:0},{name:"temperature",type:"slider",label:"temperature",default:.3,minimum:.05,maximum:1,step:.05}],neutts:[{name:"voice_id",type:"choice",label:"voice_id(内置音色)",label_en:"voice_id (built-in voice)",default:"emily",choices:["dave","emily","greta","jo","juliette","mateo","paul","sophie","steven"]},{name:"emotion",type:"choice",label:"emotion(情绪)",label_en:"emotion",default:"neutral",choices:["angry","disgusted","sad","happy","fearful","neutral","surprised"]}],magpie_tts:[{name:"language",type:"choice",label:"language",default:"en",choices:["en","ar-AE","ar-MSA","ar-SA","de","es","fr","hi","it","ko","pt-BR","vi","zh"]},{name:"voice_id",type:"choice",label:"voice_id(打包音色)",label_en:"voice_id (packaged voice)",default:"Aria",choices:["Aria","Jason","John","Leo","Sofia"]},{name:"temperature",type:"slider",label:"temperature",default:.6,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:80,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2.5,minimum:0,maximum:6,step:.1},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:300,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],breeze_tts:[{name:"instruction",type:"text",label:"instruction",label_en:"Instruction",default:"",placeholder:"Describe the target voice for VoiceDesign."},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:600,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1,minimum:0,maximum:10,step:.1},{name:"temperature",type:"slider",label:"temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"depth_temperature",type:"slider",label:"depth_temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:0,maximum:1,step:.01}],"breeze-tts":[{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:600,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1,minimum:0,maximum:10,step:.1},{name:"temperature",type:"slider",label:"temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"depth_temperature",type:"slider",label:"depth_temperature",default:.9,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:1,minimum:0,maximum:1,step:.01}],cosyvoice3:[{name:"template_name",type:"choice",label:"template_name",default:"zero_shot",choices:["zero_shot","cross_lingual","instruct"]},{name:"instruction",type:"text",label:"instruction",label_en:"Instruction",default:"",placeholder:"Used by template_name=instruct."},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:600,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"min_tokens",type:"number",label:"min_tokens",default:0,minimum:0,step:1,precision:0},{name:"top_k",type:"number",label:"top_k",default:25,minimum:1,step:1,precision:0}],inflect_v2:[{name:"speaking_rate",type:"slider",label:"speaking_rate(语速倍率)",label_en:"speaking_rate",default:1,minimum:.5,maximum:2,step:.05},{name:"variation",type:"slider",label:"variation(音色变化)",label_en:"variation",default:.667,minimum:0,maximum:1,step:.01},{name:"text_chunk_size",type:"number",label:"text_chunk_size(长文本分段字符数)",label_en:"text_chunk_size",default:280,minimum:1,step:1,precision:0}],sanotts:[{name:"speaking_rate",type:"slider",label:"speaking_rate(语速倍率)",label_en:"speaking_rate",default:1,minimum:.5,maximum:2,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size(长文本分段字符数)",label_en:"text_chunk_size",default:280,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"word_budget",choices:["word_budget"]}],dramabox:[{name:"negative_prompt",type:"text",label:"negative_prompt(负向提示)",label_en:"negative_prompt",default:"",placeholder:"留空=模型内置质量提示",placeholder_en:"Blank = built-in quality prompt"},{name:"duration_sec",type:"number",label:"duration_sec(0=自动估时)",label_en:"duration_sec (0 = auto)",default:0,minimum:0,step:.5},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:30,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2.5,minimum:0,maximum:8,step:.1},{name:"spatio_temporal_guidance_scale",type:"slider",label:"spatio_temporal_guidance_scale",default:1.5,minimum:0,maximum:5,step:.1},{name:"duration_scale",type:"slider",label:"duration_scale(自动估时倍率)",label_en:"duration_scale",default:1.1,minimum:.5,maximum:2,step:.05},{name:"reference_duration_sec",type:"number",label:"reference_duration_sec(参考音频裁剪/重复秒数)",label_en:"reference_duration_sec",default:10,minimum:0,step:.5},{name:"guidance_rescale",type:"text",label:"guidance_rescale",default:"auto",placeholder:"auto 或数值"},{name:"audio_chunk_threshold_sec",type:"number",label:"audio_chunk_threshold_sec(长文本阈值)",label_en:"audio_chunk_threshold_sec",default:45,minimum:0,step:1},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec(长文本分段目标时长)",label_en:"audio_chunk_duration_sec",default:37,minimum:0,step:1},{name:"cross_fade_duration_sec",type:"number",label:"cross_fade_duration_sec(分段交叉淡化)",label_en:"cross_fade_duration_sec",default:.05,minimum:0,step:.01}],confucius4_tts:[{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:30,minimum:1,step:1,precision:0},{name:"num_beams",type:"number",label:"num_beams",default:3,minimum:1,step:1,precision:0},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:10,minimum:0,maximum:20,step:.1},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:25,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:.7,minimum:0,maximum:2,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:80,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]},{name:"cross_fade_duration_sec",type:"number",label:"cross_fade_duration_sec",default:.3,minimum:0,step:.05},{name:"edge_fade_duration_sec",type:"number",label:"edge_fade_duration_sec",default:.1,minimum:0,step:.05},{name:"edge_pad_duration_sec",type:"number",label:"edge_pad_duration_sec",default:.1,minimum:0,step:.05}],ace_step:[{name:"lora",type:"text",scope:"session",session_option:"ace_step.lora",label:"LoRA adapter",default:"",info:"Adapter file or PEFT directory on the server; relative paths use the model root."},{name:"lora_scale",type:"number",scope:"session",session_option:"ace_step.lora_scale",label:"LoRA strength",default:1,step:.1,info:"Multiplies the adapter metadata scale; zero disables the adapter."},{name:"route",type:"choice",label:"route(操作类型)",default:"text2music",choices:["text2music","complete","lego","extract","cover","cover-nofsq","repaint","remix"],info:"cover/remix=换词翻唱,非 text2music 需上传源音频;详见 webui/README.md"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:8,minimum:1,maximum:20,step:1,precision:0,info:"扩散步数(turbo 上限 20);remix 路由不填时默认 16,其他路由默认 8"},{name:"shift",type:"slider",label:"shift(时间步弯曲)",default:3,minimum:1,maximum:5,step:.5,info:"原版 turbo 默认 3.0;1.0 会明显劣化 remix 换词咬字"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1,minimum:0,maximum:5,step:.1},{name:"audio_cover_strength",type:"slider",label:"【cover】audio_cover_strength",default:1,minimum:0,maximum:1,step:.05,info:"1=贴近原曲,0=自由发挥;建议 0.5"},{name:"cover_noise_strength",type:"slider",label:"【cover】cover_noise_strength",default:0,minimum:0,maximum:1,step:.05,info:"保旋律强度;推荐 0.1~0.25"},{name:"source_caption",type:"text",label:"【remix】source_caption",default:"",placeholder:"源歌曲描述;『🔍 分析』自动填"},{name:"source_lyrics",type:"text",lines:4,label:"【remix】source_lyrics",default:"",placeholder:"源歌曲原歌词;『🔍 分析』自动填"},{name:"flow_edit_n_min",type:"slider",label:"【remix】flow_edit_n_min",default:0,minimum:0,maximum:1,step:.05,info:"调大更保源曲、换词更弱"},{name:"flow_edit_n_max",type:"slider",label:"【remix】flow_edit_n_max",default:1,minimum:0,maximum:1,step:.05,info:"唱不出新歌词时降到 0.7~0.9"},{name:"flow_edit_n_avg",type:"number",label:"【remix】flow_edit_n_avg",default:2,minimum:1,maximum:4,step:1,precision:0,info:"每步多次采样取平均(remix 默认 2);1=最快"},{name:"bpm",type:"number",label:"【曲谱】BPM",default:0,minimum:0,step:1,precision:0,info:"0=不指定"},{name:"keyscale",type:"text",label:"【曲谱】keyscale",default:"",placeholder:"如 F major"},{name:"timesignature",type:"text",label:"【曲谱】timesignature",default:"",placeholder:"如 4"}],minimax_music3:[{name:"num_inference_steps",type:"number",label:"Flow steps per window",default:30,minimum:1,maximum:200,step:1,precision:0,info:"Flow-matching Euler steps per 200-frame denoising window."},{name:"guidance_scale",type:"slider",label:"Flow guidance scale",default:1.7,minimum:0,maximum:10,step:.1},{name:"ar_guidance_scale",type:"slider",label:"AR guidance scale",default:1.5,minimum:0,maximum:10,step:.1,info:"Classifier-free guidance of the semantic and residual code sampling."},{name:"top_k",type:"number",label:"top_k",default:50,minimum:1,maximum:1024,step:1,precision:0}],auk:[{name:"model_gguf",type:"choice",scope:"session",session_option:"auk.model_gguf",label:"model_gguf",label_en:"Generator weights",default:"auk-base-f32.gguf",choices:["auk-base-f32.gguf","auk-base-f16.gguf","auk-base-q8_0.gguf","auk-flash-f32.gguf","auk-flash-f16.gguf","auk-flash-q8_0.gguf"],info:"Selects Base or AuK-Flash automatically. Reload the model after changing this value."},{name:"qwen_gguf",type:"choice",scope:"session",session_option:"auk.qwen_gguf",label:"qwen_gguf",label_en:"Qwen conditioner",default:"qwen2.5-omni-3b-bf16.gguf",choices:["qwen2.5-omni-3b-bf16.gguf","qwen2.5-omni-3b-q8_0.gguf"],info:"Reload the model after changing this value."},{name:"vae_gguf",type:"choice",scope:"session",session_option:"auk.vae_gguf",label:"vae_gguf",label_en:"VAE weights",default:"auk-vae-f32.gguf",choices:["auk-vae-f32.gguf"],info:"Reload the model after changing this value."},{name:"attention",type:"choice",scope:"session",session_option:"auk.attention",label:"attention",label_en:"Attention",default:"auto",choices:["auto","flash","eager"],info:"Flow-model attention mode. Reload the model after changing this value."},{name:"mem_saver",type:"bool",scope:"session",session_option:"auk.mem_saver",label:"mem_saver",label_en:"Memory saver",default:!1,info:"Release Qwen and generation weights between stages. Warm requests reload weights and rebuild graphs."},{name:"instruct",type:"text",label:"instruct",label_en:"Voice description",default:"",placeholder:"A warm male voice speaking clear English.",info:"Optional for TTS only. Without it, text carries the complete upstream instruction."},{name:"duration_sec",type:"number",label:"duration_sec",label_en:"Output duration (s)",default:"",minimum:.02,step:.02,info:"Required for speech generation without reference audio; otherwise the reference duration is used."},{name:"num_inference_steps",type:"number",label:"num_inference_steps",label_en:"Sampling steps",default:32,minimum:1,step:1,precision:0,info:"Base Euler steps. AuK-Flash always uses its fixed four-step schedule."},{name:"guidance_scale",type:"slider",label:"guidance_scale",label_en:"Guidance scale",default:2,minimum:0,maximum:10,step:.1,info:"Base guidance strength. AuK-Flash disables classifier-free guidance."},{name:"sway_sampling_coef",type:"number",label:"sway_sampling_coef",label_en:"Sway coefficient",default:-1,step:.1,info:"Base sampling schedule sway. AuK-Flash uses its fixed time grid."}],yue2:[{name:"ar_lora",type:"text",scope:"session",session_option:"yue2.ar_lora",label:"ar_lora",label_en:"AR LoRA adapter",default:"",placeholder:"/path/to/ar_lora_inst_v3abc.safetensors",info:"Unfused AR adapter for score and semantic planning; relative paths resolve against the model root. Reload the model after changing this value."},{name:"ar_lora_scale",type:"number",scope:"session",session_option:"yue2.ar_lora_scale",label:"ar_lora_scale",label_en:"AR LoRA strength",default:1,step:.1,info:"Scales the AR adapter deltas; 0 disables it. Reload the model after changing this value."},{name:"nar_lora",type:"text",scope:"session",session_option:"yue2.nar_lora",label:"nar_lora",label_en:"NAR LoRA adapter",default:"",placeholder:"/path/to/nar_lora_joint_v4.safetensors",info:"Unfused NAR adapter for acoustic detail; relative paths resolve against the model root. Reload the model after changing this value."},{name:"nar_lora_scale",type:"number",scope:"session",session_option:"yue2.nar_lora_scale",label:"nar_lora_scale",label_en:"NAR LoRA strength",default:1,step:.1,info:"Scales the LoRA deltas only; any full vae2llm/llm2vae projection replacements in the adapter stay at full strength. 0 disables the entire adapter. Reload the model after changing this value."},{name:"main_gguf",type:"choice",scope:"session",session_option:"yue2.model_gguf",label:"main_gguf",label_en:"Main weights",default:"yue2-3b-q8_0.gguf",choices:["yue2-3b-q8_0.gguf","yue2-3b-q4_0.gguf","yue2-3b-bf16.gguf"],info:"Reload the model after changing this value."},{name:"vae_gguf",type:"choice",scope:"session",session_option:"yue2.vae_gguf",label:"vae_gguf",label_en:"VAE weights",default:"yue2-vae-f16.gguf",choices:["yue2-vae-f16.gguf","yue2-vae-f32.gguf"],info:"Reload the model after changing this value."},{name:"style",type:"text",label:"style",label_en:"Style",default:"English, indie pop, bright acoustic guitar, soft drums, warm lead vocal, polished demo mix",placeholder:"English, city pop, groovy bass, synth, energetic vocal"},{name:"abc",type:"text",label:"abc",label_en:"ABC score",default:"",placeholder:"Optional ABC notation. Use cot=melody or cot=full.",lines:4},{name:"abc_file",type:"text",label:"abc_file",label_en:"ABC file path",default:"",placeholder:"/path/to/score.abc"},{name:"cot",type:"choice",label:"cot",label_en:"Planning route",default:"off",choices:["off","melody","full"],info:"off = direct generation; melody/full use or generate ABC planning."},{name:"guidance_scale",type:"slider",label:"guidance_scale",label_en:"Semantic guidance",default:1.01,minimum:0,maximum:5,step:.01},{name:"num_inference_steps",type:"number",label:"num_inference_steps",label_en:"NAR steps",default:8,minimum:1,maximum:64,step:1,precision:0},{name:"abc_temperature",type:"slider",label:"abc_temperature",label_en:"ABC temperature",default:.7,minimum:0,maximum:2,step:.05},{name:"abc_top_p",type:"slider",label:"abc_top_p",label_en:"ABC top-p",default:.9,minimum:.01,maximum:1,step:.01},{name:"abc_top_k",type:"number",label:"abc_top_k",label_en:"ABC top-k",default:30,minimum:1,step:1,precision:0},{name:"abc_repetition_penalty",type:"slider",label:"abc_repetition_penalty",label_en:"ABC repetition penalty",default:1.005,minimum:.1,maximum:2,step:.001},{name:"abc_penalty_window",type:"number",label:"abc_penalty_window",label_en:"ABC penalty window",default:100,minimum:1,step:1,precision:0},{name:"abc_min_tokens",type:"number",label:"abc_min_tokens",label_en:"ABC min tokens",default:32,minimum:0,step:1,precision:0},{name:"abc_max_tokens",type:"number",label:"abc_max_tokens",label_en:"ABC max tokens",default:4096,minimum:1,step:1,precision:0},{name:"semantic_temperature",type:"slider",label:"semantic_temperature",label_en:"Semantic temperature",default:1,minimum:0,maximum:2,step:.05},{name:"semantic_top_p",type:"slider",label:"semantic_top_p",label_en:"Semantic top-p",default:.95,minimum:.01,maximum:1,step:.01},{name:"semantic_top_k",type:"number",label:"semantic_top_k",label_en:"Semantic top-k",default:100,minimum:1,step:1,precision:0},{name:"semantic_repetition_penalty",type:"slider",label:"semantic_repetition_penalty",label_en:"Semantic repetition penalty",default:1.2,minimum:.1,maximum:2,step:.01},{name:"semantic_penalty_window",type:"number",label:"semantic_penalty_window",label_en:"Semantic penalty window",default:50,minimum:1,step:1,precision:0},{name:"semantic_min_tokens",type:"number",label:"semantic_min_tokens",label_en:"Semantic min tokens",default:200,minimum:0,step:1,precision:0},{name:"semantic_max_tokens",type:"number",label:"semantic_max_tokens",label_en:"Semantic max tokens",default:9e3,minimum:1,step:1,precision:0}],minimax_h3:[{name:"num_inference_steps",type:"number",label:"Denoising steps",default:12,minimum:1,maximum:50,step:1,precision:0,info:"Twelve denoising steps provide a practical quality and performance balance."},{name:"num_frames",type:"number",label:"Output frames",default:241,minimum:5,maximum:1441,step:4,precision:0,info:"Approximately 24 frames per output second; 241 frames produces about 10 seconds of audio."},{name:"guidance_scale",type:"slider",label:"Guidance scale",default:1,minimum:0,maximum:5,step:.1},{name:"sampler",type:"choice",label:"Sampler",default:"euler",choices:["euler","res_multistep","dpmpp_2m","unipc"]},{name:"dit_acceleration",type:"choice",label:"DiT acceleration",default:"none",choices:["none","spectrum","first_block_cache"],info:"None uses the quality-first full-DiT path. Acceleration modes are experimental and may distort some outputs."},{name:"return_video",type:"bool",label:"Decode video",default:!1,info:"Disabled by default to reduce memory use and return audio only."}],stable_audio:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:8,minimum:1,step:1,precision:0,info:"RF 扩散步数"},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:1,minimum:0,maximum:5,step:.1},{name:"audio_input_kind",type:"choice",label:"audio_input_kind(仅上传源音频时生效)",default:"init_audio",choices:["init_audio","inpaint_audio"]},{name:"init_noise_level",type:"slider",label:"init_noise_level(init_audio 强度)",default:1,minimum:0,maximum:1,step:.05}],seed_vc:[{name:"route",type:"choice",label:"route(转换路径)",default:"",choices:["","v2_vc","v1_whisper_bigvgan_vc","v1_xlsr_hift_vc","v1_svc"],info:"留空=按任务默认"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:30,minimum:1,step:1,precision:0,info:"CFM 扩散步数"},{name:"length_adjust",type:"slider",label:"length_adjust(时长伸缩)",default:1,minimum:.5,maximum:2,step:.05},{name:"intelligibility_cfg_rate",type:"slider",label:"intelligibility_cfg_rate(仅 v2_vc)",default:.7,minimum:0,maximum:1,step:.05},{name:"similarity_cfg_rate",type:"slider",label:"similarity_cfg_rate(仅 v2_vc)",default:.7,minimum:0,maximum:1,step:.05},{name:"inference_cfg_rate",type:"slider",label:"inference_cfg_rate(仅 v1 路径)",default:.7,minimum:0,maximum:1,step:.05}],rvc:[{name:"voice_id",type:"choice",label:"voice_id(打包音色)",label_en:"voice_id",default:"default",choices:["default","manthos","chocola","fraise"]},{name:"voice_model_path",type:"text",label:"voice_model_path(自定义 RVC .pth/.pt)",label_en:"voice_model_path",default:"",placeholder:"留空=使用打包音色"},{name:"retrieval_index_path",type:"text",label:"retrieval_index_path(FAISS index)",label_en:"retrieval_index_path",default:"",placeholder:"可选 .index 路径"},{name:"retrieval_blend",type:"slider",label:"retrieval_blend",default:0,minimum:0,maximum:1,step:.05},{name:"semitone_shift",type:"number",label:"semitone_shift(半音变调)",label_en:"semitone_shift",default:0,step:1,precision:0},{name:"pitch_filter_radius",type:"number",label:"pitch_filter_radius",default:3,minimum:0,step:1,precision:0},{name:"output_sample_rate",type:"number",label:"output_sample_rate(0=跟随音色)",label_en:"output_sample_rate (0 = voice default)",default:0,minimum:0,step:1e3,precision:0},{name:"rms_mix_rate",type:"slider",label:"rms_mix_rate",default:.25,minimum:0,maximum:1,step:.05},{name:"unvoiced_protection",type:"slider",label:"unvoiced_protection",default:.33,minimum:0,maximum:1,step:.01},{name:"speaker_id",type:"number",label:"speaker_id",default:0,minimum:0,step:1,precision:0},{name:"audio_pad_duration_sec",type:"number",label:"audio_pad_duration_sec",default:1,minimum:1,step:1,precision:0},{name:"split_query_sec",type:"number",label:"split_query_sec",default:5,minimum:1,step:1,precision:0},{name:"split_center_sec",type:"number",label:"split_center_sec",default:30,minimum:1,step:1,precision:0},{name:"split_threshold_sec",type:"number",label:"split_threshold_sec",default:32,minimum:1,step:1,precision:0}],meanvc2:[{name:"seed",type:"number",label:"seed",default:42,minimum:0,step:1,precision:0}],personaplex:[{name:"voice_id",type:"choice",label:"voice_id(打包音色)",label_en:"voice_id (packaged voice)",default:"NATF2",choices:["NATF0","NATF1","NATF2","NATF3","NATM0","NATM1","NATM2","NATM3","VARF0","VARF1","VARF2","VARF3","VARF4","VARM0","VARM1","VARM2","VARM3","VARM4"]},{name:"system_prompt",type:"text",label:"system_prompt",default:"",placeholder:"Leave blank to use the text box as the system prompt."},{name:"temperature",type:"slider",label:"temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"text_temperature",type:"slider",label:"text_temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:250,minimum:0,step:1,precision:0},{name:"text_top_k",type:"number",label:"text_top_k",default:250,minimum:0,step:1,precision:0},{name:"do_sample",type:"bool",label:"do_sample",default:!0}],vevo2:[{name:"route",type:"choice",label:"route(任务路线)",default:"",choices:["","style_preserved_vc","style_converted_vc","style_preserved_svc","style_converted_svc","singing_style_conversion","editing"],info:"留空=按任务默认;详见 webui/README.md"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:32,minimum:1,step:1,precision:0,info:"流匹配步数"},{name:"use_pitch_shift",type:"choice",label:"use_pitch_shift(自动音高对齐)",default:"",choices:["","true","false"],info:"留空=按路线默认"},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec(源音频分段秒数)",default:0,minimum:0,step:1,info:"0=关闭;仅用于 source-audio VC/SVC 路线"},{name:"cross_fade_duration_sec",type:"number",label:"cross_fade_duration_sec(分段重叠/淡化秒数)",default:1,minimum:0,step:.1,info:"source-audio 分段启用时作为输入重叠和输出交叉淡化时长"},{name:"temperature",type:"slider",label:"temperature(AR 路线用)",default:.7,minimum:0,maximum:2,step:.05,info:"默认取自模型 generation_config.json"},{name:"top_k",type:"number",label:"top_k(AR 路线用)",default:20,minimum:0,step:1,precision:0,info:"默认取自模型 generation_config.json"},{name:"top_p",type:"slider",label:"top_p(AR 路线用)",default:.8,minimum:0,maximum:1,step:.01}],heartmula:[{name:"tags",type:"text",label:"tags(逗号分隔)",default:"pop",placeholder:"pop,bright,drums,female vocals",info:"风格/情绪/乐器/人声标签"},{name:"temperature",type:"slider",label:"temperature",default:1,minimum:0,maximum:2,step:.05},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale(MuLa CFG)",default:1.5,minimum:0,maximum:5,step:.1},{name:"num_inference_steps",type:"number",label:"num_inference_steps(codec 步数)",default:10,minimum:1,step:1,precision:0},{name:"infinite_mode",type:"bool",label:"infinite_mode(长输出分段生成)",default:!1},{name:"codec_guidance_scale",type:"slider",label:"codec_guidance_scale",default:1.25,minimum:0,maximum:5,step:.05}],index_tts2:[{name:"lang",type:"choice",label:"lang(语种提示, 仅 IndexTTS2.5 模型)",label_en:"lang (language hint, IndexTTS2.5 models only)",default:"auto",choices:["auto","zh","en","ja","es","ar"],info:"仅对 IndexTTS2.5(多语种)模型生效:auto 含汉字按中文,否则按英文;日/西/阿建议显式选择",info_en:"Only applies to IndexTTS2.5 (multilingual) models: auto picks zh when the text contains Han characters, otherwise en; set ja/es/ar explicitly"},{name:"emotion_text",type:"text",label:"emotion_text(情绪参考文本)",label_en:"emotion_text (emotion reference text)",default:"",placeholder:"例:你吓死我了!你是鬼吗?",placeholder_en:"e.g. You scared me to death!",info:"填写后自动开启情感条件(use_emotion_text)",info_en:"Setting this enables emotion conditioning."},{name:"emotion_alpha",type:"slider",label:"emotion_alpha(情感强度)",label_en:"emotion_alpha",default:1,minimum:0,maximum:1,step:.05},{name:"use_emotion_text",type:"bool",label:"use_emotion_text(从朗读文本推断情感)",label_en:"use_emotion_text (infer from text)",default:!1},{name:"use_random_emotion",type:"bool",label:"use_random_emotion(随机情感)",label_en:"use_random_emotion",default:!1},{name:"interval_silence_ms",type:"number",label:"interval_silence_ms(分段间静音)",label_en:"interval_silence_ms",default:200,minimum:0,step:50,precision:0},{name:"duration_factor",type:"slider",label:"duration_factor(语速/时长倍率,>1 更慢,<1 更快)",label_en:"duration_factor (duration multiplier; >1 slower, <1 faster)",default:1,minimum:.5,maximum:2,step:.05,info:"对齐官方 IndexTTS2.5 的 duration_factor:缩放输出时长,不改变音色/内容",info_en:"Matches official IndexTTS2.5 duration_factor: scales output duration without changing timbre or content"}],zipvoice:[{name:"guidance_scale",type:"slider",label:"guidance_scale(引导强度,0=关闭)",label_en:"guidance_scale (0 disables CFG)",default:3,minimum:0,maximum:10,step:.5},{name:"num_inference_steps",type:"number",label:"num_inference_steps(Euler 步数)",label_en:"num_inference_steps",default:8,minimum:1,maximum:64,step:1,precision:0},{name:"t_shift",type:"slider",label:"t_shift(时间步偏移,越小越偏低 SNR)",label_en:"t_shift (timestep shift)",default:.5,minimum:.05,maximum:1,step:.05},{name:"speed",type:"slider",label:"speed(语速倍率)",label_en:"speed (duration multiplier)",default:1,minimum:.5,maximum:2,step:.05},{name:"lang",type:"text",label:"lang(英文段 espeak 语言)",label_en:"lang (espeak voice for English runs)",default:"en-us",placeholder:"en-us"}],irodori_tts:[{name:"num_inference_steps",type:"number",label:"num_inference_steps(RF 扩散步数)",label_en:"num_inference_steps",default:40,minimum:1,step:1,precision:0},{name:"duration_sec",type:"number",label:"duration_sec(0=模型自动预测时长)",label_en:"duration_sec (0 = auto)",default:0,minimum:0,step:.5},{name:"duration_scale",type:"slider",label:"duration_scale(语速倒数,越大越慢)",label_en:"duration_scale",default:1,minimum:.5,maximum:2,step:.05}],moss_tts_local:[{name:"do_sample",type:"bool",label:"do_sample",default:!0},{name:"temperature",type:"slider",label:"temperature",default:1.7,minimum:0,maximum:2.5,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:25,minimum:0,step:1,precision:0},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1,minimum:1,maximum:2,step:.01}],moss_tts_v15:[{name:"instruct",type:"text",label:"instruct(音色描述)",label_en:"instruct (voice description)",default:"",placeholder:"参考音频比文字描述更可靠",placeholder_en:"A reference recording is more reliable than a description."},{name:"language",type:"choice",label:"language(语言)",label_en:"language",default:"",choices:["","English","Chinese"]},{name:"temperature",type:"slider",label:"temperature",default:1.5,minimum:0,maximum:3,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.6,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1.1,minimum:1,maximum:2,step:.01}],moss_tts_nano:[{name:"do_sample",type:"bool",label:"do_sample",default:!0},{name:"temperature",type:"slider",label:"temperature",default:1.7,minimum:0,maximum:2.5,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:25,minimum:0,step:1,precision:0},{name:"repetition_penalty",type:"slider",label:"repetition_penalty",default:1,minimum:1,maximum:2,step:.01}],audiosr:[{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:50,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:3.5,minimum:0,maximum:10,step:.1},{name:"ddim_eta",type:"slider",label:"ddim_eta",default:1,minimum:0,maximum:1,step:.05},{name:"audio_chunk_duration_sec",type:"number",label:"audio_chunk_duration_sec",default:15,minimum:1,step:1},{name:"audio_chunk_overlap_sec",type:"number",label:"audio_chunk_overlap_sec",default:2,minimum:0,step:.5}],controlfoley:[{name:"duration_sec",type:"number",label:"duration_sec",default:8,minimum:.1,step:.5},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:25,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:4.5,minimum:0,maximum:10,step:.1},{name:"negative_prompt",type:"text",label:"negative_prompt",default:"",placeholder:"optional negative prompt"},{name:"mask_away_clip",type:"bool",label:"mask_away_clip",default:!1}],midashenglm_gen:[{name:"duration_sec",type:"number",label:"duration_sec",default:20,minimum:.1,step:.5},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"stop_threshold",type:"slider",label:"stop_threshold",default:.5,minimum:0,maximum:1,step:.05},{name:"min_stop_step",type:"number",label:"min_stop_step",default:5,minimum:0,step:1,precision:0}],"fireredtts3-base":[{name:"language",type:"choice",label:"language",default:"Chinese",choices:["Chinese","English","Cantonese","Japanese","Korean","Spanish","French","Russian","Arabic","Turkish","Indonesian","Portuguese","Italian","Dutch","Vietnamese","German","Ukrainian","Thai","Polish","Romanian","Greek","Czech","Finnish","Hindi","ZH_Anhui","ZH_Fujian","ZH_Gansu","ZH_Guizhou","ZH_Hebei","ZH_Henan","ZH_Hubei","ZH_Hunan","ZH_Jiangxi","ZH_Liaoning","ZH_Minnan","ZH_Ningxia","ZH_Shaanxi","ZH_Shandong","ZH_Shanghai","ZH_Shanxi","ZH_Sichuan","ZH_Tianjin","ZH_Wenzhou","ZH_Wu","ZH_Yunnan"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"stop_threshold",type:"slider",label:"stop_threshold",default:.5,minimum:0,maximum:1,step:.05}],"fireredtts3-instruct":[{name:"template_name",type:"choice",label:"template_name",default:"instruct_tts",choices:["instruct_tts"]},{name:"language",type:"choice",label:"language",default:"Chinese",choices:["Chinese","English","Cantonese","Japanese","Korean","Spanish","French","Russian","Arabic","Turkish","Indonesian","Portuguese","Italian","Dutch","Vietnamese","German","Ukrainian","Thai","Polish","Romanian","Greek","Czech","Finnish","Hindi","ZH_Anhui","ZH_Fujian","ZH_Gansu","ZH_Guizhou","ZH_Hebei","ZH_Henan","ZH_Hubei","ZH_Hunan","ZH_Jiangxi","ZH_Liaoning","ZH_Minnan","ZH_Ningxia","ZH_Shaanxi","ZH_Shandong","ZH_Shanghai","ZH_Shanxi","ZH_Tianjin","ZH_Wenzhou","ZH_Wu","ZH_Yunnan"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"stop_threshold",type:"slider",label:"stop_threshold",default:.5,minimum:0,maximum:1,step:.05},{name:"text_chunk_size",type:"number",label:"text_chunk_size",default:600,minimum:1,step:1,precision:0},{name:"text_chunk_mode",type:"choice",label:"text_chunk_mode",default:"default",choices:["default","tag_aware","japanese","endline"]}],"fireredtts3-instruct-vdesign":[{name:"template_name",type:"choice",label:"template_name",default:"voice_design",choices:["voice_design"]},{name:"language",type:"choice",label:"language",default:"Chinese",choices:["Chinese","English","Cantonese","Japanese","Korean","Spanish","French","Russian","Arabic","Turkish","Indonesian","Portuguese","Italian","Dutch","Vietnamese","German","Ukrainian","Thai","Polish","Romanian","Greek","Czech","Finnish","Hindi","ZH_Anhui","ZH_Fujian","ZH_Gansu","ZH_Guizhou","ZH_Hebei","ZH_Henan","ZH_Hubei","ZH_Hunan","ZH_Jiangxi","ZH_Liaoning","ZH_Minnan","ZH_Ningxia","ZH_Shaanxi","ZH_Shandong","ZH_Shanghai","ZH_Shanxi","ZH_Tianjin","ZH_Wenzhou","ZH_Wu","ZH_Yunnan"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"stop_threshold",type:"slider",label:"stop_threshold",default:.5,minimum:0,maximum:1,step:.05}],"firered-audio-tts":[{name:"template_name",type:"choice",label:"template_name",default:"tts_clone",choices:["tts_clone"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"max_new_audio_steps",type:"number",label:"max_new_audio_steps",default:750,minimum:1,step:1,precision:0},{name:"top_k",type:"number",label:"top_k",default:20,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"temperature",type:"slider",label:"temperature",default:.7,minimum:0,maximum:2,step:.05}],"firered-audio-vdesign":[{name:"template_name",type:"choice",label:"template_name",default:"voice_design",choices:["voice_design"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"max_new_audio_steps",type:"number",label:"max_new_audio_steps",default:750,minimum:1,step:1,precision:0}],"firered-audio-semantic-edit":[{name:"template_name",type:"choice",label:"template_name",default:"semantic_edit",choices:["semantic_edit"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"instruction",type:"text",label:"instruction",default:"",placeholder:"delete '比普通的茶叶要'"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"max_new_audio_steps",type:"number",label:"max_new_audio_steps",default:750,minimum:1,step:1,precision:0},{name:"max_new_text_tokens",type:"number",label:"max_new_text_tokens",default:512,minimum:1,step:1,precision:0}],"firered-audio-acoustic-edit":[{name:"template_name",type:"choice",label:"template_name",default:"acoustic_edit",choices:["acoustic_edit"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"instruction",type:"text",label:"instruction",default:"shift the pitch by 3 steps",placeholder:"shift the pitch by 3 steps"},{name:"num_inference_steps",type:"number",label:"num_inference_steps",default:10,minimum:1,step:1,precision:0},{name:"guidance_scale",type:"slider",label:"guidance_scale",default:2,minimum:0,maximum:10,step:.1},{name:"max_new_audio_steps",type:"number",label:"max_new_audio_steps",default:750,minimum:1,step:1,precision:0}],"firered-audio-asr":[{name:"template_name",type:"choice",label:"template_name",default:"asr",choices:["asr","understand"]},{name:"language",type:"choice",label:"language",default:"zh",choices:["zh","en"]},{name:"enable_thinking",type:"bool",label:"enable_thinking",default:!1},{name:"max_new_tokens",type:"number",label:"max_new_tokens",default:512,minimum:1,step:1,precision:0},{name:"top_k",type:"number",label:"top_k",default:20,minimum:0,step:1,precision:0},{name:"top_p",type:"slider",label:"top_p",default:.8,minimum:0,maximum:1,step:.01},{name:"temperature",type:"slider",label:"temperature",default:.7,minimum:0,maximum:2,step:.05}],sopro_tts:[{name:"language",type:"choice",label:"language",label_en:"Language tag",default:"",choices:["","en","pt","fr","de"],info:"Optional <|lang_xx|> tag; helps pronunciation on ambiguous text."},{name:"temperature",type:"slider",label:"temperature",label_en:"Temperature",default:.8,minimum:0,maximum:2,step:.05},{name:"top_p",type:"slider",label:"top_p",label_en:"Top-p",default:.9,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",label_en:"Top-k",default:25,minimum:0,step:1,precision:0,info:"0 disables top-k truncation."},{name:"num_inference_steps",type:"number",label:"num_inference_steps",label_en:"Acoustic steps",default:2,minimum:1,maximum:32,step:1,precision:0,info:"Rectified-flow Euler steps for the acoustic head."},{name:"max_seconds",type:"number",label:"max_seconds",label_en:"Max seconds per segment",default:30,minimum:1,maximum:60,step:.5,precision:1},{name:"min_seconds",type:"number",label:"min_seconds",label_en:"Min seconds per segment",default:.4,minimum:0,maximum:10,step:.1,precision:1,info:"Must not exceed max_seconds."},{name:"ref_seconds",type:"number",label:"ref_seconds",label_en:"Reference seconds",default:10,minimum:1,maximum:30,step:.5,precision:1,info:"Reference window used for cloning."},{name:"text_chunk_size",type:"number",label:"text_chunk_size",label_en:"Segment size",default:300,minimum:20,maximum:2e3,step:10,precision:0,info:"Max codepoints per synthesis segment."}],supertonic:[{name:"voice",type:"choice",label:"voice(预置音色:M 男声 / F 女声)",label_en:"voice (M = male, F = female presets)",default:"M1",choices:["M1","M2","M3","M4","M5","F1","F2","F3","F4","F5"]},{name:"speaking_rate",type:"slider",label:"speaking_rate(语速倍率)",label_en:"speaking_rate",default:1.05,minimum:.5,maximum:2,step:.05},{name:"num_inference_steps",type:"number",label:"num_inference_steps(流匹配步数)",label_en:"num_inference_steps",default:8,minimum:1,step:1,precision:0}],audio8_tts:[{name:"temperature",type:"slider",label:"temperature",default:.7,minimum:0,maximum:2,step:.05},{name:"top_p",type:"slider",label:"top_p",default:.9,minimum:0,maximum:1,step:.01},{name:"top_k",type:"number",label:"top_k",default:50,minimum:0,step:1,precision:0},{name:"max_tokens",type:"number",label:"max_tokens",default:1024,minimum:1,step:1,precision:0}]};function Fd(a,t){const i=t?.load_target??void 0;return{...a,path:i?.model_path??a.path,load_target:i,load_target_error:t?.load_target_error??void 0,load_options:i?.load_options,session_options:i?.session_options}}function Tm(a){if(!a.load_target)throw new Error(a.load_target_error||`Package load target is not ready: ${a.label}`);return a.load_target}const $m=Object.assign({"../../../../model_specs/ace_step.json":kT,"../../../../model_specs/apollo.json":xT,"../../../../model_specs/ast_audioset.json":ST,"../../../../model_specs/audio8_asr.json":TT,"../../../../model_specs/audio8_tts.json":$T,"../../../../model_specs/audio_flamingo.json":qT,"../../../../model_specs/audiosr.json":CT,"../../../../model_specs/auk.json":AT,"../../../../model_specs/breeze_tts.json":GT,"../../../../model_specs/bs_roformer.json":FT,"../../../../model_specs/builtin_audio_utils.json":MT,"../../../../model_specs/canary_asr.json":zT,"../../../../model_specs/ced.json":ET,"../../../../model_specs/chatterbox.json":UT,"../../../../model_specs/chatterbox_turbo.json":RT,"../../../../model_specs/citrinet_asr.json":BT,"../../../../model_specs/cohere_asr.json":PT,"../../../../model_specs/confucius4_r2t2.json":jT,"../../../../model_specs/confucius4_tts.json":NT,"../../../../model_specs/controlfoley.json":OT,"../../../../model_specs/cosyvoice3.json":IT,"../../../../model_specs/crisperwhisper.json":DT,"../../../../model_specs/dots_tts.json":LT,"../../../../model_specs/dramabox.json":VT,"../../../../model_specs/echo_tts.json":HT,"../../../../model_specs/f5_tts.json":WT,"../../../../model_specs/firered_audio.json":QT,"../../../../model_specs/firered_vad.json":KT,"../../../../model_specs/fireredtts3.json":YT,"../../../../model_specs/fish_audio.json":JT,"../../../../model_specs/fish_drama3.json":XT,"../../../../model_specs/fun_asr_nano.json":ZT,"../../../../model_specs/gigaam_asr.json":e8,"../../../../model_specs/glm_tts.json":t8,"../../../../model_specs/gradium_phonon.json":a8,"../../../../model_specs/granite5asr.json":i8,"../../../../model_specs/heartmula.json":n8,"../../../../model_specs/higgs_audio_stt.json":s8,"../../../../model_specs/higgs_audio_tts.json":r8,"../../../../model_specs/htdemucs.json":o8,"../../../../model_specs/htdemucs_6stems.json":l8,"../../../../model_specs/hviske_asr.json":c8,"../../../../model_specs/hviske_asr_v6.json":d8,"../../../../model_specs/index_echo.json":u8,"../../../../model_specs/index_tts2.json":f8,"../../../../model_specs/inflect_v2.json":p8,"../../../../model_specs/irodori_tts.json":m8,"../../../../model_specs/kitten_tts.json":g8,"../../../../model_specs/kitten_tts2.json":h8,"../../../../model_specs/kokoro_tts.json":_8,"../../../../model_specs/kroko_asr.json":v8,"../../../../model_specs/kugelaudio.json":b8,"../../../../model_specs/latentsync.json":y8,"../../../../model_specs/lfm2_audio.json":w8,"../../../../model_specs/lfm3_audio.json":k8,"../../../../model_specs/liveavatar.json":x8,"../../../../model_specs/magenta_realtime_2.json":S8,"../../../../model_specs/magpie_tts.json":T8,"../../../../model_specs/maya1.json":$8,"../../../../model_specs/meanvc2.json":q8,"../../../../model_specs/mel_band_roformer.json":C8,"../../../../model_specs/micro_wake_word.json":A8,"../../../../model_specs/midashenglm_gen.json":G8,"../../../../model_specs/ming3_audio.json":F8,"../../../../model_specs/ming3_tts.json":M8,"../../../../model_specs/minimax_h3.json":z8,"../../../../model_specs/minimax_music3.json":E8,"../../../../model_specs/miocodec.json":U8,"../../../../model_specs/miotts.json":R8,"../../../../model_specs/mira_tts.json":B8,"../../../../model_specs/mms_forced_aligner.json":P8,"../../../../model_specs/moonshine_asr.json":j8,"../../../../model_specs/moss_transcribe_diarize.json":N8,"../../../../model_specs/moss_tts_local.json":O8,"../../../../model_specs/moss_tts_nano.json":I8,"../../../../model_specs/moss_tts_v15.json":D8,"../../../../model_specs/moss_ttsd.json":L8,"../../../../model_specs/moss_voicegen.json":V8,"../../../../model_specs/mossformer2.json":H8,"../../../../model_specs/muscriptor.json":W8,"../../../../model_specs/nemotron_3_diar.json":Q8,"../../../../model_specs/nemotron_asr.json":K8,"../../../../model_specs/neutts.json":Y8,"../../../../model_specs/niagara_asr.json":J8,"../../../../model_specs/omnivoice.json":X8,"../../../../model_specs/open_wake_word.json":Z8,"../../../../model_specs/outetts.json":e$,"../../../../model_specs/owsm.json":t$,"../../../../model_specs/owsm_ctc.json":a$,"../../../../model_specs/parakeet_tdt.json":i$,"../../../../model_specs/personaplex.json":n$,"../../../../model_specs/piper_tts.json":s$,"../../../../model_specs/plapre.json":r$,"../../../../model_specs/pocket_tts.json":o$,"../../../../model_specs/pulsevad.json":l$,"../../../../model_specs/qwen3_asr.json":c$,"../../../../model_specs/qwen3_forced_aligner.json":d$,"../../../../model_specs/qwen3_tts.json":u$,"../../../../model_specs/reuse.json":f$,"../../../../model_specs/rvc.json":p$,"../../../../model_specs/sam_audio.json":m$,"../../../../model_specs/samsone.json":g$,"../../../../model_specs/sanotts.json":h$,"../../../../model_specs/seed_vc.json":_$,"../../../../model_specs/sense_asr.json":v$,"../../../../model_specs/sheetsage2.json":b$,"../../../../model_specs/sherpa_kws.json":y$,"../../../../model_specs/sidon.json":w$,"../../../../model_specs/smart_turn.json":k$,"../../../../model_specs/soprano_tts.json":x$,"../../../../model_specs/sopro_tts.json":S$,"../../../../model_specs/sortformer_diar.json":T$,"../../../../model_specs/sortformer_diar_v2.json":$$,"../../../../model_specs/stable_audio.json":q$,"../../../../model_specs/supertonic.json":C$,"../../../../model_specs/tf_gridnet.json":A$,"../../../../model_specs/tone_color_vc.json":G$,"../../../../model_specs/universr.json":F$,"../../../../model_specs/vevo2.json":M$,"../../../../model_specs/vibeasr.json":z$,"../../../../model_specs/vibevoice.json":E$,"../../../../model_specs/vibevoice_asr.json":U$,"../../../../model_specs/vibevoice_asr_streaming.json":R$,"../../../../model_specs/vieneu_v3_turbo.json":B$,"../../../../model_specs/voxcpm1.json":P$,"../../../../model_specs/voxcpm2.json":j$,"../../../../model_specs/voxtral_realtime.json":N$,"../../../../model_specs/voxtral_tts.json":O$,"../../../../model_specs/whistle_asr.json":I$,"../../../../model_specs/xtts_v2.json":D$,"../../../../model_specs/yue2.json":L$,"../../../../model_specs/zipvoice.json":V$}),Md=Object.values($m).flatMap(a=>(a.packages||[]).map(t=>({...t,family:a.family}))),fb=new Map(Object.values($m).map(a=>[a.family,a])),Io=Object.fromEntries(Object.values($m).map(a=>[a.family,[...new Set(Object.values(a.capabilities||{}).flat())]])),Q$=new Set(["ming3_tts","ming3_audio","latentsync","xtts_v2","canary_asr","cohere_asr","moss_transcribe_diarize","confucius4_r2t2","audiosr","controlfoley","breeze_tts","cosyvoice3","firered_audio","fireredtts3","irodori_tts","kitten_tts2","kokoro_tts","meanvc2","midashenglm_gen","sanotts","mossformer2","plapre","voxtral_tts"]),K$=/[\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff]/u;function zd(a,t){for(const i of[a,t])if(i&&!K$.test(i))return i;return""}function Y$(a,t,i){return zd(t,i)||a.replace(/_/g," ")}const pb=a=>a.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^models\//i,"").replace(/\/$/,"").toLowerCase(),mb=a=>a.toLowerCase().replace(/[^a-z0-9]/g,"");function qm(a){return a.find(t=>t.default)||a.find(t=>t.precision==="q8_0")||a[0]}function gb(a){const t=Md.filter(l=>l.family===a.family);if(!t.length)return[];if(a.family==="ace_step"||a.family==="minimax_music3"||!a.download_id)return t;const i=t.find(l=>l.id===a.download_id);if(i){const l=i.id.replace(/_(?:q8_0|q8|f16|fp16|bf16|safetensors|orig)$/i,""),c=t.filter(d=>d.id.replace(/_(?:q8_0|q8|f16|fp16|bf16|safetensors|orig)$/i,"")===l);return c.length?c:[i]}const n=mb(a.download_id),s=t.filter(l=>{const c=mb(l.id);return c.startsWith(n)||n.startsWith(c)});if(s.length)return s;const r=pb(a.path),o=t.filter(l=>pb(l.target_directory)===r);if(o.length){const l=new Set(o.map(d=>d.id.replace(/_(?:q8_0|q8|f16|fp16|bf16|safetensors|orig)$/i,""))),c=t.filter(d=>l.has(d.id.replace(/_(?:q8_0|q8|f16|fp16|bf16|safetensors|orig)$/i,"")));return c.length?c:o}return t}function J$(a){const t=Md.filter(s=>s.family===a.family&&s.format==="gguf");if(!t.length)return[];if(a.family==="sanotts"||a.family==="xtts_v2"||!a.download_id)return t;const i=t.find(s=>s.id===a.download_id);if(!i)return gb(a);const n=t.filter(s=>s.target_directory===i.target_directory);return n.length?n:[i]}function hb(a,t){return t&&a.id===t?0:a.default?1:["q4_k","q4_0","q8_0","q8"].includes(a.precision)?2:["f16","fp16","bf16"].includes(a.precision)?3:a.precision==="f32"?4:a.precision==="orig"?5:6}function Ed(a){if(a.family==="sanotts"){if(a.id.includes("_heart_nano_"))return"Heart Nano";if(a.id.includes("_heart_"))return"Heart";if(a.id.includes("_amy_"))return"Amy";if(a.id.includes("_hfc_"))return"HFC";if(a.id.includes("_kristin_"))return"Kristin";if(a.id.includes("_vi_"))return"Vietnamese";if(a.id.includes("_id_"))return"Indonesian";if(a.id.includes("_cs_"))return"Czech";if(a.id.includes("_de_"))return"German";if(a.id.includes("_es_"))return"Spanish";if(a.id.includes("_fr_"))return"French";if(a.id.includes("_it_"))return"Italian";if(a.id.includes("_pt_"))return"Portuguese (Brazil)";if(a.id.includes("_ro_"))return"Romanian";if(a.id.includes("_ru_"))return"Russian";if(a.id.includes("_tr_"))return"Turkish";if(a.id.includes("_ne_"))return"Nepali";if(a.id.includes("_hi_"))return"Hindi"}if(a.family==="ace_step"){const t=a.precision==="bf16"?"BF16":["q8_0","q8"].includes(a.precision)?"Q8":a.precision.toUpperCase();return a.id.includes("_xl_turbo_")?`GGUF Turbo XL ${t}`:a.id.includes("_xl_sft_")?`GGUF Turbo XL SFT ${t}`:a.id.includes("_turbo_")?`GGUF Turbo ${t}`:`GGUF ${t}`}return a.family==="irodori_tts"&&a.id.includes("_anime_")?"Anime Q8":a.family==="yue2"?a.id==="yue2_main_q8_0"?"Main Q8_0":a.id==="yue2_main_q4_0"?"Main Q4_0":a.id==="yue2_main_bf16"?"Main BF16":a.id==="yue2_vae_f16"?"VAE F16":a.id==="yue2_vae_f32"?"VAE F32":a.display_name||"Yue2 component":a.family==="auk"?a.id==="auk_base_f32"?"Base F32":a.id==="auk_base_f16"?"Base F16":a.id==="auk_base_q8_0"?"Base Q8_0":a.id==="auk_flash_f32"?"AuK-Flash F32":a.id==="auk_flash_f16"?"AuK-Flash F16":a.id==="auk_flash_q8_0"?"AuK-Flash Q8_0":a.id==="auk_qwen_bf16"?"Qwen BF16":a.id==="auk_qwen_q8_0"?"Qwen Q8_0":a.id==="auk_vae_f32"?"VAE F32":a.display_name||"AuK component":a.format==="safetensors"?"Safetensors":a.id.includes("int8_dit")?"GGUF Q4 ConvRot":a.precision==="q4_k"||a.precision==="q4_0"?"GGUF Q4":a.precision==="q8_0"||a.precision==="q8"?"GGUF Q8":a.precision==="bf16"?"GGUF BF16":a.precision==="f16"||a.precision==="fp16"?"GGUF FP16":`GGUF ${a.precision.toUpperCase()}`}function Ud(a){const t=a.format==="gguf"?a.files?.find(s=>s.toLowerCase().endsWith(".gguf")):void 0;if(!t)return`models/${a.target_directory}`;let i=t.replace(/\\/g,"/");const n=(a.strip_prefix||"").replace(/\\/g,"/").replace(/\/$/,"");return n&&i.startsWith(`${n}/`)&&(i=i.slice(n.length+1)),`models/${a.target_directory}/${i}`.replace(/\/+/g,"/")}function X$(a){if(["maya1","gigaam_asr","samsone","sam_audio","tone_color_vc","moss_ttsd","moss_voicegen","kugelaudio","crisperwhisper","index_echo","audio_flamingo","owsm","owsm_ctc","reuse","sidon","smart_turn"].includes(a.family)){const o=(a.download_id||"").replace(/_(?:q8_0|q4_k|bf16|f16|f32|orig)(?:_codec_f16(?:_decode)?)?$/,"");return Md.filter(l=>l.family===a.family&&l.format==="gguf"&&l.id.replace(/_(?:q8_0|q4_k|bf16|f16|f32|orig)(?:_codec_f16(?:_decode)?)?$/,"")===o).sort((l,c)=>+(c.id===a.download_id)-+(l.id===a.download_id)).map(l=>({id:l.id,label:Ed(l),path:Ud(l),format:l.format,precision:l.precision}))}const t=Q$.has(a.family);if(a.family==="auk"){const o=Md.filter(c=>c.family===a.family&&c.format==="gguf"),l=new Map([["auk_base_f32",0],["auk_base_f16",1],["auk_base_q8_0",2],["auk_flash_f32",3],["auk_flash_f16",4],["auk_flash_q8_0",5],["auk_qwen_bf16",6],["auk_qwen_q8_0",7],["auk_vae_f32",8]]);return o.sort((c,d)=>(l.get(c.id)??99)-(l.get(d.id)??99)).map(c=>({id:c.id,label:Ed(c),path:Ud(c),format:c.format,precision:c.precision}))}if(a.family==="yue2"){const o=Md.filter(c=>c.family===a.family&&c.format==="gguf"),l=new Map([["yue2_main_q8_0",0],["yue2_main_q4_0",1],["yue2_main_bf16",2],["yue2_vae_f16",3],["yue2_vae_f32",4]]);return o.filter(c=>c.format==="gguf").sort((c,d)=>(l.get(c.id)??99)-(l.get(d.id)??99)).map(c=>({id:c.id,label:Ed(c),path:Ud(c),format:c.format,precision:c.precision}))}const i=t?J$(a):gb(a);if(a.family==="ace_step"||a.family==="minimax_music3"||t)return i.filter(o=>o.format==="gguf").sort((o,l)=>t?hb(o,a.download_id)-hb(l,a.download_id):+(l.default===!0)-+(o.default===!0)).map(o=>({id:o.id,label:Ed(o),path:Ud(o),format:o.format,precision:o.precision}));const n=qm(i.filter(o=>o.format==="gguf"&&["q8_0","q8"].includes(o.precision))),s=qm(i.filter(o=>o.format==="gguf"&&["f16","fp16"].includes(o.precision)))||qm(i.filter(o=>o.format==="gguf"&&o.precision==="bf16")),r=!n&&!s?i.filter(o=>o.format==="gguf"):[];return[n,s,...r].filter(o=>o!==void 0).map(o=>({id:o.id,label:Ed(o),path:Ud(o),format:o.format,precision:o.precision}))}const Di=H$.models.flatMap(a=>{const t=X$(a);if(a.download_id&&t.length===0)return[];const i=t[0],n=fb.get(a.family);return[{...a,display_name:zd(a.display_name_en,a.display_name)||a.id,input_hint:zd(a.input_hint_en,a.input_hint),download_id:i?.id||a.download_id,install_packages:t,path:i?.path||a.path,request_options:n?.options?.request?.map(s=>s.name),required_request_options:n?.options?.request?.filter(s=>s.required===!0).map(s=>s.name),builtin_voices:a.builtin_voices??n?.ui?.builtin_voices,default_voice:a.default_voice??n?.ui?.default_voice}]}),Do=Object.fromEntries(Object.entries(W$).filter(a=>Array.isArray(a[1])).map(([a,t])=>[a,t.map(i=>({...i,label:Y$(i.name,i.label_en,i.label),placeholder:zd(i.placeholder_en,i.placeholder),info:zd(i.info_en,i.info)}))]));for(const[a,t]of fb){const i=t.options?.session?.find(r=>r.name==="lora"),n=t.options?.session?.find(r=>r.name==="lora_scale"),s=Do[a]||[];!i||!n||s.some(r=>r.session_option===`${a}.lora`)||(Do[a]=[...s,{name:"lora",group:"lora",scope:"session",session_option:`${a}.lora`,type:"text",label:"Adapter path",default:"",info:i.description},{name:"lora_scale",group:"lora",scope:"session",session_option:`${a}.lora_scale`,type:"number",label:"Strength",default:n.default??"",minimum:n.min,maximum:n.max,step:.1,info:n.description}])}const Z$={tts:"Text to speech",clon:"Voice cloning",asr:"Transcription",gen:"Music & sound",midi:"Audio to MIDI",vc:"Voice conversion",svc:"Singing conversion",s2s:"Speech editing",sep:"Source separation",vad:"Voice activity",diar:"Speaker diarization",align:"Forced alignment",vdes:"Voice design",spk:"Speaker analysis",turn:"Turn detection",wake:"Wake-word detection",cls:"Audio classification"},eq={code:"it",name:"Italiano",translations:JSON.parse(`{"request.minimaxFrames":"{frames} fotogrammi di output allineati","param.minimax_h3.num_inference_steps.label":"Passaggi di denoising","param.minimax_h3.num_inference_steps.info":"Dodici passaggi di denoising offrono un buon equilibrio tra qualità e prestazioni.","param.minimax_h3.num_frames.label":"Fotogrammi di output","param.minimax_h3.num_frames.info":"Calcolati dalla durata a circa 24 fotogrammi per secondo di output. Modificando i fotogrammi si aggiorna anche la durata.","param.minimax_h3.guidance_scale.label":"Scala di guida","param.minimax_h3.sampler.label":"Campionatore","param.minimax_h3.dit_acceleration.label":"Accelerazione DiT","param.minimax_h3.dit_acceleration.info":"None usa il percorso DiT completo orientato alla qualità. Le modalità accelerate sono sperimentali e possono distorcere alcuni risultati.","param.minimax_h3.return_video.label":"Decodifica video","param.minimax_h3.return_video.info":"Disattivata per impostazione predefinita per ridurre l'uso della memoria e restituire solo l'audio.","model.minimax_h3.hint":"MiniMax-H3 usa un DiT audio/video congiunto. GGUF Q4 privilegia la qualità; GGUF Q4 ConvRot, solo CUDA, usa un po' più VRAM per una maggiore velocità. Il percorso DiT completo predefinito privilegia la qualità audio e disattiva la decodifica video.","status.modelReady":"{model} è caricato e pronto.","status.runningTask":"Esecuzione di {task}...","status.completeIn":"Completato in {seconds} s.","status.packageAvailable":"{model} userà {format}. Ora è disponibile nello Studio.","app.nativeStudio":"Studio nativo","nav.studio":"Studio","nav.arena":"Arena","nav.models":"Modelli","nav.runtime":"Runtime","language.label":"Lingua dell'interfaccia","theme.label":"Tema","theme.system":"Sistema","theme.dark":"Scuro","theme.light":"Chiaro","workflow.tts":"Sintesi vocale","workflow.asr":"ASR / Trascrizione","workflow.music":"Generazione di musica e video","workflow.vc":"Conversione vocale","workflow.sep":"Separazione sorgenti","workflow.analysis":"Analisi audio","workflow.design":"Progettazione voce","studio.eyebrow":"INTELLIGENZA AUDIO LOCALE","studio.title":"Studio audio","studio.subtitle.tts":"Genera una voce naturale dal testo, con voci predefinite e clonazione quando supportate.","studio.subtitle.asr":"Trascrivi l'audio parlato in testo, con controlli di lingua e timestamp quando supportati.","studio.subtitle.music":"Crea musica e suoni da una descrizione, un testo o un audio di riferimento.","studio.subtitle.vc":"Trasforma una registrazione in un'altra voce conservando l'interpretazione parlata o cantata.","studio.subtitle.sep":"Separa una registrazione in voce, strumenti o altre tracce audio disponibili.","studio.subtitle.analysis":"Analizza attività vocale, parlanti, tempi e allineamento dell'audio.","studio.subtitle.design":"Crea o perfeziona una voce da una descrizione e dai controlli di riferimento supportati.","studio.model":"Modello","studio.noModel":"Nessun modello selezionato","studio.resident":"Caricato","studio.notInstalled":"Non installato","studio.available":"Disponibile","studio.chooseInstalled":"Scegli un modello installato","studio.notDownloaded":"non scaricato","studio.pathFound":"Percorso trovato","studio.pathMissing":"Percorso mancante","studio.pathUnknown":"Percorso non verificato","studio.load":"Carica modello","studio.unload":"Scarica modello","studio.working":"Elaborazione…","studio.bundledLoaded":"Integrato · caricato","request.label":"RICHIESTA","request.title":"Input e controlli","request.prompt":"Prompt","request.text":"Testo","request.splitLongText":"Dividi e unisci testi lunghi","request.charactersPerChunk":"Caratteri per segmento","request.language":"Lingua","request.autoLanguage":"vuoto = automatico","request.seed":"Seed","request.randomSeed":"-1 = casuale","request.maxTokens":"Token massimi","request.sourceAudio":"Audio sorgente","request.recordMicrophone":"Registra microfono","voice.quickStart":"Voci demo per avvio rapido","voice.useReference":"Usa un file audio di riferimento qui sotto","voice.reference":"Voce di riferimento","voice.required":"obbligatoria","voice.optional":"opzionale","voice.referenceText":"Testo di riferimento","voice.transcript":"Trascrizione di riferimento","voice.saved":"Voci salvate","voice.browserOnly":"solo in questo browser","voice.chooseSaved":"Scegli una voce salvata...","voice.libraryName":"Nome nella libreria","voice.save":"Salva voce","common.delete":"Elimina","common.cancel":"Annulla","common.close":"Chiudi","common.refresh":"Aggiorna","common.browse":"Sfoglia","common.apply":"Applica","options.modelParameters":"Parametri del modello","options.additional":"Opzioni aggiuntive","run.run":"Esegui","run.cancel":"Annulla","run.working":"Elaborazione…","result.title":"Risultato","result.label":"RISULTATO","result.saveWav":"Salva WAV","result.empty":"L'audio generato e i risultati strutturati appariranno qui.","models.eyebrow":"LIBRERIA MODELLI","models.title":"Pacchetti locali","models.subtitle":"Scarica e gestisci i pacchetti dei modelli senza uscire dall'interfaccia.","models.folder":"Cartella modelli","models.useDefault":"Usa predefinita","models.showTypes":"Mostra tipi di modello","models.stopDownload":"Interrompi download","models.cleanPartial":"Elimina download parziale","runtime.title":"Registro sessione","runtime.status":"Stato","runtime.backend":"Backend","runtime.registered":"Registrati","runtime.resident":"Caricati","runtime.noEvents":"Nessun evento.","folder.title":"Scegli una cartella","folder.up":"Livello superiore","folder.select":"Seleziona questa cartella","common.applying":"Applicazione…","common.disabled":"Disabilitato","common.enabled":"Abilitato","file.choose":"Scegli file","file.none":"Nessun file selezionato","folder.closeLabel":"Chiudi selettore cartelle","folder.empty":"Questa cartella non contiene sottocartelle.","folder.eyebrow":"CARTELLA MODELLI","folder.loading":"Caricamento...","folder.loadingFolders":"Caricamento cartelle...","footer.embedded":"SvelteKit · incorporato in audiocpp_server","models.checkingSize":"verifica dimensione…","models.default":"Predefinita","models.downloaded":"Scaricato","models.folderHint":"download, rilevamento locale e caricamento dei modelli","models.folderPlaceholder":"cartella models accanto ad audiocpp_server","models.hfAccess":"Accesso HF richiesto","models.model":"modello","models.queued":"in coda","models.reinstall":"Reinstalla","models.selected":"Selezionato","models.sharedPackage":"Usa il pacchetto condiviso {name} mostrato sopra.","models.sizeUnavailable":"dimensione non disponibile","models.stopping":"arresto","models.update":"Aggiorna","models.updateAvailable":"Aggiornamento disponibile","models.upToDate":"Aggiornato","models.variants":"varianti","models.versionUnknown":"Versione sconosciuta","nav.primary":"Navigazione principale","nav.workflows":"Flussi di lavoro audio","arena.eyebrow":"ARENA","arena.title.tts":"Confronto TTS","arena.title.vc":"Confronto conversione vocale","arena.title.asr":"Confronto ASR","arena.subtitle":"Esegue lo stesso input sui modelli installati e sui pacchetti scelti, uno dopo l'altro.","arena.subtitle.tts":"Esegue lo stesso testo sui modelli TTS e sui pacchetti scelti.","arena.subtitle.vc":"Esegue lo stesso audio sorgente sui modelli di conversione vocale scelti.","arena.subtitle.asr":"Esegue lo stesso audio sorgente sui modelli ASR scelti e confronta le trascrizioni.","arena.mode.tts":"TTS","arena.mode.vc":"Conversione vocale","arena.mode.asr":"ASR","arena.input.label":"Input","arena.input.title":"Richiesta condivisa","arena.input.textPlaceholder":"Inserisci un prompt da confrontare tra modelli TTS","arena.input.groundTruth":"Testo atteso","arena.input.groundTruthPlaceholder":"Incolla la trascrizione attesa per calcolare il WER","arena.shared":"condivisa","arena.voice.label":"Voce","arena.voice.modelDefault":"Predefinita del modello","arena.voice.builtin":"Voce demo integrata","arena.voice.reference":"Audio di riferimento","arena.voice.builtinNote":"Le voci integrate vengono passate come voice ID a ogni modello. Questo tipo di voce non richiede testo di riferimento.","arena.voice.targetSpeaker":"Audio parlante target","arena.voice.clearTarget":"Cancella target","arena.voice.clearReference":"Cancella riferimento","arena.options.shared":"Opzioni condivise","arena.queue.label":"Coda","arena.queue.title":"Modelli","arena.queue.add":"Aggiungi","arena.queue.remove":"Rimuovi","arena.queue.clear":"Cancella","arena.queue.empty":"Aggiungi modelli installati o pacchetti di precisione da confrontare.","arena.run":"Esegui arena","arena.package.label":"Pacchetto","arena.package.configured":"Configurato","arena.results.title":"Confronta output","arena.results.empty":"Nessun risultato arena.","arena.metric.wall":"tempo","arena.metric.rtf":"rtf","arena.metric.wer":"wer","arena.itemStatus.queued":"in coda","arena.itemStatus.loading":"caricamento","arena.itemStatus.running":"esecuzione","arena.itemStatus.done":"completato","arena.itemStatus.failed":"fallito","arena.itemStatus.skipped":"saltato","arena.status.duplicate":"{model} {package} è già nell'arena.","arena.status.loadingModel":"Caricamento modello","arena.status.runningRequest":"Esecuzione richiesta","arena.status.addModel":"Aggiungi almeno un modello all'arena.","arena.status.running":"Esecuzione arena {mode}...","arena.status.complete":"Esecuzione arena completata.","arena.note.skippedTargetVoice":"Saltato perché questo modello VC richiede audio del parlante target.","arena.note.skippedReferenceText":"Saltato perché questo modello richiede testo di riferimento per l'input voce selezionato.","arena.note.builtinVoice":"Voce integrata usata: {voice}.","arena.note.referenceVoice":"Voce di riferimento usata.","arena.note.referenceUnsupported":"Voce predefinita usata; la voce di riferimento non è supportata.","arena.note.defaultVoice":"Voce predefinita usata: {voice}.","arena.note.skippedReferenceVoice":"Saltato perché questo modello richiede una voce di riferimento.","arena.error.seed":"Il seed deve essere -1 o un intero unsigned a 32 bit (0-4294967295).","arena.error.jsonObject":"deve essere un oggetto","arena.error.invalidJson":"JSON opzioni arena non valido: {error}","arena.error.unregistered":"Il modello configurato non è registrato da questo server.","arena.error.notDownloaded":"{package} non è scaricato.","arena.error.loadFailed":"Il modello non è stato caricato.","arena.error.missingCatalog":"Il modello non è più nel catalogo.","arena.error.enterTtsText":"Inserisci testo per l'arena TTS.","arena.error.chooseAsrSource":"Scegli audio sorgente per l'arena ASR.","arena.error.chooseVcSource":"Scegli audio sorgente per l'arena VC.","arena.error.noAudio":"La risposta non include audio.","request.alignmentText":"Testo di allineamento","request.context":"Prompt di contesto","request.contextHint":"terminologia o nomi opzionali","request.duration":"Durata in secondi","request.liveDescription":"Elabora richieste consecutive di quattro secondi usando la modalità streaming del modello.","request.liveTitle":"Trascrizione microfono in diretta","request.lyrics":"Testo della canzone","request.optional":"opzionale","request.recordingMicrophone":"Registrazione microfono","request.soundPlaceholder":"Descrivi il suono o la musica…","request.startLive":"Avvia diretta","request.stopLive":"Ferma diretta","request.stopRecording":"Ferma registrazione","request.textPlaceholder":"Inserisci il testo…","request.voiceDescription":"Descrizione della voce","request.voiceDescriptionPlaceholder":"Una voce calda e calma con ritmo misurato…","result.track":"traccia","result.tracks":"tracce","runtime.eyebrow":"RUNTIME","runtime.subtitle":"Eventi del ciclo di vita e delle richieste nel browser.","status.ready":"Pronto","studio.estimatedVram":"VRAM stimata: {value} GB","studio.vram":"VRAM —","task.align":"Allineamento forzato","task.asr":"Trascrizione","task.clon":"Clonazione vocale","task.diar":"Diarizzazione parlanti","task.gen":"Generazione musicale","task.s2s":"Modifica del parlato","task.sep":"Separazione sorgenti","task.svc":"Conversione della voce cantata","task.tts":"Sintesi vocale","task.vad":"Attività vocale","task.vc":"Conversione vocale","task.vdes":"Progettazione voce","voice.bundledNote":"L'audio di riferimento incluso e la relativa trascrizione vengono forniti automaticamente.","voice.namePlaceholder":"La mia voce di riferimento","voice.recommendedClone":"consigliata per la clonazione","voice.recording":"Registrazione voce di riferimento","voice.requiredClone":"obbligatoria per questa clonazione vocale","voice.transcriptPlaceholder":"Digita le parole esatte dell'audio di riferimento oppure carica il file .txt corrispondente."}`)},tq={code:"ja",name:"日本語",translations:{"request.minimaxFrames":"位置合わせ済みの出力フレーム数: {frames}","param.minimax_h3.num_inference_steps.label":"ノイズ除去ステップ数","param.minimax_h3.num_inference_steps.info":"ノイズ除去を12ステップにすると、品質と処理速度のバランスがよくなります。","param.minimax_h3.num_frames.label":"出力フレーム数","param.minimax_h3.num_frames.info":"出力の長さから、毎秒約24フレームとして計算します。フレーム数を変更すると、出力の長さも更新されます。","param.minimax_h3.guidance_scale.label":"ガイダンススケール","param.minimax_h3.sampler.label":"サンプラー","param.minimax_h3.dit_acceleration.label":"DiT高速化","param.minimax_h3.dit_acceleration.info":"Noneでは、品質を重視した完全なDiT処理を使用します。高速化モードは実験的な機能であり、出力に歪みが生じる場合があります。","param.minimax_h3.return_video.label":"動画のデコード","param.minimax_h3.return_video.info":"メモリ使用量を抑えて音声のみを返すため、デフォルトでは無効になっています。","model.minimax_h3.hint":"MiniMax-H3は音声と動画を統合したDiTを使用します。GGUF Q4は品質を重視します。CUDA専用のGGUF Q4 ConvRotは、VRAM使用量がやや増える代わりに処理が高速になります。デフォルトの完全なDiT処理では音声品質を重視し、動画のデコードを無効にします。","status.modelReady":"{model}の読み込みが完了し、使用可能になりました。","status.runningTask":"{task}を実行中…","status.completeIn":"{seconds}秒で完了しました。","status.packageAvailable":"{model}は{format}を使用します。スタジオで利用できるようになりました。","app.nativeStudio":"ネイティブスタジオ","nav.studio":"スタジオ","nav.arena":"アリーナ","nav.models":"モデル","nav.runtime":"ランタイム","language.label":"表示言語","theme.label":"テーマ","theme.system":"システム設定に従う","theme.dark":"ダーク","theme.light":"ライト","workflow.tts":"音声合成","workflow.asr":"音声認識 / 文字起こし","workflow.music":"音楽・動画生成","workflow.vc":"声質変換","workflow.sep":"音源分離","workflow.analysis":"音声解析","workflow.design":"声のデザイン","studio.eyebrow":"ローカル音声AI","studio.title":"オーディオスタジオ","studio.subtitle.tts":"テキストから自然な音声を生成します。対応モデルでは、プリセット音声や音声クローンを利用できます。","studio.subtitle.asr":"音声をテキストに書き起こします。対応モデルでは、言語やタイムスタンプを設定できます。","studio.subtitle.music":"説明文、歌詞、参照音声から音楽やサウンドを作成します。","studio.subtitle.vc":"話し方や歌い方を保ちながら、録音した音声を別の声に変換します。","studio.subtitle.sep":"録音した音声を、ボーカル、楽器などの対応する音声トラックに分離します。","studio.subtitle.analysis":"音声の発話区間、話者、タイミング、アラインメントを解析します。","studio.subtitle.design":"説明文と対応する参照設定を使って、声を作成・調整します。","studio.model":"モデル","studio.noModel":"モデルが選択されていません","studio.resident":"読み込み済み","studio.notInstalled":"未インストール","studio.available":"利用可能","studio.chooseInstalled":"インストール済みのモデルを選択","studio.notDownloaded":"未ダウンロード","studio.pathFound":"パスが見つかりました","studio.pathMissing":"パスが見つかりません","studio.pathUnknown":"パス未確認","studio.load":"モデルを読み込む","studio.unload":"モデルを解放","studio.working":"処理中…","studio.bundledLoaded":"内蔵 · 読み込み済み","request.label":"リクエスト","request.title":"入力と設定","request.prompt":"プロンプト","request.text":"テキスト","request.splitLongText":"長文を分割して結果を結合","request.charactersPerChunk":"セグメントあたりの文字数","request.language":"言語","request.autoLanguage":"空欄 = 自動","request.seed":"シード値","request.randomSeed":"-1 = ランダム","request.maxTokens":"最大トークン数","request.sourceAudio":"入力音声","request.recordMicrophone":"マイクで録音","voice.quickStart":"すぐに試せるデモ音声","voice.configured":"設定済みの音声","voice.useReference":"以下の参照音声ファイルを使用","voice.reference":"参照音声","voice.required":"必須","voice.optional":"任意","voice.referenceText":"参照テキスト","voice.transcript":"参照音声の文字起こし","voice.saved":"保存済みの音声","voice.browserOnly":"このブラウザー内のみ","voice.chooseSaved":"保存済みの音声を選択…","voice.libraryName":"ライブラリ内の名前","voice.save":"音声を保存","common.delete":"削除","common.cancel":"キャンセル","common.close":"閉じる","common.refresh":"更新","common.browse":"参照","common.apply":"適用","options.modelParameters":"モデルのパラメーター","options.additional":"追加オプション","run.run":"実行","run.cancel":"キャンセル","run.working":"処理中…","result.title":"結果","result.label":"結果","result.saveWav":"WAVを保存","result.empty":"生成された音声と構造化された結果がここに表示されます。","models.eyebrow":"モデルライブラリ","models.title":"ローカルパッケージ","models.subtitle":"この画面からモデルパッケージをダウンロード・管理できます。","models.folder":"モデルフォルダー","models.useDefault":"デフォルトを使用","models.showTypes":"モデルの種類を表示","models.stopDownload":"ダウンロードを停止","models.cleanPartial":"未完了のダウンロードを削除","runtime.title":"セッションログ","runtime.status":"状態","runtime.backend":"バックエンド","runtime.registered":"登録済み","runtime.resident":"読み込み済み","runtime.noEvents":"イベントはありません。","folder.title":"フォルダーを選択","folder.up":"上の階層へ","folder.select":"このフォルダーを選択","common.applying":"適用中…","common.disabled":"無効","common.enabled":"有効","file.choose":"ファイルを選択","file.none":"ファイルが選択されていません","folder.closeLabel":"フォルダー選択を閉じる","folder.empty":"このフォルダーにはサブフォルダーがありません。","folder.eyebrow":"モデルフォルダー","folder.loading":"読み込み中…","folder.loadingFolders":"フォルダーを読み込み中…","footer.embedded":"SvelteKit · audiocpp_serverに組み込み","models.checkingSize":"サイズを確認中…","models.default":"デフォルト","models.downloaded":"ダウンロード済み","models.folderHint":"モデルのダウンロード、ローカルでの検出、読み込みに使用","models.folderPlaceholder":"audiocpp_serverと同じ場所にあるmodelsフォルダー","models.hfAccess":"HFへのアクセスが必要","models.model":"モデル","models.queued":"待機中","models.reinstall":"再インストール","models.selected":"選択済み","models.sharedPackage":"上に表示されている共有パッケージ{name}を使用します。","models.sizeUnavailable":"サイズを取得できません","models.stopping":"停止中","models.update":"更新","models.updateAvailable":"更新があります","models.upToDate":"最新です","models.variants":"バリエーション","models.versionUnknown":"バージョン不明","nav.primary":"メインナビゲーション","nav.workflows":"音声ワークフロー","arena.eyebrow":"アリーナ","arena.title.tts":"音声合成の比較","arena.title.vc":"声質変換の比較","arena.title.asr":"音声認識の比較","arena.subtitle":"インストール済みのモデルと選択したパッケージで、同じ入力を順番に処理します。","arena.subtitle.tts":"選択した音声合成モデルとパッケージで、同じテキストを処理します。","arena.subtitle.vc":"選択した声質変換モデルで、同じ入力音声を処理します。","arena.subtitle.asr":"選択した音声認識モデルで同じ入力音声を処理し、文字起こし結果を比較します。","arena.mode.tts":"音声合成","arena.mode.vc":"声質変換","arena.mode.asr":"音声認識","arena.input.label":"入力","arena.input.title":"共通のリクエスト","arena.input.textPlaceholder":"音声合成モデル間で比較するプロンプトを入力","arena.input.groundTruth":"正解テキスト","arena.input.groundTruthPlaceholder":"単語誤り率(WER)を計算するための正解の文字起こしを貼り付け","arena.shared":"共通","arena.voice.label":"声","arena.voice.modelDefault":"モデルのデフォルト","arena.voice.builtin":"内蔵デモ音声","arena.voice.reference":"参照音声","arena.voice.builtinNote":"内蔵音声は、音声IDとして各モデルに渡されます。この種類の音声には参照テキストは不要です。","arena.voice.targetSpeaker":"変換先の話者の音声","arena.voice.clearTarget":"変換先の音声をクリア","arena.voice.clearReference":"参照音声をクリア","arena.options.shared":"共通オプション","arena.queue.label":"キュー","arena.queue.title":"モデル","arena.queue.add":"追加","arena.queue.remove":"削除","arena.queue.clear":"クリア","arena.queue.empty":"比較するインストール済みモデル、または精度別のパッケージを追加してください。","arena.run":"比較を実行","arena.package.label":"パッケージ","arena.package.configured":"設定済み","arena.results.title":"出力を比較","arena.results.empty":"比較結果はありません。","arena.metric.wall":"経過時間","arena.metric.rtf":"RTF","arena.metric.wer":"WER","arena.itemStatus.queued":"待機中","arena.itemStatus.loading":"読み込み中","arena.itemStatus.running":"実行中","arena.itemStatus.done":"完了","arena.itemStatus.failed":"失敗","arena.itemStatus.skipped":"スキップ","arena.status.duplicate":"{model} {package}はすでにアリーナに追加されています。","arena.status.loadingModel":"モデルを読み込み中","arena.status.runningRequest":"リクエストを実行中","arena.status.addModel":"アリーナにモデルを1つ以上追加してください。","arena.status.running":"アリーナで{mode}を実行中…","arena.status.complete":"アリーナでの実行が完了しました。","arena.note.skippedTargetVoice":"この声質変換モデルには変換先の話者の音声が必要なため、スキップしました。","arena.note.skippedReferenceText":"このモデルでは、選択した音声入力に参照テキストが必要なため、スキップしました。","arena.note.builtinVoice":"内蔵音声を使用しました: {voice}。","arena.note.referenceVoice":"参照音声を使用しました。","arena.note.referenceUnsupported":"参照音声に対応していないため、デフォルトの音声を使用しました。","arena.note.defaultVoice":"デフォルトの音声を使用しました: {voice}。","arena.note.skippedReferenceVoice":"このモデルには参照音声が必要なため、スキップしました。","arena.error.seed":"シード値は-1、または32ビット符号なし整数(0~4294967295)で指定してください。","arena.error.jsonObject":"オブジェクトである必要があります","arena.error.invalidJson":"アリーナのオプションJSONが無効です: {error}","arena.error.unregistered":"設定されたモデルは、このサーバーに登録されていません。","arena.error.notDownloaded":"{package}はダウンロードされていません。","arena.error.loadFailed":"モデルを読み込めませんでした。","arena.error.missingCatalog":"モデルはカタログに存在しなくなりました。","arena.error.enterTtsText":"音声合成の比較に使用するテキストを入力してください。","arena.error.chooseAsrSource":"音声認識の比較に使用する入力音声を選択してください。","arena.error.chooseVcSource":"声質変換の比較に使用する入力音声を選択してください。","arena.error.noAudio":"応答に音声が含まれていません。","request.alignmentText":"アラインメント用テキスト","request.context":"コンテキストプロンプト","request.contextHint":"用語や名前など(任意)","request.duration":"長さ(秒)","request.liveDescription":"モデルのストリーミングモードを使い、4秒ごとのリクエストを連続して処理します。","request.liveTitle":"マイク音声のリアルタイム文字起こし","request.lyrics":"歌詞","request.optional":"任意","request.recordingMicrophone":"マイクで録音中","request.soundPlaceholder":"サウンドや音楽の特徴を入力…","request.startLive":"リアルタイム文字起こしを開始","request.stopLive":"リアルタイム文字起こしを停止","request.stopRecording":"録音を停止","request.textPlaceholder":"テキストを入力…","request.voiceDescription":"声の説明","request.voiceDescriptionPlaceholder":"温かみのある落ち着いた声で、ゆったりとしたテンポ…","result.track":"トラック","result.tracks":"トラック","runtime.eyebrow":"ランタイム","runtime.subtitle":"ブラウザー内のライフサイクルとリクエストに関するイベント。","status.ready":"準備完了","studio.estimatedVram":"推定VRAM使用量: {value} GB","studio.vram":"VRAM —","task.align":"強制アラインメント","task.asr":"文字起こし","task.clon":"音声クローン","task.diar":"話者ダイアライゼーション","task.gen":"音楽生成","task.s2s":"発話の編集","task.sep":"音源分離","task.svc":"歌声変換","task.tts":"音声合成","task.vad":"音声区間検出","task.vc":"声質変換","task.vdes":"声のデザイン","voice.bundledNote":"同梱の参照音声と対応する文字起こしが自動的に入力されます。","voice.namePlaceholder":"自分の参照音声","voice.recommendedClone":"音声クローンに推奨","voice.recording":"参照音声を録音中","voice.requiredClone":"この音声クローンには必須","voice.transcriptPlaceholder":"参照音声で話されている内容を正確に入力するか、対応する.txtファイルを読み込んでください。"}},aq={code:"pl",name:"Polski",translations:JSON.parse('{"request.minimaxFrames":"{frames} wyrównanych klatek wyjściowych","param.minimax_h3.num_inference_steps.label":"Kroki odszumiania","param.minimax_h3.num_inference_steps.info":"Dwanaście kroków odszumiania zapewnia praktyczną równowagę jakości i wydajności.","param.minimax_h3.num_frames.label":"Klatki wyjściowe","param.minimax_h3.num_frames.info":"Obliczane z czasu trwania przy około 24 klatkach na sekundę wyjścia. Zmiana liczby klatek aktualizuje również czas trwania.","param.minimax_h3.guidance_scale.label":"Skala naprowadzania","param.minimax_h3.sampler.label":"Próbnik","param.minimax_h3.dit_acceleration.label":"Przyspieszenie DiT","param.minimax_h3.dit_acceleration.info":"None używa pełnej ścieżki DiT nastawionej na jakość. Tryby przyspieszone są eksperymentalne i mogą zniekształcać niektóre wyniki.","param.minimax_h3.return_video.label":"Dekoduj wideo","param.minimax_h3.return_video.info":"Domyślnie wyłączone, aby zmniejszyć zużycie pamięci i zwracać tylko dźwięk.","model.minimax_h3.hint":"MiniMax-H3 korzysta ze wspólnego DiT audio/wideo. GGUF Q4 stawia na jakość; dostępny tylko dla CUDA GGUF Q4 ConvRot używa nieco więcej VRAM, aby działać szybciej. Domyślna pełna ścieżka DiT nadaje priorytet jakości dźwięku, a dekodowanie wideo jest wyłączone.","status.modelReady":"{model} jest załadowany i gotowy.","status.runningTask":"Uruchamianie: {task}...","status.completeIn":"Ukończono w {seconds} s.","status.packageAvailable":"{model} użyje {format}. Model jest dostępny w Studio.","app.nativeStudio":"Studio natywne","nav.studio":"Studio","nav.arena":"Arena","nav.models":"Modele","nav.runtime":"Środowisko","language.label":"Język interfejsu","theme.label":"Motyw","theme.system":"System","theme.dark":"Ciemny","theme.light":"Jasny","workflow.tts":"Synteza mowy","workflow.asr":"ASR / Transkrypcja","workflow.music":"Generowanie muzyki i wideo","workflow.vc":"Konwersja głosu","workflow.sep":"Separacja źródeł","workflow.analysis":"Analiza dźwięku","workflow.design":"Projektowanie głosu","studio.eyebrow":"LOKALNA INTELIGENCJA AUDIO","studio.title":"Studio audio","studio.subtitle.tts":"Generuj naturalną mowę z tekstu, korzystając z gotowych głosów i klonowania, gdy model je obsługuje.","studio.subtitle.asr":"Transkrybuj mowę z nagrań na tekst, korzystając z ustawień języka i znaczników czasu, gdy są obsługiwane.","studio.subtitle.music":"Twórz muzykę i dźwięki na podstawie opisu, tekstu piosenki lub nagrania referencyjnego.","studio.subtitle.vc":"Przekształcaj nagranie w inny głos, zachowując sposób mówienia lub śpiewania.","studio.subtitle.sep":"Rozdzielaj nagranie na wokal, instrumenty lub inne dostępne ścieżki.","studio.subtitle.analysis":"Analizuj aktywność mowy, mówców, czas i wyrównanie nagrania.","studio.subtitle.design":"Twórz lub dopracowuj głos na podstawie opisu i obsługiwanych ustawień referencyjnych.","studio.model":"Model","studio.noModel":"Nie wybrano modelu","studio.resident":"Załadowany","studio.notInstalled":"Nie zainstalowano","studio.available":"Dostępny","studio.chooseInstalled":"Wybierz zainstalowany model","studio.notDownloaded":"nie pobrano","studio.pathFound":"Ścieżka znaleziona","studio.pathMissing":"Brak ścieżki","studio.pathUnknown":"Ścieżka niesprawdzona","studio.load":"Załaduj model","studio.unload":"Wyładuj model","studio.working":"Przetwarzanie…","studio.bundledLoaded":"Wbudowany · załadowany","request.label":"ŻĄDANIE","request.title":"Dane wejściowe i ustawienia","request.prompt":"Polecenie","request.text":"Tekst","request.splitLongText":"Dziel i łącz długi tekst","request.charactersPerChunk":"Znaki na fragment","request.language":"Język","request.autoLanguage":"puste = automatycznie","request.seed":"Ziarno","request.randomSeed":"-1 = losowe","request.maxTokens":"Maksymalna liczba tokenów","request.sourceAudio":"Dźwięk źródłowy","request.recordMicrophone":"Nagraj mikrofon","voice.quickStart":"Szybkie głosy demonstracyjne","voice.useReference":"Użyj pliku dźwiękowego poniżej","voice.reference":"Głos referencyjny","voice.required":"wymagany","voice.optional":"opcjonalny","voice.referenceText":"Tekst referencyjny","voice.transcript":"Transkrypcja referencyjna","voice.saved":"Zapisane głosy","voice.browserOnly":"tylko w tej przeglądarce","voice.chooseSaved":"Wybierz zapisany głos...","voice.libraryName":"Nazwa w bibliotece","voice.save":"Zapisz głos","common.delete":"Usuń","common.cancel":"Anuluj","common.close":"Zamknij","common.refresh":"Odśwież","common.browse":"Przeglądaj","common.apply":"Zastosuj","options.modelParameters":"Parametry modelu","options.additional":"Dodatkowe opcje","run.run":"Uruchom","run.cancel":"Anuluj","run.working":"Przetwarzanie…","result.title":"Wynik","result.label":"WYNIK","result.saveWav":"Zapisz WAV","result.empty":"W tym miejscu pojawi się wygenerowany dźwięk i wyniki strukturalne.","models.eyebrow":"BIBLIOTEKA MODELI","models.title":"Pakiety lokalne","models.subtitle":"Pobieraj i zarządzaj pakietami modeli bez opuszczania interfejsu.","models.folder":"Folder modeli","models.useDefault":"Użyj domyślnego","models.showTypes":"Pokaż typy modeli","models.stopDownload":"Zatrzymaj pobieranie","models.cleanPartial":"Usuń częściowe pobieranie","runtime.title":"Dziennik sesji","runtime.status":"Stan","runtime.backend":"Backend","runtime.registered":"Zarejestrowane","runtime.resident":"Załadowane","runtime.noEvents":"Brak zdarzeń.","folder.title":"Wybierz folder","folder.up":"Poziom wyżej","folder.select":"Wybierz ten folder","common.applying":"Stosowanie…","common.disabled":"Wyłączone","common.enabled":"Włączone","file.choose":"Wybierz plik","file.none":"Nie wybrano pliku","folder.closeLabel":"Zamknij przeglądarkę folderów","folder.empty":"Ten folder nie zawiera podfolderów.","folder.eyebrow":"FOLDER MODELI","folder.loading":"Ładowanie...","folder.loadingFolders":"Ładowanie folderów...","footer.embedded":"SvelteKit · wbudowany w audiocpp_server","models.checkingSize":"sprawdzanie rozmiaru…","models.default":"Domyślnie","models.downloaded":"Pobrano","models.folderHint":"pobieranie, wykrywanie lokalne i ładowanie modeli","models.folderPlaceholder":"folder models obok audiocpp_server","models.hfAccess":"Wymagany dostęp do HF","models.model":"model","models.queued":"w kolejce","models.reinstall":"Zainstaluj ponownie","models.selected":"Wybrano","models.sharedPackage":"Używa wspólnego pakietu {name} pokazanego powyżej.","models.sizeUnavailable":"rozmiar niedostępny","models.stopping":"zatrzymywanie","models.update":"Aktualizuj","models.updateAvailable":"Dostępna aktualizacja","models.upToDate":"Aktualny","models.variants":"warianty","models.versionUnknown":"Nieznana wersja","nav.primary":"Główna nawigacja","nav.workflows":"Przepływy pracy audio","arena.eyebrow":"ARENA","arena.title.tts":"Porównanie TTS","arena.title.vc":"Porównanie konwersji głosu","arena.title.asr":"Porównanie ASR","arena.subtitle":"Uruchamia ten sam input na wybranych zainstalowanych modelach i wariantach pakietów, jeden po drugim.","arena.subtitle.tts":"Uruchamia ten sam tekst na wybranych modelach TTS i wariantach pakietów.","arena.subtitle.vc":"Uruchamia to samo audio źródłowe na wybranych modelach konwersji głosu.","arena.subtitle.asr":"Uruchamia to samo audio źródłowe na wybranych modelach ASR i porównuje transkrypcje.","arena.mode.tts":"TTS","arena.mode.vc":"Konwersja głosu","arena.mode.asr":"ASR","arena.input.label":"Dane wejściowe","arena.input.title":"Wspólne żądanie","arena.input.textPlaceholder":"Wpisz jeden prompt do porównania modeli TTS","arena.input.groundTruth":"Tekst referencyjny","arena.input.groundTruthPlaceholder":"Wklej oczekiwaną transkrypcję, aby obliczyć WER","arena.shared":"wspólne","arena.voice.label":"Głos","arena.voice.modelDefault":"Domyślny modelu","arena.voice.builtin":"Wbudowany głos demo","arena.voice.reference":"Audio referencyjne","arena.voice.builtinNote":"Wbudowane głosy są przekazywane jako voice ID do każdego modelu. Ten typ głosu nie wymaga tekstu referencyjnego.","arena.voice.targetSpeaker":"Audio głosu docelowego","arena.voice.clearTarget":"Wyczyść cel","arena.voice.clearReference":"Wyczyść referencję","arena.options.shared":"Wspólne opcje","arena.queue.label":"Kolejka","arena.queue.title":"Modele","arena.queue.add":"Dodaj","arena.queue.remove":"Usuń","arena.queue.clear":"Wyczyść","arena.queue.empty":"Dodaj zainstalowane modele lub pakiety precyzji do porównania.","arena.run":"Uruchom arenę","arena.package.label":"Pakiet","arena.package.configured":"Skonfigurowany","arena.results.title":"Porównaj wyniki","arena.results.empty":"Brak wyników areny.","arena.metric.wall":"czas","arena.metric.rtf":"rtf","arena.metric.wer":"wer","arena.itemStatus.queued":"w kolejce","arena.itemStatus.loading":"ładowanie","arena.itemStatus.running":"uruchomione","arena.itemStatus.done":"gotowe","arena.itemStatus.failed":"błąd","arena.itemStatus.skipped":"pominięto","arena.status.duplicate":"{model} {package} jest już w arenie.","arena.status.loadingModel":"Ładowanie modelu","arena.status.runningRequest":"Uruchamianie żądania","arena.status.addModel":"Dodaj co najmniej jeden model do areny.","arena.status.running":"Uruchamianie areny {mode}...","arena.status.complete":"Arena zakończona.","arena.note.skippedTargetVoice":"Pominięto, ponieważ ten model VC wymaga audio głosu docelowego.","arena.note.skippedReferenceText":"Pominięto, ponieważ ten model wymaga tekstu referencyjnego dla wybranego wejścia głosu.","arena.note.builtinVoice":"Użyto wbudowanego głosu: {voice}.","arena.note.referenceVoice":"Użyto głosu referencyjnego.","arena.note.referenceUnsupported":"Użyto domyślnego głosu; głos referencyjny nie jest obsługiwany.","arena.note.defaultVoice":"Użyto domyślnego głosu: {voice}.","arena.note.skippedReferenceVoice":"Pominięto, ponieważ ten model wymaga głosu referencyjnego.","arena.error.seed":"Ziarno musi być -1 albo 32-bitową liczbą unsigned (0-4294967295).","arena.error.jsonObject":"musi być obiektem","arena.error.invalidJson":"Nieprawidłowy JSON opcji areny: {error}","arena.error.unregistered":"Skonfigurowany model nie jest zarejestrowany przez ten serwer.","arena.error.notDownloaded":"{package} nie został pobrany.","arena.error.loadFailed":"Model nie został załadowany.","arena.error.missingCatalog":"Modelu nie ma już w katalogu.","arena.error.enterTtsText":"Wpisz tekst dla areny TTS.","arena.error.chooseAsrSource":"Wybierz audio źródłowe dla areny ASR.","arena.error.chooseVcSource":"Wybierz audio źródłowe dla areny VC.","arena.error.noAudio":"Odpowiedź nie zawiera audio.","request.alignmentText":"Tekst do wyrównania","request.context":"Kontekst","request.contextHint":"opcjonalna terminologia lub nazwy","request.duration":"Czas trwania w sekundach","request.liveDescription":"Przetwarza kolejne czterosekundowe żądania w trybie strumieniowym modelu.","request.liveTitle":"Transkrypcja mikrofonu na żywo","request.lyrics":"Tekst utworu","request.optional":"opcjonalne","request.recordingMicrophone":"Nagrywanie mikrofonu","request.soundPlaceholder":"Opisz dźwięk lub muzykę…","request.startLive":"Uruchom na żywo","request.stopLive":"Zatrzymaj na żywo","request.stopRecording":"Zatrzymaj nagrywanie","request.textPlaceholder":"Wprowadź tekst…","request.voiceDescription":"Opis głosu","request.voiceDescriptionPlaceholder":"Ciepły, spokojny głos o umiarkowanym tempie…","result.track":"ścieżka","result.tracks":"ścieżki","runtime.eyebrow":"ŚRODOWISKO","runtime.subtitle":"Zdarzenia cyklu życia i żądań po stronie przeglądarki.","status.ready":"Gotowe","studio.estimatedVram":"Szacowane VRAM: {value} GB","studio.vram":"VRAM —","task.align":"Wymuszone wyrównanie","task.asr":"Transkrypcja","task.clon":"Klonowanie głosu","task.diar":"Diarizacja mówców","task.gen":"Generowanie muzyki","task.s2s":"Edycja mowy","task.sep":"Separacja źródeł","task.svc":"Konwersja głosu śpiewanego","task.tts":"Synteza mowy","task.vad":"Aktywność głosowa","task.vc":"Konwersja głosu","task.vdes":"Projektowanie głosu","voice.bundledNote":"Dołączone audio referencyjne i jego transkrypcja zostaną użyte automatycznie.","voice.namePlaceholder":"Mój głos referencyjny","voice.recommendedClone":"zalecana do klonowania","voice.recording":"Nagrywanie głosu referencyjnego","voice.requiredClone":"wymagana dla tego klonowania głosu","voice.transcriptPlaceholder":"Wpisz dokładne słowa z audio referencyjnego lub wczytaj pasujący plik .txt powyżej."}')},iq={code:"ru",name:"Русский",translations:JSON.parse('{"request.minimaxFrames":"{frames} выровненных выходных кадров","param.minimax_h3.num_inference_steps.label":"Шаги шумоподавления","param.minimax_h3.num_inference_steps.info":"Двенадцать шагов обеспечивают практичный баланс качества и производительности.","param.minimax_h3.num_frames.label":"Выходные кадры","param.minimax_h3.num_frames.info":"Рассчитываются из длительности примерно по 24 кадра на секунду вывода. Изменение числа кадров также обновляет длительность.","param.minimax_h3.guidance_scale.label":"Масштаб управления","param.minimax_h3.sampler.label":"Сэмплер","param.minimax_h3.dit_acceleration.label":"Ускорение DiT","param.minimax_h3.dit_acceleration.info":"None использует полный DiT с приоритетом качества. Режимы ускорения экспериментальны и могут искажать некоторые результаты.","param.minimax_h3.return_video.label":"Декодировать видео","param.minimax_h3.return_video.info":"По умолчанию выключено для снижения расхода памяти и возврата только аудио.","model.minimax_h3.hint":"MiniMax-H3 использует совместный аудио/видео DiT. GGUF Q4 ориентирован на качество; доступный только в CUDA GGUF Q4 ConvRot использует немного больше VRAM ради скорости. Полный DiT по умолчанию отдаёт приоритет качеству звука, а декодирование видео отключено.","status.modelReady":"{model} загружен и готов.","status.runningTask":"Выполняется: {task}...","status.completeIn":"Завершено за {seconds} с.","status.packageAvailable":"{model} будет использовать {format}. Модель доступна в Studio.","app.nativeStudio":"Нативная студия","nav.studio":"Студия","nav.arena":"Арена","nav.models":"Модели","nav.runtime":"Среда","language.label":"Язык интерфейса","theme.label":"Тема","theme.system":"Системная","theme.dark":"Тёмная","theme.light":"Светлая","workflow.tts":"Синтез речи","workflow.asr":"ASR / Распознавание","workflow.music":"Генерация музыки и видео","workflow.vc":"Преобразование голоса","workflow.sep":"Разделение источников","workflow.analysis":"Анализ аудио","workflow.design":"Дизайн голоса","studio.eyebrow":"ЛОКАЛЬНЫЙ АУДИО ИНТЕЛЛЕКТ","studio.title":"Аудиостудия","studio.subtitle.tts":"Создавайте естественную речь из текста с готовыми голосами и клонированием, если они поддерживаются.","studio.subtitle.asr":"Преобразуйте речь из аудио в текст с настройками языка и временных меток, если они поддерживаются.","studio.subtitle.music":"Создавайте музыку и звуки по описанию, тексту песни или эталонному аудио.","studio.subtitle.vc":"Преобразуйте запись в другой голос, сохраняя манеру речи или пения.","studio.subtitle.sep":"Разделяйте запись на вокал, инструменты и другие доступные аудиодорожки.","studio.subtitle.analysis":"Анализируйте речевую активность, говорящих, время и выравнивание аудио.","studio.subtitle.design":"Создавайте и настраивайте голос по текстовому описанию и поддерживаемым эталонным параметрам.","studio.model":"Модель","studio.noModel":"Модель не выбрана","studio.resident":"Загружена","studio.notInstalled":"Не установлена","studio.available":"Доступна","studio.chooseInstalled":"Выберите установленную модель","studio.notDownloaded":"не скачана","studio.pathFound":"Путь найден","studio.pathMissing":"Путь отсутствует","studio.pathUnknown":"Путь не проверен","studio.load":"Загрузить модель","studio.unload":"Выгрузить модель","studio.working":"Обработка…","studio.bundledLoaded":"Встроена · загружена","request.label":"ЗАПРОС","request.title":"Ввод и управление","request.prompt":"Запрос","request.text":"Текст","request.splitLongText":"Разделять и объединять длинный текст","request.charactersPerChunk":"Символов в части","request.language":"Язык","request.autoLanguage":"пусто = автоматически","request.seed":"Seed","request.randomSeed":"-1 = случайно","request.maxTokens":"Максимум токенов","request.sourceAudio":"Исходное аудио","request.recordMicrophone":"Записать микрофон","voice.quickStart":"Демонстрационные голоса","voice.useReference":"Использовать файл эталонного аудио ниже","voice.reference":"Эталонный голос","voice.required":"обязательно","voice.optional":"необязательно","voice.referenceText":"Эталонный текст","voice.transcript":"Эталонная расшифровка","voice.saved":"Сохранённые голоса","voice.browserOnly":"только в этом браузере","voice.chooseSaved":"Выберите сохранённый голос...","voice.libraryName":"Имя в библиотеке","voice.save":"Сохранить голос","common.delete":"Удалить","common.cancel":"Отмена","common.close":"Закрыть","common.refresh":"Обновить","common.browse":"Обзор","common.apply":"Применить","options.modelParameters":"Параметры модели","options.additional":"Дополнительные параметры","run.run":"Запустить","run.cancel":"Отмена","run.working":"Обработка…","result.title":"Результат","result.label":"РЕЗУЛЬТАТ","result.saveWav":"Сохранить WAV","result.empty":"Здесь появятся созданное аудио и структурированные результаты.","models.eyebrow":"БИБЛИОТЕКА МОДЕЛЕЙ","models.title":"Локальные пакеты","models.subtitle":"Скачивайте пакеты моделей и управляйте ими прямо в интерфейсе.","models.folder":"Папка моделей","models.useDefault":"По умолчанию","models.showTypes":"Типы моделей","models.stopDownload":"Остановить загрузку","models.cleanPartial":"Удалить частичную загрузку","runtime.title":"Журнал сеанса","runtime.status":"Состояние","runtime.backend":"Backend","runtime.registered":"Зарегистрировано","runtime.resident":"Загружено","runtime.noEvents":"Событий пока нет.","folder.title":"Выберите папку","folder.up":"На уровень выше","folder.select":"Выбрать эту папку","common.applying":"Применение…","common.disabled":"Выключено","common.enabled":"Включено","file.choose":"Выбрать файл","file.none":"Файл не выбран","folder.closeLabel":"Закрыть выбор папки","folder.empty":"В этой папке нет вложенных папок.","folder.eyebrow":"ПАПКА МОДЕЛЕЙ","folder.loading":"Загрузка...","folder.loadingFolders":"Загрузка папок...","footer.embedded":"SvelteKit · встроен в audiocpp_server","models.checkingSize":"проверка размера…","models.default":"По умолчанию","models.downloaded":"Скачано","models.folderHint":"загрузка, локальное обнаружение и загрузка моделей","models.folderPlaceholder":"папка models рядом с audiocpp_server","models.hfAccess":"Требуется доступ HF","models.model":"модель","models.queued":"в очереди","models.reinstall":"Переустановить","models.selected":"Выбрано","models.sharedPackage":"Использует общий пакет {name}, показанный выше.","models.sizeUnavailable":"размер недоступен","models.stopping":"остановка","models.update":"Обновить","models.updateAvailable":"Доступно обновление","models.upToDate":"Актуально","models.variants":"варианты","models.versionUnknown":"Версия неизвестна","nav.primary":"Основная навигация","nav.workflows":"Рабочие процессы аудио","arena.eyebrow":"АРЕНА","arena.title.tts":"Сравнение TTS","arena.title.vc":"Сравнение преобразования голоса","arena.title.asr":"Сравнение ASR","arena.subtitle":"Запускает один и тот же ввод через выбранные установленные модели и варианты пакетов по очереди.","arena.subtitle.tts":"Запускает один и тот же текст через выбранные модели TTS и варианты пакетов.","arena.subtitle.vc":"Запускает одно и то же исходное аудио через выбранные модели преобразования голоса.","arena.subtitle.asr":"Запускает одно и то же исходное аудио через выбранные модели ASR и сравнивает расшифровки.","arena.mode.tts":"TTS","arena.mode.vc":"Преобразование голоса","arena.mode.asr":"ASR","arena.input.label":"Ввод","arena.input.title":"Общий запрос","arena.input.textPlaceholder":"Введите один запрос для сравнения моделей TTS","arena.input.groundTruth":"Эталонный текст","arena.input.groundTruthPlaceholder":"Вставьте ожидаемую расшифровку для расчёта WER","arena.shared":"общий","arena.voice.label":"Голос","arena.voice.modelDefault":"По умолчанию модели","arena.voice.builtin":"Встроенный демо-голос","arena.voice.reference":"Эталонное аудио","arena.voice.builtinNote":"Встроенные голоса передаются каждой модели как voice ID. Для этого источника голоса эталонный текст не требуется.","arena.voice.targetSpeaker":"Аудио целевого говорящего","arena.voice.clearTarget":"Очистить цель","arena.voice.clearReference":"Очистить эталон","arena.options.shared":"Общие параметры","arena.queue.label":"Очередь","arena.queue.title":"Модели","arena.queue.add":"Добавить","arena.queue.remove":"Удалить","arena.queue.clear":"Очистить","arena.queue.empty":"Добавьте установленные модели или пакеты точности для сравнения.","arena.run":"Запустить арену","arena.package.label":"Пакет","arena.package.configured":"Настроено","arena.results.title":"Сравнить вывод","arena.results.empty":"Результатов арены пока нет.","arena.metric.wall":"время","arena.metric.rtf":"rtf","arena.metric.wer":"wer","arena.itemStatus.queued":"в очереди","arena.itemStatus.loading":"загрузка","arena.itemStatus.running":"выполняется","arena.itemStatus.done":"готово","arena.itemStatus.failed":"ошибка","arena.itemStatus.skipped":"пропущено","arena.status.duplicate":"{model} {package} уже есть в арене.","arena.status.loadingModel":"Загрузка модели","arena.status.runningRequest":"Выполнение запроса","arena.status.addModel":"Добавьте хотя бы одну модель в арену.","arena.status.running":"Выполняется арена {mode}...","arena.status.complete":"Выполнение арены завершено.","arena.note.skippedTargetVoice":"Пропущено: этой VC-модели нужно аудио целевого говорящего.","arena.note.skippedReferenceText":"Пропущено: этой модели нужен эталонный текст для выбранного голосового ввода.","arena.note.builtinVoice":"Использован встроенный голос: {voice}.","arena.note.referenceVoice":"Использован эталонный голос.","arena.note.referenceUnsupported":"Использован голос по умолчанию; эталонный голос не поддерживается.","arena.note.defaultVoice":"Использован голос по умолчанию: {voice}.","arena.note.skippedReferenceVoice":"Пропущено: этой модели нужен эталонный голос.","arena.error.seed":"Seed должен быть -1 или 32-битным unsigned-целым (0-4294967295).","arena.error.jsonObject":"должен быть объектом","arena.error.invalidJson":"Недопустимый JSON параметров арены: {error}","arena.error.unregistered":"Настроенная модель не зарегистрирована этим сервером.","arena.error.notDownloaded":"{package} не скачан.","arena.error.loadFailed":"Модель не загрузилась.","arena.error.missingCatalog":"Модели больше нет в каталоге.","arena.error.enterTtsText":"Введите текст для арены TTS.","arena.error.chooseAsrSource":"Выберите исходное аудио для арены ASR.","arena.error.chooseVcSource":"Выберите исходное аудио для арены VC.","arena.error.noAudio":"Ответ не содержит аудио.","request.alignmentText":"Текст для выравнивания","request.context":"Контекстный запрос","request.contextHint":"необязательные термины или имена","request.duration":"Длительность в секундах","request.liveDescription":"Обрабатывает последовательные четырёхсекундные запросы в потоковом режиме модели.","request.liveTitle":"Распознавание с микрофона в реальном времени","request.lyrics":"Текст песни","request.optional":"необязательно","request.recordingMicrophone":"Запись микрофона","request.soundPlaceholder":"Опишите звук или музыку…","request.startLive":"Запустить","request.stopLive":"Остановить","request.stopRecording":"Остановить запись","request.textPlaceholder":"Введите текст…","request.voiceDescription":"Описание голоса","request.voiceDescriptionPlaceholder":"Тёплый спокойный голос с размеренным темпом…","result.track":"дорожка","result.tracks":"дорожки","runtime.eyebrow":"СРЕДА","runtime.subtitle":"События жизненного цикла и запросов в браузере.","status.ready":"Готово","studio.estimatedVram":"Оценка VRAM: {value} ГБ","studio.vram":"VRAM —","task.align":"Принудительное выравнивание","task.asr":"Распознавание речи","task.clon":"Клонирование голоса","task.diar":"Диаризация говорящих","task.gen":"Генерация музыки","task.s2s":"Редактирование речи","task.sep":"Разделение источников","task.svc":"Преобразование вокала","task.tts":"Синтез речи","task.vad":"Голосовая активность","task.vc":"Преобразование голоса","task.vdes":"Дизайн голоса","voice.bundledNote":"Встроенное эталонное аудио и соответствующая расшифровка подставляются автоматически.","voice.namePlaceholder":"Мой эталонный голос","voice.recommendedClone":"рекомендуется для клонирования","voice.recording":"Запись эталонного голоса","voice.requiredClone":"требуется для этого клонирования","voice.transcriptPlaceholder":"Введите точные слова из эталонного аудио или загрузите соответствующий файл .txt выше."}')},nq={code:"vi",name:"Tiếng Việt",translations:JSON.parse('{"app.nativeStudio":"Phòng thu trên máy","nav.studio":"Phòng thu","nav.arena":"So sánh","nav.models":"Model","nav.runtime":"Trạng thái","nav.configuration":"Cấu hình","nav.primary":"Điều hướng chính","nav.workflows":"Các tác vụ âm thanh","language.label":"Ngôn ngữ giao diện","theme.label":"Giao diện","theme.system":"Theo hệ thống","theme.dark":"Tối","theme.mocha":"Catppuccin Mocha","theme.light":"Sáng","arena.eyebrow":"SO SÁNH","arena.title.tts":"So sánh giọng đọc","arena.title.vc":"So sánh chuyển đổi giọng","arena.title.asr":"So sánh nhận dạng giọng nói","arena.subtitle":"Chạy lần lượt cùng một đầu vào với các model và biến thể đã cài được chọn.","arena.subtitle.tts":"Đọc cùng một văn bản bằng các model giọng đọc và biến thể được chọn.","arena.subtitle.vc":"Chuyển đổi cùng một âm thanh nguồn bằng các model được chọn.","arena.subtitle.asr":"Nhận dạng cùng một âm thanh nguồn bằng các model được chọn và so sánh bản chép lời.","arena.mode.tts":"Đọc văn bản","arena.mode.vc":"Chuyển đổi giọng","arena.mode.asr":"Nhận dạng giọng nói","arena.input.label":"Đầu vào","arena.input.title":"Yêu cầu dùng chung","arena.input.textPlaceholder":"Nhập văn bản để so sánh các model giọng đọc","arena.input.groundTruth":"Bản chép lời chuẩn","arena.input.groundTruthPlaceholder":"Dán bản chép lời chuẩn để tính tỷ lệ lỗi từ (WER)","arena.shared":"dùng chung","arena.voice.label":"Giọng","arena.voice.modelDefault":"Mặc định của model","arena.voice.builtin":"Giọng mẫu có sẵn","arena.voice.reference":"Âm thanh tham chiếu","arena.voice.builtinNote":"Giọng có sẵn được gửi dưới dạng mã giọng cho từng model. Không cần bản chép lời với nguồn giọng này.","arena.voice.targetSpeaker":"Âm thanh giọng đích","arena.voice.clearTarget":"Bỏ giọng đích","arena.voice.clearReference":"Bỏ tham chiếu","arena.options.shared":"Tùy chọn dùng chung","arena.queue.label":"Hàng đợi","arena.queue.title":"Model","arena.queue.add":"Thêm","arena.queue.remove":"Bỏ","arena.queue.clear":"Xóa hàng đợi","arena.queue.empty":"Thêm model hoặc biến thể kiểu dữ liệu đã cài để so sánh.","arena.run":"Chạy so sánh","arena.package.label":"Gói","arena.package.configured":"Đã cấu hình","arena.results.title":"So sánh kết quả","arena.results.empty":"Chưa có kết quả so sánh.","arena.metric.wall":"thời gian","arena.metric.rtf":"RTF","arena.metric.wer":"WER","arena.itemStatus.queued":"đang chờ","arena.itemStatus.loading":"đang nạp","arena.itemStatus.running":"đang chạy","arena.itemStatus.done":"hoàn tất","arena.itemStatus.failed":"thất bại","arena.itemStatus.skipped":"đã bỏ qua","arena.status.duplicate":"{model} {package} đã có trong danh sách so sánh.","arena.status.loadingModel":"Đang nạp model","arena.status.runningRequest":"Đang chạy yêu cầu","arena.status.addModel":"Thêm ít nhất một model để so sánh.","arena.status.running":"Đang chạy so sánh {mode}...","arena.status.complete":"Đã hoàn tất so sánh.","arena.note.skippedTargetVoice":"Đã bỏ qua vì model chuyển đổi giọng này cần âm thanh giọng đích.","arena.note.skippedReferenceText":"Đã bỏ qua vì model này cần bản chép lời cho giọng tham chiếu đã chọn.","arena.note.builtinVoice":"Đã dùng giọng có sẵn: {voice}.","arena.note.referenceVoice":"Đã dùng giọng tham chiếu.","arena.note.referenceUnsupported":"Đã dùng giọng mặc định; model không hỗ trợ giọng tham chiếu.","arena.note.defaultVoice":"Đã dùng giọng mặc định: {voice}.","arena.note.skippedReferenceVoice":"Đã bỏ qua vì model này cần giọng tham chiếu.","arena.error.seed":"Seed phải là -1 hoặc số nguyên không dấu 32 bit (từ 0 đến 4294967295).","arena.error.jsonObject":"phải là một đối tượng JSON","arena.error.invalidJson":"JSON tùy chọn so sánh không hợp lệ: {error}","arena.error.unregistered":"Model đã cấu hình chưa được đăng ký trên máy chủ này.","arena.error.notDownloaded":"Chưa tải {package}.","arena.error.loadFailed":"Không nạp được model.","arena.error.missingCatalog":"Model không còn trong danh mục.","arena.error.enterTtsText":"Nhập văn bản để so sánh giọng đọc.","arena.error.chooseAsrSource":"Chọn âm thanh nguồn để so sánh nhận dạng giọng nói.","arena.error.chooseVcSource":"Chọn âm thanh nguồn để so sánh chuyển đổi giọng.","arena.error.noAudio":"Phản hồi không có âm thanh.","workflow.tts":"Đọc văn bản","workflow.asr":"Nhận dạng / Chép lời","workflow.music":"Tạo nhạc / video","workflow.vc":"Chuyển đổi giọng / S2S","workflow.enhancement":"Cải thiện / Khử nhiễu","models.tools":"công cụ","workflow.sep":"Tách nguồn âm thanh","workflow.analysis":"Phân tích âm thanh","workflow.design":"Thiết kế giọng","task.tts":"Đọc văn bản","task.clon":"Sao chép giọng","task.asr":"Chép lời","task.gen":"Tạo nhạc","task.midi":"Âm thanh sang MIDI","task.vc":"Chuyển đổi giọng","task.svc":"Chuyển đổi giọng hát","task.s2s":"Chỉnh sửa lời nói","task.sep":"Tách nguồn âm thanh","task.vad":"Phát hiện giọng nói","task.diar":"Phân tách người nói","task.align":"Căn chỉnh lời và âm thanh","task.vdes":"Thiết kế giọng","studio.eyebrow":"XỬ LÝ ÂM THANH TẠI MÁY","studio.title":"Phòng thu âm thanh","studio.subtitle.tts":"Tạo giọng đọc tự nhiên từ văn bản, với giọng có sẵn và sao chép giọng khi model hỗ trợ.","studio.subtitle.asr":"Chuyển lời nói thành văn bản, với tùy chọn ngôn ngữ và mốc thời gian khi model hỗ trợ.","studio.subtitle.music":"Tạo nhạc và âm thanh từ mô tả, lời bài hát hoặc âm thanh tham chiếu khi model hỗ trợ.","studio.subtitle.vc":"Chuyển đổi giọng nói, giọng hát hoặc nhận câu trả lời bằng giọng nói từ âm thanh đầu vào.","studio.subtitle.sep":"Tách bản ghi thành giọng hát, nhạc cụ hoặc các nguồn âm thanh mà model hỗ trợ.","studio.subtitle.analysis":"Phân tích giọng nói, người nói, mốc thời gian và căn chỉnh lời với âm thanh.","studio.subtitle.enhancement":"Cải thiện âm thanh, loại bỏ tiếng ồn nền hoặc khôi phục dải tần.","studio.subtitle.design":"Tạo hoặc tinh chỉnh giọng từ mô tả bằng văn bản và các tùy chọn tham chiếu được hỗ trợ.","studio.model":"Model","studio.noModel":"Chưa chọn model","studio.resident":"Đã nạp","studio.notInstalled":"Chưa cài","studio.available":"Có sẵn","studio.chooseInstalled":"Chọn một model đã cài","studio.notDownloaded":"chưa tải","studio.pathFound":"Đã tìm thấy đường dẫn","studio.pathMissing":"Không tìm thấy đường dẫn","studio.pathUnknown":"Chưa kiểm tra đường dẫn","studio.estimatedVram":"VRAM ước tính: {value} GB","studio.vram":"VRAM —","studio.load":"Nạp model","studio.unload":"Giải phóng model","studio.working":"Đang xử lý…","studio.bundledLoaded":"Có sẵn · đã nạp","request.label":"YÊU CẦU","request.title":"Đầu vào và tùy chọn","request.prompt":"Mô tả","request.alignmentText":"Văn bản cần căn chỉnh","request.text":"Văn bản","request.soundPlaceholder":"Mô tả âm thanh hoặc bản nhạc…","request.textPlaceholder":"Nhập văn bản…","request.splitLongText":"Chia và ghép văn bản dài","request.charactersPerChunk":"Số ký tự mỗi đoạn","request.lyrics":"Lời bài hát","request.optional":"không bắt buộc","request.context":"Ngữ cảnh","request.contextHint":"thuật ngữ hoặc tên riêng, không bắt buộc","request.voiceDescription":"Mô tả giọng","request.voiceDescriptionPlaceholder":"Giọng ấm áp, điềm tĩnh, nhịp đọc vừa phải…","request.language":"Ngôn ngữ","request.autoLanguage":"để trống = tự nhận dạng","request.seed":"Seed","request.randomSeed":"-1 = ngẫu nhiên","request.maxTokens":"Số token tối đa","request.duration":"Thời lượng (giây)","request.autoDuration":"-1 = tự động","request.rewriteCaption":"Viết lại mô tả","request.rewritingCaption":"Đang viết lại mô tả...","request.minimaxFrames":"{frames} khung hình đầu ra đã căn chỉnh","request.sourceAudio":"Âm thanh nguồn","request.stopRecording":"Dừng ghi âm","request.recordingMicrophone":"Đang ghi âm từ micro","request.recordMicrophone":"Ghi âm từ micro","request.liveTitle":"Chép lời trực tiếp từ micro","request.liveDescription":"Xử lý liên tiếp các đoạn âm thanh dài bốn giây bằng chế độ phát trực tiếp của model.","request.stopLive":"Dừng chép lời trực tiếp","request.startLive":"Bắt đầu chép lời trực tiếp","voice.quickStart":"Giọng có sẵn để thử nhanh","voice.configured":"Giọng đã cấu hình","voice.useReference":"Dùng tệp âm thanh tham chiếu bên dưới","voice.bundledNote":"Âm thanh tham chiếu có sẵn và bản chép lời tương ứng được cung cấp tự động.","voice.reference":"Giọng tham chiếu","voice.required":"bắt buộc","voice.optional":"không bắt buộc","voice.referenceText":"Văn bản tham chiếu","voice.recording":"Đang ghi âm giọng tham chiếu","voice.transcript":"Bản chép lời mẫu","voice.requiredClone":"bắt buộc để sao chép giọng này","voice.recommendedClone":"nên có để sao chép giọng","voice.transcriptPlaceholder":"Nhập đúng lời nói trong âm thanh mẫu, hoặc tải tệp .txt tương ứng ở trên.","voice.saved":"Giọng đã lưu","voice.browserOnly":"chỉ lưu trong trình duyệt này","voice.chooseSaved":"Chọn giọng đã lưu...","voice.libraryName":"Tên giọng trong thư viện","voice.namePlaceholder":"Giọng tham chiếu của tôi","voice.save":"Lưu giọng","voice.clearReference":"Bỏ giọng tham chiếu","voice.preset":"Giọng có sẵn","voice.speakerReferences":"Giọng tham chiếu của người nói","voice.upToFour":"không bắt buộc, tối đa 4","voice.speaker":"Người nói {number}","voice.dialoguePlaceholder":"[S1] Lời trong giọng tham chiếu của người nói 1. [S2] Lời trong giọng tham chiếu của người nói 2.","settings.load":"Nạp thiết lập JSON","settings.save":"Lưu thiết lập JSON","history.title":"Lịch sử chạy (Thử nghiệm)","history.clear":"Xóa lịch sử","history.deleteRun":"Xóa lần chạy {id}","history.wrongModel":"Không thể mở lịch sử của {label}: model hiện tại là {model}.","history.wait":"Chờ yêu cầu hiện tại hoặc việc khôi phục thiết lập hoàn tất.","configuration.history":"Lịch sử chạy","configuration.historyLimit":"Số lần chạy tối đa được lưu","configuration.save":"Lưu cấu hình","configuration.saved":"Đã lưu cấu hình.","studio.weightsPath":"Đường dẫn trọng số trên máy chủ","studio.downloadWeights":"Tải trọng số SafeTensors","studio.format":"Định dạng model","studio.configured":"Đã cấu hình","studio.serverConfigured":"Được thiết lập trong cấu hình máy chủ","studio.loadPackage":"Nạp {package}","studio.unloadPackage":"Giải phóng {package}","studio.packageNotDownloaded":"Chưa tải {package}","run.chooseModel":"Chọn một model đã cài trước","run.installModel":"Cài model này trong mục Model trước","run.elapsed":"Thời gian xử lý đã trôi qua","result.saveArtifact":"Lưu {format}","result.videoPreview":"Xem trước video","param.omnivoice.num_inference_steps.label":"Số bước tạo giọng","param.omnivoice.guidance_scale.label":"Mức bám sát tham chiếu","param.omnivoice.speed.label":"Tốc độ đọc","param.omnivoice.instruct.label":"Chỉ dẫn phong cách / chất giọng","param.omnivoice.instruct.placeholder":"Ví dụ: Đọc với giọng nhẹ nhàng, chậm rãi","common.delete":"Xóa","common.enabled":"Đã bật","common.disabled":"Đã tắt","common.cancel":"Hủy","common.close":"Đóng","common.refresh":"Làm mới","common.browse":"Duyệt thư mục","common.apply":"Áp dụng","common.applying":"Đang áp dụng…","file.choose":"Chọn tệp","file.none":"Chưa chọn tệp","file.preview":"Nghe / xem trước","file.clear":"Bỏ tệp","options.modelParameters":"Tham số model","options.additional":"Tùy chọn bổ sung","param.minimax_h3.num_inference_steps.label":"Số bước khử nhiễu","param.minimax_h3.num_inference_steps.info":"Mười hai bước khử nhiễu giúp cân bằng chất lượng và tốc độ.","param.minimax_h3.num_frames.label":"Số khung hình đầu ra","param.minimax_h3.num_frames.info":"Được tính từ thời lượng với khoảng 24 khung hình mỗi giây đầu ra. Đổi số khung hình cũng cập nhật thời lượng.","param.minimax_h3.guidance_scale.label":"Mức bám sát mô tả","param.minimax_h3.sampler.label":"Bộ lấy mẫu","param.minimax_h3.dit_acceleration.label":"Tăng tốc DiT","param.minimax_h3.dit_acceleration.info":"None dùng toàn bộ DiT để ưu tiên chất lượng. Các chế độ tăng tốc đang thử nghiệm và có thể làm méo một số kết quả.","param.minimax_h3.return_video.label":"Giải mã video","param.minimax_h3.return_video.info":"Mặc định tắt để giảm bộ nhớ sử dụng và chỉ trả về âm thanh.","model.minimax_h3.hint":"MiniMax-H3 dùng DiT kết hợp âm thanh và video. GGUF Q4 ưu tiên chất lượng; GGUF Q4 ConvRot chỉ chạy trên CUDA, dùng thêm một ít VRAM để tăng tốc. Chế độ DiT đầy đủ mặc định ưu tiên chất lượng âm thanh và tắt giải mã video.","run.run":"Chạy","run.cancel":"Hủy","run.working":"Đang xử lý…","result.label":"KẾT QUẢ","result.title":"Đầu ra","result.track":"bản âm thanh","result.tracks":"bản âm thanh","result.saveWav":"Lưu WAV","result.empty":"Âm thanh và kết quả xử lý sẽ xuất hiện ở đây.","models.eyebrow":"THƯ VIỆN MODEL","models.title":"Các gói trên máy","models.subtitle":"Tải và quản lý các gói model ngay trong giao diện này.","models.folder":"Thư mục model","models.folderHint":"nơi tải, tìm và nạp model","models.folderPlaceholder":"thư mục models bên cạnh audiocpp_server","models.default":"Mặc định","models.useDefault":"Dùng mặc định","models.showTypes":"Hiện các loại model","models.model":"model","models.variants":"biến thể","models.update":"Cập nhật","models.reinstall":"Cài lại","models.upToDate":"Đã cập nhật","models.updateAvailable":"Có bản cập nhật","models.versionUnknown":"Chưa rõ phiên bản","models.selected":"Đã chọn","models.downloaded":"Đã tải","models.queued":"đang chờ","models.stopping":"đang dừng","models.checkingSize":"đang kiểm tra dung lượng…","models.hfAccess":"Cần quyền truy cập Hugging Face","models.sizeUnavailable":"chưa rõ dung lượng","models.stopDownload":"Dừng tải","models.cleanPartial":"Xóa phần tải dở","models.sharedPackage":"Dùng chung gói {name} ở trên.","runtime.eyebrow":"TRẠNG THÁI","runtime.title":"Nhật ký phiên","runtime.subtitle":"Các sự kiện hoạt động và yêu cầu từ trình duyệt.","runtime.status":"Trạng thái","runtime.backend":"Bộ xử lý","runtime.registered":"Đã đăng ký","runtime.resident":"Đã nạp","runtime.noEvents":"Chưa có sự kiện.","status.ready":"Sẵn sàng","status.modelReady":"{model} đã nạp và sẵn sàng.","status.runningTask":"Đang chạy {task}...","status.completeIn":"Hoàn tất sau {seconds} giây.","status.packageAvailable":"{model} sẽ dùng {format}. Đã có thể dùng trong Phòng thu.","folder.eyebrow":"THƯ MỤC MODEL","folder.title":"Chọn thư mục","folder.closeLabel":"Đóng trình duyệt thư mục","folder.loading":"Đang tải...","folder.up":"Lên một cấp","folder.loadingFolders":"Đang tải danh sách thư mục...","folder.empty":"Thư mục này không có thư mục con.","folder.select":"Chọn thư mục này","footer.embedded":"SvelteKit · tích hợp trong audiocpp_server"}')},sq={code:"zh",name:"中文",translations:{"request.minimaxFrames":"{frames} 个对齐输出帧","param.minimax_h3.num_inference_steps.label":"去噪步数","param.minimax_h3.num_inference_steps.info":"十二个去噪步骤可在质量和性能之间取得实用的平衡。","param.minimax_h3.num_frames.label":"输出帧数","param.minimax_h3.num_frames.info":"根据时长自动计算,每秒输出约 24 帧。编辑帧数也会更新时长。","param.minimax_h3.guidance_scale.label":"引导强度","param.minimax_h3.sampler.label":"采样器","param.minimax_h3.dit_acceleration.label":"DiT 加速","param.minimax_h3.dit_acceleration.info":"“none”使用质量优先的完整 DiT 路径。加速模式为实验性功能,可能使某些输出失真。","param.minimax_h3.return_video.label":"解码视频","param.minimax_h3.return_video.info":"默认禁用以减少内存占用,并仅返回音频。","model.minimax_h3.hint":"MiniMax-H3 使用联合音频/视频 DiT。GGUF Q4 是质量优先版本;仅支持 CUDA 的 GGUF Q4 ConvRot 使用稍多显存以提高速度。默认完整 DiT 路径优先保证音频质量,并禁用视频解码。","status.modelReady":"{model} 已加载并准备就绪。","status.runningTask":"正在运行{task}...","status.completeIn":"已在 {seconds} 秒内完成。","status.packageAvailable":"{model} 将使用 {format},现可在工作室中使用。","app.nativeStudio":"原生工作室","nav.studio":"工作室","nav.arena":"对比场","nav.models":"模型","nav.runtime":"运行环境","language.label":"界面语言","theme.label":"主题","theme.system":"跟随系统","theme.dark":"深色","theme.light":"浅色","workflow.tts":"文本转语音","workflow.asr":"ASR / 转录","workflow.music":"音乐 / 视频生成","workflow.vc":"语音转换","workflow.sep":"音源分离","workflow.analysis":"音频分析","workflow.design":"音色设计","studio.eyebrow":"本地音频智能","studio.title":"音频工作室","studio.subtitle.tts":"从文本生成自然语音,并在模型支持时使用预设音色或声音克隆。","studio.subtitle.asr":"将语音音频转为文本,并在模型支持时设置语言和时间戳。","studio.subtitle.music":"根据描述、歌词或参考音频创作音乐和声音。","studio.subtitle.vc":"将录音转换为另一种声音,同时保留原有的说话或演唱表现。","studio.subtitle.sep":"将录音分离为人声、乐器或其他可用音轨。","studio.subtitle.analysis":"分析语音活动、说话人、时间信息和音频对齐。","studio.subtitle.design":"根据文字描述和支持的参考控制创建或调整声音。","studio.model":"模型","studio.noModel":"未选择模型","studio.resident":"已加载","studio.notInstalled":"未安装","studio.available":"可用","studio.chooseInstalled":"选择已安装的模型","studio.notDownloaded":"未下载","studio.pathFound":"已找到路径","studio.pathMissing":"路径不存在","studio.pathUnknown":"尚未检查路径","studio.load":"加载模型","studio.unload":"卸载模型","studio.working":"处理中…","studio.bundledLoaded":"内置 · 已加载","request.label":"请求","request.title":"输入与控制","request.prompt":"提示词","request.text":"文本","request.splitLongText":"拆分并合并长文本","request.charactersPerChunk":"每段字符数","request.language":"语言","request.autoLanguage":"留空 = 自动","request.seed":"随机种子","request.randomSeed":"-1 = 随机","request.maxTokens":"最大令牌数","request.sourceAudio":"源音频","request.recordMicrophone":"录制麦克风","voice.quickStart":"快速开始演示音色","voice.useReference":"使用下方参考音频文件","voice.reference":"参考音色","voice.required":"必需","voice.optional":"可选","voice.referenceText":"参考文本","voice.transcript":"参考转录","voice.saved":"已保存音色","voice.browserOnly":"仅存储在此浏览器中","voice.chooseSaved":"选择已保存音色...","voice.libraryName":"库名称","voice.save":"保存音色","common.delete":"删除","common.cancel":"取消","common.close":"关闭","common.refresh":"刷新","common.browse":"浏览","common.apply":"应用","options.modelParameters":"模型参数","options.additional":"其他选项","run.run":"运行","run.cancel":"取消","run.working":"处理中…","result.title":"输出","result.label":"结果","result.saveWav":"保存 WAV","result.empty":"生成的音频和结构化结果将显示在这里。","models.eyebrow":"模型库","models.title":"本地软件包","models.subtitle":"无需离开原生界面即可下载和管理模型包。","models.folder":"模型文件夹","models.useDefault":"使用默认值","models.showTypes":"显示模型类型","models.stopDownload":"停止下载","models.cleanPartial":"清理部分下载","runtime.title":"会话日志","runtime.status":"状态","runtime.backend":"后端","runtime.registered":"已注册","runtime.resident":"已加载","runtime.noEvents":"暂无事件。","folder.title":"选择文件夹","folder.up":"上一级","folder.select":"选择此文件夹","common.applying":"正在应用…","common.disabled":"已禁用","common.enabled":"已启用","file.choose":"选择文件","file.none":"未选择文件","folder.closeLabel":"关闭文件夹浏览器","folder.empty":"此文件夹没有子文件夹。","folder.eyebrow":"模型文件夹","folder.loading":"正在加载...","folder.loadingFolders":"正在加载文件夹...","footer.embedded":"SvelteKit · 内置于 audiocpp_server","models.checkingSize":"正在检查大小…","models.default":"默认","models.downloaded":"已下载","models.folderHint":"用于下载、本地检测和模型加载","models.folderPlaceholder":"audiocpp_server 旁的 models 文件夹","models.hfAccess":"需要 HF 访问权限","models.model":"模型","models.queued":"排队中","models.reinstall":"重新安装","models.selected":"已选择","models.sharedPackage":"使用上方显示的共享 {name} 软件包。","models.sizeUnavailable":"大小不可用","models.stopping":"正在停止","models.update":"更新","models.updateAvailable":"有可用更新","models.upToDate":"已是最新","models.variants":"变体","models.versionUnknown":"版本未知","nav.primary":"主导航","nav.workflows":"音频工作流程","arena.eyebrow":"对比场","arena.title.tts":"TTS 对比","arena.title.vc":"语音转换对比","arena.title.asr":"ASR 对比","arena.subtitle":"用同一输入依次运行已选择的已安装模型和精度包,方便比较输出。","arena.subtitle.tts":"用同一文本依次运行已选择的 TTS 模型和精度包。","arena.subtitle.vc":"用同一源音频依次运行已选择的语音转换模型。","arena.subtitle.asr":"用同一源音频依次运行已选择的 ASR 模型并比较转录结果。","arena.mode.tts":"TTS","arena.mode.vc":"语音转换","arena.mode.asr":"ASR","arena.input.label":"输入","arena.input.title":"共享请求","arena.input.textPlaceholder":"输入一段文本,用于对比多个 TTS 模型","arena.input.groundTruth":"真实文本","arena.input.groundTruthPlaceholder":"粘贴期望转录文本以计算 WER","arena.shared":"共享","arena.voice.label":"声音","arena.voice.modelDefault":"模型默认","arena.voice.builtin":"内置演示声音","arena.voice.reference":"参考音频","arena.voice.builtinNote":"内置声音会作为 voice ID 传给每个模型。此声音来源不需要参考文本。","arena.voice.targetSpeaker":"目标说话人音频","arena.voice.clearTarget":"清除目标","arena.voice.clearReference":"清除参考","arena.options.shared":"共享选项","arena.queue.label":"队列","arena.queue.title":"模型","arena.queue.add":"添加","arena.queue.remove":"移除","arena.queue.clear":"清空","arena.queue.empty":"添加已安装模型或精度包进行对比。","arena.run":"运行对比","arena.package.label":"软件包","arena.package.configured":"已配置","arena.results.title":"比较输出","arena.results.empty":"暂无对比结果。","arena.metric.wall":"耗时","arena.metric.rtf":"RTF","arena.metric.wer":"WER","arena.itemStatus.queued":"排队中","arena.itemStatus.loading":"加载中","arena.itemStatus.running":"运行中","arena.itemStatus.done":"完成","arena.itemStatus.failed":"失败","arena.itemStatus.skipped":"跳过","arena.status.duplicate":"{model} {package} 已在对比队列中。","arena.status.loadingModel":"正在加载模型","arena.status.runningRequest":"正在运行请求","arena.status.addModel":"请至少添加一个模型到对比场。","arena.status.running":"正在运行 {mode} 对比...","arena.status.complete":"对比运行完成。","arena.note.skippedTargetVoice":"已跳过:此语音转换模型需要目标说话人音频。","arena.note.skippedReferenceText":"已跳过:此模型对所选声音输入需要参考文本。","arena.note.builtinVoice":"使用内置声音:{voice}。","arena.note.referenceVoice":"使用参考声音。","arena.note.referenceUnsupported":"使用模型默认声音;此模型不支持参考声音。","arena.note.defaultVoice":"使用默认声音:{voice}。","arena.note.skippedReferenceVoice":"已跳过:此模型需要参考声音。","arena.error.seed":"Seed 必须为 -1 或 0 到 4294967295 的无符号 32 位整数。","arena.error.jsonObject":"必须是对象","arena.error.invalidJson":"对比场选项 JSON 无效:{error}","arena.error.unregistered":"此服务器未注册已配置模型。","arena.error.notDownloaded":"{package} 未下载。","arena.error.loadFailed":"模型未加载。","arena.error.missingCatalog":"模型已不在目录中。","arena.error.enterTtsText":"请输入 TTS 对比文本。","arena.error.chooseAsrSource":"请选择 ASR 对比的源音频。","arena.error.chooseVcSource":"请选择语音转换对比的源音频。","arena.error.noAudio":"响应中没有音频。","request.alignmentText":"对齐文本","request.context":"上下文提示","request.contextHint":"可选术语或名称","request.duration":"持续时间(秒)","request.liveDescription":"使用模型的流式模式连续处理四秒请求。","request.liveTitle":"实时麦克风转录","request.lyrics":"歌词","request.optional":"可选","request.recordingMicrophone":"正在录制麦克风","request.soundPlaceholder":"描述声音或音乐…","request.startLive":"开始实时处理","request.stopLive":"停止实时处理","request.stopRecording":"停止录制","request.textPlaceholder":"输入文本…","request.voiceDescription":"音色描述","request.voiceDescriptionPlaceholder":"温暖、平静且语速适中的声音…","result.track":"音轨","result.tracks":"音轨","runtime.eyebrow":"运行环境","runtime.subtitle":"浏览器端生命周期和请求事件。","status.ready":"就绪","studio.estimatedVram":"预计 VRAM:{value} GB","studio.vram":"VRAM —","task.align":"强制对齐","task.asr":"语音转录","task.clon":"声音克隆","task.diar":"说话人分离","task.gen":"音乐生成","task.s2s":"语音编辑","task.sep":"音源分离","task.svc":"歌声音色转换","task.tts":"文本转语音","task.vad":"语音活动检测","task.vc":"语音转换","task.vdes":"音色设计","voice.bundledNote":"内置参考音频及其匹配转录将自动提供。","voice.namePlaceholder":"我的参考音色","voice.recommendedClone":"建议用于克隆","voice.recording":"正在录制参考音色","voice.requiredClone":"此声音克隆必需","voice.transcriptPlaceholder":"输入参考音频中的准确文字,或加载上方匹配的 .txt 文件。"}},Cm={"app.nativeStudio":"Native Studio","nav.apps":"Apps","nav.studio":"Studio","nav.arena":"Arena","nav.library":"Lib","nav.models":"Models","nav.runtime":"Runtime","nav.configuration":"Configuration","nav.primary":"Primary navigation","nav.workflows":"Audio workflows","language.label":"Interface language","theme.label":"Theme","theme.system":"System","theme.dark":"Dark","theme.mocha":"Catppuccin Mocha","theme.light":"Light","theme.paper":"Paper","arena.eyebrow":"ARENA","arena.title.tts":"TTS comparison","arena.title.vc":"Voice conversion comparison","arena.title.asr":"ASR comparison","arena.subtitle":"Run the same input through selected installed models and package variants, one after another.","arena.subtitle.tts":"Run the same text through selected TTS models and package variants.","arena.subtitle.vc":"Run the same source audio through selected voice conversion models.","arena.subtitle.asr":"Run the same source audio through selected ASR models and compare transcripts.","arena.mode.tts":"TTS","arena.mode.vc":"Voice conversion","arena.mode.asr":"ASR","arena.input.label":"Input","arena.input.title":"Shared request","arena.input.textPlaceholder":"Enter one prompt to compare across TTS models","arena.input.groundTruth":"Ground truth text","arena.input.groundTruthPlaceholder":"Paste the expected transcript to calculate WER","arena.shared":"shared","arena.voice.label":"Voice","arena.voice.modelDefault":"Model default","arena.voice.builtin":"Built-in demo voice","arena.voice.reference":"Reference audio","arena.voice.builtinNote":"Built-in voices are passed as voice IDs for each model. Reference text is not required for this voice source.","arena.voice.targetSpeaker":"Target speaker audio","arena.voice.clearTarget":"Clear target","arena.voice.clearReference":"Clear reference","arena.options.shared":"Shared options","arena.queue.label":"Queue","arena.queue.title":"Models","arena.queue.add":"Add","arena.queue.remove":"Remove","arena.queue.clear":"Clear","arena.queue.empty":"Add installed models or dtype packages to compare.","arena.run":"Run arena","arena.package.label":"Package","arena.package.configured":"Configured","arena.results.title":"Compare outputs","arena.results.orderSelection":"Order: selection order","arena.results.orderRtf":"Order: RTF, lowest first · completed results first","arena.results.empty":"No arena results yet.","arena.metric.wall":"wall","arena.metric.rtf":"rtf","arena.metric.wer":"wer","arena.itemStatus.queued":"queued","arena.itemStatus.loading":"loading","arena.itemStatus.running":"running","arena.itemStatus.done":"done","arena.itemStatus.failed":"failed","arena.itemStatus.skipped":"skipped","arena.status.duplicate":"{model} {package} is already in the arena.","arena.status.loadingModel":"Loading model","arena.status.runningRequest":"Running request","arena.status.addModel":"Add at least one model to the arena.","arena.status.running":"Running {mode} arena...","arena.status.complete":"Arena run complete.","arena.note.skippedTargetVoice":"Skipped because this VC model requires target speaker audio.","arena.note.skippedReferenceText":"Skipped because this model requires reference text for the selected voice input.","arena.note.builtinVoice":"Used built-in voice: {voice}.","arena.note.referenceVoice":"Used reference voice.","arena.note.referenceUnsupported":"Used default voice; reference voice is not supported.","arena.note.defaultVoice":"Used default voice: {voice}.","arena.note.skippedReferenceVoice":"Skipped because this model requires a reference voice.","arena.error.seed":"Seed must be -1 or an unsigned 32-bit integer (0 to 4294967295).","arena.error.jsonObject":"must be an object","arena.error.invalidJson":"Arena options JSON is invalid: {error}","arena.error.unregistered":"Configured model is not registered by this server.","arena.error.notDownloaded":"{package} is not downloaded.","arena.error.loadFailed":"Model did not load.","arena.error.missingCatalog":"Model is no longer in the catalog.","arena.error.enterTtsText":"Enter text for the TTS arena.","arena.error.chooseAsrSource":"Choose source audio for the ASR arena.","arena.error.chooseVcSource":"Choose source audio for the VC arena.","arena.error.noAudio":"Response did not include audio.","workflow.tts":"Text to speech","workflow.asr":"ASR / Transcription","workflow.music":"Music / video generation","workflow.vc":"Voice Conversion / S2S","workflow.enhancement":"Enhancement / denoising","models.tools":"tools","workflow.sep":"Source separation","workflow.analysis":"Audio analysis","workflow.design":"Voice design","task.tts":"Text to speech","task.clon":"Voice cloning","task.asr":"Transcription","task.gen":"Music generation","task.midi":"Audio to MIDI","task.vc":"Voice conversion","task.svc":"Singing voice conversion","task.s2s":"Speech editing","task.sep":"Source separation","task.vad":"Voice activity","task.diar":"Speaker diarization","task.align":"Forced alignment","task.vdes":"Voice design","task.wake":"Wake-word detection","task.cls":"Audio classification","studio.eyebrow":"LOCAL AUDIO INTELLIGENCE","studio.title":"Audio studio","studio.subtitle.tts":"Generate natural speech from text, with voice presets and cloning when supported.","studio.subtitle.asr":"Transcribe spoken audio into text, with language and timestamp controls when supported.","studio.subtitle.music":"Create music and sound from a prompt, lyrics, or reference audio when supported.","studio.subtitle.vc":"Convert spoken or sung voices, or get a spoken reply to audio input.","studio.subtitle.sep":"Split a recording into vocals, instruments, or other available audio stems.","studio.subtitle.analysis":"Analyze audio for speech activity, speakers, timing, and alignment.","studio.subtitle.enhancement":"Enhance audio, remove background noise, or restore bandwidth.","studio.subtitle.design":"Create or refine a voice from a written description and supported reference controls.","studio.model":"Model","studio.noModel":"No model selected","studio.resident":"Resident","studio.notInstalled":"Not installed","studio.available":"Available","studio.chooseInstalled":"Choose an installed model","studio.notDownloaded":"not downloaded","studio.pathFound":"Path found","studio.pathMissing":"Path missing","studio.pathUnknown":"Path not inspected","studio.estimatedVram":"{value} GB estimated VRAM","studio.vram":"VRAM —","studio.load":"Load model","studio.unload":"Unload model","studio.working":"Working…","studio.bundledLoaded":"Bundled · loaded","request.label":"REQUEST","request.title":"Input & controls","request.prompt":"Prompt","request.alignmentText":"Alignment text","request.text":"Text","request.soundPlaceholder":"Describe the sound or music…","request.textPlaceholder":"Enter the text…","request.splitLongText":"Split and merge long text","request.charactersPerChunk":"Characters per chunk","request.lyrics":"Lyrics","request.optional":"optional","request.context":"Context prompt","request.contextHint":"optional terminology or names","request.voiceDescription":"Voice description","request.voiceDescriptionPlaceholder":"A warm, calm voice with measured pacing…","request.language":"Language","request.autoLanguage":"blank = auto","request.seed":"Seed","request.randomSeed":"-1 = random","request.maxTokens":"Maximum tokens","request.duration":"Duration seconds","request.autoDuration":"-1 = auto","request.rewriteCaption":"Rewrite caption","request.rewritingCaption":"Rewriting caption...","request.minimaxFrames":"{frames} aligned output frames","request.sourceAudio":"Source audio","request.stopRecording":"Stop recording","request.recordingMicrophone":"Recording microphone","request.recordMicrophone":"Record microphone","request.liveTitle":"Live microphone transcription","request.liveDescription":"Processes consecutive four-second requests using the model's streaming mode.","request.stopLive":"Stop live","request.startLive":"Start live","voice.quickStart":"Quick-start voice presets (demo voices)","voice.configured":"Configured voices","voice.useReference":"Use a reference audio file below","voice.bundledNote":"The bundled reference audio and its matching transcript are supplied automatically.","voice.reference":"Reference voice","voice.required":"required","voice.optional":"optional","voice.referenceText":"Reference text","voice.recording":"Recording voice reference","voice.transcript":"Reference transcript","voice.requiredClone":"required for this voice clone","voice.recommendedClone":"recommended for cloning","voice.transcriptPlaceholder":"Type the exact words spoken in the reference audio, or load a matching .txt file above.","voice.saved":"Saved voices","voice.browserOnly":"stored only in this browser","voice.chooseSaved":"Choose a saved voice...","voice.libraryName":"Library name","voice.namePlaceholder":"My reference voice","voice.save":"Save voice","voice.clearReference":"Clear reference","voice.preset":"Voice preset","voice.speakerReferences":"Speaker references","voice.upToFour":"optional, up to 4","voice.speaker":"Speaker {number}","voice.dialoguePlaceholder":"[S1] Words spoken in Speaker 1's reference. [S2] Words spoken in Speaker 2's reference.","settings.load":"Load settings JSON","settings.save":"Save settings JSON","history.title":"Run history (Experimental)","history.clear":"Clear history","history.deleteRun":"Delete generation {id}","history.wrongModel":"Cannot open history for {label}: the current model is {model}.","history.wait":"Wait for the current request or settings restore to finish.","configuration.history":"Run History","configuration.historyLimit":"Maximum retained runs","configuration.save":"Save configuration","configuration.saved":"Configuration saved.","studio.weightsPath":"Weights path on server","studio.downloadWeights":"Download SafeTensors weights","studio.format":"Model format","studio.configured":"Configured","studio.serverConfigured":"Configured by server config","studio.loadPackage":"Load {package}","studio.unloadPackage":"Unload {package}","studio.packageNotDownloaded":"{package} is not downloaded","run.chooseModel":"Choose an installed model first","run.installModel":"Install this model from the Models tab first","run.elapsed":"Elapsed generation time","result.saveArtifact":"Save {format}","result.videoPreview":"Video preview","common.delete":"Delete","common.enabled":"Enabled","common.disabled":"Disabled","common.cancel":"Cancel","common.close":"Close","common.refresh":"Refresh","common.browse":"Browse","common.apply":"Apply","common.applying":"Applying…","file.choose":"Choose file","file.none":"No file chosen","file.preview":"Preview","file.clear":"Clear file","options.modelParameters":"Model parameters","options.additional":"Additional options","param.minimax_h3.num_inference_steps.label":"Denoising steps","param.minimax_h3.num_inference_steps.info":"Twelve denoising steps provide a practical quality and performance balance.","param.minimax_h3.num_frames.label":"Output frames","param.minimax_h3.num_frames.info":"Calculated from duration at approximately 24 frames per output second. Editing frames also updates duration.","param.minimax_h3.guidance_scale.label":"Guidance scale","param.minimax_h3.sampler.label":"Sampler","param.minimax_h3.dit_acceleration.label":"DiT acceleration","param.minimax_h3.dit_acceleration.info":"None uses the quality-first full-DiT path. Acceleration modes are experimental and may distort some outputs.","param.minimax_h3.return_video.label":"Decode video","param.minimax_h3.return_video.info":"Disabled by default to reduce memory use and return audio only.","model.minimax_h3.hint":"MiniMax-H3 uses a joint audio/video DiT. GGUF Q4 is the quality-first choice; CUDA-only GGUF Q4 ConvRot uses slightly more VRAM for higher speed. The default full-DiT path prioritizes audio quality and video decoding is disabled.","run.run":"Run","run.cancel":"Cancel","run.working":"Working…","result.label":"RESULT","result.title":"Output","result.track":"track","result.tracks":"tracks","result.saveWav":"Save WAV","result.empty":"Generated audio and structured results appear here.","models.eyebrow":"MODEL LIBRARY","models.title":"Local packages","models.subtitle":"Download and manage model packages without leaving the native interface.","models.folder":"Models folder","models.folderHint":"downloads, local detection, and model loading","models.folderPlaceholder":"models folder beside audiocpp_server","models.default":"Default","models.useDefault":"Use default","models.showTypes":"Show model types","models.model":"model","models.variants":"variants","models.update":"Update","models.reinstall":"Reinstall","models.upToDate":"Up to date","models.updateAvailable":"Update available","models.versionUnknown":"Version unknown","models.selected":"Selected","models.downloaded":"Downloaded","models.queued":"queued","models.stopping":"stopping","models.checkingSize":"checking size…","models.hfAccess":"HF access required","models.sizeUnavailable":"size unavailable","models.stopDownload":"Stop download","models.cleanPartial":"Clean partial download","models.sharedPackage":"Uses the shared {name} package shown above.","runtime.eyebrow":"RUNTIME","runtime.title":"Session log","runtime.subtitle":"Browser-side lifecycle and request events.","runtime.status":"Status","runtime.backend":"Backend","runtime.registered":"Registered","runtime.resident":"Resident","runtime.noEvents":"No events yet.","runtime.serverLogNotice":"This panel shows UI events, not server logs. Add --log --log-file server.log to your server startup command, then open server.log on the server machine.","status.ready":"Ready","status.modelReady":"{model} is resident and ready.","status.runningTask":"Running {task}...","status.completeIn":"Complete in {seconds}s.","status.packageAvailable":"{model} will use {format}. It is available in Studio.","folder.eyebrow":"MODELS FOLDER","folder.title":"Choose a folder","folder.closeLabel":"Close folder browser","folder.loading":"Loading...","folder.up":"Up one level","folder.loadingFolders":"Loading folders...","folder.empty":"This folder has no subfolders.","folder.select":"Select this folder","footer.embedded":"SvelteKit · embedded in audiocpp_server"},rq=Object.assign({"../../lang/lang_it.json":eq,"../../lang/lang_ja.json":tq,"../../lang/lang_pl.json":aq,"../../lang/lang_ru.json":iq,"../../lang/lang_vi.json":nq,"../../lang/lang_zh.json":sq}),gf=new Map([["en",Cm]]),_b=[{code:"en",name:"English"}];for(const[a,t]of Object.entries(rq).sort(([i],[n])=>i.localeCompare(n))){const i=a.match(/lang_([^/\\.]+)\.json$/)?.[1]?.toLowerCase(),n=(t.code||i||"").trim().toLowerCase();!n||n==="en"||!t.name||!t.translations||(gf.set(n,t.translations),_b.push({code:n,name:t.name}))}const oq=_b;function vb(a){const t=gf.get(a)||Cm;return(i,n={},s=i)=>{let r=t[i]||Cm[i]||s;for(const[o,l]of Object.entries(n))r=r.replaceAll(`{${o}}`,String(l));return r}}function bb(a){for(const t of a){const i=t.toLowerCase();if(gf.has(i))return i;const n=i.split("-")[0];if(gf.has(n))return n}return"en"}var lq=ae(' '),cq=ae('',2),dq=ae(''),uq=ae('
');function ss(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y();let r=Se(t,"file",8,null),o=Se(t,"src",8,""),l=Se(t,"name",8,""),c=Se(t,"kind",8,"audio"),d=Se(t,"label",8,"Preview"),g=Y(""),h=Y(null),m=Y("");function p(){e(g)&&(URL.revokeObjectURL(e(g)),y(g,""))}fr(p),Ue(()=>(Q(r()),e(h)),()=>{r()!==e(h)&&(p(),y(h,r()),r()&&y(g,URL.createObjectURL(r())))}),Ue(()=>(e(g),Q(o())),()=>{y(i,e(g)||o())}),Ue(()=>(e(i),e(m)),()=>{y(n,!!e(i)&&e(m)===e(i))}),Ue(()=>(Q(r()),Q(l())),()=>{y(s,r()?.name||l())}),wn(),Zi();var u=ys(),f=ht(u);{var _=v=>{var b=uq(),S=k(b),$=k(S),M=k($,!0);w($);var N=q($,2);{var P=A=>{var B=lq(),H=k(B,!0);w(B),ie(()=>W(H,e(s))),J(A,B)};ve(N,A=>{e(s)&&A(P)})}w(S);var C=q(S,2);{var j=A=>{var B=cq();ie(()=>_e(B,"src",e(i))),re("error",B,()=>y(m,e(i))),J(A,B)},G=A=>{var B=dq();ie(()=>_e(B,"src",e(i))),re("error",B,()=>y(m,e(i))),J(A,B)};ve(C,A=>{c()==="video"?A(j):A(G,-1)})}w(b),ie(()=>W(M,d())),J(v,b)};ve(f,v=>{e(i)&&!e(n)&&v(_)})}J(a,u),Mi()}var fq=ae('
LoRA adapter
');function Am(a,t){let i=Se(t,"selected",8,0);var n=fq(),s=k(n),r=k(s);SS(r,{size:16});var o=q(r,2),l=k(o,!0);w(o),w(s);var c=q(s,2),d=k(c);q4(d,t,"default",{}),w(c),w(n),ie(()=>W(l,i()>1?`${i()} selected`:i()?"Selected":"None")),J(a,n)}var yb=ae(" "),pq=ae('

',1);function mq(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y();let r=Se(t,"specs",8),o=Se(t,"values",8),l=Se(t,"editable",8,!1),c=Se(t,"busy",8,!1),d=Se(t,"onChange",8),g=Se(t,"onBrowse",8);Ue(()=>Q(r()),()=>{y(i,r().find(u=>u.name==="lora"))}),Ue(()=>Q(r()),()=>{y(n,r().find(u=>u.name==="lora_scale"))}),Ue(()=>Q(o()),()=>{y(s,String(o().lora??"").trim())}),wn(),Zi();var h=ys(),m=ht(h);{var p=u=>{{let f=Nt(()=>e(s)?1:0);Am(u,{get selected(){return e(f)},children:(_,v)=>{var b=pq(),S=ht(b),$=k(S,!0);w(S);var M=q(S,2),N=k(M),P=q(k(N),2),C=k(P);Pt(C);var j=q(C,2);w(P),w(N);var G=q(N,2),A=q(k(G),2);Pt(A),w(G),w(M);var B=q(M,2);{var H=V=>{var L=yb(),T=k(L,!0);w(L),ie(()=>W(T,(e(i),x(()=>e(i).info)))),J(V,L)};ve(B,V=>{e(i),x(()=>e(i).info)&&V(H)})}var U=q(B,2);{var E=V=>{var L=yb(),T=k(L,!0);w(L),ie(()=>W(T,(e(n),x(()=>e(n).info)))),J(V,L)};ve(U,V=>{e(n),x(()=>e(n).info)&&V(E)})}var O=q(U,2);ie((V,L)=>{W($,l()?"Applied when the model loads. Reload or generate to apply changes.":"Managed by the server configuration. Set the adapter and strength in its session options."),bi(C,V),C.disabled=c()||!l(),j.disabled=c()||!l(),_e(A,"step",(e(n),x(()=>e(n).step))),_e(A,"min",(e(n),x(()=>e(n).minimum))),_e(A,"max",(e(n),x(()=>e(n).maximum))),bi(A,L),A.disabled=c()||!l()||!e(s),O.disabled=c()||!l()||!e(s)},[()=>(Q(o()),x(()=>String(o().lora??""))),()=>(Q(o()),x(()=>String(o().lora_scale??"")))]),re("input",C,V=>d()(e(i),V.currentTarget.value.trim())),re("click",j,()=>g()(e(i))),re("input",A,V=>{V.currentTarget.value===""?d()(e(n),""):Number.isFinite(V.currentTarget.valueAsNumber)&&d()(e(n),V.currentTarget.valueAsNumber)}),re("click",O,()=>{d()(e(i),""),d()(e(n),e(n).default??"")}),J(_,b)},$$slots:{default:!0}})}};ve(m,u=>{e(i)&&e(n)&&u(p)})}J(a,h),Mi()}var hf=ae(""),wb=ae(""),gq=ae(" ",1);function kb(a,t){Fi(t,!1);let i=Se(t,"id",8),n=Se(t,"value",8,""),s=Se(t,"presets",24,()=>[]),r=Se(t,"savedVoices",24,()=>[]),o=Se(t,"presetLabel",8),l=Se(t,"emptyLabel",8),c=Se(t,"allowEmpty",8,!0),d=Se(t,"referenceOption",8,!1),g=Se(t,"disabled",8,!1),h=Se(t,"tr",8),m=Se(t,"onselect",8);Zi();var p=gq(),u=ht(p),f=k(u,!0);w(u);var _=q(u,2),v=k(_);{var b=G=>{var A=hf(),B=k(A,!0);w(A),A.value=A.__value="",ie(()=>W(B,l())),J(G,A)};ve(v,G=>{c()&&G(b)})}var S=q(v);{var $=G=>{var A=hf(),B=k(A,!0);w(A),A.value=A.__value="reference",ie(H=>W(B,H),[()=>(Q(h()),x(()=>h()("arena.voice.reference")))]),J(G,A)};ve(S,G=>{d()&&G($)})}var M=q(S);{var N=G=>{var A=wb();Ct(A,5,s,Qt,(B,H)=>{var U=hf(),E=k(U,!0);w(U);var O={};ie(()=>{W(E,e(H)),O!==(O=`preset:${e(H)}`)&&(U.value=U.__value=`preset:${e(H)}`)}),J(B,U)}),w(A),ie(()=>_e(A,"label",o())),J(G,A)};ve(M,G=>{Q(s()),x(()=>s().length)&&G(N)})}var P=q(M);{var C=G=>{var A=wb();Ct(A,5,r,Qt,(B,H)=>{var U=hf(),E=k(U,!0);w(U);var O={};ie(()=>{W(E,(e(H),x(()=>e(H).name))),O!==(O=(e(H),x(()=>`saved:${e(H).id}`)))&&(U.value=(U.__value=(e(H),x(()=>`saved:${e(H).id}`)))??"")}),J(B,U)}),w(A),ie(B=>_e(A,"label",B),[()=>(Q(h()),x(()=>h()("voice.saved")))]),J(G,A)};ve(P,G=>{Q(r()),x(()=>r().length)&&G(C)})}w(_);var j;Nn(_),ie(G=>{_e(u,"for",i()),W(f,G),_e(_,"id",i()),_.disabled=g(),j!==(j=n())&&(_.value=(_.__value=n())??"",kn(_,n()))},[()=>(Q(h()),x(()=>h()("arena.voice.label")))]),re("change",_,G=>m()(G.currentTarget.value)),J(a,p),Mi()}const hq=/^\s*(Speaker\s+\d+\s*:)\s*(.*)$/i,xb=new Set(["。","!","?","!","?",";",";","…","."]),_q=new Set(["mr","mrs","ms","dr","prof","sr","jr","st","mt","rev","hon","vs","etc","eg","ie","approx","dept","est","fig","no","vol","jan","feb","mar","apr","jun","jul","aug","sep","sept","oct","nov","dec","inc","ltd","co","corp"]);function Sb(a){return a>="0"&&a<="9"}function vq(a){return/[\p{L}\p{N}']/u.test(a)}function bq(a,t){const i=a[t+1];if(i!==void 0&&!/\s/.test(i)||t>0&&Sb(a[t-1])&&i!==void 0&&Sb(i))return!1;let n=t;for(;n>0&&vq(a[n-1]);)n-=1;const s=a.slice(n,t);return s.length===1&&/\p{L}/u.test(s)?!1:!_q.has(s.toLowerCase())}function yq(a){const t=[];let i=0;for(let n=0;nt;){let s=n.lastIndexOf(" ",t);s<=0&&(s=t);const r=n.slice(0,s).trim();r&&i.push(r),n=n.slice(s).trim()}return n&&i.push(n),i}function kq(a,t){const i=hq.exec(a),n=i?`${i[1]} `:"",s=i?i[2]:a.trim(),r=Math.max(1,t-n.length),o=yq(s);o.length||o.push(s);const l=[];let c="",d="";for(const g of o){const h=g.trimEnd();if(!h)continue;const m=g.slice(h.length);if(c&&c.length+d.length+h.length>r&&(l.push(n+c.trim()),c="",d=""),h.length<=r){c=c?`${c}${d}${h}`:h,d=m;continue}c&&(l.push(n+c.trim()),c="",d="");for(const p of wq(h,r))l.push(n+p)}return c&&l.push(n+c.trim()),l.length?l:[a]}function _f(a,t){const i=[];for(const o of a.split(/\r?\n/))o.trim()&&i.push(...o.length>t?kq(o,t):[o]);const n=[];let s=[],r=0;for(const o of i){const l=s.length?1:0;s.length&&r+l+o.length>t&&(n.push(s.join(` `)),s=[],r=0),s.push(o),r+=(s.length>1?1:0)+o.length}return s.length&&n.push(s.join(` -`)),n.length?n:a.trim()?[a]:[]}function Gm(a){return a==="vibevoice"?600:a==="voxcpm2"?60:1e3}const Tb="audiocpp.ui.theme",xq=[{id:"mocha",label:"Catppuccin Mocha"},{id:"system",label:"System"},{id:"dark",label:"Dark"},{id:"light",label:"Light"},{id:"paper",label:"Paper"}];function $b(a){return a==="dark"||a==="light"||a==="system"||a==="mocha"||a==="paper"?a:"mocha"}function Sq(a,t){return a!=="system"?a:t?"dark":"light"}var qb=ae(""),vf=ae(' '),Tq=ae('
'),$q=ae('
'),qq=ae('
'),Cq=ae(''),Aq=ae(""),Gq=ae('
'),Fq=ae(''),Mq=ae('
'),zq=ae('
Components
Sampling and memory
');function Eq(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y();let l=xe(t,"task",8,"tts"),c=xe(t,"busy",8,!1),d=xe(t,"paramSpecs",24,()=>[]),g=xe(t,"advancedValues",24,()=>({})),h=xe(t,"tr",8,(O,V,D=O)=>D),m=xe(t,"localizedParameterText",8,(O,V)=>V==="label"?O.name:""),p=xe(t,"setParameterValue",8,()=>{});const u=["model_gguf","qwen_gguf","vae_gguf"],f=["num_inference_steps","guidance_scale","sway_sampling_coef"],_=["attention","mem_saver"];function b(O){return O.map(V=>d().find(D=>D.name===V)).filter(V=>V!==void 0)}Ee(()=>{},()=>{y(i,b(u))}),Ee(()=>{},()=>{y(n,b(f))}),Ee(()=>{},()=>{y(s,b(_))}),Ee(()=>K(g()),()=>{y(r,String(g().model_gguf||"auk-base-f32.gguf"))}),Ee(()=>e(r),()=>{y(o,e(r).startsWith("auk-flash-")?"AuK-Flash":"Base")}),kn(),Xi();var v=zq(),T=k(v),S=q(k(T),2),M=k(S,!0);w(S),w(T);var P=q(T,2);Ct(P,5,()=>e(i),Kt,(O,V)=>{var D=Tq(),$=k(D),F=k($,!0);w($);var z=q($,2);Ct(z,5,()=>(e(V),x(()=>e(V).choices||[])),Kt,(oe,fe)=>{var le=qb(),ge=k(le,!0);w(le);var R={};ie(()=>{W(ge,e(fe)),R!==(R=e(fe))&&(le.value=(le.__value=e(fe))??"")}),J(oe,le)}),w(z);var L;On(z);var Q=q(z,2);{var Z=oe=>{var fe=vf(),le=k(fe,!0);w(fe),ie(ge=>W(le,ge),[()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"info",h())))]),J(oe,fe)},ee=La(()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"info",h()))));ve(Q,oe=>{e(ee)&&oe(Z)})}w(D),ie((oe,fe)=>{_e($,"for",(e(V),x(()=>"auk-param-"+e(V).name))),W(F,oe),_e(z,"id",(e(V),x(()=>"auk-param-"+e(V).name))),z.disabled=c(),L!==(L=fe)&&(z.value=(z.__value=fe)??"",xn(z,fe))},[()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"label",h()))),()=>(K(g()),e(V),x(()=>String(g()[e(V).name]??e(V).default??"")))]),re("change",z,oe=>p()(e(V),oe.currentTarget.value)),J(O,D)}),w(P);var B=q(P,2),C=k(B);{var j=O=>{var V=ys(),D=ht(V);Ct(D,1,()=>x(()=>b(["instruct"])),Kt,($,F)=>{var z=$q(),L=k(z),Q=k(L),Z=q(Q),ee=k(Z,!0);w(Z),w(L);var oe=q(L,2);rn(oe);var fe=q(oe,2);{var le=R=>{var we=vf(),ce=k(we,!0);w(we),ie(Te=>W(ce,Te),[()=>(K(m()),e(F),K(h()),x(()=>m()(e(F),"info",h())))]),J(R,we)},ge=La(()=>(K(m()),e(F),K(h()),x(()=>m()(e(F),"info",h()))));ve(fe,R=>{e(ge)&&R(le)})}w(z),ie((R,we,ce,Te)=>{W(Q,`${R??""} `),W(ee,we),oe.disabled=c(),bi(oe,ce),_e(oe,"placeholder",Te)},[()=>(K(m()),e(F),K(h()),x(()=>m()(e(F),"label",h()))),()=>(K(h()),x(()=>h()("request.optional"))),()=>(K(g()),x(()=>String(g().instruct??""))),()=>(K(m()),e(F),K(h()),x(()=>m()(e(F),"placeholder",h())))]),re("input",oe,R=>p()(e(F),R.currentTarget.value)),J($,z)}),J(O,V)};ve(C,O=>{l()==="tts"&&O(j)})}var G=q(C,2);Ct(G,1,()=>x(()=>b(["duration_sec"])),Kt,(O,V)=>{var D=qq(),$=k(D),F=k($),z=q(F),L=k(z,!0);w(z),w($);var Q=q($,2);Pt(Q);var Z=q(Q,2);{var ee=fe=>{var le=vf(),ge=k(le,!0);w(le),ie(R=>W(ge,R),[()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"info",h())))]),J(fe,le)},oe=La(()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"info",h()))));ve(Z,fe=>{e(oe)&&fe(ee)})}w(D),ie((fe,le,ge,R)=>{W(F,`${fe??""} `),W(L,le),Q.disabled=c(),_e(Q,"min",(e(V),x(()=>e(V).minimum))),_e(Q,"max",(e(V),x(()=>e(V).maximum))),_e(Q,"step",(e(V),x(()=>e(V).step))),bi(Q,ge),_e(Q,"placeholder",R)},[()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"label",h()))),()=>(K(h()),x(()=>h()("request.optional"))),()=>(K(g()),x(()=>String(g().duration_sec??""))),()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"placeholder",h())))]),re("input",Q,fe=>p()(e(V),fe.currentTarget.value===""?"":fe.currentTarget.valueAsNumber)),J(O,D)}),w(B);var A=q(B,2),N=k(A),H=q(k(N)),E=k(H,!0);w(H),w(N);var U=q(N,2);Ct(U,5,()=>(e(n),e(s),x(()=>[...e(n),...e(s)])),Kt,(O,V)=>{var D=Mq(),$=k(D),F=k($,!0);w($);var z=q($,2);{var L=ge=>{var R=Cq(),we=k(R);Pt(we);var ce=q(we,3,!0);w(R),ie((Te,he)=>{_e(we,"id",(e(V),x(()=>"auk-param-"+e(V).name))),we.disabled=c(),zl(we,Te),W(ce,he)},[()=>(K(g()),e(V),x(()=>!!g()[e(V).name])),()=>(K(g()),e(V),K(h()),x(()=>g()[e(V).name]?h()("common.enabled"):h()("common.disabled")))]),re("change",we,Te=>p()(e(V),Te.currentTarget.checked)),J(ge,R)},Q=ge=>{var R=Aq();Ct(R,5,()=>(e(V),x(()=>e(V).choices||[])),Kt,(ce,Te)=>{var he=qb(),je=k(he,!0);w(he);var Le={};ie(()=>{W(je,e(Te)),Le!==(Le=e(Te))&&(he.value=(he.__value=e(Te))??"")}),J(ce,he)}),w(R);var we;On(R),ie(ce=>{_e(R,"id",(e(V),x(()=>"auk-param-"+e(V).name))),R.disabled=c(),we!==(we=ce)&&(R.value=(R.__value=ce)??"",xn(R,ce))},[()=>(K(g()),e(V),x(()=>String(g()[e(V).name]??e(V).default??"")))]),re("change",R,ce=>p()(e(V),ce.currentTarget.value)),J(ge,R)},Z=ge=>{var R=Gq(),we=k(R);Pt(we);var ce=q(we,2),Te=k(ce,!0);w(ce),w(R),ie((he,je)=>{_e(we,"id",(e(V),x(()=>"auk-param-"+e(V).name))),we.disabled=c(),_e(we,"min",(e(V),x(()=>e(V).minimum))),_e(we,"max",(e(V),x(()=>e(V).maximum))),_e(we,"step",(e(V),x(()=>e(V).step))),bi(we,he),W(Te,je)},[()=>(K(g()),e(V),x(()=>Number(g()[e(V).name]??e(V).default))),()=>(K(g()),e(V),x(()=>String(g()[e(V).name])))]),re("input",we,he=>p()(e(V),he.currentTarget.valueAsNumber)),J(ge,R)},ee=ge=>{var R=Fq();Pt(R),ie(we=>{_e(R,"id",(e(V),x(()=>"auk-param-"+e(V).name))),R.disabled=c(),_e(R,"min",(e(V),x(()=>e(V).minimum))),_e(R,"max",(e(V),x(()=>e(V).maximum))),_e(R,"step",(e(V),x(()=>e(V).step))),bi(R,we)},[()=>(K(g()),e(V),x(()=>String(g()[e(V).name]??"")))]),re("input",R,we=>p()(e(V),we.currentTarget.valueAsNumber)),J(ge,R)};ve(z,ge=>{e(V),x(()=>e(V).type==="bool")?ge(L):(e(V),x(()=>e(V).type==="choice")?ge(Q,1):(e(V),x(()=>e(V).type==="slider")?ge(Z,2):ge(ee,-1)))})}var oe=q(z,2);{var fe=ge=>{var R=vf(),we=k(R,!0);w(R),ie(ce=>W(we,ce),[()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"info",h())))]),J(ge,R)},le=La(()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"info",h()))));ve(oe,ge=>{e(le)&&ge(fe)})}w(D),ie(ge=>{_e($,"for",(e(V),x(()=>"auk-param-"+e(V).name))),W(F,ge)},[()=>(K(m()),e(V),K(h()),x(()=>m()(e(V),"label",h())))]),J(O,D)}),w(U),w(A),w(v),ie(()=>{W(M,e(o)),W(E,(e(n),e(s),x(()=>e(n).length+e(s).length)))}),J(a,v),Ei()}const Xo=Tl({modelId:"",turns:[]});let Uq=1;const Rq={subscribe:Xo.subscribe};function Fm(a){a.questionUrl&&URL.revokeObjectURL(a.questionUrl),a.replyUrl&&URL.revokeObjectURL(a.replyUrl),a.questionUrl="",a.replyUrl=""}function Bq(){for(const a of Fu(Xo).turns)Fm(a);Xo.set({modelId:"",turns:[]})}function Cb(a){return a.filter(t=>t.state==="done"&&t.reply&&!t.leftOut)}function Pq(a,t,i){const n=Fu(Xo),s=n.turns.filter(l=>l.state!=="failed"&&l.state!=="stopped");for(const l of n.turns)s.includes(l)||Fm(l);const r=s.length>0&&n.modelId!==a,o={key:Uq++,state:t,seed:i,questionPath:"",questionUrl:"",replyText:"",replyUrl:"",reply:null,cut:!1,steps:"",leftOut:!1,live:!0,firstAudioMs:null,message:""};return Xo.set({modelId:r?n.modelId:a,turns:[...s,o]}),{turn:o,history:r?[]:Cb(s)}}function Ol(a,t){Object.assign(a,t),Xo.update(i=>i)}function jq(a,t,i){Object.assign(t,i,{state:"done"});const n=Fu(Xo),s=n.modelId!==a;if(s)for(const r of n.turns)r!==t&&Fm(r);return Xo.set(s?{modelId:a,turns:[t]}:n),s}function Ab(a){const t=atob(a),i=new Uint8Array(t.length);for(let n=0;nString.fromCharCode(a[l],a[l+1],a[l+2],a[l+3]);if(a.length<12||i(0)!=="RIFF"||i(8)!=="WAVE")throw new Error("The reply audio is not a WAV file.");let n=0,s=0,r=0,o=0;for(let l=12;l+8<=a.length;){const c=i(l),d=t.getUint32(l+4,!0),g=l+8;if(c==="fmt "&&g+16<=a.length)n=t.getUint16(g,!0),s=t.getUint16(g+2,!0),r=t.getUint32(g+4,!0),o=t.getUint16(g+14,!0);else if(c==="data"){if(n!==1||o!==16||s<1||r<1)throw new Error("The reply audio is not 16-bit PCM.");const h=Math.floor(Math.min(d,a.length-g)/(2*s)),m=new Float32Array(h);for(let p=0;p{};beginTurn(t){if(this.open=!0,this.stop(),this.enabled=t,this.lead=.15,!!t){if(!this.context)try{this.context=new AudioContext({sampleRate:24e3,latencyHint:"interactive"})}catch{this.unavailable=!0,this.enabled=!1;return}this.context.resume().catch(()=>{})}}endTurn(){this.open=!1,this.suspendIfIdle()}get blocked(){return this.enabled&&this.context!==null&&this.context.state!=="running"}get playing(){return this.sources.size>0}push(t,i){const n=this.context;if(!this.enabled||!n||!t.length)return null;const s=n.currentTime;!this.frames||i!==this.rate?(this.startTime=s+this.lead,this.frames=0,this.rate=i):this.startTime+this.frames/this.rate{o.disconnect(),this.sources.delete(o),this.sources.size||(this.onchange(),this.suspendIfIdle())};const l=this.startTime+this.frames/this.rate;return o.start(l),this.frames+=t.length,this.sources.add(o),this.sources.size===1&&this.onchange(),Math.max(0,l-s)}stop(){this.enabled=!1,this.frames=0;const t=this.sources.size>0;for(const i of this.sources)i.onended=null,i.stop(),i.disconnect();this.sources.clear(),t&&this.onchange(),this.suspendIfIdle()}close(){this.stop(),this.context?.close().catch(()=>{}),this.context=null}suspendIfIdle(){!this.open&&!this.sources.size&&this.context?.state==="running"&&this.context.suspend().catch(()=>{})}}var Iq=ae(''),Dq=ae(' '),Lq=ae(`This entry's id is not the catalog's S2S id, so Model parameters shows the family's ASR settings; turns leave them out and use Max tokens.`),Vq=ae(''),Hq=ae(''),Wq=ae('…'),Qq=ae(''),Kq=ae(' '),Yq=ae('
  • You
    Reply

  • '),Jq=ae('
      '),Xq=ae('

      Record or choose a spoken question under Source audio, then press Run. Each Run adds a turn, and the earlier turns go with it.

      '),Zq=ae('Live playback is not available; each reply is in its player when it finishes.'),eC=ae('The browser did not let live audio start; each reply is in its player when it finishes.'),tC=ae('
      Conversation
      ');function Gb(a,t){zi(t,!1);const i=()=>zu(Rq,"$conversation",n),[n,s]=vp(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y();let g=xe(t,"modelId",8,""),h=xe(t,"busy",8,!1),m=xe(t,"server",8,null),p=xe(t,"loadedModels",24,()=>[]),u=xe(t,"catalogEntries",24,()=>[]),f=xe(t,"paramSpecs",24,()=>[]),_=xe(t,"sourceFile",8,null),b=xe(t,"sourceRecording",8,!1),v=xe(t,"clearSource",8,()=>{}),T=xe(t,"log",8,()=>{}),S=xe(t,"setPanelRunner",8,()=>()=>{});const M=Y(new Oq);let P=Y(!0),B=Y(!1),C=Y(!1),j=Y(!1),G=Y(null),A=null,N=Y(g());Bt(M,e(M).onchange=()=>{y(B,e(M).playing)});function H($e){return u().find(ze=>ze.id===$e)?.display_name||$e}function E($e){!e(G)||e(G).scrollTop+e(G).clientHeight{e(G)&&Bt(G,e(G).scrollTop=e(G).scrollHeight)})}function U($e){if($e.aborted)throw new DOMException("The turn was stopped.","AbortError")}function O($e){return u().find(ze=>ze.id===$e)?.family??"lfm2_audio"}function V($e,ze){const Fe=ze;return typeof Fe=="object"&&Fe!==null&&Fe.id===`${$e}.reply`&&typeof Fe.kind=="string"&&typeof Fe.payload=="string"}function D($e){return JSON.stringify($e,(ze,Fe)=>(ze==="audio"||ze==="payload")&&typeof Fe=="string"?``:Fe,2)}function $($e,ze,Fe,qe){const it={audio:Fe,seed:$e.seed,options:ze};$e.maxTokens!==void 0&&(it.max_tokens=$e.maxTokens);const st=O($e.modelId);return $e.language&&st!=="lfm3_audio"&&(it.language=$e.language),qe.length&&(it.artifacts=qe.flatMap(Ne=>[{id:`${st}.question`,kind:"custom",path:Ne.questionPath},Ne.reply])),{model:$e.modelId,request:it}}function F($e,ze,Fe){const qe={};typeof Fe.text=="string"&&(qe.replyText=Fe.text);let it=null;typeof Fe.audio=="string"&&(it=new Blob([Ab(Fe.audio)],{type:"audio/wav"}),qe.replyUrl=URL.createObjectURL(it));const st=O($e),Ne=(Array.isArray(Fe.artifacts)?Fe.artifacts:[]).find(He=>V(st,He));return Ne?(qe.reply={id:Ne.id,kind:Ne.kind,payload:Ne.payload},Ne.meta&&(qe.reply.meta=Ne.meta),qe.cut=Ne.meta?.ended==="false",qe.steps=Ne.meta?.steps||""):qe.message="The server returned no reply artifact, so this turn does not go with the next question.",jq($e,ze,qe)&&T()(`New ${st==="lfm3_audio"?"LFM3-Audio":"LFM2.5-Audio"} conversation with ${H($e)}.`),it}async function z($e){if(b())throw $e.warning("Stop the recording first.");const ze=_();if(!ze)throw $e.warning("Record or choose source audio first.");e(M).beginTurn(e(P));const Fe=u().find(Ve=>Ve.id===$e.modelId)?.configured===!0,qe=m()?.ui_management===!0&&!Fe||p().some(Ve=>Ve.id===$e.modelId&&Ve.mode==="streaming");qe&&e(P)&&!e(M).unavailable&&document.querySelectorAll("audio, video").forEach(Ve=>Ve.pause()),y(j,e(M).unavailable),y(C,!1);const it=performance.now(),st={...$e.options,return_codes:!0};if(e(d))for(const Ve of f())delete st[Ve.name];const{turn:Ne,history:He}=Pq($e.modelId,m()?.ui_management&&!Fe?"loading":"uploading",$e.seed),Be=new AbortController,Ue=()=>Be.abort();$e.signal.aborted?Ue():$e.signal.addEventListener("abort",Ue),A=Be;const tt=Be.signal;let Re="load";try{await $e.ensureLoaded("streaming"),U(tt),Re="read",Ol(Ne,{state:"uploading",live:qe}),$e.setStatus("Uploading the question…");const Ve=await Fr(ze);U(tt),Re="upload";const _t=await gr(Ve,tt);U(tt),Re="run";const mt=$($e,st,_t,He);Ol(Ne,{state:"waiting",questionPath:_t,questionUrl:URL.createObjectURL(Ve)}),$e.setStatus(qe?"Waiting for the reply…":"Waiting for the whole reply: this server runs the entry offline, so the reply does not stream.");let et;if(qe){let Ye=0,ut=!0;for await(const at of wT(mt,tt)){if(at.type==="task.stream.done"){et=at.result;continue}const Zt=at.event,At=Zt.partial_text,It=typeof At?.text=="string"?At.text:"";let Ra=Ne.firstAudioMs;if(ut&&typeof Zt.audio=="string")try{const na=Nq(Ab(Zt.audio));Ye+=na.samples.length/na.sampleRate;const ba=e(M).push(na.samples,na.sampleRate);Ra===null&&(Ra=performance.now()-it+(ba??0)*1e3,y(C,e(M).blocked),e(C)&&e(M).stop())}catch(na){ut=!1,e(M).stop(),e(P)&&(y(j,!0),T()(`Live playback stopped: ${na instanceof Error?na.message:String(na)}`))}(Ne.state!=="streaming"||It||Ra!==Ne.firstAudioMs)&&Ol(Ne,{state:"streaming",replyText:Ne.replyText+It,firstAudioMs:Ra}),$e.setStatus(ut?`Streaming the reply: ${Math.floor(Ye)} s`:"Streaming the reply…")}}else et=await Nl(mt,tt);U(tt);const wt=F($e.modelId,Ne,et);return _()===ze&&v()(),{audio:wt,text:Ne.replyText,json:D(et)}}catch(Ve){if(e(M).stop(),tt.aborted||Ve?.name==="AbortError")throw Ol(Ne,{state:"stopped",message:"Stopped before the reply finished; this turn is not part of the conversation."}),Ve?.name==="AbortError"?Ve:new DOMException("The turn was stopped.","AbortError");if(Ve instanceof ub){const mt="The connection closed before the reply finished; this turn is not part of the conversation.";throw Ol(Ne,{state:"stopped",message:mt}),new Error(mt)}let _t=Ve instanceof Error?Ve.message:String(Ve);throw Re==="read"?_t=`Could not read the question: ${_t}`:Re==="upload"?_t=`Upload failed: ${_t}`:Re==="run"&&He.some(mt=>_t.includes(mt.questionPath))&&(_t+=" The server no longer has the questions this conversation uploaded, as after a restart; start a new conversation."),Ol(Ne,{state:"failed",message:_t}),new Error(_t)}finally{$e.signal.removeEventListener("abort",Ue),A===Be&&(A=null),e(M).endTurn()}}function L(){h()||(e(M).stop(),Bq())}function Q($e){h()||e(l)||Ol($e,{leftOut:!$e.leftOut})}function Z(){e(M).stop()}function ee($e){return $e.state==="loading"?"loading the model":$e.state!=="done"?$e.state:$e.leftOut?"left out":$e.cut?"cut at max_tokens":"done"}function oe($e){const ze=[`seed ${$e.seed}`];return $e.firstAudioMs!==null&&ze.push(`first audio ${($e.firstAudioMs/1e3).toFixed(2)} s`),$e.steps&&ze.push(`${$e.steps} steps`),$e.live||ze.push("not streamed"),ze.join(" · ")}Kn(()=>S()(z)),ur(()=>{A?.abort(),e(M).close()}),Ee(()=>i(),()=>{y(r,i().turns)}),Ee(()=>i(),()=>{y(o,i().modelId)}),Ee(()=>(e(r),e(o),K(g())),()=>{y(l,e(r).length>0&&e(o)!==g())}),Ee(()=>(e(l),e(r)),()=>{y(c,e(l)?0:Cb(e(r)).length)}),Ee(()=>i(),()=>{E(i())}),Ee(()=>K(f()),()=>{y(d,f().some($e=>$e.name==="audio_chunk_mode"))}),Ee(()=>(K(g()),e(N),e(M)),()=>{g()!==e(N)&&(y(N,g()),e(M).stop())}),Ee(()=>(e(P),e(M)),()=>{e(P)||e(M).stop()}),kn(),Xi();var fe=tC();re("play",Cp,Z,!0);var le=k(fe),ge=k(le),R=q(k(ge),2),we=k(R,!0);w(R),w(ge);var ce=q(ge,2),Te=k(ce);{var he=$e=>{var ze=Iq();re("click",ze,Z),J($e,ze)};ve(Te,$e=>{e(B)&&$e(he)})}var je=q(Te,2);w(ce),w(le);var Le=q(le,2);{var nt=$e=>{var ze=Dq(),Fe=k(ze);w(ze),ie((qe,it)=>W(Fe,`These turns are with ${qe??""}. Run starts a new conversation with ${it??""}.`),[()=>(e(o),x(()=>H(e(o)))),()=>(K(g()),x(()=>H(g())))]),J($e,ze)};ve(Le,$e=>{e(l)&&$e(nt)})}var Ae=q(Le,2);{var Ge=$e=>{var ze=Lq();J($e,ze)};ve(Ae,$e=>{e(d)&&$e(Ge)})}var ne=q(Ae,2);{var Xe=$e=>{var ze=Jq();Ct(ze,7,()=>e(r),Fe=>Fe.key,(Fe,qe,it)=>{var st=Yq();let Ne;var He=k(st),Be=k(He),Ue=k(Be);w(Be);var tt=q(Be,2);let Re;var Ve=k(tt,!0);w(tt);var _t=q(tt,2),mt=k(_t,!0);w(_t);var et=q(_t,2);{var wt=kt=>{var ta=Vq(),ra=k(ta,!0);w(ta),ie(()=>{ta.disabled=h()||e(l),_e(ta,"aria-label",(e(qe),K(e(it)),x(()=>`${e(qe).leftOut?"Include":"Leave out"} turn ${e(it)+1}`))),W(ra,(e(qe),x(()=>e(qe).leftOut?"Include":"Leave out")))}),re("click",ta,()=>Q(e(qe))),J(kt,ta)};ve(et,kt=>{e(qe),x(()=>e(qe).state==="done"&&e(qe).reply)&&kt(wt)})}w(He);var Ye=q(He,2),ut=q(k(Ye),2);{var at=kt=>{var ta=Hq();ie(()=>{_e(ta,"src",(e(qe),x(()=>e(qe).questionUrl))),_e(ta,"aria-label",`Turn ${e(it)+1} question`)}),J(kt,ta)},Zt=kt=>{var ta=Wq();J(kt,ta)};ve(ut,kt=>{e(qe),x(()=>e(qe).questionUrl)?kt(at):kt(Zt,-1)})}w(Ye);var At=q(Ye,2),It=q(k(At),2),Ra=k(It),na=k(Ra,!0);w(Ra);var ba=q(Ra,2);{var Ma=kt=>{var ta=Qq(),ra=k(ta),ki=q(ra,2);w(ta),ie(()=>{_e(ra,"src",(e(qe),x(()=>e(qe).replyUrl))),_e(ra,"aria-label",`Turn ${e(it)+1} reply`),_e(ki,"href",(e(qe),x(()=>e(qe).replyUrl))),_e(ki,"download",`${e(o)}-turn-${e(it)+1}-reply.wav`)}),J(kt,ta)};ve(ba,kt=>{e(qe),x(()=>e(qe).replyUrl)&&kt(Ma)})}w(It),w(At);var en=q(At,2);{var ea=kt=>{var ta=Kq(),ra=k(ta,!0);w(ta),ie(()=>W(ra,(e(qe),x(()=>e(qe).message)))),J(kt,ta)};ve(en,kt=>{e(qe),x(()=>e(qe).message)&&kt(ea)})}w(st),ie((kt,ta)=>{_e(st,"data-state",(e(qe),x(()=>e(qe).state))),Ne=va(st,1,"svelte-18zfjku",null,Ne,{"left-out":e(qe).leftOut}),W(Ue,`Turn ${e(it)+1}`),Re=va(tt,1,"badge svelte-18zfjku",null,Re,{bad:e(qe).state==="failed"||e(qe).state==="stopped"}),W(Ve,kt),W(mt,ta),W(na,(e(qe),x(()=>e(qe).replyText||(e(qe).state==="done"?"(no text)":"…"))))},[()=>(e(qe),x(()=>ee(e(qe)))),()=>(e(qe),x(()=>oe(e(qe))))]),J(Fe,st)}),w(ze),Ci(ze,Fe=>y(G,Fe),()=>e(G)),J($e,ze)},de=$e=>{var ze=Xq();J($e,ze)};ve(ne,$e=>{e(r),x(()=>e(r).length)?$e(Xe):$e(de,-1)})}var ye=q(ne,2),ue=k(ye);Pt(ue),Rt(3),w(ye);var be=q(ye,2);{var Se=$e=>{var ze=Zq();J($e,ze)},Ie=$e=>{var ze=eC();J($e,ze)};ve(be,$e=>{e(j)?$e(Se):e(C)&&$e(Ie,1)})}w(fe),ie(()=>{W(we,e(c)?`${e(c)} earlier ${e(c)===1?"turn goes":"turns go"} with the next question`:"The next question starts the conversation"),je.disabled=(K(h()),e(r),x(()=>h()||!e(r).length))}),re("click",je,L),Dp(ue,()=>e(P),$e=>y(P,$e)),J(a,fe),Ei(),s()}var aC=ae(''),iC=ae('LiveAvatar reference'),nC=ae('Uploading reference image…'),sC=ae(' '),rC=ae(' Recording microphone…',1),oC=ae(" "),lC=ae(' ',1),cC=ae(""),dC=ae(''),uC=ae('
      '),fC=ae(''),pC=ae('
      '),mC=ae(''),gC=ae(' ',1),hC=ae('
      '),_C=ae('
      Memory and execution
      ');function vC(a,t){zi(t,!1);const i=Y(),n=Y();let s=xe(t,"busy",8,!1),r=xe(t,"loraUploading",12,!1),o=xe(t,"paramSpecs",24,()=>[]),l=xe(t,"advancedValues",24,()=>({})),c=xe(t,"setParameterValue",8,()=>{}),d=xe(t,"sourceFile",8,null),g=xe(t,"sourceRecording",8,!1),h=xe(t,"sourceRecordingBlocked",8,!1),m=xe(t,"setSourceFile",8,()=>{}),p=xe(t,"startSourceRecording",8,()=>{}),u=xe(t,"stopSourceRecording",8,()=>{});const f=["generation_mode","height","width","num_frames","num_clips","num_inference_steps","guidance_scale","shift","negative_prompt"],_=["sage_attention","memory_saver","batched_cfg","fused_cfg","denoiser_layerwise","denoiser_layerwise_batch","target_cache_blocks","vae_cache_f16","vae_encoder_chunk_size","vae_decoder_tile_size","denoiser_weight_streaming"];let b=Y(null),v=Y(null),T=Y(null),S=Y(""),M=Y(""),P=null;function B(Ge,ne){const Xe=o().find(de=>de.name===Ge);Xe&&c()(Xe,ne)}function C(){P?.abort(),P=null,r(!1),y(b,null),y(M,""),e(S)&&URL.revokeObjectURL(e(S)),y(S,""),e(v)&&Bt(v,e(v).value=""),B("reference_image_path","")}async function j(Ge){if(Ge){P?.abort(),y(M,""),y(b,Ge),e(S)&&URL.revokeObjectURL(e(S)),y(S,URL.createObjectURL(Ge)),r(!0),P=new AbortController;try{const ne=await Fd(Ge,P.signal);B("reference_image_path",ne)}catch(ne){P.signal.aborted||(y(M,ne instanceof Error?ne.message:String(ne)),B("reference_image_path",""))}finally{r(!1),P=null}}}function G(Ge){m()(Ge)}function A(){e(T)&&Bt(T,e(T).value=""),m()(null)}ur(()=>{P?.abort(),e(S)&&URL.revokeObjectURL(e(S))}),Ee(()=>K(o()),()=>{y(i,f.map(Ge=>o().find(ne=>ne.name===Ge)).filter(Ge=>Ge!==void 0))}),Ee(()=>K(o()),()=>{y(n,_.map(Ge=>o().find(ne=>ne.name===Ge)).filter(Ge=>Ge!==void 0))}),kn(),Xi();var N=_C(),H=k(N),E=q(k(H),2);Ci(E,Ge=>y(v,Ge),()=>e(v));var U=q(E,2),O=q(k(U),2),V=k(O,!0);w(O);var D=q(O,2);{var $=Ge=>{var ne=aC();ie(()=>ne.disabled=s()),re("click",ne,C),J(Ge,ne)};ve(D,Ge=>{e(b)&&Ge($)})}w(U);var F=q(U,2);{var z=Ge=>{var ne=iC();ie(()=>_e(ne,"src",e(S))),J(Ge,ne)};ve(F,Ge=>{e(S)&&Ge(z)})}var L=q(F,2);{var Q=Ge=>{var ne=nC();J(Ge,ne)};ve(L,Ge=>{r()&&Ge(Q)})}var Z=q(L,2);{var ee=Ge=>{var ne=sC(),Xe=k(ne,!0);w(ne),ie(()=>W(Xe,e(M))),J(Ge,ne)};ve(Z,Ge=>{e(M)&&Ge(ee)})}w(H);var oe=q(H,2),fe=q(k(oe),2);Ci(fe,Ge=>y(T,Ge),()=>e(T));var le=q(fe,2),ge=q(k(le)),R=k(ge,!0);w(ge),w(le);var we=q(le,2),ce=k(we);{var Te=Ge=>{var ne=rC(),Xe=ht(ne);Rt(2),re("click",Xe,function(...de){u()?.apply(this,de)}),J(Ge,ne)},he=Ge=>{var ne=lC(),Xe=ht(ne),de=q(Xe,2),ye=q(de,2);{var ue=be=>{var Se=oC(),Ie=k(Se,!0);w(Se),ie(()=>W(Ie,(K(d()),x(()=>d().name)))),J(be,Se)};ve(ye,be=>{d()&&be(ue)})}ie(()=>{Xe.disabled=h(),de.disabled=!d()}),re("click",Xe,function(...be){p()?.apply(this,be)}),re("click",de,A),J(Ge,ne)};ve(ce,Ge=>{g()?Ge(Te):Ge(he,-1)})}w(we);var je=q(we,2);rs(je,{get file(){return d()},kind:"audio",label:"Audio preview"}),w(oe);var Le=q(oe,2);Ct(Le,5,()=>e(i),Kt,(Ge,ne)=>{var Xe=pC();let de;var ye=k(Xe),ue=k(ye,!0);w(ye);var be=q(ye,2);{var Se=ze=>{var Fe=dC();Ct(Fe,5,()=>(e(ne),x(()=>e(ne).choices||[])),Kt,(it,st)=>{var Ne=cC(),He=k(Ne,!0);w(Ne);var Be={};ie(()=>{W(He,e(st)),Be!==(Be=e(st))&&(Ne.value=(Ne.__value=e(st))??"")}),J(it,Ne)}),w(Fe);var qe;On(Fe),ie(it=>{_e(Fe,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),qe!==(qe=it)&&(Fe.value=(Fe.__value=it)??"",xn(Fe,it))},[()=>(K(l()),e(ne),x(()=>String(l()[e(ne).name]??e(ne).default??"")))]),re("change",Fe,it=>c()(e(ne),it.currentTarget.value)),J(ze,Fe)},Ie=ze=>{var Fe=uC(),qe=k(Fe);Pt(qe);var it=q(qe,2),st=k(it,!0);w(it),w(Fe),ie((Ne,He)=>{_e(qe,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),_e(qe,"min",(e(ne),x(()=>e(ne).minimum))),_e(qe,"max",(e(ne),x(()=>e(ne).maximum))),_e(qe,"step",(e(ne),x(()=>e(ne).step))),bi(qe,Ne),W(st,He)},[()=>(K(l()),e(ne),x(()=>Number(l()[e(ne).name]??e(ne).default))),()=>(K(l()),e(ne),x(()=>String(l()[e(ne).name])))]),re("input",qe,Ne=>c()(e(ne),Ne.currentTarget.valueAsNumber)),J(ze,Fe)},$e=ze=>{var Fe=fC();Pt(Fe),ie(qe=>{_e(Fe,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),_e(Fe,"type",(e(ne),x(()=>e(ne).type==="number"?"number":"text"))),_e(Fe,"min",(e(ne),x(()=>e(ne).minimum))),_e(Fe,"max",(e(ne),x(()=>e(ne).maximum))),_e(Fe,"step",(e(ne),x(()=>e(ne).step))),bi(Fe,qe)},[()=>(K(l()),e(ne),x(()=>String(l()[e(ne).name]??e(ne).default??"")))]),re("input",Fe,qe=>c()(e(ne),e(ne).type==="number"?qe.currentTarget.valueAsNumber:qe.currentTarget.value)),J(ze,Fe)};ve(be,ze=>{e(ne),x(()=>e(ne).type==="choice")?ze(Se):(e(ne),x(()=>e(ne).type==="slider")?ze(Ie,1):ze($e,-1))})}w(Xe),ie(ze=>{de=va(Xe,1,"field svelte-4cgukj",null,de,{wide:e(ne).type==="text"}),_e(ye,"for",(e(ne),x(()=>"liveavatar-"+e(ne).name))),W(ue,ze)},[()=>(e(ne),x(()=>e(ne).label||e(ne).name.replace(/_/g," ")))]),J(Ge,Xe)}),w(Le);var nt=q(Le,2),Ae=q(k(nt),2);Ct(Ae,5,()=>e(n),Kt,(Ge,ne)=>{var Xe=hC(),de=k(Xe);{var ye=be=>{var Se=mC(),Ie=k(Se);Pt(Ie);var $e=q(Ie,3,!0);w(Se),ie((ze,Fe)=>{_e(Se,"for",(e(ne),x(()=>"liveavatar-"+e(ne).name))),_e(Ie,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),zl(Ie,ze),W($e,Fe)},[()=>(K(l()),e(ne),x(()=>!!l()[e(ne).name])),()=>(e(ne),x(()=>e(ne).label||e(ne).name.replace(/_/g," ")))]),re("change",Ie,ze=>c()(e(ne),ze.currentTarget.checked)),J(be,Se)},ue=be=>{var Se=gC(),Ie=ht(Se),$e=k(Ie,!0);w(Ie);var ze=q(Ie,2);Pt(ze),ie((Fe,qe)=>{_e(Ie,"for",(e(ne),x(()=>"liveavatar-"+e(ne).name))),W($e,Fe),_e(ze,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),_e(ze,"min",(e(ne),x(()=>e(ne).minimum))),_e(ze,"max",(e(ne),x(()=>e(ne).maximum))),_e(ze,"step",(e(ne),x(()=>e(ne).step))),bi(ze,qe)},[()=>(e(ne),x(()=>e(ne).label||e(ne).name.replace(/_/g," "))),()=>(K(l()),e(ne),x(()=>Number(l()[e(ne).name]??e(ne).default)))]),re("input",ze,Fe=>c()(e(ne),Fe.currentTarget.valueAsNumber)),J(be,Se)};ve(de,be=>{e(ne),x(()=>e(ne).type==="bool")?be(ye):be(ue,-1)})}w(Xe),J(Ge,Xe)}),w(Ae),w(nt),w(N),ie(()=>{E.disabled=s()||r(),W(V,(e(b),x(()=>e(b)?.name||"No image selected"))),fe.disabled=s()||g(),W(R,(K(d()),x(()=>d()?.name||"No file chosen")))}),re("change",E,Ge=>j(Ge.currentTarget.files?.[0]||null)),re("change",fe,Ge=>G(Ge.currentTarget.files?.[0]||null)),J(a,N),Ei()}var Fb=ae(""),Mb=ae(' '),bC=ae('
      '),zb=ae(' '),yC=ae(`
      LoRA requirements vary. Read the original adapter's documentation for usage instructions.
      `),wC=ae('
      Unfused NAR adapter for acoustic detail; relative paths resolve against the model root. Reload the model after changing this value.
      Scales the LoRA deltas only; any full vae2llm/llm2vae projection replacement in the adapter stays at full strength.',1),kC=ae(" ",1),xC=ae(""),Mm=ae('
      '),SC=ae(""),TC=ae('
      '),$C=ae(" "),Eb=ae(' '),qC=ae('
      '),CC=ae('Extract or paste ABC to preview the score.'),Ub=ae(''),Rb=ae('
      '),AC=ae('
      Yue2 ABC conditioning
      Cover source Use SheetSage2 + MERT2 to extract an editable ABC score from a song.
      Warning: VRAM may remain in use after unloading.
      ABC score editor Edit the extracted score here. The sheet preview updates from this ABC.
      Sheet preview Rendered from the editable ABC score.
      Yue2 semantic sampling
      Yue2 ABC planner sampling
      ');function GC(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y();let l=xe(t,"lyrics",12,""),c=xe(t,"seed",12,1234),d=xe(t,"loraUploading",12,!1),g=xe(t,"busy",8,!1),h=xe(t,"paramSpecs",24,()=>[]),m=xe(t,"advancedValues",24,()=>({})),p=xe(t,"catalogEntries",24,()=>[]),u=xe(t,"loadedModels",24,()=>[]),f=xe(t,"server",8,null),_=xe(t,"modelPathFor",8,Je=>Je.path),b=xe(t,"loadTargetFor",8),v=xe(t,"loadOptionsFor",8,Je=>Je.load_options||{}),T=xe(t,"sessionOptionsFor",8,Je=>Je.session_options||{}),S=xe(t,"refreshModels",8,async()=>{}),M=xe(t,"log",8,()=>{}),P=xe(t,"tr",8,(Je,Ce,pt=Je)=>pt),B=xe(t,"localizedParameterText",8,(Je,Ce)=>Ce==="label"?Je.name:""),C=xe(t,"setParameterValue",8,()=>{});const j=["main_gguf","vae_gguf"],G=["style","cot","guidance_scale","num_inference_steps"],A=["abc","abc_file"],N=["semantic_temperature","semantic_top_p","semantic_top_k","semantic_repetition_penalty","semantic_penalty_window","semantic_min_tokens","semantic_max_tokens"],H=["abc_temperature","abc_top_p","abc_top_k","abc_repetition_penalty","abc_penalty_window","abc_min_tokens","abc_max_tokens"];let E=Y(null),U=Y(null),O=Y(null),V=Y(""),D=Y(""),$=null;ur(()=>$?.abort());async function F(Je,Ce){if(!Je)return;const pt=zt=>{y(Ce==="ar"?V:D,zt)};if(y(V,""),y(D,""),!Je.name.toLowerCase().endsWith(".safetensors")){pt(`Select an unfused ${Ce.toUpperCase()} .safetensors adapter.`);return}d(!0),$=new AbortController;try{const zt=await Fd(Je,$.signal);he(Ce==="ar"?"ar_lora":"nar_lora",zt),M()(`YuE2 ${Ce.toUpperCase()} LoRA selected: ${Je.name}`)}catch(zt){$.signal.aborted||pt(zt instanceof Error?zt.message:String(zt))}finally{d(!1),$=null,e(U)&&Bt(U,e(U).value=""),e(O)&&Bt(O,e(O).value="")}}let z=Y(null),L=Y(!1);const Q="audiocpp.ui.yue2.unloadSheetSageAfterConversion";let Z=Y(!0);Kn(()=>{y(Z,localStorage.getItem(Q)!=="false")});let ee=Y(""),oe=Y(""),fe=Y(""),le=Y(null),ge="",R=Y(""),we=null;function ce(Je,Ce){return Je.map(pt=>Ce.find(zt=>zt.name===pt)).filter(pt=>pt!==void 0)}function Te(Je){return h().find(Ce=>Ce.name===Je)}function he(Je,Ce){const pt=Te(Je);pt&&C()(pt,Ce)}function je(Je){try{return atob(Je)}catch{return Je}}function Le(Je){if(typeof Je.text=="string"&&Je.text.trim())return Je.text;const Ce=Array.isArray(Je.artifacts)?Je.artifacts:[];for(const pt of Ce){if(!pt||typeof pt!="object")continue;const zt=pt,$a=String(zt.meta?.format||zt.meta?.extension||zt.id||"");if(/abc|score/i.test($a)&&typeof zt.payload=="string")return je(zt.payload)}return""}function nt(){return p().find(Je=>Je.family==="sheetsage2")||null}async function Ae(Je){if(u().some($a=>$a.id===Je.id&&$a.loaded))return;const Ce=await Bc();if(Ce.find($a=>$a.id===Je.id&&$a.loaded))return;if(!f()?.ui_management){if(!Ce.some($a=>$a.id===Je.id))throw new Error("SheetSage2 is not registered. Add SheetSage2 to server config.");return}const zt=await b()(Je);await df({id:Je.id,path:zt?.model_path??_()(Je),family:zt?.family??Je.family,task:Je.task,mode:Je.mode||"offline",load_options:v()(Je),session_options:T()(Je)})}async function Ge(){if(!e(E)||e(L))return;y(L,!0),y(oe,""),y(ee,"Preparing SheetSage2 cover score transcription...");const Je=e(Z);let Ce=null;try{const pt=nt();if(!pt)throw new Error("SheetSage2 is not available in the model catalog.");await Ae(pt),Ce=pt.id,await S()(),y(ee,"Uploading source song...");const zt=await Fd(e(E));y(ee,"Transcribing source song to ABC with SheetSage2...");const $a=await Nl({model:pt.id,request:{audio:zt,options:{}}}),sa=Le($a);if(!sa.trim())throw new Error("SheetSage2 did not return an ABC score.");y(fe,sa),he("abc",sa),he("abc_file",""),he("cot","melody"),y(ee,"ABC score imported. Review/edit the sheet before generating the cover."),M()("SheetSage2 cover score imported into Yue2 ABC conditioning.")}catch(pt){y(oe,pt instanceof Error?pt.message:String(pt)),y(ee,""),M()(`SheetSage2 cover transcription failed: ${e(oe)}`)}finally{if(Je&&Ce){try{f()?.ui_management?await _o(Ce):await Sn("/v1/tasks/unload_models",{method:"POST",body:JSON.stringify({model_ids:[Ce]})}),M()("SheetSage2 unloaded after cover transcription.")}catch(pt){const zt=`SheetSage2 unload failed: ${pt instanceof Error?pt.message:String(pt)}`;y(oe,[e(oe),zt].filter(Boolean).join(" ")),M()(zt)}try{await S()()}catch(pt){const zt=`Model status refresh failed: ${pt instanceof Error?pt.message:String(pt)}`;y(oe,[e(oe),zt].filter(Boolean).join(" ")),M()(zt)}}y(L,!1)}}function ne(){y(E,null),e(z)&&Bt(z,e(z).value="")}function Xe(Je){y(fe,Je),he("abc",Je),Je.trim()&&he("abc_file","")}async function de(Je){const Ce=Je.trim();if(e(le)){if(!Ce){e(le).replaceChildren(),ge="",y(R,"");return}if(Ce!==ge&&(await Ps(),!!e(le)))try{we||(we=(await Bl(()=>Promise.resolve().then(()=>EU),void 0,Gn&&Gn.tagName.toUpperCase()==="SCRIPT"&&Gn.src||new URL("_app/immutable/bundle.BPEI3Cn2.js",document.baseURI).href)).renderAbc),e(le).replaceChildren(),we(e(le),Ce,{add_classes:!0,responsive:"resize"}),ge=Ce,y(R,"")}catch(pt){e(le).replaceChildren(),ge="",y(R,pt instanceof Error?pt.message:String(pt))}}}Ee(()=>K(h()),()=>{y(i,ce(j,h()))}),Ee(()=>K(h()),()=>{y(n,ce(G,h()))}),Ee(()=>K(h()),()=>{y(s,ce(A,h()))}),Ee(()=>K(h()),()=>{y(r,ce(N,h()))}),Ee(()=>K(h()),()=>{y(o,ce(H,h()))}),Ee(()=>(K(m()),e(fe),e(L)),()=>{String(m().abc||"")!==e(fe)&&!e(L)&&y(fe,String(m().abc||""))}),Ee(()=>e(fe),()=>{de(e(fe))}),kn(),Xi();var ye=AC(),ue=k(ye),be=k(ue),Se=k(be),Ie=q(Se),$e=k(Ie,!0);w(Ie),w(be);var ze=q(be,2);rn(ze),w(ue);var Fe=q(ue,2),qe=k(Fe),it=k(qe),st=k(it),Ne=q(st),He=k(Ne,!0);w(Ne),w(it);var Be=q(it,2);Pt(Be),w(qe);var Ue=q(qe,2);Ct(Ue,1,()=>e(i),Kt,(Je,Ce)=>{var pt=bC(),zt=k(pt),$a=k(zt,!0);w(zt);var sa=q(zt,2);Ct(sa,5,()=>(e(Ce),x(()=>e(Ce).choices||[])),Kt,(Nt,ka)=>{var Ii=Fb(),Ka=k(Ii,!0);w(Ii);var oa={};ie(()=>{W(Ka,e(ka)),oa!==(oa=e(ka))&&(Ii.value=(Ii.__value=e(ka))??"")}),J(Nt,Ii)}),w(sa);var ui;On(sa);var Ti=q(sa,2);{var fa=Nt=>{var ka=Mb(),Ii=k(ka,!0);w(ka),ie(Ka=>W(Ii,Ka),[()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"info",P())))]),J(Nt,ka)},Ft=La(()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"info",P()))));ve(Ti,Nt=>{e(Ft)&&Nt(fa)})}w(pt),ie((Nt,ka)=>{_e(zt,"for",(e(Ce),x(()=>"param-"+e(Ce).name))),W($a,Nt),_e(sa,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),ui!==(ui=ka)&&(sa.value=(sa.__value=ka)??"",xn(sa,ka))},[()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"label",P()))),()=>(K(m()),e(Ce),x(()=>String(m()[e(Ce).name]??"")))]),re("change",sa,Nt=>C()(e(Ce),Nt.currentTarget.value)),J(Je,pt)}),w(Fe);var tt=q(Fe,2);{var Re=Je=>{{let Ce=Lt(()=>(K(m()),x(()=>+!!m().ar_lora+ +!!m().nar_lora)));Am(Je,{get selected(){return e(Ce)},children:(pt,zt)=>{var $a=kC(),sa=ht($a);{var ui=ka=>{var Ii=yC(),Ka=k(Ii),oa=q(k(Ka),2);Pt(oa);var Ba=q(oa,2);Ci(Ba,$i=>y(U,$i),()=>e(U));var pe=q(Ba,2),De=k(pe),ft=k(De,!0);w(De);var jt=q(De,2);w(pe);var xa=q(pe,4);{var Pi=$i=>{var fi=zb(),En=k(fi,!0);w(fi),ie(()=>W(En,e(V))),J($i,fi)};ve(xa,$i=>{e(V)&&$i(Pi)})}w(Ka);var X=q(Ka,2),Gi=q(k(X),2);Pt(Gi),w(X),w(Ii),ie(($i,fi)=>{oa.disabled=g()||d(),bi(oa,$i),Ba.disabled=g()||d(),De.disabled=g()||d(),W(ft,d()?"Uploading...":"Choose AR LoRA"),jt.disabled=(K(g()),K(d()),K(m()),x(()=>g()||d()||!m().ar_lora)),Gi.disabled=(K(g()),K(d()),K(m()),x(()=>g()||d()||!m().ar_lora)),bi(Gi,fi)},[()=>(K(m()),x(()=>String(m().ar_lora??""))),()=>(K(m()),x(()=>Number(m().ar_lora_scale??1)))]),re("input",oa,$i=>he("ar_lora",$i.currentTarget.value.trim())),re("change",Ba,$i=>F($i.currentTarget.files?.[0]||null,"ar")),re("click",De,()=>e(U)?.click()),re("click",jt,()=>{he("ar_lora",""),y(V,"")}),re("change",Gi,$i=>{Number.isFinite($i.currentTarget.valueAsNumber)&&he("ar_lora_scale",$i.currentTarget.valueAsNumber)}),J(ka,Ii)},Ti=La(()=>x(()=>Te("ar_lora")));ve(sa,ka=>{e(Ti)&&ka(ui)})}var fa=q(sa,2);{var Ft=ka=>{var Ii=wC(),Ka=ht(Ii),oa=k(Ka),Ba=q(k(oa),2);Pt(Ba);var pe=q(Ba,2);Ci(pe,fi=>y(O,fi),()=>e(O));var De=q(pe,2),ft=k(De),jt=k(ft,!0);w(ft);var xa=q(ft,2);w(De);var Pi=q(De,2);{var X=fi=>{var En=zb(),Un=k(En,!0);w(En),ie(()=>W(Un,e(D))),J(fi,En)};ve(Pi,fi=>{e(D)&&fi(X)})}Rt(2),w(oa);var Gi=q(oa,2),$i=q(k(Gi),2);Pt($i),w(Gi),w(Ka),Rt(2),ie((fi,En)=>{Ba.disabled=g()||d(),bi(Ba,fi),pe.disabled=g()||d(),ft.disabled=g()||d(),W(jt,d()?"Uploading...":"Choose NAR LoRA"),xa.disabled=(K(g()),K(d()),K(m()),x(()=>g()||d()||!m().nar_lora)),$i.disabled=(K(g()),K(m()),x(()=>g()||!m().nar_lora)),bi($i,En)},[()=>(K(m()),x(()=>String(m().nar_lora??""))),()=>(K(m()),x(()=>Number(m().nar_lora_scale??1)))]),re("input",Ba,fi=>he("nar_lora",fi.currentTarget.value.trim())),re("change",pe,fi=>F(fi.currentTarget.files?.[0]||null,"nar")),re("click",ft,()=>e(O)?.click()),re("click",xa,()=>{he("nar_lora",""),y(D,"")}),re("change",$i,fi=>{Number.isFinite(fi.currentTarget.valueAsNumber)&&he("nar_lora_scale",fi.currentTarget.valueAsNumber)}),J(ka,Ii)},Nt=La(()=>x(()=>Te("nar_lora")));ve(fa,ka=>{e(Nt)&&ka(Ft)})}J(pt,$a)},$$slots:{default:!0}})}},Ve=La(()=>x(()=>Te("ar_lora")||Te("nar_lora")));ve(tt,Je=>{e(Ve)&&Je(Re)})}var _t=q(tt,2);Ct(_t,5,()=>e(n),Kt,(Je,Ce)=>{var pt=TC();let zt;var $a=k(pt),sa=k($a,!0);w($a);var ui=q($a,2);{var Ti=Ka=>{var oa=xC();Ct(oa,5,()=>(e(Ce),x(()=>e(Ce).choices||[])),Kt,(pe,De)=>{var ft=Fb(),jt=k(ft,!0);w(ft);var xa={};ie(()=>{W(jt,e(De)),xa!==(xa=e(De))&&(ft.value=(ft.__value=e(De))??"")}),J(pe,ft)}),w(oa);var Ba;On(oa),ie(pe=>{_e(oa,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),Ba!==(Ba=pe)&&(oa.value=(oa.__value=pe)??"",xn(oa,pe))},[()=>(K(m()),e(Ce),x(()=>String(m()[e(Ce).name]??"")))]),re("change",oa,pe=>C()(e(Ce),pe.currentTarget.value)),J(Ka,oa)},fa=Ka=>{var oa=Mm(),Ba=k(oa);Pt(Ba);var pe=q(Ba,2),De=k(pe,!0);w(pe),w(oa),ie((ft,jt)=>{_e(Ba,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(Ba,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(Ba,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(Ba,"step",(e(Ce),x(()=>e(Ce).step))),bi(Ba,ft),W(De,jt)},[()=>(K(m()),e(Ce),x(()=>Number(m()[e(Ce).name]??e(Ce).default))),()=>(K(m()),e(Ce),x(()=>String(m()[e(Ce).name])))]),re("input",Ba,ft=>C()(e(Ce),ft.currentTarget.valueAsNumber)),J(Ka,oa)},Ft=Ka=>{var oa=SC();Pt(oa),ie((Ba,pe)=>{_e(oa,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(oa,"type",(e(Ce),x(()=>e(Ce).type==="number"?"number":"text"))),_e(oa,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(oa,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(oa,"step",(e(Ce),x(()=>e(Ce).step))),bi(oa,Ba),_e(oa,"placeholder",pe)},[()=>(K(m()),e(Ce),x(()=>String(m()[e(Ce).name]??""))),()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"placeholder",P())))]),re("input",oa,Ba=>C()(e(Ce),e(Ce).type==="number"?Ba.currentTarget.valueAsNumber:Ba.currentTarget.value)),J(Ka,oa)};ve(ui,Ka=>{e(Ce),x(()=>e(Ce).type==="choice")?Ka(Ti):(e(Ce),x(()=>e(Ce).type==="slider")?Ka(fa,1):Ka(Ft,-1))})}var Nt=q(ui,2);{var ka=Ka=>{var oa=Mb(),Ba=k(oa,!0);w(oa),ie(pe=>W(Ba,pe),[()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"info",P())))]),J(Ka,oa)},Ii=La(()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"info",P()))));ve(Nt,Ka=>{e(Ii)&&Ka(ka)})}w(pt),ie(Ka=>{zt=va(pt,1,"yue2-field svelte-15djq8z",null,zt,{wide:e(Ce).type==="text"}),_e($a,"for",(e(Ce),x(()=>"param-"+e(Ce).name))),W(sa,Ka)},[()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"label",P())))]),J(Je,pt)}),w(_t);var mt=q(_t,2),et=k(mt),wt=q(k(et)),Ye=k(wt,!0);w(wt),w(et);var ut=q(et,2),at=k(ut),Zt=k(at),At=q(k(Zt),2),It=k(At,!0);w(At),w(Zt);var Ra=q(Zt,2),na=k(Ra);Pt(na),Rt(2),w(Ra);var ba=q(Ra,4);Ci(ba,Je=>y(z,Je),()=>e(z));var Ma=q(ba,2),en=q(k(Ma),2),ea=k(en,!0);w(en),w(Ma);var kt=q(Ma,2),ta=k(kt),ra=q(ta,2);{var ki=Je=>{var Ce=$C(),pt=k(Ce,!0);w(Ce),ie(()=>W(pt,e(ee))),J(Je,Ce)};ve(ra,Je=>{e(ee)&&Je(ki)})}var ya=q(ra,2);{var ni=Je=>{var Ce=Eb(),pt=k(Ce,!0);w(Ce),ie(()=>W(pt,e(oe))),J(Je,Ce)};ve(ya,Je=>{e(oe)&&Je(ni)})}w(kt);var Ai=q(kt,2);{let Je=Lt(()=>(K(P()),x(()=>P()("file.preview"))));rs(Ai,{get file(){return e(E)},kind:"audio",get label(){return e(Je)}})}w(at);var xi=q(at,2),tn=q(k(xi),2);rn(tn);var Si=q(tn,2);{var dn=Je=>{var Ce=qC(),pt=k(Ce),zt=k(pt,!0);w(pt);var $a=q(pt,2);Pt($a),w(Ce),ie((sa,ui,Ti)=>{W(zt,sa),bi($a,ui),_e($a,"placeholder",Ti)},[()=>(K(B()),K(P()),x(()=>B()(Te("abc_file"),"label",P()))),()=>(K(m()),x(()=>String(m().abc_file??""))),()=>(K(B()),K(P()),x(()=>B()(Te("abc_file"),"placeholder",P())))]),re("input",$a,sa=>he("abc_file",sa.currentTarget.value)),J(Je,Ce)},on=La(()=>x(()=>Te("abc_file")));ve(Si,Je=>{e(on)&&Je(dn)})}w(xi);var Bi=q(xi,2),Qi=q(k(Bi),2),Ki=k(Qi);{var Wa=Je=>{var Ce=CC();J(Je,Ce)},Jn=La(()=>(e(fe),x(()=>!e(fe).trim())));ve(Ki,Je=>{e(Jn)&&Je(Wa)})}w(Qi),Ci(Qi,Je=>y(le,Je),()=>e(le));var Vn=q(Qi,2);{var Xn=Je=>{var Ce=Eb(),pt=k(Ce,!0);w(Ce),ie(()=>W(pt,e(R))),J(Je,Ce)};ve(Vn,Je=>{e(R)&&Je(Xn)})}w(Bi),w(ut),w(mt);var Ke=q(mt,2),Et=k(Ke),Qa=q(k(Et)),Za=k(Qa,!0);w(Qa),w(Et);var mi=q(Et,2);Ct(mi,5,()=>e(r),Kt,(Je,Ce)=>{var pt=Rb(),zt=k(pt),$a=k(zt,!0);w(zt);var sa=q(zt,2);{var ui=fa=>{var Ft=Mm(),Nt=k(Ft);Pt(Nt);var ka=q(Nt,2),Ii=k(ka,!0);w(ka),w(Ft),ie((Ka,oa)=>{_e(Nt,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(Nt,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(Nt,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(Nt,"step",(e(Ce),x(()=>e(Ce).step))),bi(Nt,Ka),W(Ii,oa)},[()=>(K(m()),e(Ce),x(()=>Number(m()[e(Ce).name]??e(Ce).default))),()=>(K(m()),e(Ce),x(()=>String(m()[e(Ce).name])))]),re("input",Nt,Ka=>C()(e(Ce),Ka.currentTarget.valueAsNumber)),J(fa,Ft)},Ti=fa=>{var Ft=Ub();Pt(Ft),ie(Nt=>{_e(Ft,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(Ft,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(Ft,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(Ft,"step",(e(Ce),x(()=>e(Ce).step))),bi(Ft,Nt)},[()=>(K(m()),e(Ce),x(()=>String(m()[e(Ce).name]??"")))]),re("input",Ft,Nt=>C()(e(Ce),Nt.currentTarget.valueAsNumber)),J(fa,Ft)};ve(sa,fa=>{e(Ce),x(()=>e(Ce).type==="slider")?fa(ui):fa(Ti,-1)})}w(pt),ie(fa=>{_e(zt,"for",(e(Ce),x(()=>"param-"+e(Ce).name))),W($a,fa)},[()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"label",P())))]),J(Je,pt)}),w(mi),w(Ke);var Ht=q(Ke,2),_i=k(Ht),ei=q(k(_i)),wa=k(ei,!0);w(ei),w(_i);var za=q(_i,2);Ct(za,5,()=>e(o),Kt,(Je,Ce)=>{var pt=Rb(),zt=k(pt),$a=k(zt,!0);w(zt);var sa=q(zt,2);{var ui=fa=>{var Ft=Mm(),Nt=k(Ft);Pt(Nt);var ka=q(Nt,2),Ii=k(ka,!0);w(ka),w(Ft),ie((Ka,oa)=>{_e(Nt,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(Nt,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(Nt,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(Nt,"step",(e(Ce),x(()=>e(Ce).step))),bi(Nt,Ka),W(Ii,oa)},[()=>(K(m()),e(Ce),x(()=>Number(m()[e(Ce).name]??e(Ce).default))),()=>(K(m()),e(Ce),x(()=>String(m()[e(Ce).name])))]),re("input",Nt,Ka=>C()(e(Ce),Ka.currentTarget.valueAsNumber)),J(fa,Ft)},Ti=fa=>{var Ft=Ub();Pt(Ft),ie(Nt=>{_e(Ft,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(Ft,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(Ft,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(Ft,"step",(e(Ce),x(()=>e(Ce).step))),bi(Ft,Nt)},[()=>(K(m()),e(Ce),x(()=>String(m()[e(Ce).name]??"")))]),re("input",Ft,Nt=>C()(e(Ce),Nt.currentTarget.valueAsNumber)),J(fa,Ft)};ve(sa,fa=>{e(Ce),x(()=>e(Ce).type==="slider")?fa(ui):fa(Ti,-1)})}w(pt),ie(fa=>{_e(zt,"for",(e(Ce),x(()=>"param-"+e(Ce).name))),W($a,fa)},[()=>(K(B()),e(Ce),K(P()),x(()=>B()(e(Ce),"label",P())))]),J(Je,pt)}),w(za),w(Ht),w(ye),ie((Je,Ce,pt,zt,$a)=>{W(Se,`${Je??""} `),W($e,Ce),W(st,`${pt??""} `),W(He,zt),W(Ye,(e(s),x(()=>e(s).length))),At.disabled=!e(E)||e(L),W(It,e(L)?"Transcribing...":"Extract ABC"),zl(na,e(Z)),na.disabled=e(L),W(ea,$a),ta.disabled=!e(E)||e(L),bi(tn,e(fe)),W(Za,(e(r),x(()=>e(r).length))),W(wa,(e(o),x(()=>e(o).length)))},[()=>(K(P()),x(()=>P()("request.lyrics"))),()=>(K(P()),x(()=>P()("request.optional"))),()=>(K(P()),x(()=>P()("request.seed"))),()=>(K(P()),x(()=>P()("request.randomSeed"))),()=>(e(E),K(P()),x(()=>e(E)?.name||P()("file.none")))]),Ta(ze,l),Ta(Be,c),re("click",At,Ge),re("change",na,Je=>{y(Z,Je.currentTarget.checked),localStorage.setItem(Q,String(e(Z)))}),re("change",ba,Je=>y(E,Je.currentTarget.files?.[0]||null)),re("click",ta,ne),re("input",tn,Je=>Xe(Je.currentTarget.value)),J(a,ye),Ei()}var FC=ae(""),MC=ae(' ',1),zC=ae(''),EC=ae('
      ');function Bb(a,t){zi(t,!1);let i=xe(t,"id",8),n=xe(t,"file",12,null),s=xe(t,"transcript",12,""),r=xe(t,"busy",8,!1),o=xe(t,"savedVoices",24,()=>[]),l=Y("");function c(C){y(l,C);const j=o().find(G=>G.id===C);j&&(n(new File([j.audio],`${j.name}.wav`,{type:j.audio.type||"audio/wav"})),s(j.transcript))}Xi();var d=EC(),g=k(d);{var h=C=>{var j=MC(),G=ht(j),A=q(G,2),N=k(A);N.value=N.__value="";var H=q(N);Ct(H,1,o,Kt,(U,O)=>{var V=FC(),D=k(V,!0);w(V);var $={};ie(()=>{W(D,(e(O),x(()=>e(O).name))),$!==($=(e(O),x(()=>e(O).id)))&&(V.value=(V.__value=(e(O),x(()=>e(O).id)))??"")}),J(U,V)}),w(A);var E;On(A),ie(()=>{_e(G,"for",`${i()}-library`),_e(A,"id",`${i()}-library`),A.disabled=r(),E!==(E=e(l))&&(A.value=(A.__value=e(l))??"",xn(A,e(l)))}),re("change",A,U=>c(U.currentTarget.value)),J(C,j)};ve(g,C=>{K(o()),x(()=>o().length)&&C(h)})}var m=q(g,2),p=k(m),u=q(p,2);{var f=C=>{var j=zC(),G=k(j);rb(G,{size:14}),w(j),ie(()=>j.disabled=r()),re("click",j,()=>{n(null),y(l,"")}),J(C,j)};ve(u,C=>{n()&&C(f)})}w(m);var _=q(m,2),b=q(_,2),v=k(b);bS(v,{size:17});var T=q(v,2),S=k(T,!0);w(T),w(b);var M=q(b,2);rs(M,{get file(){return n()},kind:"audio",label:"Reference preview"});var P=q(M,2),B=q(P,2);rn(B),w(d),ie(()=>{_e(p,"for",`${i()}-audio`),_e(_,"id",`${i()}-audio`),_.disabled=r(),_e(b,"for",`${i()}-audio`),W(S,(K(n()),x(()=>n()?.name||"No recording selected"))),_e(P,"for",`${i()}-transcript`),_e(B,"id",`${i()}-transcript`),B.disabled=r()}),re("change",_,C=>{n(C.currentTarget.files?.[0]||null),y(l,""),C.currentTarget.value=""}),Ta(B,s),J(a,d),Ei()}var UC=ae('

      Reference voice (optional)

      Text to generate

      ',1),RC=ae(''),BC=ae('
      ',1),PC=ae(""),jC=ae('
      '),NC=ae('

      Multi-speaker generation is still under testing. Voice assignment and consistency may vary.

      Cast

      Dialogue

      ',1),OC=ae('
      ');function IC(a,t){zi(t,!1);const i=Y(),n=Y();let s=xe(t,"busy",8,!1),r=xe(t,"savedVoices",24,()=>[]),o=xe(t,"setPanelRunner",8,()=>()=>{});const l=16,c=D=>({id:D,name:`Speaker ${D+1}`,file:null,transcript:""});let d=Y("single"),g=Y(null),h=Y(""),m=Y(""),p=Y([c(0),c(1)]),u=Y(0),f=2,_=Y([{id:0,speaker:0,text:""},{id:1,speaker:1,text:""}]);function b(){const D=Array.from({length:l},($,F)=>F).find($=>!e(p).some(F=>F.id===$));D!==void 0&&(y(p,[...e(p),c(D)]),y(u,D))}function v(D){y(p,e(p).filter($=>$.id!==D)),y(u,e(p)[0].id)}function T(D,$){const F=[...e(_)];[F[D],F[D+$]]=[F[D+$],F[D]],y(_,F)}function S(){y(_,[...e(_),{id:f++,speaker:e(u),text:""}])}function M(){e(d)==="single"?y(m,"The observatory opens at sunset. Tonight, we will follow the planets across the sky and listen for the first signs of a coming storm."):y(_,[{id:f++,speaker:e(p)[0].id,text:"The observatory opens at sunset. Did you bring the star charts?"},{id:f++,speaker:e(p)[1].id,text:"Yes, and the sky is finally clear. We should have a wonderful view tonight."}])}async function P(D){const $=e(d)==="single",F=e(p).map(le=>({...le})),z=e(_).map(le=>({...le})),L=e(g),Q=e(h).trim();let Z=e(m).trim();if($){if(L&&!Q)throw D.warning("Enter the words spoken in the reference recording.");if(!Z)throw D.warning("Enter the text to generate.")}else{if(!z.length||z.some(ge=>!ge.text.trim()))throw D.warning("Enter text for every dialogue turn, or remove the empty turns.");const le=new Set(z.map(ge=>ge.speaker));if(le.size<2)throw D.warning("Assign dialogue to at least two different speakers.");for(const ge of F.filter(R=>le.has(R.id)))if(!ge.file||!ge.transcript.trim())throw y(u,ge.id),D.warning(`${ge.name}: add a reference recording and its exact transcript.`);Z=z.map(ge=>`<|speaker:${ge.speaker}|> ${ge.text.trim()}`).join(` -`)}await D.ensureLoaded("offline");const ee={...D.options},oe={model:D.modelId,input:Z,seed:D.seed,response_format:"wav",options:ee};if(D.maxTokens!==void 0&&(oe.max_tokens=D.maxTokens),$)L&&(D.setStatus("Preparing voice reference..."),oe.voice_ref=await gr(await Fr(L),D.signal),oe.reference_text=Q);else{D.setStatus("Preparing voice references...");const le=new Set(z.map(R=>R.speaker)),ge=[];for(const R of F.filter(we=>le.has(we.id))){const we=await Fr(R.file);ge.push({text:`<|speaker:${R.id}|> ${R.transcript.trim()}`,audio_path:await gr(we,D.signal)})}ee.multi_reference_cond=JSON.stringify(ge)}D.setStatus($?L?"Cloning voice...":"Generating speech...":"Generating multi-speaker dialogue...");const fe=await ff(oe,D.signal);return{audio:fe.blob,text:"",json:JSON.stringify({mode:$?L?"single_voice_clone":"tts":"multi_speaker",speakers:$?1:new Set(z.map(le=>le.speaker)).size,seed:D.seed,text_chunk_size:ee.text_chunk_size,wall_ms:fe.wallMs,rtf:fe.rtf},null,2)}}Kn(()=>o()(P)),Ee(()=>(e(p),e(u)),()=>{y(i,e(p).findIndex(D=>D.id===e(u)))}),Ee(()=>e(p),()=>{y(n,e(p).filter(D=>D.file&&D.transcript.trim()).length)}),kn(),Xi();var B=OC(),C=k(B),j=k(C);let G;var A=k(j);lf(A,{size:17}),Rt(),w(j);var N=q(j,2);let H;var E=k(N);jl(E,{size:17}),Rt(2),w(N),w(C);var U=q(C,2);{var O=D=>{var $=UC(),F=ht($),z=k(F),L=k(z);lf(L,{size:17}),Rt(),w(z);var Q=q(z,2);Bb(Q,{id:"drama-single",get busy(){return s()},get savedVoices(){return r()},get file(){return e(g)},set file(ce){y(g,ce)},get transcript(){return e(h)},set transcript(ce){y(h,ce)},$$legacy:!0}),w(F);var Z=q(F,2),ee=k(Z),oe=k(ee),fe=k(oe);Ad(fe,{size:17}),Rt(),w(oe);var le=q(oe,2);w(ee);var ge=q(ee,4);rn(ge);var R=q(ge,2),we=k(R);w(R),w(Z),ie(ce=>{le.disabled=s(),ge.disabled=s(),W(we,`${ce??""} characters`)},[()=>(e(m),x(()=>e(m).length.toLocaleString()))]),re("click",le,M),Ta(ge,()=>e(m),ce=>y(m,ce)),J(D,$)},V=D=>{var $=NC(),F=q(ht($),2),z=k(F),L=k(z),Q=k(L);jl(Q,{size:17});var Z=q(Q,2),ee=k(Z);w(Z),w(L);var oe=q(L,2),fe=k(oe);Ir(fe,{size:15}),Rt(),w(oe),w(z);var le=q(z,2),ge=k(le);Ct(ge,5,()=>e(p),ue=>ue.id,(ue,be)=>{var Se=RC();let Ie;var $e=k(Se),ze=k($e,!0);w($e);var Fe=q($e),qe=k(Fe,!0);w(Fe);var it=q(Fe,2);{var st=He=>{vm(He,{size:14,"aria-label":"Reference ready"})},Ne=La(()=>(e(be),x(()=>e(be).file&&e(be).transcript.trim())));ve(it,He=>{e(Ne)&&He(st)})}w(Se),ie(()=>{Se.disabled=s(),_e(Se,"aria-pressed",(e(u),e(be),x(()=>e(u)===e(be).id))),Ie=va(Se,1,"svelte-z6u13w",null,Ie,{chosen:e(u)===e(be).id}),W(ze,(e(be),x(()=>e(be).id+1))),W(qe,(e(be),x(()=>e(be).name)))}),re("click",Se,()=>y(u,e(be).id)),J(ue,Se)}),w(ge);var R=q(ge,2),we=k(R);sv(we,()=>e(u),ue=>{var be=BC(),Se=ht(be),Ie=k(Se),$e=q(k(Ie));Pt($e),w(Ie);var ze=q(Ie,2),Fe=k(ze);ho(Fe,{size:16}),w(ze),w(Se);var qe=q(Se,2);{let it=Lt(()=>`drama-speaker-${e(u)}`);Bb(qe,{get id(){return e(it)},get busy(){return s()},get savedVoices(){return r()},get file(){return e(p)[e(i)].file},set file(st){Bt(p,e(p)[e(i)].file=st)},get transcript(){return e(p)[e(i)].transcript},set transcript(st){Bt(p,e(p)[e(i)].transcript=st)},$$legacy:!0})}ie((it,st)=>{$e.disabled=s(),_e(ze,"title",it),ze.disabled=st},[()=>(e(_),e(u),x(()=>e(_).some(it=>it.speaker===e(u))?"Reassign or remove this speaker's dialogue first":"Remove speaker")),()=>(K(s()),e(p),e(_),e(u),x(()=>s()||e(p).length<=2||e(_).some(it=>it.speaker===e(u))))]),Ta($e,()=>e(p)[e(i)].name,it=>Bt(p,e(p)[e(i)].name=it)),re("click",ze,()=>v(e(u))),J(ue,be)}),w(R),w(le);var ce=q(le,2),Te=k(ce);w(ce),w(F);var he=q(F,2),je=k(he),Le=k(je),nt=k(Le);Ad(nt,{size:17});var Ae=q(nt,2),Ge=k(Ae);w(Ae),w(Le);var ne=q(Le,2);w(je);var Xe=q(je,2);Ct(Xe,7,()=>e(_),ue=>ue.id,(ue,be,Se)=>{var Ie=jC(),$e=k(Ie),ze=k($e),Fe=k(ze,!0);w(ze);var qe=q(ze,2),it=k(qe);w(qe);var st=q(qe,2);Ct(st,5,()=>e(p),Kt,(wt,Ye)=>{var ut=PC(),at=k(ut,!0);w(ut);var Zt={};ie(()=>{W(at,(e(Ye),x(()=>e(Ye).name))),Zt!==(Zt=(e(Ye),x(()=>e(Ye).id)))&&(ut.value=(ut.__value=(e(Ye),x(()=>e(Ye).id)))??"")}),J(wt,ut)}),w(st);var Ne=q(st,2),He=k(Ne),Be=k(He);Xv(Be,{size:14}),w(He);var Ue=q(He,2),tt=k(Ue);Jv(tt,{size:14}),w(Ue);var Re=q(Ue,2),Ve=k(Re);ho(Ve,{size:14}),w(Re),w(Ne),w($e);var _t=q($e,2),mt=k(_t);w(_t);var et=q(_t,2);rn(et),w(Ie),ie(wt=>{W(Fe,wt),_e(qe,"for",(e(be),x(()=>`drama-line-speaker-${e(be).id}`))),W(it,`Turn ${e(Se)+1} speaker`),_e(st,"id",(e(be),x(()=>`drama-line-speaker-${e(be).id}`))),st.disabled=s(),He.disabled=s()||e(Se)===0,Ue.disabled=(K(s()),K(e(Se)),e(_),x(()=>s()||e(Se)===e(_).length-1)),Re.disabled=s(),_e(_t,"for",(e(be),x(()=>`drama-line-${e(be).id}`))),W(mt,`Turn ${e(Se)+1} text`),_e(et,"id",(e(be),x(()=>`drama-line-${e(be).id}`))),et.disabled=s()},[()=>(K(e(Se)),x(()=>String(e(Se)+1).padStart(2,"0")))]),dr(st,()=>e(be).speaker,wt=>(e(be).speaker=wt,Wi(()=>e(_)),Wi(()=>{s(),e(p)}))),re("click",He,()=>T(e(Se),-1)),re("click",Ue,()=>T(e(Se),1)),re("click",Re,()=>y(_,e(_).filter(wt=>wt.id!==e(be).id))),Ta(et,()=>e(be).text,wt=>(e(be).text=wt,Wi(()=>e(_)),Wi(()=>{s(),e(p)}))),J(ue,Ie)}),w(Xe);var de=q(Xe,2),ye=k(de);Ir(ye,{size:15}),Rt(),w(de),w(he),ie(()=>{W(ee,`${e(p),x(()=>e(p).length)??""} / 16`),oe.disabled=(K(s()),e(p),x(()=>s()||e(p).length>=l)),W(Te,`${e(n)??""} of ${e(p),x(()=>e(p).length)??""} references ready`),W(Ge,`${e(_),x(()=>e(_).length)??""} turns`),ne.disabled=s(),de.disabled=s()}),re("click",oe,b),re("click",ne,M),re("click",de,S),J(D,$)};ve(U,D=>{e(d)==="single"?D(O):D(V,-1)})}w(B),ie(()=>{_e(j,"aria-pressed",e(d)==="single"),j.disabled=s(),G=va(j,1,"svelte-z6u13w",null,G,{chosen:e(d)==="single"}),_e(N,"aria-pressed",e(d)==="multi"),N.disabled=s(),H=va(N,1,"svelte-z6u13w",null,H,{chosen:e(d)==="multi"})}),re("click",j,()=>y(d,"single")),re("click",N,()=>y(d,"multi")),J(a,B),Ei()}function We(a){if(!a)throw new Error("Assertion failed.")}const DC=Math.PI/180,zm=180/Math.PI,bf=a=>{const t=(a%360+360)%360;if(t===0||t===90||t===180||t===270)return t;throw new Error(`Invalid rotation ${a}.`)},Pb=[1,0,0,0,1,0,0,0,1],LC=(a,t,i)=>{const[n,s,,r,o]=a,l=Math.abs(n)*t+Math.abs(r)*i,c=Math.abs(s)*t+Math.abs(o)*i;return yf(yf(Nb(-t/2,-i/2),a),Nb(l/2,c/2))},VC=a=>{const[t,i]=a,n=Math.atan2(i,HC(a)?-t:t);return bf(Rm(n*zm,90))},HC=a=>{const[t,i,,n,s]=a;return t*s-i*n<0},jb=a=>{const t=a*DC,i=Math.round(Math.cos(t)),n=Math.round(Math.sin(t));return[i,n,0,-n,i,0,0,0,1]},Nb=(a,t)=>[1,0,0,0,1,0,a,t,1],WC=(a,t)=>[a,0,0,0,t,0,0,0,1],yf=(a,t)=>{const i=new Array(9);for(let n=0;n<3;n++)for(let s=0;s<3;s++)i[3*n+s]=a[3*n]*t[s]+a[3*n+1]*t[3+s]+a[3*n+2]*t[6+s];return i},QC=(a,t,i,n)=>({rotation:bf(a+(t?-i:i)),flip:t!==n}),Mr=a=>a&&a[a.length-1],vo=a=>a>=0&&a<2**32,KC=a=>a>=-2147483648&&a<2**31,vt=a=>{let t=0;for(;a.readBits(1)===0&&t<32;)t++;if(t>=32)throw new Error("Invalid exponential-Golomb code.");return(1<{const t=vt(a);return(t&1)===0?-(t>>1):t+1>>1},YC=(a,t,i,n)=>{for(let s=t;s>i-s-1<a.constructor===Uint8Array?a:ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a),Dr=a=>a.constructor===DataView?a:ArrayBuffer.isView(a)?new DataView(a.buffer,a.byteOffset,a.byteLength):new DataView(a),JC=typeof globalThis.TextEncoder<"u"?globalThis.TextEncoder:class{constructor(){this.encoding="utf-8"}encode(t=""){const i=new Uint8Array(3*t.length);let n=0;for(let s=0;s>6,i[n++]=128|r&63;else if(r<55296||r>57343)i[n++]=224|r>>12,i[n++]=128|r>>6&63,i[n++]=128|r&63;else{const o=s+1=56320&&o<=57343?(r=65536+(r-55296<<10)+(o-56320),s++,i[n++]=240|r>>18,i[n++]=128|r>>12&63,i[n++]=128|r>>6&63,i[n++]=128|r&63):(i[n++]=239,i[n++]=191,i[n++]=189)}}return i.slice(0,n)}},ws=new JC,Bd={bt709:1,bt470bg:5,smpte170m:6,bt2020:9,smpte432:12},Pd={bt709:1,smpte170m:6,linear:8,"iec61966-2-1":13,pq:16,hlg:18},jd={rgb:0,bt709:1,bt470bg:5,smpte170m:6,"bt2020-ncl":9},Ob=a=>!a||a.primaries==null&&a.transfer==null&&a.matrix==null&&a.fullRange==null,wf=a=>a instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&a instanceof SharedArrayBuffer||ArrayBuffer.isView(a);class Ib{constructor(){this.currentPromise=Promise.resolve(),this.pending=0}async acquire(){let t;const i=new Promise(s=>{let r=!1;t=()=>{r||(s(),this.pending--,r=!0)}}),n=this.currentPromise;return this.currentPromise=i,this.pending++,await n,t}}const Db=(a,t,i)=>{let n=0,s=a.length-1,r=-1;for(;n<=s;){const o=n+(s-n+1)/2|0;i(a[o])<=t?(r=o,n=o+1):s=o-1}return r},Em=()=>{let a,t;return{promise:new Promise((n,s)=>{a=n,t=s}),resolve:a,reject:t}},yo=a=>{throw new Error(`Unexpected value: ${a}`)},XC=(a,t,i)=>{const n=a.getUint8(t),s=a.getUint8(t+1),r=a.getUint8(t+2);return n<<16|s<<8|r},Um=(a,t,i,n)=>{i=i>>>0,i=i&16777215,n?(a.setUint8(t,i&255),a.setUint8(t+1,i>>>8&255),a.setUint8(t+2,i>>>16&255)):(a.setUint8(t,i>>>16&255),a.setUint8(t+1,i>>>8&255),a.setUint8(t+2,i&255))},ZC=(a,t,i,n)=>{i=os(i,-8388608,8388607),i<0&&(i=i+16777216&16777215),Um(a,t,i,n)},os=(a,t,i)=>Math.max(t,Math.min(i,a)),eA=(a,t,i)=>a+(t-a)*i,Lb="und",Rm=(a,t)=>Math.round(a/t)*t,kf=(a,t)=>Math.round(a*t)/t,Vb=(a,t)=>Math.floor(a*t)/t,tA=a=>{let t=0;for(;a!==0;)a&=a-1,t++;return t},aA=/^[a-z]{3}$/,iA=a=>aA.test(a),Zo=1e6*(1+Number.EPSILON),nA=(a,t)=>{const i=a<0?-1:1;a=Math.abs(a);let n=0,s=1,r=1,o=0,l=a;for(;;){const c=Math.floor(l),d=c*r+n,g=c*o+s;if(g>t)return{num:i*r,den:o};if(n=r,s=o,r=d,o=g,l=1/(l-c),!isFinite(l))break}return{num:i*r,den:o}};class Hb{constructor(){this.currentPromise=Promise.resolve()}call(t){return this.currentPromise=this.currentPromise.then(t)}}let Bm=null;const sA=()=>Bm!==null?Bm:Bm=!!(typeof navigator<"u"&&(navigator.vendor?.match(/apple/i)||/AppleWebKit/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)||/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)));let Pm=null;const Wb=()=>Pm!==null?Pm:Pm=typeof navigator<"u"&&navigator.userAgent?.includes("Firefox");let jm=null;const rA=()=>jm!==null?jm:jm=!!(typeof navigator<"u"&&(navigator.vendor?.includes("Google Inc")||/Chrome/.test(navigator.userAgent))),Qb=a=>typeof globalThis.isSecureContext<"u"&&!globalThis.isSecureContext?`${a} is not available in this environment; this may be because this page is running in an insecure context. Try serving your page over HTTPS or use localhost.`:`${a} is not available in this environment.`,oA=(async()=>{})().constructor,el=a=>a instanceof oA||a instanceof Promise?!0:typeof a?.then=="function",Nm=function*(a){for(const t in a){const i=a[t];i!==void 0&&(yield{key:t,value:i})}},lA=a=>{switch(a.toLowerCase()){case"image/jpeg":case"image/jpg":return".jpg";case"image/png":return".png";case"image/gif":return".gif";case"image/webp":return".webp";case"image/bmp":return".bmp";case"image/svg+xml":return".svg";case"image/tiff":return".tiff";case"image/avif":return".avif";case"image/x-icon":case"image/vnd.microsoft.icon":return".ico";default:return null}},cA=(a,t)=>{if(a.length!==t.length)return!1;for(let i=0;i{Symbol.dispose??=Symbol("Symbol.dispose")},Kb=a=>typeof a=="number"&&!Number.isNaN(a),uA=(a,t)=>{let i=-1,n=1/0;for(let s=0;s{We(Number.isInteger(a.num)),We(Number.isInteger(a.den)),We(a.den!==0);let t=Math.abs(a.num),i=Math.abs(a.den);for(;i!==0;){const s=t%i;t=i,i=s}const n=t||1;return{num:a.num/n,den:a.den/n}},Im=(a,t)=>{if(typeof a!="object"||!a)throw new TypeError(`${t} must be an object.`);if(!Number.isInteger(a.left)||a.left<0)throw new TypeError(`${t}.left must be a non-negative integer.`);if(!Number.isInteger(a.top)||a.top<0)throw new TypeError(`${t}.top must be a non-negative integer.`);if(!Number.isInteger(a.width)||a.width<0)throw new TypeError(`${t}.width must be a non-negative integer.`);if(!Number.isInteger(a.height)||a.height<0)throw new TypeError(`${t}.height must be a non-negative integer.`)},fA=a=>new Promise(t=>setTimeout(t,a)),Yb=a=>Array.isArray(a)?a:[a];class Dm{constructor(){this._listeners=new Map}on(t,i,n){this._listeners.has(t)||this._listeners.set(t,new Set);const s={fn:i,once:n?.once??!1};return this._listeners.get(t).add(s),()=>{this._listeners.get(t)?.delete(s)}}_emit(...t){const[i,n]=t,s=this._listeners.get(i);if(s)for(const r of s){try{r.fn(n)}catch(o){console.error(o)}r.once&&s.delete(r)}}}const pA=a=>a!==null&&typeof a=="object"&&Object.getPrototypeOf(a)===Object.prototype&&Object.values(a).every(t=>typeof t=="string");var Lr;(function(a){a[a.Silent=0]="Silent",a[a.Errors=1]="Errors",a[a.Warnings=2]="Warnings",a[a.Info=3]="Info"})(Lr||(Lr={}));class _n{constructor(){}static get level(){return _n._level}static set level(t){if(t!==Lr.Silent&&t!==Lr.Errors&&t!==Lr.Warnings&&t!==Lr.Info)throw new TypeError("Invalid log level. Use one of the values of the LogLevel enum.");_n._level=t}static get _emitter(){return _n._emitterInstance??=new Dm}static on(t,i,n){return _n._emitter.on(t,i,n)}static _error(...t){_n._emitter._emit("error",t),_n._level>=Lr.Errors&&console.error(...t)}static _warn(...t){_n._emitter._emit("warn",t),_n._level>=Lr.Warnings&&console.warn(...t)}static _info(...t){_n._emitter._emit("info",t),_n._level>=Lr.Info&&console.info(...t)}}_n._level=Lr.Info,_n._emitterInstance=null;class Jb{constructor(t,i){if(this.data=t,this.mimeType=i,!(t instanceof Uint8Array))throw new TypeError("data must be a Uint8Array.");if(typeof i!="string")throw new TypeError("mimeType must be a string.")}}class Xb{constructor(t,i,n,s){if(this.data=t,this.mimeType=i,this.name=n,this.description=s,!(t instanceof Uint8Array))throw new TypeError("data must be a Uint8Array.");if(i!==void 0&&typeof i!="string")throw new TypeError("mimeType, when provided, must be a string.");if(n!==void 0&&typeof n!="string")throw new TypeError("name, when provided, must be a string.");if(s!==void 0&&typeof s!="string")throw new TypeError("description, when provided, must be a string.")}}const mA=a=>{if(!a||typeof a!="object")throw new TypeError("tags must be an object.");if(a.title!==void 0&&typeof a.title!="string")throw new TypeError("tags.title, when provided, must be a string.");if(a.description!==void 0&&typeof a.description!="string")throw new TypeError("tags.description, when provided, must be a string.");if(a.artist!==void 0&&typeof a.artist!="string")throw new TypeError("tags.artist, when provided, must be a string.");if(a.album!==void 0&&typeof a.album!="string")throw new TypeError("tags.album, when provided, must be a string.");if(a.albumArtist!==void 0&&typeof a.albumArtist!="string")throw new TypeError("tags.albumArtist, when provided, must be a string.");if(a.trackNumber!==void 0&&(!Number.isInteger(a.trackNumber)||a.trackNumber<=0))throw new TypeError("tags.trackNumber, when provided, must be a positive integer.");if(a.tracksTotal!==void 0&&(!Number.isInteger(a.tracksTotal)||a.tracksTotal<=0))throw new TypeError("tags.tracksTotal, when provided, must be a positive integer.");if(a.discNumber!==void 0&&(!Number.isInteger(a.discNumber)||a.discNumber<=0))throw new TypeError("tags.discNumber, when provided, must be a positive integer.");if(a.discsTotal!==void 0&&(!Number.isInteger(a.discsTotal)||a.discsTotal<=0))throw new TypeError("tags.discsTotal, when provided, must be a positive integer.");if(a.genre!==void 0&&typeof a.genre!="string")throw new TypeError("tags.genre, when provided, must be a string.");if(a.date!==void 0&&(!(a.date instanceof Date)||Number.isNaN(a.date.getTime())))throw new TypeError("tags.date, when provided, must be a valid Date.");if(a.beatsPerMinute!==void 0&&(!Number.isInteger(a.beatsPerMinute)||a.beatsPerMinute<=0))throw new TypeError("tags.beatsPerMinute, when provided, must be a positive integer.");if(a.lyrics!==void 0&&typeof a.lyrics!="string")throw new TypeError("tags.lyrics, when provided, must be a string.");if(a.images!==void 0){if(!Array.isArray(a.images))throw new TypeError("tags.images, when provided, must be an array.");for(const t of a.images){if(!t||typeof t!="object")throw new TypeError("Each image in tags.images must be an object.");if(!(t.data instanceof Uint8Array))throw new TypeError("Each image.data must be a Uint8Array.");if(typeof t.mimeType!="string")throw new TypeError("Each image.mimeType must be a string.");if(!["coverFront","coverBack","unknown"].includes(t.kind))throw new TypeError("Each image.kind must be 'coverFront', 'coverBack', or 'unknown'.")}}if(a.comment!==void 0&&typeof a.comment!="string")throw new TypeError("tags.comment, when provided, must be a string.");if(a.raw!==void 0){if(!a.raw||typeof a.raw!="object")throw new TypeError("tags.raw, when provided, must be an object.");for(const t of Object.values(a.raw))if(t!==null&&typeof t!="string"&&!(Array.isArray(t)&&t.every(i=>typeof i=="string"))&&!(t instanceof Uint8Array)&&!(t instanceof Jb)&&!(t instanceof Xb)&&!pA(t))throw new TypeError("Each value in tags.raw must be a string, string array, Uint8Array, RichImageData, AttachedFile, Record, or null.")}},gA=a=>{if(!a||typeof a!="object")throw new TypeError("disposition must be an object.");if(a.default!==void 0&&typeof a.default!="boolean")throw new TypeError("disposition.default must be a boolean.");if(a.primary!==void 0&&typeof a.primary!="boolean")throw new TypeError("disposition.primary must be a boolean.");if(a.forced!==void 0&&typeof a.forced!="boolean")throw new TypeError("disposition.forced must be a boolean.");if(a.original!==void 0&&typeof a.original!="boolean")throw new TypeError("disposition.original must be a boolean.");if(a.commentary!==void 0&&typeof a.commentary!="boolean")throw new TypeError("disposition.commentary must be a boolean.");if(a.hearingImpaired!==void 0&&typeof a.hearingImpaired!="boolean")throw new TypeError("disposition.hearingImpaired must be a boolean.");if(a.visuallyImpaired!==void 0&&typeof a.visuallyImpaired!="boolean")throw new TypeError("disposition.visuallyImpaired must be a boolean.")};class zn{constructor(t){this.bytes=t,this.pos=0}seekToByte(t){this.pos=8*t}readBit(){const t=Math.floor(this.pos/8),i=this.bytes[t]??0,n=7-(this.pos&7),s=(i&1<>n;return this.pos++,s}readBits(t){if(t===1)return this.readBit();let i=0;for(let n=0;n>n-s-1<0&&this.writeBits(s,i.readBits(s))}readAlignedByte(){if(this.pos%8!==0)throw new Error("Bitstream is not byte-aligned.");const t=this.pos/8,i=this.bytes[t]??0;return this.pos+=8,i}skipBits(t){this.pos+=t}getBitsLeft(){return this.bytes.length*8-this.pos}clone(){const t=new zn(this.bytes);return t.pos=this.pos,t}}const Nd=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],xf=[-1,1,2,3,4,5,6,8],hA=a=>{if(!a||a.byteLength<2)throw new TypeError("AAC description must be at least 2 bytes long.");const t=new zn(a),i=Lm(t),{frequencyIndex:n,sampleRate:s}=Vm(t),r=t.readBits(4);let o=null;r>=1&&r<=7&&(o=xf[r]);let l=i,c=!1,d=s;if(i===5||i===29)c=i===29,d=Vm(t).sampleRate,l=Lm(t),l===22&&t.skipBits(4);else for(;t.getBitsLeft()>15;){const g=t.pos;if(t.readBits(11)!==695){t.pos=g+1;continue}Lm(t)===5&&t.readBits(1)&&(d=Vm(t).sampleRate,t.getBitsLeft()>11&&t.readBits(11)===1352&&(c=!!t.readBits(1)));break}return o!==null&&o>1&&(c=!1),{objectType:i,coreObjectType:l,frequencyIndex:n,channelConfiguration:r,outputSampleRate:d,outputNumberOfChannels:c&&o===1?2:o}},Lm=a=>{const t=a.readBits(5);return t===31?32+a.readBits(6):t},Vm=a=>{const t=a.readBits(4);return t===15?{frequencyIndex:t,sampleRate:a.readBits(24)}:{frequencyIndex:t,sampleRate:t{const t=a.objectType===5||a.objectType===29,i=a.objectType===29,n=t?a.outputSampleRate/2:a.outputSampleRate,s=i?1:a.outputNumberOfChannels,r=xf.indexOf(s);if(r===-1)throw new TypeError(`Unsupported number of channels: ${a.outputNumberOfChannels}`);let o=16;a.objectType>=32&&(o+=6),Wm(n)===15&&(o+=24),t&&(o+=9,Wm(a.outputSampleRate)===15&&(o+=24));const l=Math.ceil(o/8),c=new Uint8Array(l),d=new zn(c);return Zb(d,a.objectType),ey(d,n),d.writeBits(4,r),t&&(ey(d,a.outputSampleRate),Zb(d,2)),d.writeBits(3,0),c},Zb=(a,t)=>{t<32?a.writeBits(5,t):(a.writeBits(5,31),a.writeBits(6,t-32))},ey=(a,t)=>{const i=Wm(t);a.writeBits(4,i),i===15&&a.writeBits(24,t)},Wm=a=>{const t=Nd.indexOf(a);return t===-1?15:t};const _A=[48e3,44100,32e3],vA=[24e3,22050,16e3];var wo;(function(a){a[a.NON_IDR_SLICE=1]="NON_IDR_SLICE",a[a.SLICE_DPA=2]="SLICE_DPA",a[a.SLICE_DPB=3]="SLICE_DPB",a[a.SLICE_DPC=4]="SLICE_DPC",a[a.IDR=5]="IDR",a[a.SEI=6]="SEI",a[a.SPS=7]="SPS",a[a.PPS=8]="PPS",a[a.AUD=9]="AUD",a[a.SPS_EXT=13]="SPS_EXT"})(wo||(wo={}));var hr;(function(a){a[a.RASL_N=8]="RASL_N",a[a.RASL_R=9]="RASL_R",a[a.BLA_W_LP=16]="BLA_W_LP",a[a.RSV_IRAP_VCL23=23]="RSV_IRAP_VCL23",a[a.VPS_NUT=32]="VPS_NUT",a[a.SPS_NUT=33]="SPS_NUT",a[a.PPS_NUT=34]="PPS_NUT",a[a.AUD_NUT=35]="AUD_NUT",a[a.PREFIX_SEI_NUT=39]="PREFIX_SEI_NUT",a[a.SUFFIX_SEI_NUT=40]="SUFFIX_SEI_NUT"})(hr||(hr={}));const Od=function*(a){let t=0,i=-1;for(;t=a.length-2)break;t=n;let s=0;if(t+3i&&(yield{offset:i,length:t-i}),i=t+s,t=i}i!==-1&&i{if(t.description){const s=(Ms(t.description)[4]&3)+1;return ty(a,s)}else return Od(a)},ay=a=>a&31,Sf=a=>{const t=[],i=a.length;for(let n=0;n{const i=a.reduce((r,o)=>r+t+o.byteLength,0),n=new Uint8Array(i);let s=0;for(const r of a){const o=new DataView(n.buffer,n.byteOffset,n.byteLength);switch(t){case 1:o.setUint8(s,r.byteLength);break;case 2:o.setUint16(s,r.byteLength,!1);break;case 3:Um(o,s,r.byteLength,!1);break;case 4:o.setUint32(s,r.byteLength,!1);break}s+=t,n.set(r,s),s+=r.byteLength}return n},wA=a=>{try{const t=[],i=[],n=[];for(const l of Od(a)){const c=a.subarray(l.offset,l.offset+l.length),d=ay(c[0]);d===wo.SPS?t.push(c):d===wo.PPS?i.push(c):d===wo.SPS_EXT&&n.push(c)}if(t.length===0||i.length===0)return null;const s=t[0],r=xA(s);We(r!==null);const o=r.profileIdc===100||r.profileIdc===110||r.profileIdc===122||r.profileIdc===144;return{configurationVersion:1,avcProfileIndication:r.profileIdc,profileCompatibility:r.constraintFlags,avcLevelIndication:r.levelIdc,lengthSizeMinusOne:3,sequenceParameterSets:t,pictureParameterSets:i,chromaFormat:o?r.chromaFormatIdc:null,bitDepthLumaMinus8:o?r.bitDepthLumaMinus8:null,bitDepthChromaMinus8:o?r.bitDepthChromaMinus8:null,sequenceParameterSetExt:o?n:null}}catch(t){return _n._error("Error building AVC Decoder Configuration Record:",t),null}},kA=a=>{const t=[];t.push(a.configurationVersion),t.push(a.avcProfileIndication),t.push(a.profileCompatibility),t.push(a.avcLevelIndication),t.push(252|a.lengthSizeMinusOne&3),t.push(224|a.sequenceParameterSets.length&31);for(const i of a.sequenceParameterSets){const n=i.byteLength;t.push(n>>8),t.push(n&255);for(let s=0;s>8),t.push(n&255);for(let s=0;s>8),t.push(n&255);for(let s=0;s{try{const t=Sf(a),i=new zn(t);if(i.skipBits(1),i.skipBits(2),i.readBits(5)!==7)return null;const s=i.readAlignedByte(),r=i.readAlignedByte(),o=i.readAlignedByte();vt(i);let l=1,c=0,d=0,g=0;if((s===100||s===110||s===122||s===244||s===44||s===83||s===86||s===118||s===128)&&(l=vt(i),l===3&&(g=i.readBits(1)),c=vt(i),d=vt(i),i.skipBits(1),i.readBits(1))){for(let O=0;O<(l!==3?8:12);O++)if(i.readBits(1)){const D=O<6?16:64;let $=8,F=8;for(let z=0;zz.level>=o)??Mr($f),F=Math.min(Math.floor($.maxDpbMbs/(O*D)),16);j=F,G=F}}return We(G!==null),{emulationUnpreventedBytes:t,profileIdc:s,constraintFlags:r,levelIdc:o,frameMbsOnlyFlag:v,chromaFormatIdc:l,bitDepthLumaMinus8:c,bitDepthChromaMinus8:d,codedWidth:u,codedHeight:f,displayWidth:_,displayHeight:b,pixelAspectRatio:C,colourPrimaries:S,matrixCoefficients:P,transferCharacteristics:M,fullRangeFlag:B,numReorderFrames:j,maxDecFrameBuffering:G,vuiParametersFlagBitOffset:H,bitstreamRestrictionFlagBitOffset:A,bitstreamRestrictionFlag:N}}catch(t){return _n._error("Error parsing AVC SPS:",t),null}},ny=a=>{const t=vt(a);a.skipBits(4),a.skipBits(4);for(let i=0;i<=t;i++)vt(a),vt(a),a.skipBits(1);a.skipBits(5),a.skipBits(5),a.skipBits(5),a.skipBits(5)},SA=(a,t)=>{if(t.description){const s=(Ms(t.description)[21]&3)+1;return ty(a,s)}else return Od(a)},Qm=a=>a>>1&63,TA=a=>{try{const t=new zn(Sf(a));t.skipBits(16),t.readBits(4);const i=t.readBits(3),n=t.readBits(1),{general_profile_space:s,general_tier_flag:r,general_profile_idc:o,general_profile_compatibility_flags:l,general_constraint_indicator_flags:c,general_level_idc:d}=qA(t,i);vt(t);const g=vt(t);let h=0;g===3&&(h=t.readBits(1));const m=vt(t),p=vt(t);let u=m,f=p;if(t.readBits(1)){const N=vt(t),H=vt(t),E=vt(t),U=vt(t);let O=1,V=1;const D=h===0?g:0;D===1?(O=2,V=2):D===2&&(O=2,V=1),u-=(N+H)*O,f-=(E+U)*V}const _=vt(t),b=vt(t);vt(t);const T=t.readBits(1)?0:i;let S=0;for(let N=T;N<=i;N++)vt(t),S=vt(t),vt(t);vt(t),vt(t),vt(t),vt(t),vt(t),vt(t),t.readBits(1)&&t.readBits(1)&&CA(t),t.skipBits(1),t.skipBits(1),t.readBits(1)&&(t.skipBits(4),t.skipBits(4),vt(t),vt(t),t.skipBits(1));const M=vt(t);if(AA(t,M),t.readBits(1)){const N=vt(t);for(let H=0;H{try{const t=[],i=[],n=[],s=[];for(const d of Od(a)){const g=a.subarray(d.offset,d.offset+d.length),h=Qm(g[0]);h===hr.VPS_NUT?t.push(g):h===hr.SPS_NUT?i.push(g):h===hr.PPS_NUT?n.push(g):(h===hr.PREFIX_SEI_NUT||h===hr.SUFFIX_SEI_NUT)&&s.push(g)}if(i.length===0||n.length===0)return null;const r=TA(i[0]);if(!r)return null;let o=0;if(n.length>0){const d=n[0],g=new zn(Sf(d));g.skipBits(16),vt(g),vt(g),g.skipBits(1),g.skipBits(1),g.skipBits(3),g.skipBits(1),g.skipBits(1),vt(g),vt(g),bo(g),g.skipBits(1),g.skipBits(1),g.readBits(1)&&vt(g),bo(g),bo(g),g.skipBits(1),g.skipBits(1),g.skipBits(1),g.skipBits(1);const h=g.readBits(1),m=g.readBits(1);!h&&!m?o=0:h&&!m?o=2:!h&&m?o=3:o=0}const l=[...t.length?[{arrayCompleteness:1,nalUnitType:hr.VPS_NUT,nalUnits:t}]:[],...i.length?[{arrayCompleteness:1,nalUnitType:hr.SPS_NUT,nalUnits:i}]:[],...n.length?[{arrayCompleteness:1,nalUnitType:hr.PPS_NUT,nalUnits:n}]:[],...s.length?[{arrayCompleteness:1,nalUnitType:Qm(s[0][0]),nalUnits:s}]:[]];return{configurationVersion:1,generalProfileSpace:r.generalProfileSpace,generalTierFlag:r.generalTierFlag,generalProfileIdc:r.generalProfileIdc,generalProfileCompatibilityFlags:r.generalProfileCompatibilityFlags,generalConstraintIndicatorFlags:r.generalConstraintIndicatorFlags,generalLevelIdc:r.generalLevelIdc,minSpatialSegmentationIdc:r.minSpatialSegmentationIdc,parallelismType:o,chromaFormatIdc:r.chromaFormatIdc,bitDepthLumaMinus8:r.bitDepthLumaMinus8,bitDepthChromaMinus8:r.bitDepthChromaMinus8,avgFrameRate:0,constantFrameRate:0,numTemporalLayers:r.spsMaxSubLayersMinus1+1,temporalIdNested:r.spsTemporalIdNestingFlag,lengthSizeMinusOne:3,arrays:l}}catch(t){return _n._error("Error building HEVC Decoder Configuration Record:",t),null}},qA=(a,t)=>{const i=a.readBits(2),n=a.readBits(1),s=a.readBits(5);let r=0;for(let g=0;g<32;g++)r=r<<1|a.readBits(1);const o=new Uint8Array(6);for(let g=0;g<6;g++)o[g]=a.readBits(8);const l=a.readBits(8),c=[],d=[];for(let g=0;g0)for(let g=t;g<8;g++)a.skipBits(2);for(let g=0;g{for(let t=0;t<4;t++)for(let i=0;i<(t===3?2:6);i++)if(!a.readBits(1))vt(a);else{const s=Math.min(64,1<<4+(t<<1));t>1&&bo(a);for(let r=0;r{const i=[];for(let n=0;n{let s=0,r=0,o=0;if(t!==0&&(r=a.readBits(1)),r){if(t===i){const c=vt(a);o=t-(c+1)}else o=t-1;a.readBits(1),vt(a);const l=n[o]??0;for(let c=0;c<=l;c++)a.readBits(1)||a.readBits(1);s=n[o]}else{const l=vt(a),c=vt(a);for(let d=0;d{let i=2,n=2,s=2,r=0,o=0,l={num:1,den:1};if(a.readBits(1)){const c=a.readBits(8);if(c===255)l={num:a.readBits(16),den:a.readBits(16)};else{const d=iy[c];d&&(l=d)}}return a.readBits(1)&&a.readBits(1),a.readBits(1)&&(a.readBits(3),r=a.readBits(1),a.readBits(1)&&(i=a.readBits(8),n=a.readBits(8),s=a.readBits(8))),a.readBits(1)&&(vt(a),vt(a)),a.readBits(1),a.readBits(1),a.readBits(1),a.readBits(1)&&(vt(a),vt(a),vt(a),vt(a)),a.readBits(1)&&(a.readBits(32),a.readBits(32),a.readBits(1)&&vt(a),a.readBits(1)&&MA(a,!0,t)),a.readBits(1)&&(a.readBits(1),a.readBits(1),a.readBits(1),o=vt(a),vt(a),vt(a),vt(a),vt(a)),{pixelAspectRatio:l,colourPrimaries:i,transferCharacteristics:n,matrixCoefficients:s,fullRangeFlag:r,minSpatialSegmentationIdc:o}},MA=(a,t,i)=>{let n=!1,s=!1,r=!1;n=a.readBits(1)===1,s=a.readBits(1)===1,(n||s)&&(r=a.readBits(1)===1,r&&(a.readBits(8),a.readBits(5),a.readBits(1),a.readBits(5)),a.readBits(4),a.readBits(4),r&&a.readBits(4),a.readBits(5),a.readBits(5),a.readBits(5));for(let o=0;o<=i;o++){const l=a.readBits(1)===1;let c=!0;l||(c=a.readBits(1)===1);let d=!1;c?vt(a):d=a.readBits(1)===1;let g=1;d||(g=vt(a)+1),n&&sy(a,g,r),s&&sy(a,g,r)}},sy=(a,t,i)=>{for(let n=0;n{const t=[];t.push(a.configurationVersion),t.push((a.generalProfileSpace&3)<<6|(a.generalTierFlag&1)<<5|a.generalProfileIdc&31),t.push(a.generalProfileCompatibilityFlags>>>24&255),t.push(a.generalProfileCompatibilityFlags>>>16&255),t.push(a.generalProfileCompatibilityFlags>>>8&255),t.push(a.generalProfileCompatibilityFlags&255),t.push(...a.generalConstraintIndicatorFlags),t.push(a.generalLevelIdc&255),t.push(240|a.minSpatialSegmentationIdc>>8&15),t.push(a.minSpatialSegmentationIdc&255),t.push(252|a.parallelismType&3),t.push(252|a.chromaFormatIdc&3),t.push(248|a.bitDepthLumaMinus8&7),t.push(248|a.bitDepthChromaMinus8&7),t.push(a.avgFrameRate>>8&255),t.push(a.avgFrameRate&255),t.push((a.constantFrameRate&3)<<6|(a.numTemporalLayers&7)<<3|(a.temporalIdNested&1)<<2|a.lengthSizeMinusOne&3),t.push(a.arrays.length&255);for(const i of a.arrays){t.push((i.arrayCompleteness&1)<<7|0|i.nalUnitType&63),t.push(i.nalUnits.length>>8&255),t.push(i.nalUnits.length&255);for(const n of i.nalUnits){t.push(n.length>>8&255),t.push(n.length&255);for(let s=0;s{let n=0;for(let s=0;s<8;s++){const r=t.readAlignedByte();if(n+=(r&127)*2**(s*7),!(r&128))break;if(s===7&&r&128)return null}return n>2**32-1?null:n};for(;t.getBitsLeft()>=8;){t.skipBits(1);const n=t.readBits(4),s=t.readBits(1),r=t.readBits(1);t.skipBits(1),s&&t.skipBits(8);let o;if(r){const l=i();if(l===null)return;o=l}else o=Math.floor(t.getBitsLeft()/8);We(t.pos%8===0),yield{type:n,data:a.subarray(t.pos/8,t.pos/8+o)},t.skipBits(o*8)}},oy=a=>{const t=Dr(a),i=t.getUint8(9),n=t.getUint16(10,!0),s=t.getUint32(12,!0),r=t.getInt16(16,!0),o=t.getUint8(18);let l=null;return o&&(l=a.subarray(19,21+i)),{outputChannelCount:i,preSkip:n,inputSampleRate:s,outputGain:r,channelMappingFamily:o,channelMappingTable:l}},UA=(a,t,i)=>{switch(a){case"avc":{for(const n of bA(i,t)){const s=i[n.offset],r=ay(s);if(r>=wo.NON_IDR_SLICE&&r<=wo.SLICE_DPC)return"delta";if(r===wo.IDR)return"key";if(r===wo.SEI&&!rA()){const o=i.subarray(n.offset,n.offset+n.length),l=Sf(o);let c=1;do{let d=0;for(;;){const m=l[c++];if(m===void 0||(d+=m,m<255))break}let g=0;for(;;){const m=l[c++];if(m===void 0||(g+=m,m<255))break}if(d===6){const m=new zn(l);m.pos=8*c;const p=vt(m),u=m.readBits(1);if(p===0&&u===1)return"key"}c+=g}while(c{if(a.length<7||a[0]!==11||a[1]!==119)return null;const t=new zn(a);t.skipBits(16),t.skipBits(16);const i=t.readBits(2);if(i===3)return null;const n=t.readBits(6),s=t.readBits(5);if(s>8)return null;const r=t.readBits(3),o=t.readBits(3);(o&1)!==0&&o!==1&&t.skipBits(2),(o&4)!==0&&t.skipBits(2),o===2&&t.skipBits(2);const l=t.readBits(1),c=Math.floor(n/2);return{fscod:i,bsid:s,bsmod:r,acmod:o,lfeon:l,bitRateCode:c}},BA=[1,2,3,6],PA=a=>{if(a.length<6||a[0]!==11||a[1]!==119)return null;const t=new zn(a);t.skipBits(16);const i=t.readBits(2);if(t.skipBits(3),i!==0&&i!==2)return null;const n=t.readBits(11),s=t.readBits(2);let r=0,o;s===3?(r=t.readBits(2),o=3):o=t.readBits(2);const l=t.readBits(3),c=t.readBits(1),d=t.readBits(5);if(d<11||d>16)return null;const g=BA[o];let h;return s<3?h=_A[s]/1e3:h=vA[r]/1e3,{dataRate:Math.round((n+1)*h/(g*16)),substreams:[{fscod:s,fscod2:r,bsid:d,bsmod:0,acmod:l,lfeon:c,numDepSub:0,chanLoc:0}]}},jA=1683496997,NA=18,OA=10,cy=32,IA=20,DA=8,LA=[0,8e3,16e3,32e3,0,0,11025,22050,44100,0,0,12e3,24e3,48e3,96e3,192e3],VA=[32e3,56e3,64e3,96e3,112e3,128e3,192e3,224e3,256e3,32e4,384e3,448e3,512e3,576e3,64e4,768e3,96e4,1024e3,1152e3,128e4,1344e3,1408e3,1411200,1472e3,1536e3,192e4,2048e3,3072e3,384e4,0,0,0],HA=[16,16,20,20,0,24,24,0],dy=[1,2,2,2,2,3,3,4,4,5,6,6,6,7,8,8],WA=[1,2,2,2,2,3,18,19,6,7,518,323,83,519,582,535],QA=8,KA=[32e3,44100,48e3,0],YA=[8e3,16e3,32e3,64e3,128e3,22050,44100,88200,176400,352800,12e3,24e3,48e3,96e3,192e3,384e3],JA=[512,1024,2048,4096],XA=a=>{const t=ZA(a),i=Dr(a);let n=t?Math.ceil(t.frameSize/4)*4:0,s=null;for(;n+4<=a.length&&i.getUint32(n)===jA;){const o=eG(a.subarray(n));if(!o)break;s??=o,n+=o.frameSize}if(t)return{frameSize:s?n:t.frameSize,sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels,sampleCount:t.sampleCount,channelLayout:t.channelLayout,pcmResolution:t.pcmResolution,bitRate:t.bitRate,core:t,hasExtensions:s!==null};if(!s?.asset)return null;const{asset:r}=s;return{frameSize:n,sampleRate:r.sampleRate,numberOfChannels:r.numberOfChannels,sampleCount:r.sampleCount,channelLayout:r.channelLayout,pcmResolution:r.pcmResolution,bitRate:0,core:null,hasExtensions:!0}},ZA=a=>{if(a.length=dy.length)return null;const o=LA[t.readBits(4)];if(o===0)return null;const l=VA[t.readBits(5)];if(t.readBits(1)!==0)return null;t.skipBits(4),t.skipBits(5);const c=t.readBits(2);if(c===3)return null;t.skipBits(1),i&&t.skipBits(16),t.skipBits(7);const d=HA[t.readBits(3)];if(d===0)return null;const g=c!==0;return{frameSize:s,sampleRate:o,numberOfChannels:dy[r]+(g?1:0),sampleCount:n*cy,channelLayout:WA[r]|(g?QA:0),amode:r,lfePresent:g,bitRate:l,pcmResolution:d}},eG=a=>{if(a.length2&&t.skipBits(1),f>6&&t.skipBits(1),t.readBits(1))){const b=t.readBits(2)+1<<2;_=t.readBits(b)}return c===0||t.getBitsLeft()<0?l:{frameSize:o,asset:{sampleRate:u,numberOfChannels:f,sampleCount:Math.round(d*u/c),channelLayout:_,pcmResolution:p}}},tG=a=>{const t=new Uint8Array(IA),i=Dr(t);i.setUint32(0,a.sampleRate),i.setUint32(4,a.bitRate),i.setUint32(8,a.bitRate),t[12]=a.pcmResolution;const n=a.core&&!a.hasExtensions?1:0,s=new zn(t);return s.seekToByte(13),s.writeBits(2,Math.max(JA.indexOf(a.sampleCount),0)),s.writeBits(5,n),s.writeBits(1,a.core?.lfePresent?1:0),s.writeBits(6,a.core?.amode??0),s.writeBits(14,a.core?a.core.frameSize-1:0),s.writeBits(1,0),s.writeBits(3,0),s.writeBits(16,a.channelLayout),s.writeBits(1,0),s.writeBits(1,0),s.writeBits(1,0),s.writeBits(5,0),t};const zr=["avc","hevc","vp9","av1","vp8","prores"],js=["pcm-s16","pcm-s16be","pcm-s24","pcm-s24be","pcm-s32","pcm-s32be","pcm-f32","pcm-f32be","pcm-f64","pcm-f64be","pcm-u8","pcm-s8","ulaw","alaw"],Tf=["aac","opus","mp3","vorbis","flac","ac3","eac3","dts"],tl=[...Tf,...js],Il=["webvtt"],$f=[{maxMacroblocks:99,maxBitrate:64e3,maxDpbMbs:396,level:10},{maxMacroblocks:396,maxBitrate:192e3,maxDpbMbs:900,level:11},{maxMacroblocks:396,maxBitrate:384e3,maxDpbMbs:2376,level:12},{maxMacroblocks:396,maxBitrate:768e3,maxDpbMbs:2376,level:13},{maxMacroblocks:396,maxBitrate:2e6,maxDpbMbs:2376,level:20},{maxMacroblocks:792,maxBitrate:4e6,maxDpbMbs:4752,level:21},{maxMacroblocks:1620,maxBitrate:4e6,maxDpbMbs:8100,level:22},{maxMacroblocks:1620,maxBitrate:1e7,maxDpbMbs:8100,level:30},{maxMacroblocks:3600,maxBitrate:14e6,maxDpbMbs:18e3,level:31},{maxMacroblocks:5120,maxBitrate:2e7,maxDpbMbs:20480,level:32},{maxMacroblocks:8192,maxBitrate:2e7,maxDpbMbs:32768,level:40},{maxMacroblocks:8192,maxBitrate:5e7,maxDpbMbs:32768,level:41},{maxMacroblocks:8704,maxBitrate:5e7,maxDpbMbs:34816,level:42},{maxMacroblocks:22080,maxBitrate:135e6,maxDpbMbs:110400,level:50},{maxMacroblocks:36864,maxBitrate:24e7,maxDpbMbs:184320,level:51},{maxMacroblocks:36864,maxBitrate:24e7,maxDpbMbs:184320,level:52},{maxMacroblocks:139264,maxBitrate:24e7,maxDpbMbs:696320,level:60},{maxMacroblocks:139264,maxBitrate:48e7,maxDpbMbs:696320,level:61},{maxMacroblocks:139264,maxBitrate:8e8,maxDpbMbs:696320,level:62}],uy=[{maxPictureSize:36864,maxBitrate:128e3,tier:"L",level:30},{maxPictureSize:122880,maxBitrate:15e5,tier:"L",level:60},{maxPictureSize:245760,maxBitrate:3e6,tier:"L",level:63},{maxPictureSize:552960,maxBitrate:6e6,tier:"L",level:90},{maxPictureSize:983040,maxBitrate:1e7,tier:"L",level:93},{maxPictureSize:2228224,maxBitrate:12e6,tier:"L",level:120},{maxPictureSize:2228224,maxBitrate:3e7,tier:"H",level:120},{maxPictureSize:2228224,maxBitrate:2e7,tier:"L",level:123},{maxPictureSize:2228224,maxBitrate:5e7,tier:"H",level:123},{maxPictureSize:8912896,maxBitrate:25e6,tier:"L",level:150},{maxPictureSize:8912896,maxBitrate:1e8,tier:"H",level:150},{maxPictureSize:8912896,maxBitrate:4e7,tier:"L",level:153},{maxPictureSize:8912896,maxBitrate:16e7,tier:"H",level:153},{maxPictureSize:8912896,maxBitrate:6e7,tier:"L",level:156},{maxPictureSize:8912896,maxBitrate:24e7,tier:"H",level:156},{maxPictureSize:35651584,maxBitrate:6e7,tier:"L",level:180},{maxPictureSize:35651584,maxBitrate:24e7,tier:"H",level:180},{maxPictureSize:35651584,maxBitrate:12e7,tier:"L",level:183},{maxPictureSize:35651584,maxBitrate:48e7,tier:"H",level:183},{maxPictureSize:35651584,maxBitrate:24e7,tier:"L",level:186},{maxPictureSize:35651584,maxBitrate:8e8,tier:"H",level:186}],fy=[{maxPictureSize:36864,maxBitrate:2e5,level:10},{maxPictureSize:73728,maxBitrate:8e5,level:11},{maxPictureSize:122880,maxBitrate:18e5,level:20},{maxPictureSize:245760,maxBitrate:36e5,level:21},{maxPictureSize:552960,maxBitrate:72e5,level:30},{maxPictureSize:983040,maxBitrate:12e6,level:31},{maxPictureSize:2228224,maxBitrate:18e6,level:40},{maxPictureSize:2228224,maxBitrate:3e7,level:41},{maxPictureSize:8912896,maxBitrate:6e7,level:50},{maxPictureSize:8912896,maxBitrate:12e7,level:51},{maxPictureSize:8912896,maxBitrate:18e7,level:52},{maxPictureSize:35651584,maxBitrate:18e7,level:60},{maxPictureSize:35651584,maxBitrate:24e7,level:61},{maxPictureSize:35651584,maxBitrate:48e7,level:62}],py=[{maxPictureSize:147456,maxBitrate:15e5,tier:"M",level:0},{maxPictureSize:278784,maxBitrate:3e6,tier:"M",level:1},{maxPictureSize:665856,maxBitrate:6e6,tier:"M",level:4},{maxPictureSize:1065024,maxBitrate:1e7,tier:"M",level:5},{maxPictureSize:2359296,maxBitrate:12e6,tier:"M",level:8},{maxPictureSize:2359296,maxBitrate:3e7,tier:"H",level:8},{maxPictureSize:2359296,maxBitrate:2e7,tier:"M",level:9},{maxPictureSize:2359296,maxBitrate:5e7,tier:"H",level:9},{maxPictureSize:8912896,maxBitrate:3e7,tier:"M",level:12},{maxPictureSize:8912896,maxBitrate:1e8,tier:"H",level:12},{maxPictureSize:8912896,maxBitrate:4e7,tier:"M",level:13},{maxPictureSize:8912896,maxBitrate:16e7,tier:"H",level:13},{maxPictureSize:8912896,maxBitrate:6e7,tier:"M",level:14},{maxPictureSize:8912896,maxBitrate:24e7,tier:"H",level:14},{maxPictureSize:35651584,maxBitrate:6e7,tier:"M",level:15},{maxPictureSize:35651584,maxBitrate:24e7,tier:"H",level:15},{maxPictureSize:35651584,maxBitrate:6e7,tier:"M",level:16},{maxPictureSize:35651584,maxBitrate:24e7,tier:"H",level:16},{maxPictureSize:35651584,maxBitrate:1e8,tier:"M",level:17},{maxPictureSize:35651584,maxBitrate:48e7,tier:"H",level:17},{maxPictureSize:35651584,maxBitrate:16e7,tier:"M",level:18},{maxPictureSize:35651584,maxBitrate:8e8,tier:"H",level:18},{maxPictureSize:35651584,maxBitrate:16e7,tier:"M",level:19},{maxPictureSize:35651584,maxBitrate:8e8,tier:"H",level:19}],Id=["ap4x","ap4h","apch","apcn","apcs","apco"],Km=["dtsc","dtsh","dtsl","dtse"],aG=[{fourCc:"apco",bitrate:45e6,alpha:!1},{fourCc:"apcs",bitrate:102e6,alpha:!1},{fourCc:"apcn",bitrate:147e6,alpha:!1},{fourCc:"apch",bitrate:22e7,alpha:!1},{fourCc:"ap4h",bitrate:33e7,alpha:!0},{fourCc:"ap4x",bitrate:5e8,alpha:!0}],iG=(a,t,i,n,s)=>{if(a==="avc"){const o=Math.ceil(t/16)*Math.ceil(i/16),l=$f.find(m=>o<=m.maxMacroblocks&&n<=m.maxBitrate)??Mr($f),c=l?l.level:0,d="64".padStart(2,"0"),g="00",h=c.toString(16).padStart(2,"0");return`avc1.${d}${g}${h}`}else if(a==="hevc"){const c=t*i,d=uy.find(h=>c<=h.maxPictureSize&&n<=h.maxBitrate)??Mr(uy);return`hev1.1.6.${d.tier}${d.level}.B0`}else{if(a==="vp8")return"vp8";if(a==="vp9"){const o=t*i;return`vp09.00.${(fy.find(d=>o<=d.maxPictureSize&&n<=d.maxBitrate)??Mr(fy)).level.toString().padStart(2,"0")}.08`}else if(a==="av1"){const o=t*i,l=py.find(g=>o<=g.maxPictureSize&&n<=g.maxBitrate)??Mr(py);return`av01.0.${l.level.toString().padStart(2,"0")}${l.tier}.08`}else if(a==="prores"){const o=Math.pow(t*i/2073600,.95),l=aG.filter(g=>g.alpha===s);let c=l[0].fourCc,d=1/0;for(const{fourCc:g,bitrate:h}of l){const m=Math.abs(h*o-n);m{const t=a.split("."),i=Number(t[1]),n=Number(t[2]),s=Number(t[3]),r=t[4]?Number(t[4]):1;return[1,1,i,2,1,n,3,1,s,4,1,r]},my=a=>{const t=a.split("."),s=(1<<7)+1,r=Number(t[1]),o=t[2],l=Number(o.slice(0,-1)),c=(r<<5)+l,d=o.slice(-1)==="H"?1:0,g=Number(t[3]),h=g===8?0:1,m=g===12?1:0,p=t[4]?Number(t[4]):0,u=t[5]?Number(t[5][0]):1,f=t[5]?Number(t[5][1]):1,_=t[5]?Number(t[5][2]):0,b=(d<<7)+(h<<6)+(m<<5)+(p<<4)+(u<<3)+(f<<2)+_;return[s,c,b,0]},sG=(a,t,i)=>{if(a==="aac")return t>=2&&i<=24e3?"mp4a.40.29":i<=24e3?"mp4a.40.5":"mp4a.40.2";if(a==="mp3")return"mp3";if(a==="opus")return"opus";if(a==="vorbis")return"vorbis";if(a==="flac")return"flac";if(a==="ac3")return"ac-3";if(a==="eac3")return"ec-3";if(a==="dts")return"dtsc";if(js.includes(a))return a;throw new TypeError(`Unhandled codec '${a}'.`)},rG=48e3,gy=/^pcm-([usf])(\d+)(be)?$/,al=a=>{if(We(js.includes(a)),a==="ulaw")return{dataType:"ulaw",sampleSize:1,littleEndian:!0,silentValue:255};if(a==="alaw")return{dataType:"alaw",sampleSize:1,littleEndian:!0,silentValue:213};const t=gy.exec(a);We(t);let i;t[1]==="u"?i="unsigned":t[1]==="s"?i="signed":i="float";const n=Number(t[2])/8,s=t[3]!=="be",r=a==="pcm-u8"?2**7:0;return{dataType:i,sampleSize:n,littleEndian:s,silentValue:r}},qf=a=>a.startsWith("avc1")||a.startsWith("avc3")?"avc":a.startsWith("hev1")||a.startsWith("hvc1")?"hevc":a==="vp8"?"vp8":a.startsWith("vp09")?"vp9":a.startsWith("av01")?"av1":Id.includes(a)?"prores":a==="mp3"||a==="mp4a.69"||a==="mp4a.6B"||a==="mp4a.6b"||a==="mp4a.40.34"?"mp3":a.startsWith("mp4a.40.")||a==="mp4a.67"?"aac":a==="opus"?"opus":a==="vorbis"?"vorbis":a==="flac"?"flac":a==="ac-3"||a==="ac3"?"ac3":a==="ec-3"||a==="eac3"?"eac3":Km.includes(a)?"dts":a==="ulaw"?"ulaw":a==="alaw"?"alaw":gy.test(a)?a:a==="webvtt"?"webvtt":null,oG=a=>a==="avc"?{avc:{format:"avc"}}:a==="hevc"?{hevc:{format:"hevc"}}:{},lG=a=>a==="aac"?{aac:{format:"aac"}}:a==="opus"?{opus:{format:"opus"}}:{},cG=["avc1","avc3","hev1","hvc1","vp8","vp09","av01",...Id],dG=/^(avc1|avc3)\.[0-9a-fA-F]{6}$/,uG=/^(hev1|hvc1)\.(?:[ABC]?\d+)\.[0-9a-fA-F]{1,8}\.[LH]\d+(?:\.[0-9a-fA-F]{1,2}){0,6}$/,fG=/^vp09(?:\.\d{2}){3}(?:(?:\.\d{2}){5})?$/,pG=/^av01\.\d\.\d{2}[MH]\.\d{2}(?:\.\d\.\d{3}\.\d{2}\.\d{2}\.\d{2}\.\d)?$/,Ym=(a,t)=>{if(!a)throw new TypeError("Video chunk metadata must be provided.");if(typeof a!="object")throw new TypeError("Video chunk metadata must be an object.");if(!a.decoderConfig)throw new TypeError("Video chunk metadata must include a decoder configuration.");if(typeof a.decoderConfig!="object")throw new TypeError("Video chunk metadata decoder configuration must be an object.");if(typeof a.decoderConfig.codec!="string")throw new TypeError("Video chunk metadata decoder configuration must specify a codec string.");if(!cG.some(i=>a.decoderConfig.codec.startsWith(i)))throw new TypeError("Video chunk metadata decoder configuration codec string must be a valid video codec string as specified in the Mediabunny Codec Registry.");if(!Number.isInteger(a.decoderConfig.codedWidth)||a.decoderConfig.codedWidth<=0)throw new TypeError("Video chunk metadata decoder configuration must specify a valid codedWidth (positive integer).");if(!Number.isInteger(a.decoderConfig.codedHeight)||a.decoderConfig.codedHeight<=0)throw new TypeError("Video chunk metadata decoder configuration must specify a valid codedHeight (positive integer).");if(a.decoderConfig.displayAspectWidth!==void 0&&(!Number.isInteger(a.decoderConfig.displayAspectWidth)||a.decoderConfig.displayAspectWidth<=0))throw new TypeError("Video chunk metadata decoder configuration displayAspectWidth, when defined, must be a positive integer.");if(a.decoderConfig.displayAspectHeight!==void 0&&(!Number.isInteger(a.decoderConfig.displayAspectHeight)||a.decoderConfig.displayAspectHeight<=0))throw new TypeError("Video chunk metadata decoder configuration displayAspectHeight, when defined, must be a positive integer.");if(a.decoderConfig.displayAspectWidth!==void 0!=(a.decoderConfig.displayAspectHeight!==void 0))throw new TypeError("Video chunk metadata decoder configuration must specify both displayAspectWidth and displayAspectHeight, or neither.");if(a.decoderConfig.description!==void 0&&!wf(a.decoderConfig.description))throw new TypeError("Video chunk metadata decoder configuration description, when defined, must be an ArrayBuffer or an ArrayBuffer view.");if(a.decoderConfig.colorSpace!==void 0){const{colorSpace:i}=a.decoderConfig;if(typeof i!="object")throw new TypeError("Video chunk metadata decoder configuration colorSpace, when provided, must be an object.");const n=Object.keys(Bd);if(i.primaries!=null&&!n.includes(i.primaries))throw new TypeError(`Video chunk metadata decoder configuration colorSpace primaries, when defined, must be one of ${n.join(", ")}.`);const s=Object.keys(Pd);if(i.transfer!=null&&!s.includes(i.transfer))throw new TypeError(`Video chunk metadata decoder configuration colorSpace transfer, when defined, must be one of ${s.join(", ")}.`);const r=Object.keys(jd);if(i.matrix!=null&&!r.includes(i.matrix))throw new TypeError(`Video chunk metadata decoder configuration colorSpace matrix, when defined, must be one of ${r.join(", ")}.`);if(i.fullRange!=null&&typeof i.fullRange!="boolean")throw new TypeError("Video chunk metadata decoder configuration colorSpace fullRange, when defined, must be a boolean.")}if(a.decoderConfig.codec.startsWith("avc1")||a.decoderConfig.codec.startsWith("avc3")){if(!dG.test(a.decoderConfig.codec))throw new TypeError("Video chunk metadata decoder configuration codec string for AVC must be a valid AVC codec string as specified in Section 3.4 of RFC 6381.")}else if(a.decoderConfig.codec.startsWith("hev1")||a.decoderConfig.codec.startsWith("hvc1")){if(!uG.test(a.decoderConfig.codec))throw new TypeError("Video chunk metadata decoder configuration codec string for HEVC must be a valid HEVC codec string as specified in Section E.3 of ISO 14496-15.")}else if(a.decoderConfig.codec.startsWith("vp8")){if(a.decoderConfig.codec!=="vp8")throw new TypeError('Video chunk metadata decoder configuration codec string for VP8 must be "vp8".')}else if(a.decoderConfig.codec.startsWith("vp09")){if(!fG.test(a.decoderConfig.codec))throw new TypeError('Video chunk metadata decoder configuration codec string for VP9 must be a valid VP9 codec string as specified in Section "Codecs Parameter String" of https://www.webmproject.org/vp9/mp4/.')}else if(a.decoderConfig.codec.startsWith("av01")){if(!pG.test(a.decoderConfig.codec))throw new TypeError('Video chunk metadata decoder configuration codec string for AV1 must be a valid AV1 codec string as specified in Section "Codecs Parameter String" of https://aomediacodec.github.io/av1-isobmff/.')}else if(Id.some(i=>a.decoderConfig.codec.startsWith(i))&&!Id.some(i=>a.decoderConfig.codec===i))throw new TypeError(`Video chunk metadata decoder configuration codec string for ProRes must be one of the valid ProRes four-character codes: ${Id.join(", ")}.`);if(t!==null&&qf(a.decoderConfig.codec)!==t)throw new TypeError(`Video chunk metadata decoder configuration codec string '${a.decoderConfig.codec}' does not fit to the track codec '${t}'.`)},mG=["mp4a","mp3","opus","vorbis","flac","ulaw","alaw","pcm","ac-3","ec-3","dts"],Jm=(a,t)=>{if(!a)throw new TypeError("Audio chunk metadata must be provided.");if(typeof a!="object")throw new TypeError("Audio chunk metadata must be an object.");if(!a.decoderConfig)throw new TypeError("Audio chunk metadata must include a decoder configuration.");if(typeof a.decoderConfig!="object")throw new TypeError("Audio chunk metadata decoder configuration must be an object.");if(typeof a.decoderConfig.codec!="string")throw new TypeError("Audio chunk metadata decoder configuration must specify a codec string.");if(!mG.some(i=>a.decoderConfig.codec.startsWith(i)))throw new TypeError("Audio chunk metadata decoder configuration codec string must be a valid audio codec string as specified in the Mediabunny Codec Registry.");if(!Number.isInteger(a.decoderConfig.sampleRate)||a.decoderConfig.sampleRate<=0)throw new TypeError("Audio chunk metadata decoder configuration must specify a valid sampleRate (positive integer).");if(!Number.isInteger(a.decoderConfig.numberOfChannels)||a.decoderConfig.numberOfChannels<=0)throw new TypeError("Audio chunk metadata decoder configuration must specify a valid numberOfChannels (positive integer).");if(a.decoderConfig.description!==void 0&&!wf(a.decoderConfig.description))throw new TypeError("Audio chunk metadata decoder configuration description, when defined, must be an ArrayBuffer or an ArrayBuffer view.");if(a.decoderConfig.codec.startsWith("mp4a")&&a.decoderConfig.codec!=="mp4a.69"&&a.decoderConfig.codec!=="mp4a.6B"&&a.decoderConfig.codec!=="mp4a.6b"){if(!["mp4a.40.2","mp4a.40.02","mp4a.40.5","mp4a.40.05","mp4a.40.29","mp4a.67"].includes(a.decoderConfig.codec))throw new TypeError("Audio chunk metadata decoder configuration codec string for AAC must be a valid AAC codec string as specified in https://www.w3.org/TR/webcodecs-aac-codec-registration/.")}else if(a.decoderConfig.codec.startsWith("mp3")||a.decoderConfig.codec.startsWith("mp4a")){if(a.decoderConfig.codec!=="mp3"&&a.decoderConfig.codec!=="mp4a.69"&&a.decoderConfig.codec!=="mp4a.6B"&&a.decoderConfig.codec!=="mp4a.6b")throw new TypeError('Audio chunk metadata decoder configuration codec string for MP3 must be "mp3", "mp4a.69" or "mp4a.6B".')}else if(a.decoderConfig.codec.startsWith("opus")){if(a.decoderConfig.codec!=="opus")throw new TypeError('Audio chunk metadata decoder configuration codec string for Opus must be "opus".');if(a.decoderConfig.description&&a.decoderConfig.description.byteLength<18)throw new TypeError("Audio chunk metadata decoder configuration description, when specified, is expected to be an Identification Header as specified in Section 5.1 of RFC 7845.")}else if(a.decoderConfig.codec.startsWith("vorbis")){if(a.decoderConfig.codec!=="vorbis")throw new TypeError('Audio chunk metadata decoder configuration codec string for Vorbis must be "vorbis".');if(!a.decoderConfig.description)throw new TypeError("Audio chunk metadata decoder configuration for Vorbis must include a description, which is expected to adhere to the format described in https://www.w3.org/TR/webcodecs-vorbis-codec-registration/.")}else if(a.decoderConfig.codec.startsWith("flac")){if(a.decoderConfig.codec!=="flac")throw new TypeError('Audio chunk metadata decoder configuration codec string for FLAC must be "flac".');if(!a.decoderConfig.description||a.decoderConfig.description.byteLength<42)throw new TypeError("Audio chunk metadata decoder configuration for FLAC must include a description, which is expected to adhere to the format described in https://www.w3.org/TR/webcodecs-flac-codec-registration/.")}else if(a.decoderConfig.codec.startsWith("ac-3")||a.decoderConfig.codec.startsWith("ac3")){if(a.decoderConfig.codec!=="ac-3")throw new TypeError('Audio chunk metadata decoder configuration codec string for AC-3 must be "ac-3".')}else if(a.decoderConfig.codec.startsWith("ec-3")||a.decoderConfig.codec.startsWith("eac3")){if(a.decoderConfig.codec!=="ec-3")throw new TypeError('Audio chunk metadata decoder configuration codec string for EC-3 must be "ec-3".')}else if(a.decoderConfig.codec.startsWith("dts")){if(!Km.includes(a.decoderConfig.codec))throw new TypeError(`Audio chunk metadata decoder configuration codec string for DTS must be one of the following four-character codes: ${Km.join(", ")}.`)}else if((a.decoderConfig.codec.startsWith("pcm")||a.decoderConfig.codec.startsWith("ulaw")||a.decoderConfig.codec.startsWith("alaw"))&&!js.includes(a.decoderConfig.codec))throw new TypeError(`Audio chunk metadata decoder configuration codec string for PCM must be one of the supported PCM codecs (${js.join(", ")}).`);if(t!==null&&qf(a.decoderConfig.codec)!==t)throw new TypeError(`Audio chunk metadata decoder configuration codec string '${a.decoderConfig.codec}' does not fit to the track codec '${t}'.`)},hy=a=>{if(!a)throw new TypeError("Subtitle metadata must be provided.");if(typeof a!="object")throw new TypeError("Subtitle metadata must be an object.");if(!a.config)throw new TypeError("Subtitle metadata must include a config object.");if(typeof a.config!="object")throw new TypeError("Subtitle metadata config must be an object.");if(typeof a.config.description!="string")throw new TypeError("Subtitle metadata config description must be a string.")};const _y=new Uint8Array(0);class Vr{constructor(t,i,n,s,r=-1,o,l){if(this.data=t,this.type=i,this.timestamp=n,this.duration=s,this.sequenceNumber=r,t===_y&&o===void 0)throw new Error("Internal error: byteLength must be explicitly provided when constructing metadata-only packets.");if(o===void 0&&(o=t.byteLength),!(t instanceof Uint8Array))throw new TypeError("data must be a Uint8Array.");if(i!=="key"&&i!=="delta")throw new TypeError('type must be either "key" or "delta".');if(!Number.isFinite(n))throw new TypeError("timestamp must be a number.");if(!Number.isFinite(s)||s<0)throw new TypeError("duration must be a non-negative number.");if(!Number.isFinite(r))throw new TypeError("sequenceNumber must be a number.");if(!Number.isInteger(o)||o<0)throw new TypeError("byteLength must be a non-negative integer.");if(l!==void 0&&(typeof l!="object"||!l))throw new TypeError("sideData, when provided, must be an object.");if(l?.alpha!==void 0&&!(l.alpha instanceof Uint8Array))throw new TypeError("sideData.alpha, when provided, must be a Uint8Array.");if(l?.alphaByteLength!==void 0&&(!Number.isInteger(l.alphaByteLength)||l.alphaByteLength<0))throw new TypeError("sideData.alphaByteLength, when provided, must be a non-negative integer.");this.byteLength=o,this.sideData=l??{},this.sideData.alpha&&this.sideData.alphaByteLength===void 0&&(this.sideData.alphaByteLength=this.sideData.alpha.byteLength)}get isMetadataOnly(){return this.data===_y}get microsecondTimestamp(){return Math.trunc(Zo*this.timestamp)}get microsecondDuration(){return Math.trunc(Zo*this.duration)}toEncodedVideoChunk(){if(this.isMetadataOnly)throw new TypeError("Metadata-only packets cannot be converted to a video chunk.");if(typeof EncodedVideoChunk>"u")throw new Error("EncodedVideoChunk is not available in this environment.");return new EncodedVideoChunk({data:this.data,type:this.type,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration})}alphaToEncodedVideoChunk(t=this.type){if(!this.sideData.alpha)throw new TypeError("This packet does not contain alpha side data.");if(this.isMetadataOnly)throw new TypeError("Metadata-only packets cannot be converted to a video chunk.");if(typeof EncodedVideoChunk>"u")throw new Error("EncodedVideoChunk is not available in this environment.");return new EncodedVideoChunk({data:this.sideData.alpha,type:t,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration})}toEncodedAudioChunk(){if(this.isMetadataOnly)throw new TypeError("Metadata-only packets cannot be converted to an audio chunk.");if(typeof EncodedAudioChunk>"u")throw new Error("EncodedAudioChunk is not available in this environment.");return new EncodedAudioChunk({data:this.data,type:this.type,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration})}static fromEncodedChunk(t,i){if(!(t instanceof EncodedVideoChunk||t instanceof EncodedAudioChunk))throw new TypeError("chunk must be an EncodedVideoChunk or EncodedAudioChunk.");const n=new Uint8Array(t.byteLength);return t.copyTo(n),new Vr(n,t.type,t.timestamp/1e6,(t.duration??0)/1e6,void 0,void 0,i)}clone(t){if(t!==void 0&&(typeof t!="object"||t===null))throw new TypeError("options, when provided, must be an object.");if(t?.data!==void 0&&!(t.data instanceof Uint8Array))throw new TypeError("options.data, when provided, must be a Uint8Array.");if(t?.type!==void 0&&t.type!=="key"&&t.type!=="delta")throw new TypeError('options.type, when provided, must be either "key" or "delta".');if(t?.timestamp!==void 0&&!Number.isFinite(t.timestamp))throw new TypeError("options.timestamp, when provided, must be a number.");if(t?.duration!==void 0&&!Number.isFinite(t.duration))throw new TypeError("options.duration, when provided, must be a number.");if(t?.sequenceNumber!==void 0&&!Number.isFinite(t.sequenceNumber))throw new TypeError("options.sequenceNumber, when provided, must be a number.");if(t?.sideData!==void 0&&(typeof t.sideData!="object"||t.sideData===null))throw new TypeError("options.sideData, when provided, must be an object.");return new Vr(t?.data??this.data,t?.type??this.type,t?.timestamp??this.timestamp,t?.duration??this.duration,t?.sequenceNumber??this.sequenceNumber,this.byteLength,t?.sideData??this.sideData)}}const gG=a=>{let i=(a.hasVideo?"video/":a.hasAudio?"audio/":"application/")+(a.isQuickTime?"quicktime":"mp4");if(a.codecStrings.length>0){const n=[...new Set(a.codecStrings)];i+=`; codecs="${n.join(", ")}"`}return i};const Xm=8,vy=16;class Dd{constructor(t){this.value=t}}class Zm{constructor(t){this.value=t}}class by{constructor(t){this.value=t}}class il{constructor(t){this.value=t}}var Ze;(function(a){a[a.EBML=440786851]="EBML",a[a.EBMLVersion=17030]="EBMLVersion",a[a.EBMLReadVersion=17143]="EBMLReadVersion",a[a.EBMLMaxIDLength=17138]="EBMLMaxIDLength",a[a.EBMLMaxSizeLength=17139]="EBMLMaxSizeLength",a[a.DocType=17026]="DocType",a[a.DocTypeVersion=17031]="DocTypeVersion",a[a.DocTypeReadVersion=17029]="DocTypeReadVersion",a[a.Void=236]="Void",a[a.Segment=408125543]="Segment",a[a.SeekHead=290298740]="SeekHead",a[a.Seek=19899]="Seek",a[a.SeekID=21419]="SeekID",a[a.SeekPosition=21420]="SeekPosition",a[a.Duration=17545]="Duration",a[a.Info=357149030]="Info",a[a.TimestampScale=2807729]="TimestampScale",a[a.MuxingApp=19840]="MuxingApp",a[a.WritingApp=22337]="WritingApp",a[a.Tracks=374648427]="Tracks",a[a.TrackEntry=174]="TrackEntry",a[a.TrackNumber=215]="TrackNumber",a[a.TrackUID=29637]="TrackUID",a[a.TrackType=131]="TrackType",a[a.FlagEnabled=185]="FlagEnabled",a[a.FlagDefault=136]="FlagDefault",a[a.FlagForced=21930]="FlagForced",a[a.FlagOriginal=21934]="FlagOriginal",a[a.FlagHearingImpaired=21931]="FlagHearingImpaired",a[a.FlagVisualImpaired=21932]="FlagVisualImpaired",a[a.FlagCommentary=21935]="FlagCommentary",a[a.FlagLacing=156]="FlagLacing",a[a.Name=21358]="Name",a[a.Language=2274716]="Language",a[a.LanguageBCP47=2274717]="LanguageBCP47",a[a.CodecID=134]="CodecID",a[a.CodecPrivate=25506]="CodecPrivate",a[a.CodecDelay=22186]="CodecDelay",a[a.SeekPreRoll=22203]="SeekPreRoll",a[a.DefaultDuration=2352003]="DefaultDuration",a[a.Video=224]="Video",a[a.PixelWidth=176]="PixelWidth",a[a.PixelHeight=186]="PixelHeight",a[a.DisplayWidth=21680]="DisplayWidth",a[a.DisplayHeight=21690]="DisplayHeight",a[a.DisplayUnit=21682]="DisplayUnit",a[a.AlphaMode=21440]="AlphaMode",a[a.Audio=225]="Audio",a[a.SamplingFrequency=181]="SamplingFrequency",a[a.Channels=159]="Channels",a[a.BitDepth=25188]="BitDepth",a[a.SimpleBlock=163]="SimpleBlock",a[a.BlockGroup=160]="BlockGroup",a[a.Block=161]="Block",a[a.BlockAdditions=30113]="BlockAdditions",a[a.BlockMore=166]="BlockMore",a[a.BlockAdditional=165]="BlockAdditional",a[a.BlockAddID=238]="BlockAddID",a[a.BlockDuration=155]="BlockDuration",a[a.ReferenceBlock=251]="ReferenceBlock",a[a.Cluster=524531317]="Cluster",a[a.Timestamp=231]="Timestamp",a[a.Cues=475249515]="Cues",a[a.CuePoint=187]="CuePoint",a[a.CueTime=179]="CueTime",a[a.CueTrackPositions=183]="CueTrackPositions",a[a.CueTrack=247]="CueTrack",a[a.CueClusterPosition=241]="CueClusterPosition",a[a.Colour=21936]="Colour",a[a.MatrixCoefficients=21937]="MatrixCoefficients",a[a.TransferCharacteristics=21946]="TransferCharacteristics",a[a.Primaries=21947]="Primaries",a[a.Range=21945]="Range",a[a.Projection=30320]="Projection",a[a.ProjectionType=30321]="ProjectionType",a[a.ProjectionPoseYaw=30323]="ProjectionPoseYaw",a[a.ProjectionPosePitch=30324]="ProjectionPosePitch",a[a.ProjectionPoseRoll=30325]="ProjectionPoseRoll",a[a.Attachments=423732329]="Attachments",a[a.AttachedFile=24999]="AttachedFile",a[a.FileDescription=18046]="FileDescription",a[a.FileName=18030]="FileName",a[a.FileMediaType=18016]="FileMediaType",a[a.FileData=18012]="FileData",a[a.FileUID=18094]="FileUID",a[a.Chapters=272869232]="Chapters",a[a.Tags=307544935]="Tags",a[a.Tag=29555]="Tag",a[a.Targets=25536]="Targets",a[a.TargetTypeValue=26826]="TargetTypeValue",a[a.TargetType=25546]="TargetType",a[a.TagTrackUID=25541]="TagTrackUID",a[a.TagEditionUID=25545]="TagEditionUID",a[a.TagChapterUID=25540]="TagChapterUID",a[a.TagAttachmentUID=25542]="TagAttachmentUID",a[a.SimpleTag=26568]="SimpleTag",a[a.TagName=17827]="TagName",a[a.TagLanguage=17530]="TagLanguage",a[a.TagString=17543]="TagString",a[a.TagBinary=17541]="TagBinary",a[a.ContentEncodings=28032]="ContentEncodings",a[a.ContentEncoding=25152]="ContentEncoding",a[a.ContentEncodingOrder=20529]="ContentEncodingOrder",a[a.ContentEncodingScope=20530]="ContentEncodingScope",a[a.ContentCompression=20532]="ContentCompression",a[a.ContentCompAlgo=16980]="ContentCompAlgo",a[a.ContentCompSettings=16981]="ContentCompSettings",a[a.ContentEncryption=20533]="ContentEncryption"})(Ze||(Ze={})),Ze.EBML,Ze.Segment,Ze.SeekHead,Ze.Info,Ze.Cluster,Ze.Tracks,Ze.Cues,Ze.Attachments,Ze.Chapters,Ze.Tags;const yy=a=>a<256?1:a<65536?2:a<1<<24?3:a<2**32?4:a<2**40?5:6,wy=a=>a<1n<<8n?1:a<1n<<16n?2:a<1n<<24n?3:a<1n<<32n?4:a<1n<<40n?5:a<1n<<48n?6:a<1n<<56n?7:8,ky=a=>a>=-64&&a<64?1:a>=-8192&&a<8192?2:a>=-1048576&&a<1<<20?3:a>=-134217728&&a<1<<27?4:a>=-17179869184&&a<2**34?5:6,hG=a=>{if(a<127)return 1;if(a<16383)return 2;if(a<(1<<21)-1)return 3;if(a<(1<<28)-1)return 4;if(a<2**35-1)return 5;if(a<2**42-1)return 6;throw new Error("EBML varint size not supported "+a)};class _G{constructor(t){this.writer=t,this.helper=new Uint8Array(8),this.helperView=new DataView(this.helper.buffer),this.offsets=new WeakMap,this.dataOffsets=new WeakMap}writeByte(t){this.helperView.setUint8(0,t),this.writer.write(this.helper.subarray(0,1))}writeFloat32(t){this.helperView.setFloat32(0,t,!1),this.writer.write(this.helper.subarray(0,4))}writeFloat64(t){this.helperView.setFloat64(0,t,!1),this.writer.write(this.helper)}writeUnsignedInt(t,i=yy(t)){let n=0;switch(i){case 6:this.helperView.setUint8(n++,t/2**40|0);case 5:this.helperView.setUint8(n++,t/2**32|0);case 4:this.helperView.setUint8(n++,t>>24);case 3:this.helperView.setUint8(n++,t>>16);case 2:this.helperView.setUint8(n++,t>>8);case 1:this.helperView.setUint8(n++,t);break;default:throw new Error("Bad unsigned int size "+i)}this.writer.write(this.helper.subarray(0,n))}writeUnsignedBigInt(t,i=wy(t)){let n=0;for(let s=i-1;s>=0;s--)this.helperView.setUint8(n++,Number(t>>BigInt(s*8)&0xffn));this.writer.write(this.helper.subarray(0,n))}writeSignedInt(t,i=ky(t)){t<0&&(t+=2**(i*8)),this.writeUnsignedInt(t,i)}writeVarInt(t,i=hG(t)){let n=0;switch(i){case 1:this.helperView.setUint8(n++,128|t);break;case 2:this.helperView.setUint8(n++,64|t>>8),this.helperView.setUint8(n++,t);break;case 3:this.helperView.setUint8(n++,32|t>>16),this.helperView.setUint8(n++,t>>8),this.helperView.setUint8(n++,t);break;case 4:this.helperView.setUint8(n++,16|t>>24),this.helperView.setUint8(n++,t>>16),this.helperView.setUint8(n++,t>>8),this.helperView.setUint8(n++,t);break;case 5:this.helperView.setUint8(n++,8|t/2**32&7),this.helperView.setUint8(n++,t>>24),this.helperView.setUint8(n++,t>>16),this.helperView.setUint8(n++,t>>8),this.helperView.setUint8(n++,t);break;case 6:this.helperView.setUint8(n++,4|t/2**40&3),this.helperView.setUint8(n++,t/2**32|0),this.helperView.setUint8(n++,t>>24),this.helperView.setUint8(n++,t>>16),this.helperView.setUint8(n++,t>>8),this.helperView.setUint8(n++,t);break;default:throw new Error("Bad EBML varint size "+i)}this.writer.write(this.helper.subarray(0,n))}writeAsciiString(t){this.writer.write(new Uint8Array(t.split("").map(i=>i.charCodeAt(0))))}writeEBML(t){if(t!==null)if(t instanceof Uint8Array)this.writer.write(t);else if(Array.isArray(t))for(const i of t)this.writeEBML(i);else if(this.offsets.set(t,this.writer.getPos()),this.writeUnsignedInt(t.id),Array.isArray(t.data)){const i=this.writer.getPos(),n=t.size===-1?1:t.size??4;t.size===-1?this.writeByte(255):this.writer.seek(this.writer.getPos()+n);const s=this.writer.getPos();if(this.dataOffsets.set(t,s),this.writeEBML(t.data),t.size!==-1){const r=this.writer.getPos()-s,o=this.writer.getPos();this.writer.seek(i),this.writeVarInt(r,n),this.writer.seek(o)}}else if(typeof t.data=="number"){const i=t.size??yy(t.data);this.writeVarInt(i),this.writeUnsignedInt(t.data,i)}else if(typeof t.data=="bigint"){const i=t.size??wy(t.data);this.writeVarInt(i),this.writeUnsignedBigInt(t.data,i)}else if(typeof t.data=="string")this.writeVarInt(t.data.length),this.writeAsciiString(t.data);else if(t.data instanceof Uint8Array)this.writeVarInt(t.data.byteLength,t.size),this.writer.write(t.data);else if(t.data instanceof Dd)this.writeVarInt(4),this.writeFloat32(t.data.value);else if(t.data instanceof Zm)this.writeVarInt(8),this.writeFloat64(t.data.value);else if(t.data instanceof by){const i=t.size??ky(t.data.value);this.writeVarInt(i),this.writeSignedInt(t.data.value,i)}else if(t.data instanceof il){const i=ws.encode(t.data.value);this.writeVarInt(i.length),this.writer.write(i)}else yo(t.data)}}const vG={avc:"V_MPEG4/ISO/AVC",hevc:"V_MPEGH/ISO/HEVC",vp8:"V_VP8",vp9:"V_VP9",av1:"V_AV1",prores:"V_PRORES",aac:"A_AAC",mp3:"A_MPEG/L3",opus:"A_OPUS",vorbis:"A_VORBIS",flac:"A_FLAC",ac3:"A_AC3",eac3:"A_EAC3",dts:"A_DTS","pcm-u8":"A_PCM/INT/LIT","pcm-s16":"A_PCM/INT/LIT","pcm-s16be":"A_PCM/INT/BIG","pcm-s24":"A_PCM/INT/LIT","pcm-s24be":"A_PCM/INT/BIG","pcm-s32":"A_PCM/INT/LIT","pcm-s32be":"A_PCM/INT/BIG","pcm-f32":"A_PCM/FLOAT/IEEE","pcm-f64":"A_PCM/FLOAT/IEEE",webvtt:"S_TEXT/WEBVTT"};const bG=a=>{let i=(a.hasVideo?"video/":a.hasAudio?"audio/":"application/")+(a.isWebM?"webm":"x-matroska");if(a.codecStrings.length>0){const n=[...new Set(a.codecStrings.filter(Boolean))];i+=`; codecs="${n.join(", ")}"`}return i};const xy=7,Sy=9,Cf=a=>{const t=a.filePos,i=jG(a,9),n=new zn(i);if(n.readBits(12)!==4095||(n.skipBits(1),n.readBits(2)!==0))return null;const o=n.readBits(1),l=n.readBits(2)+1,c=n.readBits(4);if(c===15)return null;n.skipBits(1);const d=n.readBits(3);if(d===0)throw new Error("ADTS frames with channel configuration 0 are not supported.");n.skipBits(1),n.skipBits(1),n.skipBits(1),n.skipBits(1);const g=n.readBits(13);n.skipBits(11);const h=n.readBits(2)+1;if(h!==1)throw new Error("ADTS frames with more than one AAC frame are not supported.");let m=null;return o===1?a.filePos-=2:m=n.readBits(16),{objectType:l,samplingFrequencyIndex:c,channelConfiguration:d,frameLength:g,numberOfAacFrames:h,crcCheck:m,startPos:t}};var yG=function(a,t,i){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],i&&(s=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(r){return Promise.reject(r)}}),a.stack.push({value:t,dispose:n,async:i})}else i&&a.stack.push({async:!0});return t},wG=(function(a){return function(t){function i(o){t.error=t.hasError?new a(o,t.error,"An error was suppressed during disposal."):o,t.hasError=!0}var n,s=0;function r(){for(;n=t.stack.pop();)try{if(!n.async&&s===1)return s=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return s|=2,Promise.resolve(o).then(r,function(l){return i(l),r()})}else s|=1}catch(l){i(l)}if(s===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return r()}})(typeof SuppressedError=="function"?SuppressedError:function(a,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=a,n.suppressed=t,n});dA();let Ty=-1/0,$y=-1/0,Ld=null;typeof FinalizationRegistry<"u"&&(Ld=new FinalizationRegistry(a=>{const t=performance.now();a.type==="video"?(t-Ty>=1e3&&(_n._error("A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them."),Ty=t),typeof VideoFrame<"u"&&a.data instanceof VideoFrame&&a.data.close()):(t-$y>=1e3&&(_n._error("An AudioSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your AudioSamples as soon as you're done using them."),$y=t),typeof AudioData<"u"&&a.data instanceof AudioData&&a.data.close())}));class Dl{constructor(){this._referenceCount=0,this._lastAllocationBuffer=null}}const e0=["I420","I420P10","I420P12","I420A","I420AP10","I420AP12","I422","I422P10","I422P12","I422A","I422AP10","I422AP12","I444","I444P10","I444P12","I444A","I444AP10","I444AP12","NV12","RGBA","RGBX","BGRA","BGRX"],kG=new Set(e0);class Ns{get codedWidth(){return this.visibleRect.width}get codedHeight(){return this.visibleRect.height}get displayWidth(){return this.rotation%180===0?this.squarePixelWidth:this.squarePixelHeight}get displayHeight(){return this.rotation%180===0?this.squarePixelHeight:this.squarePixelWidth}get microsecondTimestamp(){return Math.trunc(Zo*this.timestamp)}get microsecondDuration(){return Math.trunc(Zo*this.duration)}get hasAlpha(){return this.format&&this.format.includes("A")}constructor(t,i){if(this._closed=!1,t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||ArrayBuffer.isView(t)){if(!i||typeof i!="object")throw new TypeError("init must be an object.");if(i.format===void 0||!kG.has(i.format))throw new TypeError("init.format must be one of: "+e0.join(", "));if(!Number.isInteger(i.codedWidth)||i.codedWidth<=0)throw new TypeError("init.codedWidth must be a positive integer.");if(!Number.isInteger(i.codedHeight)||i.codedHeight<=0)throw new TypeError("init.codedHeight must be a positive integer.");if(i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("init.rotation, when provided, must be 0, 90, 180, or 270.");if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("init.flip, when provided, must be a boolean.");if(!Number.isFinite(i.timestamp))throw new TypeError("init.timestamp must be a number.");if(i.duration!==void 0&&(!Number.isFinite(i.duration)||i.duration<0))throw new TypeError("init.duration, when provided, must be a non-negative number.");if(i.layout!==void 0){if(!Array.isArray(i.layout))throw new TypeError("init.layout, when provided, must be an array.");for(const r of i.layout){if(!r||typeof r!="object"||Array.isArray(r))throw new TypeError("Each entry in init.layout must be an object.");if(!Number.isInteger(r.offset)||r.offset<0)throw new TypeError("plane.offset must be a non-negative integer.");if(!Number.isInteger(r.stride)||r.stride<0)throw new TypeError("plane.stride must be a non-negative integer.")}}if(i.visibleRect!==void 0&&Im(i.visibleRect,"init.visibleRect"),i.displayWidth!==void 0&&(!Number.isInteger(i.displayWidth)||i.displayWidth<=0))throw new TypeError("init.displayWidth, when provided, must be a positive integer.");if(i.displayHeight!==void 0&&(!Number.isInteger(i.displayHeight)||i.displayHeight<=0))throw new TypeError("init.displayHeight, when provided, must be a positive integer.");if(i.displayWidth!==void 0!=(i.displayHeight!==void 0))throw new TypeError("init.displayWidth and init.displayHeight must be either both provided or both omitted.");this.format=i.format,this.rotation=i.rotation??0,this.flip=i.flip??!1,this.timestamp=i.timestamp,this.duration=i.duration??0;const n=i.layout??TG(i.format,i.codedWidth,i.codedHeight);let s=i.colorSpace??null;s===null&&(this.format==="RGBA"||this.format==="RGBX"||this.format==="BGRA"||this.format==="BGRX"?s={primaries:"bt709",transfer:"iec61966-2-1",matrix:"rgb",fullRange:!0}:s={primaries:"bt709",transfer:"bt709",matrix:"bt709",fullRange:!1}),this.visibleRect={left:i.visibleRect?.left??0,top:i.visibleRect?.top??0,width:i.visibleRect?.width??i.codedWidth,height:i.visibleRect?.height??i.codedHeight},i.displayWidth!==void 0?(this.squarePixelWidth=this.rotation%180===0?i.displayWidth:i.displayHeight,this.squarePixelHeight=this.rotation%180===0?i.displayHeight:i.displayWidth):(this.squarePixelWidth=this.visibleRect.width,this.squarePixelHeight=this.visibleRect.height),this._data=i._doNotCopy?Ms(t):Ms(t).slice(),this._layout=n,this.colorSpace=new t0(s)}else if(typeof VideoFrame<"u"&&t instanceof VideoFrame){if(i?.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("init.rotation, when provided, must be 0, 90, 180, or 270.");if(i?.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("init.flip, when provided, must be a boolean.");if(i?.timestamp!==void 0&&!Number.isFinite(i?.timestamp))throw new TypeError("init.timestamp, when provided, must be a number.");if(i?.duration!==void 0&&(!Number.isFinite(i.duration)||i.duration<0))throw new TypeError("init.duration, when provided, must be a non-negative number.");i?.visibleRect!==void 0&&Im(i.visibleRect,"init.visibleRect"),this._data=t,this._layout=null,this.format=t.format,this.visibleRect={left:t.visibleRect?.x??0,top:t.visibleRect?.y??0,width:t.visibleRect?.width??t.codedWidth,height:t.visibleRect?.height??t.codedHeight},this.rotation=i?.rotation??0,this.flip=i?.flip??!1,this.squarePixelWidth=t.displayWidth,this.squarePixelHeight=t.displayHeight,this.timestamp=i?.timestamp??t.timestamp/1e6,this.duration=i?.duration??(t.duration??0)/1e6,this.colorSpace=new t0(t.colorSpace)}else if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof SVGImageElement<"u"&&t instanceof SVGImageElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas){if(!i||typeof i!="object")throw new TypeError("init must be an object.");if(i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("init.rotation, when provided, must be 0, 90, 180, or 270.");if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("init.flip, when provided, must be a boolean.");if(!Number.isFinite(i.timestamp))throw new TypeError("init.timestamp must be a number.");if(i.duration!==void 0&&(!Number.isFinite(i.duration)||i.duration<0))throw new TypeError("init.duration, when provided, must be a non-negative number.");if(i.visibleRect!==void 0&&Im(i.visibleRect,"init.visibleRect"),typeof VideoFrame<"u")return new Ns(new VideoFrame(t,{timestamp:Math.trunc(i.timestamp*Zo),duration:Math.trunc((i.duration??0)*Zo)||void 0,visibleRect:i.visibleRect&&{x:i.visibleRect.left,y:i.visibleRect.top,width:i.visibleRect.width,height:i.visibleRect.height}}),i);let n=0,s=0;if("naturalWidth"in t?(n=t.naturalWidth,s=t.naturalHeight):"videoWidth"in t?(n=t.videoWidth,s=t.videoHeight):"width"in t&&(n=Number(t.width),s=Number(t.height)),!n||!s)throw new TypeError("Could not determine dimensions.");const r=i.visibleRect??{left:0,top:0,width:n,height:s},o=new OffscreenCanvas(r.width,r.height),l=o.getContext("2d",{alpha:Wb(),willReadFrequently:!0});if(!l)throw new Error("OffscreenCanvas must have support for the '2d' context in order to create a VideoSample from this data.");l.drawImage(t,-r.left,-r.top),this._data=o,this._layout=null,this.format="RGBX",this.visibleRect={left:0,top:0,width:r.width,height:r.height},this.squarePixelWidth=r.width,this.squarePixelHeight=r.height,this.rotation=i.rotation??0,this.flip=i.flip??!1,this.timestamp=i.timestamp,this.duration=i.duration??0,this.colorSpace=new t0({matrix:"rgb",primaries:"bt709",transfer:"iec61966-2-1",fullRange:!0})}else if(t instanceof Dl){if(!i||typeof i!="object")throw new TypeError("init must be an object.");if(i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("init.rotation, when provided, must be 0, 90, 180, or 270.");if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("init.flip, when provided, must be a boolean.");if(!Number.isFinite(i.timestamp))throw new TypeError("init.timestamp must be a number.");if(i.duration!==void 0&&(!Number.isFinite(i.duration)||i.duration<0))throw new TypeError("init.duration, when provided, must be a non-negative number.");if(this._data=t,t._referenceCount++,this.format=t.getFormat(),this.format!==null&&!e0.includes(this.format))throw new TypeError("getFormat() must return a VideoSamplePixelFormat or null.");if(this.visibleRect={left:0,top:0,width:t.getCodedWidth(),height:t.getCodedHeight()},!Number.isInteger(this.visibleRect.width)||this.visibleRect.width<=0)throw new TypeError("getCodedWidth() must return a positive integer.");if(!Number.isInteger(this.visibleRect.height)||this.visibleRect.height<=0)throw new TypeError("getCodedHeight() must return a positive integer.");if(this.squarePixelWidth=t.getSquarePixelWidth(),!Number.isInteger(this.squarePixelWidth)||this.squarePixelWidth<=0)throw new TypeError("getSquarePixelWidth() must return a positive integer.");if(this.squarePixelHeight=t.getSquarePixelHeight(),!Number.isInteger(this.squarePixelHeight)||this.squarePixelHeight<=0)throw new TypeError("getSquarePixelHeight() must return a positive integer.");this.rotation=i.rotation??0,this.flip=i.flip??!1,this.timestamp=i.timestamp,this.duration=i.duration??0,this.colorSpace=t.getColorSpace()}else throw new TypeError("Invalid data type: Must be a BufferSource, CanvasImageSource, or VideoSampleResource.");this.encodeOptions=i?.encodeOptions??{},this.pixelAspectRatio=Om({num:this.squarePixelWidth*this.codedHeight,den:this.squarePixelHeight*this.codedWidth}),Ld?.register(this,{type:"video",data:this._data},this)}clone(){if(this._closed)throw new Error("VideoSample is closed.");return We(this._data!==null),this._data instanceof Dl?new Ns(this._data,{timestamp:this.timestamp,duration:this.duration,rotation:this.rotation,flip:this.flip,encodeOptions:this.encodeOptions}):Hd(this._data)?new Ns(this._data.clone(),{timestamp:this.timestamp,duration:this.duration,rotation:this.rotation,flip:this.flip,encodeOptions:this.encodeOptions}):this._data instanceof Uint8Array?(We(this._layout),new Ns(this._data,{format:this.format,layout:this._layout,codedWidth:this.codedWidth,codedHeight:this.codedHeight,timestamp:this.timestamp,duration:this.duration,colorSpace:this.colorSpace,rotation:this.rotation,flip:this.flip,visibleRect:this.visibleRect,displayWidth:this.displayWidth,displayHeight:this.displayHeight,encodeOptions:this.encodeOptions,_doNotCopy:!0})):new Ns(this._data,{format:this.format,codedWidth:this.codedWidth,codedHeight:this.codedHeight,timestamp:this.timestamp,duration:this.duration,colorSpace:this.colorSpace,rotation:this.rotation,flip:this.flip,visibleRect:this.visibleRect,displayWidth:this.displayWidth,displayHeight:this.displayHeight,encodeOptions:this.encodeOptions})}close(){this._closed||(Ld?.unregister(this),this._data instanceof Dl?(this._data._referenceCount--,this._data._referenceCount===0&&this._data.close()):Hd(this._data)?this._data.close():this._data=null,this._closed=!0)}allocationSize(t={}){if(Gy(t),this._closed)throw new Error("VideoSample is closed.");if((t.format??this.format)==null)throw new Error("Cannot get allocation size when format is null.");return Hd(this._data)?this._data.allocationSize(t):Fy(this,t).allocationSize}async copyTo(t,i={}){if(!wf(t))throw new TypeError("destination must be an ArrayBuffer or an ArrayBuffer view.");if(Gy(i),this._closed)throw new Error("VideoSample is closed.");if((i.format??this.format)==null)throw new Error("Cannot copy video sample data when format is null.");if(We(this._data!==null),Hd(this._data))return this._data.copyTo(t,i);if(i.format&&!["RGBA","RGBX","BGRA","BGRX"].includes(this.format)&&["RGBA","RGBX","BGRA","BGRX"].includes(i.format))if(this._data instanceof Dl){const d={stack:[],error:void 0,hasError:!1};try{const g=yG(d,await this._data.toRgbSample({timestamp:this.timestamp,duration:this.duration,rotation:this.rotation,flip:this.flip},i.colorSpace??"srgb"),!1);if(!(g instanceof Ns))throw new TypeError("toRgbSample() must return a VideoSample.");if(!["RGBA","RGBX","BGRA","BGRX"].includes(g.format))throw new Error(`Sample returned by toRgbSample was expected to have an RGB format, got '${g.format}' instead.`);return await g.copyTo(t,i)}catch(g){d.error=g,d.hasError=!0}finally{wG(d)}}else{if(typeof VideoFrame>"u")throw new Error("For this sample, converting from a non-RGB to an RGB format requires VideoFrame to be defined.");const d=this.toVideoFrame(),g=await d.copyTo(t,i);return d.close(),g}const n=Fy(this,i);We(this.format);const s=Ms(t);if(s.byteLength!(g.data instanceof Uint8Array)||!Number.isInteger(g.stride)||g.stride<0))throw new TypeError('getDataPlanes() must return an array of objects with a Uint8Array "data" property and a non-negative integer "stride" property.');o=d}else if(this._data instanceof Uint8Array)We(this._layout),We(this._layout.length===r.length),o=this._layout.map((d,g)=>{const h=Math.ceil(this.codedHeight/r[g].heightDivisor);return{data:this._data.subarray(d.offset,d.offset+d.stride*h),stride:d.stride}});else{const g=this._data.getContext("2d");We(g);const h=g.getImageData(0,0,this.codedWidth,this.codedHeight);o=[{data:Ms(h.data),stride:4*this.codedWidth}]}const l=[],c=r.length;for(let d=0;dm.byteLength)throw new Error("Source buffer OOB read.");if(u+f>s.byteLength)throw new Error("Destination buffer OOB write.");const v=m.subarray(p,p+f);s.set(v,u),p+=h,u+=g.destinationStride}l.push(_)}if(i.format!==void 0){const d=this.format.startsWith("RGB")!==i.format.startsWith("RGB"),g=this.format.includes("X")&&i.format.includes("A");if(d||g)for(let h=0;ho+l.data.byteLength,0),n=new Uint8Array(i);let s=0;const r=[];for(const o of t)n.set(o.data,s),r.push(s),s+=o.data.byteLength;return new VideoFrame(n,{format:this.format,layout:t.map((o,l)=>({offset:r[l],stride:o.stride})),codedWidth:this.codedWidth,codedHeight:this.codedHeight,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration,colorSpace:this.colorSpace,visibleRect:this.visibleRect,displayWidth:this.squarePixelWidth,displayHeight:this.squarePixelHeight})}else return Hd(this._data)?new VideoFrame(this._data,{timestamp:this.microsecondTimestamp,duration:this.microsecondDuration||void 0}):this._data instanceof Uint8Array?(We(this._layout),new VideoFrame(this._data,{format:this.format,codedWidth:this.codedWidth,codedHeight:this.codedHeight,layout:this._layout,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration||void 0,colorSpace:this.colorSpace,visibleRect:this.visibleRect,displayWidth:this.squarePixelWidth,displayHeight:this.squarePixelHeight})):new VideoFrame(this._data,{timestamp:this.microsecondTimestamp,duration:this.microsecondDuration||void 0})}draw(t,i,n,s,r,o,l,c,d){let g=0,h=0,m=this.displayWidth,p=this.displayHeight,u=0,f=0,_=this.displayWidth,b=this.displayHeight;if(o!==void 0?(g=i,h=n,m=s,p=r,u=o,f=l,c!==void 0?(_=c,b=d):(_=m,b=p)):(u=i,f=n,s!==void 0&&(_=s,b=r)),!(typeof CanvasRenderingContext2D<"u"&&t instanceof CanvasRenderingContext2D||typeof OffscreenCanvasRenderingContext2D<"u"&&t instanceof OffscreenCanvasRenderingContext2D))throw new TypeError("context must be a CanvasRenderingContext2D or OffscreenCanvasRenderingContext2D.");if(!Number.isFinite(g))throw new TypeError("sx must be a number.");if(!Number.isFinite(h))throw new TypeError("sy must be a number.");if(!Number.isFinite(m)||m<0)throw new TypeError("sWidth must be a non-negative number.");if(!Number.isFinite(p)||p<0)throw new TypeError("sHeight must be a non-negative number.");if(!Number.isFinite(u))throw new TypeError("dx must be a number.");if(!Number.isFinite(f))throw new TypeError("dy must be a number.");if(!Number.isFinite(_)||_<0)throw new TypeError("dWidth must be a non-negative number.");if(!Number.isFinite(b)||b<0)throw new TypeError("dHeight must be a non-negative number.");if(this._closed)throw new Error("VideoSample is closed.");({sx:g,sy:h,sWidth:m,sHeight:p}=this._unmapSourceRegion(g,h,m,p,this.rotation,this.flip));const v=this.toCanvasImageSource();t.save();const T=u+_/2,S=f+b/2;t.translate(T,S),this.flip&&t.scale(-1,1),t.rotate(this.rotation*Math.PI/180);const M=this.rotation%180===0?1:_/b;t.scale(1/M,M),t.drawImage(v,g,h,m,p,-_/2,-b/2,_,b),t.restore()}drawWithFit(t,i){if(!(typeof CanvasRenderingContext2D<"u"&&t instanceof CanvasRenderingContext2D||typeof OffscreenCanvasRenderingContext2D<"u"&&t instanceof OffscreenCanvasRenderingContext2D))throw new TypeError("context must be a CanvasRenderingContext2D or OffscreenCanvasRenderingContext2D.");if(!i||typeof i!="object")throw new TypeError("options must be an object.");if(!["fill","contain","cover"].includes(i.fit))throw new TypeError("options.fit must be 'fill', 'contain', or 'cover'.");if(i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("options.rotation, when provided, must be 0, 90, 180, or 270.");if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("options.flip, when provided, must be a boolean.");i.crop!==void 0&&a0(i.crop,"options.");const n=t.canvas.width,s=t.canvas.height,r=i.rotation??this.rotation,o=i.flip??this.flip,[l,c]=r%180===0?[this.squarePixelWidth,this.squarePixelHeight]:[this.squarePixelHeight,this.squarePixelWidth];let d=i.crop;d&&(d=Ay(d,l,c));let g,h,m,p;const{sx:u,sy:f,sWidth:_,sHeight:b}=this._unmapSourceRegion(i.crop?.left??0,i.crop?.top??0,i.crop?.width??l,i.crop?.height??c,r,o);if(i.fit==="fill")g=0,h=0,m=n,p=s;else{const[T,S]=i.crop?[i.crop.width,i.crop.height]:[l,c],M=i.fit==="contain"?Math.min(n/T,s/S):Math.max(n/T,s/S);m=T*M,p=S*M,g=(n-m)/2,h=(s-p)/2}t.save();const v=r%180===0?1:m/p;t.translate(n/2,s/2),o&&t.scale(-1,1),t.rotate(r*Math.PI/180),t.scale(1/v,v),t.translate(-n/2,-s/2),t.drawImage(this.toCanvasImageSource(),u,f,_,b,g,h,m,p),t.restore()}_unmapSourceRegion(t,i,n,s,r,o){return o&&(t=(r%180===0?this.squarePixelWidth:this.squarePixelHeight)-t-n),r===90?[t,i,n,s]=[i,this.squarePixelHeight-t-n,s,n]:r===180?[t,i]=[this.squarePixelWidth-t-n,this.squarePixelHeight-i-s]:r===270&&([t,i,n,s]=[this.squarePixelWidth-i-s,t,s,n]),{sx:t,sy:i,sWidth:n,sHeight:s}}_drawWithFitAndMipmapping(t,i,n){const s=t.width,r=t.height,[o,l]=n.rotation%180===0?[this.squarePixelWidth,this.squarePixelHeight]:[this.squarePixelHeight,this.squarePixelWidth],c=n.crop?n.crop.width:o,d=n.crop?n.crop.height:l;let g=0;2*s0?Cy(h,m):{canvas:t,context:i,isNew:n.targetIsFresh};u.imageSmoothingQuality="high",n.fillBlack?(u.fillStyle="black",u.fillRect(0,0,h,m)):f||u.clearRect(0,0,h,m),this.drawWithFit(u,{fit:n.fit,rotation:n.rotation,flip:n.flip,crop:n.crop}),u.globalCompositeOperation="copy";for(let _=g;_>1;_--){const b=s*2**_,v=r*2**_;u.drawImage(p,0,0,b,v,0,0,b/2,v/2)}u.globalCompositeOperation="source-over",g>0&&(i.imageSmoothingQuality="high",i.globalCompositeOperation="copy",i.drawImage(p,0,0,2*s,2*r,0,0,s,r),i.globalCompositeOperation="source-over")}toCanvasImageSource(){if(this._closed)throw new Error("VideoSample is closed.");if(We(this._data!==null),this._data instanceof Dl||this._data instanceof Uint8Array){const t=this.toVideoFrame();return queueMicrotask(()=>t.close()),t}else return this._data}async transform(t){if(!t||typeof t!="object")throw new TypeError("options must be an object.");if(t.width!==void 0&&(!Number.isInteger(t.width)||t.width<=0))throw new TypeError("options.width, when provided, must be a positive integer.");if(t.height!==void 0&&(!Number.isInteger(t.height)||t.height<=0))throw new TypeError("options.height, when provided, must be a positive integer.");if(t.roundDimensionsTo!==void 0&&(!Number.isInteger(t.roundDimensionsTo)||t.roundDimensionsTo<=0))throw new TypeError("options.roundDimensionsTo, when provided, must be a positive integer.");if(t.fit!==void 0&&!["fill","contain","cover"].includes(t.fit))throw new TypeError('options.fit, when provided, must be one of "fill", "contain", or "cover".');if(t.width!==void 0&&t.height!==void 0&&t.fit===void 0)throw new TypeError("When both options.width and options.height are provided, options.fit must also be provided.");if(t.rotate!==void 0&&![0,90,180,270].includes(t.rotate))throw new TypeError("options.rotate, when provided, must be 0, 90, 180 or 270.");if(t.flip!==void 0&&typeof t.flip!="boolean")throw new TypeError("options.flip, when provided, must be a boolean.");if(t.crop!==void 0&&a0(t.crop,"options."),t.alpha!==void 0&&!["keep","discard"].includes(t.alpha))throw new TypeError("options.alpha, when provided, must be 'keep' or 'discard'.");const{rotation:i,flip:n}=QC(this.rotation,this.flip,t.rotate??0,t.flip??!1),[s,r]=i%180===0?[this.squarePixelWidth,this.squarePixelHeight]:[this.squarePixelHeight,this.squarePixelWidth];let o=t.crop;o&&(o=Ay(o,s,r));const l=o?o.width:s,c=o?o.height:r,d=l/c;let g,h;t.width!==void 0&&t.height===void 0?(g=t.width,h=g/d):t.width===void 0&&t.height!==void 0?(h=t.height,g=h*d):t.width!==void 0&&t.height!==void 0?(g=t.width,h=t.height):(g=l,h=c),g=Rm(g,t.roundDimensionsTo??1),h=Rm(h,t.roundDimensionsTo??1);const m={width:g,height:h,fit:t.fit??"fill",rotation:i,flip:n,crop:o??{left:0,top:0,width:s,height:r},alpha:t.alpha??"keep"};for(const _ of xG){let b=_(this,m);if(el(b)&&(b=await b),b!==null)return b}const{canvas:p,context:u,isNew:f}=Cy(m.width,m.height);return this._drawWithFitAndMipmapping(p,u,{fit:m.fit,rotation:m.rotation,flip:m.flip,crop:m.crop,targetIsFresh:f,fillBlack:m.alpha==="discard"}),new Ns(p,{timestamp:this.timestamp,duration:this.duration,rotation:0,flip:!1})}setRotation(t){if(![0,90,180,270].includes(t))throw new TypeError("newRotation must be 0, 90, 180, or 270.");this.rotation=t}setFlip(t){if(typeof t!="boolean")throw new TypeError("newFlip must be a boolean.");this.flip=t}setTimestamp(t){if(!Number.isFinite(t))throw new TypeError("newTimestamp must be a number.");this.timestamp=t}setDuration(t){if(!Number.isFinite(t)||t<0)throw new TypeError("newDuration must be a non-negative number.");this.duration=t}setEncodeOptions(t){if(!t||typeof t!="object")throw new TypeError("newEncodeOptions must be an object.");this.encodeOptions=t}[Symbol.dispose](){this.close()}}const xG=[],SG=3,Vd=[];let qy=0;const Cy=(a,t)=>{for(const s of Vd)if(s.canvas.width===a&&s.canvas.height===t)return s.age=qy++,{canvas:s.canvas,context:s.context,isNew:!1};let i;if(typeof OffscreenCanvas<"u")i=new OffscreenCanvas(a,t);else{if(typeof window>"u"||typeof document>"u")throw new Error("Cannot transform VideoSamples in this environment. Either run in an environment with OffscreenCanvas or HTMLCanvasElement, or supply a custom VideoSample transformer using registerVideoSampleTransformer().");i=document.createElement("canvas"),i.width=a,i.height=t}const n=i.getContext("2d",{alpha:!0,willReadFrequently:!1});if(!n)throw new Error("The '2d' canvas context is required to transform VideoSamples. Register a custom transformer using registerVideoSampleTransformer to work around this limitation.");return Vd.length>=SG&&Vd.splice(uA(Vd,s=>s.age),1),Vd.push({canvas:i,context:n,age:qy++}),{canvas:i,context:n,isNew:!0}};class t0{constructor(t){if(t!==void 0){if(!t||typeof t!="object")throw new TypeError("init.colorSpace, when provided, must be an object.");const i=Object.keys(Bd);if(t.primaries!=null&&!i.includes(t.primaries))throw new TypeError(`init.colorSpace.primaries, when provided, must be one of ${i.join(", ")}.`);const n=Object.keys(Pd);if(t.transfer!=null&&!n.includes(t.transfer))throw new TypeError(`init.colorSpace.transfer, when provided, must be one of ${n.join(", ")}.`);const s=Object.keys(jd);if(t.matrix!=null&&!s.includes(t.matrix))throw new TypeError(`init.colorSpace.matrix, when provided, must be one of ${s.join(", ")}.`);if(t.fullRange!=null&&typeof t.fullRange!="boolean")throw new TypeError("init.colorSpace.fullRange, when provided, must be a boolean.")}this.primaries=t?.primaries??null,this.transfer=t?.transfer??null,this.matrix=t?.matrix??null,this.fullRange=t?.fullRange??null}toJSON(){return{primaries:this.primaries,transfer:this.transfer,matrix:this.matrix,fullRange:this.fullRange}}}const Hd=a=>typeof VideoFrame<"u"&&a instanceof VideoFrame,Ay=(a,t,i)=>{const n=Math.min(a.left,t),s=Math.min(a.top,i),r=Math.min(a.width,t-n),o=Math.min(a.height,i-s);return We(r>=0),We(o>=0),{left:n,top:s,width:r,height:o}},a0=(a,t)=>{if(!a||typeof a!="object")throw new TypeError(t+"crop, when provided, must be an object.");if(!Number.isInteger(a.left)||a.left<0)throw new TypeError(t+"crop.left must be a non-negative integer.");if(!Number.isInteger(a.top)||a.top<0)throw new TypeError(t+"crop.top must be a non-negative integer.");if(!Number.isInteger(a.width)||a.width<0)throw new TypeError(t+"crop.width must be a non-negative integer.");if(!Number.isInteger(a.height)||a.height<0)throw new TypeError(t+"crop.height must be a non-negative integer.")},Gy=a=>{if(!a||typeof a!="object")throw new TypeError("options must be an object.");if(a.colorSpace!==void 0&&!["display-p3","srgb"].includes(a.colorSpace))throw new TypeError("options.colorSpace, when provided, must be 'display-p3' or 'srgb'.");if(a.format!==void 0&&typeof a.format!="string")throw new TypeError("options.format, when provided, must be a string.");if(a.layout!==void 0){if(!Array.isArray(a.layout))throw new TypeError("options.layout, when provided, must be an array.");for(const t of a.layout){if(!t||typeof t!="object")throw new TypeError("Each entry in options.layout must be an object.");if(!Number.isInteger(t.offset)||t.offset<0)throw new TypeError("plane.offset must be a non-negative integer.");if(!Number.isInteger(t.stride)||t.stride<0)throw new TypeError("plane.stride must be a non-negative integer.")}}if(a.rect!==void 0){if(!a.rect||typeof a.rect!="object")throw new TypeError("options.rect, when provided, must be an object.");if(a.rect.x!==void 0&&(!Number.isInteger(a.rect.x)||a.rect.x<0))throw new TypeError("options.rect.x, when provided, must be a non-negative integer.");if(a.rect.y!==void 0&&(!Number.isInteger(a.rect.y)||a.rect.y<0))throw new TypeError("options.rect.y, when provided, must be a non-negative integer.");if(a.rect.width!==void 0&&(!Number.isInteger(a.rect.width)||a.rect.width<0))throw new TypeError("options.rect.width, when provided, must be a non-negative integer.");if(a.rect.height!==void 0&&(!Number.isInteger(a.rect.height)||a.rect.height<0))throw new TypeError("options.rect.height, when provided, must be a non-negative integer.")}},TG=(a,t,i)=>{const n=Af(a),s=[];let r=0;for(const o of n){const l=Math.ceil(t/o.widthDivisor),c=Math.ceil(i/o.heightDivisor),d=l*o.sampleBytes,g=d*c;s.push({offset:r,stride:d}),r+=g}return s},Af=a=>{const t=(i,n,s,r,o)=>{const l=[{sampleBytes:i,widthDivisor:1,heightDivisor:1},{sampleBytes:n,widthDivisor:s,heightDivisor:r},{sampleBytes:n,widthDivisor:s,heightDivisor:r}];return o&&l.push({sampleBytes:i,widthDivisor:1,heightDivisor:1}),l};switch(a){case"I420":return t(1,1,2,2,!1);case"I420P10":case"I420P12":return t(2,2,2,2,!1);case"I420A":return t(1,1,2,2,!0);case"I420AP10":case"I420AP12":return t(2,2,2,2,!0);case"I422":return t(1,1,2,1,!1);case"I422P10":case"I422P12":return t(2,2,2,1,!1);case"I422A":return t(1,1,2,1,!0);case"I422AP10":case"I422AP12":return t(2,2,2,1,!0);case"I444":return t(1,1,1,1,!1);case"I444P10":case"I444P12":return t(2,2,1,1,!1);case"I444A":return t(1,1,1,1,!0);case"I444AP10":case"I444AP12":return t(2,2,1,1,!0);case"NV12":return[{sampleBytes:1,widthDivisor:1,heightDivisor:1},{sampleBytes:2,widthDivisor:2,heightDivisor:2}];case"RGBA":case"RGBX":case"BGRA":case"BGRX":return[{sampleBytes:4,widthDivisor:1,heightDivisor:1}];default:yo(a),We(!1)}},Fy=(a,t)=>{const i={left:0,top:0,width:a.codedWidth,height:a.codedHeight},n=t.rect,s=$G(i,n,a.codedWidth,a.codedHeight,a.format),r=t.layout;let o;if(!t.format||t.format===a.format)o=a.format;else if(["RGBA","RGBX","BGRA","BGRX"].includes(t.format))o=t.format;else throw new Error("NotSupportedError: Invalid destination format.");return CG(s,o,r)},$G=(a,t,i,n,s)=>{const r={...a};if(t!==void 0){if(t.width===0||t.height===0)throw new TypeError("visibleRect dimensions cannot be zero.");if((t.x||0)+(t.width||0)>i)throw new TypeError("visibleRect exceeds codedWidth.");if((t.y||0)+(t.height||0)>n)throw new TypeError("visibleRect exceeds codedHeight.");r.x=t.x||0,r.y=t.y||0,r.width=t.width||0,r.height=t.height||0}if(!qG(s,r))throw new TypeError("visibleRect alignment is invalid for the format.");return r},qG=(a,t)=>{if(a===null)return!0;const i=Af(a);for(let n=0;n{const n=Af(t),s=n.length;if(i!==void 0&&i.length!==s)throw new TypeError(`Layout must have ${s} planes.`);let r=0;const o=[],l=[];for(let c=0;c4294967295)throw new TypeError("Allocation size exceeds limit.");l.push(f),r=Math.max(r,f);for(let _=0;_ 0.");if(!Number.isInteger(t.numberOfChannels)||t.numberOfChannels===0)throw new TypeError("Invalid AudioDataInit: numberOfChannels must be an integer > 0.");if(!Number.isFinite(t?.timestamp))throw new TypeError("init.timestamp must be a number.");const i=t.data.byteLength/(nl(t.format)*t.numberOfChannels);if(!Number.isInteger(i))throw new TypeError("Invalid AudioDataInit: data size is not a multiple of frame size.");this.format=t.format,this.sampleRate=t.sampleRate,this.numberOfFrames=i,this.numberOfChannels=t.numberOfChannels,this.timestamp=t.timestamp,this.duration=i/t.sampleRate;let n;if(t.data instanceof ArrayBuffer)n=new Uint8Array(t.data);else if(ArrayBuffer.isView(t.data))n=new Uint8Array(t.data.buffer,t.data.byteOffset,t.data.byteLength);else throw new TypeError("Invalid AudioDataInit: data is not a BufferSource.");const s=this.numberOfFrames*this.numberOfChannels*nl(this.format);if(n.byteLength=this.numberOfFrames)throw new RangeError("frameOffset out of range");const s=t.frameCount!==void 0?t.frameCount:this.numberOfFrames-n;if(s>this.numberOfFrames-n)throw new RangeError("frameCount out of range");const r=nl(i),o=Ll(i);if(o&&t.planeIndex>=this.numberOfChannels)throw new RangeError("planeIndex out of range");if(!o&&t.planeIndex!==0)throw new RangeError("planeIndex out of range");return(o?s:s*this.numberOfChannels)*r}copyTo(t,i){if(!wf(t))throw new TypeError("destination must be an ArrayBuffer or an ArrayBuffer view.");if(!i||typeof i!="object")throw new TypeError("options must be an object.");if(!Number.isInteger(i.planeIndex)||i.planeIndex<0)throw new TypeError("planeIndex must be a non-negative integer.");if(i.format!==void 0&&!Gf.has(i.format))throw new TypeError("Invalid format.");if(i.frameOffset!==void 0&&(!Number.isInteger(i.frameOffset)||i.frameOffset<0))throw new TypeError("frameOffset must be a non-negative integer.");if(i.frameCount!==void 0&&(!Number.isInteger(i.frameCount)||i.frameCount<0))throw new TypeError("frameCount must be a non-negative integer.");if(this._closed)throw new Error("AudioSample is closed.");const{format:n,frameCount:s,frameOffset:r}=i;let{planeIndex:o}=i,l=this.format;const c=n??this.format;if(!c)throw new Error("Destination format not determined");const d=this.numberOfFrames,g=this.numberOfChannels,h=r??0;if(h>=d)throw new RangeError("frameOffset out of range");const m=s!==void 0?s:d-h;if(m>d-h)throw new RangeError("frameCount out of range");const p=nl(c),u=Ll(c);if(u&&o>=g)throw new RangeError("planeIndex out of range");if(!u&&o!==0)throw new RangeError("planeIndex out of range");const _=(u?m:m*g)*p;if(t.byteLength<_)throw new RangeError("Destination buffer is too small");const b=Dr(t),v=zy(c);if(Qd(this._data))if(sA()&&g>2&&c!==l){GG(this._data,b,l,c,g,o,h,m);return}else try{this._data.copyTo(t,{planeIndex:o,frameOffset:h,frameCount:m,format:c});return}catch(C){if(c==="f32-planar")throw C;l="f32-planar"}const T=My(l),S=nl(l),M=Ll(l);let P;if(this._data instanceof Wd){const C=j=>{const G=this._data.getDataPlane(j);if(!(G instanceof Uint8Array))throw new TypeError("getDataPlane() must return a Uint8Array.");const A=d*S*(M?1:g);if(G.byteLength!==A)throw new TypeError(`Data plane ${j} has invalid size. Expected exactly ${A} bytes, got ${G.byteLength} bytes.`);return G};if(M)if(u)P=C(o),o=0;else{P=new Uint8Array(d*S*g);for(let j=0;jthis.numberOfFrames)throw new RangeError("startFrame out of range.");if(i>this.numberOfFrames)throw new RangeError("endFrame out of range.");if(i0)for(let l=0;l0&&this.copyTo(r,{planeIndex:0,format:this.format,frameOffset:t,frameCount:n});return new Os({data:r,format:this.format,sampleRate:this.sampleRate,numberOfChannels:this.numberOfChannels,timestamp:this.timestamp+t/this.sampleRate})}close(){this._closed||(Ld?.unregister(this),this._data instanceof Wd?(this._data._referenceCount--,this._data._referenceCount===0&&this._data.close()):Qd(this._data)?this._data.close():this._data=new Uint8Array(0),this._closed=!0)}toAudioData(){if(this._closed)throw new Error("AudioSample is closed.");return this._data instanceof Wd?this._createAudioDataFromData():Qd(this._data)?this._data.timestamp===this.microsecondTimestamp?this._data.clone():this._createAudioDataFromData():new AudioData({format:this.format,sampleRate:this.sampleRate,numberOfFrames:this.numberOfFrames,numberOfChannels:this.numberOfChannels,timestamp:this.microsecondTimestamp,data:this._data.buffer instanceof ArrayBuffer?this._data.buffer:this._data.slice()})}_createAudioDataFromData(){if(Ll(this.format)){const t=this.allocationSize({planeIndex:0,format:this.format}),i=new ArrayBuffer(t*this.numberOfChannels);for(let n=0;n0;){const g=Math.min(l,d),h=new Float32Array(s*g);for(let m=0;m0;){const h=Math.min(l,d),m=new Float32Array(s*h);for(let u=0;u{switch(a){case"u8":case"u8-planar":return 1;case"s16":case"s16-planar":return 2;case"s32":case"s32-planar":return 4;case"f32":case"f32-planar":return 4;default:throw new Error("Unknown AudioSampleFormat")}},Ll=a=>{switch(a){case"u8-planar":case"s16-planar":case"s32-planar":case"f32-planar":return!0;default:return!1}},My=a=>{switch(a){case"u8":case"u8-planar":return(t,i)=>(t.getUint8(i)-128)/128;case"s16":case"s16-planar":return(t,i)=>t.getInt16(i,!0)/32768;case"s32":case"s32-planar":return(t,i)=>t.getInt32(i,!0)/2147483648;case"f32":case"f32-planar":return(t,i)=>t.getFloat32(i,!0)}},zy=a=>{switch(a){case"u8":case"u8-planar":return(t,i,n)=>t.setUint8(i,os(Math.round(n*128)+128,0,255));case"s16":case"s16-planar":return(t,i,n)=>t.setInt16(i,os(Math.round(n*32768),-32768,32767),!0);case"s32":case"s32-planar":return(t,i,n)=>t.setInt32(i,os(Math.round(n*2147483648),-2147483648,2147483647),!0);case"f32":case"f32-planar":return(t,i,n)=>t.setFloat32(i,n,!0)}},Qd=a=>typeof AudioData<"u"&&a instanceof AudioData,AG=a=>{switch(a){case"u8-planar":return"u8";case"s16-planar":return"s16";case"s32-planar":return"s32";case"f32-planar":return"f32";default:return a}},GG=(a,t,i,n,s,r,o,l)=>{const c=My(i),d=zy(n),g=nl(i),h=nl(n),m=Ll(i);if(Ll(n))if(m){const u=new ArrayBuffer(l*g),f=Dr(u);a.copyTo(u,{planeIndex:r,frameOffset:o,frameCount:l,format:i});for(let _=0;_{const i=a.allocationSize({format:t,planeIndex:0}),n=new ArrayBuffer(i);return a.copyTo(n,{format:t,planeIndex:0}),new Os({data:n,format:t,numberOfChannels:a.numberOfChannels,sampleRate:a.sampleRate,timestamp:a.timestamp,duration:a.duration})};const Ey=new Map,Uy=new Map,MG=a=>{if(!a||typeof a!="object")throw new TypeError("Encoding config must be an object.");if(!zr.includes(a.codec))throw new TypeError(`Invalid video codec '${a.codec}'. Must be one of: ${zr.join(", ")}.`);const t=a.bitrate;if(a.quality===void 0&&t===void 0)throw new TypeError("config.quality must be provided.");if(a.quality!==void 0&&t!==void 0)throw new TypeError("config.quality and config.bitrate cannot both be provided.");if(a.quality!==void 0&&!(a.quality instanceof zs))throw new TypeError("config.quality, when provided, must be a Quality.");if(t!==void 0&&!(t instanceof zs)&&(!Number.isInteger(t)||t<=0))throw new TypeError("config.bitrate, when provided, must be a positive integer or a quality.");if(a.keyFrameInterval!==void 0&&(!Number.isFinite(a.keyFrameInterval)||a.keyFrameInterval<0))throw new TypeError("config.keyFrameInterval, when provided, must be a non-negative number.");if(a.sizeChangeBehavior!==void 0&&!["deny","passThrough","fill","contain","cover"].includes(a.sizeChangeBehavior))throw new TypeError("config.sizeChangeBehavior, when provided, must be 'deny', 'passThrough', 'fill', 'contain' or 'cover'.");if(a.transform!==void 0){if(typeof a.transform!="object"||!a.transform)throw new TypeError("config.transform, when provided, must be an object.");if(a.transform.width!==void 0&&(!Number.isInteger(a.transform.width)||a.transform.width<=0))throw new TypeError("config.transform.width, when provided, must be a positive integer.");if(a.transform.height!==void 0&&(!Number.isInteger(a.transform.height)||a.transform.height<=0))throw new TypeError("config.transform.height, when provided, must be a positive integer.");if(a.transform.fit!==void 0&&!["fill","contain","cover"].includes(a.transform.fit))throw new TypeError('config.transform.fit, when provided, must be one of "fill", "contain", or "cover".');if(a.transform.width!==void 0&&a.transform.height!==void 0&&a.transform.fit===void 0&&!["fill","contain","cover"].includes(a.sizeChangeBehavior))throw new TypeError("When both config.transform.width and config.transform.height are provided, config.transform.fit must also be provided.");if(a.transform.fit!==void 0&&["fill","contain","cover"].includes(a.sizeChangeBehavior)&&a.transform.fit!==a.sizeChangeBehavior)throw new TypeError("config.transform.fit, when provided, cannot differ from config.sizeChangeBehavior when config.sizeChangeBehavior is 'fill', 'contain' or 'cover', as sizeChangeBehavior already determines the fitting algorithm.");if(a.transform.rotate!==void 0&&![0,90,180,270].includes(a.transform.rotate))throw new TypeError("config.transform.rotate, when provided, must be 0, 90, 180 or 270.");if(a.transform.flip!==void 0&&typeof a.transform.flip!="boolean")throw new TypeError("config.transform.flip, when provided, must be a boolean.");if(a.transform.crop!==void 0&&a0(a.transform.crop,"config.transform."),a.transform.process!==void 0&&typeof a.transform.process!="function")throw new TypeError("config.transform.process, when provided, must be a function.");if(a.transform.frameRate!==void 0&&(!Number.isFinite(a.transform.frameRate)||a.transform.frameRate<=0))throw new TypeError("config.transform.frameRate, when provided, must be a finite positive number.");if(a.transform.force!==void 0&&typeof a.transform.force!="boolean")throw new TypeError("config.transform.force, when provided, must be a boolean.")}if(a.onEncodedPacket!==void 0&&typeof a.onEncodedPacket!="function")throw new TypeError("config.onEncodedPacket, when provided, must be a function.");if(a.onEncoderConfig!==void 0&&typeof a.onEncoderConfig!="function")throw new TypeError("config.onEncoderConfig, when provided, must be a function.");if(a.onEncodedSample!==void 0&&typeof a.onEncodedSample!="function")throw new TypeError("config.onEncodedSample, when provided, must be a function.");Ry(a.codec,a)},Ry=(a,t)=>{if(!t||typeof t!="object")throw new TypeError("Encoding options must be an object.");if(t.alpha!==void 0&&!["discard","keep"].includes(t.alpha))throw new TypeError("options.alpha, when provided, must be 'discard' or 'keep'.");const i=t.bitrateMode;if(i!==void 0&&!["constant","variable"].includes(i))throw new TypeError("bitrateMode, when provided, must be 'constant' or 'variable'.");if(t.latencyMode!==void 0&&!["quality","realtime"].includes(t.latencyMode))throw new TypeError("latencyMode, when provided, must be 'quality' or 'realtime'.");if(t.fullCodecString!==void 0&&typeof t.fullCodecString!="string")throw new TypeError("fullCodecString, when provided, must be a string.");if(t.fullCodecString!==void 0&&qf(t.fullCodecString)!==a)throw new TypeError(`fullCodecString, when provided, must be a string that matches the specified codec (${a}).`);if(t.hardwareAcceleration!==void 0&&!["no-preference","prefer-hardware","prefer-software"].includes(t.hardwareAcceleration))throw new TypeError("hardwareAcceleration, when provided, must be 'no-preference', 'prefer-hardware' or 'prefer-software'.");if(t.scalabilityMode!==void 0&&typeof t.scalabilityMode!="string")throw new TypeError("scalabilityMode, when provided, must be a string.");if(t.contentHint!==void 0&&typeof t.contentHint!="string")throw new TypeError("contentHint, when provided, must be a string.")},By=a=>{const t=a.bitrateMode,i=a.quality._toVideoRateControl(a.codec,a.width,a.height,t),n=(r,o,l)=>({codec:a.fullCodecString??iG(a.codec,a.width,a.height,l,a.alpha==="keep"),width:a.width,height:a.height,displayWidth:a.squarePixelWidth,displayHeight:a.squarePixelHeight,bitrate:r,bitrateMode:o,alpha:a.alpha??"discard",framerate:a.framerate,latencyMode:a.latencyMode,hardwareAcceleration:a.hardwareAcceleration,scalabilityMode:a.scalabilityMode,contentHint:a.contentHint,...oG(a.codec)}),s=[];return i.quantizer!==null&&s.push({config:n(void 0,"quantizer",i.bitrate),quantizer:i.quantizer}),i.bitrateMode!=="quantizer"&&s.push({config:n(i.bitrate,i.bitrateMode,i.bitrate),quantizer:null}),We(s.length>0),s},zG=a=>{if(!a||typeof a!="object")throw new TypeError("Encoding config must be an object.");if(!tl.includes(a.codec))throw new TypeError(`Invalid audio codec '${a.codec}'. Must be one of: ${tl.join(", ")}.`);const t=a.bitrate;if(a.quality===void 0&&t===void 0&&!(js.includes(a.codec)||a.codec==="flac"))throw new TypeError("config.quality must be provided for compressed audio codecs.");if(a.quality!==void 0&&t!==void 0)throw new TypeError("config.quality and config.bitrate cannot both be provided.");if(a.quality!==void 0&&!(a.quality instanceof zs))throw new TypeError("config.quality, when provided, must be a Quality.");if(t!==void 0&&!(t instanceof zs)&&(!Number.isInteger(t)||t<=0))throw new TypeError("config.bitrate, when provided, must be a positive integer or a quality.");if(a.transform!==void 0){if(typeof a.transform!="object"||!a.transform)throw new TypeError("config.transform, when provided, must be an object.");if(a.transform.numberOfChannels!==void 0&&(!Number.isInteger(a.transform.numberOfChannels)||a.transform.numberOfChannels<=0))throw new TypeError("config.transform.numberOfChannels, when provided, must be a positive integer.");if(a.transform.sampleRate!==void 0&&(!Number.isInteger(a.transform.sampleRate)||a.transform.sampleRate<=0))throw new TypeError("config.transform.sampleRate, when provided, must be a positive integer.");if(a.transform.sampleFormat!==void 0&&!["u8","s16","s32","f32"].includes(a.transform.sampleFormat))throw new TypeError("config.transform.sampleFormat, when provided, must be one of: u8, s16, s32, f32.");if(a.transform.process!==void 0&&typeof a.transform.process!="function")throw new TypeError("config.transform.process, when provided, must be a function.")}if(a.onEncodedPacket!==void 0&&typeof a.onEncodedPacket!="function")throw new TypeError("config.onEncodedPacket, when provided, must be a function.");if(a.onEncoderConfig!==void 0&&typeof a.onEncoderConfig!="function")throw new TypeError("config.onEncoderConfig, when provided, must be a function.");if(a.onEncodedSample!==void 0&&typeof a.onEncodedSample!="function")throw new TypeError("config.onEncodedSample, when provided, must be a function.");Py(a.codec,a)},Py=(a,t)=>{if(!t||typeof t!="object")throw new TypeError("Encoding options must be an object.");const i=t.bitrateMode;if(i!==void 0&&!["constant","variable"].includes(i))throw new TypeError("bitrateMode, when provided, must be 'constant' or 'variable'.");if(t.fullCodecString!==void 0&&typeof t.fullCodecString!="string")throw new TypeError("fullCodecString, when provided, must be a string.");if(t.fullCodecString!==void 0&&qf(t.fullCodecString)!==a)throw new TypeError(`fullCodecString, when provided, must be a string that matches the specified codec (${a}).`)},jy=a=>{const t=a.bitrateMode;return{codec:a.fullCodecString??sG(a.codec,a.numberOfChannels,a.sampleRate),numberOfChannels:a.numberOfChannels,sampleRate:a.sampleRate,bitrate:a.quality?._toAudioBitrate(a.codec),bitrateMode:a.quality?._bitrateMode??t,...lG(a.codec)}};class zs{constructor(t){if((typeof t=="number"||typeof t=="string")&&(t={quality:t}),!t||typeof t!="object")throw new TypeError("options must be an object.");if(t.bitrateMode!==void 0&&!["constant","variable"].includes(t.bitrateMode))throw new TypeError("options.bitrateMode, when provided, must be 'constant' or 'variable'.");if("quality"in t){if(typeof t.quality=="string"?!(t.quality in Ny):typeof t.quality!="number"||Number.isNaN(t.quality))throw new TypeError("options.quality must be a number, or one of 'very-low', 'low', 'medium', 'high' or 'very-high'.");if(t.preferBitrate!==void 0&&typeof t.preferBitrate!="boolean")throw new TypeError("options.preferBitrate, when provided, must be a boolean.");if("bitrate"in t||"quantizer"in t)throw new TypeError("options.quality cannot be combined with options.bitrate or options.quantizer.");this._quality=typeof t.quality=="string"?Ny[t.quality]:t.quality,this._preferBitrate=t.preferBitrate??!1,this._bitrate=void 0,this._quantizer=void 0}else{if(t.bitrate!==void 0&&(!Number.isInteger(t.bitrate)||t.bitrate<=0))throw new TypeError("options.bitrate, when provided, must be a positive integer.");if(t.quantizer!==void 0&&(!Number.isInteger(t.quantizer)||t.quantizer<0))throw new TypeError("options.quantizer, when provided, must be a non-negative integer.");if(t.bitrate===void 0&&t.quantizer===void 0)throw new TypeError("At least one of options.bitrate or options.quantizer must be set.");if("preferBitrate"in t)throw new TypeError("options.preferBitrate can only be combined with options.quality.");this._quality=void 0,this._preferBitrate=!1,this._bitrate=t.bitrate,this._quantizer=t.quantizer}this._bitrateMode=t.bitrateMode}_toVideoRateControl(t,i,n,s){const r=EG[t];let o=null,l=this._bitrateMode??s??"variable";if(this._quantizer!==void 0){if(r)if(this._quantizerr.max){if(this._bitrate===void 0)throw new Error(`Quantizer ${this._quantizer} is out of range for codec '${t}'; must be between ${r.min} and ${r.max}.`)}else o=this._quantizer,this._bitrate===void 0&&(l="quantizer");else if(this._bitrate===void 0)throw new Error(`Codec '${t}' does not support quantizer-based encoding. Provide a bitrate in the Quality to define a fallback.`)}else this._bitrate===void 0&&r&&!this._preferBitrate&&(We(this._quality!==void 0),o=os(Math.round(eA(r.worst,r.best,this._quality)),r.min,r.max));let c;if(this._bitrate!==void 0)c=this._bitrate;else{let d=this._quality;d===void 0&&(We(o!==null&&r),d=os((o-r.worst)/(r.best-r.worst),0,1)),c=Oy(t,i,n,i0(d))}return{quantizer:o,bitrate:c,bitrateMode:l}}_toVideoBitrate(t,i,n){return this._bitrate!==void 0?this._bitrate:(We(this._quality!==void 0),Oy(t,i,n,i0(this._quality)))}_toAudioBitrate(t){if(js.includes(t)||t==="flac")return;if(this._bitrate!==void 0)return this._bitrate;if(this._quality===void 0)throw new Error("This Quality defines neither a quality level nor a bitrate and therefore cannot be used for audio encoding.");const i=i0(this._quality),s={aac:128e3,opus:64e3,mp3:16e4,vorbis:64e3,ac3:384e3,eac3:192e3,dts:768e3}[t];if(!s)throw new Error(`Unhandled codec: ${t}`);let r=s*i;return t==="aac"?r=[96e3,128e3,16e4,192e3].reduce((l,c)=>Math.abs(c-r)Math.abs(c-r).3*Math.exp(2.5538*a),Oy=(a,t,i,n)=>{const s=t*i,r=1920*1080,o=3e6,l=Math.pow(s/r,.95),c=o*l,d={avc:1,hevc:.6,vp9:.6,av1:.4,vp8:1.2,prores:22e7/o},h=c*d[a]*n;return Math.ceil(h/1e3)*1e3},Iy=(a,t)=>{if(a==="avc")return{avc:{quantizer:t}};if(a==="hevc")return{hevc:{quantizer:t}};if(a==="vp9")return{vp9:{quantizer:t}};if(a==="av1")return{av1:{quantizer:t}};We(!1)},UG=async(a,t={})=>{const{width:i=1280,height:n=720,quality:s,bitrate:r,frameRate:o,...l}=t;if(!zr.includes(a))return!1;if(!Number.isInteger(i)||i<=0)throw new TypeError("width must be a positive integer.");if(!Number.isInteger(n)||n<=0)throw new TypeError("height must be a positive integer.");if(s!==void 0&&!(s instanceof zs))throw new TypeError("quality, when provided, must be a Quality.");if(s!==void 0&&r!==void 0)throw new TypeError("quality and bitrate cannot both be provided.");if(r!==void 0&&!(r instanceof zs)&&(!Number.isInteger(r)||r<=0))throw new TypeError("bitrate must be a positive integer or a quality.");if(o!==void 0&&(!Number.isFinite(o)||o<=0))throw new TypeError("frameRate, when provided, must be a finite positive number.");Ry(a,l);const c=Ff(s,r)??new zs("medium");let d;try{d=By({codec:a,width:i,height:n,quality:c,framerate:o,...l,alpha:"discard"})}catch{return!1}const g=JSON.stringify(d),h=Ey.get(g);if(h)return h;const m=(async()=>{for(const{config:u}of d)if(Ly.some(f=>f.supports(a,u)))return!0;if(typeof VideoEncoder>"u"||(i%2===1||n%2===1)&&a==="avc")return!1;for(const{config:u,quantizer:f}of d){try{if(!(await VideoEncoder.isConfigSupported(u)).supported)continue}catch{continue}if(!Wb()||await new Promise(async b=>{try{const v=new VideoEncoder({output:()=>{},error:()=>b(!1)});v.configure(u);const T=new Uint8Array(i*n*4),S=new VideoFrame(T,{format:"RGBA",codedWidth:i,codedHeight:n,timestamp:0});v.encode(S,f!==null?Iy(a,f):void 0),S.close(),await v.flush(),b(!0)}catch{b(!1)}}))return!0}return!1})();return Ey.set(g,m),m},Dy=async(a,t={})=>{const{numberOfChannels:i=2,sampleRate:n=48e3,quality:s,bitrate:r,...o}=t;if(!tl.includes(a))return!1;if(!Number.isInteger(i)||i<=0)throw new TypeError("numberOfChannels must be a positive integer.");if(!Number.isInteger(n)||n<=0)throw new TypeError("sampleRate must be a positive integer.");if(s!==void 0&&!(s instanceof zs))throw new TypeError("quality, when provided, must be a Quality.");if(s!==void 0&&r!==void 0)throw new TypeError("quality and bitrate cannot both be provided.");if(r!==void 0&&!(r instanceof zs)&&(!Number.isInteger(r)||r<=0))throw new TypeError("bitrate must be a positive integer.");Py(a,o);const l=Ff(s,r)??new zs("medium"),c=jy({codec:a,numberOfChannels:i,sampleRate:n,quality:l,...o}),d=JSON.stringify(c),g=Uy.get(d);if(g)return g;const h=(async()=>{if(Vy.some(m=>m.supports(a,c))||js.includes(a))return!0;if(typeof AudioEncoder>"u")return!1;try{return(await AudioEncoder.isConfigSupported(c)).supported===!0}catch{return!1}})();return Uy.set(d,h),h},Ff=(a,t)=>{if(a!==void 0)return a;if(t!==void 0)return t instanceof zs?t:new zs({bitrate:t})};const Ly=[],Vy=[];const RG=a=>{let n=a>>2,s=4096,r=0,o=12,l=0;for(n<0&&(n=-n,r=128),n+=33,n>8191&&(n=8191);(n&s)!==s&&o>=5;)s>>=1,o--;return l=n>>o-4&15,~(r|o-5<<4|l)&255},BG=a=>{let i=2048,n=0,s=11,r=0,o=a>>3;for(o<0?o=-o-1:n=128,o>4095&&(o=4095);(o&i)!==i&&s>=5;)i>>=1,s--;return r=o>>(s===4?1:s-4)&15,(n|s-4<<4|r)^85};class Vl{constructor(t,i,n,s,r){this.bytes=t,this.view=i,this.offset=n,this.start=s,this.end=r,this.bufferPos=s-n}static tempFromBytes(t){return new Vl(t,Dr(t),0,0,t.length)}get length(){return this.end-this.start}get filePos(){return this.offset+this.bufferPos}set filePos(t){this.bufferPos=t-this.offset}get remainingLength(){return Math.max(this.end-this.filePos,0)}skip(t){this.bufferPos+=t}slice(t,i=this.end-t){if(tthis.end)throw new RangeError("Slicing outside of original slice.");return new Vl(this.bytes,this.view,this.offset,t,t+i)}}const PG=(a,t)=>{if(a.filePosa.end)throw new RangeError(`Tried reading [${a.filePos}, ${a.filePos+t}), but slice is [${a.start}, ${a.end}). This is likely an internal error, please report it alongside the file that caused it.`)},jG=(a,t)=>{PG(a,t);const i=a.bytes.subarray(a.bufferPos,a.bufferPos+t);return a.bufferPos+=t,i};class Hy{constructor(t){this.mutex=new Ib,this.trackTimestampInfo=new WeakMap,this.output=t}onTrackClose(t){}validateTimestamp(t,i,n){let s=this.trackTimestampInfo.get(t);if(s){if(n&&(s.maxTimestampBeforeLastKeyPacket=s.maxTimestamp),s.maxTimestampBeforeLastKeyPacket!==null&&i/g,NG=/(?:(\d{2}):)?(\d{2}):(\d{2}).(\d{3})/,OG=a=>{const t=NG.exec(a);if(!t)throw new Error("Expected match.");return 3600*1e3*Number(t[1]||"0")+60*1e3*Number(t[2])+1e3*Number(t[3])+Number(t[4])},Wy=a=>{const t=Math.floor(a/36e5),i=Math.floor(a%(3600*1e3)/(60*1e3)),n=Math.floor(a%(60*1e3)/1e3),s=a%1e3;return t.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0")+":"+n.toString().padStart(2,"0")+"."+s.toString().padStart(3,"0")};class zf{constructor(t){this.writer=t,this.helper=new Uint8Array(8),this.helperView=new DataView(this.helper.buffer),this.offsets=new WeakMap}writeU32(t){this.helperView.setUint32(0,t,!1),this.writer.write(this.helper.subarray(0,4))}writeU64(t){this.helperView.setUint32(0,Math.floor(t/2**32),!1),this.helperView.setUint32(4,t,!1),this.writer.write(this.helper.subarray(0,8))}writeAscii(t){for(let i=0;i[(a%256+256)%256],ca=a=>(_r.setUint16(0,a,!1),[Xa[0],Xa[1]]),n0=a=>(_r.setInt16(0,a,!1),[Xa[0],Xa[1]]),Qy=a=>(_r.setUint32(0,a,!1),[Xa[1],Xa[2],Xa[3]]),ot=a=>(_r.setUint32(0,a,!1),[Xa[0],Xa[1],Xa[2],Xa[3]]),Hr=a=>(_r.setInt32(0,a,!1),[Xa[0],Xa[1],Xa[2],Xa[3]]),Er=a=>(_r.setUint32(0,Math.floor(a/2**32),!1),_r.setUint32(4,a,!1),[Xa[0],Xa[1],Xa[2],Xa[3],Xa[4],Xa[5],Xa[6],Xa[7]]),Ky=a=>(_r.setInt32(0,Math.floor(a/2**32),!1),_r.setUint32(4,a,!1),[Xa[0],Xa[1],Xa[2],Xa[3],Xa[4],Xa[5],Xa[6],Xa[7]]),Yy=a=>(_r.setInt16(0,2**8*a,!1),[Xa[0],Xa[1]]),vr=a=>(_r.setInt32(0,2**16*a,!1),[Xa[0],Xa[1],Xa[2],Xa[3]]),s0=a=>(_r.setInt32(0,2**30*a,!1),[Xa[0],Xa[1],Xa[2],Xa[3]]),r0=(a,t)=>{const i=[];let n=a;do{let s=n&127;n>>=7,i.length>0&&(s|=128),i.push(s)}while(n>0||t);return i.reverse()},Vi=(a,t=!1)=>{const i=Array(a.length).fill(null).map((n,s)=>a.charCodeAt(s));return t&&i.push(0),i},Jy=a=>[vr(a[0]),vr(a[1]),s0(a[2]),vr(a[3]),vr(a[4]),s0(a[5]),vr(a[6]),vr(a[7]),s0(a[8])],Xt=(a,t,i)=>({type:a,contents:t&&new Uint8Array(t.flat(10)),children:i}),yi=(a,t,i,n,s)=>Xt(a,[vn(t),Qy(i),n??[]],s),IG=a=>a.isQuickTime?Xt("ftyp",[Vi("qt "),ot(512),Vi("qt ")]):a.fragmented?a.cmaf?Xt("ftyp",[Vi("iso5"),ot(512),Vi("iso5"),Vi("iso6"),Vi("mp41"),Vi("cmfc"),Vi("dash")]):Xt("ftyp",[Vi("iso5"),ot(512),Vi("iso5"),Vi("iso6"),Vi("mp41")]):Xt("ftyp",[Vi("isom"),ot(512),Vi("isom"),a.holdsAvc?Vi("avc1"):[],Vi("mp41")]),Xy=()=>Xt("styp",[Vi("iso5"),ot(0),Vi("iso5"),Vi("iso6"),Vi("mp41"),Vi("cmfc"),Vi("dash")]),Zy=(a,t)=>{const i=Math.max(0,a.minWrittenTimestamp);let n=Math.max(0,a.maxWrittenEndTimestamp-i);return Number.isFinite(n)||(n=0),yi("sidx",1,0,[ot(1),ot(Is),Er(Zi(i,Is)),Er(0),ca(0),ca(1),ot(t&2147483647),ot(Zi(n,Is)),ot(0)])},Ef=a=>({type:"mdat",largeSize:a}),DG=a=>({type:"free",size:a}),Kd=a=>Xt("moov",void 0,[LG(a.creationTime,a.trackDatas),...a.trackDatas.map(t=>VG(t,a.creationTime)),a.isFragmented?CF(a.trackDatas):null,OF(a)]),LG=(a,t)=>{const i=Math.max(0,...t.map(o=>Math.max(0,Zi(Pc(o),Is)+Zi(o.startTimestampOffset??0,Is)))),n=Math.max(0,...t.map(o=>o.track.id))+1,s=!vo(a)||!vo(i),r=s?Er:ot;return yi("mvhd",+s,0,[r(a),r(a),ot(Is),r(i),vr(1),Yy(1),Array(10).fill(0),Jy(Pb),Array(24).fill(0),ot(n)])},VG=(a,t)=>{const i=XF(a),n=a.startTimestampOffset!==null&&a.startTimestampOffset!==0;return Xt("trak",void 0,[HG(a,t),n?WG(a):null,QG(a,t),i.name!==void 0?Xt("udta",void 0,[Xt("name",[...ws.encode(i.name)])]):null])},HG=(a,t)=>{const i=Math.max(0,Zi(Pc(a),Is)+Zi(a.startTimestampOffset??0,Is)),n=!vo(t)||!vo(i),s=n?Er:ot;let r;if(a.type==="video"&&a.track.metadata.transformationMatrix)r=a.track.metadata.transformationMatrix;else if(a.type==="video"){const{rotation:c,flip:d}=a.track.metadata,g=yf(jb(c??0),WC(d?-1:1,1));r=LC(g,a.info.width,a.info.height)}else r=Pb;let o=2;a.track.metadata.disposition?.default!==!1&&(o|=1);const l=a.type==="video"?0:a.type==="audio"?1:a.type==="subtitle"?2:yo(a);return yi("tkhd",+n,o,[s(t),s(t),ot(a.track.id),ot(0),s(i),Array(8).fill(0),ca(0),ca(l),Yy(a.type==="audio"?1:0),ca(0),Jy(r),vr(a.type==="video"?a.info.width:0),vr(a.type==="video"?a.info.height:0)])},WG=a=>{const t=a.startTimestampOffset;if(We(t!==null),t>0){const i=Zi(t,Is),n=Zi(Pc(a),Is),s=!vo(i)||!vo(n),r=s?Er:ot,o=s?Ky:Hr;return Xt("edts",void 0,[yi("elst",s?1:0,0,[ot(2),r(i),o(-1),vr(1),r(n),o(0),vr(1)])])}else{const i=Zi(-t,a.timescale),n=Math.max(0,Zi(Pc(a),Is)+Zi(t,Is)),s=!KC(i)||!vo(n),r=s?Er:ot,o=s?Ky:Hr;return Xt("edts",void 0,[yi("elst",s?1:0,0,[ot(1),r(n),o(i),vr(1)])])}},QG=(a,t)=>Xt("mdia",void 0,[KG(a,t),o0(!0,YG[a.type],JG[a.type]),XG(a)]),KG=(a,t)=>{const i=Zi(Pc(a),a.timescale),n=!vo(t)||!vo(i),s=n?Er:ot;return yi("mdhd",+n,0,[s(t),s(t),ot(a.timescale),s(i),ca(r2(a.track.metadata.languageCode??Lb)),ca(0)])},YG={video:"vide",audio:"soun",subtitle:"text"},JG={video:"MediabunnyVideoHandler",audio:"MediabunnySoundHandler",subtitle:"MediabunnyTextHandler"},o0=(a,t,i,n="\0\0\0\0")=>yi("hdlr",0,0,[a?Vi("mhlr"):ot(0),Vi(t),Vi(n),ot(0),ot(0),Vi(i,!0)]),XG=a=>Xt("minf",void 0,[ZG[a.type](),eF(),iF(a)]),ZG={video:()=>yi("vmhd",0,1,[ca(0),ca(0),ca(0),ca(0)]),audio:()=>yi("smhd",0,0,[ca(0),ca(0)]),subtitle:()=>yi("nmhd",0,0)},eF=()=>Xt("dinf",void 0,[tF()]),tF=()=>yi("dref",0,0,[ot(1)],[aF()]),aF=()=>yi("url ",0,1),iF=a=>{const t=a.compositionTimeOffsetTable.length>1||a.compositionTimeOffsetTable.some(i=>i.sampleCompositionTimeOffset!==0);return Xt("stbl",void 0,[nF(a),wF(a),t?$F(a):null,t?qF(a):null,xF(a),SF(a),TF(a),kF(a)])},nF=a=>{let t;if(a.type==="video")t=sF(VF(a.track.source._codec,a.info.decoderConfig.codec),a);else if(a.type==="audio"){const i=s2(a.track.source._codec,a.info.decoderConfig.codec,a.muxer.isQuickTime);We(i),t=uF(i,a)}else a.type==="subtitle"&&(t=bF(QF[a.track.source._codec],a));return We(t),yi("stsd",0,0,[ot(1)],[t])},sF=(a,t)=>Xt(a,[Array(6).fill(0),ca(1),ca(0),ca(0),Array(12).fill(0),ca(t.info.width),ca(t.info.height),ot(4718592),ot(4718592),ot(0),ca(1),vn(10),Vi("Mediabunny"),Array(21).fill(0),ca(t.info.hasAlphaChannel?32:24),n0(65535)],[HF[t.track.source._codec]?.(t)??null,rF(t),Ob(t.info.decoderConfig.colorSpace)?null:oF(t),l0(t)]),l0=a=>a.avgBitrate===0&&a.maxBitrate===0?null:Xt("btrt",[ot(0),ot(a.maxBitrate),ot(a.avgBitrate)]),rF=a=>a.info.pixelAspectRatio.num===a.info.pixelAspectRatio.den?null:Xt("pasp",[ot(a.info.pixelAspectRatio.num),ot(a.info.pixelAspectRatio.den)]),oF=a=>{const t=a.info.decoderConfig.colorSpace;return Xt("colr",[Vi(a.muxer.isQuickTime?"nclc":"nclx"),ca(t?.primaries!=null?Bd[t.primaries]:2),ca(t?.transfer!=null?Pd[t.transfer]:2),ca(t?.matrix!=null?jd[t.matrix]:2),a.muxer.isQuickTime?[]:vn((t?.fullRange?1:0)<<7)])},lF=a=>a.info.decoderConfig&&Xt("avcC",[...Ms(a.info.decoderConfig.description)]),cF=a=>a.info.decoderConfig&&Xt("hvcC",[...Ms(a.info.decoderConfig.description)]),e2=a=>{if(!a.info.decoderConfig)return null;const t=a.info.decoderConfig,i=t.codec.split("."),n=Number(i[1]),s=Number(i[2]),r=Number(i[3]),o=i[4]?Number(i[4]):1,l=i[8]?Number(i[8]):Number(t.colorSpace?.fullRange??0),c=(r<<4)+(o<<1)+l,d=i[5]?Number(i[5]):t.colorSpace?.primaries?Bd[t.colorSpace.primaries]:1,g=i[6]?Number(i[6]):t.colorSpace?.transfer?Pd[t.colorSpace.transfer]:1,h=i[7]?Number(i[7]):t.colorSpace?.matrix?jd[t.colorSpace.matrix]:1;return yi("vpcC",1,0,[vn(n),vn(s),vn(c),vn(d),vn(g),vn(h),ca(0)])},dF=a=>Xt("av1C",my(a.info.decoderConfig.codec)),uF=(a,t)=>{let i=0,n,s=16;const r=js.includes(t.track.source._codec);if(r){const o=t.track.source._codec,{sampleSize:l}=al(o);s=8*l,s>16&&(i=1)}if(t.muxer.isQuickTime&&(i=1),i===0)n=[Array(6).fill(0),ca(1),ca(i),ca(0),ot(0),ca(t.info.numberOfChannels),ca(s),ca(0),ca(0),ca(t.info.sampleRate<2**16?t.info.sampleRate:0),ca(0)];else{const o=r?0:-2;n=[Array(6).fill(0),ca(1),ca(i),ca(0),ot(0),ca(t.info.numberOfChannels),ca(Math.min(s,16)),n0(o),ca(0),ca(t.info.sampleRate<2**16?t.info.sampleRate:0),ca(0),r?[ot(1),ot(s/8),ot(t.info.numberOfChannels*s/8)]:[ot(0),ot(0),ot(0)],ot(2)]}return Xt(a,n,[WF(t.track.source._codec,t.muxer.isQuickTime)?.(t)??null,l0(t)])},c0=a=>{let t;switch(a.track.source._codec){case"aac":t=64;break;case"mp3":t=107;break;case"vorbis":t=221;break;default:throw new Error(`Unhandled audio codec: ${a.track.source._codec}`)}let i=[...vn(t),...vn(21),...Qy(0),...ot(a.maxBitrate),...ot(a.avgBitrate)];if(a.info.decoderConfig.description){const n=Ms(a.info.decoderConfig.description);i=[...i,...vn(5),...r0(n.byteLength),...n]}return i=[...ca(1),...vn(0),...vn(4),...r0(i.length),...i,...vn(6),...vn(1),...vn(2)],i=[...vn(3),...r0(i.length),...i],yi("esds",0,0,i)},sl=a=>Xt("wave",void 0,[fF(a),pF(a),Xt("\0\0\0\0")]),fF=a=>Xt("frma",[Vi(s2(a.track.source._codec,a.info.decoderConfig.codec,a.muxer.isQuickTime))]),pF=a=>{const{littleEndian:t}=al(a.track.source._codec);return Xt("enda",[ca(+t)])},mF=a=>{let t=a.info.numberOfChannels,i=3840,n=a.info.sampleRate,s=0,r=0,o=new Uint8Array(0);const l=a.info.decoderConfig?.description;if(l){We(l.byteLength>=18);const c=Ms(l),d=oy(c);t=d.outputChannelCount,i=d.preSkip,n=d.inputSampleRate,s=d.outputGain,r=d.channelMappingFamily,d.channelMappingTable&&(o=d.channelMappingTable)}return Xt("dOps",[vn(0),vn(t),ca(i),ot(n),n0(s),vn(r),...o])},gF=a=>{const t=a.info.decoderConfig?.description;We(t);const i=Ms(t);return yi("dfLa",0,0,[...i.subarray(4)])},Wr=a=>{const{littleEndian:t,sampleSize:i}=al(a.track.source._codec),n=+t;return yi("pcmC",0,0,[vn(n),vn(8*i)])},hF=a=>{We(a.info.primingPacket);const t=RA(a.info.primingPacket.data);if(!t)throw new Error("Couldn't extract AC-3 frame info from the audio packet. Ensure the packets contain valid AC-3 sync frames (as specified in ETSI TS 102 366).");const i=new Uint8Array(3),n=new zn(i);return n.writeBits(2,t.fscod),n.writeBits(5,t.bsid),n.writeBits(3,t.bsmod),n.writeBits(3,t.acmod),n.writeBits(1,t.lfeon),n.writeBits(5,t.bitRateCode),n.writeBits(5,0),Xt("dac3",[...i])},_F=a=>{We(a.info.primingPacket);const t=PA(a.info.primingPacket.data);if(!t)throw new Error("Couldn't extract E-AC-3 frame info from the audio packet. Ensure the packets contain valid E-AC-3 sync frames (as specified in ETSI TS 102 366).");let i=16;for(const o of t.substreams)i+=23,o.numDepSub>0?i+=9:i+=1;const n=Math.ceil(i/8),s=new Uint8Array(n),r=new zn(s);r.writeBits(13,t.dataRate),r.writeBits(3,t.substreams.length-1);for(const o of t.substreams)r.writeBits(2,o.fscod),r.writeBits(5,o.bsid),r.writeBits(1,0),r.writeBits(1,0),r.writeBits(3,o.bsmod),r.writeBits(3,o.acmod),r.writeBits(1,o.lfeon),r.writeBits(3,0),r.writeBits(4,o.numDepSub),o.numDepSub>0?r.writeBits(9,o.chanLoc):r.writeBits(1,0);return Xt("dec3",[...s])},vF=a=>{We(a.info.primingPacket);const t=XA(a.info.primingPacket.data);if(!t)throw new Error("Couldn't extract DTS frame info from the audio packet. Ensure the packets contain valid DTS frames as specified in ETSI TS 102 114.");return Xt("ddts",[...tG(t)])},bF=(a,t)=>Xt(a,[Array(6).fill(0),ca(1)],[KF[t.track.source._codec](t),l0(t)]),yF=a=>Xt("vttC",[...ws.encode(a.info.config.description)]),wF=a=>yi("stts",0,0,[ot(a.timeToSampleTable.length),a.timeToSampleTable.map(t=>[ot(t.sampleCount),ot(t.sampleDelta)])]),kF=a=>{if(a.samples.every(i=>i.type==="key"))return null;const t=[...a.samples.entries()].filter(([,i])=>i.type==="key");return yi("stss",0,0,[ot(t.length),t.map(([i])=>ot(i+1))])},xF=a=>yi("stsc",0,0,[ot(a.compactlyCodedChunkTable.length),a.compactlyCodedChunkTable.map(t=>[ot(t.firstChunk),ot(t.samplesPerChunk),ot(1)])]),SF=a=>{if(a.type==="audio"&&a.info.requiresPcmTransformation){const{sampleSize:t}=al(a.track.source._codec);return yi("stsz",0,0,[ot(t*a.info.numberOfChannels),ot(a.samples.reduce((i,n)=>i+Zi(n.duration,a.timescale),0))])}return yi("stsz",0,0,[ot(0),ot(a.samples.length),a.samples.map(t=>ot(t.size))])},TF=a=>a.finalizedChunks.length>0&&Mr(a.finalizedChunks).offset>=2**32?yi("co64",0,0,[ot(a.finalizedChunks.length),a.finalizedChunks.map(t=>Er(t.offset))]):yi("stco",0,0,[ot(a.finalizedChunks.length),a.finalizedChunks.map(t=>ot(t.offset))]),$F=a=>yi("ctts",1,0,[ot(a.compositionTimeOffsetTable.length),a.compositionTimeOffsetTable.map(t=>[ot(t.sampleCount),Hr(t.sampleCompositionTimeOffset)])]),qF=a=>{let t=1/0,i=-1/0,n=1/0,s=-1/0;We(a.compositionTimeOffsetTable.length>0),We(a.samples.length>0);for(let o=0;o=2**31?null:yi("cslg",0,0,[Hr(r),Hr(t),Hr(i),Hr(n),Hr(s)])},CF=a=>Xt("mvex",void 0,a.map(AF)),AF=a=>yi("trex",0,0,[ot(a.track.id),ot(1),ot(0),ot(0),ot(0)]),t2=(a,t)=>Xt("moof",void 0,[GF(a),...t.map(FF)]),GF=a=>yi("mfhd",0,0,[ot(a)]),a2=a=>{let t=0,i=0;const n=0,s=0,r=a.type==="delta";return i|=+r,r?t|=1:t|=2,t<<24|i<<16|n<<8|s},FF=a=>Xt("traf",void 0,[MF(a),zF(a),EF(a)]),MF=a=>{We(a.currentChunk);let t=0;t|=8,t|=16,t|=32,t|=131072;const i=a.currentChunk.samples[1]??a.currentChunk.samples[0],n={duration:i.timescaleUnitsToNextSample,size:i.size,flags:a2(i)};return yi("tfhd",0,t,[ot(a.track.id),ot(n.duration),ot(n.size),ot(n.flags)])},zF=a=>(We(a.currentChunk),yi("tfdt",1,0,[Er(Zi(a.currentChunk.startTimestamp,a.timescale))])),EF=a=>{We(a.currentChunk);const t=a.currentChunk.samples.map(f=>f.timescaleUnitsToNextSample),i=a.currentChunk.samples.map(f=>f.size),n=a.currentChunk.samples.map(a2),s=a.currentChunk.samples.map(f=>Zi(f.timestamp-f.decodeTimestamp,a.timescale)),r=new Set(t),o=new Set(i),l=new Set(n),c=new Set(s),d=l.size===2&&n[0]!==n[1],g=r.size>1,h=o.size>1,m=!d&&l.size>1,p=c.size>1||[...c].some(f=>f!==0);let u=0;return u|=1,u|=4*+d,u|=256*+g,u|=512*+h,u|=1024*+m,u|=2048*+p,yi("trun",1,u,[ot(a.currentChunk.samples.length),ot(a.currentChunk.offset-a.currentChunk.moofOffset||0),d?ot(n[0]):[],a.currentChunk.samples.map((f,_)=>[g?ot(t[_]):[],h?ot(i[_]):[],m?ot(n[_]):[],p?Hr(s[_]):[]])])},UF=a=>Xt("mfra",void 0,[...a.map(RF),BF()]),RF=a=>yi("tfra",1,0,[ot(a.track.id),ot(63),ot(a.finalizedChunks.length),a.finalizedChunks.map(i=>[Er(Zi(i.samples[0].timestamp,a.timescale)),Er(i.moofOffset),ot(i.trafIndex+1),ot(1),ot(1)])]),BF=()=>yi("mfro",0,0,[ot(0)]),PF=()=>Xt("vtte"),jF=(a,t,i,n,s)=>Xt("vttc",void 0,[s!==null?Xt("vsid",[Hr(s)]):null,i!==null?Xt("iden",[...ws.encode(i)]):null,t!==null?Xt("ctim",[...ws.encode(Wy(t))]):null,n!==null?Xt("sttg",[...ws.encode(n)]):null,Xt("payl",[...ws.encode(a)])]),NF=a=>Xt("vtta",[...ws.encode(a)]),OF=a=>{const t=[],i=a.format._options.metadataFormat??"auto",n=a.output._metadataTags;if(i==="mdir"||i==="auto"&&!a.isQuickTime){const s=DF(n);s&&t.push(s)}else if(i==="mdta"){const s=LF(n);s&&t.push(s)}else(i==="udta"||i==="auto"&&a.isQuickTime)&&IF(t,a.output._metadataTags);return t.length===0?null:Xt("udta",void 0,t)},IF=(a,t)=>{for(const{key:i,value:n}of Nm(t))switch(i){case"title":a.push(Qr("©nam",n));break;case"description":a.push(Qr("©des",n));break;case"artist":a.push(Qr("©ART",n));break;case"album":a.push(Qr("©alb",n));break;case"albumArtist":a.push(Qr("albr",n));break;case"genre":a.push(Qr("©gen",n));break;case"date":a.push(Qr("©day",n.toISOString().slice(0,10)));break;case"comment":a.push(Qr("©cmt",n));break;case"lyrics":a.push(Qr("©lyr",n));break;case"raw":break;case"discNumber":case"discsTotal":case"trackNumber":case"tracksTotal":case"beatsPerMinute":case"images":break;default:yo(i)}if(t.raw)for(const i in t.raw){const n=t.raw[i];n==null||i.length!==4||a.some(s=>s.type===i)||(typeof n=="string"?a.push(Qr(i,n)):n instanceof Uint8Array&&a.push(Xt(i,Array.from(n))))}},Qr=(a,t)=>{const i=ws.encode(t);return Xt(a,[ca(i.length),ca(r2("und")),Array.from(i)])},i2={"image/jpeg":13,"image/png":14,"image/bmp":27},n2=(a,t)=>{const i=[];for(const{key:n,value:s}of Nm(a))switch(n){case"title":i.push({key:t?"title":"©nam",value:Ur(s)});break;case"description":i.push({key:t?"description":"©des",value:Ur(s)});break;case"artist":i.push({key:t?"artist":"©ART",value:Ur(s)});break;case"album":i.push({key:t?"album":"©alb",value:Ur(s)});break;case"albumArtist":i.push({key:t?"album_artist":"aART",value:Ur(s)});break;case"comment":i.push({key:t?"comment":"©cmt",value:Ur(s)});break;case"genre":i.push({key:t?"genre":"©gen",value:Ur(s)});break;case"beatsPerMinute":t||i.push({key:"tmpo",value:Xt("data",[ot(21),ot(0),ca(s)])});break;case"lyrics":i.push({key:t?"lyrics":"©lyr",value:Ur(s)});break;case"date":i.push({key:t?"date":"©day",value:Ur(s.toISOString().slice(0,10))});break;case"images":for(const r of s)r.kind==="coverFront"&&i.push({key:"covr",value:Xt("data",[ot(i2[r.mimeType]??0),ot(0),Array.from(r.data)])});break;case"trackNumber":if(t){const r=a.tracksTotal!==void 0?`${s}/${a.tracksTotal}`:s.toString();i.push({key:"track",value:Ur(r)})}else i.push({key:"trkn",value:Xt("data",[ot(0),ot(0),ca(0),ca(s),ca(a.tracksTotal??0),ca(0)])});break;case"discNumber":t||i.push({key:"disc",value:Xt("data",[ot(0),ot(0),ca(0),ca(s),ca(a.discsTotal??0),ca(0)])});break;case"tracksTotal":case"discsTotal":break;case"raw":break;default:yo(n)}if(a.raw)for(const n in a.raw){const s=a.raw[n];s==null||!t&&n.length!==4||i.some(r=>r.key===n)||(typeof s=="string"?i.push({key:n,value:Ur(s)}):s instanceof Uint8Array?i.push({key:n,value:Xt("data",[ot(0),ot(0),Array.from(s)])}):s instanceof Jb&&i.push({key:n,value:Xt("data",[ot(i2[s.mimeType]??0),ot(0),Array.from(s.data)])}))}return i},DF=a=>{const t=n2(a,!1);return t.length===0?null:yi("meta",0,0,void 0,[o0(!1,"mdir","","appl"),Xt("ilst",void 0,t.map(i=>Xt(i.key,void 0,[i.value])))])},LF=a=>{const t=n2(a,!0);return t.length===0?null:Xt("meta",void 0,[o0(!1,"mdta",""),yi("keys",0,0,[ot(t.length)],t.map(i=>Xt("mdta",[...ws.encode(i.key)]))),Xt("ilst",void 0,t.map((i,n)=>{const s=String.fromCharCode(...ot(n+1));return Xt(s,void 0,[i.value])}))])},Ur=a=>Xt("data",[ot(1),ot(0),...ws.encode(a)]),VF=(a,t)=>{switch(a){case"avc":return t.startsWith("avc3")?"avc3":"avc1";case"hevc":return"hvc1";case"vp8":return"vp08";case"vp9":return"vp09";case"av1":return"av01";case"prores":return t}},HF={avc:lF,hevc:cF,vp8:e2,vp9:e2,av1:dF,prores:null},s2=(a,t,i)=>{switch(a){case"aac":return"mp4a";case"mp3":return"mp4a";case"opus":return"Opus";case"vorbis":return"mp4a";case"flac":return"fLaC";case"ulaw":return"ulaw";case"alaw":return"alaw";case"pcm-u8":return"raw ";case"pcm-s8":return"sowt";case"ac3":return"ac-3";case"eac3":return"ec-3";case"dts":return t}if(i)switch(a){case"pcm-s16":return"sowt";case"pcm-s16be":return"twos";case"pcm-s24":return"in24";case"pcm-s24be":return"in24";case"pcm-s32":return"in32";case"pcm-s32be":return"in32";case"pcm-f32":return"fl32";case"pcm-f32be":return"fl32";case"pcm-f64":return"fl64";case"pcm-f64be":return"fl64"}else switch(a){case"pcm-s16":return"ipcm";case"pcm-s16be":return"ipcm";case"pcm-s24":return"ipcm";case"pcm-s24be":return"ipcm";case"pcm-s32":return"ipcm";case"pcm-s32be":return"ipcm";case"pcm-f32":return"fpcm";case"pcm-f32be":return"fpcm";case"pcm-f64":return"fpcm";case"pcm-f64be":return"fpcm"}},WF=(a,t)=>{switch(a){case"aac":return c0;case"mp3":return c0;case"opus":return mF;case"vorbis":return c0;case"flac":return gF;case"ac3":return hF;case"eac3":return _F;case"dts":return vF}if(t)switch(a){case"pcm-s24":return sl;case"pcm-s24be":return sl;case"pcm-s32":return sl;case"pcm-s32be":return sl;case"pcm-f32":return sl;case"pcm-f32be":return sl;case"pcm-f64":return sl;case"pcm-f64be":return sl}else switch(a){case"pcm-s16":return Wr;case"pcm-s16be":return Wr;case"pcm-s24":return Wr;case"pcm-s24be":return Wr;case"pcm-s32":return Wr;case"pcm-s32be":return Wr;case"pcm-f32":return Wr;case"pcm-f32be":return Wr;case"pcm-f64":return Wr;case"pcm-f64be":return Wr}return null},QF={webvtt:"wvtt"},KF={webvtt:yF},r2=a=>{We(a.length===3);let t=0;for(let i=0;i<3;i++)t<<=5,t+=a.charCodeAt(i)-96;return t};class d0{constructor(t,i){if(this.finalized=!1,this.started=!1,this.pos=0,this.trackedWrites=null,this.trackedStart=-1,this.trackedEnd=-1,t._writerAcquired)throw new Error("Can't have multiple Writers for the same Target.");this.target=t,t._setMonotonicity(i),t._writerAcquired=!0}start(){We(!this.started),this.target._start(),this.started=!0}write(t){We(this.started&&!this.finalized),this.maybeTrackWrites(t),this.target._write(t,this.pos),this.pos+=t.byteLength}seek(t){this.pos=t}getPos(){return this.pos}async flush(){return We(this.started&&!this.finalized),this.target._flush()}async finalize(){We(this.started&&!this.finalized),await this.target._finalize(),this.finalized=!0}maybeTrackWrites(t){if(!this.trackedWrites)return;let i=this.getPos();if(if0)throw new Error(`ArrayBuffer exceeded maximum size of ${f0} bytes. Please consider using another target.`);if(this._supportsResize)this._buffer.resize(i);else{const n=new ArrayBuffer(i),s=new Uint8Array(n);s.set(this._bytes,0),this._buffer=n,this._bytes=s}}}_start(){}_write(t,i){this._ensureSize(i+t.byteLength),this._bytes.set(t,i),this._maxPos=Math.max(this._maxPos,i+t.byteLength),this._dispatchWrite(i,i+t.byteLength)}async _flush(){}async _finalize(){this.buffer=this._buffer.slice(0,this._maxPos),this._options.onFinalize&&await this._options.onFinalize(this.buffer),this._emit("finalized")}async _close(){}_getSlice(t,i){return this._bytes.slice(t,i)}}class YF extends ko{constructor(t,i){super(),this._baseTarget=t,this._offset=i}_start(){}_write(t,i){this._baseTarget._write(t,this._offset+i),this._dispatchWrite(i,i+t.byteLength)}_flush(){return this._baseTarget._flush()}async _finalize(){this._emit("finalized")}async _close(){}_setMonotonicity(t){super._setMonotonicity(t),this._baseTarget._setMonotonicity(t)}}class p0{constructor(t,i){if(this.rootPath=t,this.getTarget=i,typeof t!="string")throw new TypeError("rootPath must be a string.");if(typeof i!="function")throw new TypeError("getTarget must be a function.")}}const Is=57600,JF=2082844800,XF=a=>{const t={},i=a.track;return i.metadata.name!==void 0&&(t.name=i.metadata.name),t},Zi=(a,t,i=!0)=>{const n=a*t;return i?Math.round(n):n},Pc=a=>{if(a.samples.length===0)return 0;let t=1/0,i=-1/0;for(let n=0;ni&&(i=s.timestamp+s.duration)}return t===1/0?0:i-t};class ZF extends Hy{constructor(t,i){super(t),this.writer=null,this.boxWriter=null,this.initWriter=null,this.initBoxWriter=null,this.auxTarget=new Yd,this.auxWriter=new d0(this.auxTarget,!1),this.auxBoxWriter=new zf(this.auxWriter),this.mdat=null,this.ftypSize=null,this.trackDatas=[],this.allTracksKnown=Em(),this.creationTime=Math.floor(Date.now()/1e3)+JF,this.finalizedChunks=[],this.wroteFragmentedHeader=!1,this.nextFragmentNumber=1,this.maxWrittenTimestamp=-1/0,this.minWrittenTimestamp=1/0,this.maxWrittenEndTimestamp=-1/0,this.segmentHeaderSize=null,this.format=i,this.formatOptions={...i._options},this.isQuickTime=i instanceof h2,this.isCmaf=i instanceof g2,this.minimumFragmentDuration=this.formatOptions.minimumFragmentDuration??(i instanceof g2?1/0:1),this.auxWriter.start()}async start(){const t=await this.mutex.acquire();if(this.isCmaf?(this.fastStart="fragmented",this.isFragmented=!0):(this.writer=await this.output._getRootWriter(n=>this.formatOptions.fastStart!==void 0?this.formatOptions.fastStart==="fragmented":n instanceof Yd),this.boxWriter=new zf(this.writer),this.fastStart=this.formatOptions.fastStart??(this.writer.target instanceof Yd?"in-memory":!1),this.isFragmented=this.fastStart==="fragmented"),this.isCmaf){if(!this.output._hasInitTarget())throw new Error("CMAF outputs require the initTarget field in OutputOptions to be set; the init segment will be written to it.");const n=await this.output._getInitTarget(),s=new d0(n,!0);s.start(),this.initWriter=s,this.initBoxWriter=new zf(s)}const i=this.output.tracks.some(n=>n.isVideoTrack()&&n.source._codec==="avc");{const n=this.initBoxWriter??this.boxWriter;if(We(n),this.formatOptions.onFtyp&&n.writer.startTrackingWrites(),n.writeBox(IG({isQuickTime:this.isQuickTime,holdsAvc:i,fragmented:this.isFragmented,cmaf:this.isCmaf})),this.formatOptions.onFtyp){const{data:s,start:r}=n.writer.stopTrackingWrites();this.formatOptions.onFtyp(s,r)}this.ftypSize=n.writer.getPos(),this.isCmaf&&await this.initWriter.flush()}if(this.fastStart!=="in-memory")if(this.fastStart==="reserve"){for(const n of this.output.tracks)if(n.metadata.maximumPacketCount===void 0)throw new Error("All tracks must specify maximumPacketCount in their metadata when using fastStart: 'reserve'.")}else this.isFragmented||(We(this.writer),We(this.boxWriter),this.formatOptions.onMdat&&this.writer.startTrackingWrites(),this.mdat=Ef(!0),this.boxWriter.writeBox(this.mdat));await this.writer?.flush();for(const n of this.output.tracks)n.isVideoTrack()&&n.metadata.decoderConfig?this.getVideoTrackData(n,n.metadata.primingPacket??null,{decoderConfig:n.metadata.decoderConfig}):n.isAudioTrack()&&n.metadata.decoderConfig&&this.getAudioTrackData(n,n.metadata.primingPacket??null,{decoderConfig:n.metadata.decoderConfig});t()}allTracksAreKnown(){for(const t of this.output.tracks)if(!t.source._closed&&!this.trackDatas.some(i=>i.track===t))return!1;return!0}async getMimeType(){await this.allTracksKnown.promise;const t=this.trackDatas.map(i=>i.type==="video"||i.type==="audio"?i.info.decoderConfig.codec:{webvtt:"wvtt"}[i.track.source._codec]);return gG({isQuickTime:this.isQuickTime,hasVideo:this.trackDatas.some(i=>i.type==="video"),hasAudio:this.trackDatas.some(i=>i.type==="audio"),codecStrings:t})}getVideoTrackData(t,i,n){const s=this.trackDatas.find(p=>p.track===t);if(s)return s;Ym(n,t.source._codec),We(n),We(n.decoderConfig);const r={...n.decoderConfig};We(r.codedWidth!==void 0),We(r.codedHeight!==void 0);let o=!1;if(t.source._codec==="avc"&&!r.description){if(!i)throw new Error("No AVC description provided; you must therefore provide a priming packet.");const p=wA(i.data);if(!p)throw new Error("Couldn't extract an AVCDecoderConfigurationRecord from the AVC packet. Make sure the packets are in Annex B format (as specified in ITU-T-REC-H.264) when not providing a description, or provide a description (must be an AVCDecoderConfigurationRecord as specified in ISO 14496-15) and ensure the packets are in AVCC format.");r.description=kA(p),o=!0}else if(t.source._codec==="hevc"&&!r.description){if(!i)throw new Error("No HEVC description provided; you must therefore provide a priming packet.");const p=$A(i.data);if(!p)throw new Error("Couldn't extract an HEVCDecoderConfigurationRecord from the HEVC packet. Make sure the packets are in Annex B format (as specified in ITU-T-REC-H.265) when not providing a description, or provide a description (must be an HEVCDecoderConfigurationRecord as specified in ISO 14496-15) and ensure the packets are in HEVC format.");r.description=zA(p),o=!0}const l=nA(1/(t.metadata.frameRate??Is),1e6).den,c=r.displayAspectWidth,d=r.displayAspectHeight,g=c===void 0||d===void 0?{num:1,den:1}:Om({num:c*r.codedHeight,den:d*r.codedWidth}),h=r.codec==="ap4h"||r.codec==="ap4x",m={muxer:this,track:t,type:"video",info:{width:r.codedWidth,height:r.codedHeight,pixelAspectRatio:g,decoderConfig:r,requiresAnnexBTransformation:o,hasAlphaChannel:h},timescale:l,samples:[],sampleQueue:[],timestampProcessingQueue:[],timeToSampleTable:[],compositionTimeOffsetTable:[],lastTimescaleUnits:null,lastSample:null,startTimestampOffset:null,finalizedChunks:[],currentChunk:null,compactlyCodedChunkTable:[],closed:!1,avgBitrate:t.source._nominalBitrate??t.metadata.averageBitrate??0,maxBitrate:t.source._nominalBitrate??t.metadata.bitrate??0};return this.trackDatas.push(m),this.trackDatas.sort((p,u)=>p.track.id-u.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),m}getAudioTrackData(t,i,n){const s=this.trackDatas.find(c=>c.track===t);if(s)return s;Jm(n,t.source._codec),We(n),We(n.decoderConfig);const r={...n.decoderConfig};let o=!1;if(t.source._codec==="aac"&&!r.description){if(!i)throw new Error("No AAC description provided; you must therefore provide a priming packet.");const c=Cf(Vl.tempFromBytes(i.data));if(!c)throw new Error("Couldn't parse ADTS header from the AAC packet. Make sure the packets are in ADTS format (as specified in ISO 13818-7) when not providing a description, or provide a description (must be an AudioSpecificConfig as specified in ISO 14496-3) and ensure the packets are raw AAC data.");const d=Nd[c.samplingFrequencyIndex],g=xf[c.channelConfiguration];if(d===void 0||g===void 0)throw new Error("Invalid ADTS frame header.");r.description=Hm({objectType:c.objectType,outputSampleRate:d,outputNumberOfChannels:g}),o=!0}if(!i){if(t.source._codec==="ac3"||t.source._codec==="eac3")throw new Error("AC-3/E-AC-3 require a priming packet.");if(t.source._codec==="dts")throw new Error("DTS requires a priming packet.")}const l={muxer:this,track:t,type:"audio",info:{numberOfChannels:n.decoderConfig.numberOfChannels,sampleRate:n.decoderConfig.sampleRate,decoderConfig:r,requiresPcmTransformation:!this.isFragmented&&js.includes(t.source._codec),expectedNextPcmPacketTimestamp:null,requiresAdtsStripping:o,primingPacket:i},timescale:r.sampleRate,samples:[],sampleQueue:[],timestampProcessingQueue:[],timeToSampleTable:[],compositionTimeOffsetTable:[],lastTimescaleUnits:null,lastSample:null,startTimestampOffset:null,finalizedChunks:[],currentChunk:null,compactlyCodedChunkTable:[],closed:!1,avgBitrate:t.source._nominalBitrate??t.metadata.averageBitrate??0,maxBitrate:t.source._nominalBitrate??t.metadata.bitrate??0};return this.trackDatas.push(l),this.trackDatas.sort((c,d)=>c.track.id-d.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),l}getSubtitleTrackData(t,i){const n=this.trackDatas.find(r=>r.track===t);if(n)return n;hy(i),We(i),We(i.config);const s={muxer:this,track:t,type:"subtitle",info:{config:i.config},timescale:1e3,samples:[],sampleQueue:[],timestampProcessingQueue:[],timeToSampleTable:[],compositionTimeOffsetTable:[],lastTimescaleUnits:null,lastSample:null,startTimestampOffset:null,finalizedChunks:[],currentChunk:null,compactlyCodedChunkTable:[],closed:!1,avgBitrate:t.source._nominalBitrate??t.metadata.averageBitrate??0,maxBitrate:t.source._nominalBitrate??t.metadata.bitrate??0,lastCueEndTimestamp:null,cueQueue:[],nextSourceId:0,cueToSourceId:new WeakMap};return this.trackDatas.push(s),this.trackDatas.sort((r,o)=>r.track.id-o.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),s}async addEncodedVideoPacket(t,i,n){const s=await this.mutex.acquire();try{const r=this.getVideoTrackData(t,i,n);let o=i.data;if(r.info.requiresAnnexBTransformation){const c=[...Od(o)].map(d=>o.subarray(d.offset,d.offset+d.length));if(c.length===0)throw new Error("Failed to transform packet data. Make sure all packets are provided in Annex B format, as specified in ITU-T-REC-H.264 and ITU-T-REC-H.265.");o=yA(c,4)}this.validateTimestamp(r.track,i.timestamp,i.type==="key");const l=this.createSampleForTrack(r,o,i.timestamp,i.duration,i.type);await this.registerSample(r,l)}finally{s()}}async addEncodedAudioPacket(t,i,n){const s=await this.mutex.acquire();try{const r=this.getAudioTrackData(t,i,n);let o=i.data;if(r.info.requiresAdtsStripping){const g=Cf(Vl.tempFromBytes(o));if(!g)throw new Error("Expected ADTS frame, didn't get one.");const h=g.crcCheck===null?xy:Sy;o=o.subarray(h)}this.validateTimestamp(r.track,i.timestamp,i.type==="key");let l=i.timestamp,c=i.duration;if(r.info.requiresPcmTransformation){const h=al(r.info.decoderConfig.codec).sampleSize*r.info.numberOfChannels;if(c=o.byteLength/h/r.info.sampleRate,r.info.expectedNextPcmPacketTimestamp!==null){const m=l-r.info.expectedNextPcmPacketTimestamp;if(m<.01)l=r.info.expectedNextPcmPacketTimestamp;else{const p=await this.padWithSilence(r,r.info.expectedNextPcmPacketTimestamp,m);l=r.info.expectedNextPcmPacketTimestamp+p}}r.info.expectedNextPcmPacketTimestamp=l+c}const d=this.createSampleForTrack(r,o,l,c,i.type);await this.registerSample(r,d)}finally{s()}}async padWithSilence(t,i,n){const s=Zi(n,t.timescale);if(n=s/t.timescale,s>0){const{sampleSize:r,silentValue:o}=al(t.info.decoderConfig.codec),l=s*t.info.numberOfChannels,c=new Uint8Array(r*l).fill(o),d=this.createSampleForTrack(t,new Uint8Array(c.buffer),i,n,"key");await this.registerSample(t,d)}return n}async addSubtitleCue(t,i,n){const s=await this.mutex.acquire();try{const r=this.getSubtitleTrackData(t,n);this.validateTimestamp(r.track,i.timestamp,!0),t.source._codec==="webvtt"&&(r.cueQueue.push(i),await this.processWebVTTCues(r,i.timestamp))}finally{s()}}async processWebVTTCues(t,i){for(;t.cueQueue.length>0;){t.lastCueEndTimestamp??=Math.min(0,t.cueQueue[0].timestamp);const n=new Set([]);for(const d of t.cueQueue)We(d.timestamp<=i),We(t.lastCueEndTimestamp<=d.timestamp+d.duration),n.add(Math.max(d.timestamp,t.lastCueEndTimestamp)),n.add(d.timestamp+d.duration);const s=[...n].sort((d,g)=>d-g),r=s[0],o=s[1]??r;if(i=o)break;Mf.lastIndex=0;const h=Mf.test(g.text),m=g.timestamp+g.duration;let p=t.cueToSourceId.get(g);if(p===void 0&&os.timestamp).sort((s,r)=>s-r);this.isFragmented?t.startTimestampOffset??=Math.min(n[0],0):t.startTimestampOffset??=n[0];for(let s=0;s=0),t.lastTimescaleUnits+=d,t.lastSample.timescaleUnitsToNextSample=d,!this.isFragmented){let g=Mr(t.timeToSampleTable);if(We(g),g.sampleCount===1){g.sampleDelta=d;const m=t.timeToSampleTable[t.timeToSampleTable.length-2];m&&m.sampleDelta===d&&(m.sampleCount++,t.timeToSampleTable.pop(),g=m)}else g.sampleDelta!==d&&(g.sampleCount--,t.timeToSampleTable.push(g={sampleCount:1,sampleDelta:d}));g.sampleDelta===l?g.sampleCount++:t.timeToSampleTable.push({sampleCount:1,sampleDelta:l});const h=Mr(t.compositionTimeOffsetTable);We(h),h.sampleCompositionTimeOffset===o?h.sampleCount++:t.compositionTimeOffsetTable.push({sampleCount:1,sampleCompositionTimeOffset:o})}}else t.lastTimescaleUnits=Zi(r.decodeTimestamp,t.timescale,!1),this.isFragmented||(t.timeToSampleTable.push({sampleCount:1,sampleDelta:l}),t.compositionTimeOffsetTable.push({sampleCount:1,sampleCompositionTimeOffset:o}));t.lastSample=r}if(t.timestampProcessingQueue.length=0,We(t.lastSample),We(t.lastTimescaleUnits!==null),i!==void 0&&t.lastSample.timescaleUnitsToNextSample===0){We(i.type==="key");const s=Zi(i.timestamp,t.timescale,!1),r=Math.round(s-t.lastTimescaleUnits);t.lastSample.timescaleUnitsToNextSample=r}}async registerSample(t,i){i.type==="key"&&this.processTimestamps(t,i),t.timestampProcessingQueue.push(i),this.isFragmented?(t.sampleQueue.push(i),await this.interleaveSamples()):this.fastStart==="reserve"?await this.registerSampleFastStartReserve(t,i):await this.addSampleToTrack(t,i)}async addSampleToTrack(t,i){if(!this.isFragmented&&(t.samples.push(i),this.fastStart==="reserve")){const s=t.track.metadata.maximumPacketCount;if(We(s!==void 0),t.samples.length>s)throw new Error(`Track #${t.track.id} has already reached the maximum packet count (${s}). Either add less packets or increase the maximum packet count.`)}let n=!1;if(!t.currentChunk)n=!0;else{t.currentChunk.startTimestamp=Math.min(t.currentChunk.startTimestamp,i.timestamp);const s=i.timestamp-t.currentChunk.startTimestamp;if(this.isFragmented){const r=this.trackDatas.every(o=>{if(t===o)return i.type==="key";const l=o.sampleQueue[0];return l?l.type==="key":o.closed});s>=this.minimumFragmentDuration&&r&&i.timestamp>this.maxWrittenTimestamp&&(n=!0,await this.finalizeFragment())}else n=s>=.5}n&&(t.currentChunk&&await this.finalizeCurrentChunk(t),t.currentChunk={startTimestamp:i.timestamp,samples:[],offset:null,moofOffset:null,trafIndex:null}),We(t.currentChunk),t.currentChunk.samples.push(i),this.isFragmented&&(this.maxWrittenTimestamp=Math.max(this.maxWrittenTimestamp,i.timestamp),this.maxWrittenEndTimestamp=Math.max(this.maxWrittenEndTimestamp,i.timestamp+i.duration),this.minWrittenTimestamp=Math.min(this.minWrittenTimestamp,i.timestamp))}async finalizeCurrentChunk(t){if(We(!this.isFragmented),We(this.writer),!t.currentChunk)return;t.finalizedChunks.push(t.currentChunk),this.finalizedChunks.push(t.currentChunk);let i=t.currentChunk.samples.length;if(t.type==="audio"&&t.info.requiresPcmTransformation&&(i=t.currentChunk.samples.reduce((n,s)=>n+Zi(s.duration,t.timescale),0)),(t.compactlyCodedChunkTable.length===0||Mr(t.compactlyCodedChunkTable).samplesPerChunk!==i)&&t.compactlyCodedChunkTable.push({firstChunk:t.finalizedChunks.length,samplesPerChunk:i}),this.fastStart==="in-memory"){t.currentChunk.offset=0;return}t.currentChunk.offset=this.writer.getPos();for(const n of t.currentChunk.samples)We(n.data),this.writer.write(n.data),n.data=null;await this.writer.flush()}async interleaveSamples(t=!1){if(We(this.isFragmented),!(!t&&!this.allTracksAreKnown()))e:for(;;){let i=null,n=1/0;for(const r of this.trackDatas){if(!t&&r.sampleQueue.length===0&&!r.closed)break e;r.sampleQueue.length>0&&r.sampleQueue[0].timestampp.currentChunk);if(i.length===0){t&&await this.writer.flush();return}const n=this.nextFragmentNumber++,s=t2(n,i),r=this.writer.getPos(),o=r+this.boxWriter.measureBox(s);let l=o+Xm,c=1/0;for(let p=0;p=2**32;if(g)for(const p of i)p.currentChunk.offset+=vy-Xm;this.formatOptions.onMoof&&this.writer.startTrackingWrites();const h=t2(n,i);if(this.boxWriter.writeBox(h),this.formatOptions.onMoof){const{data:p,start:u}=this.writer.stopTrackingWrites();this.formatOptions.onMoof(p,u,c)}We(this.writer.getPos()===o),this.formatOptions.onMdat&&this.writer.startTrackingWrites();const m=Ef(g);m.size=d,this.boxWriter.writeBox(m),this.writer.seek(o+(g?vy:Xm));for(const p of i)for(const u of p.currentChunk.samples)this.writer.write(u.data),u.data=null;if(this.formatOptions.onMdat){const{data:p,start:u}=this.writer.stopTrackingWrites();this.formatOptions.onMdat(p,u)}for(const p of i)p.finalizedChunks.push(p.currentChunk),this.finalizedChunks.push(p.currentChunk),p.currentChunk=null;t&&await this.writer.flush()}async registerSampleFastStartReserve(t,i){this.allTracksAreKnown()?(this.mdat||await this.createFastStartReserveMdat(),await this.addSampleToTrack(t,i)):t.sampleQueue.push(i)}async createFastStartReserveMdat(){We(this.writer),We(this.boxWriter),this.ensureOneEnabledTrack();const t=Kd(this),n=this.boxWriter.measureBox(t)+this.computeSampleTableSizeUpperBound()+4096;We(this.ftypSize!==null),this.writer.seek(this.ftypSize+n),this.formatOptions.onMdat&&this.writer.startTrackingWrites(),this.mdat=Ef(!0),this.boxWriter.writeBox(this.mdat);for(const s of this.trackDatas){for(const r of s.sampleQueue)await this.addSampleToTrack(s,r);s.sampleQueue.length=0}}computeSampleTableSizeUpperBound(){We(this.fastStart==="reserve");let t=0;for(const i of this.trackDatas){const n=i.track.metadata.maximumPacketCount;We(n!==void 0),t+=8*Math.ceil(2/3*n),t+=4*n,t+=8*Math.ceil(2/3*n),t+=12*Math.ceil(2/3*n),t+=4*n,t+=8*n}return t}async onTrackClose(t){const i=await this.mutex.acquire(),n=this.trackDatas.find(s=>s.track===t);n&&(n.closed=!0,n.type==="subtitle"&&t.source._codec==="webvtt"&&await this.processWebVTTCues(n,1/0),this.processTimestamps(n)),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),this.isFragmented&&await this.interleaveSamples(),i()}ensureOneEnabledTrack(){for(const t of["video","audio","subtitle"]){const i=this.trackDatas.filter(s=>s.type===t);if(i.length===0)continue;if(!i.some(s=>s.track.metadata.disposition?.default!==!1)){const s=i[0];s.track.metadata.disposition={...s.track.metadata.disposition,default:!0}}}}async forceFragmentFinalization(){We(this.isFragmented);const t=await this.mutex.acquire();try{for(const i of this.trackDatas)i.type==="subtitle"&&i.track.source._codec==="webvtt"&&await this.processWebVTTCues(i,1/0),this.processTimestamps(i);await this.interleaveSamples(!0),await this.finalizeFragment()}finally{t()}}async finalize(){const t=await this.mutex.acquire();this.allTracksKnown.resolve(),this.ensureOneEnabledTrack(),!this.mdat&&this.fastStart==="reserve"&&await this.createFastStartReserveMdat();for(const i of this.trackDatas)i.closed=!0,i.type==="subtitle"&&i.track.source._codec==="webvtt"&&await this.processWebVTTCues(i,1/0),this.processTimestamps(i);if(this.isFragmented)await this.interleaveSamples(!0),await this.finalizeFragment(!1);else for(const i of this.trackDatas){await this.finalizeCurrentChunk(i);const n=Pc(i);if(n>0){let l=0;for(const c of i.samples)l+=c.size;i.avgBitrate=Math.round(8*l/n)}else i.avgBitrate=0;let s=0,r=0,o=0;for(let l=0;l=1;)r-=i.samples[s].size,s++;o=Math.max(o,r)}if(i.maxBitrate=8*o,i.startTimestampOffset!==null)for(let l=0;l=2**32&&(this.mdat.largeSize=!0)}this.formatOptions.onMoov&&this.writer.startTrackingWrites();const n=Kd(this);if(this.boxWriter.writeBox(n),this.formatOptions.onMoov){const{data:s,start:r}=this.writer.stopTrackingWrites();this.formatOptions.onMoov(s,r)}this.formatOptions.onMdat&&this.writer.startTrackingWrites(),this.mdat.size=i,this.boxWriter.writeBox(this.mdat);for(const s of this.finalizedChunks)for(const r of s.samples)We(r.data),this.writer.write(r.data),r.data=null;if(this.formatOptions.onMdat){const{data:s,start:r}=this.writer.stopTrackingWrites();this.formatOptions.onMdat(s,r)}}else if(this.isFragmented)if(this.isCmaf){const i=this.segmentHeaderSize!==null?this.writer.getPos()-this.segmentHeaderSize:0;this.writer.seek(0),this.boxWriter.writeBox(Xy()),this.boxWriter.writeBox(Zy(this,i))}else{const i=this.writer.getPos(),n=UF(this.trackDatas);this.boxWriter.writeBox(n);const s=this.writer.getPos()-i;this.writer.seek(this.writer.getPos()-4),this.boxWriter.writeU32(s)}else{We(this.mdat);const i=this.boxWriter.offsets.get(this.mdat);We(i!==void 0);const n=this.writer.getPos()-i;if(this.mdat.size=n,this.mdat.largeSize=n>=2**32,this.boxWriter.patchBox(this.mdat),this.formatOptions.onMdat){const{data:r,start:o}=this.writer.stopTrackingWrites();this.formatOptions.onMdat(r,o)}const s=Kd(this);if(this.fastStart==="reserve"){We(this.ftypSize!==null),this.writer.seek(this.ftypSize),this.formatOptions.onMoov&&this.writer.startTrackingWrites(),this.boxWriter.writeBox(s);const r=this.boxWriter.offsets.get(this.mdat)-this.writer.getPos();this.boxWriter.writeBox(DG(r))}else this.formatOptions.onMoov&&this.writer.startTrackingWrites(),this.boxWriter.writeBox(s);if(this.formatOptions.onMoov){const{data:r,start:o}=this.writer.stopTrackingWrites();this.formatOptions.onMoov(r,o)}}t()}}const e7=-32768,t7=2**15-1,o2="Mediabunny",l2=6,c2=5,a7={video:1,audio:2,subtitle:17};class i7 extends Hy{constructor(t,i){super(t),this.trackDatas=[],this.allTracksKnown=Em(),this.segment=null,this.segmentInfo=null,this.seekHead=null,this.tracksElement=null,this.tagsElement=null,this.attachmentsElement=null,this.segmentDuration=null,this.cues=null,this.currentCluster=null,this.currentClusterStartMsTimestamp=null,this.currentClusterMaxMsTimestamp=null,this.trackDatasInCurrentCluster=new Map,this.startTimestamp=1/0,this.endTimestamp=-1/0,this.warnedAboutTooNegativeTimestamp=!1,this.format=i}async start(){const t=await this.mutex.acquire();this.writer=await this.output._getRootWriter(!!this.format._options.appendOnly),this.ebmlWriter=new _G(this.writer),this.writeEBMLHeader(),this.createSegmentInfo(),this.createCues(),await this.writer.flush();for(const i of this.output.tracks)i.isVideoTrack()&&i.metadata.decoderConfig?this.getVideoTrackData(i,i.metadata.primingPacket??null,{decoderConfig:i.metadata.decoderConfig}):i.isAudioTrack()&&i.metadata.decoderConfig&&this.getAudioTrackData(i,i.metadata.primingPacket??null,{decoderConfig:i.metadata.decoderConfig});t()}writeEBMLHeader(){this.format._options.onEbmlHeader&&this.writer.startTrackingWrites();const t={id:Ze.EBML,data:[{id:Ze.EBMLVersion,data:1},{id:Ze.EBMLReadVersion,data:1},{id:Ze.EBMLMaxIDLength,data:4},{id:Ze.EBMLMaxSizeLength,data:8},{id:Ze.DocType,data:this.format instanceof Uf?"webm":"matroska"},{id:Ze.DocTypeVersion,data:2},{id:Ze.DocTypeReadVersion,data:2}]};if(this.ebmlWriter.writeEBML(t),this.format._options.onEbmlHeader){const{data:i,start:n}=this.writer.stopTrackingWrites();this.format._options.onEbmlHeader(i,n)}}maybeCreateSeekHead(t){if(this.format._options.appendOnly)return;const i=new Uint8Array([28,83,187,107]),n=new Uint8Array([21,73,169,102]),s=new Uint8Array([22,84,174,107]),r=new Uint8Array([25,65,164,105]),o=new Uint8Array([18,84,195,103]),l={id:Ze.SeekHead,data:[{id:Ze.Seek,data:[{id:Ze.SeekID,data:i},{id:Ze.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.cues)-this.segmentDataOffset:0}]},{id:Ze.Seek,data:[{id:Ze.SeekID,data:n},{id:Ze.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.segmentInfo)-this.segmentDataOffset:0}]},{id:Ze.Seek,data:[{id:Ze.SeekID,data:s},{id:Ze.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.tracksElement)-this.segmentDataOffset:0}]},this.attachmentsElement?{id:Ze.Seek,data:[{id:Ze.SeekID,data:r},{id:Ze.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.attachmentsElement)-this.segmentDataOffset:0}]}:null,this.tagsElement?{id:Ze.Seek,data:[{id:Ze.SeekID,data:o},{id:Ze.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.tagsElement)-this.segmentDataOffset:0}]}:null]};this.seekHead=l}createSegmentInfo(){const t={id:Ze.Duration,data:new Zm(0)};this.segmentDuration=t;const i={id:Ze.Info,data:[{id:Ze.TimestampScale,data:1e6},{id:Ze.MuxingApp,data:o2},{id:Ze.WritingApp,data:o2},this.format._options.appendOnly?null:t]};this.segmentInfo=i}createTracks(){const t={id:Ze.Tracks,data:[]};this.tracksElement=t;for(const i of this.trackDatas){let n=vG[i.track.source._codec];We(n),i.type==="audio"&&i.track.source._codec==="dts"&&(i.info.decoderConfig.codec==="dtse"?n="A_DTS/EXPRESS":i.info.decoderConfig.codec==="dtsl"&&(n="A_DTS/LOSSLESS"));let s=0;if(i.type==="audio"&&i.track.source._codec==="opus"){s=1e6*80;const r=i.info.decoderConfig.description;if(r){const o=Ms(r),l=oy(o);s=Math.round(1e9*(l.preSkip/rG))}}t.data.push({id:Ze.TrackEntry,data:[{id:Ze.TrackNumber,data:i.track.id},{id:Ze.TrackUID,data:i.track.id},{id:Ze.TrackType,data:a7[i.type]},i.track.metadata.disposition?.default===!1?{id:Ze.FlagDefault,data:0}:null,i.track.metadata.disposition?.forced?{id:Ze.FlagForced,data:1}:null,i.track.metadata.disposition?.hearingImpaired?{id:Ze.FlagHearingImpaired,data:1}:null,i.track.metadata.disposition?.visuallyImpaired?{id:Ze.FlagVisualImpaired,data:1}:null,i.track.metadata.disposition?.original?{id:Ze.FlagOriginal,data:1}:null,i.track.metadata.disposition?.commentary?{id:Ze.FlagCommentary,data:1}:null,{id:Ze.FlagLacing,data:0},{id:Ze.Language,data:i.track.metadata.languageCode??Lb},{id:Ze.CodecID,data:n},i.codecPrivate?{id:Ze.CodecPrivate,data:Ms(i.codecPrivate)}:null,{id:Ze.CodecDelay,data:0},{id:Ze.SeekPreRoll,data:s},i.track.metadata.name!==void 0?{id:Ze.Name,data:new il(i.track.metadata.name)}:null,i.type==="video"?this.videoSpecificTrackInfo(i):null,i.type==="audio"?this.audioSpecificTrackInfo(i):null,i.type==="subtitle"?this.subtitleSpecificTrackInfo(i):null]})}}videoSpecificTrackInfo(t){const{frameRate:i,transformationMatrix:n}=t.track.metadata,s=[i?{id:Ze.DefaultDuration,data:1e9/i}:null];let r,o,l;if(n){r=VC(n);const u=yf(jb(-r),n);o=Math.sign(u[0]),l=Math.sign(u[4]),l===-1&&(l=1,o=-o,r=bf(r+180))}else r=t.track.metadata.rotation??0,o=t.track.metadata.flip?-1:1,l=1;const c=r?bf(o===-1?r:-r):0,d=Math.round(Math.acos(o)*zm),g=Math.round(Math.acos(l)*zm),h=!!t.info.aspectRatio&&t.info.aspectRatio.num*t.info.height!==t.info.aspectRatio.den*t.info.width,m=t.info.decoderConfig.colorSpace,p={id:Ze.Video,data:[{id:Ze.PixelWidth,data:t.info.width},{id:Ze.PixelHeight,data:t.info.height},h?{id:Ze.DisplayWidth,data:t.info.aspectRatio.num}:null,h?{id:Ze.DisplayHeight,data:t.info.aspectRatio.den}:null,h?{id:Ze.DisplayUnit,data:3}:null,t.info.alphaMode?{id:Ze.AlphaMode,data:1}:null,Ob(m)?null:{id:Ze.Colour,data:[{id:Ze.MatrixCoefficients,data:m?.matrix!=null?jd[m.matrix]:2},{id:Ze.TransferCharacteristics,data:m?.transfer!=null?Pd[m.transfer]:2},{id:Ze.Primaries,data:m?.primaries!=null?Bd[m.primaries]:2},{id:Ze.Range,data:m?.fullRange!=null?m.fullRange?2:1:0}]},c||d||g?{id:Ze.Projection,data:[{id:Ze.ProjectionType,data:0},d?{id:Ze.ProjectionPoseYaw,data:new Dd(d)}:null,g?{id:Ze.ProjectionPosePitch,data:new Dd(g)}:null,c?{id:Ze.ProjectionPoseRoll,data:new Dd((c+180)%360-180)}:null]}:null]};return s.push(p),s}audioSpecificTrackInfo(t){const i=js.includes(t.track.source._codec)?al(t.track.source._codec):null;return[{id:Ze.Audio,data:[{id:Ze.SamplingFrequency,data:new Dd(t.info.sampleRate)},{id:Ze.Channels,data:t.info.numberOfChannels},i?{id:Ze.BitDepth,data:8*i.sampleSize}:null]}]}subtitleSpecificTrackInfo(t){return[]}maybeCreateTags(){const t=[],i=(r,o)=>{t.push({id:Ze.SimpleTag,data:[{id:Ze.TagName,data:new il(r)},typeof o=="string"?{id:Ze.TagString,data:new il(o)}:{id:Ze.TagBinary,data:o}]})},n=this.output._metadataTags,s=new Set;for(const{key:r,value:o}of Nm(n))switch(r){case"title":i("TITLE",o),s.add("TITLE");break;case"description":i("DESCRIPTION",o),s.add("DESCRIPTION");break;case"artist":i("ARTIST",o),s.add("ARTIST");break;case"album":i("ALBUM",o),s.add("ALBUM");break;case"albumArtist":i("ALBUM_ARTIST",o),s.add("ALBUM_ARTIST");break;case"genre":i("GENRE",o),s.add("GENRE");break;case"beatsPerMinute":i("BPM",o.toString()),s.add("BPM");break;case"comment":i("COMMENT",o),s.add("COMMENT");break;case"lyrics":i("LYRICS",o),s.add("LYRICS");break;case"date":i("DATE",o.toISOString().slice(0,10)),s.add("DATE");break;case"trackNumber":{const l=n.tracksTotal!==void 0?`${o}/${n.tracksTotal}`:o.toString();i("PART_NUMBER",l),s.add("PART_NUMBER")}break;case"discNumber":{const l=n.discsTotal!==void 0?`${o}/${n.discsTotal}`:o.toString();i("DISC",l),s.add("DISC")}break;case"tracksTotal":case"discsTotal":break;case"images":case"raw":break;default:yo(r)}if(n.raw)for(const r in n.raw){const o=n.raw[r];o==null||s.has(r)||(typeof o=="string"||o instanceof Uint8Array)&&i(r,o)}t.length!==0&&(this.tagsElement={id:Ze.Tags,data:[{id:Ze.Tag,data:[{id:Ze.Targets,data:[{id:Ze.TargetTypeValue,data:50},{id:Ze.TargetType,data:"MOVIE"}]},...t]}]})}maybeCreateAttachments(){const t=this.output._metadataTags,i=[],n=new Set,s=t.images??[];for(const r of s){let o=r.name;o===void 0&&(o=(r.kind==="coverFront"?"cover":r.kind==="coverBack"?"back":"image")+(lA(r.mimeType)??""));let l;for(;;){l=0n;for(let c=0;c<8;c++)l<<=8n,l|=BigInt(Math.floor(Math.random()*256));if(l!==0n&&!n.has(l))break}n.add(l),i.push({id:Ze.AttachedFile,data:[r.description!==void 0?{id:Ze.FileDescription,data:new il(r.description)}:null,{id:Ze.FileName,data:new il(o)},{id:Ze.FileMediaType,data:r.mimeType},{id:Ze.FileData,data:r.data},{id:Ze.FileUID,data:l}]})}for(const[r,o]of Object.entries(t.raw??{}))!(o instanceof Xb)||!/^\d+$/.test(r)||s.find(c=>c.mimeType===o.mimeType&&cA(c.data,o.data))||i.push({id:Ze.AttachedFile,data:[o.description!==void 0?{id:Ze.FileDescription,data:new il(o.description)}:null,{id:Ze.FileName,data:new il(o.name??"")},{id:Ze.FileMediaType,data:o.mimeType??""},{id:Ze.FileData,data:o.data},{id:Ze.FileUID,data:BigInt(r)}]});i.length!==0&&(this.attachmentsElement={id:Ze.Attachments,data:i})}createSegment(){this.createTracks(),this.maybeCreateTags(),this.maybeCreateAttachments(),this.maybeCreateSeekHead(!1);const t={id:Ze.Segment,size:this.format._options.appendOnly?-1:l2,data:[this.seekHead,this.segmentInfo,this.tracksElement,this.attachmentsElement,this.tagsElement]};if(this.segment=t,this.format._options.onSegmentHeader&&this.writer.startTrackingWrites(),this.ebmlWriter.writeEBML(t),this.format._options.onSegmentHeader){const{data:i,start:n}=this.writer.stopTrackingWrites();this.format._options.onSegmentHeader(i,n)}}createCues(){this.cues={id:Ze.Cues,data:[]}}get segmentDataOffset(){return We(this.segment),this.ebmlWriter.dataOffsets.get(this.segment)}allTracksAreKnown(){for(const t of this.output.tracks)if(!t.source._closed&&!this.trackDatas.some(i=>i.track===t))return!1;return!0}async getMimeType(){await this.allTracksKnown.promise;const t=this.trackDatas.map(i=>i.type==="video"||i.type==="audio"?i.info.decoderConfig.codec:{webvtt:"wvtt"}[i.track.source._codec]);return bG({isWebM:this.format instanceof Uf,hasVideo:this.trackDatas.some(i=>i.type==="video"),hasAudio:this.trackDatas.some(i=>i.type==="audio"),codecStrings:t})}getVideoTrackData(t,i,n){const s=this.trackDatas.find(d=>d.track===t);if(s)return s;Ym(n,t.source._codec),We(n),We(n.decoderConfig),We(n.decoderConfig.codedWidth!==void 0),We(n.decoderConfig.codedHeight!==void 0);const r=n.decoderConfig.displayAspectWidth,o=n.decoderConfig.displayAspectHeight,l=r===void 0||o===void 0?null:Om({num:r,den:o}),c={track:t,type:"video",info:{width:n.decoderConfig.codedWidth,height:n.decoderConfig.codedHeight,aspectRatio:l,decoderConfig:n.decoderConfig,alphaMode:i?!!i.sideData.alpha:null},chunkQueue:[],lastWrittenMsTimestamp:null,codecPrivate:n.decoderConfig.description??null,closed:!1};return t.source._codec==="vp9"?c.codecPrivate=new Uint8Array(nG(c.info.decoderConfig.codec)):t.source._codec==="av1"?c.codecPrivate=new Uint8Array(my(c.info.decoderConfig.codec)):t.source._codec==="prores"&&(c.codecPrivate=ws.encode(n.decoderConfig.codec)),this.trackDatas.push(c),this.trackDatas.sort((d,g)=>d.track.id-g.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),c}getAudioTrackData(t,i,n){const s=this.trackDatas.find(c=>c.track===t);if(s)return s;Jm(n,t.source._codec),We(n),We(n.decoderConfig);const r={...n.decoderConfig};let o=!1;if(t.source._codec==="aac"&&!r.description){if(!i)throw new Error("No AAC description provided; you must therefore provide a priming packet.");const c=Cf(Vl.tempFromBytes(i.data));if(!c)throw new Error("Couldn't parse ADTS header from the AAC packet. Make sure the packets are in ADTS format (as specified in ISO 13818-7) when not providing a description, or provide a description (must be an AudioSpecificConfig as specified in ISO 14496-3) and ensure the packets are raw AAC data.");const d=Nd[c.samplingFrequencyIndex],g=xf[c.channelConfiguration];if(d===void 0||g===void 0)throw new Error("Invalid ADTS frame header.");r.description=Hm({objectType:c.objectType,outputSampleRate:d,outputNumberOfChannels:g}),o=!0}const l={track:t,type:"audio",info:{numberOfChannels:n.decoderConfig.numberOfChannels,sampleRate:n.decoderConfig.sampleRate,decoderConfig:r,requiresAdtsStripping:o},chunkQueue:[],lastWrittenMsTimestamp:null,codecPrivate:r.description??null,closed:!1};return this.trackDatas.push(l),this.trackDatas.sort((c,d)=>c.track.id-d.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),l}getSubtitleTrackData(t,i){const n=this.trackDatas.find(r=>r.track===t);if(n)return n;hy(i),We(i),We(i.config);const s={track:t,type:"subtitle",info:{config:i.config},chunkQueue:[],lastWrittenMsTimestamp:null,codecPrivate:ws.encode(i.config.description),closed:!1};return this.trackDatas.push(s),this.trackDatas.sort((r,o)=>r.track.id-o.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),s}async addEncodedVideoPacket(t,i,n){const s=await this.mutex.acquire();try{const r=this.getVideoTrackData(t,i,n);r.info.alphaMode??=!!i.sideData.alpha;let o=i.data;if(t.source._codec==="prores"){if(o.byteLength<8)throw new Error("ProRes packet too small, expected at least 8 bytes.");o=o.subarray(8)}const l=i.type==="key";this.validateTimestamp(r.track,i.timestamp,l);let c=i.timestamp,d=i.duration;t.metadata.frameRate!==void 0&&(c=kf(c,t.metadata.frameRate),d=kf(d,t.metadata.frameRate));const g=r.info.alphaMode?i.sideData.alpha??null:null,h=this.createInternalChunk(o,c,d,i.type,g);t.source._codec==="vp9"&&this.fixVP9ColorSpace(r,h),r.chunkQueue.push(h),await this.interleaveChunks()}finally{s()}}async addEncodedAudioPacket(t,i,n){const s=await this.mutex.acquire();try{const r=this.getAudioTrackData(t,i,n);let o=i.data;if(r.info.requiresAdtsStripping){const d=Cf(Vl.tempFromBytes(o));if(!d)throw new Error("Expected ADTS frame, didn't get one.");const g=d.crcCheck===null?xy:Sy;o=o.subarray(g)}const l=i.type==="key";this.validateTimestamp(r.track,i.timestamp,l);const c=this.createInternalChunk(o,i.timestamp,i.duration,i.type);r.chunkQueue.push(c),await this.interleaveChunks()}finally{s()}}async addSubtitleCue(t,i,n){const s=await this.mutex.acquire();try{const r=this.getSubtitleTrackData(t,n);this.validateTimestamp(r.track,i.timestamp,!0);let o=i.text;const l=Math.round(i.timestamp*1e3);Mf.lastIndex=0,o=o.replace(Mf,h=>{const p=OG(h.slice(1,-1))-l;return`<${Wy(p)}>`});const c=ws.encode(o),d=`${i.settings??""} +`)),n.length?n:a.trim()?[a]:[]}function Gm(a){return a==="vibevoice"?600:a==="voxcpm2"?60:1e3}const Tb="audiocpp.ui.theme",xq=[{id:"mocha",label:"Catppuccin Mocha"},{id:"system",label:"System"},{id:"dark",label:"Dark"},{id:"light",label:"Light"},{id:"paper",label:"Paper"}];function $b(a){return a==="dark"||a==="light"||a==="system"||a==="mocha"||a==="paper"?a:"mocha"}function Sq(a,t){return a!=="system"?a:t?"dark":"light"}var qb=ae(""),vf=ae(' '),Tq=ae('
      '),$q=ae('
      '),qq=ae('
      '),Cq=ae(''),Aq=ae(""),Gq=ae('
      '),Fq=ae(''),Mq=ae('
      '),zq=ae('
      Components
      Sampling and memory
      ');function Eq(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y();let l=Se(t,"task",8,"tts"),c=Se(t,"busy",8,!1),d=Se(t,"paramSpecs",24,()=>[]),g=Se(t,"advancedValues",24,()=>({})),h=Se(t,"tr",8,(O,V,L=O)=>L),m=Se(t,"localizedParameterText",8,(O,V)=>V==="label"?O.name:""),p=Se(t,"setParameterValue",8,()=>{});const u=["model_gguf","qwen_gguf","vae_gguf"],f=["num_inference_steps","guidance_scale","sway_sampling_coef"],_=["attention","mem_saver"];function v(O){return O.map(V=>d().find(L=>L.name===V)).filter(V=>V!==void 0)}Ue(()=>{},()=>{y(i,v(u))}),Ue(()=>{},()=>{y(n,v(f))}),Ue(()=>{},()=>{y(s,v(_))}),Ue(()=>Q(g()),()=>{y(r,String(g().model_gguf||"auk-base-f32.gguf"))}),Ue(()=>e(r),()=>{y(o,e(r).startsWith("auk-flash-")?"AuK-Flash":"Base")}),wn(),Zi();var b=zq(),S=k(b),$=q(k(S),2),M=k($,!0);w($),w(S);var N=q(S,2);Ct(N,5,()=>e(i),Qt,(O,V)=>{var L=Tq(),T=k(L),F=k(T,!0);w(T);var z=q(T,2);Ct(z,5,()=>(e(V),x(()=>e(V).choices||[])),Qt,(ce,fe)=>{var le=qb(),ge=k(le,!0);w(le);var R={};ie(()=>{W(ge,e(fe)),R!==(R=e(fe))&&(le.value=(le.__value=e(fe))??"")}),J(ce,le)}),w(z);var D;Nn(z);var K=q(z,2);{var X=ce=>{var fe=vf(),le=k(fe,!0);w(fe),ie(ge=>W(le,ge),[()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"info",h())))]),J(ce,fe)},ee=Va(()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"info",h()))));ve(K,ce=>{e(ee)&&ce(X)})}w(L),ie((ce,fe)=>{_e(T,"for",(e(V),x(()=>"auk-param-"+e(V).name))),W(F,ce),_e(z,"id",(e(V),x(()=>"auk-param-"+e(V).name))),z.disabled=c(),D!==(D=fe)&&(z.value=(z.__value=fe)??"",kn(z,fe))},[()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"label",h()))),()=>(Q(g()),e(V),x(()=>String(g()[e(V).name]??e(V).default??"")))]),re("change",z,ce=>p()(e(V),ce.currentTarget.value)),J(O,L)}),w(N);var P=q(N,2),C=k(P);{var j=O=>{var V=ys(),L=ht(V);Ct(L,1,()=>x(()=>v(["instruct"])),Qt,(T,F)=>{var z=$q(),D=k(z),K=k(D),X=q(K),ee=k(X,!0);w(X),w(D);var ce=q(D,2);sn(ce);var fe=q(ce,2);{var le=R=>{var we=vf(),pe=k(we,!0);w(we),ie(Te=>W(pe,Te),[()=>(Q(m()),e(F),Q(h()),x(()=>m()(e(F),"info",h())))]),J(R,we)},ge=Va(()=>(Q(m()),e(F),Q(h()),x(()=>m()(e(F),"info",h()))));ve(fe,R=>{e(ge)&&R(le)})}w(z),ie((R,we,pe,Te)=>{W(K,`${R??""} `),W(ee,we),ce.disabled=c(),bi(ce,pe),_e(ce,"placeholder",Te)},[()=>(Q(m()),e(F),Q(h()),x(()=>m()(e(F),"label",h()))),()=>(Q(h()),x(()=>h()("request.optional"))),()=>(Q(g()),x(()=>String(g().instruct??""))),()=>(Q(m()),e(F),Q(h()),x(()=>m()(e(F),"placeholder",h())))]),re("input",ce,R=>p()(e(F),R.currentTarget.value)),J(T,z)}),J(O,V)};ve(C,O=>{l()==="tts"&&O(j)})}var G=q(C,2);Ct(G,1,()=>x(()=>v(["duration_sec"])),Qt,(O,V)=>{var L=qq(),T=k(L),F=k(T),z=q(F),D=k(z,!0);w(z),w(T);var K=q(T,2);Pt(K);var X=q(K,2);{var ee=fe=>{var le=vf(),ge=k(le,!0);w(le),ie(R=>W(ge,R),[()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"info",h())))]),J(fe,le)},ce=Va(()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"info",h()))));ve(X,fe=>{e(ce)&&fe(ee)})}w(L),ie((fe,le,ge,R)=>{W(F,`${fe??""} `),W(D,le),K.disabled=c(),_e(K,"min",(e(V),x(()=>e(V).minimum))),_e(K,"max",(e(V),x(()=>e(V).maximum))),_e(K,"step",(e(V),x(()=>e(V).step))),bi(K,ge),_e(K,"placeholder",R)},[()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"label",h()))),()=>(Q(h()),x(()=>h()("request.optional"))),()=>(Q(g()),x(()=>String(g().duration_sec??""))),()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"placeholder",h())))]),re("input",K,fe=>p()(e(V),fe.currentTarget.value===""?"":fe.currentTarget.valueAsNumber)),J(O,L)}),w(P);var A=q(P,2),B=k(A),H=q(k(B)),U=k(H,!0);w(H),w(B);var E=q(B,2);Ct(E,5,()=>(e(n),e(s),x(()=>[...e(n),...e(s)])),Qt,(O,V)=>{var L=Mq(),T=k(L),F=k(T,!0);w(T);var z=q(T,2);{var D=ge=>{var R=Cq(),we=k(R);Pt(we);var pe=q(we,3,!0);w(R),ie((Te,he)=>{_e(we,"id",(e(V),x(()=>"auk-param-"+e(V).name))),we.disabled=c(),Cl(we,Te),W(pe,he)},[()=>(Q(g()),e(V),x(()=>!!g()[e(V).name])),()=>(Q(g()),e(V),Q(h()),x(()=>g()[e(V).name]?h()("common.enabled"):h()("common.disabled")))]),re("change",we,Te=>p()(e(V),Te.currentTarget.checked)),J(ge,R)},K=ge=>{var R=Aq();Ct(R,5,()=>(e(V),x(()=>e(V).choices||[])),Qt,(pe,Te)=>{var he=qb(),Pe=k(he,!0);w(he);var Le={};ie(()=>{W(Pe,e(Te)),Le!==(Le=e(Te))&&(he.value=(he.__value=e(Te))??"")}),J(pe,he)}),w(R);var we;Nn(R),ie(pe=>{_e(R,"id",(e(V),x(()=>"auk-param-"+e(V).name))),R.disabled=c(),we!==(we=pe)&&(R.value=(R.__value=pe)??"",kn(R,pe))},[()=>(Q(g()),e(V),x(()=>String(g()[e(V).name]??e(V).default??"")))]),re("change",R,pe=>p()(e(V),pe.currentTarget.value)),J(ge,R)},X=ge=>{var R=Gq(),we=k(R);Pt(we);var pe=q(we,2),Te=k(pe,!0);w(pe),w(R),ie((he,Pe)=>{_e(we,"id",(e(V),x(()=>"auk-param-"+e(V).name))),we.disabled=c(),_e(we,"min",(e(V),x(()=>e(V).minimum))),_e(we,"max",(e(V),x(()=>e(V).maximum))),_e(we,"step",(e(V),x(()=>e(V).step))),bi(we,he),W(Te,Pe)},[()=>(Q(g()),e(V),x(()=>Number(g()[e(V).name]??e(V).default))),()=>(Q(g()),e(V),x(()=>String(g()[e(V).name])))]),re("input",we,he=>p()(e(V),he.currentTarget.valueAsNumber)),J(ge,R)},ee=ge=>{var R=Fq();Pt(R),ie(we=>{_e(R,"id",(e(V),x(()=>"auk-param-"+e(V).name))),R.disabled=c(),_e(R,"min",(e(V),x(()=>e(V).minimum))),_e(R,"max",(e(V),x(()=>e(V).maximum))),_e(R,"step",(e(V),x(()=>e(V).step))),bi(R,we)},[()=>(Q(g()),e(V),x(()=>String(g()[e(V).name]??"")))]),re("input",R,we=>p()(e(V),we.currentTarget.valueAsNumber)),J(ge,R)};ve(z,ge=>{e(V),x(()=>e(V).type==="bool")?ge(D):(e(V),x(()=>e(V).type==="choice")?ge(K,1):(e(V),x(()=>e(V).type==="slider")?ge(X,2):ge(ee,-1)))})}var ce=q(z,2);{var fe=ge=>{var R=vf(),we=k(R,!0);w(R),ie(pe=>W(we,pe),[()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"info",h())))]),J(ge,R)},le=Va(()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"info",h()))));ve(ce,ge=>{e(le)&&ge(fe)})}w(L),ie(ge=>{_e(T,"for",(e(V),x(()=>"auk-param-"+e(V).name))),W(F,ge)},[()=>(Q(m()),e(V),Q(h()),x(()=>m()(e(V),"label",h())))]),J(O,L)}),w(E),w(A),w(b),ie(()=>{W(M,e(o)),W(U,(e(n),e(s),x(()=>e(n).length+e(s).length)))}),J(a,b),Mi()}const Lo=yl({modelId:"",turns:[]});let Uq=1;const Rq={subscribe:Lo.subscribe};function Fm(a){a.questionUrl&&URL.revokeObjectURL(a.questionUrl),a.replyUrl&&URL.revokeObjectURL(a.replyUrl),a.questionUrl="",a.replyUrl=""}function Bq(){for(const a of Fu(Lo).turns)Fm(a);Lo.set({modelId:"",turns:[]})}function Cb(a){return a.filter(t=>t.state==="done"&&t.reply&&!t.leftOut)}function Pq(a,t,i){const n=Fu(Lo),s=n.turns.filter(l=>l.state!=="failed"&&l.state!=="stopped");for(const l of n.turns)s.includes(l)||Fm(l);const r=s.length>0&&n.modelId!==a,o={key:Uq++,state:t,seed:i,questionPath:"",questionUrl:"",replyText:"",replyUrl:"",reply:null,cut:!1,steps:"",leftOut:!1,live:!0,firstAudioMs:null,message:""};return Lo.set({modelId:r?n.modelId:a,turns:[...s,o]}),{turn:o,history:r?[]:Cb(s)}}function Rl(a,t){Object.assign(a,t),Lo.update(i=>i)}function jq(a,t,i){Object.assign(t,i,{state:"done"});const n=Fu(Lo),s=n.modelId!==a;if(s)for(const r of n.turns)r!==t&&Fm(r);return Lo.set(s?{modelId:a,turns:[t]}:n),s}function Ab(a){const t=atob(a),i=new Uint8Array(t.length);for(let n=0;nString.fromCharCode(a[l],a[l+1],a[l+2],a[l+3]);if(a.length<12||i(0)!=="RIFF"||i(8)!=="WAVE")throw new Error("The reply audio is not a WAV file.");let n=0,s=0,r=0,o=0;for(let l=12;l+8<=a.length;){const c=i(l),d=t.getUint32(l+4,!0),g=l+8;if(c==="fmt "&&g+16<=a.length)n=t.getUint16(g,!0),s=t.getUint16(g+2,!0),r=t.getUint32(g+4,!0),o=t.getUint16(g+14,!0);else if(c==="data"){if(n!==1||o!==16||s<1||r<1)throw new Error("The reply audio is not 16-bit PCM.");const h=Math.floor(Math.min(d,a.length-g)/(2*s)),m=new Float32Array(h);for(let p=0;p{};beginTurn(t){if(this.open=!0,this.stop(),this.enabled=t,this.lead=.15,!!t){if(!this.context)try{this.context=new AudioContext({sampleRate:24e3,latencyHint:"interactive"})}catch{this.unavailable=!0,this.enabled=!1;return}this.context.resume().catch(()=>{})}}endTurn(){this.open=!1,this.suspendIfIdle()}get blocked(){return this.enabled&&this.context!==null&&this.context.state!=="running"}get playing(){return this.sources.size>0}push(t,i){const n=this.context;if(!this.enabled||!n||!t.length)return null;const s=n.currentTime;!this.frames||i!==this.rate?(this.startTime=s+this.lead,this.frames=0,this.rate=i):this.startTime+this.frames/this.rate{o.disconnect(),this.sources.delete(o),this.sources.size||(this.onchange(),this.suspendIfIdle())};const l=this.startTime+this.frames/this.rate;return o.start(l),this.frames+=t.length,this.sources.add(o),this.sources.size===1&&this.onchange(),Math.max(0,l-s)}stop(){this.enabled=!1,this.frames=0;const t=this.sources.size>0;for(const i of this.sources)i.onended=null,i.stop(),i.disconnect();this.sources.clear(),t&&this.onchange(),this.suspendIfIdle()}close(){this.stop(),this.context?.close().catch(()=>{}),this.context=null}suspendIfIdle(){!this.open&&!this.sources.size&&this.context?.state==="running"&&this.context.suspend().catch(()=>{})}}var Iq=ae(''),Dq=ae(' '),Lq=ae(`This entry's id is not the catalog's S2S id, so Model parameters shows the family's ASR settings; turns leave them out and use Max tokens.`),Vq=ae(''),Hq=ae(''),Wq=ae('…'),Qq=ae(''),Kq=ae(' '),Yq=ae('
    1. You
      Reply

    2. '),Jq=ae('
        '),Xq=ae('

        Record or choose a spoken question under Source audio, then press Run. Each Run adds a turn, and the earlier turns go with it.

        '),Zq=ae('Live playback is not available; each reply is in its player when it finishes.'),eC=ae('The browser did not let live audio start; each reply is in its player when it finishes.'),tC=ae('
        Conversation
        ');function Gb(a,t){Fi(t,!1);const i=()=>zu(Rq,"$conversation",n),[n,s]=vp(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y();let g=Se(t,"modelId",8,""),h=Se(t,"busy",8,!1),m=Se(t,"server",8,null),p=Se(t,"loadedModels",24,()=>[]),u=Se(t,"catalogEntries",24,()=>[]),f=Se(t,"paramSpecs",24,()=>[]),_=Se(t,"sourceFile",8,null),v=Se(t,"sourceRecording",8,!1),b=Se(t,"clearSource",8,()=>{}),S=Se(t,"log",8,()=>{}),$=Se(t,"setPanelRunner",8,()=>()=>{});const M=Y(new Oq);let N=Y(!0),P=Y(!1),C=Y(!1),j=Y(!1),G=Y(null),A=null,B=Y(g());Et(M,e(M).onchange=()=>{y(P,e(M).playing)});function H($e){return u().find(ze=>ze.id===$e)?.display_name||$e}function U($e){!e(G)||e(G).scrollTop+e(G).clientHeight{e(G)&&Et(G,e(G).scrollTop=e(G).scrollHeight)})}function E($e){if($e.aborted)throw new DOMException("The turn was stopped.","AbortError")}function O($e){return u().find(ze=>ze.id===$e)?.family??"lfm2_audio"}function V($e,ze){const Fe=ze;return typeof Fe=="object"&&Fe!==null&&Fe.id===`${$e}.reply`&&typeof Fe.kind=="string"&&typeof Fe.payload=="string"}function L($e){return JSON.stringify($e,(ze,Fe)=>(ze==="audio"||ze==="payload")&&typeof Fe=="string"?``:Fe,2)}function T($e,ze,Fe,qe){const rt={audio:Fe,seed:$e.seed,options:ze};$e.maxTokens!==void 0&&(rt.max_tokens=$e.maxTokens);const ot=O($e.modelId);return $e.language&&ot!=="lfm3_audio"&&(rt.language=$e.language),qe.length&&(rt.artifacts=qe.flatMap(je=>[{id:`${ot}.question`,kind:"custom",path:je.questionPath},je.reply])),{model:$e.modelId,request:rt}}function F($e,ze,Fe){const qe={};typeof Fe.text=="string"&&(qe.replyText=Fe.text);let rt=null;typeof Fe.audio=="string"&&(rt=new Blob([Ab(Fe.audio)],{type:"audio/wav"}),qe.replyUrl=URL.createObjectURL(rt));const ot=O($e),je=(Array.isArray(Fe.artifacts)?Fe.artifacts:[]).find(He=>V(ot,He));return je?(qe.reply={id:je.id,kind:je.kind,payload:je.payload},je.meta&&(qe.reply.meta=je.meta),qe.cut=je.meta?.ended==="false",qe.steps=je.meta?.steps||""):qe.message="The server returned no reply artifact, so this turn does not go with the next question.",jq($e,ze,qe)&&S()(`New ${ot==="lfm3_audio"?"LFM3-Audio":"LFM2.5-Audio"} conversation with ${H($e)}.`),rt}async function z($e){if(v())throw $e.warning("Stop the recording first.");const ze=_();if(!ze)throw $e.warning("Record or choose source audio first.");e(M).beginTurn(e(N));const Fe=u().find(Ve=>Ve.id===$e.modelId)?.configured===!0,qe=m()?.ui_management===!0&&!Fe||p().some(Ve=>Ve.id===$e.modelId&&Ve.mode==="streaming");qe&&e(N)&&!e(M).unavailable&&document.querySelectorAll("audio, video").forEach(Ve=>Ve.pause()),y(j,e(M).unavailable),y(C,!1);const rt=performance.now(),ot={...$e.options,return_codes:!0};if(e(d))for(const Ve of f())delete ot[Ve.name];const{turn:je,history:He}=Pq($e.modelId,m()?.ui_management&&!Fe?"loading":"uploading",$e.seed),Be=new AbortController,Re=()=>Be.abort();$e.signal.aborted?Re():$e.signal.addEventListener("abort",Re),A=Be;const Ze=Be.signal;let Ne="load";try{await $e.ensureLoaded("streaming"),E(Ze),Ne="read",Rl(je,{state:"uploading",live:qe}),$e.setStatus("Uploading the question…");const Ve=await Gr(ze);E(Ze),Ne="upload";const gt=await hr(Ve,Ze);E(Ze),Ne="run";const _t=T($e,ot,gt,He);Rl(je,{state:"waiting",questionPath:gt,questionUrl:URL.createObjectURL(Ve)}),$e.setStatus(qe?"Waiting for the reply…":"Waiting for the whole reply: this server runs the entry offline, so the reply does not stream.");let at;if(qe){let Ke=0,ut=!0;for await(const nt of wT(_t,Ze)){if(nt.type==="task.stream.done"){at=nt.result;continue}const Lt=nt.event,Gt=Lt.partial_text,jt=typeof Gt?.text=="string"?Gt.text:"";let za=je.firstAudioMs;if(ut&&typeof Lt.audio=="string")try{const sa=Nq(Ab(Lt.audio));Ke+=sa.samples.length/sa.sampleRate;const wa=e(M).push(sa.samples,sa.sampleRate);za===null&&(za=performance.now()-rt+(wa??0)*1e3,y(C,e(M).blocked),e(C)&&e(M).stop())}catch(sa){ut=!1,e(M).stop(),e(N)&&(y(j,!0),S()(`Live playback stopped: ${sa instanceof Error?sa.message:String(sa)}`))}(je.state!=="streaming"||jt||za!==je.firstAudioMs)&&Rl(je,{state:"streaming",replyText:je.replyText+jt,firstAudioMs:za}),$e.setStatus(ut?`Streaming the reply: ${Math.floor(Ke)} s`:"Streaming the reply…")}}else at=await Ul(_t,Ze);E(Ze);const wt=F($e.modelId,je,at);return _()===ze&&b()(),{audio:wt,text:je.replyText,json:L(at)}}catch(Ve){if(e(M).stop(),Ze.aborted||Ve?.name==="AbortError")throw Rl(je,{state:"stopped",message:"Stopped before the reply finished; this turn is not part of the conversation."}),Ve?.name==="AbortError"?Ve:new DOMException("The turn was stopped.","AbortError");if(Ve instanceof ub){const _t="The connection closed before the reply finished; this turn is not part of the conversation.";throw Rl(je,{state:"stopped",message:_t}),new Error(_t)}let gt=Ve instanceof Error?Ve.message:String(Ve);throw Ne==="read"?gt=`Could not read the question: ${gt}`:Ne==="upload"?gt=`Upload failed: ${gt}`:Ne==="run"&&He.some(_t=>gt.includes(_t.questionPath))&&(gt+=" The server no longer has the questions this conversation uploaded, as after a restart; start a new conversation."),Rl(je,{state:"failed",message:gt}),new Error(gt)}finally{$e.signal.removeEventListener("abort",Re),A===Be&&(A=null),e(M).endTurn()}}function D(){h()||(e(M).stop(),Bq())}function K($e){h()||e(l)||Rl($e,{leftOut:!$e.leftOut})}function X(){e(M).stop()}function ee($e){return $e.state==="loading"?"loading the model":$e.state!=="done"?$e.state:$e.leftOut?"left out":$e.cut?"cut at max_tokens":"done"}function ce($e){const ze=[`seed ${$e.seed}`];return $e.firstAudioMs!==null&&ze.push(`first audio ${($e.firstAudioMs/1e3).toFixed(2)} s`),$e.steps&&ze.push(`${$e.steps} steps`),$e.live||ze.push("not streamed"),ze.join(" · ")}Jn(()=>$()(z)),fr(()=>{A?.abort(),e(M).close()}),Ue(()=>i(),()=>{y(r,i().turns)}),Ue(()=>i(),()=>{y(o,i().modelId)}),Ue(()=>(e(r),e(o),Q(g())),()=>{y(l,e(r).length>0&&e(o)!==g())}),Ue(()=>(e(l),e(r)),()=>{y(c,e(l)?0:Cb(e(r)).length)}),Ue(()=>i(),()=>{U(i())}),Ue(()=>Q(f()),()=>{y(d,f().some($e=>$e.name==="audio_chunk_mode"))}),Ue(()=>(Q(g()),e(B),e(M)),()=>{g()!==e(B)&&(y(B,g()),e(M).stop())}),Ue(()=>(e(N),e(M)),()=>{e(N)||e(M).stop()}),wn(),Zi();var fe=tC();re("play",Cp,X,!0);var le=k(fe),ge=k(le),R=q(k(ge),2),we=k(R,!0);w(R),w(ge);var pe=q(ge,2),Te=k(pe);{var he=$e=>{var ze=Iq();re("click",ze,X),J($e,ze)};ve(Te,$e=>{e(P)&&$e(he)})}var Pe=q(Te,2);w(pe),w(le);var Le=q(le,2);{var ct=$e=>{var ze=Dq(),Fe=k(ze);w(ze),ie((qe,rt)=>W(Fe,`These turns are with ${qe??""}. Run starts a new conversation with ${rt??""}.`),[()=>(e(o),x(()=>H(e(o)))),()=>(Q(g()),x(()=>H(g())))]),J($e,ze)};ve(Le,$e=>{e(l)&&$e(ct)})}var Ae=q(Le,2);{var Ge=$e=>{var ze=Lq();J($e,ze)};ve(Ae,$e=>{e(d)&&$e(Ge)})}var ne=q(Ae,2);{var Je=$e=>{var ze=Jq();Ct(ze,7,()=>e(r),Fe=>Fe.key,(Fe,qe,rt)=>{var ot=Yq();let je;var He=k(ot),Be=k(He),Re=k(Be);w(Be);var Ze=q(Be,2);let Ne;var Ve=k(Ze,!0);w(Ze);var gt=q(Ze,2),_t=k(gt,!0);w(gt);var at=q(gt,2);{var wt=St=>{var ea=Vq(),da=k(ea,!0);w(ea),ie(()=>{ea.disabled=h()||e(l),_e(ea,"aria-label",(e(qe),Q(e(rt)),x(()=>`${e(qe).leftOut?"Include":"Leave out"} turn ${e(rt)+1}`))),W(da,(e(qe),x(()=>e(qe).leftOut?"Include":"Leave out")))}),re("click",ea,()=>K(e(qe))),J(St,ea)};ve(at,St=>{e(qe),x(()=>e(qe).state==="done"&&e(qe).reply)&&St(wt)})}w(He);var Ke=q(He,2),ut=q(k(Ke),2);{var nt=St=>{var ea=Hq();ie(()=>{_e(ea,"src",(e(qe),x(()=>e(qe).questionUrl))),_e(ea,"aria-label",`Turn ${e(rt)+1} question`)}),J(St,ea)},Lt=St=>{var ea=Wq();J(St,ea)};ve(ut,St=>{e(qe),x(()=>e(qe).questionUrl)?St(nt):St(Lt,-1)})}w(Ke);var Gt=q(Ke,2),jt=q(k(Gt),2),za=k(jt),sa=k(za,!0);w(za);var wa=q(za,2);{var Fa=St=>{var ea=Qq(),da=k(ea),wi=q(da,2);w(ea),ie(()=>{_e(da,"src",(e(qe),x(()=>e(qe).replyUrl))),_e(da,"aria-label",`Turn ${e(rt)+1} reply`),_e(wi,"href",(e(qe),x(()=>e(qe).replyUrl))),_e(wi,"download",`${e(o)}-turn-${e(rt)+1}-reply.wav`)}),J(St,ea)};ve(wa,St=>{e(qe),x(()=>e(qe).replyUrl)&&St(Fa)})}w(jt),w(Gt);var ln=q(Gt,2);{var Kt=St=>{var ea=Kq(),da=k(ea,!0);w(ea),ie(()=>W(da,(e(qe),x(()=>e(qe).message)))),J(St,ea)};ve(ln,St=>{e(qe),x(()=>e(qe).message)&&St(Kt)})}w(ot),ie((St,ea)=>{_e(ot,"data-state",(e(qe),x(()=>e(qe).state))),je=ya(ot,1,"svelte-18zfjku",null,je,{"left-out":e(qe).leftOut}),W(Re,`Turn ${e(rt)+1}`),Ne=ya(Ze,1,"badge svelte-18zfjku",null,Ne,{bad:e(qe).state==="failed"||e(qe).state==="stopped"}),W(Ve,St),W(_t,ea),W(sa,(e(qe),x(()=>e(qe).replyText||(e(qe).state==="done"?"(no text)":"…"))))},[()=>(e(qe),x(()=>ee(e(qe)))),()=>(e(qe),x(()=>ce(e(qe))))]),J(Fe,ot)}),w(ze),Ci(ze,Fe=>y(G,Fe),()=>e(G)),J($e,ze)},ue=$e=>{var ze=Xq();J($e,ze)};ve(ne,$e=>{e(r),x(()=>e(r).length)?$e(Je):$e(ue,-1)})}var ye=q(ne,2),de=k(ye);Pt(de),zt(3),w(ye);var be=q(ye,2);{var xe=$e=>{var ze=Zq();J($e,ze)},Ie=$e=>{var ze=eC();J($e,ze)};ve(be,$e=>{e(j)?$e(xe):e(C)&&$e(Ie,1)})}w(fe),ie(()=>{W(we,e(c)?`${e(c)} earlier ${e(c)===1?"turn goes":"turns go"} with the next question`:"The next question starts the conversation"),Pe.disabled=(Q(h()),e(r),x(()=>h()||!e(r).length))}),re("click",Pe,D),Dp(de,()=>e(N),$e=>y(N,$e)),J(a,fe),Mi(),s()}var aC=ae(''),iC=ae('LiveAvatar reference'),nC=ae('Uploading reference image…'),sC=ae(' '),rC=ae(' Recording microphone…',1),oC=ae(" "),lC=ae(' ',1),cC=ae(""),dC=ae(''),uC=ae('
        '),fC=ae(''),pC=ae('
        '),mC=ae(''),gC=ae(' ',1),hC=ae('
        '),_C=ae('
        Memory and execution
        ');function vC(a,t){Fi(t,!1);const i=Y(),n=Y();let s=Se(t,"busy",8,!1),r=Se(t,"loraUploading",12,!1),o=Se(t,"paramSpecs",24,()=>[]),l=Se(t,"advancedValues",24,()=>({})),c=Se(t,"setParameterValue",8,()=>{}),d=Se(t,"sourceFile",8,null),g=Se(t,"sourceRecording",8,!1),h=Se(t,"sourceRecordingBlocked",8,!1),m=Se(t,"setSourceFile",8,()=>{}),p=Se(t,"startSourceRecording",8,()=>{}),u=Se(t,"stopSourceRecording",8,()=>{});const f=["generation_mode","height","width","num_frames","num_clips","num_inference_steps","guidance_scale","shift","negative_prompt"],_=["sage_attention","memory_saver","batched_cfg","fused_cfg","denoiser_layerwise","denoiser_layerwise_batch","target_cache_blocks","vae_cache_f16","vae_encoder_chunk_size","vae_decoder_tile_size","denoiser_weight_streaming"];let v=Y(null),b=Y(null),S=Y(null),$=Y(""),M=Y(""),N=null;function P(Ge,ne){const Je=o().find(ue=>ue.name===Ge);Je&&c()(Je,ne)}function C(){N?.abort(),N=null,r(!1),y(v,null),y(M,""),e($)&&URL.revokeObjectURL(e($)),y($,""),e(b)&&Et(b,e(b).value=""),P("reference_image_path","")}async function j(Ge){if(Ge){N?.abort(),y(M,""),y(v,Ge),e($)&&URL.revokeObjectURL(e($)),y($,URL.createObjectURL(Ge)),r(!0),N=new AbortController;try{const ne=await Gd(Ge,N.signal);P("reference_image_path",ne)}catch(ne){N.signal.aborted||(y(M,ne instanceof Error?ne.message:String(ne)),P("reference_image_path",""))}finally{r(!1),N=null}}}function G(Ge){m()(Ge)}function A(){e(S)&&Et(S,e(S).value=""),m()(null)}fr(()=>{N?.abort(),e($)&&URL.revokeObjectURL(e($))}),Ue(()=>Q(o()),()=>{y(i,f.map(Ge=>o().find(ne=>ne.name===Ge)).filter(Ge=>Ge!==void 0))}),Ue(()=>Q(o()),()=>{y(n,_.map(Ge=>o().find(ne=>ne.name===Ge)).filter(Ge=>Ge!==void 0))}),wn(),Zi();var B=_C(),H=k(B),U=q(k(H),2);Ci(U,Ge=>y(b,Ge),()=>e(b));var E=q(U,2),O=q(k(E),2),V=k(O,!0);w(O);var L=q(O,2);{var T=Ge=>{var ne=aC();ie(()=>ne.disabled=s()),re("click",ne,C),J(Ge,ne)};ve(L,Ge=>{e(v)&&Ge(T)})}w(E);var F=q(E,2);{var z=Ge=>{var ne=iC();ie(()=>_e(ne,"src",e($))),J(Ge,ne)};ve(F,Ge=>{e($)&&Ge(z)})}var D=q(F,2);{var K=Ge=>{var ne=nC();J(Ge,ne)};ve(D,Ge=>{r()&&Ge(K)})}var X=q(D,2);{var ee=Ge=>{var ne=sC(),Je=k(ne,!0);w(ne),ie(()=>W(Je,e(M))),J(Ge,ne)};ve(X,Ge=>{e(M)&&Ge(ee)})}w(H);var ce=q(H,2),fe=q(k(ce),2);Ci(fe,Ge=>y(S,Ge),()=>e(S));var le=q(fe,2),ge=q(k(le)),R=k(ge,!0);w(ge),w(le);var we=q(le,2),pe=k(we);{var Te=Ge=>{var ne=rC(),Je=ht(ne);zt(2),re("click",Je,function(...ue){u()?.apply(this,ue)}),J(Ge,ne)},he=Ge=>{var ne=lC(),Je=ht(ne),ue=q(Je,2),ye=q(ue,2);{var de=be=>{var xe=oC(),Ie=k(xe,!0);w(xe),ie(()=>W(Ie,(Q(d()),x(()=>d().name)))),J(be,xe)};ve(ye,be=>{d()&&be(de)})}ie(()=>{Je.disabled=h(),ue.disabled=!d()}),re("click",Je,function(...be){p()?.apply(this,be)}),re("click",ue,A),J(Ge,ne)};ve(pe,Ge=>{g()?Ge(Te):Ge(he,-1)})}w(we);var Pe=q(we,2);ss(Pe,{get file(){return d()},kind:"audio",label:"Audio preview"}),w(ce);var Le=q(ce,2);Ct(Le,5,()=>e(i),Qt,(Ge,ne)=>{var Je=pC();let ue;var ye=k(Je),de=k(ye,!0);w(ye);var be=q(ye,2);{var xe=ze=>{var Fe=dC();Ct(Fe,5,()=>(e(ne),x(()=>e(ne).choices||[])),Qt,(rt,ot)=>{var je=cC(),He=k(je,!0);w(je);var Be={};ie(()=>{W(He,e(ot)),Be!==(Be=e(ot))&&(je.value=(je.__value=e(ot))??"")}),J(rt,je)}),w(Fe);var qe;Nn(Fe),ie(rt=>{_e(Fe,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),qe!==(qe=rt)&&(Fe.value=(Fe.__value=rt)??"",kn(Fe,rt))},[()=>(Q(l()),e(ne),x(()=>String(l()[e(ne).name]??e(ne).default??"")))]),re("change",Fe,rt=>c()(e(ne),rt.currentTarget.value)),J(ze,Fe)},Ie=ze=>{var Fe=uC(),qe=k(Fe);Pt(qe);var rt=q(qe,2),ot=k(rt,!0);w(rt),w(Fe),ie((je,He)=>{_e(qe,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),_e(qe,"min",(e(ne),x(()=>e(ne).minimum))),_e(qe,"max",(e(ne),x(()=>e(ne).maximum))),_e(qe,"step",(e(ne),x(()=>e(ne).step))),bi(qe,je),W(ot,He)},[()=>(Q(l()),e(ne),x(()=>Number(l()[e(ne).name]??e(ne).default))),()=>(Q(l()),e(ne),x(()=>String(l()[e(ne).name])))]),re("input",qe,je=>c()(e(ne),je.currentTarget.valueAsNumber)),J(ze,Fe)},$e=ze=>{var Fe=fC();Pt(Fe),ie(qe=>{_e(Fe,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),_e(Fe,"type",(e(ne),x(()=>e(ne).type==="number"?"number":"text"))),_e(Fe,"min",(e(ne),x(()=>e(ne).minimum))),_e(Fe,"max",(e(ne),x(()=>e(ne).maximum))),_e(Fe,"step",(e(ne),x(()=>e(ne).step))),bi(Fe,qe)},[()=>(Q(l()),e(ne),x(()=>String(l()[e(ne).name]??e(ne).default??"")))]),re("input",Fe,qe=>c()(e(ne),e(ne).type==="number"?qe.currentTarget.valueAsNumber:qe.currentTarget.value)),J(ze,Fe)};ve(be,ze=>{e(ne),x(()=>e(ne).type==="choice")?ze(xe):(e(ne),x(()=>e(ne).type==="slider")?ze(Ie,1):ze($e,-1))})}w(Je),ie(ze=>{ue=ya(Je,1,"field svelte-4cgukj",null,ue,{wide:e(ne).type==="text"}),_e(ye,"for",(e(ne),x(()=>"liveavatar-"+e(ne).name))),W(de,ze)},[()=>(e(ne),x(()=>e(ne).label||e(ne).name.replace(/_/g," ")))]),J(Ge,Je)}),w(Le);var ct=q(Le,2),Ae=q(k(ct),2);Ct(Ae,5,()=>e(n),Qt,(Ge,ne)=>{var Je=hC(),ue=k(Je);{var ye=be=>{var xe=mC(),Ie=k(xe);Pt(Ie);var $e=q(Ie,3,!0);w(xe),ie((ze,Fe)=>{_e(xe,"for",(e(ne),x(()=>"liveavatar-"+e(ne).name))),_e(Ie,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),Cl(Ie,ze),W($e,Fe)},[()=>(Q(l()),e(ne),x(()=>!!l()[e(ne).name])),()=>(e(ne),x(()=>e(ne).label||e(ne).name.replace(/_/g," ")))]),re("change",Ie,ze=>c()(e(ne),ze.currentTarget.checked)),J(be,xe)},de=be=>{var xe=gC(),Ie=ht(xe),$e=k(Ie,!0);w(Ie);var ze=q(Ie,2);Pt(ze),ie((Fe,qe)=>{_e(Ie,"for",(e(ne),x(()=>"liveavatar-"+e(ne).name))),W($e,Fe),_e(ze,"id",(e(ne),x(()=>"liveavatar-"+e(ne).name))),_e(ze,"min",(e(ne),x(()=>e(ne).minimum))),_e(ze,"max",(e(ne),x(()=>e(ne).maximum))),_e(ze,"step",(e(ne),x(()=>e(ne).step))),bi(ze,qe)},[()=>(e(ne),x(()=>e(ne).label||e(ne).name.replace(/_/g," "))),()=>(Q(l()),e(ne),x(()=>Number(l()[e(ne).name]??e(ne).default)))]),re("input",ze,Fe=>c()(e(ne),Fe.currentTarget.valueAsNumber)),J(be,xe)};ve(ue,be=>{e(ne),x(()=>e(ne).type==="bool")?be(ye):be(de,-1)})}w(Je),J(Ge,Je)}),w(Ae),w(ct),w(B),ie(()=>{U.disabled=s()||r(),W(V,(e(v),x(()=>e(v)?.name||"No image selected"))),fe.disabled=s()||g(),W(R,(Q(d()),x(()=>d()?.name||"No file chosen")))}),re("change",U,Ge=>j(Ge.currentTarget.files?.[0]||null)),re("change",fe,Ge=>G(Ge.currentTarget.files?.[0]||null)),J(a,B),Mi()}var Fb=ae(""),Mb=ae(' '),bC=ae('
        '),zb=ae(' '),yC=ae(`
        LoRA requirements vary. Read the original adapter's documentation for usage instructions.
        `),wC=ae('
        Unfused NAR adapter for acoustic detail; relative paths resolve against the model root. Reload the model after changing this value.
        Scales the LoRA deltas only; any full vae2llm/llm2vae projection replacement in the adapter stays at full strength.',1),kC=ae(" ",1),xC=ae(""),Mm=ae('
        '),SC=ae(""),TC=ae('
        '),$C=ae(" "),Eb=ae(' '),qC=ae('
        '),CC=ae('Extract or paste ABC to preview the score.'),Ub=ae(''),Rb=ae('
        '),AC=ae('
        Yue2 ABC conditioning
        Cover source Use SheetSage2 + MERT2 to extract an editable ABC score from a song.
        Warning: VRAM may remain in use after unloading.
        ABC score editor Edit the extracted score here. The sheet preview updates from this ABC.
        Sheet preview Rendered from the editable ABC score.
        Yue2 semantic sampling
        Yue2 ABC planner sampling
        ');function GC(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y();let l=Se(t,"lyrics",12,""),c=Se(t,"seed",12,1234),d=Se(t,"loraUploading",12,!1),g=Se(t,"busy",8,!1),h=Se(t,"paramSpecs",24,()=>[]),m=Se(t,"advancedValues",24,()=>({})),p=Se(t,"catalogEntries",24,()=>[]),u=Se(t,"loadedModels",24,()=>[]),f=Se(t,"server",8,null),_=Se(t,"modelPathFor",8,Ye=>Ye.path),v=Se(t,"loadTargetFor",8),b=Se(t,"loadOptionsFor",8,Ye=>Ye.load_options||{}),S=Se(t,"sessionOptionsFor",8,Ye=>Ye.session_options||{}),$=Se(t,"refreshModels",8,async()=>{}),M=Se(t,"log",8,()=>{}),N=Se(t,"tr",8,(Ye,Ce,pt=Ye)=>pt),P=Se(t,"localizedParameterText",8,(Ye,Ce)=>Ce==="label"?Ye.name:""),C=Se(t,"setParameterValue",8,()=>{});const j=["main_gguf","vae_gguf"],G=["style","cot","guidance_scale","num_inference_steps"],A=["abc","abc_file"],B=["semantic_temperature","semantic_top_p","semantic_top_k","semantic_repetition_penalty","semantic_penalty_window","semantic_min_tokens","semantic_max_tokens"],H=["abc_temperature","abc_top_p","abc_top_k","abc_repetition_penalty","abc_penalty_window","abc_min_tokens","abc_max_tokens"];let U=Y(null),E=Y(null),O=Y(null),V=Y(""),L=Y(""),T=null;fr(()=>T?.abort());async function F(Ye,Ce){if(!Ye)return;const pt=Ft=>{y(Ce==="ar"?V:L,Ft)};if(y(V,""),y(L,""),!Ye.name.toLowerCase().endsWith(".safetensors")){pt(`Select an unfused ${Ce.toUpperCase()} .safetensors adapter.`);return}d(!0),T=new AbortController;try{const Ft=await Gd(Ye,T.signal);he(Ce==="ar"?"ar_lora":"nar_lora",Ft),M()(`YuE2 ${Ce.toUpperCase()} LoRA selected: ${Ye.name}`)}catch(Ft){T.signal.aborted||pt(Ft instanceof Error?Ft.message:String(Ft))}finally{d(!1),T=null,e(E)&&Et(E,e(E).value=""),e(O)&&Et(O,e(O).value="")}}let z=Y(null),D=Y(!1);const K="audiocpp.ui.yue2.unloadSheetSageAfterConversion";let X=Y(!0);Jn(()=>{y(X,localStorage.getItem(K)!=="false")});let ee=Y(""),ce=Y(""),fe=Y(""),le=Y(null),ge="",R=Y(""),we=null;function pe(Ye,Ce){return Ye.map(pt=>Ce.find(Ft=>Ft.name===pt)).filter(pt=>pt!==void 0)}function Te(Ye){return h().find(Ce=>Ce.name===Ye)}function he(Ye,Ce){const pt=Te(Ye);pt&&C()(pt,Ce)}function Pe(Ye){try{return atob(Ye)}catch{return Ye}}function Le(Ye){if(typeof Ye.text=="string"&&Ye.text.trim())return Ye.text;const Ce=Array.isArray(Ye.artifacts)?Ye.artifacts:[];for(const pt of Ce){if(!pt||typeof pt!="object")continue;const Ft=pt,Ta=String(Ft.meta?.format||Ft.meta?.extension||Ft.id||"");if(/abc|score/i.test(Ta)&&typeof Ft.payload=="string")return Pe(Ft.payload)}return""}function ct(){return p().find(Ye=>Ye.family==="sheetsage2")||null}async function Ae(Ye){if(u().some(Ta=>Ta.id===Ye.id&&Ta.loaded))return;const Ce=await Uc();if(Ce.find(Ta=>Ta.id===Ye.id&&Ta.loaded))return;if(!f()?.ui_management){if(!Ce.some(Ta=>Ta.id===Ye.id))throw new Error("SheetSage2 is not registered. Add SheetSage2 to server config.");return}const Ft=await v()(Ye);await df({id:Ye.id,path:Ft?.model_path??_()(Ye),family:Ft?.family??Ye.family,task:Ye.task,mode:Ye.mode||"offline",load_options:b()(Ye),session_options:S()(Ye)})}async function Ge(){if(!e(U)||e(D))return;y(D,!0),y(ce,""),y(ee,"Preparing SheetSage2 cover score transcription...");const Ye=e(X);let Ce=null;try{const pt=ct();if(!pt)throw new Error("SheetSage2 is not available in the model catalog.");await Ae(pt),Ce=pt.id,await $()(),y(ee,"Uploading source song...");const Ft=await Gd(e(U));y(ee,"Transcribing source song to ABC with SheetSage2...");const Ta=await Ul({model:pt.id,request:{audio:Ft,options:{}}}),oa=Le(Ta);if(!oa.trim())throw new Error("SheetSage2 did not return an ABC score.");y(fe,oa),he("abc",oa),he("abc_file",""),he("cot","melody"),y(ee,"ABC score imported. Review/edit the sheet before generating the cover."),M()("SheetSage2 cover score imported into Yue2 ABC conditioning.")}catch(pt){y(ce,pt instanceof Error?pt.message:String(pt)),y(ee,""),M()(`SheetSage2 cover transcription failed: ${e(ce)}`)}finally{if(Ye&&Ce){try{f()?.ui_management?await _o(Ce):await xn("/v1/tasks/unload_models",{method:"POST",body:JSON.stringify({model_ids:[Ce]})}),M()("SheetSage2 unloaded after cover transcription.")}catch(pt){const Ft=`SheetSage2 unload failed: ${pt instanceof Error?pt.message:String(pt)}`;y(ce,[e(ce),Ft].filter(Boolean).join(" ")),M()(Ft)}try{await $()()}catch(pt){const Ft=`Model status refresh failed: ${pt instanceof Error?pt.message:String(pt)}`;y(ce,[e(ce),Ft].filter(Boolean).join(" ")),M()(Ft)}}y(D,!1)}}function ne(){y(U,null),e(z)&&Et(z,e(z).value="")}function Je(Ye){y(fe,Ye),he("abc",Ye),Ye.trim()&&he("abc_file","")}async function ue(Ye){const Ce=Ye.trim();if(e(le)){if(!Ce){e(le).replaceChildren(),ge="",y(R,"");return}if(Ce!==ge&&(await js(),!!e(le)))try{we||(we=(await Ml(()=>Promise.resolve().then(()=>EU),void 0,An&&An.tagName.toUpperCase()==="SCRIPT"&&An.src||new URL("_app/immutable/bundle.BpLoWpUY.js",document.baseURI).href)).renderAbc),e(le).replaceChildren(),we(e(le),Ce,{add_classes:!0,responsive:"resize"}),ge=Ce,y(R,"")}catch(pt){e(le).replaceChildren(),ge="",y(R,pt instanceof Error?pt.message:String(pt))}}}Ue(()=>Q(h()),()=>{y(i,pe(j,h()))}),Ue(()=>Q(h()),()=>{y(n,pe(G,h()))}),Ue(()=>Q(h()),()=>{y(s,pe(A,h()))}),Ue(()=>Q(h()),()=>{y(r,pe(B,h()))}),Ue(()=>Q(h()),()=>{y(o,pe(H,h()))}),Ue(()=>(Q(m()),e(fe),e(D)),()=>{String(m().abc||"")!==e(fe)&&!e(D)&&y(fe,String(m().abc||""))}),Ue(()=>e(fe),()=>{ue(e(fe))}),wn(),Zi();var ye=AC(),de=k(ye),be=k(de),xe=k(be),Ie=q(xe),$e=k(Ie,!0);w(Ie),w(be);var ze=q(be,2);sn(ze),w(de);var Fe=q(de,2),qe=k(Fe),rt=k(qe),ot=k(rt),je=q(ot),He=k(je,!0);w(je),w(rt);var Be=q(rt,2);Pt(Be),w(qe);var Re=q(qe,2);Ct(Re,1,()=>e(i),Qt,(Ye,Ce)=>{var pt=bC(),Ft=k(pt),Ta=k(Ft,!0);w(Ft);var oa=q(Ft,2);Ct(oa,5,()=>(e(Ce),x(()=>e(Ce).choices||[])),Qt,(Ot,ka)=>{var Qi=Fb(),Na=k(Qi,!0);w(Qi);var ua={};ie(()=>{W(Na,e(ka)),ua!==(ua=e(ka))&&(Qi.value=(Qi.__value=e(ka))??"")}),J(Ot,Qi)}),w(oa);var ii;Nn(oa);var Ei=q(oa,2);{var ga=Ot=>{var ka=Mb(),Qi=k(ka,!0);w(ka),ie(Na=>W(Qi,Na),[()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"info",N())))]),J(Ot,ka)},$t=Va(()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"info",N()))));ve(Ei,Ot=>{e($t)&&Ot(ga)})}w(pt),ie((Ot,ka)=>{_e(Ft,"for",(e(Ce),x(()=>"param-"+e(Ce).name))),W(Ta,Ot),_e(oa,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),ii!==(ii=ka)&&(oa.value=(oa.__value=ka)??"",kn(oa,ka))},[()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"label",N()))),()=>(Q(m()),e(Ce),x(()=>String(m()[e(Ce).name]??"")))]),re("change",oa,Ot=>C()(e(Ce),Ot.currentTarget.value)),J(Ye,pt)}),w(Fe);var Ze=q(Fe,2);{var Ne=Ye=>{{let Ce=Nt(()=>(Q(m()),x(()=>+!!m().ar_lora+ +!!m().nar_lora)));Am(Ye,{get selected(){return e(Ce)},children:(pt,Ft)=>{var Ta=kC(),oa=ht(Ta);{var ii=ka=>{var Qi=yC(),Na=k(Qi),ua=q(k(Na),2);Pt(ua);var Ra=q(ua,2);Ci(Ra,Ti=>y(E,Ti),()=>e(E));var me=q(Ra,2),De=k(me),ft=k(De,!0);w(De);var Rt=q(De,2);w(me);var $a=q(me,4);{var Oi=Ti=>{var fi=zb(),zn=k(fi,!0);w(fi),ie(()=>W(zn,e(V))),J(Ti,fi)};ve($a,Ti=>{e(V)&&Ti(Oi)})}w(Na);var Z=q(Na,2),Si=q(k(Z),2);Pt(Si),w(Z),w(Qi),ie((Ti,fi)=>{ua.disabled=g()||d(),bi(ua,Ti),Ra.disabled=g()||d(),De.disabled=g()||d(),W(ft,d()?"Uploading...":"Choose AR LoRA"),Rt.disabled=(Q(g()),Q(d()),Q(m()),x(()=>g()||d()||!m().ar_lora)),Si.disabled=(Q(g()),Q(d()),Q(m()),x(()=>g()||d()||!m().ar_lora)),bi(Si,fi)},[()=>(Q(m()),x(()=>String(m().ar_lora??""))),()=>(Q(m()),x(()=>Number(m().ar_lora_scale??1)))]),re("input",ua,Ti=>he("ar_lora",Ti.currentTarget.value.trim())),re("change",Ra,Ti=>F(Ti.currentTarget.files?.[0]||null,"ar")),re("click",De,()=>e(E)?.click()),re("click",Rt,()=>{he("ar_lora",""),y(V,"")}),re("change",Si,Ti=>{Number.isFinite(Ti.currentTarget.valueAsNumber)&&he("ar_lora_scale",Ti.currentTarget.valueAsNumber)}),J(ka,Qi)},Ei=Va(()=>x(()=>Te("ar_lora")));ve(oa,ka=>{e(Ei)&&ka(ii)})}var ga=q(oa,2);{var $t=ka=>{var Qi=wC(),Na=ht(Qi),ua=k(Na),Ra=q(k(ua),2);Pt(Ra);var me=q(Ra,2);Ci(me,fi=>y(O,fi),()=>e(O));var De=q(me,2),ft=k(De),Rt=k(ft,!0);w(ft);var $a=q(ft,2);w(De);var Oi=q(De,2);{var Z=fi=>{var zn=zb(),Hn=k(zn,!0);w(zn),ie(()=>W(Hn,e(L))),J(fi,zn)};ve(Oi,fi=>{e(L)&&fi(Z)})}zt(2),w(ua);var Si=q(ua,2),Ti=q(k(Si),2);Pt(Ti),w(Si),w(Na),zt(2),ie((fi,zn)=>{Ra.disabled=g()||d(),bi(Ra,fi),me.disabled=g()||d(),ft.disabled=g()||d(),W(Rt,d()?"Uploading...":"Choose NAR LoRA"),$a.disabled=(Q(g()),Q(d()),Q(m()),x(()=>g()||d()||!m().nar_lora)),Ti.disabled=(Q(g()),Q(m()),x(()=>g()||!m().nar_lora)),bi(Ti,zn)},[()=>(Q(m()),x(()=>String(m().nar_lora??""))),()=>(Q(m()),x(()=>Number(m().nar_lora_scale??1)))]),re("input",Ra,fi=>he("nar_lora",fi.currentTarget.value.trim())),re("change",me,fi=>F(fi.currentTarget.files?.[0]||null,"nar")),re("click",ft,()=>e(O)?.click()),re("click",$a,()=>{he("nar_lora",""),y(L,"")}),re("change",Ti,fi=>{Number.isFinite(fi.currentTarget.valueAsNumber)&&he("nar_lora_scale",fi.currentTarget.valueAsNumber)}),J(ka,Qi)},Ot=Va(()=>x(()=>Te("nar_lora")));ve(ga,ka=>{e(Ot)&&ka($t)})}J(pt,Ta)},$$slots:{default:!0}})}},Ve=Va(()=>x(()=>Te("ar_lora")||Te("nar_lora")));ve(Ze,Ye=>{e(Ve)&&Ye(Ne)})}var gt=q(Ze,2);Ct(gt,5,()=>e(n),Qt,(Ye,Ce)=>{var pt=TC();let Ft;var Ta=k(pt),oa=k(Ta,!0);w(Ta);var ii=q(Ta,2);{var Ei=Na=>{var ua=xC();Ct(ua,5,()=>(e(Ce),x(()=>e(Ce).choices||[])),Qt,(me,De)=>{var ft=Fb(),Rt=k(ft,!0);w(ft);var $a={};ie(()=>{W(Rt,e(De)),$a!==($a=e(De))&&(ft.value=(ft.__value=e(De))??"")}),J(me,ft)}),w(ua);var Ra;Nn(ua),ie(me=>{_e(ua,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),Ra!==(Ra=me)&&(ua.value=(ua.__value=me)??"",kn(ua,me))},[()=>(Q(m()),e(Ce),x(()=>String(m()[e(Ce).name]??"")))]),re("change",ua,me=>C()(e(Ce),me.currentTarget.value)),J(Na,ua)},ga=Na=>{var ua=Mm(),Ra=k(ua);Pt(Ra);var me=q(Ra,2),De=k(me,!0);w(me),w(ua),ie((ft,Rt)=>{_e(Ra,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(Ra,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(Ra,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(Ra,"step",(e(Ce),x(()=>e(Ce).step))),bi(Ra,ft),W(De,Rt)},[()=>(Q(m()),e(Ce),x(()=>Number(m()[e(Ce).name]??e(Ce).default))),()=>(Q(m()),e(Ce),x(()=>String(m()[e(Ce).name])))]),re("input",Ra,ft=>C()(e(Ce),ft.currentTarget.valueAsNumber)),J(Na,ua)},$t=Na=>{var ua=SC();Pt(ua),ie((Ra,me)=>{_e(ua,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(ua,"type",(e(Ce),x(()=>e(Ce).type==="number"?"number":"text"))),_e(ua,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(ua,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(ua,"step",(e(Ce),x(()=>e(Ce).step))),bi(ua,Ra),_e(ua,"placeholder",me)},[()=>(Q(m()),e(Ce),x(()=>String(m()[e(Ce).name]??""))),()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"placeholder",N())))]),re("input",ua,Ra=>C()(e(Ce),e(Ce).type==="number"?Ra.currentTarget.valueAsNumber:Ra.currentTarget.value)),J(Na,ua)};ve(ii,Na=>{e(Ce),x(()=>e(Ce).type==="choice")?Na(Ei):(e(Ce),x(()=>e(Ce).type==="slider")?Na(ga,1):Na($t,-1))})}var Ot=q(ii,2);{var ka=Na=>{var ua=Mb(),Ra=k(ua,!0);w(ua),ie(me=>W(Ra,me),[()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"info",N())))]),J(Na,ua)},Qi=Va(()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"info",N()))));ve(Ot,Na=>{e(Qi)&&Na(ka)})}w(pt),ie(Na=>{Ft=ya(pt,1,"yue2-field svelte-15djq8z",null,Ft,{wide:e(Ce).type==="text"}),_e(Ta,"for",(e(Ce),x(()=>"param-"+e(Ce).name))),W(oa,Na)},[()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"label",N())))]),J(Ye,pt)}),w(gt);var _t=q(gt,2),at=k(_t),wt=q(k(at)),Ke=k(wt,!0);w(wt),w(at);var ut=q(at,2),nt=k(ut),Lt=k(nt),Gt=q(k(Lt),2),jt=k(Gt,!0);w(Gt),w(Lt);var za=q(Lt,2),sa=k(za);Pt(sa),zt(2),w(za);var wa=q(za,4);Ci(wa,Ye=>y(z,Ye),()=>e(z));var Fa=q(wa,2),ln=q(k(Fa),2),Kt=k(ln,!0);w(ln),w(Fa);var St=q(Fa,2),ea=k(St),da=q(ea,2);{var wi=Ye=>{var Ce=$C(),pt=k(Ce,!0);w(Ce),ie(()=>W(pt,e(ee))),J(Ye,Ce)};ve(da,Ye=>{e(ee)&&Ye(wi)})}var ma=q(da,2);{var hi=Ye=>{var Ce=Eb(),pt=k(Ce,!0);w(Ce),ie(()=>W(pt,e(ce))),J(Ye,Ce)};ve(ma,Ye=>{e(ce)&&Ye(hi)})}w(St);var zi=q(St,2);{let Ye=Nt(()=>(Q(N()),x(()=>N()("file.preview"))));ss(zi,{get file(){return e(U)},kind:"audio",get label(){return e(Ye)}})}w(nt);var ui=q(nt,2),hn=q(k(ui),2);sn(hn);var Ai=q(hn,2);{var Vi=Ye=>{var Ce=qC(),pt=k(Ce),Ft=k(pt,!0);w(pt);var Ta=q(pt,2);Pt(Ta),w(Ce),ie((oa,ii,Ei)=>{W(Ft,oa),bi(Ta,ii),_e(Ta,"placeholder",Ei)},[()=>(Q(P()),Q(N()),x(()=>P()(Te("abc_file"),"label",N()))),()=>(Q(m()),x(()=>String(m().abc_file??""))),()=>(Q(P()),Q(N()),x(()=>P()(Te("abc_file"),"placeholder",N())))]),re("input",Ta,oa=>he("abc_file",oa.currentTarget.value)),J(Ye,Ce)},_n=Va(()=>x(()=>Te("abc_file")));ve(Ai,Ye=>{e(_n)&&Ye(Vi)})}w(ui);var Ni=q(ui,2),Hi=q(k(Ni),2),Wi=k(Hi);{var Qa=Ye=>{var Ce=CC();J(Ye,Ce)},Zn=Va(()=>(e(fe),x(()=>!e(fe).trim())));ve(Wi,Ye=>{e(Zn)&&Ye(Qa)})}w(Hi),Ci(Hi,Ye=>y(le,Ye),()=>e(le));var Vn=q(Hi,2);{var ls=Ye=>{var Ce=Eb(),pt=k(Ce,!0);w(Ce),ie(()=>W(pt,e(R))),J(Ye,Ce)};ve(Vn,Ye=>{e(R)&&Ye(ls)})}w(Ni),w(ut),w(_t);var Qe=q(_t,2),Ut=k(Qe),ja=q(k(Ut)),ai=k(ja,!0);w(ja),w(Ut);var oi=q(Ut,2);Ct(oi,5,()=>e(r),Qt,(Ye,Ce)=>{var pt=Rb(),Ft=k(pt),Ta=k(Ft,!0);w(Ft);var oa=q(Ft,2);{var ii=ga=>{var $t=Mm(),Ot=k($t);Pt(Ot);var ka=q(Ot,2),Qi=k(ka,!0);w(ka),w($t),ie((Na,ua)=>{_e(Ot,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(Ot,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(Ot,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(Ot,"step",(e(Ce),x(()=>e(Ce).step))),bi(Ot,Na),W(Qi,ua)},[()=>(Q(m()),e(Ce),x(()=>Number(m()[e(Ce).name]??e(Ce).default))),()=>(Q(m()),e(Ce),x(()=>String(m()[e(Ce).name])))]),re("input",Ot,Na=>C()(e(Ce),Na.currentTarget.valueAsNumber)),J(ga,$t)},Ei=ga=>{var $t=Ub();Pt($t),ie(Ot=>{_e($t,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e($t,"min",(e(Ce),x(()=>e(Ce).minimum))),_e($t,"max",(e(Ce),x(()=>e(Ce).maximum))),_e($t,"step",(e(Ce),x(()=>e(Ce).step))),bi($t,Ot)},[()=>(Q(m()),e(Ce),x(()=>String(m()[e(Ce).name]??"")))]),re("input",$t,Ot=>C()(e(Ce),Ot.currentTarget.valueAsNumber)),J(ga,$t)};ve(oa,ga=>{e(Ce),x(()=>e(Ce).type==="slider")?ga(ii):ga(Ei,-1)})}w(pt),ie(ga=>{_e(Ft,"for",(e(Ce),x(()=>"param-"+e(Ce).name))),W(Ta,ga)},[()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"label",N())))]),J(Ye,pt)}),w(oi),w(Qe);var ta=q(Qe,2),_i=k(ta),Ja=q(k(_i)),va=k(Ja,!0);w(Ja),w(_i);var Ea=q(_i,2);Ct(Ea,5,()=>e(o),Qt,(Ye,Ce)=>{var pt=Rb(),Ft=k(pt),Ta=k(Ft,!0);w(Ft);var oa=q(Ft,2);{var ii=ga=>{var $t=Mm(),Ot=k($t);Pt(Ot);var ka=q(Ot,2),Qi=k(ka,!0);w(ka),w($t),ie((Na,ua)=>{_e(Ot,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e(Ot,"min",(e(Ce),x(()=>e(Ce).minimum))),_e(Ot,"max",(e(Ce),x(()=>e(Ce).maximum))),_e(Ot,"step",(e(Ce),x(()=>e(Ce).step))),bi(Ot,Na),W(Qi,ua)},[()=>(Q(m()),e(Ce),x(()=>Number(m()[e(Ce).name]??e(Ce).default))),()=>(Q(m()),e(Ce),x(()=>String(m()[e(Ce).name])))]),re("input",Ot,Na=>C()(e(Ce),Na.currentTarget.valueAsNumber)),J(ga,$t)},Ei=ga=>{var $t=Ub();Pt($t),ie(Ot=>{_e($t,"id",(e(Ce),x(()=>"param-"+e(Ce).name))),_e($t,"min",(e(Ce),x(()=>e(Ce).minimum))),_e($t,"max",(e(Ce),x(()=>e(Ce).maximum))),_e($t,"step",(e(Ce),x(()=>e(Ce).step))),bi($t,Ot)},[()=>(Q(m()),e(Ce),x(()=>String(m()[e(Ce).name]??"")))]),re("input",$t,Ot=>C()(e(Ce),Ot.currentTarget.valueAsNumber)),J(ga,$t)};ve(oa,ga=>{e(Ce),x(()=>e(Ce).type==="slider")?ga(ii):ga(Ei,-1)})}w(pt),ie(ga=>{_e(Ft,"for",(e(Ce),x(()=>"param-"+e(Ce).name))),W(Ta,ga)},[()=>(Q(P()),e(Ce),Q(N()),x(()=>P()(e(Ce),"label",N())))]),J(Ye,pt)}),w(Ea),w(ta),w(ye),ie((Ye,Ce,pt,Ft,Ta)=>{W(xe,`${Ye??""} `),W($e,Ce),W(ot,`${pt??""} `),W(He,Ft),W(Ke,(e(s),x(()=>e(s).length))),Gt.disabled=!e(U)||e(D),W(jt,e(D)?"Transcribing...":"Extract ABC"),Cl(sa,e(X)),sa.disabled=e(D),W(Kt,Ta),ea.disabled=!e(U)||e(D),bi(hn,e(fe)),W(ai,(e(r),x(()=>e(r).length))),W(va,(e(o),x(()=>e(o).length)))},[()=>(Q(N()),x(()=>N()("request.lyrics"))),()=>(Q(N()),x(()=>N()("request.optional"))),()=>(Q(N()),x(()=>N()("request.seed"))),()=>(Q(N()),x(()=>N()("request.randomSeed"))),()=>(e(U),Q(N()),x(()=>e(U)?.name||N()("file.none")))]),Sa(ze,l),Sa(Be,c),re("click",Gt,Ge),re("change",sa,Ye=>{y(X,Ye.currentTarget.checked),localStorage.setItem(K,String(e(X)))}),re("change",wa,Ye=>y(U,Ye.currentTarget.files?.[0]||null)),re("click",ea,ne),re("input",hn,Ye=>Je(Ye.currentTarget.value)),J(a,ye),Mi()}var FC=ae(""),MC=ae(' ',1),zC=ae(''),EC=ae('
        ');function Bb(a,t){Fi(t,!1);let i=Se(t,"id",8),n=Se(t,"file",12,null),s=Se(t,"transcript",12,""),r=Se(t,"busy",8,!1),o=Se(t,"savedVoices",24,()=>[]),l=Y("");function c(C){y(l,C);const j=o().find(G=>G.id===C);j&&(n(new File([j.audio],`${j.name}.wav`,{type:j.audio.type||"audio/wav"})),s(j.transcript))}Zi();var d=EC(),g=k(d);{var h=C=>{var j=MC(),G=ht(j),A=q(G,2),B=k(A);B.value=B.__value="";var H=q(B);Ct(H,1,o,Qt,(E,O)=>{var V=FC(),L=k(V,!0);w(V);var T={};ie(()=>{W(L,(e(O),x(()=>e(O).name))),T!==(T=(e(O),x(()=>e(O).id)))&&(V.value=(V.__value=(e(O),x(()=>e(O).id)))??"")}),J(E,V)}),w(A);var U;Nn(A),ie(()=>{_e(G,"for",`${i()}-library`),_e(A,"id",`${i()}-library`),A.disabled=r(),U!==(U=e(l))&&(A.value=(A.__value=e(l))??"",kn(A,e(l)))}),re("change",A,E=>c(E.currentTarget.value)),J(C,j)};ve(g,C=>{Q(o()),x(()=>o().length)&&C(h)})}var m=q(g,2),p=k(m),u=q(p,2);{var f=C=>{var j=zC(),G=k(j);rb(G,{size:14}),w(j),ie(()=>j.disabled=r()),re("click",j,()=>{n(null),y(l,"")}),J(C,j)};ve(u,C=>{n()&&C(f)})}w(m);var _=q(m,2),v=q(_,2),b=k(v);bS(b,{size:17});var S=q(b,2),$=k(S,!0);w(S),w(v);var M=q(v,2);ss(M,{get file(){return n()},kind:"audio",label:"Reference preview"});var N=q(M,2),P=q(N,2);sn(P),w(d),ie(()=>{_e(p,"for",`${i()}-audio`),_e(_,"id",`${i()}-audio`),_.disabled=r(),_e(v,"for",`${i()}-audio`),W($,(Q(n()),x(()=>n()?.name||"No recording selected"))),_e(N,"for",`${i()}-transcript`),_e(P,"id",`${i()}-transcript`),P.disabled=r()}),re("change",_,C=>{n(C.currentTarget.files?.[0]||null),y(l,""),C.currentTarget.value=""}),Sa(P,s),J(a,d),Mi()}var UC=ae('

        Reference voice (optional)

        Text to generate

        ',1),RC=ae(''),BC=ae('
        ',1),PC=ae(""),jC=ae('
        '),NC=ae('

        Multi-speaker generation is still under testing. Voice assignment and consistency may vary.

        Cast

        Dialogue

        ',1),OC=ae('
        ');function IC(a,t){Fi(t,!1);const i=Y(),n=Y();let s=Se(t,"busy",8,!1),r=Se(t,"savedVoices",24,()=>[]),o=Se(t,"setPanelRunner",8,()=>()=>{});const l=16,c=L=>({id:L,name:`Speaker ${L+1}`,file:null,transcript:""});let d=Y("single"),g=Y(null),h=Y(""),m=Y(""),p=Y([c(0),c(1)]),u=Y(0),f=2,_=Y([{id:0,speaker:0,text:""},{id:1,speaker:1,text:""}]);function v(){const L=Array.from({length:l},(T,F)=>F).find(T=>!e(p).some(F=>F.id===T));L!==void 0&&(y(p,[...e(p),c(L)]),y(u,L))}function b(L){y(p,e(p).filter(T=>T.id!==L)),y(u,e(p)[0].id)}function S(L,T){const F=[...e(_)];[F[L],F[L+T]]=[F[L+T],F[L]],y(_,F)}function $(){y(_,[...e(_),{id:f++,speaker:e(u),text:""}])}function M(){e(d)==="single"?y(m,"The observatory opens at sunset. Tonight, we will follow the planets across the sky and listen for the first signs of a coming storm."):y(_,[{id:f++,speaker:e(p)[0].id,text:"The observatory opens at sunset. Did you bring the star charts?"},{id:f++,speaker:e(p)[1].id,text:"Yes, and the sky is finally clear. We should have a wonderful view tonight."}])}async function N(L){const T=e(d)==="single",F=e(p).map(le=>({...le})),z=e(_).map(le=>({...le})),D=e(g),K=e(h).trim();let X=e(m).trim();if(T){if(D&&!K)throw L.warning("Enter the words spoken in the reference recording.");if(!X)throw L.warning("Enter the text to generate.")}else{if(!z.length||z.some(ge=>!ge.text.trim()))throw L.warning("Enter text for every dialogue turn, or remove the empty turns.");const le=new Set(z.map(ge=>ge.speaker));if(le.size<2)throw L.warning("Assign dialogue to at least two different speakers.");for(const ge of F.filter(R=>le.has(R.id)))if(!ge.file||!ge.transcript.trim())throw y(u,ge.id),L.warning(`${ge.name}: add a reference recording and its exact transcript.`);X=z.map(ge=>`<|speaker:${ge.speaker}|> ${ge.text.trim()}`).join(` +`)}await L.ensureLoaded("offline");const ee={...L.options},ce={model:L.modelId,input:X,seed:L.seed,response_format:"wav",options:ee};if(L.maxTokens!==void 0&&(ce.max_tokens=L.maxTokens),T)D&&(L.setStatus("Preparing voice reference..."),ce.voice_ref=await hr(await Gr(D),L.signal),ce.reference_text=K);else{L.setStatus("Preparing voice references...");const le=new Set(z.map(R=>R.speaker)),ge=[];for(const R of F.filter(we=>le.has(we.id))){const we=await Gr(R.file);ge.push({text:`<|speaker:${R.id}|> ${R.transcript.trim()}`,audio_path:await hr(we,L.signal)})}ee.multi_reference_cond=JSON.stringify(ge)}L.setStatus(T?D?"Cloning voice...":"Generating speech...":"Generating multi-speaker dialogue...");const fe=await ff(ce,L.signal);return{audio:fe.blob,text:"",json:JSON.stringify({mode:T?D?"single_voice_clone":"tts":"multi_speaker",speakers:T?1:new Set(z.map(le=>le.speaker)).size,seed:L.seed,text_chunk_size:ee.text_chunk_size,wall_ms:fe.wallMs,rtf:fe.rtf},null,2)}}Jn(()=>o()(N)),Ue(()=>(e(p),e(u)),()=>{y(i,e(p).findIndex(L=>L.id===e(u)))}),Ue(()=>e(p),()=>{y(n,e(p).filter(L=>L.file&&L.transcript.trim()).length)}),wn(),Zi();var P=OC(),C=k(P),j=k(C);let G;var A=k(j);lf(A,{size:17}),zt(),w(j);var B=q(j,2);let H;var U=k(B);El(U,{size:17}),zt(2),w(B),w(C);var E=q(C,2);{var O=L=>{var T=UC(),F=ht(T),z=k(F),D=k(z);lf(D,{size:17}),zt(),w(z);var K=q(z,2);Bb(K,{id:"drama-single",get busy(){return s()},get savedVoices(){return r()},get file(){return e(g)},set file(pe){y(g,pe)},get transcript(){return e(h)},set transcript(pe){y(h,pe)},$$legacy:!0}),w(F);var X=q(F,2),ee=k(X),ce=k(ee),fe=k(ce);Cd(fe,{size:17}),zt(),w(ce);var le=q(ce,2);w(ee);var ge=q(ee,4);sn(ge);var R=q(ge,2),we=k(R);w(R),w(X),ie(pe=>{le.disabled=s(),ge.disabled=s(),W(we,`${pe??""} characters`)},[()=>(e(m),x(()=>e(m).length.toLocaleString()))]),re("click",le,M),Sa(ge,()=>e(m),pe=>y(m,pe)),J(L,T)},V=L=>{var T=NC(),F=q(ht(T),2),z=k(F),D=k(z),K=k(D);El(K,{size:17});var X=q(K,2),ee=k(X);w(X),w(D);var ce=q(D,2),fe=k(ce);Dr(fe,{size:15}),zt(),w(ce),w(z);var le=q(z,2),ge=k(le);Ct(ge,5,()=>e(p),de=>de.id,(de,be)=>{var xe=RC();let Ie;var $e=k(xe),ze=k($e,!0);w($e);var Fe=q($e),qe=k(Fe,!0);w(Fe);var rt=q(Fe,2);{var ot=He=>{vm(He,{size:14,"aria-label":"Reference ready"})},je=Va(()=>(e(be),x(()=>e(be).file&&e(be).transcript.trim())));ve(rt,He=>{e(je)&&He(ot)})}w(xe),ie(()=>{xe.disabled=s(),_e(xe,"aria-pressed",(e(u),e(be),x(()=>e(u)===e(be).id))),Ie=ya(xe,1,"svelte-z6u13w",null,Ie,{chosen:e(u)===e(be).id}),W(ze,(e(be),x(()=>e(be).id+1))),W(qe,(e(be),x(()=>e(be).name)))}),re("click",xe,()=>y(u,e(be).id)),J(de,xe)}),w(ge);var R=q(ge,2),we=k(R);sv(we,()=>e(u),de=>{var be=BC(),xe=ht(be),Ie=k(xe),$e=q(k(Ie));Pt($e),w(Ie);var ze=q(Ie,2),Fe=k(ze);ho(Fe,{size:16}),w(ze),w(xe);var qe=q(xe,2);{let rt=Nt(()=>`drama-speaker-${e(u)}`);Bb(qe,{get id(){return e(rt)},get busy(){return s()},get savedVoices(){return r()},get file(){return e(p)[e(i)].file},set file(ot){Et(p,e(p)[e(i)].file=ot)},get transcript(){return e(p)[e(i)].transcript},set transcript(ot){Et(p,e(p)[e(i)].transcript=ot)},$$legacy:!0})}ie((rt,ot)=>{$e.disabled=s(),_e(ze,"title",rt),ze.disabled=ot},[()=>(e(_),e(u),x(()=>e(_).some(rt=>rt.speaker===e(u))?"Reassign or remove this speaker's dialogue first":"Remove speaker")),()=>(Q(s()),e(p),e(_),e(u),x(()=>s()||e(p).length<=2||e(_).some(rt=>rt.speaker===e(u))))]),Sa($e,()=>e(p)[e(i)].name,rt=>Et(p,e(p)[e(i)].name=rt)),re("click",ze,()=>b(e(u))),J(de,be)}),w(R),w(le);var pe=q(le,2),Te=k(pe);w(pe),w(F);var he=q(F,2),Pe=k(he),Le=k(Pe),ct=k(Le);Cd(ct,{size:17});var Ae=q(ct,2),Ge=k(Ae);w(Ae),w(Le);var ne=q(Le,2);w(Pe);var Je=q(Pe,2);Ct(Je,7,()=>e(_),de=>de.id,(de,be,xe)=>{var Ie=jC(),$e=k(Ie),ze=k($e),Fe=k(ze,!0);w(ze);var qe=q(ze,2),rt=k(qe);w(qe);var ot=q(qe,2);Ct(ot,5,()=>e(p),Qt,(wt,Ke)=>{var ut=PC(),nt=k(ut,!0);w(ut);var Lt={};ie(()=>{W(nt,(e(Ke),x(()=>e(Ke).name))),Lt!==(Lt=(e(Ke),x(()=>e(Ke).id)))&&(ut.value=(ut.__value=(e(Ke),x(()=>e(Ke).id)))??"")}),J(wt,ut)}),w(ot);var je=q(ot,2),He=k(je),Be=k(He);Xv(Be,{size:14}),w(He);var Re=q(He,2),Ze=k(Re);Jv(Ze,{size:14}),w(Re);var Ne=q(Re,2),Ve=k(Ne);ho(Ve,{size:14}),w(Ne),w(je),w($e);var gt=q($e,2),_t=k(gt);w(gt);var at=q(gt,2);sn(at),w(Ie),ie(wt=>{W(Fe,wt),_e(qe,"for",(e(be),x(()=>`drama-line-speaker-${e(be).id}`))),W(rt,`Turn ${e(xe)+1} speaker`),_e(ot,"id",(e(be),x(()=>`drama-line-speaker-${e(be).id}`))),ot.disabled=s(),He.disabled=s()||e(xe)===0,Re.disabled=(Q(s()),Q(e(xe)),e(_),x(()=>s()||e(xe)===e(_).length-1)),Ne.disabled=s(),_e(gt,"for",(e(be),x(()=>`drama-line-${e(be).id}`))),W(_t,`Turn ${e(xe)+1} text`),_e(at,"id",(e(be),x(()=>`drama-line-${e(be).id}`))),at.disabled=s()},[()=>(Q(e(xe)),x(()=>String(e(xe)+1).padStart(2,"0")))]),ur(ot,()=>e(be).speaker,wt=>(e(be).speaker=wt,Yi(()=>e(_)),Yi(()=>{s(),e(p)}))),re("click",He,()=>S(e(xe),-1)),re("click",Re,()=>S(e(xe),1)),re("click",Ne,()=>y(_,e(_).filter(wt=>wt.id!==e(be).id))),Sa(at,()=>e(be).text,wt=>(e(be).text=wt,Yi(()=>e(_)),Yi(()=>{s(),e(p)}))),J(de,Ie)}),w(Je);var ue=q(Je,2),ye=k(ue);Dr(ye,{size:15}),zt(),w(ue),w(he),ie(()=>{W(ee,`${e(p),x(()=>e(p).length)??""} / 16`),ce.disabled=(Q(s()),e(p),x(()=>s()||e(p).length>=l)),W(Te,`${e(n)??""} of ${e(p),x(()=>e(p).length)??""} references ready`),W(Ge,`${e(_),x(()=>e(_).length)??""} turns`),ne.disabled=s(),ue.disabled=s()}),re("click",ce,v),re("click",ne,M),re("click",ue,$),J(L,T)};ve(E,L=>{e(d)==="single"?L(O):L(V,-1)})}w(P),ie(()=>{_e(j,"aria-pressed",e(d)==="single"),j.disabled=s(),G=ya(j,1,"svelte-z6u13w",null,G,{chosen:e(d)==="single"}),_e(B,"aria-pressed",e(d)==="multi"),B.disabled=s(),H=ya(B,1,"svelte-z6u13w",null,H,{chosen:e(d)==="multi"})}),re("click",j,()=>y(d,"single")),re("click",B,()=>y(d,"multi")),J(a,P),Mi()}function We(a){if(!a)throw new Error("Assertion failed.")}const DC=Math.PI/180,zm=180/Math.PI,bf=a=>{const t=(a%360+360)%360;if(t===0||t===90||t===180||t===270)return t;throw new Error(`Invalid rotation ${a}.`)},Pb=[1,0,0,0,1,0,0,0,1],LC=(a,t,i)=>{const[n,s,,r,o]=a,l=Math.abs(n)*t+Math.abs(r)*i,c=Math.abs(s)*t+Math.abs(o)*i;return yf(yf(Nb(-t/2,-i/2),a),Nb(l/2,c/2))},VC=a=>{const[t,i]=a,n=Math.atan2(i,HC(a)?-t:t);return bf(Rm(n*zm,90))},HC=a=>{const[t,i,,n,s]=a;return t*s-i*n<0},jb=a=>{const t=a*DC,i=Math.round(Math.cos(t)),n=Math.round(Math.sin(t));return[i,n,0,-n,i,0,0,0,1]},Nb=(a,t)=>[1,0,0,0,1,0,a,t,1],WC=(a,t)=>[a,0,0,0,t,0,0,0,1],yf=(a,t)=>{const i=new Array(9);for(let n=0;n<3;n++)for(let s=0;s<3;s++)i[3*n+s]=a[3*n]*t[s]+a[3*n+1]*t[3+s]+a[3*n+2]*t[6+s];return i},QC=(a,t,i,n)=>({rotation:bf(a+(t?-i:i)),flip:t!==n}),Fr=a=>a&&a[a.length-1],vo=a=>a>=0&&a<2**32,KC=a=>a>=-2147483648&&a<2**31,bt=a=>{let t=0;for(;a.readBits(1)===0&&t<32;)t++;if(t>=32)throw new Error("Invalid exponential-Golomb code.");return(1<{const t=bt(a);return(t&1)===0?-(t>>1):t+1>>1},YC=(a,t,i,n)=>{for(let s=t;s>i-s-1<a.constructor===Uint8Array?a:ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a),Lr=a=>a.constructor===DataView?a:ArrayBuffer.isView(a)?new DataView(a.buffer,a.byteOffset,a.byteLength):new DataView(a),JC=typeof globalThis.TextEncoder<"u"?globalThis.TextEncoder:class{constructor(){this.encoding="utf-8"}encode(t=""){const i=new Uint8Array(3*t.length);let n=0;for(let s=0;s>6,i[n++]=128|r&63;else if(r<55296||r>57343)i[n++]=224|r>>12,i[n++]=128|r>>6&63,i[n++]=128|r&63;else{const o=s+1=56320&&o<=57343?(r=65536+(r-55296<<10)+(o-56320),s++,i[n++]=240|r>>18,i[n++]=128|r>>12&63,i[n++]=128|r>>6&63,i[n++]=128|r&63):(i[n++]=239,i[n++]=191,i[n++]=189)}}return i.slice(0,n)}},ws=new JC,Rd={bt709:1,bt470bg:5,smpte170m:6,bt2020:9,smpte432:12},Bd={bt709:1,smpte170m:6,linear:8,"iec61966-2-1":13,pq:16,hlg:18},Pd={rgb:0,bt709:1,bt470bg:5,smpte170m:6,"bt2020-ncl":9},Ob=a=>!a||a.primaries==null&&a.transfer==null&&a.matrix==null&&a.fullRange==null,wf=a=>a instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&a instanceof SharedArrayBuffer||ArrayBuffer.isView(a);class Ib{constructor(){this.currentPromise=Promise.resolve(),this.pending=0}async acquire(){let t;const i=new Promise(s=>{let r=!1;t=()=>{r||(s(),this.pending--,r=!0)}}),n=this.currentPromise;return this.currentPromise=i,this.pending++,await n,t}}const Db=(a,t,i)=>{let n=0,s=a.length-1,r=-1;for(;n<=s;){const o=n+(s-n+1)/2|0;i(a[o])<=t?(r=o,n=o+1):s=o-1}return r},Em=()=>{let a,t;return{promise:new Promise((n,s)=>{a=n,t=s}),resolve:a,reject:t}},yo=a=>{throw new Error(`Unexpected value: ${a}`)},XC=(a,t,i)=>{const n=a.getUint8(t),s=a.getUint8(t+1),r=a.getUint8(t+2);return n<<16|s<<8|r},Um=(a,t,i,n)=>{i=i>>>0,i=i&16777215,n?(a.setUint8(t,i&255),a.setUint8(t+1,i>>>8&255),a.setUint8(t+2,i>>>16&255)):(a.setUint8(t,i>>>16&255),a.setUint8(t+1,i>>>8&255),a.setUint8(t+2,i&255))},ZC=(a,t,i,n)=>{i=rs(i,-8388608,8388607),i<0&&(i=i+16777216&16777215),Um(a,t,i,n)},rs=(a,t,i)=>Math.max(t,Math.min(i,a)),eA=(a,t,i)=>a+(t-a)*i,Lb="und",Rm=(a,t)=>Math.round(a/t)*t,kf=(a,t)=>Math.round(a*t)/t,Vb=(a,t)=>Math.floor(a*t)/t,tA=a=>{let t=0;for(;a!==0;)a&=a-1,t++;return t},aA=/^[a-z]{3}$/,iA=a=>aA.test(a),Vo=1e6*(1+Number.EPSILON),nA=(a,t)=>{const i=a<0?-1:1;a=Math.abs(a);let n=0,s=1,r=1,o=0,l=a;for(;;){const c=Math.floor(l),d=c*r+n,g=c*o+s;if(g>t)return{num:i*r,den:o};if(n=r,s=o,r=d,o=g,l=1/(l-c),!isFinite(l))break}return{num:i*r,den:o}};class Hb{constructor(){this.currentPromise=Promise.resolve()}call(t){return this.currentPromise=this.currentPromise.then(t)}}let Bm=null;const sA=()=>Bm!==null?Bm:Bm=!!(typeof navigator<"u"&&(navigator.vendor?.match(/apple/i)||/AppleWebKit/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)||/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)));let Pm=null;const Wb=()=>Pm!==null?Pm:Pm=typeof navigator<"u"&&navigator.userAgent?.includes("Firefox");let jm=null;const rA=()=>jm!==null?jm:jm=!!(typeof navigator<"u"&&(navigator.vendor?.includes("Google Inc")||/Chrome/.test(navigator.userAgent))),Qb=a=>typeof globalThis.isSecureContext<"u"&&!globalThis.isSecureContext?`${a} is not available in this environment; this may be because this page is running in an insecure context. Try serving your page over HTTPS or use localhost.`:`${a} is not available in this environment.`,oA=(async()=>{})().constructor,Ho=a=>a instanceof oA||a instanceof Promise?!0:typeof a?.then=="function",Nm=function*(a){for(const t in a){const i=a[t];i!==void 0&&(yield{key:t,value:i})}},lA=a=>{switch(a.toLowerCase()){case"image/jpeg":case"image/jpg":return".jpg";case"image/png":return".png";case"image/gif":return".gif";case"image/webp":return".webp";case"image/bmp":return".bmp";case"image/svg+xml":return".svg";case"image/tiff":return".tiff";case"image/avif":return".avif";case"image/x-icon":case"image/vnd.microsoft.icon":return".ico";default:return null}},cA=(a,t)=>{if(a.length!==t.length)return!1;for(let i=0;i{Symbol.dispose??=Symbol("Symbol.dispose")},Kb=a=>typeof a=="number"&&!Number.isNaN(a),uA=(a,t)=>{let i=-1,n=1/0;for(let s=0;s{We(Number.isInteger(a.num)),We(Number.isInteger(a.den)),We(a.den!==0);let t=Math.abs(a.num),i=Math.abs(a.den);for(;i!==0;){const s=t%i;t=i,i=s}const n=t||1;return{num:a.num/n,den:a.den/n}},Im=(a,t)=>{if(typeof a!="object"||!a)throw new TypeError(`${t} must be an object.`);if(!Number.isInteger(a.left)||a.left<0)throw new TypeError(`${t}.left must be a non-negative integer.`);if(!Number.isInteger(a.top)||a.top<0)throw new TypeError(`${t}.top must be a non-negative integer.`);if(!Number.isInteger(a.width)||a.width<0)throw new TypeError(`${t}.width must be a non-negative integer.`);if(!Number.isInteger(a.height)||a.height<0)throw new TypeError(`${t}.height must be a non-negative integer.`)},fA=a=>new Promise(t=>setTimeout(t,a)),Yb=a=>Array.isArray(a)?a:[a];class Dm{constructor(){this._listeners=new Map}on(t,i,n){this._listeners.has(t)||this._listeners.set(t,new Set);const s={fn:i,once:n?.once??!1};return this._listeners.get(t).add(s),()=>{this._listeners.get(t)?.delete(s)}}_emit(...t){const[i,n]=t,s=this._listeners.get(i);if(s)for(const r of s){try{r.fn(n)}catch(o){console.error(o)}r.once&&s.delete(r)}}}const pA=a=>a!==null&&typeof a=="object"&&Object.getPrototypeOf(a)===Object.prototype&&Object.values(a).every(t=>typeof t=="string");var Vr;(function(a){a[a.Silent=0]="Silent",a[a.Errors=1]="Errors",a[a.Warnings=2]="Warnings",a[a.Info=3]="Info"})(Vr||(Vr={}));class mn{constructor(){}static get level(){return mn._level}static set level(t){if(t!==Vr.Silent&&t!==Vr.Errors&&t!==Vr.Warnings&&t!==Vr.Info)throw new TypeError("Invalid log level. Use one of the values of the LogLevel enum.");mn._level=t}static get _emitter(){return mn._emitterInstance??=new Dm}static on(t,i,n){return mn._emitter.on(t,i,n)}static _error(...t){mn._emitter._emit("error",t),mn._level>=Vr.Errors&&console.error(...t)}static _warn(...t){mn._emitter._emit("warn",t),mn._level>=Vr.Warnings&&console.warn(...t)}static _info(...t){mn._emitter._emit("info",t),mn._level>=Vr.Info&&console.info(...t)}}mn._level=Vr.Info,mn._emitterInstance=null;class Jb{constructor(t,i){if(this.data=t,this.mimeType=i,!(t instanceof Uint8Array))throw new TypeError("data must be a Uint8Array.");if(typeof i!="string")throw new TypeError("mimeType must be a string.")}}class Xb{constructor(t,i,n,s){if(this.data=t,this.mimeType=i,this.name=n,this.description=s,!(t instanceof Uint8Array))throw new TypeError("data must be a Uint8Array.");if(i!==void 0&&typeof i!="string")throw new TypeError("mimeType, when provided, must be a string.");if(n!==void 0&&typeof n!="string")throw new TypeError("name, when provided, must be a string.");if(s!==void 0&&typeof s!="string")throw new TypeError("description, when provided, must be a string.")}}const mA=a=>{if(!a||typeof a!="object")throw new TypeError("tags must be an object.");if(a.title!==void 0&&typeof a.title!="string")throw new TypeError("tags.title, when provided, must be a string.");if(a.description!==void 0&&typeof a.description!="string")throw new TypeError("tags.description, when provided, must be a string.");if(a.artist!==void 0&&typeof a.artist!="string")throw new TypeError("tags.artist, when provided, must be a string.");if(a.album!==void 0&&typeof a.album!="string")throw new TypeError("tags.album, when provided, must be a string.");if(a.albumArtist!==void 0&&typeof a.albumArtist!="string")throw new TypeError("tags.albumArtist, when provided, must be a string.");if(a.trackNumber!==void 0&&(!Number.isInteger(a.trackNumber)||a.trackNumber<=0))throw new TypeError("tags.trackNumber, when provided, must be a positive integer.");if(a.tracksTotal!==void 0&&(!Number.isInteger(a.tracksTotal)||a.tracksTotal<=0))throw new TypeError("tags.tracksTotal, when provided, must be a positive integer.");if(a.discNumber!==void 0&&(!Number.isInteger(a.discNumber)||a.discNumber<=0))throw new TypeError("tags.discNumber, when provided, must be a positive integer.");if(a.discsTotal!==void 0&&(!Number.isInteger(a.discsTotal)||a.discsTotal<=0))throw new TypeError("tags.discsTotal, when provided, must be a positive integer.");if(a.genre!==void 0&&typeof a.genre!="string")throw new TypeError("tags.genre, when provided, must be a string.");if(a.date!==void 0&&(!(a.date instanceof Date)||Number.isNaN(a.date.getTime())))throw new TypeError("tags.date, when provided, must be a valid Date.");if(a.beatsPerMinute!==void 0&&(!Number.isInteger(a.beatsPerMinute)||a.beatsPerMinute<=0))throw new TypeError("tags.beatsPerMinute, when provided, must be a positive integer.");if(a.lyrics!==void 0&&typeof a.lyrics!="string")throw new TypeError("tags.lyrics, when provided, must be a string.");if(a.images!==void 0){if(!Array.isArray(a.images))throw new TypeError("tags.images, when provided, must be an array.");for(const t of a.images){if(!t||typeof t!="object")throw new TypeError("Each image in tags.images must be an object.");if(!(t.data instanceof Uint8Array))throw new TypeError("Each image.data must be a Uint8Array.");if(typeof t.mimeType!="string")throw new TypeError("Each image.mimeType must be a string.");if(!["coverFront","coverBack","unknown"].includes(t.kind))throw new TypeError("Each image.kind must be 'coverFront', 'coverBack', or 'unknown'.")}}if(a.comment!==void 0&&typeof a.comment!="string")throw new TypeError("tags.comment, when provided, must be a string.");if(a.raw!==void 0){if(!a.raw||typeof a.raw!="object")throw new TypeError("tags.raw, when provided, must be an object.");for(const t of Object.values(a.raw))if(t!==null&&typeof t!="string"&&!(Array.isArray(t)&&t.every(i=>typeof i=="string"))&&!(t instanceof Uint8Array)&&!(t instanceof Jb)&&!(t instanceof Xb)&&!pA(t))throw new TypeError("Each value in tags.raw must be a string, string array, Uint8Array, RichImageData, AttachedFile, Record, or null.")}},gA=a=>{if(!a||typeof a!="object")throw new TypeError("disposition must be an object.");if(a.default!==void 0&&typeof a.default!="boolean")throw new TypeError("disposition.default must be a boolean.");if(a.primary!==void 0&&typeof a.primary!="boolean")throw new TypeError("disposition.primary must be a boolean.");if(a.forced!==void 0&&typeof a.forced!="boolean")throw new TypeError("disposition.forced must be a boolean.");if(a.original!==void 0&&typeof a.original!="boolean")throw new TypeError("disposition.original must be a boolean.");if(a.commentary!==void 0&&typeof a.commentary!="boolean")throw new TypeError("disposition.commentary must be a boolean.");if(a.hearingImpaired!==void 0&&typeof a.hearingImpaired!="boolean")throw new TypeError("disposition.hearingImpaired must be a boolean.");if(a.visuallyImpaired!==void 0&&typeof a.visuallyImpaired!="boolean")throw new TypeError("disposition.visuallyImpaired must be a boolean.")};class Mn{constructor(t){this.bytes=t,this.pos=0}seekToByte(t){this.pos=8*t}readBit(){const t=Math.floor(this.pos/8),i=this.bytes[t]??0,n=7-(this.pos&7),s=(i&1<>n;return this.pos++,s}readBits(t){if(t===1)return this.readBit();let i=0;for(let n=0;n>n-s-1<0&&this.writeBits(s,i.readBits(s))}readAlignedByte(){if(this.pos%8!==0)throw new Error("Bitstream is not byte-aligned.");const t=this.pos/8,i=this.bytes[t]??0;return this.pos+=8,i}skipBits(t){this.pos+=t}getBitsLeft(){return this.bytes.length*8-this.pos}clone(){const t=new Mn(this.bytes);return t.pos=this.pos,t}}const jd=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],xf=[-1,1,2,3,4,5,6,8],hA=a=>{if(!a||a.byteLength<2)throw new TypeError("AAC description must be at least 2 bytes long.");const t=new Mn(a),i=Lm(t),{frequencyIndex:n,sampleRate:s}=Vm(t),r=t.readBits(4);let o=null;r>=1&&r<=7&&(o=xf[r]);let l=i,c=!1,d=s;if(i===5||i===29)c=i===29,d=Vm(t).sampleRate,l=Lm(t),l===22&&t.skipBits(4);else for(;t.getBitsLeft()>15;){const g=t.pos;if(t.readBits(11)!==695){t.pos=g+1;continue}Lm(t)===5&&t.readBits(1)&&(d=Vm(t).sampleRate,t.getBitsLeft()>11&&t.readBits(11)===1352&&(c=!!t.readBits(1)));break}return o!==null&&o>1&&(c=!1),{objectType:i,coreObjectType:l,frequencyIndex:n,channelConfiguration:r,outputSampleRate:d,outputNumberOfChannels:c&&o===1?2:o}},Lm=a=>{const t=a.readBits(5);return t===31?32+a.readBits(6):t},Vm=a=>{const t=a.readBits(4);return t===15?{frequencyIndex:t,sampleRate:a.readBits(24)}:{frequencyIndex:t,sampleRate:t{const t=a.objectType===5||a.objectType===29,i=a.objectType===29,n=t?a.outputSampleRate/2:a.outputSampleRate,s=i?1:a.outputNumberOfChannels,r=xf.indexOf(s);if(r===-1)throw new TypeError(`Unsupported number of channels: ${a.outputNumberOfChannels}`);let o=16;a.objectType>=32&&(o+=6),Wm(n)===15&&(o+=24),t&&(o+=9,Wm(a.outputSampleRate)===15&&(o+=24));const l=Math.ceil(o/8),c=new Uint8Array(l),d=new Mn(c);return Zb(d,a.objectType),ey(d,n),d.writeBits(4,r),t&&(ey(d,a.outputSampleRate),Zb(d,2)),d.writeBits(3,0),c},Zb=(a,t)=>{t<32?a.writeBits(5,t):(a.writeBits(5,31),a.writeBits(6,t-32))},ey=(a,t)=>{const i=Wm(t);a.writeBits(4,i),i===15&&a.writeBits(24,t)},Wm=a=>{const t=jd.indexOf(a);return t===-1?15:t};const _A=[48e3,44100,32e3],vA=[24e3,22050,16e3];var wo;(function(a){a[a.NON_IDR_SLICE=1]="NON_IDR_SLICE",a[a.SLICE_DPA=2]="SLICE_DPA",a[a.SLICE_DPB=3]="SLICE_DPB",a[a.SLICE_DPC=4]="SLICE_DPC",a[a.IDR=5]="IDR",a[a.SEI=6]="SEI",a[a.SPS=7]="SPS",a[a.PPS=8]="PPS",a[a.AUD=9]="AUD",a[a.SPS_EXT=13]="SPS_EXT"})(wo||(wo={}));var _r;(function(a){a[a.RASL_N=8]="RASL_N",a[a.RASL_R=9]="RASL_R",a[a.BLA_W_LP=16]="BLA_W_LP",a[a.RSV_IRAP_VCL23=23]="RSV_IRAP_VCL23",a[a.VPS_NUT=32]="VPS_NUT",a[a.SPS_NUT=33]="SPS_NUT",a[a.PPS_NUT=34]="PPS_NUT",a[a.AUD_NUT=35]="AUD_NUT",a[a.PREFIX_SEI_NUT=39]="PREFIX_SEI_NUT",a[a.SUFFIX_SEI_NUT=40]="SUFFIX_SEI_NUT"})(_r||(_r={}));const Nd=function*(a){let t=0,i=-1;for(;t=a.length-2)break;t=n;let s=0;if(t+3i&&(yield{offset:i,length:t-i}),i=t+s,t=i}i!==-1&&i{if(t.description){const s=(Gs(t.description)[4]&3)+1;return ty(a,s)}else return Nd(a)},ay=a=>a&31,Sf=a=>{const t=[],i=a.length;for(let n=0;n{const i=a.reduce((r,o)=>r+t+o.byteLength,0),n=new Uint8Array(i);let s=0;for(const r of a){const o=new DataView(n.buffer,n.byteOffset,n.byteLength);switch(t){case 1:o.setUint8(s,r.byteLength);break;case 2:o.setUint16(s,r.byteLength,!1);break;case 3:Um(o,s,r.byteLength,!1);break;case 4:o.setUint32(s,r.byteLength,!1);break}s+=t,n.set(r,s),s+=r.byteLength}return n},wA=a=>{try{const t=[],i=[],n=[];for(const l of Nd(a)){const c=a.subarray(l.offset,l.offset+l.length),d=ay(c[0]);d===wo.SPS?t.push(c):d===wo.PPS?i.push(c):d===wo.SPS_EXT&&n.push(c)}if(t.length===0||i.length===0)return null;const s=t[0],r=xA(s);We(r!==null);const o=r.profileIdc===100||r.profileIdc===110||r.profileIdc===122||r.profileIdc===144;return{configurationVersion:1,avcProfileIndication:r.profileIdc,profileCompatibility:r.constraintFlags,avcLevelIndication:r.levelIdc,lengthSizeMinusOne:3,sequenceParameterSets:t,pictureParameterSets:i,chromaFormat:o?r.chromaFormatIdc:null,bitDepthLumaMinus8:o?r.bitDepthLumaMinus8:null,bitDepthChromaMinus8:o?r.bitDepthChromaMinus8:null,sequenceParameterSetExt:o?n:null}}catch(t){return mn._error("Error building AVC Decoder Configuration Record:",t),null}},kA=a=>{const t=[];t.push(a.configurationVersion),t.push(a.avcProfileIndication),t.push(a.profileCompatibility),t.push(a.avcLevelIndication),t.push(252|a.lengthSizeMinusOne&3),t.push(224|a.sequenceParameterSets.length&31);for(const i of a.sequenceParameterSets){const n=i.byteLength;t.push(n>>8),t.push(n&255);for(let s=0;s>8),t.push(n&255);for(let s=0;s>8),t.push(n&255);for(let s=0;s{try{const t=Sf(a),i=new Mn(t);if(i.skipBits(1),i.skipBits(2),i.readBits(5)!==7)return null;const s=i.readAlignedByte(),r=i.readAlignedByte(),o=i.readAlignedByte();bt(i);let l=1,c=0,d=0,g=0;if((s===100||s===110||s===122||s===244||s===44||s===83||s===86||s===118||s===128)&&(l=bt(i),l===3&&(g=i.readBits(1)),c=bt(i),d=bt(i),i.skipBits(1),i.readBits(1))){for(let O=0;O<(l!==3?8:12);O++)if(i.readBits(1)){const L=O<6?16:64;let T=8,F=8;for(let z=0;zz.level>=o)??Fr($f),F=Math.min(Math.floor(T.maxDpbMbs/(O*L)),16);j=F,G=F}}return We(G!==null),{emulationUnpreventedBytes:t,profileIdc:s,constraintFlags:r,levelIdc:o,frameMbsOnlyFlag:b,chromaFormatIdc:l,bitDepthLumaMinus8:c,bitDepthChromaMinus8:d,codedWidth:u,codedHeight:f,displayWidth:_,displayHeight:v,pixelAspectRatio:C,colourPrimaries:$,matrixCoefficients:N,transferCharacteristics:M,fullRangeFlag:P,numReorderFrames:j,maxDecFrameBuffering:G,vuiParametersFlagBitOffset:H,bitstreamRestrictionFlagBitOffset:A,bitstreamRestrictionFlag:B}}catch(t){return mn._error("Error parsing AVC SPS:",t),null}},ny=a=>{const t=bt(a);a.skipBits(4),a.skipBits(4);for(let i=0;i<=t;i++)bt(a),bt(a),a.skipBits(1);a.skipBits(5),a.skipBits(5),a.skipBits(5),a.skipBits(5)},SA=(a,t)=>{if(t.description){const s=(Gs(t.description)[21]&3)+1;return ty(a,s)}else return Nd(a)},Qm=a=>a>>1&63,TA=a=>{try{const t=new Mn(Sf(a));t.skipBits(16),t.readBits(4);const i=t.readBits(3),n=t.readBits(1),{general_profile_space:s,general_tier_flag:r,general_profile_idc:o,general_profile_compatibility_flags:l,general_constraint_indicator_flags:c,general_level_idc:d}=qA(t,i);bt(t);const g=bt(t);let h=0;g===3&&(h=t.readBits(1));const m=bt(t),p=bt(t);let u=m,f=p;if(t.readBits(1)){const B=bt(t),H=bt(t),U=bt(t),E=bt(t);let O=1,V=1;const L=h===0?g:0;L===1?(O=2,V=2):L===2&&(O=2,V=1),u-=(B+H)*O,f-=(U+E)*V}const _=bt(t),v=bt(t);bt(t);const S=t.readBits(1)?0:i;let $=0;for(let B=S;B<=i;B++)bt(t),$=bt(t),bt(t);bt(t),bt(t),bt(t),bt(t),bt(t),bt(t),t.readBits(1)&&t.readBits(1)&&CA(t),t.skipBits(1),t.skipBits(1),t.readBits(1)&&(t.skipBits(4),t.skipBits(4),bt(t),bt(t),t.skipBits(1));const M=bt(t);if(AA(t,M),t.readBits(1)){const B=bt(t);for(let H=0;H{try{const t=[],i=[],n=[],s=[];for(const d of Nd(a)){const g=a.subarray(d.offset,d.offset+d.length),h=Qm(g[0]);h===_r.VPS_NUT?t.push(g):h===_r.SPS_NUT?i.push(g):h===_r.PPS_NUT?n.push(g):(h===_r.PREFIX_SEI_NUT||h===_r.SUFFIX_SEI_NUT)&&s.push(g)}if(i.length===0||n.length===0)return null;const r=TA(i[0]);if(!r)return null;let o=0;if(n.length>0){const d=n[0],g=new Mn(Sf(d));g.skipBits(16),bt(g),bt(g),g.skipBits(1),g.skipBits(1),g.skipBits(3),g.skipBits(1),g.skipBits(1),bt(g),bt(g),bo(g),g.skipBits(1),g.skipBits(1),g.readBits(1)&&bt(g),bo(g),bo(g),g.skipBits(1),g.skipBits(1),g.skipBits(1),g.skipBits(1);const h=g.readBits(1),m=g.readBits(1);!h&&!m?o=0:h&&!m?o=2:!h&&m?o=3:o=0}const l=[...t.length?[{arrayCompleteness:1,nalUnitType:_r.VPS_NUT,nalUnits:t}]:[],...i.length?[{arrayCompleteness:1,nalUnitType:_r.SPS_NUT,nalUnits:i}]:[],...n.length?[{arrayCompleteness:1,nalUnitType:_r.PPS_NUT,nalUnits:n}]:[],...s.length?[{arrayCompleteness:1,nalUnitType:Qm(s[0][0]),nalUnits:s}]:[]];return{configurationVersion:1,generalProfileSpace:r.generalProfileSpace,generalTierFlag:r.generalTierFlag,generalProfileIdc:r.generalProfileIdc,generalProfileCompatibilityFlags:r.generalProfileCompatibilityFlags,generalConstraintIndicatorFlags:r.generalConstraintIndicatorFlags,generalLevelIdc:r.generalLevelIdc,minSpatialSegmentationIdc:r.minSpatialSegmentationIdc,parallelismType:o,chromaFormatIdc:r.chromaFormatIdc,bitDepthLumaMinus8:r.bitDepthLumaMinus8,bitDepthChromaMinus8:r.bitDepthChromaMinus8,avgFrameRate:0,constantFrameRate:0,numTemporalLayers:r.spsMaxSubLayersMinus1+1,temporalIdNested:r.spsTemporalIdNestingFlag,lengthSizeMinusOne:3,arrays:l}}catch(t){return mn._error("Error building HEVC Decoder Configuration Record:",t),null}},qA=(a,t)=>{const i=a.readBits(2),n=a.readBits(1),s=a.readBits(5);let r=0;for(let g=0;g<32;g++)r=r<<1|a.readBits(1);const o=new Uint8Array(6);for(let g=0;g<6;g++)o[g]=a.readBits(8);const l=a.readBits(8),c=[],d=[];for(let g=0;g0)for(let g=t;g<8;g++)a.skipBits(2);for(let g=0;g{for(let t=0;t<4;t++)for(let i=0;i<(t===3?2:6);i++)if(!a.readBits(1))bt(a);else{const s=Math.min(64,1<<4+(t<<1));t>1&&bo(a);for(let r=0;r{const i=[];for(let n=0;n{let s=0,r=0,o=0;if(t!==0&&(r=a.readBits(1)),r){if(t===i){const c=bt(a);o=t-(c+1)}else o=t-1;a.readBits(1),bt(a);const l=n[o]??0;for(let c=0;c<=l;c++)a.readBits(1)||a.readBits(1);s=n[o]}else{const l=bt(a),c=bt(a);for(let d=0;d{let i=2,n=2,s=2,r=0,o=0,l={num:1,den:1};if(a.readBits(1)){const c=a.readBits(8);if(c===255)l={num:a.readBits(16),den:a.readBits(16)};else{const d=iy[c];d&&(l=d)}}return a.readBits(1)&&a.readBits(1),a.readBits(1)&&(a.readBits(3),r=a.readBits(1),a.readBits(1)&&(i=a.readBits(8),n=a.readBits(8),s=a.readBits(8))),a.readBits(1)&&(bt(a),bt(a)),a.readBits(1),a.readBits(1),a.readBits(1),a.readBits(1)&&(bt(a),bt(a),bt(a),bt(a)),a.readBits(1)&&(a.readBits(32),a.readBits(32),a.readBits(1)&&bt(a),a.readBits(1)&&MA(a,!0,t)),a.readBits(1)&&(a.readBits(1),a.readBits(1),a.readBits(1),o=bt(a),bt(a),bt(a),bt(a),bt(a)),{pixelAspectRatio:l,colourPrimaries:i,transferCharacteristics:n,matrixCoefficients:s,fullRangeFlag:r,minSpatialSegmentationIdc:o}},MA=(a,t,i)=>{let n=!1,s=!1,r=!1;n=a.readBits(1)===1,s=a.readBits(1)===1,(n||s)&&(r=a.readBits(1)===1,r&&(a.readBits(8),a.readBits(5),a.readBits(1),a.readBits(5)),a.readBits(4),a.readBits(4),r&&a.readBits(4),a.readBits(5),a.readBits(5),a.readBits(5));for(let o=0;o<=i;o++){const l=a.readBits(1)===1;let c=!0;l||(c=a.readBits(1)===1);let d=!1;c?bt(a):d=a.readBits(1)===1;let g=1;d||(g=bt(a)+1),n&&sy(a,g,r),s&&sy(a,g,r)}},sy=(a,t,i)=>{for(let n=0;n{const t=[];t.push(a.configurationVersion),t.push((a.generalProfileSpace&3)<<6|(a.generalTierFlag&1)<<5|a.generalProfileIdc&31),t.push(a.generalProfileCompatibilityFlags>>>24&255),t.push(a.generalProfileCompatibilityFlags>>>16&255),t.push(a.generalProfileCompatibilityFlags>>>8&255),t.push(a.generalProfileCompatibilityFlags&255),t.push(...a.generalConstraintIndicatorFlags),t.push(a.generalLevelIdc&255),t.push(240|a.minSpatialSegmentationIdc>>8&15),t.push(a.minSpatialSegmentationIdc&255),t.push(252|a.parallelismType&3),t.push(252|a.chromaFormatIdc&3),t.push(248|a.bitDepthLumaMinus8&7),t.push(248|a.bitDepthChromaMinus8&7),t.push(a.avgFrameRate>>8&255),t.push(a.avgFrameRate&255),t.push((a.constantFrameRate&3)<<6|(a.numTemporalLayers&7)<<3|(a.temporalIdNested&1)<<2|a.lengthSizeMinusOne&3),t.push(a.arrays.length&255);for(const i of a.arrays){t.push((i.arrayCompleteness&1)<<7|0|i.nalUnitType&63),t.push(i.nalUnits.length>>8&255),t.push(i.nalUnits.length&255);for(const n of i.nalUnits){t.push(n.length>>8&255),t.push(n.length&255);for(let s=0;s{let n=0;for(let s=0;s<8;s++){const r=t.readAlignedByte();if(n+=(r&127)*2**(s*7),!(r&128))break;if(s===7&&r&128)return null}return n>2**32-1?null:n};for(;t.getBitsLeft()>=8;){t.skipBits(1);const n=t.readBits(4),s=t.readBits(1),r=t.readBits(1);t.skipBits(1),s&&t.skipBits(8);let o;if(r){const l=i();if(l===null)return;o=l}else o=Math.floor(t.getBitsLeft()/8);We(t.pos%8===0),yield{type:n,data:a.subarray(t.pos/8,t.pos/8+o)},t.skipBits(o*8)}},oy=a=>{const t=Lr(a),i=t.getUint8(9),n=t.getUint16(10,!0),s=t.getUint32(12,!0),r=t.getInt16(16,!0),o=t.getUint8(18);let l=null;return o&&(l=a.subarray(19,21+i)),{outputChannelCount:i,preSkip:n,inputSampleRate:s,outputGain:r,channelMappingFamily:o,channelMappingTable:l}},UA=(a,t,i)=>{switch(a){case"avc":{for(const n of bA(i,t)){const s=i[n.offset],r=ay(s);if(r>=wo.NON_IDR_SLICE&&r<=wo.SLICE_DPC)return"delta";if(r===wo.IDR)return"key";if(r===wo.SEI&&!rA()){const o=i.subarray(n.offset,n.offset+n.length),l=Sf(o);let c=1;do{let d=0;for(;;){const m=l[c++];if(m===void 0||(d+=m,m<255))break}let g=0;for(;;){const m=l[c++];if(m===void 0||(g+=m,m<255))break}if(d===6){const m=new Mn(l);m.pos=8*c;const p=bt(m),u=m.readBits(1);if(p===0&&u===1)return"key"}c+=g}while(c{if(a.length<7||a[0]!==11||a[1]!==119)return null;const t=new Mn(a);t.skipBits(16),t.skipBits(16);const i=t.readBits(2);if(i===3)return null;const n=t.readBits(6),s=t.readBits(5);if(s>8)return null;const r=t.readBits(3),o=t.readBits(3);(o&1)!==0&&o!==1&&t.skipBits(2),(o&4)!==0&&t.skipBits(2),o===2&&t.skipBits(2);const l=t.readBits(1),c=Math.floor(n/2);return{fscod:i,bsid:s,bsmod:r,acmod:o,lfeon:l,bitRateCode:c}},BA=[1,2,3,6],PA=a=>{if(a.length<6||a[0]!==11||a[1]!==119)return null;const t=new Mn(a);t.skipBits(16);const i=t.readBits(2);if(t.skipBits(3),i!==0&&i!==2)return null;const n=t.readBits(11),s=t.readBits(2);let r=0,o;s===3?(r=t.readBits(2),o=3):o=t.readBits(2);const l=t.readBits(3),c=t.readBits(1),d=t.readBits(5);if(d<11||d>16)return null;const g=BA[o];let h;return s<3?h=_A[s]/1e3:h=vA[r]/1e3,{dataRate:Math.round((n+1)*h/(g*16)),substreams:[{fscod:s,fscod2:r,bsid:d,bsmod:0,acmod:l,lfeon:c,numDepSub:0,chanLoc:0}]}},jA=1683496997,NA=18,OA=10,cy=32,IA=20,DA=8,LA=[0,8e3,16e3,32e3,0,0,11025,22050,44100,0,0,12e3,24e3,48e3,96e3,192e3],VA=[32e3,56e3,64e3,96e3,112e3,128e3,192e3,224e3,256e3,32e4,384e3,448e3,512e3,576e3,64e4,768e3,96e4,1024e3,1152e3,128e4,1344e3,1408e3,1411200,1472e3,1536e3,192e4,2048e3,3072e3,384e4,0,0,0],HA=[16,16,20,20,0,24,24,0],dy=[1,2,2,2,2,3,3,4,4,5,6,6,6,7,8,8],WA=[1,2,2,2,2,3,18,19,6,7,518,323,83,519,582,535],QA=8,KA=[32e3,44100,48e3,0],YA=[8e3,16e3,32e3,64e3,128e3,22050,44100,88200,176400,352800,12e3,24e3,48e3,96e3,192e3,384e3],JA=[512,1024,2048,4096],XA=a=>{const t=ZA(a),i=Lr(a);let n=t?Math.ceil(t.frameSize/4)*4:0,s=null;for(;n+4<=a.length&&i.getUint32(n)===jA;){const o=eG(a.subarray(n));if(!o)break;s??=o,n+=o.frameSize}if(t)return{frameSize:s?n:t.frameSize,sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels,sampleCount:t.sampleCount,channelLayout:t.channelLayout,pcmResolution:t.pcmResolution,bitRate:t.bitRate,core:t,hasExtensions:s!==null};if(!s?.asset)return null;const{asset:r}=s;return{frameSize:n,sampleRate:r.sampleRate,numberOfChannels:r.numberOfChannels,sampleCount:r.sampleCount,channelLayout:r.channelLayout,pcmResolution:r.pcmResolution,bitRate:0,core:null,hasExtensions:!0}},ZA=a=>{if(a.length=dy.length)return null;const o=LA[t.readBits(4)];if(o===0)return null;const l=VA[t.readBits(5)];if(t.readBits(1)!==0)return null;t.skipBits(4),t.skipBits(5);const c=t.readBits(2);if(c===3)return null;t.skipBits(1),i&&t.skipBits(16),t.skipBits(7);const d=HA[t.readBits(3)];if(d===0)return null;const g=c!==0;return{frameSize:s,sampleRate:o,numberOfChannels:dy[r]+(g?1:0),sampleCount:n*cy,channelLayout:WA[r]|(g?QA:0),amode:r,lfePresent:g,bitRate:l,pcmResolution:d}},eG=a=>{if(a.length2&&t.skipBits(1),f>6&&t.skipBits(1),t.readBits(1))){const v=t.readBits(2)+1<<2;_=t.readBits(v)}return c===0||t.getBitsLeft()<0?l:{frameSize:o,asset:{sampleRate:u,numberOfChannels:f,sampleCount:Math.round(d*u/c),channelLayout:_,pcmResolution:p}}},tG=a=>{const t=new Uint8Array(IA),i=Lr(t);i.setUint32(0,a.sampleRate),i.setUint32(4,a.bitRate),i.setUint32(8,a.bitRate),t[12]=a.pcmResolution;const n=a.core&&!a.hasExtensions?1:0,s=new Mn(t);return s.seekToByte(13),s.writeBits(2,Math.max(JA.indexOf(a.sampleCount),0)),s.writeBits(5,n),s.writeBits(1,a.core?.lfePresent?1:0),s.writeBits(6,a.core?.amode??0),s.writeBits(14,a.core?a.core.frameSize-1:0),s.writeBits(1,0),s.writeBits(3,0),s.writeBits(16,a.channelLayout),s.writeBits(1,0),s.writeBits(1,0),s.writeBits(1,0),s.writeBits(5,0),t};const Mr=["avc","hevc","vp9","av1","vp8","prores"],Ns=["pcm-s16","pcm-s16be","pcm-s24","pcm-s24be","pcm-s32","pcm-s32be","pcm-f32","pcm-f32be","pcm-f64","pcm-f64be","pcm-u8","pcm-s8","ulaw","alaw"],Tf=["aac","opus","mp3","vorbis","flac","ac3","eac3","dts"],Wo=[...Tf,...Ns],Bl=["webvtt"],$f=[{maxMacroblocks:99,maxBitrate:64e3,maxDpbMbs:396,level:10},{maxMacroblocks:396,maxBitrate:192e3,maxDpbMbs:900,level:11},{maxMacroblocks:396,maxBitrate:384e3,maxDpbMbs:2376,level:12},{maxMacroblocks:396,maxBitrate:768e3,maxDpbMbs:2376,level:13},{maxMacroblocks:396,maxBitrate:2e6,maxDpbMbs:2376,level:20},{maxMacroblocks:792,maxBitrate:4e6,maxDpbMbs:4752,level:21},{maxMacroblocks:1620,maxBitrate:4e6,maxDpbMbs:8100,level:22},{maxMacroblocks:1620,maxBitrate:1e7,maxDpbMbs:8100,level:30},{maxMacroblocks:3600,maxBitrate:14e6,maxDpbMbs:18e3,level:31},{maxMacroblocks:5120,maxBitrate:2e7,maxDpbMbs:20480,level:32},{maxMacroblocks:8192,maxBitrate:2e7,maxDpbMbs:32768,level:40},{maxMacroblocks:8192,maxBitrate:5e7,maxDpbMbs:32768,level:41},{maxMacroblocks:8704,maxBitrate:5e7,maxDpbMbs:34816,level:42},{maxMacroblocks:22080,maxBitrate:135e6,maxDpbMbs:110400,level:50},{maxMacroblocks:36864,maxBitrate:24e7,maxDpbMbs:184320,level:51},{maxMacroblocks:36864,maxBitrate:24e7,maxDpbMbs:184320,level:52},{maxMacroblocks:139264,maxBitrate:24e7,maxDpbMbs:696320,level:60},{maxMacroblocks:139264,maxBitrate:48e7,maxDpbMbs:696320,level:61},{maxMacroblocks:139264,maxBitrate:8e8,maxDpbMbs:696320,level:62}],uy=[{maxPictureSize:36864,maxBitrate:128e3,tier:"L",level:30},{maxPictureSize:122880,maxBitrate:15e5,tier:"L",level:60},{maxPictureSize:245760,maxBitrate:3e6,tier:"L",level:63},{maxPictureSize:552960,maxBitrate:6e6,tier:"L",level:90},{maxPictureSize:983040,maxBitrate:1e7,tier:"L",level:93},{maxPictureSize:2228224,maxBitrate:12e6,tier:"L",level:120},{maxPictureSize:2228224,maxBitrate:3e7,tier:"H",level:120},{maxPictureSize:2228224,maxBitrate:2e7,tier:"L",level:123},{maxPictureSize:2228224,maxBitrate:5e7,tier:"H",level:123},{maxPictureSize:8912896,maxBitrate:25e6,tier:"L",level:150},{maxPictureSize:8912896,maxBitrate:1e8,tier:"H",level:150},{maxPictureSize:8912896,maxBitrate:4e7,tier:"L",level:153},{maxPictureSize:8912896,maxBitrate:16e7,tier:"H",level:153},{maxPictureSize:8912896,maxBitrate:6e7,tier:"L",level:156},{maxPictureSize:8912896,maxBitrate:24e7,tier:"H",level:156},{maxPictureSize:35651584,maxBitrate:6e7,tier:"L",level:180},{maxPictureSize:35651584,maxBitrate:24e7,tier:"H",level:180},{maxPictureSize:35651584,maxBitrate:12e7,tier:"L",level:183},{maxPictureSize:35651584,maxBitrate:48e7,tier:"H",level:183},{maxPictureSize:35651584,maxBitrate:24e7,tier:"L",level:186},{maxPictureSize:35651584,maxBitrate:8e8,tier:"H",level:186}],fy=[{maxPictureSize:36864,maxBitrate:2e5,level:10},{maxPictureSize:73728,maxBitrate:8e5,level:11},{maxPictureSize:122880,maxBitrate:18e5,level:20},{maxPictureSize:245760,maxBitrate:36e5,level:21},{maxPictureSize:552960,maxBitrate:72e5,level:30},{maxPictureSize:983040,maxBitrate:12e6,level:31},{maxPictureSize:2228224,maxBitrate:18e6,level:40},{maxPictureSize:2228224,maxBitrate:3e7,level:41},{maxPictureSize:8912896,maxBitrate:6e7,level:50},{maxPictureSize:8912896,maxBitrate:12e7,level:51},{maxPictureSize:8912896,maxBitrate:18e7,level:52},{maxPictureSize:35651584,maxBitrate:18e7,level:60},{maxPictureSize:35651584,maxBitrate:24e7,level:61},{maxPictureSize:35651584,maxBitrate:48e7,level:62}],py=[{maxPictureSize:147456,maxBitrate:15e5,tier:"M",level:0},{maxPictureSize:278784,maxBitrate:3e6,tier:"M",level:1},{maxPictureSize:665856,maxBitrate:6e6,tier:"M",level:4},{maxPictureSize:1065024,maxBitrate:1e7,tier:"M",level:5},{maxPictureSize:2359296,maxBitrate:12e6,tier:"M",level:8},{maxPictureSize:2359296,maxBitrate:3e7,tier:"H",level:8},{maxPictureSize:2359296,maxBitrate:2e7,tier:"M",level:9},{maxPictureSize:2359296,maxBitrate:5e7,tier:"H",level:9},{maxPictureSize:8912896,maxBitrate:3e7,tier:"M",level:12},{maxPictureSize:8912896,maxBitrate:1e8,tier:"H",level:12},{maxPictureSize:8912896,maxBitrate:4e7,tier:"M",level:13},{maxPictureSize:8912896,maxBitrate:16e7,tier:"H",level:13},{maxPictureSize:8912896,maxBitrate:6e7,tier:"M",level:14},{maxPictureSize:8912896,maxBitrate:24e7,tier:"H",level:14},{maxPictureSize:35651584,maxBitrate:6e7,tier:"M",level:15},{maxPictureSize:35651584,maxBitrate:24e7,tier:"H",level:15},{maxPictureSize:35651584,maxBitrate:6e7,tier:"M",level:16},{maxPictureSize:35651584,maxBitrate:24e7,tier:"H",level:16},{maxPictureSize:35651584,maxBitrate:1e8,tier:"M",level:17},{maxPictureSize:35651584,maxBitrate:48e7,tier:"H",level:17},{maxPictureSize:35651584,maxBitrate:16e7,tier:"M",level:18},{maxPictureSize:35651584,maxBitrate:8e8,tier:"H",level:18},{maxPictureSize:35651584,maxBitrate:16e7,tier:"M",level:19},{maxPictureSize:35651584,maxBitrate:8e8,tier:"H",level:19}],Od=["ap4x","ap4h","apch","apcn","apcs","apco"],Km=["dtsc","dtsh","dtsl","dtse"],aG=[{fourCc:"apco",bitrate:45e6,alpha:!1},{fourCc:"apcs",bitrate:102e6,alpha:!1},{fourCc:"apcn",bitrate:147e6,alpha:!1},{fourCc:"apch",bitrate:22e7,alpha:!1},{fourCc:"ap4h",bitrate:33e7,alpha:!0},{fourCc:"ap4x",bitrate:5e8,alpha:!0}],iG=(a,t,i,n,s)=>{if(a==="avc"){const o=Math.ceil(t/16)*Math.ceil(i/16),l=$f.find(m=>o<=m.maxMacroblocks&&n<=m.maxBitrate)??Fr($f),c=l?l.level:0,d="64".padStart(2,"0"),g="00",h=c.toString(16).padStart(2,"0");return`avc1.${d}${g}${h}`}else if(a==="hevc"){const c=t*i,d=uy.find(h=>c<=h.maxPictureSize&&n<=h.maxBitrate)??Fr(uy);return`hev1.1.6.${d.tier}${d.level}.B0`}else{if(a==="vp8")return"vp8";if(a==="vp9"){const o=t*i;return`vp09.00.${(fy.find(d=>o<=d.maxPictureSize&&n<=d.maxBitrate)??Fr(fy)).level.toString().padStart(2,"0")}.08`}else if(a==="av1"){const o=t*i,l=py.find(g=>o<=g.maxPictureSize&&n<=g.maxBitrate)??Fr(py);return`av01.0.${l.level.toString().padStart(2,"0")}${l.tier}.08`}else if(a==="prores"){const o=Math.pow(t*i/2073600,.95),l=aG.filter(g=>g.alpha===s);let c=l[0].fourCc,d=1/0;for(const{fourCc:g,bitrate:h}of l){const m=Math.abs(h*o-n);m{const t=a.split("."),i=Number(t[1]),n=Number(t[2]),s=Number(t[3]),r=t[4]?Number(t[4]):1;return[1,1,i,2,1,n,3,1,s,4,1,r]},my=a=>{const t=a.split("."),s=(1<<7)+1,r=Number(t[1]),o=t[2],l=Number(o.slice(0,-1)),c=(r<<5)+l,d=o.slice(-1)==="H"?1:0,g=Number(t[3]),h=g===8?0:1,m=g===12?1:0,p=t[4]?Number(t[4]):0,u=t[5]?Number(t[5][0]):1,f=t[5]?Number(t[5][1]):1,_=t[5]?Number(t[5][2]):0,v=(d<<7)+(h<<6)+(m<<5)+(p<<4)+(u<<3)+(f<<2)+_;return[s,c,v,0]},sG=(a,t,i)=>{if(a==="aac")return t>=2&&i<=24e3?"mp4a.40.29":i<=24e3?"mp4a.40.5":"mp4a.40.2";if(a==="mp3")return"mp3";if(a==="opus")return"opus";if(a==="vorbis")return"vorbis";if(a==="flac")return"flac";if(a==="ac3")return"ac-3";if(a==="eac3")return"ec-3";if(a==="dts")return"dtsc";if(Ns.includes(a))return a;throw new TypeError(`Unhandled codec '${a}'.`)},rG=48e3,gy=/^pcm-([usf])(\d+)(be)?$/,Qo=a=>{if(We(Ns.includes(a)),a==="ulaw")return{dataType:"ulaw",sampleSize:1,littleEndian:!0,silentValue:255};if(a==="alaw")return{dataType:"alaw",sampleSize:1,littleEndian:!0,silentValue:213};const t=gy.exec(a);We(t);let i;t[1]==="u"?i="unsigned":t[1]==="s"?i="signed":i="float";const n=Number(t[2])/8,s=t[3]!=="be",r=a==="pcm-u8"?2**7:0;return{dataType:i,sampleSize:n,littleEndian:s,silentValue:r}},qf=a=>a.startsWith("avc1")||a.startsWith("avc3")?"avc":a.startsWith("hev1")||a.startsWith("hvc1")?"hevc":a==="vp8"?"vp8":a.startsWith("vp09")?"vp9":a.startsWith("av01")?"av1":Od.includes(a)?"prores":a==="mp3"||a==="mp4a.69"||a==="mp4a.6B"||a==="mp4a.6b"||a==="mp4a.40.34"?"mp3":a.startsWith("mp4a.40.")||a==="mp4a.67"?"aac":a==="opus"?"opus":a==="vorbis"?"vorbis":a==="flac"?"flac":a==="ac-3"||a==="ac3"?"ac3":a==="ec-3"||a==="eac3"?"eac3":Km.includes(a)?"dts":a==="ulaw"?"ulaw":a==="alaw"?"alaw":gy.test(a)?a:a==="webvtt"?"webvtt":null,oG=a=>a==="avc"?{avc:{format:"avc"}}:a==="hevc"?{hevc:{format:"hevc"}}:{},lG=a=>a==="aac"?{aac:{format:"aac"}}:a==="opus"?{opus:{format:"opus"}}:{},cG=["avc1","avc3","hev1","hvc1","vp8","vp09","av01",...Od],dG=/^(avc1|avc3)\.[0-9a-fA-F]{6}$/,uG=/^(hev1|hvc1)\.(?:[ABC]?\d+)\.[0-9a-fA-F]{1,8}\.[LH]\d+(?:\.[0-9a-fA-F]{1,2}){0,6}$/,fG=/^vp09(?:\.\d{2}){3}(?:(?:\.\d{2}){5})?$/,pG=/^av01\.\d\.\d{2}[MH]\.\d{2}(?:\.\d\.\d{3}\.\d{2}\.\d{2}\.\d{2}\.\d)?$/,Ym=(a,t)=>{if(!a)throw new TypeError("Video chunk metadata must be provided.");if(typeof a!="object")throw new TypeError("Video chunk metadata must be an object.");if(!a.decoderConfig)throw new TypeError("Video chunk metadata must include a decoder configuration.");if(typeof a.decoderConfig!="object")throw new TypeError("Video chunk metadata decoder configuration must be an object.");if(typeof a.decoderConfig.codec!="string")throw new TypeError("Video chunk metadata decoder configuration must specify a codec string.");if(!cG.some(i=>a.decoderConfig.codec.startsWith(i)))throw new TypeError("Video chunk metadata decoder configuration codec string must be a valid video codec string as specified in the Mediabunny Codec Registry.");if(!Number.isInteger(a.decoderConfig.codedWidth)||a.decoderConfig.codedWidth<=0)throw new TypeError("Video chunk metadata decoder configuration must specify a valid codedWidth (positive integer).");if(!Number.isInteger(a.decoderConfig.codedHeight)||a.decoderConfig.codedHeight<=0)throw new TypeError("Video chunk metadata decoder configuration must specify a valid codedHeight (positive integer).");if(a.decoderConfig.displayAspectWidth!==void 0&&(!Number.isInteger(a.decoderConfig.displayAspectWidth)||a.decoderConfig.displayAspectWidth<=0))throw new TypeError("Video chunk metadata decoder configuration displayAspectWidth, when defined, must be a positive integer.");if(a.decoderConfig.displayAspectHeight!==void 0&&(!Number.isInteger(a.decoderConfig.displayAspectHeight)||a.decoderConfig.displayAspectHeight<=0))throw new TypeError("Video chunk metadata decoder configuration displayAspectHeight, when defined, must be a positive integer.");if(a.decoderConfig.displayAspectWidth!==void 0!=(a.decoderConfig.displayAspectHeight!==void 0))throw new TypeError("Video chunk metadata decoder configuration must specify both displayAspectWidth and displayAspectHeight, or neither.");if(a.decoderConfig.description!==void 0&&!wf(a.decoderConfig.description))throw new TypeError("Video chunk metadata decoder configuration description, when defined, must be an ArrayBuffer or an ArrayBuffer view.");if(a.decoderConfig.colorSpace!==void 0){const{colorSpace:i}=a.decoderConfig;if(typeof i!="object")throw new TypeError("Video chunk metadata decoder configuration colorSpace, when provided, must be an object.");const n=Object.keys(Rd);if(i.primaries!=null&&!n.includes(i.primaries))throw new TypeError(`Video chunk metadata decoder configuration colorSpace primaries, when defined, must be one of ${n.join(", ")}.`);const s=Object.keys(Bd);if(i.transfer!=null&&!s.includes(i.transfer))throw new TypeError(`Video chunk metadata decoder configuration colorSpace transfer, when defined, must be one of ${s.join(", ")}.`);const r=Object.keys(Pd);if(i.matrix!=null&&!r.includes(i.matrix))throw new TypeError(`Video chunk metadata decoder configuration colorSpace matrix, when defined, must be one of ${r.join(", ")}.`);if(i.fullRange!=null&&typeof i.fullRange!="boolean")throw new TypeError("Video chunk metadata decoder configuration colorSpace fullRange, when defined, must be a boolean.")}if(a.decoderConfig.codec.startsWith("avc1")||a.decoderConfig.codec.startsWith("avc3")){if(!dG.test(a.decoderConfig.codec))throw new TypeError("Video chunk metadata decoder configuration codec string for AVC must be a valid AVC codec string as specified in Section 3.4 of RFC 6381.")}else if(a.decoderConfig.codec.startsWith("hev1")||a.decoderConfig.codec.startsWith("hvc1")){if(!uG.test(a.decoderConfig.codec))throw new TypeError("Video chunk metadata decoder configuration codec string for HEVC must be a valid HEVC codec string as specified in Section E.3 of ISO 14496-15.")}else if(a.decoderConfig.codec.startsWith("vp8")){if(a.decoderConfig.codec!=="vp8")throw new TypeError('Video chunk metadata decoder configuration codec string for VP8 must be "vp8".')}else if(a.decoderConfig.codec.startsWith("vp09")){if(!fG.test(a.decoderConfig.codec))throw new TypeError('Video chunk metadata decoder configuration codec string for VP9 must be a valid VP9 codec string as specified in Section "Codecs Parameter String" of https://www.webmproject.org/vp9/mp4/.')}else if(a.decoderConfig.codec.startsWith("av01")){if(!pG.test(a.decoderConfig.codec))throw new TypeError('Video chunk metadata decoder configuration codec string for AV1 must be a valid AV1 codec string as specified in Section "Codecs Parameter String" of https://aomediacodec.github.io/av1-isobmff/.')}else if(Od.some(i=>a.decoderConfig.codec.startsWith(i))&&!Od.some(i=>a.decoderConfig.codec===i))throw new TypeError(`Video chunk metadata decoder configuration codec string for ProRes must be one of the valid ProRes four-character codes: ${Od.join(", ")}.`);if(t!==null&&qf(a.decoderConfig.codec)!==t)throw new TypeError(`Video chunk metadata decoder configuration codec string '${a.decoderConfig.codec}' does not fit to the track codec '${t}'.`)},mG=["mp4a","mp3","opus","vorbis","flac","ulaw","alaw","pcm","ac-3","ec-3","dts"],Jm=(a,t)=>{if(!a)throw new TypeError("Audio chunk metadata must be provided.");if(typeof a!="object")throw new TypeError("Audio chunk metadata must be an object.");if(!a.decoderConfig)throw new TypeError("Audio chunk metadata must include a decoder configuration.");if(typeof a.decoderConfig!="object")throw new TypeError("Audio chunk metadata decoder configuration must be an object.");if(typeof a.decoderConfig.codec!="string")throw new TypeError("Audio chunk metadata decoder configuration must specify a codec string.");if(!mG.some(i=>a.decoderConfig.codec.startsWith(i)))throw new TypeError("Audio chunk metadata decoder configuration codec string must be a valid audio codec string as specified in the Mediabunny Codec Registry.");if(!Number.isInteger(a.decoderConfig.sampleRate)||a.decoderConfig.sampleRate<=0)throw new TypeError("Audio chunk metadata decoder configuration must specify a valid sampleRate (positive integer).");if(!Number.isInteger(a.decoderConfig.numberOfChannels)||a.decoderConfig.numberOfChannels<=0)throw new TypeError("Audio chunk metadata decoder configuration must specify a valid numberOfChannels (positive integer).");if(a.decoderConfig.description!==void 0&&!wf(a.decoderConfig.description))throw new TypeError("Audio chunk metadata decoder configuration description, when defined, must be an ArrayBuffer or an ArrayBuffer view.");if(a.decoderConfig.codec.startsWith("mp4a")&&a.decoderConfig.codec!=="mp4a.69"&&a.decoderConfig.codec!=="mp4a.6B"&&a.decoderConfig.codec!=="mp4a.6b"){if(!["mp4a.40.2","mp4a.40.02","mp4a.40.5","mp4a.40.05","mp4a.40.29","mp4a.67"].includes(a.decoderConfig.codec))throw new TypeError("Audio chunk metadata decoder configuration codec string for AAC must be a valid AAC codec string as specified in https://www.w3.org/TR/webcodecs-aac-codec-registration/.")}else if(a.decoderConfig.codec.startsWith("mp3")||a.decoderConfig.codec.startsWith("mp4a")){if(a.decoderConfig.codec!=="mp3"&&a.decoderConfig.codec!=="mp4a.69"&&a.decoderConfig.codec!=="mp4a.6B"&&a.decoderConfig.codec!=="mp4a.6b")throw new TypeError('Audio chunk metadata decoder configuration codec string for MP3 must be "mp3", "mp4a.69" or "mp4a.6B".')}else if(a.decoderConfig.codec.startsWith("opus")){if(a.decoderConfig.codec!=="opus")throw new TypeError('Audio chunk metadata decoder configuration codec string for Opus must be "opus".');if(a.decoderConfig.description&&a.decoderConfig.description.byteLength<18)throw new TypeError("Audio chunk metadata decoder configuration description, when specified, is expected to be an Identification Header as specified in Section 5.1 of RFC 7845.")}else if(a.decoderConfig.codec.startsWith("vorbis")){if(a.decoderConfig.codec!=="vorbis")throw new TypeError('Audio chunk metadata decoder configuration codec string for Vorbis must be "vorbis".');if(!a.decoderConfig.description)throw new TypeError("Audio chunk metadata decoder configuration for Vorbis must include a description, which is expected to adhere to the format described in https://www.w3.org/TR/webcodecs-vorbis-codec-registration/.")}else if(a.decoderConfig.codec.startsWith("flac")){if(a.decoderConfig.codec!=="flac")throw new TypeError('Audio chunk metadata decoder configuration codec string for FLAC must be "flac".');if(!a.decoderConfig.description||a.decoderConfig.description.byteLength<42)throw new TypeError("Audio chunk metadata decoder configuration for FLAC must include a description, which is expected to adhere to the format described in https://www.w3.org/TR/webcodecs-flac-codec-registration/.")}else if(a.decoderConfig.codec.startsWith("ac-3")||a.decoderConfig.codec.startsWith("ac3")){if(a.decoderConfig.codec!=="ac-3")throw new TypeError('Audio chunk metadata decoder configuration codec string for AC-3 must be "ac-3".')}else if(a.decoderConfig.codec.startsWith("ec-3")||a.decoderConfig.codec.startsWith("eac3")){if(a.decoderConfig.codec!=="ec-3")throw new TypeError('Audio chunk metadata decoder configuration codec string for EC-3 must be "ec-3".')}else if(a.decoderConfig.codec.startsWith("dts")){if(!Km.includes(a.decoderConfig.codec))throw new TypeError(`Audio chunk metadata decoder configuration codec string for DTS must be one of the following four-character codes: ${Km.join(", ")}.`)}else if((a.decoderConfig.codec.startsWith("pcm")||a.decoderConfig.codec.startsWith("ulaw")||a.decoderConfig.codec.startsWith("alaw"))&&!Ns.includes(a.decoderConfig.codec))throw new TypeError(`Audio chunk metadata decoder configuration codec string for PCM must be one of the supported PCM codecs (${Ns.join(", ")}).`);if(t!==null&&qf(a.decoderConfig.codec)!==t)throw new TypeError(`Audio chunk metadata decoder configuration codec string '${a.decoderConfig.codec}' does not fit to the track codec '${t}'.`)},hy=a=>{if(!a)throw new TypeError("Subtitle metadata must be provided.");if(typeof a!="object")throw new TypeError("Subtitle metadata must be an object.");if(!a.config)throw new TypeError("Subtitle metadata must include a config object.");if(typeof a.config!="object")throw new TypeError("Subtitle metadata config must be an object.");if(typeof a.config.description!="string")throw new TypeError("Subtitle metadata config description must be a string.")};const _y=new Uint8Array(0);class Hr{constructor(t,i,n,s,r=-1,o,l){if(this.data=t,this.type=i,this.timestamp=n,this.duration=s,this.sequenceNumber=r,t===_y&&o===void 0)throw new Error("Internal error: byteLength must be explicitly provided when constructing metadata-only packets.");if(o===void 0&&(o=t.byteLength),!(t instanceof Uint8Array))throw new TypeError("data must be a Uint8Array.");if(i!=="key"&&i!=="delta")throw new TypeError('type must be either "key" or "delta".');if(!Number.isFinite(n))throw new TypeError("timestamp must be a number.");if(!Number.isFinite(s)||s<0)throw new TypeError("duration must be a non-negative number.");if(!Number.isFinite(r))throw new TypeError("sequenceNumber must be a number.");if(!Number.isInteger(o)||o<0)throw new TypeError("byteLength must be a non-negative integer.");if(l!==void 0&&(typeof l!="object"||!l))throw new TypeError("sideData, when provided, must be an object.");if(l?.alpha!==void 0&&!(l.alpha instanceof Uint8Array))throw new TypeError("sideData.alpha, when provided, must be a Uint8Array.");if(l?.alphaByteLength!==void 0&&(!Number.isInteger(l.alphaByteLength)||l.alphaByteLength<0))throw new TypeError("sideData.alphaByteLength, when provided, must be a non-negative integer.");this.byteLength=o,this.sideData=l??{},this.sideData.alpha&&this.sideData.alphaByteLength===void 0&&(this.sideData.alphaByteLength=this.sideData.alpha.byteLength)}get isMetadataOnly(){return this.data===_y}get microsecondTimestamp(){return Math.trunc(Vo*this.timestamp)}get microsecondDuration(){return Math.trunc(Vo*this.duration)}toEncodedVideoChunk(){if(this.isMetadataOnly)throw new TypeError("Metadata-only packets cannot be converted to a video chunk.");if(typeof EncodedVideoChunk>"u")throw new Error("EncodedVideoChunk is not available in this environment.");return new EncodedVideoChunk({data:this.data,type:this.type,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration})}alphaToEncodedVideoChunk(t=this.type){if(!this.sideData.alpha)throw new TypeError("This packet does not contain alpha side data.");if(this.isMetadataOnly)throw new TypeError("Metadata-only packets cannot be converted to a video chunk.");if(typeof EncodedVideoChunk>"u")throw new Error("EncodedVideoChunk is not available in this environment.");return new EncodedVideoChunk({data:this.sideData.alpha,type:t,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration})}toEncodedAudioChunk(){if(this.isMetadataOnly)throw new TypeError("Metadata-only packets cannot be converted to an audio chunk.");if(typeof EncodedAudioChunk>"u")throw new Error("EncodedAudioChunk is not available in this environment.");return new EncodedAudioChunk({data:this.data,type:this.type,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration})}static fromEncodedChunk(t,i){if(!(t instanceof EncodedVideoChunk||t instanceof EncodedAudioChunk))throw new TypeError("chunk must be an EncodedVideoChunk or EncodedAudioChunk.");const n=new Uint8Array(t.byteLength);return t.copyTo(n),new Hr(n,t.type,t.timestamp/1e6,(t.duration??0)/1e6,void 0,void 0,i)}clone(t){if(t!==void 0&&(typeof t!="object"||t===null))throw new TypeError("options, when provided, must be an object.");if(t?.data!==void 0&&!(t.data instanceof Uint8Array))throw new TypeError("options.data, when provided, must be a Uint8Array.");if(t?.type!==void 0&&t.type!=="key"&&t.type!=="delta")throw new TypeError('options.type, when provided, must be either "key" or "delta".');if(t?.timestamp!==void 0&&!Number.isFinite(t.timestamp))throw new TypeError("options.timestamp, when provided, must be a number.");if(t?.duration!==void 0&&!Number.isFinite(t.duration))throw new TypeError("options.duration, when provided, must be a number.");if(t?.sequenceNumber!==void 0&&!Number.isFinite(t.sequenceNumber))throw new TypeError("options.sequenceNumber, when provided, must be a number.");if(t?.sideData!==void 0&&(typeof t.sideData!="object"||t.sideData===null))throw new TypeError("options.sideData, when provided, must be an object.");return new Hr(t?.data??this.data,t?.type??this.type,t?.timestamp??this.timestamp,t?.duration??this.duration,t?.sequenceNumber??this.sequenceNumber,this.byteLength,t?.sideData??this.sideData)}}const gG=a=>{let i=(a.hasVideo?"video/":a.hasAudio?"audio/":"application/")+(a.isQuickTime?"quicktime":"mp4");if(a.codecStrings.length>0){const n=[...new Set(a.codecStrings)];i+=`; codecs="${n.join(", ")}"`}return i};const Xm=8,vy=16;class Id{constructor(t){this.value=t}}class Zm{constructor(t){this.value=t}}class by{constructor(t){this.value=t}}class Ko{constructor(t){this.value=t}}var et;(function(a){a[a.EBML=440786851]="EBML",a[a.EBMLVersion=17030]="EBMLVersion",a[a.EBMLReadVersion=17143]="EBMLReadVersion",a[a.EBMLMaxIDLength=17138]="EBMLMaxIDLength",a[a.EBMLMaxSizeLength=17139]="EBMLMaxSizeLength",a[a.DocType=17026]="DocType",a[a.DocTypeVersion=17031]="DocTypeVersion",a[a.DocTypeReadVersion=17029]="DocTypeReadVersion",a[a.Void=236]="Void",a[a.Segment=408125543]="Segment",a[a.SeekHead=290298740]="SeekHead",a[a.Seek=19899]="Seek",a[a.SeekID=21419]="SeekID",a[a.SeekPosition=21420]="SeekPosition",a[a.Duration=17545]="Duration",a[a.Info=357149030]="Info",a[a.TimestampScale=2807729]="TimestampScale",a[a.MuxingApp=19840]="MuxingApp",a[a.WritingApp=22337]="WritingApp",a[a.Tracks=374648427]="Tracks",a[a.TrackEntry=174]="TrackEntry",a[a.TrackNumber=215]="TrackNumber",a[a.TrackUID=29637]="TrackUID",a[a.TrackType=131]="TrackType",a[a.FlagEnabled=185]="FlagEnabled",a[a.FlagDefault=136]="FlagDefault",a[a.FlagForced=21930]="FlagForced",a[a.FlagOriginal=21934]="FlagOriginal",a[a.FlagHearingImpaired=21931]="FlagHearingImpaired",a[a.FlagVisualImpaired=21932]="FlagVisualImpaired",a[a.FlagCommentary=21935]="FlagCommentary",a[a.FlagLacing=156]="FlagLacing",a[a.Name=21358]="Name",a[a.Language=2274716]="Language",a[a.LanguageBCP47=2274717]="LanguageBCP47",a[a.CodecID=134]="CodecID",a[a.CodecPrivate=25506]="CodecPrivate",a[a.CodecDelay=22186]="CodecDelay",a[a.SeekPreRoll=22203]="SeekPreRoll",a[a.DefaultDuration=2352003]="DefaultDuration",a[a.Video=224]="Video",a[a.PixelWidth=176]="PixelWidth",a[a.PixelHeight=186]="PixelHeight",a[a.DisplayWidth=21680]="DisplayWidth",a[a.DisplayHeight=21690]="DisplayHeight",a[a.DisplayUnit=21682]="DisplayUnit",a[a.AlphaMode=21440]="AlphaMode",a[a.Audio=225]="Audio",a[a.SamplingFrequency=181]="SamplingFrequency",a[a.Channels=159]="Channels",a[a.BitDepth=25188]="BitDepth",a[a.SimpleBlock=163]="SimpleBlock",a[a.BlockGroup=160]="BlockGroup",a[a.Block=161]="Block",a[a.BlockAdditions=30113]="BlockAdditions",a[a.BlockMore=166]="BlockMore",a[a.BlockAdditional=165]="BlockAdditional",a[a.BlockAddID=238]="BlockAddID",a[a.BlockDuration=155]="BlockDuration",a[a.ReferenceBlock=251]="ReferenceBlock",a[a.Cluster=524531317]="Cluster",a[a.Timestamp=231]="Timestamp",a[a.Cues=475249515]="Cues",a[a.CuePoint=187]="CuePoint",a[a.CueTime=179]="CueTime",a[a.CueTrackPositions=183]="CueTrackPositions",a[a.CueTrack=247]="CueTrack",a[a.CueClusterPosition=241]="CueClusterPosition",a[a.Colour=21936]="Colour",a[a.MatrixCoefficients=21937]="MatrixCoefficients",a[a.TransferCharacteristics=21946]="TransferCharacteristics",a[a.Primaries=21947]="Primaries",a[a.Range=21945]="Range",a[a.Projection=30320]="Projection",a[a.ProjectionType=30321]="ProjectionType",a[a.ProjectionPoseYaw=30323]="ProjectionPoseYaw",a[a.ProjectionPosePitch=30324]="ProjectionPosePitch",a[a.ProjectionPoseRoll=30325]="ProjectionPoseRoll",a[a.Attachments=423732329]="Attachments",a[a.AttachedFile=24999]="AttachedFile",a[a.FileDescription=18046]="FileDescription",a[a.FileName=18030]="FileName",a[a.FileMediaType=18016]="FileMediaType",a[a.FileData=18012]="FileData",a[a.FileUID=18094]="FileUID",a[a.Chapters=272869232]="Chapters",a[a.Tags=307544935]="Tags",a[a.Tag=29555]="Tag",a[a.Targets=25536]="Targets",a[a.TargetTypeValue=26826]="TargetTypeValue",a[a.TargetType=25546]="TargetType",a[a.TagTrackUID=25541]="TagTrackUID",a[a.TagEditionUID=25545]="TagEditionUID",a[a.TagChapterUID=25540]="TagChapterUID",a[a.TagAttachmentUID=25542]="TagAttachmentUID",a[a.SimpleTag=26568]="SimpleTag",a[a.TagName=17827]="TagName",a[a.TagLanguage=17530]="TagLanguage",a[a.TagString=17543]="TagString",a[a.TagBinary=17541]="TagBinary",a[a.ContentEncodings=28032]="ContentEncodings",a[a.ContentEncoding=25152]="ContentEncoding",a[a.ContentEncodingOrder=20529]="ContentEncodingOrder",a[a.ContentEncodingScope=20530]="ContentEncodingScope",a[a.ContentCompression=20532]="ContentCompression",a[a.ContentCompAlgo=16980]="ContentCompAlgo",a[a.ContentCompSettings=16981]="ContentCompSettings",a[a.ContentEncryption=20533]="ContentEncryption"})(et||(et={})),et.EBML,et.Segment,et.SeekHead,et.Info,et.Cluster,et.Tracks,et.Cues,et.Attachments,et.Chapters,et.Tags;const yy=a=>a<256?1:a<65536?2:a<1<<24?3:a<2**32?4:a<2**40?5:6,wy=a=>a<1n<<8n?1:a<1n<<16n?2:a<1n<<24n?3:a<1n<<32n?4:a<1n<<40n?5:a<1n<<48n?6:a<1n<<56n?7:8,ky=a=>a>=-64&&a<64?1:a>=-8192&&a<8192?2:a>=-1048576&&a<1<<20?3:a>=-134217728&&a<1<<27?4:a>=-17179869184&&a<2**34?5:6,hG=a=>{if(a<127)return 1;if(a<16383)return 2;if(a<(1<<21)-1)return 3;if(a<(1<<28)-1)return 4;if(a<2**35-1)return 5;if(a<2**42-1)return 6;throw new Error("EBML varint size not supported "+a)};class _G{constructor(t){this.writer=t,this.helper=new Uint8Array(8),this.helperView=new DataView(this.helper.buffer),this.offsets=new WeakMap,this.dataOffsets=new WeakMap}writeByte(t){this.helperView.setUint8(0,t),this.writer.write(this.helper.subarray(0,1))}writeFloat32(t){this.helperView.setFloat32(0,t,!1),this.writer.write(this.helper.subarray(0,4))}writeFloat64(t){this.helperView.setFloat64(0,t,!1),this.writer.write(this.helper)}writeUnsignedInt(t,i=yy(t)){let n=0;switch(i){case 6:this.helperView.setUint8(n++,t/2**40|0);case 5:this.helperView.setUint8(n++,t/2**32|0);case 4:this.helperView.setUint8(n++,t>>24);case 3:this.helperView.setUint8(n++,t>>16);case 2:this.helperView.setUint8(n++,t>>8);case 1:this.helperView.setUint8(n++,t);break;default:throw new Error("Bad unsigned int size "+i)}this.writer.write(this.helper.subarray(0,n))}writeUnsignedBigInt(t,i=wy(t)){let n=0;for(let s=i-1;s>=0;s--)this.helperView.setUint8(n++,Number(t>>BigInt(s*8)&0xffn));this.writer.write(this.helper.subarray(0,n))}writeSignedInt(t,i=ky(t)){t<0&&(t+=2**(i*8)),this.writeUnsignedInt(t,i)}writeVarInt(t,i=hG(t)){let n=0;switch(i){case 1:this.helperView.setUint8(n++,128|t);break;case 2:this.helperView.setUint8(n++,64|t>>8),this.helperView.setUint8(n++,t);break;case 3:this.helperView.setUint8(n++,32|t>>16),this.helperView.setUint8(n++,t>>8),this.helperView.setUint8(n++,t);break;case 4:this.helperView.setUint8(n++,16|t>>24),this.helperView.setUint8(n++,t>>16),this.helperView.setUint8(n++,t>>8),this.helperView.setUint8(n++,t);break;case 5:this.helperView.setUint8(n++,8|t/2**32&7),this.helperView.setUint8(n++,t>>24),this.helperView.setUint8(n++,t>>16),this.helperView.setUint8(n++,t>>8),this.helperView.setUint8(n++,t);break;case 6:this.helperView.setUint8(n++,4|t/2**40&3),this.helperView.setUint8(n++,t/2**32|0),this.helperView.setUint8(n++,t>>24),this.helperView.setUint8(n++,t>>16),this.helperView.setUint8(n++,t>>8),this.helperView.setUint8(n++,t);break;default:throw new Error("Bad EBML varint size "+i)}this.writer.write(this.helper.subarray(0,n))}writeAsciiString(t){this.writer.write(new Uint8Array(t.split("").map(i=>i.charCodeAt(0))))}writeEBML(t){if(t!==null)if(t instanceof Uint8Array)this.writer.write(t);else if(Array.isArray(t))for(const i of t)this.writeEBML(i);else if(this.offsets.set(t,this.writer.getPos()),this.writeUnsignedInt(t.id),Array.isArray(t.data)){const i=this.writer.getPos(),n=t.size===-1?1:t.size??4;t.size===-1?this.writeByte(255):this.writer.seek(this.writer.getPos()+n);const s=this.writer.getPos();if(this.dataOffsets.set(t,s),this.writeEBML(t.data),t.size!==-1){const r=this.writer.getPos()-s,o=this.writer.getPos();this.writer.seek(i),this.writeVarInt(r,n),this.writer.seek(o)}}else if(typeof t.data=="number"){const i=t.size??yy(t.data);this.writeVarInt(i),this.writeUnsignedInt(t.data,i)}else if(typeof t.data=="bigint"){const i=t.size??wy(t.data);this.writeVarInt(i),this.writeUnsignedBigInt(t.data,i)}else if(typeof t.data=="string")this.writeVarInt(t.data.length),this.writeAsciiString(t.data);else if(t.data instanceof Uint8Array)this.writeVarInt(t.data.byteLength,t.size),this.writer.write(t.data);else if(t.data instanceof Id)this.writeVarInt(4),this.writeFloat32(t.data.value);else if(t.data instanceof Zm)this.writeVarInt(8),this.writeFloat64(t.data.value);else if(t.data instanceof by){const i=t.size??ky(t.data.value);this.writeVarInt(i),this.writeSignedInt(t.data.value,i)}else if(t.data instanceof Ko){const i=ws.encode(t.data.value);this.writeVarInt(i.length),this.writer.write(i)}else yo(t.data)}}const vG={avc:"V_MPEG4/ISO/AVC",hevc:"V_MPEGH/ISO/HEVC",vp8:"V_VP8",vp9:"V_VP9",av1:"V_AV1",prores:"V_PRORES",aac:"A_AAC",mp3:"A_MPEG/L3",opus:"A_OPUS",vorbis:"A_VORBIS",flac:"A_FLAC",ac3:"A_AC3",eac3:"A_EAC3",dts:"A_DTS","pcm-u8":"A_PCM/INT/LIT","pcm-s16":"A_PCM/INT/LIT","pcm-s16be":"A_PCM/INT/BIG","pcm-s24":"A_PCM/INT/LIT","pcm-s24be":"A_PCM/INT/BIG","pcm-s32":"A_PCM/INT/LIT","pcm-s32be":"A_PCM/INT/BIG","pcm-f32":"A_PCM/FLOAT/IEEE","pcm-f64":"A_PCM/FLOAT/IEEE",webvtt:"S_TEXT/WEBVTT"};const bG=a=>{let i=(a.hasVideo?"video/":a.hasAudio?"audio/":"application/")+(a.isWebM?"webm":"x-matroska");if(a.codecStrings.length>0){const n=[...new Set(a.codecStrings.filter(Boolean))];i+=`; codecs="${n.join(", ")}"`}return i};const xy=7,Sy=9,Cf=a=>{const t=a.filePos,i=jG(a,9),n=new Mn(i);if(n.readBits(12)!==4095||(n.skipBits(1),n.readBits(2)!==0))return null;const o=n.readBits(1),l=n.readBits(2)+1,c=n.readBits(4);if(c===15)return null;n.skipBits(1);const d=n.readBits(3);if(d===0)throw new Error("ADTS frames with channel configuration 0 are not supported.");n.skipBits(1),n.skipBits(1),n.skipBits(1),n.skipBits(1);const g=n.readBits(13);n.skipBits(11);const h=n.readBits(2)+1;if(h!==1)throw new Error("ADTS frames with more than one AAC frame are not supported.");let m=null;return o===1?a.filePos-=2:m=n.readBits(16),{objectType:l,samplingFrequencyIndex:c,channelConfiguration:d,frameLength:g,numberOfAacFrames:h,crcCheck:m,startPos:t}};var yG=function(a,t,i){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],i&&(s=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(r){return Promise.reject(r)}}),a.stack.push({value:t,dispose:n,async:i})}else i&&a.stack.push({async:!0});return t},wG=(function(a){return function(t){function i(o){t.error=t.hasError?new a(o,t.error,"An error was suppressed during disposal."):o,t.hasError=!0}var n,s=0;function r(){for(;n=t.stack.pop();)try{if(!n.async&&s===1)return s=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return s|=2,Promise.resolve(o).then(r,function(l){return i(l),r()})}else s|=1}catch(l){i(l)}if(s===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return r()}})(typeof SuppressedError=="function"?SuppressedError:function(a,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=a,n.suppressed=t,n});dA();let Ty=-1/0,$y=-1/0,Dd=null;typeof FinalizationRegistry<"u"&&(Dd=new FinalizationRegistry(a=>{const t=performance.now();a.type==="video"?(t-Ty>=1e3&&(mn._error("A VideoSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your VideoSamples as soon as you're done using them."),Ty=t),typeof VideoFrame<"u"&&a.data instanceof VideoFrame&&a.data.close()):(t-$y>=1e3&&(mn._error("An AudioSample was garbage collected without first being closed. For proper resource management, make sure to call close() on all your AudioSamples as soon as you're done using them."),$y=t),typeof AudioData<"u"&&a.data instanceof AudioData&&a.data.close())}));class Pl{constructor(){this._referenceCount=0,this._lastAllocationBuffer=null}}const e0=["I420","I420P10","I420P12","I420A","I420AP10","I420AP12","I422","I422P10","I422P12","I422A","I422AP10","I422AP12","I444","I444P10","I444P12","I444A","I444AP10","I444AP12","NV12","RGBA","RGBX","BGRA","BGRX"],kG=new Set(e0);class Os{get codedWidth(){return this.visibleRect.width}get codedHeight(){return this.visibleRect.height}get displayWidth(){return this.rotation%180===0?this.squarePixelWidth:this.squarePixelHeight}get displayHeight(){return this.rotation%180===0?this.squarePixelHeight:this.squarePixelWidth}get microsecondTimestamp(){return Math.trunc(Vo*this.timestamp)}get microsecondDuration(){return Math.trunc(Vo*this.duration)}get hasAlpha(){return this.format&&this.format.includes("A")}constructor(t,i){if(this._closed=!1,t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||ArrayBuffer.isView(t)){if(!i||typeof i!="object")throw new TypeError("init must be an object.");if(i.format===void 0||!kG.has(i.format))throw new TypeError("init.format must be one of: "+e0.join(", "));if(!Number.isInteger(i.codedWidth)||i.codedWidth<=0)throw new TypeError("init.codedWidth must be a positive integer.");if(!Number.isInteger(i.codedHeight)||i.codedHeight<=0)throw new TypeError("init.codedHeight must be a positive integer.");if(i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("init.rotation, when provided, must be 0, 90, 180, or 270.");if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("init.flip, when provided, must be a boolean.");if(!Number.isFinite(i.timestamp))throw new TypeError("init.timestamp must be a number.");if(i.duration!==void 0&&(!Number.isFinite(i.duration)||i.duration<0))throw new TypeError("init.duration, when provided, must be a non-negative number.");if(i.layout!==void 0){if(!Array.isArray(i.layout))throw new TypeError("init.layout, when provided, must be an array.");for(const r of i.layout){if(!r||typeof r!="object"||Array.isArray(r))throw new TypeError("Each entry in init.layout must be an object.");if(!Number.isInteger(r.offset)||r.offset<0)throw new TypeError("plane.offset must be a non-negative integer.");if(!Number.isInteger(r.stride)||r.stride<0)throw new TypeError("plane.stride must be a non-negative integer.")}}if(i.visibleRect!==void 0&&Im(i.visibleRect,"init.visibleRect"),i.displayWidth!==void 0&&(!Number.isInteger(i.displayWidth)||i.displayWidth<=0))throw new TypeError("init.displayWidth, when provided, must be a positive integer.");if(i.displayHeight!==void 0&&(!Number.isInteger(i.displayHeight)||i.displayHeight<=0))throw new TypeError("init.displayHeight, when provided, must be a positive integer.");if(i.displayWidth!==void 0!=(i.displayHeight!==void 0))throw new TypeError("init.displayWidth and init.displayHeight must be either both provided or both omitted.");this.format=i.format,this.rotation=i.rotation??0,this.flip=i.flip??!1,this.timestamp=i.timestamp,this.duration=i.duration??0;const n=i.layout??TG(i.format,i.codedWidth,i.codedHeight);let s=i.colorSpace??null;s===null&&(this.format==="RGBA"||this.format==="RGBX"||this.format==="BGRA"||this.format==="BGRX"?s={primaries:"bt709",transfer:"iec61966-2-1",matrix:"rgb",fullRange:!0}:s={primaries:"bt709",transfer:"bt709",matrix:"bt709",fullRange:!1}),this.visibleRect={left:i.visibleRect?.left??0,top:i.visibleRect?.top??0,width:i.visibleRect?.width??i.codedWidth,height:i.visibleRect?.height??i.codedHeight},i.displayWidth!==void 0?(this.squarePixelWidth=this.rotation%180===0?i.displayWidth:i.displayHeight,this.squarePixelHeight=this.rotation%180===0?i.displayHeight:i.displayWidth):(this.squarePixelWidth=this.visibleRect.width,this.squarePixelHeight=this.visibleRect.height),this._data=i._doNotCopy?Gs(t):Gs(t).slice(),this._layout=n,this.colorSpace=new t0(s)}else if(typeof VideoFrame<"u"&&t instanceof VideoFrame){if(i?.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("init.rotation, when provided, must be 0, 90, 180, or 270.");if(i?.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("init.flip, when provided, must be a boolean.");if(i?.timestamp!==void 0&&!Number.isFinite(i?.timestamp))throw new TypeError("init.timestamp, when provided, must be a number.");if(i?.duration!==void 0&&(!Number.isFinite(i.duration)||i.duration<0))throw new TypeError("init.duration, when provided, must be a non-negative number.");i?.visibleRect!==void 0&&Im(i.visibleRect,"init.visibleRect"),this._data=t,this._layout=null,this.format=t.format,this.visibleRect={left:t.visibleRect?.x??0,top:t.visibleRect?.y??0,width:t.visibleRect?.width??t.codedWidth,height:t.visibleRect?.height??t.codedHeight},this.rotation=i?.rotation??0,this.flip=i?.flip??!1,this.squarePixelWidth=t.displayWidth,this.squarePixelHeight=t.displayHeight,this.timestamp=i?.timestamp??t.timestamp/1e6,this.duration=i?.duration??(t.duration??0)/1e6,this.colorSpace=new t0(t.colorSpace)}else if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof SVGImageElement<"u"&&t instanceof SVGImageElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas){if(!i||typeof i!="object")throw new TypeError("init must be an object.");if(i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("init.rotation, when provided, must be 0, 90, 180, or 270.");if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("init.flip, when provided, must be a boolean.");if(!Number.isFinite(i.timestamp))throw new TypeError("init.timestamp must be a number.");if(i.duration!==void 0&&(!Number.isFinite(i.duration)||i.duration<0))throw new TypeError("init.duration, when provided, must be a non-negative number.");if(i.visibleRect!==void 0&&Im(i.visibleRect,"init.visibleRect"),typeof VideoFrame<"u")return new Os(new VideoFrame(t,{timestamp:Math.trunc(i.timestamp*Vo),duration:Math.trunc((i.duration??0)*Vo)||void 0,visibleRect:i.visibleRect&&{x:i.visibleRect.left,y:i.visibleRect.top,width:i.visibleRect.width,height:i.visibleRect.height}}),i);let n=0,s=0;if("naturalWidth"in t?(n=t.naturalWidth,s=t.naturalHeight):"videoWidth"in t?(n=t.videoWidth,s=t.videoHeight):"width"in t&&(n=Number(t.width),s=Number(t.height)),!n||!s)throw new TypeError("Could not determine dimensions.");const r=i.visibleRect??{left:0,top:0,width:n,height:s},o=new OffscreenCanvas(r.width,r.height),l=o.getContext("2d",{alpha:Wb(),willReadFrequently:!0});if(!l)throw new Error("OffscreenCanvas must have support for the '2d' context in order to create a VideoSample from this data.");l.drawImage(t,-r.left,-r.top),this._data=o,this._layout=null,this.format="RGBX",this.visibleRect={left:0,top:0,width:r.width,height:r.height},this.squarePixelWidth=r.width,this.squarePixelHeight=r.height,this.rotation=i.rotation??0,this.flip=i.flip??!1,this.timestamp=i.timestamp,this.duration=i.duration??0,this.colorSpace=new t0({matrix:"rgb",primaries:"bt709",transfer:"iec61966-2-1",fullRange:!0})}else if(t instanceof Pl){if(!i||typeof i!="object")throw new TypeError("init must be an object.");if(i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("init.rotation, when provided, must be 0, 90, 180, or 270.");if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("init.flip, when provided, must be a boolean.");if(!Number.isFinite(i.timestamp))throw new TypeError("init.timestamp must be a number.");if(i.duration!==void 0&&(!Number.isFinite(i.duration)||i.duration<0))throw new TypeError("init.duration, when provided, must be a non-negative number.");if(this._data=t,t._referenceCount++,this.format=t.getFormat(),this.format!==null&&!e0.includes(this.format))throw new TypeError("getFormat() must return a VideoSamplePixelFormat or null.");if(this.visibleRect={left:0,top:0,width:t.getCodedWidth(),height:t.getCodedHeight()},!Number.isInteger(this.visibleRect.width)||this.visibleRect.width<=0)throw new TypeError("getCodedWidth() must return a positive integer.");if(!Number.isInteger(this.visibleRect.height)||this.visibleRect.height<=0)throw new TypeError("getCodedHeight() must return a positive integer.");if(this.squarePixelWidth=t.getSquarePixelWidth(),!Number.isInteger(this.squarePixelWidth)||this.squarePixelWidth<=0)throw new TypeError("getSquarePixelWidth() must return a positive integer.");if(this.squarePixelHeight=t.getSquarePixelHeight(),!Number.isInteger(this.squarePixelHeight)||this.squarePixelHeight<=0)throw new TypeError("getSquarePixelHeight() must return a positive integer.");this.rotation=i.rotation??0,this.flip=i.flip??!1,this.timestamp=i.timestamp,this.duration=i.duration??0,this.colorSpace=t.getColorSpace()}else throw new TypeError("Invalid data type: Must be a BufferSource, CanvasImageSource, or VideoSampleResource.");this.encodeOptions=i?.encodeOptions??{},this.pixelAspectRatio=Om({num:this.squarePixelWidth*this.codedHeight,den:this.squarePixelHeight*this.codedWidth}),Dd?.register(this,{type:"video",data:this._data},this)}clone(){if(this._closed)throw new Error("VideoSample is closed.");return We(this._data!==null),this._data instanceof Pl?new Os(this._data,{timestamp:this.timestamp,duration:this.duration,rotation:this.rotation,flip:this.flip,encodeOptions:this.encodeOptions}):Vd(this._data)?new Os(this._data.clone(),{timestamp:this.timestamp,duration:this.duration,rotation:this.rotation,flip:this.flip,encodeOptions:this.encodeOptions}):this._data instanceof Uint8Array?(We(this._layout),new Os(this._data,{format:this.format,layout:this._layout,codedWidth:this.codedWidth,codedHeight:this.codedHeight,timestamp:this.timestamp,duration:this.duration,colorSpace:this.colorSpace,rotation:this.rotation,flip:this.flip,visibleRect:this.visibleRect,displayWidth:this.displayWidth,displayHeight:this.displayHeight,encodeOptions:this.encodeOptions,_doNotCopy:!0})):new Os(this._data,{format:this.format,codedWidth:this.codedWidth,codedHeight:this.codedHeight,timestamp:this.timestamp,duration:this.duration,colorSpace:this.colorSpace,rotation:this.rotation,flip:this.flip,visibleRect:this.visibleRect,displayWidth:this.displayWidth,displayHeight:this.displayHeight,encodeOptions:this.encodeOptions})}close(){this._closed||(Dd?.unregister(this),this._data instanceof Pl?(this._data._referenceCount--,this._data._referenceCount===0&&this._data.close()):Vd(this._data)?this._data.close():this._data=null,this._closed=!0)}allocationSize(t={}){if(Gy(t),this._closed)throw new Error("VideoSample is closed.");if((t.format??this.format)==null)throw new Error("Cannot get allocation size when format is null.");return Vd(this._data)?this._data.allocationSize(t):Fy(this,t).allocationSize}async copyTo(t,i={}){if(!wf(t))throw new TypeError("destination must be an ArrayBuffer or an ArrayBuffer view.");if(Gy(i),this._closed)throw new Error("VideoSample is closed.");if((i.format??this.format)==null)throw new Error("Cannot copy video sample data when format is null.");if(We(this._data!==null),Vd(this._data))return this._data.copyTo(t,i);if(i.format&&!["RGBA","RGBX","BGRA","BGRX"].includes(this.format)&&["RGBA","RGBX","BGRA","BGRX"].includes(i.format))if(this._data instanceof Pl){const d={stack:[],error:void 0,hasError:!1};try{const g=yG(d,await this._data.toRgbSample({timestamp:this.timestamp,duration:this.duration,rotation:this.rotation,flip:this.flip},i.colorSpace??"srgb"),!1);if(!(g instanceof Os))throw new TypeError("toRgbSample() must return a VideoSample.");if(!["RGBA","RGBX","BGRA","BGRX"].includes(g.format))throw new Error(`Sample returned by toRgbSample was expected to have an RGB format, got '${g.format}' instead.`);return await g.copyTo(t,i)}catch(g){d.error=g,d.hasError=!0}finally{wG(d)}}else{if(typeof VideoFrame>"u")throw new Error("For this sample, converting from a non-RGB to an RGB format requires VideoFrame to be defined.");const d=this.toVideoFrame(),g=await d.copyTo(t,i);return d.close(),g}const n=Fy(this,i);We(this.format);const s=Gs(t);if(s.byteLength!(g.data instanceof Uint8Array)||!Number.isInteger(g.stride)||g.stride<0))throw new TypeError('getDataPlanes() must return an array of objects with a Uint8Array "data" property and a non-negative integer "stride" property.');o=d}else if(this._data instanceof Uint8Array)We(this._layout),We(this._layout.length===r.length),o=this._layout.map((d,g)=>{const h=Math.ceil(this.codedHeight/r[g].heightDivisor);return{data:this._data.subarray(d.offset,d.offset+d.stride*h),stride:d.stride}});else{const g=this._data.getContext("2d");We(g);const h=g.getImageData(0,0,this.codedWidth,this.codedHeight);o=[{data:Gs(h.data),stride:4*this.codedWidth}]}const l=[],c=r.length;for(let d=0;dm.byteLength)throw new Error("Source buffer OOB read.");if(u+f>s.byteLength)throw new Error("Destination buffer OOB write.");const b=m.subarray(p,p+f);s.set(b,u),p+=h,u+=g.destinationStride}l.push(_)}if(i.format!==void 0){const d=this.format.startsWith("RGB")!==i.format.startsWith("RGB"),g=this.format.includes("X")&&i.format.includes("A");if(d||g)for(let h=0;ho+l.data.byteLength,0),n=new Uint8Array(i);let s=0;const r=[];for(const o of t)n.set(o.data,s),r.push(s),s+=o.data.byteLength;return new VideoFrame(n,{format:this.format,layout:t.map((o,l)=>({offset:r[l],stride:o.stride})),codedWidth:this.codedWidth,codedHeight:this.codedHeight,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration,colorSpace:this.colorSpace,visibleRect:this.visibleRect,displayWidth:this.squarePixelWidth,displayHeight:this.squarePixelHeight})}else return Vd(this._data)?new VideoFrame(this._data,{timestamp:this.microsecondTimestamp,duration:this.microsecondDuration||void 0}):this._data instanceof Uint8Array?(We(this._layout),new VideoFrame(this._data,{format:this.format,codedWidth:this.codedWidth,codedHeight:this.codedHeight,layout:this._layout,timestamp:this.microsecondTimestamp,duration:this.microsecondDuration||void 0,colorSpace:this.colorSpace,visibleRect:this.visibleRect,displayWidth:this.squarePixelWidth,displayHeight:this.squarePixelHeight})):new VideoFrame(this._data,{timestamp:this.microsecondTimestamp,duration:this.microsecondDuration||void 0})}draw(t,i,n,s,r,o,l,c,d){let g=0,h=0,m=this.displayWidth,p=this.displayHeight,u=0,f=0,_=this.displayWidth,v=this.displayHeight;if(o!==void 0?(g=i,h=n,m=s,p=r,u=o,f=l,c!==void 0?(_=c,v=d):(_=m,v=p)):(u=i,f=n,s!==void 0&&(_=s,v=r)),!(typeof CanvasRenderingContext2D<"u"&&t instanceof CanvasRenderingContext2D||typeof OffscreenCanvasRenderingContext2D<"u"&&t instanceof OffscreenCanvasRenderingContext2D))throw new TypeError("context must be a CanvasRenderingContext2D or OffscreenCanvasRenderingContext2D.");if(!Number.isFinite(g))throw new TypeError("sx must be a number.");if(!Number.isFinite(h))throw new TypeError("sy must be a number.");if(!Number.isFinite(m)||m<0)throw new TypeError("sWidth must be a non-negative number.");if(!Number.isFinite(p)||p<0)throw new TypeError("sHeight must be a non-negative number.");if(!Number.isFinite(u))throw new TypeError("dx must be a number.");if(!Number.isFinite(f))throw new TypeError("dy must be a number.");if(!Number.isFinite(_)||_<0)throw new TypeError("dWidth must be a non-negative number.");if(!Number.isFinite(v)||v<0)throw new TypeError("dHeight must be a non-negative number.");if(this._closed)throw new Error("VideoSample is closed.");({sx:g,sy:h,sWidth:m,sHeight:p}=this._unmapSourceRegion(g,h,m,p,this.rotation,this.flip));const b=this.toCanvasImageSource();t.save();const S=u+_/2,$=f+v/2;t.translate(S,$),this.flip&&t.scale(-1,1),t.rotate(this.rotation*Math.PI/180);const M=this.rotation%180===0?1:_/v;t.scale(1/M,M),t.drawImage(b,g,h,m,p,-_/2,-v/2,_,v),t.restore()}drawWithFit(t,i){if(!(typeof CanvasRenderingContext2D<"u"&&t instanceof CanvasRenderingContext2D||typeof OffscreenCanvasRenderingContext2D<"u"&&t instanceof OffscreenCanvasRenderingContext2D))throw new TypeError("context must be a CanvasRenderingContext2D or OffscreenCanvasRenderingContext2D.");if(!i||typeof i!="object")throw new TypeError("options must be an object.");if(!["fill","contain","cover"].includes(i.fit))throw new TypeError("options.fit must be 'fill', 'contain', or 'cover'.");if(i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError("options.rotation, when provided, must be 0, 90, 180, or 270.");if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("options.flip, when provided, must be a boolean.");i.crop!==void 0&&a0(i.crop,"options.");const n=t.canvas.width,s=t.canvas.height,r=i.rotation??this.rotation,o=i.flip??this.flip,[l,c]=r%180===0?[this.squarePixelWidth,this.squarePixelHeight]:[this.squarePixelHeight,this.squarePixelWidth];let d=i.crop;d&&(d=Ay(d,l,c));let g,h,m,p;const{sx:u,sy:f,sWidth:_,sHeight:v}=this._unmapSourceRegion(i.crop?.left??0,i.crop?.top??0,i.crop?.width??l,i.crop?.height??c,r,o);if(i.fit==="fill")g=0,h=0,m=n,p=s;else{const[S,$]=i.crop?[i.crop.width,i.crop.height]:[l,c],M=i.fit==="contain"?Math.min(n/S,s/$):Math.max(n/S,s/$);m=S*M,p=$*M,g=(n-m)/2,h=(s-p)/2}t.save();const b=r%180===0?1:m/p;t.translate(n/2,s/2),o&&t.scale(-1,1),t.rotate(r*Math.PI/180),t.scale(1/b,b),t.translate(-n/2,-s/2),t.drawImage(this.toCanvasImageSource(),u,f,_,v,g,h,m,p),t.restore()}_unmapSourceRegion(t,i,n,s,r,o){return o&&(t=(r%180===0?this.squarePixelWidth:this.squarePixelHeight)-t-n),r===90?[t,i,n,s]=[i,this.squarePixelHeight-t-n,s,n]:r===180?[t,i]=[this.squarePixelWidth-t-n,this.squarePixelHeight-i-s]:r===270&&([t,i,n,s]=[this.squarePixelWidth-i-s,t,s,n]),{sx:t,sy:i,sWidth:n,sHeight:s}}_drawWithFitAndMipmapping(t,i,n){const s=t.width,r=t.height,[o,l]=n.rotation%180===0?[this.squarePixelWidth,this.squarePixelHeight]:[this.squarePixelHeight,this.squarePixelWidth],c=n.crop?n.crop.width:o,d=n.crop?n.crop.height:l;let g=0;2*s0?Cy(h,m):{canvas:t,context:i,isNew:n.targetIsFresh};u.imageSmoothingQuality="high",n.fillBlack?(u.fillStyle="black",u.fillRect(0,0,h,m)):f||u.clearRect(0,0,h,m),this.drawWithFit(u,{fit:n.fit,rotation:n.rotation,flip:n.flip,crop:n.crop}),u.globalCompositeOperation="copy";for(let _=g;_>1;_--){const v=s*2**_,b=r*2**_;u.drawImage(p,0,0,v,b,0,0,v/2,b/2)}u.globalCompositeOperation="source-over",g>0&&(i.imageSmoothingQuality="high",i.globalCompositeOperation="copy",i.drawImage(p,0,0,2*s,2*r,0,0,s,r),i.globalCompositeOperation="source-over")}toCanvasImageSource(){if(this._closed)throw new Error("VideoSample is closed.");if(We(this._data!==null),this._data instanceof Pl||this._data instanceof Uint8Array){const t=this.toVideoFrame();return queueMicrotask(()=>t.close()),t}else return this._data}async transform(t){if(!t||typeof t!="object")throw new TypeError("options must be an object.");if(t.width!==void 0&&(!Number.isInteger(t.width)||t.width<=0))throw new TypeError("options.width, when provided, must be a positive integer.");if(t.height!==void 0&&(!Number.isInteger(t.height)||t.height<=0))throw new TypeError("options.height, when provided, must be a positive integer.");if(t.roundDimensionsTo!==void 0&&(!Number.isInteger(t.roundDimensionsTo)||t.roundDimensionsTo<=0))throw new TypeError("options.roundDimensionsTo, when provided, must be a positive integer.");if(t.fit!==void 0&&!["fill","contain","cover"].includes(t.fit))throw new TypeError('options.fit, when provided, must be one of "fill", "contain", or "cover".');if(t.width!==void 0&&t.height!==void 0&&t.fit===void 0)throw new TypeError("When both options.width and options.height are provided, options.fit must also be provided.");if(t.rotate!==void 0&&![0,90,180,270].includes(t.rotate))throw new TypeError("options.rotate, when provided, must be 0, 90, 180 or 270.");if(t.flip!==void 0&&typeof t.flip!="boolean")throw new TypeError("options.flip, when provided, must be a boolean.");if(t.crop!==void 0&&a0(t.crop,"options."),t.alpha!==void 0&&!["keep","discard"].includes(t.alpha))throw new TypeError("options.alpha, when provided, must be 'keep' or 'discard'.");const{rotation:i,flip:n}=QC(this.rotation,this.flip,t.rotate??0,t.flip??!1),[s,r]=i%180===0?[this.squarePixelWidth,this.squarePixelHeight]:[this.squarePixelHeight,this.squarePixelWidth];let o=t.crop;o&&(o=Ay(o,s,r));const l=o?o.width:s,c=o?o.height:r,d=l/c;let g,h;t.width!==void 0&&t.height===void 0?(g=t.width,h=g/d):t.width===void 0&&t.height!==void 0?(h=t.height,g=h*d):t.width!==void 0&&t.height!==void 0?(g=t.width,h=t.height):(g=l,h=c),g=Rm(g,t.roundDimensionsTo??1),h=Rm(h,t.roundDimensionsTo??1);const m={width:g,height:h,fit:t.fit??"fill",rotation:i,flip:n,crop:o??{left:0,top:0,width:s,height:r},alpha:t.alpha??"keep"};for(const _ of xG){let v=_(this,m);if(Ho(v)&&(v=await v),v!==null)return v}const{canvas:p,context:u,isNew:f}=Cy(m.width,m.height);return this._drawWithFitAndMipmapping(p,u,{fit:m.fit,rotation:m.rotation,flip:m.flip,crop:m.crop,targetIsFresh:f,fillBlack:m.alpha==="discard"}),new Os(p,{timestamp:this.timestamp,duration:this.duration,rotation:0,flip:!1})}setRotation(t){if(![0,90,180,270].includes(t))throw new TypeError("newRotation must be 0, 90, 180, or 270.");this.rotation=t}setFlip(t){if(typeof t!="boolean")throw new TypeError("newFlip must be a boolean.");this.flip=t}setTimestamp(t){if(!Number.isFinite(t))throw new TypeError("newTimestamp must be a number.");this.timestamp=t}setDuration(t){if(!Number.isFinite(t)||t<0)throw new TypeError("newDuration must be a non-negative number.");this.duration=t}setEncodeOptions(t){if(!t||typeof t!="object")throw new TypeError("newEncodeOptions must be an object.");this.encodeOptions=t}[Symbol.dispose](){this.close()}}const xG=[],SG=3,Ld=[];let qy=0;const Cy=(a,t)=>{for(const s of Ld)if(s.canvas.width===a&&s.canvas.height===t)return s.age=qy++,{canvas:s.canvas,context:s.context,isNew:!1};let i;if(typeof OffscreenCanvas<"u")i=new OffscreenCanvas(a,t);else{if(typeof window>"u"||typeof document>"u")throw new Error("Cannot transform VideoSamples in this environment. Either run in an environment with OffscreenCanvas or HTMLCanvasElement, or supply a custom VideoSample transformer using registerVideoSampleTransformer().");i=document.createElement("canvas"),i.width=a,i.height=t}const n=i.getContext("2d",{alpha:!0,willReadFrequently:!1});if(!n)throw new Error("The '2d' canvas context is required to transform VideoSamples. Register a custom transformer using registerVideoSampleTransformer to work around this limitation.");return Ld.length>=SG&&Ld.splice(uA(Ld,s=>s.age),1),Ld.push({canvas:i,context:n,age:qy++}),{canvas:i,context:n,isNew:!0}};class t0{constructor(t){if(t!==void 0){if(!t||typeof t!="object")throw new TypeError("init.colorSpace, when provided, must be an object.");const i=Object.keys(Rd);if(t.primaries!=null&&!i.includes(t.primaries))throw new TypeError(`init.colorSpace.primaries, when provided, must be one of ${i.join(", ")}.`);const n=Object.keys(Bd);if(t.transfer!=null&&!n.includes(t.transfer))throw new TypeError(`init.colorSpace.transfer, when provided, must be one of ${n.join(", ")}.`);const s=Object.keys(Pd);if(t.matrix!=null&&!s.includes(t.matrix))throw new TypeError(`init.colorSpace.matrix, when provided, must be one of ${s.join(", ")}.`);if(t.fullRange!=null&&typeof t.fullRange!="boolean")throw new TypeError("init.colorSpace.fullRange, when provided, must be a boolean.")}this.primaries=t?.primaries??null,this.transfer=t?.transfer??null,this.matrix=t?.matrix??null,this.fullRange=t?.fullRange??null}toJSON(){return{primaries:this.primaries,transfer:this.transfer,matrix:this.matrix,fullRange:this.fullRange}}}const Vd=a=>typeof VideoFrame<"u"&&a instanceof VideoFrame,Ay=(a,t,i)=>{const n=Math.min(a.left,t),s=Math.min(a.top,i),r=Math.min(a.width,t-n),o=Math.min(a.height,i-s);return We(r>=0),We(o>=0),{left:n,top:s,width:r,height:o}},a0=(a,t)=>{if(!a||typeof a!="object")throw new TypeError(t+"crop, when provided, must be an object.");if(!Number.isInteger(a.left)||a.left<0)throw new TypeError(t+"crop.left must be a non-negative integer.");if(!Number.isInteger(a.top)||a.top<0)throw new TypeError(t+"crop.top must be a non-negative integer.");if(!Number.isInteger(a.width)||a.width<0)throw new TypeError(t+"crop.width must be a non-negative integer.");if(!Number.isInteger(a.height)||a.height<0)throw new TypeError(t+"crop.height must be a non-negative integer.")},Gy=a=>{if(!a||typeof a!="object")throw new TypeError("options must be an object.");if(a.colorSpace!==void 0&&!["display-p3","srgb"].includes(a.colorSpace))throw new TypeError("options.colorSpace, when provided, must be 'display-p3' or 'srgb'.");if(a.format!==void 0&&typeof a.format!="string")throw new TypeError("options.format, when provided, must be a string.");if(a.layout!==void 0){if(!Array.isArray(a.layout))throw new TypeError("options.layout, when provided, must be an array.");for(const t of a.layout){if(!t||typeof t!="object")throw new TypeError("Each entry in options.layout must be an object.");if(!Number.isInteger(t.offset)||t.offset<0)throw new TypeError("plane.offset must be a non-negative integer.");if(!Number.isInteger(t.stride)||t.stride<0)throw new TypeError("plane.stride must be a non-negative integer.")}}if(a.rect!==void 0){if(!a.rect||typeof a.rect!="object")throw new TypeError("options.rect, when provided, must be an object.");if(a.rect.x!==void 0&&(!Number.isInteger(a.rect.x)||a.rect.x<0))throw new TypeError("options.rect.x, when provided, must be a non-negative integer.");if(a.rect.y!==void 0&&(!Number.isInteger(a.rect.y)||a.rect.y<0))throw new TypeError("options.rect.y, when provided, must be a non-negative integer.");if(a.rect.width!==void 0&&(!Number.isInteger(a.rect.width)||a.rect.width<0))throw new TypeError("options.rect.width, when provided, must be a non-negative integer.");if(a.rect.height!==void 0&&(!Number.isInteger(a.rect.height)||a.rect.height<0))throw new TypeError("options.rect.height, when provided, must be a non-negative integer.")}},TG=(a,t,i)=>{const n=Af(a),s=[];let r=0;for(const o of n){const l=Math.ceil(t/o.widthDivisor),c=Math.ceil(i/o.heightDivisor),d=l*o.sampleBytes,g=d*c;s.push({offset:r,stride:d}),r+=g}return s},Af=a=>{const t=(i,n,s,r,o)=>{const l=[{sampleBytes:i,widthDivisor:1,heightDivisor:1},{sampleBytes:n,widthDivisor:s,heightDivisor:r},{sampleBytes:n,widthDivisor:s,heightDivisor:r}];return o&&l.push({sampleBytes:i,widthDivisor:1,heightDivisor:1}),l};switch(a){case"I420":return t(1,1,2,2,!1);case"I420P10":case"I420P12":return t(2,2,2,2,!1);case"I420A":return t(1,1,2,2,!0);case"I420AP10":case"I420AP12":return t(2,2,2,2,!0);case"I422":return t(1,1,2,1,!1);case"I422P10":case"I422P12":return t(2,2,2,1,!1);case"I422A":return t(1,1,2,1,!0);case"I422AP10":case"I422AP12":return t(2,2,2,1,!0);case"I444":return t(1,1,1,1,!1);case"I444P10":case"I444P12":return t(2,2,1,1,!1);case"I444A":return t(1,1,1,1,!0);case"I444AP10":case"I444AP12":return t(2,2,1,1,!0);case"NV12":return[{sampleBytes:1,widthDivisor:1,heightDivisor:1},{sampleBytes:2,widthDivisor:2,heightDivisor:2}];case"RGBA":case"RGBX":case"BGRA":case"BGRX":return[{sampleBytes:4,widthDivisor:1,heightDivisor:1}];default:yo(a),We(!1)}},Fy=(a,t)=>{const i={left:0,top:0,width:a.codedWidth,height:a.codedHeight},n=t.rect,s=$G(i,n,a.codedWidth,a.codedHeight,a.format),r=t.layout;let o;if(!t.format||t.format===a.format)o=a.format;else if(["RGBA","RGBX","BGRA","BGRX"].includes(t.format))o=t.format;else throw new Error("NotSupportedError: Invalid destination format.");return CG(s,o,r)},$G=(a,t,i,n,s)=>{const r={...a};if(t!==void 0){if(t.width===0||t.height===0)throw new TypeError("visibleRect dimensions cannot be zero.");if((t.x||0)+(t.width||0)>i)throw new TypeError("visibleRect exceeds codedWidth.");if((t.y||0)+(t.height||0)>n)throw new TypeError("visibleRect exceeds codedHeight.");r.x=t.x||0,r.y=t.y||0,r.width=t.width||0,r.height=t.height||0}if(!qG(s,r))throw new TypeError("visibleRect alignment is invalid for the format.");return r},qG=(a,t)=>{if(a===null)return!0;const i=Af(a);for(let n=0;n{const n=Af(t),s=n.length;if(i!==void 0&&i.length!==s)throw new TypeError(`Layout must have ${s} planes.`);let r=0;const o=[],l=[];for(let c=0;c4294967295)throw new TypeError("Allocation size exceeds limit.");l.push(f),r=Math.max(r,f);for(let _=0;_ 0.");if(!Number.isInteger(t.numberOfChannels)||t.numberOfChannels===0)throw new TypeError("Invalid AudioDataInit: numberOfChannels must be an integer > 0.");if(!Number.isFinite(t?.timestamp))throw new TypeError("init.timestamp must be a number.");const i=t.data.byteLength/(Yo(t.format)*t.numberOfChannels);if(!Number.isInteger(i))throw new TypeError("Invalid AudioDataInit: data size is not a multiple of frame size.");this.format=t.format,this.sampleRate=t.sampleRate,this.numberOfFrames=i,this.numberOfChannels=t.numberOfChannels,this.timestamp=t.timestamp,this.duration=i/t.sampleRate;let n;if(t.data instanceof ArrayBuffer)n=new Uint8Array(t.data);else if(ArrayBuffer.isView(t.data))n=new Uint8Array(t.data.buffer,t.data.byteOffset,t.data.byteLength);else throw new TypeError("Invalid AudioDataInit: data is not a BufferSource.");const s=this.numberOfFrames*this.numberOfChannels*Yo(this.format);if(n.byteLength=this.numberOfFrames)throw new RangeError("frameOffset out of range");const s=t.frameCount!==void 0?t.frameCount:this.numberOfFrames-n;if(s>this.numberOfFrames-n)throw new RangeError("frameCount out of range");const r=Yo(i),o=jl(i);if(o&&t.planeIndex>=this.numberOfChannels)throw new RangeError("planeIndex out of range");if(!o&&t.planeIndex!==0)throw new RangeError("planeIndex out of range");return(o?s:s*this.numberOfChannels)*r}copyTo(t,i){if(!wf(t))throw new TypeError("destination must be an ArrayBuffer or an ArrayBuffer view.");if(!i||typeof i!="object")throw new TypeError("options must be an object.");if(!Number.isInteger(i.planeIndex)||i.planeIndex<0)throw new TypeError("planeIndex must be a non-negative integer.");if(i.format!==void 0&&!Gf.has(i.format))throw new TypeError("Invalid format.");if(i.frameOffset!==void 0&&(!Number.isInteger(i.frameOffset)||i.frameOffset<0))throw new TypeError("frameOffset must be a non-negative integer.");if(i.frameCount!==void 0&&(!Number.isInteger(i.frameCount)||i.frameCount<0))throw new TypeError("frameCount must be a non-negative integer.");if(this._closed)throw new Error("AudioSample is closed.");const{format:n,frameCount:s,frameOffset:r}=i;let{planeIndex:o}=i,l=this.format;const c=n??this.format;if(!c)throw new Error("Destination format not determined");const d=this.numberOfFrames,g=this.numberOfChannels,h=r??0;if(h>=d)throw new RangeError("frameOffset out of range");const m=s!==void 0?s:d-h;if(m>d-h)throw new RangeError("frameCount out of range");const p=Yo(c),u=jl(c);if(u&&o>=g)throw new RangeError("planeIndex out of range");if(!u&&o!==0)throw new RangeError("planeIndex out of range");const _=(u?m:m*g)*p;if(t.byteLength<_)throw new RangeError("Destination buffer is too small");const v=Lr(t),b=zy(c);if(Wd(this._data))if(sA()&&g>2&&c!==l){GG(this._data,v,l,c,g,o,h,m);return}else try{this._data.copyTo(t,{planeIndex:o,frameOffset:h,frameCount:m,format:c});return}catch(C){if(c==="f32-planar")throw C;l="f32-planar"}const S=My(l),$=Yo(l),M=jl(l);let N;if(this._data instanceof Hd){const C=j=>{const G=this._data.getDataPlane(j);if(!(G instanceof Uint8Array))throw new TypeError("getDataPlane() must return a Uint8Array.");const A=d*$*(M?1:g);if(G.byteLength!==A)throw new TypeError(`Data plane ${j} has invalid size. Expected exactly ${A} bytes, got ${G.byteLength} bytes.`);return G};if(M)if(u)N=C(o),o=0;else{N=new Uint8Array(d*$*g);for(let j=0;jthis.numberOfFrames)throw new RangeError("startFrame out of range.");if(i>this.numberOfFrames)throw new RangeError("endFrame out of range.");if(i0)for(let l=0;l0&&this.copyTo(r,{planeIndex:0,format:this.format,frameOffset:t,frameCount:n});return new Is({data:r,format:this.format,sampleRate:this.sampleRate,numberOfChannels:this.numberOfChannels,timestamp:this.timestamp+t/this.sampleRate})}close(){this._closed||(Dd?.unregister(this),this._data instanceof Hd?(this._data._referenceCount--,this._data._referenceCount===0&&this._data.close()):Wd(this._data)?this._data.close():this._data=new Uint8Array(0),this._closed=!0)}toAudioData(){if(this._closed)throw new Error("AudioSample is closed.");return this._data instanceof Hd?this._createAudioDataFromData():Wd(this._data)?this._data.timestamp===this.microsecondTimestamp?this._data.clone():this._createAudioDataFromData():new AudioData({format:this.format,sampleRate:this.sampleRate,numberOfFrames:this.numberOfFrames,numberOfChannels:this.numberOfChannels,timestamp:this.microsecondTimestamp,data:this._data.buffer instanceof ArrayBuffer?this._data.buffer:this._data.slice()})}_createAudioDataFromData(){if(jl(this.format)){const t=this.allocationSize({planeIndex:0,format:this.format}),i=new ArrayBuffer(t*this.numberOfChannels);for(let n=0;n0;){const g=Math.min(l,d),h=new Float32Array(s*g);for(let m=0;m0;){const h=Math.min(l,d),m=new Float32Array(s*h);for(let u=0;u{switch(a){case"u8":case"u8-planar":return 1;case"s16":case"s16-planar":return 2;case"s32":case"s32-planar":return 4;case"f32":case"f32-planar":return 4;default:throw new Error("Unknown AudioSampleFormat")}},jl=a=>{switch(a){case"u8-planar":case"s16-planar":case"s32-planar":case"f32-planar":return!0;default:return!1}},My=a=>{switch(a){case"u8":case"u8-planar":return(t,i)=>(t.getUint8(i)-128)/128;case"s16":case"s16-planar":return(t,i)=>t.getInt16(i,!0)/32768;case"s32":case"s32-planar":return(t,i)=>t.getInt32(i,!0)/2147483648;case"f32":case"f32-planar":return(t,i)=>t.getFloat32(i,!0)}},zy=a=>{switch(a){case"u8":case"u8-planar":return(t,i,n)=>t.setUint8(i,rs(Math.round(n*128)+128,0,255));case"s16":case"s16-planar":return(t,i,n)=>t.setInt16(i,rs(Math.round(n*32768),-32768,32767),!0);case"s32":case"s32-planar":return(t,i,n)=>t.setInt32(i,rs(Math.round(n*2147483648),-2147483648,2147483647),!0);case"f32":case"f32-planar":return(t,i,n)=>t.setFloat32(i,n,!0)}},Wd=a=>typeof AudioData<"u"&&a instanceof AudioData,AG=a=>{switch(a){case"u8-planar":return"u8";case"s16-planar":return"s16";case"s32-planar":return"s32";case"f32-planar":return"f32";default:return a}},GG=(a,t,i,n,s,r,o,l)=>{const c=My(i),d=zy(n),g=Yo(i),h=Yo(n),m=jl(i);if(jl(n))if(m){const u=new ArrayBuffer(l*g),f=Lr(u);a.copyTo(u,{planeIndex:r,frameOffset:o,frameCount:l,format:i});for(let _=0;_{const i=a.allocationSize({format:t,planeIndex:0}),n=new ArrayBuffer(i);return a.copyTo(n,{format:t,planeIndex:0}),new Is({data:n,format:t,numberOfChannels:a.numberOfChannels,sampleRate:a.sampleRate,timestamp:a.timestamp,duration:a.duration})};const Ey=new Map,Uy=new Map,MG=a=>{if(!a||typeof a!="object")throw new TypeError("Encoding config must be an object.");if(!Mr.includes(a.codec))throw new TypeError(`Invalid video codec '${a.codec}'. Must be one of: ${Mr.join(", ")}.`);const t=a.bitrate;if(a.quality===void 0&&t===void 0)throw new TypeError("config.quality must be provided.");if(a.quality!==void 0&&t!==void 0)throw new TypeError("config.quality and config.bitrate cannot both be provided.");if(a.quality!==void 0&&!(a.quality instanceof Fs))throw new TypeError("config.quality, when provided, must be a Quality.");if(t!==void 0&&!(t instanceof Fs)&&(!Number.isInteger(t)||t<=0))throw new TypeError("config.bitrate, when provided, must be a positive integer or a quality.");if(a.keyFrameInterval!==void 0&&(!Number.isFinite(a.keyFrameInterval)||a.keyFrameInterval<0))throw new TypeError("config.keyFrameInterval, when provided, must be a non-negative number.");if(a.sizeChangeBehavior!==void 0&&!["deny","passThrough","fill","contain","cover"].includes(a.sizeChangeBehavior))throw new TypeError("config.sizeChangeBehavior, when provided, must be 'deny', 'passThrough', 'fill', 'contain' or 'cover'.");if(a.transform!==void 0){if(typeof a.transform!="object"||!a.transform)throw new TypeError("config.transform, when provided, must be an object.");if(a.transform.width!==void 0&&(!Number.isInteger(a.transform.width)||a.transform.width<=0))throw new TypeError("config.transform.width, when provided, must be a positive integer.");if(a.transform.height!==void 0&&(!Number.isInteger(a.transform.height)||a.transform.height<=0))throw new TypeError("config.transform.height, when provided, must be a positive integer.");if(a.transform.fit!==void 0&&!["fill","contain","cover"].includes(a.transform.fit))throw new TypeError('config.transform.fit, when provided, must be one of "fill", "contain", or "cover".');if(a.transform.width!==void 0&&a.transform.height!==void 0&&a.transform.fit===void 0&&!["fill","contain","cover"].includes(a.sizeChangeBehavior))throw new TypeError("When both config.transform.width and config.transform.height are provided, config.transform.fit must also be provided.");if(a.transform.fit!==void 0&&["fill","contain","cover"].includes(a.sizeChangeBehavior)&&a.transform.fit!==a.sizeChangeBehavior)throw new TypeError("config.transform.fit, when provided, cannot differ from config.sizeChangeBehavior when config.sizeChangeBehavior is 'fill', 'contain' or 'cover', as sizeChangeBehavior already determines the fitting algorithm.");if(a.transform.rotate!==void 0&&![0,90,180,270].includes(a.transform.rotate))throw new TypeError("config.transform.rotate, when provided, must be 0, 90, 180 or 270.");if(a.transform.flip!==void 0&&typeof a.transform.flip!="boolean")throw new TypeError("config.transform.flip, when provided, must be a boolean.");if(a.transform.crop!==void 0&&a0(a.transform.crop,"config.transform."),a.transform.process!==void 0&&typeof a.transform.process!="function")throw new TypeError("config.transform.process, when provided, must be a function.");if(a.transform.frameRate!==void 0&&(!Number.isFinite(a.transform.frameRate)||a.transform.frameRate<=0))throw new TypeError("config.transform.frameRate, when provided, must be a finite positive number.");if(a.transform.force!==void 0&&typeof a.transform.force!="boolean")throw new TypeError("config.transform.force, when provided, must be a boolean.")}if(a.onEncodedPacket!==void 0&&typeof a.onEncodedPacket!="function")throw new TypeError("config.onEncodedPacket, when provided, must be a function.");if(a.onEncoderConfig!==void 0&&typeof a.onEncoderConfig!="function")throw new TypeError("config.onEncoderConfig, when provided, must be a function.");if(a.onEncodedSample!==void 0&&typeof a.onEncodedSample!="function")throw new TypeError("config.onEncodedSample, when provided, must be a function.");Ry(a.codec,a)},Ry=(a,t)=>{if(!t||typeof t!="object")throw new TypeError("Encoding options must be an object.");if(t.alpha!==void 0&&!["discard","keep"].includes(t.alpha))throw new TypeError("options.alpha, when provided, must be 'discard' or 'keep'.");const i=t.bitrateMode;if(i!==void 0&&!["constant","variable"].includes(i))throw new TypeError("bitrateMode, when provided, must be 'constant' or 'variable'.");if(t.latencyMode!==void 0&&!["quality","realtime"].includes(t.latencyMode))throw new TypeError("latencyMode, when provided, must be 'quality' or 'realtime'.");if(t.fullCodecString!==void 0&&typeof t.fullCodecString!="string")throw new TypeError("fullCodecString, when provided, must be a string.");if(t.fullCodecString!==void 0&&qf(t.fullCodecString)!==a)throw new TypeError(`fullCodecString, when provided, must be a string that matches the specified codec (${a}).`);if(t.hardwareAcceleration!==void 0&&!["no-preference","prefer-hardware","prefer-software"].includes(t.hardwareAcceleration))throw new TypeError("hardwareAcceleration, when provided, must be 'no-preference', 'prefer-hardware' or 'prefer-software'.");if(t.scalabilityMode!==void 0&&typeof t.scalabilityMode!="string")throw new TypeError("scalabilityMode, when provided, must be a string.");if(t.contentHint!==void 0&&typeof t.contentHint!="string")throw new TypeError("contentHint, when provided, must be a string.")},By=a=>{const t=a.bitrateMode,i=a.quality._toVideoRateControl(a.codec,a.width,a.height,t),n=(r,o,l)=>({codec:a.fullCodecString??iG(a.codec,a.width,a.height,l,a.alpha==="keep"),width:a.width,height:a.height,displayWidth:a.squarePixelWidth,displayHeight:a.squarePixelHeight,bitrate:r,bitrateMode:o,alpha:a.alpha??"discard",framerate:a.framerate,latencyMode:a.latencyMode,hardwareAcceleration:a.hardwareAcceleration,scalabilityMode:a.scalabilityMode,contentHint:a.contentHint,...oG(a.codec)}),s=[];return i.quantizer!==null&&s.push({config:n(void 0,"quantizer",i.bitrate),quantizer:i.quantizer}),i.bitrateMode!=="quantizer"&&s.push({config:n(i.bitrate,i.bitrateMode,i.bitrate),quantizer:null}),We(s.length>0),s},zG=a=>{if(!a||typeof a!="object")throw new TypeError("Encoding config must be an object.");if(!Wo.includes(a.codec))throw new TypeError(`Invalid audio codec '${a.codec}'. Must be one of: ${Wo.join(", ")}.`);const t=a.bitrate;if(a.quality===void 0&&t===void 0&&!(Ns.includes(a.codec)||a.codec==="flac"))throw new TypeError("config.quality must be provided for compressed audio codecs.");if(a.quality!==void 0&&t!==void 0)throw new TypeError("config.quality and config.bitrate cannot both be provided.");if(a.quality!==void 0&&!(a.quality instanceof Fs))throw new TypeError("config.quality, when provided, must be a Quality.");if(t!==void 0&&!(t instanceof Fs)&&(!Number.isInteger(t)||t<=0))throw new TypeError("config.bitrate, when provided, must be a positive integer or a quality.");if(a.transform!==void 0){if(typeof a.transform!="object"||!a.transform)throw new TypeError("config.transform, when provided, must be an object.");if(a.transform.numberOfChannels!==void 0&&(!Number.isInteger(a.transform.numberOfChannels)||a.transform.numberOfChannels<=0))throw new TypeError("config.transform.numberOfChannels, when provided, must be a positive integer.");if(a.transform.sampleRate!==void 0&&(!Number.isInteger(a.transform.sampleRate)||a.transform.sampleRate<=0))throw new TypeError("config.transform.sampleRate, when provided, must be a positive integer.");if(a.transform.sampleFormat!==void 0&&!["u8","s16","s32","f32"].includes(a.transform.sampleFormat))throw new TypeError("config.transform.sampleFormat, when provided, must be one of: u8, s16, s32, f32.");if(a.transform.process!==void 0&&typeof a.transform.process!="function")throw new TypeError("config.transform.process, when provided, must be a function.")}if(a.onEncodedPacket!==void 0&&typeof a.onEncodedPacket!="function")throw new TypeError("config.onEncodedPacket, when provided, must be a function.");if(a.onEncoderConfig!==void 0&&typeof a.onEncoderConfig!="function")throw new TypeError("config.onEncoderConfig, when provided, must be a function.");if(a.onEncodedSample!==void 0&&typeof a.onEncodedSample!="function")throw new TypeError("config.onEncodedSample, when provided, must be a function.");Py(a.codec,a)},Py=(a,t)=>{if(!t||typeof t!="object")throw new TypeError("Encoding options must be an object.");const i=t.bitrateMode;if(i!==void 0&&!["constant","variable"].includes(i))throw new TypeError("bitrateMode, when provided, must be 'constant' or 'variable'.");if(t.fullCodecString!==void 0&&typeof t.fullCodecString!="string")throw new TypeError("fullCodecString, when provided, must be a string.");if(t.fullCodecString!==void 0&&qf(t.fullCodecString)!==a)throw new TypeError(`fullCodecString, when provided, must be a string that matches the specified codec (${a}).`)},jy=a=>{const t=a.bitrateMode;return{codec:a.fullCodecString??sG(a.codec,a.numberOfChannels,a.sampleRate),numberOfChannels:a.numberOfChannels,sampleRate:a.sampleRate,bitrate:a.quality?._toAudioBitrate(a.codec),bitrateMode:a.quality?._bitrateMode??t,...lG(a.codec)}};class Fs{constructor(t){if((typeof t=="number"||typeof t=="string")&&(t={quality:t}),!t||typeof t!="object")throw new TypeError("options must be an object.");if(t.bitrateMode!==void 0&&!["constant","variable"].includes(t.bitrateMode))throw new TypeError("options.bitrateMode, when provided, must be 'constant' or 'variable'.");if("quality"in t){if(typeof t.quality=="string"?!(t.quality in Ny):typeof t.quality!="number"||Number.isNaN(t.quality))throw new TypeError("options.quality must be a number, or one of 'very-low', 'low', 'medium', 'high' or 'very-high'.");if(t.preferBitrate!==void 0&&typeof t.preferBitrate!="boolean")throw new TypeError("options.preferBitrate, when provided, must be a boolean.");if("bitrate"in t||"quantizer"in t)throw new TypeError("options.quality cannot be combined with options.bitrate or options.quantizer.");this._quality=typeof t.quality=="string"?Ny[t.quality]:t.quality,this._preferBitrate=t.preferBitrate??!1,this._bitrate=void 0,this._quantizer=void 0}else{if(t.bitrate!==void 0&&(!Number.isInteger(t.bitrate)||t.bitrate<=0))throw new TypeError("options.bitrate, when provided, must be a positive integer.");if(t.quantizer!==void 0&&(!Number.isInteger(t.quantizer)||t.quantizer<0))throw new TypeError("options.quantizer, when provided, must be a non-negative integer.");if(t.bitrate===void 0&&t.quantizer===void 0)throw new TypeError("At least one of options.bitrate or options.quantizer must be set.");if("preferBitrate"in t)throw new TypeError("options.preferBitrate can only be combined with options.quality.");this._quality=void 0,this._preferBitrate=!1,this._bitrate=t.bitrate,this._quantizer=t.quantizer}this._bitrateMode=t.bitrateMode}_toVideoRateControl(t,i,n,s){const r=EG[t];let o=null,l=this._bitrateMode??s??"variable";if(this._quantizer!==void 0){if(r)if(this._quantizerr.max){if(this._bitrate===void 0)throw new Error(`Quantizer ${this._quantizer} is out of range for codec '${t}'; must be between ${r.min} and ${r.max}.`)}else o=this._quantizer,this._bitrate===void 0&&(l="quantizer");else if(this._bitrate===void 0)throw new Error(`Codec '${t}' does not support quantizer-based encoding. Provide a bitrate in the Quality to define a fallback.`)}else this._bitrate===void 0&&r&&!this._preferBitrate&&(We(this._quality!==void 0),o=rs(Math.round(eA(r.worst,r.best,this._quality)),r.min,r.max));let c;if(this._bitrate!==void 0)c=this._bitrate;else{let d=this._quality;d===void 0&&(We(o!==null&&r),d=rs((o-r.worst)/(r.best-r.worst),0,1)),c=Oy(t,i,n,i0(d))}return{quantizer:o,bitrate:c,bitrateMode:l}}_toVideoBitrate(t,i,n){return this._bitrate!==void 0?this._bitrate:(We(this._quality!==void 0),Oy(t,i,n,i0(this._quality)))}_toAudioBitrate(t){if(Ns.includes(t)||t==="flac")return;if(this._bitrate!==void 0)return this._bitrate;if(this._quality===void 0)throw new Error("This Quality defines neither a quality level nor a bitrate and therefore cannot be used for audio encoding.");const i=i0(this._quality),s={aac:128e3,opus:64e3,mp3:16e4,vorbis:64e3,ac3:384e3,eac3:192e3,dts:768e3}[t];if(!s)throw new Error(`Unhandled codec: ${t}`);let r=s*i;return t==="aac"?r=[96e3,128e3,16e4,192e3].reduce((l,c)=>Math.abs(c-r)Math.abs(c-r).3*Math.exp(2.5538*a),Oy=(a,t,i,n)=>{const s=t*i,r=1920*1080,o=3e6,l=Math.pow(s/r,.95),c=o*l,d={avc:1,hevc:.6,vp9:.6,av1:.4,vp8:1.2,prores:22e7/o},h=c*d[a]*n;return Math.ceil(h/1e3)*1e3},Iy=(a,t)=>{if(a==="avc")return{avc:{quantizer:t}};if(a==="hevc")return{hevc:{quantizer:t}};if(a==="vp9")return{vp9:{quantizer:t}};if(a==="av1")return{av1:{quantizer:t}};We(!1)},UG=async(a,t={})=>{const{width:i=1280,height:n=720,quality:s,bitrate:r,frameRate:o,...l}=t;if(!Mr.includes(a))return!1;if(!Number.isInteger(i)||i<=0)throw new TypeError("width must be a positive integer.");if(!Number.isInteger(n)||n<=0)throw new TypeError("height must be a positive integer.");if(s!==void 0&&!(s instanceof Fs))throw new TypeError("quality, when provided, must be a Quality.");if(s!==void 0&&r!==void 0)throw new TypeError("quality and bitrate cannot both be provided.");if(r!==void 0&&!(r instanceof Fs)&&(!Number.isInteger(r)||r<=0))throw new TypeError("bitrate must be a positive integer or a quality.");if(o!==void 0&&(!Number.isFinite(o)||o<=0))throw new TypeError("frameRate, when provided, must be a finite positive number.");Ry(a,l);const c=Ff(s,r)??new Fs("medium");let d;try{d=By({codec:a,width:i,height:n,quality:c,framerate:o,...l,alpha:"discard"})}catch{return!1}const g=JSON.stringify(d),h=Ey.get(g);if(h)return h;const m=(async()=>{for(const{config:u}of d)if(Ly.some(f=>f.supports(a,u)))return!0;if(typeof VideoEncoder>"u"||(i%2===1||n%2===1)&&a==="avc")return!1;for(const{config:u,quantizer:f}of d){try{if(!(await VideoEncoder.isConfigSupported(u)).supported)continue}catch{continue}if(!Wb()||await new Promise(async v=>{try{const b=new VideoEncoder({output:()=>{},error:()=>v(!1)});b.configure(u);const S=new Uint8Array(i*n*4),$=new VideoFrame(S,{format:"RGBA",codedWidth:i,codedHeight:n,timestamp:0});b.encode($,f!==null?Iy(a,f):void 0),$.close(),await b.flush(),v(!0)}catch{v(!1)}}))return!0}return!1})();return Ey.set(g,m),m},Dy=async(a,t={})=>{const{numberOfChannels:i=2,sampleRate:n=48e3,quality:s,bitrate:r,...o}=t;if(!Wo.includes(a))return!1;if(!Number.isInteger(i)||i<=0)throw new TypeError("numberOfChannels must be a positive integer.");if(!Number.isInteger(n)||n<=0)throw new TypeError("sampleRate must be a positive integer.");if(s!==void 0&&!(s instanceof Fs))throw new TypeError("quality, when provided, must be a Quality.");if(s!==void 0&&r!==void 0)throw new TypeError("quality and bitrate cannot both be provided.");if(r!==void 0&&!(r instanceof Fs)&&(!Number.isInteger(r)||r<=0))throw new TypeError("bitrate must be a positive integer.");Py(a,o);const l=Ff(s,r)??new Fs("medium"),c=jy({codec:a,numberOfChannels:i,sampleRate:n,quality:l,...o}),d=JSON.stringify(c),g=Uy.get(d);if(g)return g;const h=(async()=>{if(Vy.some(m=>m.supports(a,c))||Ns.includes(a))return!0;if(typeof AudioEncoder>"u")return!1;try{return(await AudioEncoder.isConfigSupported(c)).supported===!0}catch{return!1}})();return Uy.set(d,h),h},Ff=(a,t)=>{if(a!==void 0)return a;if(t!==void 0)return t instanceof Fs?t:new Fs({bitrate:t})};const Ly=[],Vy=[];const RG=a=>{let n=a>>2,s=4096,r=0,o=12,l=0;for(n<0&&(n=-n,r=128),n+=33,n>8191&&(n=8191);(n&s)!==s&&o>=5;)s>>=1,o--;return l=n>>o-4&15,~(r|o-5<<4|l)&255},BG=a=>{let i=2048,n=0,s=11,r=0,o=a>>3;for(o<0?o=-o-1:n=128,o>4095&&(o=4095);(o&i)!==i&&s>=5;)i>>=1,s--;return r=o>>(s===4?1:s-4)&15,(n|s-4<<4|r)^85};class Nl{constructor(t,i,n,s,r){this.bytes=t,this.view=i,this.offset=n,this.start=s,this.end=r,this.bufferPos=s-n}static tempFromBytes(t){return new Nl(t,Lr(t),0,0,t.length)}get length(){return this.end-this.start}get filePos(){return this.offset+this.bufferPos}set filePos(t){this.bufferPos=t-this.offset}get remainingLength(){return Math.max(this.end-this.filePos,0)}skip(t){this.bufferPos+=t}slice(t,i=this.end-t){if(tthis.end)throw new RangeError("Slicing outside of original slice.");return new Nl(this.bytes,this.view,this.offset,t,t+i)}}const PG=(a,t)=>{if(a.filePosa.end)throw new RangeError(`Tried reading [${a.filePos}, ${a.filePos+t}), but slice is [${a.start}, ${a.end}). This is likely an internal error, please report it alongside the file that caused it.`)},jG=(a,t)=>{PG(a,t);const i=a.bytes.subarray(a.bufferPos,a.bufferPos+t);return a.bufferPos+=t,i};class Hy{constructor(t){this.mutex=new Ib,this.trackTimestampInfo=new WeakMap,this.output=t}onTrackClose(t){}validateTimestamp(t,i,n){let s=this.trackTimestampInfo.get(t);if(s){if(n&&(s.maxTimestampBeforeLastKeyPacket=s.maxTimestamp),s.maxTimestampBeforeLastKeyPacket!==null&&i/g,NG=/(?:(\d{2}):)?(\d{2}):(\d{2}).(\d{3})/,OG=a=>{const t=NG.exec(a);if(!t)throw new Error("Expected match.");return 3600*1e3*Number(t[1]||"0")+60*1e3*Number(t[2])+1e3*Number(t[3])+Number(t[4])},Wy=a=>{const t=Math.floor(a/36e5),i=Math.floor(a%(3600*1e3)/(60*1e3)),n=Math.floor(a%(60*1e3)/1e3),s=a%1e3;return t.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0")+":"+n.toString().padStart(2,"0")+"."+s.toString().padStart(3,"0")};class zf{constructor(t){this.writer=t,this.helper=new Uint8Array(8),this.helperView=new DataView(this.helper.buffer),this.offsets=new WeakMap}writeU32(t){this.helperView.setUint32(0,t,!1),this.writer.write(this.helper.subarray(0,4))}writeU64(t){this.helperView.setUint32(0,Math.floor(t/2**32),!1),this.helperView.setUint32(4,t,!1),this.writer.write(this.helper.subarray(0,8))}writeAscii(t){for(let i=0;i[(a%256+256)%256],ca=a=>(vr.setUint16(0,a,!1),[Ya[0],Ya[1]]),n0=a=>(vr.setInt16(0,a,!1),[Ya[0],Ya[1]]),Qy=a=>(vr.setUint32(0,a,!1),[Ya[1],Ya[2],Ya[3]]),lt=a=>(vr.setUint32(0,a,!1),[Ya[0],Ya[1],Ya[2],Ya[3]]),Wr=a=>(vr.setInt32(0,a,!1),[Ya[0],Ya[1],Ya[2],Ya[3]]),zr=a=>(vr.setUint32(0,Math.floor(a/2**32),!1),vr.setUint32(4,a,!1),[Ya[0],Ya[1],Ya[2],Ya[3],Ya[4],Ya[5],Ya[6],Ya[7]]),Ky=a=>(vr.setInt32(0,Math.floor(a/2**32),!1),vr.setUint32(4,a,!1),[Ya[0],Ya[1],Ya[2],Ya[3],Ya[4],Ya[5],Ya[6],Ya[7]]),Yy=a=>(vr.setInt16(0,2**8*a,!1),[Ya[0],Ya[1]]),br=a=>(vr.setInt32(0,2**16*a,!1),[Ya[0],Ya[1],Ya[2],Ya[3]]),s0=a=>(vr.setInt32(0,2**30*a,!1),[Ya[0],Ya[1],Ya[2],Ya[3]]),r0=(a,t)=>{const i=[];let n=a;do{let s=n&127;n>>=7,i.length>0&&(s|=128),i.push(s)}while(n>0||t);return i.reverse()},Li=(a,t=!1)=>{const i=Array(a.length).fill(null).map((n,s)=>a.charCodeAt(s));return t&&i.push(0),i},Jy=a=>[br(a[0]),br(a[1]),s0(a[2]),br(a[3]),br(a[4]),s0(a[5]),br(a[6]),br(a[7]),s0(a[8])],Zt=(a,t,i)=>({type:a,contents:t&&new Uint8Array(t.flat(10)),children:i}),yi=(a,t,i,n,s)=>Zt(a,[gn(t),Qy(i),n??[]],s),IG=a=>a.isQuickTime?Zt("ftyp",[Li("qt "),lt(512),Li("qt ")]):a.fragmented?a.cmaf?Zt("ftyp",[Li("iso5"),lt(512),Li("iso5"),Li("iso6"),Li("mp41"),Li("cmfc"),Li("dash")]):Zt("ftyp",[Li("iso5"),lt(512),Li("iso5"),Li("iso6"),Li("mp41")]):Zt("ftyp",[Li("isom"),lt(512),Li("isom"),a.holdsAvc?Li("avc1"):[],Li("mp41")]),Xy=()=>Zt("styp",[Li("iso5"),lt(0),Li("iso5"),Li("iso6"),Li("mp41"),Li("cmfc"),Li("dash")]),Zy=(a,t)=>{const i=Math.max(0,a.minWrittenTimestamp);let n=Math.max(0,a.maxWrittenEndTimestamp-i);return Number.isFinite(n)||(n=0),yi("sidx",1,0,[lt(1),lt(Ds),zr(en(i,Ds)),zr(0),ca(0),ca(1),lt(t&2147483647),lt(en(n,Ds)),lt(0)])},Ef=a=>({type:"mdat",largeSize:a}),DG=a=>({type:"free",size:a}),Qd=a=>Zt("moov",void 0,[LG(a.creationTime,a.trackDatas),...a.trackDatas.map(t=>VG(t,a.creationTime)),a.isFragmented?CF(a.trackDatas):null,OF(a)]),LG=(a,t)=>{const i=Math.max(0,...t.map(o=>Math.max(0,en(Rc(o),Ds)+en(o.startTimestampOffset??0,Ds)))),n=Math.max(0,...t.map(o=>o.track.id))+1,s=!vo(a)||!vo(i),r=s?zr:lt;return yi("mvhd",+s,0,[r(a),r(a),lt(Ds),r(i),br(1),Yy(1),Array(10).fill(0),Jy(Pb),Array(24).fill(0),lt(n)])},VG=(a,t)=>{const i=XF(a),n=a.startTimestampOffset!==null&&a.startTimestampOffset!==0;return Zt("trak",void 0,[HG(a,t),n?WG(a):null,QG(a,t),i.name!==void 0?Zt("udta",void 0,[Zt("name",[...ws.encode(i.name)])]):null])},HG=(a,t)=>{const i=Math.max(0,en(Rc(a),Ds)+en(a.startTimestampOffset??0,Ds)),n=!vo(t)||!vo(i),s=n?zr:lt;let r;if(a.type==="video"&&a.track.metadata.transformationMatrix)r=a.track.metadata.transformationMatrix;else if(a.type==="video"){const{rotation:c,flip:d}=a.track.metadata,g=yf(jb(c??0),WC(d?-1:1,1));r=LC(g,a.info.width,a.info.height)}else r=Pb;let o=2;a.track.metadata.disposition?.default!==!1&&(o|=1);const l=a.type==="video"?0:a.type==="audio"?1:a.type==="subtitle"?2:yo(a);return yi("tkhd",+n,o,[s(t),s(t),lt(a.track.id),lt(0),s(i),Array(8).fill(0),ca(0),ca(l),Yy(a.type==="audio"?1:0),ca(0),Jy(r),br(a.type==="video"?a.info.width:0),br(a.type==="video"?a.info.height:0)])},WG=a=>{const t=a.startTimestampOffset;if(We(t!==null),t>0){const i=en(t,Ds),n=en(Rc(a),Ds),s=!vo(i)||!vo(n),r=s?zr:lt,o=s?Ky:Wr;return Zt("edts",void 0,[yi("elst",s?1:0,0,[lt(2),r(i),o(-1),br(1),r(n),o(0),br(1)])])}else{const i=en(-t,a.timescale),n=Math.max(0,en(Rc(a),Ds)+en(t,Ds)),s=!KC(i)||!vo(n),r=s?zr:lt,o=s?Ky:Wr;return Zt("edts",void 0,[yi("elst",s?1:0,0,[lt(1),r(n),o(i),br(1)])])}},QG=(a,t)=>Zt("mdia",void 0,[KG(a,t),o0(!0,YG[a.type],JG[a.type]),XG(a)]),KG=(a,t)=>{const i=en(Rc(a),a.timescale),n=!vo(t)||!vo(i),s=n?zr:lt;return yi("mdhd",+n,0,[s(t),s(t),lt(a.timescale),s(i),ca(r2(a.track.metadata.languageCode??Lb)),ca(0)])},YG={video:"vide",audio:"soun",subtitle:"text"},JG={video:"MediabunnyVideoHandler",audio:"MediabunnySoundHandler",subtitle:"MediabunnyTextHandler"},o0=(a,t,i,n="\0\0\0\0")=>yi("hdlr",0,0,[a?Li("mhlr"):lt(0),Li(t),Li(n),lt(0),lt(0),Li(i,!0)]),XG=a=>Zt("minf",void 0,[ZG[a.type](),eF(),iF(a)]),ZG={video:()=>yi("vmhd",0,1,[ca(0),ca(0),ca(0),ca(0)]),audio:()=>yi("smhd",0,0,[ca(0),ca(0)]),subtitle:()=>yi("nmhd",0,0)},eF=()=>Zt("dinf",void 0,[tF()]),tF=()=>yi("dref",0,0,[lt(1)],[aF()]),aF=()=>yi("url ",0,1),iF=a=>{const t=a.compositionTimeOffsetTable.length>1||a.compositionTimeOffsetTable.some(i=>i.sampleCompositionTimeOffset!==0);return Zt("stbl",void 0,[nF(a),wF(a),t?$F(a):null,t?qF(a):null,xF(a),SF(a),TF(a),kF(a)])},nF=a=>{let t;if(a.type==="video")t=sF(VF(a.track.source._codec,a.info.decoderConfig.codec),a);else if(a.type==="audio"){const i=s2(a.track.source._codec,a.info.decoderConfig.codec,a.muxer.isQuickTime);We(i),t=uF(i,a)}else a.type==="subtitle"&&(t=bF(QF[a.track.source._codec],a));return We(t),yi("stsd",0,0,[lt(1)],[t])},sF=(a,t)=>Zt(a,[Array(6).fill(0),ca(1),ca(0),ca(0),Array(12).fill(0),ca(t.info.width),ca(t.info.height),lt(4718592),lt(4718592),lt(0),ca(1),gn(10),Li("Mediabunny"),Array(21).fill(0),ca(t.info.hasAlphaChannel?32:24),n0(65535)],[HF[t.track.source._codec]?.(t)??null,rF(t),Ob(t.info.decoderConfig.colorSpace)?null:oF(t),l0(t)]),l0=a=>a.avgBitrate===0&&a.maxBitrate===0?null:Zt("btrt",[lt(0),lt(a.maxBitrate),lt(a.avgBitrate)]),rF=a=>a.info.pixelAspectRatio.num===a.info.pixelAspectRatio.den?null:Zt("pasp",[lt(a.info.pixelAspectRatio.num),lt(a.info.pixelAspectRatio.den)]),oF=a=>{const t=a.info.decoderConfig.colorSpace;return Zt("colr",[Li(a.muxer.isQuickTime?"nclc":"nclx"),ca(t?.primaries!=null?Rd[t.primaries]:2),ca(t?.transfer!=null?Bd[t.transfer]:2),ca(t?.matrix!=null?Pd[t.matrix]:2),a.muxer.isQuickTime?[]:gn((t?.fullRange?1:0)<<7)])},lF=a=>a.info.decoderConfig&&Zt("avcC",[...Gs(a.info.decoderConfig.description)]),cF=a=>a.info.decoderConfig&&Zt("hvcC",[...Gs(a.info.decoderConfig.description)]),e2=a=>{if(!a.info.decoderConfig)return null;const t=a.info.decoderConfig,i=t.codec.split("."),n=Number(i[1]),s=Number(i[2]),r=Number(i[3]),o=i[4]?Number(i[4]):1,l=i[8]?Number(i[8]):Number(t.colorSpace?.fullRange??0),c=(r<<4)+(o<<1)+l,d=i[5]?Number(i[5]):t.colorSpace?.primaries?Rd[t.colorSpace.primaries]:1,g=i[6]?Number(i[6]):t.colorSpace?.transfer?Bd[t.colorSpace.transfer]:1,h=i[7]?Number(i[7]):t.colorSpace?.matrix?Pd[t.colorSpace.matrix]:1;return yi("vpcC",1,0,[gn(n),gn(s),gn(c),gn(d),gn(g),gn(h),ca(0)])},dF=a=>Zt("av1C",my(a.info.decoderConfig.codec)),uF=(a,t)=>{let i=0,n,s=16;const r=Ns.includes(t.track.source._codec);if(r){const o=t.track.source._codec,{sampleSize:l}=Qo(o);s=8*l,s>16&&(i=1)}if(t.muxer.isQuickTime&&(i=1),i===0)n=[Array(6).fill(0),ca(1),ca(i),ca(0),lt(0),ca(t.info.numberOfChannels),ca(s),ca(0),ca(0),ca(t.info.sampleRate<2**16?t.info.sampleRate:0),ca(0)];else{const o=r?0:-2;n=[Array(6).fill(0),ca(1),ca(i),ca(0),lt(0),ca(t.info.numberOfChannels),ca(Math.min(s,16)),n0(o),ca(0),ca(t.info.sampleRate<2**16?t.info.sampleRate:0),ca(0),r?[lt(1),lt(s/8),lt(t.info.numberOfChannels*s/8)]:[lt(0),lt(0),lt(0)],lt(2)]}return Zt(a,n,[WF(t.track.source._codec,t.muxer.isQuickTime)?.(t)??null,l0(t)])},c0=a=>{let t;switch(a.track.source._codec){case"aac":t=64;break;case"mp3":t=107;break;case"vorbis":t=221;break;default:throw new Error(`Unhandled audio codec: ${a.track.source._codec}`)}let i=[...gn(t),...gn(21),...Qy(0),...lt(a.maxBitrate),...lt(a.avgBitrate)];if(a.info.decoderConfig.description){const n=Gs(a.info.decoderConfig.description);i=[...i,...gn(5),...r0(n.byteLength),...n]}return i=[...ca(1),...gn(0),...gn(4),...r0(i.length),...i,...gn(6),...gn(1),...gn(2)],i=[...gn(3),...r0(i.length),...i],yi("esds",0,0,i)},Jo=a=>Zt("wave",void 0,[fF(a),pF(a),Zt("\0\0\0\0")]),fF=a=>Zt("frma",[Li(s2(a.track.source._codec,a.info.decoderConfig.codec,a.muxer.isQuickTime))]),pF=a=>{const{littleEndian:t}=Qo(a.track.source._codec);return Zt("enda",[ca(+t)])},mF=a=>{let t=a.info.numberOfChannels,i=3840,n=a.info.sampleRate,s=0,r=0,o=new Uint8Array(0);const l=a.info.decoderConfig?.description;if(l){We(l.byteLength>=18);const c=Gs(l),d=oy(c);t=d.outputChannelCount,i=d.preSkip,n=d.inputSampleRate,s=d.outputGain,r=d.channelMappingFamily,d.channelMappingTable&&(o=d.channelMappingTable)}return Zt("dOps",[gn(0),gn(t),ca(i),lt(n),n0(s),gn(r),...o])},gF=a=>{const t=a.info.decoderConfig?.description;We(t);const i=Gs(t);return yi("dfLa",0,0,[...i.subarray(4)])},Qr=a=>{const{littleEndian:t,sampleSize:i}=Qo(a.track.source._codec),n=+t;return yi("pcmC",0,0,[gn(n),gn(8*i)])},hF=a=>{We(a.info.primingPacket);const t=RA(a.info.primingPacket.data);if(!t)throw new Error("Couldn't extract AC-3 frame info from the audio packet. Ensure the packets contain valid AC-3 sync frames (as specified in ETSI TS 102 366).");const i=new Uint8Array(3),n=new Mn(i);return n.writeBits(2,t.fscod),n.writeBits(5,t.bsid),n.writeBits(3,t.bsmod),n.writeBits(3,t.acmod),n.writeBits(1,t.lfeon),n.writeBits(5,t.bitRateCode),n.writeBits(5,0),Zt("dac3",[...i])},_F=a=>{We(a.info.primingPacket);const t=PA(a.info.primingPacket.data);if(!t)throw new Error("Couldn't extract E-AC-3 frame info from the audio packet. Ensure the packets contain valid E-AC-3 sync frames (as specified in ETSI TS 102 366).");let i=16;for(const o of t.substreams)i+=23,o.numDepSub>0?i+=9:i+=1;const n=Math.ceil(i/8),s=new Uint8Array(n),r=new Mn(s);r.writeBits(13,t.dataRate),r.writeBits(3,t.substreams.length-1);for(const o of t.substreams)r.writeBits(2,o.fscod),r.writeBits(5,o.bsid),r.writeBits(1,0),r.writeBits(1,0),r.writeBits(3,o.bsmod),r.writeBits(3,o.acmod),r.writeBits(1,o.lfeon),r.writeBits(3,0),r.writeBits(4,o.numDepSub),o.numDepSub>0?r.writeBits(9,o.chanLoc):r.writeBits(1,0);return Zt("dec3",[...s])},vF=a=>{We(a.info.primingPacket);const t=XA(a.info.primingPacket.data);if(!t)throw new Error("Couldn't extract DTS frame info from the audio packet. Ensure the packets contain valid DTS frames as specified in ETSI TS 102 114.");return Zt("ddts",[...tG(t)])},bF=(a,t)=>Zt(a,[Array(6).fill(0),ca(1)],[KF[t.track.source._codec](t),l0(t)]),yF=a=>Zt("vttC",[...ws.encode(a.info.config.description)]),wF=a=>yi("stts",0,0,[lt(a.timeToSampleTable.length),a.timeToSampleTable.map(t=>[lt(t.sampleCount),lt(t.sampleDelta)])]),kF=a=>{if(a.samples.every(i=>i.type==="key"))return null;const t=[...a.samples.entries()].filter(([,i])=>i.type==="key");return yi("stss",0,0,[lt(t.length),t.map(([i])=>lt(i+1))])},xF=a=>yi("stsc",0,0,[lt(a.compactlyCodedChunkTable.length),a.compactlyCodedChunkTable.map(t=>[lt(t.firstChunk),lt(t.samplesPerChunk),lt(1)])]),SF=a=>{if(a.type==="audio"&&a.info.requiresPcmTransformation){const{sampleSize:t}=Qo(a.track.source._codec);return yi("stsz",0,0,[lt(t*a.info.numberOfChannels),lt(a.samples.reduce((i,n)=>i+en(n.duration,a.timescale),0))])}return yi("stsz",0,0,[lt(0),lt(a.samples.length),a.samples.map(t=>lt(t.size))])},TF=a=>a.finalizedChunks.length>0&&Fr(a.finalizedChunks).offset>=2**32?yi("co64",0,0,[lt(a.finalizedChunks.length),a.finalizedChunks.map(t=>zr(t.offset))]):yi("stco",0,0,[lt(a.finalizedChunks.length),a.finalizedChunks.map(t=>lt(t.offset))]),$F=a=>yi("ctts",1,0,[lt(a.compositionTimeOffsetTable.length),a.compositionTimeOffsetTable.map(t=>[lt(t.sampleCount),Wr(t.sampleCompositionTimeOffset)])]),qF=a=>{let t=1/0,i=-1/0,n=1/0,s=-1/0;We(a.compositionTimeOffsetTable.length>0),We(a.samples.length>0);for(let o=0;o=2**31?null:yi("cslg",0,0,[Wr(r),Wr(t),Wr(i),Wr(n),Wr(s)])},CF=a=>Zt("mvex",void 0,a.map(AF)),AF=a=>yi("trex",0,0,[lt(a.track.id),lt(1),lt(0),lt(0),lt(0)]),t2=(a,t)=>Zt("moof",void 0,[GF(a),...t.map(FF)]),GF=a=>yi("mfhd",0,0,[lt(a)]),a2=a=>{let t=0,i=0;const n=0,s=0,r=a.type==="delta";return i|=+r,r?t|=1:t|=2,t<<24|i<<16|n<<8|s},FF=a=>Zt("traf",void 0,[MF(a),zF(a),EF(a)]),MF=a=>{We(a.currentChunk);let t=0;t|=8,t|=16,t|=32,t|=131072;const i=a.currentChunk.samples[1]??a.currentChunk.samples[0],n={duration:i.timescaleUnitsToNextSample,size:i.size,flags:a2(i)};return yi("tfhd",0,t,[lt(a.track.id),lt(n.duration),lt(n.size),lt(n.flags)])},zF=a=>(We(a.currentChunk),yi("tfdt",1,0,[zr(en(a.currentChunk.startTimestamp,a.timescale))])),EF=a=>{We(a.currentChunk);const t=a.currentChunk.samples.map(f=>f.timescaleUnitsToNextSample),i=a.currentChunk.samples.map(f=>f.size),n=a.currentChunk.samples.map(a2),s=a.currentChunk.samples.map(f=>en(f.timestamp-f.decodeTimestamp,a.timescale)),r=new Set(t),o=new Set(i),l=new Set(n),c=new Set(s),d=l.size===2&&n[0]!==n[1],g=r.size>1,h=o.size>1,m=!d&&l.size>1,p=c.size>1||[...c].some(f=>f!==0);let u=0;return u|=1,u|=4*+d,u|=256*+g,u|=512*+h,u|=1024*+m,u|=2048*+p,yi("trun",1,u,[lt(a.currentChunk.samples.length),lt(a.currentChunk.offset-a.currentChunk.moofOffset||0),d?lt(n[0]):[],a.currentChunk.samples.map((f,_)=>[g?lt(t[_]):[],h?lt(i[_]):[],m?lt(n[_]):[],p?Wr(s[_]):[]])])},UF=a=>Zt("mfra",void 0,[...a.map(RF),BF()]),RF=a=>yi("tfra",1,0,[lt(a.track.id),lt(63),lt(a.finalizedChunks.length),a.finalizedChunks.map(i=>[zr(en(i.samples[0].timestamp,a.timescale)),zr(i.moofOffset),lt(i.trafIndex+1),lt(1),lt(1)])]),BF=()=>yi("mfro",0,0,[lt(0)]),PF=()=>Zt("vtte"),jF=(a,t,i,n,s)=>Zt("vttc",void 0,[s!==null?Zt("vsid",[Wr(s)]):null,i!==null?Zt("iden",[...ws.encode(i)]):null,t!==null?Zt("ctim",[...ws.encode(Wy(t))]):null,n!==null?Zt("sttg",[...ws.encode(n)]):null,Zt("payl",[...ws.encode(a)])]),NF=a=>Zt("vtta",[...ws.encode(a)]),OF=a=>{const t=[],i=a.format._options.metadataFormat??"auto",n=a.output._metadataTags;if(i==="mdir"||i==="auto"&&!a.isQuickTime){const s=DF(n);s&&t.push(s)}else if(i==="mdta"){const s=LF(n);s&&t.push(s)}else(i==="udta"||i==="auto"&&a.isQuickTime)&&IF(t,a.output._metadataTags);return t.length===0?null:Zt("udta",void 0,t)},IF=(a,t)=>{for(const{key:i,value:n}of Nm(t))switch(i){case"title":a.push(Kr("©nam",n));break;case"description":a.push(Kr("©des",n));break;case"artist":a.push(Kr("©ART",n));break;case"album":a.push(Kr("©alb",n));break;case"albumArtist":a.push(Kr("albr",n));break;case"genre":a.push(Kr("©gen",n));break;case"date":a.push(Kr("©day",n.toISOString().slice(0,10)));break;case"comment":a.push(Kr("©cmt",n));break;case"lyrics":a.push(Kr("©lyr",n));break;case"raw":break;case"discNumber":case"discsTotal":case"trackNumber":case"tracksTotal":case"beatsPerMinute":case"images":break;default:yo(i)}if(t.raw)for(const i in t.raw){const n=t.raw[i];n==null||i.length!==4||a.some(s=>s.type===i)||(typeof n=="string"?a.push(Kr(i,n)):n instanceof Uint8Array&&a.push(Zt(i,Array.from(n))))}},Kr=(a,t)=>{const i=ws.encode(t);return Zt(a,[ca(i.length),ca(r2("und")),Array.from(i)])},i2={"image/jpeg":13,"image/png":14,"image/bmp":27},n2=(a,t)=>{const i=[];for(const{key:n,value:s}of Nm(a))switch(n){case"title":i.push({key:t?"title":"©nam",value:Er(s)});break;case"description":i.push({key:t?"description":"©des",value:Er(s)});break;case"artist":i.push({key:t?"artist":"©ART",value:Er(s)});break;case"album":i.push({key:t?"album":"©alb",value:Er(s)});break;case"albumArtist":i.push({key:t?"album_artist":"aART",value:Er(s)});break;case"comment":i.push({key:t?"comment":"©cmt",value:Er(s)});break;case"genre":i.push({key:t?"genre":"©gen",value:Er(s)});break;case"beatsPerMinute":t||i.push({key:"tmpo",value:Zt("data",[lt(21),lt(0),ca(s)])});break;case"lyrics":i.push({key:t?"lyrics":"©lyr",value:Er(s)});break;case"date":i.push({key:t?"date":"©day",value:Er(s.toISOString().slice(0,10))});break;case"images":for(const r of s)r.kind==="coverFront"&&i.push({key:"covr",value:Zt("data",[lt(i2[r.mimeType]??0),lt(0),Array.from(r.data)])});break;case"trackNumber":if(t){const r=a.tracksTotal!==void 0?`${s}/${a.tracksTotal}`:s.toString();i.push({key:"track",value:Er(r)})}else i.push({key:"trkn",value:Zt("data",[lt(0),lt(0),ca(0),ca(s),ca(a.tracksTotal??0),ca(0)])});break;case"discNumber":t||i.push({key:"disc",value:Zt("data",[lt(0),lt(0),ca(0),ca(s),ca(a.discsTotal??0),ca(0)])});break;case"tracksTotal":case"discsTotal":break;case"raw":break;default:yo(n)}if(a.raw)for(const n in a.raw){const s=a.raw[n];s==null||!t&&n.length!==4||i.some(r=>r.key===n)||(typeof s=="string"?i.push({key:n,value:Er(s)}):s instanceof Uint8Array?i.push({key:n,value:Zt("data",[lt(0),lt(0),Array.from(s)])}):s instanceof Jb&&i.push({key:n,value:Zt("data",[lt(i2[s.mimeType]??0),lt(0),Array.from(s.data)])}))}return i},DF=a=>{const t=n2(a,!1);return t.length===0?null:yi("meta",0,0,void 0,[o0(!1,"mdir","","appl"),Zt("ilst",void 0,t.map(i=>Zt(i.key,void 0,[i.value])))])},LF=a=>{const t=n2(a,!0);return t.length===0?null:Zt("meta",void 0,[o0(!1,"mdta",""),yi("keys",0,0,[lt(t.length)],t.map(i=>Zt("mdta",[...ws.encode(i.key)]))),Zt("ilst",void 0,t.map((i,n)=>{const s=String.fromCharCode(...lt(n+1));return Zt(s,void 0,[i.value])}))])},Er=a=>Zt("data",[lt(1),lt(0),...ws.encode(a)]),VF=(a,t)=>{switch(a){case"avc":return t.startsWith("avc3")?"avc3":"avc1";case"hevc":return"hvc1";case"vp8":return"vp08";case"vp9":return"vp09";case"av1":return"av01";case"prores":return t}},HF={avc:lF,hevc:cF,vp8:e2,vp9:e2,av1:dF,prores:null},s2=(a,t,i)=>{switch(a){case"aac":return"mp4a";case"mp3":return"mp4a";case"opus":return"Opus";case"vorbis":return"mp4a";case"flac":return"fLaC";case"ulaw":return"ulaw";case"alaw":return"alaw";case"pcm-u8":return"raw ";case"pcm-s8":return"sowt";case"ac3":return"ac-3";case"eac3":return"ec-3";case"dts":return t}if(i)switch(a){case"pcm-s16":return"sowt";case"pcm-s16be":return"twos";case"pcm-s24":return"in24";case"pcm-s24be":return"in24";case"pcm-s32":return"in32";case"pcm-s32be":return"in32";case"pcm-f32":return"fl32";case"pcm-f32be":return"fl32";case"pcm-f64":return"fl64";case"pcm-f64be":return"fl64"}else switch(a){case"pcm-s16":return"ipcm";case"pcm-s16be":return"ipcm";case"pcm-s24":return"ipcm";case"pcm-s24be":return"ipcm";case"pcm-s32":return"ipcm";case"pcm-s32be":return"ipcm";case"pcm-f32":return"fpcm";case"pcm-f32be":return"fpcm";case"pcm-f64":return"fpcm";case"pcm-f64be":return"fpcm"}},WF=(a,t)=>{switch(a){case"aac":return c0;case"mp3":return c0;case"opus":return mF;case"vorbis":return c0;case"flac":return gF;case"ac3":return hF;case"eac3":return _F;case"dts":return vF}if(t)switch(a){case"pcm-s24":return Jo;case"pcm-s24be":return Jo;case"pcm-s32":return Jo;case"pcm-s32be":return Jo;case"pcm-f32":return Jo;case"pcm-f32be":return Jo;case"pcm-f64":return Jo;case"pcm-f64be":return Jo}else switch(a){case"pcm-s16":return Qr;case"pcm-s16be":return Qr;case"pcm-s24":return Qr;case"pcm-s24be":return Qr;case"pcm-s32":return Qr;case"pcm-s32be":return Qr;case"pcm-f32":return Qr;case"pcm-f32be":return Qr;case"pcm-f64":return Qr;case"pcm-f64be":return Qr}return null},QF={webvtt:"wvtt"},KF={webvtt:yF},r2=a=>{We(a.length===3);let t=0;for(let i=0;i<3;i++)t<<=5,t+=a.charCodeAt(i)-96;return t};class d0{constructor(t,i){if(this.finalized=!1,this.started=!1,this.pos=0,this.trackedWrites=null,this.trackedStart=-1,this.trackedEnd=-1,t._writerAcquired)throw new Error("Can't have multiple Writers for the same Target.");this.target=t,t._setMonotonicity(i),t._writerAcquired=!0}start(){We(!this.started),this.target._start(),this.started=!0}write(t){We(this.started&&!this.finalized),this.maybeTrackWrites(t),this.target._write(t,this.pos),this.pos+=t.byteLength}seek(t){this.pos=t}getPos(){return this.pos}async flush(){return We(this.started&&!this.finalized),this.target._flush()}async finalize(){We(this.started&&!this.finalized),await this.target._finalize(),this.finalized=!0}maybeTrackWrites(t){if(!this.trackedWrites)return;let i=this.getPos();if(if0)throw new Error(`ArrayBuffer exceeded maximum size of ${f0} bytes. Please consider using another target.`);if(this._supportsResize)this._buffer.resize(i);else{const n=new ArrayBuffer(i),s=new Uint8Array(n);s.set(this._bytes,0),this._buffer=n,this._bytes=s}}}_start(){}_write(t,i){this._ensureSize(i+t.byteLength),this._bytes.set(t,i),this._maxPos=Math.max(this._maxPos,i+t.byteLength),this._dispatchWrite(i,i+t.byteLength)}async _flush(){}async _finalize(){this.buffer=this._buffer.slice(0,this._maxPos),this._options.onFinalize&&await this._options.onFinalize(this.buffer),this._emit("finalized")}async _close(){}_getSlice(t,i){return this._bytes.slice(t,i)}}class YF extends ko{constructor(t,i){super(),this._baseTarget=t,this._offset=i}_start(){}_write(t,i){this._baseTarget._write(t,this._offset+i),this._dispatchWrite(i,i+t.byteLength)}_flush(){return this._baseTarget._flush()}async _finalize(){this._emit("finalized")}async _close(){}_setMonotonicity(t){super._setMonotonicity(t),this._baseTarget._setMonotonicity(t)}}class p0{constructor(t,i){if(this.rootPath=t,this.getTarget=i,typeof t!="string")throw new TypeError("rootPath must be a string.");if(typeof i!="function")throw new TypeError("getTarget must be a function.")}}const Ds=57600,JF=2082844800,XF=a=>{const t={},i=a.track;return i.metadata.name!==void 0&&(t.name=i.metadata.name),t},en=(a,t,i=!0)=>{const n=a*t;return i?Math.round(n):n},Rc=a=>{if(a.samples.length===0)return 0;let t=1/0,i=-1/0;for(let n=0;ni&&(i=s.timestamp+s.duration)}return t===1/0?0:i-t};class ZF extends Hy{constructor(t,i){super(t),this.writer=null,this.boxWriter=null,this.initWriter=null,this.initBoxWriter=null,this.auxTarget=new Kd,this.auxWriter=new d0(this.auxTarget,!1),this.auxBoxWriter=new zf(this.auxWriter),this.mdat=null,this.ftypSize=null,this.trackDatas=[],this.allTracksKnown=Em(),this.creationTime=Math.floor(Date.now()/1e3)+JF,this.finalizedChunks=[],this.wroteFragmentedHeader=!1,this.nextFragmentNumber=1,this.maxWrittenTimestamp=-1/0,this.minWrittenTimestamp=1/0,this.maxWrittenEndTimestamp=-1/0,this.segmentHeaderSize=null,this.format=i,this.formatOptions={...i._options},this.isQuickTime=i instanceof h2,this.isCmaf=i instanceof g2,this.minimumFragmentDuration=this.formatOptions.minimumFragmentDuration??(i instanceof g2?1/0:1),this.auxWriter.start()}async start(){const t=await this.mutex.acquire();if(this.isCmaf?(this.fastStart="fragmented",this.isFragmented=!0):(this.writer=await this.output._getRootWriter(n=>this.formatOptions.fastStart!==void 0?this.formatOptions.fastStart==="fragmented":n instanceof Kd),this.boxWriter=new zf(this.writer),this.fastStart=this.formatOptions.fastStart??(this.writer.target instanceof Kd?"in-memory":!1),this.isFragmented=this.fastStart==="fragmented"),this.isCmaf){if(!this.output._hasInitTarget())throw new Error("CMAF outputs require the initTarget field in OutputOptions to be set; the init segment will be written to it.");const n=await this.output._getInitTarget(),s=new d0(n,!0);s.start(),this.initWriter=s,this.initBoxWriter=new zf(s)}const i=this.output.tracks.some(n=>n.isVideoTrack()&&n.source._codec==="avc");{const n=this.initBoxWriter??this.boxWriter;if(We(n),this.formatOptions.onFtyp&&n.writer.startTrackingWrites(),n.writeBox(IG({isQuickTime:this.isQuickTime,holdsAvc:i,fragmented:this.isFragmented,cmaf:this.isCmaf})),this.formatOptions.onFtyp){const{data:s,start:r}=n.writer.stopTrackingWrites();this.formatOptions.onFtyp(s,r)}this.ftypSize=n.writer.getPos(),this.isCmaf&&await this.initWriter.flush()}if(this.fastStart!=="in-memory")if(this.fastStart==="reserve"){for(const n of this.output.tracks)if(n.metadata.maximumPacketCount===void 0)throw new Error("All tracks must specify maximumPacketCount in their metadata when using fastStart: 'reserve'.")}else this.isFragmented||(We(this.writer),We(this.boxWriter),this.formatOptions.onMdat&&this.writer.startTrackingWrites(),this.mdat=Ef(!0),this.boxWriter.writeBox(this.mdat));await this.writer?.flush();for(const n of this.output.tracks)n.isVideoTrack()&&n.metadata.decoderConfig?this.getVideoTrackData(n,n.metadata.primingPacket??null,{decoderConfig:n.metadata.decoderConfig}):n.isAudioTrack()&&n.metadata.decoderConfig&&this.getAudioTrackData(n,n.metadata.primingPacket??null,{decoderConfig:n.metadata.decoderConfig});t()}allTracksAreKnown(){for(const t of this.output.tracks)if(!t.source._closed&&!this.trackDatas.some(i=>i.track===t))return!1;return!0}async getMimeType(){await this.allTracksKnown.promise;const t=this.trackDatas.map(i=>i.type==="video"||i.type==="audio"?i.info.decoderConfig.codec:{webvtt:"wvtt"}[i.track.source._codec]);return gG({isQuickTime:this.isQuickTime,hasVideo:this.trackDatas.some(i=>i.type==="video"),hasAudio:this.trackDatas.some(i=>i.type==="audio"),codecStrings:t})}getVideoTrackData(t,i,n){const s=this.trackDatas.find(p=>p.track===t);if(s)return s;Ym(n,t.source._codec),We(n),We(n.decoderConfig);const r={...n.decoderConfig};We(r.codedWidth!==void 0),We(r.codedHeight!==void 0);let o=!1;if(t.source._codec==="avc"&&!r.description){if(!i)throw new Error("No AVC description provided; you must therefore provide a priming packet.");const p=wA(i.data);if(!p)throw new Error("Couldn't extract an AVCDecoderConfigurationRecord from the AVC packet. Make sure the packets are in Annex B format (as specified in ITU-T-REC-H.264) when not providing a description, or provide a description (must be an AVCDecoderConfigurationRecord as specified in ISO 14496-15) and ensure the packets are in AVCC format.");r.description=kA(p),o=!0}else if(t.source._codec==="hevc"&&!r.description){if(!i)throw new Error("No HEVC description provided; you must therefore provide a priming packet.");const p=$A(i.data);if(!p)throw new Error("Couldn't extract an HEVCDecoderConfigurationRecord from the HEVC packet. Make sure the packets are in Annex B format (as specified in ITU-T-REC-H.265) when not providing a description, or provide a description (must be an HEVCDecoderConfigurationRecord as specified in ISO 14496-15) and ensure the packets are in HEVC format.");r.description=zA(p),o=!0}const l=nA(1/(t.metadata.frameRate??Ds),1e6).den,c=r.displayAspectWidth,d=r.displayAspectHeight,g=c===void 0||d===void 0?{num:1,den:1}:Om({num:c*r.codedHeight,den:d*r.codedWidth}),h=r.codec==="ap4h"||r.codec==="ap4x",m={muxer:this,track:t,type:"video",info:{width:r.codedWidth,height:r.codedHeight,pixelAspectRatio:g,decoderConfig:r,requiresAnnexBTransformation:o,hasAlphaChannel:h},timescale:l,samples:[],sampleQueue:[],timestampProcessingQueue:[],timeToSampleTable:[],compositionTimeOffsetTable:[],lastTimescaleUnits:null,lastSample:null,startTimestampOffset:null,finalizedChunks:[],currentChunk:null,compactlyCodedChunkTable:[],closed:!1,avgBitrate:t.source._nominalBitrate??t.metadata.averageBitrate??0,maxBitrate:t.source._nominalBitrate??t.metadata.bitrate??0};return this.trackDatas.push(m),this.trackDatas.sort((p,u)=>p.track.id-u.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),m}getAudioTrackData(t,i,n){const s=this.trackDatas.find(c=>c.track===t);if(s)return s;Jm(n,t.source._codec),We(n),We(n.decoderConfig);const r={...n.decoderConfig};let o=!1;if(t.source._codec==="aac"&&!r.description){if(!i)throw new Error("No AAC description provided; you must therefore provide a priming packet.");const c=Cf(Nl.tempFromBytes(i.data));if(!c)throw new Error("Couldn't parse ADTS header from the AAC packet. Make sure the packets are in ADTS format (as specified in ISO 13818-7) when not providing a description, or provide a description (must be an AudioSpecificConfig as specified in ISO 14496-3) and ensure the packets are raw AAC data.");const d=jd[c.samplingFrequencyIndex],g=xf[c.channelConfiguration];if(d===void 0||g===void 0)throw new Error("Invalid ADTS frame header.");r.description=Hm({objectType:c.objectType,outputSampleRate:d,outputNumberOfChannels:g}),o=!0}if(!i){if(t.source._codec==="ac3"||t.source._codec==="eac3")throw new Error("AC-3/E-AC-3 require a priming packet.");if(t.source._codec==="dts")throw new Error("DTS requires a priming packet.")}const l={muxer:this,track:t,type:"audio",info:{numberOfChannels:n.decoderConfig.numberOfChannels,sampleRate:n.decoderConfig.sampleRate,decoderConfig:r,requiresPcmTransformation:!this.isFragmented&&Ns.includes(t.source._codec),expectedNextPcmPacketTimestamp:null,requiresAdtsStripping:o,primingPacket:i},timescale:r.sampleRate,samples:[],sampleQueue:[],timestampProcessingQueue:[],timeToSampleTable:[],compositionTimeOffsetTable:[],lastTimescaleUnits:null,lastSample:null,startTimestampOffset:null,finalizedChunks:[],currentChunk:null,compactlyCodedChunkTable:[],closed:!1,avgBitrate:t.source._nominalBitrate??t.metadata.averageBitrate??0,maxBitrate:t.source._nominalBitrate??t.metadata.bitrate??0};return this.trackDatas.push(l),this.trackDatas.sort((c,d)=>c.track.id-d.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),l}getSubtitleTrackData(t,i){const n=this.trackDatas.find(r=>r.track===t);if(n)return n;hy(i),We(i),We(i.config);const s={muxer:this,track:t,type:"subtitle",info:{config:i.config},timescale:1e3,samples:[],sampleQueue:[],timestampProcessingQueue:[],timeToSampleTable:[],compositionTimeOffsetTable:[],lastTimescaleUnits:null,lastSample:null,startTimestampOffset:null,finalizedChunks:[],currentChunk:null,compactlyCodedChunkTable:[],closed:!1,avgBitrate:t.source._nominalBitrate??t.metadata.averageBitrate??0,maxBitrate:t.source._nominalBitrate??t.metadata.bitrate??0,lastCueEndTimestamp:null,cueQueue:[],nextSourceId:0,cueToSourceId:new WeakMap};return this.trackDatas.push(s),this.trackDatas.sort((r,o)=>r.track.id-o.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),s}async addEncodedVideoPacket(t,i,n){const s=await this.mutex.acquire();try{const r=this.getVideoTrackData(t,i,n);let o=i.data;if(r.info.requiresAnnexBTransformation){const c=[...Nd(o)].map(d=>o.subarray(d.offset,d.offset+d.length));if(c.length===0)throw new Error("Failed to transform packet data. Make sure all packets are provided in Annex B format, as specified in ITU-T-REC-H.264 and ITU-T-REC-H.265.");o=yA(c,4)}this.validateTimestamp(r.track,i.timestamp,i.type==="key");const l=this.createSampleForTrack(r,o,i.timestamp,i.duration,i.type);await this.registerSample(r,l)}finally{s()}}async addEncodedAudioPacket(t,i,n){const s=await this.mutex.acquire();try{const r=this.getAudioTrackData(t,i,n);let o=i.data;if(r.info.requiresAdtsStripping){const g=Cf(Nl.tempFromBytes(o));if(!g)throw new Error("Expected ADTS frame, didn't get one.");const h=g.crcCheck===null?xy:Sy;o=o.subarray(h)}this.validateTimestamp(r.track,i.timestamp,i.type==="key");let l=i.timestamp,c=i.duration;if(r.info.requiresPcmTransformation){const h=Qo(r.info.decoderConfig.codec).sampleSize*r.info.numberOfChannels;if(c=o.byteLength/h/r.info.sampleRate,r.info.expectedNextPcmPacketTimestamp!==null){const m=l-r.info.expectedNextPcmPacketTimestamp;if(m<.01)l=r.info.expectedNextPcmPacketTimestamp;else{const p=await this.padWithSilence(r,r.info.expectedNextPcmPacketTimestamp,m);l=r.info.expectedNextPcmPacketTimestamp+p}}r.info.expectedNextPcmPacketTimestamp=l+c}const d=this.createSampleForTrack(r,o,l,c,i.type);await this.registerSample(r,d)}finally{s()}}async padWithSilence(t,i,n){const s=en(n,t.timescale);if(n=s/t.timescale,s>0){const{sampleSize:r,silentValue:o}=Qo(t.info.decoderConfig.codec),l=s*t.info.numberOfChannels,c=new Uint8Array(r*l).fill(o),d=this.createSampleForTrack(t,new Uint8Array(c.buffer),i,n,"key");await this.registerSample(t,d)}return n}async addSubtitleCue(t,i,n){const s=await this.mutex.acquire();try{const r=this.getSubtitleTrackData(t,n);this.validateTimestamp(r.track,i.timestamp,!0),t.source._codec==="webvtt"&&(r.cueQueue.push(i),await this.processWebVTTCues(r,i.timestamp))}finally{s()}}async processWebVTTCues(t,i){for(;t.cueQueue.length>0;){t.lastCueEndTimestamp??=Math.min(0,t.cueQueue[0].timestamp);const n=new Set([]);for(const d of t.cueQueue)We(d.timestamp<=i),We(t.lastCueEndTimestamp<=d.timestamp+d.duration),n.add(Math.max(d.timestamp,t.lastCueEndTimestamp)),n.add(d.timestamp+d.duration);const s=[...n].sort((d,g)=>d-g),r=s[0],o=s[1]??r;if(i=o)break;Mf.lastIndex=0;const h=Mf.test(g.text),m=g.timestamp+g.duration;let p=t.cueToSourceId.get(g);if(p===void 0&&os.timestamp).sort((s,r)=>s-r);this.isFragmented?t.startTimestampOffset??=Math.min(n[0],0):t.startTimestampOffset??=n[0];for(let s=0;s=0),t.lastTimescaleUnits+=d,t.lastSample.timescaleUnitsToNextSample=d,!this.isFragmented){let g=Fr(t.timeToSampleTable);if(We(g),g.sampleCount===1){g.sampleDelta=d;const m=t.timeToSampleTable[t.timeToSampleTable.length-2];m&&m.sampleDelta===d&&(m.sampleCount++,t.timeToSampleTable.pop(),g=m)}else g.sampleDelta!==d&&(g.sampleCount--,t.timeToSampleTable.push(g={sampleCount:1,sampleDelta:d}));g.sampleDelta===l?g.sampleCount++:t.timeToSampleTable.push({sampleCount:1,sampleDelta:l});const h=Fr(t.compositionTimeOffsetTable);We(h),h.sampleCompositionTimeOffset===o?h.sampleCount++:t.compositionTimeOffsetTable.push({sampleCount:1,sampleCompositionTimeOffset:o})}}else t.lastTimescaleUnits=en(r.decodeTimestamp,t.timescale,!1),this.isFragmented||(t.timeToSampleTable.push({sampleCount:1,sampleDelta:l}),t.compositionTimeOffsetTable.push({sampleCount:1,sampleCompositionTimeOffset:o}));t.lastSample=r}if(t.timestampProcessingQueue.length=0,We(t.lastSample),We(t.lastTimescaleUnits!==null),i!==void 0&&t.lastSample.timescaleUnitsToNextSample===0){We(i.type==="key");const s=en(i.timestamp,t.timescale,!1),r=Math.round(s-t.lastTimescaleUnits);t.lastSample.timescaleUnitsToNextSample=r}}async registerSample(t,i){i.type==="key"&&this.processTimestamps(t,i),t.timestampProcessingQueue.push(i),this.isFragmented?(t.sampleQueue.push(i),await this.interleaveSamples()):this.fastStart==="reserve"?await this.registerSampleFastStartReserve(t,i):await this.addSampleToTrack(t,i)}async addSampleToTrack(t,i){if(!this.isFragmented&&(t.samples.push(i),this.fastStart==="reserve")){const s=t.track.metadata.maximumPacketCount;if(We(s!==void 0),t.samples.length>s)throw new Error(`Track #${t.track.id} has already reached the maximum packet count (${s}). Either add less packets or increase the maximum packet count.`)}let n=!1;if(!t.currentChunk)n=!0;else{t.currentChunk.startTimestamp=Math.min(t.currentChunk.startTimestamp,i.timestamp);const s=i.timestamp-t.currentChunk.startTimestamp;if(this.isFragmented){const r=this.trackDatas.every(o=>{if(t===o)return i.type==="key";const l=o.sampleQueue[0];return l?l.type==="key":o.closed});s>=this.minimumFragmentDuration&&r&&i.timestamp>this.maxWrittenTimestamp&&(n=!0,await this.finalizeFragment())}else n=s>=.5}n&&(t.currentChunk&&await this.finalizeCurrentChunk(t),t.currentChunk={startTimestamp:i.timestamp,samples:[],offset:null,moofOffset:null,trafIndex:null}),We(t.currentChunk),t.currentChunk.samples.push(i),this.isFragmented&&(this.maxWrittenTimestamp=Math.max(this.maxWrittenTimestamp,i.timestamp),this.maxWrittenEndTimestamp=Math.max(this.maxWrittenEndTimestamp,i.timestamp+i.duration),this.minWrittenTimestamp=Math.min(this.minWrittenTimestamp,i.timestamp))}async finalizeCurrentChunk(t){if(We(!this.isFragmented),We(this.writer),!t.currentChunk)return;t.finalizedChunks.push(t.currentChunk),this.finalizedChunks.push(t.currentChunk);let i=t.currentChunk.samples.length;if(t.type==="audio"&&t.info.requiresPcmTransformation&&(i=t.currentChunk.samples.reduce((n,s)=>n+en(s.duration,t.timescale),0)),(t.compactlyCodedChunkTable.length===0||Fr(t.compactlyCodedChunkTable).samplesPerChunk!==i)&&t.compactlyCodedChunkTable.push({firstChunk:t.finalizedChunks.length,samplesPerChunk:i}),this.fastStart==="in-memory"){t.currentChunk.offset=0;return}t.currentChunk.offset=this.writer.getPos();for(const n of t.currentChunk.samples)We(n.data),this.writer.write(n.data),n.data=null;await this.writer.flush()}async interleaveSamples(t=!1){if(We(this.isFragmented),!(!t&&!this.allTracksAreKnown()))e:for(;;){let i=null,n=1/0;for(const r of this.trackDatas){if(!t&&r.sampleQueue.length===0&&!r.closed)break e;r.sampleQueue.length>0&&r.sampleQueue[0].timestampp.currentChunk);if(i.length===0){t&&await this.writer.flush();return}const n=this.nextFragmentNumber++,s=t2(n,i),r=this.writer.getPos(),o=r+this.boxWriter.measureBox(s);let l=o+Xm,c=1/0;for(let p=0;p=2**32;if(g)for(const p of i)p.currentChunk.offset+=vy-Xm;this.formatOptions.onMoof&&this.writer.startTrackingWrites();const h=t2(n,i);if(this.boxWriter.writeBox(h),this.formatOptions.onMoof){const{data:p,start:u}=this.writer.stopTrackingWrites();this.formatOptions.onMoof(p,u,c)}We(this.writer.getPos()===o),this.formatOptions.onMdat&&this.writer.startTrackingWrites();const m=Ef(g);m.size=d,this.boxWriter.writeBox(m),this.writer.seek(o+(g?vy:Xm));for(const p of i)for(const u of p.currentChunk.samples)this.writer.write(u.data),u.data=null;if(this.formatOptions.onMdat){const{data:p,start:u}=this.writer.stopTrackingWrites();this.formatOptions.onMdat(p,u)}for(const p of i)p.finalizedChunks.push(p.currentChunk),this.finalizedChunks.push(p.currentChunk),p.currentChunk=null;t&&await this.writer.flush()}async registerSampleFastStartReserve(t,i){this.allTracksAreKnown()?(this.mdat||await this.createFastStartReserveMdat(),await this.addSampleToTrack(t,i)):t.sampleQueue.push(i)}async createFastStartReserveMdat(){We(this.writer),We(this.boxWriter),this.ensureOneEnabledTrack();const t=Qd(this),n=this.boxWriter.measureBox(t)+this.computeSampleTableSizeUpperBound()+4096;We(this.ftypSize!==null),this.writer.seek(this.ftypSize+n),this.formatOptions.onMdat&&this.writer.startTrackingWrites(),this.mdat=Ef(!0),this.boxWriter.writeBox(this.mdat);for(const s of this.trackDatas){for(const r of s.sampleQueue)await this.addSampleToTrack(s,r);s.sampleQueue.length=0}}computeSampleTableSizeUpperBound(){We(this.fastStart==="reserve");let t=0;for(const i of this.trackDatas){const n=i.track.metadata.maximumPacketCount;We(n!==void 0),t+=8*Math.ceil(2/3*n),t+=4*n,t+=8*Math.ceil(2/3*n),t+=12*Math.ceil(2/3*n),t+=4*n,t+=8*n}return t}async onTrackClose(t){const i=await this.mutex.acquire(),n=this.trackDatas.find(s=>s.track===t);n&&(n.closed=!0,n.type==="subtitle"&&t.source._codec==="webvtt"&&await this.processWebVTTCues(n,1/0),this.processTimestamps(n)),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),this.isFragmented&&await this.interleaveSamples(),i()}ensureOneEnabledTrack(){for(const t of["video","audio","subtitle"]){const i=this.trackDatas.filter(s=>s.type===t);if(i.length===0)continue;if(!i.some(s=>s.track.metadata.disposition?.default!==!1)){const s=i[0];s.track.metadata.disposition={...s.track.metadata.disposition,default:!0}}}}async forceFragmentFinalization(){We(this.isFragmented);const t=await this.mutex.acquire();try{for(const i of this.trackDatas)i.type==="subtitle"&&i.track.source._codec==="webvtt"&&await this.processWebVTTCues(i,1/0),this.processTimestamps(i);await this.interleaveSamples(!0),await this.finalizeFragment()}finally{t()}}async finalize(){const t=await this.mutex.acquire();this.allTracksKnown.resolve(),this.ensureOneEnabledTrack(),!this.mdat&&this.fastStart==="reserve"&&await this.createFastStartReserveMdat();for(const i of this.trackDatas)i.closed=!0,i.type==="subtitle"&&i.track.source._codec==="webvtt"&&await this.processWebVTTCues(i,1/0),this.processTimestamps(i);if(this.isFragmented)await this.interleaveSamples(!0),await this.finalizeFragment(!1);else for(const i of this.trackDatas){await this.finalizeCurrentChunk(i);const n=Rc(i);if(n>0){let l=0;for(const c of i.samples)l+=c.size;i.avgBitrate=Math.round(8*l/n)}else i.avgBitrate=0;let s=0,r=0,o=0;for(let l=0;l=1;)r-=i.samples[s].size,s++;o=Math.max(o,r)}if(i.maxBitrate=8*o,i.startTimestampOffset!==null)for(let l=0;l=2**32&&(this.mdat.largeSize=!0)}this.formatOptions.onMoov&&this.writer.startTrackingWrites();const n=Qd(this);if(this.boxWriter.writeBox(n),this.formatOptions.onMoov){const{data:s,start:r}=this.writer.stopTrackingWrites();this.formatOptions.onMoov(s,r)}this.formatOptions.onMdat&&this.writer.startTrackingWrites(),this.mdat.size=i,this.boxWriter.writeBox(this.mdat);for(const s of this.finalizedChunks)for(const r of s.samples)We(r.data),this.writer.write(r.data),r.data=null;if(this.formatOptions.onMdat){const{data:s,start:r}=this.writer.stopTrackingWrites();this.formatOptions.onMdat(s,r)}}else if(this.isFragmented)if(this.isCmaf){const i=this.segmentHeaderSize!==null?this.writer.getPos()-this.segmentHeaderSize:0;this.writer.seek(0),this.boxWriter.writeBox(Xy()),this.boxWriter.writeBox(Zy(this,i))}else{const i=this.writer.getPos(),n=UF(this.trackDatas);this.boxWriter.writeBox(n);const s=this.writer.getPos()-i;this.writer.seek(this.writer.getPos()-4),this.boxWriter.writeU32(s)}else{We(this.mdat);const i=this.boxWriter.offsets.get(this.mdat);We(i!==void 0);const n=this.writer.getPos()-i;if(this.mdat.size=n,this.mdat.largeSize=n>=2**32,this.boxWriter.patchBox(this.mdat),this.formatOptions.onMdat){const{data:r,start:o}=this.writer.stopTrackingWrites();this.formatOptions.onMdat(r,o)}const s=Qd(this);if(this.fastStart==="reserve"){We(this.ftypSize!==null),this.writer.seek(this.ftypSize),this.formatOptions.onMoov&&this.writer.startTrackingWrites(),this.boxWriter.writeBox(s);const r=this.boxWriter.offsets.get(this.mdat)-this.writer.getPos();this.boxWriter.writeBox(DG(r))}else this.formatOptions.onMoov&&this.writer.startTrackingWrites(),this.boxWriter.writeBox(s);if(this.formatOptions.onMoov){const{data:r,start:o}=this.writer.stopTrackingWrites();this.formatOptions.onMoov(r,o)}}t()}}const e7=-32768,t7=2**15-1,o2="Mediabunny",l2=6,c2=5,a7={video:1,audio:2,subtitle:17};class i7 extends Hy{constructor(t,i){super(t),this.trackDatas=[],this.allTracksKnown=Em(),this.segment=null,this.segmentInfo=null,this.seekHead=null,this.tracksElement=null,this.tagsElement=null,this.attachmentsElement=null,this.segmentDuration=null,this.cues=null,this.currentCluster=null,this.currentClusterStartMsTimestamp=null,this.currentClusterMaxMsTimestamp=null,this.trackDatasInCurrentCluster=new Map,this.startTimestamp=1/0,this.endTimestamp=-1/0,this.warnedAboutTooNegativeTimestamp=!1,this.format=i}async start(){const t=await this.mutex.acquire();this.writer=await this.output._getRootWriter(!!this.format._options.appendOnly),this.ebmlWriter=new _G(this.writer),this.writeEBMLHeader(),this.createSegmentInfo(),this.createCues(),await this.writer.flush();for(const i of this.output.tracks)i.isVideoTrack()&&i.metadata.decoderConfig?this.getVideoTrackData(i,i.metadata.primingPacket??null,{decoderConfig:i.metadata.decoderConfig}):i.isAudioTrack()&&i.metadata.decoderConfig&&this.getAudioTrackData(i,i.metadata.primingPacket??null,{decoderConfig:i.metadata.decoderConfig});t()}writeEBMLHeader(){this.format._options.onEbmlHeader&&this.writer.startTrackingWrites();const t={id:et.EBML,data:[{id:et.EBMLVersion,data:1},{id:et.EBMLReadVersion,data:1},{id:et.EBMLMaxIDLength,data:4},{id:et.EBMLMaxSizeLength,data:8},{id:et.DocType,data:this.format instanceof Uf?"webm":"matroska"},{id:et.DocTypeVersion,data:2},{id:et.DocTypeReadVersion,data:2}]};if(this.ebmlWriter.writeEBML(t),this.format._options.onEbmlHeader){const{data:i,start:n}=this.writer.stopTrackingWrites();this.format._options.onEbmlHeader(i,n)}}maybeCreateSeekHead(t){if(this.format._options.appendOnly)return;const i=new Uint8Array([28,83,187,107]),n=new Uint8Array([21,73,169,102]),s=new Uint8Array([22,84,174,107]),r=new Uint8Array([25,65,164,105]),o=new Uint8Array([18,84,195,103]),l={id:et.SeekHead,data:[{id:et.Seek,data:[{id:et.SeekID,data:i},{id:et.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.cues)-this.segmentDataOffset:0}]},{id:et.Seek,data:[{id:et.SeekID,data:n},{id:et.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.segmentInfo)-this.segmentDataOffset:0}]},{id:et.Seek,data:[{id:et.SeekID,data:s},{id:et.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.tracksElement)-this.segmentDataOffset:0}]},this.attachmentsElement?{id:et.Seek,data:[{id:et.SeekID,data:r},{id:et.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.attachmentsElement)-this.segmentDataOffset:0}]}:null,this.tagsElement?{id:et.Seek,data:[{id:et.SeekID,data:o},{id:et.SeekPosition,size:5,data:t?this.ebmlWriter.offsets.get(this.tagsElement)-this.segmentDataOffset:0}]}:null]};this.seekHead=l}createSegmentInfo(){const t={id:et.Duration,data:new Zm(0)};this.segmentDuration=t;const i={id:et.Info,data:[{id:et.TimestampScale,data:1e6},{id:et.MuxingApp,data:o2},{id:et.WritingApp,data:o2},this.format._options.appendOnly?null:t]};this.segmentInfo=i}createTracks(){const t={id:et.Tracks,data:[]};this.tracksElement=t;for(const i of this.trackDatas){let n=vG[i.track.source._codec];We(n),i.type==="audio"&&i.track.source._codec==="dts"&&(i.info.decoderConfig.codec==="dtse"?n="A_DTS/EXPRESS":i.info.decoderConfig.codec==="dtsl"&&(n="A_DTS/LOSSLESS"));let s=0;if(i.type==="audio"&&i.track.source._codec==="opus"){s=1e6*80;const r=i.info.decoderConfig.description;if(r){const o=Gs(r),l=oy(o);s=Math.round(1e9*(l.preSkip/rG))}}t.data.push({id:et.TrackEntry,data:[{id:et.TrackNumber,data:i.track.id},{id:et.TrackUID,data:i.track.id},{id:et.TrackType,data:a7[i.type]},i.track.metadata.disposition?.default===!1?{id:et.FlagDefault,data:0}:null,i.track.metadata.disposition?.forced?{id:et.FlagForced,data:1}:null,i.track.metadata.disposition?.hearingImpaired?{id:et.FlagHearingImpaired,data:1}:null,i.track.metadata.disposition?.visuallyImpaired?{id:et.FlagVisualImpaired,data:1}:null,i.track.metadata.disposition?.original?{id:et.FlagOriginal,data:1}:null,i.track.metadata.disposition?.commentary?{id:et.FlagCommentary,data:1}:null,{id:et.FlagLacing,data:0},{id:et.Language,data:i.track.metadata.languageCode??Lb},{id:et.CodecID,data:n},i.codecPrivate?{id:et.CodecPrivate,data:Gs(i.codecPrivate)}:null,{id:et.CodecDelay,data:0},{id:et.SeekPreRoll,data:s},i.track.metadata.name!==void 0?{id:et.Name,data:new Ko(i.track.metadata.name)}:null,i.type==="video"?this.videoSpecificTrackInfo(i):null,i.type==="audio"?this.audioSpecificTrackInfo(i):null,i.type==="subtitle"?this.subtitleSpecificTrackInfo(i):null]})}}videoSpecificTrackInfo(t){const{frameRate:i,transformationMatrix:n}=t.track.metadata,s=[i?{id:et.DefaultDuration,data:1e9/i}:null];let r,o,l;if(n){r=VC(n);const u=yf(jb(-r),n);o=Math.sign(u[0]),l=Math.sign(u[4]),l===-1&&(l=1,o=-o,r=bf(r+180))}else r=t.track.metadata.rotation??0,o=t.track.metadata.flip?-1:1,l=1;const c=r?bf(o===-1?r:-r):0,d=Math.round(Math.acos(o)*zm),g=Math.round(Math.acos(l)*zm),h=!!t.info.aspectRatio&&t.info.aspectRatio.num*t.info.height!==t.info.aspectRatio.den*t.info.width,m=t.info.decoderConfig.colorSpace,p={id:et.Video,data:[{id:et.PixelWidth,data:t.info.width},{id:et.PixelHeight,data:t.info.height},h?{id:et.DisplayWidth,data:t.info.aspectRatio.num}:null,h?{id:et.DisplayHeight,data:t.info.aspectRatio.den}:null,h?{id:et.DisplayUnit,data:3}:null,t.info.alphaMode?{id:et.AlphaMode,data:1}:null,Ob(m)?null:{id:et.Colour,data:[{id:et.MatrixCoefficients,data:m?.matrix!=null?Pd[m.matrix]:2},{id:et.TransferCharacteristics,data:m?.transfer!=null?Bd[m.transfer]:2},{id:et.Primaries,data:m?.primaries!=null?Rd[m.primaries]:2},{id:et.Range,data:m?.fullRange!=null?m.fullRange?2:1:0}]},c||d||g?{id:et.Projection,data:[{id:et.ProjectionType,data:0},d?{id:et.ProjectionPoseYaw,data:new Id(d)}:null,g?{id:et.ProjectionPosePitch,data:new Id(g)}:null,c?{id:et.ProjectionPoseRoll,data:new Id((c+180)%360-180)}:null]}:null]};return s.push(p),s}audioSpecificTrackInfo(t){const i=Ns.includes(t.track.source._codec)?Qo(t.track.source._codec):null;return[{id:et.Audio,data:[{id:et.SamplingFrequency,data:new Id(t.info.sampleRate)},{id:et.Channels,data:t.info.numberOfChannels},i?{id:et.BitDepth,data:8*i.sampleSize}:null]}]}subtitleSpecificTrackInfo(t){return[]}maybeCreateTags(){const t=[],i=(r,o)=>{t.push({id:et.SimpleTag,data:[{id:et.TagName,data:new Ko(r)},typeof o=="string"?{id:et.TagString,data:new Ko(o)}:{id:et.TagBinary,data:o}]})},n=this.output._metadataTags,s=new Set;for(const{key:r,value:o}of Nm(n))switch(r){case"title":i("TITLE",o),s.add("TITLE");break;case"description":i("DESCRIPTION",o),s.add("DESCRIPTION");break;case"artist":i("ARTIST",o),s.add("ARTIST");break;case"album":i("ALBUM",o),s.add("ALBUM");break;case"albumArtist":i("ALBUM_ARTIST",o),s.add("ALBUM_ARTIST");break;case"genre":i("GENRE",o),s.add("GENRE");break;case"beatsPerMinute":i("BPM",o.toString()),s.add("BPM");break;case"comment":i("COMMENT",o),s.add("COMMENT");break;case"lyrics":i("LYRICS",o),s.add("LYRICS");break;case"date":i("DATE",o.toISOString().slice(0,10)),s.add("DATE");break;case"trackNumber":{const l=n.tracksTotal!==void 0?`${o}/${n.tracksTotal}`:o.toString();i("PART_NUMBER",l),s.add("PART_NUMBER")}break;case"discNumber":{const l=n.discsTotal!==void 0?`${o}/${n.discsTotal}`:o.toString();i("DISC",l),s.add("DISC")}break;case"tracksTotal":case"discsTotal":break;case"images":case"raw":break;default:yo(r)}if(n.raw)for(const r in n.raw){const o=n.raw[r];o==null||s.has(r)||(typeof o=="string"||o instanceof Uint8Array)&&i(r,o)}t.length!==0&&(this.tagsElement={id:et.Tags,data:[{id:et.Tag,data:[{id:et.Targets,data:[{id:et.TargetTypeValue,data:50},{id:et.TargetType,data:"MOVIE"}]},...t]}]})}maybeCreateAttachments(){const t=this.output._metadataTags,i=[],n=new Set,s=t.images??[];for(const r of s){let o=r.name;o===void 0&&(o=(r.kind==="coverFront"?"cover":r.kind==="coverBack"?"back":"image")+(lA(r.mimeType)??""));let l;for(;;){l=0n;for(let c=0;c<8;c++)l<<=8n,l|=BigInt(Math.floor(Math.random()*256));if(l!==0n&&!n.has(l))break}n.add(l),i.push({id:et.AttachedFile,data:[r.description!==void 0?{id:et.FileDescription,data:new Ko(r.description)}:null,{id:et.FileName,data:new Ko(o)},{id:et.FileMediaType,data:r.mimeType},{id:et.FileData,data:r.data},{id:et.FileUID,data:l}]})}for(const[r,o]of Object.entries(t.raw??{}))!(o instanceof Xb)||!/^\d+$/.test(r)||s.find(c=>c.mimeType===o.mimeType&&cA(c.data,o.data))||i.push({id:et.AttachedFile,data:[o.description!==void 0?{id:et.FileDescription,data:new Ko(o.description)}:null,{id:et.FileName,data:new Ko(o.name??"")},{id:et.FileMediaType,data:o.mimeType??""},{id:et.FileData,data:o.data},{id:et.FileUID,data:BigInt(r)}]});i.length!==0&&(this.attachmentsElement={id:et.Attachments,data:i})}createSegment(){this.createTracks(),this.maybeCreateTags(),this.maybeCreateAttachments(),this.maybeCreateSeekHead(!1);const t={id:et.Segment,size:this.format._options.appendOnly?-1:l2,data:[this.seekHead,this.segmentInfo,this.tracksElement,this.attachmentsElement,this.tagsElement]};if(this.segment=t,this.format._options.onSegmentHeader&&this.writer.startTrackingWrites(),this.ebmlWriter.writeEBML(t),this.format._options.onSegmentHeader){const{data:i,start:n}=this.writer.stopTrackingWrites();this.format._options.onSegmentHeader(i,n)}}createCues(){this.cues={id:et.Cues,data:[]}}get segmentDataOffset(){return We(this.segment),this.ebmlWriter.dataOffsets.get(this.segment)}allTracksAreKnown(){for(const t of this.output.tracks)if(!t.source._closed&&!this.trackDatas.some(i=>i.track===t))return!1;return!0}async getMimeType(){await this.allTracksKnown.promise;const t=this.trackDatas.map(i=>i.type==="video"||i.type==="audio"?i.info.decoderConfig.codec:{webvtt:"wvtt"}[i.track.source._codec]);return bG({isWebM:this.format instanceof Uf,hasVideo:this.trackDatas.some(i=>i.type==="video"),hasAudio:this.trackDatas.some(i=>i.type==="audio"),codecStrings:t})}getVideoTrackData(t,i,n){const s=this.trackDatas.find(d=>d.track===t);if(s)return s;Ym(n,t.source._codec),We(n),We(n.decoderConfig),We(n.decoderConfig.codedWidth!==void 0),We(n.decoderConfig.codedHeight!==void 0);const r=n.decoderConfig.displayAspectWidth,o=n.decoderConfig.displayAspectHeight,l=r===void 0||o===void 0?null:Om({num:r,den:o}),c={track:t,type:"video",info:{width:n.decoderConfig.codedWidth,height:n.decoderConfig.codedHeight,aspectRatio:l,decoderConfig:n.decoderConfig,alphaMode:i?!!i.sideData.alpha:null},chunkQueue:[],lastWrittenMsTimestamp:null,codecPrivate:n.decoderConfig.description??null,closed:!1};return t.source._codec==="vp9"?c.codecPrivate=new Uint8Array(nG(c.info.decoderConfig.codec)):t.source._codec==="av1"?c.codecPrivate=new Uint8Array(my(c.info.decoderConfig.codec)):t.source._codec==="prores"&&(c.codecPrivate=ws.encode(n.decoderConfig.codec)),this.trackDatas.push(c),this.trackDatas.sort((d,g)=>d.track.id-g.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),c}getAudioTrackData(t,i,n){const s=this.trackDatas.find(c=>c.track===t);if(s)return s;Jm(n,t.source._codec),We(n),We(n.decoderConfig);const r={...n.decoderConfig};let o=!1;if(t.source._codec==="aac"&&!r.description){if(!i)throw new Error("No AAC description provided; you must therefore provide a priming packet.");const c=Cf(Nl.tempFromBytes(i.data));if(!c)throw new Error("Couldn't parse ADTS header from the AAC packet. Make sure the packets are in ADTS format (as specified in ISO 13818-7) when not providing a description, or provide a description (must be an AudioSpecificConfig as specified in ISO 14496-3) and ensure the packets are raw AAC data.");const d=jd[c.samplingFrequencyIndex],g=xf[c.channelConfiguration];if(d===void 0||g===void 0)throw new Error("Invalid ADTS frame header.");r.description=Hm({objectType:c.objectType,outputSampleRate:d,outputNumberOfChannels:g}),o=!0}const l={track:t,type:"audio",info:{numberOfChannels:n.decoderConfig.numberOfChannels,sampleRate:n.decoderConfig.sampleRate,decoderConfig:r,requiresAdtsStripping:o},chunkQueue:[],lastWrittenMsTimestamp:null,codecPrivate:r.description??null,closed:!1};return this.trackDatas.push(l),this.trackDatas.sort((c,d)=>c.track.id-d.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),l}getSubtitleTrackData(t,i){const n=this.trackDatas.find(r=>r.track===t);if(n)return n;hy(i),We(i),We(i.config);const s={track:t,type:"subtitle",info:{config:i.config},chunkQueue:[],lastWrittenMsTimestamp:null,codecPrivate:ws.encode(i.config.description),closed:!1};return this.trackDatas.push(s),this.trackDatas.sort((r,o)=>r.track.id-o.track.id),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),s}async addEncodedVideoPacket(t,i,n){const s=await this.mutex.acquire();try{const r=this.getVideoTrackData(t,i,n);r.info.alphaMode??=!!i.sideData.alpha;let o=i.data;if(t.source._codec==="prores"){if(o.byteLength<8)throw new Error("ProRes packet too small, expected at least 8 bytes.");o=o.subarray(8)}const l=i.type==="key";this.validateTimestamp(r.track,i.timestamp,l);let c=i.timestamp,d=i.duration;t.metadata.frameRate!==void 0&&(c=kf(c,t.metadata.frameRate),d=kf(d,t.metadata.frameRate));const g=r.info.alphaMode?i.sideData.alpha??null:null,h=this.createInternalChunk(o,c,d,i.type,g);t.source._codec==="vp9"&&this.fixVP9ColorSpace(r,h),r.chunkQueue.push(h),await this.interleaveChunks()}finally{s()}}async addEncodedAudioPacket(t,i,n){const s=await this.mutex.acquire();try{const r=this.getAudioTrackData(t,i,n);let o=i.data;if(r.info.requiresAdtsStripping){const d=Cf(Nl.tempFromBytes(o));if(!d)throw new Error("Expected ADTS frame, didn't get one.");const g=d.crcCheck===null?xy:Sy;o=o.subarray(g)}const l=i.type==="key";this.validateTimestamp(r.track,i.timestamp,l);const c=this.createInternalChunk(o,i.timestamp,i.duration,i.type);r.chunkQueue.push(c),await this.interleaveChunks()}finally{s()}}async addSubtitleCue(t,i,n){const s=await this.mutex.acquire();try{const r=this.getSubtitleTrackData(t,n);this.validateTimestamp(r.track,i.timestamp,!0);let o=i.text;const l=Math.round(i.timestamp*1e3);Mf.lastIndex=0,o=o.replace(Mf,h=>{const p=OG(h.slice(1,-1))-l;return`<${Wy(p)}>`});const c=ws.encode(o),d=`${i.settings??""} ${i.identifier??""} -${i.notes??""}`,g=this.createInternalChunk(c,i.timestamp,i.duration,"key",d.trim()?ws.encode(d):null);r.chunkQueue.push(g),await this.interleaveChunks()}finally{s()}}async interleaveChunks(t=!1){if(!(!t&&!this.allTracksAreKnown())){e:for(;;){let i=null,n=1/0;for(const r of this.trackDatas){if(!t&&r.chunkQueue.length===0&&!r.closed)break e;r.chunkQueue.length>0&&r.chunkQueue[0].timestamp=2&&n.skipBits(1);const g={rgb:7,bt709:2,bt470bg:1,smpte170m:3}[t.info.decoderConfig.colorSpace.matrix];YC(i.data,n.pos,n.pos+3,g)}createInternalChunk(t,i,n,s,r=null){return{data:t,type:s,timestamp:i,duration:n,additions:r}}writeBlock(t,i){this.segment||this.createSegment();const n=Math.round(1e3*i.timestamp),s=this.trackDatas.every(h=>{if(t===h)return i.type==="key";const m=h.chunkQueue[0];return m?m.type==="key":h.closed});let r=!1;if(!this.currentCluster)r=!0;else{We(this.currentClusterStartMsTimestamp!==null),We(this.currentClusterMaxMsTimestamp!==null);const h=n-this.currentClusterStartMsTimestamp;r=s&&n>this.currentClusterMaxMsTimestamp&&h>=1e3*(this.format._options.minimumClusterDuration??1)||h>t7}r&&this.createNewCluster(n);const o=n-this.currentClusterStartMsTimestamp;if(o0?{id:Ze.BlockDuration,data:d}:null]};this.ebmlWriter.writeEBML(h)}else{c.setUint8(3,+(i.type==="key")<<7);const h={id:Ze.SimpleBlock,data:[l,i.data]};this.ebmlWriter.writeEBML(h)}this.startTimestamp=Math.min(this.startTimestamp,n),this.endTimestamp=Math.max(this.endTimestamp,n+d),t.lastWrittenMsTimestamp=n,this.trackDatasInCurrentCluster.has(t)||this.trackDatasInCurrentCluster.set(t,{firstMsTimestamp:n}),this.currentClusterMaxMsTimestamp=Math.max(this.currentClusterMaxMsTimestamp,n)}createNewCluster(t){t=Math.max(0,t),this.currentCluster&&this.finalizeCurrentCluster(),this.format._options.onCluster&&this.writer.startTrackingWrites(),this.currentCluster={id:Ze.Cluster,size:this.format._options.appendOnly?-1:c2,data:[{id:Ze.Timestamp,data:t}]},this.ebmlWriter.writeEBML(this.currentCluster),this.currentClusterStartMsTimestamp=t,this.currentClusterMaxMsTimestamp=t,this.trackDatasInCurrentCluster.clear()}finalizeCurrentCluster(){if(We(this.currentCluster),!this.format._options.appendOnly){const s=this.writer.getPos()-this.ebmlWriter.dataOffsets.get(this.currentCluster),r=this.writer.getPos();this.writer.seek(this.ebmlWriter.offsets.get(this.currentCluster)+4),this.ebmlWriter.writeVarInt(s,c2),this.writer.seek(r)}if(this.format._options.onCluster){We(this.currentClusterStartMsTimestamp!==null);const{data:s,start:r}=this.writer.stopTrackingWrites();this.format._options.onCluster(s,r,this.currentClusterStartMsTimestamp/1e3)}const t=this.ebmlWriter.offsets.get(this.currentCluster)-this.segmentDataOffset,i=new Map;for(const[s,{firstMsTimestamp:r}]of this.trackDatasInCurrentCluster)i.has(r)||i.set(r,[]),i.get(r).push(s);const n=[...i.entries()].sort((s,r)=>s[0]-r[0]);for(const[s,r]of n)We(this.cues),this.cues.data.push({id:Ze.CuePoint,data:[{id:Ze.CueTime,data:Math.max(0,s)},...r.map(o=>({id:Ze.CueTrackPositions,data:[{id:Ze.CueTrack,data:o.track.id},{id:Ze.CueClusterPosition,data:t}]}))]})}async onTrackClose(t){const i=await this.mutex.acquire(),n=this.trackDatas.find(s=>s.track===t);n&&(n.closed=!0),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),await this.interleaveChunks(),i()}async finalize(){const t=await this.mutex.acquire();this.allTracksKnown.resolve();for(const i of this.trackDatas)i.closed=!0;if(this.segment||this.createSegment(),await this.interleaveChunks(!0),this.currentCluster&&this.finalizeCurrentCluster(),We(this.cues),this.ebmlWriter.writeEBML(this.cues),!this.format._options.appendOnly){const i=this.writer.getPos()-this.segmentDataOffset;this.writer.seek(this.ebmlWriter.offsets.get(this.segment)+4),this.ebmlWriter.writeVarInt(i,l2);const n=this.startTimestamp===1/0?0:this.endTimestamp-this.startTimestamp;this.segmentDuration.data=new Zm(n),this.writer.seek(this.ebmlWriter.offsets.get(this.segmentDuration)),this.ebmlWriter.writeEBML(this.segmentDuration),We(this.seekHead),this.writer.seek(this.ebmlWriter.offsets.get(this.seekHead)),this.maybeCreateSeekHead(!0),this.ebmlWriter.writeEBML(this.seekHead)}t()}}class n7{constructor(t){this.sourceSampleRate=null,this.sourceNumberOfChannels=null,this.startTime=null,this.bufferStartFrame=0,this.maxWrittenFrame=null,this.targetSampleRate=t.targetSampleRate,this.targetNumberOfChannels=t.targetNumberOfChannels,this.onSample=t.onSample,this.bufferSizeInFrames=Math.floor(this.targetSampleRate*5),this.bufferSizeInSamples=this.bufferSizeInFrames*this.targetNumberOfChannels}doChannelMixerSetup(){We(this.sourceNumberOfChannels!==null);const t=this.sourceNumberOfChannels,i=this.targetNumberOfChannels;t===1&&i===2?this.channelMixer=(n,s)=>n[s*t]:t===1&&i===4?this.channelMixer=(n,s,r)=>n[s*t]*+(r<2):t===1&&i===6?this.channelMixer=(n,s,r)=>n[s*t]*+(r===2):t===2&&i===1?this.channelMixer=(n,s)=>{const r=s*t;return .5*(n[r]+n[r+1])}:t===2&&i===4?this.channelMixer=(n,s,r)=>r<2?n[s*t+r]:0:t===2&&i===6?this.channelMixer=(n,s,r)=>r<2?n[s*t+r]:0:t===4&&i===1?this.channelMixer=(n,s)=>{const r=s*t;return .25*(n[r]+n[r+1]+n[r+2]+n[r+3])}:t===4&&i===2?this.channelMixer=(n,s,r)=>{const o=s*t;return .5*(n[o+r]+n[o+r+2])}:t===4&&i===6?this.channelMixer=(n,s,r)=>{const o=s*t;return r<2?n[o+r]:r===2||r===3?0:n[o+r-2]}:t===6&&i===1?this.channelMixer=(n,s)=>{const r=s*t;return Math.SQRT1_2*(n[r]+n[r+1])+n[r+2]+.5*(n[r+4]+n[r+5])}:t===6&&i===2?this.channelMixer=(n,s,r)=>{const o=s*t;return n[o+r]+Math.SQRT1_2*(n[o+2]+n[o+r+4])}:t===6&&i===4?this.channelMixer=(n,s,r)=>{const o=s*t;return r<2?n[o+r]+Math.SQRT1_2*n[o+2]:n[o+r+2]}:this.channelMixer=(n,s,r)=>r=this.bufferStartFrame+this.bufferCapacityInFrames;)await this.finalizeCurrentBuffer(),this.bufferStartFrame+=this.bufferSizeInFrames;const g=d-this.bufferStartFrame;We(g=0&&u=0&&f=this.bufferSizeInFrames?this.maxWrittenFrame-this.bufferSizeInFrames:null}async finalize(){for(;this.maxWrittenFrame!==null;)await this.finalizeCurrentBuffer(),this.bufferStartFrame+=this.bufferSizeInFrames}}var s7=function(a,t,i){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],i&&(s=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(r){return Promise.reject(r)}}),a.stack.push({value:t,dispose:n,async:i})}else i&&a.stack.push({async:!0});return t},r7=(function(a){return function(t){function i(o){t.error=t.hasError?new a(o,t.error,"An error was suppressed during disposal."):o,t.hasError=!0}var n,s=0;function r(){for(;n=t.stack.pop();)try{if(!n.async&&s===1)return s=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return s|=2,Promise.resolve(o).then(r,function(l){return i(l),r()})}else s|=1}catch(l){i(l)}if(s===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return r()}})(typeof SuppressedError=="function"?SuppressedError:function(a,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=a,n.suppressed=t,n});class m0{constructor(){this._connectedTrack=null,this._closingPromise=null,this._closed=!1,this._nominalBitrate=null}_ensureValidAdd(){if(!this._connectedTrack)throw new Error("Source is not connected to an output track.");if(this._connectedTrack.output.state==="canceled")throw new Error("Output has been canceled.");if(this._connectedTrack.output.state==="finalizing"||this._connectedTrack.output.state==="finalized")throw new Error("Output has been finalized.");if(this._connectedTrack.output.state==="pending")throw new Error("Output has not started.");if(this._closed)throw new Error("Source is closed.")}async _start(){}async _flushAndClose(t){}close(){if(this._closingPromise)return;const t=this._connectedTrack;if(!t)throw new Error("Cannot call close without connecting the source to an output track.");if(t.output.state==="pending")throw new Error("Cannot call close before output has been started.");this._closingPromise=(async()=>{await this._flushAndClose(!1),this._closed=!0,!(t.output.state==="finalizing"||t.output.state==="finalized")&&t.output._muxer.onTrackClose(t)})()}async _flushOrWaitForOngoingClose(t){return this._closingPromise??=(async()=>{await this._flushAndClose(t),this._closed=!0})()}}class d2 extends m0{constructor(t){if(super(),!zr.includes(t))throw new TypeError(`Invalid video codec '${t}'. Must be one of: ${zr.join(", ")}.`);this._codec=t}}const u2=(a,t)=>{if(a.metadata.hasOnlyKeyPackets&&t.type!=="key")throw new Error("Cannot add non-key packets to a hasOnlyKeyPackets video track.")};class o7{setError(t){this.errorSet||(this.error=t,this.errorSet=!0)}constructor(t,i){this.source=t,this.encodingConfig=i,this.ensureEncoderPromise=null,this.encoderInitialized=!1,this.encoder=null,this.muxer=null,this.lastMultipleOfKeyFrameInterval=-1,this.emittedEncoderPackets=0,this.codedWidth=null,this.codedHeight=null,this.outputWidth=null,this.outputHeight=null,this.frameRateLastSample=null,this.frameRateLastTimestamp=null,this.frameRateLastEndTimestamp=null,this.preciseTimings=[],this.customEncoder=null,this.customEncoderCallSerializer=new Hb,this.customEncoderQueueSize=0,this.defaultEncodeOptions={},this.alphaEncoder=null,this.splitter=null,this.splitterCreationFailed=!1,this.alphaFrameQueue=[],this.error=null,this.errorSet=!1,this.lastMuxerPromise=Promise.resolve(),this.closed=!1}async add(t,i,n){const s=t;try{this.checkForEncoderError(),this.source._ensureValidAdd();const r=this.encodingConfig,o=r.sizeChangeBehavior??"deny";let l=!1;if(this.codedWidth!==null&&this.codedHeight!==null){if((t.codedWidth!==this.codedWidth||t.codedHeight!==this.codedHeight)&&(l=!0,o==="deny"))throw new Error(`Video sample size must remain constant. Expected ${this.codedWidth}x${this.codedHeight}, got ${t.codedWidth}x${t.codedHeight}. To allow the sample size to change over time, set \`sizeChangeBehavior\` to a value other than 'deny' in the encoding options.`)}else this.codedWidth=t.codedWidth,this.codedHeight=t.codedHeight;if(r.transform?.width!==void 0||r.transform?.height!==void 0||r.transform?.rotate!==void 0||r.transform?.flip!==void 0||r.transform?.crop!==void 0||r.transform?.force===!0||l&&o!=="passThrough"){let h=r.transform?.width,m=r.transform?.height,p=r.transform?.fit??"fill";l&&o!=="passThrough"&&(We(this.outputWidth),We(this.outputHeight),We(o!=="deny"),h=this.outputWidth,m=this.outputHeight,p=o);const u=await t.transform({width:h,height:m,roundDimensionsTo:2,crop:r.transform?.crop,rotate:r.transform?.rotate,flip:r.transform?.flip,fit:p,alpha:r.alpha});(this.outputWidth===null||this.outputHeight===null)&&(this.outputWidth=u.displayWidth,this.outputHeight=u.displayHeight),i&&t.close(),t=u,i=!0}else(this.outputWidth===null||this.outputHeight===null)&&(this.outputWidth=t.codedWidth,this.outputHeight=t.codedHeight);const g=r.transform?.frameRate;if(g!==void 0){const h=t.timestamp+t.duration,m=Vb(t.timestamp,g);if(this.frameRateLastSample!==null)if(m<=this.frameRateLastTimestamp){this.frameRateLastSample.close(),this.frameRateLastSample=t.clone(),this.frameRateLastEndTimestamp=h;return}else await this.padFrameRate(m,n);t===s&&(t=t.clone(),i=!0),t.setTimestamp(m),t.setDuration(1/g),this.frameRateLastSample?.close(),this.frameRateLastSample=t.clone(),this.frameRateLastTimestamp=m,this.frameRateLastEndTimestamp=h}await this.processAndEncode(t,n)}finally{i&&t.close()}}async processAndEncode(t,i){const n=this.encodingConfig;let s;if(n.transform?.process){let r=n.transform.process(t);if(el(r)&&(r=await r),r===null)return;Array.isArray(r)||(r=[r]);const o=[];try{for(const l of r)l instanceof Ns?o.push(l):typeof VideoFrame<"u"&&l instanceof VideoFrame?o.push(new Ns(l)):o.push(new Ns(l,{timestamp:t.timestamp,duration:t.duration}))}catch(l){for(const c of o)c!==t&&c.close();for(const c of r)(c instanceof Ns&&c!==t||typeof VideoFrame<"u"&&c instanceof VideoFrame)&&c.close();throw l}s=o}else s=[t];try{for(const r of s){if(this.encoderInitialized||(this.ensureEncoderPromise||this.ensureEncoder(r),this.encoderInitialized||await this.ensureEncoderPromise),We(this.encoderInitialized),this.closed)break;const o=this.encodingConfig.keyFrameInterval??2,l=Math.floor(r.timestamp/o),c={...this.defaultEncodeOptions,...r.encodeOptions,...i},d={...c,keyFrame:c.keyFrame!==void 0?c.keyFrame:o===0||l!==this.lastMultipleOfKeyFrameInterval};if(this.lastMultipleOfKeyFrameInterval=l,this.encodingConfig.onEncodedSample?.(r),this.customEncoder){this.customEncoderQueueSize++;const g=r.clone(),h=this.customEncoderCallSerializer.call(()=>this.customEncoder.encode(g,d)).catch(m=>this.setError(m)).finally(()=>{this.customEncoderQueueSize--,g.close()});this.customEncoderQueueSize>=4&&await h}else{We(this.encoder);const g=r.toVideoFrame(),h=Db(this.preciseTimings,g.timestamp,p=>p.microsecondTimestamp),m=h!==-1?this.preciseTimings[h]:null;if(m&&m.microsecondTimestamp===g.timestamp?(m.timestamp!==r.timestamp&&(m.timestampIsValid=!1),m.duration!==r.duration&&(m.durationIsValid=!1)):(this.preciseTimings.splice(h+1,0,{microsecondTimestamp:g.timestamp,timestamp:r.timestamp,duration:r.duration,timestampIsValid:!0,durationIsValid:!0}),this.preciseTimings.length>128&&this.preciseTimings.shift()),this.alphaEncoder)if(!!g.format&&!g.format.includes("A")||this.splitterCreationFailed){this.alphaFrameQueue.push(null);try{this.encoder.encode(g,d)}finally{g.close()}}else{this.splitter||(this.splitter=new l7);const{colorFrame:u,alphaFrame:f}=await this.splitter.split(g);this.alphaFrameQueue.push(f);try{this.encoder.encode(u,d)}finally{u.close()}}else try{this.encoder.encode(g,d)}finally{g.close()}this.encoder.encodeQueueSize>=4&&await new Promise(p=>this.encoder.addEventListener("dequeue",p,{once:!0}))}await this.lastMuxerPromise}}finally{for(const r of s)r!==t&&r.close()}}async padFrameRate(t,i){const n=this.encodingConfig.transform.frameRate;We(this.frameRateLastSample);const s=Math.round((t-this.frameRateLastTimestamp)*n);for(let r=1;r{const i=Ff(this.encodingConfig.quality,this.encodingConfig.bitrate);We(i!==void 0);const n=By({...this.encodingConfig,quality:i,width:t.codedWidth,height:t.codedHeight,squarePixelWidth:t.squarePixelWidth,squarePixelHeight:t.squarePixelHeight,framerate:this.source._connectedTrack?.metadata.frameRate});let s=null,r;for(const l of n){const c=l.config;if(this.encodingConfig.onEncoderConfig?.(c),r=Ly.find(g=>g.supports(this.encodingConfig.codec,c)),r){s=l;break}if(typeof VideoEncoder>"u")continue;if(c.alpha="discard",this.encodingConfig.alpha==="keep"&&(c.latencyMode="quality"),(c.width%2===1||c.height%2===1)&&(this.encodingConfig.codec==="avc"||this.encodingConfig.codec==="hevc"))throw new Error(`The dimensions ${c.width}x${c.height} are not supported for codec '${this.encodingConfig.codec}'; both width and height must be even numbers. Make sure to round your dimensions to the nearest even number.`);try{if((await VideoEncoder.isConfigSupported(c)).supported){s=l;break}}catch{}}if(!s){if(typeof VideoEncoder>"u")throw new Error(Qb("VideoEncoder"));const l=n[0].config,c=n.map(({config:d,quantizer:g})=>g!==null?`quantizer ${g}`:`${d.bitrate} bps`);throw new Error(`This specific encoder configuration (${l.codec}, ${c.join(" / ")}, ${l.width}x${l.height}, hardware acceleration: ${l.hardwareAcceleration??"no-preference"}) is not supported in this environment. Consider using another codec or changing your video parameters.`)}const o=s.config;if(s.quantizer!==null?this.defaultEncodeOptions=Iy(this.encodingConfig.codec,s.quantizer):this.source._nominalBitrate=o.bitrate??null,r)this.customEncoder=new r,this.customEncoder.codec=this.encodingConfig.codec,this.customEncoder.config=o,this.customEncoder.onPacket=(l,c)=>{if(!(l instanceof Vr))throw new TypeError("The first argument passed to onPacket must be an EncodedPacket.");if(c!==void 0&&(!c||typeof c!="object"))throw new TypeError("The second argument passed to onPacket must be an object or undefined.");u2(this.source._connectedTrack,l),this.encodingConfig.onEncodedPacket?.(l,c),this.lastMuxerPromise=this.muxer.addEncodedVideoPacket(this.source._connectedTrack,l,c).catch(d=>{this.setError(d)})},this.customEncoder.onError=l=>{this.setError(l)},await this.customEncoder.init();else{const l=[],c=[];let d=0,g=0;const h=(p,u,f)=>{const _={};if(u){const M=new Uint8Array(u.byteLength);u.copyTo(M),_.alpha=M}let b=Vr.fromEncodedChunk(p,_);const v=Db(this.preciseTimings,p.timestamp,M=>M.microsecondTimestamp),T=v!==-1?this.preciseTimings[v]:null;let S=null;this.emittedEncoderPackets===0&&b.type==="delta"&&f?.decoderConfig&&(S=UA(this.encodingConfig.codec,f.decoderConfig,b.data)),(T&&T.microsecondTimestamp===p.timestamp||S!==null)&&(b=b.clone({timestamp:T?.timestampIsValid?T.timestamp:void 0,duration:T?.durationIsValid?T.duration:void 0,type:S??void 0})),u2(this.source._connectedTrack,b),this.encodingConfig.onEncodedPacket?.(b,f),this.lastMuxerPromise=this.muxer.addEncodedVideoPacket(this.source._connectedTrack,b,f).catch(M=>{this.setError(M)}),this.emittedEncoderPackets++},m=new Error("Encoding error").stack;if(this.encoder=new VideoEncoder({output:(p,u)=>{if(!this.alphaEncoder){h(p,null,u);return}const f=this.alphaFrameQueue.shift();We(f!==void 0),f?(this.alphaEncoder.encode(f,{...this.defaultEncodeOptions,keyFrame:p.type==="key"}),g++,f.close(),l.push({chunk:p,meta:u})):g===0?h(p,null,u):(c.push(d+g),l.push({chunk:p,meta:u}))},error:p=>{p.stack=m,this.setError(p)}}),this.encoder.configure(o),this.encodingConfig.alpha==="keep"){const p=new Error("Encoding error").stack;this.alphaEncoder=new VideoEncoder({output:(u,f)=>{g--;const _=l.shift();for(We(_!==void 0),h(_.chunk,u,_.meta),d++;c.length>0&&c[0]===d;){c.shift();const b=l.shift();We(b!==void 0),h(b.chunk,null,b.meta)}},error:u=>{u.stack=p,this.setError(u)}}),this.alphaEncoder.configure(o)}}We(this.source._connectedTrack),this.muxer=this.source._connectedTrack.output._muxer,this.encoderInitialized=!0})()}async flushAndClose(t){try{if(!t&&(this.checkForEncoderError(),this.frameRateLastSample)){const i=this.encodingConfig.transform.frameRate,n=Vb(this.frameRateLastEndTimestamp,i);await this.padFrameRate(n)}this.closed=!0,t||(this.customEncoder?this.customEncoderCallSerializer.call(()=>this.customEncoder.flush()):this.encoder&&(await this.encoder.flush(),await this.alphaEncoder?.flush(),await fA(25)))}finally{this.closed=!0,this.frameRateLastSample?.close(),this.frameRateLastSample=null,this.customEncoder?await this.customEncoderCallSerializer.call(()=>this.customEncoder.close()).catch(i=>this.setError(i)):this.encoder&&(this.encoder.state!=="closed"&&this.encoder.close(),this.alphaEncoder&&this.alphaEncoder.state!=="closed"&&this.alphaEncoder.close(),this.alphaFrameQueue.forEach(i=>i?.close()),this.alphaFrameQueue.length=0,this.splitter?.close())}t||this.checkForEncoderError()}getQueueSize(){return this.customEncoder?this.customEncoderQueueSize:this.encoder?.encodeQueueSize??0}checkForEncoderError(){if(this.errorSet)throw this.error}}let g0=null;class l7{constructor(){this.worker=null,this.pendingRequests=new Map,this.nextRequestId=0}split(t){if(!this.worker){if(!g0){const s=new Blob([`(${c7.toString()})()`],{type:"application/javascript"});g0=URL.createObjectURL(s)}this.worker=new Worker(g0),this.worker.addEventListener("message",s=>{const r=s.data,o=this.pendingRequests.get(r.id);o&&(this.pendingRequests.delete(r.id),"error"in r?o.reject(new Error(r.error)):o.resolve({colorFrame:r.colorFrame,alphaFrame:r.alphaFrame}))}),this.worker.addEventListener("error",s=>{const r=new Error(s.message||"Color/alpha splitter worker error.");for(const o of this.pendingRequests.values())o.reject(r);this.pendingRequests.clear()})}const i=this.nextRequestId++,n=Em();return this.pendingRequests.set(i,n),this.worker.postMessage({id:i,sourceFrame:t},{transfer:[t]}),n.promise}close(){this.worker?.terminate(),this.worker=null;const t=new Error("Color/alpha splitter closed.");for(const i of this.pendingRequests.values())i.reject(t);this.pendingRequests.clear()}}const c7=()=>{let a=null,t=Promise.resolve();self.addEventListener("message",r=>{const{id:o,sourceFrame:l}=r.data;t=t.then(async()=>{try{const{colorFrame:c,alphaFrame:d}=await i(l);self.postMessage({id:o,colorFrame:c,alphaFrame:d},{transfer:[c,d]})}catch(c){self.postMessage({id:o,error:c.message})}finally{l.close()}})});const i=async r=>{const o=r.format;if(!o)throw new Error("CPU color/alpha splitting requires a known VideoFrame format.");const l=r.allocationSize();if((!a||a.byteLength!==l)&&(a=new Uint8Array(l)),await r.copyTo(a),o==="RGBA"||o==="BGRA")return n(a,o,r);if(o==="I420A"||o==="I420AP10"||o==="I420AP12"||o==="I422A"||o==="I422AP10"||o==="I422AP12"||o==="I444A"||o==="I444AP10"||o==="I444AP12")return s(a,o,r);throw new Error(`CPU color/alpha splitting does not support format '${o}'.`)},n=(r,o,l)=>{const c=l.visibleRect?.width??l.codedWidth,d=l.visibleRect?.height??l.codedHeight,g=c*d,h=Math.ceil(c/2),m=Math.ceil(d/2),p=g+h*m*2,u=new Uint8Array(p);for(let v=0,T=3;v{const c=l.visibleRect?.width??l.codedWidth,d=l.visibleRect?.height??l.codedHeight,g=o.includes("P10"),h=o.includes("P12"),m=g||h?2:1;let p,u;o.startsWith("I420")?(p=Math.ceil(c/2),u=Math.ceil(d/2)):o.startsWith("I422")?(p=Math.ceil(c/2),u=d):(p=c,u=d);const f=c*d,_=p*u,b=f*m,v=_*m,T=f*m,S=b+v*2,M=o.replace("A",""),P=Math.ceil(c/2),B=Math.ceil(d/2),C=P*B,j=C*m,G=T+2*j,A=new Uint8Array(G),N=S;A.set(r.subarray(N,N+T),0);const H=T,E=g?512:h?2048:128;m===1?A.fill(E,H):new Uint16Array(A.buffer,H,2*C).fill(E);const U=g?"I420P10":h?"I420P12":"I420",O=new VideoFrame(r.subarray(0,S),{format:M,codedWidth:c,codedHeight:d,timestamp:l.timestamp,duration:l.duration??void 0}),V={format:U,codedWidth:c,codedHeight:d,timestamp:l.timestamp,duration:l.duration??void 0,transfer:[A.buffer]},D=new VideoFrame(A,V);return{colorFrame:O,alphaFrame:D}}};class d7 extends d2{constructor(t,i){if(!(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)&&!(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas))throw new TypeError("canvas must be an HTMLCanvasElement or OffscreenCanvas.");MG(i),super(i.codec),this._encoder=new o7(this,i),this._canvas=t}add(t,i=0,n){if(!Number.isFinite(t))throw new TypeError("timestamp must be a finite number.");if(!Number.isFinite(i)||i<0)throw new TypeError("duration must be a non-negative number.");const s=new Ns(this._canvas,{timestamp:t,duration:i});return this._encoder.add(s,!0,n)}_flushAndClose(t){return this._encoder.flushAndClose(t)}}class f2 extends m0{constructor(t){if(super(),!tl.includes(t))throw new TypeError(`Invalid audio codec '${t}'. Must be one of: ${tl.join(", ")}.`);this._codec=t}}class u7{setError(t){this.errorSet||(this.error=t,this.errorSet=!0)}constructor(t,i){this.source=t,this.encodingConfig=i,this.ensureEncoderPromise=null,this.encoderInitialized=!1,this.encoder=null,this.muxer=null,this.lastNumberOfChannels=null,this.lastSampleRate=null,this.isPcmEncoder=!1,this.outputSampleSize=null,this.writeOutputValue=null,this.customEncoder=null,this.customEncoderCallSerializer=new Hb,this.customEncoderQueueSize=0,this.lastEndSampleIndex=null,this.resampler=null,this.error=null,this.errorSet=!1,this.lastMuxerPromise=Promise.resolve(),this.closed=!1}async add(t,i){try{if(this.checkForEncoderError(),this.source._ensureValidAdd(),this.lastNumberOfChannels!==null&&this.lastSampleRate!==null){if(t.numberOfChannels!==this.lastNumberOfChannels||t.sampleRate!==this.lastSampleRate)throw new Error(`Audio parameters must remain constant. Expected ${this.lastNumberOfChannels} channels at ${this.lastSampleRate} Hz, got ${t.numberOfChannels} channels at ${t.sampleRate} Hz.`)}else this.lastNumberOfChannels=t.numberOfChannels,this.lastSampleRate=t.sampleRate;const n=this.encodingConfig;n.transform?.numberOfChannels!==void 0||n.transform?.sampleRate!==void 0?(this.resampler||(this.resampler=new n7({targetNumberOfChannels:n.transform.numberOfChannels??t.numberOfChannels,targetSampleRate:n.transform.sampleRate??t.sampleRate,onSample:async r=>{await this.processAndEncode(r,!0)}})),await this.resampler.add(t)):await this.processAndEncode(t,i)}finally{i&&t.close()}}async processAndEncode(t,i){const n=this.encodingConfig;if(n.transform?.sampleFormat!==void 0&&AG(t.format)!==n.transform.sampleFormat){const s=FG(t,n.transform.sampleFormat);i&&t.close(),t=s,i=!0}if(n.transform?.process)try{let s=n.transform.process(t);if(el(s)&&(s=await s),s===null)return;Array.isArray(s)||(s=[s]);try{for(const r of s)if(!(r instanceof Os))throw new TypeError("The audio process function must return an AudioSample, null, or an array of AudioSamples.");for(const r of s)await this.encodeSample(r,!0)}finally{for(const r of s)r instanceof Os&&r.close()}}finally{i&&t.close()}else await this.encodeSample(t,i)}async encodeSample(t,i){try{if(this.encoderInitialized||(this.ensureEncoderPromise||this.ensureEncoder(t),this.encoderInitialized||await this.ensureEncoderPromise),We(this.encoderInitialized),this.closed)return;{const n=Math.round(t.timestamp*t.sampleRate),s=Math.round((t.timestamp+t.duration)*t.sampleRate);if(this.lastEndSampleIndex===null)this.lastEndSampleIndex=s;else{const r=n-this.lastEndSampleIndex;if(r>=64){const o=new Os({data:new Float32Array(r*t.numberOfChannels),format:"f32-planar",sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels,numberOfFrames:r,timestamp:this.lastEndSampleIndex/t.sampleRate});await this.encodeSample(o,!0)}this.lastEndSampleIndex+=t.numberOfFrames}}if(this.encodingConfig.onEncodedSample?.(t),this.customEncoder){this.customEncoderQueueSize++;const n=t.clone(),s=this.customEncoderCallSerializer.call(()=>this.customEncoder.encode(n)).catch(r=>this.setError(r)).finally(()=>{this.customEncoderQueueSize--,n.close()});this.customEncoderQueueSize>=4&&await s,await this.lastMuxerPromise}else if(this.isPcmEncoder)await this.doPcmEncoding(t,i);else{We(this.encoder);const n=t.toAudioData();this.encoder.encode(n),n.close(),i&&t.close(),this.encoder.encodeQueueSize>=4&&await new Promise(s=>this.encoder.addEventListener("dequeue",s,{once:!0})),await this.lastMuxerPromise}}finally{i&&t.close()}}async doPcmEncoding(t,i){We(this.outputSampleSize),We(this.writeOutputValue);const{numberOfChannels:n,numberOfFrames:s,sampleRate:r,timestamp:o}=t,l=2048,c=[];for(let f=0;f{const{numberOfChannels:i,sampleRate:n}=t,s=Ff(this.encodingConfig.quality,this.encodingConfig.bitrate),r=jy({numberOfChannels:i,sampleRate:n,...this.encodingConfig,quality:s});this.encodingConfig.onEncoderConfig?.(r),this.source._nominalBitrate=r.bitrate??null;const o=Vy.find(l=>l.supports(this.encodingConfig.codec,r));if(o)this.customEncoder=new o,this.customEncoder.codec=this.encodingConfig.codec,this.customEncoder.config=r,this.customEncoder.onPacket=(l,c)=>{if(!(l instanceof Vr))throw new TypeError("The first argument passed to onPacket must be an EncodedPacket.");if(c!==void 0&&(!c||typeof c!="object"))throw new TypeError("The second argument passed to onPacket must be an object or undefined.");this.encodingConfig.onEncodedPacket?.(l,c),this.lastMuxerPromise=this.muxer.addEncodedAudioPacket(this.source._connectedTrack,l,c).catch(d=>{this.setError(d)})},this.customEncoder.onError=l=>{this.setError(l)},await this.customEncoder.init();else if(js.includes(this.encodingConfig.codec))this.initPcmEncoder();else{if(typeof AudioEncoder>"u")throw new Error(Qb("AudioEncoder"));let l;try{l=(await AudioEncoder.isConfigSupported(r)).supported??!1}catch{l=!1}if(!l)throw new Error(`This specific encoder configuration (${r.codec}, ${r.bitrate} bps, ${r.numberOfChannels} channels, ${r.sampleRate} Hz) is not supported in this environment. Consider using another codec or changing your audio parameters.`);const c=new Error("Encoding error").stack;this.encoder=new AudioEncoder({output:(d,g)=>{if(this.encodingConfig.codec==="aac"&&g?.decoderConfig){let m=!1;if(!g.decoderConfig.description||g.decoderConfig.description.byteLength<2?m=!0:m=hA(Ms(g.decoderConfig.description)).objectType===0,m){const p=Number(Mr(r.codec.split(".")));g.decoderConfig.description=Hm({objectType:p,outputNumberOfChannels:g.decoderConfig.numberOfChannels,outputSampleRate:g.decoderConfig.sampleRate})}}let h=Vr.fromEncodedChunk(d);h=h.clone({timestamp:kf(h.timestamp,r.sampleRate),duration:d.duration!=null?kf(h.duration,r.sampleRate):void 0}),this.encodingConfig.onEncodedPacket?.(h,g),this.lastMuxerPromise=this.muxer.addEncodedAudioPacket(this.source._connectedTrack,h,g).catch(m=>{this.setError(m)})},error:d=>{d.stack=c,this.setError(d)}}),this.encoder.configure(r)}We(this.source._connectedTrack),this.muxer=this.source._connectedTrack.output._muxer,this.encoderInitialized=!0})()}initPcmEncoder(){this.isPcmEncoder=!0;const t=this.encodingConfig.codec,{dataType:i,sampleSize:n,littleEndian:s}=al(t);switch(this.outputSampleSize=n,n){case 1:i==="unsigned"?this.writeOutputValue=(r,o,l)=>r.setUint8(o,os(Math.round(l*128)+128,0,255)):i==="signed"?this.writeOutputValue=(r,o,l)=>{r.setInt8(o,os(Math.round(l*128),-128,127))}:i==="ulaw"?this.writeOutputValue=(r,o,l)=>{const c=os(Math.round(l*32768),-32768,32767);r.setUint8(o,RG(c))}:i==="alaw"?this.writeOutputValue=(r,o,l)=>{const c=os(Math.round(l*32768),-32768,32767);r.setUint8(o,BG(c))}:We(!1);break;case 2:i==="unsigned"?this.writeOutputValue=(r,o,l)=>r.setUint16(o,os(Math.round(l*32768)+32768,0,65535),s):i==="signed"?this.writeOutputValue=(r,o,l)=>r.setInt16(o,os(Math.round(l*32768),-32768,32767),s):We(!1);break;case 3:i==="unsigned"?this.writeOutputValue=(r,o,l)=>Um(r,o,os(Math.round(l*8388608)+8388608,0,16777215),s):i==="signed"?this.writeOutputValue=(r,o,l)=>ZC(r,o,os(Math.round(l*8388608),-8388608,8388607),s):We(!1);break;case 4:i==="unsigned"?this.writeOutputValue=(r,o,l)=>r.setUint32(o,os(Math.round(l*2147483648)+2147483648,0,4294967295),s):i==="signed"?this.writeOutputValue=(r,o,l)=>r.setInt32(o,os(Math.round(l*2147483648),-2147483648,2147483647),s):i==="float"?this.writeOutputValue=(r,o,l)=>r.setFloat32(o,l,s):We(!1);break;case 8:i==="float"?this.writeOutputValue=(r,o,l)=>r.setFloat64(o,l,s):We(!1);break;default:yo(n),We(!1)}}async flushAndClose(t){try{t||(this.checkForEncoderError(),this.resampler&&await this.resampler.finalize()),this.closed=!0,t||(this.customEncoder?this.customEncoderCallSerializer.call(()=>this.customEncoder.flush()):this.encoder&&await this.encoder.flush())}finally{this.closed=!0,this.resampler=null,this.customEncoder?await this.customEncoderCallSerializer.call(()=>this.customEncoder.close()).catch(i=>this.setError(i)):this.encoder&&this.encoder.state!=="closed"&&this.encoder.close()}t||this.checkForEncoderError()}getQueueSize(){return this.customEncoder?this.customEncoderQueueSize:this.isPcmEncoder?0:this.encoder?.encodeQueueSize??0}checkForEncoderError(){if(this.errorSet)throw this.error}}class p2 extends f2{constructor(t,i={}){if(zG(t),typeof i!="object"||!i)throw new TypeError("options must be an object.");if(i.startTimestamp!==void 0&&!Number.isFinite(i.startTimestamp))throw new TypeError("options.startTimestamp, when provided, must be a finite number.");super(t.codec),this._encoder=new u7(this,t),this._accumulatedTime=i.startTimestamp??0}async add(t){if(!(t instanceof AudioBuffer))throw new TypeError("audioBuffer must be an AudioBuffer.");const i=Os._fromAudioBuffer(t,this._accumulatedTime);this._accumulatedTime+=t.duration;for(const n of i)await this._encoder.add(n,!0)}_flushAndClose(t){return this._encoder.flushAndClose(t)}}class f7 extends m0{constructor(t){if(super(),!Il.includes(t))throw new TypeError(`Invalid subtitle codec '${t}'. Must be one of: ${Il.join(", ")}.`);this._codec=t}}class h0{get supportsVideoRotationMetadata(){return this.supportsVideoTransformationMetadata}getSupportedVideoCodecs(){return this.getSupportedCodecs().filter(t=>zr.includes(t))}getSupportedAudioCodecs(){return this.getSupportedCodecs().filter(t=>tl.includes(t))}getSupportedSubtitleCodecs(){return this.getSupportedCodecs().filter(t=>Il.includes(t))}_codecUnsupportedHint(t){return""}_isFragmentedIsobmff(){return!1}}class _0 extends h0{constructor(t={}){if(!t||typeof t!="object")throw new TypeError("options must be an object.");if(t.fastStart!==void 0&&![!1,"in-memory","reserve","fragmented"].includes(t.fastStart))throw new TypeError("options.fastStart, when provided, must be false, 'in-memory', 'reserve', or 'fragmented'.");if(t.minimumFragmentDuration!==void 0&&(!Kb(t.minimumFragmentDuration)||t.minimumFragmentDuration<0))throw new TypeError("options.minimumFragmentDuration, when provided, must be a non-negative number.");if(t.onFtyp!==void 0&&typeof t.onFtyp!="function")throw new TypeError("options.onFtyp, when provided, must be a function.");if(t.onMoov!==void 0&&typeof t.onMoov!="function")throw new TypeError("options.onMoov, when provided, must be a function.");if(t.onMdat!==void 0&&typeof t.onMdat!="function")throw new TypeError("options.onMdat, when provided, must be a function.");if(t.onMoof!==void 0&&typeof t.onMoof!="function")throw new TypeError("options.onMoof, when provided, must be a function.");if(t.metadataFormat!==void 0&&!["mdir","mdta","udta","auto"].includes(t.metadataFormat))throw new TypeError("options.metadataFormat, when provided, must be either 'auto', 'mdir', 'mdta', or 'udta'.");super(),this._options=t}getSupportedTrackCounts(){return{video:{min:0,max:4294967295},audio:{min:0,max:4294967295},subtitle:{min:0,max:4294967295},total:{min:0,max:4294967295}}}get supportsVideoTransformationMetadata(){return!0}get supportsTimestampedMediaData(){return!0}get negativeTimestampSupport(){return"full"}_createMuxer(t){return new ZF(t,this)}_isFragmentedIsobmff(){return this._options.fastStart==="fragmented"}}class m2 extends _0{constructor(t){super(t)}get _name(){return"MP4"}get fileExtension(){return".mp4"}get mimeType(){return"video/mp4"}getSupportedCodecs(){return[...zr,...Tf,"pcm-s16","pcm-s16be","pcm-s24","pcm-s24be","pcm-s32","pcm-s32be","pcm-f32","pcm-f32be","pcm-f64","pcm-f64be",...Il]}_codecUnsupportedHint(t){return new h2().getSupportedCodecs().includes(t)?" Switching to MOV will grant support for this codec.":""}}class g2 extends _0{constructor(t){super(t)}get _name(){return"CMAF"}get fileExtension(){return".m4s"}get mimeType(){return"video/mp4"}getSupportedCodecs(){return[...zr,...Tf,"pcm-s16","pcm-s16be","pcm-s24","pcm-s24be","pcm-s32","pcm-s32be","pcm-f32","pcm-f32be","pcm-f64","pcm-f64be",...Il]}}class h2 extends _0{constructor(t){super(t)}get _name(){return"MOV"}get fileExtension(){return".mov"}get mimeType(){return"video/quicktime"}getSupportedCodecs(){return[...zr,...tl]}_codecUnsupportedHint(t){return new m2().getSupportedCodecs().includes(t)?" Switching to MP4 will grant support for this codec.":""}}class _2 extends h0{constructor(t={}){if(!t||typeof t!="object")throw new TypeError("options must be an object.");if(t.appendOnly!==void 0&&typeof t.appendOnly!="boolean")throw new TypeError("options.appendOnly, when provided, must be a boolean.");if(t.minimumClusterDuration!==void 0&&(!Kb(t.minimumClusterDuration)||t.minimumClusterDuration<0))throw new TypeError("options.minimumClusterDuration, when provided, must be a non-negative number.");if(t.onEbmlHeader!==void 0&&typeof t.onEbmlHeader!="function")throw new TypeError("options.onEbmlHeader, when provided, must be a function.");if(t.onSegmentHeader!==void 0&&typeof t.onSegmentHeader!="function")throw new TypeError("options.onHeader, when provided, must be a function.");if(t.onCluster!==void 0&&typeof t.onCluster!="function")throw new TypeError("options.onCluster, when provided, must be a function.");super(),this._options=t}_createMuxer(t){return new i7(t,this)}get _name(){return"Matroska"}getSupportedTrackCounts(){return{video:{min:0,max:127},audio:{min:0,max:127},subtitle:{min:0,max:127},total:{min:0,max:127}}}get fileExtension(){return".mkv"}get mimeType(){return"video/x-matroska"}getSupportedCodecs(){return[...zr,...Tf,...js.filter(t=>!["pcm-s8","pcm-f32be","pcm-f64be","ulaw","alaw"].includes(t)),...Il]}get supportsVideoTransformationMetadata(){return!1}get supportsTimestampedMediaData(){return!0}get negativeTimestampSupport(){return"prefer-non-negative"}}class Uf extends _2{constructor(t){super(t)}getSupportedCodecs(){return[...zr.filter(t=>["vp8","vp9","av1"].includes(t)),...tl.filter(t=>["opus","vorbis"].includes(t)),...Il]}get _name(){return"WebM"}get fileExtension(){return".webm"}get mimeType(){return"video/webm"}_codecUnsupportedHint(t){return new _2().getSupportedCodecs().includes(t)?" Switching to MKV will grant support for this codec.":""}}const v2=["video","audio","subtitle"];class Jd{constructor(t,i,n,s,r){this.id=t,this.output=i,this.type=n,this.source=s,this.metadata=r}isVideoTrack(){return this.type==="video"}isAudioTrack(){return this.type==="audio"}isSubtitleTrack(){return this.type==="subtitle"}canBePairedWith(t){if(!(t instanceof Jd))throw new TypeError("other must be an OutputTrack.");if(this===t)return!1;const i=Yb(this.metadata.group),n=Yb(t.metadata.group);for(const s of i)if(this.type!==t.type&&n.some(l=>s===l)||n.some(l=>s._pairedGroups.has(l)))return!0;return!1}}class p7 extends Jd{constructor(t,i,n,s){super(t,i,"video",n,s)}}class m7 extends Jd{constructor(t,i,n,s){super(t,i,"audio",n,s)}}class g7 extends Jd{constructor(t,i,n,s){super(t,i,"subtitle",n,s)}}class Xd{constructor(){this._pairedGroups=new Set}pairWith(t){if(!(t instanceof Xd))throw new TypeError("other must be an OutputTrackGroup.");if(this===t)throw new TypeError("Cannot pair a group with itself.");this._pairedGroups.add(t),t._pairedGroups.add(this)}}const v0=a=>{if(!a||typeof a!="object")throw new TypeError("metadata must be an object.");if(a.languageCode!==void 0&&!iA(a.languageCode))throw new TypeError("metadata.languageCode, when provided, must be a three-letter, ISO 639-2/T language code.");if(a.name!==void 0&&typeof a.name!="string")throw new TypeError("metadata.name, when provided, must be a string.");if(a.disposition!==void 0&&gA(a.disposition),a.maximumPacketCount!==void 0&&(!Number.isInteger(a.maximumPacketCount)||a.maximumPacketCount<0))throw new TypeError("metadata.maximumPacketCount, when provided, must be a non-negative integer.");if(a.bitrate!==void 0&&(!Number.isFinite(a.bitrate)||a.bitrate<0))throw new TypeError("metadata.bitrate, when provided, must be a non-negative number.");if(a.averageBitrate!==void 0&&(!Number.isFinite(a.averageBitrate)||a.averageBitrate<0))throw new TypeError("metadata.averageBitrate, when provided, must be a non-negative number.");if(a.group!==void 0&&!(a.group instanceof Xd)&&(!Array.isArray(a.group)||a.group.some(t=>!(t instanceof Xd))))throw new TypeError("metadata.group, when provided, must be an OutputTrackGroup instance or an array of OutputTrackGroup instances.")};class b2 extends Dm{get target(){const t="Output.target cannot be used when using PathedTarget with an async callback. Use the 'target' event instead.";if(this._rootTargetPromise)throw new TypeError(t);const i=this._getRootTarget();if(el(i))throw new TypeError(t);return i}constructor(t){if(super(),this.state="pending",this.defaultTrackGroup=new Xd,this.tracks=[],this._onFinalize=null,this._unfinalizedTargets=new Set,this._rootWriterPromise=null,this._startPromise=null,this._cancelPromise=null,this._finalizePromise=null,this._mutex=new Ib,this._metadataTags={},this._rootTarget=null,this._rootTargetPromise=null,this._firstMediaStreamTimestamp=null,!t||typeof t!="object")throw new TypeError("options must be an object.");if(!(t.format instanceof h0))throw new TypeError("options.format must be an OutputFormat.");if(!(t.target instanceof ko||t.target instanceof p0))throw new TypeError("options.target must be a Target or a PathedTarget.");if(t.target instanceof ko&&this._rememberTarget(t.target),t.initTarget!==void 0&&!(t.initTarget instanceof ko)&&typeof t.initTarget!="function")throw new Error("options.initTarget, when provided, must be a Target or a function that returns or resolves to a Target.");if(t.onFinalize!==void 0&&typeof t.onFinalize!="function")throw new TypeError("options.onFinalize, when provided, must be a function.");this.format=t.format,this._target=t.target,this._onFinalize=t.onFinalize??null,this._initTarget=t.initTarget??null,this._initTarget instanceof ko&&this._rememberTarget(this._initTarget),this._muxer=t.format._createMuxer(this)}_getTargetValidated(t){We(this._target instanceof p0);const i=this._target.getTarget(t),n=s=>{if(!(s instanceof ko))throw new TypeError("getTarget must return a Target.");return s};return el(i)?i.then(n):n(i)}async _getTarget(t){We(this._target instanceof p0);const i=await this._getTargetValidated(t);return this._emit("target",{target:i,request:t,isRoot:t.isRoot}),this.state==="canceled"?await i._close():this._rememberTarget(i),i}_rememberTarget(t){this._unfinalizedTargets.add(t),t.on("finalized",()=>this._unfinalizedTargets.delete(t),{once:!0})}async _getInitTarget(){if(We(this._initTarget!==null),this._initTarget instanceof ko)return this._initTarget;const t=await this._initTarget();return this.state==="canceled"?await t._close():this._rememberTarget(t),t}_hasInitTarget(){return this._initTarget!==null}_getRootTarget(){if(this._rootTarget)return this._rootTarget;if(this._rootTargetPromise)return this._rootTargetPromise;if(this._target instanceof ko)return this._emit("target",{target:this._target,request:null,isRoot:!0}),this._rootTarget=this._target,this._target;const t={path:this._target.rootPath,isRoot:!0,mimeType:this.format.mimeType},i=this._getTargetValidated(t),n=s=>(this.state==="canceled"?s._close():this._rememberTarget(s),this._emit("target",{target:s,request:t,isRoot:!0}),this._rootTarget=s,s);return el(i)?this._rootTargetPromise=i.then(n):n(i)}_getRootWriter(t){return this._rootWriterPromise??=(async()=>{const i=await this._getRootTarget(),n=new d0(i,typeof t=="boolean"?t:t(i));return n.start(),n})()}addVideoTrack(t,i={}){if(!(t instanceof d2))throw new TypeError("source must be a VideoSource.");if(v0(i),i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError(`Invalid video rotation: ${i.rotation}. Has to be 0, 90, 180 or 270.`);if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("metadata.flip, when provided, must be a boolean.");if(i.transformationMatrix!==void 0&&(!Array.isArray(i.transformationMatrix)||i.transformationMatrix.length!==9||!i.transformationMatrix.every(s=>Number.isFinite(s))))throw new TypeError("metadata.transformationMatrix, when provided, must be an array of 9 finite numbers.");if(i.frameRate!==void 0&&(!Number.isFinite(i.frameRate)||i.frameRate<=0))throw new TypeError(`Invalid video frame rate: ${i.frameRate}. Must be a positive number.`);if(i.decoderConfig!==void 0&&Ym({decoderConfig:i.decoderConfig},t._codec),i.primingPacket!==void 0){if(!(i.primingPacket instanceof Vr))throw new TypeError("metadata.primingPacket, when provided, must be an EncodedPacket.");if(i.decoderConfig===void 0)throw new TypeError("metadata.primingPacket can only be provided alongside metadata.decoderConfig.")}const n={...i};return n.group??=this.defaultTrackGroup,this._addTrack(new p7(this.tracks.length+1,this,t,n))}addAudioTrack(t,i={}){if(!(t instanceof f2))throw new TypeError("source must be an AudioSource.");if(v0(i),i.decoderConfig!==void 0&&Jm({decoderConfig:i.decoderConfig},t._codec),i.primingPacket!==void 0){if(!(i.primingPacket instanceof Vr))throw new TypeError("metadata.primingPacket, when provided, must be an EncodedPacket.");if(i.decoderConfig===void 0)throw new TypeError("metadata.primingPacket can only be provided alongside metadata.decoderConfig.")}const n={...i};return n.group??=this.defaultTrackGroup,this._addTrack(new m7(this.tracks.length+1,this,t,n))}addSubtitleTrack(t,i={}){if(!(t instanceof f7))throw new TypeError("source must be a SubtitleSource.");v0(i);const n={...i};return n.group??=this.defaultTrackGroup,this._addTrack(new g7(this.tracks.length+1,this,t,n))}setMetadataTags(t){if(mA(t),this.state!=="pending")throw new Error("Cannot set metadata tags after output has been started or canceled.");this._metadataTags=t}_addTrack(t){if(this.state!=="pending")throw new Error("Cannot add track after output has been started or canceled.");if(t.source._connectedTrack)throw new Error("Source is already used for a track.");const i=this.format.getSupportedTrackCounts(),n=this.tracks.reduce((o,l)=>o+(l.type===t.type?1:0),0),s=i[t.type].max;if(n===s)throw new Error(s===0?`${this.format._name} does not support ${t.type} tracks.`:`${this.format._name} does not support more than ${s} ${t.type} track${s===1?"":"s"}.`);const r=i.total.max;if(this.tracks.length===r)throw new Error(`${this.format._name} does not support more than ${r} tracks${r===1?"":"s"} in total.`);if(t.isVideoTrack()){const o=this.format.getSupportedVideoCodecs();if(o.length===0)throw new Error(`${this.format._name} does not support video tracks.`+this.format._codecUnsupportedHint(t.source._codec));if(!o.includes(t.source._codec))throw new Error(`Codec '${t.source._codec}' cannot be contained within ${this.format._name}. Supported video codecs are: ${o.map(l=>`'${l}'`).join(", ")}.`+this.format._codecUnsupportedHint(t.source._codec))}else if(t.isAudioTrack()){const o=this.format.getSupportedAudioCodecs();if(o.length===0)throw new Error(`${this.format._name} does not support audio tracks.`+this.format._codecUnsupportedHint(t.source._codec));if(!o.includes(t.source._codec))throw new Error(`Codec '${t.source._codec}' cannot be contained within ${this.format._name}. Supported audio codecs are: ${o.map(l=>`'${l}'`).join(", ")}.`+this.format._codecUnsupportedHint(t.source._codec))}else if(t.isSubtitleTrack()){const o=this.format.getSupportedSubtitleCodecs();if(o.length===0)throw new Error(`${this.format._name} does not support subtitle tracks.`+this.format._codecUnsupportedHint(t.source._codec));if(!o.includes(t.source._codec))throw new Error(`Codec '${t.source._codec}' cannot be contained within ${this.format._name}. Supported subtitle codecs are: ${o.map(l=>`'${l}'`).join(", ")}.`+this.format._codecUnsupportedHint(t.source._codec))}return this.tracks.push(t),t.source._connectedTrack=t,t}hasEnoughTracks(){const t=this.format.getSupportedTrackCounts();for(const n of v2){const s=this.tracks.reduce((o,l)=>o+(l.type===n?1:0),0),r=t[n].min;if(so+(l.type===n?1:0),0),r=t[n].min;if(s{this.state="started";const n=this._mutex.acquire();try{await this._muxer.start();const s=this.tracks.map(r=>r.source._start());await Promise.all(s)}finally{(await n)()}})()}getMimeType(){return this._muxer.getMimeType()}async cancel(){if(this.state==="canceled")return this._cancelPromise??void 0;if(this.state==="finalizing"||this.state==="finalized"){this.state==="finalized"&&_n._warn("Output has already been finalized.");return}return this._cancelPromise=(async()=>{this.state="canceled";const t=await this._mutex.acquire();try{const i=this.tracks.map(n=>n.source._flushOrWaitForOngoingClose(!0));await Promise.all(i),await Promise.all([...this._unfinalizedTargets].map(n=>n._close())),this._unfinalizedTargets.clear()}finally{t()}})()}async finalize(){if(this.state==="pending")throw new Error("Cannot finalize before starting.");if(this.state==="canceled")throw new Error("Cannot finalize after canceling.");return this._finalizePromise?(_n._warn("Output has already been finalized."),this._finalizePromise):this._finalizePromise=(async()=>{this.state="finalizing";const t=await this._mutex.acquire();try{const i=this.tracks.map(n=>n.source._flushOrWaitForOngoingClose(!1));if(await Promise.all(i),await this._muxer.finalize(),this._rootWriterPromise){const n=await this._rootWriterPromise;n.finalized||(await n.flush(),await n.finalize())}this._onFinalize&&await this._onFinalize(),this.state="finalized"}catch(i){throw this.state="canceled",i}finally{await Promise.all([...this._unfinalizedTargets].map(i=>i._close().catch(()=>{}))),this._unfinalizedTargets.clear(),t()}})()}}function b0(a,t,i){const n=Number(a);if(!Number.isSafeInteger(n)||n<=0)throw new Error(`${i} video has invalid ${t} metadata`);return n}function h7(a,t,i){const n=atob(a.slice(t,t+i)),s=new Uint8Array(n.length);for(let r=0;r"u")throw new Error("This browser does not support H.264 encoding through WebCodecs");const r=b0(t.width,"width",n),o=b0(t.height,"height",n),l=b0(t.frames,"frame count",n),c=Number(t.fps);if(!Number.isFinite(c)||c<=0)throw new Error(`${n} video has invalid frame rate metadata`);const d=r*o*3,g=d/3*4,h=Math.ceil(d*l/3)*4;if(a.length!==h)throw new Error(`${n} RGB24 payload size does not match its video metadata`);const m=document.createElement("canvas");m.width=r,m.height=o;const p=m.getContext("2d",{alpha:!1});if(!p)throw new Error(`Unable to create the ${n} video canvas`);const u=new AudioContext;try{const f=await u.decodeAudioData(await i.arrayBuffer()),_=v7(u,f,l/c),b=new zs("high"),v=new zs("high");if(!await UG("avc",{width:r,height:o,quality:b}))throw new Error(`This browser cannot encode H.264 video for ${n} MP4 output`);const T={numberOfChannels:_.numberOfChannels,sampleRate:_.sampleRate,quality:v},S=typeof AudioEncoder<"u"&&await Dy(s,T),M=new Yd,P=new b2({format:new m2({fastStart:"in-memory"}),target:M}),B=new d7(m,{codec:"avc",quality:b,keyFrameInterval:2,onEncodedPacket:(G,A)=>{const N=A?.decoderConfig,H=N?.description;if(A&&N&&H!==void 0){const E={...N};if(H&&typeof H=="object"&&"byteLength"in H){const U=ArrayBuffer.isView(H)?new Uint8Array(H.buffer,H.byteOffset,H.byteLength):new Uint8Array(H);E.description=U.slice().buffer}else delete E.description;A.decoderConfig=E}}}),C=S?new p2({codec:s,quality:v}):null;P.addVideoTrack(B),C&&P.addAudioTrack(C),await P.start(),C&&await C.add(_);const j=1/c;for(let G=0;Gtypeof l?.payload=="string"&&l.meta?.format==="rgb24"):void 0;if(!o||typeof o.payload!="string")return{artifacts:r,warning:`${i} returned no RGB24 video artifact.`};if(!t)return{artifacts:r,warning:`${i} MP4 encoding requires the driving audio.`};try{const l=await b7(o.payload,o.meta||{},t,i,s);return r.push({id:`${n}_video`,extension:"mp4",mime:"video/mp4",url:URL.createObjectURL(l.blob)}),{artifacts:r,warning:l.audioIncluded?"":`Browser ${s.toUpperCase()} encoding is unavailable; the MP4 has no audio track.`}}catch(l){return{artifacts:r,warning:`${i} MP4 encoding failed: ${l instanceof Error?l.message:String(l)}`}}}var y7=ae('
        ');function w7(a,t){zi(t,!1);let i=xe(t,"busy",8,!1),n=xe(t,"sourceFile",8,null),s=xe(t,"setPanelRunner",8,()=>()=>{}),r=Y(null),o=Y(null);async function l(f){if(!e(r))throw f.warning("Choose a face video.");if(!n())throw f.warning("Choose the speech audio that will drive the lips.");const _=e(r),b=n();await f.ensureLoaded("offline"),f.setStatus("Uploading video and speech audio...");const v=await Fd(_,f.signal),T=await gr(await Fr(b,16e3),f.signal);f.setStatus("Synchronizing lip motion...");const S=await Nl({model:f.modelId,request:{audio:T,options:{...f.options,seed:f.seed,reference_video_file:v}}},f.signal);f.setStatus("Encoding MP4...");const M=await y2(S,b,"LatentSync","latentsync","opus");if(M.warning||!M.artifacts.some(P=>P.mime==="video/mp4")){for(const P of M.artifacts)URL.revokeObjectURL(P.url);throw new Error(M.warning)}return{audio:null,text:M.warning,artifacts:M.artifacts,json:JSON.stringify(S,(P,B)=>P==="payload"&&typeof B=="string"?``:B,2)}}Kn(()=>s()(l)),Xi();var c=y7(),d=q(k(c),2);Ci(d,f=>y(o,f),()=>e(o));var g=q(d,2),h=q(k(g)),m=k(h,!0);w(h),w(g);var p=q(g,2),u=q(p,2);rs(u,{get file(){return e(r)},kind:"video",label:"Face video preview"}),w(c),ie(()=>{d.disabled=i(),W(m,(e(r),x(()=>e(r)?.name||"No video selected"))),p.disabled=!e(r)||i()}),re("change",d,f=>y(r,f.currentTarget.files?.[0]||null)),re("click",p,()=>{y(r,null),e(o)&&Bt(o,e(o).value="")}),J(a,c),Ei()}const k7={latentsync:{component:w7,requestMode:"panel",blocksRunWhileUploading:!1,replacesGenericControls:{text:!0,language:!0,duration:!0,voice:!0,chunking:!0}},fish_drama3:{component:IC,requestMode:"panel",blocksRunWhileUploading:!1,replacesGenericControls:{text:!0,language:!0,voice:!0,chunking:!0,settingsImport:!0,advancedJson:!0}},auk:{component:Eq,requestMode:"default",blocksRunWhileUploading:!1,replacesGenericControls:{packageButtons:!0,text:!1,genSource:!1,language:!0,seed:!1,duration:!0,params:!0,advancedJson:!1}},lfm2_audio:{component:Gb,tasks:["s2s"],requestMode:"panel",blocksRunWhileUploading:!1,replacesGenericControls:{packageButtons:!1,text:!1,genSource:!1,language:!1,seed:!1,duration:!1,params:!1,advancedJson:!1}},lfm3_audio:{component:Gb,tasks:["s2s"],requestMode:"panel",blocksRunWhileUploading:!1,replacesGenericControls:{packageButtons:!1,text:!1,genSource:!1,language:!0,seed:!1,duration:!1,params:!1,advancedJson:!1}},liveavatar:{component:vC,requestMode:"default",blocksRunWhileUploading:!0,replacesGenericControls:{packageButtons:!1,text:!1,genSource:!1,language:!0,seed:!1,duration:!0,params:!0,advancedJson:!0}},yue2:{component:GC,requestMode:"yue2",blocksRunWhileUploading:!0,replacesGenericControls:{packageButtons:!0,text:!0,genSource:!0,language:!0,seed:!0,duration:!0,params:!0,advancedJson:!0}}};function x7(a,t){if(!a)return;const i=k7[a],n=i?.tasks;if(!(n&&!n.includes(t||"")))return i}var S7=ae('
        ',1),T7=ae('
        ',1);function $7(a,t){zi(t,!1);const i=Y(),n=Y();let s=xe(t,"modelId",8),r=xe(t,"text",12,""),o=xe(t,"lyrics",12,""),l=xe(t,"language",12,""),c=xe(t,"duration",12,30),d=xe(t,"seed",24,()=>-1),g=xe(t,"busy",8,!1),h=xe(t,"adapterEditable",8,!1),m=xe(t,"rewritingCaption",12,!1),p=xe(t,"advancedValues",28,()=>({})),u=xe(t,"paramSpecs",24,()=>[]),f=xe(t,"outputText",12,""),_=xe(t,"outputJson",12,""),b=xe(t,"status",12,""),v=xe(t,"warningStatus",12,""),T=xe(t,"errorStatus",12,""),S=xe(t,"ensureLoaded",8),M=xe(t,"requestOptions",8),P=xe(t,"resolveRequestSeed",8),B=xe(t,"setParameterValue",8),C=xe(t,"onBrowseAdapter",8),j=xe(t,"log",8),G=xe(t,"tr",8);function A(Z){if(Array.isArray(Z.artifacts)){const ee=Z.artifacts.find(oe=>typeof oe=="object"&&oe!==null&&oe.id==="ace_step_caption_plan"&&typeof oe.payload=="string");if(ee){const oe=Uint8Array.from(atob(ee.payload),fe=>fe.charCodeAt(0));return JSON.parse(new TextDecoder().decode(oe))}}return typeof Z.text=="string"?{caption:Z.text}:{}}async function N(){if(!(g()||m())){if(!r().trim()&&!o().trim()){b("Enter a caption or lyrics to rewrite."),v(b()),T("");return}m(!0),v(""),T(""),b(G()("request.rewritingCaption"));try{await S()();const Z={text:r(),seed:P()(d()),duration_seconds:c(),options:{...M()(),rewrite_caption:!0}};l().trim()&&(Z.language=l()),o().trim()&&(Z.lyrics=o());const ee=await Nl({model:s(),request:Z}),oe=A(ee);typeof oe.caption=="string"&&oe.caption.trim()&&r(oe.caption),typeof oe.language=="string"&&oe.language.trim()&&l(oe.language),typeof oe.duration_seconds=="number"&&Number.isFinite(oe.duration_seconds)&&oe.duration_seconds>0&&c(oe.duration_seconds);const fe={...p()};typeof oe.bpm=="number"&&Number.isFinite(oe.bpm)&&(fe.bpm=oe.bpm),typeof oe.keyscale=="string"&&(fe.keyscale=oe.keyscale),typeof oe.timesignature=="string"&&(fe.timesignature=oe.timesignature),p(fe),f(typeof ee.text=="string"?ee.text:""),_(JSON.stringify(oe,null,2)),b("Caption rewritten.")}catch(Z){b(Z instanceof Error?Z.message:String(Z)),T(b()),j()(`Caption rewrite failed: ${b()}`)}finally{m(!1)}}}Ee(()=>K(u()),()=>{y(i,u().find(Z=>Z.name==="lora"))}),Ee(()=>K(u()),()=>{y(n,u().find(Z=>Z.name==="lora_scale"))}),kn(),Xi();var H=T7(),E=ht(H),U=k(E),O=q(U),V=k(O,!0);w(O),w(E);var D=q(E,2);rn(D);var $=q(D,2),F=k($),z=k(F,!0);w(F),w($);var L=q($,2);{var Q=Z=>{{let ee=Lt(()=>(K(p()),x(()=>p().lora?1:0)));Am(Z,{get selected(){return e(ee)},children:(oe,fe)=>{var le=S7(),ge=ht(le),R=k(ge),we=k(R),ce=q(k(we)),Te=k(ce,!0);w(ce),w(we);var he=q(we,2),je=k(he);Pt(je);var Le=q(je,2);w(he),w(R);var nt=q(R,2),Ae=q(k(nt),2);Pt(Ae),w(nt),w(ge);var Ge=q(ge,2);ie((ne,Xe,de)=>{W(Te,ne),je.disabled=g()||m()||!h(),_e(je,"title",h()?"":"Set adapter session options in the server configuration."),bi(je,Xe),Le.disabled=g()||m()||!h(),Ae.disabled=(K(g()),K(m()),K(h()),K(p()),x(()=>g()||m()||!h()||!p().lora)),bi(Ae,de),Ge.disabled=(K(g()),K(m()),K(h()),K(p()),x(()=>g()||m()||!h()||!p().lora))},[()=>(K(G()),x(()=>G()("request.optional"))),()=>(K(p()),x(()=>String(p().lora??""))),()=>(K(p()),x(()=>Number(p().lora_scale??1)))]),re("input",je,ne=>B()(e(i),ne.currentTarget.value.trim())),re("click",Le,()=>C()(e(i))),re("input",Ae,ne=>{Number.isFinite(ne.currentTarget.valueAsNumber)&&B()(e(n),ne.currentTarget.valueAsNumber)}),re("click",Ge,()=>B()(e(i),"")),J(oe,le)},$$slots:{default:!0}})}};ve(L,Z=>{e(i)&&e(n)&&Z(Q)})}ie((Z,ee,oe,fe)=>{W(U,`${Z??""} `),W(V,ee),F.disabled=oe,W(z,fe)},[()=>(K(G()),x(()=>G()("request.lyrics"))),()=>(K(G()),x(()=>G()("request.optional"))),()=>(K(g()),K(m()),K(r()),K(o()),x(()=>g()||m()||!r().trim()&&!o().trim())),()=>(K(m()),K(G()),x(()=>m()?G()("request.rewritingCaption"):G()("request.rewriteCaption")))]),Ta(D,o),re("click",F,N),J(a,H),Ei()}var q7=ae(' ',1),w2=ae(" "),C7=ae('
        ',1),A7=ae('
        '),G7=ae('
        '),F7=ae('
        ',1),M7=ae('
        ',1),z7=ae(' ',1),E7=ae('
        '),y0=ae(""),U7=ae('
        '),R7=ae('
        '),B7=ae('

        '),P7=ae(''),j7=ae('
         
        '),N7=ae("
        "),O7=ae('
        '),I7=ae("

        "),D7=ae('

        '),L7=ae('
        '),V7=ae('

        ',1),H7=ae('
        ~

        '),W7=ae('

        JSON

        ',1);function Q7(a,t){zi(t,!1);const i=Y();let n=xe(t,"activeCatalog",24,()=>[]),s=xe(t,"loadedModels",24,()=>[]),r=xe(t,"savedVoices",24,()=>[]),o=xe(t,"server",8,null),l=xe(t,"modelsFolder",8,""),c=xe(t,"maxTokens",8,1024),d=xe(t,"entrySelectable",8,()=>!0),g=xe(t,"studioPackageSlots",8,()=>[]),h=xe(t,"packageIsAvailable",8,()=>!1),m=xe(t,"packageSessionOptionsMatch",8,()=>!0),p=xe(t,"supportsMaxTokens",8,()=>!1),u=xe(t,"supportsRequestOption",8,()=>!1),f=xe(t,"requiresRequestOption",8,()=>!1),_=xe(t,"refresh",8,async()=>{}),b=xe(t,"log",8,()=>{}),v=xe(t,"tr",8,(me,Me,Pe=me)=>Pe);class T extends Error{}let S=Y("tts"),M=Y(""),P=Y(""),B=Y(""),C=Y(""),j=Y(1234),G=Y(null),A=Y(null),N=Y(""),H=Y("default"),E=Y(""),U=Y(""),O=Y(null),V=Y(null),D=Y(""),$=Y("{}"),F=Y([]),z=Y(!1),L=null,Q=Y(""),Z=Y([]),ee=Y(),oe=Y([]),fe=Y([]),le=Y([]),ge=Y([]),R=Y(""),we=Y(""),ce=Y("");const Te={demo_1_man:"demo_1_man",demo_2_man:"demo_2_man",demo_3_woman:"demo_3_woman",demo_4_woman:"demo_4_woman"};async function he(){try{y(le,await db())}catch(me){y(le,[]),b()(`Arena voices unavailable: ${me instanceof Error?me.message:me}`)}}function je(me){if(!l())return me;const Me=me.replace(/\\/g,"/");if(Me==="models")return l();if(!Me.startsWith("models/"))return me;const Pe=Me.slice(7),rt=l().includes("\\")?"\\":"/";return`${l().replace(/[\\/]+$/,"")}${rt}${Pe.replace(/\//g,rt)}`}function Le(me){return me.replace(/\\/g,"/").replace(/\/$/,"").toLowerCase()}function nt(me,Me){const Pe=Le(Me),rt=Le(me);return Pe===rt||Pe.endsWith(`/${rt}`)}function Ae(me){return!!o()&&(!o()?.ui_management||me.configured===!0)}function Ge(me,Me){return Ae(me)?me.path:je(Me?.path||me.path)}function ne(me,Me){return{...me.session_options||{},...Me?.session_options||{}}}function Xe(me){if(!Number.isInteger(me)||me<-1||me>4294967295)throw new Error(v()("arena.error.seed"));if(me>=0)return me;const Me=new Uint32Array(1);return globalThis.crypto.getRandomValues(Me),Me[0]}function de(me){return["clon","vc","svc"].includes(me.task)&&me.family!=="rvc"||me.task==="s2s"&&me.family==="personaplex"||me.task==="tts"&&!["supertonic"].includes(me.family)}function ye(me){return["clon","vc","svc"].includes(me.task)&&me.family!=="rvc"}function ue(me){return me.task==="tts"&&me.family==="qwen3_tts"&&!me.id.includes("custom")}function be(me,Me){return f()(me,"reference_text")||Me&&ue(me)}function Se(me){return e(S)==="vc"&&me.task==="vc"&&me.family!=="rvc"}function Ie(){return e(S)==="tts"&&e(H)==="builtin"&&e(E)?Te[e(E)]||e(E):""}function $e(me){return me.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{N}']+/gu," ").trim().split(/\s+/).filter(Boolean)}function ze(me,Me){const Pe=$e(me),rt=$e(Me);if(!Pe.length)return"";const dt=Array.from({length:rt.length+1},(Qe,yt)=>yt),lt=new Array(rt.length+1);for(let Qe=1;Qe<=Pe.length;Qe+=1){lt[0]=Qe;for(let yt=1;yt<=rt.length;yt+=1){const aa=dt[yt-1]+(Pe[Qe-1]===rt[yt-1]?0:1),Yt=dt[yt]+1,Ca=lt[yt-1]+1;lt[yt]=Math.min(aa,Yt,Ca)}for(let yt=0;yt<=rt.length;yt+=1)dt[yt]=lt[yt]}return`${(dt[rt.length]/Pe.length*100).toFixed(2)}%`}function Fe(me){const Me=Number.parseFloat(me);return Number.isFinite(Me)?Me:Number.POSITIVE_INFINITY}function qe(me,Me){const Pe=me.status==="done",rt=Me.status==="done";if(Pe!==rt)return Pe?-1:1;if(Pe&&rt){const dt=Fe(me.rtf)-Fe(Me.rtf);if(dt!==0)return dt}return e(F).indexOf(me)-e(F).indexOf(Me)}function it(me){return v()(`arena.itemStatus.${me}`,{},me)}function st(me){if(Be(),me.startsWith("saved:")){const Me=r().find(Pe=>Pe.id===me.slice(6));if(!Me)return;y(U,Me.id),y(H,"reference"),y(O,new File([Me.audio],`${Me.name}.wav`,{type:Me.audio.type||"audio/wav"})),y(D,Me.transcript)}else me.startsWith("preset:")?(y(H,"builtin"),y(E,me.slice(7))):me==="reference"&&y(H,"reference")}function Ne(me){(e(U)||e(E))&&y(D,""),y(U,""),y(E,""),y(O,me),me&&y(H,"reference")}function He(){y(G,null),e(A)&&Bt(A,e(A).value="")}function Be(){y(H,"default"),y(U,""),y(E,""),y(O,null),y(D,""),e(V)&&Bt(V,e(V).value="")}function Ue(me){return n().find(Me=>Me.id===me.entryId)}function tt(me,Me){return(me.install_packages||[]).find(Pe=>Pe.id===Me.packageId)}function Re(me,Me){y(F,e(F).map(Pe=>Pe.id===me?{...Pe,...Me}:Pe))}function Ve(){for(const me of e(F))me.outputUrl&&URL.revokeObjectURL(me.outputUrl);y(F,e(F).map(me=>({...me,status:"queued",note:"",error:"",outputUrl:"",outputText:"",wallMs:"",rtf:"",wer:""})))}function _t(){for(const me of e(F))me.outputUrl&&URL.revokeObjectURL(me.outputUrl);y(F,[])}function mt(me){e(z)||me===e(S)||(_t(),y(S,me),y(Q,""))}function et(){if(!e(ee))return;const me=e(oe).find(Pe=>Pe.id===e(P));if(e(F).some(Pe=>Pe.entryId===e(ee)?.id&&Pe.packageId===me?.id)){y(Q,v()("arena.status.duplicate",{model:e(ee).display_name,package:me?.label||""}));return}y(F,[...e(F),{id:crypto.randomUUID(),entryId:e(ee).id,packageId:me?.id,label:e(ee).display_name,packageLabel:me?.label||v()("arena.package.configured"),status:"queued",note:"",error:"",outputUrl:"",outputText:"",wallMs:"",rtf:"",wer:""}])}function wt(me){const Me=e(F).find(Pe=>Pe.id===me);Me?.outputUrl&&URL.revokeObjectURL(Me.outputUrl),y(F,e(F).filter(Pe=>Pe.id!==me))}function Ye(){try{const me=JSON.parse(e($)||"{}");if(Array.isArray(me)||me===null)throw new Error(v()("arena.error.jsonObject"));return me}catch(me){throw new Error(v()("arena.error.invalidJson",{error:me instanceof Error?me.message:String(me)}))}}async function ut(me){if(!me)return;const Me=await Fr(me);return gr(Me,L?.signal)}async function at(me,Me){if(Ae(me)){if(!s().some(Qe=>Qe.id===me.id&&Qe.loaded))throw new Error(v()("arena.error.unregistered"));return}Me=Me||me.install_packages?.[0];const Pe=Me?Tm(Me):void 0;if(Me&&!h()(me,Me))throw new T(v()("arena.error.notDownloaded",{package:Me.label}));const rt=Ge(me,Me);if(s().find(Qe=>Qe.id===me.id&&Qe.loaded&&nt(rt,Qe.path)&&(!Me||m()(me,Me,Qe))))return;const lt=s().filter(Qe=>Qe.loaded&&(Qe.id!==me.id||!nt(rt,Qe.path)));for(const Qe of lt)await _o(Qe.id);if(lt.length&&await _()(),await df({id:me.id,path:rt,family:Pe?.family??me.family,task:me.task,mode:me.mode||"offline",load_options:{...Me?.load_options,...me.load_options},session_options:ne(me,Me)}),await _()(),!s().some(Qe=>Qe.id===me.id&&Qe.loaded&&nt(rt,Qe.path)&&(!Me||m()(me,Me,Qe))))throw new Error(v()("arena.error.loadFailed"))}async function Zt(me,Me){const Pe=Ue(me);if(!Pe){Re(me.id,{status:"failed",error:v()("arena.error.missingCatalog")});return}const rt=tt(Pe,me),dt=performance.now();try{Re(me.id,{status:"loading",note:v()("arena.status.loadingModel"),error:""}),await at(Pe,rt),Re(me.id,{status:"running",note:v()("arena.status.runningRequest")});const lt={...Pe.default_options||{},...Me},Qe=Ie(),yt=e(H)==="reference"&&!!e(O);if(Se(Pe)&&!yt){Re(me.id,{status:"skipped",note:v()("arena.note.skippedTargetVoice"),error:""});return}if(e(S)==="tts"&&be(Pe,yt)&&!e(D).trim()){Re(me.id,{status:"skipped",note:v()("arena.note.skippedReferenceText"),error:""});return}const Yt=yt&&de(Pe)?await ut(e(O)):void 0;let Ca="";if(Qe)Ca=v()("arena.note.builtinVoice",{voice:e(E)});else if(yt&&Yt)Ca=v()("arena.note.referenceVoice");else if(yt&&!de(Pe))Ca=v()("arena.note.referenceUnsupported");else if(Pe.default_voice)Ca=v()("arena.note.defaultVoice",{voice:Pe.default_voice});else if(ye(Pe)&&!Qe){Re(me.id,{status:"skipped",note:v()("arena.note.skippedReferenceVoice"),error:""});return}if(e(S)==="tts"){if(!e(B).trim())throw new T(v()("arena.error.enterTtsText"));const Ot={model:Pe.id,input:e(B),language:e(C),seed:Xe(e(j)),options:lt};p()(Pe)&&(Ot.max_tokens=c()),Yt?Ot.voice_ref=Yt:Qe?Ot.voice=Qe:Pe.default_voice&&(Ot.voice=Pe.default_voice),yt&&e(D).trim()&&u()(Pe,"reference_text")&&(Ot.reference_text=e(D));const gi=await ff(Ot,L?.signal);Re(me.id,{status:"done",note:Ca,outputUrl:URL.createObjectURL(gi.blob),wallMs:gi.wallMs||`${(performance.now()-dt).toFixed(1)}`,rtf:gi.rtf||""});return}if(e(S)==="asr"){const Ot=await ut(e(G));if(!Ot)throw new T(v()("arena.error.chooseAsrSource"));const gi=await pf({model:Pe.id,audio:Ot,language:e(C),options:lt},L?.signal),si=typeof gi.text=="string"?gi.text:"",ln=gi.timing;Re(me.id,{status:"done",note:Ca,outputText:si,wallMs:typeof ln?.wall_ms=="number"?String(ln.wall_ms):"",rtf:typeof ln?.rtf=="number"?String(ln.rtf):"",wer:e(N).trim()?ze(e(N),si):""});return}const Ya=await ut(e(G));if(!Ya)throw new T(v()("arena.error.chooseVcSource"));const pa={audio:Ya,seed:Xe(e(j)),options:lt};e(B).trim()&&(pa.text=e(B)),e(C).trim()&&(pa.language=e(C)),Yt?pa.voice_ref=Yt:Qe&&(pa.voice_id=Qe);const Ea=await Nl({model:Pe.id,request:pa},L?.signal),Gt=typeof Ea.audio=="string"?Ea.audio:Array.isArray(Ea.named_audio_outputs)&&typeof Ea.named_audio_outputs[0]?.audio=="string"?Ea.named_audio_outputs[0].audio:"";if(!Gt)throw new Error(v()("arena.error.noAudio"));const ma=Ea.timing;Re(me.id,{status:"done",note:Ca,outputUrl:mf(Gt),wallMs:typeof ma?.wall_ms=="number"?String(ma.wall_ms):"",rtf:typeof ma?.rtf=="number"?String(ma.rtf):""})}catch(lt){Re(me.id,{status:lt instanceof T?"skipped":"failed",error:lt instanceof Error?lt.message:String(lt),note:""}),b()(`Arena row failed: ${lt instanceof Error?lt.message:lt}`)}}async function At(){if(!e(z)){if(!e(F).length){y(Q,v()("arena.status.addModel"));return}y(z,!0),L=new AbortController,Ve(),y(Q,v()("arena.status.running",{mode:e(ce)})),b()(e(Q));try{const me=Ye();for(const Me of e(F)){if(L?.signal.aborted)break;await Zt(Me,me)}y(Q,v()("arena.status.complete")),b()(e(Q))}catch(me){y(Q,me instanceof Error?me.message:String(me))}finally{y(z,!1),L=null}}}function It(){L?.abort()}ur(()=>{L?.abort();for(const me of e(F))me.outputUrl&&URL.revokeObjectURL(me.outputUrl)}),Kn(he),Ee(()=>(K(n()),e(S)),()=>{y(Z,n().filter(me=>me.arena!==!1&&(e(S)==="tts"?["tts","clon"].includes(me.task):e(S)==="vc"?me.task==="vc":me.task==="asr")))}),Ee(()=>(e(M),e(Z)),()=>{(!e(M)||!e(Z).some(me=>me.id===e(M)))&&y(M,e(Z)[0]?.id||"")}),Ee(()=>(e(Z),e(M)),()=>{y(ee,e(Z).find(me=>me.id===e(M))||e(Z)[0])}),Ee(()=>(e(ee),K(g())),()=>{y(oe,e(ee)?g()(e(ee)).map(me=>me.choice).filter(me=>!!me):[])}),Ee(()=>(e(oe),e(P)),()=>{e(oe).length&&!e(oe).some(me=>me.id===e(P))&&y(P,e(oe)[0].id)}),Ee(()=>e(le),()=>{y(ge,[...e(le)].sort((me,Me)=>me.localeCompare(Me,"en",{sensitivity:"base",numeric:!0})))}),Ee(()=>(e(H),e(ge)),()=>{e(H)==="builtin"&&!e(ge).length&&y(H,"default")}),Ee(()=>(e(S),e(H)),()=>{e(S)==="vc"&&e(H)!=="reference"&&(y(H,"reference"),y(E,""))}),Ee(()=>(e(H),e(ge),e(E)),()=>{e(H)==="builtin"&&!e(ge).includes(e(E))&&y(E,e(ge)[0]||"")}),Ee(()=>(e(H),e(E),uf),()=>{y(i,e(H)==="builtin"&&e(E)?uf(e(E)):"")}),Ee(()=>(e(S),K(v())),()=>{y(R,e(S)==="tts"?v()("arena.title.tts"):e(S)==="vc"?v()("arena.title.vc"):v()("arena.title.asr"))}),Ee(()=>(e(S),K(v())),()=>{y(we,e(S)==="tts"?v()("arena.subtitle.tts"):e(S)==="vc"?v()("arena.subtitle.vc"):v()("arena.subtitle.asr"))}),Ee(()=>(e(S),K(v())),()=>{y(ce,e(S)==="tts"?v()("arena.mode.tts"):e(S)==="vc"?v()("arena.mode.vc"):v()("arena.mode.asr"))}),Ee(()=>e(F),()=>{y(fe,e(F).every(me=>["done","failed","skipped"].includes(me.status))?[...e(F)].sort(qe):e(F))}),kn();var Ra={runArena:At};Xi();var na=W7(),ba=ht(na),Ma=k(ba),en=k(Ma),ea=k(en,!0);w(en);var kt=q(en,2),ta=k(kt,!0);w(kt);var ra=q(kt,2),ki=k(ra,!0);w(ra),w(Ma);var ya=q(Ma,2),ni=k(ya);let Ai;var xi=k(ni,!0);w(ni);var tn=q(ni,2);let Si;var dn=k(tn,!0);w(tn);var on=q(tn,2);let Bi;var Qi=k(on,!0);w(on),w(ya),w(ba);var Ki=q(ba,2),Wa=k(Ki),Jn=k(Wa),Vn=k(Jn),Xn=k(Vn),Ke=k(Xn,!0);w(Xn);var Et=q(Xn),Qa=k(Et,!0);w(Et),w(Vn);var Za=q(Vn,2),mi=k(Za,!0);w(Za),w(Jn);var Ht=q(Jn,2),_i=k(Ht);{var ei=me=>{var Me=q7(),Pe=ht(Me),rt=k(Pe);Ad(rt,{size:17});var dt=q(rt,1,!0);w(Pe);var lt=q(Pe,2);rn(lt),ie((Qe,yt)=>{W(dt,Qe),_e(lt,"placeholder",yt)},[()=>(K(v()),x(()=>v()("request.text"))),()=>(K(v()),x(()=>v()("arena.input.textPlaceholder")))]),Ta(lt,()=>e(B),Qe=>y(B,Qe)),J(me,Me)},wa=me=>{var Me=C7(),Pe=ht(Me),rt=k(Pe);sf(rt,{size:17});var dt=q(rt,1,!0);w(Pe);var lt=q(Pe,2);Ci(lt,si=>y(A,si),()=>e(A));var Qe=q(lt,2),yt=k(Qe);zc(yt,{size:16});var aa=q(yt),Yt=k(aa,!0);w(aa);var Ca=q(aa),Ya=k(Ca,!0);w(Ca),w(Qe);var pa=q(Qe,2),Ea=k(pa),Gt=k(Ea,!0);w(Ea);var ma=q(Ea,2);{var Ot=si=>{var ln=w2(),cs=k(ln,!0);w(ln),ie(()=>W(cs,(e(G),x(()=>e(G).name)))),J(si,ln)};ve(ma,si=>{e(G)&&si(Ot)})}w(pa);var gi=q(pa,2);{let si=Lt(()=>(K(v()),x(()=>v()("file.preview"))));rs(gi,{get file(){return e(G)},kind:"audio",get label(){return e(si)}})}ie((si,ln,cs,Ss)=>{W(dt,si),W(Yt,ln),W(Ya,cs),Ea.disabled=!e(G),W(Gt,Ss)},[()=>(K(v()),x(()=>v()("request.sourceAudio"))),()=>(K(v()),x(()=>v()("file.choose"))),()=>(e(G),K(v()),x(()=>e(G)?.name||v()("file.none"))),()=>(K(v()),x(()=>v()("file.clear")))]),re("change",lt,si=>y(G,si.currentTarget.files?.[0]||null)),re("click",Ea,He),J(me,Me)};ve(_i,me=>{e(S)==="tts"?me(ei):me(wa,-1)})}w(Ht);var za=q(Ht,2);{var Je=me=>{var Me=A7(),Pe=k(Me),rt=k(Pe);Ko(rt,{size:17});var dt=q(rt),lt=q(dt),Qe=k(lt,!0);w(lt),w(Pe);var yt=q(Pe,2);rn(yt),w(Me),ie((aa,Yt,Ca)=>{W(dt,`${aa??""} `),W(Qe,Yt),_e(yt,"placeholder",Ca)},[()=>(K(v()),x(()=>v()("arena.input.groundTruth"))),()=>(K(v()),x(()=>v()("request.optional"))),()=>(K(v()),x(()=>v()("arena.input.groundTruthPlaceholder")))]),Ta(yt,()=>e(N),aa=>y(N,aa)),J(me,Me)};ve(za,me=>{e(S)==="asr"&&me(Je)})}var Ce=q(za,2),pt=k(Ce),zt=k(pt),$a=k(zt),sa=q($a),ui=k(sa,!0);w(sa),w(zt);var Ti=q(zt,2);Pt(Ti),w(pt);var fa=q(pt,2);{var Ft=me=>{var Me=G7(),Pe=k(Me),rt=k(Pe,!0);w(Pe);var dt=q(Pe,2);Pt(dt),w(Me),ie(lt=>W(rt,lt),[()=>(K(v()),x(()=>v()("request.seed")))]),Ta(dt,()=>e(j),lt=>y(j,lt)),J(me,Me)};ve(fa,me=>{e(S)!=="asr"&&me(Ft)})}w(Ce);var Nt=q(Ce,2);let ka;var Ii=k(Nt);{var Ka=me=>{var Me=F7(),Pe=ht(Me),rt=k(Pe);lf(rt,{size:17});var dt=q(rt,1,!0);w(Pe);var lt=q(Pe,2),Qe=k(lt),yt=k(Qe);{let Gt=Lt(()=>e(U)?`saved:${e(U)}`:e(H)==="builtin"?`preset:${e(E)}`:e(H)==="reference"?"reference":""),ma=Lt(()=>e(S)==="tts"?e(ge):[]),Ot=Lt(()=>(K(v()),x(()=>v()("arena.voice.builtin")))),gi=Lt(()=>(K(v()),x(()=>v()("arena.voice.modelDefault")))),si=Lt(()=>e(S)==="tts");kb(yt,{id:"arena-voice-mode",get value(){return e(Gt)},get presets(){return e(ma)},get savedVoices(){return r()},get presetLabel(){return e(Ot)},get emptyLabel(){return e(gi)},get allowEmpty(){return e(si)},referenceOption:!0,get tr(){return v()},get disabled(){return e(z)},onselect:st})}w(Qe);var aa=q(Qe,2),Yt=k(aa),Ca=k(Yt),Ya=q(Ca),pa=k(Ya,!0);w(Ya),w(Yt);var Ea=q(Yt,2);rn(Ea),w(aa),w(lt),ie((Gt,ma,Ot)=>{W(dt,Gt),W(Ca,`${ma??""} `),W(pa,Ot)},[()=>(e(S),K(v()),x(()=>e(S)==="vc"?v()("arena.voice.targetSpeaker"):v()("voice.reference"))),()=>(K(v()),x(()=>v()("voice.referenceText"))),()=>(K(v()),x(()=>v()("request.optional")))]),Ta(Ea,()=>e(D),Gt=>y(D,Gt)),J(me,Me)};ve(Ii,me=>{e(S)!=="asr"&&me(Ka)})}var oa=q(Ii,2);{var Ba=me=>{var Me=M7(),Pe=ht(Me),rt=k(Pe,!0);w(Pe);var dt=q(Pe,2);{let lt=Lt(()=>(K(v()),x(()=>v()("file.preview"))));rs(dt,{get src(){return e(i)},get name(){return e(E)},kind:"audio",get label(){return e(lt)}})}ie(lt=>W(rt,lt),[()=>(K(v()),x(()=>v()("arena.voice.builtinNote")))]),J(me,Me)},pe=me=>{var Me=z7(),Pe=ht(Me),rt=k(Pe),dt=q(rt),lt=k(dt,!0);w(dt),w(Pe);var Qe=q(Pe,2);Ci(Qe,Gt=>y(V,Gt),()=>e(V));var yt=q(Qe,2),aa=k(yt);zc(aa,{size:16});var Yt=q(aa),Ca=k(Yt,!0);w(Yt);var Ya=q(Yt),pa=k(Ya,!0);w(Ya),w(yt);var Ea=q(yt,2);{let Gt=Lt(()=>(K(v()),x(()=>v()("file.preview"))));rs(Ea,{get file(){return e(O)},kind:"audio",get label(){return e(Gt)}})}ie((Gt,ma,Ot,gi)=>{W(rt,`${Gt??""} `),W(lt,ma),W(Ca,Ot),W(pa,gi)},[()=>(e(S),K(v()),x(()=>e(S)==="vc"?v()("arena.voice.targetSpeaker"):v()("voice.reference"))),()=>(e(S),K(v()),x(()=>e(S)==="vc"?v()("voice.required"):v()("voice.optional"))),()=>(K(v()),x(()=>v()("file.choose"))),()=>(e(O),K(v()),x(()=>e(O)?.name||v()("file.none")))]),re("change",Qe,Gt=>Ne(Gt.currentTarget.files?.[0]||null)),J(me,Me)};ve(oa,me=>{e(H)==="builtin"?me(Ba):(e(S)==="vc"||e(H)==="reference")&&me(pe,1)})}var De=q(oa,2);{var ft=me=>{var Me=E7(),Pe=k(Me),rt=k(Pe,!0);w(Pe);var dt=q(Pe,2);{var lt=Qe=>{var yt=w2(),aa=k(yt,!0);w(yt),ie(()=>W(aa,(e(O),x(()=>e(O).name)))),J(Qe,yt)};ve(dt,Qe=>{e(O)&&Qe(lt)})}w(Me),ie((Qe,yt)=>{Pe.disabled=Qe,W(rt,yt)},[()=>(e(H),e(O),e(D),x(()=>e(H)==="default"&&!e(O)&&!e(D).trim())),()=>(e(S),K(v()),x(()=>e(S)==="vc"?v()("arena.voice.clearTarget"):v()("arena.voice.clearReference")))]),re("click",Pe,Be),J(me,Me)};ve(De,me=>{e(S)!=="asr"&&me(ft)})}w(Nt);var jt=q(Nt,2),xa=k(jt),Pi=k(xa);Zv(Pi,{size:16});var X=q(Pi);Rt(),w(xa);var Gi=q(xa,2);rn(Gi),w(jt),w(Wa);var $i=q(Wa,2),fi=k($i),En=k(fi),Un=k(En),Xr=k(Un,!0);w(Un);var Dn=q(Un),Zn=k(Dn,!0);w(Dn),w(En);var ns=q(En,2),br=k(ns,!0);w(ns),w(fi);var Ql=q(fi,2),Zr=k(Ql),eo=k(Zr),Vs=k(eo,!0);w(eo);var So=q(eo,2);Ct(So,5,()=>e(Z),Kt,(me,Me)=>{var Pe=y0(),rt=k(Pe,!0);w(Pe);var dt={};ie(lt=>{Pe.disabled=lt,W(rt,(e(Me),x(()=>e(Me).display_name))),dt!==(dt=(e(Me),x(()=>e(Me).id)))&&(Pe.value=(Pe.__value=(e(Me),x(()=>e(Me).id)))??"")},[()=>(K(d()),e(Me),x(()=>!d()(e(Me))))]),J(me,Pe)}),w(So),w(Zr);var Kl=q(Zr,2),yr=k(Kl),To=k(yr,!0);w(yr);var Rr=q(yr,2),$o=k(Rr);Ct($o,1,()=>e(oe),Kt,(me,Me)=>{var Pe=y0(),rt=k(Pe);w(Pe);var dt={};ie((lt,Qe)=>{Pe.disabled=lt,W(rt,`${e(Me),x(()=>e(Me).label)??""}${Qe??""}`),dt!==(dt=(e(Me),x(()=>e(Me).id)))&&(Pe.value=(Pe.__value=(e(Me),x(()=>e(Me).id)))??"")},[()=>(e(ee),K(h()),e(Me),x(()=>e(ee)?!h()(e(ee),e(Me)):!0)),()=>(e(ee),K(h()),e(Me),K(v()),x(()=>e(ee)&&h()(e(ee),e(Me))?"":` · ${v()("studio.notDownloaded")}`))]),J(me,Pe)});var lu=q($o);{var wr=me=>{var Me=y0(),Pe=k(Me,!0);w(Me),Me.value=Me.__value="",ie(rt=>W(Pe,rt),[()=>(K(v()),x(()=>v()("arena.package.configured")))]),J(me,Me)};ve(lu,me=>{e(oe),e(ee),x(()=>!e(oe).length&&e(ee))&&me(wr)})}w(Rr),w(Kl);var qo=q(Kl,2),Yl=k(qo);Ir(Yl,{size:15});var Co=q(Yl,1,!0);w(qo),w(Ql);var Dc=q(Ql,2);{var Jl=me=>{var Me=R7();Ct(Me,5,()=>e(F),Kt,(Pe,rt)=>{var dt=U7();let lt;var Qe=k(dt),yt=k(Qe),aa=k(yt,!0);w(yt);var Yt=q(yt,2),Ca=k(Yt,!0);w(Yt),w(Qe);var Ya=q(Qe,2),pa=k(Ya,!0);w(Ya);var Ea=q(Ya,2),Gt=k(Ea);ho(Gt,{size:14});var ma=q(Gt,1,!0);w(Ea),w(dt),ie((Ot,gi)=>{lt=va(dt,1,"",null,lt,{done:e(rt).status==="done",failed:e(rt).status==="failed",skipped:e(rt).status==="skipped"}),W(aa,(e(rt),x(()=>e(rt).label))),W(Ca,(e(rt),x(()=>e(rt).packageLabel))),W(pa,Ot),Ea.disabled=e(z),W(ma,gi)},[()=>(e(rt),x(()=>it(e(rt).status))),()=>(K(v()),x(()=>v()("arena.queue.remove")))]),re("click",Ea,()=>wt(e(rt).id)),J(Pe,dt)}),w(Me),J(me,Me)},Xl=me=>{var Me=B7(),Pe=k(Me),rt=k(Pe,!0);w(Pe),w(Me),ie(dt=>W(rt,dt),[()=>(K(v()),x(()=>v()("arena.queue.empty")))]),J(me,Me)};ve(Dc,me=>{e(F),x(()=>e(F).length)?me(Jl):me(Xl,-1)})}w($i);var Hi=q($i,2),dl=k(Hi),Tn=k(dl),ks=k(Tn),un=k(ks,!0);w(ks);var Zl=q(ks),Hn=k(Zl,!0);w(Zl),w(Tn);var li=q(Tn,2),Ao=k(li);w(li),w(dl);var ec=q(dl,2);{var Us=me=>{var Me=V7(),Pe=ht(Me),rt=k(Pe,!0);w(Pe);var dt=q(Pe,2);Ct(dt,5,()=>e(fe),Kt,(lt,Qe,yt)=>{var aa=L7();let Yt;var Ca=k(aa),Ya=k(Ca),pa=k(Ya,!0);w(Ya);var Ea=q(Ya,2),Gt=k(Ea),ma=k(Gt,!0);w(Gt);var Ot=q(Gt,2),gi=k(Ot,!0);w(Ot),w(Ea);var si=q(Ea,2),ln=k(si,!0);w(si),w(Ca);var cs=q(Ca,2);{var Ss=fn=>{var Fi=P7();ie(()=>_e(Fi,"src",(e(Qe),x(()=>e(Qe).outputUrl)))),J(fn,Fi)};ve(cs,fn=>{e(Qe),x(()=>e(Qe).outputUrl)&&fn(Ss)})}var ul=q(cs,2);{var Vc=fn=>{var Fi=j7(),ds=k(Fi,!0);w(Fi),ie(()=>W(ds,(e(Qe),x(()=>e(Qe).outputText)))),J(fn,Fi)};ve(ul,fn=>{e(Qe),x(()=>e(Qe).outputText)&&fn(Vc)})}var fl=q(ul,2);{var Hc=fn=>{var Fi=O7(),ds=k(Fi),zo=k(ds),ac=k(zo,!0);w(zo);var $n=q(zo),Hs=k($n,!0);w($n),w(ds);var xr=q(ds,2),pl=k(xr),Eo=k(pl,!0);w(pl);var ic=q(pl),Wc=k(ic,!0);w(ic),w(xr);var du=q(xr,2);{var Uo=Ws=>{var Qs=N7(),nc=k(Qs),Ks=k(nc,!0);w(nc);var Ro=q(nc),cn=k(Ro,!0);w(Ro),w(Qs),ie(us=>{W(Ks,us),W(cn,(e(Qe),x(()=>e(Qe).wer)))},[()=>(K(v()),x(()=>v()("arena.metric.wer")))]),J(Ws,Qs)};ve(du,Ws=>{e(Qe),x(()=>e(Qe).wer)&&Ws(Uo)})}w(Fi),ie((Ws,Qs)=>{W(ac,Ws),W(Hs,(e(Qe),x(()=>e(Qe).wallMs||"?"))),W(Eo,Qs),W(Wc,(e(Qe),x(()=>e(Qe).rtf||"?")))},[()=>(K(v()),x(()=>v()("arena.metric.wall"))),()=>(K(v()),x(()=>v()("arena.metric.rtf")))]),J(fn,Fi)};ve(fl,fn=>{e(Qe),x(()=>e(Qe).outputUrl||e(Qe).outputText||e(Qe).wallMs||e(Qe).rtf||e(Qe).wer)&&fn(Hc)})}var io=q(fl,2);{var kr=fn=>{var Fi=I7(),ds=k(Fi,!0);w(Fi),ie(()=>W(ds,(e(Qe),x(()=>e(Qe).note)))),J(fn,Fi)};ve(io,fn=>{e(Qe),x(()=>e(Qe).note)&&fn(kr)})}var cu=q(io,2);{var Ts=fn=>{var Fi=D7(),ds=k(Fi,!0);w(Fi),ie(()=>W(ds,(e(Qe),x(()=>e(Qe).error)))),J(fn,Fi)};ve(cu,fn=>{e(Qe),x(()=>e(Qe).error)&&fn(Ts)})}w(aa),ie((fn,Fi)=>{Yt=va(aa,1,"",null,Yt,{done:e(Qe).status==="done",failed:e(Qe).status==="failed",skipped:e(Qe).status==="skipped"}),W(pa,fn),W(ma,(e(Qe),x(()=>e(Qe).label))),W(gi,(e(Qe),x(()=>e(Qe).packageLabel))),W(ln,Fi)},[()=>x(()=>String(yt+1).padStart(2,"0")),()=>(e(Qe),x(()=>it(e(Qe).status)))]),J(lt,aa)}),w(dt),ie(lt=>W(rt,lt),[()=>(e(F),K(v()),x(()=>e(F).every(lt=>["done","failed","skipped"].includes(lt.status))?v()("arena.results.orderRtf"):v()("arena.results.orderSelection")))]),J(me,Me)},Lc=me=>{var Me=H7(),Pe=q(k(Me)),rt=k(Pe,!0);w(Pe),w(Me),ie(dt=>W(rt,dt),[()=>(K(v()),x(()=>v()("arena.results.empty")))]),J(me,Me)};ve(ec,me=>{e(F),x(()=>e(F).length)?me(Us):me(Lc,-1)})}w(Hi);var xs=q(Hi,2),Go=k(xs),to=k(Go),tc=k(to);Ec(tc,{size:15});var ao=q(tc,2),Fo=k(ao,!0);w(ao),Rt(2),w(to);var Br=q(to,2),Mo=k(Br);Uc(Mo,{size:14});var Dt=q(Mo,1,!0);w(Br);var gt=q(Br,2),da=k(gt);ho(da,{size:14});var ha=q(da,1,!0);w(gt),w(Go);var Pa=q(Go,2);let qa;var $t=k(Pa,!0);return w(Pa),w(xs),w(Ki),ie((me,Me,Pe,rt,dt,lt,Qe,yt,aa,Yt,Ca,Ya,pa,Ea,Gt,ma,Ot,gi,si,ln,cs,Ss)=>{W(ea,me),W(ta,e(R)),W(ki,e(we)),ni.disabled=e(z),Ai=va(ni,1,"",null,Ai,{active:e(S)==="tts"}),W(xi,Me),tn.disabled=e(z),Si=va(tn,1,"",null,Si,{active:e(S)==="vc"}),W(dn,Pe),on.disabled=e(z),Bi=va(on,1,"",null,Bi,{active:e(S)==="asr"}),W(Qi,rt),W(Ke,dt),W(Qa,lt),W(mi,e(ce)),W($a,`${Qe??""} `),W(ui,yt),_e(Ti,"placeholder",aa),ka=va(Nt,1,"",null,ka,{"arena-input-section":e(S)!=="asr"}),W(X,`${Yt??""} `),W(Xr,Ca),W(Zn,Ya),W(br,(e(F),x(()=>e(F).length))),W(Vs,pa),W(To,Ea),qo.disabled=!e(ee),W(Co,Gt),W(un,ma),W(Hn,Ot),W(Ao,`${gi??""} / ${e(F),x(()=>e(F).length)??""}`),to.disabled=(e(z),e(F),x(()=>e(z)||!e(F).length)),W(Fo,si),Br.disabled=!e(z),W(Dt,ln),gt.disabled=(e(z),e(F),x(()=>e(z)||!e(F).length)),W(ha,cs),qa=va(Pa,1,"status",null,qa,{busy:e(z)}),W($t,Ss)},[()=>(K(v()),x(()=>v()("arena.eyebrow"))),()=>(K(v()),x(()=>v()("arena.mode.tts"))),()=>(K(v()),x(()=>v()("arena.mode.vc"))),()=>(K(v()),x(()=>v()("arena.mode.asr"))),()=>(K(v()),x(()=>v()("arena.input.label"))),()=>(K(v()),x(()=>v()("arena.input.title"))),()=>(K(v()),x(()=>v()("request.language"))),()=>(K(v()),x(()=>v()("request.optional"))),()=>(K(v()),x(()=>v()("request.autoLanguage"))),()=>(K(v()),x(()=>v()("arena.options.shared"))),()=>(K(v()),x(()=>v()("arena.queue.label"))),()=>(K(v()),x(()=>v()("arena.queue.title"))),()=>(K(v()),x(()=>v()("studio.model"))),()=>(K(v()),x(()=>v()("arena.package.label"))),()=>(K(v()),x(()=>v()("arena.queue.add"))),()=>(K(v()),x(()=>v()("result.label"))),()=>(K(v()),x(()=>v()("arena.results.title"))),()=>(e(F),x(()=>e(F).filter(me=>me.status==="done").length)),()=>(e(z),K(v()),x(()=>e(z)?v()("run.working"):v()("arena.run"))),()=>(K(v()),x(()=>v()("run.cancel"))),()=>(K(v()),x(()=>v()("arena.queue.clear"))),()=>(e(Q),K(v()),x(()=>e(Q)||v()("status.ready")))]),re("click",ni,()=>mt("tts")),re("click",tn,()=>mt("vc")),re("click",on,()=>mt("asr")),Ta(Ti,()=>e(C),me=>y(C,me)),Ta(Gi,()=>e($),me=>y($,me)),dr(So,()=>e(M),me=>y(M,me)),re("change",So,()=>y(P,"")),dr(Rr,()=>e(P),me=>y(P,me)),re("click",qo,et),re("click",to,At),re("click",Br,It),re("click",gt,_t),J(a,na),El(t,"runArena",At),Ei(Ra)}const w0=Object.values(Object.assign({"./dubbing/app.ts":{id:"cross-language-dubbing",name:"Cross-language dubbing",description:"Translate a recording and generate speech in the target language.",tasks:["asr","tts"],modes:["offline"],load:()=>Bl(()=>Promise.resolve().then(()=>QU),void 0,Gn&&Gn.tagName.toUpperCase()==="SCRIPT"&&Gn.src||new URL("_app/immutable/bundle.BPEI3Cn2.js",document.baseURI).href)},"./tts/app.ts":{id:"tts",name:"Text to speech",description:"Write a script, cast named speakers, refine recordings, and export your narration.",tasks:["tts","clon","vdes"],modes:["offline"],load:()=>Bl(()=>Promise.resolve().then(()=>EB),void 0,Gn&&Gn.tagName.toUpperCase()==="SCRIPT"&&Gn.src||new URL("_app/immutable/bundle.BPEI3Cn2.js",document.baseURI).href)}})).sort((a,t)=>a.name.localeCompare(t.name));if(new Set(w0.map(a=>a.id)).size!==w0.length)throw new Error("Duplicate app id.");var K7=ae('

        Opening app…

        '),Y7=ae(''),J7=ae('
        /
        ',1),X7=ae(''),Z7=ae('

        APPS

        Make something with your models

        Choose a workflow. Create and reuse speaker presets inside Text to speech.

        ',1),e9=ae('
        ');function t9(a,t){zi(t,!1);let i=xe(t,"active",8,!0),n=Y(null),s=Y(null),r=Y(null),o=Y(!1),l=Y(!1),c=Y("");function d(){return!e(o)&&!e(l)}async function g(b){if(d()){y(n,b),y(l,!0),y(c,"");try{y(s,(await b.load()).default)}catch(v){y(c,`Could not open ${b.name}: ${String(v)}`)}finally{y(l,!1)}}}async function h(){if(d())try{await e(r)?.saveBeforeClose?.(),y(n,null),y(s,null),y(c,"")}catch(b){y(c,`Could not save the app before closing: ${String(b)}`)}}var m={canClose:d};Xi();var p=e9();re("beforeunload",xc,b=>{e(o)&&(b.preventDefault(),b.returnValue="")});var u=k(p);{var f=b=>{var v=J7(),T=ht(v),S=k(T),M=q(S,2),P=k(M,!0);w(M),w(T);var B=q(T,2);{var C=H=>{var E=K7();J(H,E)};ve(B,H=>{e(l)&&H(C)})}var j=q(B,2);{var G=H=>{var E=Y7(),U=k(E,!0);w(E),ie(()=>W(U,e(c))),J(H,E)};ve(j,H=>{e(c)&&H(G)})}var A=q(j,2);{var N=H=>{var E=ys(),U=ht(E);gd(U,()=>e(s),(O,V)=>{Ci(V(O,{get active(){return i()},get busy(){return e(o)},set busy(D){y(o,D)},$$legacy:!0}),D=>y(r,D),()=>e(r))}),J(H,E)};ve(A,H=>{e(s)&&H(N)})}ie(()=>{S.disabled=e(o)||e(l),W(P,(e(n),x(()=>e(n).name)))}),re("click",S,h),J(b,v)},_=b=>{var v=Z7(),T=q(ht(v),4);Ct(T,5,()=>w0,Kt,(S,M)=>{var P=X7(),B=k(P),C=k(B,!0);w(B);var j=q(B),G=k(j,!0);w(j),Rt(),w(P),ie(()=>{W(C,(e(M),x(()=>e(M).name))),W(G,(e(M),x(()=>e(M).description)))}),re("click",P,()=>g(e(M))),J(S,P)}),w(T),J(b,v)};ve(u,b=>{e(n)?b(f):b(_,-1)})}return w(p),J(a,p),El(t,"canClose",d),Ei(m)}const k2="audiocpp.ui.configuration",Rf=Tl({historyLimit:10}),Bf=Tl("");function x2(a){if(!Number.isSafeInteger(a.historyLimit)||a.historyLimit<1)throw new Error("History length must be a positive integer.")}function a9(){const a=localStorage.getItem(k2);if(a===null)return;const t=JSON.parse(a);x2(t),Rf.set({historyLimit:t.historyLimit})}function i9(a){x2(a),localStorage.setItem(k2,JSON.stringify(a)),Rf.set(a),Bf.set("")}var n9=ae(''),s9=ae('
        '),r9=ae('

        ');function o9(a,t){zi(t,!1);const i=()=>zu(Rf,"$uiConfiguration",s),n=()=>zu(Bf,"$uiConfigurationError",s),[s,r]=vp();let o=xe(t,"tr",8),l=Y(i().historyLimit),c=Y("");function d(){try{i9({historyLimit:e(l)}),y(c,"configuration.saved")}catch(j){Bf.set(j instanceof Error?j.message:String(j)),y(c,"")}}Ee(()=>i(),()=>{y(l,i().historyLimit)}),kn(),Xi();var g=r9(),h=k(g),m=k(h,!0);w(h);var p=q(h,2),u=k(p),f=k(u,!0);w(u);var _=q(u,2),b=k(_,!0);w(_);var v=q(_,2);Pt(v);var T=q(v,2),S=k(T,!0);w(T);var M=q(T,2);{var P=j=>{var G=n9(),A=k(G,!0);w(G),ie(()=>W(A,n())),J(j,G)};ve(M,j=>{n()&&j(P)})}var B=q(M,2);{var C=j=>{var G=s9(),A=k(G,!0);w(G),ie(N=>W(A,N),[()=>(K(o()),e(c),x(()=>o()(e(c))))]),J(j,G)};ve(B,j=>{e(c)&&j(C)})}w(p),w(g),ie((j,G,A,N)=>{W(m,j),W(f,G),W(b,A),W(S,N)},[()=>(K(o()),x(()=>o()("nav.configuration"))),()=>(K(o()),x(()=>o()("configuration.history"))),()=>(K(o()),x(()=>o()("configuration.historyLimit"))),()=>(K(o()),x(()=>o()("configuration.save")))]),Ta(v,()=>e(l),j=>y(l,j)),re("submit",p,I4(d)),J(a,g),Ei(),r()}var l9=ae(' '),k0=ae(""),c9=ae(''),d9=ae('
        '),u9=ae('
        Downloads
        '),f9=ae('

        '),p9=ae(' '),m9=ae('Update available'),g9=ae(''),h9=ae('
        Manage
        '),_9=ae(''),v9=ae(''),b9=ae('

        '),y9=ae('
        ',1),w9=ae('View weights ↗'),k9=ae('Manual setup
        ',1),x9=ae('
        '),S9=ae('
        '),T9=ae('
        No models match these filters.
        '),$9=ae('

        Model Library

        Models folder

        Choose a recent path, then Apply to switch folders.

        ');function q9(a,t){zi(t,!1);const i=Y(),n=Y();let s=xe(t,"groups",8),r=xe(t,"packageSizes",8),o=xe(t,"installJobs",8),l=xe(t,"packageSizeState",8),c=xe(t,"modelsFolderInput",12),d=xe(t,"modelsFolder",8),g=xe(t,"modelsFolderHistory",24,()=>[]),h=xe(t,"defaultModelsFolder",8),m=xe(t,"applyingModelsFolder",8),p=xe(t,"modelsFolderIsDefault",8),u=xe(t,"openFolderBrowser",8),f=xe(t,"applyModelsFolder",8),_=xe(t,"installPackage",8),b=xe(t,"removePackage",8),v=xe(t,"stopPackageDownload",8),T=xe(t,"cleanPartialDownload",8),S=xe(t,"openModel",8),M=xe(t,"taskLabel",8),P=xe(t,"formatBytes",8),B=xe(t,"installProgressLabel",8),C=xe(t,"workflowForEntry",8),j=xe(t,"workflows",8),G=Y(""),A=Y(""),N=Y("all"),H=Y({});const E=Be=>!!Be&&["queued","running","cancelling"].includes(Be.state);function U(Be,Ue,tt,Re){if(Ue[Be.id]?.installed)return"Installed";const Ve=tt[Be.id];return E(Ve)?Ve.state==="queued"?"Queued":Ve.state==="cancelling"?"Stopping":"Downloading":Ve&&["failed","cancelled"].includes(Ve.state)?Ve.state==="failed"?"Download failed":"Incomplete":Ue[Be.id]?"Not installed":Re==="failed"?"Status unavailable":"Checking"}function O(Be,Ue,tt){const Re=Be.install_packages||[];return Re.find(Ve=>Ve.id===Ue[Be.id])||Re.find(Ve=>tt[Ve.id]?.installed)||Re[0]}function V(Be,Ue){return new Set(Be.flatMap(tt=>(tt.install_packages||[]).filter(Re=>Ue[Re.id]?.installed).map(Re=>Re.id))).size}Ee(()=>(K(s()),e(G),K(r()),e(A),K(C()),e(N)),()=>{y(i,s().map(Be=>({...Be,entries:Be.entries.filter(Ue=>{const tt=`${Be.label} ${Ue.display_name} ${Ue.family}`.toLowerCase().includes(e(G).trim().toLowerCase()),Re=V([Ue],r())>0,Ve=!!Ue.install_packages?.length&&Ue.install_packages.every(_t=>!!r()[_t.id]);return tt&&(!e(A)||C()(Ue)===e(A))&&(e(N)==="all"||(e(N)==="installed"?Re:Ve&&!Re))})})).filter(Be=>Be.entries.length))}),Ee(()=>K(o()),()=>{y(n,Object.values(o()).filter(E))}),kn(),Xi();var D=$9(),$=k(D),F=k($),z=q(k(F)),L=k(z);w(z),w(F);var Q=q(F,2);{var Z=Be=>{var Ue=l9(),tt=k(Ue);w(Ue),ie(()=>W(tt,`${e(n),x(()=>e(n).length)??""} active downloads`)),J(Be,Ue)};ve(Q,Be=>{e(n),x(()=>e(n).length)&&Be(Z)})}w($);var ee=q($,2),oe=k(ee),fe=q(k(oe)),le=k(fe,!0);w(fe),w(oe);var ge=q(oe,2),R=k(ge),we=q(k(R));Pt(we),w(R);var ce=q(R,2),Te=q(ce,2),he=q(Te,2);w(ge);var je=q(ge,2),Le=k(je),nt=k(Le);DS(nt,{size:16,"aria-hidden":"true"});var Ae=q(nt,2),Ge=k(Ae);Ge.value=Ge.__value="";var ne=q(Ge);Ct(ne,1,g,Kt,(Be,Ue)=>{var tt=k0(),Re=k(tt,!0);w(tt);var Ve={};ie(()=>{W(Re,e(Ue)),Ve!==(Ve=e(Ue))&&(tt.value=(tt.__value=e(Ue))??"")}),J(Be,tt)}),w(Ae),Ae.value=Ae.__value="";var Xe=q(Ae,2);bm(Xe,{size:14,"aria-hidden":"true"}),w(Le),Rt(2),w(je),w(ee);var de=q(ee,2),ye=k(de);Pt(ye);var ue=q(ye,2),be=k(ue);be.value=be.__value="";var Se=q(be);Ct(Se,1,j,Kt,(Be,Ue)=>{var tt=k0(),Re=k(tt,!0);w(tt);var Ve={};ie(()=>{W(Re,(e(Ue),x(()=>e(Ue).label))),Ve!==(Ve=(e(Ue),x(()=>e(Ue).id)))&&(tt.value=(tt.__value=(e(Ue),x(()=>e(Ue).id)))??"")}),J(Be,tt)}),w(ue);var Ie=q(ue,2),$e=k(Ie);$e.value=$e.__value="all";var ze=q($e);ze.value=ze.__value="installed";var Fe=q(ze);Fe.value=Fe.__value="missing",w(Ie),w(de);var qe=q(de,2),it=k(qe);w(qe);var st=q(qe,2);{var Ne=Be=>{var Ue=u9(),tt=q(k(Ue));Ct(tt,1,()=>e(n),Kt,(Re,Ve)=>{const _t=Lt(()=>(K(s()),e(Ve),x(()=>s().flatMap(At=>At.entries).find(At=>At.install_packages?.some(It=>It.id===e(Ve).id)))));var mt=d9(),et=k(mt),wt=k(et,!0);w(et);var Ye=q(et),ut=k(Ye,!0);w(Ye);var at=q(Ye);{var Zt=At=>{var It=c9();ie(()=>It.disabled=(e(Ve),x(()=>e(Ve).state==="cancelling"))),re("click",It,()=>v()(e(_t),e(Ve))),J(At,It)};ve(at,At=>{e(_t)&&At(Zt)})}w(mt),ie(At=>{W(wt,(K(e(_t)),e(Ve),x(()=>e(_t)?.display_name||e(Ve).id))),W(ut,At)},[()=>(K(B()),e(Ve),x(()=>B()(e(Ve))))]),J(Re,mt)}),w(Ue),J(Be,Ue)};ve(st,Be=>{e(n),x(()=>e(n).length)&&Be(Ne)})}var He=q(st,2);Ct(He,1,()=>e(i),Be=>Be.family,(Be,Ue)=>{var tt=S9(),Re=k(tt);{var Ve=mt=>{var et=f9(),wt=k(et),Ye=k(wt,!0);w(wt);var ut=q(wt);let at;var Zt=k(ut,!0);w(ut),w(et),ie((At,It)=>{W(Ye,(e(Ue),x(()=>e(Ue).label))),at=va(ut,1,"svelte-1vlt8au",null,at,At),W(Zt,It)},[()=>({installed:V(e(Ue).entries,r())>0}),()=>(e(Ue),K(r()),x(()=>V(e(Ue).entries,r())?`${V(e(Ue).entries,r())} package${V(e(Ue).entries,r())===1?"":"s"} installed`:e(Ue).entries.every(At=>!At.install_packages?.length)?"Manual setup":e(Ue).entries.some(At=>At.install_packages?.some(It=>!r()[It.id]))?"Status pending":"Not installed"))]),J(mt,et)};ve(Re,mt=>{e(Ue),x(()=>e(Ue).entries.length>1)&&mt(Ve)})}var _t=q(Re,2);Ct(_t,1,()=>(e(Ue),x(()=>e(Ue).entries)),mt=>mt.id,(mt,et)=>{const wt=Lt(()=>(e(et),x(()=>new Set((e(et).install_packages||[]).map(ya=>ya.id)).size))),Ye=Lt(()=>(e(et),e(H),K(r()),x(()=>O(e(et),e(H),r())))),ut=Lt(()=>(K(e(Ye)),K(o()),x(()=>e(Ye)?o()[e(Ye).id]:void 0))),at=Lt(()=>(K(e(Ye)),K(r()),x(()=>e(Ye)&&r()[e(Ye).id]?.installed))),Zt=Lt(()=>(e(Ue),K(o()),x(()=>e(Ue).entries.some(ya=>ya.install_packages?.some(ni=>E(o()[ni.id]))))));var At=x9(),It=k(At),Ra=k(It),na=k(Ra,!0);w(Ra);var ba=q(Ra),Ma=k(ba,!0);w(ba);var en=q(ba);{var ea=ya=>{var ni=p9(),Ai=k(ni);w(ni),ie(xi=>W(Ai,`${xi??""} of ${e(wt)??""} packages installed`),[()=>(e(et),K(r()),x(()=>V([e(et)],r())))]),J(ya,ni)},kt=La(()=>(K(e(wt)),e(et),K(r()),x(()=>e(wt)&&e(et).install_packages?.every(ya=>!!r()[ya.id]))));ve(en,ya=>{e(kt)&&ya(ea)})}w(It);var ta=q(It,2);{var ra=ya=>{var ni=y9(),Ai=ht(ni),xi=k(Ai),tn=k(xi);w(xi);var Si=q(xi);Ct(Si,5,()=>(e(et),x(()=>e(et).install_packages||[])),Kt,(wa,za)=>{var Je=k0(),Ce=k(Je);w(Je);var pt={};ie(zt=>{W(Ce,`${e(za),x(()=>e(za).label)??""} · ${zt??""}`),pt!==(pt=(e(za),x(()=>e(za).id)))&&(Je.value=(Je.__value=(e(za),x(()=>e(za).id)))??"")},[()=>(e(za),K(r()),K(o()),K(l()),x(()=>U(e(za),r(),o(),l())))]),J(wa,Je)}),w(Si);var dn;On(Si);var on=q(Si),Bi=k(on,!0);w(on),w(Ai);var Qi=q(Ai,2);let Ki;var Wa=k(Qi),Jn=k(Wa,!0);w(Wa);var Vn=q(Wa);{var Xn=wa=>{var za=m9();J(wa,za)};ve(Vn,wa=>{K(e(at)),K(r()),K(e(Ye)),x(()=>e(at)&&r()[e(Ye).id]?.version_state==="update_available")&&wa(Xn)})}w(Qi);var Ke=q(Qi,2),Et=k(Ke),Qa=k(Et,!0);w(Et);var Za=q(Et,2);{var mi=wa=>{var za=h9(),Je=k(za),Ce=q(Je),pt=k(Ce);{var zt=sa=>{var ui=g9();ie(()=>ui.disabled=e(Zt)),re("click",ui,()=>_()(e(et),e(Ye),!0)),J(sa,ui)};ve(pt,sa=>{K(r()),K(e(Ye)),x(()=>r()[e(Ye).id]?.version_state==="update_available")&&sa(zt)})}var $a=q(pt);w(Ce),w(za),ie(()=>{_e(Je,"aria-label",(e(et),x(()=>`Manage ${e(et).display_name}`))),$a.disabled=e(Zt)}),re("click",$a,()=>b()(e(et),e(Ye))),J(wa,za)};ve(Za,wa=>{e(at)&&wa(mi)})}w(Ke);var Ht=q(Ke,2);{var _i=wa=>{var za=b9();let Je;var Ce=k(za),pt=k(Ce,!0);w(Ce);var zt=q(Ce),$a=q(zt),sa=k($a,!0);w($a);var ui=q($a);{var Ti=Nt=>{var ka=_9();ie(()=>ka.disabled=(K(e(ut)),x(()=>e(ut).state==="cancelling"))),re("click",ka,()=>v()(e(et),e(ut))),J(Nt,ka)},fa=La(()=>(K(e(ut)),x(()=>E(e(ut))))),Ft=Nt=>{var ka=v9();re("click",ka,()=>T()(e(et),e(ut))),J(Nt,ka)};ve(ui,Nt=>{e(fa)?Nt(Ti):Nt(Ft,-1)})}w(za),ie(Nt=>{Je=va(za,1,"job svelte-1vlt8au",null,Je,{failed:e(ut).state==="failed"}),W(pt,Nt),bi(zt,(K(e(ut)),x(()=>e(ut).progress_percent>=0?e(ut).progress_percent:void 0))),W(sa,(K(e(ut)),x(()=>e(ut).message)))},[()=>(K(B()),K(e(ut)),x(()=>B()(e(ut))))]),J(wa,za)},ei=La(()=>(K(e(ut)),x(()=>e(ut)&&!["complete","cleaned"].includes(e(ut).state))));ve(Ht,wa=>{e(ei)&&wa(_i)})}ie((wa,za,Je)=>{_e(xi,"for",(e(et),x(()=>`package-${e(et).id}`))),W(tn,`Package (${e(wt)??""})`),_e(Si,"id",(e(et),x(()=>`package-${e(et).id}`))),dn!==(dn=(K(e(Ye)),x(()=>e(Ye).id)))&&(Si.value=(Si.__value=(K(e(Ye)),x(()=>e(Ye).id)))??"",xn(Si,(K(e(Ye)),x(()=>e(Ye).id)))),W(Bi,wa),Ki=va(Qi,1,"state svelte-1vlt8au",null,Ki,{installed:e(at)}),W(Jn,za),Et.disabled=Je,W(Qa,e(at)?"Open in Studio":"Download")},[()=>(K(r()),K(e(Ye)),K(P()),x(()=>r()[e(Ye).id]?.size_bytes?`${P()(r()[e(Ye).id].size_bytes)} download`:"Download size unavailable")),()=>(K(e(at)),K(e(Ye)),K(r()),K(o()),K(l()),x(()=>e(at)?"✓ Installed":U(e(Ye),r(),o(),l()))),()=>(K(e(at)),K(e(ut)),K(r()),K(e(Ye)),x(()=>!e(at)&&(E(e(ut))||!r()[e(Ye).id])))]),re("change",Si,wa=>y(H,{...e(H),[e(et).id]:wa.currentTarget.value})),re("click",Et,()=>e(at)?S()(e(et),e(Ye)):_()(e(et),e(Ye))),J(ya,ni)},ki=ya=>{var ni=k9(),Ai=q(ht(ni)),xi=k(Ai);{var tn=dn=>{var on=w9();ie(()=>_e(on,"href",(e(et),x(()=>e(et).weights_url)))),J(dn,on)};ve(xi,dn=>{e(et),x(()=>e(et).weights_url)&&dn(tn)})}var Si=q(xi);w(Ai),re("click",Si,()=>S()(e(et))),J(ya,ni)};ve(ta,ya=>{e(Ye)?ya(ra):ya(ki,-1)})}w(At),ie(ya=>{W(na,(e(et),x(()=>e(et).display_name))),W(Ma,ya)},[()=>(K(M()),e(et),x(()=>M()(e(et))))]),J(mt,At)}),w(tt),J(Be,tt)},Be=>{var Ue=T9(),tt=q(k(Ue));w(Ue),re("click",tt,()=>{y(G,""),y(A,""),y(N,"all")}),J(Be,Ue)}),w(D),ie((Be,Ue,tt,Re)=>{W(L,`${Be??""} models · ${Ue??""} packages installed`),W(le,d()||h()),_e(we,"placeholder",h()),ce.disabled=m(),Te.disabled=tt,he.disabled=m()||p(),Ae.disabled=(K(m()),K(g()),x(()=>m()||!g().length)),W(it,`${Re??""} models · A–Z`)},[()=>(K(s()),x(()=>s().reduce((Be,Ue)=>Be+Ue.entries.length,0))),()=>(K(s()),K(r()),x(()=>V(s().flatMap(Be=>Be.entries),r()))),()=>(K(m()),K(c()),K(d()),x(()=>m()||!c().trim()||c().trim()===d())),()=>(e(i),x(()=>e(i).reduce((Be,Ue)=>Be+Ue.entries.length,0)))]),Ta(we,c),re("click",ce,()=>u()()),re("click",Te,()=>f()(!1)),re("click",he,()=>f()(!0)),re("change",Ae,Be=>{c(Be.currentTarget.value),Be.currentTarget.value=""}),Ta(ye,()=>e(G),Be=>y(G,Be)),dr(ue,()=>e(A),Be=>y(A,Be)),dr(Ie,()=>e(N),Be=>y(N,Be)),J(a,D),Ei()}const C9="audiocpp-native-studio",A9="audiocpp-native-apps",Zd="voices",S2="model-presets";function G9(a){const t=a===Zd;return new Promise((i,n)=>{const s=indexedDB.open(t?C9:A9,1);s.onupgradeneeded=()=>{for(const r of t?[Zd]:[S2,"app-projects"])s.result.createObjectStore(r,{keyPath:"id"})},s.onsuccess=()=>i(s.result),s.onerror=()=>n(s.error||new Error("Could not open the library."))})}function rl(a,t,i){return G9(a).then(n=>new Promise((s,r)=>{const o=n.transaction(a,t),l=i(o.objectStore(a));l.onerror=()=>r(l.error||new Error("Library operation failed.")),o.oncomplete=()=>{n.close(),s(l.result)},o.onabort=()=>{n.close(),r(o.error||new Error("Library transaction was aborted."))},o.onerror=()=>{n.close(),r(o.error||new Error("Library transaction failed."))}}))}async function eu(){return(await rl(Zd,"readonly",t=>t.getAll())).sort((t,i)=>i.createdAt-t.createdAt)}function F9(a){return rl(Zd,"readwrite",t=>t.put(a))}function M9(a){return rl(Zd,"readwrite",t=>t.delete(a))}async function z9(){return(await rl(S2,"readonly",t=>t.getAll())).filter(t=>["tts","clon","vdes"].includes(t.model.task))}async function E9(a){return(await rl("app-projects","readonly",i=>i.getAll())).filter(i=>i.appId===a).sort((i,n)=>n.updatedAt-i.updatedAt)}function U9(a){return rl("app-projects","readwrite",t=>t.put(a))}function R9(a){return rl("app-projects","readwrite",t=>t.delete(a))}function B9(a){return rl("app-projects","readonly",t=>t.get(a))}var P9=ae(''),j9=ae(''),N9=ae(''),O9=ae('

        '),I9=ae('
        ',1),D9=ae('

        Select a voice

        '),L9=ae('

        Voices

        ');function V9(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y();let r=xe(t,"ontext",8),o=xe(t,"onchange",8),l=Y([]),c=Y(),d=Y(),g=Y(""),h=Y(!1),m=Y(""),p=Y();function u(){return!e(h)&&(!e(n)||confirm("Discard unsaved voice edits?"))}async function f(){y(l,await eu())}function _(R){e(n)&&!confirm("Discard unsaved voice edits?")||(y(d,R),y(c,{...R}),y(m,""))}async function b(R){if(!(!R||e(h))){if(e(n)&&!confirm("Discard unsaved voice edits?")){Bt(p,e(p).value="");return}y(h,!0),y(m,"");try{const we=await Fr(R);y(c,{id:crypto.randomUUID(),name:R.name.replace(/\.[^.]+$/,""),transcript:"",audio:we,createdAt:Date.now()}),y(d,void 0)}catch(we){y(m,`Cannot import ${R.name}: ${String(we)}`)}finally{y(h,!1),Bt(p,e(p).value="")}}}async function v(){if(e(c)){if(!e(c).name.trim()){y(m,"Give this voice a name.");return}y(h,!0),y(m,"");try{const R={...e(c),name:e(c).name.trim()};await F9(R),await f(),y(d,R),y(c,{...R}),await o()()}catch(R){y(m,String(R))}finally{y(h,!1)}}}async function T(){if(!(!e(c)||!confirm(`Delete voice "${e(c).name}"?`))){y(h,!0),y(m,"");try{e(d)&&await M9(e(c).id),y(c,void 0),y(d,void 0),await f(),await o()()}catch(R){y(m,String(R))}finally{y(h,!1)}}}async function S(){if(!(!e(c)||e(n)||e(h))){y(m,"");try{await r()(e(c))}catch(R){y(m,String(R))}}}function M(){if(!e(c))return;const R=URL.createObjectURL(e(c).audio),we=document.createElement("a");we.href=R,we.download=`${e(c).name}.wav`,we.click(),setTimeout(()=>URL.revokeObjectURL(R),1e3)}Kn(()=>{f().catch(R=>y(m,String(R)))}),Ee(()=>(e(l),e(g)),()=>{y(i,e(l).filter(R=>`${R.name} ${R.transcript}`.toLowerCase().includes(e(g).toLowerCase())))}),Ee(()=>(e(c),e(d)),()=>{y(n,!!e(c)&&(!e(d)||e(c).name!==e(d).name||e(c).transcript!==e(d).transcript||e(c).audio!==e(d).audio))}),Ee(()=>e(c),()=>{y(s,e(c)?new File([e(c).audio],`${e(c).name}.wav`,{type:"audio/wav"}):null)}),kn();var P={canClose:u};Xi();var B=L9();re("beforeunload",xc,R=>{(e(n)||e(h))&&(R.preventDefault(),R.returnValue="")});var C=k(B),j=k(C),G=k(j);jl(G,{size:25});var A=q(G,2),N=k(A);w(A),w(j);var H=q(j,2),E=k(H);wm(E,{size:16}),Rt(),w(H);var U=q(H,2);Ci(U,R=>y(p,R),()=>e(p)),w(C);var O=q(C,2);{var V=R=>{var we=P9(),ce=k(we,!0);w(we),ie(()=>W(ce,e(m))),J(R,we)};ve(O,R=>{e(m)&&R(V)})}var D=q(O,2),$=k(D),F=k($),z=k(F);nb(z,{size:16});var L=q(z);Pt(L),w(F);var Q=q(F,2);Ct(Q,5,()=>e(i),R=>R.id,(R,we)=>{var ce=j9();let Te;var he=k(ce),je=k(he,!0);w(he);var Le=q(he),nt=k(Le,!0);w(Le);var Ae=q(Le,2),Ge=k(Ae,!0);w(Ae),w(ce),ie(ne=>{ce.disabled=e(h),Te=va(ce,1,"voice-tile svelte-19fh7lt",null,Te,{active:e(c)?.id===e(we).id}),W(je,ne),W(nt,(e(we),x(()=>e(we).name))),W(Ge,(e(we),x(()=>e(we).transcript||"No transcript")))},[()=>(e(we),x(()=>e(we).name.slice(0,1).toUpperCase()))]),re("click",ce,()=>_(e(we))),J(R,ce)}),w(Q);var Z=q(Q,2);{var ee=R=>{var we=O9(),ce=k(we);jl(ce,{size:36});var Te=q(ce),he=k(Te,!0);w(Te);var je=q(Te);{var Le=nt=>{var Ae=N9(),Ge=k(Ae);wm(Ge,{size:16}),Rt(),w(Ae),ie(()=>Ae.disabled=e(h)),re("click",Ae,()=>e(p).click()),J(nt,Ae)};ve(je,nt=>{e(g)||nt(Le)})}w(we),ie(()=>W(he,e(g)?"No matching voices":"Your voice collection is empty")),J(R,we)};ve(Z,R=>{e(i),x(()=>!e(i).length)&&R(ee)})}w($);var oe=q($,2),fe=k(oe);{var le=R=>{var we=I9(),ce=ht(we),Te=q(k(ce));Pt(Te),w(ce);var he=q(ce,2);rs(he,{get file(){return e(s)},label:"Voice preview"});var je=q(he,2),Le=q(k(je));rn(Le),w(je);var nt=q(je,2),Ae=k(nt),Ge=k(Ae);HS(Ge,{size:16});var ne=q(Ge,1,!0);w(Ae);var Xe=q(Ae,2),de=k(Xe);Cd(de,{size:16}),w(Xe);var ye=q(Xe,2),ue=k(ye);ho(ue,{size:16}),w(ye),w(nt);var be=q(nt,2),Se=k(be),Ie=k(Se);Ko(Ie,{size:16}),Rt(),w(Se),w(be),ie(()=>{Te.disabled=e(h),Le.disabled=e(h),Ae.disabled=e(h)||!e(n),W(ne,e(n)?"Save voice":"Saved"),Xe.disabled=e(h),ye.disabled=e(h),Se.disabled=e(h)||e(n)}),Ta(Te,()=>e(c).name,$e=>Bt(c,e(c).name=$e)),Ta(Le,()=>e(c).transcript,$e=>Bt(c,e(c).transcript=$e)),re("click",Ae,v),re("click",Xe,M),re("click",ye,T),re("click",Se,S),J(R,we)},ge=R=>{var we=D9(),ce=k(we);ym(ce,{size:32}),Rt(),w(we),J(R,we)};ve(fe,R=>{e(c)?R(le):R(ge,-1)})}return w(oe),w(D),w(B),ie(()=>{W(N,`${e(l),x(()=>e(l).length)??""} saved · This browser`),H.disabled=e(h)}),re("click",H,()=>e(p).click()),re("change",U,R=>b(R.currentTarget.files?.[0])),Ta(L,()=>e(g),R=>y(g,R)),J(a,B),El(t,"canClose",u),Ei(P)}async function Pf(){const[a,t]=await Promise.all([Sm(),Bc()]),i=[],n=t.filter(s=>!a.ui_management||s.configured);for(const s of n){const r=Li.find(o=>o.id===s.id)||Li.find(o=>o.family===s.family&&o.task===s.task);i.push(x0({...r,...s,display_name:r?.display_name||s.id,load_options:void 0},void 0,s.path,s.session_options||{}))}if(a.ui_management){const s=await lb(),r=new Map(s.data.map(o=>[o.id,o]));for(const o of Li.filter(l=>!n.some(c=>c.id===l.id))){const l=(o.install_packages||[]).map(c=>Md(c,r.get(c.id))).filter(c=>r.get(c.id)?.installed&&c.load_target);for(const c of l)i.push(x0(o,c,Tm(c).model_path));if(!l.length){const c=t.find(d=>d.id===o.id&&d.loaded);c&&i.push(x0(o,void 0,c.path,c.session_options))}}}return i}function x0(a,t,i,n={...a.session_options,...t?.session_options}){const s=Jo[a.id]||Jo[a.family]||[],r=Object.fromEntries(s.filter(o=>o.scope!=="session"&&o.default!==void 0&&o.default!==""&&(a.request_options===void 0||a.request_options.includes(o.name))).map(o=>[o.name,o.default]));return{version:1,id:`model:${a.id}:${t?.id||"configured"}`,name:`${a.display_name}${t?` · ${t.label}`:""}`,createdAt:0,model:{id:a.id,display_name:a.display_name,family:t?.load_target?.family??a.family,task:a.task,mode:a.mode,path:i,package_id:t?.id,load_options:{...t?.load_options,...a.load_options},session_options:n},request:{seed:-1,...a.default_voice?{voice:a.default_voice}:{},options:{...a.default_options,...r}},chunking:{enabled:!0,characters:400}}}const S0=Tl(0);function H9(){return new Promise((a,t)=>{const i=indexedDB.open("audiocpp-tts-speakers",1);i.onupgradeneeded=()=>i.result.createObjectStore("speakers",{keyPath:"id"}),i.onsuccess=()=>a(i.result),i.onerror=()=>t(i.error)})}async function jf(a,t){const i=await H9();return new Promise((n,s)=>{const r=i.transaction("speakers",a),o=t(r.objectStore("speakers"));r.oncomplete=()=>{i.close(),n(o.result)},r.onabort=r.onerror=()=>{i.close(),s(r.error||new Error("Could not save the speaker library."))}})}async function T0(){const a=await z9();return(await jf("readwrite",i=>{const n=i.getAll();return n.onsuccess=()=>{const s=n.result,r=new Set(s.map(o=>o.id));for(const o of a){const l=`model-preset:${o.id}`;if(!["tts","clon","vdes"].includes(o.model.task)||r.has(l))continue;const c={id:l,name:o.name,configuration:structuredClone(o),voice:{kind:"builtin",id:o.request.voice||""}};i.add(c),s.push(c),r.add(l)}},n})).filter(i=>!("deleted"in i))}async function T2(a){const t=await jf("readwrite",i=>i.put(a));return S0.update(i=>i+1),t}async function W9(a){a.startsWith("model-preset:")?await jf("readwrite",t=>t.put({id:a,deleted:!0})):await jf("readwrite",t=>t.delete(a)),S0.update(t=>t+1)}function $2(){return{version:2,id:crypto.randomUUID(),title:"Untitled narration",updatedAt:Date.now(),speakers:[],defaultSpeakerId:"",pauseIncrement:.1,source:"",chunks:[],archivedChunks:[],reference:null,speech:null,transcription:null,enhancement:null,split:{method:"paragraph",characters:400},assembly:{pause:.25,sampleRate:24e3},finish:{normalize:!1,peakDb:-1,gainDb:0,format:"wav"},assembled:null,finished:null}}function tu(a,t=null){return{id:crypto.randomUUID(),text:a,speakerId:null,takes:[],takeId:"",override:t,pauseAfter:null}}function ls(a){return a.takes.find(t=>t.id===a.takeId)}function ol(a,t){const i=xo(a,t),n=i?.configuration||t.override||a.speech,s=i?.voice||t.voice;if(!n||s?.kind!=="builtin")return n;const r={...n.request};return s.id?r.voice=s.id:delete r.voice,{...n,request:r}}function Nf(a,t){const i=xo(a,t);return i?i.voice.kind==="reference"?i.voice.data:null:t.voice?.kind==="builtin"?null:t.voice?.kind==="reference"?t.voice.data:a.reference}function Ds(a,t){const i=ol(a,t),n=Nf(a,t);return JSON.stringify([t.text,i?.model,i?.request,n?.id,n?.transcript])}function In(a,t){const i=ls(t);return!!i&&i.signature===Ds(a,t)}function q2(a){return JSON.stringify([a.chunks.map(t=>{const i=[t.id,t.takeId,t.pauseAfter],n=ls(t)?.editing;return n&&(n.silences.length||n.removed?.length)&&(i.push(n.silences),n.removed?.length&&i.push(n.removed)),i}),a.assembly])}function au(a){return a.chunks.length>0&&a.chunks.every(t=>In(a,t))&&a.assembled?.signature===q2(a)}function jc(a){const{format:t,...i}=a.finish;return JSON.stringify([a.assembled?.signature,i,a.enhancement?.model,a.enhancement?.request])}function xo(a,t){const i=t?.speakerId||a.defaultSpeakerId;return a.speakers?.find(n=>n.id===i)}function Hl(a){return a.voice.kind==="reference"?a.voice.data.name:a.voice.id.replace(/^[a-z]{2}_/,"").replace(/_/g," ")||"Model voice"}function C2(a){if(a.speakers){const n=a.version!==2;return a.version=2,n}a.version=2,a.speakers=[],a.defaultSpeakerId="";const t=new Map;function i(n,s,r){const o=JSON.stringify([n.model,n.request,s.kind==="builtin"?s:[s.data.id,s.data.transcript]]),l=t.get(o);if(l)return l;const c={id:crypto.randomUUID(),name:r,configuration:structuredClone(n),voice:structuredClone(s)};return a.speakers.push(c),t.set(o,c.id),c.id}a.speech&&(a.defaultSpeakerId=i(a.speech,a.reference?{kind:"reference",data:a.reference}:{kind:"builtin",id:a.speech.request.voice||""},"Main speaker"));for(const n of[...a.chunks,...a.archivedChunks]){if(!n.override&&!n.voice)continue;const s=n.override||a.speech;if(!s)continue;const r=n.voice||(a.reference?{kind:"reference",data:a.reference}:{kind:"builtin",id:s.request.voice||""});n.speakerId=i(s,r,`Speaker ${a.speakers.length+1}`)}return!0}class iu{constructor(t,i){if(this.signal=i,t.version!==1)throw new Error("Unsupported model configuration version.");this.configuration=structuredClone(t);const n=t.request.seed;if(!Number.isInteger(n)||n<-1||n>4294967295)throw new Error("Seed must be -1 or an unsigned 32-bit integer.");this.resolvedSeed=n===-1?crypto.getRandomValues(new Uint32Array(1))[0]:n}signal;configuration;resolvedSeed;prepared=!1;async prepare(){if(this.prepared)return;this.signal.throwIfAborted();const t=await Sm(),i=await Bc();this.signal.throwIfAborted();const n=this.configuration.model,s=i.find(r=>r.id===n.id);if(!t.ui_management||s?.configured){if(!s||s.family!==n.family||s.task!==n.task||s.mode!==n.mode)throw new Error("This model configuration does not match a model registered by this configured server.");if(s.path!==n.path||Object.entries(n.session_options).some(([r,o])=>s.session_options?.[r]!==o))throw new Error("The model configuration differs from the server configuration. Update the server configuration before using it.");if(Object.keys(n.load_options).length)throw new Error("Saved load options cannot be applied to a server-configured model. Use a model managed by the UI.")}else{if(!(await ob(n.path)).exists)throw new Error("The model is not installed at its saved path. Install it in Models first.");this.signal.throwIfAborted(),s?.loaded&&await _o(n.id,this.signal),this.signal.throwIfAborted(),await df({id:n.id,family:n.family,task:n.task,mode:n.mode,path:n.path,load_options:n.load_options,session_options:n.session_options},this.signal)}this.signal.throwIfAborted(),this.prepared=!0}async run(t,i=0){await this.prepare(),this.signal.throwIfAborted();const{model:n,request:s}=this.configuration,{seed:r,...o}=s,l={...s.options};if(["tts","clon","vdes"].includes(n.task)){if(!t.text?.trim())throw new Error("Enter text to synthesize.");const h={...o,options:l,model:n.id,input:t.text,response_format:"wav",seed:(this.resolvedSeed+i)%4294967296};return t.voice_ref&&(delete h.voice,h.voice_ref=t.voice_ref),t.reference_text&&(h.reference_text=t.reference_text),{kind:"audio",blob:(await ff(h,this.signal)).blob}}if(n.task==="asr"){if(!t.audio)throw new Error("Choose audio to transcribe.");const h=["owsm","crisperwhisper"].includes(n.family)&&l.return_timestamps===!0;return{kind:"json",data:await pf({model:n.id,audio:t.audio,language:s.language,text:t.text||"",options:l},this.signal,h)}}const c=await Nl({model:n.id,request:{...o,...t,options:l,seed:(this.resolvedSeed+i)%4294967296}},this.signal);if(typeof c.audio!="string")throw new Error("The processing model did not return a single audio output.");const d=atob(c.audio),g=Uint8Array.from(d,h=>h.charCodeAt(0));return{kind:"audio",blob:new Blob([g],{type:"audio/wav"})}}}var $0=ae(""),Q9=ae(''),K9=ae(''),Y9=ae(''),J9=ae(''),X9=ae(''),Z9=ae(''),eM=ae('
        Request options JSON
        ',1),tM=ae('
        ',1),aM=ae('

        Install a compatible model from Models.

        '),iM=ae(''),nM=ae('
        ');function nu(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y();let l=xe(t,"label",8),c=xe(t,"emptyLabel",8,"Choose an installed model"),d=xe(t,"inherit",8,null),g=xe(t,"choices",8),h=xe(t,"tasks",8),m=xe(t,"families",8,void 0),p=xe(t,"value",12),u=xe(t,"disabled",8,!1),f=xe(t,"settingsLabel",8,"More generation options"),_=xe(t,"onchange",8),b=Y(""),v=Y(""),T=Y(!1);function S(Z){p(Z?structuredClone(e(i).find(ee=>ee.id===Z)):null),y(v,""),y(T,!1),_()("model")}function M(Z,ee){e(s)&&(p()||p(structuredClone(e(s))),p({...p(),request:{...p().request,[Z]:ee}}),_()())}function P(Z,ee){e(s)&&(p()||p(structuredClone(e(s))),p({...p(),request:{...p().request,options:{...e(s).request.options,[Z]:ee}}}),_()())}Ee(()=>(K(g()),K(h()),K(m())),()=>{y(i,g().filter(Z=>h().includes(Z.model.task)&&Z.model.mode==="offline"&&(!m()||m().includes(Z.model.family))))}),Ee(()=>e(i),()=>{y(n,e(i))}),Ee(()=>(K(p()),K(d())),()=>{y(s,p()||d())}),Ee(()=>(e(s),Li),()=>{y(r,e(s)&&(Li.find(Z=>Z.id===e(s).model.id)||Li.find(Z=>Z.family===e(s).model.family&&Z.task===e(s).model.task)))}),Ee(()=>(e(s),e(r)),()=>{y(o,e(s)?(Jo[e(s).model.id]||Jo[e(s).model.family]||[]).filter(Z=>Z.scope!=="session"&&["number","slider","bool","choice"].includes(Z.type)&&(e(r)?.request_options===void 0||e(r).request_options.includes(Z.name))):[])}),kn(),Xi();var B=nM(),C=k(B),j=k(C,!0),G=q(j),A=k(G),N=k(A,!0);w(A),A.value=A.__value="";var H=q(A);{var E=Z=>{var ee=$0(),oe=k(ee);w(ee);var fe={};ie(()=>{W(oe,`${K(p()),x(()=>p().model.display_name)??""} · saved settings`),fe!==(fe=(K(p()),x(()=>p().id)))&&(ee.value=(ee.__value=(K(p()),x(()=>p().id)))??"")}),J(Z,ee)},U=La(()=>(K(p()),e(i),x(()=>p()&&!e(i).some(Z=>Z.id===p().id))));ve(H,Z=>{e(U)&&Z(E)})}var O=q(H);{var V=Z=>{var ee=Q9();Ct(ee,5,()=>e(n),Kt,(oe,fe)=>{var le=$0(),ge=k(le,!0);w(le);var R={};ie(()=>{W(ge,(e(fe),x(()=>e(fe).name))),R!==(R=(e(fe),x(()=>e(fe).id)))&&(le.value=(le.__value=(e(fe),x(()=>e(fe).id)))??"")}),J(oe,le)}),w(ee),J(Z,ee)};ve(O,Z=>{e(n),x(()=>e(n).length)&&Z(V)})}w(G);var D;On(G),w(C);var $=q(C,2);{var F=Z=>{var ee=tM(),oe=ht(ee),fe=k(oe),le=k(fe,!0);w(fe);var ge=q(fe),R=k(ge,!0);w(ge),w(oe);var we=q(oe,2);{var ce=Te=>{var he=eM(),je=ht(he),Le=k(je);{var nt=be=>{var Se=K9(),Ie=q(k(Se));Pt(Ie),w(Se),ie(()=>{_e(Ie,"aria-label",`${l()} seed`),bi(Ie,(e(s),x(()=>e(s).request.seed))),Ie.disabled=u()}),re("change",Ie,$e=>M("seed",$e.currentTarget.valueAsNumber)),J(be,Se)},Ae=La(()=>(e(s),x(()=>["tts","clon","vdes"].includes(e(s).model.task))));ve(Le,be=>{e(Ae)&&be(nt)})}var Ge=q(Le,2),ne=q(k(Ge));Pt(ne),w(Ge);var Xe=q(Ge,2);Ct(Xe,1,()=>e(o),Kt,(be,Se)=>{var Ie=Z9(),$e=k(Ie),ze=q($e);{var Fe=st=>{var Ne=Y9();Pt(Ne),ie(He=>{zl(Ne,He),Ne.disabled=u()},[()=>(e(s),e(Se),x(()=>!!(e(s).request.options[e(Se).name]??e(Se).default)))]),re("change",Ne,He=>P(e(Se).name,He.currentTarget.checked)),J(st,Ne)},qe=st=>{var Ne=J9();Ct(Ne,5,()=>(e(Se),x(()=>e(Se).choices||[])),Kt,(Be,Ue)=>{var tt=$0(),Re=k(tt,!0);w(tt);var Ve={};ie(()=>{W(Re,e(Ue)),Ve!==(Ve=e(Ue))&&(tt.value=(tt.__value=e(Ue))??"")}),J(Be,tt)}),w(Ne);var He;On(Ne),ie(Be=>{Ne.disabled=u(),He!==(He=Be)&&(Ne.value=(Ne.__value=Be)??"",xn(Ne,Be))},[()=>(e(s),e(Se),x(()=>String(e(s).request.options[e(Se).name]??e(Se).default)))]),re("change",Ne,Be=>P(e(Se).name,Be.currentTarget.value)),J(st,Ne)},it=st=>{var Ne=X9();Pt(Ne),ie(He=>{_e(Ne,"min",(e(Se),x(()=>e(Se).minimum))),_e(Ne,"max",(e(Se),x(()=>e(Se).maximum))),_e(Ne,"step",(e(Se),x(()=>e(Se).step||"any"))),bi(Ne,He),Ne.disabled=u()},[()=>(e(s),e(Se),x(()=>Number(e(s).request.options[e(Se).name]??e(Se).default)))]),re("change",Ne,He=>P(e(Se).name,He.currentTarget.valueAsNumber)),J(st,Ne)};ve(ze,st=>{e(Se),x(()=>e(Se).type==="bool")?st(Fe):(e(Se),x(()=>e(Se).type==="choice")?st(qe,1):st(it,-1))})}w(Ie),ie(()=>W($e,`${e(Se),x(()=>e(Se).label||e(Se).name)??""} `)),J(be,Ie)}),w(je);var de=q(je,2),ye=q(k(de));rn(ye);var ue=q(ye);w(de),ie(()=>{_e(ne,"aria-label",`${l()} language`),bi(ne,(e(s),x(()=>e(s).request.language||""))),ne.disabled=u(),_e(ye,"aria-label",`${l()} options JSON`),ye.disabled=u(),ue.disabled=u()}),re("change",ne,be=>M("language",be.currentTarget.value)),Ta(ye,()=>e(b),be=>y(b,be)),re("click",ue,()=>{try{const be=JSON.parse(e(b));if(!be||typeof be!="object"||Array.isArray(be))throw new Error("Options must be a JSON object.");p({...e(s),request:{...e(s).request,options:be}}),y(v,""),_()()}catch(be){y(v,String(be))}}),re("toggle",de,be=>{be.currentTarget.open&&y(b,JSON.stringify(e(s).request.options,null,2))}),J(Te,he)};ve(we,Te=>{e(T)&&Te(ce)})}ie(Te=>{W(le,(K(p()),e(s),x(()=>p()?e(s).model.display_name:"Uses the project default"))),ge.disabled=u(),_e(ge,"aria-expanded",e(T)),W(R,Te)},[()=>(e(T),K(f()),x(()=>e(T)?`Hide ${f().toLowerCase()}`:f()))]),re("click",ge,()=>{y(T,!e(T)),y(b,JSON.stringify(e(s).request.options,null,2))}),J(Z,ee)},z=Z=>{var ee=aM();J(Z,ee)};ve($,Z=>{e(s)?Z(F):(e(i),x(()=>!e(i).length)&&Z(z,1))})}var L=q($,2);{var Q=Z=>{var ee=iM(),oe=k(ee,!0);w(ee),ie(()=>W(oe,e(v))),J(Z,ee)};ve(L,Z=>{e(v)&&Z(Q)})}w(B),ie(()=>{W(j,l()),_e(G,"aria-label",l()),G.disabled=u(),W(N,c()),D!==(D=(K(p()),x(()=>p()?.id||"")))&&(G.value=(G.__value=(K(p()),x(()=>p()?.id||"")))??"",xn(G,(K(p()),x(()=>p()?.id||""))))}),re("change",G,Z=>S(Z.currentTarget.value)),J(a,B),Ei()}var Nc=ae(""),sM=ae(''),rM=ae(''),oM=ae('

        Choose a speech model first.

        '),lM=ae('

        '),cM=ae(''),dM=ae(''),uM=ae('
        Fill transcript using a recognition model
        ',1),fM=ae(''),pM=ae(`
        `);function mM(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y();let l=xe(t,"label",8),c=xe(t,"configuration",8),d=xe(t,"assignment",8),g=xe(t,"inheritedReference",8,null),h=xe(t,"allowInherit",8,!1),m=xe(t,"voices",8),p=xe(t,"choices",8),u=xe(t,"transcription",12),f=xe(t,"disabled",8,!1),_=xe(t,"onchange",8),b=xe(t,"onbusy",8),v=xe(t,"ontranscribe",8),T=xe(t,"onconfiguration",8),S=Y(""),M=Y(""),P=Y();ur(()=>{e(M)&&URL.revokeObjectURL(e(M))});function B(Ae){if(y(S,""),Ae==="inherit"){_()(void 0);return}if(Ae.startsWith("builtin:")){_()({kind:"builtin",id:Ae.slice(8)});return}const Ge=m().find(ne=>ne.id===Ae);Ge&&_()({kind:"reference",data:{id:crypto.randomUUID(),name:Ge.name,audio:Ge.audio,transcript:Ge.transcript}})}async function C(Ae){if(Ae){b()(!0),y(S,"");try{const Ge=await Fr(Ae);_()({kind:"reference",data:{id:crypto.randomUUID(),name:Ae.name,audio:Ge,transcript:""}})}catch(Ge){y(S,String(Ge))}finally{b()(!1)}}}Ee(()=>(K(d()),K(g())),()=>{y(r,d()?.kind==="reference"?d().data:d()?.kind==="builtin"?null:g())}),Ee(()=>(e(r),e(P),e(M)),()=>{e(r)?.audio!==e(P)&&(e(M)&&URL.revokeObjectURL(e(M)),y(P,e(r)?.audio),y(M,e(P)?URL.createObjectURL(e(P)):""))}),Ee(()=>(K(c()),Li),()=>{y(i,c()&&(Li.find(Ae=>Ae.id===c().model.id)||Li.find(Ae=>Ae.family===c().model.family&&Ae.task===c().model.task)))}),Ee(()=>e(i),()=>{y(n,e(i)?.builtin_voices||[])}),Ee(()=>(K(c()),Yo),()=>{y(s,!!c()&&(c().model.task==="clon"||Yo[c().model.family]?.includes("speaker_reference")))}),Ee(()=>(K(d()),K(h()),K(c())),()=>{y(o,d()?.kind==="reference"?"reference":d()?.kind==="builtin"?`builtin:${d().id}`:h()?"inherit":`builtin:${c()?.request.voice||""}`)}),kn(),Xi();var j=pM(),G=k(j),A=k(G),N=q(A),H=k(N);{var E=Ae=>{var Ge=Nc(),ne=k(Ge);w(Ge),Ge.value=Ge.__value="inherit",ie(()=>W(ne,`Use default · ${K(g()),K(c()),x(()=>g()?.name||c()?.request.voice||"model default")??""}`)),J(Ae,Ge)};ve(H,Ae=>{h()&&Ae(E)})}var U=q(H);{var O=Ae=>{var Ge=Nc(),ne=k(Ge);w(Ge),Ge.value=Ge.__value="reference",ie(()=>W(ne,`Recording: ${e(r),x(()=>e(r).name)??""}`)),J(Ae,Ge)};ve(U,Ae=>{e(r)&&Ae(O)})}var V=q(U);V.value=V.__value="builtin:";var D=q(V);{var $=Ae=>{var Ge=Nc(),ne=k(Ge);w(Ge);var Xe={};ie(()=>{W(ne,`${K(c()),x(()=>c().request.voice)??""} · saved setting`),Xe!==(Xe=(K(c()),x(()=>`builtin:${c().request.voice}`)))&&(Ge.value=(Ge.__value=(K(c()),x(()=>`builtin:${c().request.voice}`)))??"")}),J(Ae,Ge)},F=La(()=>(K(c()),e(n),x(()=>c()?.request.voice&&!e(n).includes(c().request.voice))));ve(D,Ae=>{e(F)&&Ae($)})}var z=q(D);{var L=Ae=>{var Ge=sM();Ct(Ge,5,()=>e(n),Kt,(ne,Xe)=>{var de=Nc(),ye=k(de);w(de);var ue={};ie(be=>{W(ye,`${be??""} · ${e(Xe)??""}`),ue!==(ue=`builtin:${e(Xe)}`)&&(de.value=de.__value=`builtin:${e(Xe)}`)},[()=>(e(Xe),x(()=>e(Xe).includes("_")?e(Xe).slice(e(Xe).indexOf("_")+1).replace(/_/g," "):e(Xe)))]),J(ne,de)}),w(Ge),J(Ae,Ge)};ve(z,Ae=>{e(n),x(()=>e(n).length)&&Ae(L)})}var Q=q(z);{var Z=Ae=>{var Ge=rM();Ct(Ge,5,m,Kt,(ne,Xe)=>{var de=Nc(),ye=k(de,!0);w(de);var ue={};ie(()=>{W(ye,(e(Xe),x(()=>e(Xe).name))),ue!==(ue=(e(Xe),x(()=>e(Xe).id)))&&(de.value=(de.__value=(e(Xe),x(()=>e(Xe).id)))??"")}),J(ne,de)}),w(Ge),J(Ae,Ge)};ve(Q,Ae=>{e(s),K(m()),x(()=>e(s)&&m().length)&&Ae(Z)})}var ee=q(Q);{var oe=Ae=>{var Ge=Nc(),ne=k(Ge);w(Ge);var Xe={};ie(()=>{W(ne,`${K(d()),x(()=>d().id)??""} · saved in project`),Xe!==(Xe=(K(d()),x(()=>`builtin:${d().id}`)))&&(Ge.value=(Ge.__value=(K(d()),x(()=>`builtin:${d().id}`)))??"")}),J(Ae,Ge)},fe=La(()=>(K(d()),e(n),K(c()),x(()=>d()?.kind==="builtin"&&d().id&&!e(n).includes(d().id)&&c()?.request.voice!==d().id)));ve(ee,Ae=>{e(fe)&&Ae(oe)})}w(N);var le;On(N),w(G);var ge=q(G,2);{var R=Ae=>{var Ge=oM();J(Ae,Ge)},we=Ae=>{var Ge=lM(),ne=k(Ge,!0);w(Ge),ie(()=>W(ne,(K(d()),K(c()),x(()=>d()?.kind==="builtin"?`Voice: ${d().id||"model default"}`:`Current voice: ${c().request.voice||"model default"}`)))),J(Ae,Ge)};ve(ge,Ae=>{c()?e(r)||Ae(we,1):Ae(R)})}var ce=q(ge,2);{var Te=Ae=>{var Ge=cM(),ne=q(k(Ge));w(Ge),ie(()=>ne.disabled=f()),re("change",ne,Xe=>C(Xe.currentTarget.files?.[0])),J(Ae,Ge)};ve(ce,Ae=>{e(s)&&Ae(Te)})}var he=q(ce,2);{var je=Ae=>{var Ge=uM(),ne=ht(Ge);{var Xe=$e=>{var ze=dM();J($e,ze)};ve(ne,$e=>{e(s)||$e(Xe)})}var de=q(ne,2),ye=q(de,2),ue=q(k(ye));rn(ue),w(ye);var be=q(ye,2),Se=q(k(be));{let $e=Lt(()=>`${l()} recognition model`);nu(Se,{get label(){return e($e)},get choices(){return p()},tasks:["asr"],get disabled(){return f()},get onchange(){return T()},get value(){return u()},set value(ze){u(ze)},$$legacy:!0})}var Ie=q(Se);w(be),ie(()=>{_e(de,"src",e(M)),_e(ue,"aria-label",`${l()} transcript`),bi(ue,(e(r),x(()=>e(r).transcript))),ue.disabled=f(),Ie.disabled=f()||!u()}),re("play",de,$e=>document.querySelectorAll(".tts-app audio").forEach(ze=>{ze!==$e.currentTarget&&ze.pause()})),re("input",ue,$e=>_()({kind:"reference",data:{...e(r),transcript:$e.currentTarget.value}})),re("click",Ie,function(...$e){v()?.apply(this,$e)}),J(Ae,Ge)};ve(he,Ae=>{e(r)&&Ae(je)})}var Le=q(he,2);{var nt=Ae=>{var Ge=fM(),ne=k(Ge,!0);w(Ge),ie(()=>W(ne,e(S))),J(Ae,Ge)};ve(Le,Ae=>{e(S)&&Ae(nt)})}w(j),ie(()=>{W(A,`${l()??""} `),_e(N,"aria-label",l()),N.disabled=f()||!c(),le!==(le=e(o))&&(N.value=(N.__value=e(o))??"",xn(N,e(o)))}),re("change",N,Ae=>B(Ae.currentTarget.value)),J(a,j),Ei()}var gM=ae(""),hM=ae(''),_M=ae(''),vM=ae('

        A speaker preset saves the model, voice, and generation settings together.

        Saved as a speaker preset for future projects.
        ');function A2(a,t){zi(t,!1);let i=xe(t,"initial",8,null),n=xe(t,"saved",24,()=>[]),s=xe(t,"choices",8),r=xe(t,"voices",8),o=xe(t,"number",8,1),l=xe(t,"presetEditor",8,!1),c=xe(t,"onsave",8),d=xe(t,"onclose",8),g=xe(t,"onbusy",8),h=Y(i()?.name||`Speaker ${o()}`),m=Y(i()?structuredClone(i().configuration):null),p=Y(i()?structuredClone(i().voice):{kind:"builtin",id:""}),u=Y(null),f=Y(""),_=Y(!1),b=Y(""),v=Y(),T=Y(null);function S(R){y(f,R),y(b,"");const we=n().find(ce=>ce.id===R);y(h,we?.name||`Speaker ${o()}`),y(m,we?structuredClone(we.configuration):null),y(p,we?structuredClone(we.voice):{kind:"builtin",id:""})}function M(R){y(_,R),g()(R)}async function P(){if(e(p)?.kind!=="reference"||!e(u)||e(_))return;const R=e(p).data;M(!0),y(b,""),y(T,new AbortController);try{const we=new iu(e(u),e(T).signal),ce=await gr(R.audio,e(T).signal),Te=await we.run({audio:ce});if(Te.kind!=="json"||typeof Te.data.text!="string")throw new Error("The model did not return a transcript.");y(p,{kind:"reference",data:{...R,transcript:Te.data.text}})}catch(we){y(b,e(T)?.signal.aborted?"":String(we))}finally{y(T,null),M(!1)}}async function B(){if(!(!e(h).trim()||!e(m)||!e(p)||e(_))){M(!0),y(b,"");try{await c()({id:i()?.id||e(f)||crypto.randomUUID(),name:e(h).trim(),configuration:structuredClone(e(m)),voice:structuredClone(e(p))}),d()()}catch(R){y(b,`Could not save speaker: ${String(R)}`)}finally{M(!1)}}}Kn(()=>e(v).showModal()),ur(()=>{e(T)?.abort(),g()(!1)}),Xi();var C=vM(),j=k(C),G=k(j),A=k(G);Gd(A,{size:20}),w(G);var N=q(G,2),H=k(N),E=k(H,!0);w(H),Rt(2),w(N);var U=q(N,2),O=k(U);rb(O,{size:18}),w(U),w(j);var V=q(j,2),D=k(V);{var $=R=>{var we=hM(),ce=q(k(we)),Te=k(ce);Te.value=Te.__value="";var he=q(Te);Ct(he,1,n,Kt,(Le,nt)=>{var Ae=gM(),Ge=k(Ae,!0);w(Ae);var ne={};ie(()=>{W(Ge,(e(nt),x(()=>e(nt).name))),ne!==(ne=(e(nt),x(()=>e(nt).id)))&&(Ae.value=(Ae.__value=(e(nt),x(()=>e(nt).id)))??"")}),J(Le,Ae)}),w(ce);var je;On(ce),w(we),ie(()=>{ce.disabled=e(_),je!==(je=e(f))&&(ce.value=(ce.__value=e(f))??"",xn(ce,e(f)))}),re("change",ce,Le=>S(Le.currentTarget.value)),J(R,we)};ve(D,R=>{K(i()),K(n()),x(()=>!i()&&n().length)&&R($)})}var F=q(D,2),z=q(k(F));Pt(z),w(F);var L=q(F,2);nu(L,{label:"Speech model",emptyLabel:"Choose an installed speech model",settingsLabel:"Model settings",get choices(){return s()},tasks:["tts","clon","vdes"],get disabled(){return e(_)},onchange:R=>{R==="model"&&y(p,{kind:"builtin",id:e(m)?.request.voice||""})},get value(){return e(m)},set value(R){y(m,R)},$$legacy:!0});var Q=q(L,2);mM(Q,{label:"Speaker voice",get configuration(){return e(m)},get assignment(){return e(p)},get voices(){return r()},get choices(){return s()},get disabled(){return e(_)},onchange:R=>y(p,R),onbusy:M,ontranscribe:P,onconfiguration:()=>{},get transcription(){return e(u)},set transcription(R){y(u,R)},$$legacy:!0});var Z=q(Q,2);{var ee=R=>{var we=_M(),ce=k(we,!0);w(we),ie(()=>W(ce,e(b))),J(R,we)};ve(Z,R=>{e(b)&&R(ee)})}w(V);var oe=q(V,2),fe=q(k(oe)),le=q(fe),ge=k(le,!0);w(le),w(oe),w(C),Ci(C,R=>y(v,R),()=>e(v)),ie(R=>{W(E,l()?i()?"Edit speaker preset":"New speaker preset":i()?"Edit speaker":"Add a speaker"),U.disabled=e(_),z.disabled=e(_),fe.disabled=e(_),le.disabled=R,W(ge,e(_)?"Working…":l()?"Save preset":i()?"Save speaker":"Add speaker")},[()=>(e(_),e(h),e(m),e(p),x(()=>e(_)||!e(h).trim()||!e(m)||!e(p)))]),re("click",U,function(...R){d()?.apply(this,R)}),Ta(z,()=>e(h),R=>y(h,R)),re("click",fe,function(...R){d()?.apply(this,R)}),re("click",le,B),re("cancel",C,R=>{R.target===R.currentTarget&&(e(_)?(R.preventDefault(),e(T)?.abort()):d()())}),J(a,C),Ei()}var bM=ae(''),yM=ae('

        Loading speaker presets…

        '),wM=ae(''),kM=ae('

        '),xM=ae('

        Model
        Voice
        Voice source
        Seed
        Language
        ',1),SM=ae('

        Select a speaker to see its settings.

        '),TM=ae('
        '),$M=ae('

        Speakers

        Manage speaker presets here, then choose them in Text to speech. Existing projects keep their own speaker settings.

        ',1);function qM(a,t){zi(t,!1);const i=Y(),n=Y();let s=Y([]),r=Y([]),o=Y([]),l=Y(""),c=Y(""),d=Y(null),g=Y(!1),h=Y(!1),m=Y(!0),p=Y("");function u(){return!e(h)&&!e(g)}async function f(){y(s,await T0())}function _(F){y(d,F?structuredClone(F):null),y(g,!0),y(p,"")}async function b(F){await T2(F),await f(),y(c,F.id),y(l,"")}async function v(){if(!(!e(n)||e(h))){y(h,!0),y(p,"");try{const F=`${e(n).name} copy`;let z=F;for(let L=2;e(s).some(Q=>Q.name===z);L++)z=`${F} ${L}`;await b({...structuredClone(e(n)),id:crypto.randomUUID(),name:z})}catch(F){y(p,`Could not duplicate speaker: ${String(F)}`)}finally{y(h,!1)}}}async function T(){if(!(!e(n)||e(h)||!confirm(`Delete speaker preset "${e(n).name}"? Existing projects keep their own copy.`))){y(h,!0),y(p,"");try{await W9(e(n).id),await f(),y(c,"")}catch(F){y(p,`Could not delete speaker: ${String(F)}`)}finally{y(h,!1)}}}Kn(async()=>{try{const[F,z,L]=await Promise.all([T0(),Pf().catch(Q=>(y(p,`Models are unavailable. Saved speakers can still be edited. ${String(Q)}`),[])),eu()]);y(s,F),y(r,z),y(o,L)}catch(F){y(p,`Could not open speaker presets: ${String(F)}`)}finally{y(m,!1)}}),Ee(()=>(e(s),e(l)),()=>{y(i,e(s).filter(F=>`${F.name} ${F.configuration.model.display_name} ${Hl(F)}`.toLowerCase().includes(e(l).toLowerCase())))}),Ee(()=>(e(s),e(c)),()=>{y(n,e(s).find(F=>F.id===e(c)))}),kn();var S={canClose:u};Xi();var M=$M(),P=ht(M),B=k(P),C=k(B),j=q(k(C)),G=k(j);w(j),w(C);var A=q(C,2),N=k(A);Ir(N,{size:16}),Rt(),w(A),w(B);var H=q(B,4);{var E=F=>{var z=bM(),L=k(z,!0);w(z),ie(()=>W(L,e(p))),J(F,z)};ve(H,F=>{e(p)&&F(E)})}var U=q(H,2);{var O=F=>{var z=yM();J(F,z)},V=F=>{var z=TM(),L=k(z),Q=k(L),Z=k(Q);nb(Z,{size:16});var ee=q(Z);Pt(ee),w(Q);var oe=q(Q,2);Ct(oe,5,()=>e(i),Te=>Te.id,(Te,he)=>{var je=wM();let Le;var nt=k(je),Ae=k(nt);Gd(Ae,{size:20}),w(nt);var Ge=q(nt),ne=k(Ge,!0);w(Ge);var Xe=q(Ge,2),de=k(Xe,!0);w(Xe);var ye=q(Xe),ue=k(ye,!0);w(ye),w(je),ie(be=>{Le=va(je,1,"speaker-tile svelte-1rz8r6m",null,Le,{active:e(c)===e(he).id}),_e(je,"aria-pressed",(e(c),e(he),x(()=>e(c)===e(he).id))),_e(je,"aria-label",(e(he),x(()=>`Select ${e(he).name}`))),je.disabled=e(h),W(ne,(e(he),x(()=>e(he).name))),W(de,be),W(ue,(e(he),x(()=>e(he).configuration.model.display_name)))},[()=>(K(Hl),e(he),x(()=>Hl(e(he))))]),re("click",je,()=>y(c,e(he).id)),J(Te,je)}),w(oe);var fe=q(oe,2);{var le=Te=>{var he=kM(),je=k(he);Gd(je,{size:32});var Le=q(je),nt=k(Le,!0);w(Le);var Ae=q(Le),Ge=k(Ae,!0);w(Ae),w(he),ie(()=>{W(nt,e(l)?"No matching speakers":"Create your first speaker preset"),W(Ge,e(l)?"Try a different name, voice, or model.":"Save a model, voice, and generation settings once, then reuse them in your TTS projects.")}),J(Te,he)};ve(fe,Te=>{e(i),x(()=>!e(i).length)&&Te(le)})}w(L);var ge=q(L,2),R=k(ge);{var we=Te=>{var he=xM(),je=ht(he),Le=k(je,!0);w(je);var nt=q(je,2),Ae=q(k(nt)),Ge=k(Ae,!0);w(Ae);var ne=q(Ae,2),Xe=k(ne,!0);w(ne);var de=q(ne,2),ye=k(de,!0);w(de);var ue=q(de,2),be=k(ue,!0);w(ue);var Se=q(ue,2),Ie=k(Se,!0);w(Se),w(nt);var $e=q(nt,2),ze=k($e),Fe=k(ze);tb(Fe,{size:15}),Rt(),w(ze);var qe=q(ze),it=k(qe);hS(it,{size:15}),Rt(),w(qe);var st=q(qe),Ne=k(st);ho(Ne,{size:15}),Rt(),w(st),w($e),ie(He=>{W(Le,(e(n),x(()=>e(n).name))),W(Ge,(e(n),x(()=>e(n).configuration.model.display_name))),W(Xe,He),W(ye,(e(n),x(()=>e(n).voice.kind==="reference"?"Reference recording":"Built-in voice"))),W(be,(e(n),x(()=>e(n).configuration.request.seed===-1?"Random":e(n).configuration.request.seed))),W(Ie,(e(n),x(()=>e(n).configuration.request.language||"Model default"))),ze.disabled=e(h),qe.disabled=e(h),st.disabled=e(h)},[()=>(K(Hl),e(n),x(()=>Hl(e(n))))]),re("click",ze,()=>_(e(n))),re("click",qe,v),re("click",st,T),J(Te,he)},ce=Te=>{var he=SM(),je=k(he);Gd(je,{size:28}),Rt(),w(he),J(Te,he)};ve(R,Te=>{e(n)?Te(we):Te(ce,-1)})}w(ge),w(z),Ta(ee,()=>e(l),Te=>y(l,Te)),J(F,z)};ve(U,F=>{e(m)?F(O):F(V,-1)})}w(P);var D=q(P,2);{var $=F=>{{let z=Lt(()=>(e(s),x(()=>e(s).length+1)));A2(F,{get initial(){return e(d)},get choices(){return e(r)},get voices(){return e(o)},get number(){return e(z)},onsave:b,onclose:()=>y(g,!1),onbusy:L=>y(h,L),presetEditor:!0})}};ve(D,F=>{e(g)&&F($)})}return ie(()=>{W(G,`${e(s),x(()=>e(s).length)??""} saved · Model, voice, and settings together`),A.disabled=e(h)||e(m)}),re("click",A,()=>_(null)),J(a,M),El(t,"canClose",u),Ei(S)}var CM=ae(' ',1);function AM(a,t){zi(t,!1);let i=xe(t,"onchange",8),n=xe(t,"ontext",8),s=Y("voices"),r=Y(null),o=Y(null);function l(){return e(s)==="voices"?e(r)?.canClose()??!0:e(o)?.canClose()??!0}function c(M){e(s)!==M&&l()&&y(s,M)}var d={canClose:l},g=CM(),h=ht(g),m=k(h);let p;var u=k(m);jl(u,{size:16}),Rt(),w(m);var f=q(m,2);let _;var b=k(f);Gd(b,{size:16}),Rt(),w(f),w(h);var v=q(h,2);{var T=M=>{Ci(V9(M,{get onchange(){return i()},get ontext(){return n()},$$legacy:!0}),P=>y(r,P),()=>e(r))},S=M=>{Ci(qM(M,{$$legacy:!0}),P=>y(o,P),()=>e(o))};ve(v,M=>{e(s)==="voices"?M(T):M(S,-1)})}return ie(()=>{_e(m,"aria-pressed",e(s)==="voices"),p=va(m,1,"svelte-inevtl",null,p,{active:e(s)==="voices"}),_e(f,"aria-pressed",e(s)==="speakers"),_=va(f,1,"svelte-inevtl",null,_,{active:e(s)==="speakers"})}),re("click",m,()=>c("voices")),re("click",f,()=>c("speakers")),J(a,g),El(t,"canClose",l),Ei(d)}var Of=ae(""),su=ae(""),GM=ae("
        "),FM=ae(""),MM=ae(""),zM=ae(' ',1),EM=ae('
        '),UM=ae('
        '),RM=ae(''),BM=ae('
        '),PM=ae('
        '),jM=ae(' ',1),NM=ae(' ',1),OM=ae(' ',1),ru=ae(" "),IM=ae(''),DM=ae(''),LM=ae(''),VM=ae('
        '),HM=ae('
        '),WM=ae(''),QM=ae(''),KM=ae('
        '),G2=ae(" "),YM=ae('
        '),JM=ae(' ',1),XM=ae(' ',1),ZM=ae(''),ez=ae(''),tz=ae('
        '),az=ae('
        '),iz=ae('
        '),nz=ae('
        '),F2=ae(" ",1),sz=ae('
        '),rz=ae('
        '),oz=ae(' ',1),lz=ae(' ',1),cz=ae('
        '),dz=ae(' ',1),uz=ae('
        '),fz=ae('
        '),pz=ae(' ',1),mz=ae('
        '),gz=ae(''),hz=ae(""),_z=ae('
        '),vz=ae(""),bz=ae("
        "),yz=ae('
        '),wz=ae('
        JSON
        '),kz=ae(' '),xz=ae('

        ',1),Sz=ae('

        ',1),Tz=ae(' '),$z=ae(' '),qz=ae(''),M2=ae('
        '),Cz=ae(""),Az=ae('
        ∿

        '),Gz=ae(''),Fz=ae('
        Response JSON
         
        '),Mz=ae(''),zz=ae('
      1. '),Ez=ae('
          '),Uz=ae('

          ',1),Rz=ae('

           
          ',1),Bz=ae('
          '),Pz=ae('
          '),z2=ae('
          '),jz=ae(''),Nz=ae('
          '),Oz=ae('
          '),Iz=ae('
          A
          audio.cpp
          audio.cpp native WebUI
          ',1);function Dz(a,t){zi(t,!1);const i=()=>zu(Rf,"$uiConfiguration",n),[n,s]=vp(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y(),g=Y(),h=Y(),m=Y(),p=Y(),u=Y(),f=Y(),_=Y(),b=Y(),v=Y(),T=Y(),S=Y(),M=Y(),P=Y(),B=Y(),C=Y(),j=Y(),G=Y(),A=Y(),N=Y(),H=Y(),E=Y(),U=Y(),O=Y(),V=Y(),D=Y(),$=Y(),F=Y(),z=Y(),L=Y(),Q=Y();let Z=Y("studio"),ee=Y(null),oe=Y(null),fe=Y(!1),le=Y(null),ge=Y(Li[0]?.id||""),R=Y(Li[0]),we=Y(e(R)?.path||""),ce=Y(!1),Te=Y([]),he=Y(null),je=Y(null),Le=Y(!1),nt=Y(!1),Ae=Y(!1),Ge=Y(!1),ne=Y("Ready"),Xe=Y(""),de=Y(""),ye=Y(""),ue=Y(""),be=Y("English"),Se=Y(""),Ie=Y(""),$e=Y(""),ze=Y(""),Fe=Y(30),qe=Y(1234),it=Y(1024),st=Y(0),Ne=Y(null),He=Y(null),Be=Y(null),Ue=Y([null,null,null,null]),tt=Y(null),Re=Y(null),Ve=Y(null),_t=Y([null,null,null,null]),mt=Y(null),et=Y(null),wt=Y("{}"),Ye=Y({}),ut=Y([]),at=Y([]),Zt=Y([]),At=Y(""),It=Y(""),Ra=Y(null),na=Y([]),ba=Y(""),Ma=Y(!1),en=1,ea=Y(null),kt=Y(""),ta=Y(0),ra=null,ki=Y(null),ya={},ni={},Ai=new Set,xi=!1,tn=Y([]),Si=null,dn=null,on=Y(!0),Bi=Y(Gm(e(R)?.family||"")),Qi=Y([]),Ki=Y(""),Wa=Y(null),Jn=Y(null),Vn=null,Xn=null,Ke=null,Et=Y(!1),Qa=!1,Za=Promise.resolve(),mi=0,Ht=Y({}),_i=Y(""),ei=Y(""),wa=Y([]),za=Y(""),Je=Y(!0),Ce=Y(!1),pt=Y(!1),zt=Y(!1),$a=Y(""),sa=Y(null),ui=Y(null),Ti=null,fa=Y({}),Ft=Y({}),Nt=Y("idle"),ka=null,Ii=!1,Ka={},oa=Y([]),Ba=Y([]),pe=Y(""),De=Y("en"),ft=Y("mocha"),jt=!0,xa=null,Pi=null,X=Y(vb(e(De)));const Gi={demo_1_man:"demo_1_man",demo_2_man:"demo_2_man",demo_3_woman:"demo_3_woman",demo_4_woman:"demo_4_woman"},$i=new Set(["ming3_tts","ming3_audio","latentsync","xtts_v2","kugelaudio","crisperwhisper","index_echo","audio_flamingo","owsm","owsm_ctc","reuse","sidon","smart_turn","maya1","gigaam_asr","samsone","sam_audio","tone_color_vc","moss_ttsd","moss_voicegen","canary_asr","cohere_asr","moss_transcribe_diarize","audiosr","controlfoley","breeze_tts","cosyvoice3","firered_audio","fireredtts3","irodori_tts","kitten_tts2","kokoro_tts","meanvc2","midashenglm_gen","plapre"]),fi={};function En(I){y(De,bb([I])),localStorage.setItem("audiocpp.ui.language",e(De)),document.documentElement.lang=e(De)}function Un(I=e(ft)){const te=Sq(I,jt);document.documentElement.dataset.theme=te,document.querySelector('meta[name="theme-color"]')?.setAttribute("content",getComputedStyle(document.documentElement).getPropertyValue("--bg").trim())}function Xr(I){y(ft,$b(I)),localStorage.setItem(Tb,e(ft)),Un(e(ft))}async function Dn(){try{if("serviceWorker"in navigator){const I=await navigator.serviceWorker.getRegistrations();await Promise.all(I.map(te=>te.unregister()))}if("caches"in window){const I=await window.caches.keys();await Promise.all(I.map(te=>window.caches.delete(te)))}}catch(I){console.warn("Unable to clear legacy WebUI caches:",I)}}function Zn(I,te,se=e(X)){return se(`workflow.${I==="conversion"?"vc":I==="separation"?"sep":I}`,{},te)}function ns(I,te=e(X),se){return I?se&&(se.workflow||Ot(se)==="enhancement")?Zn(Ot(se),I,te):te(`task.${I}`,{},Z$[I]||I):te("studio.title")}function br(I,te,se=e(X)){const ke=te==="label"?I.label_en||I.label||I.name.replace(/_/g," "):te==="info"?I.info_en||I.info||"":I.placeholder_en||I.placeholder||"";return se(`param.${e(R)?.family}.${I.name}.${te}`,{},ke)}function Ql(I=e(X)){const te=e(R)?.input_hint_en||e(R)?.input_hint||"";return I(`model.${e(R)?.family}.hint`,{},te)}function Zr(I){const te=Math.max(1,Number.isFinite(I)?I:1)*24;return Math.max(5,Math.round((te-3)/17)*17+3)}function eo(I){const te=e(R)?.family==="ace_step"?-1:1;y(Fe,Math.max(te,Number.isFinite(I)?I:te)),e(R)?.family==="minimax_h3"&&y(Ye,{...e(Ye),num_frames:Zr(e(Fe))})}function Vs(I,te){y(Ye,{...e(Ye),[I.name]:te});const se=I.session_option||I.name;if(!e(ce)&&I.scope==="session"&&e(R)?.install_packages?.some(ke=>e(Ft)[ke.id]?.load_target?.session_options[se]!==void 0)&&(Ai=new Set([...Ai,se])),(e(R)?.family==="ace_step"||I.group==="lora")&&I.name==="lora"&&te===""&&(ya={...ya},delete ya[I.session_option||`${e(R).family}.lora`],I.group==="lora"&&delete ya[`${e(R).family}.lora_scale`]),(I.group==="lora"||["auk","yue2","liveavatar","fish_drama3","ace_step"].includes(e(R)?.family||""))&&I.scope==="session"&&y(d,e(Te).some(ke=>ke.id===e(ge)&&ke.loaded&&Dt(ke,e(R)))),e(R)?.family==="minimax_h3"&&I.name==="num_frames"){const ke=Number(te);Number.isFinite(ke)&&ke>0&&y(Fe,ke/24)}}function So(I=e(R)){I?.family!=="yue2"||e(ze).trim()||y(ze,I.default_text||"")}function Kl(){return e(ye).trim()?e(ye):e(R).default_text||""}const yr=[{id:"tts",label:"Text to speech",filterLabel:"TTS",tasks:["tts","clon"]},{id:"asr",label:"ASR / Transcription",filterLabel:"ASR",tasks:["asr"]},{id:"music",label:"Music / video generation",filterLabel:"Music / video generation",tasks:["gen"]},{id:"conversion",label:"Voice Conversion / S2S",filterLabel:"Voice Conversion / S2S",tasks:["vc","svc","s2s"]},{id:"enhancement",label:"Enhancement / denoising",filterLabel:"Enhancement / denoising",tasks:["s2s"]},{id:"separation",label:"Source separation",filterLabel:"Separation",tasks:["sep","s2s"]},{id:"analysis",label:"Audio analysis",filterLabel:"Analysis",tasks:["vad","diar","align","spk","midi","asr","turn","wake","cls"]},{id:"design",label:"Voice design",filterLabel:"Voice design",tasks:["vdes"]}],To={fish_drama3:"Fish Audio Drama 3",kugelaudio:"KugelAudio",crisperwhisper:"CrisperWhisper",index_echo:"Index-Echo S2TT",audio_flamingo:"Audio Flamingo",owsm:"OWSM",owsm_ctc:"OWSM-CTC",reuse:"RE-USE",sidon:"Sidon",smart_turn:"Smart Turn",gigaam_asr:"GigaAM ASR",ced:"CED",firered_vad:"FireRed VAD",samsone:"SAMSONE",sam_audio:"SAM Audio",builtin_audio_utils:"Audio utilities",qwen3_tts:"Qwen3-TTS",irodori_tts:"Irodori-TTS",chatterbox:"Chatterbox",stable_audio:"Stable Audio 3",qwen3_asr:"Qwen3-ASR",vevo2:"Vevo2",seed_vc:"Seed-VC",breeze_tts:"BreezeTTS 2",cosyvoice3:"CosyVoice3",magpie_tts:"MagpieTTS",meanvc2:"MeanVC2",niagara_asr:"Niagara ASR",canary_asr:"Canary 180M Flash",cohere_asr:"Cohere Transcribe",moss_transcribe_diarize:"MOSS-Transcribe-Diarize",apollo:"Apollo",universr:"UniverSR",pulsevad:"PulseVAD",nemotron_3_diar:"Nemotron 3 Diarization",lfm2_audio:"LFM2.5-Audio",lfm3_audio:"LFM3-Audio",personaplex:"PersonaPlex"},Rr={canary_asr:0,cohere_asr:256,moss_transcribe_diarize:5120},$o={canary_asr:["en","de","es","fr"],cohere_asr:["en","fr","de","es","it","pt","nl","pl","el","ar","ja","zh","vi","ko"],confucius4_r2t2:["Auto","Chinese","English","Cantonese","Japanese","Korean","Arabic","German","French","Spanish","Portuguese","Indonesian","Italian","Russian","Thai","Vietnamese","Turkish","Hindi","Malay","Dutch","Swedish","Danish","Finnish","Polish","Czech","Filipino","Persian","Greek","Romanian","Hungarian","Macedonian"]};function lu(I){const ke=(I.replace(/\\/g,"/").split("/").filter(Boolean).pop()||"").match(/(?:^|[-_])(\d+(?:\.\d+)?[bm])(?:[-_]|$)/i);return ke?ke[1].toUpperCase():""}function wr(I,te){const se=Go(te),ke=Go(ec(I));if(se===ke)return!0;const Oe=Go(I).replace(/^models\//,"");return se===Oe||se.endsWith(`/${Oe}`)}function qo(I,te){return I.family!==te.family||I.task!==te.task?!1:wr(I.path,te.path)?!0:!!(I.install_packages||[]).some(se=>wr(se.path,te.path))}function Yl(I){const te=Li.find(se=>se.id===I.id);return te&&qo(te,I)?te:Li.find(se=>qo(se,I))}function Co(I,te){const se=lu(I.path),ke=To[I.family]||te?.display_name||I.family;return se&&!ke.toLowerCase().includes(se.toLowerCase())?`${ke} ${se}`:ke}function Dc(I){return Yl(I)?.display_name||Co(I)}function Jl(I,te){return I.localeCompare(te,"en",{sensitivity:"base",numeric:!0})}function Xl(I=!1){return(I?e(Te).filter(se=>se.configured&&!Li.some(ke=>ke.id===se.id)):e(Te)).map(se=>{const ke=Yl(se),Oe=Li.find(Vt=>Vt.family===se.family&&Vt.task===se.task),xt=ke||Oe,la=Vt=>Vt&&I?`${Vt} (${se.id})`:Vt;return{...xt||{id:se.id,display_name:se.id,family:se.family,path:se.path,task:se.task,mode:se.mode},id:se.id,display_name:la(ke?ke.display_name:Co(se,xt)),display_name_en:la(ke?ke.display_name_en:xt?.display_name_en),family:se.family,path:se.path,task:se.task,mode:se.mode,install_packages:[],configured:!0}})}function Hi(I){return!e(he)||!I?!1:!e(he).ui_management||I.configured===!0}function dl(I){return Array.from(I.reduce((te,se)=>{const ke=te.get(se.family)||[];return ke.push(se),te.set(se.family,ke),te},new Map)).map(([te,se])=>({family:te,entries:[...se].sort((ke,Oe)=>Jl(ke.display_name,Oe.display_name)),label:se.length>1&&To[te]||se[0].display_name})).sort((te,se)=>Jl(te.label,se.label))}let Tn=Y("tts"),ks={},un=Y(Li),Zl=Y(dl(Li));class Hn extends Error{}function li(I){const te=`${new Date().toLocaleTimeString()} ${I}`;y(tn,[te,...e(tn)].slice(0,200))}function Ao(I){if(!Number.isFinite(I)||I<=0)return"0 B";const te=["B","KB","MB","GB","TB"],se=Math.min(Math.floor(Math.log(I)/Math.log(1024)),te.length-1);return`${(I/1024**se).toFixed(se<2?0:1)} ${te[se]}`}function ec(I){if(!e(_i))return I;const te=I.replace(/\\/g,"/");if(te==="models")return e(_i);if(!te.startsWith("models/"))return I;const se=te.slice(7),ke=e(_i).includes("\\")?"\\":"/";return`${e(_i).replace(/[\\/]+$/,"")}${ke}${se.replace(/\//g,ke)}`}function Us(I){const te=I.install_packages||[],se=te.find(ke=>ke.id===e(fa)[I.id])||te[0];return se?Md(se,e(Ft)[se.id]):void 0}function Lc(I,te){return Us(I)?.id===te.id}function xs(I){return Hi(I)?I.path:ec(Us(I)?.path||I.path)}function Go(I){return I.replace(/\\/g,"/").replace(/\/$/,"").toLowerCase()}function to(I,te){return wr(I.path,te)}async function tc(I){if(Hi(I)||I.id===e(ge)&&e(ce)||!I.install_packages?.length)return;const te=Us(I);return!te.load_target&&!te.load_target_error&&await si(),Tm(Us(I))}function ao(I){return{...I.id===e(ge)&&e(ce)?{}:Us(I)?.load_options,...I.load_options,...I.id===e(ge)?ni:{}}}function Fo(I,te=Us(I)){I.id===e(ge)&&e(ce)&&(te=void 0);const se=I.id===e(ge)?nc(te?.session_options):{};return{...I.session_options||{},...te?.session_options||{},...I.id===e(ge)?ya:{},...se}}function Br(I,te,se){te=Md(te,e(Ft)[te.id]);const ke=Fo(I,te),Oe=Array.from(new Set((I.id===e(ge)&&e(ce)?[]:I.install_packages||[]).flatMap(la=>Object.keys(e(Ft)[la.id]?.load_target?.session_options||{}))));if(I.id===e(ge))for(const la of e(ut).filter(Vt=>Vt.scope==="session"))Oe.push(la.session_option||la.name);if(!Oe.length)return!0;const xt=se.session_options||{};return Oe.every(la=>xt[la]===ke[la])}function Mo(I,te,se){return I.id===e(ge)&&e(ce)?!1:(se=Md(se,e(Ft)[se.id]),to(se,te.path)&&Br(I,se,te))}function Dt(I,te){if(!te)return wr(e(we),I.path);const se=Us(te);return se?wr(e(we),I.path)&&Br(te,se,I):wr(e(we),I.path)}function gt(I,te=e(Te)){return te.find(se=>se.id===I.id&&se.loaded)}function da(I,te,se=e(Te)){const ke=gt(I,se);return!!(ke&&Mo(I,ke,te))}function ha(I,te,se=e(Te),ke=e(Ft)){return da(I,te,se)||ke[te.id]?.installed===!0&&!!ke[te.id]?.load_target}function Pa(I){const te=I.install_packages||[];if(I.family==="ace_step"||I.family==="minimax_music3"||$i.has(I.family))return te.map(Oe=>({key:Oe.id,label:Oe.label,choice:Oe}));const se=te.find(Oe=>Oe.format==="gguf"&&["q8","q8_0"].includes(Oe.precision)),ke=te.find(Oe=>Oe.format==="gguf"&&["f16","fp16","bf16"].includes(Oe.precision));return!se&&!ke?te.map(Oe=>({key:Oe.id,label:Oe.label,choice:Oe})):[{key:"q8",label:se?.label||"GGUF Q8",choice:se},{key:"fp16",label:ke?.label||"GGUF FP16",choice:ke}]}function qa(I){if(!Number.isInteger(I)||I<-1||I>4294967295)throw new Error("Seed must be -1 or an unsigned 32-bit integer (0 to 4294967295).");if(I>=0)return I;const te=new Uint32Array(1);return globalThis.crypto.getRandomValues(te),te[0]}function $t(I,te){return(I+te)%4294967296}function me(I){return I.replace(/\.[^.]+$/,"").trim().toLowerCase()}function Me(I){const te=!!(I&&(e(pe)||e(Ki)||e(Be)&&e(Be).name!==I.name));I&&(y(pe,""),y(Ki,"")),y(Be,I),te&&(y(mt,null),y(Ie,""),e(et)&&Bt(et,e(et).value=""),y(ne,"Reference voice changed. Choose or enter its matching transcript."),y(Xe,e(ne)))}function Pe(){y(pe,""),y(Ki,""),y(Be,null),y(mt,null),y(Ie,""),e(Ve)&&Bt(Ve,e(Ve).value=""),e(et)&&Bt(et,e(et).value="")}function rt(){y(Ne,null),e(tt)&&Bt(tt,e(tt).value="")}function dt(){y(He,null),e(Re)&&Bt(Re,e(Re).value="")}function lt(I,te){y(Ue,e(Ue).map((se,ke)=>ke===I?te:se))}function Qe(I){lt(I,null),e(_t)[I]&&Bt(_t,e(_t)[I].value="")}function yt(I){y(pe,I),I&&(y(Ki,""),y(Be,null),y(mt,null),y(Ie,""),e(Ve)&&Bt(Ve,e(Ve).value=""),e(et)&&Bt(et,e(et).value=""))}async function aa(I){if(y(mt,I),!!I)try{const te=(await I.text()).replace(/^\uFEFF/,"").trim();if(!te)throw new Error("The selected reference text file is empty.");y(Ie,te);const se=!e(Be)||me(I.name)===me(e(Be).name);y(ne,se?`Loaded reference transcript from ${I.name}.`:`Loaded ${I.name}. Its name does not match ${e(Be)?.name}; verify that it is the correct transcript.`),y(Xe,se?"":e(ne))}catch(te){y(mt,null),y(Ie,""),e(et)&&Bt(et,e(et).value=""),y(ne,te instanceof Error?te.message:String(te)),y(Xe,"")}}function Yt(I){return I.state==="complete"||I.state==="cleaned"?100:I.progress_percent>=0?Math.min(100,Math.max(0,I.progress_percent)):0}function Ca(I){const te=Yt(I);return I.total_bytes>0?`${te}% · ${Ao(I.downloaded_bytes)} / ${Ao(I.total_bytes)}`:I.downloaded_bytes>0?`${Ao(I.downloaded_bytes)} downloaded`:I.state==="failed"?"Download failed":I.state==="cleaned"?"Partial files cleaned":I.state==="complete"?"100% · complete":I.state==="queued"?"0% · queued":"Connecting and checking package files…"}function Ya(I,te){return(I.install_packages||[]).map(se=>te[se.id]).filter(se=>se!==void 0)}function pa(I){return I.family==="ming3_audio"&&["tts","clon"].includes(I.task)?!1:I.request_options!==void 0?I.request_options.includes("max_tokens"):["tts","clon","gen","s2s","vdes"].includes(I.task)}function Ea(I,te){return I.request_options===void 0||I.request_options.includes(te)}function Gt(I,te){return I.required_request_options?.includes(te)===!0}function ma(I){return e(Q).has(I.id)}function Ot(I){return I.workflow?I.workflow:["apollo","universr","audiosr"].includes(I.family)?"enhancement":yr.find(te=>te.tasks.some(se=>se===I.task))?.id||"tts"}function gi(I,te=e(X)){return I==="Ready"?te("status.ready"):I}async function si(){if(!(!e(he)?.ui_management||Ii)){Ii=!0;try{const I=await lb();y(Nt,I.state),I.data.length&&(y(Ft,Object.fromEntries(I.data.map(se=>[se.id,se]))),I.state==="complete"&&Ss(e(Ft)),e(ge)&&!e(ce)&&!Hi(e(R))&&e(R).install_packages?.length&&(y(we,xs(e(R))),Fi()));const te=I.state==="idle"||I.state==="running"||I.data.length===0;te&&ka===null?ka=window.setInterval(si,1e3):!te&&ka!==null&&(window.clearInterval(ka),ka=null)}catch(I){y(Nt,"failed"),li(`Package sizes unavailable: ${I instanceof Error?I.message:I}`)}finally{Ii=!1}}}function ln(){if(!(e(Z)==="library"&&!e(ee)?.canClose())&&!(e(Z)==="apps"&&!e(oe)?.canClose())){if(!e(he)?.ui_management){y(Z,"studio"),y(ne,"Model management is disabled for this configured server."),y(Xe,e(ne)),y(de,"");return}y(Z,"models"),e(Nt)==="idle"&&y(Nt,"running"),si()}}function cs(I,te){y(fa,{...e(fa),[I.id]:te.id}),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(fa))),I.id===e(ge)&&(y(ce,!1),y(we,xs(I)),Fi())}function Ss(I=e(Ft)){const te={...e(fa)};let se=!1;for(const ke of Li){const Oe=ke.install_packages||[];if(!Oe.length)continue;const xt=Oe.find(bn=>bn.id===te[ke.id]),la=xt?e(Ht)[xt.id]:void 0;if(la&&["queued","running","cancelling"].includes(la.state)||xt&&I[xt.id]?.installed)continue;const Ut=Oe.find(bn=>I[bn.id]?.installed);Ut?te[ke.id]!==Ut.id&&(te[ke.id]=Ut.id,se=!0):te[ke.id]!==void 0&&(delete te[ke.id],se=!0)}return se?(y(fa,te),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(fa))),e(ge)&&!e(ce)&&(y(we,xs(e(R))),Fi()),!0):!1}function ul(I=e(Te)){const te={...e(fa)};let se=!1;for(const ke of Li){const Oe=gt(ke,I);if(!Oe)continue;const xt=Us(ke),la=xt&&Mo(ke,Oe,xt)?xt:(ke.install_packages||[]).find(Vt=>Mo(ke,Oe,Vt));la&&te[ke.id]!==la.id&&(te[ke.id]=la.id,se=!0)}return se?(y(fa,te),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(fa))),e(ge)&&!e(ce)&&(y(we,xs(e(R))),Fi()),!0):!1}async function Vc(I=e(Ft)){const te=Li.filter(se=>{const ke=gt(se);if(!ke)return!1;const Oe=(se.install_packages||[]).find(xt=>Mo(se,ke,xt));return!!(Oe&&I[Oe.id]?.installed===!1)});if(!te.length)return!1;for(const se of te)await _o(se.id);return await $n(),!0}async function fl(){e(Z)==="library"&&!e(ee)?.canClose()||e(Z)==="apps"&&!e(oe)?.canClose()||(y(Z,"studio"),await Hf(),await $n(),e(he)?.ui_management&&(await si(),await Vc(),Ss()&&e(ge)&&await Hs()))}function Hc(I){y(_i,I.models_root),y(ei,I.models_root),y(za,I.default_models_root),y(Je,I.is_default),e(ce)||y(we,xs(e(R))),y(wa,[I.models_root,...e(wa),I.default_models_root].filter((te,se,ke)=>te&&ke.indexOf(te)===se).slice(0,10)),localStorage.setItem("audiocpp.ui.modelsFolderHistory",JSON.stringify(e(wa)))}function io(){y(ge,""),y(pe,""),y(Ba,[]),y(He,null),y(we,""),y(je,null),y(ut,[]),y(Ye,{}),y(wt,"{}"),localStorage.removeItem("audiocpp.ui.model"),Ks()}function kr(I=!1){return Hi(e(R))||!e(ge)||!I&&e(d)||e(je)!==!1?!1:(io(),!0)}async function cu(I=!1){if(!(!e(he)?.ui_management||e(Ce))){y(Ce,!0),y(Xe,""),y(de,""),y(ne,I?"Restoring the default models folder…":"Changing models folder…");try{const te=await cb(I?"":e(ei).trim());Hc(te),te.is_default?localStorage.removeItem("audiocpp.ui.modelsFolder"):localStorage.setItem("audiocpp.ui.modelsFolder",te.models_root),y(Ht,{}),y(Ft,{}),y(Nt,"idle"),Ka={},Ti!==null&&(window.clearInterval(Ti),Ti=null),ka!==null&&(window.clearInterval(ka),ka=null),await si(),await Hs();const se=kr();y(ne,se?`Models folder: ${te.models_root}. No installed model is selected.`:`Models folder: ${te.models_root}`),li(e(ne))}catch(te){y(ne,te instanceof Error?te.message:String(te)),y(de,e(ne)),li(`Models folder change failed: ${e(ne)}`)}finally{y(Ce,!1)}}}async function Ts(I="",te=null){y(ui,te),y(pt,!0),y(zt,!0),y($a,"");try{y(sa,await bT(I||e(ei).trim()||e(_i)))}catch(se){y($a,se instanceof Error?se.message:String(se))}finally{y(zt,!1)}}function fn(){e(sa)&&(e(ui)?Vs(e(ui),e(sa).current):y(ei,e(sa).current),y(pt,!1))}function Fi(){if(e(ce))return;const I=Us(e(R))?.session_options||{};if(!Object.keys(I).length)return;const te={...e(Ye)};for(const se of e(ut).filter(ke=>ke.scope==="session")){const ke=se.session_option||se.name;if(I[ke]===void 0||Ai.has(ke))continue;const Oe=ya[ke]??I[ke];te[se.name]=se.type==="bool"?Oe==="true":["number","slider"].includes(se.type)?Number(Oe):Oe}y(Ye,te)}function ds(){ya={},ni={},Ai=new Set,xi=!1;const I=Jo[e(R)?.id]||Jo[e(R)?.family]||[],te=e(R)?.family==="controlfoley"||e(R)?.family==="midashenglm_gen";y(ut,I.filter(ke=>!(["vibevoice","moss_ttsd"].includes(e(R)?.family)&&ke.name==="voice_samples")&&!(te&&ke.name==="duration_sec"))),y(Ye,Object.fromEntries(I.map(ke=>[ke.name,ke.default??""]))),Fi();const se=e(Te).find(ke=>ke.id===e(ge))?.session_options||{};for(const ke of e(ut).filter(Oe=>Oe.group==="lora")){const Oe=se[ke.session_option||ke.name];Oe!==void 0&&Bt(Ye,e(Ye)[ke.name]=Oe)}if(e(R)?.family==="ace_step"&&Hi(e(R))){const ke=e(Te).find(Oe=>Oe.id===e(ge))?.session_options;y(Ye,{...e(Ye),lora:ke?.["ace_step.lora"]??"",lora_scale:Number(ke?.["ace_step.lora_scale"]??1)})}if(e(R)?.family in Rr&&y(st,Rr[e(R).family]),e(R)?.family==="confucius4_r2t2"?y(ue,"Auto"):["owsm","owsm_ctc","index_echo","audio_flamingo","kugelaudio","smart_turn","reuse","sidon","hviske_asr_v6","voxtral_tts"].includes(e(R)?.family)?y(ue,""):e(R)?.family in $o&&y(ue,"en"),e(R)?.family==="minimax_h3"?(y(Fe,15),y(Ye,{...e(Ye),num_frames:Zr(e(Fe)),dit_acceleration:"none"})):e(R)?.task==="gen"&&y(Fe,30),e(R)?.family==="yue2"){if(Hi(e(R))){const ke=e(Te).find(Oe=>Oe.id===e(ge))?.session_options;y(Ye,{...e(Ye),ar_lora:ke?.["yue2.ar_lora"]??"",ar_lora_scale:Number(ke?.["yue2.ar_lora_scale"]??1),nar_lora:ke?.["yue2.nar_lora"]??"",nar_lora_scale:Number(ke?.["yue2.nar_lora_scale"]??1)})}y(ye,""),y(ze,""),So()}else["liveavatar","moss_ttsd","sam_audio"].includes(e(R)?.family)?y(ye,e(R).default_text||""):e(R)?.family==="ming3_audio"&&e(R).task==="s2s"?y(ye,""):!e(ye).trim()&&e(R)?.default_text&&y(ye,e(R).default_text);e(R)?.builtin_voices?.length&&e(R).default_voice&&!e(pe)&&y(pe,e(R).default_voice),y(wt,"{}")}let zo=!1;function ac(){if(!e(he)||e(he).ui_management)return;const I=Xl();if(!I.length){io();return}const se=(e(ge)?I.find(Oe=>Oe.id===e(ge)):void 0)||I[0],ke=!zo||e(ge)!==se.id;ke&&(y(pe,""),y(Ba,[])),y(ge,se.id),y(R,se),y(Tn,Ot(se)),ks={...ks,[e(Tn)]:se.id},y(we,se.path),y(je,!0),localStorage.setItem("audiocpp.ui.model",se.id),ke&&(y(Bi,Gm(se.family)),ds()),zo=!0}async function $n(){try{await(async I=>{var te=ed(I,2);y(he,te[0]),y(Te,te[1])})(await Promise.all([Sm(),Bc()])),e(he).ui_management?ul():ac()}catch(I){y(ne,I instanceof Error?I.message:String(I))}}async function Hs(){if(!e(ge)||!e(we).trim()){y(je,null);return}if(Hi(e(R))){y(je,e(Te).some(I=>I.id===e(ge)));return}y(je,null);try{y(je,(await ob(e(we))).exists)}catch{y(je,null)}}function xr(I){if(y(ba,""),!I){io(),y(ne,"No model selected. Choose an installed model or download one from the Models tab.");return}const te=e(un).find(se=>se.id===I);!te||!ma(te)||(y(ge,I),y(R,te),y(ce,!1),y(pe,""),y(Ba,[]),y(Tn,Ot(te)),ks={...ks,[e(Tn)]:I},y(we,xs(te)),y(Bi,Gm(te.family)),localStorage.setItem("audiocpp.ui.model",I),ds(),y(ne,e(X)("status.ready")),Hs(),Wf())}function pl(I){const te=yr.find(xt=>xt.id===I);if(!te||(y(Tn,I),e(ge)&&Ot(e(R))===I))return;const se=ks[I],Oe=(se?e(un).find(xt=>xt.id===se&&Ot(xt)===I&&ma(xt)):void 0)||e(un).find(xt=>Ot(xt)===I&&ma(xt));if(Oe){xr(Oe.id);return}io(),y(ne,`No installed models are available for ${te.label}. Install one from the Models tab.`)}async function Eo(I){if(!e(b)){if(!e(ge)){y(ne,"Choose an installed model before loading."),y(Xe,e(ne)),y(de,"");return}if(Hi(e(R))){y(ne,e(he)?.ui_management?"This model is configured by the server and loads on its first request.":"This server was not started with UI management enabled."),y(Xe,e(ne)),y(de,"");return}y(Le,!0),y(Xe,""),y(de,""),y(ne,`Loading ${e(R).display_name}…`),li(e(ne));try{const te=await tc(e(R));te&&y(we,te.model_path);const se=e(Te).filter(ke=>ke.loaded&&(ke.id!==e(R).id||!wr(e(we),ke.path)||!Dt(ke,e(R))));for(const ke of se)li(`Unloading ${Dc(ke)} before loading ${e(R).display_name}.`),await _o(ke.id);se.length&&await $n(),await df({id:e(R).id,path:e(we),family:te?.family??e(R).family,task:e(R).task,mode:I||e(R).mode||"offline",load_options:ao(e(R)),session_options:Fo(e(R))}),await $n(),await Wf(),y(ne,e(X)("status.modelReady",{model:e(R).display_name})),y(de,""),li(e(ne))}catch(te){throw y(ne,te instanceof Error?te.message:String(te)),y(de,e(ne)),li(`Load failed: ${e(ne)}`),te}finally{y(Le,!1)}}}async function ic(){if(!e(ge))return;const I=e(R).display_name;y(Le,!0);try{Hi(e(R))?await fT([e(R).id]):await _o(e(R).id),await $n(),await Wf();const te=kr(!0);y(ne,te?`${I} unloaded. No installed model is selected.`:`${I} unloaded.`),li(e(ne))}catch(te){y(ne,te instanceof Error?te.message:String(te))}finally{y(Le,!1)}}async function Wc(I){if(!(e(Le)||!ha(e(R),I))){if(da(e(R),I)){await ic();return}if(cs(e(R),I),await Hs(),e(je)!==!0){y(ne,`${e(R).display_name} ${I.label} is not available at the expected path.`),y(de,e(ne));return}await Eo()}}async function du(){e(Le)||!e(ge)||e(je)===!1||(e(d)?await ic():await Eo())}async function Uo(I){if(!I)return;const te=e(R).task==="sep"||e(R).family==="apollo"?44100:["asr","vad","diar","align","midi","wake","cls"].includes(e(R).task)?16e3:void 0,se=await Fr(I,te);return gr(se,Si?.signal)}async function Ws(){if(e(R).family==="moss_ttsd"){const Oe=e(Ue).map(Boolean).lastIndexOf(!0);return Oe<0?void 0:(await Promise.all(e(Ue).slice(0,Math.max(2,Oe+1)).map(async la=>la&&await Uo(la)||""))).join(",")}const I=e(Ue).findIndex(Oe=>!Oe);if(I>=0&&e(Ue).slice(I+1).some(Boolean))throw new Hn("VibeVoice speaker references must be filled from Speaker 1 without gaps.");const se=e(Ue).filter(Oe=>!!Oe);return se.length?(await Promise.all(se.map(Oe=>Uo(Oe)))).filter(Oe=>!!Oe).join(","):void 0}function Qs(){let I={};try{if(I=JSON.parse(e(wt)||"{}"),Array.isArray(I)||I===null)throw new Error("must be an object")}catch(ke){throw new Error(`Advanced JSON is invalid: ${ke instanceof Error?ke.message:ke}`)}const te=e(R).default_options||{},se=Object.fromEntries(Object.entries(e(Ye)).filter(([ke,Oe])=>{const xt=e(ut).find(la=>la.name===ke);return!(xt?.scope==="session"||Oe===""&&xt&&xt.default===void 0||e(R)?.family==="canary_asr"&&ke==="target_language"&&Oe===""||e(R)?.family==="universr"&&ke==="input_sample_rate"&&Oe===""||e(R)?.family==="auk"&&typeof Oe=="string"&&Oe.trim().length===0||e(f)&&typeof Oe=="string"&&Oe.trim().length===0)}));return{...te,...se,...I}}function nc(I={}){const te=Object.fromEntries(e(ut).filter(se=>se.scope==="session").filter(se=>se.group!=="lora"||String(e(Ye).lora??"").trim().length>0).map(se=>{const ke=se.session_option||se.name,Oe=I[ke]!==void 0&&!Ai.has(ke)?ya[ke]??I[ke]:e(Ye)[se.name];return[ke,String(Oe??se.default??"")]}).filter(([,se])=>se.length>0));if(e(R)?.family==="auk"){const se=te["auk.model_gguf"]||"auk-base-f32.gguf";te["auk.variant"]=se.startsWith("auk-flash-")?"flash":"base"}return te}function Ks(){if(e(ea)===null){for(const I of e(at))URL.revokeObjectURL(I.url);for(const I of e(Zt))URL.revokeObjectURL(I.url);e(Ra)&&URL.revokeObjectURL(e(Ra).url)}y(at,[]),y(Zt,[]),y(At,""),y(It,""),y(Ra,null),y(ea,null),y(kt,"")}function Ro(I){for(const te of I.audio)URL.revokeObjectURL(te.url);for(const te of I.artifacts)URL.revokeObjectURL(te.url);URL.revokeObjectURL(I.settings.url)}async function cn(I,te=!1){if(I.modelId!==e(ge)||I.task!==e(R).task){y(ba,e(X)("history.wrongModel",{label:I.label,model:e(R).display_name})),li(e(ba));return}if(te){if(e(Ae)||e(Le)||e(Ma)){y(ba,e(X)("history.wait"));return}y(Ma,!0);try{await tx(I.settingsJson)}catch(se){y(ba,se instanceof Error?se.message:String(se)),li(`History settings restore failed: ${e(ba)}`);return}finally{y(Ma,!1)}return cn(I)}y(ba,""),Ks(),y(ea,I.id),y(kt,I.modelId),y(at,I.audio),y(Zt,I.artifacts),y(At,I.text),y(It,I.json),y(Ra,I.settings)}function us(I){const te=e(na).find(ke=>ke.id===I);if(!te)return;const se=e(ea)===I;if(se&&Ks(),y(na,e(na).filter(ke=>ke.id!==I)),Ro(te),se){const ke=e(na).find(Oe=>Oe.modelId===e(ge)&&Oe.task===e(R).task);ke&&cn(ke)}}function Ys(){e(ea)!==null&&Ks();for(const I of e(na))Ro(I);y(na,[]),y(ba,"")}function no(I){const te=e(na).slice(I);if(!te.length)return;const se=te.some(ke=>ke.id===e(ea));se&&Ks(),y(na,e(na).slice(0,I));for(const ke of te)Ro(ke);if(se){const ke=e(na).find(Oe=>Oe.modelId===e(ge)&&Oe.task===e(R).task);ke&&cn(ke)}}async function Pr(){if(Hi(e(R))){if(xi)throw new Error("The imported model settings require a reload through the server configuration.");if(!e(Te).some(I=>I.id===e(ge)))throw new Error("Configured model is not registered by this server.");return}if(!e(d)||xi){if(xi&&e(Te).some(I=>I.id===e(ge)&&I.loaded)&&(await _o(e(ge)),await $n()),await Eo(),await $n(),!e(Te).some(I=>I.id===e(ge)&&I.loaded&&Dt(I,e(R))))throw new Error("Model did not load.");xi=!1}}async function F_(I,te,se={}){const ke=e(un).find(Vt=>Vt.id===I.id);if(!ke||ke.family!==I.family||ke.task!==I.task)throw new Error(`The saved model is not available in this UI: ${I.id}`);if(!ma(ke))throw new Error(`Install ${ke.display_name} before applying its settings.`);const Oe=I.package_id?ke.install_packages?.find(Vt=>Vt.id===I.package_id):void 0;if(I.package_id&&!Oe)throw new Error(`The saved package is not available: ${I.package_id}`);if(Oe&&!ha(ke,Oe,e(Te),e(Ft)))throw new Error(`Install ${Oe.label} before applying its settings.`);const xt=ao(ke);xr(ke.id),Oe&&(y(fa,{...e(fa),[ke.id]:Oe.id}),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(fa)))),y(we,Oe?xs(ke):I.path),y(ce,!Oe),ya={...I.session_options||{}},ni={...I.load_options||{}},y(Ye,{...e(Ye),...te||Object.fromEntries(Object.entries(se).filter(([Vt])=>e(ut).some(Ut=>Ut.name===Vt)))});for(const Vt of e(ut).filter(Ut=>Ut.scope==="session")){const Ut=ya[Vt.session_option||Vt.name];if(Ut!==void 0){if(Vt.type==="bool"&&!["true","false"].includes(Ut))throw new Error(`Invalid boolean setting: ${Vt.name}`);if(["number","slider"].includes(Vt.type)&&!Number.isFinite(Number(Ut)))throw new Error(`Invalid numeric setting: ${Vt.name}`);Bt(Ye,e(Ye)[Vt.name]=Vt.type==="bool"?Ut==="true":["number","slider"].includes(Vt.type)?Number(Ut):Ut)}}Fi();const la=e(Te).find(Vt=>Vt.id===ke.id&&Vt.loaded);return xi=!!(la&&(!wr(e(we),la.path)||Object.entries(Fo(ke)).some(([Vt,Ut])=>la.session_options?.[Vt]!==Ut)||JSON.stringify(xt)!==JSON.stringify(ni))),await Hs(),ke}async function tx(I){const te=JSON.parse(I);if(te.schema_version!==1||typeof te.model?.id!="string"||!Array.isArray(te.requests)||!te.requests.length||!te.requests.every(Ut=>Ut&&Ut.body&&typeof Ut.body=="object"&&!Array.isArray(Ut.body)))throw new Error("Choose an audio.cpp settings JSON exported with Save settings JSON.");const se=te.requests[0].body,ke=se.request||se,Oe=te.ui,xt=te.resolved_seed;if(!Number.isInteger(xt)||xt<0||xt>4294967295)throw new Error("The settings JSON has an invalid resolved seed.");const la=await F_(te.model,Oe?.advanced_values,ke.options);y(ye,Oe?.text??(te.requests[0].endpoint==="/v1/audio/speech"?te.requests.map(Ut=>Ut.body.input).join(` +${i.notes??""}`,g=this.createInternalChunk(c,i.timestamp,i.duration,"key",d.trim()?ws.encode(d):null);r.chunkQueue.push(g),await this.interleaveChunks()}finally{s()}}async interleaveChunks(t=!1){if(!(!t&&!this.allTracksAreKnown())){e:for(;;){let i=null,n=1/0;for(const r of this.trackDatas){if(!t&&r.chunkQueue.length===0&&!r.closed)break e;r.chunkQueue.length>0&&r.chunkQueue[0].timestamp=2&&n.skipBits(1);const g={rgb:7,bt709:2,bt470bg:1,smpte170m:3}[t.info.decoderConfig.colorSpace.matrix];YC(i.data,n.pos,n.pos+3,g)}createInternalChunk(t,i,n,s,r=null){return{data:t,type:s,timestamp:i,duration:n,additions:r}}writeBlock(t,i){this.segment||this.createSegment();const n=Math.round(1e3*i.timestamp),s=this.trackDatas.every(h=>{if(t===h)return i.type==="key";const m=h.chunkQueue[0];return m?m.type==="key":h.closed});let r=!1;if(!this.currentCluster)r=!0;else{We(this.currentClusterStartMsTimestamp!==null),We(this.currentClusterMaxMsTimestamp!==null);const h=n-this.currentClusterStartMsTimestamp;r=s&&n>this.currentClusterMaxMsTimestamp&&h>=1e3*(this.format._options.minimumClusterDuration??1)||h>t7}r&&this.createNewCluster(n);const o=n-this.currentClusterStartMsTimestamp;if(o0?{id:et.BlockDuration,data:d}:null]};this.ebmlWriter.writeEBML(h)}else{c.setUint8(3,+(i.type==="key")<<7);const h={id:et.SimpleBlock,data:[l,i.data]};this.ebmlWriter.writeEBML(h)}this.startTimestamp=Math.min(this.startTimestamp,n),this.endTimestamp=Math.max(this.endTimestamp,n+d),t.lastWrittenMsTimestamp=n,this.trackDatasInCurrentCluster.has(t)||this.trackDatasInCurrentCluster.set(t,{firstMsTimestamp:n}),this.currentClusterMaxMsTimestamp=Math.max(this.currentClusterMaxMsTimestamp,n)}createNewCluster(t){t=Math.max(0,t),this.currentCluster&&this.finalizeCurrentCluster(),this.format._options.onCluster&&this.writer.startTrackingWrites(),this.currentCluster={id:et.Cluster,size:this.format._options.appendOnly?-1:c2,data:[{id:et.Timestamp,data:t}]},this.ebmlWriter.writeEBML(this.currentCluster),this.currentClusterStartMsTimestamp=t,this.currentClusterMaxMsTimestamp=t,this.trackDatasInCurrentCluster.clear()}finalizeCurrentCluster(){if(We(this.currentCluster),!this.format._options.appendOnly){const s=this.writer.getPos()-this.ebmlWriter.dataOffsets.get(this.currentCluster),r=this.writer.getPos();this.writer.seek(this.ebmlWriter.offsets.get(this.currentCluster)+4),this.ebmlWriter.writeVarInt(s,c2),this.writer.seek(r)}if(this.format._options.onCluster){We(this.currentClusterStartMsTimestamp!==null);const{data:s,start:r}=this.writer.stopTrackingWrites();this.format._options.onCluster(s,r,this.currentClusterStartMsTimestamp/1e3)}const t=this.ebmlWriter.offsets.get(this.currentCluster)-this.segmentDataOffset,i=new Map;for(const[s,{firstMsTimestamp:r}]of this.trackDatasInCurrentCluster)i.has(r)||i.set(r,[]),i.get(r).push(s);const n=[...i.entries()].sort((s,r)=>s[0]-r[0]);for(const[s,r]of n)We(this.cues),this.cues.data.push({id:et.CuePoint,data:[{id:et.CueTime,data:Math.max(0,s)},...r.map(o=>({id:et.CueTrackPositions,data:[{id:et.CueTrack,data:o.track.id},{id:et.CueClusterPosition,data:t}]}))]})}async onTrackClose(t){const i=await this.mutex.acquire(),n=this.trackDatas.find(s=>s.track===t);n&&(n.closed=!0),this.allTracksAreKnown()&&this.allTracksKnown.resolve(),await this.interleaveChunks(),i()}async finalize(){const t=await this.mutex.acquire();this.allTracksKnown.resolve();for(const i of this.trackDatas)i.closed=!0;if(this.segment||this.createSegment(),await this.interleaveChunks(!0),this.currentCluster&&this.finalizeCurrentCluster(),We(this.cues),this.ebmlWriter.writeEBML(this.cues),!this.format._options.appendOnly){const i=this.writer.getPos()-this.segmentDataOffset;this.writer.seek(this.ebmlWriter.offsets.get(this.segment)+4),this.ebmlWriter.writeVarInt(i,l2);const n=this.startTimestamp===1/0?0:this.endTimestamp-this.startTimestamp;this.segmentDuration.data=new Zm(n),this.writer.seek(this.ebmlWriter.offsets.get(this.segmentDuration)),this.ebmlWriter.writeEBML(this.segmentDuration),We(this.seekHead),this.writer.seek(this.ebmlWriter.offsets.get(this.seekHead)),this.maybeCreateSeekHead(!0),this.ebmlWriter.writeEBML(this.seekHead)}t()}}class n7{constructor(t){this.sourceSampleRate=null,this.sourceNumberOfChannels=null,this.startTime=null,this.bufferStartFrame=0,this.maxWrittenFrame=null,this.targetSampleRate=t.targetSampleRate,this.targetNumberOfChannels=t.targetNumberOfChannels,this.onSample=t.onSample,this.bufferSizeInFrames=Math.floor(this.targetSampleRate*5),this.bufferSizeInSamples=this.bufferSizeInFrames*this.targetNumberOfChannels}doChannelMixerSetup(){We(this.sourceNumberOfChannels!==null);const t=this.sourceNumberOfChannels,i=this.targetNumberOfChannels;t===1&&i===2?this.channelMixer=(n,s)=>n[s*t]:t===1&&i===4?this.channelMixer=(n,s,r)=>n[s*t]*+(r<2):t===1&&i===6?this.channelMixer=(n,s,r)=>n[s*t]*+(r===2):t===2&&i===1?this.channelMixer=(n,s)=>{const r=s*t;return .5*(n[r]+n[r+1])}:t===2&&i===4?this.channelMixer=(n,s,r)=>r<2?n[s*t+r]:0:t===2&&i===6?this.channelMixer=(n,s,r)=>r<2?n[s*t+r]:0:t===4&&i===1?this.channelMixer=(n,s)=>{const r=s*t;return .25*(n[r]+n[r+1]+n[r+2]+n[r+3])}:t===4&&i===2?this.channelMixer=(n,s,r)=>{const o=s*t;return .5*(n[o+r]+n[o+r+2])}:t===4&&i===6?this.channelMixer=(n,s,r)=>{const o=s*t;return r<2?n[o+r]:r===2||r===3?0:n[o+r-2]}:t===6&&i===1?this.channelMixer=(n,s)=>{const r=s*t;return Math.SQRT1_2*(n[r]+n[r+1])+n[r+2]+.5*(n[r+4]+n[r+5])}:t===6&&i===2?this.channelMixer=(n,s,r)=>{const o=s*t;return n[o+r]+Math.SQRT1_2*(n[o+2]+n[o+r+4])}:t===6&&i===4?this.channelMixer=(n,s,r)=>{const o=s*t;return r<2?n[o+r]+Math.SQRT1_2*n[o+2]:n[o+r+2]}:this.channelMixer=(n,s,r)=>r=this.bufferStartFrame+this.bufferCapacityInFrames;)await this.finalizeCurrentBuffer(),this.bufferStartFrame+=this.bufferSizeInFrames;const g=d-this.bufferStartFrame;We(g=0&&u=0&&f=this.bufferSizeInFrames?this.maxWrittenFrame-this.bufferSizeInFrames:null}async finalize(){for(;this.maxWrittenFrame!==null;)await this.finalizeCurrentBuffer(),this.bufferStartFrame+=this.bufferSizeInFrames}}var s7=function(a,t,i){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],i&&(s=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(r){return Promise.reject(r)}}),a.stack.push({value:t,dispose:n,async:i})}else i&&a.stack.push({async:!0});return t},r7=(function(a){return function(t){function i(o){t.error=t.hasError?new a(o,t.error,"An error was suppressed during disposal."):o,t.hasError=!0}var n,s=0;function r(){for(;n=t.stack.pop();)try{if(!n.async&&s===1)return s=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return s|=2,Promise.resolve(o).then(r,function(l){return i(l),r()})}else s|=1}catch(l){i(l)}if(s===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return r()}})(typeof SuppressedError=="function"?SuppressedError:function(a,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=a,n.suppressed=t,n});class m0{constructor(){this._connectedTrack=null,this._closingPromise=null,this._closed=!1,this._nominalBitrate=null}_ensureValidAdd(){if(!this._connectedTrack)throw new Error("Source is not connected to an output track.");if(this._connectedTrack.output.state==="canceled")throw new Error("Output has been canceled.");if(this._connectedTrack.output.state==="finalizing"||this._connectedTrack.output.state==="finalized")throw new Error("Output has been finalized.");if(this._connectedTrack.output.state==="pending")throw new Error("Output has not started.");if(this._closed)throw new Error("Source is closed.")}async _start(){}async _flushAndClose(t){}close(){if(this._closingPromise)return;const t=this._connectedTrack;if(!t)throw new Error("Cannot call close without connecting the source to an output track.");if(t.output.state==="pending")throw new Error("Cannot call close before output has been started.");this._closingPromise=(async()=>{await this._flushAndClose(!1),this._closed=!0,!(t.output.state==="finalizing"||t.output.state==="finalized")&&t.output._muxer.onTrackClose(t)})()}async _flushOrWaitForOngoingClose(t){return this._closingPromise??=(async()=>{await this._flushAndClose(t),this._closed=!0})()}}class d2 extends m0{constructor(t){if(super(),!Mr.includes(t))throw new TypeError(`Invalid video codec '${t}'. Must be one of: ${Mr.join(", ")}.`);this._codec=t}}const u2=(a,t)=>{if(a.metadata.hasOnlyKeyPackets&&t.type!=="key")throw new Error("Cannot add non-key packets to a hasOnlyKeyPackets video track.")};class o7{setError(t){this.errorSet||(this.error=t,this.errorSet=!0)}constructor(t,i){this.source=t,this.encodingConfig=i,this.ensureEncoderPromise=null,this.encoderInitialized=!1,this.encoder=null,this.muxer=null,this.lastMultipleOfKeyFrameInterval=-1,this.emittedEncoderPackets=0,this.codedWidth=null,this.codedHeight=null,this.outputWidth=null,this.outputHeight=null,this.frameRateLastSample=null,this.frameRateLastTimestamp=null,this.frameRateLastEndTimestamp=null,this.preciseTimings=[],this.customEncoder=null,this.customEncoderCallSerializer=new Hb,this.customEncoderQueueSize=0,this.defaultEncodeOptions={},this.alphaEncoder=null,this.splitter=null,this.splitterCreationFailed=!1,this.alphaFrameQueue=[],this.error=null,this.errorSet=!1,this.lastMuxerPromise=Promise.resolve(),this.closed=!1}async add(t,i,n){const s=t;try{this.checkForEncoderError(),this.source._ensureValidAdd();const r=this.encodingConfig,o=r.sizeChangeBehavior??"deny";let l=!1;if(this.codedWidth!==null&&this.codedHeight!==null){if((t.codedWidth!==this.codedWidth||t.codedHeight!==this.codedHeight)&&(l=!0,o==="deny"))throw new Error(`Video sample size must remain constant. Expected ${this.codedWidth}x${this.codedHeight}, got ${t.codedWidth}x${t.codedHeight}. To allow the sample size to change over time, set \`sizeChangeBehavior\` to a value other than 'deny' in the encoding options.`)}else this.codedWidth=t.codedWidth,this.codedHeight=t.codedHeight;if(r.transform?.width!==void 0||r.transform?.height!==void 0||r.transform?.rotate!==void 0||r.transform?.flip!==void 0||r.transform?.crop!==void 0||r.transform?.force===!0||l&&o!=="passThrough"){let h=r.transform?.width,m=r.transform?.height,p=r.transform?.fit??"fill";l&&o!=="passThrough"&&(We(this.outputWidth),We(this.outputHeight),We(o!=="deny"),h=this.outputWidth,m=this.outputHeight,p=o);const u=await t.transform({width:h,height:m,roundDimensionsTo:2,crop:r.transform?.crop,rotate:r.transform?.rotate,flip:r.transform?.flip,fit:p,alpha:r.alpha});(this.outputWidth===null||this.outputHeight===null)&&(this.outputWidth=u.displayWidth,this.outputHeight=u.displayHeight),i&&t.close(),t=u,i=!0}else(this.outputWidth===null||this.outputHeight===null)&&(this.outputWidth=t.codedWidth,this.outputHeight=t.codedHeight);const g=r.transform?.frameRate;if(g!==void 0){const h=t.timestamp+t.duration,m=Vb(t.timestamp,g);if(this.frameRateLastSample!==null)if(m<=this.frameRateLastTimestamp){this.frameRateLastSample.close(),this.frameRateLastSample=t.clone(),this.frameRateLastEndTimestamp=h;return}else await this.padFrameRate(m,n);t===s&&(t=t.clone(),i=!0),t.setTimestamp(m),t.setDuration(1/g),this.frameRateLastSample?.close(),this.frameRateLastSample=t.clone(),this.frameRateLastTimestamp=m,this.frameRateLastEndTimestamp=h}await this.processAndEncode(t,n)}finally{i&&t.close()}}async processAndEncode(t,i){const n=this.encodingConfig;let s;if(n.transform?.process){let r=n.transform.process(t);if(Ho(r)&&(r=await r),r===null)return;Array.isArray(r)||(r=[r]);const o=[];try{for(const l of r)l instanceof Os?o.push(l):typeof VideoFrame<"u"&&l instanceof VideoFrame?o.push(new Os(l)):o.push(new Os(l,{timestamp:t.timestamp,duration:t.duration}))}catch(l){for(const c of o)c!==t&&c.close();for(const c of r)(c instanceof Os&&c!==t||typeof VideoFrame<"u"&&c instanceof VideoFrame)&&c.close();throw l}s=o}else s=[t];try{for(const r of s){if(this.encoderInitialized||(this.ensureEncoderPromise||this.ensureEncoder(r),this.encoderInitialized||await this.ensureEncoderPromise),We(this.encoderInitialized),this.closed)break;const o=this.encodingConfig.keyFrameInterval??2,l=Math.floor(r.timestamp/o),c={...this.defaultEncodeOptions,...r.encodeOptions,...i},d={...c,keyFrame:c.keyFrame!==void 0?c.keyFrame:o===0||l!==this.lastMultipleOfKeyFrameInterval};if(this.lastMultipleOfKeyFrameInterval=l,this.encodingConfig.onEncodedSample?.(r),this.customEncoder){this.customEncoderQueueSize++;const g=r.clone(),h=this.customEncoderCallSerializer.call(()=>this.customEncoder.encode(g,d)).catch(m=>this.setError(m)).finally(()=>{this.customEncoderQueueSize--,g.close()});this.customEncoderQueueSize>=4&&await h}else{We(this.encoder);const g=r.toVideoFrame(),h=Db(this.preciseTimings,g.timestamp,p=>p.microsecondTimestamp),m=h!==-1?this.preciseTimings[h]:null;if(m&&m.microsecondTimestamp===g.timestamp?(m.timestamp!==r.timestamp&&(m.timestampIsValid=!1),m.duration!==r.duration&&(m.durationIsValid=!1)):(this.preciseTimings.splice(h+1,0,{microsecondTimestamp:g.timestamp,timestamp:r.timestamp,duration:r.duration,timestampIsValid:!0,durationIsValid:!0}),this.preciseTimings.length>128&&this.preciseTimings.shift()),this.alphaEncoder)if(!!g.format&&!g.format.includes("A")||this.splitterCreationFailed){this.alphaFrameQueue.push(null);try{this.encoder.encode(g,d)}finally{g.close()}}else{this.splitter||(this.splitter=new l7);const{colorFrame:u,alphaFrame:f}=await this.splitter.split(g);this.alphaFrameQueue.push(f);try{this.encoder.encode(u,d)}finally{u.close()}}else try{this.encoder.encode(g,d)}finally{g.close()}this.encoder.encodeQueueSize>=4&&await new Promise(p=>this.encoder.addEventListener("dequeue",p,{once:!0}))}await this.lastMuxerPromise}}finally{for(const r of s)r!==t&&r.close()}}async padFrameRate(t,i){const n=this.encodingConfig.transform.frameRate;We(this.frameRateLastSample);const s=Math.round((t-this.frameRateLastTimestamp)*n);for(let r=1;r{const i=Ff(this.encodingConfig.quality,this.encodingConfig.bitrate);We(i!==void 0);const n=By({...this.encodingConfig,quality:i,width:t.codedWidth,height:t.codedHeight,squarePixelWidth:t.squarePixelWidth,squarePixelHeight:t.squarePixelHeight,framerate:this.source._connectedTrack?.metadata.frameRate});let s=null,r;for(const l of n){const c=l.config;if(this.encodingConfig.onEncoderConfig?.(c),r=Ly.find(g=>g.supports(this.encodingConfig.codec,c)),r){s=l;break}if(typeof VideoEncoder>"u")continue;if(c.alpha="discard",this.encodingConfig.alpha==="keep"&&(c.latencyMode="quality"),(c.width%2===1||c.height%2===1)&&(this.encodingConfig.codec==="avc"||this.encodingConfig.codec==="hevc"))throw new Error(`The dimensions ${c.width}x${c.height} are not supported for codec '${this.encodingConfig.codec}'; both width and height must be even numbers. Make sure to round your dimensions to the nearest even number.`);try{if((await VideoEncoder.isConfigSupported(c)).supported){s=l;break}}catch{}}if(!s){if(typeof VideoEncoder>"u")throw new Error(Qb("VideoEncoder"));const l=n[0].config,c=n.map(({config:d,quantizer:g})=>g!==null?`quantizer ${g}`:`${d.bitrate} bps`);throw new Error(`This specific encoder configuration (${l.codec}, ${c.join(" / ")}, ${l.width}x${l.height}, hardware acceleration: ${l.hardwareAcceleration??"no-preference"}) is not supported in this environment. Consider using another codec or changing your video parameters.`)}const o=s.config;if(s.quantizer!==null?this.defaultEncodeOptions=Iy(this.encodingConfig.codec,s.quantizer):this.source._nominalBitrate=o.bitrate??null,r)this.customEncoder=new r,this.customEncoder.codec=this.encodingConfig.codec,this.customEncoder.config=o,this.customEncoder.onPacket=(l,c)=>{if(!(l instanceof Hr))throw new TypeError("The first argument passed to onPacket must be an EncodedPacket.");if(c!==void 0&&(!c||typeof c!="object"))throw new TypeError("The second argument passed to onPacket must be an object or undefined.");u2(this.source._connectedTrack,l),this.encodingConfig.onEncodedPacket?.(l,c),this.lastMuxerPromise=this.muxer.addEncodedVideoPacket(this.source._connectedTrack,l,c).catch(d=>{this.setError(d)})},this.customEncoder.onError=l=>{this.setError(l)},await this.customEncoder.init();else{const l=[],c=[];let d=0,g=0;const h=(p,u,f)=>{const _={};if(u){const M=new Uint8Array(u.byteLength);u.copyTo(M),_.alpha=M}let v=Hr.fromEncodedChunk(p,_);const b=Db(this.preciseTimings,p.timestamp,M=>M.microsecondTimestamp),S=b!==-1?this.preciseTimings[b]:null;let $=null;this.emittedEncoderPackets===0&&v.type==="delta"&&f?.decoderConfig&&($=UA(this.encodingConfig.codec,f.decoderConfig,v.data)),(S&&S.microsecondTimestamp===p.timestamp||$!==null)&&(v=v.clone({timestamp:S?.timestampIsValid?S.timestamp:void 0,duration:S?.durationIsValid?S.duration:void 0,type:$??void 0})),u2(this.source._connectedTrack,v),this.encodingConfig.onEncodedPacket?.(v,f),this.lastMuxerPromise=this.muxer.addEncodedVideoPacket(this.source._connectedTrack,v,f).catch(M=>{this.setError(M)}),this.emittedEncoderPackets++},m=new Error("Encoding error").stack;if(this.encoder=new VideoEncoder({output:(p,u)=>{if(!this.alphaEncoder){h(p,null,u);return}const f=this.alphaFrameQueue.shift();We(f!==void 0),f?(this.alphaEncoder.encode(f,{...this.defaultEncodeOptions,keyFrame:p.type==="key"}),g++,f.close(),l.push({chunk:p,meta:u})):g===0?h(p,null,u):(c.push(d+g),l.push({chunk:p,meta:u}))},error:p=>{p.stack=m,this.setError(p)}}),this.encoder.configure(o),this.encodingConfig.alpha==="keep"){const p=new Error("Encoding error").stack;this.alphaEncoder=new VideoEncoder({output:(u,f)=>{g--;const _=l.shift();for(We(_!==void 0),h(_.chunk,u,_.meta),d++;c.length>0&&c[0]===d;){c.shift();const v=l.shift();We(v!==void 0),h(v.chunk,null,v.meta)}},error:u=>{u.stack=p,this.setError(u)}}),this.alphaEncoder.configure(o)}}We(this.source._connectedTrack),this.muxer=this.source._connectedTrack.output._muxer,this.encoderInitialized=!0})()}async flushAndClose(t){try{if(!t&&(this.checkForEncoderError(),this.frameRateLastSample)){const i=this.encodingConfig.transform.frameRate,n=Vb(this.frameRateLastEndTimestamp,i);await this.padFrameRate(n)}this.closed=!0,t||(this.customEncoder?this.customEncoderCallSerializer.call(()=>this.customEncoder.flush()):this.encoder&&(await this.encoder.flush(),await this.alphaEncoder?.flush(),await fA(25)))}finally{this.closed=!0,this.frameRateLastSample?.close(),this.frameRateLastSample=null,this.customEncoder?await this.customEncoderCallSerializer.call(()=>this.customEncoder.close()).catch(i=>this.setError(i)):this.encoder&&(this.encoder.state!=="closed"&&this.encoder.close(),this.alphaEncoder&&this.alphaEncoder.state!=="closed"&&this.alphaEncoder.close(),this.alphaFrameQueue.forEach(i=>i?.close()),this.alphaFrameQueue.length=0,this.splitter?.close())}t||this.checkForEncoderError()}getQueueSize(){return this.customEncoder?this.customEncoderQueueSize:this.encoder?.encodeQueueSize??0}checkForEncoderError(){if(this.errorSet)throw this.error}}let g0=null;class l7{constructor(){this.worker=null,this.pendingRequests=new Map,this.nextRequestId=0}split(t){if(!this.worker){if(!g0){const s=new Blob([`(${c7.toString()})()`],{type:"application/javascript"});g0=URL.createObjectURL(s)}this.worker=new Worker(g0),this.worker.addEventListener("message",s=>{const r=s.data,o=this.pendingRequests.get(r.id);o&&(this.pendingRequests.delete(r.id),"error"in r?o.reject(new Error(r.error)):o.resolve({colorFrame:r.colorFrame,alphaFrame:r.alphaFrame}))}),this.worker.addEventListener("error",s=>{const r=new Error(s.message||"Color/alpha splitter worker error.");for(const o of this.pendingRequests.values())o.reject(r);this.pendingRequests.clear()})}const i=this.nextRequestId++,n=Em();return this.pendingRequests.set(i,n),this.worker.postMessage({id:i,sourceFrame:t},{transfer:[t]}),n.promise}close(){this.worker?.terminate(),this.worker=null;const t=new Error("Color/alpha splitter closed.");for(const i of this.pendingRequests.values())i.reject(t);this.pendingRequests.clear()}}const c7=()=>{let a=null,t=Promise.resolve();self.addEventListener("message",r=>{const{id:o,sourceFrame:l}=r.data;t=t.then(async()=>{try{const{colorFrame:c,alphaFrame:d}=await i(l);self.postMessage({id:o,colorFrame:c,alphaFrame:d},{transfer:[c,d]})}catch(c){self.postMessage({id:o,error:c.message})}finally{l.close()}})});const i=async r=>{const o=r.format;if(!o)throw new Error("CPU color/alpha splitting requires a known VideoFrame format.");const l=r.allocationSize();if((!a||a.byteLength!==l)&&(a=new Uint8Array(l)),await r.copyTo(a),o==="RGBA"||o==="BGRA")return n(a,o,r);if(o==="I420A"||o==="I420AP10"||o==="I420AP12"||o==="I422A"||o==="I422AP10"||o==="I422AP12"||o==="I444A"||o==="I444AP10"||o==="I444AP12")return s(a,o,r);throw new Error(`CPU color/alpha splitting does not support format '${o}'.`)},n=(r,o,l)=>{const c=l.visibleRect?.width??l.codedWidth,d=l.visibleRect?.height??l.codedHeight,g=c*d,h=Math.ceil(c/2),m=Math.ceil(d/2),p=g+h*m*2,u=new Uint8Array(p);for(let b=0,S=3;b{const c=l.visibleRect?.width??l.codedWidth,d=l.visibleRect?.height??l.codedHeight,g=o.includes("P10"),h=o.includes("P12"),m=g||h?2:1;let p,u;o.startsWith("I420")?(p=Math.ceil(c/2),u=Math.ceil(d/2)):o.startsWith("I422")?(p=Math.ceil(c/2),u=d):(p=c,u=d);const f=c*d,_=p*u,v=f*m,b=_*m,S=f*m,$=v+b*2,M=o.replace("A",""),N=Math.ceil(c/2),P=Math.ceil(d/2),C=N*P,j=C*m,G=S+2*j,A=new Uint8Array(G),B=$;A.set(r.subarray(B,B+S),0);const H=S,U=g?512:h?2048:128;m===1?A.fill(U,H):new Uint16Array(A.buffer,H,2*C).fill(U);const E=g?"I420P10":h?"I420P12":"I420",O=new VideoFrame(r.subarray(0,$),{format:M,codedWidth:c,codedHeight:d,timestamp:l.timestamp,duration:l.duration??void 0}),V={format:E,codedWidth:c,codedHeight:d,timestamp:l.timestamp,duration:l.duration??void 0,transfer:[A.buffer]},L=new VideoFrame(A,V);return{colorFrame:O,alphaFrame:L}}};class d7 extends d2{constructor(t,i){if(!(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)&&!(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas))throw new TypeError("canvas must be an HTMLCanvasElement or OffscreenCanvas.");MG(i),super(i.codec),this._encoder=new o7(this,i),this._canvas=t}add(t,i=0,n){if(!Number.isFinite(t))throw new TypeError("timestamp must be a finite number.");if(!Number.isFinite(i)||i<0)throw new TypeError("duration must be a non-negative number.");const s=new Os(this._canvas,{timestamp:t,duration:i});return this._encoder.add(s,!0,n)}_flushAndClose(t){return this._encoder.flushAndClose(t)}}class f2 extends m0{constructor(t){if(super(),!Wo.includes(t))throw new TypeError(`Invalid audio codec '${t}'. Must be one of: ${Wo.join(", ")}.`);this._codec=t}}class u7{setError(t){this.errorSet||(this.error=t,this.errorSet=!0)}constructor(t,i){this.source=t,this.encodingConfig=i,this.ensureEncoderPromise=null,this.encoderInitialized=!1,this.encoder=null,this.muxer=null,this.lastNumberOfChannels=null,this.lastSampleRate=null,this.isPcmEncoder=!1,this.outputSampleSize=null,this.writeOutputValue=null,this.customEncoder=null,this.customEncoderCallSerializer=new Hb,this.customEncoderQueueSize=0,this.lastEndSampleIndex=null,this.resampler=null,this.error=null,this.errorSet=!1,this.lastMuxerPromise=Promise.resolve(),this.closed=!1}async add(t,i){try{if(this.checkForEncoderError(),this.source._ensureValidAdd(),this.lastNumberOfChannels!==null&&this.lastSampleRate!==null){if(t.numberOfChannels!==this.lastNumberOfChannels||t.sampleRate!==this.lastSampleRate)throw new Error(`Audio parameters must remain constant. Expected ${this.lastNumberOfChannels} channels at ${this.lastSampleRate} Hz, got ${t.numberOfChannels} channels at ${t.sampleRate} Hz.`)}else this.lastNumberOfChannels=t.numberOfChannels,this.lastSampleRate=t.sampleRate;const n=this.encodingConfig;n.transform?.numberOfChannels!==void 0||n.transform?.sampleRate!==void 0?(this.resampler||(this.resampler=new n7({targetNumberOfChannels:n.transform.numberOfChannels??t.numberOfChannels,targetSampleRate:n.transform.sampleRate??t.sampleRate,onSample:async r=>{await this.processAndEncode(r,!0)}})),await this.resampler.add(t)):await this.processAndEncode(t,i)}finally{i&&t.close()}}async processAndEncode(t,i){const n=this.encodingConfig;if(n.transform?.sampleFormat!==void 0&&AG(t.format)!==n.transform.sampleFormat){const s=FG(t,n.transform.sampleFormat);i&&t.close(),t=s,i=!0}if(n.transform?.process)try{let s=n.transform.process(t);if(Ho(s)&&(s=await s),s===null)return;Array.isArray(s)||(s=[s]);try{for(const r of s)if(!(r instanceof Is))throw new TypeError("The audio process function must return an AudioSample, null, or an array of AudioSamples.");for(const r of s)await this.encodeSample(r,!0)}finally{for(const r of s)r instanceof Is&&r.close()}}finally{i&&t.close()}else await this.encodeSample(t,i)}async encodeSample(t,i){try{if(this.encoderInitialized||(this.ensureEncoderPromise||this.ensureEncoder(t),this.encoderInitialized||await this.ensureEncoderPromise),We(this.encoderInitialized),this.closed)return;{const n=Math.round(t.timestamp*t.sampleRate),s=Math.round((t.timestamp+t.duration)*t.sampleRate);if(this.lastEndSampleIndex===null)this.lastEndSampleIndex=s;else{const r=n-this.lastEndSampleIndex;if(r>=64){const o=new Is({data:new Float32Array(r*t.numberOfChannels),format:"f32-planar",sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels,numberOfFrames:r,timestamp:this.lastEndSampleIndex/t.sampleRate});await this.encodeSample(o,!0)}this.lastEndSampleIndex+=t.numberOfFrames}}if(this.encodingConfig.onEncodedSample?.(t),this.customEncoder){this.customEncoderQueueSize++;const n=t.clone(),s=this.customEncoderCallSerializer.call(()=>this.customEncoder.encode(n)).catch(r=>this.setError(r)).finally(()=>{this.customEncoderQueueSize--,n.close()});this.customEncoderQueueSize>=4&&await s,await this.lastMuxerPromise}else if(this.isPcmEncoder)await this.doPcmEncoding(t,i);else{We(this.encoder);const n=t.toAudioData();this.encoder.encode(n),n.close(),i&&t.close(),this.encoder.encodeQueueSize>=4&&await new Promise(s=>this.encoder.addEventListener("dequeue",s,{once:!0})),await this.lastMuxerPromise}}finally{i&&t.close()}}async doPcmEncoding(t,i){We(this.outputSampleSize),We(this.writeOutputValue);const{numberOfChannels:n,numberOfFrames:s,sampleRate:r,timestamp:o}=t,l=2048,c=[];for(let f=0;f{const{numberOfChannels:i,sampleRate:n}=t,s=Ff(this.encodingConfig.quality,this.encodingConfig.bitrate),r=jy({numberOfChannels:i,sampleRate:n,...this.encodingConfig,quality:s});this.encodingConfig.onEncoderConfig?.(r),this.source._nominalBitrate=r.bitrate??null;const o=Vy.find(l=>l.supports(this.encodingConfig.codec,r));if(o)this.customEncoder=new o,this.customEncoder.codec=this.encodingConfig.codec,this.customEncoder.config=r,this.customEncoder.onPacket=(l,c)=>{if(!(l instanceof Hr))throw new TypeError("The first argument passed to onPacket must be an EncodedPacket.");if(c!==void 0&&(!c||typeof c!="object"))throw new TypeError("The second argument passed to onPacket must be an object or undefined.");this.encodingConfig.onEncodedPacket?.(l,c),this.lastMuxerPromise=this.muxer.addEncodedAudioPacket(this.source._connectedTrack,l,c).catch(d=>{this.setError(d)})},this.customEncoder.onError=l=>{this.setError(l)},await this.customEncoder.init();else if(Ns.includes(this.encodingConfig.codec))this.initPcmEncoder();else{if(typeof AudioEncoder>"u")throw new Error(Qb("AudioEncoder"));let l;try{l=(await AudioEncoder.isConfigSupported(r)).supported??!1}catch{l=!1}if(!l)throw new Error(`This specific encoder configuration (${r.codec}, ${r.bitrate} bps, ${r.numberOfChannels} channels, ${r.sampleRate} Hz) is not supported in this environment. Consider using another codec or changing your audio parameters.`);const c=new Error("Encoding error").stack;this.encoder=new AudioEncoder({output:(d,g)=>{if(this.encodingConfig.codec==="aac"&&g?.decoderConfig){let m=!1;if(!g.decoderConfig.description||g.decoderConfig.description.byteLength<2?m=!0:m=hA(Gs(g.decoderConfig.description)).objectType===0,m){const p=Number(Fr(r.codec.split(".")));g.decoderConfig.description=Hm({objectType:p,outputNumberOfChannels:g.decoderConfig.numberOfChannels,outputSampleRate:g.decoderConfig.sampleRate})}}let h=Hr.fromEncodedChunk(d);h=h.clone({timestamp:kf(h.timestamp,r.sampleRate),duration:d.duration!=null?kf(h.duration,r.sampleRate):void 0}),this.encodingConfig.onEncodedPacket?.(h,g),this.lastMuxerPromise=this.muxer.addEncodedAudioPacket(this.source._connectedTrack,h,g).catch(m=>{this.setError(m)})},error:d=>{d.stack=c,this.setError(d)}}),this.encoder.configure(r)}We(this.source._connectedTrack),this.muxer=this.source._connectedTrack.output._muxer,this.encoderInitialized=!0})()}initPcmEncoder(){this.isPcmEncoder=!0;const t=this.encodingConfig.codec,{dataType:i,sampleSize:n,littleEndian:s}=Qo(t);switch(this.outputSampleSize=n,n){case 1:i==="unsigned"?this.writeOutputValue=(r,o,l)=>r.setUint8(o,rs(Math.round(l*128)+128,0,255)):i==="signed"?this.writeOutputValue=(r,o,l)=>{r.setInt8(o,rs(Math.round(l*128),-128,127))}:i==="ulaw"?this.writeOutputValue=(r,o,l)=>{const c=rs(Math.round(l*32768),-32768,32767);r.setUint8(o,RG(c))}:i==="alaw"?this.writeOutputValue=(r,o,l)=>{const c=rs(Math.round(l*32768),-32768,32767);r.setUint8(o,BG(c))}:We(!1);break;case 2:i==="unsigned"?this.writeOutputValue=(r,o,l)=>r.setUint16(o,rs(Math.round(l*32768)+32768,0,65535),s):i==="signed"?this.writeOutputValue=(r,o,l)=>r.setInt16(o,rs(Math.round(l*32768),-32768,32767),s):We(!1);break;case 3:i==="unsigned"?this.writeOutputValue=(r,o,l)=>Um(r,o,rs(Math.round(l*8388608)+8388608,0,16777215),s):i==="signed"?this.writeOutputValue=(r,o,l)=>ZC(r,o,rs(Math.round(l*8388608),-8388608,8388607),s):We(!1);break;case 4:i==="unsigned"?this.writeOutputValue=(r,o,l)=>r.setUint32(o,rs(Math.round(l*2147483648)+2147483648,0,4294967295),s):i==="signed"?this.writeOutputValue=(r,o,l)=>r.setInt32(o,rs(Math.round(l*2147483648),-2147483648,2147483647),s):i==="float"?this.writeOutputValue=(r,o,l)=>r.setFloat32(o,l,s):We(!1);break;case 8:i==="float"?this.writeOutputValue=(r,o,l)=>r.setFloat64(o,l,s):We(!1);break;default:yo(n),We(!1)}}async flushAndClose(t){try{t||(this.checkForEncoderError(),this.resampler&&await this.resampler.finalize()),this.closed=!0,t||(this.customEncoder?this.customEncoderCallSerializer.call(()=>this.customEncoder.flush()):this.encoder&&await this.encoder.flush())}finally{this.closed=!0,this.resampler=null,this.customEncoder?await this.customEncoderCallSerializer.call(()=>this.customEncoder.close()).catch(i=>this.setError(i)):this.encoder&&this.encoder.state!=="closed"&&this.encoder.close()}t||this.checkForEncoderError()}getQueueSize(){return this.customEncoder?this.customEncoderQueueSize:this.isPcmEncoder?0:this.encoder?.encodeQueueSize??0}checkForEncoderError(){if(this.errorSet)throw this.error}}class p2 extends f2{constructor(t,i={}){if(zG(t),typeof i!="object"||!i)throw new TypeError("options must be an object.");if(i.startTimestamp!==void 0&&!Number.isFinite(i.startTimestamp))throw new TypeError("options.startTimestamp, when provided, must be a finite number.");super(t.codec),this._encoder=new u7(this,t),this._accumulatedTime=i.startTimestamp??0}async add(t){if(!(t instanceof AudioBuffer))throw new TypeError("audioBuffer must be an AudioBuffer.");const i=Is._fromAudioBuffer(t,this._accumulatedTime);this._accumulatedTime+=t.duration;for(const n of i)await this._encoder.add(n,!0)}_flushAndClose(t){return this._encoder.flushAndClose(t)}}class f7 extends m0{constructor(t){if(super(),!Bl.includes(t))throw new TypeError(`Invalid subtitle codec '${t}'. Must be one of: ${Bl.join(", ")}.`);this._codec=t}}class h0{get supportsVideoRotationMetadata(){return this.supportsVideoTransformationMetadata}getSupportedVideoCodecs(){return this.getSupportedCodecs().filter(t=>Mr.includes(t))}getSupportedAudioCodecs(){return this.getSupportedCodecs().filter(t=>Wo.includes(t))}getSupportedSubtitleCodecs(){return this.getSupportedCodecs().filter(t=>Bl.includes(t))}_codecUnsupportedHint(t){return""}_isFragmentedIsobmff(){return!1}}class _0 extends h0{constructor(t={}){if(!t||typeof t!="object")throw new TypeError("options must be an object.");if(t.fastStart!==void 0&&![!1,"in-memory","reserve","fragmented"].includes(t.fastStart))throw new TypeError("options.fastStart, when provided, must be false, 'in-memory', 'reserve', or 'fragmented'.");if(t.minimumFragmentDuration!==void 0&&(!Kb(t.minimumFragmentDuration)||t.minimumFragmentDuration<0))throw new TypeError("options.minimumFragmentDuration, when provided, must be a non-negative number.");if(t.onFtyp!==void 0&&typeof t.onFtyp!="function")throw new TypeError("options.onFtyp, when provided, must be a function.");if(t.onMoov!==void 0&&typeof t.onMoov!="function")throw new TypeError("options.onMoov, when provided, must be a function.");if(t.onMdat!==void 0&&typeof t.onMdat!="function")throw new TypeError("options.onMdat, when provided, must be a function.");if(t.onMoof!==void 0&&typeof t.onMoof!="function")throw new TypeError("options.onMoof, when provided, must be a function.");if(t.metadataFormat!==void 0&&!["mdir","mdta","udta","auto"].includes(t.metadataFormat))throw new TypeError("options.metadataFormat, when provided, must be either 'auto', 'mdir', 'mdta', or 'udta'.");super(),this._options=t}getSupportedTrackCounts(){return{video:{min:0,max:4294967295},audio:{min:0,max:4294967295},subtitle:{min:0,max:4294967295},total:{min:0,max:4294967295}}}get supportsVideoTransformationMetadata(){return!0}get supportsTimestampedMediaData(){return!0}get negativeTimestampSupport(){return"full"}_createMuxer(t){return new ZF(t,this)}_isFragmentedIsobmff(){return this._options.fastStart==="fragmented"}}class m2 extends _0{constructor(t){super(t)}get _name(){return"MP4"}get fileExtension(){return".mp4"}get mimeType(){return"video/mp4"}getSupportedCodecs(){return[...Mr,...Tf,"pcm-s16","pcm-s16be","pcm-s24","pcm-s24be","pcm-s32","pcm-s32be","pcm-f32","pcm-f32be","pcm-f64","pcm-f64be",...Bl]}_codecUnsupportedHint(t){return new h2().getSupportedCodecs().includes(t)?" Switching to MOV will grant support for this codec.":""}}class g2 extends _0{constructor(t){super(t)}get _name(){return"CMAF"}get fileExtension(){return".m4s"}get mimeType(){return"video/mp4"}getSupportedCodecs(){return[...Mr,...Tf,"pcm-s16","pcm-s16be","pcm-s24","pcm-s24be","pcm-s32","pcm-s32be","pcm-f32","pcm-f32be","pcm-f64","pcm-f64be",...Bl]}}class h2 extends _0{constructor(t){super(t)}get _name(){return"MOV"}get fileExtension(){return".mov"}get mimeType(){return"video/quicktime"}getSupportedCodecs(){return[...Mr,...Wo]}_codecUnsupportedHint(t){return new m2().getSupportedCodecs().includes(t)?" Switching to MP4 will grant support for this codec.":""}}class _2 extends h0{constructor(t={}){if(!t||typeof t!="object")throw new TypeError("options must be an object.");if(t.appendOnly!==void 0&&typeof t.appendOnly!="boolean")throw new TypeError("options.appendOnly, when provided, must be a boolean.");if(t.minimumClusterDuration!==void 0&&(!Kb(t.minimumClusterDuration)||t.minimumClusterDuration<0))throw new TypeError("options.minimumClusterDuration, when provided, must be a non-negative number.");if(t.onEbmlHeader!==void 0&&typeof t.onEbmlHeader!="function")throw new TypeError("options.onEbmlHeader, when provided, must be a function.");if(t.onSegmentHeader!==void 0&&typeof t.onSegmentHeader!="function")throw new TypeError("options.onHeader, when provided, must be a function.");if(t.onCluster!==void 0&&typeof t.onCluster!="function")throw new TypeError("options.onCluster, when provided, must be a function.");super(),this._options=t}_createMuxer(t){return new i7(t,this)}get _name(){return"Matroska"}getSupportedTrackCounts(){return{video:{min:0,max:127},audio:{min:0,max:127},subtitle:{min:0,max:127},total:{min:0,max:127}}}get fileExtension(){return".mkv"}get mimeType(){return"video/x-matroska"}getSupportedCodecs(){return[...Mr,...Tf,...Ns.filter(t=>!["pcm-s8","pcm-f32be","pcm-f64be","ulaw","alaw"].includes(t)),...Bl]}get supportsVideoTransformationMetadata(){return!1}get supportsTimestampedMediaData(){return!0}get negativeTimestampSupport(){return"prefer-non-negative"}}class Uf extends _2{constructor(t){super(t)}getSupportedCodecs(){return[...Mr.filter(t=>["vp8","vp9","av1"].includes(t)),...Wo.filter(t=>["opus","vorbis"].includes(t)),...Bl]}get _name(){return"WebM"}get fileExtension(){return".webm"}get mimeType(){return"video/webm"}_codecUnsupportedHint(t){return new _2().getSupportedCodecs().includes(t)?" Switching to MKV will grant support for this codec.":""}}const v2=["video","audio","subtitle"];class Yd{constructor(t,i,n,s,r){this.id=t,this.output=i,this.type=n,this.source=s,this.metadata=r}isVideoTrack(){return this.type==="video"}isAudioTrack(){return this.type==="audio"}isSubtitleTrack(){return this.type==="subtitle"}canBePairedWith(t){if(!(t instanceof Yd))throw new TypeError("other must be an OutputTrack.");if(this===t)return!1;const i=Yb(this.metadata.group),n=Yb(t.metadata.group);for(const s of i)if(this.type!==t.type&&n.some(l=>s===l)||n.some(l=>s._pairedGroups.has(l)))return!0;return!1}}class p7 extends Yd{constructor(t,i,n,s){super(t,i,"video",n,s)}}class m7 extends Yd{constructor(t,i,n,s){super(t,i,"audio",n,s)}}class g7 extends Yd{constructor(t,i,n,s){super(t,i,"subtitle",n,s)}}class Jd{constructor(){this._pairedGroups=new Set}pairWith(t){if(!(t instanceof Jd))throw new TypeError("other must be an OutputTrackGroup.");if(this===t)throw new TypeError("Cannot pair a group with itself.");this._pairedGroups.add(t),t._pairedGroups.add(this)}}const v0=a=>{if(!a||typeof a!="object")throw new TypeError("metadata must be an object.");if(a.languageCode!==void 0&&!iA(a.languageCode))throw new TypeError("metadata.languageCode, when provided, must be a three-letter, ISO 639-2/T language code.");if(a.name!==void 0&&typeof a.name!="string")throw new TypeError("metadata.name, when provided, must be a string.");if(a.disposition!==void 0&&gA(a.disposition),a.maximumPacketCount!==void 0&&(!Number.isInteger(a.maximumPacketCount)||a.maximumPacketCount<0))throw new TypeError("metadata.maximumPacketCount, when provided, must be a non-negative integer.");if(a.bitrate!==void 0&&(!Number.isFinite(a.bitrate)||a.bitrate<0))throw new TypeError("metadata.bitrate, when provided, must be a non-negative number.");if(a.averageBitrate!==void 0&&(!Number.isFinite(a.averageBitrate)||a.averageBitrate<0))throw new TypeError("metadata.averageBitrate, when provided, must be a non-negative number.");if(a.group!==void 0&&!(a.group instanceof Jd)&&(!Array.isArray(a.group)||a.group.some(t=>!(t instanceof Jd))))throw new TypeError("metadata.group, when provided, must be an OutputTrackGroup instance or an array of OutputTrackGroup instances.")};class b2 extends Dm{get target(){const t="Output.target cannot be used when using PathedTarget with an async callback. Use the 'target' event instead.";if(this._rootTargetPromise)throw new TypeError(t);const i=this._getRootTarget();if(Ho(i))throw new TypeError(t);return i}constructor(t){if(super(),this.state="pending",this.defaultTrackGroup=new Jd,this.tracks=[],this._onFinalize=null,this._unfinalizedTargets=new Set,this._rootWriterPromise=null,this._startPromise=null,this._cancelPromise=null,this._finalizePromise=null,this._mutex=new Ib,this._metadataTags={},this._rootTarget=null,this._rootTargetPromise=null,this._firstMediaStreamTimestamp=null,!t||typeof t!="object")throw new TypeError("options must be an object.");if(!(t.format instanceof h0))throw new TypeError("options.format must be an OutputFormat.");if(!(t.target instanceof ko||t.target instanceof p0))throw new TypeError("options.target must be a Target or a PathedTarget.");if(t.target instanceof ko&&this._rememberTarget(t.target),t.initTarget!==void 0&&!(t.initTarget instanceof ko)&&typeof t.initTarget!="function")throw new Error("options.initTarget, when provided, must be a Target or a function that returns or resolves to a Target.");if(t.onFinalize!==void 0&&typeof t.onFinalize!="function")throw new TypeError("options.onFinalize, when provided, must be a function.");this.format=t.format,this._target=t.target,this._onFinalize=t.onFinalize??null,this._initTarget=t.initTarget??null,this._initTarget instanceof ko&&this._rememberTarget(this._initTarget),this._muxer=t.format._createMuxer(this)}_getTargetValidated(t){We(this._target instanceof p0);const i=this._target.getTarget(t),n=s=>{if(!(s instanceof ko))throw new TypeError("getTarget must return a Target.");return s};return Ho(i)?i.then(n):n(i)}async _getTarget(t){We(this._target instanceof p0);const i=await this._getTargetValidated(t);return this._emit("target",{target:i,request:t,isRoot:t.isRoot}),this.state==="canceled"?await i._close():this._rememberTarget(i),i}_rememberTarget(t){this._unfinalizedTargets.add(t),t.on("finalized",()=>this._unfinalizedTargets.delete(t),{once:!0})}async _getInitTarget(){if(We(this._initTarget!==null),this._initTarget instanceof ko)return this._initTarget;const t=await this._initTarget();return this.state==="canceled"?await t._close():this._rememberTarget(t),t}_hasInitTarget(){return this._initTarget!==null}_getRootTarget(){if(this._rootTarget)return this._rootTarget;if(this._rootTargetPromise)return this._rootTargetPromise;if(this._target instanceof ko)return this._emit("target",{target:this._target,request:null,isRoot:!0}),this._rootTarget=this._target,this._target;const t={path:this._target.rootPath,isRoot:!0,mimeType:this.format.mimeType},i=this._getTargetValidated(t),n=s=>(this.state==="canceled"?s._close():this._rememberTarget(s),this._emit("target",{target:s,request:t,isRoot:!0}),this._rootTarget=s,s);return Ho(i)?this._rootTargetPromise=i.then(n):n(i)}_getRootWriter(t){return this._rootWriterPromise??=(async()=>{const i=await this._getRootTarget(),n=new d0(i,typeof t=="boolean"?t:t(i));return n.start(),n})()}addVideoTrack(t,i={}){if(!(t instanceof d2))throw new TypeError("source must be a VideoSource.");if(v0(i),i.rotation!==void 0&&![0,90,180,270].includes(i.rotation))throw new TypeError(`Invalid video rotation: ${i.rotation}. Has to be 0, 90, 180 or 270.`);if(i.flip!==void 0&&typeof i.flip!="boolean")throw new TypeError("metadata.flip, when provided, must be a boolean.");if(i.transformationMatrix!==void 0&&(!Array.isArray(i.transformationMatrix)||i.transformationMatrix.length!==9||!i.transformationMatrix.every(s=>Number.isFinite(s))))throw new TypeError("metadata.transformationMatrix, when provided, must be an array of 9 finite numbers.");if(i.frameRate!==void 0&&(!Number.isFinite(i.frameRate)||i.frameRate<=0))throw new TypeError(`Invalid video frame rate: ${i.frameRate}. Must be a positive number.`);if(i.decoderConfig!==void 0&&Ym({decoderConfig:i.decoderConfig},t._codec),i.primingPacket!==void 0){if(!(i.primingPacket instanceof Hr))throw new TypeError("metadata.primingPacket, when provided, must be an EncodedPacket.");if(i.decoderConfig===void 0)throw new TypeError("metadata.primingPacket can only be provided alongside metadata.decoderConfig.")}const n={...i};return n.group??=this.defaultTrackGroup,this._addTrack(new p7(this.tracks.length+1,this,t,n))}addAudioTrack(t,i={}){if(!(t instanceof f2))throw new TypeError("source must be an AudioSource.");if(v0(i),i.decoderConfig!==void 0&&Jm({decoderConfig:i.decoderConfig},t._codec),i.primingPacket!==void 0){if(!(i.primingPacket instanceof Hr))throw new TypeError("metadata.primingPacket, when provided, must be an EncodedPacket.");if(i.decoderConfig===void 0)throw new TypeError("metadata.primingPacket can only be provided alongside metadata.decoderConfig.")}const n={...i};return n.group??=this.defaultTrackGroup,this._addTrack(new m7(this.tracks.length+1,this,t,n))}addSubtitleTrack(t,i={}){if(!(t instanceof f7))throw new TypeError("source must be a SubtitleSource.");v0(i);const n={...i};return n.group??=this.defaultTrackGroup,this._addTrack(new g7(this.tracks.length+1,this,t,n))}setMetadataTags(t){if(mA(t),this.state!=="pending")throw new Error("Cannot set metadata tags after output has been started or canceled.");this._metadataTags=t}_addTrack(t){if(this.state!=="pending")throw new Error("Cannot add track after output has been started or canceled.");if(t.source._connectedTrack)throw new Error("Source is already used for a track.");const i=this.format.getSupportedTrackCounts(),n=this.tracks.reduce((o,l)=>o+(l.type===t.type?1:0),0),s=i[t.type].max;if(n===s)throw new Error(s===0?`${this.format._name} does not support ${t.type} tracks.`:`${this.format._name} does not support more than ${s} ${t.type} track${s===1?"":"s"}.`);const r=i.total.max;if(this.tracks.length===r)throw new Error(`${this.format._name} does not support more than ${r} tracks${r===1?"":"s"} in total.`);if(t.isVideoTrack()){const o=this.format.getSupportedVideoCodecs();if(o.length===0)throw new Error(`${this.format._name} does not support video tracks.`+this.format._codecUnsupportedHint(t.source._codec));if(!o.includes(t.source._codec))throw new Error(`Codec '${t.source._codec}' cannot be contained within ${this.format._name}. Supported video codecs are: ${o.map(l=>`'${l}'`).join(", ")}.`+this.format._codecUnsupportedHint(t.source._codec))}else if(t.isAudioTrack()){const o=this.format.getSupportedAudioCodecs();if(o.length===0)throw new Error(`${this.format._name} does not support audio tracks.`+this.format._codecUnsupportedHint(t.source._codec));if(!o.includes(t.source._codec))throw new Error(`Codec '${t.source._codec}' cannot be contained within ${this.format._name}. Supported audio codecs are: ${o.map(l=>`'${l}'`).join(", ")}.`+this.format._codecUnsupportedHint(t.source._codec))}else if(t.isSubtitleTrack()){const o=this.format.getSupportedSubtitleCodecs();if(o.length===0)throw new Error(`${this.format._name} does not support subtitle tracks.`+this.format._codecUnsupportedHint(t.source._codec));if(!o.includes(t.source._codec))throw new Error(`Codec '${t.source._codec}' cannot be contained within ${this.format._name}. Supported subtitle codecs are: ${o.map(l=>`'${l}'`).join(", ")}.`+this.format._codecUnsupportedHint(t.source._codec))}return this.tracks.push(t),t.source._connectedTrack=t,t}hasEnoughTracks(){const t=this.format.getSupportedTrackCounts();for(const n of v2){const s=this.tracks.reduce((o,l)=>o+(l.type===n?1:0),0),r=t[n].min;if(so+(l.type===n?1:0),0),r=t[n].min;if(s{this.state="started";const n=this._mutex.acquire();try{await this._muxer.start();const s=this.tracks.map(r=>r.source._start());await Promise.all(s)}finally{(await n)()}})()}getMimeType(){return this._muxer.getMimeType()}async cancel(){if(this.state==="canceled")return this._cancelPromise??void 0;if(this.state==="finalizing"||this.state==="finalized"){this.state==="finalized"&&mn._warn("Output has already been finalized.");return}return this._cancelPromise=(async()=>{this.state="canceled";const t=await this._mutex.acquire();try{const i=this.tracks.map(n=>n.source._flushOrWaitForOngoingClose(!0));await Promise.all(i),await Promise.all([...this._unfinalizedTargets].map(n=>n._close())),this._unfinalizedTargets.clear()}finally{t()}})()}async finalize(){if(this.state==="pending")throw new Error("Cannot finalize before starting.");if(this.state==="canceled")throw new Error("Cannot finalize after canceling.");return this._finalizePromise?(mn._warn("Output has already been finalized."),this._finalizePromise):this._finalizePromise=(async()=>{this.state="finalizing";const t=await this._mutex.acquire();try{const i=this.tracks.map(n=>n.source._flushOrWaitForOngoingClose(!1));if(await Promise.all(i),await this._muxer.finalize(),this._rootWriterPromise){const n=await this._rootWriterPromise;n.finalized||(await n.flush(),await n.finalize())}this._onFinalize&&await this._onFinalize(),this.state="finalized"}catch(i){throw this.state="canceled",i}finally{await Promise.all([...this._unfinalizedTargets].map(i=>i._close().catch(()=>{}))),this._unfinalizedTargets.clear(),t()}})()}}function b0(a,t,i){const n=Number(a);if(!Number.isSafeInteger(n)||n<=0)throw new Error(`${i} video has invalid ${t} metadata`);return n}function h7(a,t,i){const n=atob(a.slice(t,t+i)),s=new Uint8Array(n.length);for(let r=0;r"u")throw new Error("This browser does not support H.264 encoding through WebCodecs");const r=b0(t.width,"width",n),o=b0(t.height,"height",n),l=b0(t.frames,"frame count",n),c=Number(t.fps);if(!Number.isFinite(c)||c<=0)throw new Error(`${n} video has invalid frame rate metadata`);const d=r*o*3,g=d/3*4,h=Math.ceil(d*l/3)*4;if(a.length!==h)throw new Error(`${n} RGB24 payload size does not match its video metadata`);const m=document.createElement("canvas");m.width=r,m.height=o;const p=m.getContext("2d",{alpha:!1});if(!p)throw new Error(`Unable to create the ${n} video canvas`);const u=new AudioContext;try{const f=await u.decodeAudioData(await i.arrayBuffer()),_=v7(u,f,l/c),v=new Fs("high"),b=new Fs("high");if(!await UG("avc",{width:r,height:o,quality:v}))throw new Error(`This browser cannot encode H.264 video for ${n} MP4 output`);const S={numberOfChannels:_.numberOfChannels,sampleRate:_.sampleRate,quality:b},$=typeof AudioEncoder<"u"&&await Dy(s,S),M=new Kd,N=new b2({format:new m2({fastStart:"in-memory"}),target:M}),P=new d7(m,{codec:"avc",quality:v,keyFrameInterval:2,onEncodedPacket:(G,A)=>{const B=A?.decoderConfig,H=B?.description;if(A&&B&&H!==void 0){const U={...B};if(H&&typeof H=="object"&&"byteLength"in H){const E=ArrayBuffer.isView(H)?new Uint8Array(H.buffer,H.byteOffset,H.byteLength):new Uint8Array(H);U.description=E.slice().buffer}else delete U.description;A.decoderConfig=U}}}),C=$?new p2({codec:s,quality:b}):null;N.addVideoTrack(P),C&&N.addAudioTrack(C),await N.start(),C&&await C.add(_);const j=1/c;for(let G=0;Gtypeof l?.payload=="string"&&l.meta?.format==="rgb24"):void 0;if(!o||typeof o.payload!="string")return{artifacts:r,warning:`${i} returned no RGB24 video artifact.`};if(!t)return{artifacts:r,warning:`${i} MP4 encoding requires the driving audio.`};try{const l=await b7(o.payload,o.meta||{},t,i,s);return r.push({id:`${n}_video`,extension:"mp4",mime:"video/mp4",url:URL.createObjectURL(l.blob)}),{artifacts:r,warning:l.audioIncluded?"":`Browser ${s.toUpperCase()} encoding is unavailable; the MP4 has no audio track.`}}catch(l){return{artifacts:r,warning:`${i} MP4 encoding failed: ${l instanceof Error?l.message:String(l)}`}}}var y7=ae('
          ');function w7(a,t){Fi(t,!1);let i=Se(t,"busy",8,!1),n=Se(t,"sourceFile",8,null),s=Se(t,"setPanelRunner",8,()=>()=>{}),r=Y(null),o=Y(null);async function l(f){if(!e(r))throw f.warning("Choose a face video.");if(!n())throw f.warning("Choose the speech audio that will drive the lips.");const _=e(r),v=n();await f.ensureLoaded("offline"),f.setStatus("Uploading video and speech audio...");const b=await Gd(_,f.signal),S=await hr(await Gr(v,16e3),f.signal);f.setStatus("Synchronizing lip motion...");const $=await Ul({model:f.modelId,request:{audio:S,options:{...f.options,seed:f.seed,reference_video_file:b}}},f.signal);f.setStatus("Encoding MP4...");const M=await y2($,v,"LatentSync","latentsync","opus");if(M.warning||!M.artifacts.some(N=>N.mime==="video/mp4")){for(const N of M.artifacts)URL.revokeObjectURL(N.url);throw new Error(M.warning)}return{audio:null,text:M.warning,artifacts:M.artifacts,json:JSON.stringify($,(N,P)=>N==="payload"&&typeof P=="string"?``:P,2)}}Jn(()=>s()(l)),Zi();var c=y7(),d=q(k(c),2);Ci(d,f=>y(o,f),()=>e(o));var g=q(d,2),h=q(k(g)),m=k(h,!0);w(h),w(g);var p=q(g,2),u=q(p,2);ss(u,{get file(){return e(r)},kind:"video",label:"Face video preview"}),w(c),ie(()=>{d.disabled=i(),W(m,(e(r),x(()=>e(r)?.name||"No video selected"))),p.disabled=!e(r)||i()}),re("change",d,f=>y(r,f.currentTarget.files?.[0]||null)),re("click",p,()=>{y(r,null),e(o)&&Et(o,e(o).value="")}),J(a,c),Mi()}const k7={latentsync:{component:w7,requestMode:"panel",blocksRunWhileUploading:!1,replacesGenericControls:{text:!0,language:!0,duration:!0,voice:!0,chunking:!0}},fish_drama3:{component:IC,requestMode:"panel",blocksRunWhileUploading:!1,replacesGenericControls:{text:!0,language:!0,voice:!0,chunking:!0,settingsImport:!0,advancedJson:!0}},auk:{component:Eq,requestMode:"default",blocksRunWhileUploading:!1,replacesGenericControls:{packageButtons:!0,text:!1,genSource:!1,language:!0,seed:!1,duration:!0,params:!0,advancedJson:!1}},lfm2_audio:{component:Gb,tasks:["s2s"],requestMode:"panel",blocksRunWhileUploading:!1,replacesGenericControls:{packageButtons:!1,text:!1,genSource:!1,language:!1,seed:!1,duration:!1,params:!1,advancedJson:!1}},lfm3_audio:{component:Gb,tasks:["s2s"],requestMode:"panel",blocksRunWhileUploading:!1,replacesGenericControls:{packageButtons:!1,text:!1,genSource:!1,language:!0,seed:!1,duration:!1,params:!1,advancedJson:!1}},liveavatar:{component:vC,requestMode:"default",blocksRunWhileUploading:!0,replacesGenericControls:{packageButtons:!1,text:!1,genSource:!1,language:!0,seed:!1,duration:!0,params:!0,advancedJson:!0}},yue2:{component:GC,requestMode:"yue2",blocksRunWhileUploading:!0,replacesGenericControls:{packageButtons:!0,text:!0,genSource:!0,language:!0,seed:!0,duration:!0,params:!0,advancedJson:!0}}};function x7(a,t){if(!a)return;const i=k7[a],n=i?.tasks;if(!(n&&!n.includes(t||"")))return i}var S7=ae('
          ',1),T7=ae('
          ',1);function $7(a,t){Fi(t,!1);const i=Y(),n=Y();let s=Se(t,"modelId",8),r=Se(t,"text",12,""),o=Se(t,"lyrics",12,""),l=Se(t,"language",12,""),c=Se(t,"duration",12,30),d=Se(t,"seed",24,()=>-1),g=Se(t,"busy",8,!1),h=Se(t,"adapterEditable",8,!1),m=Se(t,"rewritingCaption",12,!1),p=Se(t,"advancedValues",28,()=>({})),u=Se(t,"paramSpecs",24,()=>[]),f=Se(t,"outputText",12,""),_=Se(t,"outputJson",12,""),v=Se(t,"status",12,""),b=Se(t,"warningStatus",12,""),S=Se(t,"errorStatus",12,""),$=Se(t,"ensureLoaded",8),M=Se(t,"requestOptions",8),N=Se(t,"resolveRequestSeed",8),P=Se(t,"setParameterValue",8),C=Se(t,"onBrowseAdapter",8),j=Se(t,"log",8),G=Se(t,"tr",8);function A(X){if(Array.isArray(X.artifacts)){const ee=X.artifacts.find(ce=>typeof ce=="object"&&ce!==null&&ce.id==="ace_step_caption_plan"&&typeof ce.payload=="string");if(ee){const ce=Uint8Array.from(atob(ee.payload),fe=>fe.charCodeAt(0));return JSON.parse(new TextDecoder().decode(ce))}}return typeof X.text=="string"?{caption:X.text}:{}}async function B(){if(!(g()||m())){if(!r().trim()&&!o().trim()){v("Enter a caption or lyrics to rewrite."),b(v()),S("");return}m(!0),b(""),S(""),v(G()("request.rewritingCaption"));try{await $()();const X={text:r(),seed:N()(d()),duration_seconds:c(),options:{...M()(),rewrite_caption:!0}};l().trim()&&(X.language=l()),o().trim()&&(X.lyrics=o());const ee=await Ul({model:s(),request:X}),ce=A(ee);typeof ce.caption=="string"&&ce.caption.trim()&&r(ce.caption),typeof ce.language=="string"&&ce.language.trim()&&l(ce.language),typeof ce.duration_seconds=="number"&&Number.isFinite(ce.duration_seconds)&&ce.duration_seconds>0&&c(ce.duration_seconds);const fe={...p()};typeof ce.bpm=="number"&&Number.isFinite(ce.bpm)&&(fe.bpm=ce.bpm),typeof ce.keyscale=="string"&&(fe.keyscale=ce.keyscale),typeof ce.timesignature=="string"&&(fe.timesignature=ce.timesignature),p(fe),f(typeof ee.text=="string"?ee.text:""),_(JSON.stringify(ce,null,2)),v("Caption rewritten.")}catch(X){v(X instanceof Error?X.message:String(X)),S(v()),j()(`Caption rewrite failed: ${v()}`)}finally{m(!1)}}}Ue(()=>Q(u()),()=>{y(i,u().find(X=>X.name==="lora"))}),Ue(()=>Q(u()),()=>{y(n,u().find(X=>X.name==="lora_scale"))}),wn(),Zi();var H=T7(),U=ht(H),E=k(U),O=q(E),V=k(O,!0);w(O),w(U);var L=q(U,2);sn(L);var T=q(L,2),F=k(T),z=k(F,!0);w(F),w(T);var D=q(T,2);{var K=X=>{{let ee=Nt(()=>(Q(p()),x(()=>p().lora?1:0)));Am(X,{get selected(){return e(ee)},children:(ce,fe)=>{var le=S7(),ge=ht(le),R=k(ge),we=k(R),pe=q(k(we)),Te=k(pe,!0);w(pe),w(we);var he=q(we,2),Pe=k(he);Pt(Pe);var Le=q(Pe,2);w(he),w(R);var ct=q(R,2),Ae=q(k(ct),2);Pt(Ae),w(ct),w(ge);var Ge=q(ge,2);ie((ne,Je,ue)=>{W(Te,ne),Pe.disabled=g()||m()||!h(),_e(Pe,"title",h()?"":"Set adapter session options in the server configuration."),bi(Pe,Je),Le.disabled=g()||m()||!h(),Ae.disabled=(Q(g()),Q(m()),Q(h()),Q(p()),x(()=>g()||m()||!h()||!p().lora)),bi(Ae,ue),Ge.disabled=(Q(g()),Q(m()),Q(h()),Q(p()),x(()=>g()||m()||!h()||!p().lora))},[()=>(Q(G()),x(()=>G()("request.optional"))),()=>(Q(p()),x(()=>String(p().lora??""))),()=>(Q(p()),x(()=>Number(p().lora_scale??1)))]),re("input",Pe,ne=>P()(e(i),ne.currentTarget.value.trim())),re("click",Le,()=>C()(e(i))),re("input",Ae,ne=>{Number.isFinite(ne.currentTarget.valueAsNumber)&&P()(e(n),ne.currentTarget.valueAsNumber)}),re("click",Ge,()=>P()(e(i),"")),J(ce,le)},$$slots:{default:!0}})}};ve(D,X=>{e(i)&&e(n)&&X(K)})}ie((X,ee,ce,fe)=>{W(E,`${X??""} `),W(V,ee),F.disabled=ce,W(z,fe)},[()=>(Q(G()),x(()=>G()("request.lyrics"))),()=>(Q(G()),x(()=>G()("request.optional"))),()=>(Q(g()),Q(m()),Q(r()),Q(o()),x(()=>g()||m()||!r().trim()&&!o().trim())),()=>(Q(m()),Q(G()),x(()=>m()?G()("request.rewritingCaption"):G()("request.rewriteCaption")))]),Sa(L,o),re("click",F,B),J(a,H),Mi()}var q7=ae(' ',1),w2=ae(" "),C7=ae('
          ',1),A7=ae('
          '),G7=ae('
          '),F7=ae('
          ',1),M7=ae('
          ',1),z7=ae(' ',1),E7=ae('
          '),y0=ae(""),U7=ae('
          '),R7=ae('
          '),B7=ae('

          '),P7=ae(''),j7=ae('
           
          '),N7=ae("
          "),O7=ae('
          '),I7=ae("

          "),D7=ae('

          '),L7=ae('
          '),V7=ae('

          ',1),H7=ae('
          ~

          '),W7=ae('

          JSON

          ',1);function Q7(a,t){Fi(t,!1);const i=Y();let n=Se(t,"activeCatalog",24,()=>[]),s=Se(t,"loadedModels",24,()=>[]),r=Se(t,"savedVoices",24,()=>[]),o=Se(t,"server",8,null),l=Se(t,"modelsFolder",8,""),c=Se(t,"maxTokens",8,1024),d=Se(t,"entrySelectable",8,()=>!0),g=Se(t,"studioPackageSlots",8,()=>[]),h=Se(t,"packageIsAvailable",8,()=>!1),m=Se(t,"supportsMaxTokens",8,()=>!1),p=Se(t,"supportsRequestOption",8,()=>!1),u=Se(t,"requiresRequestOption",8,()=>!1),f=Se(t,"refresh",8,async()=>{}),_=Se(t,"log",8,()=>{}),v=Se(t,"tr",8,(oe,Me,Ee=oe)=>Ee);class b extends Error{}let S=Y("tts"),$=Y(""),M=Y(""),N=Y(""),P=Y(""),C=Y(1234),j=Y(null),G=Y(null),A=Y(""),B=Y("default"),H=Y(""),U=Y(""),E=Y(null),O=Y(null),V=Y(""),L=Y("{}"),T=Y([]),F=Y(!1),z=null,D=Y(""),K=Y([]),X=Y(),ee=Y([]),ce=Y([]),fe=Y([]),le=Y([]),ge=Y(""),R=Y(""),we=Y("");const pe={demo_1_man:"demo_1_man",demo_2_man:"demo_2_man",demo_3_woman:"demo_3_woman",demo_4_woman:"demo_4_woman"};async function Te(){try{y(fe,await db())}catch(oe){y(fe,[]),_()(`Arena voices unavailable: ${oe instanceof Error?oe.message:oe}`)}}function he(oe){if(!l())return oe;const Me=oe.replace(/\\/g,"/");if(Me==="models")return l();if(!Me.startsWith("models/"))return oe;const Ee=Me.slice(7),tt=l().includes("\\")?"\\":"/";return`${l().replace(/[\\/]+$/,"")}${tt}${Ee.replace(/\//g,tt)}`}function Pe(oe){return oe.replace(/\\/g,"/").replace(/\/$/,"").toLowerCase()}function Le(oe,Me){const Ee=Pe(Me),tt=Pe(oe);return Ee===tt||Ee.endsWith(`/${tt}`)}function ct(oe){return!!o()&&(!o()?.ui_management||oe.configured===!0)}function Ae(oe,Me){return ct(oe)?oe.path:he(Me?.path||oe.path)}function Ge(oe,Me){return{...oe.session_options||{},...Me?.session_options||{}}}function ne(oe){if(!Number.isInteger(oe)||oe<-1||oe>4294967295)throw new Error(v()("arena.error.seed"));if(oe>=0)return oe;const Me=new Uint32Array(1);return globalThis.crypto.getRandomValues(Me),Me[0]}function Je(oe){return["clon","vc","svc"].includes(oe.task)&&oe.family!=="rvc"||oe.task==="s2s"&&oe.family==="personaplex"||oe.task==="tts"&&!["supertonic"].includes(oe.family)}function ue(oe){return["clon","vc","svc"].includes(oe.task)&&oe.family!=="rvc"}function ye(oe){return oe.task==="tts"&&oe.family==="qwen3_tts"&&!oe.id.includes("custom")}function de(oe,Me){return u()(oe,"reference_text")||Me&&ye(oe)}function be(oe){return e(S)==="vc"&&oe.task==="vc"&&oe.family!=="rvc"}function xe(){return e(S)==="tts"&&e(B)==="builtin"&&e(H)?pe[e(H)]||e(H):""}function Ie(oe){return oe.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{N}']+/gu," ").trim().split(/\s+/).filter(Boolean)}function $e(oe,Me){const Ee=Ie(oe),tt=Ie(Me);if(!Ee.length)return"";const mt=Array.from({length:tt.length+1},(Xe,it)=>it),st=new Array(tt.length+1);for(let Xe=1;Xe<=Ee.length;Xe+=1){st[0]=Xe;for(let it=1;it<=tt.length;it+=1){const Yt=mt[it-1]+(Ee[Xe-1]===tt[it-1]?0:1),It=mt[it]+1,Jt=st[it-1]+1;st[it]=Math.min(Yt,It,Jt)}for(let it=0;it<=tt.length;it+=1)mt[it]=st[it]}return`${(mt[tt.length]/Ee.length*100).toFixed(2)}%`}function ze(oe){const Me=Number.parseFloat(oe);return Number.isFinite(Me)?Me:Number.POSITIVE_INFINITY}function Fe(oe,Me){const Ee=oe.status==="done",tt=Me.status==="done";if(Ee!==tt)return Ee?-1:1;if(Ee&&tt){const mt=ze(oe.rtf)-ze(Me.rtf);if(mt!==0)return mt}return e(T).indexOf(oe)-e(T).indexOf(Me)}function qe(oe){return v()(`arena.itemStatus.${oe}`,{},oe)}function rt(oe){if(He(),oe.startsWith("saved:")){const Me=r().find(Ee=>Ee.id===oe.slice(6));if(!Me)return;y(U,Me.id),y(B,"reference"),y(E,new File([Me.audio],`${Me.name}.wav`,{type:Me.audio.type||"audio/wav"})),y(V,Me.transcript)}else oe.startsWith("preset:")?(y(B,"builtin"),y(H,oe.slice(7))):oe==="reference"&&y(B,"reference")}function ot(oe){(e(U)||e(H))&&y(V,""),y(U,""),y(H,""),y(E,oe),oe&&y(B,"reference")}function je(){y(j,null),e(G)&&Et(G,e(G).value="")}function He(){y(B,"default"),y(U,""),y(H,""),y(E,null),y(V,""),e(O)&&Et(O,e(O).value="")}function Be(oe){return n().find(Me=>Me.id===oe.entryId)}function Re(oe,Me){return(oe.install_packages||[]).find(Ee=>Ee.id===Me.packageId)}function Ze(oe,Me){y(T,e(T).map(Ee=>Ee.id===oe?{...Ee,...Me}:Ee))}function Ne(){for(const oe of e(T))oe.outputUrl&&URL.revokeObjectURL(oe.outputUrl);y(T,e(T).map(oe=>({...oe,status:"queued",note:"",error:"",outputUrl:"",outputText:"",wallMs:"",rtf:"",wer:""})))}function Ve(){for(const oe of e(T))oe.outputUrl&&URL.revokeObjectURL(oe.outputUrl);y(T,[])}function gt(oe){e(F)||oe===e(S)||(Ve(),y(S,oe),y(D,""))}function _t(){if(!e(X))return;const oe=e(ee).find(Ee=>Ee.id===e(M));if(e(T).some(Ee=>Ee.entryId===e(X)?.id&&Ee.packageId===oe?.id)){y(D,v()("arena.status.duplicate",{model:e(X).display_name,package:oe?.label||""}));return}y(T,[...e(T),{id:crypto.randomUUID(),entryId:e(X).id,packageId:oe?.id,label:e(X).display_name,packageLabel:oe?.label||v()("arena.package.configured"),status:"queued",note:"",error:"",outputUrl:"",outputText:"",wallMs:"",rtf:"",wer:""}])}function at(oe){const Me=e(T).find(Ee=>Ee.id===oe);Me?.outputUrl&&URL.revokeObjectURL(Me.outputUrl),y(T,e(T).filter(Ee=>Ee.id!==oe))}function wt(){try{const oe=JSON.parse(e(L)||"{}");if(Array.isArray(oe)||oe===null)throw new Error(v()("arena.error.jsonObject"));return oe}catch(oe){throw new Error(v()("arena.error.invalidJson",{error:oe instanceof Error?oe.message:String(oe)}))}}async function Ke(oe){if(!oe)return;const Me=await Gr(oe);return hr(Me,z?.signal)}async function ut(oe,Me){if(ct(oe)){if(!s().some(it=>it.id===oe.id&&it.loaded))throw new Error(v()("arena.error.unregistered"));return}Me=Me||oe.install_packages?.[0];const Ee=Me?Tm(Me):void 0;if(Me&&!h()(oe,Me))throw new b(v()("arena.error.notDownloaded",{package:Me.label}));const tt=Ae(oe,Me),mt=Ge(oe,Me);if(s().find(it=>it.id===oe.id&&it.loaded&&Le(tt,it.path)&&Object.entries(mt).every(([Yt,It])=>it.session_options?.[Yt]===It)))return;const Xe=s().filter(it=>it.loaded&&(it.id!==oe.id||!Le(tt,it.path)));for(const it of Xe)await _o(it.id);if(Xe.length&&await f()(),await df({id:oe.id,path:tt,family:Ee?.family??oe.family,task:oe.task,mode:oe.mode||"offline",load_options:{...Me?.load_options,...oe.load_options},session_options:mt}),await f()(),!s().some(it=>it.id===oe.id&&it.loaded&&Le(tt,it.path)&&Object.entries(mt).every(([Yt,It])=>it.session_options?.[Yt]===It)))throw new Error(v()("arena.error.loadFailed"))}async function nt(oe,Me){const Ee=Be(oe);if(!Ee){Ze(oe.id,{status:"failed",error:v()("arena.error.missingCatalog")});return}const tt=Re(Ee,oe),mt=performance.now();try{Ze(oe.id,{status:"loading",note:v()("arena.status.loadingModel"),error:""}),await ut(Ee,tt),Ze(oe.id,{status:"running",note:v()("arena.status.runningRequest")});const st={...Ee.default_options||{},...Me},Xe=xe(),it=e(B)==="reference"&&!!e(E);if(be(Ee)&&!it){Ze(oe.id,{status:"skipped",note:v()("arena.note.skippedTargetVoice"),error:""});return}if(e(S)==="tts"&&de(Ee,it)&&!e(V).trim()){Ze(oe.id,{status:"skipped",note:v()("arena.note.skippedReferenceText"),error:""});return}const It=it&&Je(Ee)?await Ke(e(E)):void 0;let Jt="";if(Xe)Jt=v()("arena.note.builtinVoice",{voice:e(H)});else if(it&&It)Jt=v()("arena.note.referenceVoice");else if(it&&!Je(Ee))Jt=v()("arena.note.referenceUnsupported");else if(Ee.default_voice)Jt=v()("arena.note.defaultVoice",{voice:Ee.default_voice});else if(ue(Ee)&&!Xe){Ze(oe.id,{status:"skipped",note:v()("arena.note.skippedReferenceVoice"),error:""});return}if(e(S)==="tts"){if(!e(N).trim())throw new b(v()("arena.error.enterTtsText"));const ra={model:Ee.id,input:e(N),language:e(P),seed:ne(e(C)),options:st};m()(Ee)&&(ra.max_tokens=c()),It?ra.voice_ref=It:Xe?ra.voice=Xe:Ee.default_voice&&(ra.voice=Ee.default_voice),it&&e(V).trim()&&p()(Ee,"reference_text")&&(ra.reference_text=e(V));const aa=await ff(ra,z?.signal);Ze(oe.id,{status:"done",note:Jt,outputUrl:URL.createObjectURL(aa.blob),wallMs:aa.wallMs||`${(performance.now()-mt).toFixed(1)}`,rtf:aa.rtf||""});return}if(e(S)==="asr"){const ra=await Ke(e(j));if(!ra)throw new b(v()("arena.error.chooseAsrSource"));const aa=await pf({model:Ee.id,audio:ra,language:e(P),options:st},z?.signal),li=typeof aa.text=="string"?aa.text:"",$i=aa.timing;Ze(oe.id,{status:"done",note:Jt,outputText:li,wallMs:typeof $i?.wall_ms=="number"?String($i.wall_ms):"",rtf:typeof $i?.rtf=="number"?String($i.rtf):"",wer:e(A).trim()?$e(e(A),li):""});return}const ni=await Ke(e(j));if(!ni)throw new b(v()("arena.error.chooseVcSource"));const Xa={audio:ni,seed:ne(e(C)),options:st};e(N).trim()&&(Xa.text=e(N)),e(P).trim()&&(Xa.language=e(P)),It?Xa.voice_ref=It:Xe&&(Xa.voice_id=Xe);const ia=await Ul({model:Ee.id,request:Xa},z?.signal),Ua=typeof ia.audio=="string"?ia.audio:Array.isArray(ia.named_audio_outputs)&&typeof ia.named_audio_outputs[0]?.audio=="string"?ia.named_audio_outputs[0].audio:"";if(!Ua)throw new Error(v()("arena.error.noAudio"));const Vt=ia.timing;Ze(oe.id,{status:"done",note:Jt,outputUrl:mf(Ua),wallMs:typeof Vt?.wall_ms=="number"?String(Vt.wall_ms):"",rtf:typeof Vt?.rtf=="number"?String(Vt.rtf):""})}catch(st){Ze(oe.id,{status:st instanceof b?"skipped":"failed",error:st instanceof Error?st.message:String(st),note:""}),_()(`Arena row failed: ${st instanceof Error?st.message:st}`)}}async function Lt(){if(!e(F)){if(!e(T).length){y(D,v()("arena.status.addModel"));return}y(F,!0),z=new AbortController,Ne(),y(D,v()("arena.status.running",{mode:e(we)})),_()(e(D));try{const oe=wt();for(const Me of e(T)){if(z?.signal.aborted)break;await nt(Me,oe)}y(D,v()("arena.status.complete")),_()(e(D))}catch(oe){y(D,oe instanceof Error?oe.message:String(oe))}finally{y(F,!1),z=null}}}function Gt(){z?.abort()}fr(()=>{z?.abort();for(const oe of e(T))oe.outputUrl&&URL.revokeObjectURL(oe.outputUrl)}),Jn(Te),Ue(()=>(Q(n()),e(S)),()=>{y(K,n().filter(oe=>oe.arena!==!1&&(e(S)==="tts"?["tts","clon"].includes(oe.task):e(S)==="vc"?oe.task==="vc":oe.task==="asr")))}),Ue(()=>(e($),e(K)),()=>{(!e($)||!e(K).some(oe=>oe.id===e($)))&&y($,e(K)[0]?.id||"")}),Ue(()=>(e(K),e($)),()=>{y(X,e(K).find(oe=>oe.id===e($))||e(K)[0])}),Ue(()=>(e(X),Q(g())),()=>{y(ee,e(X)?g()(e(X)).map(oe=>oe.choice).filter(oe=>!!oe):[])}),Ue(()=>(e(ee),e(M)),()=>{e(ee).length&&!e(ee).some(oe=>oe.id===e(M))&&y(M,e(ee)[0].id)}),Ue(()=>e(fe),()=>{y(le,[...e(fe)].sort((oe,Me)=>oe.localeCompare(Me,"en",{sensitivity:"base",numeric:!0})))}),Ue(()=>(e(B),e(le)),()=>{e(B)==="builtin"&&!e(le).length&&y(B,"default")}),Ue(()=>(e(S),e(B)),()=>{e(S)==="vc"&&e(B)!=="reference"&&(y(B,"reference"),y(H,""))}),Ue(()=>(e(B),e(le),e(H)),()=>{e(B)==="builtin"&&!e(le).includes(e(H))&&y(H,e(le)[0]||"")}),Ue(()=>(e(B),e(H),uf),()=>{y(i,e(B)==="builtin"&&e(H)?uf(e(H)):"")}),Ue(()=>(e(S),Q(v())),()=>{y(ge,e(S)==="tts"?v()("arena.title.tts"):e(S)==="vc"?v()("arena.title.vc"):v()("arena.title.asr"))}),Ue(()=>(e(S),Q(v())),()=>{y(R,e(S)==="tts"?v()("arena.subtitle.tts"):e(S)==="vc"?v()("arena.subtitle.vc"):v()("arena.subtitle.asr"))}),Ue(()=>(e(S),Q(v())),()=>{y(we,e(S)==="tts"?v()("arena.mode.tts"):e(S)==="vc"?v()("arena.mode.vc"):v()("arena.mode.asr"))}),Ue(()=>e(T),()=>{y(ce,e(T).every(oe=>["done","failed","skipped"].includes(oe.status))?[...e(T)].sort(Fe):e(T))}),wn();var jt={runArena:Lt};Zi();var za=W7(),sa=ht(za),wa=k(sa),Fa=k(wa),ln=k(Fa,!0);w(Fa);var Kt=q(Fa,2),St=k(Kt,!0);w(Kt);var ea=q(Kt,2),da=k(ea,!0);w(ea),w(wa);var wi=q(wa,2),ma=k(wi);let hi;var zi=k(ma,!0);w(ma);var ui=q(ma,2);let hn;var Ai=k(ui,!0);w(ui);var Vi=q(ui,2);let _n;var Ni=k(Vi,!0);w(Vi),w(wi),w(sa);var Hi=q(sa,2),Wi=k(Hi),Qa=k(Wi),Zn=k(Qa),Vn=k(Zn),ls=k(Vn,!0);w(Vn);var Qe=q(Vn),Ut=k(Qe,!0);w(Qe),w(Zn);var ja=q(Zn,2),ai=k(ja,!0);w(ja),w(Qa);var oi=q(Qa,2),ta=k(oi);{var _i=oe=>{var Me=q7(),Ee=ht(Me),tt=k(Ee);Cd(tt,{size:17});var mt=q(tt,1,!0);w(Ee);var st=q(Ee,2);sn(st),ie((Xe,it)=>{W(mt,Xe),_e(st,"placeholder",it)},[()=>(Q(v()),x(()=>v()("request.text"))),()=>(Q(v()),x(()=>v()("arena.input.textPlaceholder")))]),Sa(st,()=>e(N),Xe=>y(N,Xe)),J(oe,Me)},Ja=oe=>{var Me=C7(),Ee=ht(Me),tt=k(Ee);sf(tt,{size:17});var mt=q(tt,1,!0);w(Ee);var st=q(Ee,2);Ci(st,li=>y(G,li),()=>e(G));var Xe=q(st,2),it=k(Xe);Fc(it,{size:16});var Yt=q(it),It=k(Yt,!0);w(Yt);var Jt=q(Yt),ni=k(Jt,!0);w(Jt),w(Xe);var Xa=q(Xe,2),ia=k(Xa),Ua=k(ia,!0);w(ia);var Vt=q(ia,2);{var ra=li=>{var $i=w2(),Dn=k($i,!0);w($i),ie(()=>W(Dn,(e(j),x(()=>e(j).name)))),J(li,$i)};ve(Vt,li=>{e(j)&&li(ra)})}w(Xa);var aa=q(Xa,2);{let li=Nt(()=>(Q(v()),x(()=>v()("file.preview"))));ss(aa,{get file(){return e(j)},kind:"audio",get label(){return e(li)}})}ie((li,$i,Dn,Qs)=>{W(mt,li),W(It,$i),W(ni,Dn),ia.disabled=!e(j),W(Ua,Qs)},[()=>(Q(v()),x(()=>v()("request.sourceAudio"))),()=>(Q(v()),x(()=>v()("file.choose"))),()=>(e(j),Q(v()),x(()=>e(j)?.name||v()("file.none"))),()=>(Q(v()),x(()=>v()("file.clear")))]),re("change",st,li=>y(j,li.currentTarget.files?.[0]||null)),re("click",ia,je),J(oe,Me)};ve(ta,oe=>{e(S)==="tts"?oe(_i):oe(Ja,-1)})}w(oi);var va=q(oi,2);{var Ea=oe=>{var Me=A7(),Ee=k(Me),tt=k(Ee);Oo(tt,{size:17});var mt=q(tt),st=q(mt),Xe=k(st,!0);w(st),w(Ee);var it=q(Ee,2);sn(it),w(Me),ie((Yt,It,Jt)=>{W(mt,`${Yt??""} `),W(Xe,It),_e(it,"placeholder",Jt)},[()=>(Q(v()),x(()=>v()("arena.input.groundTruth"))),()=>(Q(v()),x(()=>v()("request.optional"))),()=>(Q(v()),x(()=>v()("arena.input.groundTruthPlaceholder")))]),Sa(it,()=>e(A),Yt=>y(A,Yt)),J(oe,Me)};ve(va,oe=>{e(S)==="asr"&&oe(Ea)})}var Ye=q(va,2),Ce=k(Ye),pt=k(Ce),Ft=k(pt),Ta=q(Ft),oa=k(Ta,!0);w(Ta),w(pt);var ii=q(pt,2);Pt(ii),w(Ce);var Ei=q(Ce,2);{var ga=oe=>{var Me=G7(),Ee=k(Me),tt=k(Ee,!0);w(Ee);var mt=q(Ee,2);Pt(mt),w(Me),ie(st=>W(tt,st),[()=>(Q(v()),x(()=>v()("request.seed")))]),Sa(mt,()=>e(C),st=>y(C,st)),J(oe,Me)};ve(Ei,oe=>{e(S)!=="asr"&&oe(ga)})}w(Ye);var $t=q(Ye,2);let Ot;var ka=k($t);{var Qi=oe=>{var Me=F7(),Ee=ht(Me),tt=k(Ee);lf(tt,{size:17});var mt=q(tt,1,!0);w(Ee);var st=q(Ee,2),Xe=k(st),it=k(Xe);{let Ua=Nt(()=>e(U)?`saved:${e(U)}`:e(B)==="builtin"?`preset:${e(H)}`:e(B)==="reference"?"reference":""),Vt=Nt(()=>e(S)==="tts"?e(le):[]),ra=Nt(()=>(Q(v()),x(()=>v()("arena.voice.builtin")))),aa=Nt(()=>(Q(v()),x(()=>v()("arena.voice.modelDefault")))),li=Nt(()=>e(S)==="tts");kb(it,{id:"arena-voice-mode",get value(){return e(Ua)},get presets(){return e(Vt)},get savedVoices(){return r()},get presetLabel(){return e(ra)},get emptyLabel(){return e(aa)},get allowEmpty(){return e(li)},referenceOption:!0,get tr(){return v()},get disabled(){return e(F)},onselect:rt})}w(Xe);var Yt=q(Xe,2),It=k(Yt),Jt=k(It),ni=q(Jt),Xa=k(ni,!0);w(ni),w(It);var ia=q(It,2);sn(ia),w(Yt),w(st),ie((Ua,Vt,ra)=>{W(mt,Ua),W(Jt,`${Vt??""} `),W(Xa,ra)},[()=>(e(S),Q(v()),x(()=>e(S)==="vc"?v()("arena.voice.targetSpeaker"):v()("voice.reference"))),()=>(Q(v()),x(()=>v()("voice.referenceText"))),()=>(Q(v()),x(()=>v()("request.optional")))]),Sa(ia,()=>e(V),Ua=>y(V,Ua)),J(oe,Me)};ve(ka,oe=>{e(S)!=="asr"&&oe(Qi)})}var Na=q(ka,2);{var ua=oe=>{var Me=M7(),Ee=ht(Me),tt=k(Ee,!0);w(Ee);var mt=q(Ee,2);{let st=Nt(()=>(Q(v()),x(()=>v()("file.preview"))));ss(mt,{get src(){return e(i)},get name(){return e(H)},kind:"audio",get label(){return e(st)}})}ie(st=>W(tt,st),[()=>(Q(v()),x(()=>v()("arena.voice.builtinNote")))]),J(oe,Me)},Ra=oe=>{var Me=z7(),Ee=ht(Me),tt=k(Ee),mt=q(tt),st=k(mt,!0);w(mt),w(Ee);var Xe=q(Ee,2);Ci(Xe,Ua=>y(O,Ua),()=>e(O));var it=q(Xe,2),Yt=k(it);Fc(Yt,{size:16});var It=q(Yt),Jt=k(It,!0);w(It);var ni=q(It),Xa=k(ni,!0);w(ni),w(it);var ia=q(it,2);{let Ua=Nt(()=>(Q(v()),x(()=>v()("file.preview"))));ss(ia,{get file(){return e(E)},kind:"audio",get label(){return e(Ua)}})}ie((Ua,Vt,ra,aa)=>{W(tt,`${Ua??""} `),W(st,Vt),W(Jt,ra),W(Xa,aa)},[()=>(e(S),Q(v()),x(()=>e(S)==="vc"?v()("arena.voice.targetSpeaker"):v()("voice.reference"))),()=>(e(S),Q(v()),x(()=>e(S)==="vc"?v()("voice.required"):v()("voice.optional"))),()=>(Q(v()),x(()=>v()("file.choose"))),()=>(e(E),Q(v()),x(()=>e(E)?.name||v()("file.none")))]),re("change",Xe,Ua=>ot(Ua.currentTarget.files?.[0]||null)),J(oe,Me)};ve(Na,oe=>{e(B)==="builtin"?oe(ua):(e(S)==="vc"||e(B)==="reference")&&oe(Ra,1)})}var me=q(Na,2);{var De=oe=>{var Me=E7(),Ee=k(Me),tt=k(Ee,!0);w(Ee);var mt=q(Ee,2);{var st=Xe=>{var it=w2(),Yt=k(it,!0);w(it),ie(()=>W(Yt,(e(E),x(()=>e(E).name)))),J(Xe,it)};ve(mt,Xe=>{e(E)&&Xe(st)})}w(Me),ie((Xe,it)=>{Ee.disabled=Xe,W(tt,it)},[()=>(e(B),e(E),e(V),x(()=>e(B)==="default"&&!e(E)&&!e(V).trim())),()=>(e(S),Q(v()),x(()=>e(S)==="vc"?v()("arena.voice.clearTarget"):v()("arena.voice.clearReference")))]),re("click",Ee,He),J(oe,Me)};ve(me,oe=>{e(S)!=="asr"&&oe(De)})}w($t);var ft=q($t,2),Rt=k(ft),$a=k(Rt);Zv($a,{size:16});var Oi=q($a);zt(),w(Rt);var Z=q(Rt,2);sn(Z),w(ft),w(Wi);var Si=q(Wi,2),Ti=k(Si),fi=k(Ti),zn=k(fi),Hn=k(zn,!0);w(zn);var Ur=q(zn),Wn=k(Ur,!0);w(Ur),w(fi);var Qn=q(fi,2),cs=k(Qn,!0);w(Qn),w(Ti);var zs=q(Ti,2),Dl=k(zs),Zr=k(Dl),al=k(Zr,!0);w(Zr);var ds=q(Zr,2);Ct(ds,5,()=>e(K),Qt,(oe,Me)=>{var Ee=y0(),tt=k(Ee,!0);w(Ee);var mt={};ie(st=>{Ee.disabled=st,W(tt,(e(Me),x(()=>e(Me).display_name))),mt!==(mt=(e(Me),x(()=>e(Me).id)))&&(Ee.value=(Ee.__value=(e(Me),x(()=>e(Me).id)))??"")},[()=>(Q(d()),e(Me),x(()=>!d()(e(Me))))]),J(oe,Ee)}),w(ds),w(Dl);var il=q(Dl,2),Ll=k(il),eo=k(Ll,!0);w(Ll);var Rr=q(Ll,2),to=k(Rr);Ct(to,1,()=>e(ee),Qt,(oe,Me)=>{var Ee=y0(),tt=k(Ee);w(Ee);var mt={};ie((st,Xe)=>{Ee.disabled=st,W(tt,`${e(Me),x(()=>e(Me).label)??""}${Xe??""}`),mt!==(mt=(e(Me),x(()=>e(Me).id)))&&(Ee.value=(Ee.__value=(e(Me),x(()=>e(Me).id)))??"")},[()=>(e(X),Q(h()),e(Me),x(()=>e(X)?!h()(e(X),e(Me)):!0)),()=>(e(X),Q(h()),e(Me),Q(v()),x(()=>e(X)&&h()(e(X),e(Me))?"":` · ${v()("studio.notDownloaded")}`))]),J(oe,Ee)});var nl=q(to);{var ou=oe=>{var Me=y0(),Ee=k(Me,!0);w(Me),Me.value=Me.__value="",ie(tt=>W(Ee,tt),[()=>(Q(v()),x(()=>v()("arena.package.configured")))]),J(oe,Me)};ve(nl,oe=>{e(ee),e(X),x(()=>!e(ee).length&&e(X))&&oe(ou)})}w(Rr),w(il);var ks=q(il,2),Vl=k(ks);Dr(Vl,{size:15});var Oc=q(Vl,1,!0);w(ks),w(zs);var So=q(zs,2);{var Ic=oe=>{var Me=R7();Ct(Me,5,()=>e(T),Qt,(Ee,tt)=>{var mt=U7();let st;var Xe=k(mt),it=k(Xe),Yt=k(it,!0);w(it);var It=q(it,2),Jt=k(It,!0);w(It),w(Xe);var ni=q(Xe,2),Xa=k(ni,!0);w(ni);var ia=q(ni,2),Ua=k(ia);ho(Ua,{size:14});var Vt=q(Ua,1,!0);w(ia),w(mt),ie((ra,aa)=>{st=ya(mt,1,"",null,st,{done:e(tt).status==="done",failed:e(tt).status==="failed",skipped:e(tt).status==="skipped"}),W(Yt,(e(tt),x(()=>e(tt).label))),W(Jt,(e(tt),x(()=>e(tt).packageLabel))),W(Xa,ra),ia.disabled=e(F),W(Vt,aa)},[()=>(e(tt),x(()=>qe(e(tt).status))),()=>(Q(v()),x(()=>v()("arena.queue.remove")))]),re("click",ia,()=>at(e(tt).id)),J(Ee,mt)}),w(Me),J(oe,Me)},Hl=oe=>{var Me=B7(),Ee=k(Me),tt=k(Ee,!0);w(Ee),w(Me),ie(mt=>W(tt,mt),[()=>(Q(v()),x(()=>v()("arena.queue.empty")))]),J(oe,Me)};ve(So,oe=>{e(T),x(()=>e(T).length)?oe(Ic):oe(Hl,-1)})}w(Si);var To=q(Si,2),Ki=k(To),sl=k(Ki),Sn=k(sl),Hs=k(Sn,!0);w(Sn);var rn=q(Sn),Dc=k(rn,!0);w(rn),w(sl);var In=q(sl,2),pi=k(In);w(In),w(Ki);var $o=q(Ki,2);{var Wl=oe=>{var Me=V7(),Ee=ht(Me),tt=k(Ee,!0);w(Ee);var mt=q(Ee,2);Ct(mt,5,()=>e(ce),Qt,(st,Xe,it)=>{var Yt=L7();let It;var Jt=k(Yt),ni=k(Jt),Xa=k(ni,!0);w(ni);var ia=q(ni,2),Ua=k(ia),Vt=k(Ua,!0);w(Ua);var ra=q(Ua,2),aa=k(ra,!0);w(ra),w(ia);var li=q(ia,2),$i=k(li,!0);w(li),w(Jt);var Dn=q(Jt,2);{var Qs=ki=>{var un=P7();ie(()=>_e(un,"src",(e(Xe),x(()=>e(Xe).outputUrl)))),J(ki,un)};ve(Dn,ki=>{e(Xe),x(()=>e(Xe).outputUrl)&&ki(Qs)})}var yr=q(Dn,2);{var Xl=ki=>{var un=j7(),Tn=k(un,!0);w(un),ie(()=>W(Tn,(e(Xe),x(()=>e(Xe).outputText)))),J(ki,un)};ve(yr,ki=>{e(Xe),x(()=>e(Xe).outputText)&&ki(Xl)})}var Zl=q(yr,2);{var ec=ki=>{var un=O7(),Tn=k(un),ao=k(Tn),ac=k(ao,!0);w(ao);var ol=q(ao),En=k(ol,!0);w(ol),w(Tn);var xs=q(Tn,2),kr=k(xs),Lc=k(kr,!0);w(kr);var io=q(kr),Vc=k(io,!0);w(io),w(xs);var Hc=q(xs,2);{var cu=Ks=>{var Ys=N7(),Pr=k(Ys),du=k(Pr,!0);w(Pr);var Us=q(Pr),ll=k(Us,!0);w(Us),w(Ys),ie(on=>{W(du,on),W(ll,(e(Xe),x(()=>e(Xe).wer)))},[()=>(Q(v()),x(()=>v()("arena.metric.wer")))]),J(Ks,Ys)};ve(Hc,Ks=>{e(Xe),x(()=>e(Xe).wer)&&Ks(cu)})}w(un),ie((Ks,Ys)=>{W(ac,Ks),W(En,(e(Xe),x(()=>e(Xe).wallMs||"?"))),W(Lc,Ys),W(Vc,(e(Xe),x(()=>e(Xe).rtf||"?")))},[()=>(Q(v()),x(()=>v()("arena.metric.wall"))),()=>(Q(v()),x(()=>v()("arena.metric.rtf")))]),J(ki,un)};ve(Zl,ki=>{e(Xe),x(()=>e(Xe).outputUrl||e(Xe).outputText||e(Xe).wallMs||e(Xe).rtf||e(Xe).wer)&&ki(ec)})}var tc=q(Zl,2);{var Co=ki=>{var un=I7(),Tn=k(un,!0);w(un),ie(()=>W(Tn,(e(Xe),x(()=>e(Xe).note)))),J(ki,un)};ve(tc,ki=>{e(Xe),x(()=>e(Xe).note)&&ki(Co)})}var wr=q(tc,2);{var lu=ki=>{var un=D7(),Tn=k(un,!0);w(un),ie(()=>W(Tn,(e(Xe),x(()=>e(Xe).error)))),J(ki,un)};ve(wr,ki=>{e(Xe),x(()=>e(Xe).error)&&ki(lu)})}w(Yt),ie((ki,un)=>{It=ya(Yt,1,"",null,It,{done:e(Xe).status==="done",failed:e(Xe).status==="failed",skipped:e(Xe).status==="skipped"}),W(Xa,ki),W(Vt,(e(Xe),x(()=>e(Xe).label))),W(aa,(e(Xe),x(()=>e(Xe).packageLabel))),W($i,un)},[()=>x(()=>String(it+1).padStart(2,"0")),()=>(e(Xe),x(()=>qe(e(Xe).status)))]),J(st,Yt)}),w(mt),ie(st=>W(tt,st),[()=>(e(T),Q(v()),x(()=>e(T).every(st=>["done","failed","skipped"].includes(st.status))?v()("arena.results.orderRtf"):v()("arena.results.orderSelection")))]),J(oe,Me)},Es=oe=>{var Me=H7(),Ee=q(k(Me)),tt=k(Ee,!0);w(Ee),w(Me),ie(mt=>W(tt,mt),[()=>(Q(v()),x(()=>v()("arena.results.empty")))]),J(oe,Me)};ve($o,oe=>{e(T),x(()=>e(T).length)?oe(Wl):oe(Es,-1)})}w(To);var Ql=q(To,2),us=k(Ql),Br=k(us),Kl=k(Br);Mc(Kl,{size:15});var Yl=q(Kl,2),qo=k(Yl,!0);w(Yl),zt(2),w(Br);var Ws=q(Br,2),Jl=k(Ws);zc(Jl,{size:14});var rl=q(Jl,1,!0);w(Ws);var Bt=q(Ws,2),vt=k(Bt);ho(vt,{size:14});var pa=q(vt,1,!0);w(Bt),w(us);var ha=q(us,2);let Oa;var qa=k(ha,!0);return w(ha),w(Ql),w(Hi),ie((oe,Me,Ee,tt,mt,st,Xe,it,Yt,It,Jt,ni,Xa,ia,Ua,Vt,ra,aa,li,$i,Dn,Qs)=>{W(ln,oe),W(St,e(ge)),W(da,e(R)),ma.disabled=e(F),hi=ya(ma,1,"",null,hi,{active:e(S)==="tts"}),W(zi,Me),ui.disabled=e(F),hn=ya(ui,1,"",null,hn,{active:e(S)==="vc"}),W(Ai,Ee),Vi.disabled=e(F),_n=ya(Vi,1,"",null,_n,{active:e(S)==="asr"}),W(Ni,tt),W(ls,mt),W(Ut,st),W(ai,e(we)),W(Ft,`${Xe??""} `),W(oa,it),_e(ii,"placeholder",Yt),Ot=ya($t,1,"",null,Ot,{"arena-input-section":e(S)!=="asr"}),W(Oi,`${It??""} `),W(Hn,Jt),W(Wn,ni),W(cs,(e(T),x(()=>e(T).length))),W(al,Xa),W(eo,ia),ks.disabled=!e(X),W(Oc,Ua),W(Hs,Vt),W(Dc,ra),W(pi,`${aa??""} / ${e(T),x(()=>e(T).length)??""}`),Br.disabled=(e(F),e(T),x(()=>e(F)||!e(T).length)),W(qo,li),Ws.disabled=!e(F),W(rl,$i),Bt.disabled=(e(F),e(T),x(()=>e(F)||!e(T).length)),W(pa,Dn),Oa=ya(ha,1,"status",null,Oa,{busy:e(F)}),W(qa,Qs)},[()=>(Q(v()),x(()=>v()("arena.eyebrow"))),()=>(Q(v()),x(()=>v()("arena.mode.tts"))),()=>(Q(v()),x(()=>v()("arena.mode.vc"))),()=>(Q(v()),x(()=>v()("arena.mode.asr"))),()=>(Q(v()),x(()=>v()("arena.input.label"))),()=>(Q(v()),x(()=>v()("arena.input.title"))),()=>(Q(v()),x(()=>v()("request.language"))),()=>(Q(v()),x(()=>v()("request.optional"))),()=>(Q(v()),x(()=>v()("request.autoLanguage"))),()=>(Q(v()),x(()=>v()("arena.options.shared"))),()=>(Q(v()),x(()=>v()("arena.queue.label"))),()=>(Q(v()),x(()=>v()("arena.queue.title"))),()=>(Q(v()),x(()=>v()("studio.model"))),()=>(Q(v()),x(()=>v()("arena.package.label"))),()=>(Q(v()),x(()=>v()("arena.queue.add"))),()=>(Q(v()),x(()=>v()("result.label"))),()=>(Q(v()),x(()=>v()("arena.results.title"))),()=>(e(T),x(()=>e(T).filter(oe=>oe.status==="done").length)),()=>(e(F),Q(v()),x(()=>e(F)?v()("run.working"):v()("arena.run"))),()=>(Q(v()),x(()=>v()("run.cancel"))),()=>(Q(v()),x(()=>v()("arena.queue.clear"))),()=>(e(D),Q(v()),x(()=>e(D)||v()("status.ready")))]),re("click",ma,()=>gt("tts")),re("click",ui,()=>gt("vc")),re("click",Vi,()=>gt("asr")),Sa(ii,()=>e(P),oe=>y(P,oe)),Sa(Z,()=>e(L),oe=>y(L,oe)),ur(ds,()=>e($),oe=>y($,oe)),re("change",ds,()=>y(M,"")),ur(Rr,()=>e(M),oe=>y(M,oe)),re("click",ks,_t),re("click",Br,Lt),re("click",Ws,Gt),re("click",Bt,Ve),J(a,za),Al(t,"runArena",Lt),Mi(jt)}const w0=Object.values(Object.assign({"./dubbing/app.ts":{id:"cross-language-dubbing",name:"Cross-language dubbing",description:"Translate a recording and generate speech in the target language.",tasks:["asr","tts"],modes:["offline"],load:()=>Ml(()=>Promise.resolve().then(()=>QU),void 0,An&&An.tagName.toUpperCase()==="SCRIPT"&&An.src||new URL("_app/immutable/bundle.BpLoWpUY.js",document.baseURI).href)},"./tts/app.ts":{id:"tts",name:"Text to speech",description:"Write a script, cast named speakers, refine recordings, and export your narration.",tasks:["tts","clon","vdes"],modes:["offline"],load:()=>Ml(()=>Promise.resolve().then(()=>EB),void 0,An&&An.tagName.toUpperCase()==="SCRIPT"&&An.src||new URL("_app/immutable/bundle.BpLoWpUY.js",document.baseURI).href)}})).sort((a,t)=>a.name.localeCompare(t.name));if(new Set(w0.map(a=>a.id)).size!==w0.length)throw new Error("Duplicate app id.");var K7=ae('

          Opening app…

          '),Y7=ae(''),J7=ae('
          /
          ',1),X7=ae(''),Z7=ae('

          APPS

          Make something with your models

          Choose a workflow. Create and reuse speaker presets inside Text to speech.

          ',1),e9=ae('
          ');function t9(a,t){Fi(t,!1);let i=Se(t,"active",8,!0),n=Y(null),s=Y(null),r=Y(null),o=Y(!1),l=Y(!1),c=Y("");function d(){return!e(o)&&!e(l)}async function g(v){if(d()){y(n,v),y(l,!0),y(c,"");try{y(s,(await v.load()).default)}catch(b){y(c,`Could not open ${v.name}: ${String(b)}`)}finally{y(l,!1)}}}async function h(){if(d())try{await e(r)?.saveBeforeClose?.(),y(n,null),y(s,null),y(c,"")}catch(v){y(c,`Could not save the app before closing: ${String(v)}`)}}var m={canClose:d};Zi();var p=e9();re("beforeunload",wc,v=>{e(o)&&(v.preventDefault(),v.returnValue="")});var u=k(p);{var f=v=>{var b=J7(),S=ht(b),$=k(S),M=q($,2),N=k(M,!0);w(M),w(S);var P=q(S,2);{var C=H=>{var U=K7();J(H,U)};ve(P,H=>{e(l)&&H(C)})}var j=q(P,2);{var G=H=>{var U=Y7(),E=k(U,!0);w(U),ie(()=>W(E,e(c))),J(H,U)};ve(j,H=>{e(c)&&H(G)})}var A=q(j,2);{var B=H=>{var U=ys(),E=ht(U);md(E,()=>e(s),(O,V)=>{Ci(V(O,{get active(){return i()},get busy(){return e(o)},set busy(L){y(o,L)},$$legacy:!0}),L=>y(r,L),()=>e(r))}),J(H,U)};ve(A,H=>{e(s)&&H(B)})}ie(()=>{$.disabled=e(o)||e(l),W(N,(e(n),x(()=>e(n).name)))}),re("click",$,h),J(v,b)},_=v=>{var b=Z7(),S=q(ht(b),4);Ct(S,5,()=>w0,Qt,($,M)=>{var N=X7(),P=k(N),C=k(P,!0);w(P);var j=q(P),G=k(j,!0);w(j),zt(),w(N),ie(()=>{W(C,(e(M),x(()=>e(M).name))),W(G,(e(M),x(()=>e(M).description)))}),re("click",N,()=>g(e(M))),J($,N)}),w(S),J(v,b)};ve(u,v=>{e(n)?v(f):v(_,-1)})}return w(p),J(a,p),Al(t,"canClose",d),Mi(m)}const k2="audiocpp.ui.configuration",Rf=yl({historyLimit:10}),Bf=yl("");function x2(a){if(!Number.isSafeInteger(a.historyLimit)||a.historyLimit<1)throw new Error("History length must be a positive integer.")}function a9(){const a=localStorage.getItem(k2);if(a===null)return;const t=JSON.parse(a);x2(t),Rf.set({historyLimit:t.historyLimit})}function i9(a){x2(a),localStorage.setItem(k2,JSON.stringify(a)),Rf.set(a),Bf.set("")}var n9=ae(''),s9=ae('
          '),r9=ae('

          ');function o9(a,t){Fi(t,!1);const i=()=>zu(Rf,"$uiConfiguration",s),n=()=>zu(Bf,"$uiConfigurationError",s),[s,r]=vp();let o=Se(t,"tr",8),l=Y(i().historyLimit),c=Y("");function d(){try{i9({historyLimit:e(l)}),y(c,"configuration.saved")}catch(j){Bf.set(j instanceof Error?j.message:String(j)),y(c,"")}}Ue(()=>i(),()=>{y(l,i().historyLimit)}),wn(),Zi();var g=r9(),h=k(g),m=k(h,!0);w(h);var p=q(h,2),u=k(p),f=k(u,!0);w(u);var _=q(u,2),v=k(_,!0);w(_);var b=q(_,2);Pt(b);var S=q(b,2),$=k(S,!0);w(S);var M=q(S,2);{var N=j=>{var G=n9(),A=k(G,!0);w(G),ie(()=>W(A,n())),J(j,G)};ve(M,j=>{n()&&j(N)})}var P=q(M,2);{var C=j=>{var G=s9(),A=k(G,!0);w(G),ie(B=>W(A,B),[()=>(Q(o()),e(c),x(()=>o()(e(c))))]),J(j,G)};ve(P,j=>{e(c)&&j(C)})}w(p),w(g),ie((j,G,A,B)=>{W(m,j),W(f,G),W(v,A),W($,B)},[()=>(Q(o()),x(()=>o()("nav.configuration"))),()=>(Q(o()),x(()=>o()("configuration.history"))),()=>(Q(o()),x(()=>o()("configuration.historyLimit"))),()=>(Q(o()),x(()=>o()("configuration.save")))]),Sa(b,()=>e(l),j=>y(l,j)),re("submit",p,I4(d)),J(a,g),Mi(),r()}var l9=ae(' '),k0=ae(""),c9=ae(''),d9=ae('
          '),u9=ae('
          Downloads
          '),f9=ae('

          '),p9=ae(' '),m9=ae('Update available'),g9=ae(''),h9=ae('
          Manage
          '),_9=ae(''),v9=ae(''),b9=ae('

          '),y9=ae('
          ',1),w9=ae('View weights ↗'),k9=ae('Manual setup
          ',1),x9=ae('
          '),S9=ae('
          '),T9=ae('
          No models match these filters.
          '),$9=ae('

          Model Library

          Models folder

          Choose a recent path, then Apply to switch folders.

          ');function q9(a,t){Fi(t,!1);const i=Y(),n=Y();let s=Se(t,"groups",8),r=Se(t,"packageSizes",8),o=Se(t,"installJobs",8),l=Se(t,"packageSizeState",8),c=Se(t,"modelsFolderInput",12),d=Se(t,"modelsFolder",8),g=Se(t,"modelsFolderHistory",24,()=>[]),h=Se(t,"defaultModelsFolder",8),m=Se(t,"applyingModelsFolder",8),p=Se(t,"modelsFolderIsDefault",8),u=Se(t,"openFolderBrowser",8),f=Se(t,"applyModelsFolder",8),_=Se(t,"installPackage",8),v=Se(t,"removePackage",8),b=Se(t,"stopPackageDownload",8),S=Se(t,"cleanPartialDownload",8),$=Se(t,"openModel",8),M=Se(t,"taskLabel",8),N=Se(t,"formatBytes",8),P=Se(t,"installProgressLabel",8),C=Se(t,"workflowForEntry",8),j=Se(t,"workflows",8),G=Y(""),A=Y(""),B=Y("all"),H=Y({});const U=Be=>!!Be&&["queued","running","cancelling"].includes(Be.state);function E(Be,Re,Ze,Ne){if(Re[Be.id]?.installed)return"Installed";const Ve=Ze[Be.id];return U(Ve)?Ve.state==="queued"?"Queued":Ve.state==="cancelling"?"Stopping":"Downloading":Ve&&["failed","cancelled"].includes(Ve.state)?Ve.state==="failed"?"Download failed":"Incomplete":Re[Be.id]?"Not installed":Ne==="failed"?"Status unavailable":"Checking"}function O(Be,Re,Ze){const Ne=Be.install_packages||[];return Ne.find(Ve=>Ve.id===Re[Be.id])||Ne.find(Ve=>Ze[Ve.id]?.installed)||Ne[0]}function V(Be,Re){return new Set(Be.flatMap(Ze=>(Ze.install_packages||[]).filter(Ne=>Re[Ne.id]?.installed).map(Ne=>Ne.id))).size}Ue(()=>(Q(s()),e(G),Q(r()),e(A),Q(C()),e(B)),()=>{y(i,s().map(Be=>({...Be,entries:Be.entries.filter(Re=>{const Ze=`${Be.label} ${Re.display_name} ${Re.family}`.toLowerCase().includes(e(G).trim().toLowerCase()),Ne=V([Re],r())>0,Ve=!!Re.install_packages?.length&&Re.install_packages.every(gt=>!!r()[gt.id]);return Ze&&(!e(A)||C()(Re)===e(A))&&(e(B)==="all"||(e(B)==="installed"?Ne:Ve&&!Ne))})})).filter(Be=>Be.entries.length))}),Ue(()=>Q(o()),()=>{y(n,Object.values(o()).filter(U))}),wn(),Zi();var L=$9(),T=k(L),F=k(T),z=q(k(F)),D=k(z);w(z),w(F);var K=q(F,2);{var X=Be=>{var Re=l9(),Ze=k(Re);w(Re),ie(()=>W(Ze,`${e(n),x(()=>e(n).length)??""} active downloads`)),J(Be,Re)};ve(K,Be=>{e(n),x(()=>e(n).length)&&Be(X)})}w(T);var ee=q(T,2),ce=k(ee),fe=q(k(ce)),le=k(fe,!0);w(fe),w(ce);var ge=q(ce,2),R=k(ge),we=q(k(R));Pt(we),w(R);var pe=q(R,2),Te=q(pe,2),he=q(Te,2);w(ge);var Pe=q(ge,2),Le=k(Pe),ct=k(Le);DS(ct,{size:16,"aria-hidden":"true"});var Ae=q(ct,2),Ge=k(Ae);Ge.value=Ge.__value="";var ne=q(Ge);Ct(ne,1,g,Qt,(Be,Re)=>{var Ze=k0(),Ne=k(Ze,!0);w(Ze);var Ve={};ie(()=>{W(Ne,e(Re)),Ve!==(Ve=e(Re))&&(Ze.value=(Ze.__value=e(Re))??"")}),J(Be,Ze)}),w(Ae),Ae.value=Ae.__value="";var Je=q(Ae,2);bm(Je,{size:14,"aria-hidden":"true"}),w(Le),zt(2),w(Pe),w(ee);var ue=q(ee,2),ye=k(ue);Pt(ye);var de=q(ye,2),be=k(de);be.value=be.__value="";var xe=q(be);Ct(xe,1,j,Qt,(Be,Re)=>{var Ze=k0(),Ne=k(Ze,!0);w(Ze);var Ve={};ie(()=>{W(Ne,(e(Re),x(()=>e(Re).label))),Ve!==(Ve=(e(Re),x(()=>e(Re).id)))&&(Ze.value=(Ze.__value=(e(Re),x(()=>e(Re).id)))??"")}),J(Be,Ze)}),w(de);var Ie=q(de,2),$e=k(Ie);$e.value=$e.__value="all";var ze=q($e);ze.value=ze.__value="installed";var Fe=q(ze);Fe.value=Fe.__value="missing",w(Ie),w(ue);var qe=q(ue,2),rt=k(qe);w(qe);var ot=q(qe,2);{var je=Be=>{var Re=u9(),Ze=q(k(Re));Ct(Ze,1,()=>e(n),Qt,(Ne,Ve)=>{const gt=Nt(()=>(Q(s()),e(Ve),x(()=>s().flatMap(Gt=>Gt.entries).find(Gt=>Gt.install_packages?.some(jt=>jt.id===e(Ve).id)))));var _t=d9(),at=k(_t),wt=k(at,!0);w(at);var Ke=q(at),ut=k(Ke,!0);w(Ke);var nt=q(Ke);{var Lt=Gt=>{var jt=c9();ie(()=>jt.disabled=(e(Ve),x(()=>e(Ve).state==="cancelling"))),re("click",jt,()=>b()(e(gt),e(Ve))),J(Gt,jt)};ve(nt,Gt=>{e(gt)&&Gt(Lt)})}w(_t),ie(Gt=>{W(wt,(Q(e(gt)),e(Ve),x(()=>e(gt)?.display_name||e(Ve).id))),W(ut,Gt)},[()=>(Q(P()),e(Ve),x(()=>P()(e(Ve))))]),J(Ne,_t)}),w(Re),J(Be,Re)};ve(ot,Be=>{e(n),x(()=>e(n).length)&&Be(je)})}var He=q(ot,2);Ct(He,1,()=>e(i),Be=>Be.family,(Be,Re)=>{var Ze=S9(),Ne=k(Ze);{var Ve=_t=>{var at=f9(),wt=k(at),Ke=k(wt,!0);w(wt);var ut=q(wt);let nt;var Lt=k(ut,!0);w(ut),w(at),ie((Gt,jt)=>{W(Ke,(e(Re),x(()=>e(Re).label))),nt=ya(ut,1,"svelte-1vlt8au",null,nt,Gt),W(Lt,jt)},[()=>({installed:V(e(Re).entries,r())>0}),()=>(e(Re),Q(r()),x(()=>V(e(Re).entries,r())?`${V(e(Re).entries,r())} package${V(e(Re).entries,r())===1?"":"s"} installed`:e(Re).entries.every(Gt=>!Gt.install_packages?.length)?"Manual setup":e(Re).entries.some(Gt=>Gt.install_packages?.some(jt=>!r()[jt.id]))?"Status pending":"Not installed"))]),J(_t,at)};ve(Ne,_t=>{e(Re),x(()=>e(Re).entries.length>1)&&_t(Ve)})}var gt=q(Ne,2);Ct(gt,1,()=>(e(Re),x(()=>e(Re).entries)),_t=>_t.id,(_t,at)=>{const wt=Nt(()=>(e(at),x(()=>new Set((e(at).install_packages||[]).map(ma=>ma.id)).size))),Ke=Nt(()=>(e(at),e(H),Q(r()),x(()=>O(e(at),e(H),r())))),ut=Nt(()=>(Q(e(Ke)),Q(o()),x(()=>e(Ke)?o()[e(Ke).id]:void 0))),nt=Nt(()=>(Q(e(Ke)),Q(r()),x(()=>e(Ke)&&r()[e(Ke).id]?.installed))),Lt=Nt(()=>(e(Re),Q(o()),x(()=>e(Re).entries.some(ma=>ma.install_packages?.some(hi=>U(o()[hi.id]))))));var Gt=x9(),jt=k(Gt),za=k(jt),sa=k(za,!0);w(za);var wa=q(za),Fa=k(wa,!0);w(wa);var ln=q(wa);{var Kt=ma=>{var hi=p9(),zi=k(hi);w(hi),ie(ui=>W(zi,`${ui??""} of ${e(wt)??""} packages installed`),[()=>(e(at),Q(r()),x(()=>V([e(at)],r())))]),J(ma,hi)},St=Va(()=>(Q(e(wt)),e(at),Q(r()),x(()=>e(wt)&&e(at).install_packages?.every(ma=>!!r()[ma.id]))));ve(ln,ma=>{e(St)&&ma(Kt)})}w(jt);var ea=q(jt,2);{var da=ma=>{var hi=y9(),zi=ht(hi),ui=k(zi),hn=k(ui);w(ui);var Ai=q(ui);Ct(Ai,5,()=>(e(at),x(()=>e(at).install_packages||[])),Qt,(va,Ea)=>{var Ye=k0(),Ce=k(Ye);w(Ye);var pt={};ie(Ft=>{W(Ce,`${e(Ea),x(()=>e(Ea).label)??""} · ${Ft??""}`),pt!==(pt=(e(Ea),x(()=>e(Ea).id)))&&(Ye.value=(Ye.__value=(e(Ea),x(()=>e(Ea).id)))??"")},[()=>(e(Ea),Q(r()),Q(o()),Q(l()),x(()=>E(e(Ea),r(),o(),l())))]),J(va,Ye)}),w(Ai);var Vi;Nn(Ai);var _n=q(Ai),Ni=k(_n,!0);w(_n),w(zi);var Hi=q(zi,2);let Wi;var Qa=k(Hi),Zn=k(Qa,!0);w(Qa);var Vn=q(Qa);{var ls=va=>{var Ea=m9();J(va,Ea)};ve(Vn,va=>{Q(e(nt)),Q(r()),Q(e(Ke)),x(()=>e(nt)&&r()[e(Ke).id]?.version_state==="update_available")&&va(ls)})}w(Hi);var Qe=q(Hi,2),Ut=k(Qe),ja=k(Ut,!0);w(Ut);var ai=q(Ut,2);{var oi=va=>{var Ea=h9(),Ye=k(Ea),Ce=q(Ye),pt=k(Ce);{var Ft=oa=>{var ii=g9();ie(()=>ii.disabled=e(Lt)),re("click",ii,()=>_()(e(at),e(Ke),!0)),J(oa,ii)};ve(pt,oa=>{Q(r()),Q(e(Ke)),x(()=>r()[e(Ke).id]?.version_state==="update_available")&&oa(Ft)})}var Ta=q(pt);w(Ce),w(Ea),ie(()=>{_e(Ye,"aria-label",(e(at),x(()=>`Manage ${e(at).display_name}`))),Ta.disabled=e(Lt)}),re("click",Ta,()=>v()(e(at),e(Ke))),J(va,Ea)};ve(ai,va=>{e(nt)&&va(oi)})}w(Qe);var ta=q(Qe,2);{var _i=va=>{var Ea=b9();let Ye;var Ce=k(Ea),pt=k(Ce,!0);w(Ce);var Ft=q(Ce),Ta=q(Ft),oa=k(Ta,!0);w(Ta);var ii=q(Ta);{var Ei=Ot=>{var ka=_9();ie(()=>ka.disabled=(Q(e(ut)),x(()=>e(ut).state==="cancelling"))),re("click",ka,()=>b()(e(at),e(ut))),J(Ot,ka)},ga=Va(()=>(Q(e(ut)),x(()=>U(e(ut))))),$t=Ot=>{var ka=v9();re("click",ka,()=>S()(e(at),e(ut))),J(Ot,ka)};ve(ii,Ot=>{e(ga)?Ot(Ei):Ot($t,-1)})}w(Ea),ie(Ot=>{Ye=ya(Ea,1,"job svelte-1vlt8au",null,Ye,{failed:e(ut).state==="failed"}),W(pt,Ot),bi(Ft,(Q(e(ut)),x(()=>e(ut).progress_percent>=0?e(ut).progress_percent:void 0))),W(oa,(Q(e(ut)),x(()=>e(ut).message)))},[()=>(Q(P()),Q(e(ut)),x(()=>P()(e(ut))))]),J(va,Ea)},Ja=Va(()=>(Q(e(ut)),x(()=>e(ut)&&!["complete","cleaned"].includes(e(ut).state))));ve(ta,va=>{e(Ja)&&va(_i)})}ie((va,Ea,Ye)=>{_e(ui,"for",(e(at),x(()=>`package-${e(at).id}`))),W(hn,`Package (${e(wt)??""})`),_e(Ai,"id",(e(at),x(()=>`package-${e(at).id}`))),Vi!==(Vi=(Q(e(Ke)),x(()=>e(Ke).id)))&&(Ai.value=(Ai.__value=(Q(e(Ke)),x(()=>e(Ke).id)))??"",kn(Ai,(Q(e(Ke)),x(()=>e(Ke).id)))),W(Ni,va),Wi=ya(Hi,1,"state svelte-1vlt8au",null,Wi,{installed:e(nt)}),W(Zn,Ea),Ut.disabled=Ye,W(ja,e(nt)?"Open in Studio":"Download")},[()=>(Q(r()),Q(e(Ke)),Q(N()),x(()=>r()[e(Ke).id]?.size_bytes?`${N()(r()[e(Ke).id].size_bytes)} download`:"Download size unavailable")),()=>(Q(e(nt)),Q(e(Ke)),Q(r()),Q(o()),Q(l()),x(()=>e(nt)?"✓ Installed":E(e(Ke),r(),o(),l()))),()=>(Q(e(nt)),Q(e(ut)),Q(r()),Q(e(Ke)),x(()=>!e(nt)&&(U(e(ut))||!r()[e(Ke).id])))]),re("change",Ai,va=>y(H,{...e(H),[e(at).id]:va.currentTarget.value})),re("click",Ut,()=>e(nt)?$()(e(at),e(Ke)):_()(e(at),e(Ke))),J(ma,hi)},wi=ma=>{var hi=k9(),zi=q(ht(hi)),ui=k(zi);{var hn=Vi=>{var _n=w9();ie(()=>_e(_n,"href",(e(at),x(()=>e(at).weights_url)))),J(Vi,_n)};ve(ui,Vi=>{e(at),x(()=>e(at).weights_url)&&Vi(hn)})}var Ai=q(ui);w(zi),re("click",Ai,()=>$()(e(at))),J(ma,hi)};ve(ea,ma=>{e(Ke)?ma(da):ma(wi,-1)})}w(Gt),ie(ma=>{W(sa,(e(at),x(()=>e(at).display_name))),W(Fa,ma)},[()=>(Q(M()),e(at),x(()=>M()(e(at))))]),J(_t,Gt)}),w(Ze),J(Be,Ze)},Be=>{var Re=T9(),Ze=q(k(Re));w(Re),re("click",Ze,()=>{y(G,""),y(A,""),y(B,"all")}),J(Be,Re)}),w(L),ie((Be,Re,Ze,Ne)=>{W(D,`${Be??""} models · ${Re??""} packages installed`),W(le,d()||h()),_e(we,"placeholder",h()),pe.disabled=m(),Te.disabled=Ze,he.disabled=m()||p(),Ae.disabled=(Q(m()),Q(g()),x(()=>m()||!g().length)),W(rt,`${Ne??""} models · A–Z`)},[()=>(Q(s()),x(()=>s().reduce((Be,Re)=>Be+Re.entries.length,0))),()=>(Q(s()),Q(r()),x(()=>V(s().flatMap(Be=>Be.entries),r()))),()=>(Q(m()),Q(c()),Q(d()),x(()=>m()||!c().trim()||c().trim()===d())),()=>(e(i),x(()=>e(i).reduce((Be,Re)=>Be+Re.entries.length,0)))]),Sa(we,c),re("click",pe,()=>u()()),re("click",Te,()=>f()(!1)),re("click",he,()=>f()(!0)),re("change",Ae,Be=>{c(Be.currentTarget.value),Be.currentTarget.value=""}),Sa(ye,()=>e(G),Be=>y(G,Be)),ur(de,()=>e(A),Be=>y(A,Be)),ur(Ie,()=>e(B),Be=>y(B,Be)),J(a,L),Mi()}const C9="audiocpp-native-studio",A9="audiocpp-native-apps",Xd="voices",S2="model-presets";function G9(a){const t=a===Xd;return new Promise((i,n)=>{const s=indexedDB.open(t?C9:A9,1);s.onupgradeneeded=()=>{for(const r of t?[Xd]:[S2,"app-projects"])s.result.createObjectStore(r,{keyPath:"id"})},s.onsuccess=()=>i(s.result),s.onerror=()=>n(s.error||new Error("Could not open the library."))})}function Xo(a,t,i){return G9(a).then(n=>new Promise((s,r)=>{const o=n.transaction(a,t),l=i(o.objectStore(a));l.onerror=()=>r(l.error||new Error("Library operation failed.")),o.oncomplete=()=>{n.close(),s(l.result)},o.onabort=()=>{n.close(),r(o.error||new Error("Library transaction was aborted."))},o.onerror=()=>{n.close(),r(o.error||new Error("Library transaction failed."))}}))}async function Zd(){return(await Xo(Xd,"readonly",t=>t.getAll())).sort((t,i)=>i.createdAt-t.createdAt)}function F9(a){return Xo(Xd,"readwrite",t=>t.put(a))}function M9(a){return Xo(Xd,"readwrite",t=>t.delete(a))}async function z9(){return(await Xo(S2,"readonly",t=>t.getAll())).filter(t=>["tts","clon","vdes"].includes(t.model.task))}async function E9(a){return(await Xo("app-projects","readonly",i=>i.getAll())).filter(i=>i.appId===a).sort((i,n)=>n.updatedAt-i.updatedAt)}function U9(a){return Xo("app-projects","readwrite",t=>t.put(a))}function R9(a){return Xo("app-projects","readwrite",t=>t.delete(a))}function B9(a){return Xo("app-projects","readonly",t=>t.get(a))}var P9=ae(''),j9=ae(''),N9=ae(''),O9=ae('

          '),I9=ae('
          ',1),D9=ae('

          Select a voice

          '),L9=ae('

          Voices

          ');function V9(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y();let r=Se(t,"ontext",8),o=Se(t,"onchange",8),l=Y([]),c=Y(),d=Y(),g=Y(""),h=Y(!1),m=Y(""),p=Y();function u(){return!e(h)&&(!e(n)||confirm("Discard unsaved voice edits?"))}async function f(){y(l,await Zd())}function _(R){e(n)&&!confirm("Discard unsaved voice edits?")||(y(d,R),y(c,{...R}),y(m,""))}async function v(R){if(!(!R||e(h))){if(e(n)&&!confirm("Discard unsaved voice edits?")){Et(p,e(p).value="");return}y(h,!0),y(m,"");try{const we=await Gr(R);y(c,{id:crypto.randomUUID(),name:R.name.replace(/\.[^.]+$/,""),transcript:"",audio:we,createdAt:Date.now()}),y(d,void 0)}catch(we){y(m,`Cannot import ${R.name}: ${String(we)}`)}finally{y(h,!1),Et(p,e(p).value="")}}}async function b(){if(e(c)){if(!e(c).name.trim()){y(m,"Give this voice a name.");return}y(h,!0),y(m,"");try{const R={...e(c),name:e(c).name.trim()};await F9(R),await f(),y(d,R),y(c,{...R}),await o()()}catch(R){y(m,String(R))}finally{y(h,!1)}}}async function S(){if(!(!e(c)||!confirm(`Delete voice "${e(c).name}"?`))){y(h,!0),y(m,"");try{e(d)&&await M9(e(c).id),y(c,void 0),y(d,void 0),await f(),await o()()}catch(R){y(m,String(R))}finally{y(h,!1)}}}async function $(){if(!(!e(c)||e(n)||e(h))){y(m,"");try{await r()(e(c))}catch(R){y(m,String(R))}}}function M(){if(!e(c))return;const R=URL.createObjectURL(e(c).audio),we=document.createElement("a");we.href=R,we.download=`${e(c).name}.wav`,we.click(),setTimeout(()=>URL.revokeObjectURL(R),1e3)}Jn(()=>{f().catch(R=>y(m,String(R)))}),Ue(()=>(e(l),e(g)),()=>{y(i,e(l).filter(R=>`${R.name} ${R.transcript}`.toLowerCase().includes(e(g).toLowerCase())))}),Ue(()=>(e(c),e(d)),()=>{y(n,!!e(c)&&(!e(d)||e(c).name!==e(d).name||e(c).transcript!==e(d).transcript||e(c).audio!==e(d).audio))}),Ue(()=>e(c),()=>{y(s,e(c)?new File([e(c).audio],`${e(c).name}.wav`,{type:"audio/wav"}):null)}),wn();var N={canClose:u};Zi();var P=L9();re("beforeunload",wc,R=>{(e(n)||e(h))&&(R.preventDefault(),R.returnValue="")});var C=k(P),j=k(C),G=k(j);El(G,{size:25});var A=q(G,2),B=k(A);w(A),w(j);var H=q(j,2),U=k(H);wm(U,{size:16}),zt(),w(H);var E=q(H,2);Ci(E,R=>y(p,R),()=>e(p)),w(C);var O=q(C,2);{var V=R=>{var we=P9(),pe=k(we,!0);w(we),ie(()=>W(pe,e(m))),J(R,we)};ve(O,R=>{e(m)&&R(V)})}var L=q(O,2),T=k(L),F=k(T),z=k(F);nb(z,{size:16});var D=q(z);Pt(D),w(F);var K=q(F,2);Ct(K,5,()=>e(i),R=>R.id,(R,we)=>{var pe=j9();let Te;var he=k(pe),Pe=k(he,!0);w(he);var Le=q(he),ct=k(Le,!0);w(Le);var Ae=q(Le,2),Ge=k(Ae,!0);w(Ae),w(pe),ie(ne=>{pe.disabled=e(h),Te=ya(pe,1,"voice-tile svelte-19fh7lt",null,Te,{active:e(c)?.id===e(we).id}),W(Pe,ne),W(ct,(e(we),x(()=>e(we).name))),W(Ge,(e(we),x(()=>e(we).transcript||"No transcript")))},[()=>(e(we),x(()=>e(we).name.slice(0,1).toUpperCase()))]),re("click",pe,()=>_(e(we))),J(R,pe)}),w(K);var X=q(K,2);{var ee=R=>{var we=O9(),pe=k(we);El(pe,{size:36});var Te=q(pe),he=k(Te,!0);w(Te);var Pe=q(Te);{var Le=ct=>{var Ae=N9(),Ge=k(Ae);wm(Ge,{size:16}),zt(),w(Ae),ie(()=>Ae.disabled=e(h)),re("click",Ae,()=>e(p).click()),J(ct,Ae)};ve(Pe,ct=>{e(g)||ct(Le)})}w(we),ie(()=>W(he,e(g)?"No matching voices":"Your voice collection is empty")),J(R,we)};ve(X,R=>{e(i),x(()=>!e(i).length)&&R(ee)})}w(T);var ce=q(T,2),fe=k(ce);{var le=R=>{var we=I9(),pe=ht(we),Te=q(k(pe));Pt(Te),w(pe);var he=q(pe,2);ss(he,{get file(){return e(s)},label:"Voice preview"});var Pe=q(he,2),Le=q(k(Pe));sn(Le),w(Pe);var ct=q(Pe,2),Ae=k(ct),Ge=k(Ae);HS(Ge,{size:16});var ne=q(Ge,1,!0);w(Ae);var Je=q(Ae,2),ue=k(Je);qd(ue,{size:16}),w(Je);var ye=q(Je,2),de=k(ye);ho(de,{size:16}),w(ye),w(ct);var be=q(ct,2),xe=k(be),Ie=k(xe);Oo(Ie,{size:16}),zt(),w(xe),w(be),ie(()=>{Te.disabled=e(h),Le.disabled=e(h),Ae.disabled=e(h)||!e(n),W(ne,e(n)?"Save voice":"Saved"),Je.disabled=e(h),ye.disabled=e(h),xe.disabled=e(h)||e(n)}),Sa(Te,()=>e(c).name,$e=>Et(c,e(c).name=$e)),Sa(Le,()=>e(c).transcript,$e=>Et(c,e(c).transcript=$e)),re("click",Ae,b),re("click",Je,M),re("click",ye,S),re("click",xe,$),J(R,we)},ge=R=>{var we=D9(),pe=k(we);ym(pe,{size:32}),zt(),w(we),J(R,we)};ve(fe,R=>{e(c)?R(le):R(ge,-1)})}return w(ce),w(L),w(P),ie(()=>{W(B,`${e(l),x(()=>e(l).length)??""} saved · This browser`),H.disabled=e(h)}),re("click",H,()=>e(p).click()),re("change",E,R=>v(R.currentTarget.files?.[0])),Sa(D,()=>e(g),R=>y(g,R)),J(a,P),Al(t,"canClose",u),Mi(N)}async function Pf(){const[a,t]=await Promise.all([Sm(),Uc()]),i=[],n=t.filter(s=>!a.ui_management||s.configured);for(const s of n){const r=Di.find(o=>o.id===s.id)||Di.find(o=>o.family===s.family&&o.task===s.task);i.push(x0({...r,...s,display_name:r?.display_name||s.id,load_options:void 0},void 0,s.path,s.session_options||{}))}if(a.ui_management){const s=await lb(),r=new Map(s.data.map(o=>[o.id,o]));for(const o of Di.filter(l=>!n.some(c=>c.id===l.id))){const l=(o.install_packages||[]).map(c=>Fd(c,r.get(c.id))).filter(c=>r.get(c.id)?.installed&&c.load_target);for(const c of l)i.push(x0(o,c,Tm(c).model_path));if(!l.length){const c=t.find(d=>d.id===o.id&&d.loaded);c&&i.push(x0(o,void 0,c.path,c.session_options))}}}return i}function x0(a,t,i,n={...a.session_options,...t?.session_options}){const s=Do[a.id]||Do[a.family]||[],r=Object.fromEntries(s.filter(o=>o.scope!=="session"&&o.default!==void 0&&o.default!==""&&(a.request_options===void 0||a.request_options.includes(o.name))).map(o=>[o.name,o.default]));return{version:1,id:`model:${a.id}:${t?.id||"configured"}`,name:`${a.display_name}${t?` · ${t.label}`:""}`,createdAt:0,model:{id:a.id,display_name:a.display_name,family:t?.load_target?.family??a.family,task:a.task,mode:a.mode,path:i,package_id:t?.id,load_options:{...t?.load_options,...a.load_options},session_options:n},request:{seed:-1,...a.default_voice?{voice:a.default_voice}:{},options:{...a.default_options,...r}},chunking:{enabled:!0,characters:400}}}const S0=yl(0);function H9(){return new Promise((a,t)=>{const i=indexedDB.open("audiocpp-tts-speakers",1);i.onupgradeneeded=()=>i.result.createObjectStore("speakers",{keyPath:"id"}),i.onsuccess=()=>a(i.result),i.onerror=()=>t(i.error)})}async function jf(a,t){const i=await H9();return new Promise((n,s)=>{const r=i.transaction("speakers",a),o=t(r.objectStore("speakers"));r.oncomplete=()=>{i.close(),n(o.result)},r.onabort=r.onerror=()=>{i.close(),s(r.error||new Error("Could not save the speaker library."))}})}async function T0(){const a=await z9();return(await jf("readwrite",i=>{const n=i.getAll();return n.onsuccess=()=>{const s=n.result,r=new Set(s.map(o=>o.id));for(const o of a){const l=`model-preset:${o.id}`;if(!["tts","clon","vdes"].includes(o.model.task)||r.has(l))continue;const c={id:l,name:o.name,configuration:structuredClone(o),voice:{kind:"builtin",id:o.request.voice||""}};i.add(c),s.push(c),r.add(l)}},n})).filter(i=>!("deleted"in i))}async function T2(a){const t=await jf("readwrite",i=>i.put(a));return S0.update(i=>i+1),t}async function W9(a){a.startsWith("model-preset:")?await jf("readwrite",t=>t.put({id:a,deleted:!0})):await jf("readwrite",t=>t.delete(a)),S0.update(t=>t+1)}function $2(){return{version:2,id:crypto.randomUUID(),title:"Untitled narration",updatedAt:Date.now(),speakers:[],defaultSpeakerId:"",pauseIncrement:.1,source:"",chunks:[],archivedChunks:[],reference:null,speech:null,transcription:null,enhancement:null,split:{method:"paragraph",characters:400},assembly:{pause:.25,sampleRate:24e3},finish:{normalize:!1,peakDb:-1,gainDb:0,format:"wav"},assembled:null,finished:null}}function eu(a,t=null){return{id:crypto.randomUUID(),text:a,speakerId:null,takes:[],takeId:"",override:t,pauseAfter:null}}function os(a){return a.takes.find(t=>t.id===a.takeId)}function Zo(a,t){const i=xo(a,t),n=i?.configuration||t.override||a.speech,s=i?.voice||t.voice;if(!n||s?.kind!=="builtin")return n;const r={...n.request};return s.id?r.voice=s.id:delete r.voice,{...n,request:r}}function Nf(a,t){const i=xo(a,t);return i?i.voice.kind==="reference"?i.voice.data:null:t.voice?.kind==="builtin"?null:t.voice?.kind==="reference"?t.voice.data:a.reference}function Ls(a,t){const i=Zo(a,t),n=Nf(a,t);return JSON.stringify([t.text,i?.model,i?.request,n?.id,n?.transcript])}function On(a,t){const i=os(t);return!!i&&i.signature===Ls(a,t)}function q2(a){return JSON.stringify([a.chunks.map(t=>{const i=[t.id,t.takeId,t.pauseAfter],n=os(t)?.editing;return n&&(n.silences.length||n.removed?.length)&&(i.push(n.silences),n.removed?.length&&i.push(n.removed)),i}),a.assembly])}function tu(a){return a.chunks.length>0&&a.chunks.every(t=>On(a,t))&&a.assembled?.signature===q2(a)}function Bc(a){const{format:t,...i}=a.finish;return JSON.stringify([a.assembled?.signature,i,a.enhancement?.model,a.enhancement?.request])}function xo(a,t){const i=t?.speakerId||a.defaultSpeakerId;return a.speakers?.find(n=>n.id===i)}function Ol(a){return a.voice.kind==="reference"?a.voice.data.name:a.voice.id.replace(/^[a-z]{2}_/,"").replace(/_/g," ")||"Model voice"}function C2(a){if(a.speakers){const n=a.version!==2;return a.version=2,n}a.version=2,a.speakers=[],a.defaultSpeakerId="";const t=new Map;function i(n,s,r){const o=JSON.stringify([n.model,n.request,s.kind==="builtin"?s:[s.data.id,s.data.transcript]]),l=t.get(o);if(l)return l;const c={id:crypto.randomUUID(),name:r,configuration:structuredClone(n),voice:structuredClone(s)};return a.speakers.push(c),t.set(o,c.id),c.id}a.speech&&(a.defaultSpeakerId=i(a.speech,a.reference?{kind:"reference",data:a.reference}:{kind:"builtin",id:a.speech.request.voice||""},"Main speaker"));for(const n of[...a.chunks,...a.archivedChunks]){if(!n.override&&!n.voice)continue;const s=n.override||a.speech;if(!s)continue;const r=n.voice||(a.reference?{kind:"reference",data:a.reference}:{kind:"builtin",id:s.request.voice||""});n.speakerId=i(s,r,`Speaker ${a.speakers.length+1}`)}return!0}class au{constructor(t,i){if(this.signal=i,t.version!==1)throw new Error("Unsupported model configuration version.");this.configuration=structuredClone(t);const n=t.request.seed;if(!Number.isInteger(n)||n<-1||n>4294967295)throw new Error("Seed must be -1 or an unsigned 32-bit integer.");this.resolvedSeed=n===-1?crypto.getRandomValues(new Uint32Array(1))[0]:n}signal;configuration;resolvedSeed;prepared=!1;async prepare(){if(this.prepared)return;this.signal.throwIfAborted();const t=await Sm(),i=await Uc();this.signal.throwIfAborted();const n=this.configuration.model,s=i.find(r=>r.id===n.id);if(!t.ui_management||s?.configured){if(!s||s.family!==n.family||s.task!==n.task||s.mode!==n.mode)throw new Error("This model configuration does not match a model registered by this configured server.");if(s.path!==n.path||Object.entries(n.session_options).some(([r,o])=>s.session_options?.[r]!==o))throw new Error("The model configuration differs from the server configuration. Update the server configuration before using it.");if(Object.keys(n.load_options).length)throw new Error("Saved load options cannot be applied to a server-configured model. Use a model managed by the UI.")}else{if(!(await ob(n.path)).exists)throw new Error("The model is not installed at its saved path. Install it in Models first.");this.signal.throwIfAborted(),s?.loaded&&await _o(n.id,this.signal),this.signal.throwIfAborted(),await df({id:n.id,family:n.family,task:n.task,mode:n.mode,path:n.path,load_options:n.load_options,session_options:n.session_options},this.signal)}this.signal.throwIfAborted(),this.prepared=!0}async run(t,i=0){await this.prepare(),this.signal.throwIfAborted();const{model:n,request:s}=this.configuration,{seed:r,...o}=s,l={...s.options};if(["tts","clon","vdes"].includes(n.task)){if(!t.text?.trim())throw new Error("Enter text to synthesize.");const h={...o,options:l,model:n.id,input:t.text,response_format:"wav",seed:(this.resolvedSeed+i)%4294967296};return t.voice_ref&&(delete h.voice,h.voice_ref=t.voice_ref),t.reference_text&&(h.reference_text=t.reference_text),{kind:"audio",blob:(await ff(h,this.signal)).blob}}if(n.task==="asr"){if(!t.audio)throw new Error("Choose audio to transcribe.");const h=["owsm","crisperwhisper"].includes(n.family)&&l.return_timestamps===!0;return{kind:"json",data:await pf({model:n.id,audio:t.audio,language:s.language,text:t.text||"",options:l},this.signal,h)}}const c=await Ul({model:n.id,request:{...o,...t,options:l,seed:(this.resolvedSeed+i)%4294967296}},this.signal);if(typeof c.audio!="string")throw new Error("The processing model did not return a single audio output.");const d=atob(c.audio),g=Uint8Array.from(d,h=>h.charCodeAt(0));return{kind:"audio",blob:new Blob([g],{type:"audio/wav"})}}}var $0=ae(""),Q9=ae(''),K9=ae(''),Y9=ae(''),J9=ae(''),X9=ae(''),Z9=ae(''),eM=ae('
          Request options JSON
          ',1),tM=ae('
          ',1),aM=ae('

          Install a compatible model from Models.

          '),iM=ae(''),nM=ae('
          ');function iu(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y();let l=Se(t,"label",8),c=Se(t,"emptyLabel",8,"Choose an installed model"),d=Se(t,"inherit",8,null),g=Se(t,"choices",8),h=Se(t,"tasks",8),m=Se(t,"families",8,void 0),p=Se(t,"value",12),u=Se(t,"disabled",8,!1),f=Se(t,"settingsLabel",8,"More generation options"),_=Se(t,"onchange",8),v=Y(""),b=Y(""),S=Y(!1);function $(X){p(X?structuredClone(e(i).find(ee=>ee.id===X)):null),y(b,""),y(S,!1),_()("model")}function M(X,ee){e(s)&&(p()||p(structuredClone(e(s))),p({...p(),request:{...p().request,[X]:ee}}),_()())}function N(X,ee){e(s)&&(p()||p(structuredClone(e(s))),p({...p(),request:{...p().request,options:{...e(s).request.options,[X]:ee}}}),_()())}Ue(()=>(Q(g()),Q(h()),Q(m())),()=>{y(i,g().filter(X=>h().includes(X.model.task)&&X.model.mode==="offline"&&(!m()||m().includes(X.model.family))))}),Ue(()=>e(i),()=>{y(n,e(i))}),Ue(()=>(Q(p()),Q(d())),()=>{y(s,p()||d())}),Ue(()=>(e(s),Di),()=>{y(r,e(s)&&(Di.find(X=>X.id===e(s).model.id)||Di.find(X=>X.family===e(s).model.family&&X.task===e(s).model.task)))}),Ue(()=>(e(s),e(r)),()=>{y(o,e(s)?(Do[e(s).model.id]||Do[e(s).model.family]||[]).filter(X=>X.scope!=="session"&&["number","slider","bool","choice"].includes(X.type)&&(e(r)?.request_options===void 0||e(r).request_options.includes(X.name))):[])}),wn(),Zi();var P=nM(),C=k(P),j=k(C,!0),G=q(j),A=k(G),B=k(A,!0);w(A),A.value=A.__value="";var H=q(A);{var U=X=>{var ee=$0(),ce=k(ee);w(ee);var fe={};ie(()=>{W(ce,`${Q(p()),x(()=>p().model.display_name)??""} · saved settings`),fe!==(fe=(Q(p()),x(()=>p().id)))&&(ee.value=(ee.__value=(Q(p()),x(()=>p().id)))??"")}),J(X,ee)},E=Va(()=>(Q(p()),e(i),x(()=>p()&&!e(i).some(X=>X.id===p().id))));ve(H,X=>{e(E)&&X(U)})}var O=q(H);{var V=X=>{var ee=Q9();Ct(ee,5,()=>e(n),Qt,(ce,fe)=>{var le=$0(),ge=k(le,!0);w(le);var R={};ie(()=>{W(ge,(e(fe),x(()=>e(fe).name))),R!==(R=(e(fe),x(()=>e(fe).id)))&&(le.value=(le.__value=(e(fe),x(()=>e(fe).id)))??"")}),J(ce,le)}),w(ee),J(X,ee)};ve(O,X=>{e(n),x(()=>e(n).length)&&X(V)})}w(G);var L;Nn(G),w(C);var T=q(C,2);{var F=X=>{var ee=tM(),ce=ht(ee),fe=k(ce),le=k(fe,!0);w(fe);var ge=q(fe),R=k(ge,!0);w(ge),w(ce);var we=q(ce,2);{var pe=Te=>{var he=eM(),Pe=ht(he),Le=k(Pe);{var ct=be=>{var xe=K9(),Ie=q(k(xe));Pt(Ie),w(xe),ie(()=>{_e(Ie,"aria-label",`${l()} seed`),bi(Ie,(e(s),x(()=>e(s).request.seed))),Ie.disabled=u()}),re("change",Ie,$e=>M("seed",$e.currentTarget.valueAsNumber)),J(be,xe)},Ae=Va(()=>(e(s),x(()=>["tts","clon","vdes"].includes(e(s).model.task))));ve(Le,be=>{e(Ae)&&be(ct)})}var Ge=q(Le,2),ne=q(k(Ge));Pt(ne),w(Ge);var Je=q(Ge,2);Ct(Je,1,()=>e(o),Qt,(be,xe)=>{var Ie=Z9(),$e=k(Ie),ze=q($e);{var Fe=ot=>{var je=Y9();Pt(je),ie(He=>{Cl(je,He),je.disabled=u()},[()=>(e(s),e(xe),x(()=>!!(e(s).request.options[e(xe).name]??e(xe).default)))]),re("change",je,He=>N(e(xe).name,He.currentTarget.checked)),J(ot,je)},qe=ot=>{var je=J9();Ct(je,5,()=>(e(xe),x(()=>e(xe).choices||[])),Qt,(Be,Re)=>{var Ze=$0(),Ne=k(Ze,!0);w(Ze);var Ve={};ie(()=>{W(Ne,e(Re)),Ve!==(Ve=e(Re))&&(Ze.value=(Ze.__value=e(Re))??"")}),J(Be,Ze)}),w(je);var He;Nn(je),ie(Be=>{je.disabled=u(),He!==(He=Be)&&(je.value=(je.__value=Be)??"",kn(je,Be))},[()=>(e(s),e(xe),x(()=>String(e(s).request.options[e(xe).name]??e(xe).default)))]),re("change",je,Be=>N(e(xe).name,Be.currentTarget.value)),J(ot,je)},rt=ot=>{var je=X9();Pt(je),ie(He=>{_e(je,"min",(e(xe),x(()=>e(xe).minimum))),_e(je,"max",(e(xe),x(()=>e(xe).maximum))),_e(je,"step",(e(xe),x(()=>e(xe).step||"any"))),bi(je,He),je.disabled=u()},[()=>(e(s),e(xe),x(()=>Number(e(s).request.options[e(xe).name]??e(xe).default)))]),re("change",je,He=>N(e(xe).name,He.currentTarget.valueAsNumber)),J(ot,je)};ve(ze,ot=>{e(xe),x(()=>e(xe).type==="bool")?ot(Fe):(e(xe),x(()=>e(xe).type==="choice")?ot(qe,1):ot(rt,-1))})}w(Ie),ie(()=>W($e,`${e(xe),x(()=>e(xe).label||e(xe).name)??""} `)),J(be,Ie)}),w(Pe);var ue=q(Pe,2),ye=q(k(ue));sn(ye);var de=q(ye);w(ue),ie(()=>{_e(ne,"aria-label",`${l()} language`),bi(ne,(e(s),x(()=>e(s).request.language||""))),ne.disabled=u(),_e(ye,"aria-label",`${l()} options JSON`),ye.disabled=u(),de.disabled=u()}),re("change",ne,be=>M("language",be.currentTarget.value)),Sa(ye,()=>e(v),be=>y(v,be)),re("click",de,()=>{try{const be=JSON.parse(e(v));if(!be||typeof be!="object"||Array.isArray(be))throw new Error("Options must be a JSON object.");p({...e(s),request:{...e(s).request,options:be}}),y(b,""),_()()}catch(be){y(b,String(be))}}),re("toggle",ue,be=>{be.currentTarget.open&&y(v,JSON.stringify(e(s).request.options,null,2))}),J(Te,he)};ve(we,Te=>{e(S)&&Te(pe)})}ie(Te=>{W(le,(Q(p()),e(s),x(()=>p()?e(s).model.display_name:"Uses the project default"))),ge.disabled=u(),_e(ge,"aria-expanded",e(S)),W(R,Te)},[()=>(e(S),Q(f()),x(()=>e(S)?`Hide ${f().toLowerCase()}`:f()))]),re("click",ge,()=>{y(S,!e(S)),y(v,JSON.stringify(e(s).request.options,null,2))}),J(X,ee)},z=X=>{var ee=aM();J(X,ee)};ve(T,X=>{e(s)?X(F):(e(i),x(()=>!e(i).length)&&X(z,1))})}var D=q(T,2);{var K=X=>{var ee=iM(),ce=k(ee,!0);w(ee),ie(()=>W(ce,e(b))),J(X,ee)};ve(D,X=>{e(b)&&X(K)})}w(P),ie(()=>{W(j,l()),_e(G,"aria-label",l()),G.disabled=u(),W(B,c()),L!==(L=(Q(p()),x(()=>p()?.id||"")))&&(G.value=(G.__value=(Q(p()),x(()=>p()?.id||"")))??"",kn(G,(Q(p()),x(()=>p()?.id||""))))}),re("change",G,X=>$(X.currentTarget.value)),J(a,P),Mi()}var Pc=ae(""),sM=ae(''),rM=ae(''),oM=ae('

          Choose a speech model first.

          '),lM=ae('

          '),cM=ae(''),dM=ae(''),uM=ae('
          Fill transcript using a recognition model
          ',1),fM=ae(''),pM=ae(`
          `);function mM(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y();let l=Se(t,"label",8),c=Se(t,"configuration",8),d=Se(t,"assignment",8),g=Se(t,"inheritedReference",8,null),h=Se(t,"allowInherit",8,!1),m=Se(t,"voices",8),p=Se(t,"choices",8),u=Se(t,"transcription",12),f=Se(t,"disabled",8,!1),_=Se(t,"onchange",8),v=Se(t,"onbusy",8),b=Se(t,"ontranscribe",8),S=Se(t,"onconfiguration",8),$=Y(""),M=Y(""),N=Y();fr(()=>{e(M)&&URL.revokeObjectURL(e(M))});function P(Ae){if(y($,""),Ae==="inherit"){_()(void 0);return}if(Ae.startsWith("builtin:")){_()({kind:"builtin",id:Ae.slice(8)});return}const Ge=m().find(ne=>ne.id===Ae);Ge&&_()({kind:"reference",data:{id:crypto.randomUUID(),name:Ge.name,audio:Ge.audio,transcript:Ge.transcript}})}async function C(Ae){if(Ae){v()(!0),y($,"");try{const Ge=await Gr(Ae);_()({kind:"reference",data:{id:crypto.randomUUID(),name:Ae.name,audio:Ge,transcript:""}})}catch(Ge){y($,String(Ge))}finally{v()(!1)}}}Ue(()=>(Q(d()),Q(g())),()=>{y(r,d()?.kind==="reference"?d().data:d()?.kind==="builtin"?null:g())}),Ue(()=>(e(r),e(N),e(M)),()=>{e(r)?.audio!==e(N)&&(e(M)&&URL.revokeObjectURL(e(M)),y(N,e(r)?.audio),y(M,e(N)?URL.createObjectURL(e(N)):""))}),Ue(()=>(Q(c()),Di),()=>{y(i,c()&&(Di.find(Ae=>Ae.id===c().model.id)||Di.find(Ae=>Ae.family===c().model.family&&Ae.task===c().model.task)))}),Ue(()=>e(i),()=>{y(n,e(i)?.builtin_voices||[])}),Ue(()=>(Q(c()),Io),()=>{y(s,!!c()&&(c().model.task==="clon"||Io[c().model.family]?.includes("speaker_reference")))}),Ue(()=>(Q(d()),Q(h()),Q(c())),()=>{y(o,d()?.kind==="reference"?"reference":d()?.kind==="builtin"?`builtin:${d().id}`:h()?"inherit":`builtin:${c()?.request.voice||""}`)}),wn(),Zi();var j=pM(),G=k(j),A=k(G),B=q(A),H=k(B);{var U=Ae=>{var Ge=Pc(),ne=k(Ge);w(Ge),Ge.value=Ge.__value="inherit",ie(()=>W(ne,`Use default · ${Q(g()),Q(c()),x(()=>g()?.name||c()?.request.voice||"model default")??""}`)),J(Ae,Ge)};ve(H,Ae=>{h()&&Ae(U)})}var E=q(H);{var O=Ae=>{var Ge=Pc(),ne=k(Ge);w(Ge),Ge.value=Ge.__value="reference",ie(()=>W(ne,`Recording: ${e(r),x(()=>e(r).name)??""}`)),J(Ae,Ge)};ve(E,Ae=>{e(r)&&Ae(O)})}var V=q(E);V.value=V.__value="builtin:";var L=q(V);{var T=Ae=>{var Ge=Pc(),ne=k(Ge);w(Ge);var Je={};ie(()=>{W(ne,`${Q(c()),x(()=>c().request.voice)??""} · saved setting`),Je!==(Je=(Q(c()),x(()=>`builtin:${c().request.voice}`)))&&(Ge.value=(Ge.__value=(Q(c()),x(()=>`builtin:${c().request.voice}`)))??"")}),J(Ae,Ge)},F=Va(()=>(Q(c()),e(n),x(()=>c()?.request.voice&&!e(n).includes(c().request.voice))));ve(L,Ae=>{e(F)&&Ae(T)})}var z=q(L);{var D=Ae=>{var Ge=sM();Ct(Ge,5,()=>e(n),Qt,(ne,Je)=>{var ue=Pc(),ye=k(ue);w(ue);var de={};ie(be=>{W(ye,`${be??""} · ${e(Je)??""}`),de!==(de=`builtin:${e(Je)}`)&&(ue.value=ue.__value=`builtin:${e(Je)}`)},[()=>(e(Je),x(()=>e(Je).includes("_")?e(Je).slice(e(Je).indexOf("_")+1).replace(/_/g," "):e(Je)))]),J(ne,ue)}),w(Ge),J(Ae,Ge)};ve(z,Ae=>{e(n),x(()=>e(n).length)&&Ae(D)})}var K=q(z);{var X=Ae=>{var Ge=rM();Ct(Ge,5,m,Qt,(ne,Je)=>{var ue=Pc(),ye=k(ue,!0);w(ue);var de={};ie(()=>{W(ye,(e(Je),x(()=>e(Je).name))),de!==(de=(e(Je),x(()=>e(Je).id)))&&(ue.value=(ue.__value=(e(Je),x(()=>e(Je).id)))??"")}),J(ne,ue)}),w(Ge),J(Ae,Ge)};ve(K,Ae=>{e(s),Q(m()),x(()=>e(s)&&m().length)&&Ae(X)})}var ee=q(K);{var ce=Ae=>{var Ge=Pc(),ne=k(Ge);w(Ge);var Je={};ie(()=>{W(ne,`${Q(d()),x(()=>d().id)??""} · saved in project`),Je!==(Je=(Q(d()),x(()=>`builtin:${d().id}`)))&&(Ge.value=(Ge.__value=(Q(d()),x(()=>`builtin:${d().id}`)))??"")}),J(Ae,Ge)},fe=Va(()=>(Q(d()),e(n),Q(c()),x(()=>d()?.kind==="builtin"&&d().id&&!e(n).includes(d().id)&&c()?.request.voice!==d().id)));ve(ee,Ae=>{e(fe)&&Ae(ce)})}w(B);var le;Nn(B),w(G);var ge=q(G,2);{var R=Ae=>{var Ge=oM();J(Ae,Ge)},we=Ae=>{var Ge=lM(),ne=k(Ge,!0);w(Ge),ie(()=>W(ne,(Q(d()),Q(c()),x(()=>d()?.kind==="builtin"?`Voice: ${d().id||"model default"}`:`Current voice: ${c().request.voice||"model default"}`)))),J(Ae,Ge)};ve(ge,Ae=>{c()?e(r)||Ae(we,1):Ae(R)})}var pe=q(ge,2);{var Te=Ae=>{var Ge=cM(),ne=q(k(Ge));w(Ge),ie(()=>ne.disabled=f()),re("change",ne,Je=>C(Je.currentTarget.files?.[0])),J(Ae,Ge)};ve(pe,Ae=>{e(s)&&Ae(Te)})}var he=q(pe,2);{var Pe=Ae=>{var Ge=uM(),ne=ht(Ge);{var Je=$e=>{var ze=dM();J($e,ze)};ve(ne,$e=>{e(s)||$e(Je)})}var ue=q(ne,2),ye=q(ue,2),de=q(k(ye));sn(de),w(ye);var be=q(ye,2),xe=q(k(be));{let $e=Nt(()=>`${l()} recognition model`);iu(xe,{get label(){return e($e)},get choices(){return p()},tasks:["asr"],get disabled(){return f()},get onchange(){return S()},get value(){return u()},set value(ze){u(ze)},$$legacy:!0})}var Ie=q(xe);w(be),ie(()=>{_e(ue,"src",e(M)),_e(de,"aria-label",`${l()} transcript`),bi(de,(e(r),x(()=>e(r).transcript))),de.disabled=f(),Ie.disabled=f()||!u()}),re("play",ue,$e=>document.querySelectorAll(".tts-app audio").forEach(ze=>{ze!==$e.currentTarget&&ze.pause()})),re("input",de,$e=>_()({kind:"reference",data:{...e(r),transcript:$e.currentTarget.value}})),re("click",Ie,function(...$e){b()?.apply(this,$e)}),J(Ae,Ge)};ve(he,Ae=>{e(r)&&Ae(Pe)})}var Le=q(he,2);{var ct=Ae=>{var Ge=fM(),ne=k(Ge,!0);w(Ge),ie(()=>W(ne,e($))),J(Ae,Ge)};ve(Le,Ae=>{e($)&&Ae(ct)})}w(j),ie(()=>{W(A,`${l()??""} `),_e(B,"aria-label",l()),B.disabled=f()||!c(),le!==(le=e(o))&&(B.value=(B.__value=e(o))??"",kn(B,e(o)))}),re("change",B,Ae=>P(Ae.currentTarget.value)),J(a,j),Mi()}var gM=ae(""),hM=ae(''),_M=ae(''),vM=ae('

          A speaker preset saves the model, voice, and generation settings together.

          Saved as a speaker preset for future projects.
          ');function A2(a,t){Fi(t,!1);let i=Se(t,"initial",8,null),n=Se(t,"saved",24,()=>[]),s=Se(t,"choices",8),r=Se(t,"voices",8),o=Se(t,"number",8,1),l=Se(t,"presetEditor",8,!1),c=Se(t,"onsave",8),d=Se(t,"onclose",8),g=Se(t,"onbusy",8),h=Y(i()?.name||`Speaker ${o()}`),m=Y(i()?structuredClone(i().configuration):null),p=Y(i()?structuredClone(i().voice):{kind:"builtin",id:""}),u=Y(null),f=Y(""),_=Y(!1),v=Y(""),b=Y(),S=Y(null);function $(R){y(f,R),y(v,"");const we=n().find(pe=>pe.id===R);y(h,we?.name||`Speaker ${o()}`),y(m,we?structuredClone(we.configuration):null),y(p,we?structuredClone(we.voice):{kind:"builtin",id:""})}function M(R){y(_,R),g()(R)}async function N(){if(e(p)?.kind!=="reference"||!e(u)||e(_))return;const R=e(p).data;M(!0),y(v,""),y(S,new AbortController);try{const we=new au(e(u),e(S).signal),pe=await hr(R.audio,e(S).signal),Te=await we.run({audio:pe});if(Te.kind!=="json"||typeof Te.data.text!="string")throw new Error("The model did not return a transcript.");y(p,{kind:"reference",data:{...R,transcript:Te.data.text}})}catch(we){y(v,e(S)?.signal.aborted?"":String(we))}finally{y(S,null),M(!1)}}async function P(){if(!(!e(h).trim()||!e(m)||!e(p)||e(_))){M(!0),y(v,"");try{await c()({id:i()?.id||e(f)||crypto.randomUUID(),name:e(h).trim(),configuration:structuredClone(e(m)),voice:structuredClone(e(p))}),d()()}catch(R){y(v,`Could not save speaker: ${String(R)}`)}finally{M(!1)}}}Jn(()=>e(b).showModal()),fr(()=>{e(S)?.abort(),g()(!1)}),Zi();var C=vM(),j=k(C),G=k(j),A=k(G);Ad(A,{size:20}),w(G);var B=q(G,2),H=k(B),U=k(H,!0);w(H),zt(2),w(B);var E=q(B,2),O=k(E);rb(O,{size:18}),w(E),w(j);var V=q(j,2),L=k(V);{var T=R=>{var we=hM(),pe=q(k(we)),Te=k(pe);Te.value=Te.__value="";var he=q(Te);Ct(he,1,n,Qt,(Le,ct)=>{var Ae=gM(),Ge=k(Ae,!0);w(Ae);var ne={};ie(()=>{W(Ge,(e(ct),x(()=>e(ct).name))),ne!==(ne=(e(ct),x(()=>e(ct).id)))&&(Ae.value=(Ae.__value=(e(ct),x(()=>e(ct).id)))??"")}),J(Le,Ae)}),w(pe);var Pe;Nn(pe),w(we),ie(()=>{pe.disabled=e(_),Pe!==(Pe=e(f))&&(pe.value=(pe.__value=e(f))??"",kn(pe,e(f)))}),re("change",pe,Le=>$(Le.currentTarget.value)),J(R,we)};ve(L,R=>{Q(i()),Q(n()),x(()=>!i()&&n().length)&&R(T)})}var F=q(L,2),z=q(k(F));Pt(z),w(F);var D=q(F,2);iu(D,{label:"Speech model",emptyLabel:"Choose an installed speech model",settingsLabel:"Model settings",get choices(){return s()},tasks:["tts","clon","vdes"],get disabled(){return e(_)},onchange:R=>{R==="model"&&y(p,{kind:"builtin",id:e(m)?.request.voice||""})},get value(){return e(m)},set value(R){y(m,R)},$$legacy:!0});var K=q(D,2);mM(K,{label:"Speaker voice",get configuration(){return e(m)},get assignment(){return e(p)},get voices(){return r()},get choices(){return s()},get disabled(){return e(_)},onchange:R=>y(p,R),onbusy:M,ontranscribe:N,onconfiguration:()=>{},get transcription(){return e(u)},set transcription(R){y(u,R)},$$legacy:!0});var X=q(K,2);{var ee=R=>{var we=_M(),pe=k(we,!0);w(we),ie(()=>W(pe,e(v))),J(R,we)};ve(X,R=>{e(v)&&R(ee)})}w(V);var ce=q(V,2),fe=q(k(ce)),le=q(fe),ge=k(le,!0);w(le),w(ce),w(C),Ci(C,R=>y(b,R),()=>e(b)),ie(R=>{W(U,l()?i()?"Edit speaker preset":"New speaker preset":i()?"Edit speaker":"Add a speaker"),E.disabled=e(_),z.disabled=e(_),fe.disabled=e(_),le.disabled=R,W(ge,e(_)?"Working…":l()?"Save preset":i()?"Save speaker":"Add speaker")},[()=>(e(_),e(h),e(m),e(p),x(()=>e(_)||!e(h).trim()||!e(m)||!e(p)))]),re("click",E,function(...R){d()?.apply(this,R)}),Sa(z,()=>e(h),R=>y(h,R)),re("click",fe,function(...R){d()?.apply(this,R)}),re("click",le,P),re("cancel",C,R=>{R.target===R.currentTarget&&(e(_)?(R.preventDefault(),e(S)?.abort()):d()())}),J(a,C),Mi()}var bM=ae(''),yM=ae('

          Loading speaker presets…

          '),wM=ae(''),kM=ae('

          '),xM=ae('

          Model
          Voice
          Voice source
          Seed
          Language
          ',1),SM=ae('

          Select a speaker to see its settings.

          '),TM=ae('
          '),$M=ae('

          Speakers

          Manage speaker presets here, then choose them in Text to speech. Existing projects keep their own speaker settings.

          ',1);function qM(a,t){Fi(t,!1);const i=Y(),n=Y();let s=Y([]),r=Y([]),o=Y([]),l=Y(""),c=Y(""),d=Y(null),g=Y(!1),h=Y(!1),m=Y(!0),p=Y("");function u(){return!e(h)&&!e(g)}async function f(){y(s,await T0())}function _(F){y(d,F?structuredClone(F):null),y(g,!0),y(p,"")}async function v(F){await T2(F),await f(),y(c,F.id),y(l,"")}async function b(){if(!(!e(n)||e(h))){y(h,!0),y(p,"");try{const F=`${e(n).name} copy`;let z=F;for(let D=2;e(s).some(K=>K.name===z);D++)z=`${F} ${D}`;await v({...structuredClone(e(n)),id:crypto.randomUUID(),name:z})}catch(F){y(p,`Could not duplicate speaker: ${String(F)}`)}finally{y(h,!1)}}}async function S(){if(!(!e(n)||e(h)||!confirm(`Delete speaker preset "${e(n).name}"? Existing projects keep their own copy.`))){y(h,!0),y(p,"");try{await W9(e(n).id),await f(),y(c,"")}catch(F){y(p,`Could not delete speaker: ${String(F)}`)}finally{y(h,!1)}}}Jn(async()=>{try{const[F,z,D]=await Promise.all([T0(),Pf().catch(K=>(y(p,`Models are unavailable. Saved speakers can still be edited. ${String(K)}`),[])),Zd()]);y(s,F),y(r,z),y(o,D)}catch(F){y(p,`Could not open speaker presets: ${String(F)}`)}finally{y(m,!1)}}),Ue(()=>(e(s),e(l)),()=>{y(i,e(s).filter(F=>`${F.name} ${F.configuration.model.display_name} ${Ol(F)}`.toLowerCase().includes(e(l).toLowerCase())))}),Ue(()=>(e(s),e(c)),()=>{y(n,e(s).find(F=>F.id===e(c)))}),wn();var $={canClose:u};Zi();var M=$M(),N=ht(M),P=k(N),C=k(P),j=q(k(C)),G=k(j);w(j),w(C);var A=q(C,2),B=k(A);Dr(B,{size:16}),zt(),w(A),w(P);var H=q(P,4);{var U=F=>{var z=bM(),D=k(z,!0);w(z),ie(()=>W(D,e(p))),J(F,z)};ve(H,F=>{e(p)&&F(U)})}var E=q(H,2);{var O=F=>{var z=yM();J(F,z)},V=F=>{var z=TM(),D=k(z),K=k(D),X=k(K);nb(X,{size:16});var ee=q(X);Pt(ee),w(K);var ce=q(K,2);Ct(ce,5,()=>e(i),Te=>Te.id,(Te,he)=>{var Pe=wM();let Le;var ct=k(Pe),Ae=k(ct);Ad(Ae,{size:20}),w(ct);var Ge=q(ct),ne=k(Ge,!0);w(Ge);var Je=q(Ge,2),ue=k(Je,!0);w(Je);var ye=q(Je),de=k(ye,!0);w(ye),w(Pe),ie(be=>{Le=ya(Pe,1,"speaker-tile svelte-1rz8r6m",null,Le,{active:e(c)===e(he).id}),_e(Pe,"aria-pressed",(e(c),e(he),x(()=>e(c)===e(he).id))),_e(Pe,"aria-label",(e(he),x(()=>`Select ${e(he).name}`))),Pe.disabled=e(h),W(ne,(e(he),x(()=>e(he).name))),W(ue,be),W(de,(e(he),x(()=>e(he).configuration.model.display_name)))},[()=>(Q(Ol),e(he),x(()=>Ol(e(he))))]),re("click",Pe,()=>y(c,e(he).id)),J(Te,Pe)}),w(ce);var fe=q(ce,2);{var le=Te=>{var he=kM(),Pe=k(he);Ad(Pe,{size:32});var Le=q(Pe),ct=k(Le,!0);w(Le);var Ae=q(Le),Ge=k(Ae,!0);w(Ae),w(he),ie(()=>{W(ct,e(l)?"No matching speakers":"Create your first speaker preset"),W(Ge,e(l)?"Try a different name, voice, or model.":"Save a model, voice, and generation settings once, then reuse them in your TTS projects.")}),J(Te,he)};ve(fe,Te=>{e(i),x(()=>!e(i).length)&&Te(le)})}w(D);var ge=q(D,2),R=k(ge);{var we=Te=>{var he=xM(),Pe=ht(he),Le=k(Pe,!0);w(Pe);var ct=q(Pe,2),Ae=q(k(ct)),Ge=k(Ae,!0);w(Ae);var ne=q(Ae,2),Je=k(ne,!0);w(ne);var ue=q(ne,2),ye=k(ue,!0);w(ue);var de=q(ue,2),be=k(de,!0);w(de);var xe=q(de,2),Ie=k(xe,!0);w(xe),w(ct);var $e=q(ct,2),ze=k($e),Fe=k(ze);tb(Fe,{size:15}),zt(),w(ze);var qe=q(ze),rt=k(qe);hS(rt,{size:15}),zt(),w(qe);var ot=q(qe),je=k(ot);ho(je,{size:15}),zt(),w(ot),w($e),ie(He=>{W(Le,(e(n),x(()=>e(n).name))),W(Ge,(e(n),x(()=>e(n).configuration.model.display_name))),W(Je,He),W(ye,(e(n),x(()=>e(n).voice.kind==="reference"?"Reference recording":"Built-in voice"))),W(be,(e(n),x(()=>e(n).configuration.request.seed===-1?"Random":e(n).configuration.request.seed))),W(Ie,(e(n),x(()=>e(n).configuration.request.language||"Model default"))),ze.disabled=e(h),qe.disabled=e(h),ot.disabled=e(h)},[()=>(Q(Ol),e(n),x(()=>Ol(e(n))))]),re("click",ze,()=>_(e(n))),re("click",qe,b),re("click",ot,S),J(Te,he)},pe=Te=>{var he=SM(),Pe=k(he);Ad(Pe,{size:28}),zt(),w(he),J(Te,he)};ve(R,Te=>{e(n)?Te(we):Te(pe,-1)})}w(ge),w(z),Sa(ee,()=>e(l),Te=>y(l,Te)),J(F,z)};ve(E,F=>{e(m)?F(O):F(V,-1)})}w(N);var L=q(N,2);{var T=F=>{{let z=Nt(()=>(e(s),x(()=>e(s).length+1)));A2(F,{get initial(){return e(d)},get choices(){return e(r)},get voices(){return e(o)},get number(){return e(z)},onsave:v,onclose:()=>y(g,!1),onbusy:D=>y(h,D),presetEditor:!0})}};ve(L,F=>{e(g)&&F(T)})}return ie(()=>{W(G,`${e(s),x(()=>e(s).length)??""} saved · Model, voice, and settings together`),A.disabled=e(h)||e(m)}),re("click",A,()=>_(null)),J(a,M),Al(t,"canClose",u),Mi($)}var CM=ae(' ',1);function AM(a,t){Fi(t,!1);let i=Se(t,"onchange",8),n=Se(t,"ontext",8),s=Y("voices"),r=Y(null),o=Y(null);function l(){return e(s)==="voices"?e(r)?.canClose()??!0:e(o)?.canClose()??!0}function c(M){e(s)!==M&&l()&&y(s,M)}var d={canClose:l},g=CM(),h=ht(g),m=k(h);let p;var u=k(m);El(u,{size:16}),zt(),w(m);var f=q(m,2);let _;var v=k(f);Ad(v,{size:16}),zt(),w(f),w(h);var b=q(h,2);{var S=M=>{Ci(V9(M,{get onchange(){return i()},get ontext(){return n()},$$legacy:!0}),N=>y(r,N),()=>e(r))},$=M=>{Ci(qM(M,{$$legacy:!0}),N=>y(o,N),()=>e(o))};ve(b,M=>{e(s)==="voices"?M(S):M($,-1)})}return ie(()=>{_e(m,"aria-pressed",e(s)==="voices"),p=ya(m,1,"svelte-inevtl",null,p,{active:e(s)==="voices"}),_e(f,"aria-pressed",e(s)==="speakers"),_=ya(f,1,"svelte-inevtl",null,_,{active:e(s)==="speakers"})}),re("click",m,()=>c("voices")),re("click",f,()=>c("speakers")),J(a,g),Al(t,"canClose",l),Mi(d)}var Of=ae(""),nu=ae(""),GM=ae("
          "),FM=ae(""),MM=ae(""),zM=ae(' ',1),EM=ae('
          '),UM=ae('
          '),RM=ae(''),BM=ae('
          '),PM=ae('
          '),jM=ae(' ',1),NM=ae(' ',1),OM=ae(' ',1),su=ae(" "),IM=ae(''),DM=ae(''),LM=ae(''),VM=ae('
          '),HM=ae('
          '),WM=ae(''),QM=ae(''),KM=ae('
          '),G2=ae(" "),YM=ae('
          '),JM=ae(' ',1),XM=ae(' ',1),ZM=ae(''),ez=ae(''),tz=ae('
          '),az=ae('
          '),iz=ae('
          '),nz=ae('
          '),F2=ae(" ",1),sz=ae('
          '),rz=ae('
          '),oz=ae(' ',1),lz=ae(' ',1),cz=ae('
          '),dz=ae(' ',1),uz=ae('
          '),fz=ae('
          '),pz=ae(' ',1),mz=ae('
          '),gz=ae(''),hz=ae(""),_z=ae('
          '),vz=ae(""),bz=ae("
          "),yz=ae('
          '),wz=ae('
          JSON
          '),kz=ae(' '),xz=ae('

          ',1),Sz=ae('

          ',1),Tz=ae(' '),$z=ae(' '),qz=ae(''),M2=ae('
          '),Cz=ae(""),Az=ae('
          ∿

          '),Gz=ae(''),Fz=ae('
          Response JSON
           
          '),Mz=ae(''),zz=ae('
        • '),Ez=ae('
            '),Uz=ae('

            ',1),Rz=ae('

             
            ',1),Bz=ae('
            '),Pz=ae('
            '),z2=ae('
            '),jz=ae(''),Nz=ae('
            '),Oz=ae('
            '),Iz=ae('
            A
            audio.cpp
            audio.cpp native WebUI
            ',1);function Dz(a,t){Fi(t,!1);const i=()=>zu(Rf,"$uiConfiguration",n),[n,s]=vp(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y(),g=Y(),h=Y(),m=Y(),p=Y(),u=Y(),f=Y(),_=Y(),v=Y(),b=Y(),S=Y(),$=Y(),M=Y(),N=Y(),P=Y(),C=Y(),j=Y(),G=Y(),A=Y(),B=Y(),H=Y(),U=Y(),E=Y(),O=Y(),V=Y(),L=Y(),T=Y(),F=Y(),z=Y(),D=Y(),K=Y();let X=Y("studio"),ee=Y(null),ce=Y(null),fe=Y(!1),le=Y(null),ge=Y(Di[0]?.id||""),R=Y(Di[0]),we=Y(e(R)?.path||""),pe=Y(!1),Te=Y([]),he=Y(null),Pe=Y(null),Le=Y(!1),ct=Y(!1),Ae=Y(!1),Ge=Y(!1),ne=Y("Ready"),Je=Y(""),ue=Y(""),ye=Y(""),de=Y(""),be=Y("English"),xe=Y(""),Ie=Y(""),$e=Y(""),ze=Y(""),Fe=Y(30),qe=Y(1234),rt=Y(1024),ot=Y(0),je=Y(null),He=Y(null),Be=Y(null),Re=Y([null,null,null,null]),Ze=Y(null),Ne=Y(null),Ve=Y(null),gt=Y([null,null,null,null]),_t=Y(null),at=Y(null),wt=Y("{}"),Ke=Y({}),ut=Y([]),nt=Y([]),Lt=Y([]),Gt=Y(""),jt=Y(""),za=Y(null),sa=Y([]),wa=Y(""),Fa=Y(!1),ln=1,Kt=Y(null),St=Y(""),ea=Y(0),da=null,wi=Y(null),ma={},hi={},zi=new Set,ui=!1,hn=Y([]),Ai=null,Vi=null,_n=Y(!0),Ni=Y(Gm(e(R)?.family||"")),Hi=Y([]),Wi=Y(""),Qa=Y(null),Zn=Y(null),Vn=null,ls=null,Qe=null,Ut=Y(!1),ja=!1,ai=Promise.resolve(),oi=0,ta=Y({}),_i=Y(""),Ja=Y(""),va=Y([]),Ea=Y(""),Ye=Y(!0),Ce=Y(!1),pt=Y(!1),Ft=Y(!1),Ta=Y(""),oa=Y(null),ii=Y(null),Ei=null,ga=Y({}),$t=Y({}),Ot=Y("idle"),ka=null,Qi=!1,Na={},ua=Y([]),Ra=Y([]),me=Y(""),De=Y("en"),ft=Y("mocha"),Rt=!0,$a=null,Oi=null,Z=Y(vb(e(De)));const Si={demo_1_man:"demo_1_man",demo_2_man:"demo_2_man",demo_3_woman:"demo_3_woman",demo_4_woman:"demo_4_woman"},Ti=new Set(["ming3_tts","ming3_audio","latentsync","xtts_v2","kugelaudio","crisperwhisper","index_echo","audio_flamingo","owsm","owsm_ctc","reuse","sidon","smart_turn","maya1","gigaam_asr","samsone","sam_audio","tone_color_vc","moss_ttsd","moss_voicegen","canary_asr","cohere_asr","moss_transcribe_diarize","audiosr","controlfoley","breeze_tts","cosyvoice3","firered_audio","fireredtts3","irodori_tts","kitten_tts2","kokoro_tts","meanvc2","midashenglm_gen","plapre"]),fi={};function zn(I){y(De,bb([I])),localStorage.setItem("audiocpp.ui.language",e(De)),document.documentElement.lang=e(De)}function Hn(I=e(ft)){const te=Sq(I,Rt);document.documentElement.dataset.theme=te,document.querySelector('meta[name="theme-color"]')?.setAttribute("content",getComputedStyle(document.documentElement).getPropertyValue("--bg").trim())}function Ur(I){y(ft,$b(I)),localStorage.setItem(Tb,e(ft)),Hn(e(ft))}async function Wn(){try{if("serviceWorker"in navigator){const I=await navigator.serviceWorker.getRegistrations();await Promise.all(I.map(te=>te.unregister()))}if("caches"in window){const I=await window.caches.keys();await Promise.all(I.map(te=>window.caches.delete(te)))}}catch(I){console.warn("Unable to clear legacy WebUI caches:",I)}}function Qn(I,te,se=e(Z)){return se(`workflow.${I==="conversion"?"vc":I==="separation"?"sep":I}`,{},te)}function cs(I,te=e(Z),se){return I?se&&(se.workflow||aa(se)==="enhancement")?Qn(aa(se),I,te):te(`task.${I}`,{},Z$[I]||I):te("studio.title")}function zs(I,te,se=e(Z)){const ke=te==="label"?I.label_en||I.label||I.name.replace(/_/g," "):te==="info"?I.info_en||I.info||"":I.placeholder_en||I.placeholder||"";return se(`param.${e(R)?.family}.${I.name}.${te}`,{},ke)}function Dl(I=e(Z)){const te=e(R)?.input_hint_en||e(R)?.input_hint||"";return I(`model.${e(R)?.family}.hint`,{},te)}function Zr(I){const te=Math.max(1,Number.isFinite(I)?I:1)*24;return Math.max(5,Math.round((te-3)/17)*17+3)}function al(I){const te=e(R)?.family==="ace_step"?-1:1;y(Fe,Math.max(te,Number.isFinite(I)?I:te)),e(R)?.family==="minimax_h3"&&y(Ke,{...e(Ke),num_frames:Zr(e(Fe))})}function ds(I,te){y(Ke,{...e(Ke),[I.name]:te});const se=I.session_option||I.name;if(!e(pe)&&I.scope==="session"&&e(R)?.install_packages?.some(ke=>e($t)[ke.id]?.load_target?.session_options[se]!==void 0)&&(zi=new Set([...zi,se])),(e(R)?.family==="ace_step"||I.group==="lora")&&I.name==="lora"&&te===""&&(ma={...ma},delete ma[I.session_option||`${e(R).family}.lora`],I.group==="lora"&&delete ma[`${e(R).family}.lora_scale`]),(I.group==="lora"||["auk","yue2","liveavatar","fish_drama3","ace_step"].includes(e(R)?.family||""))&&I.scope==="session"&&y(d,e(Te).some(ke=>ke.id===e(ge)&&ke.loaded&&Bt(ke,e(R)))),e(R)?.family==="minimax_h3"&&I.name==="num_frames"){const ke=Number(te);Number.isFinite(ke)&&ke>0&&y(Fe,ke/24)}}function il(I=e(R)){I?.family!=="yue2"||e(ze).trim()||y(ze,I.default_text||"")}function Ll(){return e(ye).trim()?e(ye):e(R).default_text||""}const eo=[{id:"tts",label:"Text to speech",filterLabel:"TTS",tasks:["tts","clon"]},{id:"asr",label:"ASR / Transcription",filterLabel:"ASR",tasks:["asr"]},{id:"music",label:"Music / video generation",filterLabel:"Music / video generation",tasks:["gen"]},{id:"conversion",label:"Voice Conversion / S2S",filterLabel:"Voice Conversion / S2S",tasks:["vc","svc","s2s"]},{id:"enhancement",label:"Enhancement / denoising",filterLabel:"Enhancement / denoising",tasks:["s2s"]},{id:"separation",label:"Source separation",filterLabel:"Separation",tasks:["sep","s2s"]},{id:"analysis",label:"Audio analysis",filterLabel:"Analysis",tasks:["vad","diar","align","spk","midi","asr","turn","wake","cls"]},{id:"design",label:"Voice design",filterLabel:"Voice design",tasks:["vdes"]}],Rr={fish_drama3:"Fish Audio Drama 3",kugelaudio:"KugelAudio",crisperwhisper:"CrisperWhisper",index_echo:"Index-Echo S2TT",audio_flamingo:"Audio Flamingo",owsm:"OWSM",owsm_ctc:"OWSM-CTC",reuse:"RE-USE",sidon:"Sidon",smart_turn:"Smart Turn",gigaam_asr:"GigaAM ASR",ced:"CED",firered_vad:"FireRed VAD",samsone:"SAMSONE",sam_audio:"SAM Audio",builtin_audio_utils:"Audio utilities",qwen3_tts:"Qwen3-TTS",irodori_tts:"Irodori-TTS",chatterbox:"Chatterbox",stable_audio:"Stable Audio 3",qwen3_asr:"Qwen3-ASR",vevo2:"Vevo2",seed_vc:"Seed-VC",breeze_tts:"BreezeTTS 2",cosyvoice3:"CosyVoice3",magpie_tts:"MagpieTTS",meanvc2:"MeanVC2",niagara_asr:"Niagara ASR",canary_asr:"Canary 180M Flash",cohere_asr:"Cohere Transcribe",moss_transcribe_diarize:"MOSS-Transcribe-Diarize",apollo:"Apollo",universr:"UniverSR",pulsevad:"PulseVAD",nemotron_3_diar:"Nemotron 3 Diarization",lfm2_audio:"LFM2.5-Audio",lfm3_audio:"LFM3-Audio",personaplex:"PersonaPlex"},to={canary_asr:0,cohere_asr:256,moss_transcribe_diarize:5120},nl={canary_asr:["en","de","es","fr"],cohere_asr:["en","fr","de","es","it","pt","nl","pl","el","ar","ja","zh","vi","ko"],confucius4_r2t2:["Auto","Chinese","English","Cantonese","Japanese","Korean","Arabic","German","French","Spanish","Portuguese","Indonesian","Italian","Russian","Thai","Vietnamese","Turkish","Hindi","Malay","Dutch","Swedish","Danish","Finnish","Polish","Czech","Filipino","Persian","Greek","Romanian","Hungarian","Macedonian"]};function ou(I){const ke=(I.replace(/\\/g,"/").split("/").filter(Boolean).pop()||"").match(/(?:^|[-_])(\d+(?:\.\d+)?[bm])(?:[-_]|$)/i);return ke?ke[1].toUpperCase():""}function ks(I,te){const se=Br(te),ke=Br(Wl(I));if(se===ke)return!0;const Oe=Br(I).replace(/^models\//,"");return se===Oe||se.endsWith(`/${Oe}`)}function Vl(I,te){return I.family!==te.family||I.task!==te.task?!1:ks(I.path,te.path)?!0:!!(I.install_packages||[]).some(se=>ks(se.path,te.path))}function Oc(I){const te=Di.find(se=>se.id===I.id);return te&&Vl(te,I)?te:Di.find(se=>Vl(se,I))}function So(I,te){const se=ou(I.path),ke=Rr[I.family]||te?.display_name||I.family;return se&&!ke.toLowerCase().includes(se.toLowerCase())?`${ke} ${se}`:ke}function Ic(I){return Oc(I)?.display_name||So(I)}function Hl(I,te){return I.localeCompare(te,"en",{sensitivity:"base",numeric:!0})}function To(I=!1){return(I?e(Te).filter(se=>se.configured&&!Di.some(ke=>ke.id===se.id)):e(Te)).map(se=>{const ke=Oc(se),Oe=Di.find(Dt=>Dt.family===se.family&&Dt.task===se.task),kt=ke||Oe,la=Dt=>Dt&&I?`${Dt} (${se.id})`:Dt;return{...kt||{id:se.id,display_name:se.id,family:se.family,path:se.path,task:se.task,mode:se.mode},id:se.id,display_name:la(ke?ke.display_name:So(se,kt)),display_name_en:la(ke?ke.display_name_en:kt?.display_name_en),family:se.family,path:se.path,task:se.task,mode:se.mode,install_packages:[],configured:!0}})}function Ki(I){return!e(he)||!I?!1:!e(he).ui_management||I.configured===!0}function sl(I){return Array.from(I.reduce((te,se)=>{const ke=te.get(se.family)||[];return ke.push(se),te.set(se.family,ke),te},new Map)).map(([te,se])=>({family:te,entries:[...se].sort((ke,Oe)=>Hl(ke.display_name,Oe.display_name)),label:se.length>1&&Rr[te]||se[0].display_name})).sort((te,se)=>Hl(te.label,se.label))}let Sn=Y("tts"),Hs={},rn=Y(Di),Dc=Y(sl(Di));class In extends Error{}function pi(I){const te=`${new Date().toLocaleTimeString()} ${I}`;y(hn,[te,...e(hn)].slice(0,200))}function $o(I){if(!Number.isFinite(I)||I<=0)return"0 B";const te=["B","KB","MB","GB","TB"],se=Math.min(Math.floor(Math.log(I)/Math.log(1024)),te.length-1);return`${(I/1024**se).toFixed(se<2?0:1)} ${te[se]}`}function Wl(I){if(!e(_i))return I;const te=I.replace(/\\/g,"/");if(te==="models")return e(_i);if(!te.startsWith("models/"))return I;const se=te.slice(7),ke=e(_i).includes("\\")?"\\":"/";return`${e(_i).replace(/[\\/]+$/,"")}${ke}${se.replace(/\//g,ke)}`}function Es(I){const te=I.install_packages||[],se=te.find(ke=>ke.id===e(ga)[I.id])||te[0];return se?Fd(se,e($t)[se.id]):void 0}function Ql(I,te){return Es(I)?.id===te.id}function us(I){return Ki(I)?I.path:Wl(Es(I)?.path||I.path)}function Br(I){return I.replace(/\\/g,"/").replace(/\/$/,"").toLowerCase()}function Kl(I,te){return ks(I.path,te)}async function Yl(I){if(Ki(I)||I.id===e(ge)&&e(pe)||!I.install_packages?.length)return;const te=Es(I);return!te.load_target&&!te.load_target_error&&await $i(),Tm(Es(I))}function qo(I){return{...I.id===e(ge)&&e(pe)?{}:Es(I)?.load_options,...I.load_options,...I.id===e(ge)?hi:{}}}function Ws(I,te=Es(I)){I.id===e(ge)&&e(pe)&&(te=void 0);const se=I.id===e(ge)?du(te?.session_options):{};return{...I.session_options||{},...te?.session_options||{},...I.id===e(ge)?ma:{},...se}}function Jl(I,te,se){te=Fd(te,e($t)[te.id]);const ke=Ws(I,te),Oe=Array.from(new Set((I.id===e(ge)&&e(pe)?[]:I.install_packages||[]).flatMap(la=>Object.keys(e($t)[la.id]?.load_target?.session_options||{}))));if(I.id===e(ge))for(const la of e(ut).filter(Dt=>Dt.scope==="session"))Oe.push(la.session_option||la.name);if(!Oe.length)return!0;const kt=se.session_options||{};return Oe.every(la=>kt[la]===ke[la])}function rl(I,te,se){return I.id===e(ge)&&e(pe)?!1:(se=Fd(se,e($t)[se.id]),Kl(se,te.path)&&Jl(I,se,te))}function Bt(I,te){if(!te)return ks(e(we),I.path);const se=Es(te);return se?ks(e(we),I.path)&&Jl(te,se,I):ks(e(we),I.path)}function vt(I,te=e(Te)){return te.find(se=>se.id===I.id&&se.loaded)}function pa(I,te,se=e(Te)){const ke=vt(I,se);return!!(ke&&rl(I,ke,te))}function ha(I,te,se=e(Te),ke=e($t)){return pa(I,te,se)||ke[te.id]?.installed===!0&&!!ke[te.id]?.load_target}function Oa(I){const te=I.install_packages||[];if(I.family==="ace_step"||I.family==="minimax_music3"||Ti.has(I.family))return te.map(Oe=>({key:Oe.id,label:Oe.label,choice:Oe}));const se=te.find(Oe=>Oe.format==="gguf"&&["q8","q8_0"].includes(Oe.precision)),ke=te.find(Oe=>Oe.format==="gguf"&&["f16","fp16","bf16"].includes(Oe.precision));return!se&&!ke?te.map(Oe=>({key:Oe.id,label:Oe.label,choice:Oe})):[{key:"q8",label:se?.label||"GGUF Q8",choice:se},{key:"fp16",label:ke?.label||"GGUF FP16",choice:ke}]}function qa(I){if(!Number.isInteger(I)||I<-1||I>4294967295)throw new Error("Seed must be -1 or an unsigned 32-bit integer (0 to 4294967295).");if(I>=0)return I;const te=new Uint32Array(1);return globalThis.crypto.getRandomValues(te),te[0]}function oe(I,te){return(I+te)%4294967296}function Me(I){return I.replace(/\.[^.]+$/,"").trim().toLowerCase()}function Ee(I){const te=!!(I&&(e(me)||e(Wi)||e(Be)&&e(Be).name!==I.name));I&&(y(me,""),y(Wi,"")),y(Be,I),te&&(y(_t,null),y(Ie,""),e(at)&&Et(at,e(at).value=""),y(ne,"Reference voice changed. Choose or enter its matching transcript."),y(Je,e(ne)))}function tt(){y(me,""),y(Wi,""),y(Be,null),y(_t,null),y(Ie,""),e(Ve)&&Et(Ve,e(Ve).value=""),e(at)&&Et(at,e(at).value="")}function mt(){y(je,null),e(Ze)&&Et(Ze,e(Ze).value="")}function st(){y(He,null),e(Ne)&&Et(Ne,e(Ne).value="")}function Xe(I,te){y(Re,e(Re).map((se,ke)=>ke===I?te:se))}function it(I){Xe(I,null),e(gt)[I]&&Et(gt,e(gt)[I].value="")}function Yt(I){y(me,I),I&&(y(Wi,""),y(Be,null),y(_t,null),y(Ie,""),e(Ve)&&Et(Ve,e(Ve).value=""),e(at)&&Et(at,e(at).value=""))}async function It(I){if(y(_t,I),!!I)try{const te=(await I.text()).replace(/^\uFEFF/,"").trim();if(!te)throw new Error("The selected reference text file is empty.");y(Ie,te);const se=!e(Be)||Me(I.name)===Me(e(Be).name);y(ne,se?`Loaded reference transcript from ${I.name}.`:`Loaded ${I.name}. Its name does not match ${e(Be)?.name}; verify that it is the correct transcript.`),y(Je,se?"":e(ne))}catch(te){y(_t,null),y(Ie,""),e(at)&&Et(at,e(at).value=""),y(ne,te instanceof Error?te.message:String(te)),y(Je,"")}}function Jt(I){return I.state==="complete"||I.state==="cleaned"?100:I.progress_percent>=0?Math.min(100,Math.max(0,I.progress_percent)):0}function ni(I){const te=Jt(I);return I.total_bytes>0?`${te}% · ${$o(I.downloaded_bytes)} / ${$o(I.total_bytes)}`:I.downloaded_bytes>0?`${$o(I.downloaded_bytes)} downloaded`:I.state==="failed"?"Download failed":I.state==="cleaned"?"Partial files cleaned":I.state==="complete"?"100% · complete":I.state==="queued"?"0% · queued":"Connecting and checking package files…"}function Xa(I,te){return(I.install_packages||[]).map(se=>te[se.id]).filter(se=>se!==void 0)}function ia(I){return I.family==="ming3_audio"&&["tts","clon"].includes(I.task)?!1:I.request_options!==void 0?I.request_options.includes("max_tokens"):["tts","clon","gen","s2s","vdes"].includes(I.task)}function Ua(I,te){return I.request_options===void 0||I.request_options.includes(te)}function Vt(I,te){return I.required_request_options?.includes(te)===!0}function ra(I){return e(K).has(I.id)}function aa(I){return I.workflow?I.workflow:["apollo","universr","audiosr"].includes(I.family)?"enhancement":eo.find(te=>te.tasks.some(se=>se===I.task))?.id||"tts"}function li(I,te=e(Z)){return I==="Ready"?te("status.ready"):I}async function $i(){if(!(!e(he)?.ui_management||Qi)){Qi=!0;try{const I=await lb();y(Ot,I.state),I.data.length&&(y($t,Object.fromEntries(I.data.map(se=>[se.id,se]))),I.state==="complete"&&yr(e($t)),e(ge)&&!e(pe)&&!Ki(e(R))&&e(R).install_packages?.length&&(y(we,us(e(R))),Tn()));const te=I.state==="idle"||I.state==="running"||I.data.length===0;te&&ka===null?ka=window.setInterval($i,1e3):!te&&ka!==null&&(window.clearInterval(ka),ka=null)}catch(I){y(Ot,"failed"),pi(`Package sizes unavailable: ${I instanceof Error?I.message:I}`)}finally{Qi=!1}}}function Dn(){if(!(e(X)==="library"&&!e(ee)?.canClose())&&!(e(X)==="apps"&&!e(ce)?.canClose())){if(!e(he)?.ui_management){y(X,"studio"),y(ne,"Model management is disabled for this configured server."),y(Je,e(ne)),y(ue,"");return}y(X,"models"),e(Ot)==="idle"&&y(Ot,"running"),$i()}}function Qs(I,te){y(ga,{...e(ga),[I.id]:te.id}),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(ga))),I.id===e(ge)&&(y(pe,!1),y(we,us(I)),Tn())}function yr(I=e($t)){const te={...e(ga)};let se=!1;for(const ke of Di){const Oe=ke.install_packages||[];if(!Oe.length)continue;const kt=Oe.find(vn=>vn.id===te[ke.id]),la=kt?e(ta)[kt.id]:void 0;if(la&&["queued","running","cancelling"].includes(la.state)||kt&&I[kt.id]?.installed)continue;const Mt=Oe.find(vn=>I[vn.id]?.installed);Mt?te[ke.id]!==Mt.id&&(te[ke.id]=Mt.id,se=!0):te[ke.id]!==void 0&&(delete te[ke.id],se=!0)}return se?(y(ga,te),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(ga))),e(ge)&&!e(pe)&&(y(we,us(e(R))),Tn()),!0):!1}function Xl(I=e(Te)){const te={...e(ga)};let se=!1;for(const ke of Di){const Oe=vt(ke,I);if(!Oe)continue;const kt=Es(ke),la=kt&&rl(ke,Oe,kt)?kt:(ke.install_packages||[]).find(Dt=>rl(ke,Oe,Dt));la&&te[ke.id]!==la.id&&(te[ke.id]=la.id,se=!0)}return se?(y(ga,te),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(ga))),e(ge)&&!e(pe)&&(y(we,us(e(R))),Tn()),!0):!1}async function Zl(I=e($t)){const te=Di.filter(se=>{const ke=vt(se);if(!ke)return!1;const Oe=(se.install_packages||[]).find(kt=>rl(se,ke,kt));return!!(Oe&&I[Oe.id]?.installed===!1)});if(!te.length)return!1;for(const se of te)await _o(se.id);return await En(),!0}async function ec(){e(X)==="library"&&!e(ee)?.canClose()||e(X)==="apps"&&!e(ce)?.canClose()||(y(X,"studio"),await Hf(),await En(),e(he)?.ui_management&&(await $i(),await Zl(),yr()&&e(ge)&&await xs()))}function tc(I){y(_i,I.models_root),y(Ja,I.models_root),y(Ea,I.default_models_root),y(Ye,I.is_default),e(pe)||y(we,us(e(R))),y(va,[I.models_root,...e(va),I.default_models_root].filter((te,se,ke)=>te&&ke.indexOf(te)===se).slice(0,10)),localStorage.setItem("audiocpp.ui.modelsFolderHistory",JSON.stringify(e(va)))}function Co(){y(ge,""),y(me,""),y(Ra,[]),y(He,null),y(we,""),y(Pe,null),y(ut,[]),y(Ke,{}),y(wt,"{}"),localStorage.removeItem("audiocpp.ui.model"),Us()}function wr(I=!1){return Ki(e(R))||!e(ge)||!I&&e(d)||e(Pe)!==!1?!1:(Co(),!0)}async function lu(I=!1){if(!(!e(he)?.ui_management||e(Ce))){y(Ce,!0),y(Je,""),y(ue,""),y(ne,I?"Restoring the default models folder…":"Changing models folder…");try{const te=await cb(I?"":e(Ja).trim());tc(te),te.is_default?localStorage.removeItem("audiocpp.ui.modelsFolder"):localStorage.setItem("audiocpp.ui.modelsFolder",te.models_root),y(ta,{}),y($t,{}),y(Ot,"idle"),Na={},Ei!==null&&(window.clearInterval(Ei),Ei=null),ka!==null&&(window.clearInterval(ka),ka=null),await $i(),await xs();const se=wr();y(ne,se?`Models folder: ${te.models_root}. No installed model is selected.`:`Models folder: ${te.models_root}`),pi(e(ne))}catch(te){y(ne,te instanceof Error?te.message:String(te)),y(ue,e(ne)),pi(`Models folder change failed: ${e(ne)}`)}finally{y(Ce,!1)}}}async function ki(I="",te=null){y(ii,te),y(pt,!0),y(Ft,!0),y(Ta,"");try{y(oa,await bT(I||e(Ja).trim()||e(_i)))}catch(se){y(Ta,se instanceof Error?se.message:String(se))}finally{y(Ft,!1)}}function un(){e(oa)&&(e(ii)?ds(e(ii),e(oa).current):y(Ja,e(oa).current),y(pt,!1))}function Tn(){if(e(pe))return;const I=Es(e(R))?.session_options||{};if(!Object.keys(I).length)return;const te={...e(Ke)};for(const se of e(ut).filter(ke=>ke.scope==="session")){const ke=se.session_option||se.name;if(I[ke]===void 0||zi.has(ke))continue;const Oe=ma[ke]??I[ke];te[se.name]=se.type==="bool"?Oe==="true":["number","slider"].includes(se.type)?Number(Oe):Oe}y(Ke,te)}function ao(){ma={},hi={},zi=new Set,ui=!1;const I=Do[e(R)?.id]||Do[e(R)?.family]||[],te=e(R)?.family==="controlfoley"||e(R)?.family==="midashenglm_gen";y(ut,I.filter(ke=>!(["vibevoice","moss_ttsd"].includes(e(R)?.family)&&ke.name==="voice_samples")&&!(te&&ke.name==="duration_sec"))),y(Ke,Object.fromEntries(I.map(ke=>[ke.name,ke.default??""]))),Tn();const se=e(Te).find(ke=>ke.id===e(ge))?.session_options||{};for(const ke of e(ut).filter(Oe=>Oe.group==="lora")){const Oe=se[ke.session_option||ke.name];Oe!==void 0&&Et(Ke,e(Ke)[ke.name]=Oe)}if(e(R)?.family==="ace_step"&&Ki(e(R))){const ke=e(Te).find(Oe=>Oe.id===e(ge))?.session_options;y(Ke,{...e(Ke),lora:ke?.["ace_step.lora"]??"",lora_scale:Number(ke?.["ace_step.lora_scale"]??1)})}if(e(R)?.family in to&&y(ot,to[e(R).family]),e(R)?.family==="confucius4_r2t2"?y(de,"Auto"):["owsm","owsm_ctc","index_echo","audio_flamingo","kugelaudio","smart_turn","reuse","sidon","hviske_asr_v6","voxtral_tts"].includes(e(R)?.family)?y(de,""):e(R)?.family in nl&&y(de,"en"),e(R)?.family==="minimax_h3"?(y(Fe,15),y(Ke,{...e(Ke),num_frames:Zr(e(Fe)),dit_acceleration:"none"})):e(R)?.task==="gen"&&y(Fe,30),e(R)?.family==="yue2"){if(Ki(e(R))){const ke=e(Te).find(Oe=>Oe.id===e(ge))?.session_options;y(Ke,{...e(Ke),ar_lora:ke?.["yue2.ar_lora"]??"",ar_lora_scale:Number(ke?.["yue2.ar_lora_scale"]??1),nar_lora:ke?.["yue2.nar_lora"]??"",nar_lora_scale:Number(ke?.["yue2.nar_lora_scale"]??1)})}y(ye,""),y(ze,""),il()}else["liveavatar","moss_ttsd","sam_audio"].includes(e(R)?.family)?y(ye,e(R).default_text||""):e(R)?.family==="ming3_audio"&&e(R).task==="s2s"?y(ye,""):!e(ye).trim()&&e(R)?.default_text&&y(ye,e(R).default_text);e(R)?.builtin_voices?.length&&e(R).default_voice&&!e(me)&&y(me,e(R).default_voice),y(wt,"{}")}let ac=!1;function ol(){if(!e(he)||e(he).ui_management)return;const I=To();if(!I.length){Co();return}const se=(e(ge)?I.find(Oe=>Oe.id===e(ge)):void 0)||I[0],ke=!ac||e(ge)!==se.id;ke&&(y(me,""),y(Ra,[])),y(ge,se.id),y(R,se),y(Sn,aa(se)),Hs={...Hs,[e(Sn)]:se.id},y(we,se.path),y(Pe,!0),localStorage.setItem("audiocpp.ui.model",se.id),ke&&(y(Ni,Gm(se.family)),ao()),ac=!0}async function En(){try{await(async I=>{var te=Zc(I,2);y(he,te[0]),y(Te,te[1])})(await Promise.all([Sm(),Uc()])),e(he).ui_management?Xl():ol()}catch(I){y(ne,I instanceof Error?I.message:String(I))}}async function xs(){if(!e(ge)||!e(we).trim()){y(Pe,null);return}if(Ki(e(R))){y(Pe,e(Te).some(I=>I.id===e(ge)));return}y(Pe,null);try{y(Pe,(await ob(e(we))).exists)}catch{y(Pe,null)}}function kr(I){if(y(wa,""),!I){Co(),y(ne,"No model selected. Choose an installed model or download one from the Models tab.");return}const te=e(rn).find(se=>se.id===I);!te||!ra(te)||(y(ge,I),y(R,te),y(pe,!1),y(me,""),y(Ra,[]),y(Sn,aa(te)),Hs={...Hs,[e(Sn)]:I},y(we,us(te)),y(Ni,Gm(te.family)),localStorage.setItem("audiocpp.ui.model",I),ao(),y(ne,e(Z)("status.ready")),xs(),Wf())}function Lc(I){const te=eo.find(kt=>kt.id===I);if(!te||(y(Sn,I),e(ge)&&aa(e(R))===I))return;const se=Hs[I],Oe=(se?e(rn).find(kt=>kt.id===se&&aa(kt)===I&&ra(kt)):void 0)||e(rn).find(kt=>aa(kt)===I&&ra(kt));if(Oe){kr(Oe.id);return}Co(),y(ne,`No installed models are available for ${te.label}. Install one from the Models tab.`)}async function io(I){if(!e(v)){if(!e(ge)){y(ne,"Choose an installed model before loading."),y(Je,e(ne)),y(ue,"");return}if(Ki(e(R))){y(ne,e(he)?.ui_management?"This model is configured by the server and loads on its first request.":"This server was not started with UI management enabled."),y(Je,e(ne)),y(ue,"");return}y(Le,!0),y(Je,""),y(ue,""),y(ne,`Loading ${e(R).display_name}…`),pi(e(ne));try{const te=await Yl(e(R));te&&y(we,te.model_path);const se=e(Te).filter(ke=>ke.loaded&&(ke.id!==e(R).id||!ks(e(we),ke.path)||!Bt(ke,e(R))));for(const ke of se)pi(`Unloading ${Ic(ke)} before loading ${e(R).display_name}.`),await _o(ke.id);se.length&&await En(),await df({id:e(R).id,path:e(we),family:te?.family??e(R).family,task:e(R).task,mode:I||e(R).mode||"offline",load_options:qo(e(R)),session_options:Ws(e(R))}),await En(),await Wf(),y(ne,e(Z)("status.modelReady",{model:e(R).display_name})),y(ue,""),pi(e(ne))}catch(te){throw y(ne,te instanceof Error?te.message:String(te)),y(ue,e(ne)),pi(`Load failed: ${e(ne)}`),te}finally{y(Le,!1)}}}async function Vc(){if(!e(ge))return;const I=e(R).display_name;y(Le,!0);try{Ki(e(R))?await fT([e(R).id]):await _o(e(R).id),await En(),await Wf();const te=wr(!0);y(ne,te?`${I} unloaded. No installed model is selected.`:`${I} unloaded.`),pi(e(ne))}catch(te){y(ne,te instanceof Error?te.message:String(te))}finally{y(Le,!1)}}async function Hc(I){if(!(e(Le)||!ha(e(R),I))){if(pa(e(R),I)){await Vc();return}if(Qs(e(R),I),await xs(),e(Pe)!==!0){y(ne,`${e(R).display_name} ${I.label} is not available at the expected path.`),y(ue,e(ne));return}await io()}}async function cu(){e(Le)||!e(ge)||e(Pe)===!1||(e(d)?await Vc():await io())}async function Ks(I){if(!I)return;const te=e(R).task==="sep"||e(R).family==="apollo"?44100:["asr","vad","diar","align","midi","wake","cls"].includes(e(R).task)?16e3:void 0,se=await Gr(I,te);return hr(se,Ai?.signal)}async function Ys(){if(e(R).family==="moss_ttsd"){const Oe=e(Re).map(Boolean).lastIndexOf(!0);return Oe<0?void 0:(await Promise.all(e(Re).slice(0,Math.max(2,Oe+1)).map(async la=>la&&await Ks(la)||""))).join(",")}const I=e(Re).findIndex(Oe=>!Oe);if(I>=0&&e(Re).slice(I+1).some(Boolean))throw new In("VibeVoice speaker references must be filled from Speaker 1 without gaps.");const se=e(Re).filter(Oe=>!!Oe);return se.length?(await Promise.all(se.map(Oe=>Ks(Oe)))).filter(Oe=>!!Oe).join(","):void 0}function Pr(){let I={};try{if(I=JSON.parse(e(wt)||"{}"),Array.isArray(I)||I===null)throw new Error("must be an object")}catch(ke){throw new Error(`Advanced JSON is invalid: ${ke instanceof Error?ke.message:ke}`)}const te=e(R).default_options||{},se=Object.fromEntries(Object.entries(e(Ke)).filter(([ke,Oe])=>{const kt=e(ut).find(la=>la.name===ke);return!(kt?.scope==="session"||Oe===""&&kt&&kt.default===void 0||e(R)?.family==="canary_asr"&&ke==="target_language"&&Oe===""||e(R)?.family==="universr"&&ke==="input_sample_rate"&&Oe===""||e(R)?.family==="auk"&&typeof Oe=="string"&&Oe.trim().length===0||e(f)&&typeof Oe=="string"&&Oe.trim().length===0)}));return{...te,...se,...I}}function du(I={}){const te=Object.fromEntries(e(ut).filter(se=>se.scope==="session").filter(se=>se.group!=="lora"||String(e(Ke).lora??"").trim().length>0).map(se=>{const ke=se.session_option||se.name,Oe=I[ke]!==void 0&&!zi.has(ke)?ma[ke]??I[ke]:e(Ke)[se.name];return[ke,String(Oe??se.default??"")]}).filter(([,se])=>se.length>0));if(e(R)?.family==="auk"){const se=te["auk.model_gguf"]||"auk-base-f32.gguf";te["auk.variant"]=se.startsWith("auk-flash-")?"flash":"base"}return te}function Us(){if(e(Kt)===null){for(const I of e(nt))URL.revokeObjectURL(I.url);for(const I of e(Lt))URL.revokeObjectURL(I.url);e(za)&&URL.revokeObjectURL(e(za).url)}y(nt,[]),y(Lt,[]),y(Gt,""),y(jt,""),y(za,null),y(Kt,null),y(St,"")}function ll(I){for(const te of I.audio)URL.revokeObjectURL(te.url);for(const te of I.artifacts)URL.revokeObjectURL(te.url);URL.revokeObjectURL(I.settings.url)}async function on(I,te=!1){if(I.modelId!==e(ge)||I.task!==e(R).task){y(wa,e(Z)("history.wrongModel",{label:I.label,model:e(R).display_name})),pi(e(wa));return}if(te){if(e(Ae)||e(Le)||e(Fa)){y(wa,e(Z)("history.wait"));return}y(Fa,!0);try{await tx(I.settingsJson)}catch(se){y(wa,se instanceof Error?se.message:String(se)),pi(`History settings restore failed: ${e(wa)}`);return}finally{y(Fa,!1)}return on(I)}y(wa,""),Us(),y(Kt,I.id),y(St,I.modelId),y(nt,I.audio),y(Lt,I.artifacts),y(Gt,I.text),y(jt,I.json),y(za,I.settings)}function Rs(I){const te=e(sa).find(ke=>ke.id===I);if(!te)return;const se=e(Kt)===I;if(se&&Us(),y(sa,e(sa).filter(ke=>ke.id!==I)),ll(te),se){const ke=e(sa).find(Oe=>Oe.modelId===e(ge)&&Oe.task===e(R).task);ke&&on(ke)}}function Js(){e(Kt)!==null&&Us();for(const I of e(sa))ll(I);y(sa,[]),y(wa,"")}function no(I){const te=e(sa).slice(I);if(!te.length)return;const se=te.some(ke=>ke.id===e(Kt));se&&Us(),y(sa,e(sa).slice(0,I));for(const ke of te)ll(ke);if(se){const ke=e(sa).find(Oe=>Oe.modelId===e(ge)&&Oe.task===e(R).task);ke&&on(ke)}}async function jr(){if(Ki(e(R))){if(ui)throw new Error("The imported model settings require a reload through the server configuration.");if(!e(Te).some(I=>I.id===e(ge)))throw new Error("Configured model is not registered by this server.");return}if(!e(d)||ui){if(ui&&e(Te).some(I=>I.id===e(ge)&&I.loaded)&&(await _o(e(ge)),await En()),await io(),await En(),!e(Te).some(I=>I.id===e(ge)&&I.loaded&&Bt(I,e(R))))throw new Error("Model did not load.");ui=!1}}async function F_(I,te,se={}){const ke=e(rn).find(Dt=>Dt.id===I.id);if(!ke||ke.family!==I.family||ke.task!==I.task)throw new Error(`The saved model is not available in this UI: ${I.id}`);if(!ra(ke))throw new Error(`Install ${ke.display_name} before applying its settings.`);const Oe=I.package_id?ke.install_packages?.find(Dt=>Dt.id===I.package_id):void 0;if(I.package_id&&!Oe)throw new Error(`The saved package is not available: ${I.package_id}`);if(Oe&&!ha(ke,Oe,e(Te),e($t)))throw new Error(`Install ${Oe.label} before applying its settings.`);const kt=qo(ke);kr(ke.id),Oe&&(y(ga,{...e(ga),[ke.id]:Oe.id}),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(ga)))),y(we,Oe?us(ke):I.path),y(pe,!Oe),ma={...I.session_options||{}},hi={...I.load_options||{}},y(Ke,{...e(Ke),...te||Object.fromEntries(Object.entries(se).filter(([Dt])=>e(ut).some(Mt=>Mt.name===Dt)))});for(const Dt of e(ut).filter(Mt=>Mt.scope==="session")){const Mt=ma[Dt.session_option||Dt.name];if(Mt!==void 0){if(Dt.type==="bool"&&!["true","false"].includes(Mt))throw new Error(`Invalid boolean setting: ${Dt.name}`);if(["number","slider"].includes(Dt.type)&&!Number.isFinite(Number(Mt)))throw new Error(`Invalid numeric setting: ${Dt.name}`);Et(Ke,e(Ke)[Dt.name]=Dt.type==="bool"?Mt==="true":["number","slider"].includes(Dt.type)?Number(Mt):Mt)}}Tn();const la=e(Te).find(Dt=>Dt.id===ke.id&&Dt.loaded);return ui=!!(la&&(!ks(e(we),la.path)||Object.entries(Ws(ke)).some(([Dt,Mt])=>la.session_options?.[Dt]!==Mt)||JSON.stringify(kt)!==JSON.stringify(hi))),await xs(),ke}async function tx(I){const te=JSON.parse(I);if(te.schema_version!==1||typeof te.model?.id!="string"||!Array.isArray(te.requests)||!te.requests.length||!te.requests.every(Mt=>Mt&&Mt.body&&typeof Mt.body=="object"&&!Array.isArray(Mt.body)))throw new Error("Choose an audio.cpp settings JSON exported with Save settings JSON.");const se=te.requests[0].body,ke=se.request||se,Oe=te.ui,kt=te.resolved_seed;if(!Number.isInteger(kt)||kt<0||kt>4294967295)throw new Error("The settings JSON has an invalid resolved seed.");const la=await F_(te.model,Oe?.advanced_values,ke.options);y(ye,Oe?.text??(te.requests[0].endpoint==="/v1/audio/speech"?te.requests.map(Mt=>Mt.body.input).join(` -`):ke.text||"")),y(ze,Oe?.lyrics??ke.lyrics??""),y(ue,Oe?.language??ke.language??""),y(be,Oe?.moss_language??ke.language??"English"),y(Se,Oe?.context??(la.task==="asr"&&ke.text||"")),y(Ie,Oe?.reference_text??ke.reference_text??""),y($e,Oe?.instructions??ke.instructions??""),y(Fe,Oe?.duration??ke.duration_seconds??ke.options?.duration_sec??e(Fe)),y(it,Oe?.max_tokens??ke.max_tokens??e(it)),y(st,Oe?.asr_max_tokens??ke.options?.max_tokens??e(st)),y(on,Oe?.long_text??te.requests.length>1),y(Bi,Oe?.text_chunk_size??e(Bi)),y(pe,Oe?.voice??ke.voice??""),y(wt,Oe?.advanced_json??JSON.stringify(Object.fromEntries(Object.entries(ke.options||{}).filter(([Ut])=>!e(ut).some(bn=>bn.name===Ut))),null,2)),y(qe,xt),y(Ne,null),y(Be,null),y(He,null),y(Ue,[null,null,null,null]),y(Ki,""),y(mt,null),e(tt)&&Bt(tt,e(tt).value=""),e(Ve)&&Bt(Ve,e(Ve).value=""),e(Re)&&Bt(Re,e(Re).value=""),e(et)&&Bt(et,e(et).value="");for(const Ut of e(_t))Ut&&(Ut.value="");const Vt=Object.values(te.input_files||{}).flat().filter(Ut=>typeof Ut=="string"&&Ut);y(ne,`Imported settings for ${la.display_name}.`),Vt.length&&y(ne,e(ne)+` Reselect the referenced files: ${Vt.join(", ")}.`),te.backend&&te.backend!==e(he)?.backend&&y(ne,e(ne)+` Exported backend: ${te.backend}; current backend: ${e(he)?.backend}.`),y(Xe,Vt.length?e(ne):""),y(de,""),li(e(ne)),xi&&e(he)?.ui_management&&!Hi(e(R))&&window.confirm("The imported model settings differ from the loaded model. Reload now?")&&await Pr()}async function UB(I){if(!(!I||e(Ae)||e(Le)||e(Ma)))try{await tx(await I.text())}catch(te){y(ne,te instanceof Error?te.message:String(te)),y(de,e(ne)),y(Xe,""),li(`Settings import failed: ${e(ne)}`)}finally{e(ki)&&Bt(ki,e(ki).value="")}}async function ax(I){if(Hi(e(R))){if(!e(Te).some(se=>se.id===e(ge)&&se.mode===I))throw new Error(`Configured model is not registered in ${I} mode.`);return}const te=e(Te).find(se=>se.id===e(ge)&&se.loaded);if((!te||te.mode!==I)&&(await Eo(I),await $n()),!e(Te).some(se=>se.id===e(ge)&&se.loaded&&se.mode===I&&Dt(se,e(R))))throw new Error(`Model did not load in ${I} mode.`)}function ix(){for(const I of["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus"])if(MediaRecorder.isTypeSupported(I))return I}async function M_(I){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){y(ne,"Microphone recording is not supported by this browser.");return}if(!(e(Wa)||e(Et)))try{Vn=await navigator.mediaDevices.getUserMedia({audio:!0});const te=[],se=ix();y(Wa,new MediaRecorder(Vn,se?{mimeType:se}:void 0)),y(Jn,I),Bt(Wa,e(Wa).ondataavailable=ke=>{ke.data.size&&te.push(ke.data)}),Bt(Wa,e(Wa).onstop=()=>{const ke=new Blob(te,{type:e(Wa)?.mimeType||se||"audio/webm"}),Oe=new File([ke],`recording-${Date.now()}.webm`,{type:ke.type});I==="source"?y(Ne,Oe):(y(pe,""),y(Ki,""),y(Be,Oe),e(Ve)&&Bt(Ve,e(Ve).value="")),Vn?.getTracks().forEach(xt=>xt.stop()),Vn=null,y(Wa,null),y(Jn,null),y(ne,`${I==="voice"?"Voice reference":"Source audio"} recording captured.`)}),e(Wa).start(),y(ne,`Recording ${I==="voice"?"voice reference":"source audio"}…`)}catch(te){y(ne,te instanceof Error?te.message:String(te)),Vn?.getTracks().forEach(se=>se.stop()),Vn=null,y(Wa,null),y(Jn,null)}}function z_(){e(Wa)?.state==="recording"&&e(Wa).stop()}async function Hf(){try{y(Qi,await eu())}catch(I){li(`Voice library unavailable: ${I instanceof Error?I.message:I}`)}}async function Wf(){if(!e(ge)||!e(he)){y(Ba,[]);return}try{y(Ba,await db(e(ge))),e(pe)&&(new Set([...e(Ba),...e(A)?e(R)?.builtin_voices||[]:[]]).has(e(pe))||y(pe,""))}catch(I){y(Ba,[]),li(`Configured voices unavailable: ${I instanceof Error?I.message:I}`)}}function RB(I){I.startsWith("saved:")?nx(I.slice(6)):I.startsWith("preset:")?yt(I.slice(7)):Pe()}function nx(I){y(Ki,I);const te=e(Qi).find(se=>se.id===I);te&&(y(pe,""),y(Be,new File([te.audio],`${te.name}.wav`,{type:"audio/wav"})),y(mt,null),e(Ve)&&Bt(Ve,e(Ve).value=""),e(et)&&Bt(et,e(et).value=""),y(Ie,te.transcript),y(ne,`Selected saved voice “${te.name}”.`))}async function BB(I){if(!I.size)return;const te=new File([I],`live-${mi}.webm`,{type:I.type}),se=await Fr(te,16e3),ke=await gr(se),Oe=await pf({model:e(R).id,audio:ke,language:e(ue),text:e(Se),options:Qs()}),xt=String(Oe.text||"").trim();xt&&y(At,[e(At),xt].filter(Boolean).join(" ")),mi+=1,y(ne,`Listening… ${mi} chunk${mi===1?"":"s"} transcribed.`)}function sx(){if(!Xn||Qa)return;const I=[],te=ix();Ke=new MediaRecorder(Xn,te?{mimeType:te}:void 0),Ke.ondataavailable=se=>{se.data.size&&I.push(se.data)},Ke.onstop=()=>{const se=new Blob(I,{type:Ke?.mimeType||te||"audio/webm"});Za=Za.then(()=>BB(se)).catch(ke=>{y(ne,ke instanceof Error?ke.message:String(ke)),li(`Live transcription failed: ${e(ne)}`)}),Ke=null,Qa||sx()},Ke.start(),window.setTimeout(()=>{Ke?.state==="recording"&&Ke.stop()},4e3)}async function PB(){if(e(z)){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){y(ne,"Live microphone transcription is not supported by this browser.");return}Ks(),y(Et,!0),Qa=!1,mi=0;try{await ax("streaming"),Xn=await navigator.mediaDevices.getUserMedia({audio:!0}),y(ne,"Listening… speech is transcribed in four-second native streaming requests."),sx()}catch(I){y(ne,I instanceof Error?I.message:String(I)),rx()}}}function rx(){Qa=!0,Ke?.state==="recording"&&Ke.stop(),Xn?.getTracks().forEach(I=>I.stop()),Xn=null,y(Et,!1),y(ne,mi?`Live transcription stopped after ${mi} chunks.`:"Live transcription stopped.")}function jB(I){return dn=I,()=>{dn===I&&(dn=null)}}async function NB(I,te){if(Hi(e(R)))return Pr();const se=()=>{if(e(ge)!==I)throw new Error("The model changed while it loaded; press Run again.")};(!e(d)||xi)&&(xi&&e(Te).some(ke=>ke.id===e(ge)&&ke.loaded)&&(await _o(e(ge)),await $n(),se()),await Eo(te),await $n(),se(),xi=!1),await ax(te).finally(se)}async function OB(I,te,se){const ke=dn,Oe=e(R).id;if(!ke)throw e(Z)!=="studio"?new Hn("Open the Studio tab to run this entry."):new Error(`${e(R).display_name} is not ready.`);const xt=await ke({modelId:Oe,seed:I,maxTokens:pa(e(R))?e(it):void 0,language:e(ue).trim(),options:Qs(),signal:se,setStatus:la=>{y(ne,la)},warning:la=>new Hn(la),ensureLoaded:la=>NB(Oe,la)});Ks(),xt.audio&&y(at,[{id:"reply",url:URL.createObjectURL(xt.audio)}]),y(At,xt.text),y(It,xt.json),y(Zt,xt.artifacts||[]),y(kt,Oe),y(Xe,""),y(de,""),y(ne,e(X)("status.completeIn",{seconds:((performance.now()-te)/1e3).toFixed(2)})),li(e(ne))}async function ox(){if(e(Ae)||e(Ge)||e(b)||e(Ma))return;if(!e(ge)){y(ne,"Choose an installed model before running a request."),y(Xe,e(ne)),y(de,"");return}if(!e(d)&&e(je)===!1){y(ne,`${e(R).display_name} is not downloaded. Install a model package from the Models tab first.`),y(Xe,e(ne)),y(de,"");return}y(Ae,!0),Si=new AbortController;const I=performance.now();y(ta,0),ra=window.setInterval(()=>{y(ta,(performance.now()-I)/1e3)},250);let te=[],se=[],ke="",Oe="",xt=!1;const la=[];y(Xe,""),y(de,""),y(ne,e(X)("status.runningTask",{task:ns(e(R).task)})),li(e(ne));const Vt=e(R).family==="liveavatar"?e(Ne):null;try{const Ut=qa(e(qe));if(e(_)){await OB(Ut,I,Si.signal);return}if(e(E)&&!e(Be))throw new Hn(`${e(R).display_name_en||e(R).display_name} requires a reference voice.`);if(e(O)&&!e(Ie).trim()){const Ja=e(N)?"Qwen3-TTS Base voice cloning":e(R).display_name_en||e(R).display_name;throw new Hn(`${Ja} requires a reference transcript. Choose a matching .txt file or enter the transcript.`)}if(e(U)&&!e(ze).trim())throw new Hn(`${e(R).display_name_en||e(R).display_name} requires lyrics.`);if(e(R).family==="liveavatar"){if(!e(Ne))throw new Hn("LiveAvatar requires driving audio.");if(!String(e(Ye).reference_image_path||"").trim())throw new Hn("LiveAvatar requires a reference image.")}await Pr();const bn=e(Te).find(Ja=>Ja.id===e(R).id),$s={schema_version:1,created_at:new Date().toISOString(),backend:e(he)?.backend,resolved_seed:Ut,model:{id:e(R).id,display_name:e(R).display_name,family:e(R).family,task:e(R).task,mode:bn?.mode||e(R).mode||"offline",path:bn?.path||e(we),package_id:e(ce)?void 0:Us(e(R))?.id,load_options:ao(e(R)),session_options:bn?.session_options||Fo(e(R))},ui:{text:e(ye),lyrics:e(ze),language:e(ue),moss_language:e(be),context:e(Se),reference_text:e(Ie),instructions:e($e),duration:e(Fe),max_tokens:e(it),asr_max_tokens:e(st),long_text:e(on),text_chunk_size:e(Bi),voice:e(pe),advanced_values:{...e(Ye)},advanced_json:e(wt)},input_files:{source:e(Ne)?.name,voice_reference:e(Be)?.name,video:e(He)?.name,speaker_references:e(Ue).map(Ja=>Ja?.name||null)},requests:la},pn=Qs();if(e(G)){const Ja=await Ws();Ja&&(pn.voice_samples=Ja)}e(C)&&e(He)&&(pn.video=await Fd(e(He),Si?.signal));const fs=e(B)?await Uo(e(Ne)):void 0,Js=e(j)&&!e(G)&&!(e(A)&&e(pe))?await Uo(e(Be)):void 0;if(["tts","clon","vdes"].includes(e(R).task)){if(!e(ye).trim())throw new Hn("Enter text to generate.");const Ja=Math.max(40,e(Bi));e(R).family==="voxcpm2"&&(pn.text_chunk_size=Ja),e(R).family==="ming3_tts"&&e(on)&&(pn.text_chunk_size=Ja);const qn=e(on)&&e(R).task!=="vdes"&&!["moss_ttsd","ming3_tts"].includes(e(R).family)?_f(e(ye),Ja):[e(ye)],Yi=[],ri=[];for(let Cs=0;Cs1?`Synthesizing chunk ${Cs+1} of ${qn.length}…`:e(X)("status.runningTask",{task:ns(e(R).task)}));const ps={model:e(R).id,input:qn[Cs],language:["moss_ttsd","moss_voicegen"].includes(e(R).family)?e(be):e(ue),seed:$t(Ut,Cs),options:pn};pa(e(R))&&!["kugelaudio","voxtral_tts"].includes(e(R).family)&&(ps.max_tokens=e(it)),Js?ps.voice_ref=Js:e(pe)?ps.voice=Gi[e(pe)]||e(pe):e(R).default_voice&&(ps.voice=e(R).default_voice),e(Ie).trim()&&Ea(e(R),"reference_text")&&(ps.reference_text=e(Ie)),e(R).task==="vdes"&&e($e).trim()&&(e(R).family==="ming3_tts"?ps.instruct=e($e):ps.instructions=e($e)),la.push({endpoint:"/v1/audio/speech",body:JSON.parse(JSON.stringify(ps))});const Zs=await ff(ps,Si.signal);Yi.push(Zs.blob),ri.push({chunk:Cs+1,characters:qn[Cs].length,wall_ms:Zs.wallMs,rtf:Zs.rtf})}const Xs=await uT(Yi);te=[{id:qn.length>1?"merged":"output",url:URL.createObjectURL(Xs)}],Oe=JSON.stringify({seed:Ut,chunks:qn.length,characters:e(ye).length,chunk_budget:e(Bi),timings:ri},null,2)}else if(e(R).task==="asr"){if(!fs)throw new Hn("Choose an audio file.");e(R).family in Rr?pn.max_tokens=e(st):e(R).family==="ming3_audio"&&(pn.max_tokens=e(it));const Ja={model:e(R).id,audio:fs,language:e(ue),text:e(Se),options:pn},qn=["owsm","crisperwhisper"].includes(e(R).family)&&pn.return_timestamps===!0;la.push({endpoint:qn?"/v1/audio/transcriptions/details":"/v1/audio/transcriptions",body:JSON.parse(JSON.stringify(Ja))});const Yi=await pf(Ja,Si.signal,qn);ke=String(Yi.text||""),Oe=JSON.stringify(Yi,null,2)}else{if(e(P)&&!fs)throw new Hn("Choose a source audio file.");const Ja={options:pn};if(["gen","s2s","align"].includes(e(R).task)&&e(ye).trim()&&!e(f)&&!e($)&&!["apollo","universr","reuse","sidon"].includes(e(R).family)&&(Ja.text=e(ye)),["gen","s2s","align"].includes(e(R).task)&&e(ue).trim()&&!e(f)&&!["apollo","universr","reuse","sidon"].includes(e(R).family)&&(Ja.language=e(ue)),e(R).task==="gen"){if(e(f))Ja.lyrics=e(ze).trim();else{const ri=Kl();ri&&(Ja.text=ri),e(ze).trim()&&(Ja.lyrics=e(ze)),!e(v)&&e(R).family!=="auk"&&(e(S)?pn.duration_sec=e(Fe):Ja.duration_seconds=e(Fe))}Ja.seed=Ut,pa(e(R))&&(Ja.max_tokens=e(it))}else e(R).task==="s2s"&&(["apollo","reuse","sidon"].includes(e(R).family)||(Ja.seed=Ut),pa(e(R))&&(Ja.max_tokens=e(it)));fs&&(Ja.audio=fs),Js&&(Ja.voice_ref=Js),e(Ie).trim()&&Ea(e(R),"reference_text")&&(Ja.reference_text=e(Ie));const qn={model:e(R).id,request:Ja};la.push({endpoint:"/v1/tasks/run",body:JSON.parse(JSON.stringify(qn))});const Yi=await Nl(qn,Si.signal);if(ke=typeof Yi.text=="string"?Yi.text:"",Oe=JSON.stringify(Yi,(ri,Xs)=>(ri==="audio"||ri==="payload")&&typeof Xs=="string"?``:Xs,2),typeof Yi.audio=="string"&&(te=[{id:"output",url:mf(Yi.audio)}]),Array.isArray(Yi.named_audio_outputs)){for(const ri of te)URL.revokeObjectURL(ri.url);te=Yi.named_audio_outputs.filter(ri=>typeof ri?.id=="string"&&typeof ri?.audio=="string").map(ri=>({id:ri.id,url:mf(ri.audio)}))}if(Array.isArray(Yi.artifacts))if(e(R).family==="liveavatar"){y(ne,"Encoding LiveAvatar MP4 in browser…");const ri=await y2(Yi,Vt,"LiveAvatar","liveavatar");se=ri.artifacts,ri.warning&&li(ri.warning)}else se=Yi.artifacts.filter(ri=>typeof ri?.id=="string"&&typeof ri?.payload=="string").map(ri=>({id:ri.id,extension:ri.meta?.extension||(ri.meta?.format==="midi"?"mid":"bin"),mime:ri.meta?.mime||"application/octet-stream",url:`data:${ri.meta?.mime||"application/octet-stream"};base64,${ri.payload}`}))}const Sr=JSON.stringify($s,null,2),Tr=URL.createObjectURL(new Blob([Sr],{type:"application/json"}));Ks(),y(at,te),y(Zt,se),y(At,ke),y(It,Oe),y(Ra,{url:Tr,filename:`${$s.model.id}-${Date.now()}.settings.json`}),y(kt,$s.model.id);{const Ja={id:en++,modelId:e(kt),task:$s.model.task,label:$s.model.display_name,createdAt:new Date().toISOString(),seed:Ut,audio:te,artifacts:se,text:ke,json:Oe,settings:e(Ra),settingsJson:Sr};y(na,[Ja,...e(na)]),y(ea,Ja.id),no(i().historyLimit)}y(ba,""),xt=!0;const qs=((performance.now()-I)/1e3).toFixed(2);y(Xe,""),y(de,""),y(ne,e(X)("status.completeIn",{seconds:qs})),li(e(ne))}catch(Ut){Ut?.name==="AbortError"?(y(ne,"Cancelled."),y(Xe,""),y(de,"")):(y(ne,Ut instanceof Error?Ut.message:String(Ut)),y(Xe,Ut instanceof Hn?e(ne):""),y(de,Ut instanceof Hn?"":e(ne)),li(`Request failed: ${e(ne)}`))}finally{if(ra!==null&&window.clearInterval(ra),ra=null,!xt){for(const Ut of te)URL.revokeObjectURL(Ut.url);for(const Ut of se)URL.revokeObjectURL(Ut.url)}y(Ae,!1),Si=null,Hi(e(R))&&!e(d)&&$n()}}function IB(){Si?.abort()}function DB(I){if(!(e(Z)==="library"||e(Z)==="apps")){if(I.key==="Escape"&&e(pt)){y(pt,!1);return}(I.ctrlKey||I.metaKey)&&I.key==="Enter"&&!e(Ae)&&(I.preventDefault(),e(Z)==="arena"?e(le)?.runArena():ox())}}function uu(I){I!==e(Z)&&(e(Z)==="library"&&!e(ee)?.canClose()||e(Z)==="apps"&&!e(oe)?.canClose()||y(Z,I))}async function fu(){if(e(he)?.ui_management)try{const I=await _T(),te=Object.fromEntries(I.map(Oe=>{const xt=e(Ht)[Oe.id];return[Oe.id,{...Oe,total_bytes:Oe.total_bytes||xt?.total_bytes||0}]}));y(Ht,{...e(Ht),...te});let se=!1;for(const Oe of Li){const xt=Ya(Oe,e(Ht)).filter(Vt=>Vt.state==="complete");for(const Vt of xt){const Ut=e(Ft)[Vt.id];Ut&&!Ut.installed&&y(Ft,{...e(Ft),[Vt.id]:{...Ut,installed:!0}}),Vt.finished_at_ms>(Ka[Vt.id]||0)&&(Ka={...Ka,[Vt.id]:Vt.finished_at_ms},se=!0)}xt.length>0&&Oe.id===e(ge)&&await Hs()}se&&(y(Nt,"idle"),await si());const ke=Object.values(e(Ht)).some(Oe=>Oe.state==="queued"||Oe.state==="running"||Oe.state==="cancelling");ke&&Ti===null?Ti=window.setInterval(fu,1500):!ke&&Ti!==null&&(window.clearInterval(Ti),Ti=null)}catch(I){li(`Installer status unavailable: ${I instanceof Error?I.message:I}`)}}async function LB(I,te,se=!1){if(e(Ft)[te.id]?.installed&&!se)return;const ke=e(Ht)[te.id];if(ke&&["queued","running","cancelling"].includes(ke.state))return;const Oe=e(Ft)[te.id]?.size_bytes,xt=se?"Update":"Download";if(!window.confirm(`${xt} ${I.display_name} ${te.label}${Oe?` (${Ao(Oe)})`:""}?`))return;cs(I,te),y(ne,`Starting ${te.label} installation for ${I.display_name}...`);const Vt=e(Ft)[te.id]?.size_bytes||0;y(Ht,{...e(Ht),[te.id]:{id:te.id,state:"queued",message:"Sending installation request…",exit_code:-1,downloaded_bytes:0,total_bytes:Vt,progress_percent:0,started_at_ms:0,finished_at_ms:0}});try{Ti===null&&(Ti=window.setInterval(fu,1e3));const Ut=await pT({id:te.id,overwrite:se});y(Ht,{...e(Ht),[Ut.id]:{...Ut,total_bytes:Ut.total_bytes||Vt}}),await fu(),y(ne,`${I.display_name} ${te.label} installation is running in the background.`),li(e(ne))}catch(Ut){y(ne,Ut instanceof Error?Ut.message:String(Ut)),y(Ht,{...e(Ht),[te.id]:{id:te.id,state:"failed",message:e(ne),exit_code:-1,downloaded_bytes:0,total_bytes:0,progress_percent:-1,started_at_ms:0,finished_at_ms:Date.now()}}),li(`Installer failed to start: ${e(ne)}`)}}async function VB(I,te){if(["queued","running","cancelling"].includes(te.state)){y(ne,`Stopping ${I.display_name} download...`);try{const se=await mT(te.id);y(Ht,{...e(Ht),[se.id]:se}),Ti===null&&(Ti=window.setInterval(fu,500)),y(ne,`${I.display_name} download is stopping. Staging files will be removed automatically.`),li(e(ne))}catch(se){y(ne,se instanceof Error?se.message:String(se)),y(de,e(ne)),y(Ht,{...e(Ht),[te.id]:{...te,state:"failed",message:e(ne),finished_at_ms:Date.now()}})}}}async function HB(I,te){if(!["queued","running","cancelling"].includes(te.state)){y(ne,`Cleaning partial ${I.display_name} download...`);try{const se=await gT(te.id);y(Ht,{...e(Ht),[te.id]:{...te,state:"cleaned",message:se.message,downloaded_bytes:0,total_bytes:0,progress_percent:100,finished_at_ms:Date.now()}}),y(ne,se.message),li(e(ne))}catch(se){y(ne,se instanceof Error?se.message:String(se)),y(de,e(ne)),y(Ht,{...e(Ht),[te.id]:{...te,state:"failed",message:e(ne),finished_at_ms:Date.now()}})}}}async function WB(I,te){if(!(!e(Ft)[te.id]?.installed||!window.confirm(`Delete ${I.display_name} ${te.label}? +`):ke.text||"")),y(ze,Oe?.lyrics??ke.lyrics??""),y(de,Oe?.language??ke.language??""),y(be,Oe?.moss_language??ke.language??"English"),y(xe,Oe?.context??(la.task==="asr"&&ke.text||"")),y(Ie,Oe?.reference_text??ke.reference_text??""),y($e,Oe?.instructions??ke.instructions??""),y(Fe,Oe?.duration??ke.duration_seconds??ke.options?.duration_sec??e(Fe)),y(rt,Oe?.max_tokens??ke.max_tokens??e(rt)),y(ot,Oe?.asr_max_tokens??ke.options?.max_tokens??e(ot)),y(_n,Oe?.long_text??te.requests.length>1),y(Ni,Oe?.text_chunk_size??e(Ni)),y(me,Oe?.voice??ke.voice??""),y(wt,Oe?.advanced_json??JSON.stringify(Object.fromEntries(Object.entries(ke.options||{}).filter(([Mt])=>!e(ut).some(vn=>vn.name===Mt))),null,2)),y(qe,kt),y(je,null),y(Be,null),y(He,null),y(Re,[null,null,null,null]),y(Wi,""),y(_t,null),e(Ze)&&Et(Ze,e(Ze).value=""),e(Ve)&&Et(Ve,e(Ve).value=""),e(Ne)&&Et(Ne,e(Ne).value=""),e(at)&&Et(at,e(at).value="");for(const Mt of e(gt))Mt&&(Mt.value="");const Dt=Object.values(te.input_files||{}).flat().filter(Mt=>typeof Mt=="string"&&Mt);y(ne,`Imported settings for ${la.display_name}.`),Dt.length&&y(ne,e(ne)+` Reselect the referenced files: ${Dt.join(", ")}.`),te.backend&&te.backend!==e(he)?.backend&&y(ne,e(ne)+` Exported backend: ${te.backend}; current backend: ${e(he)?.backend}.`),y(Je,Dt.length?e(ne):""),y(ue,""),pi(e(ne)),ui&&e(he)?.ui_management&&!Ki(e(R))&&window.confirm("The imported model settings differ from the loaded model. Reload now?")&&await jr()}async function UB(I){if(!(!I||e(Ae)||e(Le)||e(Fa)))try{await tx(await I.text())}catch(te){y(ne,te instanceof Error?te.message:String(te)),y(ue,e(ne)),y(Je,""),pi(`Settings import failed: ${e(ne)}`)}finally{e(wi)&&Et(wi,e(wi).value="")}}async function ax(I){if(Ki(e(R))){if(!e(Te).some(se=>se.id===e(ge)&&se.mode===I))throw new Error(`Configured model is not registered in ${I} mode.`);return}const te=e(Te).find(se=>se.id===e(ge)&&se.loaded);if((!te||te.mode!==I)&&(await io(I),await En()),!e(Te).some(se=>se.id===e(ge)&&se.loaded&&se.mode===I&&Bt(se,e(R))))throw new Error(`Model did not load in ${I} mode.`)}function ix(){for(const I of["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus"])if(MediaRecorder.isTypeSupported(I))return I}async function M_(I){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){y(ne,"Microphone recording is not supported by this browser.");return}if(!(e(Qa)||e(Ut)))try{Vn=await navigator.mediaDevices.getUserMedia({audio:!0});const te=[],se=ix();y(Qa,new MediaRecorder(Vn,se?{mimeType:se}:void 0)),y(Zn,I),Et(Qa,e(Qa).ondataavailable=ke=>{ke.data.size&&te.push(ke.data)}),Et(Qa,e(Qa).onstop=()=>{const ke=new Blob(te,{type:e(Qa)?.mimeType||se||"audio/webm"}),Oe=new File([ke],`recording-${Date.now()}.webm`,{type:ke.type});I==="source"?y(je,Oe):(y(me,""),y(Wi,""),y(Be,Oe),e(Ve)&&Et(Ve,e(Ve).value="")),Vn?.getTracks().forEach(kt=>kt.stop()),Vn=null,y(Qa,null),y(Zn,null),y(ne,`${I==="voice"?"Voice reference":"Source audio"} recording captured.`)}),e(Qa).start(),y(ne,`Recording ${I==="voice"?"voice reference":"source audio"}…`)}catch(te){y(ne,te instanceof Error?te.message:String(te)),Vn?.getTracks().forEach(se=>se.stop()),Vn=null,y(Qa,null),y(Zn,null)}}function z_(){e(Qa)?.state==="recording"&&e(Qa).stop()}async function Hf(){try{y(Hi,await Zd())}catch(I){pi(`Voice library unavailable: ${I instanceof Error?I.message:I}`)}}async function Wf(){if(!e(ge)||!e(he)){y(Ra,[]);return}try{y(Ra,await db(e(ge))),e(me)&&(new Set([...e(Ra),...e(A)?e(R)?.builtin_voices||[]:[]]).has(e(me))||y(me,""))}catch(I){y(Ra,[]),pi(`Configured voices unavailable: ${I instanceof Error?I.message:I}`)}}function RB(I){I.startsWith("saved:")?nx(I.slice(6)):I.startsWith("preset:")?Yt(I.slice(7)):tt()}function nx(I){y(Wi,I);const te=e(Hi).find(se=>se.id===I);te&&(y(me,""),y(Be,new File([te.audio],`${te.name}.wav`,{type:"audio/wav"})),y(_t,null),e(Ve)&&Et(Ve,e(Ve).value=""),e(at)&&Et(at,e(at).value=""),y(Ie,te.transcript),y(ne,`Selected saved voice “${te.name}”.`))}async function BB(I){if(!I.size)return;const te=new File([I],`live-${oi}.webm`,{type:I.type}),se=await Gr(te,16e3),ke=await hr(se),Oe=await pf({model:e(R).id,audio:ke,language:e(de),text:e(xe),options:Pr()}),kt=String(Oe.text||"").trim();kt&&y(Gt,[e(Gt),kt].filter(Boolean).join(" ")),oi+=1,y(ne,`Listening… ${oi} chunk${oi===1?"":"s"} transcribed.`)}function sx(){if(!ls||ja)return;const I=[],te=ix();Qe=new MediaRecorder(ls,te?{mimeType:te}:void 0),Qe.ondataavailable=se=>{se.data.size&&I.push(se.data)},Qe.onstop=()=>{const se=new Blob(I,{type:Qe?.mimeType||te||"audio/webm"});ai=ai.then(()=>BB(se)).catch(ke=>{y(ne,ke instanceof Error?ke.message:String(ke)),pi(`Live transcription failed: ${e(ne)}`)}),Qe=null,ja||sx()},Qe.start(),window.setTimeout(()=>{Qe?.state==="recording"&&Qe.stop()},4e3)}async function PB(){if(e(z)){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){y(ne,"Live microphone transcription is not supported by this browser.");return}Us(),y(Ut,!0),ja=!1,oi=0;try{await ax("streaming"),ls=await navigator.mediaDevices.getUserMedia({audio:!0}),y(ne,"Listening… speech is transcribed in four-second native streaming requests."),sx()}catch(I){y(ne,I instanceof Error?I.message:String(I)),rx()}}}function rx(){ja=!0,Qe?.state==="recording"&&Qe.stop(),ls?.getTracks().forEach(I=>I.stop()),ls=null,y(Ut,!1),y(ne,oi?`Live transcription stopped after ${oi} chunks.`:"Live transcription stopped.")}function jB(I){return Vi=I,()=>{Vi===I&&(Vi=null)}}async function NB(I,te){if(Ki(e(R)))return jr();const se=()=>{if(e(ge)!==I)throw new Error("The model changed while it loaded; press Run again.")};(!e(d)||ui)&&(ui&&e(Te).some(ke=>ke.id===e(ge)&&ke.loaded)&&(await _o(e(ge)),await En(),se()),await io(te),await En(),se(),ui=!1),await ax(te).finally(se)}async function OB(I,te,se){const ke=Vi,Oe=e(R).id;if(!ke)throw e(X)!=="studio"?new In("Open the Studio tab to run this entry."):new Error(`${e(R).display_name} is not ready.`);const kt=await ke({modelId:Oe,seed:I,maxTokens:ia(e(R))?e(rt):void 0,language:e(de).trim(),options:Pr(),signal:se,setStatus:la=>{y(ne,la)},warning:la=>new In(la),ensureLoaded:la=>NB(Oe,la)});Us(),kt.audio&&y(nt,[{id:"reply",url:URL.createObjectURL(kt.audio)}]),y(Gt,kt.text),y(jt,kt.json),y(Lt,kt.artifacts||[]),y(St,Oe),y(Je,""),y(ue,""),y(ne,e(Z)("status.completeIn",{seconds:((performance.now()-te)/1e3).toFixed(2)})),pi(e(ne))}async function ox(){if(e(Ae)||e(Ge)||e(v)||e(Fa))return;if(!e(ge)){y(ne,"Choose an installed model before running a request."),y(Je,e(ne)),y(ue,"");return}if(!e(d)&&e(Pe)===!1){y(ne,`${e(R).display_name} is not downloaded. Install a model package from the Models tab first.`),y(Je,e(ne)),y(ue,"");return}y(Ae,!0),Ai=new AbortController;const I=performance.now();y(ea,0),da=window.setInterval(()=>{y(ea,(performance.now()-I)/1e3)},250);let te=[],se=[],ke="",Oe="",kt=!1;const la=[];y(Je,""),y(ue,""),y(ne,e(Z)("status.runningTask",{task:cs(e(R).task)})),pi(e(ne));const Dt=e(R).family==="liveavatar"?e(je):null;try{const Mt=qa(e(qe));if(e(_)){await OB(Mt,I,Ai.signal);return}if(e(U)&&!e(Be))throw new In(`${e(R).display_name_en||e(R).display_name} requires a reference voice.`);if(e(O)&&!e(Ie).trim()){const Ka=e(B)?"Qwen3-TTS Base voice cloning":e(R).display_name_en||e(R).display_name;throw new In(`${Ka} requires a reference transcript. Choose a matching .txt file or enter the transcript.`)}if(e(E)&&!e(ze).trim())throw new In(`${e(R).display_name_en||e(R).display_name} requires lyrics.`);if(e(R).family==="liveavatar"){if(!e(je))throw new In("LiveAvatar requires driving audio.");if(!String(e(Ke).reference_image_path||"").trim())throw new In("LiveAvatar requires a reference image.")}await jr();const vn=e(Te).find(Ka=>Ka.id===e(R).id),Ss={schema_version:1,created_at:new Date().toISOString(),backend:e(he)?.backend,resolved_seed:Mt,model:{id:e(R).id,display_name:e(R).display_name,family:e(R).family,task:e(R).task,mode:vn?.mode||e(R).mode||"offline",path:vn?.path||e(we),package_id:e(pe)?void 0:Es(e(R))?.id,load_options:qo(e(R)),session_options:vn?.session_options||Ws(e(R))},ui:{text:e(ye),lyrics:e(ze),language:e(de),moss_language:e(be),context:e(xe),reference_text:e(Ie),instructions:e($e),duration:e(Fe),max_tokens:e(rt),asr_max_tokens:e(ot),long_text:e(_n),text_chunk_size:e(Ni),voice:e(me),advanced_values:{...e(Ke)},advanced_json:e(wt)},input_files:{source:e(je)?.name,voice_reference:e(Be)?.name,video:e(He)?.name,speaker_references:e(Re).map(Ka=>Ka?.name||null)},requests:la},cn=Pr();if(e(G)){const Ka=await Ys();Ka&&(cn.voice_samples=Ka)}e(C)&&e(He)&&(cn.video=await Gd(e(He),Ai?.signal));const fs=e(P)?await Ks(e(je)):void 0,Xs=e(j)&&!e(G)&&!(e(A)&&e(me))?await Ks(e(Be)):void 0;if(["tts","clon","vdes"].includes(e(R).task)){if(!e(ye).trim())throw new In("Enter text to generate.");const Ka=Math.max(40,e(Ni));e(R).family==="voxcpm2"&&(cn.text_chunk_size=Ka),e(R).family==="ming3_tts"&&e(_n)&&(cn.text_chunk_size=Ka);const $n=e(_n)&&e(R).task!=="vdes"&&!["moss_ttsd","ming3_tts"].includes(e(R).family)?_f(e(ye),Ka):[e(ye)],Ji=[],si=[];for(let $s=0;$s<$n.length;$s+=1){y(ne,$n.length>1?`Synthesizing chunk ${$s+1} of ${$n.length}…`:e(Z)("status.runningTask",{task:cs(e(R).task)}));const ps={model:e(R).id,input:$n[$s],language:["moss_ttsd","moss_voicegen"].includes(e(R).family)?e(be):e(de),seed:oe(Mt,$s),options:cn};ia(e(R))&&!["kugelaudio","voxtral_tts"].includes(e(R).family)&&(ps.max_tokens=e(rt)),Xs?ps.voice_ref=Xs:e(me)?ps.voice=Si[e(me)]||e(me):e(R).default_voice&&(ps.voice=e(R).default_voice),e(Ie).trim()&&Ua(e(R),"reference_text")&&(ps.reference_text=e(Ie)),e(R).task==="vdes"&&e($e).trim()&&(e(R).family==="ming3_tts"?ps.instruct=e($e):ps.instructions=e($e)),la.push({endpoint:"/v1/audio/speech",body:JSON.parse(JSON.stringify(ps))});const er=await ff(ps,Ai.signal);Ji.push(er.blob),si.push({chunk:$s+1,characters:$n[$s].length,wall_ms:er.wallMs,rtf:er.rtf})}const Zs=await uT(Ji);te=[{id:$n.length>1?"merged":"output",url:URL.createObjectURL(Zs)}],Oe=JSON.stringify({seed:Mt,chunks:$n.length,characters:e(ye).length,chunk_budget:e(Ni),timings:si},null,2)}else if(e(R).task==="asr"){if(!fs)throw new In("Choose an audio file.");e(R).family in to?cn.max_tokens=e(ot):e(R).family==="ming3_audio"&&(cn.max_tokens=e(rt));const Ka={model:e(R).id,audio:fs,language:e(de),text:e(xe),options:cn},$n=["owsm","crisperwhisper"].includes(e(R).family)&&cn.return_timestamps===!0;la.push({endpoint:$n?"/v1/audio/transcriptions/details":"/v1/audio/transcriptions",body:JSON.parse(JSON.stringify(Ka))});const Ji=await pf(Ka,Ai.signal,$n);ke=String(Ji.text||""),Oe=JSON.stringify(Ji,null,2)}else{if(e(N)&&!fs)throw new In("Choose a source audio file.");const Ka={options:cn};if(["gen","s2s","align"].includes(e(R).task)&&e(ye).trim()&&!e(f)&&!e(T)&&!["apollo","universr","reuse","sidon"].includes(e(R).family)&&(Ka.text=e(ye)),["gen","s2s","align"].includes(e(R).task)&&e(de).trim()&&!e(f)&&!["apollo","universr","reuse","sidon"].includes(e(R).family)&&(Ka.language=e(de)),e(R).task==="gen"){if(e(f))Ka.lyrics=e(ze).trim();else{const si=Ll();si&&(Ka.text=si),e(ze).trim()&&(Ka.lyrics=e(ze)),!e(b)&&e(R).family!=="auk"&&(e($)?cn.duration_sec=e(Fe):Ka.duration_seconds=e(Fe))}Ka.seed=Mt,ia(e(R))&&(Ka.max_tokens=e(rt))}else e(R).task==="s2s"&&(["apollo","reuse","sidon"].includes(e(R).family)||(Ka.seed=Mt),ia(e(R))&&(Ka.max_tokens=e(rt)));fs&&(Ka.audio=fs),Xs&&(Ka.voice_ref=Xs),e(Ie).trim()&&Ua(e(R),"reference_text")&&(Ka.reference_text=e(Ie));const $n={model:e(R).id,request:Ka};la.push({endpoint:"/v1/tasks/run",body:JSON.parse(JSON.stringify($n))});const Ji=await Ul($n,Ai.signal);if(ke=typeof Ji.text=="string"?Ji.text:"",Oe=JSON.stringify(Ji,(si,Zs)=>(si==="audio"||si==="payload")&&typeof Zs=="string"?``:Zs,2),typeof Ji.audio=="string"&&(te=[{id:"output",url:mf(Ji.audio)}]),Array.isArray(Ji.named_audio_outputs)){for(const si of te)URL.revokeObjectURL(si.url);te=Ji.named_audio_outputs.filter(si=>typeof si?.id=="string"&&typeof si?.audio=="string").map(si=>({id:si.id,url:mf(si.audio)}))}if(Array.isArray(Ji.artifacts))if(e(R).family==="liveavatar"){y(ne,"Encoding LiveAvatar MP4 in browser…");const si=await y2(Ji,Dt,"LiveAvatar","liveavatar");se=si.artifacts,si.warning&&pi(si.warning)}else se=Ji.artifacts.filter(si=>typeof si?.id=="string"&&typeof si?.payload=="string").map(si=>({id:si.id,extension:si.meta?.extension||(si.meta?.format==="midi"?"mid":"bin"),mime:si.meta?.mime||"application/octet-stream",url:`data:${si.meta?.mime||"application/octet-stream"};base64,${si.payload}`}))}const xr=JSON.stringify(Ss,null,2),Sr=URL.createObjectURL(new Blob([xr],{type:"application/json"}));Us(),y(nt,te),y(Lt,se),y(Gt,ke),y(jt,Oe),y(za,{url:Sr,filename:`${Ss.model.id}-${Date.now()}.settings.json`}),y(St,Ss.model.id);{const Ka={id:ln++,modelId:e(St),task:Ss.model.task,label:Ss.model.display_name,createdAt:new Date().toISOString(),seed:Mt,audio:te,artifacts:se,text:ke,json:Oe,settings:e(za),settingsJson:xr};y(sa,[Ka,...e(sa)]),y(Kt,Ka.id),no(i().historyLimit)}y(wa,""),kt=!0;const Ts=((performance.now()-I)/1e3).toFixed(2);y(Je,""),y(ue,""),y(ne,e(Z)("status.completeIn",{seconds:Ts})),pi(e(ne))}catch(Mt){Mt?.name==="AbortError"?(y(ne,"Cancelled."),y(Je,""),y(ue,"")):(y(ne,Mt instanceof Error?Mt.message:String(Mt)),y(Je,Mt instanceof In?e(ne):""),y(ue,Mt instanceof In?"":e(ne)),pi(`Request failed: ${e(ne)}`))}finally{if(da!==null&&window.clearInterval(da),da=null,!kt){for(const Mt of te)URL.revokeObjectURL(Mt.url);for(const Mt of se)URL.revokeObjectURL(Mt.url)}y(Ae,!1),Ai=null,Ki(e(R))&&!e(d)&&En()}}function IB(){Ai?.abort()}function DB(I){if(!(e(X)==="library"||e(X)==="apps")){if(I.key==="Escape"&&e(pt)){y(pt,!1);return}(I.ctrlKey||I.metaKey)&&I.key==="Enter"&&!e(Ae)&&(I.preventDefault(),e(X)==="arena"?e(le)?.runArena():ox())}}function uu(I){I!==e(X)&&(e(X)==="library"&&!e(ee)?.canClose()||e(X)==="apps"&&!e(ce)?.canClose()||y(X,I))}async function fu(){if(e(he)?.ui_management)try{const I=await _T(),te=Object.fromEntries(I.map(Oe=>{const kt=e(ta)[Oe.id];return[Oe.id,{...Oe,total_bytes:Oe.total_bytes||kt?.total_bytes||0}]}));y(ta,{...e(ta),...te});let se=!1;for(const Oe of Di){const kt=Xa(Oe,e(ta)).filter(Dt=>Dt.state==="complete");for(const Dt of kt){const Mt=e($t)[Dt.id];Mt&&!Mt.installed&&y($t,{...e($t),[Dt.id]:{...Mt,installed:!0}}),Dt.finished_at_ms>(Na[Dt.id]||0)&&(Na={...Na,[Dt.id]:Dt.finished_at_ms},se=!0)}kt.length>0&&Oe.id===e(ge)&&await xs()}se&&(y(Ot,"idle"),await $i());const ke=Object.values(e(ta)).some(Oe=>Oe.state==="queued"||Oe.state==="running"||Oe.state==="cancelling");ke&&Ei===null?Ei=window.setInterval(fu,1500):!ke&&Ei!==null&&(window.clearInterval(Ei),Ei=null)}catch(I){pi(`Installer status unavailable: ${I instanceof Error?I.message:I}`)}}async function LB(I,te,se=!1){if(e($t)[te.id]?.installed&&!se)return;const ke=e(ta)[te.id];if(ke&&["queued","running","cancelling"].includes(ke.state))return;const Oe=e($t)[te.id]?.size_bytes,kt=se?"Update":"Download";if(!window.confirm(`${kt} ${I.display_name} ${te.label}${Oe?` (${$o(Oe)})`:""}?`))return;Qs(I,te),y(ne,`Starting ${te.label} installation for ${I.display_name}...`);const Dt=e($t)[te.id]?.size_bytes||0;y(ta,{...e(ta),[te.id]:{id:te.id,state:"queued",message:"Sending installation request…",exit_code:-1,downloaded_bytes:0,total_bytes:Dt,progress_percent:0,started_at_ms:0,finished_at_ms:0}});try{Ei===null&&(Ei=window.setInterval(fu,1e3));const Mt=await pT({id:te.id,overwrite:se});y(ta,{...e(ta),[Mt.id]:{...Mt,total_bytes:Mt.total_bytes||Dt}}),await fu(),y(ne,`${I.display_name} ${te.label} installation is running in the background.`),pi(e(ne))}catch(Mt){y(ne,Mt instanceof Error?Mt.message:String(Mt)),y(ta,{...e(ta),[te.id]:{id:te.id,state:"failed",message:e(ne),exit_code:-1,downloaded_bytes:0,total_bytes:0,progress_percent:-1,started_at_ms:0,finished_at_ms:Date.now()}}),pi(`Installer failed to start: ${e(ne)}`)}}async function VB(I,te){if(["queued","running","cancelling"].includes(te.state)){y(ne,`Stopping ${I.display_name} download...`);try{const se=await mT(te.id);y(ta,{...e(ta),[se.id]:se}),Ei===null&&(Ei=window.setInterval(fu,500)),y(ne,`${I.display_name} download is stopping. Staging files will be removed automatically.`),pi(e(ne))}catch(se){y(ne,se instanceof Error?se.message:String(se)),y(ue,e(ne)),y(ta,{...e(ta),[te.id]:{...te,state:"failed",message:e(ne),finished_at_ms:Date.now()}})}}}async function HB(I,te){if(!["queued","running","cancelling"].includes(te.state)){y(ne,`Cleaning partial ${I.display_name} download...`);try{const se=await gT(te.id);y(ta,{...e(ta),[te.id]:{...te,state:"cleaned",message:se.message,downloaded_bytes:0,total_bytes:0,progress_percent:100,finished_at_ms:Date.now()}}),y(ne,se.message),pi(e(ne))}catch(se){y(ne,se instanceof Error?se.message:String(se)),y(ue,e(ne)),y(ta,{...e(ta),[te.id]:{...te,state:"failed",message:e(ne),finished_at_ms:Date.now()}})}}}async function WB(I,te){if(!(!e($t)[te.id]?.installed||!window.confirm(`Delete ${I.display_name} ${te.label}? -Only this package precision will be removed.`))){y(ne,`Deleting ${I.display_name} ${te.label}...`);try{da(I,te)&&(y(ne,`Unloading ${I.display_name} ${te.label} before deletion...`),await _o(I.id),await $n());const ke=await hT(te.id);y(Ft,{...e(Ft),[te.id]:{...e(Ft)[te.id],installed:!1}});const Oe={...e(Ht)};if(delete Oe[te.id],y(Ht,Oe),Lc(I,te)){const xt=(I.install_packages||[]).find(Vt=>Vt.id!==te.id&&e(Ft)[Vt.id]?.installed),la={...e(fa)};xt?la[I.id]=xt.id:delete la[I.id],y(fa,la),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(fa))),I.id===e(ge)&&!e(ce)&&(y(we,xs(I)),Fi())}Ss(e(Ft)),y(Nt,"idle"),await si(),I.id===e(ge)&&(await Hs(),kr()),y(ne,ke.message||`${I.display_name} ${te.label} deleted.`),li(e(ne))}catch(ke){y(ne,ke instanceof Error?ke.message:String(ke)),li(`Package deletion failed: ${e(ne)}`)}}}Kn(async()=>{try{a9()}catch(se){Bf.set(se instanceof Error?se.message:String(se)),li(`Configuration could not be loaded: ${se instanceof Error?se.message:se}`)}await Dn(),xa=window.matchMedia("(prefers-color-scheme: dark)"),jt=xa.matches,Pi=se=>{jt=se.matches,e(ft)==="system"&&Un()},xa.addEventListener("change",Pi),y(ft,$b(localStorage.getItem(Tb))),Un(e(ft));const I=localStorage.getItem("audiocpp.ui.language");y(De,bb(I?[I]:navigator.languages)),document.documentElement.lang=e(De);try{const se=JSON.parse(localStorage.getItem("audiocpp.ui.modelsFolderHistory")||"[]");if(!Array.isArray(se)||se.some(ke=>typeof ke!="string"||!ke.trim()))throw new Error("Invalid models-folder history.");y(wa,[...new Set(se)].slice(0,10))}catch(se){li(`Models folder history unavailable: ${se instanceof Error?se.message:String(se)}`)}try{y(fa,JSON.parse(localStorage.getItem("audiocpp.ui.packageIds")||"{}"))}catch{y(fa,{})}localStorage.removeItem("audiocpp.ui.packagePaths");const te=localStorage.getItem("audiocpp.ui.model");if(te&&y(ge,te),y(R,e(un).find(se=>se.id===e(ge))||e(un)[0]||Li[0]),y(pe,""),y(Ba,[]),y(Tn,Ot(e(R))),e(ge)&&(ks={...ks,[e(Tn)]:e(ge)}),ds(),await $n(),e(ut).some(se=>se.group==="lora")&&ds(),e(he)?.ui_management)try{let se=await vT();const ke=localStorage.getItem("audiocpp.ui.modelsFolder");ke&&ke!==se.models_root&&(se=await cb(ke)),Hc(se)}catch(se){y(ne,se instanceof Error?se.message:String(se)),y(de,e(ne)),li(`Models folder unavailable: ${e(ne)}`)}y(we,xs(e(R))),e(he)?.ui_management?(await si(),await Hs(),kr()&&y(ne,"No installed model is selected. Choose a downloaded model or install one from the Models tab.")):y(je,!!e(ge)),await Hf(),await Wf(),await fu()}),ur(()=>{ra!==null&&window.clearInterval(ra),Ks();for(const I of e(na))Ro(I);Si?.abort(),e(Wa)?.state==="recording"&&e(Wa).stop(),Qa=!0,Ke?.state==="recording"&&Ke.stop(),Vn?.getTracks().forEach(I=>I.stop()),Xn?.getTracks().forEach(I=>I.stop()),Ti!==null&&window.clearInterval(Ti),ka!==null&&window.clearInterval(ka),xa&&Pi&&xa.removeEventListener("change",Pi)}),Ee(()=>e(Z),()=>{e(Z)==="apps"&&y(fe,!0)}),Ee(()=>e(De),()=>{y(X,vb(e(De)))}),Ee(()=>(e(he),e(Ft)),()=>{y(un,e(he)&&!e(he).ui_management?Xl():[...Li.map(I=>({...I,install_packages:I.install_packages?.map(te=>Md(te,e(Ft)[te.id]))})),...Xl(!0)])}),Ee(()=>e(un),()=>{y(Zl,dl(e(un)))}),Ee(()=>(e(un),e(ge),Li),()=>{y(R,e(un).find(I=>I.id===e(ge))||e(un)[0]||Li[0])}),Ee(()=>(e(R),e(fa)),()=>{y(r,e(R)?.install_packages?.find(I=>I.id===e(fa)[e(R).id])||e(R)?.install_packages?.[0])}),Ee(()=>(e(ce),e(R),e(r)),()=>{y(o,e(ce)||Hi(e(R))||!e(r)||!!e(r).load_target)}),Ee(()=>e(Tn),()=>{y(l,yr.find(I=>I.id===e(Tn))||yr[0])}),Ee(()=>(e(un),e(Tn)),()=>{y(c,e(un).filter(I=>Ot(I)===e(Tn)).sort((I,te)=>Jl(I.display_name,te.display_name)))}),Ee(()=>(e(Te),e(ge),e(R)),()=>{y(d,e(Te).some(I=>I.id===e(ge)&&I.loaded&&Dt(I,e(R))))}),Ee(()=>e(R),()=>{y(g,x7(e(R)?.family,e(R)?.task))}),Ee(()=>e(g),()=>{y(h,e(g)?.component)}),Ee(()=>e(ut),()=>{y(m,e(ut).filter(I=>I.group==="lora"))}),Ee(()=>(e(ut),e(R)),()=>{y(p,e(ut).filter(I=>I.group!=="lora"&&!(e(R)?.family==="ace_step"&&["lora","lora_scale"].includes(I.name))))}),Ee(()=>e(g),()=>{y(u,e(g)?.replacesGenericControls||fi)}),Ee(()=>e(g),()=>{y(f,e(g)?.requestMode==="yue2")}),Ee(()=>e(g),()=>{y(_,e(g)?.requestMode==="panel")}),Ee(()=>(e(g),e(nt)),()=>{y(b,e(g)?.blocksRunWhileUploading===!0&&e(nt))}),Ee(()=>e(R),()=>{y(v,e(R)?.id==="firered-audio-semantic-edit"||e(R)?.id==="firered-audio-acoustic-edit")}),Ee(()=>e(R),()=>{y(T,e(R)?.family==="ace_step")}),Ee(()=>e(R),()=>{y(S,e(R)?.family==="controlfoley"||e(R)?.family==="midashenglm_gen")}),Ee(()=>e(R),()=>{y(M,(e(R)?.family==="breeze_tts"||e(R)?.family==="chatterbox_turbo"||e(R)?.family==="maya1"||e(R)?.family==="kugelaudio"||e(R)?.family==="voxtral_tts"||e(R)?.family==="lfm2_audio"&&!e(R)?.builtin_voices?.length)&&e(R)?.task==="tts")}),Ee(()=>(e(R),e(v)),()=>{y(P,["asr","vc","svc","s2s","sep","vad","diar","align","midi","turn","wake","cls"].includes(e(R)?.task)||e(v)||e(R)?.family==="liveavatar"||e(R)?.family==="latentsync"||e(R)?.family==="auk"&&e(R)?.task==="gen")}),Ee(()=>(e(P),e(R),e(u)),()=>{y(B,e(P)||e(R)?.task==="gen"&&!e(u).genSource)}),Ee(()=>e(R),()=>{y(C,e(R)?.request_options?.includes("video")===!0)}),Ee(()=>(e(R),e(M)),()=>{y(j,["clon","vc","svc"].includes(e(R)?.task)&&e(R)?.family!=="rvc"||e(R)?.task==="s2s"&&e(R)?.family==="personaplex"||e(R)?.task==="tts"&&!["supertonic"].includes(e(R)?.family)&&!e(M))}),Ee(()=>e(R),()=>{y(G,e(R)?.family==="vibevoice"||e(R)?.family==="moss_ttsd")}),Ee(()=>e(R),()=>{y(A,!!e(R)?.builtin_voices?.length)}),Ee(()=>e(R),()=>{y(N,e(R)?.task==="tts"&&e(R)?.family==="qwen3_tts"&&!e(R)?.id.includes("custom"))}),Ee(()=>e(R),()=>{y(H,["tts","clon"].includes(e(R)?.task)&&!["auk","maya1","moss_ttsd","voxtral_tts"].includes(e(R)?.family))}),Ee(()=>(e(H),e(pe),e(R),e(N)),()=>{y(E,!(e(H)&&e(pe))&&(["clon","vc","svc"].includes(e(R)?.task)&&e(R)?.family!=="rvc"||e(N)))}),Ee(()=>e(R),()=>{y(U,Gt(e(R),"lyrics"))}),Ee(()=>(e(R),e(H),e(pe),e(Be),e(N)),()=>{y(O,Gt(e(R),"reference_text")&&!(e(H)&&e(pe))||!!e(Be)&&e(N))}),Ee(()=>(e(A),e(Ba),e(R)),()=>{y(oa,e(A)?Array.from(new Set([...e(Ba).filter(I=>!(I in Gi)),...e(R)?.builtin_voices||[]])):e(Ba))}),Ee(()=>(e(pe),e(he),e(A),uf),()=>{y(V,e(pe)&&e(he)&&!e(A)?uf(Gi[e(pe)]||e(pe)):"")}),Ee(()=>(e(A),e(oa)),()=>{y(D,e(A)||e(oa).every(I=>I in Gi))}),Ee(()=>e(R),()=>{y($,["lfm2_audio","lfm3_audio"].includes(e(R)?.family)&&e(R)?.task==="s2s")}),Ee(()=>(e(R),e($),e(u)),()=>{y(F,["tts","clon","gen","s2s","align","vdes"].includes(e(R)?.task)&&!["apollo","universr","builtin_audio_utils","reuse","sidon"].includes(e(R)?.family)&&!e($)&&!e(u).text)}),Ee(()=>e(R),()=>{y(z,e(R)?.task==="asr"&&["voxtral_realtime","nemotron_asr","higgs_audio_stt","sense_asr","vibevoice_asr_streaming","confucius4_r2t2"].includes(e(R)?.family))}),Ee(()=>(e(he),e(Ft),e(Nt)),()=>{y(L,e(he)===null||!!e(he).ui_management&&Object.keys(e(Ft)).length===0&&e(Nt)!=="failed")}),Ee(()=>(e(un),e(Te),e(ge),e(je),e(Ft)),()=>{y(Q,new Set(e(un).filter(I=>{if(Hi(I)||e(Te).some(se=>se.id===I.id&&se.loaded)||I.id===e(ge)&&e(je)===!0)return!0;const te=I.install_packages||[];return!te.length||te.some(se=>e(Ft)[se.id]===void 0)?!0:te.some(se=>e(Ft)[se.id]?.installed)}).map(I=>I.id)))}),Ee(()=>i(),()=>{no(i().historyLimit)}),kn(),Xi();var lx=Iz();A4("1uha8ag",I=>{e4(te=>{Cp.title=te??""},[()=>(e(Ae),e(ta),x(()=>e(Ae)?`${e(ta).toFixed(1)} s · audio.cpp · Native Studio`:"audio.cpp · Native Studio"))])}),re("keydown",xc,DB);var E_=ht(lx),U_=k(E_),cx=q(k(U_),2),dx=q(k(cx),2),QB=k(dx,!0);w(dx),w(cx),w(U_);var Qf=q(U_,2),pu=k(Qf);let ux;var KB=k(pu,!0);w(pu);var Qc=q(pu,2);let fx;var YB=k(Qc,!0);w(Qc);var mu=q(Qc,2);let px;var JB=k(mu,!0);w(mu);var Kc=q(mu,2);let mx;var XB=k(Kc,!0);w(Kc);var gx=q(Kc,2);{var ZB=I=>{var te=Of();let se;var ke=k(te,!0);w(te),ie(Oe=>{se=va(te,1,"",null,se,{active:e(Z)==="models"}),W(ke,Oe)},[()=>(e(X),x(()=>e(X)("nav.models")))]),re("click",te,ln),J(I,te)};ve(gx,I=>{e(he),x(()=>e(he)?.ui_management!==!1)&&I(ZB)})}var gu=q(gx,2);let hx;var eP=k(gu,!0);w(gu);var hu=q(gu,2);let _x;var tP=k(hu,!0);w(hu),w(Qf);var R_=q(Qf,2),B_=k(R_),aP=k(B_,!0);w(B_);var ml=q(B_,2);Ct(ml,5,()=>oq,Kt,(I,te,se,ke)=>{var Oe=su(),xt=k(Oe,!0);w(Oe);var la={};ie(()=>{W(xt,(e(te),x(()=>e(te).name))),la!==(la=(e(te),x(()=>e(te).code)))&&(Oe.value=(Oe.__value=(e(te),x(()=>e(te).code)))??"")}),J(I,Oe)}),w(ml);var vx;On(ml),w(R_);var P_=q(R_,2),j_=k(P_),iP=k(j_,!0);w(j_);var gl=q(j_,2);Ct(gl,5,()=>xq,Kt,(I,te)=>{var se=su(),ke=k(se,!0);w(se);var Oe={};ie(xt=>{W(ke,xt),Oe!==(Oe=(e(te),x(()=>e(te).id)))&&(se.value=(se.__value=(e(te),x(()=>e(te).id)))??"")},[()=>(e(X),e(te),x(()=>e(X)(`theme.${e(te).id}`,{},e(te).label)))]),J(I,se)}),w(gl);var bx;On(gl),w(P_);var N_=q(P_,2);let yx;var nP=q(k(N_),1,!0);w(N_),w(E_);var O_=q(E_,2),wx=k(O_);{var sP=I=>{var te=GM(),se=k(te);{let ke=Lt(()=>e(Z)==="apps");Ci(t9(se,{get active(){return e(ke)},$$legacy:!0}),Oe=>y(oe,Oe),()=>e(oe))}w(te),ie(()=>_e(te,"hidden",e(Z)!=="apps")),J(I,te)};ve(wx,I=>{e(fe)&&I(sP)})}var rP=q(wx,2);{var oP=I=>{var te=Uz(),se=ht(te);Ct(se,5,()=>yr,Kt,(Jt,qt)=>{var _a=FM();let Wt;var ga=k(_a),ji=q(ga),wi=k(ji,!0);w(ji),w(_a),ie((Ui,Ri)=>{_a.disabled=e(Ma),Wt=va(_a,1,"",null,Wt,{active:e(Tn)===e(qt).id}),W(ga,`${Ui??""} `),W(wi,Ri)},[()=>(e(qt),e(X),x(()=>Zn(e(qt).id,e(qt).label,e(X)))),()=>(e(un),e(qt),x(()=>e(un).filter(Ui=>Ot(Ui)===e(qt).id).length))]),re("click",_a,()=>pl(e(qt).id)),J(Jt,_a)}),w(se);var ke=q(se,2),Oe=k(ke),xt=k(Oe),la=k(xt,!0);w(xt);var Vt=q(xt,2),Ut=k(Vt,!0);w(Vt);var bn=q(Vt,2),$s=k(bn,!0);w(bn),w(Oe);var pn=q(Oe,2);let fs;var Js=k(pn,!0);w(pn),w(ke);var Sr=q(ke,2),Tr=k(Sr),qs=k(Tr),Ja=k(qs),qn=k(Ja,!0);w(Ja);var Yi=q(Ja,2),ri=k(Yi),Xs=k(ri,!0);w(ri),ri.value=ri.__value="";var Cs=q(ri);Ct(Cs,1,()=>(e(l),x(()=>e(l).tasks)),Kt,(Jt,qt)=>{const _a=Lt(()=>(e(c),e(qt),x(()=>e(c).filter(wi=>wi.task===e(qt)))));var Wt=ys(),ga=ht(Wt);{var ji=wi=>{var Ui=MM();Ct(Ui,5,()=>e(_a),Kt,(Ri,Di)=>{var Ln=su(),gs=k(Ln);w(Ln);var es={};ie((pi,er)=>{Ln.disabled=pi,W(gs,`${e(Di),x(()=>e(Di).display_name)??""}${er??""}`),es!==(es=(e(Di),x(()=>e(Di).id)))&&(Ln.value=(Ln.__value=(e(Di),x(()=>e(Di).id)))??"")},[()=>(e(Q),e(Di),x(()=>!e(Q).has(e(Di).id))),()=>(e(Q),e(Di),e(X),x(()=>e(Q).has(e(Di).id)?"":` — ${e(X)("studio.notDownloaded")}`))]),J(Ri,Ln)}),w(Ui),ie(Ri=>_e(Ui,"label",Ri),[()=>(e(qt),e(X),x(()=>ns(e(qt),e(X))))]),J(wi,Ui)};ve(ga,wi=>{K(e(_a)),x(()=>e(_a).length)&&wi(ji)})}J(Jt,Wt)}),w(Yi);var ps=q(Yi,2),Zs=k(ps);let sc;var Bo=k(Zs,!0);w(Zs);var hl=q(Zs,2),_l=k(hl,!0);w(hl),w(ps),w(qs);var vl=q(qs,2),yn=k(vl);{var an=Jt=>{var qt=zM(),_a=ht(qt),Wt=k(_a,!0);w(_a);var ga=q(_a,2);Pt(ga);var ji=q(ga,2),wi=k(ji,!0);w(ji),ie((Ui,Ri)=>{W(Wt,Ui),ga.disabled=e(d)||e(Le)||e(Ae),_e(ji,"href",(e(R),x(()=>e(R).weights_url))),W(wi,Ri)},[()=>(e(X),x(()=>e(X)("studio.weightsPath"))),()=>(e(X),x(()=>e(X)("studio.downloadWeights")))]),Ta(ga,()=>e(we),Ui=>y(we,Ui)),re("change",ga,Hs),J(Jt,qt)},As=La(()=>(e(R),e(he),x(()=>e(R).family==="builtin_audio_utils"&&e(he)?.ui_management&&!Hi(e(R)))));ve(yn,Jt=>{e(As)&&Jt(an)})}var Wn=q(yn,2);{var ms=Jt=>{var qt=EM();Ct(qt,5,()=>(e(R),x(()=>Pa(e(R)))),Kt,(_a,Wt)=>{const ga=Lt(()=>(e(Wt),x(()=>e(Wt).choice))),ji=Lt(()=>(K(e(ga)),e(R),e(Te),e(Ft),x(()=>!!(e(ga)&&ha(e(R),e(ga),e(Te),e(Ft)))))),wi=Lt(()=>(K(e(ga)),e(R),e(Te),x(()=>!!(e(ga)&&da(e(R),e(ga),e(Te))))));var Ui=Of();let Ri;var Di=k(Ui,!0);w(Ui),ie((Ln,gs)=>{Ui.disabled=e(Le)||!e(ji),_e(Ui,"title",Ln),Ri=va(Ui,1,"",null,Ri,gs),W(Di,(K(e(ga)),e(Wt),x(()=>e(ga)?.label||e(Wt).label)))},[()=>(K(e(ga)),K(e(wi)),e(X),K(e(ji)),e(Wt),x(()=>e(ga)?.load_target_error||(!e(wi)&&!e(ga)?.load_target?"Package load target is not ready":e(X)(e(wi)?"studio.unloadPackage":e(ji)?"studio.loadPackage":"studio.packageNotDownloaded",{package:e(ga)?.label||e(Wt).label})))),()=>({resident:e(wi),"selected-package":!!(e(ga)&&e(ji)&&Lc(e(R),e(ga)))})]),re("click",Ui,()=>e(ga)&&Wc(e(ga))),J(_a,Ui)}),w(qt),ie(_a=>_e(qt,"aria-label",_a),[()=>(e(X),x(()=>e(X)("studio.format")))]),J(Jt,qt)},$r=Jt=>{var qt=Of();let _a;var Wt=k(qt,!0);w(qt),ie((ga,ji,wi)=>{_a=va(qt,1,"single-model-toggle",null,_a,{resident:e(d)}),qt.disabled=ga,_e(qt,"title",ji),W(Wt,wi)},[()=>(e(ge),e(Le),e(b),e(je),e(d),e(o),e(R),x(()=>!e(ge)||e(Le)||e(b)||e(je)===!1||!e(d)&&!e(o)||Hi(e(R))&&!e(d))),()=>(e(r),e(o),e(R),e(d),e(X),x(()=>e(r)?.load_target_error||(e(o)?Hi(e(R))&&!e(d)?e(X)("studio.serverConfigured"):e(d)?e(X)("studio.unload"):e(X)("studio.load"):"Package load target is not ready"))),()=>(e(R),e(Le),e(X),e(d),x(()=>Hi(e(R))?e(Le)?e(X)("studio.working"):e(d)?e(X)("studio.bundledLoaded"):e(X)("studio.configured"):e(Le)?e(X)("studio.working"):e(d)?e(X)(e(R).family==="builtin_audio_utils"?"studio.unload":"studio.bundledLoaded"):e(X)("studio.load")))]),re("click",qt,du),J(Jt,qt)};ve(Wn,Jt=>{e(ge),e(R),e(u),x(()=>e(ge)&&(e(R).install_packages||[]).length&&!e(u).packageButtons)?Jt(ms):Jt($r,-1)})}w(vl);var rc=q(vl,2);{var _u=Jt=>{var qt=UM(),_a=k(qt,!0);w(qt),ie(Wt=>W(_a,Wt),[()=>(e(X),x(()=>Ql(e(X))))]),J(Jt,qt)};ve(rc,Jt=>{e(ge),e(R),x(()=>e(ge)&&(e(R)?.input_hint_en||e(R)?.input_hint))&&Jt(_u)})}w(Tr);var oc=q(Tr,2),vu=k(oc);{var I_=Jt=>{var qt=xz(),_a=ht(qt),Wt=k(_a),ga=k(Wt),ji=k(ga,!0);w(ga);var wi=q(ga),Ui=k(wi,!0);w(wi),w(Wt);var Ri=q(Wt,2),Di=k(Ri),Ln=k(Di,!0);w(Di);var gs=q(Di,2);{var es=bt=>{var Tt=RM(),Mt=k(Tt);zc(Mt,{size:14});var St=q(Mt,1,!0);w(Tt),ie(Oa=>{Tt.disabled=e(Ae)||e(Le)||e(Ma),W(St,Oa)},[()=>(e(X),x(()=>e(X)("settings.load")))]),re("click",Tt,()=>e(ki)?.click()),J(bt,Tt)};ve(gs,bt=>{e(u),x(()=>!e(u).settingsImport)&&bt(es)})}w(Ri),w(_a);var pi=q(_a,2);Ci(pi,bt=>y(ki,bt),()=>e(ki));var er=q(pi,2);{var Yc=bt=>{var Tt=BM(),Mt=k(Tt),St=k(Mt);Ad(St,{size:17});var Oa=q(St,1,!0);w(Mt);var ja=q(Mt,2);rn(ja),w(Tt),ie((Sa,Aa)=>{W(Oa,Sa),_e(ja,"rows",(e(R),x(()=>e(R).task==="gen"?3:4))),_e(ja,"placeholder",Aa)},[()=>(e(R),e(X),x(()=>e(R).task==="gen"?e(X)("request.prompt"):e(R).task==="align"?e(X)("request.alignmentText"):e(X)("request.text"))),()=>(e(R),e(X),x(()=>e(R).task==="gen"?e(X)("request.soundPlaceholder"):e(X)("request.textPlaceholder")))]),Ta(ja,()=>e(ye),Sa=>y(ye,Sa)),J(bt,Tt)};ve(er,bt=>{e(F)&&bt(Yc)})}var Po=q(er,2);{var wu=bt=>{var Tt=PM(),Mt=k(Tt),St=k(Mt);Pt(St);var Oa=q(St,3,!0);w(Mt);var ja=q(Mt,2),Sa=k(ja),Aa=k(Sa,!0);w(Sa);var Ia=q(Sa,2);Pt(Ia),w(ja),w(Tt),ie((ct,qi)=>{W(Oa,ct),W(Aa,qi),Ia.disabled=!e(on)},[()=>(e(X),x(()=>e(X)("request.splitLongText"))),()=>(e(X),x(()=>e(X)("request.charactersPerChunk")))]),Dp(St,()=>e(on),ct=>y(on,ct)),Ta(Ia,()=>e(Bi),ct=>y(Bi,ct)),J(bt,Tt)},V_=La(()=>(e(R),e(u),x(()=>["tts","clon"].includes(e(R).task)&&e(R).family!=="moss_ttsd"&&!e(u).chunking)));ve(Po,bt=>{e(V_)&&bt(wu)})}var ku=q(Po,2);{var Yf=bt=>{{let Tt=Lt(()=>e(Ae)||e(Le)),Mt=Lt(()=>(e(he),e(R),x(()=>e(he)?.ui_management===!0&&!Hi(e(R)))));$7(bt,{get modelId(){return e(R),x(()=>e(R).id)},get seed(){return e(qe)},get busy(){return e(Tt)},get adapterEditable(){return e(Mt)},onBrowseAdapter:St=>Ts(e(_i),St),get paramSpecs(){return e(ut)},ensureLoaded:Pr,requestOptions:Qs,resolveRequestSeed:qa,setParameterValue:Vs,log:li,get tr(){return e(X)},get text(){return e(ye)},set text(St){y(ye,St)},get lyrics(){return e(ze)},set lyrics(St){y(ze,St)},get language(){return e(ue)},set language(St){y(ue,St)},get duration(){return e(Fe)},set duration(St){y(Fe,St)},get rewritingCaption(){return e(Ge)},set rewritingCaption(St){y(Ge,St)},get advancedValues(){return e(Ye)},set advancedValues(St){y(Ye,St)},get outputText(){return e(At)},set outputText(St){y(At,St)},get outputJson(){return e(It)},set outputJson(St){y(It,St)},get status(){return e(ne)},set status(St){y(ne,St)},get warningStatus(){return e(Xe)},set warningStatus(St){y(Xe,St)},get errorStatus(){return e(de)},set errorStatus(St){y(de,St)},$$legacy:!0})}},H_=bt=>{var Tt=ys(),Mt=ht(Tt);{let St=Lt(()=>e(Ae)||e(Le)||!e(o)),Oa=Lt(()=>(e(R),e(Te),K(Bc),x(()=>e(R).family==="yue2"&&Hi(e(R))?async()=>{y(Te,await Bc())}:$n))),ja=Lt(()=>e(Jn)==="source"),Sa=Lt(()=>(e(Wa),e(Et),x(()=>!!e(Wa)||e(Et))));gd(Mt,()=>e(h),(Aa,Ia)=>{Ia(Aa,{get task(){return e(R),x(()=>e(R).task)},get busy(){return e(St)},get paramSpecs(){return e(ut)},get advancedValues(){return e(Ye)},get catalogEntries(){return e(un)},get loadedModels(){return e(Te)},get server(){return e(he)},get modelId(){return e(R),x(()=>e(R).id)},setPanelRunner:jB,modelPathFor:xs,sessionOptionsFor:Fo,loadOptionsFor:ao,loadTargetFor:tc,get refreshModels(){return e(Oa)},log:li,get tr(){return e(X)},localizedParameterText:br,setParameterValue:Vs,get sourceFile(){return e(Ne)},get savedVoices(){return e(Qi)},clearSource:rt,get sourceRecording(){return e(ja)},get sourceRecordingBlocked(){return e(Sa)},setSourceFile:ct=>y(Ne,ct),startSourceRecording:()=>M_("source"),stopSourceRecording:z_,get lyrics(){return e(ze)},set lyrics(ct){y(ze,ct)},get seed(){return e(qe)},set seed(ct){y(qe,ct)},get loraUploading(){return e(nt)},set loraUploading(ct){y(nt,ct)},$$legacy:!0})})}J(bt,Tt)},W_=bt=>{var Tt=jM(),Mt=ht(Tt),St=k(Mt),Oa=q(St),ja=k(Oa,!0);w(Oa),w(Mt);var Sa=q(Mt,2);rn(Sa),ie((Aa,Ia)=>{W(St,`${Aa??""} `),W(ja,Ia),Sa.required=e(U),_e(Sa,"aria-required",e(U))},[()=>(e(X),x(()=>e(X)("request.lyrics"))),()=>(e(U),e(X),x(()=>e(U)?e(X)("voice.required"):e(X)("request.optional")))]),Ta(Sa,()=>e(ze),Aa=>y(ze,Aa)),J(bt,Tt)};ve(ku,bt=>{e(R),x(()=>e(R).family==="ace_step")?bt(Yf):e(h)?bt(H_,1):(e(R),x(()=>e(R).task==="gen")&&bt(W_,2))})}var Jf=q(ku,2);{var bl=bt=>{var Tt=NM(),Mt=ht(Tt),St=k(Mt);Ko(St,{size:17});var Oa=q(St),ja=q(Oa),Sa=k(ja,!0);w(ja),w(Mt);var Aa=q(Mt,2);rn(Aa),ie((Ia,ct)=>{W(Oa,`${Ia??""} `),W(Sa,ct)},[()=>(e(X),x(()=>e(X)("request.context"))),()=>(e(X),x(()=>e(X)("request.contextHint")))]),Ta(Aa,()=>e(Se),Ia=>y(Se,Ia)),J(bt,Tt)},Q_=La(()=>(e(R),x(()=>e(R).task==="asr"&&!["samsone","audio_flamingo","index_echo"].includes(e(R).family))));ve(Jf,bt=>{e(Q_)&&bt(bl)})}var yl=q(Jf,2);{var Jc=bt=>{var Tt=OM(),Mt=ht(Tt),St=k(Mt);Ad(St,{size:17});var Oa=q(St,1,!0);w(Mt);var ja=q(Mt,2);rn(ja),ie((Sa,Aa)=>{W(Oa,Sa),_e(ja,"placeholder",Aa)},[()=>(e(X),x(()=>e(X)("request.voiceDescription"))),()=>(e(X),x(()=>e(X)("request.voiceDescriptionPlaceholder")))]),Ta(ja,()=>e($e),Sa=>y($e,Sa)),J(bt,Tt)};ve(yl,bt=>{e(R),x(()=>e(R).task==="vdes")&&bt(Jc)})}var lc=q(yl,2),Xf=k(lc);{var K_=bt=>{var Tt=VM(),Mt=k(Tt),St=k(Mt),Oa=q(St);{var ja=Da=>{var ti=ru(),Ji=k(ti,!0);w(ti),ie(ci=>W(Ji,ci),[()=>(e(X),x(()=>e(X)("request.autoLanguage")))]),J(Da,ti)};ve(Oa,Da=>{e(R),x(()=>!$o[e(R).family])&&Da(ja)})}w(Mt);var Sa=q(Mt,2);{var Aa=Da=>{var ti=IM();Pt(ti),Ta(ti,()=>e(be),Ji=>y(be,Ji)),J(Da,ti)},Ia=La(()=>(e(R),x(()=>["moss_ttsd","moss_voicegen"].includes(e(R).family)))),ct=Da=>{var ti=DM();Ct(ti,5,()=>(e(R),x(()=>$o[e(R).family])),Kt,(Ji,ci)=>{var hi=su(),nn=k(hi,!0);w(hi);var gn={};ie(()=>{W(nn,e(ci)),gn!==(gn=e(ci))&&(hi.value=(hi.__value=e(ci))??"")}),J(Ji,hi)}),w(ti),dr(ti,()=>e(ue),Ji=>y(ue,Ji)),J(Da,ti)},qi=Da=>{var ti=LM();Pt(ti),Ta(ti,()=>e(ue),Ji=>y(ue,Ji)),J(Da,ti)};ve(Sa,Da=>{e(Ia)?Da(Aa):(e(R),x(()=>$o[e(R).family])?Da(ct,1):Da(qi,-1))})}w(Tt),ie(Da=>W(St,`${Da??""} `),[()=>(e(X),x(()=>e(X)("request.language")))]),J(bt,Tt)},qP=La(()=>(e(R),e(u),x(()=>["tts","clon","asr","gen","s2s","align","vdes"].includes(e(R).task)&&!e(u).language&&!["apollo","universr","moss_transcribe_diarize","builtin_audio_utils","sam_audio","samsone","gigaam_asr","maya1","owsm","owsm_ctc","index_echo","audio_flamingo","kugelaudio","reuse","sidon","hviske_asr_v6","voxtral_tts"].includes(e(R).family))));ve(Xf,bt=>{e(qP)&&bt(K_)})}var Mx=q(Xf,2);{var CP=bt=>{var Tt=HM(),Mt=k(Tt),St=k(Mt),Oa=q(St),ja=k(Oa,!0);w(Oa),w(Mt);var Sa=q(Mt,2);Pt(Sa),w(Tt),ie((Aa,Ia)=>{W(St,`${Aa??""} `),W(ja,Ia)},[()=>(e(X),x(()=>e(X)("request.seed"))),()=>(e(X),x(()=>e(X)("request.randomSeed")))]),Ta(Sa,()=>e(qe),Aa=>y(qe,Aa)),J(bt,Tt)},AP=La(()=>(e(R),e(u),x(()=>["tts","clon","gen","s2s","vdes"].includes(e(R).task)&&!e(u).seed&&!["apollo","builtin_audio_utils","reuse","sidon"].includes(e(R).family))));ve(Mx,bt=>{e(AP)&&bt(CP)})}var zx=q(Mx,2);{var GP=bt=>{var Tt=KM(),Mt=k(Tt),St=k(Mt,!0);w(Mt);var Oa=q(Mt,2);{var ja=Aa=>{var Ia=WM();Pt(Ia),ie(()=>{_e(Ia,"min",(e(R),x(()=>e(R).family==="canary_asr"?0:1))),_e(Ia,"max",(e(R),x(()=>e(R).family==="canary_asr"?1015:e(R).family==="cohere_asr"?1014:void 0)))}),Ta(Ia,()=>e(st),ct=>y(st,ct)),J(Aa,Ia)},Sa=Aa=>{var Ia=QM();Pt(Ia),Ta(Ia,()=>e(it),ct=>y(it,ct)),J(Aa,Ia)};ve(Oa,Aa=>{e(R),x(()=>e(R).family in Rr)?Aa(ja):Aa(Sa,-1)})}w(Tt),ie(Aa=>W(St,Aa),[()=>(e(X),x(()=>e(X)("request.maxTokens")))]),J(bt,Tt)},FP=La(()=>(e(R),x(()=>pa(e(R))&&!["kugelaudio","crisperwhisper","audio_flamingo","owsm","hviske_asr_v6","voxtral_tts"].includes(e(R).family))));ve(zx,bt=>{e(FP)&&bt(GP)})}var MP=q(zx,2);{var zP=bt=>{var Tt=YM(),Mt=k(Tt),St=k(Mt,!0),Oa=q(St);{var ja=ct=>{var qi=ru(),Da=k(qi,!0);w(qi),ie(ti=>W(Da,ti),[()=>(e(X),x(()=>e(X)("request.autoDuration")))]),J(ct,qi)};ve(Oa,ct=>{e(T)&&ct(ja)})}w(Mt);var Sa=q(Mt,2);Pt(Sa);var Aa=q(Sa,2);{var Ia=ct=>{var qi=G2(),Da=k(qi,!0);w(qi),ie(ti=>W(Da,ti),[()=>(e(X),e(Ye),x(()=>e(X)("request.minimaxFrames",{frames:Number(e(Ye).num_frames||0)})))]),J(ct,qi)};ve(Aa,ct=>{e(R),x(()=>e(R).family==="minimax_h3")&&ct(Ia)})}w(Tt),ie(ct=>{W(St,ct),_e(Sa,"min",e(T)?-1:1),bi(Sa,e(Fe))},[()=>(e(X),x(()=>e(X)("request.duration")))]),re("input",Sa,ct=>eo(ct.currentTarget.valueAsNumber)),J(bt,Tt)};ve(MP,bt=>{e(R),e(u),x(()=>e(R).task==="gen"&&!e(u).duration)&&bt(zP)})}w(lc);var Ex=q(lc,2);{var EP=bt=>{var Tt=az(),Mt=k(Tt),St=k(Mt);sf(St,{size:17});var Oa=q(St),ja=q(Oa),Sa=k(ja,!0);w(ja),w(Mt);var Aa=q(Mt,2);Ci(Aa,Ua=>y(tt,Ua),()=>e(tt));var Ia=q(Aa,2),ct=k(Ia);zc(ct,{size:16});var qi=q(ct),Da=k(qi,!0);w(qi);var ti=q(qi),Ji=k(ti,!0);w(ti),w(Ia);var ci=q(Ia,2),hi=k(ci);{var nn=Ua=>{var Ga=JM(),Qt=ht(Ga),ia=k(Qt);Uc(ia,{size:14});var Fa=q(ia,1,!0);w(Qt);var di=q(Qt,2),sn=k(di,!0);w(di),ie((Rn,hs)=>{W(Fa,Rn),W(sn,hs)},[()=>(e(X),x(()=>e(X)("request.stopRecording"))),()=>(e(X),x(()=>e(X)("request.recordingMicrophone")))]),re("click",Qt,z_),J(Ua,Ga)},gn=Ua=>{var Ga=XM(),Qt=ht(Ga),ia=k(Qt);ym(ia,{size:14});var Fa=q(ia,1,!0);w(Qt);var di=q(Qt,2),sn=k(di);ho(sn,{size:15}),w(di);var Rn=q(di,2);{var hs=Bn=>{var Cn=ru(),An=k(Cn,!0);w(Cn),ie(()=>W(An,(e(Ne),x(()=>e(Ne).name)))),J(Bn,Cn)};ve(Rn,Bn=>{e(Ne)&&Bn(hs)})}ie((Bn,Cn,An,jo)=>{Qt.disabled=Bn,W(Fa,Cn),di.disabled=!e(Ne),_e(di,"title",An),_e(di,"aria-label",jo)},[()=>(e(Wa),e(Et),x(()=>!!e(Wa)||e(Et))),()=>(e(X),x(()=>e(X)("request.recordMicrophone"))),()=>(e(X),x(()=>e(X)("file.clear"))),()=>(e(X),x(()=>e(X)("file.clear")))]),re("click",Qt,()=>M_("source")),re("click",di,rt),J(Ua,Ga)};ve(hi,Ua=>{e(Jn)==="source"?Ua(nn):Ua(gn,-1)})}w(ci);var Ni=q(ci,2);{let Ua=Lt(()=>(e(X),x(()=>e(X)("file.preview"))));rs(Ni,{get file(){return e(Ne)},kind:"audio",get label(){return e(Ua)}})}var Mi=q(Ni,2);{var wn=Ua=>{var Ga=tz(),Qt=k(Ga),ia=k(Qt),Fa=k(ia,!0);w(ia);var di=q(ia,2),sn=k(di,!0);w(di),w(Qt);var Rn=q(Qt,2);{var hs=Cn=>{var An=ZM(),jo=k(An,!0);w(An),ie(cc=>W(jo,cc),[()=>(e(X),x(()=>e(X)("request.stopLive")))]),re("click",An,rx),J(Cn,An)},Bn=Cn=>{var An=ez(),jo=k(An,!0);w(An),ie((cc,Zf)=>{An.disabled=cc,W(jo,Zf)},[()=>(e(Ae),e(Wa),x(()=>e(Ae)||!!e(Wa))),()=>(e(X),x(()=>e(X)("request.startLive")))]),re("click",An,PB),J(Cn,An)};ve(Rn,Cn=>{e(Et)?Cn(hs):Cn(Bn,-1)})}w(Ga),ie((Cn,An)=>{W(Fa,Cn),W(sn,An)},[()=>(e(X),x(()=>e(X)("request.liveTitle"))),()=>(e(X),x(()=>e(X)("request.liveDescription")))]),J(Ua,Ga)};ve(Mi,Ua=>{e(z)&&Ua(wn)})}w(Tt),ie((Ua,Ga,Qt,ia)=>{W(Oa,`${Ua??""} `),W(Sa,Ga),W(Da,Qt),W(Ji,ia)},[()=>(e(X),x(()=>e(X)("request.sourceAudio"))),()=>(e(P),e(X),x(()=>e(P)?"":`(${e(X)("request.optional")})`)),()=>(e(X),x(()=>e(X)("file.choose"))),()=>(e(Ne),e(X),x(()=>e(Ne)?.name||e(X)("file.none")))]),re("change",Aa,Ua=>y(Ne,Ua.currentTarget.files?.[0]||null)),J(bt,Tt)};ve(Ex,bt=>{e(B),e(R),x(()=>e(B)&&e(R).family!=="liveavatar")&&bt(EP)})}var Ux=q(Ex,2);{var UP=bt=>{var Tt=iz(),Mt=k(Tt),St=k(Mt);sT(St,{size:17});var Oa=q(St,2),ja=k(Oa,!0);w(Oa),w(Mt);var Sa=q(Mt,2);Ci(Sa,Ni=>y(Re,Ni),()=>e(Re));var Aa=q(Sa,2),Ia=k(Aa),ct=k(Ia,!0);w(Ia);var qi=q(Ia),Da=k(qi,!0);w(qi),w(Aa);var ti=q(Aa,2),Ji=k(ti),ci=k(Ji,!0);w(Ji);var hi=q(Ji,2);{var nn=Ni=>{var Mi=ru(),wn=k(Mi,!0);w(Mi),ie(()=>W(wn,(e(He),x(()=>e(He).name)))),J(Ni,Mi)};ve(hi,Ni=>{e(He)&&Ni(nn)})}w(ti);var gn=q(ti,2);{let Ni=Lt(()=>(e(X),x(()=>e(X)("file.preview"))));rs(gn,{get file(){return e(He)},kind:"video",get label(){return e(Ni)}})}w(Tt),ie((Ni,Mi,wn,Ua)=>{W(ja,Ni),W(ct,Mi),W(Da,wn),Ji.disabled=!e(He),W(ci,Ua)},[()=>(e(X),x(()=>e(X)("request.optional"))),()=>(e(X),x(()=>e(X)("file.choose"))),()=>(e(He),e(X),x(()=>e(He)?.name||e(X)("file.none"))),()=>(e(X),x(()=>e(X)("file.clear")))]),re("change",Sa,Ni=>y(He,Ni.currentTarget.files?.[0]||null)),re("click",Ji,dt),J(bt,Tt)};ve(Ux,bt=>{e(C)&&bt(UP)})}var Rx=q(Ux,2);{var RP=bt=>{var Tt=uz(),Mt=k(Tt),St=k(Mt);lf(St,{size:17});var Oa=q(St,1,!0);w(Mt);var ja=q(Mt,2);{let ci=Lt(()=>e(Ki)?`saved:${e(Ki)}`:e(pe)?`preset:${e(pe)}`:""),hi=Lt(()=>e(H)?e(oa):[]),nn=Lt(()=>(e(R),e(Qi),x(()=>e(R).family==="kugelaudio"?[]:e(Qi)))),gn=Lt(()=>(e(A),e(R),e(X),e(he),e(D),x(()=>e(A)||e(R).family==="kugelaudio"?e(X)("voice.preset"):e(he)?.ui_management===!1||!e(D)?e(X)("voice.configured"):e(X)("voice.quickStart")))),Ni=Lt(()=>(e(X),x(()=>e(X)("voice.useReference")))),Mi=Lt(()=>(e(R),x(()=>e(R).family!=="kugelaudio")));kb(ja,{id:"quick-start-voice",get value(){return e(ci)},get presets(){return e(hi)},get savedVoices(){return e(nn)},get presetLabel(){return e(gn)},get emptyLabel(){return e(Ni)},get allowEmpty(){return e(Mi)},get tr(){return e(X)},onselect:RB})}var Sa=q(ja,2);{var Aa=ci=>{var hi=ys(),nn=ht(hi);{var gn=Ni=>{var Mi=F2(),wn=ht(Mi);{var Ua=ia=>{var Fa=nz(),di=k(Fa,!0);w(Fa),ie(sn=>W(di,sn),[()=>(e(X),x(()=>e(X)("voice.bundledNote")))]),J(ia,Fa)};ve(wn,ia=>{e(A),e(R),x(()=>!e(A)&&e(R).family!=="kugelaudio")&&ia(Ua)})}var Ga=q(wn,2);{var Qt=ia=>{{let Fa=Lt(()=>(e(X),x(()=>e(X)("file.preview"))));rs(ia,{get src(){return e(V)},get name(){return e(pe)},kind:"audio",get label(){return e(Fa)}})}};ve(Ga,ia=>{e(V)&&ia(Qt)})}J(Ni,Mi)};ve(nn,Ni=>{e(pe)&&Ni(gn)})}J(ci,hi)};ve(Sa,ci=>{e(H),e(oa),x(()=>e(H)&&e(oa).length)&&ci(Aa)})}var Ia=q(Sa,2);{var ct=ci=>{var hi=rz(),nn=k(hi),gn=k(nn),Ni=k(gn),Mi=q(Ni),wn=k(Mi,!0);w(Mi),w(gn);var Ua=q(gn,2);Ci(Ua,Bn=>y(Ve,Bn),()=>e(Ve));var Ga=q(Ua,2),Qt=k(Ga);zc(Qt,{size:16});var ia=q(Qt),Fa=k(ia,!0);w(ia);var di=q(ia),sn=k(di,!0);w(di),w(Ga),w(nn);var Rn=q(nn,2);{var hs=Bn=>{var Cn=sz(),An=k(Cn),jo=k(An);Rt(),w(An);var cc=q(An,2);Ci(cc,Su=>y(et,Su),()=>e(et));var Zf=q(cc,2),Wx=k(Zf);Ko(Wx,{size:16});var J_=q(Wx),VP=k(J_,!0);w(J_);var Qx=q(J_),HP=k(Qx,!0);w(Qx),w(Zf),w(Cn),ie((Su,WP,QP)=>{W(jo,`${Su??""} `),W(VP,WP),W(HP,QP)},[()=>(e(X),x(()=>e(X)("voice.referenceText"))),()=>(e(X),x(()=>e(X)("file.choose"))),()=>(e(mt),e(X),x(()=>e(mt)?.name||e(X)("file.none")))]),re("change",cc,Su=>aa(Su.currentTarget.files?.[0]||null)),J(Bn,Cn)};ve(Rn,Bn=>{e(R),x(()=>e(R).family!=="auk")&&Bn(hs)})}w(hi),ie((Bn,Cn,An,jo)=>{W(Ni,`${Bn??""} `),W(wn,Cn),W(Fa,An),W(sn,jo)},[()=>(e(X),x(()=>e(X)("voice.reference"))),()=>(e(E),e(X),x(()=>e(E)?e(X)("voice.required"):e(X)("voice.optional"))),()=>(e(X),x(()=>e(X)("file.choose"))),()=>(e(Be),e(X),x(()=>e(Be)?.name||e(X)("file.none")))]),re("change",Ua,Bn=>Me(Bn.currentTarget.files?.[0]||null)),J(ci,hi)};ve(Ia,ci=>{(!e(A)||!e(pe))&&ci(ct)})}var qi=q(Ia,2);{var Da=ci=>{var hi=cz(),nn=k(hi);{var gn=Mi=>{var wn=oz(),Ua=ht(wn),Ga=k(Ua,!0);w(Ua);var Qt=q(Ua,2),ia=k(Qt,!0);w(Qt),ie((Fa,di)=>{W(Ga,Fa),W(ia,di)},[()=>(e(X),x(()=>e(X)("request.stopRecording"))),()=>(e(X),x(()=>e(X)("voice.recording")))]),re("click",Ua,z_),J(Mi,wn)},Ni=Mi=>{var wn=lz(),Ua=ht(wn),Ga=k(Ua);ym(Ga,{size:14});var Qt=q(Ga,1,!0);w(Ua);var ia=q(Ua,2),Fa=k(ia,!0);w(ia);var di=q(ia,2);{var sn=Rn=>{var hs=ru(),Bn=k(hs,!0);w(hs),ie(()=>W(Bn,(e(Be),x(()=>e(Be).name)))),J(Rn,hs)};ve(di,Rn=>{e(Be)&&Rn(sn)})}ie((Rn,hs,Bn,Cn)=>{Ua.disabled=Rn,W(Qt,hs),ia.disabled=Bn,W(Fa,Cn)},[()=>(e(Wa),e(Et),x(()=>!!e(Wa)||e(Et))),()=>(e(X),x(()=>e(X)("request.recordMicrophone"))),()=>(e(pe),e(Ki),e(Be),e(mt),e(Ie),x(()=>!e(pe)&&!e(Ki)&&!e(Be)&&!e(mt)&&!e(Ie).trim())),()=>(e(X),x(()=>e(X)("voice.clearReference")))]),re("click",Ua,()=>M_("voice")),re("click",ia,Pe),J(Mi,wn)};ve(nn,Mi=>{e(Jn)==="voice"?Mi(gn):Mi(Ni,-1)})}w(hi),J(ci,hi)};ve(qi,ci=>{(!e(A)||!e(pe))&&ci(Da)})}var ti=q(qi,2);{var Ji=ci=>{var hi=F2(),nn=ht(hi);{let Mi=Lt(()=>(e(X),x(()=>e(X)("file.preview"))));rs(nn,{get file(){return e(Be)},kind:"audio",get label(){return e(Mi)}})}var gn=q(nn,2);{var Ni=Mi=>{var wn=dz(),Ua=ht(wn),Ga=k(Ua),Qt=q(Ga),ia=k(Qt,!0);w(Qt),w(Ua);var Fa=q(Ua,2);rn(Fa),ie((di,sn,Rn)=>{W(Ga,`${di??""} `),W(ia,sn),_e(Fa,"placeholder",Rn)},[()=>(e(X),x(()=>e(X)("voice.transcript"))),()=>(e(O),e(X),x(()=>e(O)?e(X)("voice.requiredClone"):e(X)("voice.recommendedClone"))),()=>(e(X),x(()=>e(X)("voice.transcriptPlaceholder")))]),Ta(Fa,()=>e(Ie),di=>y(Ie,di)),J(Mi,wn)};ve(gn,Mi=>{e(R),x(()=>e(R).family!=="auk")&&Mi(Ni)})}J(ci,hi)};ve(ti,ci=>{(!e(A)||!e(pe))&&ci(Ji)})}w(Tt),ie((ci,hi)=>{_e(Tt,"aria-label",ci),W(Oa,hi)},[()=>(e(X),x(()=>e(X)("voice.reference"))),()=>(e(X),x(()=>e(X)("voice.reference")))]),J(bt,Tt)};ve(Rx,bt=>{e(j),e(R),e(G),e(u),x(()=>(e(j)||e(R).family==="kugelaudio")&&!e(G)&&!e(u).voice)&&bt(RP)})}var Bx=q(Rx,2);{var BP=bt=>{var Tt=mz(),Mt=k(Tt),St=k(Mt);jl(St,{size:17});var Oa=q(St),ja=q(Oa),Sa=k(ja,!0);w(ja),w(Mt);var Aa=q(Mt,2);Ct(Aa,4,()=>[0,1,2,3],Kt,(qi,Da)=>{var ti=fz(),Ji=k(ti),ci=k(Ji,!0);w(Ji);var hi=q(Ji,2);Ci(hi,(Fa,di)=>Bt(_t,e(_t)[di]=Fa),Fa=>e(_t)?.[Fa],()=>[Da]);var nn=q(hi,2),gn=k(nn),Ni=k(gn,!0);w(gn);var Mi=q(gn,2),wn=k(Mi,!0);w(Mi),w(nn);var Ua=q(nn,2),Ga=k(Ua),Qt=k(Ga,!0);w(Ga),w(Ua);var ia=q(Ua,2);{let Fa=Lt(()=>(e(X),x(()=>e(X)("file.preview"))));rs(ia,{get file(){return e(Ue),x(()=>e(Ue)[Da])},kind:"audio",get label(){return e(Fa)}})}w(ti),ie((Fa,di,sn,Rn)=>{_e(Ji,"for","vibevoice-speaker-"+Da),W(ci,Fa),_e(hi,"id","vibevoice-speaker-"+Da),_e(nn,"for","vibevoice-speaker-"+Da),W(Ni,di),W(wn,sn),Ga.disabled=(e(Ue),x(()=>!e(Ue)[Da])),W(Qt,Rn)},[()=>(e(X),x(()=>e(X)("voice.speaker",{number:Da+1}))),()=>(e(X),x(()=>e(X)("file.choose"))),()=>(e(Ue),e(X),x(()=>e(Ue)[Da]?.name||e(X)("file.none"))),()=>(e(X),x(()=>e(X)("file.clear")))]),re("change",hi,Fa=>lt(Da,Fa.currentTarget.files?.[0]||null)),re("click",Ga,()=>Qe(Da)),J(qi,ti)}),w(Aa);var Ia=q(Aa,2);{var ct=qi=>{var Da=pz(),ti=ht(Da),Ji=k(ti,!0);w(ti);var ci=q(ti,2);rn(ci),ie((hi,nn)=>{W(Ji,hi),_e(ci,"placeholder",nn)},[()=>(e(X),x(()=>e(X)("voice.transcript"))),()=>(e(X),x(()=>e(X)("voice.dialoguePlaceholder")))]),Ta(ci,()=>e(Ie),hi=>y(Ie,hi)),J(qi,Da)};ve(Ia,qi=>{e(R),x(()=>e(R).family==="moss_ttsd")&&qi(ct)})}w(Tt),ie((qi,Da)=>{W(Oa,`${qi??""} `),W(Sa,Da)},[()=>(e(X),x(()=>e(X)("voice.speakerReferences"))),()=>(e(X),x(()=>e(X)("voice.upToFour")))]),J(bt,Tt)};ve(Bx,bt=>{e(G)&&bt(BP)})}var Px=q(Bx,2);{var PP=bt=>{{let Tt=Lt(()=>(e(he),e(R),x(()=>e(he)?.ui_management===!0&&!Hi(e(R))))),Mt=Lt(()=>e(Ae)||e(Le));mq(bt,{get specs(){return e(m)},get values(){return e(Ye)},get editable(){return e(Tt)},get busy(){return e(Mt)},onChange:Vs,onBrowse:St=>Ts(e(_i),St)})}};ve(Px,bt=>{e(m),x(()=>e(m).length)&&bt(PP)})}var jx=q(Px,2);{var jP=bt=>{var Tt=yz(),Mt=k(Tt),St=k(Mt);sb(St,{size:16});var Oa=q(St),ja=q(Oa),Sa=k(ja,!0);w(ja),w(Mt);var Aa=q(Mt,2);Ct(Aa,5,()=>e(p),Kt,(Ia,ct)=>{var qi=bz();let Da;var ti=k(qi),Ji=k(ti,!0);w(ti);var ci=q(ti,2);{var hi=Ga=>{var Qt=gz(),ia=k(Qt);Pt(ia);var Fa=q(ia,3,!0);w(Qt),ie((di,sn)=>{_e(ia,"id",(e(ct),x(()=>"param-"+e(ct).name))),zl(ia,di),W(Fa,sn)},[()=>(e(Ye),e(ct),x(()=>!!e(Ye)[e(ct).name])),()=>(e(Ye),e(ct),e(X),x(()=>e(Ye)[e(ct).name]?e(X)("common.enabled"):e(X)("common.disabled")))]),re("change",ia,di=>Vs(e(ct),di.currentTarget.checked)),J(Ga,Qt)},nn=Ga=>{var Qt=hz();Ct(Qt,5,()=>(e(ct),x(()=>e(ct).choices||[])),Kt,(Fa,di)=>{var sn=su(),Rn=k(sn,!0);w(sn);var hs={};ie(()=>{W(Rn,e(di)),hs!==(hs=e(di))&&(sn.value=(sn.__value=e(di))??"")}),J(Fa,sn)}),w(Qt);var ia;On(Qt),ie(Fa=>{_e(Qt,"id",(e(ct),x(()=>"param-"+e(ct).name))),ia!==(ia=Fa)&&(Qt.value=(Qt.__value=Fa)??"",xn(Qt,Fa))},[()=>(e(Ye),e(ct),x(()=>String(e(Ye)[e(ct).name]??"")))]),re("change",Qt,Fa=>Vs(e(ct),Fa.currentTarget.value)),J(Ga,Qt)},gn=Ga=>{var Qt=_z(),ia=k(Qt);Pt(ia);var Fa=q(ia,2),di=k(Fa,!0);w(Fa),w(Qt),ie((sn,Rn)=>{_e(ia,"id",(e(ct),x(()=>"param-"+e(ct).name))),_e(ia,"min",(e(ct),x(()=>e(ct).minimum))),_e(ia,"max",(e(ct),x(()=>e(ct).maximum))),_e(ia,"step",(e(ct),x(()=>e(ct).step))),bi(ia,sn),W(di,Rn)},[()=>(e(Ye),e(ct),x(()=>Number(e(Ye)[e(ct).name]??e(ct).default))),()=>(e(Ye),e(ct),x(()=>String(e(Ye)[e(ct).name])))]),re("input",ia,sn=>Vs(e(ct),sn.currentTarget.valueAsNumber)),J(Ga,Qt)},Ni=Ga=>{var Qt=vz();Pt(Qt),ie((ia,Fa)=>{_e(Qt,"id",(e(ct),x(()=>"param-"+e(ct).name))),_e(Qt,"type",(e(ct),x(()=>e(ct).type==="number"?"number":"text"))),_e(Qt,"min",(e(ct),x(()=>e(ct).minimum))),_e(Qt,"max",(e(ct),x(()=>e(ct).maximum))),_e(Qt,"step",(e(ct),x(()=>e(ct).step))),bi(Qt,ia),_e(Qt,"placeholder",Fa)},[()=>(e(Ye),e(ct),x(()=>String(e(Ye)[e(ct).name]??""))),()=>(e(ct),e(X),x(()=>br(e(ct),"placeholder",e(X))))]),re("input",Qt,ia=>Vs(e(ct),e(ct).type!=="number"?ia.currentTarget.value:ia.currentTarget.value===""?"":ia.currentTarget.valueAsNumber)),J(Ga,Qt)};ve(ci,Ga=>{e(ct),x(()=>e(ct).type==="bool")?Ga(hi):(e(ct),x(()=>e(ct).type==="choice")?Ga(nn,1):(e(ct),x(()=>e(ct).type==="slider")?Ga(gn,2):Ga(Ni,-1)))})}var Mi=q(ci,2);{var wn=Ga=>{var Qt=G2(),ia=k(Qt,!0);w(Qt),ie(Fa=>W(ia,Fa),[()=>(e(ct),e(X),x(()=>br(e(ct),"info",e(X))))]),J(Ga,Qt)},Ua=La(()=>(e(ct),e(X),x(()=>br(e(ct),"info",e(X)))));ve(Mi,Ga=>{e(Ua)&&Ga(wn)})}w(qi),ie(Ga=>{Da=va(qi,1,"",null,Da,{wide:e(ct).type==="text"}),_e(ti,"for",(e(ct),x(()=>"param-"+e(ct).name))),W(Ji,Ga)},[()=>(e(ct),e(X),x(()=>br(e(ct),"label",e(X))))]),J(Ia,qi)}),w(Aa),w(Tt),ie(Ia=>{W(Oa,`${Ia??""} `),W(Sa,(e(p),x(()=>e(p).length)))},[()=>(e(X),x(()=>e(X)("options.modelParameters")))]),J(bt,Tt)};ve(jx,bt=>{e(p),e(u),x(()=>e(p).length&&!e(u).params)&&bt(jP)})}var Nx=q(jx,2);{var NP=bt=>{var Tt=wz(),Mt=k(Tt),St=k(Mt);Zv(St,{size:16});var Oa=q(St);Rt(),w(Mt);var ja=q(Mt,2);rn(ja),w(Tt),ie(Sa=>W(Oa,`${Sa??""} `),[()=>(e(X),x(()=>e(X)("options.additional")))]),Ta(ja,()=>e(wt),Sa=>y(wt,Sa)),J(bt,Tt)};ve(Nx,bt=>{e(u),x(()=>!e(u).advancedJson)&&bt(NP)})}var Ox=q(Nx,2),Xc=k(Ox),Ix=k(Xc);Ec(Ix,{size:15});var Dx=q(Ix),OP=k(Dx,!0);w(Dx),Rt(2),w(Xc);var xu=q(Xc,2),Lx=k(xu);Uc(Lx,{size:14});var IP=q(Lx,1,!0);w(xu);var Y_=q(xu,2);let Vx;var Hx=k(Y_);{var DP=bt=>{var Tt=kz(),Mt=k(Tt);w(Tt),ie((St,Oa)=>{_e(Tt,"aria-label",St),W(Mt,`${Oa??""} s ·`)},[()=>(e(X),x(()=>e(X)("run.elapsed"))),()=>(e(ta),x(()=>e(ta).toFixed(1)))]),J(bt,Tt)};ve(Hx,bt=>{e(Ae)&&bt(DP)})}var LP=q(Hx);w(Y_),w(Ox),ie((bt,Tt,Mt,St,Oa,ja)=>{W(ji,bt),W(Ui,Tt),W(Ln,(e(R),x(()=>e(R)?.task))),Xc.disabled=!e(ge)||e(Ae)||e(Ge)||e(Ma)||e(b)||!e(d)&&(e(je)===!1||!e(o)),_e(Xc,"title",Mt),W(OP,St),xu.disabled=!e(Ae),W(IP,Oa),Vx=va(Y_,1,"status",null,Vx,{busy:e(Ae),warning:!e(Ae)&&e(ne)===e(Xe),error:!e(Ae)&&e(ne)===e(de)}),W(LP,` ${ja??""}`)},[()=>(e(X),x(()=>e(X)("request.label"))),()=>(e(X),x(()=>e(X)("request.title"))),()=>(e(ge),e(X),e(d),e(je),x(()=>e(ge)?!e(d)&&e(je)===!1?e(X)("run.installModel"):"":e(X)("run.chooseModel"))),()=>(e(Ae),e(X),x(()=>e(Ae)?e(X)("run.working"):e(X)("run.run"))),()=>(e(X),x(()=>e(X)("run.cancel"))),()=>(e(ne),e(X),x(()=>gi(e(ne),e(X))))]),re("change",pi,bt=>UB(bt.currentTarget.files?.[0]||null)),re("click",Xc,ox),re("click",xu,IB),J(Jt,qt)},D_=Jt=>{var qt=Sz(),_a=ht(qt),Wt=k(_a),ga=k(Wt),ji=k(ga,!0);w(ga);var wi=q(ga),Ui=k(wi,!0);w(wi),w(Wt),w(_a);var Ri=q(_a,2),Di=k(Ri),Ln=k(Di,!0);w(Di),w(Ri),ie((gs,es,pi)=>{W(ji,gs),W(Ui,es),W(Ln,pi)},[()=>(e(X),x(()=>e(X)("request.label"))),()=>(e(X),x(()=>e(X)("studio.noModel"))),()=>(e(X),x(()=>e(X)("studio.chooseInstalled")))]),J(Jt,qt)};ve(vu,Jt=>{e(ge)?Jt(I_):Jt(D_,-1)})}w(oc);var Kf=q(oc,2),bu=k(Kf),yu=k(bu),L_=k(yu),gP=k(L_,!0);w(L_);var Tx=q(L_),hP=k(Tx,!0);w(Tx),w(yu);var $x=q(yu,2);{var _P=Jt=>{var qt=Tz(),_a=k(qt,!0);w(qt),ie(Wt=>{_e(qt,"href",(e(Ra),x(()=>e(Ra).url))),_e(qt,"download",(e(Ra),x(()=>e(Ra).filename))),W(_a,Wt)},[()=>(e(X),x(()=>e(X)("settings.save")))]),J(Jt,qt)};ve($x,Jt=>{e(Ra)&&Jt(_P)})}var vP=q($x,2);{var bP=Jt=>{var qt=$z(),_a=k(qt);w(qt),ie(Wt=>W(_a,`${e(at),x(()=>e(at).length)??""} ${Wt??""}`),[()=>(e(at),e(X),x(()=>e(at).length===1?e(X)("result.track"):e(X)("result.tracks")))]),J(Jt,qt)};ve(vP,Jt=>{e(at),x(()=>e(at).length)&&Jt(bP)})}w(bu);var qx=q(bu,2);{var yP=Jt=>{var qt=M2();Ct(qt,5,()=>e(at),Kt,(_a,Wt)=>{var ga=qz(),ji=k(ga),wi=k(ji),Ui=k(wi,!0);w(wi);var Ri=q(wi),Di=k(Ri,!0);w(Ri),w(ji);var Ln=q(ji,2);w(ga),ie(gs=>{W(Ui,(e(Wt),x(()=>e(Wt).id))),_e(Ri,"href",(e(Wt),x(()=>e(Wt).url))),_e(Ri,"download",(e(kt),e(ea),e(Wt),x(()=>`${e(kt)}-${e(ea)||"output"}-${e(Wt).id}.wav`))),W(Di,gs),_e(Ln,"src",(e(Wt),x(()=>e(Wt).url)))},[()=>(e(X),x(()=>e(X)("result.saveWav")))]),J(_a,ga)}),w(qt),J(Jt,qt)};ve(qx,Jt=>{e(at),x(()=>e(at).length)&&Jt(yP)})}var Cx=q(qx,2);{var wP=Jt=>{var qt=M2();Ct(qt,5,()=>e(Zt),Kt,(_a,Wt)=>{var ga=Cz(),ji=k(ga),wi=k(ji),Ui=k(wi,!0);w(wi);var Ri=q(wi),Di=k(Ri,!0);w(Ri),w(ji);var Ln=q(ji,2);{var gs=pi=>{{let er=Lt(()=>(e(R),e(Wt),x(()=>`${e(R).id}-${e(Wt).id}.${e(Wt).extension}`))),Yc=Lt(()=>(e(X),x(()=>e(X)("result.videoPreview"))));rs(pi,{get src(){return e(Wt),x(()=>e(Wt).url)},get name(){return e(er)},kind:"video",get label(){return e(Yc)}})}},es=La(()=>(e(Wt),x(()=>e(Wt).mime.startsWith("video/"))));ve(Ln,pi=>{e(es)&&pi(gs)})}w(ga),ie(pi=>{W(Ui,(e(Wt),x(()=>e(Wt).id))),_e(Ri,"href",(e(Wt),x(()=>e(Wt).url))),_e(Ri,"download",(e(kt),e(ea),e(Wt),x(()=>`${e(kt)}-${e(ea)||"output"}-${e(Wt).id}.${e(Wt).extension}`))),W(Di,pi)},[()=>(e(X),e(Wt),x(()=>e(X)("result.saveArtifact",{format:e(Wt).extension.toUpperCase()})))]),J(_a,ga)}),w(qt),J(Jt,qt)};ve(Cx,Jt=>{e(Zt),x(()=>e(Zt).length)&&Jt(wP)})}var Ax=q(Cx,2);{var kP=Jt=>{var qt=Az(),_a=q(k(qt)),Wt=k(_a,!0);w(_a),w(qt),ie(ga=>W(Wt,ga),[()=>(e(X),x(()=>e(X)("result.empty")))]),J(Jt,qt)};ve(Ax,Jt=>{e(at),e(Zt),x(()=>!e(at).length&&!e(Zt).length)&&Jt(kP)})}var Gx=q(Ax,2);{var xP=Jt=>{var qt=Gz();rn(qt),ie(()=>bi(qt,e(At))),J(Jt,qt)};ve(Gx,Jt=>{e(At)&&Jt(xP)})}var Fx=q(Gx,2);{var SP=Jt=>{var qt=Fz(),_a=q(k(qt)),Wt=k(_a,!0);w(_a),w(qt),ie(()=>W(Wt,e(It))),J(Jt,qt)};ve(Fx,Jt=>{e(It)&&Jt(SP)})}var TP=q(Fx,2);{var $P=Jt=>{var qt=Ez(),_a=k(qt),Wt=k(_a),ga=q(Wt),ji=k(ga);w(ga),w(_a);var wi=q(_a,2);{var Ui=es=>{var pi=Mz(),er=k(pi,!0);w(pi),ie(()=>W(er,e(ba))),J(es,pi)};ve(wi,es=>{e(ba)&&es(Ui)})}var Ri=q(wi,2),Di=k(Ri),Ln=k(Di,!0);w(Di),w(Ri);var gs=q(Ri,2);Ct(gs,5,()=>e(na),es=>es.id,(es,pi)=>{var er=zz();let Yc;var Po=k(er),wu=k(Po),V_=k(wu,!0);w(wu);var ku=q(wu,2),Yf=k(ku),H_=q(Yf);{var W_=yl=>{var Jc=Bp();ie(lc=>W(Jc,`· ${lc??""} ${e(pi),x(()=>e(pi).seed)??""}`),[()=>(e(X),x(()=>e(X)("request.seed")))]),J(yl,Jc)},Jf=La(()=>(e(pi),x(()=>["gen","tts","clon","vdes"].includes(e(pi).task))));ve(H_,yl=>{e(Jf)&&yl(W_)})}w(ku),w(Po);var bl=q(Po,2),Q_=k(bl,!0);w(bl),w(er),ie((yl,Jc,lc,Xf,K_)=>{Yc=va(er,1,"",null,Yc,{active:e(ea)===e(pi).id}),_e(Po,"aria-pressed",(e(ea),e(pi),x(()=>e(ea)===e(pi).id))),Po.disabled=e(Ma),W(V_,(e(pi),x(()=>e(pi).label))),W(Yf,`${yl??""} · ${Jc??""}`),_e(bl,"title",lc),bl.disabled=e(Ma),_e(bl,"aria-label",Xf),W(Q_,K_)},[()=>(e(pi),x(()=>new Date(e(pi).createdAt).toLocaleTimeString())),()=>(e(pi),x(()=>ns(e(pi).task))),()=>(e(X),e(pi),x(()=>e(X)("history.deleteRun",{id:e(pi).id}))),()=>(e(X),e(pi),x(()=>e(X)("history.deleteRun",{id:e(pi).id}))),()=>(e(X),x(()=>e(X)("common.delete")))]),re("click",Po,()=>cn(e(pi),!0)),re("click",bl,()=>us(e(pi).id)),J(es,er)}),w(gs),w(qt),ie((es,pi)=>{W(Wt,`${es??""} `),W(ji,`${e(na),x(()=>e(na).length)??""}/${i(),x(()=>i().historyLimit)??""}`),Di.disabled=e(Ma),W(Ln,pi)},[()=>(e(X),x(()=>e(X)("history.title"))),()=>(e(X),x(()=>e(X)("history.clear")))]),re("click",Di,Ys),J(Jt,qt)};ve(TP,Jt=>{e(na),x(()=>e(na).length)&&Jt($P)})}w(Kf),w(Sr),ie((Jt,qt,_a,Wt,ga,ji,wi,Ui,Ri,Di,Ln,gs)=>{_e(se,"aria-label",Jt),W(la,qt),W(Ut,_a),W($s,Wt),fs=va(pn,1,"studio-model-status",null,fs,{ready:e(d)}),W(Js,ga),_e(Tr,"aria-label",ji),W(qn,wi),Yi.disabled=e(L)||e(Ma),W(Xs,Ui),sc=va(Zs,1,"",null,sc,{good:e(je)===!0,bad:e(je)===!1}),W(Bo,Ri),W(_l,Di),W(gP,Ln),W(hP,gs)},[()=>(e(X),x(()=>e(X)("nav.workflows"))),()=>(e(X),x(()=>e(X)("studio.eyebrow"))),()=>(e(ge),e(R),e(X),x(()=>e(ge)?ns(e(R)?.task,e(X),e(R)):e(X)("studio.title"))),()=>(e(X),e(Tn),x(()=>e(X)(`studio.subtitle.${e(Tn)==="conversion"?"vc":e(Tn)==="separation"?"sep":e(Tn)}`))),()=>(e(ge),e(d),e(X),e(je),x(()=>e(ge)?e(d)?e(X)("studio.resident"):e(je)===!1?e(X)("studio.notInstalled"):e(X)("studio.available"):e(X)("studio.chooseInstalled"))),()=>(e(X),x(()=>e(X)("studio.model"))),()=>(e(X),x(()=>e(X)("studio.model"))),()=>(e(X),x(()=>e(X)("studio.noModel"))),()=>(e(ge),e(X),e(je),x(()=>e(ge)?e(je)===!0?e(X)("studio.pathFound"):e(je)===!1?e(X)("studio.pathMissing"):e(X)("studio.pathUnknown"):e(X)("studio.noModel"))),()=>(e(ge),e(X),e(R),x(()=>e(ge)?e(X)("studio.estimatedVram",{value:e(R)?.min_vram_gb||"?"}):e(X)("studio.vram"))),()=>(e(X),x(()=>e(X)("result.label"))),()=>(e(X),x(()=>e(X)("result.title")))]),dr(Yi,()=>e(ge),Jt=>y(ge,Jt)),re("change",Yi,Jt=>xr(Jt.currentTarget.value)),J(I,te)},lP=I=>{Ci(Q7(I,{get activeCatalog(){return e(un)},get loadedModels(){return e(Te)},get savedVoices(){return e(Qi)},get server(){return e(he)},get modelsFolder(){return e(_i)},get maxTokens(){return e(it)},entrySelectable:ma,studioPackageSlots:Pa,packageIsAvailable:ha,packageSessionOptionsMatch:Br,supportsMaxTokens:pa,supportsRequestOption:Ea,requiresRequestOption:Gt,refresh:$n,log:li,get tr(){return e(X)},$$legacy:!0}),te=>y(le,te),()=>e(le))},cP=I=>{{let te=Lt(()=>(e(X),x(()=>yr.map(se=>({id:se.id,label:Zn(se.id,se.filterLabel,e(X))})))));q9(I,{get groups(){return e(Zl)},get packageSizes(){return e(Ft)},get installJobs(){return e(Ht)},get packageSizeState(){return e(Nt)},get modelsFolder(){return e(_i)},get modelsFolderHistory(){return e(wa)},get defaultModelsFolder(){return e(za)},get applyingModelsFolder(){return e(Ce)},get modelsFolderIsDefault(){return e(Je)},openFolderBrowser:Ts,applyModelsFolder:cu,installPackage:LB,removePackage:WB,stopPackageDownload:VB,cleanPartialDownload:HB,formatBytes:Ao,installProgressLabel:Ca,workflowForEntry:Ot,taskLabel:se=>ns(se.task,e(X),se),get workflows(){return e(te)},openModel:(se,ke)=>{ke&&cs(se,ke),xr(se.id),y(Z,"studio")},get modelsFolderInput(){return e(ei)},set modelsFolderInput(se){y(ei,se)},$$legacy:!0})}},dP=I=>{Ci(AM(I,{onchange:async()=>{await Hf(),e(Ki)&&!e(Qi).some(te=>te.id===e(Ki))&&y(Ki,"")},ontext:async te=>{await Hf(),pl("tts"),nx(te.id),y(Z,"studio")},$$legacy:!0}),te=>y(ee,te),()=>e(ee))},uP=I=>{o9(I,{get tr(){return e(X)}})},fP=I=>{var te=Rz(),se=ht(te),ke=k(se),Oe=k(ke,!0);w(ke);var xt=q(ke),la=k(xt,!0);w(xt);var Vt=q(xt),Ut=k(Vt,!0);w(Vt),w(se);var bn=q(se,2),$s=k(bn),pn=k($s),fs=k(pn),Js=k(fs,!0);w(fs);var Sr=q(fs),Tr=k(Sr,!0);w(Sr),w(pn);var qs=q(pn,2),Ja=k(qs),qn=k(Ja,!0);w(Ja);var Yi=q(Ja),ri=k(Yi,!0);w(Yi),w(qs);var Xs=q(qs,2),Cs=k(Xs),ps=k(Cs,!0);w(Cs);var Zs=q(Cs),sc=k(Zs,!0);w(Zs),w(Xs);var Bo=q(Xs,2),hl=k(Bo),_l=k(hl,!0);w(hl);var vl=q(hl),yn=k(vl,!0);w(vl),w(Bo),w($s);var an=q($s,2),As=k(an,!0);w(an);var Wn=q(an,2),ms=k(Wn,!0);w(Wn),w(bn),ie(($r,rc,_u,oc,vu,I_,D_,Kf,bu,yu)=>{W(Oe,$r),W(la,rc),W(Ut,_u),W(Js,oc),W(Tr,(e(he),x(()=>e(he)?.status||"offline"))),W(qn,vu),W(ri,(e(he),x(()=>e(he)?.backend||"—"))),W(ps,I_),W(sc,(e(Te),x(()=>e(Te).length))),W(_l,D_),W(yn,Kf),W(As,bu),W(ms,yu)},[()=>(e(X),x(()=>e(X)("runtime.eyebrow"))),()=>(e(X),x(()=>e(X)("runtime.title"))),()=>(e(X),x(()=>e(X)("runtime.subtitle"))),()=>(e(X),x(()=>e(X)("runtime.status"))),()=>(e(X),x(()=>e(X)("runtime.backend"))),()=>(e(X),x(()=>e(X)("runtime.registered"))),()=>(e(X),x(()=>e(X)("runtime.resident"))),()=>(e(Te),x(()=>e(Te).filter($r=>$r.loaded).length)),()=>(e(X),x(()=>e(X)("runtime.serverLogNotice"))),()=>(e(tn),e(X),x(()=>e(tn).length?e(tn).join(` -`):e(X)("runtime.noEvents")))]),J(I,te)};ve(rP,I=>{e(Z)==="studio"?I(oP):e(Z)==="arena"?I(lP,1):e(Z)==="models"?I(cP,2):e(Z)==="library"?I(dP,3):e(Z)==="configuration"?I(uP,4):e(Z)!=="apps"&&I(fP,5)})}w(O_);var kx=q(O_,2);{var pP=I=>{var te=Oz(),se=k(te),ke=k(se),Oe=k(ke),xt=k(Oe),la=k(xt,!0);w(xt);var Vt=q(xt),Ut=k(Vt,!0);w(Vt),w(Oe);var bn=q(Oe,2),$s=k(bn,!0);w(bn),w(ke);var pn=q(ke,2),fs=k(pn,!0);w(pn);var Js=q(pn,2);{var Sr=yn=>{var an=Bz();Ct(an,5,()=>(e(sa),x(()=>e(sa).roots)),Kt,(As,Wn)=>{var ms=Of(),$r=k(ms,!0);w(ms),ie(()=>W($r,e(Wn))),re("click",ms,()=>Ts(e(Wn),e(ui))),J(As,ms)}),w(an),J(yn,an)};ve(Js,yn=>{e(sa),x(()=>e(sa)?.roots.length)&&yn(Sr)})}var Tr=q(Js,2),qs=k(Tr),Ja=k(qs,!0);w(qs);var qn=q(qs,2),Yi=k(qn,!0);w(qn),w(Tr);var ri=q(Tr,2);{var Xs=yn=>{var an=Pz(),As=k(an,!0);w(an),ie(()=>W(As,e($a))),J(yn,an)},Cs=yn=>{var an=z2(),As=k(an,!0);w(an),ie(Wn=>W(As,Wn),[()=>(e(X),x(()=>e(X)("folder.loadingFolders")))]),J(yn,an)},ps=yn=>{var an=Nz();Ct(an,5,()=>(e(sa),x(()=>e(sa).directories)),Kt,(As,Wn)=>{var ms=jz(),$r=q(k(ms)),rc=k($r,!0);w($r),w(ms),ie(()=>{_e(ms,"title",(e(Wn),x(()=>e(Wn).path))),W(rc,(e(Wn),x(()=>e(Wn).name)))}),re("click",ms,()=>Ts(e(Wn).path,e(ui))),J(As,ms)}),w(an),J(yn,an)},Zs=yn=>{var an=z2(),As=k(an,!0);w(an),ie(Wn=>W(As,Wn),[()=>(e(X),x(()=>e(X)("folder.empty")))]),J(yn,an)};ve(ri,yn=>{e($a)?yn(Xs):e(zt)?yn(Cs,1):(e(sa),x(()=>e(sa)?.directories.length)?yn(ps,2):yn(Zs,-1))})}var sc=q(ri,2),Bo=k(sc),hl=k(Bo,!0);w(Bo);var _l=q(Bo,2),vl=k(_l,!0);w(_l),w(sc),w(se),w(te),ie((yn,an,As,Wn,ms,$r,rc,_u,oc,vu)=>{W(la,yn),W(Ut,an),_e(bn,"aria-label",As),_e(bn,"title",Wn),W($s,ms),W(fs,$r),qs.disabled=(e(sa),e(zt),x(()=>!e(sa)?.parent||e(zt))),W(Ja,rc),qn.disabled=e(zt),W(Yi,_u),W(hl,oc),_l.disabled=!e(sa)||e(zt),W(vl,vu)},[()=>(e(X),x(()=>e(X)("folder.eyebrow"))),()=>(e(ui),e(X),x(()=>e(ui)?"Select LoRA adapter directory":e(X)("folder.title"))),()=>(e(X),x(()=>e(X)("folder.closeLabel"))),()=>(e(X),x(()=>e(X)("common.close"))),()=>(e(X),x(()=>e(X)("common.close"))),()=>(e(sa),e(X),x(()=>e(sa)?.current||e(X)("folder.loading"))),()=>(e(X),x(()=>e(X)("folder.up"))),()=>(e(X),x(()=>e(X)("common.refresh"))),()=>(e(X),x(()=>e(X)("common.cancel"))),()=>(e(ui),e(X),x(()=>e(ui)?"Use adapter folder":e(X)("folder.select")))]),re("click",bn,()=>y(pt,!1)),re("click",qs,()=>Ts(e(sa)?.parent||"",e(ui))),re("click",qn,()=>Ts(e(sa)?.current||"",e(ui))),re("click",Bo,()=>y(pt,!1)),re("click",_l,fn),J(I,te)};ve(kx,I=>{e(pt)&&I(pP)})}var xx=q(kx,2),Sx=q(k(xx)),mP=k(Sx,!0);w(Sx),w(xx),ie((I,te,se,ke,Oe,xt,la,Vt,Ut,bn,$s,pn,fs,Js,Sr)=>{W(QB,I),_e(Qf,"aria-label",te),ux=va(pu,1,"",null,ux,{active:e(Z)==="studio"}),W(KB,se),Qc.disabled=ke,fx=va(Qc,1,"",null,fx,{active:e(Z)==="apps"}),W(YB,Oe),px=va(mu,1,"",null,px,{active:e(Z)==="arena"}),W(JB,xt),Kc.disabled=la,mx=va(Kc,1,"",null,mx,{active:e(Z)==="library"}),W(XB,Vt),hx=va(gu,1,"",null,hx,{active:e(Z)==="logs"}),W(eP,Ut),hu.disabled=e(Ma),_x=va(hu,1,"",null,_x,{active:e(Z)==="configuration"}),W(tP,bn),W(aP,$s),_e(ml,"aria-label",pn),vx!==(vx=e(De))&&(ml.value=(ml.__value=e(De))??"",xn(ml,e(De))),W(iP,fs),_e(gl,"aria-label",Js),bx!==(bx=e(ft))&&(gl.value=(gl.__value=e(ft))??"",xn(gl,e(ft))),yx=va(N_,1,"server-pill",null,yx,{online:e(he)?.status==="ok"}),W(nP,(e(he),x(()=>e(he)?.backend||"offline"))),W(mP,Sr)},[()=>(e(X),x(()=>e(X)("app.nativeStudio"))),()=>(e(X),x(()=>e(X)("nav.primary"))),()=>(e(X),x(()=>e(X)("nav.studio"))),()=>(e(Ae),e(Le),e(Ma),e(Wa),e(Et),x(()=>e(Ae)||e(Le)||e(Ma)||!!e(Wa)||e(Et))),()=>(e(X),x(()=>e(X)("nav.apps"))),()=>(e(X),x(()=>e(X)("nav.arena"))),()=>(e(Ae),e(Ma),e(Wa),e(Et),x(()=>e(Ae)||e(Ma)||!!e(Wa)||e(Et))),()=>(e(X),x(()=>e(X)("nav.library"))),()=>(e(X),x(()=>e(X)("nav.runtime"))),()=>(e(X),x(()=>e(X)("nav.configuration"))),()=>(e(X),x(()=>e(X)("language.label"))),()=>(e(X),x(()=>e(X)("language.label"))),()=>(e(X),x(()=>e(X)("theme.label"))),()=>(e(X),x(()=>e(X)("theme.label"))),()=>(e(X),x(()=>e(X)("footer.embedded")))]),re("click",pu,fl),re("click",Qc,()=>uu("apps")),re("click",mu,()=>uu("arena")),re("click",Kc,()=>uu("library")),re("click",gu,()=>uu("logs")),re("click",hu,()=>uu("configuration")),re("change",ml,I=>En(I.currentTarget.value)),re("change",gl,I=>Xr(I.currentTarget.value)),J(a,lx),Ei(),s()}const Lz=Object.freeze(Object.defineProperty({__proto__:null,component:Dz},Symbol.toStringTag,{value:"Module"})),Vz=Object.freeze(Object.defineProperty({__proto__:null,default:({status:a,message:t})=>` +Only this package precision will be removed.`))){y(ne,`Deleting ${I.display_name} ${te.label}...`);try{pa(I,te)&&(y(ne,`Unloading ${I.display_name} ${te.label} before deletion...`),await _o(I.id),await En());const ke=await hT(te.id);y($t,{...e($t),[te.id]:{...e($t)[te.id],installed:!1}});const Oe={...e(ta)};if(delete Oe[te.id],y(ta,Oe),Ql(I,te)){const kt=(I.install_packages||[]).find(Dt=>Dt.id!==te.id&&e($t)[Dt.id]?.installed),la={...e(ga)};kt?la[I.id]=kt.id:delete la[I.id],y(ga,la),localStorage.setItem("audiocpp.ui.packageIds",JSON.stringify(e(ga))),I.id===e(ge)&&!e(pe)&&(y(we,us(I)),Tn())}yr(e($t)),y(Ot,"idle"),await $i(),I.id===e(ge)&&(await xs(),wr()),y(ne,ke.message||`${I.display_name} ${te.label} deleted.`),pi(e(ne))}catch(ke){y(ne,ke instanceof Error?ke.message:String(ke)),pi(`Package deletion failed: ${e(ne)}`)}}}Jn(async()=>{try{a9()}catch(se){Bf.set(se instanceof Error?se.message:String(se)),pi(`Configuration could not be loaded: ${se instanceof Error?se.message:se}`)}await Wn(),$a=window.matchMedia("(prefers-color-scheme: dark)"),Rt=$a.matches,Oi=se=>{Rt=se.matches,e(ft)==="system"&&Hn()},$a.addEventListener("change",Oi),y(ft,$b(localStorage.getItem(Tb))),Hn(e(ft));const I=localStorage.getItem("audiocpp.ui.language");y(De,bb(I?[I]:navigator.languages)),document.documentElement.lang=e(De);try{const se=JSON.parse(localStorage.getItem("audiocpp.ui.modelsFolderHistory")||"[]");if(!Array.isArray(se)||se.some(ke=>typeof ke!="string"||!ke.trim()))throw new Error("Invalid models-folder history.");y(va,[...new Set(se)].slice(0,10))}catch(se){pi(`Models folder history unavailable: ${se instanceof Error?se.message:String(se)}`)}try{y(ga,JSON.parse(localStorage.getItem("audiocpp.ui.packageIds")||"{}"))}catch{y(ga,{})}localStorage.removeItem("audiocpp.ui.packagePaths");const te=localStorage.getItem("audiocpp.ui.model");if(te&&y(ge,te),y(R,e(rn).find(se=>se.id===e(ge))||e(rn)[0]||Di[0]),y(me,""),y(Ra,[]),y(Sn,aa(e(R))),e(ge)&&(Hs={...Hs,[e(Sn)]:e(ge)}),ao(),await En(),e(ut).some(se=>se.group==="lora")&&ao(),e(he)?.ui_management)try{let se=await vT();const ke=localStorage.getItem("audiocpp.ui.modelsFolder");ke&&ke!==se.models_root&&(se=await cb(ke)),tc(se)}catch(se){y(ne,se instanceof Error?se.message:String(se)),y(ue,e(ne)),pi(`Models folder unavailable: ${e(ne)}`)}y(we,us(e(R))),e(he)?.ui_management?(await $i(),await xs(),wr()&&y(ne,"No installed model is selected. Choose a downloaded model or install one from the Models tab.")):y(Pe,!!e(ge)),await Hf(),await Wf(),await fu()}),fr(()=>{da!==null&&window.clearInterval(da),Us();for(const I of e(sa))ll(I);Ai?.abort(),e(Qa)?.state==="recording"&&e(Qa).stop(),ja=!0,Qe?.state==="recording"&&Qe.stop(),Vn?.getTracks().forEach(I=>I.stop()),ls?.getTracks().forEach(I=>I.stop()),Ei!==null&&window.clearInterval(Ei),ka!==null&&window.clearInterval(ka),$a&&Oi&&$a.removeEventListener("change",Oi)}),Ue(()=>e(X),()=>{e(X)==="apps"&&y(fe,!0)}),Ue(()=>e(De),()=>{y(Z,vb(e(De)))}),Ue(()=>(e(he),e($t)),()=>{y(rn,e(he)&&!e(he).ui_management?To():[...Di.map(I=>({...I,install_packages:I.install_packages?.map(te=>Fd(te,e($t)[te.id]))})),...To(!0)])}),Ue(()=>e(rn),()=>{y(Dc,sl(e(rn)))}),Ue(()=>(e(rn),e(ge),Di),()=>{y(R,e(rn).find(I=>I.id===e(ge))||e(rn)[0]||Di[0])}),Ue(()=>(e(R),e(ga)),()=>{y(r,e(R)?.install_packages?.find(I=>I.id===e(ga)[e(R).id])||e(R)?.install_packages?.[0])}),Ue(()=>(e(pe),e(R),e(r)),()=>{y(o,e(pe)||Ki(e(R))||!e(r)||!!e(r).load_target)}),Ue(()=>e(Sn),()=>{y(l,eo.find(I=>I.id===e(Sn))||eo[0])}),Ue(()=>(e(rn),e(Sn)),()=>{y(c,e(rn).filter(I=>aa(I)===e(Sn)).sort((I,te)=>Hl(I.display_name,te.display_name)))}),Ue(()=>(e(Te),e(ge),e(R)),()=>{y(d,e(Te).some(I=>I.id===e(ge)&&I.loaded&&Bt(I,e(R))))}),Ue(()=>e(R),()=>{y(g,x7(e(R)?.family,e(R)?.task))}),Ue(()=>e(g),()=>{y(h,e(g)?.component)}),Ue(()=>e(ut),()=>{y(m,e(ut).filter(I=>I.group==="lora"))}),Ue(()=>(e(ut),e(R)),()=>{y(p,e(ut).filter(I=>I.group!=="lora"&&!(e(R)?.family==="ace_step"&&["lora","lora_scale"].includes(I.name))))}),Ue(()=>e(g),()=>{y(u,e(g)?.replacesGenericControls||fi)}),Ue(()=>e(g),()=>{y(f,e(g)?.requestMode==="yue2")}),Ue(()=>e(g),()=>{y(_,e(g)?.requestMode==="panel")}),Ue(()=>(e(g),e(ct)),()=>{y(v,e(g)?.blocksRunWhileUploading===!0&&e(ct))}),Ue(()=>e(R),()=>{y(b,e(R)?.id==="firered-audio-semantic-edit"||e(R)?.id==="firered-audio-acoustic-edit")}),Ue(()=>e(R),()=>{y(S,e(R)?.family==="ace_step")}),Ue(()=>e(R),()=>{y($,e(R)?.family==="controlfoley"||e(R)?.family==="midashenglm_gen")}),Ue(()=>e(R),()=>{y(M,(e(R)?.family==="breeze_tts"||e(R)?.family==="chatterbox_turbo"||e(R)?.family==="maya1"||e(R)?.family==="kugelaudio"||e(R)?.family==="voxtral_tts"||e(R)?.family==="lfm2_audio"&&!e(R)?.builtin_voices?.length)&&e(R)?.task==="tts")}),Ue(()=>(e(R),e(b)),()=>{y(N,["asr","vc","svc","s2s","sep","vad","diar","align","midi","turn","wake","cls"].includes(e(R)?.task)||e(b)||e(R)?.family==="liveavatar"||e(R)?.family==="latentsync"||e(R)?.family==="auk"&&e(R)?.task==="gen")}),Ue(()=>(e(N),e(R),e(u)),()=>{y(P,e(N)||e(R)?.task==="gen"&&!e(u).genSource)}),Ue(()=>e(R),()=>{y(C,e(R)?.request_options?.includes("video")===!0)}),Ue(()=>(e(R),e(M)),()=>{y(j,["clon","vc","svc"].includes(e(R)?.task)&&e(R)?.family!=="rvc"||e(R)?.task==="s2s"&&e(R)?.family==="personaplex"||e(R)?.task==="tts"&&!["supertonic"].includes(e(R)?.family)&&!e(M))}),Ue(()=>e(R),()=>{y(G,e(R)?.family==="vibevoice"||e(R)?.family==="moss_ttsd")}),Ue(()=>e(R),()=>{y(A,!!e(R)?.builtin_voices?.length)}),Ue(()=>e(R),()=>{y(B,e(R)?.task==="tts"&&e(R)?.family==="qwen3_tts"&&!e(R)?.id.includes("custom"))}),Ue(()=>e(R),()=>{y(H,["tts","clon"].includes(e(R)?.task)&&!["auk","maya1","moss_ttsd","voxtral_tts"].includes(e(R)?.family))}),Ue(()=>(e(H),e(me),e(R),e(B)),()=>{y(U,!(e(H)&&e(me))&&(["clon","vc","svc"].includes(e(R)?.task)&&e(R)?.family!=="rvc"||e(B)))}),Ue(()=>e(R),()=>{y(E,Vt(e(R),"lyrics"))}),Ue(()=>(e(R),e(H),e(me),e(Be),e(B)),()=>{y(O,Vt(e(R),"reference_text")&&!(e(H)&&e(me))||!!e(Be)&&e(B))}),Ue(()=>(e(A),e(Ra),e(R)),()=>{y(ua,e(A)?Array.from(new Set([...e(Ra).filter(I=>!(I in Si)),...e(R)?.builtin_voices||[]])):e(Ra))}),Ue(()=>(e(me),e(he),e(A),uf),()=>{y(V,e(me)&&e(he)&&!e(A)?uf(Si[e(me)]||e(me)):"")}),Ue(()=>(e(A),e(ua)),()=>{y(L,e(A)||e(ua).every(I=>I in Si))}),Ue(()=>e(R),()=>{y(T,["lfm2_audio","lfm3_audio"].includes(e(R)?.family)&&e(R)?.task==="s2s")}),Ue(()=>(e(R),e(T),e(u)),()=>{y(F,["tts","clon","gen","s2s","align","vdes"].includes(e(R)?.task)&&!["apollo","universr","builtin_audio_utils","reuse","sidon"].includes(e(R)?.family)&&!e(T)&&!e(u).text)}),Ue(()=>e(R),()=>{y(z,e(R)?.task==="asr"&&["voxtral_realtime","nemotron_asr","higgs_audio_stt","sense_asr","vibevoice_asr_streaming","confucius4_r2t2"].includes(e(R)?.family))}),Ue(()=>(e(he),e($t),e(Ot)),()=>{y(D,e(he)===null||!!e(he).ui_management&&Object.keys(e($t)).length===0&&e(Ot)!=="failed")}),Ue(()=>(e(rn),e(Te),e(ge),e(Pe),e($t)),()=>{y(K,new Set(e(rn).filter(I=>{if(Ki(I)||e(Te).some(se=>se.id===I.id&&se.loaded)||I.id===e(ge)&&e(Pe)===!0)return!0;const te=I.install_packages||[];return!te.length||te.some(se=>e($t)[se.id]===void 0)?!0:te.some(se=>e($t)[se.id]?.installed)}).map(I=>I.id)))}),Ue(()=>i(),()=>{no(i().historyLimit)}),wn(),Zi();var lx=Iz();A4("1uha8ag",I=>{e4(te=>{Cp.title=te??""},[()=>(e(Ae),e(ea),x(()=>e(Ae)?`${e(ea).toFixed(1)} s · audio.cpp · Native Studio`:"audio.cpp · Native Studio"))])}),re("keydown",wc,DB);var E_=ht(lx),U_=k(E_),cx=q(k(U_),2),dx=q(k(cx),2),QB=k(dx,!0);w(dx),w(cx),w(U_);var Qf=q(U_,2),pu=k(Qf);let ux;var KB=k(pu,!0);w(pu);var Wc=q(pu,2);let fx;var YB=k(Wc,!0);w(Wc);var mu=q(Wc,2);let px;var JB=k(mu,!0);w(mu);var Qc=q(mu,2);let mx;var XB=k(Qc,!0);w(Qc);var gx=q(Qc,2);{var ZB=I=>{var te=Of();let se;var ke=k(te,!0);w(te),ie(Oe=>{se=ya(te,1,"",null,se,{active:e(X)==="models"}),W(ke,Oe)},[()=>(e(Z),x(()=>e(Z)("nav.models")))]),re("click",te,Dn),J(I,te)};ve(gx,I=>{e(he),x(()=>e(he)?.ui_management!==!1)&&I(ZB)})}var gu=q(gx,2);let hx;var eP=k(gu,!0);w(gu);var hu=q(gu,2);let _x;var tP=k(hu,!0);w(hu),w(Qf);var R_=q(Qf,2),B_=k(R_),aP=k(B_,!0);w(B_);var cl=q(B_,2);Ct(cl,5,()=>oq,Qt,(I,te,se,ke)=>{var Oe=nu(),kt=k(Oe,!0);w(Oe);var la={};ie(()=>{W(kt,(e(te),x(()=>e(te).name))),la!==(la=(e(te),x(()=>e(te).code)))&&(Oe.value=(Oe.__value=(e(te),x(()=>e(te).code)))??"")}),J(I,Oe)}),w(cl);var vx;Nn(cl),w(R_);var P_=q(R_,2),j_=k(P_),iP=k(j_,!0);w(j_);var dl=q(j_,2);Ct(dl,5,()=>xq,Qt,(I,te)=>{var se=nu(),ke=k(se,!0);w(se);var Oe={};ie(kt=>{W(ke,kt),Oe!==(Oe=(e(te),x(()=>e(te).id)))&&(se.value=(se.__value=(e(te),x(()=>e(te).id)))??"")},[()=>(e(Z),e(te),x(()=>e(Z)(`theme.${e(te).id}`,{},e(te).label)))]),J(I,se)}),w(dl);var bx;Nn(dl),w(P_);var N_=q(P_,2);let yx;var nP=q(k(N_),1,!0);w(N_),w(E_);var O_=q(E_,2),wx=k(O_);{var sP=I=>{var te=GM(),se=k(te);{let ke=Nt(()=>e(X)==="apps");Ci(t9(se,{get active(){return e(ke)},$$legacy:!0}),Oe=>y(ce,Oe),()=>e(ce))}w(te),ie(()=>_e(te,"hidden",e(X)!=="apps")),J(I,te)};ve(wx,I=>{e(fe)&&I(sP)})}var rP=q(wx,2);{var oP=I=>{var te=Uz(),se=ht(te);Ct(se,5,()=>eo,Qt,(Xt,qt)=>{var ba=FM();let Ht;var _a=k(ba),Bi=q(_a),xi=k(Bi,!0);w(Bi),w(ba),ie((Ui,Ri)=>{ba.disabled=e(Fa),Ht=ya(ba,1,"",null,Ht,{active:e(Sn)===e(qt).id}),W(_a,`${Ui??""} `),W(xi,Ri)},[()=>(e(qt),e(Z),x(()=>Qn(e(qt).id,e(qt).label,e(Z)))),()=>(e(rn),e(qt),x(()=>e(rn).filter(Ui=>aa(Ui)===e(qt).id).length))]),re("click",ba,()=>Lc(e(qt).id)),J(Xt,ba)}),w(se);var ke=q(se,2),Oe=k(ke),kt=k(Oe),la=k(kt,!0);w(kt);var Dt=q(kt,2),Mt=k(Dt,!0);w(Dt);var vn=q(Dt,2),Ss=k(vn,!0);w(vn),w(Oe);var cn=q(Oe,2);let fs;var Xs=k(cn,!0);w(cn),w(ke);var xr=q(ke,2),Sr=k(xr),Ts=k(Sr),Ka=k(Ts),$n=k(Ka,!0);w(Ka);var Ji=q(Ka,2),si=k(Ji),Zs=k(si,!0);w(si),si.value=si.__value="";var $s=q(si);Ct($s,1,()=>(e(l),x(()=>e(l).tasks)),Qt,(Xt,qt)=>{const ba=Nt(()=>(e(c),e(qt),x(()=>e(c).filter(xi=>xi.task===e(qt)))));var Ht=ys(),_a=ht(Ht);{var Bi=xi=>{var Ui=MM();Ct(Ui,5,()=>e(ba),Qt,(Ri,Ii)=>{var Ln=nu(),gs=k(Ln);w(Ln);var es={};ie((mi,tr)=>{Ln.disabled=mi,W(gs,`${e(Ii),x(()=>e(Ii).display_name)??""}${tr??""}`),es!==(es=(e(Ii),x(()=>e(Ii).id)))&&(Ln.value=(Ln.__value=(e(Ii),x(()=>e(Ii).id)))??"")},[()=>(e(K),e(Ii),x(()=>!e(K).has(e(Ii).id))),()=>(e(K),e(Ii),e(Z),x(()=>e(K).has(e(Ii).id)?"":` — ${e(Z)("studio.notDownloaded")}`))]),J(Ri,Ln)}),w(Ui),ie(Ri=>_e(Ui,"label",Ri),[()=>(e(qt),e(Z),x(()=>cs(e(qt),e(Z))))]),J(xi,Ui)};ve(_a,xi=>{Q(e(ba)),x(()=>e(ba).length)&&xi(Bi)})}J(Xt,Ht)}),w(Ji);var ps=q(Ji,2),er=k(ps);let ic;var Ao=k(er,!0);w(er);var ul=q(er,2),fl=k(ul,!0);w(ul),w(ps),w(Ts);var pl=q(Ts,2),bn=k(pl);{var tn=Xt=>{var qt=zM(),ba=ht(qt),Ht=k(ba,!0);w(ba);var _a=q(ba,2);Pt(_a);var Bi=q(_a,2),xi=k(Bi,!0);w(Bi),ie((Ui,Ri)=>{W(Ht,Ui),_a.disabled=e(d)||e(Le)||e(Ae),_e(Bi,"href",(e(R),x(()=>e(R).weights_url))),W(xi,Ri)},[()=>(e(Z),x(()=>e(Z)("studio.weightsPath"))),()=>(e(Z),x(()=>e(Z)("studio.downloadWeights")))]),Sa(_a,()=>e(we),Ui=>y(we,Ui)),re("change",_a,xs),J(Xt,qt)},qs=Va(()=>(e(R),e(he),x(()=>e(R).family==="builtin_audio_utils"&&e(he)?.ui_management&&!Ki(e(R)))));ve(bn,Xt=>{e(qs)&&Xt(tn)})}var Kn=q(bn,2);{var ms=Xt=>{var qt=EM();Ct(qt,5,()=>(e(R),x(()=>Oa(e(R)))),Qt,(ba,Ht)=>{const _a=Nt(()=>(e(Ht),x(()=>e(Ht).choice))),Bi=Nt(()=>(Q(e(_a)),e(R),e(Te),e($t),x(()=>!!(e(_a)&&ha(e(R),e(_a),e(Te),e($t)))))),xi=Nt(()=>(Q(e(_a)),e(R),e(Te),x(()=>!!(e(_a)&&pa(e(R),e(_a),e(Te))))));var Ui=Of();let Ri;var Ii=k(Ui,!0);w(Ui),ie((Ln,gs)=>{Ui.disabled=e(Le)||!e(Bi),_e(Ui,"title",Ln),Ri=ya(Ui,1,"",null,Ri,gs),W(Ii,(Q(e(_a)),e(Ht),x(()=>e(_a)?.label||e(Ht).label)))},[()=>(Q(e(_a)),Q(e(xi)),e(Z),Q(e(Bi)),e(Ht),x(()=>e(_a)?.load_target_error||(!e(xi)&&!e(_a)?.load_target?"Package load target is not ready":e(Z)(e(xi)?"studio.unloadPackage":e(Bi)?"studio.loadPackage":"studio.packageNotDownloaded",{package:e(_a)?.label||e(Ht).label})))),()=>({resident:e(xi),"selected-package":!!(e(_a)&&e(Bi)&&Ql(e(R),e(_a)))})]),re("click",Ui,()=>e(_a)&&Hc(e(_a))),J(ba,Ui)}),w(qt),ie(ba=>_e(qt,"aria-label",ba),[()=>(e(Z),x(()=>e(Z)("studio.format")))]),J(Xt,qt)},Tr=Xt=>{var qt=Of();let ba;var Ht=k(qt,!0);w(qt),ie((_a,Bi,xi)=>{ba=ya(qt,1,"single-model-toggle",null,ba,{resident:e(d)}),qt.disabled=_a,_e(qt,"title",Bi),W(Ht,xi)},[()=>(e(ge),e(Le),e(v),e(Pe),e(d),e(o),e(R),x(()=>!e(ge)||e(Le)||e(v)||e(Pe)===!1||!e(d)&&!e(o)||Ki(e(R))&&!e(d))),()=>(e(r),e(o),e(R),e(d),e(Z),x(()=>e(r)?.load_target_error||(e(o)?Ki(e(R))&&!e(d)?e(Z)("studio.serverConfigured"):e(d)?e(Z)("studio.unload"):e(Z)("studio.load"):"Package load target is not ready"))),()=>(e(R),e(Le),e(Z),e(d),x(()=>Ki(e(R))?e(Le)?e(Z)("studio.working"):e(d)?e(Z)("studio.bundledLoaded"):e(Z)("studio.configured"):e(Le)?e(Z)("studio.working"):e(d)?e(Z)(e(R).family==="builtin_audio_utils"?"studio.unload":"studio.bundledLoaded"):e(Z)("studio.load")))]),re("click",qt,cu),J(Xt,qt)};ve(Kn,Xt=>{e(ge),e(R),e(u),x(()=>e(ge)&&(e(R).install_packages||[]).length&&!e(u).packageButtons)?Xt(ms):Xt(Tr,-1)})}w(pl);var nc=q(pl,2);{var _u=Xt=>{var qt=UM(),ba=k(qt,!0);w(qt),ie(Ht=>W(ba,Ht),[()=>(e(Z),x(()=>Dl(e(Z))))]),J(Xt,qt)};ve(nc,Xt=>{e(ge),e(R),x(()=>e(ge)&&(e(R)?.input_hint_en||e(R)?.input_hint))&&Xt(_u)})}w(Sr);var sc=q(Sr,2),vu=k(sc);{var I_=Xt=>{var qt=xz(),ba=ht(qt),Ht=k(ba),_a=k(Ht),Bi=k(_a,!0);w(_a);var xi=q(_a),Ui=k(xi,!0);w(xi),w(Ht);var Ri=q(Ht,2),Ii=k(Ri),Ln=k(Ii,!0);w(Ii);var gs=q(Ii,2);{var es=yt=>{var Tt=RM(),At=k(Tt);Fc(At,{size:14});var xt=q(At,1,!0);w(Tt),ie(Ia=>{Tt.disabled=e(Ae)||e(Le)||e(Fa),W(xt,Ia)},[()=>(e(Z),x(()=>e(Z)("settings.load")))]),re("click",Tt,()=>e(wi)?.click()),J(yt,Tt)};ve(gs,yt=>{e(u),x(()=>!e(u).settingsImport)&&yt(es)})}w(Ri),w(ba);var mi=q(ba,2);Ci(mi,yt=>y(wi,yt),()=>e(wi));var tr=q(mi,2);{var Kc=yt=>{var Tt=BM(),At=k(Tt),xt=k(At);Cd(xt,{size:17});var Ia=q(xt,1,!0);w(At);var Ba=q(At,2);sn(Ba),w(Tt),ie((xa,Ca)=>{W(Ia,xa),_e(Ba,"rows",(e(R),x(()=>e(R).task==="gen"?3:4))),_e(Ba,"placeholder",Ca)},[()=>(e(R),e(Z),x(()=>e(R).task==="gen"?e(Z)("request.prompt"):e(R).task==="align"?e(Z)("request.alignmentText"):e(Z)("request.text"))),()=>(e(R),e(Z),x(()=>e(R).task==="gen"?e(Z)("request.soundPlaceholder"):e(Z)("request.textPlaceholder")))]),Sa(Ba,()=>e(ye),xa=>y(ye,xa)),J(yt,Tt)};ve(tr,yt=>{e(F)&&yt(Kc)})}var Go=q(tr,2);{var wu=yt=>{var Tt=PM(),At=k(Tt),xt=k(At);Pt(xt);var Ia=q(xt,3,!0);w(At);var Ba=q(At,2),xa=k(Ba),Ca=k(xa,!0);w(xa);var Da=q(xa,2);Pt(Da),w(Ba),w(Tt),ie((dt,qi)=>{W(Ia,dt),W(Ca,qi),Da.disabled=!e(_n)},[()=>(e(Z),x(()=>e(Z)("request.splitLongText"))),()=>(e(Z),x(()=>e(Z)("request.charactersPerChunk")))]),Dp(xt,()=>e(_n),dt=>y(_n,dt)),Sa(Da,()=>e(Ni),dt=>y(Ni,dt)),J(yt,Tt)},V_=Va(()=>(e(R),e(u),x(()=>["tts","clon"].includes(e(R).task)&&e(R).family!=="moss_ttsd"&&!e(u).chunking)));ve(Go,yt=>{e(V_)&&yt(wu)})}var ku=q(Go,2);{var Yf=yt=>{{let Tt=Nt(()=>e(Ae)||e(Le)),At=Nt(()=>(e(he),e(R),x(()=>e(he)?.ui_management===!0&&!Ki(e(R)))));$7(yt,{get modelId(){return e(R),x(()=>e(R).id)},get seed(){return e(qe)},get busy(){return e(Tt)},get adapterEditable(){return e(At)},onBrowseAdapter:xt=>ki(e(_i),xt),get paramSpecs(){return e(ut)},ensureLoaded:jr,requestOptions:Pr,resolveRequestSeed:qa,setParameterValue:ds,log:pi,get tr(){return e(Z)},get text(){return e(ye)},set text(xt){y(ye,xt)},get lyrics(){return e(ze)},set lyrics(xt){y(ze,xt)},get language(){return e(de)},set language(xt){y(de,xt)},get duration(){return e(Fe)},set duration(xt){y(Fe,xt)},get rewritingCaption(){return e(Ge)},set rewritingCaption(xt){y(Ge,xt)},get advancedValues(){return e(Ke)},set advancedValues(xt){y(Ke,xt)},get outputText(){return e(Gt)},set outputText(xt){y(Gt,xt)},get outputJson(){return e(jt)},set outputJson(xt){y(jt,xt)},get status(){return e(ne)},set status(xt){y(ne,xt)},get warningStatus(){return e(Je)},set warningStatus(xt){y(Je,xt)},get errorStatus(){return e(ue)},set errorStatus(xt){y(ue,xt)},$$legacy:!0})}},H_=yt=>{var Tt=ys(),At=ht(Tt);{let xt=Nt(()=>e(Ae)||e(Le)||!e(o)),Ia=Nt(()=>(e(R),e(Te),Q(Uc),x(()=>e(R).family==="yue2"&&Ki(e(R))?async()=>{y(Te,await Uc())}:En))),Ba=Nt(()=>e(Zn)==="source"),xa=Nt(()=>(e(Qa),e(Ut),x(()=>!!e(Qa)||e(Ut))));md(At,()=>e(h),(Ca,Da)=>{Da(Ca,{get task(){return e(R),x(()=>e(R).task)},get busy(){return e(xt)},get paramSpecs(){return e(ut)},get advancedValues(){return e(Ke)},get catalogEntries(){return e(rn)},get loadedModels(){return e(Te)},get server(){return e(he)},get modelId(){return e(R),x(()=>e(R).id)},setPanelRunner:jB,modelPathFor:us,sessionOptionsFor:Ws,loadOptionsFor:qo,loadTargetFor:Yl,get refreshModels(){return e(Ia)},log:pi,get tr(){return e(Z)},localizedParameterText:zs,setParameterValue:ds,get sourceFile(){return e(je)},get savedVoices(){return e(Hi)},clearSource:mt,get sourceRecording(){return e(Ba)},get sourceRecordingBlocked(){return e(xa)},setSourceFile:dt=>y(je,dt),startSourceRecording:()=>M_("source"),stopSourceRecording:z_,get lyrics(){return e(ze)},set lyrics(dt){y(ze,dt)},get seed(){return e(qe)},set seed(dt){y(qe,dt)},get loraUploading(){return e(ct)},set loraUploading(dt){y(ct,dt)},$$legacy:!0})})}J(yt,Tt)},W_=yt=>{var Tt=jM(),At=ht(Tt),xt=k(At),Ia=q(xt),Ba=k(Ia,!0);w(Ia),w(At);var xa=q(At,2);sn(xa),ie((Ca,Da)=>{W(xt,`${Ca??""} `),W(Ba,Da),xa.required=e(E),_e(xa,"aria-required",e(E))},[()=>(e(Z),x(()=>e(Z)("request.lyrics"))),()=>(e(E),e(Z),x(()=>e(E)?e(Z)("voice.required"):e(Z)("request.optional")))]),Sa(xa,()=>e(ze),Ca=>y(ze,Ca)),J(yt,Tt)};ve(ku,yt=>{e(R),x(()=>e(R).family==="ace_step")?yt(Yf):e(h)?yt(H_,1):(e(R),x(()=>e(R).task==="gen")&&yt(W_,2))})}var Jf=q(ku,2);{var ml=yt=>{var Tt=NM(),At=ht(Tt),xt=k(At);Oo(xt,{size:17});var Ia=q(xt),Ba=q(Ia),xa=k(Ba,!0);w(Ba),w(At);var Ca=q(At,2);sn(Ca),ie((Da,dt)=>{W(Ia,`${Da??""} `),W(xa,dt)},[()=>(e(Z),x(()=>e(Z)("request.context"))),()=>(e(Z),x(()=>e(Z)("request.contextHint")))]),Sa(Ca,()=>e(xe),Da=>y(xe,Da)),J(yt,Tt)},Q_=Va(()=>(e(R),x(()=>e(R).task==="asr"&&!["samsone","audio_flamingo","index_echo"].includes(e(R).family))));ve(Jf,yt=>{e(Q_)&&yt(ml)})}var gl=q(Jf,2);{var Yc=yt=>{var Tt=OM(),At=ht(Tt),xt=k(At);Cd(xt,{size:17});var Ia=q(xt,1,!0);w(At);var Ba=q(At,2);sn(Ba),ie((xa,Ca)=>{W(Ia,xa),_e(Ba,"placeholder",Ca)},[()=>(e(Z),x(()=>e(Z)("request.voiceDescription"))),()=>(e(Z),x(()=>e(Z)("request.voiceDescriptionPlaceholder")))]),Sa(Ba,()=>e($e),xa=>y($e,xa)),J(yt,Tt)};ve(gl,yt=>{e(R),x(()=>e(R).task==="vdes")&&yt(Yc)})}var rc=q(gl,2),Xf=k(rc);{var K_=yt=>{var Tt=VM(),At=k(Tt),xt=k(At),Ia=q(xt);{var Ba=La=>{var Za=su(),Xi=k(Za,!0);w(Za),ie(ci=>W(Xi,ci),[()=>(e(Z),x(()=>e(Z)("request.autoLanguage")))]),J(La,Za)};ve(Ia,La=>{e(R),x(()=>!nl[e(R).family])&&La(Ba)})}w(At);var xa=q(At,2);{var Ca=La=>{var Za=IM();Pt(Za),Sa(Za,()=>e(be),Xi=>y(be,Xi)),J(La,Za)},Da=Va(()=>(e(R),x(()=>["moss_ttsd","moss_voicegen"].includes(e(R).family)))),dt=La=>{var Za=DM();Ct(Za,5,()=>(e(R),x(()=>nl[e(R).family])),Qt,(Xi,ci)=>{var gi=nu(),an=k(gi,!0);w(gi);var fn={};ie(()=>{W(an,e(ci)),fn!==(fn=e(ci))&&(gi.value=(gi.__value=e(ci))??"")}),J(Xi,gi)}),w(Za),ur(Za,()=>e(de),Xi=>y(de,Xi)),J(La,Za)},qi=La=>{var Za=LM();Pt(Za),Sa(Za,()=>e(de),Xi=>y(de,Xi)),J(La,Za)};ve(xa,La=>{e(Da)?La(Ca):(e(R),x(()=>nl[e(R).family])?La(dt,1):La(qi,-1))})}w(Tt),ie(La=>W(xt,`${La??""} `),[()=>(e(Z),x(()=>e(Z)("request.language")))]),J(yt,Tt)},qP=Va(()=>(e(R),e(u),x(()=>["tts","clon","asr","gen","s2s","align","vdes"].includes(e(R).task)&&!e(u).language&&!["apollo","universr","moss_transcribe_diarize","builtin_audio_utils","sam_audio","samsone","gigaam_asr","maya1","owsm","owsm_ctc","index_echo","audio_flamingo","kugelaudio","reuse","sidon","hviske_asr_v6","voxtral_tts"].includes(e(R).family))));ve(Xf,yt=>{e(qP)&&yt(K_)})}var Mx=q(Xf,2);{var CP=yt=>{var Tt=HM(),At=k(Tt),xt=k(At),Ia=q(xt),Ba=k(Ia,!0);w(Ia),w(At);var xa=q(At,2);Pt(xa),w(Tt),ie((Ca,Da)=>{W(xt,`${Ca??""} `),W(Ba,Da)},[()=>(e(Z),x(()=>e(Z)("request.seed"))),()=>(e(Z),x(()=>e(Z)("request.randomSeed")))]),Sa(xa,()=>e(qe),Ca=>y(qe,Ca)),J(yt,Tt)},AP=Va(()=>(e(R),e(u),x(()=>["tts","clon","gen","s2s","vdes"].includes(e(R).task)&&!e(u).seed&&!["apollo","builtin_audio_utils","reuse","sidon"].includes(e(R).family))));ve(Mx,yt=>{e(AP)&&yt(CP)})}var zx=q(Mx,2);{var GP=yt=>{var Tt=KM(),At=k(Tt),xt=k(At,!0);w(At);var Ia=q(At,2);{var Ba=Ca=>{var Da=WM();Pt(Da),ie(()=>{_e(Da,"min",(e(R),x(()=>e(R).family==="canary_asr"?0:1))),_e(Da,"max",(e(R),x(()=>e(R).family==="canary_asr"?1015:e(R).family==="cohere_asr"?1014:void 0)))}),Sa(Da,()=>e(ot),dt=>y(ot,dt)),J(Ca,Da)},xa=Ca=>{var Da=QM();Pt(Da),Sa(Da,()=>e(rt),dt=>y(rt,dt)),J(Ca,Da)};ve(Ia,Ca=>{e(R),x(()=>e(R).family in to)?Ca(Ba):Ca(xa,-1)})}w(Tt),ie(Ca=>W(xt,Ca),[()=>(e(Z),x(()=>e(Z)("request.maxTokens")))]),J(yt,Tt)},FP=Va(()=>(e(R),x(()=>ia(e(R))&&!["kugelaudio","crisperwhisper","audio_flamingo","owsm","hviske_asr_v6","voxtral_tts"].includes(e(R).family))));ve(zx,yt=>{e(FP)&&yt(GP)})}var MP=q(zx,2);{var zP=yt=>{var Tt=YM(),At=k(Tt),xt=k(At,!0),Ia=q(xt);{var Ba=dt=>{var qi=su(),La=k(qi,!0);w(qi),ie(Za=>W(La,Za),[()=>(e(Z),x(()=>e(Z)("request.autoDuration")))]),J(dt,qi)};ve(Ia,dt=>{e(S)&&dt(Ba)})}w(At);var xa=q(At,2);Pt(xa);var Ca=q(xa,2);{var Da=dt=>{var qi=G2(),La=k(qi,!0);w(qi),ie(Za=>W(La,Za),[()=>(e(Z),e(Ke),x(()=>e(Z)("request.minimaxFrames",{frames:Number(e(Ke).num_frames||0)})))]),J(dt,qi)};ve(Ca,dt=>{e(R),x(()=>e(R).family==="minimax_h3")&&dt(Da)})}w(Tt),ie(dt=>{W(xt,dt),_e(xa,"min",e(S)?-1:1),bi(xa,e(Fe))},[()=>(e(Z),x(()=>e(Z)("request.duration")))]),re("input",xa,dt=>al(dt.currentTarget.valueAsNumber)),J(yt,Tt)};ve(MP,yt=>{e(R),e(u),x(()=>e(R).task==="gen"&&!e(u).duration)&&yt(zP)})}w(rc);var Ex=q(rc,2);{var EP=yt=>{var Tt=az(),At=k(Tt),xt=k(At);sf(xt,{size:17});var Ia=q(xt),Ba=q(Ia),xa=k(Ba,!0);w(Ba),w(At);var Ca=q(At,2);Ci(Ca,Ma=>y(Ze,Ma),()=>e(Ze));var Da=q(Ca,2),dt=k(Da);Fc(dt,{size:16});var qi=q(dt),La=k(qi,!0);w(qi);var Za=q(qi),Xi=k(Za,!0);w(Za),w(Da);var ci=q(Da,2),gi=k(ci);{var an=Ma=>{var Aa=JM(),Wt=ht(Aa),na=k(Wt);zc(na,{size:14});var Ga=q(na,1,!0);w(Wt);var di=q(Wt,2),nn=k(di,!0);w(di),ie((Un,hs)=>{W(Ga,Un),W(nn,hs)},[()=>(e(Z),x(()=>e(Z)("request.stopRecording"))),()=>(e(Z),x(()=>e(Z)("request.recordingMicrophone")))]),re("click",Wt,z_),J(Ma,Aa)},fn=Ma=>{var Aa=XM(),Wt=ht(Aa),na=k(Wt);ym(na,{size:14});var Ga=q(na,1,!0);w(Wt);var di=q(Wt,2),nn=k(di);ho(nn,{size:15}),w(di);var Un=q(di,2);{var hs=Rn=>{var qn=su(),Cn=k(qn,!0);w(qn),ie(()=>W(Cn,(e(je),x(()=>e(je).name)))),J(Rn,qn)};ve(Un,Rn=>{e(je)&&Rn(hs)})}ie((Rn,qn,Cn,Fo)=>{Wt.disabled=Rn,W(Ga,qn),di.disabled=!e(je),_e(di,"title",Cn),_e(di,"aria-label",Fo)},[()=>(e(Qa),e(Ut),x(()=>!!e(Qa)||e(Ut))),()=>(e(Z),x(()=>e(Z)("request.recordMicrophone"))),()=>(e(Z),x(()=>e(Z)("file.clear"))),()=>(e(Z),x(()=>e(Z)("file.clear")))]),re("click",Wt,()=>M_("source")),re("click",di,mt),J(Ma,Aa)};ve(gi,Ma=>{e(Zn)==="source"?Ma(an):Ma(fn,-1)})}w(ci);var Pi=q(ci,2);{let Ma=Nt(()=>(e(Z),x(()=>e(Z)("file.preview"))));ss(Pi,{get file(){return e(je)},kind:"audio",get label(){return e(Ma)}})}var Gi=q(Pi,2);{var yn=Ma=>{var Aa=tz(),Wt=k(Aa),na=k(Wt),Ga=k(na,!0);w(na);var di=q(na,2),nn=k(di,!0);w(di),w(Wt);var Un=q(Wt,2);{var hs=qn=>{var Cn=ZM(),Fo=k(Cn,!0);w(Cn),ie(oc=>W(Fo,oc),[()=>(e(Z),x(()=>e(Z)("request.stopLive")))]),re("click",Cn,rx),J(qn,Cn)},Rn=qn=>{var Cn=ez(),Fo=k(Cn,!0);w(Cn),ie((oc,Zf)=>{Cn.disabled=oc,W(Fo,Zf)},[()=>(e(Ae),e(Qa),x(()=>e(Ae)||!!e(Qa))),()=>(e(Z),x(()=>e(Z)("request.startLive")))]),re("click",Cn,PB),J(qn,Cn)};ve(Un,qn=>{e(Ut)?qn(hs):qn(Rn,-1)})}w(Aa),ie((qn,Cn)=>{W(Ga,qn),W(nn,Cn)},[()=>(e(Z),x(()=>e(Z)("request.liveTitle"))),()=>(e(Z),x(()=>e(Z)("request.liveDescription")))]),J(Ma,Aa)};ve(Gi,Ma=>{e(z)&&Ma(yn)})}w(Tt),ie((Ma,Aa,Wt,na)=>{W(Ia,`${Ma??""} `),W(xa,Aa),W(La,Wt),W(Xi,na)},[()=>(e(Z),x(()=>e(Z)("request.sourceAudio"))),()=>(e(N),e(Z),x(()=>e(N)?"":`(${e(Z)("request.optional")})`)),()=>(e(Z),x(()=>e(Z)("file.choose"))),()=>(e(je),e(Z),x(()=>e(je)?.name||e(Z)("file.none")))]),re("change",Ca,Ma=>y(je,Ma.currentTarget.files?.[0]||null)),J(yt,Tt)};ve(Ex,yt=>{e(P),e(R),x(()=>e(P)&&e(R).family!=="liveavatar")&&yt(EP)})}var Ux=q(Ex,2);{var UP=yt=>{var Tt=iz(),At=k(Tt),xt=k(At);sT(xt,{size:17});var Ia=q(xt,2),Ba=k(Ia,!0);w(Ia),w(At);var xa=q(At,2);Ci(xa,Pi=>y(Ne,Pi),()=>e(Ne));var Ca=q(xa,2),Da=k(Ca),dt=k(Da,!0);w(Da);var qi=q(Da),La=k(qi,!0);w(qi),w(Ca);var Za=q(Ca,2),Xi=k(Za),ci=k(Xi,!0);w(Xi);var gi=q(Xi,2);{var an=Pi=>{var Gi=su(),yn=k(Gi,!0);w(Gi),ie(()=>W(yn,(e(He),x(()=>e(He).name)))),J(Pi,Gi)};ve(gi,Pi=>{e(He)&&Pi(an)})}w(Za);var fn=q(Za,2);{let Pi=Nt(()=>(e(Z),x(()=>e(Z)("file.preview"))));ss(fn,{get file(){return e(He)},kind:"video",get label(){return e(Pi)}})}w(Tt),ie((Pi,Gi,yn,Ma)=>{W(Ba,Pi),W(dt,Gi),W(La,yn),Xi.disabled=!e(He),W(ci,Ma)},[()=>(e(Z),x(()=>e(Z)("request.optional"))),()=>(e(Z),x(()=>e(Z)("file.choose"))),()=>(e(He),e(Z),x(()=>e(He)?.name||e(Z)("file.none"))),()=>(e(Z),x(()=>e(Z)("file.clear")))]),re("change",xa,Pi=>y(He,Pi.currentTarget.files?.[0]||null)),re("click",Xi,st),J(yt,Tt)};ve(Ux,yt=>{e(C)&&yt(UP)})}var Rx=q(Ux,2);{var RP=yt=>{var Tt=uz(),At=k(Tt),xt=k(At);lf(xt,{size:17});var Ia=q(xt,1,!0);w(At);var Ba=q(At,2);{let ci=Nt(()=>e(Wi)?`saved:${e(Wi)}`:e(me)?`preset:${e(me)}`:""),gi=Nt(()=>e(H)?e(ua):[]),an=Nt(()=>(e(R),e(Hi),x(()=>e(R).family==="kugelaudio"?[]:e(Hi)))),fn=Nt(()=>(e(A),e(R),e(Z),e(he),e(L),x(()=>e(A)||e(R).family==="kugelaudio"?e(Z)("voice.preset"):e(he)?.ui_management===!1||!e(L)?e(Z)("voice.configured"):e(Z)("voice.quickStart")))),Pi=Nt(()=>(e(Z),x(()=>e(Z)("voice.useReference")))),Gi=Nt(()=>(e(R),x(()=>e(R).family!=="kugelaudio")));kb(Ba,{id:"quick-start-voice",get value(){return e(ci)},get presets(){return e(gi)},get savedVoices(){return e(an)},get presetLabel(){return e(fn)},get emptyLabel(){return e(Pi)},get allowEmpty(){return e(Gi)},get tr(){return e(Z)},onselect:RB})}var xa=q(Ba,2);{var Ca=ci=>{var gi=ys(),an=ht(gi);{var fn=Pi=>{var Gi=F2(),yn=ht(Gi);{var Ma=na=>{var Ga=nz(),di=k(Ga,!0);w(Ga),ie(nn=>W(di,nn),[()=>(e(Z),x(()=>e(Z)("voice.bundledNote")))]),J(na,Ga)};ve(yn,na=>{e(A),e(R),x(()=>!e(A)&&e(R).family!=="kugelaudio")&&na(Ma)})}var Aa=q(yn,2);{var Wt=na=>{{let Ga=Nt(()=>(e(Z),x(()=>e(Z)("file.preview"))));ss(na,{get src(){return e(V)},get name(){return e(me)},kind:"audio",get label(){return e(Ga)}})}};ve(Aa,na=>{e(V)&&na(Wt)})}J(Pi,Gi)};ve(an,Pi=>{e(me)&&Pi(fn)})}J(ci,gi)};ve(xa,ci=>{e(H),e(ua),x(()=>e(H)&&e(ua).length)&&ci(Ca)})}var Da=q(xa,2);{var dt=ci=>{var gi=rz(),an=k(gi),fn=k(an),Pi=k(fn),Gi=q(Pi),yn=k(Gi,!0);w(Gi),w(fn);var Ma=q(fn,2);Ci(Ma,Rn=>y(Ve,Rn),()=>e(Ve));var Aa=q(Ma,2),Wt=k(Aa);Fc(Wt,{size:16});var na=q(Wt),Ga=k(na,!0);w(na);var di=q(na),nn=k(di,!0);w(di),w(Aa),w(an);var Un=q(an,2);{var hs=Rn=>{var qn=sz(),Cn=k(qn),Fo=k(Cn);zt(),w(Cn);var oc=q(Cn,2);Ci(oc,Su=>y(at,Su),()=>e(at));var Zf=q(oc,2),Wx=k(Zf);Oo(Wx,{size:16});var J_=q(Wx),VP=k(J_,!0);w(J_);var Qx=q(J_),HP=k(Qx,!0);w(Qx),w(Zf),w(qn),ie((Su,WP,QP)=>{W(Fo,`${Su??""} `),W(VP,WP),W(HP,QP)},[()=>(e(Z),x(()=>e(Z)("voice.referenceText"))),()=>(e(Z),x(()=>e(Z)("file.choose"))),()=>(e(_t),e(Z),x(()=>e(_t)?.name||e(Z)("file.none")))]),re("change",oc,Su=>It(Su.currentTarget.files?.[0]||null)),J(Rn,qn)};ve(Un,Rn=>{e(R),x(()=>e(R).family!=="auk")&&Rn(hs)})}w(gi),ie((Rn,qn,Cn,Fo)=>{W(Pi,`${Rn??""} `),W(yn,qn),W(Ga,Cn),W(nn,Fo)},[()=>(e(Z),x(()=>e(Z)("voice.reference"))),()=>(e(U),e(Z),x(()=>e(U)?e(Z)("voice.required"):e(Z)("voice.optional"))),()=>(e(Z),x(()=>e(Z)("file.choose"))),()=>(e(Be),e(Z),x(()=>e(Be)?.name||e(Z)("file.none")))]),re("change",Ma,Rn=>Ee(Rn.currentTarget.files?.[0]||null)),J(ci,gi)};ve(Da,ci=>{(!e(A)||!e(me))&&ci(dt)})}var qi=q(Da,2);{var La=ci=>{var gi=cz(),an=k(gi);{var fn=Gi=>{var yn=oz(),Ma=ht(yn),Aa=k(Ma,!0);w(Ma);var Wt=q(Ma,2),na=k(Wt,!0);w(Wt),ie((Ga,di)=>{W(Aa,Ga),W(na,di)},[()=>(e(Z),x(()=>e(Z)("request.stopRecording"))),()=>(e(Z),x(()=>e(Z)("voice.recording")))]),re("click",Ma,z_),J(Gi,yn)},Pi=Gi=>{var yn=lz(),Ma=ht(yn),Aa=k(Ma);ym(Aa,{size:14});var Wt=q(Aa,1,!0);w(Ma);var na=q(Ma,2),Ga=k(na,!0);w(na);var di=q(na,2);{var nn=Un=>{var hs=su(),Rn=k(hs,!0);w(hs),ie(()=>W(Rn,(e(Be),x(()=>e(Be).name)))),J(Un,hs)};ve(di,Un=>{e(Be)&&Un(nn)})}ie((Un,hs,Rn,qn)=>{Ma.disabled=Un,W(Wt,hs),na.disabled=Rn,W(Ga,qn)},[()=>(e(Qa),e(Ut),x(()=>!!e(Qa)||e(Ut))),()=>(e(Z),x(()=>e(Z)("request.recordMicrophone"))),()=>(e(me),e(Wi),e(Be),e(_t),e(Ie),x(()=>!e(me)&&!e(Wi)&&!e(Be)&&!e(_t)&&!e(Ie).trim())),()=>(e(Z),x(()=>e(Z)("voice.clearReference")))]),re("click",Ma,()=>M_("voice")),re("click",na,tt),J(Gi,yn)};ve(an,Gi=>{e(Zn)==="voice"?Gi(fn):Gi(Pi,-1)})}w(gi),J(ci,gi)};ve(qi,ci=>{(!e(A)||!e(me))&&ci(La)})}var Za=q(qi,2);{var Xi=ci=>{var gi=F2(),an=ht(gi);{let Gi=Nt(()=>(e(Z),x(()=>e(Z)("file.preview"))));ss(an,{get file(){return e(Be)},kind:"audio",get label(){return e(Gi)}})}var fn=q(an,2);{var Pi=Gi=>{var yn=dz(),Ma=ht(yn),Aa=k(Ma),Wt=q(Aa),na=k(Wt,!0);w(Wt),w(Ma);var Ga=q(Ma,2);sn(Ga),ie((di,nn,Un)=>{W(Aa,`${di??""} `),W(na,nn),_e(Ga,"placeholder",Un)},[()=>(e(Z),x(()=>e(Z)("voice.transcript"))),()=>(e(O),e(Z),x(()=>e(O)?e(Z)("voice.requiredClone"):e(Z)("voice.recommendedClone"))),()=>(e(Z),x(()=>e(Z)("voice.transcriptPlaceholder")))]),Sa(Ga,()=>e(Ie),di=>y(Ie,di)),J(Gi,yn)};ve(fn,Gi=>{e(R),x(()=>e(R).family!=="auk")&&Gi(Pi)})}J(ci,gi)};ve(Za,ci=>{(!e(A)||!e(me))&&ci(Xi)})}w(Tt),ie((ci,gi)=>{_e(Tt,"aria-label",ci),W(Ia,gi)},[()=>(e(Z),x(()=>e(Z)("voice.reference"))),()=>(e(Z),x(()=>e(Z)("voice.reference")))]),J(yt,Tt)};ve(Rx,yt=>{e(j),e(R),e(G),e(u),x(()=>(e(j)||e(R).family==="kugelaudio")&&!e(G)&&!e(u).voice)&&yt(RP)})}var Bx=q(Rx,2);{var BP=yt=>{var Tt=mz(),At=k(Tt),xt=k(At);El(xt,{size:17});var Ia=q(xt),Ba=q(Ia),xa=k(Ba,!0);w(Ba),w(At);var Ca=q(At,2);Ct(Ca,4,()=>[0,1,2,3],Qt,(qi,La)=>{var Za=fz(),Xi=k(Za),ci=k(Xi,!0);w(Xi);var gi=q(Xi,2);Ci(gi,(Ga,di)=>Et(gt,e(gt)[di]=Ga),Ga=>e(gt)?.[Ga],()=>[La]);var an=q(gi,2),fn=k(an),Pi=k(fn,!0);w(fn);var Gi=q(fn,2),yn=k(Gi,!0);w(Gi),w(an);var Ma=q(an,2),Aa=k(Ma),Wt=k(Aa,!0);w(Aa),w(Ma);var na=q(Ma,2);{let Ga=Nt(()=>(e(Z),x(()=>e(Z)("file.preview"))));ss(na,{get file(){return e(Re),x(()=>e(Re)[La])},kind:"audio",get label(){return e(Ga)}})}w(Za),ie((Ga,di,nn,Un)=>{_e(Xi,"for","vibevoice-speaker-"+La),W(ci,Ga),_e(gi,"id","vibevoice-speaker-"+La),_e(an,"for","vibevoice-speaker-"+La),W(Pi,di),W(yn,nn),Aa.disabled=(e(Re),x(()=>!e(Re)[La])),W(Wt,Un)},[()=>(e(Z),x(()=>e(Z)("voice.speaker",{number:La+1}))),()=>(e(Z),x(()=>e(Z)("file.choose"))),()=>(e(Re),e(Z),x(()=>e(Re)[La]?.name||e(Z)("file.none"))),()=>(e(Z),x(()=>e(Z)("file.clear")))]),re("change",gi,Ga=>Xe(La,Ga.currentTarget.files?.[0]||null)),re("click",Aa,()=>it(La)),J(qi,Za)}),w(Ca);var Da=q(Ca,2);{var dt=qi=>{var La=pz(),Za=ht(La),Xi=k(Za,!0);w(Za);var ci=q(Za,2);sn(ci),ie((gi,an)=>{W(Xi,gi),_e(ci,"placeholder",an)},[()=>(e(Z),x(()=>e(Z)("voice.transcript"))),()=>(e(Z),x(()=>e(Z)("voice.dialoguePlaceholder")))]),Sa(ci,()=>e(Ie),gi=>y(Ie,gi)),J(qi,La)};ve(Da,qi=>{e(R),x(()=>e(R).family==="moss_ttsd")&&qi(dt)})}w(Tt),ie((qi,La)=>{W(Ia,`${qi??""} `),W(xa,La)},[()=>(e(Z),x(()=>e(Z)("voice.speakerReferences"))),()=>(e(Z),x(()=>e(Z)("voice.upToFour")))]),J(yt,Tt)};ve(Bx,yt=>{e(G)&&yt(BP)})}var Px=q(Bx,2);{var PP=yt=>{{let Tt=Nt(()=>(e(he),e(R),x(()=>e(he)?.ui_management===!0&&!Ki(e(R))))),At=Nt(()=>e(Ae)||e(Le));mq(yt,{get specs(){return e(m)},get values(){return e(Ke)},get editable(){return e(Tt)},get busy(){return e(At)},onChange:ds,onBrowse:xt=>ki(e(_i),xt)})}};ve(Px,yt=>{e(m),x(()=>e(m).length)&&yt(PP)})}var jx=q(Px,2);{var jP=yt=>{var Tt=yz(),At=k(Tt),xt=k(At);sb(xt,{size:16});var Ia=q(xt),Ba=q(Ia),xa=k(Ba,!0);w(Ba),w(At);var Ca=q(At,2);Ct(Ca,5,()=>e(p),Qt,(Da,dt)=>{var qi=bz();let La;var Za=k(qi),Xi=k(Za,!0);w(Za);var ci=q(Za,2);{var gi=Aa=>{var Wt=gz(),na=k(Wt);Pt(na);var Ga=q(na,3,!0);w(Wt),ie((di,nn)=>{_e(na,"id",(e(dt),x(()=>"param-"+e(dt).name))),Cl(na,di),W(Ga,nn)},[()=>(e(Ke),e(dt),x(()=>!!e(Ke)[e(dt).name])),()=>(e(Ke),e(dt),e(Z),x(()=>e(Ke)[e(dt).name]?e(Z)("common.enabled"):e(Z)("common.disabled")))]),re("change",na,di=>ds(e(dt),di.currentTarget.checked)),J(Aa,Wt)},an=Aa=>{var Wt=hz();Ct(Wt,5,()=>(e(dt),x(()=>e(dt).choices||[])),Qt,(Ga,di)=>{var nn=nu(),Un=k(nn,!0);w(nn);var hs={};ie(()=>{W(Un,e(di)),hs!==(hs=e(di))&&(nn.value=(nn.__value=e(di))??"")}),J(Ga,nn)}),w(Wt);var na;Nn(Wt),ie(Ga=>{_e(Wt,"id",(e(dt),x(()=>"param-"+e(dt).name))),na!==(na=Ga)&&(Wt.value=(Wt.__value=Ga)??"",kn(Wt,Ga))},[()=>(e(Ke),e(dt),x(()=>String(e(Ke)[e(dt).name]??"")))]),re("change",Wt,Ga=>ds(e(dt),Ga.currentTarget.value)),J(Aa,Wt)},fn=Aa=>{var Wt=_z(),na=k(Wt);Pt(na);var Ga=q(na,2),di=k(Ga,!0);w(Ga),w(Wt),ie((nn,Un)=>{_e(na,"id",(e(dt),x(()=>"param-"+e(dt).name))),_e(na,"min",(e(dt),x(()=>e(dt).minimum))),_e(na,"max",(e(dt),x(()=>e(dt).maximum))),_e(na,"step",(e(dt),x(()=>e(dt).step))),bi(na,nn),W(di,Un)},[()=>(e(Ke),e(dt),x(()=>Number(e(Ke)[e(dt).name]??e(dt).default))),()=>(e(Ke),e(dt),x(()=>String(e(Ke)[e(dt).name])))]),re("input",na,nn=>ds(e(dt),nn.currentTarget.valueAsNumber)),J(Aa,Wt)},Pi=Aa=>{var Wt=vz();Pt(Wt),ie((na,Ga)=>{_e(Wt,"id",(e(dt),x(()=>"param-"+e(dt).name))),_e(Wt,"type",(e(dt),x(()=>e(dt).type==="number"?"number":"text"))),_e(Wt,"min",(e(dt),x(()=>e(dt).minimum))),_e(Wt,"max",(e(dt),x(()=>e(dt).maximum))),_e(Wt,"step",(e(dt),x(()=>e(dt).step))),bi(Wt,na),_e(Wt,"placeholder",Ga)},[()=>(e(Ke),e(dt),x(()=>String(e(Ke)[e(dt).name]??""))),()=>(e(dt),e(Z),x(()=>zs(e(dt),"placeholder",e(Z))))]),re("input",Wt,na=>ds(e(dt),e(dt).type!=="number"?na.currentTarget.value:na.currentTarget.value===""?"":na.currentTarget.valueAsNumber)),J(Aa,Wt)};ve(ci,Aa=>{e(dt),x(()=>e(dt).type==="bool")?Aa(gi):(e(dt),x(()=>e(dt).type==="choice")?Aa(an,1):(e(dt),x(()=>e(dt).type==="slider")?Aa(fn,2):Aa(Pi,-1)))})}var Gi=q(ci,2);{var yn=Aa=>{var Wt=G2(),na=k(Wt,!0);w(Wt),ie(Ga=>W(na,Ga),[()=>(e(dt),e(Z),x(()=>zs(e(dt),"info",e(Z))))]),J(Aa,Wt)},Ma=Va(()=>(e(dt),e(Z),x(()=>zs(e(dt),"info",e(Z)))));ve(Gi,Aa=>{e(Ma)&&Aa(yn)})}w(qi),ie(Aa=>{La=ya(qi,1,"",null,La,{wide:e(dt).type==="text"}),_e(Za,"for",(e(dt),x(()=>"param-"+e(dt).name))),W(Xi,Aa)},[()=>(e(dt),e(Z),x(()=>zs(e(dt),"label",e(Z))))]),J(Da,qi)}),w(Ca),w(Tt),ie(Da=>{W(Ia,`${Da??""} `),W(xa,(e(p),x(()=>e(p).length)))},[()=>(e(Z),x(()=>e(Z)("options.modelParameters")))]),J(yt,Tt)};ve(jx,yt=>{e(p),e(u),x(()=>e(p).length&&!e(u).params)&&yt(jP)})}var Nx=q(jx,2);{var NP=yt=>{var Tt=wz(),At=k(Tt),xt=k(At);Zv(xt,{size:16});var Ia=q(xt);zt(),w(At);var Ba=q(At,2);sn(Ba),w(Tt),ie(xa=>W(Ia,`${xa??""} `),[()=>(e(Z),x(()=>e(Z)("options.additional")))]),Sa(Ba,()=>e(wt),xa=>y(wt,xa)),J(yt,Tt)};ve(Nx,yt=>{e(u),x(()=>!e(u).advancedJson)&&yt(NP)})}var Ox=q(Nx,2),Jc=k(Ox),Ix=k(Jc);Mc(Ix,{size:15});var Dx=q(Ix),OP=k(Dx,!0);w(Dx),zt(2),w(Jc);var xu=q(Jc,2),Lx=k(xu);zc(Lx,{size:14});var IP=q(Lx,1,!0);w(xu);var Y_=q(xu,2);let Vx;var Hx=k(Y_);{var DP=yt=>{var Tt=kz(),At=k(Tt);w(Tt),ie((xt,Ia)=>{_e(Tt,"aria-label",xt),W(At,`${Ia??""} s ·`)},[()=>(e(Z),x(()=>e(Z)("run.elapsed"))),()=>(e(ea),x(()=>e(ea).toFixed(1)))]),J(yt,Tt)};ve(Hx,yt=>{e(Ae)&&yt(DP)})}var LP=q(Hx);w(Y_),w(Ox),ie((yt,Tt,At,xt,Ia,Ba)=>{W(Bi,yt),W(Ui,Tt),W(Ln,(e(R),x(()=>e(R)?.task))),Jc.disabled=!e(ge)||e(Ae)||e(Ge)||e(Fa)||e(v)||!e(d)&&(e(Pe)===!1||!e(o)),_e(Jc,"title",At),W(OP,xt),xu.disabled=!e(Ae),W(IP,Ia),Vx=ya(Y_,1,"status",null,Vx,{busy:e(Ae),warning:!e(Ae)&&e(ne)===e(Je),error:!e(Ae)&&e(ne)===e(ue)}),W(LP,` ${Ba??""}`)},[()=>(e(Z),x(()=>e(Z)("request.label"))),()=>(e(Z),x(()=>e(Z)("request.title"))),()=>(e(ge),e(Z),e(d),e(Pe),x(()=>e(ge)?!e(d)&&e(Pe)===!1?e(Z)("run.installModel"):"":e(Z)("run.chooseModel"))),()=>(e(Ae),e(Z),x(()=>e(Ae)?e(Z)("run.working"):e(Z)("run.run"))),()=>(e(Z),x(()=>e(Z)("run.cancel"))),()=>(e(ne),e(Z),x(()=>li(e(ne),e(Z))))]),re("change",mi,yt=>UB(yt.currentTarget.files?.[0]||null)),re("click",Jc,ox),re("click",xu,IB),J(Xt,qt)},D_=Xt=>{var qt=Sz(),ba=ht(qt),Ht=k(ba),_a=k(Ht),Bi=k(_a,!0);w(_a);var xi=q(_a),Ui=k(xi,!0);w(xi),w(Ht),w(ba);var Ri=q(ba,2),Ii=k(Ri),Ln=k(Ii,!0);w(Ii),w(Ri),ie((gs,es,mi)=>{W(Bi,gs),W(Ui,es),W(Ln,mi)},[()=>(e(Z),x(()=>e(Z)("request.label"))),()=>(e(Z),x(()=>e(Z)("studio.noModel"))),()=>(e(Z),x(()=>e(Z)("studio.chooseInstalled")))]),J(Xt,qt)};ve(vu,Xt=>{e(ge)?Xt(I_):Xt(D_,-1)})}w(sc);var Kf=q(sc,2),bu=k(Kf),yu=k(bu),L_=k(yu),gP=k(L_,!0);w(L_);var Tx=q(L_),hP=k(Tx,!0);w(Tx),w(yu);var $x=q(yu,2);{var _P=Xt=>{var qt=Tz(),ba=k(qt,!0);w(qt),ie(Ht=>{_e(qt,"href",(e(za),x(()=>e(za).url))),_e(qt,"download",(e(za),x(()=>e(za).filename))),W(ba,Ht)},[()=>(e(Z),x(()=>e(Z)("settings.save")))]),J(Xt,qt)};ve($x,Xt=>{e(za)&&Xt(_P)})}var vP=q($x,2);{var bP=Xt=>{var qt=$z(),ba=k(qt);w(qt),ie(Ht=>W(ba,`${e(nt),x(()=>e(nt).length)??""} ${Ht??""}`),[()=>(e(nt),e(Z),x(()=>e(nt).length===1?e(Z)("result.track"):e(Z)("result.tracks")))]),J(Xt,qt)};ve(vP,Xt=>{e(nt),x(()=>e(nt).length)&&Xt(bP)})}w(bu);var qx=q(bu,2);{var yP=Xt=>{var qt=M2();Ct(qt,5,()=>e(nt),Qt,(ba,Ht)=>{var _a=qz(),Bi=k(_a),xi=k(Bi),Ui=k(xi,!0);w(xi);var Ri=q(xi),Ii=k(Ri,!0);w(Ri),w(Bi);var Ln=q(Bi,2);w(_a),ie(gs=>{W(Ui,(e(Ht),x(()=>e(Ht).id))),_e(Ri,"href",(e(Ht),x(()=>e(Ht).url))),_e(Ri,"download",(e(St),e(Kt),e(Ht),x(()=>`${e(St)}-${e(Kt)||"output"}-${e(Ht).id}.wav`))),W(Ii,gs),_e(Ln,"src",(e(Ht),x(()=>e(Ht).url)))},[()=>(e(Z),x(()=>e(Z)("result.saveWav")))]),J(ba,_a)}),w(qt),J(Xt,qt)};ve(qx,Xt=>{e(nt),x(()=>e(nt).length)&&Xt(yP)})}var Cx=q(qx,2);{var wP=Xt=>{var qt=M2();Ct(qt,5,()=>e(Lt),Qt,(ba,Ht)=>{var _a=Cz(),Bi=k(_a),xi=k(Bi),Ui=k(xi,!0);w(xi);var Ri=q(xi),Ii=k(Ri,!0);w(Ri),w(Bi);var Ln=q(Bi,2);{var gs=mi=>{{let tr=Nt(()=>(e(R),e(Ht),x(()=>`${e(R).id}-${e(Ht).id}.${e(Ht).extension}`))),Kc=Nt(()=>(e(Z),x(()=>e(Z)("result.videoPreview"))));ss(mi,{get src(){return e(Ht),x(()=>e(Ht).url)},get name(){return e(tr)},kind:"video",get label(){return e(Kc)}})}},es=Va(()=>(e(Ht),x(()=>e(Ht).mime.startsWith("video/"))));ve(Ln,mi=>{e(es)&&mi(gs)})}w(_a),ie(mi=>{W(Ui,(e(Ht),x(()=>e(Ht).id))),_e(Ri,"href",(e(Ht),x(()=>e(Ht).url))),_e(Ri,"download",(e(St),e(Kt),e(Ht),x(()=>`${e(St)}-${e(Kt)||"output"}-${e(Ht).id}.${e(Ht).extension}`))),W(Ii,mi)},[()=>(e(Z),e(Ht),x(()=>e(Z)("result.saveArtifact",{format:e(Ht).extension.toUpperCase()})))]),J(ba,_a)}),w(qt),J(Xt,qt)};ve(Cx,Xt=>{e(Lt),x(()=>e(Lt).length)&&Xt(wP)})}var Ax=q(Cx,2);{var kP=Xt=>{var qt=Az(),ba=q(k(qt)),Ht=k(ba,!0);w(ba),w(qt),ie(_a=>W(Ht,_a),[()=>(e(Z),x(()=>e(Z)("result.empty")))]),J(Xt,qt)};ve(Ax,Xt=>{e(nt),e(Lt),x(()=>!e(nt).length&&!e(Lt).length)&&Xt(kP)})}var Gx=q(Ax,2);{var xP=Xt=>{var qt=Gz();sn(qt),ie(()=>bi(qt,e(Gt))),J(Xt,qt)};ve(Gx,Xt=>{e(Gt)&&Xt(xP)})}var Fx=q(Gx,2);{var SP=Xt=>{var qt=Fz(),ba=q(k(qt)),Ht=k(ba,!0);w(ba),w(qt),ie(()=>W(Ht,e(jt))),J(Xt,qt)};ve(Fx,Xt=>{e(jt)&&Xt(SP)})}var TP=q(Fx,2);{var $P=Xt=>{var qt=Ez(),ba=k(qt),Ht=k(ba),_a=q(Ht),Bi=k(_a);w(_a),w(ba);var xi=q(ba,2);{var Ui=es=>{var mi=Mz(),tr=k(mi,!0);w(mi),ie(()=>W(tr,e(wa))),J(es,mi)};ve(xi,es=>{e(wa)&&es(Ui)})}var Ri=q(xi,2),Ii=k(Ri),Ln=k(Ii,!0);w(Ii),w(Ri);var gs=q(Ri,2);Ct(gs,5,()=>e(sa),es=>es.id,(es,mi)=>{var tr=zz();let Kc;var Go=k(tr),wu=k(Go),V_=k(wu,!0);w(wu);var ku=q(wu,2),Yf=k(ku),H_=q(Yf);{var W_=gl=>{var Yc=Bp();ie(rc=>W(Yc,`· ${rc??""} ${e(mi),x(()=>e(mi).seed)??""}`),[()=>(e(Z),x(()=>e(Z)("request.seed")))]),J(gl,Yc)},Jf=Va(()=>(e(mi),x(()=>["gen","tts","clon","vdes"].includes(e(mi).task))));ve(H_,gl=>{e(Jf)&&gl(W_)})}w(ku),w(Go);var ml=q(Go,2),Q_=k(ml,!0);w(ml),w(tr),ie((gl,Yc,rc,Xf,K_)=>{Kc=ya(tr,1,"",null,Kc,{active:e(Kt)===e(mi).id}),_e(Go,"aria-pressed",(e(Kt),e(mi),x(()=>e(Kt)===e(mi).id))),Go.disabled=e(Fa),W(V_,(e(mi),x(()=>e(mi).label))),W(Yf,`${gl??""} · ${Yc??""}`),_e(ml,"title",rc),ml.disabled=e(Fa),_e(ml,"aria-label",Xf),W(Q_,K_)},[()=>(e(mi),x(()=>new Date(e(mi).createdAt).toLocaleTimeString())),()=>(e(mi),x(()=>cs(e(mi).task))),()=>(e(Z),e(mi),x(()=>e(Z)("history.deleteRun",{id:e(mi).id}))),()=>(e(Z),e(mi),x(()=>e(Z)("history.deleteRun",{id:e(mi).id}))),()=>(e(Z),x(()=>e(Z)("common.delete")))]),re("click",Go,()=>on(e(mi),!0)),re("click",ml,()=>Rs(e(mi).id)),J(es,tr)}),w(gs),w(qt),ie((es,mi)=>{W(Ht,`${es??""} `),W(Bi,`${e(sa),x(()=>e(sa).length)??""}/${i(),x(()=>i().historyLimit)??""}`),Ii.disabled=e(Fa),W(Ln,mi)},[()=>(e(Z),x(()=>e(Z)("history.title"))),()=>(e(Z),x(()=>e(Z)("history.clear")))]),re("click",Ii,Js),J(Xt,qt)};ve(TP,Xt=>{e(sa),x(()=>e(sa).length)&&Xt($P)})}w(Kf),w(xr),ie((Xt,qt,ba,Ht,_a,Bi,xi,Ui,Ri,Ii,Ln,gs)=>{_e(se,"aria-label",Xt),W(la,qt),W(Mt,ba),W(Ss,Ht),fs=ya(cn,1,"studio-model-status",null,fs,{ready:e(d)}),W(Xs,_a),_e(Sr,"aria-label",Bi),W($n,xi),Ji.disabled=e(D)||e(Fa),W(Zs,Ui),ic=ya(er,1,"",null,ic,{good:e(Pe)===!0,bad:e(Pe)===!1}),W(Ao,Ri),W(fl,Ii),W(gP,Ln),W(hP,gs)},[()=>(e(Z),x(()=>e(Z)("nav.workflows"))),()=>(e(Z),x(()=>e(Z)("studio.eyebrow"))),()=>(e(ge),e(R),e(Z),x(()=>e(ge)?cs(e(R)?.task,e(Z),e(R)):e(Z)("studio.title"))),()=>(e(Z),e(Sn),x(()=>e(Z)(`studio.subtitle.${e(Sn)==="conversion"?"vc":e(Sn)==="separation"?"sep":e(Sn)}`))),()=>(e(ge),e(d),e(Z),e(Pe),x(()=>e(ge)?e(d)?e(Z)("studio.resident"):e(Pe)===!1?e(Z)("studio.notInstalled"):e(Z)("studio.available"):e(Z)("studio.chooseInstalled"))),()=>(e(Z),x(()=>e(Z)("studio.model"))),()=>(e(Z),x(()=>e(Z)("studio.model"))),()=>(e(Z),x(()=>e(Z)("studio.noModel"))),()=>(e(ge),e(Z),e(Pe),x(()=>e(ge)?e(Pe)===!0?e(Z)("studio.pathFound"):e(Pe)===!1?e(Z)("studio.pathMissing"):e(Z)("studio.pathUnknown"):e(Z)("studio.noModel"))),()=>(e(ge),e(Z),e(R),x(()=>e(ge)?e(Z)("studio.estimatedVram",{value:e(R)?.min_vram_gb||"?"}):e(Z)("studio.vram"))),()=>(e(Z),x(()=>e(Z)("result.label"))),()=>(e(Z),x(()=>e(Z)("result.title")))]),ur(Ji,()=>e(ge),Xt=>y(ge,Xt)),re("change",Ji,Xt=>kr(Xt.currentTarget.value)),J(I,te)},lP=I=>{Ci(Q7(I,{get activeCatalog(){return e(rn)},get loadedModels(){return e(Te)},get savedVoices(){return e(Hi)},get server(){return e(he)},get modelsFolder(){return e(_i)},get maxTokens(){return e(rt)},entrySelectable:ra,studioPackageSlots:Oa,packageIsAvailable:ha,supportsMaxTokens:ia,supportsRequestOption:Ua,requiresRequestOption:Vt,refresh:En,log:pi,get tr(){return e(Z)},$$legacy:!0}),te=>y(le,te),()=>e(le))},cP=I=>{{let te=Nt(()=>(e(Z),x(()=>eo.map(se=>({id:se.id,label:Qn(se.id,se.filterLabel,e(Z))})))));q9(I,{get groups(){return e(Dc)},get packageSizes(){return e($t)},get installJobs(){return e(ta)},get packageSizeState(){return e(Ot)},get modelsFolder(){return e(_i)},get modelsFolderHistory(){return e(va)},get defaultModelsFolder(){return e(Ea)},get applyingModelsFolder(){return e(Ce)},get modelsFolderIsDefault(){return e(Ye)},openFolderBrowser:ki,applyModelsFolder:lu,installPackage:LB,removePackage:WB,stopPackageDownload:VB,cleanPartialDownload:HB,formatBytes:$o,installProgressLabel:ni,workflowForEntry:aa,taskLabel:se=>cs(se.task,e(Z),se),get workflows(){return e(te)},openModel:(se,ke)=>{ke&&Qs(se,ke),kr(se.id),y(X,"studio")},get modelsFolderInput(){return e(Ja)},set modelsFolderInput(se){y(Ja,se)},$$legacy:!0})}},dP=I=>{Ci(AM(I,{onchange:async()=>{await Hf(),e(Wi)&&!e(Hi).some(te=>te.id===e(Wi))&&y(Wi,"")},ontext:async te=>{await Hf(),Lc("tts"),nx(te.id),y(X,"studio")},$$legacy:!0}),te=>y(ee,te),()=>e(ee))},uP=I=>{o9(I,{get tr(){return e(Z)}})},fP=I=>{var te=Rz(),se=ht(te),ke=k(se),Oe=k(ke,!0);w(ke);var kt=q(ke),la=k(kt,!0);w(kt);var Dt=q(kt),Mt=k(Dt,!0);w(Dt),w(se);var vn=q(se,2),Ss=k(vn),cn=k(Ss),fs=k(cn),Xs=k(fs,!0);w(fs);var xr=q(fs),Sr=k(xr,!0);w(xr),w(cn);var Ts=q(cn,2),Ka=k(Ts),$n=k(Ka,!0);w(Ka);var Ji=q(Ka),si=k(Ji,!0);w(Ji),w(Ts);var Zs=q(Ts,2),$s=k(Zs),ps=k($s,!0);w($s);var er=q($s),ic=k(er,!0);w(er),w(Zs);var Ao=q(Zs,2),ul=k(Ao),fl=k(ul,!0);w(ul);var pl=q(ul),bn=k(pl,!0);w(pl),w(Ao),w(Ss);var tn=q(Ss,2),qs=k(tn,!0);w(tn);var Kn=q(tn,2),ms=k(Kn,!0);w(Kn),w(vn),ie((Tr,nc,_u,sc,vu,I_,D_,Kf,bu,yu)=>{W(Oe,Tr),W(la,nc),W(Mt,_u),W(Xs,sc),W(Sr,(e(he),x(()=>e(he)?.status||"offline"))),W($n,vu),W(si,(e(he),x(()=>e(he)?.backend||"—"))),W(ps,I_),W(ic,(e(Te),x(()=>e(Te).length))),W(fl,D_),W(bn,Kf),W(qs,bu),W(ms,yu)},[()=>(e(Z),x(()=>e(Z)("runtime.eyebrow"))),()=>(e(Z),x(()=>e(Z)("runtime.title"))),()=>(e(Z),x(()=>e(Z)("runtime.subtitle"))),()=>(e(Z),x(()=>e(Z)("runtime.status"))),()=>(e(Z),x(()=>e(Z)("runtime.backend"))),()=>(e(Z),x(()=>e(Z)("runtime.registered"))),()=>(e(Z),x(()=>e(Z)("runtime.resident"))),()=>(e(Te),x(()=>e(Te).filter(Tr=>Tr.loaded).length)),()=>(e(Z),x(()=>e(Z)("runtime.serverLogNotice"))),()=>(e(hn),e(Z),x(()=>e(hn).length?e(hn).join(` +`):e(Z)("runtime.noEvents")))]),J(I,te)};ve(rP,I=>{e(X)==="studio"?I(oP):e(X)==="arena"?I(lP,1):e(X)==="models"?I(cP,2):e(X)==="library"?I(dP,3):e(X)==="configuration"?I(uP,4):e(X)!=="apps"&&I(fP,5)})}w(O_);var kx=q(O_,2);{var pP=I=>{var te=Oz(),se=k(te),ke=k(se),Oe=k(ke),kt=k(Oe),la=k(kt,!0);w(kt);var Dt=q(kt),Mt=k(Dt,!0);w(Dt),w(Oe);var vn=q(Oe,2),Ss=k(vn,!0);w(vn),w(ke);var cn=q(ke,2),fs=k(cn,!0);w(cn);var Xs=q(cn,2);{var xr=bn=>{var tn=Bz();Ct(tn,5,()=>(e(oa),x(()=>e(oa).roots)),Qt,(qs,Kn)=>{var ms=Of(),Tr=k(ms,!0);w(ms),ie(()=>W(Tr,e(Kn))),re("click",ms,()=>ki(e(Kn),e(ii))),J(qs,ms)}),w(tn),J(bn,tn)};ve(Xs,bn=>{e(oa),x(()=>e(oa)?.roots.length)&&bn(xr)})}var Sr=q(Xs,2),Ts=k(Sr),Ka=k(Ts,!0);w(Ts);var $n=q(Ts,2),Ji=k($n,!0);w($n),w(Sr);var si=q(Sr,2);{var Zs=bn=>{var tn=Pz(),qs=k(tn,!0);w(tn),ie(()=>W(qs,e(Ta))),J(bn,tn)},$s=bn=>{var tn=z2(),qs=k(tn,!0);w(tn),ie(Kn=>W(qs,Kn),[()=>(e(Z),x(()=>e(Z)("folder.loadingFolders")))]),J(bn,tn)},ps=bn=>{var tn=Nz();Ct(tn,5,()=>(e(oa),x(()=>e(oa).directories)),Qt,(qs,Kn)=>{var ms=jz(),Tr=q(k(ms)),nc=k(Tr,!0);w(Tr),w(ms),ie(()=>{_e(ms,"title",(e(Kn),x(()=>e(Kn).path))),W(nc,(e(Kn),x(()=>e(Kn).name)))}),re("click",ms,()=>ki(e(Kn).path,e(ii))),J(qs,ms)}),w(tn),J(bn,tn)},er=bn=>{var tn=z2(),qs=k(tn,!0);w(tn),ie(Kn=>W(qs,Kn),[()=>(e(Z),x(()=>e(Z)("folder.empty")))]),J(bn,tn)};ve(si,bn=>{e(Ta)?bn(Zs):e(Ft)?bn($s,1):(e(oa),x(()=>e(oa)?.directories.length)?bn(ps,2):bn(er,-1))})}var ic=q(si,2),Ao=k(ic),ul=k(Ao,!0);w(Ao);var fl=q(Ao,2),pl=k(fl,!0);w(fl),w(ic),w(se),w(te),ie((bn,tn,qs,Kn,ms,Tr,nc,_u,sc,vu)=>{W(la,bn),W(Mt,tn),_e(vn,"aria-label",qs),_e(vn,"title",Kn),W(Ss,ms),W(fs,Tr),Ts.disabled=(e(oa),e(Ft),x(()=>!e(oa)?.parent||e(Ft))),W(Ka,nc),$n.disabled=e(Ft),W(Ji,_u),W(ul,sc),fl.disabled=!e(oa)||e(Ft),W(pl,vu)},[()=>(e(Z),x(()=>e(Z)("folder.eyebrow"))),()=>(e(ii),e(Z),x(()=>e(ii)?"Select LoRA adapter directory":e(Z)("folder.title"))),()=>(e(Z),x(()=>e(Z)("folder.closeLabel"))),()=>(e(Z),x(()=>e(Z)("common.close"))),()=>(e(Z),x(()=>e(Z)("common.close"))),()=>(e(oa),e(Z),x(()=>e(oa)?.current||e(Z)("folder.loading"))),()=>(e(Z),x(()=>e(Z)("folder.up"))),()=>(e(Z),x(()=>e(Z)("common.refresh"))),()=>(e(Z),x(()=>e(Z)("common.cancel"))),()=>(e(ii),e(Z),x(()=>e(ii)?"Use adapter folder":e(Z)("folder.select")))]),re("click",vn,()=>y(pt,!1)),re("click",Ts,()=>ki(e(oa)?.parent||"",e(ii))),re("click",$n,()=>ki(e(oa)?.current||"",e(ii))),re("click",Ao,()=>y(pt,!1)),re("click",fl,un),J(I,te)};ve(kx,I=>{e(pt)&&I(pP)})}var xx=q(kx,2),Sx=q(k(xx)),mP=k(Sx,!0);w(Sx),w(xx),ie((I,te,se,ke,Oe,kt,la,Dt,Mt,vn,Ss,cn,fs,Xs,xr)=>{W(QB,I),_e(Qf,"aria-label",te),ux=ya(pu,1,"",null,ux,{active:e(X)==="studio"}),W(KB,se),Wc.disabled=ke,fx=ya(Wc,1,"",null,fx,{active:e(X)==="apps"}),W(YB,Oe),px=ya(mu,1,"",null,px,{active:e(X)==="arena"}),W(JB,kt),Qc.disabled=la,mx=ya(Qc,1,"",null,mx,{active:e(X)==="library"}),W(XB,Dt),hx=ya(gu,1,"",null,hx,{active:e(X)==="logs"}),W(eP,Mt),hu.disabled=e(Fa),_x=ya(hu,1,"",null,_x,{active:e(X)==="configuration"}),W(tP,vn),W(aP,Ss),_e(cl,"aria-label",cn),vx!==(vx=e(De))&&(cl.value=(cl.__value=e(De))??"",kn(cl,e(De))),W(iP,fs),_e(dl,"aria-label",Xs),bx!==(bx=e(ft))&&(dl.value=(dl.__value=e(ft))??"",kn(dl,e(ft))),yx=ya(N_,1,"server-pill",null,yx,{online:e(he)?.status==="ok"}),W(nP,(e(he),x(()=>e(he)?.backend||"offline"))),W(mP,xr)},[()=>(e(Z),x(()=>e(Z)("app.nativeStudio"))),()=>(e(Z),x(()=>e(Z)("nav.primary"))),()=>(e(Z),x(()=>e(Z)("nav.studio"))),()=>(e(Ae),e(Le),e(Fa),e(Qa),e(Ut),x(()=>e(Ae)||e(Le)||e(Fa)||!!e(Qa)||e(Ut))),()=>(e(Z),x(()=>e(Z)("nav.apps"))),()=>(e(Z),x(()=>e(Z)("nav.arena"))),()=>(e(Ae),e(Fa),e(Qa),e(Ut),x(()=>e(Ae)||e(Fa)||!!e(Qa)||e(Ut))),()=>(e(Z),x(()=>e(Z)("nav.library"))),()=>(e(Z),x(()=>e(Z)("nav.runtime"))),()=>(e(Z),x(()=>e(Z)("nav.configuration"))),()=>(e(Z),x(()=>e(Z)("language.label"))),()=>(e(Z),x(()=>e(Z)("language.label"))),()=>(e(Z),x(()=>e(Z)("theme.label"))),()=>(e(Z),x(()=>e(Z)("theme.label"))),()=>(e(Z),x(()=>e(Z)("footer.embedded")))]),re("click",pu,ec),re("click",Wc,()=>uu("apps")),re("click",mu,()=>uu("arena")),re("click",Qc,()=>uu("library")),re("click",gu,()=>uu("logs")),re("click",hu,()=>uu("configuration")),re("change",cl,I=>zn(I.currentTarget.value)),re("change",dl,I=>Ur(I.currentTarget.value)),J(a,lx),Mi(),s()}const Lz=Object.freeze(Object.defineProperty({__proto__:null,component:Dz},Symbol.toStringTag,{value:"Module"})),Vz=Object.freeze(Object.defineProperty({__proto__:null,default:({status:a,message:t})=>` @@ -138,46 +138,46 @@

            `+t+`

            -`},Symbol.toStringTag,{value:"Module"}));function Hz(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var q0,E2;function Wz(){if(E2)return q0;E2=1;var a="6.7.0";return q0=a,q0}var C0,U2;function A0(){if(U2)return C0;U2=1;var a=function(i,n){var s=this;n||(n={}),s.qpm=n.qpm?parseInt(n.qpm,10):null,s.extraMeasuresAtBeginning=n.extraMeasuresAtBeginning?parseInt(n.extraMeasuresAtBeginning,10):0,s.beatCallback=n.beatCallback,s.eventCallback=n.eventCallback,s.lineEndCallback=n.lineEndCallback,s.lineEndAnticipation=n.lineEndAnticipation?parseInt(n.lineEndAnticipation,10):0,s.beatSubdivisions=n.beatSubdivisions?parseInt(n.beatSubdivisions,10):1,s.beatSubdivisions||(s.beatSubdivisions=1),s.joggerTimer=null,s.replaceTarget=function(o){if(!n.qpm){var l=o.metaText?o.metaText.tempo:null;s.qpm=o.getBpm(l)}if(s.noteTimings=o.setTiming(s.qpm,s.extraMeasuresAtBeginning),o.noteTimings.length===0&&(s.noteTimings=o.setTiming(0,0)),s.lineEndCallback&&(s.lineEndTimings=t(o.noteTimings,s.lineEndAnticipation)),s.startTime=null,s.currentBeat=0,s.currentEvent=0,s.currentLine=0,s.currentTime=0,s.isPaused=!1,s.isRunning=!1,s.pausedPercent=null,s.justUnpaused=!1,s.newSeekPercent=0,s.lastTimestamp=0,s.noteTimings.length!==0){s.millisecondsPerBeat=1e3/(s.qpm/60)/s.beatSubdivisions,s.lastMoment=s.noteTimings[s.noteTimings.length-1].milliseconds;var c=o.getMeter(),d="";if(c&&c.type==="specified"&&c.value&&c.value.length>0&&c.value[0].num.indexOf("+")>0&&(d=c.value[0].num),s.beatStarts=[],d){for(var g=s.noteTimings[s.noteTimings.length-1].millisecondsPerMeasure,h=s.lastMoment/g,m=d.split("+"),p=0;ps.currentEvent&&s.noteTimings[s.currentEvent].millisecondss.currentLine&&s.lineEndTimings[s.currentLine].milliseconds=s.lastMoment)if(s.eventCallback){var h=s.eventCallback(null);s.shouldStop(h).then(function(m){m&&s.stop()})}else s.stop()}},s.shouldStop=function(o){return new Promise(function(l){if(!o)return l(!0);if(o==="continue")return l(!1);o.then&&o.then(function(c){l(c!=="continue")})})},s.doBeatCallback=function(o){if(s.beatCallback){for(var l=s.currentEvent;l=0&&s.noteTimings[l].left===null;)l--;d=s.noteTimings[l]}var g={},h={};if(d){g.top=d.top,g.height=d.height;var m=Math.max(0,o-s.startTime-d.milliseconds),p=c-d.milliseconds,u=d.endX-d.left,f=p?m*u/p:0;g.left=d.left+f,s.currentEvent===0&&d.milliseconds>o-s.startTime&&(g.left=void 0),h={timestamp:o,startTime:s.startTime,ev:d,endMs:c,offMs:m,offPx:f,gapMs:p,gapPx:u}}else h={timestamp:o,startTime:s.startTime};if(s.currentBeat<0||s.currentBeat>=s.beatStarts.length||!s.beatStarts[s.currentBeat]){var _={currentBeat:s.currentBeat,beatStartLength:s.beatStarts.length,totalBeats:s.totalBeats,startTime:s.startTime,currentTime:s.currentTime,lastMoment:s.lastMoment,lastTimestamp:s.lastTimestamp,qpm:s.qpm,millisecondsPerBeat:s.millisecondsPerBeat,beatSubdivisions:s.beatSubdivisions,currentEvent:s.currentEvent,currentLine:s.currentLine,isPaused:s.isPaused,isRunning:s.isRunning,pausedPercent:s.pausedPercent,justUnpaused:s.justUnpaused,newSeekPercent:s.newSeekPercent};setTimeout(function(){throw new Error("abcjs-timing-callback error: "+JSON.stringify(_))},1)}else{var b=s.startTime;if(s.beatCallback(s.beatStarts[s.currentBeat].b,s.totalBeats/s.beatSubdivisions,s.lastMoment,g,h),b!==s.startTime)return o-s.startTime}}return null};var r=60;s.animationJogger=function(){s.isRunning&&(s.doTiming(performance.now()),s.joggerTimer=setTimeout(s.animationJogger,r))},s.start=function(o,l){if(s.isRunning=!0,s.isPaused&&(s.isPaused=!1,o===void 0&&(s.justUnpaused=!0)),o)s.setProgress(o,l);else if(o===0)s.reset();else if(s.pausedPercent!==null){var c=performance.now();s.currentTime=s.lastMoment*s.pausedPercent,s.startTime=c-s.currentTime,s.pausedPercent=null,s.reportNext=!0}requestAnimationFrame(s.doTiming),s.joggerTimer=setTimeout(s.animationJogger,r)},s.pause=function(){s.isPaused=!0;var o=performance.now();s.pausedPercent=(o-s.startTime)/s.lastMoment,s.isRunning=!1,s.joggerTimer&&(clearTimeout(s.joggerTimer),s.joggerTimer=null)},s.currentMillisecond=function(){return s.currentTime},s.reset=function(){s.currentBeat=0,s.currentEvent=0,s.currentLine=0,s.startTime=null,s.pausedPercent=null},s.stop=function(){s.pause(),s.reset()},s.setProgress=function(o,l){var c;switch(l){case"seconds":s.currentTime=o*1e3,s.currentTime<0&&(s.currentTime=0),s.currentTime>s.lastMoment&&(s.currentTime=s.lastMoment),c=s.currentTime/s.lastMoment;break;case"beats":s.currentTime=o*s.millisecondsPerBeat*s.beatSubdivisions,s.currentTime<0&&(s.currentTime=0),s.currentTime>s.lastMoment&&(s.currentTime=s.lastMoment),c=s.currentTime/s.lastMoment;break;default:c=o,c<0&&(c=0),c>1&&(c=1),s.currentTime=s.lastMoment*c;break}s.isRunning||(s.pausedPercent=c);var d=performance.now();for(s.startTime=d-s.currentTime,s.currentEvent=0;s.noteTimings.length>s.currentEvent&&s.noteTimings[s.currentEvent].millisecondss.currentLine&&s.lineEndTimings[s.currentLine].milliseconds+s.lineEndAnticipations.currentTime);s.currentBeat++);s.currentBeat--,s.beatCallback&&g!==s.currentBeat&&(s.doBeatCallback(s.startTime+s.currentTime),s.currentBeat++),s.eventCallback&&s.currentEvent>=0&&s.noteTimings[s.currentEvent].type==="event"&&s.eventCallback(s.noteTimings[s.currentEvent]),s.lineEndCallback&&s.lineEndCallback(s.lineEndTimings[s.currentLine],s.noteTimings[s.currentEvent],{line:s.currentLine,endTimings:s.lineEndTimings}),s.joggerTimer=setTimeout(s.animationJogger,r)}};function t(i,n){for(var s=[],r=null,o=0;o=0&&t.lastIndexOf(i)===n},a.last=function(t){return t.length===0?null:t[t.length-1]},F0=a,F0}var M0,P2;function z0(){if(P2)return M0;P2=1;var a=Kr(),t={};return(function(){var i,n,s,r,o;t.initialize=function($,F,z,L,Q){i=$,n=F,s=z,r=L,o=Q,l()};function l(){s.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},s.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},s.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},s.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},s.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},s.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},s.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},s.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},s.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},s.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},s.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},r.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},r.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},r.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},r.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},r.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},r.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},r.formatting.annotationfont=s.annotationfont,r.formatting.gchordfont=s.gchordfont,r.formatting.historyfont=s.historyfont,r.formatting.infofont=s.infofont,r.formatting.measurefont=s.measurefont,r.formatting.partsfont=s.partsfont,r.formatting.repeatfont=s.repeatfont,r.formatting.textfont=s.textfont,r.formatting.tripletfont=s.tripletfont,r.formatting.vocalfont=s.vocalfont,r.formatting.wordsfont=s.wordsfont}var c={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},d=function($){switch($){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}},g=function($,F,z,L,Q){function Z(){var nt=parseInt($[0].token);return $.shift(),F?$.length===0?{face:F.face,weight:F.weight,style:F.style,decoration:F.decoration,size:nt}:$.length===1&&$[0].token==="box"&&c[Q]?{face:F.face,weight:F.weight,style:F.style,decoration:F.decoration,size:nt,box:!0}:(n("Extra parameters in font definition.",z,L),{face:F.face,weight:F.weight,style:F.style,decoration:F.decoration,size:nt}):(n("Can't set just the size of the font since there is no default value.",z,L),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:nt})}if($[0].token==="*"){if($.shift(),$[0].type==="number")return Z();n("Expected font size number after *.",z,L)}if($[0].type==="number")return Z();for(var ee=[],oe,fe="normal",le="normal",ge="none",R=!1,we="face",ce=!1;$.length;){var Te=$.shift(),he=Te.token.toLowerCase();switch(we){case"face":ce||he!=="utf"&&Te.type!=="number"&&he!=="bold"&&he!=="italic"&&he!=="underline"&&he!=="box"?ee.length>0&&Te.token==="-"?(ce=!0,ee[ee.length-1]=ee[ee.length-1]+Te.token):ce?(ce=!1,ee[ee.length-1]=ee[ee.length-1]+Te.token):ee.push(Te.token):Te.type==="number"?(oe?n("Font size specified twice in font definition.",z,L):oe=Te.token,we="modifier"):he==="bold"?fe="bold":he==="italic"?le="italic":he==="underline"?ge="underline":he==="box"?(c[Q]?R=!0:n(`This font style doesn't support "box"`,z,L),we="finished"):he==="utf"?(Te=$.shift(),we="size"):n("Unknown parameter "+Te.token+" in font definition.",z,L);break;case"size":Te.type==="number"?oe?n("Font size specified twice in font definition.",z,L):oe=Te.token:n("Expected font size in font definition.",z,L),we="modifier";break;case"modifier":he==="bold"?fe="bold":he==="italic"?le="italic":he==="underline"?ge="underline":he==="box"?(c[Q]?R=!0:n(`This font style doesn't support "box"`,z,L),we="finished"):n("Unknown parameter "+Te.token+" in font definition.",z,L);break;case"finished":n('Extra characters found after "box" in font definition.',z,L);break}}oe===void 0?F?oe=F.size:(n("Must specify the size of the font since there is no default value.",z,L),oe=12):oe=parseFloat(oe),ee=ee.join(" "),ee===""&&(F?ee=F.face:(n("Must specify the name of the font since there is no default value.",z,L),ee="sans-serif"));var je=d(ee),Le={};return je?(Le.face=je.face,Le.weight=je.weight,Le.style=je.style,Le.decoration=je.decoration,Le.size=oe,R&&(Le.box=!0),Le):(Le.face=ee,Le.weight=fe,Le.style=le,Le.decoration=ge,Le.size=oe,R&&(Le.box=!0),Le)},h=function($,F,z){return F.length===0?'Directive "'+$+'" requires a font as a parameter.':(s[$]=g(F,s[$],z,0,$),s.is_in_header&&(r.formatting[$]=s[$]),null)},m=function($,F,z){return F.length===0?'Directive "'+$+'" requires a font as a parameter.':(r.formatting[$]=g(F,r.formatting[$],z,0,$),null)},p=function($,F){var z="";F.forEach(function(Q){z+=Q.token});var L=parseFloat(z);if(isNaN(L)||L===0)return'Directive "'+$+'" requires a number as a parameter.';r.formatting.scale=L},u=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],f=function($){var F=$.split(/\s+/);if(F.length!==2&&F.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var z=F[0],L=parseInt(F[1],10);if((isNaN(L)||L<35||L>81)&&F[1]&&(L=u.indexOf(F[1].toLowerCase())+35),isNaN(L)||L<35||L>81)return{error:'Expected drum name, received "'+F[1]+'"'};var Q={sound:L};return F.length===3&&(Q.noteHead=F[2]),{key:z,value:Q}},_=function($,F){var z=i.getMeasurement(F);return z.used===0||F.length!==0?{error:'Directive "'+$+'" requires a measurement as a parameter.'}:z.value},b=function($,F){var z=i.getMeasurement(F);return z.used===0||F.length!==0?'Directive "'+$+'" requires a measurement as a parameter.':(r.formatting[$]=z.value,null)},v=function($,F,z,L,Q){if(z.length!==1||z[0].type!=="number")return'Directive "'+F+'" requires a number as a parameter.';var Z=z[0].intt;return L!==void 0&&ZQ?'Directive "'+F+'" requires a number less than or equal to '+Q+" as a parameter.":(s[$]=Z,null)},T=function($,F,z){if(z.length===1&&(z[0].token==="true"||z[0].token==="false"))return s[$]=z[0].token==="true",null;var L=v($,F,z,0,1);return L!==null?L:(s[$]=s[$]===1,null)},S=function($,F,z,L){if(z.length!==1)return'Directive "'+F+'" requires one of [ '+L.join(", ")+" ] as a parameter.";for(var Q=z[0].token,Z=!1,ee=0;!Z&&ee=0)$.length!==0&&n("Unexpected parameter in MIDI "+L,z,0);else if(P.indexOf(L)>=0)$.length!==1?n("Expected one parameter in MIDI "+L,z,0):Q.push($[0].token);else if(B.indexOf(L)>=0)$.length!==1?n("Expected one parameter in MIDI "+L,z,0):$[0].type!=="number"?n("Expected one integer parameter in MIDI "+L,z,0):Q.push($[0].intt);else if(C.indexOf(L)>=0)$.length!==1&&$.length!==2?n("Expected one or two parameters in MIDI "+L,z,0):$[0].type!=="number"||$.length===2&&$[1].type!=="number"?n("Expected integer parameter in MIDI "+L,z,0):(Q.push($[0].intt),$.length===2&&Q.push($[1].intt));else if(j.indexOf(L)>=0)$.length!==2?n("Expected two parameters in MIDI "+L,z,0):$[0].type!=="number"||$[1].type!=="number"?n("Expected two integer parameters in MIDI "+L,z,0):(Q.push($[0].intt),Q.push($[1].intt));else if(N.indexOf(L)>=0)$.length!==2?n("Expected two parameters in MIDI "+L,z,0):$[0].type!=="alpha"||$[1].type!=="number"?n("Expected one string and one integer parameters in MIDI "+L,z,0):(Q.push($[0].token),Q.push($[1].intt));else if(L==="drummap")$.length===2&&$[0].type==="alpha"&&$[1].type==="number"?(F.formatting||(F.formatting={}),F.formatting.midi||(F.formatting.midi={}),F.formatting.midi.drummap||(F.formatting.midi.drummap={}),F.formatting.midi.drummap[$[0].token]=$[1].intt,Q=F.formatting.midi.drummap):$.length===3&&$[0].type==="punct"&&$[1].type==="alpha"&&$[2].type==="number"?(F.formatting||(F.formatting={}),F.formatting.midi||(F.formatting.midi={}),F.formatting.midi.drummap||(F.formatting.midi.drummap={}),F.formatting.midi.drummap[$[0].token+$[1].token]=$[2].intt,Q=F.formatting.midi.drummap):n("Expected one note name and one integer parameter in MIDI "+L,z,0);else if(H.indexOf(L)>=0)$.length!==3||$[0].type!=="number"||$[1].token!=="/"||$[2].type!=="number"?n("Expected fraction parameter in MIDI "+L,z,0):(Q.push($[0].intt),Q.push($[2].intt));else if(G.indexOf(L)>=0)$.length!==4?n("Expected four parameters in MIDI "+L,z,0):$[0].type!=="number"||$[1].type!=="number"||$[2].type!=="number"||$[3].type!=="number"?n("Expected four integer parameters in MIDI "+L,z,0):(Q.push($[0].intt),Q.push($[1].intt),Q.push($[2].intt),Q.push($[3].intt));else if(A.indexOf(L)>=0)$.length!==5?n("Expected five parameters in MIDI "+L,z,0):$[0].type!=="number"||$[1].type!=="number"||$[2].type!=="number"||$[3].type!=="number"||$[4].type!=="number"?n("Expected five integer parameters in MIDI "+L,z,0):(Q.push($[0].intt),Q.push($[1].intt),Q.push($[2].intt),Q.push($[3].intt),Q.push($[4].intt));else if(C.indexOf(L)>=0)$.length!==1||$.length!==4?n("Expected one or two parameters in MIDI "+L,z,0):$[0].type!=="number"?n("Expected integer parameter in MIDI "+L,z,0):$.length===4?($[1].token!=="octave"&&n("Expected octave parameter in MIDI "+L,z,0),$[2].token!=="="&&n("Expected octave parameter in MIDI "+L,z,0),$[3].type!=="number"&&n("Expected integer parameter for octave in MIDI "+L,z,0)):(Q.push($[0].intt),$.length===4&&Q.push($[3].intt));else if(E.indexOf(L)>=0)if($.length<2)n("Expected string parameter and at least one integer parameter in MIDI "+L,z,0);else if($[0].type!=="alpha")n("Expected string parameter and at least one integer parameter in MIDI "+L,z,0);else{var Z=$.shift();for(Q.push(Z.token);$.length>0;)Z=$.shift(),Z.type!=="number"&&n("Expected integer parameter in MIDI "+L,z,0),Q.push(Z.intt)}else if(U.indexOf(L)>=0){if($.length!==1&&$.length!==2)n("Expected one or two parameters in MIDI "+L,z,0);else if($[0].type!=="number")n("Expected integer parameter in MIDI "+L,z,0);else if($.length===2&&$[1].type!=="alpha")n("Expected alpha parameter in MIDI "+L,z,0);else if(Q.push($[0].intt),$.length===2){var ee=$[1].token;ee.indexOf("octave=")!=-1?(ee=ee.replace("octave=",""),ee=parseInt(ee),isNaN(ee)?n("Expected octave value in MIDI"+L):(ee<-1&&(n("Expected octave= in MIDI "+L+" to be >= -1 (recv:"+ee+")"),ee=-1),ee>3&&(n("Expected octave= in MIDI "+L+" to be <= 3 (recv:"+ee+")"),ee=3),Q.push(ee))):n("Expected octave= in MIDI"+L)}}o.hasBeginMusic()?o.appendElement("midi",-1,-1,{cmd:L,params:Q}):(F.formatting.midi===void 0&&(F.formatting.midi={}),F.formatting.midi[L]=Q)};t.parseFontChangeLine=function($){$=$.replace(/\$\$/g,"");var F=$.split("$");if(F.length>1&&s.setfont){var z=[];F[0]!==""&&z.push({text:F[0]});for(var L=1;L0&&s.ignoredDecorations.push(z.substring(0,z.indexOf(" "))),n("Decoration redefinition ignored",$,0);break;case"text":var Le=i.translateString(z);o.addText(t.parseFontChangeLine(Le),{startChar:s.iChar,endChar:s.iChar+z.length+7});break;case"center":var nt=i.translateString(z);o.addCentered(t.parseFontChangeLine(nt));break;case"font":break;case"setfont":var Ae=i.tokenize(z,0,z.length);if(Ae.length>=4&&Ae[0].token==="-"&&Ae[1].type==="number"){var Ge=parseInt(Ae[1].token);Ge>=1&&Ge<=9&&(s.setfont||(s.setfont=[]),Ae.shift(),Ae.shift(),s.setfont[Ge]=g(Ae,s.setfont[Ge],$,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return h(L,F,$);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return m(L,F,$);case"barlabelfont":case"barnumberfont":case"barnumfont":return h("measurefont",F,$);case"staves":case"score":s.score_is_present=!0;for(var ne=function(Ye,ut,at,Zt,At){(ut||s.staves.length===0)&&s.staves.push({index:s.staves.length,numVoices:0});var It=a.last(s.staves);at!==void 0&&It.bracket===void 0&&(It.bracket=at),Zt!==void 0&&It.brace===void 0&&(It.brace=Zt),At&&(It.connectBarLines="end"),s.voices[Ye]===void 0&&(s.voices[Ye]={staffNum:It.index,index:It.numVoices},It.numVoices++)},Xe=!1,de=!1,ye=!1,ue=!1,be=!1,Se=!1,Ie=!1,$e,ze=function(){if(Ie=!0,$e){var Ye="start";$e.staffNum>0&&(s.staves[$e.staffNum-1].connectBarLines==="start"||s.staves[$e.staffNum-1].connectBarLines==="continue")&&(Ye="continue"),s.staves[$e.staffNum].connectBarLines=Ye}};F.length;){var Fe=F.shift();switch(Fe.token){case"(":Xe?n("Can't nest parenthesis in %%score",$,Fe.start):(Xe=!0,ue=!0);break;case")":!Xe||ue?n("Unexpected close parenthesis in %%score",$,Fe.start):Xe=!1;break;case"[":de?n("Can't nest brackets in %%score",$,Fe.start):(de=!0,be=!0);break;case"]":!de||be?n("Unexpected close bracket in %%score",$,Fe.start):(de=!1,s.staves[$e.staffNum].bracket="end");break;case"{":ye?n("Can't nest braces in %%score",$,Fe.start):(ye=!0,Se=!0);break;case"}":!ye||Se?n("Unexpected close brace in %%score",$,Fe.start):(ye=!1,s.staves[$e.staffNum].brace="end");break;case"|":ze();break;default:for(var qe="";(Fe.type==="alpha"||Fe.type==="number")&&(qe+=Fe.token,Fe.continueId);)Fe=F.shift();var it=!Xe||ue,st=be?"start":de?"continue":void 0,Ne=Se?"start":ye?"continue":void 0;ne(qe,it,st,Ne,Ie),ue=!1,be=!1,Se=!1,Ie=!1,$e=s.voices[qe],L==="staves"&&ze();break}}break;case"maxstaves":var He=i.getInt(z);He.digits===0?n("Expected number of staves in maxstaves"):He.value>0&&(r.formatting.maxStaves=He.value);break;case"newpage":var Be=i.getInt(z);o.addNewPage(Be.digits===0?-1:Be.value);break;case"abc":var Ue=z.split(" ");switch(Ue[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var tt=Ue.shift();o.addMetaText(L+tt,Ue.join(" "),{startChar:s.iChar,endChar:s.iChar+z.length+5});break;default:return"Unknown directive: "+L+Ue[0]}break;case"header":case"footer":var Re=i.getMeat(z,0,z.length);Re=z.substring(Re.start,Re.end),Re[0]==='"'&&Re[Re.length-1]==='"'&&(Re=Re.substring(1,Re.length-1));var Ve=Re.split(" "),_t={};Ve.length===1?_t={left:"",center:Ve[0],right:""}:Ve.length===2?_t={left:Ve[0],center:Ve[1],right:""}:_t={left:Ve[0],center:Ve[1],right:Ve[2]},Ve.length>3&&n("Too many tabs in "+L+": "+Ve.length+" found.",z,0),o.addMetaTextObj(L,_t,{startChar:s.iChar,endChar:s.iChar+$.length});break;case"midi":var mt=i.tokenize(z,0,z.length,!0);mt.length>0&&mt[0].token==="="&&mt.shift(),mt.length===0?n("Expected midi command",z,0):O(mt,r,z);break;case"percmap":var et=f(z);et.error?n(et.error,$,8):(r.formatting.percmap||(r.formatting.percmap={}),r.formatting.percmap[et.key]=et.value);break;case"visualtranspose":var wt=i.getInt(z);wt.digits===0?n("Expected number of half steps in visualTranspose"):s.globalTranspose=wt.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":r.formatting[L]=z;break;default:return"Unknown directive: "+L}return null},t.globalFormatting=function($){for(var F in $)if($.hasOwnProperty(F)){var z=""+$[F],L=i.tokenize(z,0,z.length),Q;switch(F){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":h(F,L,z);break;case"scale":p(F,L);break;case"partsbox":Q=T("partsBox",F,L),Q!==null&&n(Q),s.partsfont.box=s.partsBox;break;case"freegchord":Q=T("freegchord",F,L),Q!==null&&n(Q);break;case"fontboxpadding":(L.length!==1||L[0].type!=="number")&&n('Directive "'+F+'" requires a number as a parameter.'),r.formatting.fontboxpadding=L[0].floatt;break;case"stafftopmargin":(L.length!==1||L[0].type!=="number")&&n('Directive "'+F+'" requires a number as a parameter.'),r.formatting.stafftopmargin=L[0].floatt;break;case"stretchlast":var Z=D(L);if(Z.value!==void 0&&(r.formatting.stretchlast=Z.value),Z.error)return Z.error;break;default:n("Formatting directive unrecognized: ",F,0)}}};function D($){if($.length===0)return{value:1};if($.length===1)if($[0].type==="number"){if($[0].floatt>=0||$[0].floatt<=1)return{value:$[0].floatt}}else{if($[0].token==="false")return{value:0};if($[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+$[0].token+")"}}})(),M0=t,M0}var E0,j2;function Kz(){if(j2)return E0;j2=1;var a={};const t=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];return a.pitchIndex=function(i){return t.indexOf(i)},a.noteName=function(i){return t[i]},E0=a,E0}var U0,N2;function O2(){if(N2)return U0;N2=1;var a=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],t=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],i=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],n=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function s(r,o,l,c){if(!o||o%12===0)return r;for(;o<0;)o+=12;o>11&&(o=o%12);var d=r.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!d)return r;var g=d[1],h=d[2],m=d[3],p=d[4],u=a.indexOf(g);if(u<0&&(u=t.indexOf(g)),u<0&&(u=i.indexOf(g)),u<0&&(u=n.indexOf(g)),u<0)return r;u+=o,u=u%12,l?c?r=n[u]:r=t[u]:c?r=i[u]:r=a[u];var f=h&&(h.indexOf("dim")>=0||h.indexOf("°")>=0);if(f&&r==="A#"&&(r="Bb"),f&&r==="D#"&&(r="Eb"),f&&r==="A♯"&&(r="B♭"),f&&r==="D♯"&&(r="E♭"),h&&(r+=h),m){var u=a.indexOf(m);u<0&&(u=t.indexOf(m)),u<0&&(u=i.indexOf(m)),u<0&&(u=n.indexOf(m)),r+="/",u>=0?(u+=o,u=u%12,l?c?r+=n[u]:r+=t[u]:c?r+=i[u]:r+=a[u]):r+=m}return p&&(r+=p),r}return U0=s,U0}var R0,I2;function D2(){if(I2)return R0;I2=1;var a={C:{modes:["CMaj","CIon","Amin","AAeo","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","DbIon","Bbmin","BbAeo","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","DIon","Bmin","BAeo","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","EbIon","Cmin","CAeo","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","EIon","C#min","C#Aeo","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","FIon","Dmin","DAeo","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","GbIon","Ebmin","EbAeo","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","GIon","Emin","EAeo","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","AbIon","Fmin","FAeo","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","AIon","F#min","F#Aeo","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","BbIon","Gmin","GAeo","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","BIon","G#min","G#Aeo","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","C#Ion","A#min","A#Aeo","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","F#Ion","D#min","D#Aeo","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","CbIon","Abmin","AbAeo","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},t=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function i(c){return t.indexOf(c.toLowerCase())>=0}var n=null;function s(){n={};for(var c=Object.keys(a),d=0;d11&&(M=M%12);var P=p[0]==="m"?o[M]:r[M],B=P+p,C=i(B);(C.length===0||C[0].acc==="flat")&&(m.localTransposePreferFlats=!0);var j=B.charCodeAt(0)-v.charCodeAt(0);return m.localTranspose>0?(j<0||j===0&&(v[1]==="#"||B[1]==="b"))&&(j+=7):m.localTranspose<0&&(j>0||j===0&&(v[1]==="b"||B[1]==="#"))&&(j-=7),m.localTranspose>0?m.localTransposeVerticalMovement=j+Math.floor(m.localTranspose/12)*7:m.localTransposeVerticalMovement=j+Math.ceil(m.localTranspose/12)*7,S?{accidentals:C,root:P[0],acc:P.length>1?P[1]:""}:{accidentals:[],root:u,acc:f}},n.chordName=function(m,p){return t(p,m.localTranspose,m.localTransposePreferFlats,m.freegchord)};var l=["c","d","e","f","g","a","b"];function c(m,p,u,f,_){for(var b=l[(m+49)%7],v=0,T=0;T2&&(p++,j-=P==="b"||P==="e"?1:2),[p,j]}var d={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},g={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},h={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return n.note=function(m,p){if(!(!m.localTranspose||m.clef.type==="perc")){var u=p.pitch;if(m.localTransposeVerticalMovement&&(p.pitch=p.pitch+m.localTransposeVerticalMovement,p.name)){var f=p.accidental?p.name.substring(1):p.name,_=p.accidental?p.name[0]:"",b=a.pitchIndex(f);p.name=_+a.noteName(b+m.localTransposeVerticalMovement)}if(p.accidental){var v=c(u,p.pitch,p.accidental,m.globalTransposeOrigKeySig,m.targetKey);p.pitch=v[0],p.accidental=g[v[1]],p.name&&(p.name=h[v[1]]+p.name.replace(/[_^=]/g,""))}}},P0=n,P0}var j0,Q2;function N0(){if(Q2)return j0;Q2=1;var a=z0(),t=W2(),i={};return(function(){var n,s,r,o;i.initialize=function(u,f,_,b,v){n=u,s=f,r=_,o=v},i.standardKey=function(u,f,_,b){return t.keySignature(r,u,f,_,b)};var l={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(u,f){var _=l[u],b=_?_.mid:0;return b+f};i.fixClef=function(u){var f=l[u.type];f&&(u.clefPos=f.pitch,u.type=f.clef)},i.deepCopyKey=function(u){var f={accidentals:[],root:u.root,acc:u.acc,mode:u.mode};return u.accidentals.forEach(function(_){f.accidentals.push(Object.assign({},_))}),u.explicitAccidentals&&(f.explicitAccidentals=[],u.explicitAccidentals.forEach(function(_){f.explicitAccidentals.push(Object.assign({},_))})),f};var d=function(){r.currentVoice&&(r.currentVoice.key=i.deepCopyKey(r.key))},g={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};i.addPosToKey=function(u,f){var _=u.verticalPos;f.accidentals.forEach(function(b){var v=g[b.note];v=v-_,b.verticalPos=v}),f.impliedNaturals&&f.impliedNaturals.forEach(function(b){var v=g[b.note];v=v-_,b.verticalPos=v}),_<-10?(f.accidentals.forEach(function(b){b.verticalPos-=7,(b.verticalPos>=11||b.verticalPos===10&&b.acc==="flat")&&(b.verticalPos-=7),b.note==="A"&&b.acc==="sharp"&&(b.verticalPos-=7),(b.note==="G"||b.note==="F")&&b.acc==="flat"&&(b.verticalPos-=7)}),f.impliedNaturals&&f.impliedNaturals.forEach(function(b){b.verticalPos-=7,(b.verticalPos>=11||b.verticalPos===10&&b.acc==="flat")&&(b.verticalPos-=7),b.note==="A"&&b.acc==="sharp"&&(b.verticalPos-=7),(b.note==="G"||b.note==="F")&&b.acc==="flat"&&(b.verticalPos-=7)})):_<-4?(f.accidentals.forEach(function(b){b.verticalPos-=7,_===-8&&(b.note==="f"||b.note==="g")&&b.acc==="sharp"&&(b.verticalPos-=7)}),f.impliedNaturals&&f.impliedNaturals.forEach(function(b){b.verticalPos-=7,_===-8&&(b.note==="f"||b.note==="g")&&b.acc==="sharp"&&(b.verticalPos-=7)})):_>=7&&(f.accidentals.forEach(function(b){b.verticalPos+=7}),f.impliedNaturals&&f.impliedNaturals.forEach(function(b){b.verticalPos+=7}))},i.fixKey=function(u,f){var _=Object.assign({},f);return i.addPosToKey(u,_),_};var h=function(u){var f=0,_=u[f++];(_==="^"||_==="_")&&(_=u[f++]);var b=g[_];for(b===void 0&&(b=6);f0){b.foundKey=!0;var T="",S="";_[0].token.length>1?_[0].token=_[0].token.substring(1):_.shift();var M=v.token;if(_.length>0){var P=n.getSharpFlat(_[0].token);if(P.len>0&&(_[0].token.length>1?_[0].token=_[0].token.substring(1):_.shift(),M+=P.token,T=P.token),_.length>0){var B=n.getMode(_[0].token);B.len>0&&(_.shift(),M+=B.token,S=B.token)}if(i.standardKey(M,v.token,T,0)===void 0)return s("Unsupported key signature: "+M,u,0),b}var C=i.deepCopyKey(r.key),j=!f&&r.globalTranspose?-r.globalTranspose:0,G;if(f&&(G=r.globalTransposeOrigKeySig),r.key=i.deepCopyKey(i.standardKey(M,v.token,T,j)),f&&(r.globalTransposeOrigKeySig=G),r.key.mode=S,C&&r.keywarn!==!1){for(var A,N=0;N0;)switch(_[0].token){case"m":case"middle":if(_.shift(),_.length===0)return s("Expected = after middle",u,0),b;if(D=_.shift(),D.token!=="="){s("Expected = after middle",u,D.start);break}if(_.length===0)return s("Expected parameter after middle=",u,0),b;var $=n.getPitchFromTokens(_);$.warn&&s($.warn,u,0),$.position&&(r.clef.verticalPos=$.position-6);break;case"transpose":if(_.shift(),_.length===0)return s("Expected = after transpose",u,0),b;if(D=_.shift(),D.token!=="="){s("Expected = after transpose",u,D.start);break}if(_.length===0)return s("Expected parameter after transpose=",u,0),b;if(_[0].type!=="number"){s("Expected number after transpose",u,_[0].start);break}r.clef.transpose=_[0].intt,_.shift();break;case"stafflines":if(_.shift(),_.length===0)return s("Expected = after stafflines",u,0),b;if(D=_.shift(),D.token!=="="){s("Expected = after stafflines",u,D.start);break}if(_.length===0)return s("Expected parameter after stafflines=",u,0),b;if(_[0].type!=="number"){s("Expected number after stafflines",u,_[0].start);break}r.clef.stafflines=_[0].intt,_.shift();break;case"staffscale":if(_.shift(),_.length===0)return s("Expected = after staffscale",u,0),b;if(D=_.shift(),D.token!=="="){s("Expected = after staffscale",u,D.start);break}if(_.length===0)return s("Expected parameter after staffscale=",u,0),b;if(_[0].type!=="number"){s("Expected number after staffscale",u,_[0].start);break}r.clef.staffscale=_[0].floatt,_.shift();break;case"octave":if(_.shift(),_.length===0)return s("Expected = after octave",u,0),b;if(D=_.shift(),D.token!=="="){s("Expected = after octave",u,D.start);break}if(_.length===0)return s("Expected parameter after octave=",u,0),b;if(_[0].type!=="number"){s("Expected number after octave",u,_[0].start);break}r.octave=_[0].intt,_.shift();break;case"style":if(_.shift(),_.length===0)return s("Expected = after style",u,0),b;if(D=_.shift(),D.token!=="="){s("Expected = after style",u,D.start);break}if(_.length===0)return s("Expected parameter after style=",u,0),b;switch(_[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=_[0].token,_.shift();break;default:s("error parsing style element: "+_[0].token,u,_[0].start);break}break;case"clef":if(_.shift(),_.length===0)return s("Expected = after clef",u,0),b;if(D=_.shift(),D.token!=="="){s("Expected = after clef",u,D.start);break}if(_.length===0)return s("Expected parameter after clef=",u,0),b;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var F=_.shift();switch(F.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":F.token="alto";break;case"F":F.token="bass";break;case"G":F.token="treble";break;case"c":F.token="alto";break;case"f":F.token="bass";break;case"g":F.token="treble";break;default:s("Expected clef name. Found "+F.token,u,F.start);break}_.length>0&&_[0].type==="number"&&(F.token+=_[0].token,_.shift()),_.length>1&&(_[0].token==="-"||_[0].token==="+"||_[0].token==="^"||_[0].token==="_")&&_[1].token==="8"&&(F.token+=_[0].token+_[1].token,_.shift(),_.shift()),r.clef={type:F.token,verticalPos:c(F.token,0)},r.currentVoice&&r.currentVoice.transpose!==void 0&&(r.clef.transpose=r.currentVoice.transpose),b.foundClef=!0;break;default:s("Unknown parameter: "+_[0].token,u,_[0].start),_.shift()}return b};var p=function(u){var f=r.voices[u];if(!(r.currentVoice&&r.currentVoice.index===f.index&&r.currentVoice.staffNum===f.staffNum))return r.currentVoice=f,f.key?r.key=i.deepCopyKey(f.key):r.globalKey&&(r.key=i.deepCopyKey(r.globalKey)),o.setCurrentVoice(f.staffNum,f.index,u)};i.parseVoice=function(u,f,_){var b=n.getMeat(u,f,_),v=b.start,T=b.end,S=n.getToken(u,v,T);if(S.length===0){s("Expected a voice id",u,v);return}var M=!1;r.voices[S]===void 0&&(r.voices[S]={},M=!0,r.score_is_present&&s("Can't have an unknown V: id when the %score directive is present",u,v)),v+=S.length,v+=n.eatWhiteSpace(u,v);for(var P={startStaff:M},B=function($){var F=n.getVoiceToken(u,v,T);F.warn!==void 0?s("Expected value for "+$+" in voice: "+F.warn,u,v):F.err!==void 0?s("Expected value for "+$+" in voice: "+F.err,u,v):F.token.length===0&&u[v]!=='"'?s("Expected value for "+$+" in voice",u,v):P[$]=F.token,v+=F.len},C=function($,F,z){var L=n.getVoiceToken(u,v,T);L.warn!==void 0?s("Expected value for "+F+" in voice: "+L.warn,u,v):L.err!==void 0?s("Expected value for "+F+" in voice: "+L.err,u,v):L.token.length===0&&u[v]!=='"'?s("Expected value for "+F+" in voice",u,v):(L.token=parseFloat(L.token),r.voices[$][F]=L.token),v+=L.len},j=function($,F){var z=n.getVoiceToken(u,v,T);if(z.warn!==void 0)s("Expected value for "+$+" in voice: "+z.warn,u,v);else if(z.err!==void 0)s("Expected value for "+$+" in voice: "+z.err,u,v);else if(z.token.length===0&&u[v]!=='"')s("Expected value for "+$+" in voice",u,v);else return z.token;v+=z.len},G=function($,F){var z={_B:2,_E:9,_b:-10,_e:-3},L=n.getVoiceToken(u,v,T);if(L.warn!==void 0)s("Expected one of (_B, _E, _b, _e) for "+F+" in voice: "+L.warn,u,v);else if(L.token.length===0&&u[v]!=='"')s("Expected one of (_B, _E, _b, _e) for "+F+" in voice",u,v);else{var Q=z[L.token];Q?r.voices[$][F]=Q:s("Expected one of (_B, _E, _b, _e) for "+F+" in voice",u,v)}v+=L.len};v0&&(o.default_length=_/b,o.havent_set_length=!1)}else f.length===1&&f[0]==="1"&&(o.default_length=1,o.havent_set_length=!1)};var d={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(h,m,p,u){try{var f=s.tokenize(h,m,p);if(f.length===0)throw"Missing parameter in Q: field";var _={startChar:u+m-2,endChar:u+p},b=!0,v=f.shift();if(v.type==="quote"&&(_.preString=v.token,v=f.shift(),f.length===0))return d[_.preString.toLowerCase()]&&(_.bpm=d[_.preString.toLowerCase()],_.suppressBpm=!0),{type:"immediate",tempo:_};if(v.type==="alpha"&&v.token==="C"){if(f.length===0)throw"Missing tempo after C in Q: field";if(v=f.shift(),v.type==="punct"&&v.token==="="){if(f.length===0)throw"Missing tempo after = in Q: field";if(v=f.shift(),v.type!=="number")throw"Expected number after = in Q: field";_.duration=[1],_.bpm=parseInt(v.token)}else if(v.type==="number"){if(_.duration=[parseInt(v.token)],f.length===0)throw"Missing = after duration in Q: field";if(v=f.shift(),v.type!=="punct"||v.token!=="=")throw"Expected = after duration in Q: field";if(f.length===0)throw"Missing tempo after = in Q: field";if(v=f.shift(),v.type!=="number")throw"Expected number after = in Q: field";_.bpm=parseInt(v.token)}else throw"Expected number or equal after C in Q: field"}else if(v.type==="number"){var T=parseInt(v.token);if(f.length===0||f[0].type==="quote")_.duration=[1],_.bpm=T;else{if(b=!1,v=f.shift(),v.type!=="punct"&&v.token!=="/"||(v=f.shift(),v.type!=="number"))throw"Expected fraction in Q: field";var S=parseInt(v.token);for(_.duration=[T/S];f.length>0&&f[0].token!=="="&&f[0].type!=="quote";){if(v=f.shift(),v.type!=="number"||(T=parseInt(v.token),v=f.shift(),v.type!=="punct"&&v.token!=="/")||(v=f.shift(),v.type!=="number"))throw"Expected fraction in Q: field";S=parseInt(v.token),_.duration.push(T/S)}if(v=f.shift(),v.type!=="punct"&&v.token!=="=")throw"Expected = in Q: field";if(v=f.shift(),v.type!=="number")throw"Expected tempo in Q: field";_.bpm=parseInt(v.token)}}else throw"Unknown value in Q: field";if(f.length!==0&&(v=f.shift(),v.type==="quote"&&(_.postString=v.token,v=f.shift()),f.length!==0))throw"Unexpected string at end of Q: field";return o.printTempo===!1&&(_.suppress=!0),{type:b?"delaySet":"immediate",tempo:_}}catch(M){return r(M,h,m),{type:"none"}}},this.letter_to_inline_header=function(h,m,p){var u=!1,f=s.eatWhiteSpace(h,m);if(m+=f,h.length>=m+5&&h[m]==="["&&h[m+2]===":"){var _=h.indexOf("]",m),b=o.iChar+m,v=o.iChar+_+1;switch(h.substring(m,m+3)){case"[I:":var T=t.addDirective(h.substring(m+3,_));return T&&r(T,h,m),[_-m+1+f];case"[M:":var S=this.setMeter(h.substring(m+3,_));return p&&o.currentVoice&&S?o.staves[o.currentVoice.staffNum].meter=S:c.hasBeginMusic()&&S?c.appendStartingElement("meter",b,v,S):o.meter=S,[_-m+1+f];case"[K:":var M=i.parseKey(h.substring(m+3,_),!0);return M.foundClef&&c.hasBeginMusic()&&c.appendStartingElement("clef",b,v,o.clef),M.foundKey&&c.hasBeginMusic()&&c.appendStartingElement("key",b,v,i.fixKey(o.clef,o.key)),[_-m+1+f];case"[P:":var P=t.parseFontChangeLine(h.substring(m+3,_));return p||l.lines.length<=l.lineNum?o.partForNextLine={title:P,startChar:b,endChar:v}:c.appendElement("part",b,v,{title:P}),[_-m+1+f];case"[L:":return this.setDefaultLength(h,m+3,_),[_-m+1+f];case"[Q:":if(_>0){var B=this.setTempo(h,m+3,_,o.iChar);return B.type==="delaySet"?c.hasBeginMusic()?c.appendElement("tempo",b,v,this.calcTempo(B.tempo)):o.tempoForNextLine=["tempo",b,v,this.calcTempo(B.tempo)]:B.type==="immediate"&&(!p&&c.hasBeginMusic()?c.appendElement("tempo",b,v,B.tempo):o.tempoForNextLine=["tempo",b,v,B.tempo]),[_-m+1+f,h[m+1],h.substring(m+3,_)]}break;case"[V:":if(_>0)return u=i.parseVoice(h,m+3,_),[_-m+1+f,h[m+1],h.substring(m+3,_),u];break;case"[r:":return[_-m+1+f]}}return[0]},this.letter_to_body_header=function(h,m){var p=!1;if(h.length>=m+3)switch(h.substring(m,m+2)){case"I:":var u=t.addDirective(h.substring(m+2));return u&&r(u,h,m),[h.length];case"M:":var f=this.setMeter(h.substring(m+2));return c.hasBeginMusic()&&f&&c.appendStartingElement("meter",o.iChar+m,o.iChar+h.length,f),[h.length];case"K:":var _=i.parseKey(h.substring(m+2),c.hasBeginMusic());return _.foundClef&&c.hasBeginMusic()&&o.keywarn!==!1&&c.appendStartingElement("clef",o.iChar+m,o.iChar+h.length,o.clef),_.foundKey&&c.hasBeginMusic()&&o.keywarn!==!1&&c.appendStartingElement("key",o.iChar+m,o.iChar+h.length,i.fixKey(o.clef,o.key)),[h.length];case"P:":return c.hasBeginMusic()&&c.appendElement("part",o.iChar+m,o.iChar+h.length,{title:h.substring(m+2)}),[h.length];case"L:":return this.setDefaultLength(h,m+2,h.length),[h.length];case"Q:":var b=h.indexOf("",m+2);b===-1&&(b=h.length);var v=this.setTempo(h,m+2,b,o.iChar);return v.type==="delaySet"?c.appendElement("tempo",o.iChar+m,o.iChar+h.length,this.calcTempo(v.tempo)):v.type==="immediate"&&c.appendElement("tempo",o.iChar+m,o.iChar+h.length,v.tempo),[b,h[m],a.strip(h.substring(m+2))];case"V:":return p=i.parseVoice(h,m+2,h.length),[h.length,h[m],a.strip(h.substring(m+2)),p]}return[0]};var g={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(h){var m=g[h[0]],p=h.length-2,u=s.translateString(s.stripComment(h.substring(2)));if(m==="unalignedWords"||m==="notes")c.addMetaTextArray(m,t.parseFontChangeLine(u),{startChar:o.iChar,endChar:o.iChar+h.length});else if(m!==void 0)c.addMetaText(m,t.parseFontChangeLine(u),{startChar:o.iChar,endChar:o.iChar+h.length});else{var f=o.iChar,_=f+h.length;switch(h[0]){case"H":for(c.addMetaTextArray("history",t.parseFontChangeLine(u),{startChar:o.iChar,endChar:o.iChar+h.length}),h=s.peekLine();h&&h[1]!==":";)s.nextLine(),c.addMetaTextArray("history",t.parseFontChangeLine(s.translateString(s.stripComment(h))),{startChar:o.iChar,endChar:o.iChar+h.length}),h=s.peekLine();break;case"K":this.resolveTempo();var b=i.parseKey(h.substring(2),!1);!o.is_in_header&&c.hasBeginMusic()&&o.keywarn!==!1&&(b.foundClef&&c.appendStartingElement("clef",f,_,o.clef),b.foundKey&&c.appendStartingElement("key",f,_,i.fixKey(o.clef,o.key))),o.is_in_header=!1;break;case"L":this.setDefaultLength(h,2,h.length);break;case"M":o.origMeter=o.meter=this.setMeter(h.substring(2));break;case"P":o.is_in_header?c.addMetaText("partOrder",t.parseFontChangeLine(u),{startChar:o.iChar,endChar:o.iChar+h.length}):o.partForNextLine={title:u,startChar:f,endChar:_};break;case"Q":var v=this.setTempo(h,2,h.length,o.iChar);v.type==="delaySet"?o.tempo=v.tempo:v.type==="immediate"&&(l.metaText.tempo?o.tempoForNextLine=["tempo",f,_,v.tempo]:l.metaText.tempo=v.tempo);break;case"T":o.titlecaps&&(u=u.toUpperCase()),this.setTitle(t.parseFontChangeLine(s.theReverser(u)),p);break;case"U":this.addUserDefinition(h,2,h.length);break;case"V":if(i.parseVoice(h,2,h.length),!o.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":r("Ignored header",h,0);break;default:return{regular:!0}}}return{}}};return O0=n,O0}var Ls={},Y2;function Jz(){return Y2||(Y2=1,Ls.legalAccents=["trill","trillh","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"],Ls.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],Ls.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],Ls.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],Ls.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],Ls.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",Ls.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],Ls.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},Ls.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},Ls.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},Ls.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),Ls}var I0,J2;function Xz(){if(J2)return I0;J2=1;var a=N0(),t=W2(),i,n,s,r,o,l,{legalAccents:c,volumeDecorations:d,dynamicDecorations:g,accentPseudonyms:h,accentDynamicPseudonyms:m,nonDecorations:p,durations:u,pitches:f,rests:_,accMap:b,tripletQ:v}=Jz(),T=function($,F,z,L,Q,Z){i=$,n=F,s=z,r=L,o=Q,l=Z,this.lineContinuation=!1},S=function($,F,z){if($.inTie[F]===void 0)return!1;var L=$.currentVoice?$.currentVoice.staffNum*100+$.currentVoice.index:0;return!!($.inTie[F][L]&&(z.pitches!==void 0||z.rest.type!=="spacer"))},M={};T.prototype.parseMusic=function($){l.resolveTempo(),s.is_in_header=!1;for(var F=0,z=s.iChar;i.isWhiteSpace($[F])&&F<$.length;)F++;if(!(F===$.length||$[F]==="%")){var L=s.start_new_line;s.continueall===void 0?s.start_new_line=!0:s.start_new_line=!1;var Q=0,Z=l.letter_to_body_header($,F);Z[0]>0&&(F+=Z[0],Z[1]==="V"&&this.startNewLine());for(var ee=0;F<$.length;){var oe=F;if($[F]==="%")break;var fe=l.letter_to_inline_header($,F,L);if(fe[0]>0)F+=fe[0],fe[1]==="V"&&(L=!0);else{(!o.hasBeginMusic()||L&&!this.lineContinuation)&&(this.startNewLine(),L=!1);for(var le;;)if(le=i.eatWhiteSpace($,F),le>0&&(F+=le),F>0&&$[F-1]===""&&(le=l.letter_to_body_header($,F),le[0]>0&&(le[1]==="V"&&this.startNewLine(),F=le[0],s.start_new_line=!1)),le=N($,F),le[0]>0&&(F+=le[0]),le=B($,F),le[0]>0){M.chord||(M.chord=[]);var ge=i.translateString(le[1]);ge=ge.replace(/;/g,` +`},Symbol.toStringTag,{value:"Module"}));function Hz(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var q0,E2;function Wz(){if(E2)return q0;E2=1;var a="6.7.0";return q0=a,q0}var C0,U2;function A0(){if(U2)return C0;U2=1;var a=function(i,n){var s=this;n||(n={}),s.qpm=n.qpm?parseInt(n.qpm,10):null,s.extraMeasuresAtBeginning=n.extraMeasuresAtBeginning?parseInt(n.extraMeasuresAtBeginning,10):0,s.beatCallback=n.beatCallback,s.eventCallback=n.eventCallback,s.lineEndCallback=n.lineEndCallback,s.lineEndAnticipation=n.lineEndAnticipation?parseInt(n.lineEndAnticipation,10):0,s.beatSubdivisions=n.beatSubdivisions?parseInt(n.beatSubdivisions,10):1,s.beatSubdivisions||(s.beatSubdivisions=1),s.joggerTimer=null,s.replaceTarget=function(o){if(!n.qpm){var l=o.metaText?o.metaText.tempo:null;s.qpm=o.getBpm(l)}if(s.noteTimings=o.setTiming(s.qpm,s.extraMeasuresAtBeginning),o.noteTimings.length===0&&(s.noteTimings=o.setTiming(0,0)),s.lineEndCallback&&(s.lineEndTimings=t(o.noteTimings,s.lineEndAnticipation)),s.startTime=null,s.currentBeat=0,s.currentEvent=0,s.currentLine=0,s.currentTime=0,s.isPaused=!1,s.isRunning=!1,s.pausedPercent=null,s.justUnpaused=!1,s.newSeekPercent=0,s.lastTimestamp=0,s.noteTimings.length!==0){s.millisecondsPerBeat=1e3/(s.qpm/60)/s.beatSubdivisions,s.lastMoment=s.noteTimings[s.noteTimings.length-1].milliseconds;var c=o.getMeter(),d="";if(c&&c.type==="specified"&&c.value&&c.value.length>0&&c.value[0].num.indexOf("+")>0&&(d=c.value[0].num),s.beatStarts=[],d){for(var g=s.noteTimings[s.noteTimings.length-1].millisecondsPerMeasure,h=s.lastMoment/g,m=d.split("+"),p=0;ps.currentEvent&&s.noteTimings[s.currentEvent].millisecondss.currentLine&&s.lineEndTimings[s.currentLine].milliseconds=s.lastMoment)if(s.eventCallback){var h=s.eventCallback(null);s.shouldStop(h).then(function(m){m&&s.stop()})}else s.stop()}},s.shouldStop=function(o){return new Promise(function(l){if(!o)return l(!0);if(o==="continue")return l(!1);o.then&&o.then(function(c){l(c!=="continue")})})},s.doBeatCallback=function(o){if(s.beatCallback){for(var l=s.currentEvent;l=0&&s.noteTimings[l].left===null;)l--;d=s.noteTimings[l]}var g={},h={};if(d){g.top=d.top,g.height=d.height;var m=Math.max(0,o-s.startTime-d.milliseconds),p=c-d.milliseconds,u=d.endX-d.left,f=p?m*u/p:0;g.left=d.left+f,s.currentEvent===0&&d.milliseconds>o-s.startTime&&(g.left=void 0),h={timestamp:o,startTime:s.startTime,ev:d,endMs:c,offMs:m,offPx:f,gapMs:p,gapPx:u}}else h={timestamp:o,startTime:s.startTime};if(s.currentBeat<0||s.currentBeat>=s.beatStarts.length||!s.beatStarts[s.currentBeat]){var _={currentBeat:s.currentBeat,beatStartLength:s.beatStarts.length,totalBeats:s.totalBeats,startTime:s.startTime,currentTime:s.currentTime,lastMoment:s.lastMoment,lastTimestamp:s.lastTimestamp,qpm:s.qpm,millisecondsPerBeat:s.millisecondsPerBeat,beatSubdivisions:s.beatSubdivisions,currentEvent:s.currentEvent,currentLine:s.currentLine,isPaused:s.isPaused,isRunning:s.isRunning,pausedPercent:s.pausedPercent,justUnpaused:s.justUnpaused,newSeekPercent:s.newSeekPercent};setTimeout(function(){throw new Error("abcjs-timing-callback error: "+JSON.stringify(_))},1)}else{var v=s.startTime;if(s.beatCallback(s.beatStarts[s.currentBeat].b,s.totalBeats/s.beatSubdivisions,s.lastMoment,g,h),v!==s.startTime)return o-s.startTime}}return null};var r=60;s.animationJogger=function(){s.isRunning&&(s.doTiming(performance.now()),s.joggerTimer=setTimeout(s.animationJogger,r))},s.start=function(o,l){if(s.isRunning=!0,s.isPaused&&(s.isPaused=!1,o===void 0&&(s.justUnpaused=!0)),o)s.setProgress(o,l);else if(o===0)s.reset();else if(s.pausedPercent!==null){var c=performance.now();s.currentTime=s.lastMoment*s.pausedPercent,s.startTime=c-s.currentTime,s.pausedPercent=null,s.reportNext=!0}requestAnimationFrame(s.doTiming),s.joggerTimer=setTimeout(s.animationJogger,r)},s.pause=function(){s.isPaused=!0;var o=performance.now();s.pausedPercent=(o-s.startTime)/s.lastMoment,s.isRunning=!1,s.joggerTimer&&(clearTimeout(s.joggerTimer),s.joggerTimer=null)},s.currentMillisecond=function(){return s.currentTime},s.reset=function(){s.currentBeat=0,s.currentEvent=0,s.currentLine=0,s.startTime=null,s.pausedPercent=null},s.stop=function(){s.pause(),s.reset()},s.setProgress=function(o,l){var c;switch(l){case"seconds":s.currentTime=o*1e3,s.currentTime<0&&(s.currentTime=0),s.currentTime>s.lastMoment&&(s.currentTime=s.lastMoment),c=s.currentTime/s.lastMoment;break;case"beats":s.currentTime=o*s.millisecondsPerBeat*s.beatSubdivisions,s.currentTime<0&&(s.currentTime=0),s.currentTime>s.lastMoment&&(s.currentTime=s.lastMoment),c=s.currentTime/s.lastMoment;break;default:c=o,c<0&&(c=0),c>1&&(c=1),s.currentTime=s.lastMoment*c;break}s.isRunning||(s.pausedPercent=c);var d=performance.now();for(s.startTime=d-s.currentTime,s.currentEvent=0;s.noteTimings.length>s.currentEvent&&s.noteTimings[s.currentEvent].millisecondss.currentLine&&s.lineEndTimings[s.currentLine].milliseconds+s.lineEndAnticipations.currentTime);s.currentBeat++);s.currentBeat--,s.beatCallback&&g!==s.currentBeat&&(s.doBeatCallback(s.startTime+s.currentTime),s.currentBeat++),s.eventCallback&&s.currentEvent>=0&&s.noteTimings[s.currentEvent].type==="event"&&s.eventCallback(s.noteTimings[s.currentEvent]),s.lineEndCallback&&s.lineEndCallback(s.lineEndTimings[s.currentLine],s.noteTimings[s.currentEvent],{line:s.currentLine,endTimings:s.lineEndTimings}),s.joggerTimer=setTimeout(s.animationJogger,r)}};function t(i,n){for(var s=[],r=null,o=0;o=0&&t.lastIndexOf(i)===n},a.last=function(t){return t.length===0?null:t[t.length-1]},F0=a,F0}var M0,P2;function z0(){if(P2)return M0;P2=1;var a=Yr(),t={};return(function(){var i,n,s,r,o;t.initialize=function(T,F,z,D,K){i=T,n=F,s=z,r=D,o=K,l()};function l(){s.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},s.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},s.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},s.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},s.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},s.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},s.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},s.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},s.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},s.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},s.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},r.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},r.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},r.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},r.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},r.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},r.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},r.formatting.annotationfont=s.annotationfont,r.formatting.gchordfont=s.gchordfont,r.formatting.historyfont=s.historyfont,r.formatting.infofont=s.infofont,r.formatting.measurefont=s.measurefont,r.formatting.partsfont=s.partsfont,r.formatting.repeatfont=s.repeatfont,r.formatting.textfont=s.textfont,r.formatting.tripletfont=s.tripletfont,r.formatting.vocalfont=s.vocalfont,r.formatting.wordsfont=s.wordsfont}var c={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},d=function(T){switch(T){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}},g=function(T,F,z,D,K){function X(){var ct=parseInt(T[0].token);return T.shift(),F?T.length===0?{face:F.face,weight:F.weight,style:F.style,decoration:F.decoration,size:ct}:T.length===1&&T[0].token==="box"&&c[K]?{face:F.face,weight:F.weight,style:F.style,decoration:F.decoration,size:ct,box:!0}:(n("Extra parameters in font definition.",z,D),{face:F.face,weight:F.weight,style:F.style,decoration:F.decoration,size:ct}):(n("Can't set just the size of the font since there is no default value.",z,D),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:ct})}if(T[0].token==="*"){if(T.shift(),T[0].type==="number")return X();n("Expected font size number after *.",z,D)}if(T[0].type==="number")return X();for(var ee=[],ce,fe="normal",le="normal",ge="none",R=!1,we="face",pe=!1;T.length;){var Te=T.shift(),he=Te.token.toLowerCase();switch(we){case"face":pe||he!=="utf"&&Te.type!=="number"&&he!=="bold"&&he!=="italic"&&he!=="underline"&&he!=="box"?ee.length>0&&Te.token==="-"?(pe=!0,ee[ee.length-1]=ee[ee.length-1]+Te.token):pe?(pe=!1,ee[ee.length-1]=ee[ee.length-1]+Te.token):ee.push(Te.token):Te.type==="number"?(ce?n("Font size specified twice in font definition.",z,D):ce=Te.token,we="modifier"):he==="bold"?fe="bold":he==="italic"?le="italic":he==="underline"?ge="underline":he==="box"?(c[K]?R=!0:n(`This font style doesn't support "box"`,z,D),we="finished"):he==="utf"?(Te=T.shift(),we="size"):n("Unknown parameter "+Te.token+" in font definition.",z,D);break;case"size":Te.type==="number"?ce?n("Font size specified twice in font definition.",z,D):ce=Te.token:n("Expected font size in font definition.",z,D),we="modifier";break;case"modifier":he==="bold"?fe="bold":he==="italic"?le="italic":he==="underline"?ge="underline":he==="box"?(c[K]?R=!0:n(`This font style doesn't support "box"`,z,D),we="finished"):n("Unknown parameter "+Te.token+" in font definition.",z,D);break;case"finished":n('Extra characters found after "box" in font definition.',z,D);break}}ce===void 0?F?ce=F.size:(n("Must specify the size of the font since there is no default value.",z,D),ce=12):ce=parseFloat(ce),ee=ee.join(" "),ee===""&&(F?ee=F.face:(n("Must specify the name of the font since there is no default value.",z,D),ee="sans-serif"));var Pe=d(ee),Le={};return Pe?(Le.face=Pe.face,Le.weight=Pe.weight,Le.style=Pe.style,Le.decoration=Pe.decoration,Le.size=ce,R&&(Le.box=!0),Le):(Le.face=ee,Le.weight=fe,Le.style=le,Le.decoration=ge,Le.size=ce,R&&(Le.box=!0),Le)},h=function(T,F,z){return F.length===0?'Directive "'+T+'" requires a font as a parameter.':(s[T]=g(F,s[T],z,0,T),s.is_in_header&&(r.formatting[T]=s[T]),null)},m=function(T,F,z){return F.length===0?'Directive "'+T+'" requires a font as a parameter.':(r.formatting[T]=g(F,r.formatting[T],z,0,T),null)},p=function(T,F){var z="";F.forEach(function(K){z+=K.token});var D=parseFloat(z);if(isNaN(D)||D===0)return'Directive "'+T+'" requires a number as a parameter.';r.formatting.scale=D},u=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],f=function(T){var F=T.split(/\s+/);if(F.length!==2&&F.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var z=F[0],D=parseInt(F[1],10);if((isNaN(D)||D<35||D>81)&&F[1]&&(D=u.indexOf(F[1].toLowerCase())+35),isNaN(D)||D<35||D>81)return{error:'Expected drum name, received "'+F[1]+'"'};var K={sound:D};return F.length===3&&(K.noteHead=F[2]),{key:z,value:K}},_=function(T,F){var z=i.getMeasurement(F);return z.used===0||F.length!==0?{error:'Directive "'+T+'" requires a measurement as a parameter.'}:z.value},v=function(T,F){var z=i.getMeasurement(F);return z.used===0||F.length!==0?'Directive "'+T+'" requires a measurement as a parameter.':(r.formatting[T]=z.value,null)},b=function(T,F,z,D,K){if(z.length!==1||z[0].type!=="number")return'Directive "'+F+'" requires a number as a parameter.';var X=z[0].intt;return D!==void 0&&XK?'Directive "'+F+'" requires a number less than or equal to '+K+" as a parameter.":(s[T]=X,null)},S=function(T,F,z){if(z.length===1&&(z[0].token==="true"||z[0].token==="false"))return s[T]=z[0].token==="true",null;var D=b(T,F,z,0,1);return D!==null?D:(s[T]=s[T]===1,null)},$=function(T,F,z,D){if(z.length!==1)return'Directive "'+F+'" requires one of [ '+D.join(", ")+" ] as a parameter.";for(var K=z[0].token,X=!1,ee=0;!X&&ee=0)T.length!==0&&n("Unexpected parameter in MIDI "+D,z,0);else if(N.indexOf(D)>=0)T.length!==1?n("Expected one parameter in MIDI "+D,z,0):K.push(T[0].token);else if(P.indexOf(D)>=0)T.length!==1?n("Expected one parameter in MIDI "+D,z,0):T[0].type!=="number"?n("Expected one integer parameter in MIDI "+D,z,0):K.push(T[0].intt);else if(C.indexOf(D)>=0)T.length!==1&&T.length!==2?n("Expected one or two parameters in MIDI "+D,z,0):T[0].type!=="number"||T.length===2&&T[1].type!=="number"?n("Expected integer parameter in MIDI "+D,z,0):(K.push(T[0].intt),T.length===2&&K.push(T[1].intt));else if(j.indexOf(D)>=0)T.length!==2?n("Expected two parameters in MIDI "+D,z,0):T[0].type!=="number"||T[1].type!=="number"?n("Expected two integer parameters in MIDI "+D,z,0):(K.push(T[0].intt),K.push(T[1].intt));else if(B.indexOf(D)>=0)T.length!==2?n("Expected two parameters in MIDI "+D,z,0):T[0].type!=="alpha"||T[1].type!=="number"?n("Expected one string and one integer parameters in MIDI "+D,z,0):(K.push(T[0].token),K.push(T[1].intt));else if(D==="drummap")T.length===2&&T[0].type==="alpha"&&T[1].type==="number"?(F.formatting||(F.formatting={}),F.formatting.midi||(F.formatting.midi={}),F.formatting.midi.drummap||(F.formatting.midi.drummap={}),F.formatting.midi.drummap[T[0].token]=T[1].intt,K=F.formatting.midi.drummap):T.length===3&&T[0].type==="punct"&&T[1].type==="alpha"&&T[2].type==="number"?(F.formatting||(F.formatting={}),F.formatting.midi||(F.formatting.midi={}),F.formatting.midi.drummap||(F.formatting.midi.drummap={}),F.formatting.midi.drummap[T[0].token+T[1].token]=T[2].intt,K=F.formatting.midi.drummap):n("Expected one note name and one integer parameter in MIDI "+D,z,0);else if(H.indexOf(D)>=0)T.length!==3||T[0].type!=="number"||T[1].token!=="/"||T[2].type!=="number"?n("Expected fraction parameter in MIDI "+D,z,0):(K.push(T[0].intt),K.push(T[2].intt));else if(G.indexOf(D)>=0)T.length!==4?n("Expected four parameters in MIDI "+D,z,0):T[0].type!=="number"||T[1].type!=="number"||T[2].type!=="number"||T[3].type!=="number"?n("Expected four integer parameters in MIDI "+D,z,0):(K.push(T[0].intt),K.push(T[1].intt),K.push(T[2].intt),K.push(T[3].intt));else if(A.indexOf(D)>=0)T.length!==5?n("Expected five parameters in MIDI "+D,z,0):T[0].type!=="number"||T[1].type!=="number"||T[2].type!=="number"||T[3].type!=="number"||T[4].type!=="number"?n("Expected five integer parameters in MIDI "+D,z,0):(K.push(T[0].intt),K.push(T[1].intt),K.push(T[2].intt),K.push(T[3].intt),K.push(T[4].intt));else if(C.indexOf(D)>=0)T.length!==1||T.length!==4?n("Expected one or two parameters in MIDI "+D,z,0):T[0].type!=="number"?n("Expected integer parameter in MIDI "+D,z,0):T.length===4?(T[1].token!=="octave"&&n("Expected octave parameter in MIDI "+D,z,0),T[2].token!=="="&&n("Expected octave parameter in MIDI "+D,z,0),T[3].type!=="number"&&n("Expected integer parameter for octave in MIDI "+D,z,0)):(K.push(T[0].intt),T.length===4&&K.push(T[3].intt));else if(U.indexOf(D)>=0)if(T.length<2)n("Expected string parameter and at least one integer parameter in MIDI "+D,z,0);else if(T[0].type!=="alpha")n("Expected string parameter and at least one integer parameter in MIDI "+D,z,0);else{var X=T.shift();for(K.push(X.token);T.length>0;)X=T.shift(),X.type!=="number"&&n("Expected integer parameter in MIDI "+D,z,0),K.push(X.intt)}else if(E.indexOf(D)>=0){if(T.length!==1&&T.length!==2)n("Expected one or two parameters in MIDI "+D,z,0);else if(T[0].type!=="number")n("Expected integer parameter in MIDI "+D,z,0);else if(T.length===2&&T[1].type!=="alpha")n("Expected alpha parameter in MIDI "+D,z,0);else if(K.push(T[0].intt),T.length===2){var ee=T[1].token;ee.indexOf("octave=")!=-1?(ee=ee.replace("octave=",""),ee=parseInt(ee),isNaN(ee)?n("Expected octave value in MIDI"+D):(ee<-1&&(n("Expected octave= in MIDI "+D+" to be >= -1 (recv:"+ee+")"),ee=-1),ee>3&&(n("Expected octave= in MIDI "+D+" to be <= 3 (recv:"+ee+")"),ee=3),K.push(ee))):n("Expected octave= in MIDI"+D)}}o.hasBeginMusic()?o.appendElement("midi",-1,-1,{cmd:D,params:K}):(F.formatting.midi===void 0&&(F.formatting.midi={}),F.formatting.midi[D]=K)};t.parseFontChangeLine=function(T){T=T.replace(/\$\$/g,"");var F=T.split("$");if(F.length>1&&s.setfont){var z=[];F[0]!==""&&z.push({text:F[0]});for(var D=1;D0&&s.ignoredDecorations.push(z.substring(0,z.indexOf(" "))),n("Decoration redefinition ignored",T,0);break;case"text":var Le=i.translateString(z);o.addText(t.parseFontChangeLine(Le),{startChar:s.iChar,endChar:s.iChar+z.length+7});break;case"center":var ct=i.translateString(z);o.addCentered(t.parseFontChangeLine(ct));break;case"font":break;case"setfont":var Ae=i.tokenize(z,0,z.length);if(Ae.length>=4&&Ae[0].token==="-"&&Ae[1].type==="number"){var Ge=parseInt(Ae[1].token);Ge>=1&&Ge<=9&&(s.setfont||(s.setfont=[]),Ae.shift(),Ae.shift(),s.setfont[Ge]=g(Ae,s.setfont[Ge],T,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return h(D,F,T);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return m(D,F,T);case"barlabelfont":case"barnumberfont":case"barnumfont":return h("measurefont",F,T);case"staves":case"score":s.score_is_present=!0;for(var ne=function(Ke,ut,nt,Lt,Gt){(ut||s.staves.length===0)&&s.staves.push({index:s.staves.length,numVoices:0});var jt=a.last(s.staves);nt!==void 0&&jt.bracket===void 0&&(jt.bracket=nt),Lt!==void 0&&jt.brace===void 0&&(jt.brace=Lt),Gt&&(jt.connectBarLines="end"),s.voices[Ke]===void 0&&(s.voices[Ke]={staffNum:jt.index,index:jt.numVoices},jt.numVoices++)},Je=!1,ue=!1,ye=!1,de=!1,be=!1,xe=!1,Ie=!1,$e,ze=function(){if(Ie=!0,$e){var Ke="start";$e.staffNum>0&&(s.staves[$e.staffNum-1].connectBarLines==="start"||s.staves[$e.staffNum-1].connectBarLines==="continue")&&(Ke="continue"),s.staves[$e.staffNum].connectBarLines=Ke}};F.length;){var Fe=F.shift();switch(Fe.token){case"(":Je?n("Can't nest parenthesis in %%score",T,Fe.start):(Je=!0,de=!0);break;case")":!Je||de?n("Unexpected close parenthesis in %%score",T,Fe.start):Je=!1;break;case"[":ue?n("Can't nest brackets in %%score",T,Fe.start):(ue=!0,be=!0);break;case"]":!ue||be?n("Unexpected close bracket in %%score",T,Fe.start):(ue=!1,s.staves[$e.staffNum].bracket="end");break;case"{":ye?n("Can't nest braces in %%score",T,Fe.start):(ye=!0,xe=!0);break;case"}":!ye||xe?n("Unexpected close brace in %%score",T,Fe.start):(ye=!1,s.staves[$e.staffNum].brace="end");break;case"|":ze();break;default:for(var qe="";(Fe.type==="alpha"||Fe.type==="number")&&(qe+=Fe.token,Fe.continueId);)Fe=F.shift();var rt=!Je||de,ot=be?"start":ue?"continue":void 0,je=xe?"start":ye?"continue":void 0;ne(qe,rt,ot,je,Ie),de=!1,be=!1,xe=!1,Ie=!1,$e=s.voices[qe],D==="staves"&&ze();break}}break;case"maxstaves":var He=i.getInt(z);He.digits===0?n("Expected number of staves in maxstaves"):He.value>0&&(r.formatting.maxStaves=He.value);break;case"newpage":var Be=i.getInt(z);o.addNewPage(Be.digits===0?-1:Be.value);break;case"abc":var Re=z.split(" ");switch(Re[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var Ze=Re.shift();o.addMetaText(D+Ze,Re.join(" "),{startChar:s.iChar,endChar:s.iChar+z.length+5});break;default:return"Unknown directive: "+D+Re[0]}break;case"header":case"footer":var Ne=i.getMeat(z,0,z.length);Ne=z.substring(Ne.start,Ne.end),Ne[0]==='"'&&Ne[Ne.length-1]==='"'&&(Ne=Ne.substring(1,Ne.length-1));var Ve=Ne.split(" "),gt={};Ve.length===1?gt={left:"",center:Ve[0],right:""}:Ve.length===2?gt={left:Ve[0],center:Ve[1],right:""}:gt={left:Ve[0],center:Ve[1],right:Ve[2]},Ve.length>3&&n("Too many tabs in "+D+": "+Ve.length+" found.",z,0),o.addMetaTextObj(D,gt,{startChar:s.iChar,endChar:s.iChar+T.length});break;case"midi":var _t=i.tokenize(z,0,z.length,!0);_t.length>0&&_t[0].token==="="&&_t.shift(),_t.length===0?n("Expected midi command",z,0):O(_t,r,z);break;case"percmap":var at=f(z);at.error?n(at.error,T,8):(r.formatting.percmap||(r.formatting.percmap={}),r.formatting.percmap[at.key]=at.value);break;case"visualtranspose":var wt=i.getInt(z);wt.digits===0?n("Expected number of half steps in visualTranspose"):s.globalTranspose=wt.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":r.formatting[D]=z;break;default:return"Unknown directive: "+D}return null},t.globalFormatting=function(T){for(var F in T)if(T.hasOwnProperty(F)){var z=""+T[F],D=i.tokenize(z,0,z.length),K;switch(F){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":h(F,D,z);break;case"scale":p(F,D);break;case"partsbox":K=S("partsBox",F,D),K!==null&&n(K),s.partsfont.box=s.partsBox;break;case"freegchord":K=S("freegchord",F,D),K!==null&&n(K);break;case"fontboxpadding":(D.length!==1||D[0].type!=="number")&&n('Directive "'+F+'" requires a number as a parameter.'),r.formatting.fontboxpadding=D[0].floatt;break;case"stafftopmargin":(D.length!==1||D[0].type!=="number")&&n('Directive "'+F+'" requires a number as a parameter.'),r.formatting.stafftopmargin=D[0].floatt;break;case"stretchlast":var X=L(D);if(X.value!==void 0&&(r.formatting.stretchlast=X.value),X.error)return X.error;break;default:n("Formatting directive unrecognized: ",F,0)}}};function L(T){if(T.length===0)return{value:1};if(T.length===1)if(T[0].type==="number"){if(T[0].floatt>=0||T[0].floatt<=1)return{value:T[0].floatt}}else{if(T[0].token==="false")return{value:0};if(T[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+T[0].token+")"}}})(),M0=t,M0}var E0,j2;function Kz(){if(j2)return E0;j2=1;var a={};const t=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];return a.pitchIndex=function(i){return t.indexOf(i)},a.noteName=function(i){return t[i]},E0=a,E0}var U0,N2;function O2(){if(N2)return U0;N2=1;var a=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],t=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],i=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],n=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function s(r,o,l,c){if(!o||o%12===0)return r;for(;o<0;)o+=12;o>11&&(o=o%12);var d=r.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!d)return r;var g=d[1],h=d[2],m=d[3],p=d[4],u=a.indexOf(g);if(u<0&&(u=t.indexOf(g)),u<0&&(u=i.indexOf(g)),u<0&&(u=n.indexOf(g)),u<0)return r;u+=o,u=u%12,l?c?r=n[u]:r=t[u]:c?r=i[u]:r=a[u];var f=h&&(h.indexOf("dim")>=0||h.indexOf("°")>=0);if(f&&r==="A#"&&(r="Bb"),f&&r==="D#"&&(r="Eb"),f&&r==="A♯"&&(r="B♭"),f&&r==="D♯"&&(r="E♭"),h&&(r+=h),m){var u=a.indexOf(m);u<0&&(u=t.indexOf(m)),u<0&&(u=i.indexOf(m)),u<0&&(u=n.indexOf(m)),r+="/",u>=0?(u+=o,u=u%12,l?c?r+=n[u]:r+=t[u]:c?r+=i[u]:r+=a[u]):r+=m}return p&&(r+=p),r}return U0=s,U0}var R0,I2;function D2(){if(I2)return R0;I2=1;var a={C:{modes:["CMaj","CIon","Amin","AAeo","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","DbIon","Bbmin","BbAeo","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","DIon","Bmin","BAeo","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","EbIon","Cmin","CAeo","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","EIon","C#min","C#Aeo","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","FIon","Dmin","DAeo","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","GbIon","Ebmin","EbAeo","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","GIon","Emin","EAeo","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","AbIon","Fmin","FAeo","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","AIon","F#min","F#Aeo","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","BbIon","Gmin","GAeo","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","BIon","G#min","G#Aeo","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","C#Ion","A#min","A#Aeo","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","F#Ion","D#min","D#Aeo","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","CbIon","Abmin","AbAeo","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},t=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function i(c){return t.indexOf(c.toLowerCase())>=0}var n=null;function s(){n={};for(var c=Object.keys(a),d=0;d11&&(M=M%12);var N=p[0]==="m"?o[M]:r[M],P=N+p,C=i(P);(C.length===0||C[0].acc==="flat")&&(m.localTransposePreferFlats=!0);var j=P.charCodeAt(0)-b.charCodeAt(0);return m.localTranspose>0?(j<0||j===0&&(b[1]==="#"||P[1]==="b"))&&(j+=7):m.localTranspose<0&&(j>0||j===0&&(b[1]==="b"||P[1]==="#"))&&(j-=7),m.localTranspose>0?m.localTransposeVerticalMovement=j+Math.floor(m.localTranspose/12)*7:m.localTransposeVerticalMovement=j+Math.ceil(m.localTranspose/12)*7,$?{accidentals:C,root:N[0],acc:N.length>1?N[1]:""}:{accidentals:[],root:u,acc:f}},n.chordName=function(m,p){return t(p,m.localTranspose,m.localTransposePreferFlats,m.freegchord)};var l=["c","d","e","f","g","a","b"];function c(m,p,u,f,_){for(var v=l[(m+49)%7],b=0,S=0;S2&&(p++,j-=N==="b"||N==="e"?1:2),[p,j]}var d={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},g={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},h={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return n.note=function(m,p){if(!(!m.localTranspose||m.clef.type==="perc")){var u=p.pitch;if(m.localTransposeVerticalMovement&&(p.pitch=p.pitch+m.localTransposeVerticalMovement,p.name)){var f=p.accidental?p.name.substring(1):p.name,_=p.accidental?p.name[0]:"",v=a.pitchIndex(f);p.name=_+a.noteName(v+m.localTransposeVerticalMovement)}if(p.accidental){var b=c(u,p.pitch,p.accidental,m.globalTransposeOrigKeySig,m.targetKey);p.pitch=b[0],p.accidental=g[b[1]],p.name&&(p.name=h[b[1]]+p.name.replace(/[_^=]/g,""))}}},P0=n,P0}var j0,Q2;function N0(){if(Q2)return j0;Q2=1;var a=z0(),t=W2(),i={};return(function(){var n,s,r,o;i.initialize=function(u,f,_,v,b){n=u,s=f,r=_,o=b},i.standardKey=function(u,f,_,v){return t.keySignature(r,u,f,_,v)};var l={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(u,f){var _=l[u],v=_?_.mid:0;return v+f};i.fixClef=function(u){var f=l[u.type];f&&(u.clefPos=f.pitch,u.type=f.clef)},i.deepCopyKey=function(u){var f={accidentals:[],root:u.root,acc:u.acc,mode:u.mode};return u.accidentals.forEach(function(_){f.accidentals.push(Object.assign({},_))}),u.explicitAccidentals&&(f.explicitAccidentals=[],u.explicitAccidentals.forEach(function(_){f.explicitAccidentals.push(Object.assign({},_))})),f};var d=function(){r.currentVoice&&(r.currentVoice.key=i.deepCopyKey(r.key))},g={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};i.addPosToKey=function(u,f){var _=u.verticalPos;f.accidentals.forEach(function(v){var b=g[v.note];b=b-_,v.verticalPos=b}),f.impliedNaturals&&f.impliedNaturals.forEach(function(v){var b=g[v.note];b=b-_,v.verticalPos=b}),_<-10?(f.accidentals.forEach(function(v){v.verticalPos-=7,(v.verticalPos>=11||v.verticalPos===10&&v.acc==="flat")&&(v.verticalPos-=7),v.note==="A"&&v.acc==="sharp"&&(v.verticalPos-=7),(v.note==="G"||v.note==="F")&&v.acc==="flat"&&(v.verticalPos-=7)}),f.impliedNaturals&&f.impliedNaturals.forEach(function(v){v.verticalPos-=7,(v.verticalPos>=11||v.verticalPos===10&&v.acc==="flat")&&(v.verticalPos-=7),v.note==="A"&&v.acc==="sharp"&&(v.verticalPos-=7),(v.note==="G"||v.note==="F")&&v.acc==="flat"&&(v.verticalPos-=7)})):_<-4?(f.accidentals.forEach(function(v){v.verticalPos-=7,_===-8&&(v.note==="f"||v.note==="g")&&v.acc==="sharp"&&(v.verticalPos-=7)}),f.impliedNaturals&&f.impliedNaturals.forEach(function(v){v.verticalPos-=7,_===-8&&(v.note==="f"||v.note==="g")&&v.acc==="sharp"&&(v.verticalPos-=7)})):_>=7&&(f.accidentals.forEach(function(v){v.verticalPos+=7}),f.impliedNaturals&&f.impliedNaturals.forEach(function(v){v.verticalPos+=7}))},i.fixKey=function(u,f){var _=Object.assign({},f);return i.addPosToKey(u,_),_};var h=function(u){var f=0,_=u[f++];(_==="^"||_==="_")&&(_=u[f++]);var v=g[_];for(v===void 0&&(v=6);f0){v.foundKey=!0;var S="",$="";_[0].token.length>1?_[0].token=_[0].token.substring(1):_.shift();var M=b.token;if(_.length>0){var N=n.getSharpFlat(_[0].token);if(N.len>0&&(_[0].token.length>1?_[0].token=_[0].token.substring(1):_.shift(),M+=N.token,S=N.token),_.length>0){var P=n.getMode(_[0].token);P.len>0&&(_.shift(),M+=P.token,$=P.token)}if(i.standardKey(M,b.token,S,0)===void 0)return s("Unsupported key signature: "+M,u,0),v}var C=i.deepCopyKey(r.key),j=!f&&r.globalTranspose?-r.globalTranspose:0,G;if(f&&(G=r.globalTransposeOrigKeySig),r.key=i.deepCopyKey(i.standardKey(M,b.token,S,j)),f&&(r.globalTransposeOrigKeySig=G),r.key.mode=$,C&&r.keywarn!==!1){for(var A,B=0;B0;)switch(_[0].token){case"m":case"middle":if(_.shift(),_.length===0)return s("Expected = after middle",u,0),v;if(L=_.shift(),L.token!=="="){s("Expected = after middle",u,L.start);break}if(_.length===0)return s("Expected parameter after middle=",u,0),v;var T=n.getPitchFromTokens(_);T.warn&&s(T.warn,u,0),T.position&&(r.clef.verticalPos=T.position-6);break;case"transpose":if(_.shift(),_.length===0)return s("Expected = after transpose",u,0),v;if(L=_.shift(),L.token!=="="){s("Expected = after transpose",u,L.start);break}if(_.length===0)return s("Expected parameter after transpose=",u,0),v;if(_[0].type!=="number"){s("Expected number after transpose",u,_[0].start);break}r.clef.transpose=_[0].intt,_.shift();break;case"stafflines":if(_.shift(),_.length===0)return s("Expected = after stafflines",u,0),v;if(L=_.shift(),L.token!=="="){s("Expected = after stafflines",u,L.start);break}if(_.length===0)return s("Expected parameter after stafflines=",u,0),v;if(_[0].type!=="number"){s("Expected number after stafflines",u,_[0].start);break}r.clef.stafflines=_[0].intt,_.shift();break;case"staffscale":if(_.shift(),_.length===0)return s("Expected = after staffscale",u,0),v;if(L=_.shift(),L.token!=="="){s("Expected = after staffscale",u,L.start);break}if(_.length===0)return s("Expected parameter after staffscale=",u,0),v;if(_[0].type!=="number"){s("Expected number after staffscale",u,_[0].start);break}r.clef.staffscale=_[0].floatt,_.shift();break;case"octave":if(_.shift(),_.length===0)return s("Expected = after octave",u,0),v;if(L=_.shift(),L.token!=="="){s("Expected = after octave",u,L.start);break}if(_.length===0)return s("Expected parameter after octave=",u,0),v;if(_[0].type!=="number"){s("Expected number after octave",u,_[0].start);break}r.octave=_[0].intt,_.shift();break;case"style":if(_.shift(),_.length===0)return s("Expected = after style",u,0),v;if(L=_.shift(),L.token!=="="){s("Expected = after style",u,L.start);break}if(_.length===0)return s("Expected parameter after style=",u,0),v;switch(_[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=_[0].token,_.shift();break;default:s("error parsing style element: "+_[0].token,u,_[0].start);break}break;case"clef":if(_.shift(),_.length===0)return s("Expected = after clef",u,0),v;if(L=_.shift(),L.token!=="="){s("Expected = after clef",u,L.start);break}if(_.length===0)return s("Expected parameter after clef=",u,0),v;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var F=_.shift();switch(F.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":F.token="alto";break;case"F":F.token="bass";break;case"G":F.token="treble";break;case"c":F.token="alto";break;case"f":F.token="bass";break;case"g":F.token="treble";break;default:s("Expected clef name. Found "+F.token,u,F.start);break}_.length>0&&_[0].type==="number"&&(F.token+=_[0].token,_.shift()),_.length>1&&(_[0].token==="-"||_[0].token==="+"||_[0].token==="^"||_[0].token==="_")&&_[1].token==="8"&&(F.token+=_[0].token+_[1].token,_.shift(),_.shift()),r.clef={type:F.token,verticalPos:c(F.token,0)},r.currentVoice&&r.currentVoice.transpose!==void 0&&(r.clef.transpose=r.currentVoice.transpose),v.foundClef=!0;break;default:s("Unknown parameter: "+_[0].token,u,_[0].start),_.shift()}return v};var p=function(u){var f=r.voices[u];if(!(r.currentVoice&&r.currentVoice.index===f.index&&r.currentVoice.staffNum===f.staffNum))return r.currentVoice=f,f.key?r.key=i.deepCopyKey(f.key):r.globalKey&&(r.key=i.deepCopyKey(r.globalKey)),o.setCurrentVoice(f.staffNum,f.index,u)};i.parseVoice=function(u,f,_){var v=n.getMeat(u,f,_),b=v.start,S=v.end,$=n.getToken(u,b,S);if($.length===0){s("Expected a voice id",u,b);return}var M=!1;r.voices[$]===void 0&&(r.voices[$]={},M=!0,r.score_is_present&&s("Can't have an unknown V: id when the %score directive is present",u,b)),b+=$.length,b+=n.eatWhiteSpace(u,b);for(var N={startStaff:M},P=function(T){var F=n.getVoiceToken(u,b,S);F.warn!==void 0?s("Expected value for "+T+" in voice: "+F.warn,u,b):F.err!==void 0?s("Expected value for "+T+" in voice: "+F.err,u,b):F.token.length===0&&u[b]!=='"'?s("Expected value for "+T+" in voice",u,b):N[T]=F.token,b+=F.len},C=function(T,F,z){var D=n.getVoiceToken(u,b,S);D.warn!==void 0?s("Expected value for "+F+" in voice: "+D.warn,u,b):D.err!==void 0?s("Expected value for "+F+" in voice: "+D.err,u,b):D.token.length===0&&u[b]!=='"'?s("Expected value for "+F+" in voice",u,b):(D.token=parseFloat(D.token),r.voices[T][F]=D.token),b+=D.len},j=function(T,F){var z=n.getVoiceToken(u,b,S);if(z.warn!==void 0)s("Expected value for "+T+" in voice: "+z.warn,u,b);else if(z.err!==void 0)s("Expected value for "+T+" in voice: "+z.err,u,b);else if(z.token.length===0&&u[b]!=='"')s("Expected value for "+T+" in voice",u,b);else return z.token;b+=z.len},G=function(T,F){var z={_B:2,_E:9,_b:-10,_e:-3},D=n.getVoiceToken(u,b,S);if(D.warn!==void 0)s("Expected one of (_B, _E, _b, _e) for "+F+" in voice: "+D.warn,u,b);else if(D.token.length===0&&u[b]!=='"')s("Expected one of (_B, _E, _b, _e) for "+F+" in voice",u,b);else{var K=z[D.token];K?r.voices[T][F]=K:s("Expected one of (_B, _E, _b, _e) for "+F+" in voice",u,b)}b+=D.len};b0&&(o.default_length=_/v,o.havent_set_length=!1)}else f.length===1&&f[0]==="1"&&(o.default_length=1,o.havent_set_length=!1)};var d={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(h,m,p,u){try{var f=s.tokenize(h,m,p);if(f.length===0)throw"Missing parameter in Q: field";var _={startChar:u+m-2,endChar:u+p},v=!0,b=f.shift();if(b.type==="quote"&&(_.preString=b.token,b=f.shift(),f.length===0))return d[_.preString.toLowerCase()]&&(_.bpm=d[_.preString.toLowerCase()],_.suppressBpm=!0),{type:"immediate",tempo:_};if(b.type==="alpha"&&b.token==="C"){if(f.length===0)throw"Missing tempo after C in Q: field";if(b=f.shift(),b.type==="punct"&&b.token==="="){if(f.length===0)throw"Missing tempo after = in Q: field";if(b=f.shift(),b.type!=="number")throw"Expected number after = in Q: field";_.duration=[1],_.bpm=parseInt(b.token)}else if(b.type==="number"){if(_.duration=[parseInt(b.token)],f.length===0)throw"Missing = after duration in Q: field";if(b=f.shift(),b.type!=="punct"||b.token!=="=")throw"Expected = after duration in Q: field";if(f.length===0)throw"Missing tempo after = in Q: field";if(b=f.shift(),b.type!=="number")throw"Expected number after = in Q: field";_.bpm=parseInt(b.token)}else throw"Expected number or equal after C in Q: field"}else if(b.type==="number"){var S=parseInt(b.token);if(f.length===0||f[0].type==="quote")_.duration=[1],_.bpm=S;else{if(v=!1,b=f.shift(),b.type!=="punct"&&b.token!=="/"||(b=f.shift(),b.type!=="number"))throw"Expected fraction in Q: field";var $=parseInt(b.token);for(_.duration=[S/$];f.length>0&&f[0].token!=="="&&f[0].type!=="quote";){if(b=f.shift(),b.type!=="number"||(S=parseInt(b.token),b=f.shift(),b.type!=="punct"&&b.token!=="/")||(b=f.shift(),b.type!=="number"))throw"Expected fraction in Q: field";$=parseInt(b.token),_.duration.push(S/$)}if(b=f.shift(),b.type!=="punct"&&b.token!=="=")throw"Expected = in Q: field";if(b=f.shift(),b.type!=="number")throw"Expected tempo in Q: field";_.bpm=parseInt(b.token)}}else throw"Unknown value in Q: field";if(f.length!==0&&(b=f.shift(),b.type==="quote"&&(_.postString=b.token,b=f.shift()),f.length!==0))throw"Unexpected string at end of Q: field";return o.printTempo===!1&&(_.suppress=!0),{type:v?"delaySet":"immediate",tempo:_}}catch(M){return r(M,h,m),{type:"none"}}},this.letter_to_inline_header=function(h,m,p){var u=!1,f=s.eatWhiteSpace(h,m);if(m+=f,h.length>=m+5&&h[m]==="["&&h[m+2]===":"){var _=h.indexOf("]",m),v=o.iChar+m,b=o.iChar+_+1;switch(h.substring(m,m+3)){case"[I:":var S=t.addDirective(h.substring(m+3,_));return S&&r(S,h,m),[_-m+1+f];case"[M:":var $=this.setMeter(h.substring(m+3,_));return p&&o.currentVoice&&$?o.staves[o.currentVoice.staffNum].meter=$:c.hasBeginMusic()&&$?c.appendStartingElement("meter",v,b,$):o.meter=$,[_-m+1+f];case"[K:":var M=i.parseKey(h.substring(m+3,_),!0);return M.foundClef&&c.hasBeginMusic()&&c.appendStartingElement("clef",v,b,o.clef),M.foundKey&&c.hasBeginMusic()&&c.appendStartingElement("key",v,b,i.fixKey(o.clef,o.key)),[_-m+1+f];case"[P:":var N=t.parseFontChangeLine(h.substring(m+3,_));return p||l.lines.length<=l.lineNum?o.partForNextLine={title:N,startChar:v,endChar:b}:c.appendElement("part",v,b,{title:N}),[_-m+1+f];case"[L:":return this.setDefaultLength(h,m+3,_),[_-m+1+f];case"[Q:":if(_>0){var P=this.setTempo(h,m+3,_,o.iChar);return P.type==="delaySet"?c.hasBeginMusic()?c.appendElement("tempo",v,b,this.calcTempo(P.tempo)):o.tempoForNextLine=["tempo",v,b,this.calcTempo(P.tempo)]:P.type==="immediate"&&(!p&&c.hasBeginMusic()?c.appendElement("tempo",v,b,P.tempo):o.tempoForNextLine=["tempo",v,b,P.tempo]),[_-m+1+f,h[m+1],h.substring(m+3,_)]}break;case"[V:":if(_>0)return u=i.parseVoice(h,m+3,_),[_-m+1+f,h[m+1],h.substring(m+3,_),u];break;case"[r:":return[_-m+1+f]}}return[0]},this.letter_to_body_header=function(h,m){var p=!1;if(h.length>=m+3)switch(h.substring(m,m+2)){case"I:":var u=t.addDirective(h.substring(m+2));return u&&r(u,h,m),[h.length];case"M:":var f=this.setMeter(h.substring(m+2));return c.hasBeginMusic()&&f&&c.appendStartingElement("meter",o.iChar+m,o.iChar+h.length,f),[h.length];case"K:":var _=i.parseKey(h.substring(m+2),c.hasBeginMusic());return _.foundClef&&c.hasBeginMusic()&&o.keywarn!==!1&&c.appendStartingElement("clef",o.iChar+m,o.iChar+h.length,o.clef),_.foundKey&&c.hasBeginMusic()&&o.keywarn!==!1&&c.appendStartingElement("key",o.iChar+m,o.iChar+h.length,i.fixKey(o.clef,o.key)),[h.length];case"P:":return c.hasBeginMusic()&&c.appendElement("part",o.iChar+m,o.iChar+h.length,{title:h.substring(m+2)}),[h.length];case"L:":return this.setDefaultLength(h,m+2,h.length),[h.length];case"Q:":var v=h.indexOf("",m+2);v===-1&&(v=h.length);var b=this.setTempo(h,m+2,v,o.iChar);return b.type==="delaySet"?c.appendElement("tempo",o.iChar+m,o.iChar+h.length,this.calcTempo(b.tempo)):b.type==="immediate"&&c.appendElement("tempo",o.iChar+m,o.iChar+h.length,b.tempo),[v,h[m],a.strip(h.substring(m+2))];case"V:":return p=i.parseVoice(h,m+2,h.length),[h.length,h[m],a.strip(h.substring(m+2)),p]}return[0]};var g={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(h){var m=g[h[0]],p=h.length-2,u=s.translateString(s.stripComment(h.substring(2)));if(m==="unalignedWords"||m==="notes")c.addMetaTextArray(m,t.parseFontChangeLine(u),{startChar:o.iChar,endChar:o.iChar+h.length});else if(m!==void 0)c.addMetaText(m,t.parseFontChangeLine(u),{startChar:o.iChar,endChar:o.iChar+h.length});else{var f=o.iChar,_=f+h.length;switch(h[0]){case"H":for(c.addMetaTextArray("history",t.parseFontChangeLine(u),{startChar:o.iChar,endChar:o.iChar+h.length}),h=s.peekLine();h&&h[1]!==":";)s.nextLine(),c.addMetaTextArray("history",t.parseFontChangeLine(s.translateString(s.stripComment(h))),{startChar:o.iChar,endChar:o.iChar+h.length}),h=s.peekLine();break;case"K":this.resolveTempo();var v=i.parseKey(h.substring(2),!1);!o.is_in_header&&c.hasBeginMusic()&&o.keywarn!==!1&&(v.foundClef&&c.appendStartingElement("clef",f,_,o.clef),v.foundKey&&c.appendStartingElement("key",f,_,i.fixKey(o.clef,o.key))),o.is_in_header=!1;break;case"L":this.setDefaultLength(h,2,h.length);break;case"M":o.origMeter=o.meter=this.setMeter(h.substring(2));break;case"P":o.is_in_header?c.addMetaText("partOrder",t.parseFontChangeLine(u),{startChar:o.iChar,endChar:o.iChar+h.length}):o.partForNextLine={title:u,startChar:f,endChar:_};break;case"Q":var b=this.setTempo(h,2,h.length,o.iChar);b.type==="delaySet"?o.tempo=b.tempo:b.type==="immediate"&&(l.metaText.tempo?o.tempoForNextLine=["tempo",f,_,b.tempo]:l.metaText.tempo=b.tempo);break;case"T":o.titlecaps&&(u=u.toUpperCase()),this.setTitle(t.parseFontChangeLine(s.theReverser(u)),p);break;case"U":this.addUserDefinition(h,2,h.length);break;case"V":if(i.parseVoice(h,2,h.length),!o.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":r("Ignored header",h,0);break;default:return{regular:!0}}}return{}}};return O0=n,O0}var Vs={},Y2;function Jz(){return Y2||(Y2=1,Vs.legalAccents=["trill","trillh","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"],Vs.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],Vs.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],Vs.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],Vs.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],Vs.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",Vs.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],Vs.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},Vs.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},Vs.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},Vs.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),Vs}var I0,J2;function Xz(){if(J2)return I0;J2=1;var a=N0(),t=W2(),i,n,s,r,o,l,{legalAccents:c,volumeDecorations:d,dynamicDecorations:g,accentPseudonyms:h,accentDynamicPseudonyms:m,nonDecorations:p,durations:u,pitches:f,rests:_,accMap:v,tripletQ:b}=Jz(),S=function(T,F,z,D,K,X){i=T,n=F,s=z,r=D,o=K,l=X,this.lineContinuation=!1},$=function(T,F,z){if(T.inTie[F]===void 0)return!1;var D=T.currentVoice?T.currentVoice.staffNum*100+T.currentVoice.index:0;return!!(T.inTie[F][D]&&(z.pitches!==void 0||z.rest.type!=="spacer"))},M={};S.prototype.parseMusic=function(T){l.resolveTempo(),s.is_in_header=!1;for(var F=0,z=s.iChar;i.isWhiteSpace(T[F])&&F0&&(F+=X[0],X[1]==="V"&&this.startNewLine());for(var ee=0;F0)F+=fe[0],fe[1]==="V"&&(D=!0);else{(!o.hasBeginMusic()||D&&!this.lineContinuation)&&(this.startNewLine(),D=!1);for(var le;;)if(le=i.eatWhiteSpace(T,F),le>0&&(F+=le),F>0&&T[F-1]===""&&(le=l.letter_to_body_header(T,F),le[0]>0&&(le[1]==="V"&&this.startNewLine(),F=le[0],s.start_new_line=!1)),le=B(T,F),le[0]>0&&(F+=le[0]),le=P(T,F),le[0]>0){M.chord||(M.chord=[]);var ge=i.translateString(le[1]);ge=ge.replace(/;/g,` `);for(var R=!1,we=0;we0&&(M.force_end_beam_last=!0),F+=ce}else if(p.indexOf($[F])===-1?le=A($,F):le=[0],le[0]>0)le[1]===null?F+1<$.length&&this.startNewLine():le[1].length>0&&(le[1].indexOf("style=")===0?M.style=le[1].substring(6):le[1].indexOf("class=")===0?M.extraClass=le[1].substring(6):(M.decoration===void 0&&(M.decoration=[]),le[1]==="beambr1"?M.beambr=1:le[1]==="beambr2"?M.beambr=2:M.decoration.push(le[1]))),F+=le[0];else if(le=C($,F),le[0]>0)M.gracenotes=le[1],F+=le[0];else break;if(le=H($,F),le[0]>0){ee=0,M.gracenotes!==void 0&&(M.rest={type:"spacer"},M.duration=.125,s.addFormattingOptions(M,r.formatting,"note"),o.appendElement("note",z+F,z+F+le[0],M),s.measureNotEmpty=!0,M={});var Te={type:le[1]};Te.type.length===0?n("Unknown bar type",$,F):(s.inEnding&&Te.type!=="bar_thin"&&(Te.endEnding=!0,s.inEnding=!1),le[2]&&(Te.startEnding=le[2],s.inEnding&&(Te.endEnding=!0),s.inEnding=!0,le[1]==="bar_right_repeat"?s.restoreStartEndingHoldOvers():s.duplicateStartEndingHoldOvers()),M.decoration!==void 0&&(Te.decoration=M.decoration),M.chord!==void 0&&(Te.chord=M.chord),Te.startEnding&&s.barFirstEndingNum===void 0?s.barFirstEndingNum=s.currBarNumber:Te.startEnding&&Te.endEnding&&s.barFirstEndingNum?s.currBarNumber=s.barFirstEndingNum:Te.endEnding&&(s.barFirstEndingNum=void 0),Te.type!=="bar_invisible"&&s.measureNotEmpty&&D()&&(s.currBarNumber++,s.barNumbers&&s.currBarNumber%s.barNumbers===0&&(Te.barNumber=s.currBarNumber)),s.addFormattingOptions(M,r.formatting,"bar"),o.appendElement("bar",z+oe,z+F+le[0],Te),s.measureNotEmpty=!1,M={}),F+=le[0]}else if($[F]==="&")le=j($,F),le[0]>0&&(o.appendElement("overlay",z,z+1,{}),F+=1,ee++);else{if(le=E($,F),le.consumed>0&&(le.startSlur!==void 0&&(M.startSlur=le.startSlur),le.dottedSlur&&(M.dottedSlur=!0),le.triplet!==void 0&&(Q>0?n("Can't nest triplets",$,F):(M.startTriplet=le.triplet,M.tripletMultiplier=le.tripletQ/le.triplet,M.tripletR=le.num_notes,Q=le.num_notes===void 0?le.triplet:le.num_notes)),F+=le.consumed),$[F]==="["){F++;for(var he=null,je=!1,Le=!1;!Le;){var nt=A($,F);nt[0]>0&&(F+=nt[0]);var Ae=O($,F,{},!1);if(Ae!==null&&Ae.pitch!==void 0)nt[0]>0&&nt[1].indexOf("style=")!==0&&(M.decoration===void 0&&(M.decoration=[]),M.decoration.push(nt[1])),Ae.end_beam&&(M.end_beam=!0,delete Ae.end_beam),M.pitches===void 0?(M.duration=Ae.duration,M.pitches=[Ae]):M.pitches.push(Ae),delete Ae.duration,nt[0]>0&&nt[1].indexOf("style=")===0&&(M.pitches[M.pitches.length-1].style=nt[1].substr(6)),s.inTieChord[M.pitches.length]&&(Ae.endTie=!0,s.inTieChord[M.pitches.length]=void 0),Ae.startTie&&(s.inTieChord[M.pitches.length]=!0),F=Ae.endChar,delete Ae.endChar;else if($[F]===" ")n("Spaces are not allowed in chords",$,F),F++;else{if(F<$.length&&$[F]==="]"){F++,s.next_note_duration!==0&&(M.duration=M.duration*s.next_note_duration,s.next_note_duration=0),S(s,ee,M)&&(M.pitches.forEach(function(Se){Se.endTie=!0}),P(s,ee,!1)),Q>0&&!(M.rest&&M.rest.type==="spacer")&&(Q--,Q===0&&(M.endTriplet=!0));for(var Ge=!1;F<$.length&&!Ge;){switch($[F]){case" ":case" ":U(M);break;case")":M.endSlur===void 0?M.endSlur=1:M.endSlur++;break;case"-":M.pitches.forEach(function(Se){Se.startTie={}}),P(s,ee,!0);break;case">":case"<":var ne=V($,F);F+=ne[0]-1,s.next_note_duration=ne[2],he?he=he*ne[1]:he=ne[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var Xe=i.getFraction($,F);he=Xe.value,F=Xe.index;var de=$[F];de===" "&&(je=!0),de==="-"||de===")"||de===" "||de==="<"||de===">"?F--:Ge=!0;break;case"0":he=0;break;default:Ge=!0;break}Ge||F++}}else n("Expected ']' to end the chords",$,F);M.pitches!==void 0&&(he!==null&&(M.duration=M.duration*he,je&&U(M)),s.addFormattingOptions(M,r.formatting,"note"),o.appendElement("note",z+oe,z+F,M),s.measureNotEmpty=!0,M={}),Le=!0}}}else{var ye={},ue=O($,F,ye,!0);if(ye.endTie!==void 0&&P(s,ee,!0),ue!==null){ue.pitch!==void 0?(M.pitches=[{}],ue.accidental!==void 0&&(M.pitches[0].accidental=ue.accidental),M.pitches[0].pitch=ue.pitch,M.pitches[0].name=ue.name,(ue.midipitch||ue.midipitch===0)&&(M.pitches[0].midipitch=ue.midipitch),ue.endSlur!==void 0&&(M.pitches[0].endSlur=ue.endSlur),ue.endTie!==void 0&&(M.pitches[0].endTie=ue.endTie),ue.startSlur!==void 0&&(M.pitches[0].startSlur=ue.startSlur),M.startSlur!==void 0&&(M.pitches[0].startSlur=M.startSlur),M.dottedSlur!==void 0&&(M.pitches[0].dottedSlur=!0),ue.startTie!==void 0&&(M.pitches[0].startTie=ue.startTie),M.startTie!==void 0&&(M.pitches[0].startTie=M.startTie)):(M.rest=ue.rest,ue.rest.type==="multimeasure"&&D()&&(s.currBarNumber+=ue.rest.text-1),ue.endSlur!==void 0&&(M.endSlur=ue.endSlur),ue.endTie!==void 0&&(M.rest.endTie=ue.endTie),ue.startSlur!==void 0&&(M.startSlur=ue.startSlur),ue.startTie!==void 0&&(M.rest.startTie=ue.startTie),M.startTie!==void 0&&(M.rest.startTie=M.startTie)),ue.chord!==void 0&&(M.chord=ue.chord),ue.duration!==void 0&&(M.duration=ue.duration),ue.decoration!==void 0&&(M.decoration=ue.decoration),ue.graceNotes!==void 0&&(M.graceNotes=ue.graceNotes),delete M.startSlur,delete M.dottedSlur,S(s,ee,M)&&(M.pitches!==void 0?M.pitches[0].endTie=!0:M.rest.type!=="spacer"&&(M.rest.endTie=!0),P(s,ee,!1)),(ue.startTie||M.startTie)&&P(s,ee,!0),F=ue.endChar,Q>0&&!(ue.rest&&ue.rest.type==="spacer")&&(Q--,Q===0&&(M.endTriplet=!0)),ue.end_beam&&U(M),M.rest&&M.rest.type==="rest"&&M.duration===1&&G(s)<=1&&(M.rest.type="whole",M.duration=G(s)),M.duration<1&&u.indexOf(M.duration)===-1&&M.duration!==0&&(!M.rest||M.rest.type!=="spacer")&&n("Duration not representable: "+$.substring(oe,F),$,F),s.addFormattingOptions(M,r.formatting,"note");var be=o.appendElement("note",z+oe,z+F,M);be||(this.startNewLine(),o.appendElement("note",z+oe,z+F,M)),s.measureNotEmpty=!0,M={}}}F===oe&&($[F]!==" "&&$[F]!=="`"&&n("Unknown character ignored",$,F),F++)}}}this.lineContinuation=$.indexOf("")>=0||Z[0]>0,this.lineContinuation||(M={})}};var P=function($,F,z){var L=$.currentVoice?$.currentVoice.staffNum*100+$.currentVoice.index:0;$.inTie[F]===void 0&&($.inTie[F]=[]),$.inTie[F][L]=z},B=function($,F){if($[F]==='"'){var z=i.getBrackettedSubstring($,F,5);if(z[2]||n("Missing the closing quote while parsing the chord symbol",$,F),z[0]>0&&z[1].length>0&&z[1][0]==="^")z[1]=z[1].substring(1),z[2]="above";else if(z[0]>0&&z[1].length>0&&z[1][0]==="_")z[1]=z[1].substring(1),z[2]="below";else if(z[0]>0&&z[1].length>0&&z[1][0]==="<")z[1]=z[1].substring(1),z[2]="left";else if(z[0]>0&&z[1].length>0&&z[1][0]===">")z[1]=z[1].substring(1),z[2]="right";else if(z[0]>0&&z[1].length>0&&z[1][0]==="@"){z[1]=z[1].substring(1);var L=i.getFloat(z[1]);if(L.digits===0)return n("Missing first position in absolutely positioned annotation.",$,F),z[1]=z[1].replace("@",""),z[2]="above",z;if(z[1]=z[1].substring(L.digits),z[1][0]!==",")return n("Missing comma absolutely positioned annotation.",$,F),z[1]=z[1].replace("@",""),z[2]="above",z;z[1]=z[1].substring(1);var Q=i.getFloat(z[1]);if(Q.digits===0)return n("Missing second position in absolutely positioned annotation.",$,F),z[1]=z[1].replace("@",""),z[2]="above",z;z[1]=z[1].substring(Q.digits);var Z=i.skipWhiteSpace(z[1]);z[1]=z[1].substring(Z),z[2]=null,z[3]={x:L.value,y:Q.value}}else s.freegchord!==!0&&(z[1]=z[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),z[1]=z[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),z[1]=z[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),z[1]=z[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),z[1]=z[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),z[1]=z[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),z[2]="default",z[1]=t.chordName(s,z[1]);return z}return[0,""]},C=function($,F){if($[F]==="{"){var z=i.getBrackettedSubstring($,F,1,"}");z[2]||n("Missing the closing '}' while parsing grace note",$,F),$[F+z[0]]===")"&&(z[0]++,z[1]+=")");for(var L=[],Q=0,Z=!1;Q0&&(L[L.length-1].endBeam=!0):n("Unknown character '"+z[1][Q]+"' while parsing grace note",$,F),Q++)}if(L.length)return[z[0],L]}return[0]};function j($,F){if($[F]==="&"){for(var z=F;$[F]&&$[F]!==":"&&$[F]!=="|";)F++;return[F-z,$.substring(z+1,F)]}return[0]}function G($){var F=$.origMeter;return!F||F.type!=="specified"||!F.value||F.value.length===0?1:parseInt(F.value[0].num,10)/parseInt(F.value[0].den,10)}var A=function($,F){var z=s.macros[$[F]];if(z!==void 0)return(z[0]==="!"||z[0]==="+")&&(z=z.substring(1)),(z[z.length-1]==="!"||z[z.length-1]==="+")&&(z=z.substring(0,z.length-1)),c.includes(z)?[1,z]:d.includes(z)?(s.volumePosition==="hidden"&&(z=""),[1,z]):g.includes(z)?(s.dynamicPosition==="hidden"&&(z=""),[1,z]):(s.ignoredDecorations.includes(z)||n("Unknown macro: "+z,$,F),[1,""]);switch($[F]){case".":if($[F+1]==="("||$[F+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var L=i.getBrackettedSubstring($,F,5);if(L[1].length>1&&(L[1][0]==="^"||L[1][0]==="_")&&(L[1]=L[1].substring(1)),c.includes(L[1])||L[1].indexOf("class=")===0)return L;if(d.includes(L[1]))return s.volumePosition==="hidden"&&(L[1]=""),L;if(g.includes(L[1]))return s.dynamicPosition==="hidden"&&(L[1]=""),L;var Q=h.findIndex(function(Z){return L[1]===Z[0]});return Q>=0?(L[1]=h[Q][1],L):(Q=m.findIndex(function(Z){return L[1]===Z[0]}),Q>=0?(L[1]=m[Q][1],s.dynamicPosition==="hidden"&&(L[1]=""),L):$[F]==="!"&&(L[0]===1||$[F+L[0]-1]!=="!")?[1,null]:(n("Unknown decoration: "+L[1],$,F),L[1]="",L));case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"];case"t":return[1,"trillh"]}return[0,0]},N=function($,F){for(var z=F;i.isWhiteSpace($[F]);)F++;return[F-z]},H=function($,F){var z=i.getBarLine($,F);if(z.len===0)return[0,""];if(z.warn)return n(z.warn,$,F),[z.len,""];for(var L=0;L<$.length&&$[F+z.len+L]===" ";L++);var Q=z.len;if($[F+z.len+L]==="["&&(z.len+=L+1),$[F+z.len]==='"'&&$[F+z.len-1]==="["){var Z=i.getBrackettedSubstring($,F+z.len,5);return[z.len+Z[0],z.token,Z[1]]}var ee=i.getTokenOf($.substring(F+z.len),"1234567890-,");return ee.len===0||ee.token[0]==="-"?[Q,z.token]:[z.len+ee.len,z.token,ee.token]},E=function($,F){var z={},L=F;for($[F]==="."&&$[F+1]==="("&&(z.dottedSlur=!0,F++);$[F]==="("||i.isWhiteSpace($[F]);)$[F]==="("&&(F+1<$.length&&$[F+1]>="2"&&$[F+1]<="9"?(z.triplet!==void 0?n("Can't nest triplets",$,F):(z.triplet=$[F+1]-"0",z.tripletQ=v[z.triplet],z.num_notes=z.triplet,F+2<$.length&&$[F+2]===":"&&(F+3<$.length&&$[F+3]===":"?F+4<$.length&&$[F+4]>="1"&&$[F+4]<="9"?(z.num_notes=$[F+4]-"0",F+=3):n("expected number after the two colons after the triplet to mark the duration",$,F):F+3<$.length&&$[F+3]>="1"&&$[F+3]<="9"?(z.tripletQ=$[F+3]-"0",F+4<$.length&&$[F+4]===":"?F+5<$.length&&$[F+5]>="1"&&$[F+5]<="9"&&(z.num_notes=$[F+5]-"0",F+=4):F+=2):n("expected number after the triplet to mark the duration",$,F))),F++):z.startSlur===void 0?z.startSlur=1:z.startSlur++),F++;return z.consumed=F-L,z};T.prototype.startNewLine=function(){var $={startChar:-1,endChar:-1};s.partForNextLine.title&&($.part=s.partForNextLine),$.clef=s.currentVoice&&s.staves[s.currentVoice.staffNum].clef!==void 0?Object.assign({},s.staves[s.currentVoice.staffNum].clef):Object.assign({},s.clef);var F=s.currentVoice?s.currentVoice.scoreTranspose:0;if($.key=a.standardKey(s.key.root+s.key.acc+s.key.mode,s.key.root,s.key.acc,F),$.key.mode=s.key.mode,s.key.impliedNaturals&&($.key.impliedNaturals=s.key.impliedNaturals),s.key.explicitAccidentals)for(var z=0;z=0?(z.duration=r.getBarLength(),z.rest.text=1,ee="Zduration"):(L&&s.next_note_duration!==0?(z.duration=s.default_length*s.next_note_duration,s.next_note_duration=0,oe=!0):z.duration=s.default_length,ee="duration");else return Q(ee)?(z.endChar=F,z):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(ee==="octave"||ee==="duration"){var le=i.getFraction($,F);for(z.duration=z.duration*le.value,z.endChar=le.index;le.index<$.length&&(i.isWhiteSpace($[le.index])||$[le.index]==="-");)$[le.index]==="-"?z.startTie={}:z=U(z),le.index++;F=le.index-1,ee="broken_rhythm"}else if(ee==="sharp2")z.accidental="quartersharp",ee="pitch";else if(ee==="flat2")z.accidental="quarterflat",ee="pitch";else if(ee==="Zduration"){var ge=i.getNumber($,F);return z.duration=ge.num*r.getBarLength(),z.rest.text=ge.num,z.endChar=ge.index,z}else return null;break;case"-":if(ee==="startSlur")o.addTieToLastNote(Z),z.endTie=!0;else if(ee==="octave"||ee==="duration"||ee==="end_slur")if(z.startTie={},!oe&&L)ee="broken_rhythm";else return i.isWhiteSpace($[F+1])&&U(z),z.endChar=F+1,z;else return ee==="broken_rhythm"?(z.endChar=F,z):null;break;case" ":case" ":if(Q(ee)){z.end_beam=!0,Z=!1;do $[F]==="."&&$[F+1]==="-"&&(Z=!0,F++),$[F]==="-"&&(z.startTie={},Z&&(z.startTie.style="dotted")),F++;while(F<$.length&&(i.isWhiteSpace($[F])||$[F]==="-")||$[F]==="."&&$[F+1]==="-");if(z.endChar=F,!oe&&L&&($[F]==="<"||$[F]===">"))F--,ee="broken_rhythm";else return z}else return null;break;case">":case"<":if(Q(ee))if(L){var R=V($,F);F+=R[0]-1,s.next_note_duration=R[2],z.duration=R[1]*z.duration,ee="end_slur"}else return z.endChar=F,z;else return null;break;default:return Q(ee)?(z.endChar=F,z):null}if(F++,F===$.length)return Q(ee)?(z.endChar=F,z):null}return null},V=function($,F){switch($[F]){case">":return F<$.length-2&&$[F+1]===">"&&$[F+2]===">"?[3,1.875,.125]:F<$.length-1&&$[F+1]===">"?[2,1.75,.25]:[1,1.5,.5];case"<":return F<$.length-2&&$[F+1]==="<"&&$[F+2]==="<"?[3,.125,1.875]:F<$.length-1&&$[F+1]==="<"?[2,.25,1.75]:[1,.5,1.5]}return null};function D(){return s.currentVoice===void 0||s.currentVoice.staffNum===0&&s.currentVoice.index===0}return I0=T,I0}var D0,X2;function Zz(){if(X2)return D0;X2=1;var a=Kr(),t=function(i,n){this.lineIndex=0,this.lines=i,this.multilineVars=n,this.skipWhiteSpace=function(p){for(var u=0;u=p.length};this.eatWhiteSpace=function(p,u){for(var f=u;f="a"&&b[v]<="z"||b[v]>="A"&&b[v]<="Z");)v++;return v},f=this.skipWhiteSpace(p);if(s(p,f))return{len:0};var _=p.substring(f,f+3).toLowerCase();switch((_.length>1&&_[1]===" "||_[1]==="^"||_[1]==="_"||_[1]==="=")&&(_=_[0]),_){case"mix":return{len:u(p,f),token:"Mix"};case"dor":return{len:u(p,f),token:"Dor"};case"phr":return{len:u(p,f),token:"Phr"};case"lyd":return{len:u(p,f),token:"Lyd"};case"loc":return{len:u(p,f),token:"Loc"};case"aeo":return{len:u(p,f),token:"m"};case"maj":return{len:u(p,f),token:""};case"ion":return{len:u(p,f),token:""};case"min":return{len:u(p,f),token:"m"};case"m":return{len:u(p,f),token:"m"}}return{len:0}},this.getClef=function(p,u){var f=p,_=this.skipWhiteSpace(p);if(s(p,_))return{len:0};var b=!1,v=p.substring(_);if(a.startsWith(v,"clef=")&&(b=!0,v=v.substring(5),_+=5),v.length===0&&b)return{len:_+5,warn:"No clef specified: "+f};var T=this.skipWhiteSpace(v);if(s(v,T))return{len:0};T>0&&(_+=T,v=v.substring(T));var S=null;if(a.startsWith(v,"treble"))S="treble";else if(a.startsWith(v,"bass3"))S="bass3";else if(a.startsWith(v,"bass"))S="bass";else if(a.startsWith(v,"tenor"))S="tenor";else if(a.startsWith(v,"alto2"))S="alto2";else if(a.startsWith(v,"alto1"))S="alto1";else if(a.startsWith(v,"alto"))S="alto";else if(!u&&b&&a.startsWith(v,"none"))S="none";else if(a.startsWith(v,"perc"))S="perc";else if(!u&&b&&a.startsWith(v,"C"))S="tenor";else if(!u&&b&&a.startsWith(v,"F"))S="bass";else if(!u&&b&&a.startsWith(v,"G"))S="treble";else return{len:_+5,warn:"Unknown clef specified: "+f};return v=v.substring(S.length),T=this.isMatch(v,"+8"),T>0?S+="+8":(T=this.isMatch(v,"-8"),T>0&&(S+="-8")),{len:_+S.length,token:S,explicit:b}},this.getBarLine=function(p,u){switch(p[u]){case"]":switch(++u,p[u]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++u,p[u]>="1"&&p[u]<="9"||p[u]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(++u,p[u]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++u,p[u]){case"]":return++u,p[u]==="|"?(++u,p[u]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"}):{len:3,token:"bar_right_repeat"};case"|":return++u,p[u]===":"?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if(++u,p[u]==="|")switch(++u,p[u]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}else return p[u]>="1"&&p[u]<="9"||p[u]==='"'?{len:1,token:"bar_invisible"}:{len:0};case"|":switch(++u,p[u]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++u,p[u]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var f=0;p[u+f]===":";)f++;return{len:1+f,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(p,u){for(var f=0;f0;){var f;if(p[0].token==="^"){if(f="sharp",p.shift(),p.length===0)return{accs:u,warn:"Expected note name after "+f};switch(p[0].token){case"^":f="dblsharp",p.shift();break;case"/":f="quartersharp",p.shift();break}}else if(p[0].token==="=")f="natural",p.shift();else if(p[0].token==="_"){if(f="flat",p.shift(),p.length===0)return{accs:u,warn:"Expected note name after "+f};switch(p[0].token){case"_":f="dblflat",p.shift();break;case"/":f="quarterflat",p.shift();break}}else return{accs:u};if(p.length===0)return{accs:u,warn:"Expected note name after "+f};switch(p[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":u===void 0&&(u=[]),u.push({acc:f,note:p[0].token[0]}),p[0].token.length===1?p.shift():p[0].token=p[0].token.substring(1);break;default:return{accs:u,warn:"Expected note name after "+f+" Found: "+p[0].token}}}return{accs:u}},this.getKeyAccidental=function(p){var u={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},f=this.skipWhiteSpace(p);if(s(p,f))return{len:0};var _=null;switch(p[f]){case"^":case"_":case"=":_=p[f];break;default:return{len:0}}if(f++,s(p,f))return{len:1,warn:"Expected note name after accidental"};switch(p[f]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:f+1,token:{acc:u[_],note:p[f]}};case"^":case"_":case"/":if(_+=p[f],f++,s(p,f))return{len:2,warn:"Expected note name after accidental"};switch(p[f]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:f+1,token:{acc:u[_],note:p[f]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(p){return p===" "||p===" "||p===""},this.getMeat=function(p,u,f){var _=p.indexOf("%",u);for(_>=0&&_="A"&&p<="Z"||p>="a"&&p<="z"},o=function(p){return p>="0"&&p<="9"};this.tokenize=function(p,u,f,_){var b=this.getMeat(p,u,f);u=b.start,f=b.end;for(var v=[],T;u=f?{len:1,err:"Missing close quote"}:{len:b-u+1,token:this.translateString(p.substring(_+1,b))}}else{for(var v=_;v=0?a.strip(p.substring(0,u)):a.strip(p)},this.getInt=function(p){var u=parseInt(p);if(isNaN(u))return{digits:0};var f=""+u,_=p.indexOf(f);return{value:u,digits:_+f.length}},this.getFloat=function(p){var u=parseFloat(p);if(isNaN(u))return{digits:0};var f=""+u,_=p.indexOf(f);return{value:u,digits:_+f.length}},this.getMeasurement=function(p){if(p.length===0)return{used:0};var u=1,f="";if(p[0].token==="-")p.shift(),f="-",u++;else if(p[0].type!=="number")return{used:0};if(f+=p.shift().token,p.length===0)return{used:1,value:parseInt(f)};var _=p.shift();if(_.token==="."){if(u++,p.length===0)return{used:u,value:parseInt(f)};if(p[0].type==="number"&&(_=p.shift(),f=f+"."+_.token,u++,p.length===0))return{used:u,value:parseFloat(f)};_=p.shift()}switch(_.token){case"pt":return{used:u+1,value:parseFloat(f)};case"px":return{used:u+1,value:parseFloat(f)};case"cm":return{used:u+1,value:parseFloat(f)/2.54*72};case"in":return{used:u+1,value:parseFloat(f)*72};default:return p.unshift(_),{used:u,value:parseFloat(f)}}};var m=function(p){return p=p.replace(/\\n/g,` -`),p=p.replace(/\\"/g,'"'),p};this.getBrackettedSubstring=function(p,u,f,_){for(var b=_||p[u],v=u+1,T=!1;vp.length-1&&(v=p.length-1),[v-u+1,m(p.substring(u+1,v)),!1])}};return t.prototype.peekLine=function(){return this.lines[this.lineIndex]},t.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex0&&(p[v.line].staff[v.staff].barNumber=_);for(var S=Object.keys(T),M=0;M=0;C--)if(B[C].el_type==="key"){u[v.staff]={root:B[C].root,acc:B[C].acc,mode:B[C].mode,accidentals:B[C].accidentals.filter(function(G){return G.acc!=="natural"})};break}for(C=B.length-1;C>=0;C--)if(B[C].el_type==="stem"){f[v.staff*10+v.voice]={direction:B[C].direction};break}if(m!==void 0&&v.staff===0&&v.voice===0)for(C=0;C0?(m.push(f-1),p.push(Math.round(u-_)),u=_):ff&&Mf?(v.push(M-1),b++,_=Math.max(_,f),f=Math.abs(m-h[b]),u.push(p-P),p=P):f=B}u.push(p)}function o(g,h,m,p){for(var u=Math.ceil(g.total/h),f=Math.floor(g.total/u),_=[],b=0;bh&&(_=!0),b%m===m-1&&(b!==g.length-1&&p.push(b),u.push(Math.round(f)),f=0);return{failed:_,totals:u,lineBreaks:p}}function c(g,h,m){var p={lineBreaks:g,staffwidth:h};for(var u in m)m.hasOwnProperty(u)&&u!=="wrap"&&u!=="staffwidth"&&(p[u]=m[u]);return{revisedParams:p}}function d(g,h,m){if(h.length===0||m.staffwidth0&&M.measureWidths.length<25&&(H=o(M,B,A,G),G.attempts.push({type:"Optimize",failed:H.failed,reason:H.reason,lineBreaks:H.lineBreaks,totals:H.totals}),H.failed||(A=H.lineBreaks))}v.push(A),T.push(G)}var E=m.staffwidth,U=c(v,E,m);return U.explanation=T,U.reParse=!0,U}return L0={wrapLines:a,calcLineWraps:d},L0}var V0,tw;function eE(){if(tw)return V0;tw=1;function a(c){const d=c.getMeterFraction(),g=d.num===4&&d.den===4;if(!(d.num===2&&d.den===2)&&!g)throw new Error("notCommonTime");const m=c.deline();let p=[],u=!1;return m.forEach(f=>{if(f.subtitle)u&&p.push({type:"subtitle",subtitle:f.subtitle.text});else if(f.text)u=!0,p.push({type:"text",text:f.text.text});else if(f.staff){u=!0;const _=f.staff,b=i(_);p=p.concat(b)}}),s(p),r(p),o(p),p}const t=["break","(break)","no chord","n.c.","tacet"];function i(c){const d=[];let g="",h=[],m={chord:["","","",""]},p="",u="";if(c.forEach((f,_)=>{f.voices&&f.voices.forEach((b,v)=>{let T=0,S=0;b.forEach(M=>{if(M.el_type==="part")h.length>0&&_===0&&v===0&&(d.push({type:"part",name:g,lines:[h]}),h=[]),g=M.title;else if(M.el_type==="note"){l(M,m);const P=Math.floor(T);if(M.chord&&M.chord.length>0){const B=M.chord[0],C=B.position==="default"||t.indexOf(B.name.toLowerCase())>=0?B.name:"";C&&(P>0&&!m.chord[0]&&(m.chord[0]=p),p=C,m.chord[P]?P<4&&!m.chord[P+1]&&(m.chord[P+1]=C):m.chord[P]=C),M.chord.forEach(j=>{j.position!=="default"&&t.indexOf(B.name.toLowerCase())<0&&(m.annotations||(m.annotations=[]),m.annotations.push(j.name))})}if(!M.rest||M.rest.type!=="spacer"){const B=M.duration===0&&!M.rest?.25:M.duration,C=Math.floor(B*4);if(C>4)S+=Math.floor(C/4),T=0;else{let j=B*4;M.tripletMultiplier&&(j*=M.tripletMultiplier),T+=j}}}else if(M.el_type==="bar"){if(u&&(m.ending=u,u=""),l(M,m),M.chord&&M.chord.forEach(P=>{P.position!=="default"&&(m.annotations||(m.annotations=[]),m.annotations.push(P.name))}),(M.type==="bar_dbl_repeat"||M.type==="bar_left_repeat")&&(m.hasStartRepeat=!0),(M.type==="bar_dbl_repeat"||M.type==="bar_right_repeat")&&(m.hasEndRepeat=!0),M.startEnding&&(u=M.startEnding),T>=4){if(m.chord[0]===""&&(m.chord[1]||m.chord[2]||m.chord[3])&&(m.chord[0]=n(h)),_===0&&v===0)h.push(m);else{let P=S,B=0;for(;P>=d[B].lines[0].length&&B=0;d--)for(let g=c[d].chord.length-1;g>=0;g--)if(c[d].chord[g])return c[d].chord[g]}function s(c){c.forEach(d=>{if(d.type==="part"){const g=d.lines[0],h=g.findIndex(p=>!!p.ending),m=g.findIndex((p,u)=>u>h&&!!p.ending);if(h>=0&&m>=0&&m-h===g.length-m){let p=!0;for(let u=0;u{if(d.type==="part"){const g=[],h=d.lines[0];let m=!1;const p=h.findIndex(_=>!!_.hasEndRepeat);(p>=0?Math.min(p+1,h.length):h.length)===12&&(m=!0);const f=m?4:8;for(let _=0;_!!T.hasEndRepeat);v>=0&&v{if(d.lines){let g=!1,h="";d.lines.forEach(m=>{m.forEach(p=>{if(!p.noBorder){const u=p.chord;!u[0]&&!u[1]&&!u[2]&&!u[3]?(g?h&&(u[0]="%"):u[0]=h,g=!0):!u[1]&&!u[2]&&!u[3]?(g=!0,h=u[0]):(g=!1,h=u[3]||u[2]||u[1])}})})}})}function l(c,d){if(c.decoration)for(let g=0;g0&&this.sections[this.sections.length-1].type==="endRepeat"&&this.sections.push({type:"startRepeat",index:this.sections[this.sections.length-1].index}),this.sections.push({type:"endRepeat",index:c})),h&&this.sections.push({type:"startEnding",index:c,endings:h}),d&&this.sections.push({type:"startRepeat",index:c})},this.resolveRepeats=function(){var l,c=this.sections[this.sections.length-1],d=o.length-1;if(c.type==="startRepeat"?c.end=d:c.index+10)for(l=0;l0&&i(o,f,T.start,T.end),_=Math.max(_,T.end))}}return f}}function i(o,l,c,d){c<0&&(c=0),l.length>0&&o[c].el_type==="bar"&&l[l.length-1].el_type==="bar"&&c++;for(var g=c;g<=d;g++){var h,m=!1;if(o[g].el_type==="key"||o[g].el_type==="meter"||o[g].el_type==="tempo"||o[g].el_type==="instrument"){for(h=l.length-1;h>=0&&l[h].el_type!==o[g].el_type;)h--;h>=0&&(o[g].el_type==="key"&&s(o[g],l[h])||o[g].el_type==="meter"&&o[g].num===l[h].num&&o[g].den===l[h].den||o[g].el_type==="instrument"&&o[g].program===l[h].program||o[g].el_type==="tempo"&&o[g].qpm===l[h].qpm)&&(m=!0)}m||l.push(n(o[g]))}}function n(o){var l=Object.assign({},o);return l.pitches&&(l.pitches=a.cloneArray(l.pitches)),l}function s(o,l){return!o.accidentals||!l.accidentals?!1:JSON.stringify(o.accidentals)===JSON.stringify(l.accidentals)}function r(o){var l=[],c,d,g;if(o.indexOf(",")>0)for(d=o.split(","),g=0;g0&&l.push(c);else if(o.indexOf("-")>0){d=o.split("-");var h=parseInt(d[0],10),m=parseInt(d[1],10);for(g=h;g<=m;g++)l.push(g)}else c=parseInt(o,10),c>0&&l.push(c);return l}return W0=t,W0}var Q0,nw;function sw(){if(nw)return Q0;nw=1;var a,t=Kr(),i=tE();return(function(){var n=1,s=128;a=function(_,b){b=b||{};var v,T=b.program||0,S=b.midiTranspose||0;_.visualTranspose&&(S-=_.visualTranspose);var M=b.channel||0,P=!1,B=b.drum||"",C=b.drumBars||1,j=b.drumIntro||0,G=B!=="",A=!!b.drumOff,N=[],H=50;T=parseInt(T,10),S=parseInt(S,10),M=parseInt(M,10),M===10&&(T=s),B=B.split(" "),C=parseInt(C,10),j=parseInt(j,10);var E=_.formatting.bagpipes;E&&(T=71);var U=[];if(_.formatting.midi){var O=_.formatting.midi;O.program&&O.program.length>0&&(T=O.program[0],O.program.length>1&&(T=O.program[1],M=O.program[0]),P=!0),O.transpose&&(S=O.transpose[0]),O.channel&&(M=O.channel[0],P=!0),O.drum&&(B=O.drum),O.drumbars&&(C=O.drumbars[0]),O.drumon&&(G=!0),M===10&&(T=s),O.beat&&U.push({el_type:"beat",beats:O.beat}),O.nobeataccents&&U.push({el_type:"beataccents",value:!1})}b.qpm?v=parseInt(b.qpm,10):_.metaText.tempo?v=g(_.metaText.tempo,_.getBeatLength()):b.defaultQpm?v=b.defaultQpm:v=180;var V=[];E&&V.push({el_type:"bagpipes"}),V.push({el_type:"instrument",program:T}),M&&V.push({el_type:"channel",channel:M}),S&&V.push({el_type:"transpose",transpose:S}),V.push({el_type:"tempo",qpm:v});for(var D=0;D=0?Be="pppp":Ne.decoration.indexOf("ppp")>=0?Be="ppp":Ne.decoration.indexOf("pp")>=0?Be="pp":Ne.decoration.indexOf("p")>=0?Be="p":Ne.decoration.indexOf("mp")>=0?Be="mp":Ne.decoration.indexOf("mf")>=0?Be="mf":Ne.decoration.indexOf("f")>=0?Be="f":Ne.decoration.indexOf("ff")>=0?Be="ff":Ne.decoration.indexOf("fff")>=0?Be="fff":Ne.decoration.indexOf("ffff")>=0&&(Be="ffff"),Be){ee=He[Be].slice(0);let et=[ee];Array.isArray(Ne.decoration)&&(et=[],Ne.decoration.forEach(wt=>{wt in He&&et.push(He[wt].slice(0))})),$[ce].push({el_type:"beat",beats:ee.slice(0),volumesPerNotePitch:et}),z[je]=!1,L[je]=!1}if(Ne.decoration.indexOf("crescendo(")>=0){var Ue=r(Le,ye,"crescendo)"),tt=Math.min(127,ee[0]+H),Re=o(Le,ye+Ue+1,Object.keys(He));Re&&(tt=He[Re][0]),Ue>0?z[je]=Math.floor((tt-ee[0])/Ue):z[je]=!1,L[je]=!1}else if(Ne.decoration.indexOf("crescendo)")>=0)z[je]=!1;else if(Ne.decoration.indexOf("diminuendo(")>=0){var Ve=r(Le,ye,"diminuendo)"),_t=Math.max(15,ee[0]-H),mt=o(Le,ye+Ve+1,Object.keys(He));mt&&(_t=He[mt][0]),z[je]=!1,Ve>0?L[je]=Math.floor((_t-ee[0])/Ve):L[je]=!1}else Ne.decoration.indexOf("diminuendo)")>=0&&(L[je]=!1)}};for(var we=R.staff,ce=0,Te=0;Te=0?($[ce].push({el_type:"transpose",transpose:-12}),F[ce]=!0):he.clef.type.indexOf("+8")>=0?($[ce].push({el_type:"transpose",transpose:12}),F[ce]=!0):F[ce]&&($[ce].push({el_type:"transpose",transpose:0}),F[ce]=!1)),_.formatting.midi&&_.formatting.midi.drumoff&&($[ce].push({el_type:"bar"}),$[ce].push({el_type:"drum",params:{pattern:"",on:!1}}));var Ge=0,ne=0,Xe=0,de=0;ee=[105,95,85,1];for(var ye=0;ye=0?$[ce].push({el_type:"transpose",transpose:-12}):ue.type.indexOf("+8")>=0&&$[ce].push({el_type:"transpose",transpose:12}));break;case"tempo":v=g(ue,_.getBeatLength()),$[ce].push({el_type:"tempo",qpm:v,timing:Q[ce]}),Z[""+Q[ce]]={el_type:"tempo",qpm:v,timing:Q[ce]};break;case"bar":Ge>0&&$[ce].push({el_type:"bar"}),st(ue),Ge=0,oe[ce].addBar(ue,ce);break;case"style":N[ce]=ue.head;break;case"timeSignature":$[ce].push(h(ue));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var $e=!1;switch(ue.cmd){case"drumon":G=!0,$e=!0;break;case"drumoff":G=!1,$e=!0;break;case"drum":B=ue.params,$e=!0;break;case"drumbars":C=ue.params[0],$e=!0;break;case"drummap":break;case"channel":ue.params[0]===10&&$[ce].push({el_type:"instrument",program:s});break;case"program":f($[ce],{el_type:"instrument",program:ue.params[0]}),P=!0;break;case"transpose":$[ce].push({el_type:"transpose",transpose:ue.params[0]});break;case"gchordoff":$[ce].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":$[ce].push({el_type:"gchordOn",tacet:!1});break;case"beat":$[ce].push({el_type:"beat",beats:ue.params});break;case"nobeataccents":$[ce].push({el_type:"beataccents",value:!1});break;case"beataccents":$[ce].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":$[ce].push({el_type:ue.cmd,volume:ue.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":$[ce].push({el_type:ue.cmd,param:ue.params[0]});break;case"bassprog":case"chordprog":$[ce].push({el_type:ue.cmd,value:ue.params[0],octaveShift:ue.params[1]});break;case"gchordbars":$[ce].push({el_type:ue.cmd,param:ue.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",ue.cmd,ue)}$e&&($[0].push({el_type:"drum",params:{pattern:B,bars:C,intro:j,on:G}}),fe=!0);break;default:console.log("MIDI: element type "+ue.el_type+" not handled.")}}ce++,Q[ce]||(Q[ce]=0)}}}}for(var ze=0;zeit;)it++;if($[qe].length>it){for(var Ie=0;Ie0&&$[0].length>0&&($[0][0].pickupLength=_.getPickupLength()),$};function r(_,b,v){for(var T=0,S=b+1;S<_.length;S++)if(_[S].el_type==="note"&&T++,_[S].decoration&&_[S].decoration.indexOf(v)>=0)return T;return T}function o(_,b,v){for(var T=Math.min(_.length,b+3),S=b;S=0)return _[S].decoration[M]}return null}function l(_,b){if(!(!b||b.length===0))for(var v=Object.keys(b),T=0;T<_.length;T++)for(var S=_[T],M=b[0]?b[0].qpm:0,P=0;P=0&&M!==b[""+B.timing].qpm&&(M=b[""+B.timing].qpm,B.el_type==="tempo"?(B.qpm=b[""+B.timing].qpm,P++):(_[T].splice(P,0,{el_type:"tempo",qpm:b[""+B.timing].qpm,timing:B.timing}),P+=2))}}function c(_){for(var b=0;b<_.length;b++)for(var v=_[b],T=v.length-1;T>=0&&v[T].el_type!=="bar";)v[T].noChordVoice=!0,T--}function d(_,b){if(!(!_||_.length<=b||!_[b].title))return _[b].title.join(" ")}function g(_,b){var v=.25;_.duration&&(v=_.duration[0]);var T=60;return _.bpm&&(T=_.bpm),v*T/b}function h(_){var b;switch(_.type){case"common_time":b={el_type:"meter",num:4,den:4},n=4/4;break;case"cut_time":b={el_type:"meter",num:2,den:2},n=2/2;break;case"specified":let S=0;if(_.value&&_.value.length>0&&_.value[0].num.indexOf("+")>0)for(var v=_.value[0].num.split("+"),T=0;T=0;v--)if(_[v].el_type===b.el_type){JSON.stringify(_[v])!==JSON.stringify(b)&&_.push(b);return}_.push(b)}})(),Q0=a,Q0}var K0,rw;function aE(){if(rw)return K0;rw=1;var a=function(g,h,m,p){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=g,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!h,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=p,this.tempoChangeFactor=1,this.bassInstrument=m.bassprog&&m.bassprog.length>=1?m.bassprog[0]:0,this.chordInstrument=m.chordprog&&m.chordprog.length>=1?m.chordprog[0]:0,this.bassOctaveShift=m.bassprog&&m.bassprog.length===2?m.bassprog[1]:0,this.chordOctaveShift=m.chordprog&&m.chordprog.length===2?m.chordprog[1]:0,this.boomVolume=m.bassvol&&m.bassvol.length===1?m.bassvol[0]:64,this.chickVolume=m.chordvol&&m.chordvol.length===1?m.chordvol[0]:48,m.gchord&&m.gchord.length>0?this.overridePattern=n(m.gchord[0]):this.overridePattern=void 0};a.prototype.setMeter=function(d){this.meter=d},a.prototype.setTempoChangeFactor=function(d){this.tempoChangeFactor=d},a.prototype.setLastBarTime=function(d){this.lastBarTime=d},a.prototype.setTranspose=function(d){this.transpose=d},a.prototype.setRhythmHead=function(d,g){this.hasRhythmHead=d;var h=[];if(d&&this.lastChord&&this.lastChord.chick)for(var m=0;m0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,l(d.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},a.prototype.gChordOn=function(d){this.chordsOff||(this.gChordTacet=d.tacet)},a.prototype.paramChange=function(d){switch(d.el_type){case"gchord":d.param&&d.param.length>0?this.overridePattern=n(d.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=d.value,d.octaveShift!=null&&d.octaveShift!=null?this.bassOctaveShift=d.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=d.value,d.octaveShift!=null&&d.octaveShift!=null?this.chordOctaveShift=d.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=d.param;break;case"chordvol":this.chickVolume=d.param;break;default:console.log("unhandled midi param",d)}},a.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},a.prototype.addTrack=function(d){this.chordTrackEmpty()||d.push(this.chordTrack)},a.prototype.findChord=function(d){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!d.chord||d.chord.length===0)return null;for(var g=0;g=0)return"break"}return null},a.prototype.interpretChord=function(d){if(d.length!==0){if(d==="break")return{chick:[]};var g=d.substring(0,1);if(g==="("){if(d=d.substring(1,d.length-1),d.length===0)return;g=d.substring(0,1)}var h=this.basses[g];if(h){for(var m=this.transpose;m<-8;)m+=12;for(;m>8;)m-=12;h+=m,h<33?h+=12:h>44&&(h-=12);var p=h;h+=this.bassOctaveShift*12;var u=h-5,f;d.length===1&&(f=this.chordNotes(h,""));var _=d.substring(1),b=_.substring(0,1);b==="b"||b==="♭"?(p--,h--,u--,_=_.substring(1)):(b==="#"||b==="♯")&&(p++,h++,u++,_=_.substring(1));var v=_.split("/");if(f=this.chordNotes(p,v[0]),f.length>=3){var T=f[2]-f[0];u=u+T-7}if(v.length===2){var S=this.basses[v[1].substring(0,1)];if(S){var M=v[1].substring(1),P={"#":1,"♯":1,b:-1,"♭":-1}[M]||0;h=this.basses[v[1].substring(0,1)]+P+m,h+=this.bassOctaveShift*12,u=h}}return{boom:h,boom2:u,chick:f}}}},a.prototype.chordNotes=function(d,g){g=g.replace(/♭/g,"b").replace(/♯/g,"#");var h=o[g];h||(g.slice(0,2).toLowerCase()==="ma"||g[0]==="M"?h=o.M:g[0]==="m"||g[0]==="-"?h=o.m:h=o.M),d+=12,d+=this.chordOctaveShift*12;for(var m=[],p=0;p0&&b[S-1]&&b[S]&&b[S-1].boom!==b[S].boom&&(M=!0);var B=v[S],C=B.indexOf("boom")>=0,j=!C&&S!==0&&v[0].indexOf("boom")>=0&&(!b[S-1]||b[S-1].boom!==b[S].boom),G=t(b[S],B,M,j);C&&(M=!1);for(var A=0;A=0?p.push(h?d.boom:d.boom2):m&&p.push(d.boom);var u=d.chick.length;if(g.indexOf("chick")>=0)for(var f=0;f0&&de[0].length>0&&(E=de[0][0].pickupLength),ye.bassprog!==void 0&&!be.bassprog&&(be.bassprog=[ye.bassprog]),ye.bassvol!==void 0&&!be.bassvol&&(be.bassvol=[ye.bassvol]),ye.chordprog!==void 0&&!be.chordprog&&(be.chordprog=[ye.chordprog]),ye.chordvol!==void 0&&!be.chordvol&&(be.chordvol=[ye.chordvol]),ye.gchord!==void 0&&!be.gchord&&(be.gchord=[ye.gchord]),u=new t(de.length,ye.chordsOff,be,f),L(de,ye);for(var Se=0;Se=0)&&($e=!0);for(var ze=0;ze0&&h[h.length-1].cmd==="program")h[h.length-1].instrument=Fe.program;else{var qe;for(qe=h.length-1;qe>=0&&h[qe].cmd!=="program";qe--);(qe<0||h[qe].instrument!==Fe.program)&&h.push({cmd:"program",channel:0,instrument:Fe.program})}break;case"channel":$(Fe.channel);break;case"drum":N=Ae(Fe.params),Ge();break;case"gchordOn":u.gChordOn(Fe);break;case"beat":T=Fe.beats[0],S=Fe.beats[1],M=Fe.beats[2],Fe.volumesPerNotePitch?P=Fe.volumesPerNotePitch:P=[];break;case"vol":C=Fe.volume;break;case"volinc":j=Fe.volume;break;case"beataccents":v=Fe.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":u.paramChange(Fe);break;default:console.log("MIDI creation. Unknown el_type: "+Fe.el_type+` -`);break}}h[0].instrument===void 0&&(h[0].instrument=d||0),m&&h.unshift(m),o.push(h),u.finish(),A.length>0}return ye.detuneOctave&&Xe(o,parseInt(ye.detuneOctave,10)),u.addTrack(o),A.length>0&&o.push(A),{tempo:l,instrument:d,tracks:o,totalDuration:p}};function $(de){for(var ye=h.length-1;ye>=0;ye--)if(h[ye].cmd==="program"){h[ye].channel=de;return}}function F(de){return de/1e6}function z(de){return Math.round(de*c*1e6)/1e6}function L(de,ye){for(var ue=0;ue=ue+1&&(be=P[ue][0],Se=P[ue][1],Ie=P[ue][2]);var $e;if(C!==void 0)$e=C,C=void 0;else if(!v)$e=Se;else if(E>de)$e=Ie;else{var ze=Z(b,Q(f),de);ze===0?$e=be:parseInt(ze,10)===ze?$e=Se:$e=Ie}return j&&($e+=j,j=void 0),$e<0&&($e=0),$e>127&&($e=127),ye?0:$e}function oe(de,ye){var ue={};if(de.decoration)for(var be=0;be0;)h.push({cmd:"note",pitch:ye.pitch+Ie,volume:ye.volume,start:ue,duration:Se,gap:0,instrument:g,style:"decoration"}),Ie=Ie===2?0:2,be-=Se,ue+=Se;break;case"trillh":for(var Ie=1;be>0;)h.push({cmd:"note",pitch:ye.pitch+Ie,volume:ye.volume,start:ue,duration:Se,gap:0,instrument:g,style:"decoration"}),Ie=Ie===1?0:1,be-=Se,ue+=Se;break;case"pralltriller":h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:ue,duration:Se,gap:0,instrument:g,style:"decoration"}),be-=Se,ue+=Se,h.push({cmd:"note",pitch:ye.pitch+2,volume:ye.volume,start:ue,duration:Se,gap:0,instrument:g,style:"decoration"}),be-=Se,ue+=Se,h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:ue,duration:be,gap:0,instrument:g});break;case"mordent":case"lowermordent":h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:ue,duration:Se,gap:0,instrument:g,style:"decoration"}),be-=Se,ue+=Se,h.push({cmd:"note",pitch:ye.pitch-2,volume:ye.volume,start:ue,duration:Se,gap:0,instrument:g,style:"decoration"}),be-=Se,ue+=Se,h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:ue,duration:be,gap:0,instrument:g});break;case"turn":Se=ye.duration/4,h.push({cmd:"note",pitch:ye.pitch+2,volume:ye.volume,start:ue,duration:Se,gap:0,instrument:g,style:"decoration"}),h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:ue+Se,duration:Se,gap:0,instrument:g,style:"decoration"}),h.push({cmd:"note",pitch:ye.pitch-1,volume:ye.volume,start:ue+Se*2,duration:Se,gap:0,instrument:g,style:"decoration"}),h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:ue+Se*3,duration:Se,gap:0,instrument:g,style:"decoration"});break;case"roll":for(;be>0;)h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:ue,duration:Se,gap:0,instrument:g,style:"decoration"}),be-=Se*2,ue+=Se*2;break}}function le(de,ye){var ue=ee(F(de.time),ye);u.processChord(de);var be;if(de.gracenotes&&de.pitches&&de.pitches.length>0&&de.pitches[0]&&(be=Te(de.gracenotes,de.pitches[0].duration),de.elem&&(de.elem.midiGraceNotePitches=he(be,F(de.time),ue*2/3,g))),de.elem){var Se=F(de.time),Ie=Se/B/l*60*1e3;if(de.elem.currentTrackMilliseconds===void 0)de.elem.currentTrackMilliseconds=Ie,de.elem.currentTrackWholeNotes=Se;else if(de.elem.currentTrackMilliseconds.length===void 0)de.elem.currentTrackMilliseconds!==Ie&&(de.elem.currentTrackMilliseconds=[de.elem.currentTrackMilliseconds,Ie],de.elem.currentTrackWholeNotes=[de.elem.currentTrackWholeNotes,Se]);else{for(var $e=!1,ze=0;zest&&(Ve=ee(F(de.time),ye,st));var Ne=it[st];if(Ne){Ne.startSlur&&(G+=Ne.startSlur.length),Ne.endSlur&&(G-=Ne.endSlur.length);var He=Ne.actualPitch?Ne.actualPitch:we(Ne);if(g===_&&U){var Be=i(Ne);Be&&U[Be]&&(He=U[Be].sound)}var Ue={cmd:"note",pitch:He,volume:Ve,start:F(de.time),duration:z(Ne.duration),instrument:g,startChar:de.elem.startChar,endChar:de.elem.endChar};if(Ue=je(Ue),de.gracenotes&&(Ue.duration=Ue.duration/2,Ue.start=Ue.start+Ue.duration),de.elem&&de.elem.midiPitches.push(Ue),qe.noteModification)fe(qe.noteModification,Ue);else{switch(G>0?Ue.endType="tenuto":Fe&&(Ue.endType=Fe),Ue.endType){case"tenuto":Ue.gap=V;break;case"staccato":var tt=Ue.duration*D;Ue.gap=l/60*tt;break;default:Ue.gap=O;break}h.push(Ue)}}}h.length-1}var Re=ge(de);p=Math.max(p,F(de.time)+z(Re))}function ge(de){return de.pitches&&de.pitches.length>0&&de.pitches[0]?de.pitches[0].duration:de.elem?de.elem.duration:de.duration}var R=[0,2,4,5,7,9,11];function we(de){if(de.midipitch!==void 0)return de.midipitch;var ye=de.pitch;if(de.accidental)switch(de.accidental){case"sharp":n[ye]=1;break;case"flat":n[ye]=-1;break;case"natural":n[ye]=0;break;case"dblsharp":n[ye]=2;break;case"dblflat":n[ye]=-2;break;case"quartersharp":n[ye]=.25;break;case"quarterflat":n[ye]=-.25;break}var ue=Le(ye)*12+R[nt(ye)]+60;return n[ye]!==void 0?ue+=n[ye]:ue+=s[nt(ye)],ue+=r,ue}function ce(de){var ye=[0,0,0,0,0,0,0];if(!de.accidentals)return ye;for(var ue=0;ue=0?(de.pitch=Math.round(de.pitch),de.cents=-50):ye.indexOf(".25")>=0&&(de.pitch=Math.round(de.pitch),de.cents=50),de}function Le(de){return Math.floor(de/7)}function nt(de){return de=de%7,de<0&&(de+=7),de}function Ae(de){if(de.pattern.length===0||de.on===!1)return{on:!1};for(var ye=de.pattern[0],ue=[],be="",Se=0,Ie=0;Ie1){ze=ze.sort(function(Ne,He){return Ne.pitch-He.pitch});var Fe=ze[ze.length-1],qe=Fe.pitch%12,it=!1;for(Se=0;!it&&Se=p&&(u-=p),v[S].el_type==="bar")return u}return u}this.getPickupLength=function(){var m=this.getBarLength(),p=l(this.lines,m);return p<1e-8||m-p<1e-8?0:p},this.getBarLength=function(){var m=this.getMeterFraction();return m.num/m.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(m){var p;if(m)p=m;else{var u=this.metaText?this.metaText.tempo:null;p=this.getBpm(u)}p<=0&&(p=1);var f=this.getBeatsPerMeasure(),_=f/p;return _*6e4},this.getBeatsPerMeasure=function(){var m=this.getBeatLength(),p=this.getBarLength();return p/m},this.getMeter=function(){for(var m=0;m0&&m.value[0].num.indexOf("+")>0){var f=m.value[0].num.split("+");p=0;for(var _=0;_m)return S}}return null};function c(m){for(var p,u,f,_,b=m.length-1;b>=0;b--){var v=m[b];v.type==="bar"?(v.top=f,v.nextTop=p,p=f,v.bottom=_,v.nextBottom=u,u=_):v.type==="event"&&(f=v.top,_=v.top+v.height)}}function d(m){var p=[];for(var u in m)m.hasOwnProperty(u)&&p.push(m[u]);return p=p.sort(function(f,_){var b=f.milliseconds-_.milliseconds;return b!==0?b:f.type==="bar"?-1:1}),p}this.addElementToEvents=function(m,p,u,f,_,b,v,T,S,M){if(p.hint)return{isTiedState:void 0,duration:0};var P=p.durationClass?p.durationClass:p.duration;if(p.abcelem.rest&&p.abcelem.rest.type==="spacer"&&(P=0),P>0){for(var B=[],C=0;C0){var b=_.staffs[0],v=b.absoluteY,T=v-b.top*t.STEP,S=_.staffs[_.staffs.length-1];v=S.absoluteY;for(var M=v-S.bottom*t.STEP,P=M-T,B=_.voices,C=0;C0&&b["event"+j]&&($="event"+j),j=Math.round(C*1e3),V.type==="bar"){var F=V.abcelem.type,z=F==="bar_right_repeat"||F==="bar_dbl_repeat",L=V.abcelem.startEnding==="1",Q=F==="bar_left_repeat"||F==="bar_dbl_repeat"||F==="bar_right_repeat";if(z){U>0&&(b[$].endX=V.x),A===-1&&(A=U);var Z=0;E=-1;for(var ee=G;eef.left&&(f.endX=Math.min(f.endX,b)):f.endX=b}}var v=p[p.length-1];v.endX=m[v.line].staffGroup.w}}this.getBpm=function(m){var p;if(m||(m=this.metaText?this.metaText.tempo:null),m){p=m.bpm;var u=this.getBeatLength(),f=m.duration&&m.duration.length>0?m.duration[0]:u;p=p*f/u}if(!p){p=180;var _=this.getMeterFraction();_&&_.num!==3&&_.num%3===0&&(p=120)}return p},this.setTiming=function(m,p){if(p=p||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var u=this.metaText?this.metaText.tempo:null,f=this.getBpm(u),_=1;m?u&&(_=m/f):m=f;var b=this.getBeatLength(),v=m/60,T=this.getBarLength(),S=T/b*p/v;S&&(S-=this.getPickupLength()/b/v);var M=b*v;return this.noteTimings=this.setupEvents(S,M,m,_),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*v):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(m){m||(m={});var p=i(this,m);return n(p,m,this.formatting.percmap,this.formatting.midi)},this.deline=function(m){return s(this.lines,m)},this.findSelectableElement=function(m){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(m):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};return Z0=r,Z0}var eg,pw;function sE(){if(pw)return eg;pw=1;var a=N0(),t=function(A){var N=this,H={},E="";A.reset(),this.setVisualTranspose=function(U){U!==void 0&&(A.visualTranspose=U)},this.cleanUp=function(U,O,V){p(A),delete A.runningFonts,n(A),A.metaText.tempo&&A.metaText.tempo.bpm&&!A.metaText.tempo.duration&&(A.metaText.tempo.duration=[A.getBeatLength()]),G(A);var D=!1,$,F,z;for($=0;$0&&le[le.length-1].barNumber){var R=g(A.lines,$);R&&(R.staff[0].barNumber=le[le.length-1].barNumber),delete le[le.length-1].barNumber}}}return delete A.staffNum,delete A.voiceNum,delete A.lineNum,delete A.potentialStartBeam,delete A.potentialEndBeam,delete A.vskipPending,V},this.addTieToLastNote=function(U){var O=h(A);return O&&O.pitches&&O.pitches.length>0?(O.pitches[0].startTie={},U&&(O.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(U,O,V,D){if(D.el_type=U,O!==null&&(D.startChar=O),V!==null&&(D.endChar=V),U==="note"){var $=m(D);$>=.25||D.force_end_beam_last&&A.potentialStartBeam!==void 0?T(A):D.end_beam&&A.potentialStartBeam!==void 0?D.rest===void 0?v(D,A):T(A):D.rest===void 0&&(A.potentialStartBeam===void 0?D.end_beam||(A.potentialStartBeam=D,delete A.potentialEndBeam):A.potentialEndBeam=D)}else T(A);return delete D.end_beam,delete D.force_end_beam_last,D.rest&&D.rest.type==="invisible"&&delete D.decoration,A.lines.length<=A.lineNum||A.lines[A.lineNum].staff.length<=A.staffNum?!1:(b(N,A,D,H,E),!0)},this.appendStartingElement=function(U,O,V,D){p(A);var $;U==="key"&&($=D.impliedNaturals,delete D.impliedNaturals,delete D.explicitAccidentals);var F=Object.assign({},D);if(A.lines[A.lineNum]){var z=A.lines[A.lineNum].staff;if(z){z.length<=A.staffNum&&(z[A.staffNum]={},z[A.staffNum].clef=Object.assign({},z[0].clef),z[A.staffNum].key=Object.assign({},z[0].key),z[0].meter&&(z[A.staffNum].meter=Object.assign({},z[0].meter)),z[A.staffNum].workingClef=Object.assign({},z[0].workingClef),z[A.staffNum].voices=[[]]),U==="clef"&&(z[A.staffNum].workingClef=F);for(var L=z[A.staffNum].voices[A.voiceNum],Q=0;Q0){var V=O[O.length-1];if(V.el_type==="bar")V.barNumber!==void 0&&(V.barNumber=U);else return U-1}return U},this.hasBeginMusic=function(){for(var U=0;U=0;O--)if(A.lines[O].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var U=d(A.lines,A.lineNum);if(!U)return null;var O=U.staff[A.staffNum];return O&&O.voices[A.voiceNum]!==void 0?O.voices[A.voiceNum]:null},this.setCurrentVoice=function(U,O,V){A.staffNum=U,A.voiceNum=O,E=V;for(var D=0;D0&&(M.force_end_beam_last=!0),F+=pe}else if(p.indexOf(T[F])===-1?le=A(T,F):le=[0],le[0]>0)le[1]===null?F+10&&(le[1].indexOf("style=")===0?M.style=le[1].substring(6):le[1].indexOf("class=")===0?M.extraClass=le[1].substring(6):(M.decoration===void 0&&(M.decoration=[]),le[1]==="beambr1"?M.beambr=1:le[1]==="beambr2"?M.beambr=2:M.decoration.push(le[1]))),F+=le[0];else if(le=C(T,F),le[0]>0)M.gracenotes=le[1],F+=le[0];else break;if(le=H(T,F),le[0]>0){ee=0,M.gracenotes!==void 0&&(M.rest={type:"spacer"},M.duration=.125,s.addFormattingOptions(M,r.formatting,"note"),o.appendElement("note",z+F,z+F+le[0],M),s.measureNotEmpty=!0,M={});var Te={type:le[1]};Te.type.length===0?n("Unknown bar type",T,F):(s.inEnding&&Te.type!=="bar_thin"&&(Te.endEnding=!0,s.inEnding=!1),le[2]&&(Te.startEnding=le[2],s.inEnding&&(Te.endEnding=!0),s.inEnding=!0,le[1]==="bar_right_repeat"?s.restoreStartEndingHoldOvers():s.duplicateStartEndingHoldOvers()),M.decoration!==void 0&&(Te.decoration=M.decoration),M.chord!==void 0&&(Te.chord=M.chord),Te.startEnding&&s.barFirstEndingNum===void 0?s.barFirstEndingNum=s.currBarNumber:Te.startEnding&&Te.endEnding&&s.barFirstEndingNum?s.currBarNumber=s.barFirstEndingNum:Te.endEnding&&(s.barFirstEndingNum=void 0),Te.type!=="bar_invisible"&&s.measureNotEmpty&&L()&&(s.currBarNumber++,s.barNumbers&&s.currBarNumber%s.barNumbers===0&&(Te.barNumber=s.currBarNumber)),s.addFormattingOptions(M,r.formatting,"bar"),o.appendElement("bar",z+ce,z+F+le[0],Te),s.measureNotEmpty=!1,M={}),F+=le[0]}else if(T[F]==="&")le=j(T,F),le[0]>0&&(o.appendElement("overlay",z,z+1,{}),F+=1,ee++);else{if(le=U(T,F),le.consumed>0&&(le.startSlur!==void 0&&(M.startSlur=le.startSlur),le.dottedSlur&&(M.dottedSlur=!0),le.triplet!==void 0&&(K>0?n("Can't nest triplets",T,F):(M.startTriplet=le.triplet,M.tripletMultiplier=le.tripletQ/le.triplet,M.tripletR=le.num_notes,K=le.num_notes===void 0?le.triplet:le.num_notes)),F+=le.consumed),T[F]==="["){F++;for(var he=null,Pe=!1,Le=!1;!Le;){var ct=A(T,F);ct[0]>0&&(F+=ct[0]);var Ae=O(T,F,{},!1);if(Ae!==null&&Ae.pitch!==void 0)ct[0]>0&&ct[1].indexOf("style=")!==0&&(M.decoration===void 0&&(M.decoration=[]),M.decoration.push(ct[1])),Ae.end_beam&&(M.end_beam=!0,delete Ae.end_beam),M.pitches===void 0?(M.duration=Ae.duration,M.pitches=[Ae]):M.pitches.push(Ae),delete Ae.duration,ct[0]>0&&ct[1].indexOf("style=")===0&&(M.pitches[M.pitches.length-1].style=ct[1].substr(6)),s.inTieChord[M.pitches.length]&&(Ae.endTie=!0,s.inTieChord[M.pitches.length]=void 0),Ae.startTie&&(s.inTieChord[M.pitches.length]=!0),F=Ae.endChar,delete Ae.endChar;else if(T[F]===" ")n("Spaces are not allowed in chords",T,F),F++;else{if(F0&&!(M.rest&&M.rest.type==="spacer")&&(K--,K===0&&(M.endTriplet=!0));for(var Ge=!1;F":case"<":var ne=V(T,F);F+=ne[0]-1,s.next_note_duration=ne[2],he?he=he*ne[1]:he=ne[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var Je=i.getFraction(T,F);he=Je.value,F=Je.index;var ue=T[F];ue===" "&&(Pe=!0),ue==="-"||ue===")"||ue===" "||ue==="<"||ue===">"?F--:Ge=!0;break;case"0":he=0;break;default:Ge=!0;break}Ge||F++}}else n("Expected ']' to end the chords",T,F);M.pitches!==void 0&&(he!==null&&(M.duration=M.duration*he,Pe&&E(M)),s.addFormattingOptions(M,r.formatting,"note"),o.appendElement("note",z+ce,z+F,M),s.measureNotEmpty=!0,M={}),Le=!0}}}else{var ye={},de=O(T,F,ye,!0);if(ye.endTie!==void 0&&N(s,ee,!0),de!==null){de.pitch!==void 0?(M.pitches=[{}],de.accidental!==void 0&&(M.pitches[0].accidental=de.accidental),M.pitches[0].pitch=de.pitch,M.pitches[0].name=de.name,(de.midipitch||de.midipitch===0)&&(M.pitches[0].midipitch=de.midipitch),de.endSlur!==void 0&&(M.pitches[0].endSlur=de.endSlur),de.endTie!==void 0&&(M.pitches[0].endTie=de.endTie),de.startSlur!==void 0&&(M.pitches[0].startSlur=de.startSlur),M.startSlur!==void 0&&(M.pitches[0].startSlur=M.startSlur),M.dottedSlur!==void 0&&(M.pitches[0].dottedSlur=!0),de.startTie!==void 0&&(M.pitches[0].startTie=de.startTie),M.startTie!==void 0&&(M.pitches[0].startTie=M.startTie)):(M.rest=de.rest,de.rest.type==="multimeasure"&&L()&&(s.currBarNumber+=de.rest.text-1),de.endSlur!==void 0&&(M.endSlur=de.endSlur),de.endTie!==void 0&&(M.rest.endTie=de.endTie),de.startSlur!==void 0&&(M.startSlur=de.startSlur),de.startTie!==void 0&&(M.rest.startTie=de.startTie),M.startTie!==void 0&&(M.rest.startTie=M.startTie)),de.chord!==void 0&&(M.chord=de.chord),de.duration!==void 0&&(M.duration=de.duration),de.decoration!==void 0&&(M.decoration=de.decoration),de.graceNotes!==void 0&&(M.graceNotes=de.graceNotes),delete M.startSlur,delete M.dottedSlur,$(s,ee,M)&&(M.pitches!==void 0?M.pitches[0].endTie=!0:M.rest.type!=="spacer"&&(M.rest.endTie=!0),N(s,ee,!1)),(de.startTie||M.startTie)&&N(s,ee,!0),F=de.endChar,K>0&&!(de.rest&&de.rest.type==="spacer")&&(K--,K===0&&(M.endTriplet=!0)),de.end_beam&&E(M),M.rest&&M.rest.type==="rest"&&M.duration===1&&G(s)<=1&&(M.rest.type="whole",M.duration=G(s)),M.duration<1&&u.indexOf(M.duration)===-1&&M.duration!==0&&(!M.rest||M.rest.type!=="spacer")&&n("Duration not representable: "+T.substring(ce,F),T,F),s.addFormattingOptions(M,r.formatting,"note");var be=o.appendElement("note",z+ce,z+F,M);be||(this.startNewLine(),o.appendElement("note",z+ce,z+F,M)),s.measureNotEmpty=!0,M={}}}F===ce&&(T[F]!==" "&&T[F]!=="`"&&n("Unknown character ignored",T,F),F++)}}}this.lineContinuation=T.indexOf("")>=0||X[0]>0,this.lineContinuation||(M={})}};var N=function(T,F,z){var D=T.currentVoice?T.currentVoice.staffNum*100+T.currentVoice.index:0;T.inTie[F]===void 0&&(T.inTie[F]=[]),T.inTie[F][D]=z},P=function(T,F){if(T[F]==='"'){var z=i.getBrackettedSubstring(T,F,5);if(z[2]||n("Missing the closing quote while parsing the chord symbol",T,F),z[0]>0&&z[1].length>0&&z[1][0]==="^")z[1]=z[1].substring(1),z[2]="above";else if(z[0]>0&&z[1].length>0&&z[1][0]==="_")z[1]=z[1].substring(1),z[2]="below";else if(z[0]>0&&z[1].length>0&&z[1][0]==="<")z[1]=z[1].substring(1),z[2]="left";else if(z[0]>0&&z[1].length>0&&z[1][0]===">")z[1]=z[1].substring(1),z[2]="right";else if(z[0]>0&&z[1].length>0&&z[1][0]==="@"){z[1]=z[1].substring(1);var D=i.getFloat(z[1]);if(D.digits===0)return n("Missing first position in absolutely positioned annotation.",T,F),z[1]=z[1].replace("@",""),z[2]="above",z;if(z[1]=z[1].substring(D.digits),z[1][0]!==",")return n("Missing comma absolutely positioned annotation.",T,F),z[1]=z[1].replace("@",""),z[2]="above",z;z[1]=z[1].substring(1);var K=i.getFloat(z[1]);if(K.digits===0)return n("Missing second position in absolutely positioned annotation.",T,F),z[1]=z[1].replace("@",""),z[2]="above",z;z[1]=z[1].substring(K.digits);var X=i.skipWhiteSpace(z[1]);z[1]=z[1].substring(X),z[2]=null,z[3]={x:D.value,y:K.value}}else s.freegchord!==!0&&(z[1]=z[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),z[1]=z[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),z[1]=z[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),z[1]=z[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),z[1]=z[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),z[1]=z[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),z[2]="default",z[1]=t.chordName(s,z[1]);return z}return[0,""]},C=function(T,F){if(T[F]==="{"){var z=i.getBrackettedSubstring(T,F,1,"}");z[2]||n("Missing the closing '}' while parsing grace note",T,F),T[F+z[0]]===")"&&(z[0]++,z[1]+=")");for(var D=[],K=0,X=!1;K0&&(D[D.length-1].endBeam=!0):n("Unknown character '"+z[1][K]+"' while parsing grace note",T,F),K++)}if(D.length)return[z[0],D]}return[0]};function j(T,F){if(T[F]==="&"){for(var z=F;T[F]&&T[F]!==":"&&T[F]!=="|";)F++;return[F-z,T.substring(z+1,F)]}return[0]}function G(T){var F=T.origMeter;return!F||F.type!=="specified"||!F.value||F.value.length===0?1:parseInt(F.value[0].num,10)/parseInt(F.value[0].den,10)}var A=function(T,F){var z=s.macros[T[F]];if(z!==void 0)return(z[0]==="!"||z[0]==="+")&&(z=z.substring(1)),(z[z.length-1]==="!"||z[z.length-1]==="+")&&(z=z.substring(0,z.length-1)),c.includes(z)?[1,z]:d.includes(z)?(s.volumePosition==="hidden"&&(z=""),[1,z]):g.includes(z)?(s.dynamicPosition==="hidden"&&(z=""),[1,z]):(s.ignoredDecorations.includes(z)||n("Unknown macro: "+z,T,F),[1,""]);switch(T[F]){case".":if(T[F+1]==="("||T[F+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var D=i.getBrackettedSubstring(T,F,5);if(D[1].length>1&&(D[1][0]==="^"||D[1][0]==="_")&&(D[1]=D[1].substring(1)),c.includes(D[1])||D[1].indexOf("class=")===0)return D;if(d.includes(D[1]))return s.volumePosition==="hidden"&&(D[1]=""),D;if(g.includes(D[1]))return s.dynamicPosition==="hidden"&&(D[1]=""),D;var K=h.findIndex(function(X){return D[1]===X[0]});return K>=0?(D[1]=h[K][1],D):(K=m.findIndex(function(X){return D[1]===X[0]}),K>=0?(D[1]=m[K][1],s.dynamicPosition==="hidden"&&(D[1]=""),D):T[F]==="!"&&(D[0]===1||T[F+D[0]-1]!=="!")?[1,null]:(n("Unknown decoration: "+D[1],T,F),D[1]="",D));case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"];case"t":return[1,"trillh"]}return[0,0]},B=function(T,F){for(var z=F;i.isWhiteSpace(T[F]);)F++;return[F-z]},H=function(T,F){var z=i.getBarLine(T,F);if(z.len===0)return[0,""];if(z.warn)return n(z.warn,T,F),[z.len,""];for(var D=0;D="2"&&T[F+1]<="9"?(z.triplet!==void 0?n("Can't nest triplets",T,F):(z.triplet=T[F+1]-"0",z.tripletQ=b[z.triplet],z.num_notes=z.triplet,F+2="1"&&T[F+4]<="9"?(z.num_notes=T[F+4]-"0",F+=3):n("expected number after the two colons after the triplet to mark the duration",T,F):F+3="1"&&T[F+3]<="9"?(z.tripletQ=T[F+3]-"0",F+4="1"&&T[F+5]<="9"&&(z.num_notes=T[F+5]-"0",F+=4):F+=2):n("expected number after the triplet to mark the duration",T,F))),F++):z.startSlur===void 0?z.startSlur=1:z.startSlur++),F++;return z.consumed=F-D,z};S.prototype.startNewLine=function(){var T={startChar:-1,endChar:-1};s.partForNextLine.title&&(T.part=s.partForNextLine),T.clef=s.currentVoice&&s.staves[s.currentVoice.staffNum].clef!==void 0?Object.assign({},s.staves[s.currentVoice.staffNum].clef):Object.assign({},s.clef);var F=s.currentVoice?s.currentVoice.scoreTranspose:0;if(T.key=a.standardKey(s.key.root+s.key.acc+s.key.mode,s.key.root,s.key.acc,F),T.key.mode=s.key.mode,s.key.impliedNaturals&&(T.key.impliedNaturals=s.key.impliedNaturals),s.key.explicitAccidentals)for(var z=0;z=0?(z.duration=r.getBarLength(),z.rest.text=1,ee="Zduration"):(D&&s.next_note_duration!==0?(z.duration=s.default_length*s.next_note_duration,s.next_note_duration=0,ce=!0):z.duration=s.default_length,ee="duration");else return K(ee)?(z.endChar=F,z):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(ee==="octave"||ee==="duration"){var le=i.getFraction(T,F);for(z.duration=z.duration*le.value,z.endChar=le.index;le.index"))F--,ee="broken_rhythm";else return z}else return null;break;case">":case"<":if(K(ee))if(D){var R=V(T,F);F+=R[0]-1,s.next_note_duration=R[2],z.duration=R[1]*z.duration,ee="end_slur"}else return z.endChar=F,z;else return null;break;default:return K(ee)?(z.endChar=F,z):null}if(F++,F===T.length)return K(ee)?(z.endChar=F,z):null}return null},V=function(T,F){switch(T[F]){case">":return F"&&T[F+2]===">"?[3,1.875,.125]:F"?[2,1.75,.25]:[1,1.5,.5];case"<":return F=p.length};this.eatWhiteSpace=function(p,u){for(var f=u;f="a"&&v[b]<="z"||v[b]>="A"&&v[b]<="Z");)b++;return b},f=this.skipWhiteSpace(p);if(s(p,f))return{len:0};var _=p.substring(f,f+3).toLowerCase();switch((_.length>1&&_[1]===" "||_[1]==="^"||_[1]==="_"||_[1]==="=")&&(_=_[0]),_){case"mix":return{len:u(p,f),token:"Mix"};case"dor":return{len:u(p,f),token:"Dor"};case"phr":return{len:u(p,f),token:"Phr"};case"lyd":return{len:u(p,f),token:"Lyd"};case"loc":return{len:u(p,f),token:"Loc"};case"aeo":return{len:u(p,f),token:"m"};case"maj":return{len:u(p,f),token:""};case"ion":return{len:u(p,f),token:""};case"min":return{len:u(p,f),token:"m"};case"m":return{len:u(p,f),token:"m"}}return{len:0}},this.getClef=function(p,u){var f=p,_=this.skipWhiteSpace(p);if(s(p,_))return{len:0};var v=!1,b=p.substring(_);if(a.startsWith(b,"clef=")&&(v=!0,b=b.substring(5),_+=5),b.length===0&&v)return{len:_+5,warn:"No clef specified: "+f};var S=this.skipWhiteSpace(b);if(s(b,S))return{len:0};S>0&&(_+=S,b=b.substring(S));var $=null;if(a.startsWith(b,"treble"))$="treble";else if(a.startsWith(b,"bass3"))$="bass3";else if(a.startsWith(b,"bass"))$="bass";else if(a.startsWith(b,"tenor"))$="tenor";else if(a.startsWith(b,"alto2"))$="alto2";else if(a.startsWith(b,"alto1"))$="alto1";else if(a.startsWith(b,"alto"))$="alto";else if(!u&&v&&a.startsWith(b,"none"))$="none";else if(a.startsWith(b,"perc"))$="perc";else if(!u&&v&&a.startsWith(b,"C"))$="tenor";else if(!u&&v&&a.startsWith(b,"F"))$="bass";else if(!u&&v&&a.startsWith(b,"G"))$="treble";else return{len:_+5,warn:"Unknown clef specified: "+f};return b=b.substring($.length),S=this.isMatch(b,"+8"),S>0?$+="+8":(S=this.isMatch(b,"-8"),S>0&&($+="-8")),{len:_+$.length,token:$,explicit:v}},this.getBarLine=function(p,u){switch(p[u]){case"]":switch(++u,p[u]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++u,p[u]>="1"&&p[u]<="9"||p[u]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(++u,p[u]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++u,p[u]){case"]":return++u,p[u]==="|"?(++u,p[u]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"}):{len:3,token:"bar_right_repeat"};case"|":return++u,p[u]===":"?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if(++u,p[u]==="|")switch(++u,p[u]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}else return p[u]>="1"&&p[u]<="9"||p[u]==='"'?{len:1,token:"bar_invisible"}:{len:0};case"|":switch(++u,p[u]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++u,p[u]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var f=0;p[u+f]===":";)f++;return{len:1+f,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(p,u){for(var f=0;f0;){var f;if(p[0].token==="^"){if(f="sharp",p.shift(),p.length===0)return{accs:u,warn:"Expected note name after "+f};switch(p[0].token){case"^":f="dblsharp",p.shift();break;case"/":f="quartersharp",p.shift();break}}else if(p[0].token==="=")f="natural",p.shift();else if(p[0].token==="_"){if(f="flat",p.shift(),p.length===0)return{accs:u,warn:"Expected note name after "+f};switch(p[0].token){case"_":f="dblflat",p.shift();break;case"/":f="quarterflat",p.shift();break}}else return{accs:u};if(p.length===0)return{accs:u,warn:"Expected note name after "+f};switch(p[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":u===void 0&&(u=[]),u.push({acc:f,note:p[0].token[0]}),p[0].token.length===1?p.shift():p[0].token=p[0].token.substring(1);break;default:return{accs:u,warn:"Expected note name after "+f+" Found: "+p[0].token}}}return{accs:u}},this.getKeyAccidental=function(p){var u={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},f=this.skipWhiteSpace(p);if(s(p,f))return{len:0};var _=null;switch(p[f]){case"^":case"_":case"=":_=p[f];break;default:return{len:0}}if(f++,s(p,f))return{len:1,warn:"Expected note name after accidental"};switch(p[f]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:f+1,token:{acc:u[_],note:p[f]}};case"^":case"_":case"/":if(_+=p[f],f++,s(p,f))return{len:2,warn:"Expected note name after accidental"};switch(p[f]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:f+1,token:{acc:u[_],note:p[f]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(p){return p===" "||p===" "||p===""},this.getMeat=function(p,u,f){var _=p.indexOf("%",u);for(_>=0&&_="A"&&p<="Z"||p>="a"&&p<="z"},o=function(p){return p>="0"&&p<="9"};this.tokenize=function(p,u,f,_){var v=this.getMeat(p,u,f);u=v.start,f=v.end;for(var b=[],S;u=f?{len:1,err:"Missing close quote"}:{len:v-u+1,token:this.translateString(p.substring(_+1,v))}}else{for(var b=_;b=0?a.strip(p.substring(0,u)):a.strip(p)},this.getInt=function(p){var u=parseInt(p);if(isNaN(u))return{digits:0};var f=""+u,_=p.indexOf(f);return{value:u,digits:_+f.length}},this.getFloat=function(p){var u=parseFloat(p);if(isNaN(u))return{digits:0};var f=""+u,_=p.indexOf(f);return{value:u,digits:_+f.length}},this.getMeasurement=function(p){if(p.length===0)return{used:0};var u=1,f="";if(p[0].token==="-")p.shift(),f="-",u++;else if(p[0].type!=="number")return{used:0};if(f+=p.shift().token,p.length===0)return{used:1,value:parseInt(f)};var _=p.shift();if(_.token==="."){if(u++,p.length===0)return{used:u,value:parseInt(f)};if(p[0].type==="number"&&(_=p.shift(),f=f+"."+_.token,u++,p.length===0))return{used:u,value:parseFloat(f)};_=p.shift()}switch(_.token){case"pt":return{used:u+1,value:parseFloat(f)};case"px":return{used:u+1,value:parseFloat(f)};case"cm":return{used:u+1,value:parseFloat(f)/2.54*72};case"in":return{used:u+1,value:parseFloat(f)*72};default:return p.unshift(_),{used:u,value:parseFloat(f)}}};var m=function(p){return p=p.replace(/\\n/g,` +`),p=p.replace(/\\"/g,'"'),p};this.getBrackettedSubstring=function(p,u,f,_){for(var v=_||p[u],b=u+1,S=!1;bp.length-1&&(b=p.length-1),[b-u+1,m(p.substring(u+1,b)),!1])}};return t.prototype.peekLine=function(){return this.lines[this.lineIndex]},t.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex0&&(p[b.line].staff[b.staff].barNumber=_);for(var $=Object.keys(S),M=0;M<$.length;M++){var N=$[M]==="voices";$[M]==="meter"&&b.line!==0&&(N=!0),N||(p[b.line].staff[b.staff][$[M]]=S[$[M]])}u[b.staff]&&(p[b.line].staff[b.staff].key=u[b.staff])}p[b.line].staff[b.staff].voices[b.voice]||(p[b.line].staff[b.staff].voices[b.voice]=[]),p[b.line].staff[b.staff].voices[b.voice]=g[b.ogLine].staff[b.staff].voices[b.voice].slice(b.start,b.end+1),f[b.staff*10+b.voice]&&p[b.line].staff[b.staff].voices[b.voice].unshift({el_type:"stem",direction:f[b.staff*10+b.voice].direction});for(var P=p[b.line].staff[b.staff].voices[b.voice],C=P.length-1;C>=0;C--)if(P[C].el_type==="key"){u[b.staff]={root:P[C].root,acc:P[C].acc,mode:P[C].mode,accidentals:P[C].accidentals.filter(function(G){return G.acc!=="natural"})};break}for(C=P.length-1;C>=0;C--)if(P[C].el_type==="stem"){f[b.staff*10+b.voice]={direction:P[C].direction};break}if(m!==void 0&&b.staff===0&&b.voice===0)for(C=0;C0?(m.push(f-1),p.push(Math.round(u-_)),u=_):ff&&Mf?(b.push(M-1),v++,_=Math.max(_,f),f=Math.abs(m-h[v]),u.push(p-N),p=N):f=P}u.push(p)}function o(g,h,m,p){for(var u=Math.ceil(g.total/h),f=Math.floor(g.total/u),_=[],v=0;vh&&(_=!0),v%m===m-1&&(v!==g.length-1&&p.push(v),u.push(Math.round(f)),f=0);return{failed:_,totals:u,lineBreaks:p}}function c(g,h,m){var p={lineBreaks:g,staffwidth:h};for(var u in m)m.hasOwnProperty(u)&&u!=="wrap"&&u!=="staffwidth"&&(p[u]=m[u]);return{revisedParams:p}}function d(g,h,m){if(h.length===0||m.staffwidth0&&M.measureWidths.length<25&&(H=o(M,P,A,G),G.attempts.push({type:"Optimize",failed:H.failed,reason:H.reason,lineBreaks:H.lineBreaks,totals:H.totals}),H.failed||(A=H.lineBreaks))}b.push(A),S.push(G)}var U=m.staffwidth,E=c(b,U,m);return E.explanation=S,E.reParse=!0,E}return L0={wrapLines:a,calcLineWraps:d},L0}var V0,tw;function eE(){if(tw)return V0;tw=1;function a(c){const d=c.getMeterFraction(),g=d.num===4&&d.den===4;if(!(d.num===2&&d.den===2)&&!g)throw new Error("notCommonTime");const m=c.deline();let p=[],u=!1;return m.forEach(f=>{if(f.subtitle)u&&p.push({type:"subtitle",subtitle:f.subtitle.text});else if(f.text)u=!0,p.push({type:"text",text:f.text.text});else if(f.staff){u=!0;const _=f.staff,v=i(_);p=p.concat(v)}}),s(p),r(p),o(p),p}const t=["break","(break)","no chord","n.c.","tacet"];function i(c){const d=[];let g="",h=[],m={chord:["","","",""]},p="",u="";if(c.forEach((f,_)=>{f.voices&&f.voices.forEach((v,b)=>{let S=0,$=0;v.forEach(M=>{if(M.el_type==="part")h.length>0&&_===0&&b===0&&(d.push({type:"part",name:g,lines:[h]}),h=[]),g=M.title;else if(M.el_type==="note"){l(M,m);const N=Math.floor(S);if(M.chord&&M.chord.length>0){const P=M.chord[0],C=P.position==="default"||t.indexOf(P.name.toLowerCase())>=0?P.name:"";C&&(N>0&&!m.chord[0]&&(m.chord[0]=p),p=C,m.chord[N]?N<4&&!m.chord[N+1]&&(m.chord[N+1]=C):m.chord[N]=C),M.chord.forEach(j=>{j.position!=="default"&&t.indexOf(P.name.toLowerCase())<0&&(m.annotations||(m.annotations=[]),m.annotations.push(j.name))})}if(!M.rest||M.rest.type!=="spacer"){const P=M.duration===0&&!M.rest?.25:M.duration,C=Math.floor(P*4);if(C>4)$+=Math.floor(C/4),S=0;else{let j=P*4;M.tripletMultiplier&&(j*=M.tripletMultiplier),S+=j}}}else if(M.el_type==="bar"){if(u&&(m.ending=u,u=""),l(M,m),M.chord&&M.chord.forEach(N=>{N.position!=="default"&&(m.annotations||(m.annotations=[]),m.annotations.push(N.name))}),(M.type==="bar_dbl_repeat"||M.type==="bar_left_repeat")&&(m.hasStartRepeat=!0),(M.type==="bar_dbl_repeat"||M.type==="bar_right_repeat")&&(m.hasEndRepeat=!0),M.startEnding&&(u=M.startEnding),S>=4){if(m.chord[0]===""&&(m.chord[1]||m.chord[2]||m.chord[3])&&(m.chord[0]=n(h)),_===0&&b===0)h.push(m);else{let N=$,P=0;for(;N>=d[P].lines[0].length&&P=0;d--)for(let g=c[d].chord.length-1;g>=0;g--)if(c[d].chord[g])return c[d].chord[g]}function s(c){c.forEach(d=>{if(d.type==="part"){const g=d.lines[0],h=g.findIndex(p=>!!p.ending),m=g.findIndex((p,u)=>u>h&&!!p.ending);if(h>=0&&m>=0&&m-h===g.length-m){let p=!0;for(let u=0;u{if(d.type==="part"){const g=[],h=d.lines[0];let m=!1;const p=h.findIndex(_=>!!_.hasEndRepeat);(p>=0?Math.min(p+1,h.length):h.length)===12&&(m=!0);const f=m?4:8;for(let _=0;_!!S.hasEndRepeat);b>=0&&b{if(d.lines){let g=!1,h="";d.lines.forEach(m=>{m.forEach(p=>{if(!p.noBorder){const u=p.chord;!u[0]&&!u[1]&&!u[2]&&!u[3]?(g?h&&(u[0]="%"):u[0]=h,g=!0):!u[1]&&!u[2]&&!u[3]?(g=!0,h=u[0]):(g=!1,h=u[3]||u[2]||u[1])}})})}})}function l(c,d){if(c.decoration)for(let g=0;g0&&this.sections[this.sections.length-1].type==="endRepeat"&&this.sections.push({type:"startRepeat",index:this.sections[this.sections.length-1].index}),this.sections.push({type:"endRepeat",index:c})),h&&this.sections.push({type:"startEnding",index:c,endings:h}),d&&this.sections.push({type:"startRepeat",index:c})},this.resolveRepeats=function(){var l,c=this.sections[this.sections.length-1],d=o.length-1;if(c.type==="startRepeat"?c.end=d:c.index+10)for(l=0;l0&&i(o,f,S.start,S.end),_=Math.max(_,S.end))}}return f}}function i(o,l,c,d){c<0&&(c=0),l.length>0&&o[c].el_type==="bar"&&l[l.length-1].el_type==="bar"&&c++;for(var g=c;g<=d;g++){var h,m=!1;if(o[g].el_type==="key"||o[g].el_type==="meter"||o[g].el_type==="tempo"||o[g].el_type==="instrument"){for(h=l.length-1;h>=0&&l[h].el_type!==o[g].el_type;)h--;h>=0&&(o[g].el_type==="key"&&s(o[g],l[h])||o[g].el_type==="meter"&&o[g].num===l[h].num&&o[g].den===l[h].den||o[g].el_type==="instrument"&&o[g].program===l[h].program||o[g].el_type==="tempo"&&o[g].qpm===l[h].qpm)&&(m=!0)}m||l.push(n(o[g]))}}function n(o){var l=Object.assign({},o);return l.pitches&&(l.pitches=a.cloneArray(l.pitches)),l}function s(o,l){return!o.accidentals||!l.accidentals?!1:JSON.stringify(o.accidentals)===JSON.stringify(l.accidentals)}function r(o){var l=[],c,d,g;if(o.indexOf(",")>0)for(d=o.split(","),g=0;g0&&l.push(c);else if(o.indexOf("-")>0){d=o.split("-");var h=parseInt(d[0],10),m=parseInt(d[1],10);for(g=h;g<=m;g++)l.push(g)}else c=parseInt(o,10),c>0&&l.push(c);return l}return W0=t,W0}var Q0,nw;function sw(){if(nw)return Q0;nw=1;var a,t=Yr(),i=tE();return(function(){var n=1,s=128;a=function(_,v){v=v||{};var b,S=v.program||0,$=v.midiTranspose||0;_.visualTranspose&&($-=_.visualTranspose);var M=v.channel||0,N=!1,P=v.drum||"",C=v.drumBars||1,j=v.drumIntro||0,G=P!=="",A=!!v.drumOff,B=[],H=50;S=parseInt(S,10),$=parseInt($,10),M=parseInt(M,10),M===10&&(S=s),P=P.split(" "),C=parseInt(C,10),j=parseInt(j,10);var U=_.formatting.bagpipes;U&&(S=71);var E=[];if(_.formatting.midi){var O=_.formatting.midi;O.program&&O.program.length>0&&(S=O.program[0],O.program.length>1&&(S=O.program[1],M=O.program[0]),N=!0),O.transpose&&($=O.transpose[0]),O.channel&&(M=O.channel[0],N=!0),O.drum&&(P=O.drum),O.drumbars&&(C=O.drumbars[0]),O.drumon&&(G=!0),M===10&&(S=s),O.beat&&E.push({el_type:"beat",beats:O.beat}),O.nobeataccents&&E.push({el_type:"beataccents",value:!1})}v.qpm?b=parseInt(v.qpm,10):_.metaText.tempo?b=g(_.metaText.tempo,_.getBeatLength()):v.defaultQpm?b=v.defaultQpm:b=180;var V=[];U&&V.push({el_type:"bagpipes"}),V.push({el_type:"instrument",program:S}),M&&V.push({el_type:"channel",channel:M}),$&&V.push({el_type:"transpose",transpose:$}),V.push({el_type:"tempo",qpm:b});for(var L=0;L=0?Be="pppp":je.decoration.indexOf("ppp")>=0?Be="ppp":je.decoration.indexOf("pp")>=0?Be="pp":je.decoration.indexOf("p")>=0?Be="p":je.decoration.indexOf("mp")>=0?Be="mp":je.decoration.indexOf("mf")>=0?Be="mf":je.decoration.indexOf("f")>=0?Be="f":je.decoration.indexOf("ff")>=0?Be="ff":je.decoration.indexOf("fff")>=0?Be="fff":je.decoration.indexOf("ffff")>=0&&(Be="ffff"),Be){ee=He[Be].slice(0);let at=[ee];Array.isArray(je.decoration)&&(at=[],je.decoration.forEach(wt=>{wt in He&&at.push(He[wt].slice(0))})),T[pe].push({el_type:"beat",beats:ee.slice(0),volumesPerNotePitch:at}),z[Pe]=!1,D[Pe]=!1}if(je.decoration.indexOf("crescendo(")>=0){var Re=r(Le,ye,"crescendo)"),Ze=Math.min(127,ee[0]+H),Ne=o(Le,ye+Re+1,Object.keys(He));Ne&&(Ze=He[Ne][0]),Re>0?z[Pe]=Math.floor((Ze-ee[0])/Re):z[Pe]=!1,D[Pe]=!1}else if(je.decoration.indexOf("crescendo)")>=0)z[Pe]=!1;else if(je.decoration.indexOf("diminuendo(")>=0){var Ve=r(Le,ye,"diminuendo)"),gt=Math.max(15,ee[0]-H),_t=o(Le,ye+Ve+1,Object.keys(He));_t&&(gt=He[_t][0]),z[Pe]=!1,Ve>0?D[Pe]=Math.floor((gt-ee[0])/Ve):D[Pe]=!1}else je.decoration.indexOf("diminuendo)")>=0&&(D[Pe]=!1)}};for(var we=R.staff,pe=0,Te=0;Te=0?(T[pe].push({el_type:"transpose",transpose:-12}),F[pe]=!0):he.clef.type.indexOf("+8")>=0?(T[pe].push({el_type:"transpose",transpose:12}),F[pe]=!0):F[pe]&&(T[pe].push({el_type:"transpose",transpose:0}),F[pe]=!1)),_.formatting.midi&&_.formatting.midi.drumoff&&(T[pe].push({el_type:"bar"}),T[pe].push({el_type:"drum",params:{pattern:"",on:!1}}));var Ge=0,ne=0,Je=0,ue=0;ee=[105,95,85,1];for(var ye=0;ye=0?T[pe].push({el_type:"transpose",transpose:-12}):de.type.indexOf("+8")>=0&&T[pe].push({el_type:"transpose",transpose:12}));break;case"tempo":b=g(de,_.getBeatLength()),T[pe].push({el_type:"tempo",qpm:b,timing:K[pe]}),X[""+K[pe]]={el_type:"tempo",qpm:b,timing:K[pe]};break;case"bar":Ge>0&&T[pe].push({el_type:"bar"}),ot(de),Ge=0,ce[pe].addBar(de,pe);break;case"style":B[pe]=de.head;break;case"timeSignature":T[pe].push(h(de));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var $e=!1;switch(de.cmd){case"drumon":G=!0,$e=!0;break;case"drumoff":G=!1,$e=!0;break;case"drum":P=de.params,$e=!0;break;case"drumbars":C=de.params[0],$e=!0;break;case"drummap":break;case"channel":de.params[0]===10&&T[pe].push({el_type:"instrument",program:s});break;case"program":f(T[pe],{el_type:"instrument",program:de.params[0]}),N=!0;break;case"transpose":T[pe].push({el_type:"transpose",transpose:de.params[0]});break;case"gchordoff":T[pe].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":T[pe].push({el_type:"gchordOn",tacet:!1});break;case"beat":T[pe].push({el_type:"beat",beats:de.params});break;case"nobeataccents":T[pe].push({el_type:"beataccents",value:!1});break;case"beataccents":T[pe].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":T[pe].push({el_type:de.cmd,volume:de.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":T[pe].push({el_type:de.cmd,param:de.params[0]});break;case"bassprog":case"chordprog":T[pe].push({el_type:de.cmd,value:de.params[0],octaveShift:de.params[1]});break;case"gchordbars":T[pe].push({el_type:de.cmd,param:de.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",de.cmd,de)}$e&&(T[0].push({el_type:"drum",params:{pattern:P,bars:C,intro:j,on:G}}),fe=!0);break;default:console.log("MIDI: element type "+de.el_type+" not handled.")}}pe++,K[pe]||(K[pe]=0)}}}}for(var ze=0;zert;)rt++;if(T[qe].length>rt){for(var Ie=0;Ie0&&T[0].length>0&&(T[0][0].pickupLength=_.getPickupLength()),T};function r(_,v,b){for(var S=0,$=v+1;$<_.length;$++)if(_[$].el_type==="note"&&S++,_[$].decoration&&_[$].decoration.indexOf(b)>=0)return S;return S}function o(_,v,b){for(var S=Math.min(_.length,v+3),$=v;$=0)return _[$].decoration[M]}return null}function l(_,v){if(!(!v||v.length===0))for(var b=Object.keys(v),S=0;S<_.length;S++)for(var $=_[S],M=v[0]?v[0].qpm:0,N=0;N<$.length;N++){var P=$[N];P.el_type==="tempo"&&(M=P.qpm),b.indexOf(""+P.timing)>=0&&M!==v[""+P.timing].qpm&&(M=v[""+P.timing].qpm,P.el_type==="tempo"?(P.qpm=v[""+P.timing].qpm,N++):(_[S].splice(N,0,{el_type:"tempo",qpm:v[""+P.timing].qpm,timing:P.timing}),N+=2))}}function c(_){for(var v=0;v<_.length;v++)for(var b=_[v],S=b.length-1;S>=0&&b[S].el_type!=="bar";)b[S].noChordVoice=!0,S--}function d(_,v){if(!(!_||_.length<=v||!_[v].title))return _[v].title.join(" ")}function g(_,v){var b=.25;_.duration&&(b=_.duration[0]);var S=60;return _.bpm&&(S=_.bpm),b*S/v}function h(_){var v;switch(_.type){case"common_time":v={el_type:"meter",num:4,den:4},n=4/4;break;case"cut_time":v={el_type:"meter",num:2,den:2},n=2/2;break;case"specified":let $=0;if(_.value&&_.value.length>0&&_.value[0].num.indexOf("+")>0)for(var b=_.value[0].num.split("+"),S=0;S=0;b--)if(_[b].el_type===v.el_type){JSON.stringify(_[b])!==JSON.stringify(v)&&_.push(v);return}_.push(v)}})(),Q0=a,Q0}var K0,rw;function aE(){if(rw)return K0;rw=1;var a=function(g,h,m,p){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=g,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!h,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=p,this.tempoChangeFactor=1,this.bassInstrument=m.bassprog&&m.bassprog.length>=1?m.bassprog[0]:0,this.chordInstrument=m.chordprog&&m.chordprog.length>=1?m.chordprog[0]:0,this.bassOctaveShift=m.bassprog&&m.bassprog.length===2?m.bassprog[1]:0,this.chordOctaveShift=m.chordprog&&m.chordprog.length===2?m.chordprog[1]:0,this.boomVolume=m.bassvol&&m.bassvol.length===1?m.bassvol[0]:64,this.chickVolume=m.chordvol&&m.chordvol.length===1?m.chordvol[0]:48,m.gchord&&m.gchord.length>0?this.overridePattern=n(m.gchord[0]):this.overridePattern=void 0};a.prototype.setMeter=function(d){this.meter=d},a.prototype.setTempoChangeFactor=function(d){this.tempoChangeFactor=d},a.prototype.setLastBarTime=function(d){this.lastBarTime=d},a.prototype.setTranspose=function(d){this.transpose=d},a.prototype.setRhythmHead=function(d,g){this.hasRhythmHead=d;var h=[];if(d&&this.lastChord&&this.lastChord.chick)for(var m=0;m0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,l(d.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},a.prototype.gChordOn=function(d){this.chordsOff||(this.gChordTacet=d.tacet)},a.prototype.paramChange=function(d){switch(d.el_type){case"gchord":d.param&&d.param.length>0?this.overridePattern=n(d.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=d.value,d.octaveShift!=null&&d.octaveShift!=null?this.bassOctaveShift=d.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=d.value,d.octaveShift!=null&&d.octaveShift!=null?this.chordOctaveShift=d.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=d.param;break;case"chordvol":this.chickVolume=d.param;break;default:console.log("unhandled midi param",d)}},a.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},a.prototype.addTrack=function(d){this.chordTrackEmpty()||d.push(this.chordTrack)},a.prototype.findChord=function(d){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!d.chord||d.chord.length===0)return null;for(var g=0;g=0)return"break"}return null},a.prototype.interpretChord=function(d){if(d.length!==0){if(d==="break")return{chick:[]};var g=d.substring(0,1);if(g==="("){if(d=d.substring(1,d.length-1),d.length===0)return;g=d.substring(0,1)}var h=this.basses[g];if(h){for(var m=this.transpose;m<-8;)m+=12;for(;m>8;)m-=12;h+=m,h<33?h+=12:h>44&&(h-=12);var p=h;h+=this.bassOctaveShift*12;var u=h-5,f;d.length===1&&(f=this.chordNotes(h,""));var _=d.substring(1),v=_.substring(0,1);v==="b"||v==="♭"?(p--,h--,u--,_=_.substring(1)):(v==="#"||v==="♯")&&(p++,h++,u++,_=_.substring(1));var b=_.split("/");if(f=this.chordNotes(p,b[0]),f.length>=3){var S=f[2]-f[0];u=u+S-7}if(b.length===2){var $=this.basses[b[1].substring(0,1)];if($){var M=b[1].substring(1),N={"#":1,"♯":1,b:-1,"♭":-1}[M]||0;h=this.basses[b[1].substring(0,1)]+N+m,h+=this.bassOctaveShift*12,u=h}}return{boom:h,boom2:u,chick:f}}}},a.prototype.chordNotes=function(d,g){g=g.replace(/♭/g,"b").replace(/♯/g,"#");var h=o[g];h||(g.slice(0,2).toLowerCase()==="ma"||g[0]==="M"?h=o.M:g[0]==="m"||g[0]==="-"?h=o.m:h=o.M),d+=12,d+=this.chordOctaveShift*12;for(var m=[],p=0;p0&&v[$-1]&&v[$]&&v[$-1].boom!==v[$].boom&&(M=!0);var P=b[$],C=P.indexOf("boom")>=0,j=!C&&$!==0&&b[0].indexOf("boom")>=0&&(!v[$-1]||v[$-1].boom!==v[$].boom),G=t(v[$],P,M,j);C&&(M=!1);for(var A=0;A=0?p.push(h?d.boom:d.boom2):m&&p.push(d.boom);var u=d.chick.length;if(g.indexOf("chick")>=0)for(var f=0;f0&&ue[0].length>0&&(U=ue[0][0].pickupLength),ye.bassprog!==void 0&&!be.bassprog&&(be.bassprog=[ye.bassprog]),ye.bassvol!==void 0&&!be.bassvol&&(be.bassvol=[ye.bassvol]),ye.chordprog!==void 0&&!be.chordprog&&(be.chordprog=[ye.chordprog]),ye.chordvol!==void 0&&!be.chordvol&&(be.chordvol=[ye.chordvol]),ye.gchord!==void 0&&!be.gchord&&(be.gchord=[ye.gchord]),u=new t(ue.length,ye.chordsOff,be,f),D(ue,ye);for(var xe=0;xe=0)&&($e=!0);for(var ze=0;ze0&&h[h.length-1].cmd==="program")h[h.length-1].instrument=Fe.program;else{var qe;for(qe=h.length-1;qe>=0&&h[qe].cmd!=="program";qe--);(qe<0||h[qe].instrument!==Fe.program)&&h.push({cmd:"program",channel:0,instrument:Fe.program})}break;case"channel":T(Fe.channel);break;case"drum":B=Ae(Fe.params),Ge();break;case"gchordOn":u.gChordOn(Fe);break;case"beat":S=Fe.beats[0],$=Fe.beats[1],M=Fe.beats[2],Fe.volumesPerNotePitch?N=Fe.volumesPerNotePitch:N=[];break;case"vol":C=Fe.volume;break;case"volinc":j=Fe.volume;break;case"beataccents":b=Fe.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":u.paramChange(Fe);break;default:console.log("MIDI creation. Unknown el_type: "+Fe.el_type+` +`);break}}h[0].instrument===void 0&&(h[0].instrument=d||0),m&&h.unshift(m),o.push(h),u.finish(),A.length>0}return ye.detuneOctave&&Je(o,parseInt(ye.detuneOctave,10)),u.addTrack(o),A.length>0&&o.push(A),{tempo:l,instrument:d,tracks:o,totalDuration:p}};function T(ue){for(var ye=h.length-1;ye>=0;ye--)if(h[ye].cmd==="program"){h[ye].channel=ue;return}}function F(ue){return ue/1e6}function z(ue){return Math.round(ue*c*1e6)/1e6}function D(ue,ye){for(var de=0;de=de+1&&(be=N[de][0],xe=N[de][1],Ie=N[de][2]);var $e;if(C!==void 0)$e=C,C=void 0;else if(!b)$e=xe;else if(U>ue)$e=Ie;else{var ze=X(v,K(f),ue);ze===0?$e=be:parseInt(ze,10)===ze?$e=xe:$e=Ie}return j&&($e+=j,j=void 0),$e<0&&($e=0),$e>127&&($e=127),ye?0:$e}function ce(ue,ye){var de={};if(ue.decoration)for(var be=0;be0;)h.push({cmd:"note",pitch:ye.pitch+Ie,volume:ye.volume,start:de,duration:xe,gap:0,instrument:g,style:"decoration"}),Ie=Ie===2?0:2,be-=xe,de+=xe;break;case"trillh":for(var Ie=1;be>0;)h.push({cmd:"note",pitch:ye.pitch+Ie,volume:ye.volume,start:de,duration:xe,gap:0,instrument:g,style:"decoration"}),Ie=Ie===1?0:1,be-=xe,de+=xe;break;case"pralltriller":h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:de,duration:xe,gap:0,instrument:g,style:"decoration"}),be-=xe,de+=xe,h.push({cmd:"note",pitch:ye.pitch+2,volume:ye.volume,start:de,duration:xe,gap:0,instrument:g,style:"decoration"}),be-=xe,de+=xe,h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:de,duration:be,gap:0,instrument:g});break;case"mordent":case"lowermordent":h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:de,duration:xe,gap:0,instrument:g,style:"decoration"}),be-=xe,de+=xe,h.push({cmd:"note",pitch:ye.pitch-2,volume:ye.volume,start:de,duration:xe,gap:0,instrument:g,style:"decoration"}),be-=xe,de+=xe,h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:de,duration:be,gap:0,instrument:g});break;case"turn":xe=ye.duration/4,h.push({cmd:"note",pitch:ye.pitch+2,volume:ye.volume,start:de,duration:xe,gap:0,instrument:g,style:"decoration"}),h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:de+xe,duration:xe,gap:0,instrument:g,style:"decoration"}),h.push({cmd:"note",pitch:ye.pitch-1,volume:ye.volume,start:de+xe*2,duration:xe,gap:0,instrument:g,style:"decoration"}),h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:de+xe*3,duration:xe,gap:0,instrument:g,style:"decoration"});break;case"roll":for(;be>0;)h.push({cmd:"note",pitch:ye.pitch,volume:ye.volume,start:de,duration:xe,gap:0,instrument:g,style:"decoration"}),be-=xe*2,de+=xe*2;break}}function le(ue,ye){var de=ee(F(ue.time),ye);u.processChord(ue);var be;if(ue.gracenotes&&ue.pitches&&ue.pitches.length>0&&ue.pitches[0]&&(be=Te(ue.gracenotes,ue.pitches[0].duration),ue.elem&&(ue.elem.midiGraceNotePitches=he(be,F(ue.time),de*2/3,g))),ue.elem){var xe=F(ue.time),Ie=xe/P/l*60*1e3;if(ue.elem.currentTrackMilliseconds===void 0)ue.elem.currentTrackMilliseconds=Ie,ue.elem.currentTrackWholeNotes=xe;else if(ue.elem.currentTrackMilliseconds.length===void 0)ue.elem.currentTrackMilliseconds!==Ie&&(ue.elem.currentTrackMilliseconds=[ue.elem.currentTrackMilliseconds,Ie],ue.elem.currentTrackWholeNotes=[ue.elem.currentTrackWholeNotes,xe]);else{for(var $e=!1,ze=0;zeot&&(Ve=ee(F(ue.time),ye,ot));var je=rt[ot];if(je){je.startSlur&&(G+=je.startSlur.length),je.endSlur&&(G-=je.endSlur.length);var He=je.actualPitch?je.actualPitch:we(je);if(g===_&&E){var Be=i(je);Be&&E[Be]&&(He=E[Be].sound)}var Re={cmd:"note",pitch:He,volume:Ve,start:F(ue.time),duration:z(je.duration),instrument:g,startChar:ue.elem.startChar,endChar:ue.elem.endChar};if(Re=Pe(Re),ue.gracenotes&&(Re.duration=Re.duration/2,Re.start=Re.start+Re.duration),ue.elem&&ue.elem.midiPitches.push(Re),qe.noteModification)fe(qe.noteModification,Re);else{switch(G>0?Re.endType="tenuto":Fe&&(Re.endType=Fe),Re.endType){case"tenuto":Re.gap=V;break;case"staccato":var Ze=Re.duration*L;Re.gap=l/60*Ze;break;default:Re.gap=O;break}h.push(Re)}}}h.length-1}var Ne=ge(ue);p=Math.max(p,F(ue.time)+z(Ne))}function ge(ue){return ue.pitches&&ue.pitches.length>0&&ue.pitches[0]?ue.pitches[0].duration:ue.elem?ue.elem.duration:ue.duration}var R=[0,2,4,5,7,9,11];function we(ue){if(ue.midipitch!==void 0)return ue.midipitch;var ye=ue.pitch;if(ue.accidental)switch(ue.accidental){case"sharp":n[ye]=1;break;case"flat":n[ye]=-1;break;case"natural":n[ye]=0;break;case"dblsharp":n[ye]=2;break;case"dblflat":n[ye]=-2;break;case"quartersharp":n[ye]=.25;break;case"quarterflat":n[ye]=-.25;break}var de=Le(ye)*12+R[ct(ye)]+60;return n[ye]!==void 0?de+=n[ye]:de+=s[ct(ye)],de+=r,de}function pe(ue){var ye=[0,0,0,0,0,0,0];if(!ue.accidentals)return ye;for(var de=0;de=0?(ue.pitch=Math.round(ue.pitch),ue.cents=-50):ye.indexOf(".25")>=0&&(ue.pitch=Math.round(ue.pitch),ue.cents=50),ue}function Le(ue){return Math.floor(ue/7)}function ct(ue){return ue=ue%7,ue<0&&(ue+=7),ue}function Ae(ue){if(ue.pattern.length===0||ue.on===!1)return{on:!1};for(var ye=ue.pattern[0],de=[],be="",xe=0,Ie=0;Ie1){ze=ze.sort(function(je,He){return je.pitch-He.pitch});var Fe=ze[ze.length-1],qe=Fe.pitch%12,rt=!1;for(xe=0;!rt&&xe=p&&(u-=p),b[$].el_type==="bar")return u}return u}this.getPickupLength=function(){var m=this.getBarLength(),p=l(this.lines,m);return p<1e-8||m-p<1e-8?0:p},this.getBarLength=function(){var m=this.getMeterFraction();return m.num/m.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(m){var p;if(m)p=m;else{var u=this.metaText?this.metaText.tempo:null;p=this.getBpm(u)}p<=0&&(p=1);var f=this.getBeatsPerMeasure(),_=f/p;return _*6e4},this.getBeatsPerMeasure=function(){var m=this.getBeatLength(),p=this.getBarLength();return p/m},this.getMeter=function(){for(var m=0;m0&&m.value[0].num.indexOf("+")>0){var f=m.value[0].num.split("+");p=0;for(var _=0;_m)return $}}return null};function c(m){for(var p,u,f,_,v=m.length-1;v>=0;v--){var b=m[v];b.type==="bar"?(b.top=f,b.nextTop=p,p=f,b.bottom=_,b.nextBottom=u,u=_):b.type==="event"&&(f=b.top,_=b.top+b.height)}}function d(m){var p=[];for(var u in m)m.hasOwnProperty(u)&&p.push(m[u]);return p=p.sort(function(f,_){var v=f.milliseconds-_.milliseconds;return v!==0?v:f.type==="bar"?-1:1}),p}this.addElementToEvents=function(m,p,u,f,_,v,b,S,$,M){if(p.hint)return{isTiedState:void 0,duration:0};var N=p.durationClass?p.durationClass:p.duration;if(p.abcelem.rest&&p.abcelem.rest.type==="spacer"&&(N=0),N>0){for(var P=[],C=0;C0){var v=_.staffs[0],b=v.absoluteY,S=b-v.top*t.STEP,$=_.staffs[_.staffs.length-1];b=$.absoluteY;for(var M=b-$.bottom*t.STEP,N=M-S,P=_.voices,C=0;C0&&v["event"+j]&&(T="event"+j),j=Math.round(C*1e3),V.type==="bar"){var F=V.abcelem.type,z=F==="bar_right_repeat"||F==="bar_dbl_repeat",D=V.abcelem.startEnding==="1",K=F==="bar_left_repeat"||F==="bar_dbl_repeat"||F==="bar_right_repeat";if(z){E>0&&(v[T].endX=V.x),A===-1&&(A=E);var X=0;U=-1;for(var ee=G;eef.left&&(f.endX=Math.min(f.endX,v)):f.endX=v}}var b=p[p.length-1];b.endX=m[b.line].staffGroup.w}}this.getBpm=function(m){var p;if(m||(m=this.metaText?this.metaText.tempo:null),m){p=m.bpm;var u=this.getBeatLength(),f=m.duration&&m.duration.length>0?m.duration[0]:u;p=p*f/u}if(!p){p=180;var _=this.getMeterFraction();_&&_.num!==3&&_.num%3===0&&(p=120)}return p},this.setTiming=function(m,p){if(p=p||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var u=this.metaText?this.metaText.tempo:null,f=this.getBpm(u),_=1;m?u&&(_=m/f):m=f;var v=this.getBeatLength(),b=m/60,S=this.getBarLength(),$=S/v*p/b;$&&($-=this.getPickupLength()/v/b);var M=v*b;return this.noteTimings=this.setupEvents($,M,m,_),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*b):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(m){m||(m={});var p=i(this,m);return n(p,m,this.formatting.percmap,this.formatting.midi)},this.deline=function(m){return s(this.lines,m)},this.findSelectableElement=function(m){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(m):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};return Z0=r,Z0}var eg,pw;function sE(){if(pw)return eg;pw=1;var a=N0(),t=function(A){var B=this,H={},U="";A.reset(),this.setVisualTranspose=function(E){E!==void 0&&(A.visualTranspose=E)},this.cleanUp=function(E,O,V){p(A),delete A.runningFonts,n(A),A.metaText.tempo&&A.metaText.tempo.bpm&&!A.metaText.tempo.duration&&(A.metaText.tempo.duration=[A.getBeatLength()]),G(A);var L=!1,T,F,z;for(T=0;T0&&le[le.length-1].barNumber){var R=g(A.lines,T);R&&(R.staff[0].barNumber=le[le.length-1].barNumber),delete le[le.length-1].barNumber}}}return delete A.staffNum,delete A.voiceNum,delete A.lineNum,delete A.potentialStartBeam,delete A.potentialEndBeam,delete A.vskipPending,V},this.addTieToLastNote=function(E){var O=h(A);return O&&O.pitches&&O.pitches.length>0?(O.pitches[0].startTie={},E&&(O.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(E,O,V,L){if(L.el_type=E,O!==null&&(L.startChar=O),V!==null&&(L.endChar=V),E==="note"){var T=m(L);T>=.25||L.force_end_beam_last&&A.potentialStartBeam!==void 0?S(A):L.end_beam&&A.potentialStartBeam!==void 0?L.rest===void 0?b(L,A):S(A):L.rest===void 0&&(A.potentialStartBeam===void 0?L.end_beam||(A.potentialStartBeam=L,delete A.potentialEndBeam):A.potentialEndBeam=L)}else S(A);return delete L.end_beam,delete L.force_end_beam_last,L.rest&&L.rest.type==="invisible"&&delete L.decoration,A.lines.length<=A.lineNum||A.lines[A.lineNum].staff.length<=A.staffNum?!1:(v(B,A,L,H,U),!0)},this.appendStartingElement=function(E,O,V,L){p(A);var T;E==="key"&&(T=L.impliedNaturals,delete L.impliedNaturals,delete L.explicitAccidentals);var F=Object.assign({},L);if(A.lines[A.lineNum]){var z=A.lines[A.lineNum].staff;if(z){z.length<=A.staffNum&&(z[A.staffNum]={},z[A.staffNum].clef=Object.assign({},z[0].clef),z[A.staffNum].key=Object.assign({},z[0].key),z[0].meter&&(z[A.staffNum].meter=Object.assign({},z[0].meter)),z[A.staffNum].workingClef=Object.assign({},z[0].workingClef),z[A.staffNum].voices=[[]]),E==="clef"&&(z[A.staffNum].workingClef=F);for(var D=z[A.staffNum].voices[A.voiceNum],K=0;K0){var V=O[O.length-1];if(V.el_type==="bar")V.barNumber!==void 0&&(V.barNumber=E);else return E-1}return E},this.hasBeginMusic=function(){for(var E=0;E=0;O--)if(A.lines[O].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var E=d(A.lines,A.lineNum);if(!E)return null;var O=E.staff[A.staffNum];return O&&O.voices[A.voiceNum]!==void 0?O.voices[A.voiceNum]:null},this.setCurrentVoice=function(E,O,V){A.staffNum=E,A.voiceNum=O,U=V;for(var L=0;L{O.voices.length>=we.voices.length&&we.voices.forEach(ce=>{let Te=[];ce.forEach(he=>{he.el_type==="bar"?Te.push(he):he.el_type==="note"&&Te.push({el_type:"note",duration:he.duration,rest:{type:"invisible"},startChar:he.startChar,endChar:he.endChar})}),we.voices.push(Te)})})}else Z.el_type==="bar"?(z?(z=!1,V[D].snip.push({start:L,len:Q-L}),V[D].voice.push(Z)):(F>0&&V[D].voice.push({el_type:"note",duration:F,rest:{type:"invisible"},startChar:Z.startChar,endChar:Z.endChar}),V[D].voice.push(Z)),F=0):Z.el_type==="note"?z?V[D].voice.push(Z):(!Z.rest||Z.rest.type!=="spacer")&&(F+=Z.duration):(Z.el_type==="scale"||Z.el_type==="stem"||Z.el_type==="overlay"||Z.el_type==="style"||Z.el_type==="transpose"||Z.el_type==="color")&&V[D].voice.push(Z)}V[D].hasOverlay&&V[D].snip.length===0&&V[D].snip.push({start:L,len:$.length-L})}for(D=0;D=0;fe--){var le=oe.snip[fe];O.voices[D].splice(le.start,le.len),O.voices[D].splice(le.start+1,0,{el_type:"stem",direction:"auto"});var ge=r(O.voices[D],le.start);O.voices[D].splice(ge,0,{el_type:"stem",direction:"up"})}for(fe=0;fe0&&A[H].el_type!=="bar";H--);return H}function o(A){for(var N=!0,H=0;H=N&&$=0;){if(A[N].staff)return A[N];N--}return null}function g(A,N){for(N++;A.length>N;){if(A[N].staff)return A[N];N++}return null}function h(A){if(!A.lines[A.lineNum]||!A.lines[A.lineNum].staff||!A.lines[A.lineNum].staff[A.staffNum])return null;var N=A.lines[A.lineNum].staff[A.staffNum].voices[A.voiceNum];if(!N)return null;for(var H=N.length-1;H>=0;H--){var E=N[H];if(E.el_type==="note")return E}return null}function m(A){return A.duration?A.duration:0}function p(A){A.potentialStartBeam&&A.potentialEndBeam&&(A.potentialStartBeam.startBeam=!0,A.potentialEndBeam.endBeam=!0),delete A.potentialStartBeam,delete A.potentialEndBeam}function u(A){for(var N=0;N0){if(E.voices[0]!==void 0){for(var U=!1,O=0;O/g,">")},M=function(E,U,O){U||(U=" ");var V=U[O];(V===" "||!V)&&(V="SPACE");var D=S(U.substring(O-64,O))+''+V+""+S(U.substring(O+1).substring(0,64));v("Music Line:"+m.lineIndex+":"+(O+1)+": "+E+": "+D),T({message:E,line:U,startChar:b.iChar+O,column:O})},P,B;this.getWarnings=function(){return b.warnings},this.getWarningObjects=function(){return b.warningObjects};var C=function(E,U){if(U.indexOf("")>=0){p+=U;return}if(U=p+U,p="",!E){M("Can't add words before the first line of music",E,0);return}U=a.strip(U),U[U.length-1]!=="-"&&(U=U+" ");for(var O=[],V=0,D=!1,$=function(L){var Q=a.strip(U.substring(V,L));if(Q=Q.replace(/\\([-_*|~])/g,"$1"),V=L+1,Q.length>0){D&&(Q=Q.replace(/~/g," "));var Z=U[L];return Z!=="_"&&Z!=="-"&&(Z=" "),O.push({syllable:m.translateString(Q),divider:Z}),D=!1,!0}return!1},F=!1,z=0;z0&&(a.last(O).divider="-",O.push({skip:!0,to:"next"}));break;case"_":F||($(z),O.push({skip:!0,to:"slur"}));break;case"*":F||($(z),O.push({skip:!0,to:"next"}));break;case"|":F||($(z),O.push({skip:!0,to:"bar"}));break;case"~":F||(D=!0);break}F=U[z]==="\\"}E.forEach(function(L){if(O.length!==0){if(O[0].skip){switch(O[0].to){case"next":L.el_type==="note"&&L.pitches!==null&&O.shift();break;case"slur":L.el_type==="note"&&L.pitches!==null&&O.shift();break;case"bar":L.el_type==="bar"&&O.shift();break}L.el_type!=="bar"&&(L.lyric===void 0?L.lyric=[{syllable:"",divider:" "}]:L.lyric.push({syllable:"",divider:" "}))}else if(L.el_type==="note"&&L.rest===void 0){var Q=O.shift();Q.syllable&&(Q.syllable=Q.syllable.replace(/ +/g," ")),L.lyric===void 0?L.lyric=[Q]:L.lyric.push(Q)}}})},j=function(E,U){if(U.indexOf("")>=0){u+=U;return}if(U=u+U,u="",!E){M("Can't add symbols before the first line of music",E,0);return}U=a.strip(U),U[U.length-1]!=="-"&&(U=U+" ");for(var O=[],V=0,D=!1,$=function(z){var L=a.strip(U.substring(V,z));if(V=z+1,L.length>0){D&&(L=L.replace(/~/g," "));var Q=U[z];return Q!=="_"&&Q!=="-"&&(Q=" "),O.push({syllable:m.translateString(L),divider:Q}),D=!1,!0}return!1},F=0;F0&&(a.last(O).divider="-",O.push({skip:!0,to:"next"}));break;case"_":$(F),O.push({skip:!0,to:"slur"});break;case"*":$(F),O.push({skip:!0,to:"next"});break;case"|":$(F),O.push({skip:!0,to:"bar"});break;case"~":D=!0;break}E.forEach(function(z){if(O.length!==0){if(O[0].skip)switch(O[0].to){case"next":z.el_type==="note"&&z.pitches!==null&&O.shift();break;case"slur":z.el_type==="note"&&z.pitches!==null&&O.shift();break;case"bar":z.el_type==="bar"&&O.shift();break}else if(z.el_type==="note"&&z.rest===void 0){var L=O.shift();z.lyric===void 0?z.lyric=[L]:z.lyric.push(L)}}})},G=function(E){if(a.startsWith(E,"%%")){var U=t.addDirective(E.substring(2));U&&M(U,E,2);return}var O=E.indexOf("%");if(O>=0&&(E=E.substring(0,O)),E=E.replace(/\s+$/,""),E.length!==0){if(p){C(h.getCurrentVoice(),E.substring(2));return}if(u){j(h.getCurrentVoice(),E.substring(2));return}if(E.length<2||E[1]!==":"||B.lineContinuation){B.parseMusic(E);return}var V=P.parseHeader(E);V.regular&&B.parseMusic(E),V.newline&&B.startNewLine(),V.words&&C(h.getCurrentVoice(),E.substring(2)),V.symbols&&j(h.getCurrentVoice(),E.substring(2))}};function A(E,U){E.push({el_type:"hint"});for(var O=0;O{O.voices.length>=we.voices.length&&we.voices.forEach(pe=>{let Te=[];pe.forEach(he=>{he.el_type==="bar"?Te.push(he):he.el_type==="note"&&Te.push({el_type:"note",duration:he.duration,rest:{type:"invisible"},startChar:he.startChar,endChar:he.endChar})}),we.voices.push(Te)})})}else X.el_type==="bar"?(z?(z=!1,V[L].snip.push({start:D,len:K-D}),V[L].voice.push(X)):(F>0&&V[L].voice.push({el_type:"note",duration:F,rest:{type:"invisible"},startChar:X.startChar,endChar:X.endChar}),V[L].voice.push(X)),F=0):X.el_type==="note"?z?V[L].voice.push(X):(!X.rest||X.rest.type!=="spacer")&&(F+=X.duration):(X.el_type==="scale"||X.el_type==="stem"||X.el_type==="overlay"||X.el_type==="style"||X.el_type==="transpose"||X.el_type==="color")&&V[L].voice.push(X)}V[L].hasOverlay&&V[L].snip.length===0&&V[L].snip.push({start:D,len:T.length-D})}for(L=0;L=0;fe--){var le=ce.snip[fe];O.voices[L].splice(le.start,le.len),O.voices[L].splice(le.start+1,0,{el_type:"stem",direction:"auto"});var ge=r(O.voices[L],le.start);O.voices[L].splice(ge,0,{el_type:"stem",direction:"up"})}for(fe=0;fe0&&A[H].el_type!=="bar";H--);return H}function o(A){for(var B=!0,H=0;H=B&&T=0;){if(A[B].staff)return A[B];B--}return null}function g(A,B){for(B++;A.length>B;){if(A[B].staff)return A[B];B++}return null}function h(A){if(!A.lines[A.lineNum]||!A.lines[A.lineNum].staff||!A.lines[A.lineNum].staff[A.staffNum])return null;var B=A.lines[A.lineNum].staff[A.staffNum].voices[A.voiceNum];if(!B)return null;for(var H=B.length-1;H>=0;H--){var U=B[H];if(U.el_type==="note")return U}return null}function m(A){return A.duration?A.duration:0}function p(A){A.potentialStartBeam&&A.potentialEndBeam&&(A.potentialStartBeam.startBeam=!0,A.potentialEndBeam.endBeam=!0),delete A.potentialStartBeam,delete A.potentialEndBeam}function u(A){for(var B=0;B0){if(U.voices[0]!==void 0){for(var E=!1,O=0;O/g,">")},M=function(U,E,O){E||(E=" ");var V=E[O];(V===" "||!V)&&(V="SPACE");var L=$(E.substring(O-64,O))+''+V+""+$(E.substring(O+1).substring(0,64));b("Music Line:"+m.lineIndex+":"+(O+1)+": "+U+": "+L),S({message:U,line:E,startChar:v.iChar+O,column:O})},N,P;this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var C=function(U,E){if(E.indexOf("")>=0){p+=E;return}if(E=p+E,p="",!U){M("Can't add words before the first line of music",U,0);return}E=a.strip(E),E[E.length-1]!=="-"&&(E=E+" ");for(var O=[],V=0,L=!1,T=function(D){var K=a.strip(E.substring(V,D));if(K=K.replace(/\\([-_*|~])/g,"$1"),V=D+1,K.length>0){L&&(K=K.replace(/~/g," "));var X=E[D];return X!=="_"&&X!=="-"&&(X=" "),O.push({syllable:m.translateString(K),divider:X}),L=!1,!0}return!1},F=!1,z=0;z0&&(a.last(O).divider="-",O.push({skip:!0,to:"next"}));break;case"_":F||(T(z),O.push({skip:!0,to:"slur"}));break;case"*":F||(T(z),O.push({skip:!0,to:"next"}));break;case"|":F||(T(z),O.push({skip:!0,to:"bar"}));break;case"~":F||(L=!0);break}F=E[z]==="\\"}U.forEach(function(D){if(O.length!==0){if(O[0].skip){switch(O[0].to){case"next":D.el_type==="note"&&D.pitches!==null&&O.shift();break;case"slur":D.el_type==="note"&&D.pitches!==null&&O.shift();break;case"bar":D.el_type==="bar"&&O.shift();break}D.el_type!=="bar"&&(D.lyric===void 0?D.lyric=[{syllable:"",divider:" "}]:D.lyric.push({syllable:"",divider:" "}))}else if(D.el_type==="note"&&D.rest===void 0){var K=O.shift();K.syllable&&(K.syllable=K.syllable.replace(/ +/g," ")),D.lyric===void 0?D.lyric=[K]:D.lyric.push(K)}}})},j=function(U,E){if(E.indexOf("")>=0){u+=E;return}if(E=u+E,u="",!U){M("Can't add symbols before the first line of music",U,0);return}E=a.strip(E),E[E.length-1]!=="-"&&(E=E+" ");for(var O=[],V=0,L=!1,T=function(z){var D=a.strip(E.substring(V,z));if(V=z+1,D.length>0){L&&(D=D.replace(/~/g," "));var K=E[z];return K!=="_"&&K!=="-"&&(K=" "),O.push({syllable:m.translateString(D),divider:K}),L=!1,!0}return!1},F=0;F0&&(a.last(O).divider="-",O.push({skip:!0,to:"next"}));break;case"_":T(F),O.push({skip:!0,to:"slur"});break;case"*":T(F),O.push({skip:!0,to:"next"});break;case"|":T(F),O.push({skip:!0,to:"bar"});break;case"~":L=!0;break}U.forEach(function(z){if(O.length!==0){if(O[0].skip)switch(O[0].to){case"next":z.el_type==="note"&&z.pitches!==null&&O.shift();break;case"slur":z.el_type==="note"&&z.pitches!==null&&O.shift();break;case"bar":z.el_type==="bar"&&O.shift();break}else if(z.el_type==="note"&&z.rest===void 0){var D=O.shift();z.lyric===void 0?z.lyric=[D]:z.lyric.push(D)}}})},G=function(U){if(a.startsWith(U,"%%")){var E=t.addDirective(U.substring(2));E&&M(E,U,2);return}var O=U.indexOf("%");if(O>=0&&(U=U.substring(0,O)),U=U.replace(/\s+$/,""),U.length!==0){if(p){C(h.getCurrentVoice(),U.substring(2));return}if(u){j(h.getCurrentVoice(),U.substring(2));return}if(U.length<2||U[1]!==":"||P.lineContinuation){P.parseMusic(U);return}var V=N.parseHeader(U);V.regular&&P.parseMusic(U),V.newline&&P.startNewLine(),V.words&&C(h.getCurrentVoice(),U.substring(2)),V.symbols&&j(h.getCurrentVoice(),U.substring(2))}};function A(U,E){U.push({el_type:"hint"});for(var O=0;O1){for(var D=1;D0&&V[D][0]!==` -`;)V[D]=V[D].substr(1),V[D-1]+=" ";E=V.join(" ")}E=E.replace(/\\%/g,"​%"),E=E.replace(/\\([ \t]*)(%.*)*\n/g,function(ee,oe,fe){var le=fe?Array(fe.length+1).join(" "):"";return oe+""+le+` -`});var $=E.split(` -`);a.last($).length===0&&$.pop(),m=new s($,b),P=new i(m,M,b,g,h),B=new n(m,M,b,g,h,P),U.print&&(g.media="print"),b.reset(),b.iChar=O,U.visualTranspose?(b.globalTranspose=parseInt(U.visualTranspose),b.globalTranspose===0?b.globalTranspose=void 0:h.setVisualTranspose(U.visualTranspose)):b.globalTranspose=void 0,U.lineBreaks&&(b.lineBreaks=U.lineBreaks),P.reset(m,M,b,g);try{U.format&&t.globalFormatting(U.format);for(var F=m.nextLine();F;){if(U.header_only&&b.is_in_header===!1||U.stop_on_warning&&b.warnings)throw"normal_abort";var z=b.is_in_header;G(F),z&&!b.is_in_header&&(h.setRunningFont("annotationfont",b.annotationfont),h.setRunningFont("gchordfont",b.gchordfont),h.setRunningFont("tripletfont",b.tripletfont),h.setRunningFont("vocalfont",b.vocalfont)),F=m.nextLine()}p&&C(h.getCurrentVoice(),""),u&&j(h.getCurrentVoice(),""),b.openSlurs=h.cleanUp(b.barsperstaff,b.staffnonote,b.openSlurs)}catch(ee){if(ee!=="normal_abort")throw ee}var L=792,Q=8.5*72;switch(b.papersize){case"legal":L=1008,Q=8.5*72;break;case"A4":L=11.7*72,Q=8.3*72;break}if(b.landscape){var Z=L;L=Q,Q=Z}if(g.formatting.pagewidth||(g.formatting.pagewidth=Q),g.formatting.pageheight||(g.formatting.pageheight=L),U.hint_measures&&H(),r.wrapLines(g,b.lineBreaks,b.barNumbers),U.chordGrid)try{g.chordGrid=o(g)}catch(ee){switch(ee.message){case"notCommonTime":M("Chord grid only works for 2/2 and 4/4 time.",0,0);break;case"noChords":M("No chords are found in the tune.",0,0);break;default:M(ee.message,0,0)}}}};return tg=d,tg}var ig,gw;function rE(){if(gw)return ig;gw=1;var a=Kr(),t=function(i){var n="",s=i.match(/(\s*)/);i=a.strip(i);for(var r=i.split(` +`;var V=U.split(` +\\`);if(V.length>1){for(var L=1;L0&&V[L][0]!==` +`;)V[L]=V[L].substr(1),V[L-1]+=" ";U=V.join(" ")}U=U.replace(/\\%/g,"​%"),U=U.replace(/\\([ \t]*)(%.*)*\n/g,function(ee,ce,fe){var le=fe?Array(fe.length+1).join(" "):"";return ce+""+le+` +`});var T=U.split(` +`);a.last(T).length===0&&T.pop(),m=new s(T,v),N=new i(m,M,v,g,h),P=new n(m,M,v,g,h,N),E.print&&(g.media="print"),v.reset(),v.iChar=O,E.visualTranspose?(v.globalTranspose=parseInt(E.visualTranspose),v.globalTranspose===0?v.globalTranspose=void 0:h.setVisualTranspose(E.visualTranspose)):v.globalTranspose=void 0,E.lineBreaks&&(v.lineBreaks=E.lineBreaks),N.reset(m,M,v,g);try{E.format&&t.globalFormatting(E.format);for(var F=m.nextLine();F;){if(E.header_only&&v.is_in_header===!1||E.stop_on_warning&&v.warnings)throw"normal_abort";var z=v.is_in_header;G(F),z&&!v.is_in_header&&(h.setRunningFont("annotationfont",v.annotationfont),h.setRunningFont("gchordfont",v.gchordfont),h.setRunningFont("tripletfont",v.tripletfont),h.setRunningFont("vocalfont",v.vocalfont)),F=m.nextLine()}p&&C(h.getCurrentVoice(),""),u&&j(h.getCurrentVoice(),""),v.openSlurs=h.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(ee){if(ee!=="normal_abort")throw ee}var D=792,K=8.5*72;switch(v.papersize){case"legal":D=1008,K=8.5*72;break;case"A4":D=11.7*72,K=8.3*72;break}if(v.landscape){var X=D;D=K,K=X}if(g.formatting.pagewidth||(g.formatting.pagewidth=K),g.formatting.pageheight||(g.formatting.pageheight=D),E.hint_measures&&H(),r.wrapLines(g,v.lineBreaks,v.barNumbers),E.chordGrid)try{g.chordGrid=o(g)}catch(ee){switch(ee.message){case"notCommonTime":M("Chord grid only works for 2/2 and 4/4 time.",0,0);break;case"noChords":M("No chords are found in the tune.",0,0);break;default:M(ee.message,0,0)}}}};return tg=d,tg}var ig,gw;function rE(){if(gw)return ig;gw=1;var a=Yr(),t=function(i){var n="",s=i.match(/(\s*)/);i=a.strip(i);for(var r=i.split(` X:`),o=1;o1&&!a.startsWith(c[0].abc,"X:")){var d=c.shift(),g=d.abc.split(` `);g.forEach(function(m){a.startsWith(m,"%%")&&(n+=m+` `)})}var h=n;return c.forEach(function(m){var p=m.abc.indexOf(` `);p>0&&(m.abc=m.abc.substring(0,p)),m.pure=m.abc,m.abc=n+m.abc,m.title="";var u=m.pure.split("T:");u.length>1&&(u=u[1].split(` `),m.title=a.strip(u[0]));var f=m.pure.substring(2,m.pure.indexOf(` -`));m.id=a.strip(f)}),{header:h,tunes:c}};return ig=t,ig}var ng,hw;function oE(){if(hw)return ng;hw=1;function a(t,i){this.numLines=t,this.lineSpace=i,this.verticalSize=this.numLines*this.lineSpace;var n=3;this.bar={pitch:n,pitch2:i*t,height:5}}return a.prototype.bypass=function(t){var i=t.staffGroup.voices;return!!(i.length>0&&i[0].isPercussion)},a.prototype.setRelative=function(t,i,n){switch(t.type){case"bar":i.pitch=this.bar.pitch,i.pitch2=this.bar.pitch2,i.height=this.height;break;case"symbol":var s=this.bar.pitch2/2;if(t.name=="dots.dot")return n?(i.pitch=s,!1):(i.pitch=s+this.lineSpace,!0);break}return n},ng=a,ng}var sg,_w;function vw(){if(_w)return sg;_w=1;var a=function(i,n){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=i,this.voicetotal=n,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return a.prototype.addChild=function(t){if(t.type==="bar"){for(var i=!0,n=0;i&&n0&&(c.length>0&&c[c.length-1]!==" "&&(c+=" "),c+=i),o.setAttribute("class",c)}};return rg=a,rg}var lg,yw;function ww(){if(yw)return lg;yw=1;var a=og(),t=function(i,n){i===void 0&&(i="abcjs-note_selected"),n===void 0&&(n="#ff0000"),a(this.elemset,i,"",n)};return lg=t,lg}var cg,kw;function xw(){if(kw)return cg;kw=1;var a=og(),t=function(i,n){i===void 0&&(i="abcjs-note_selected"),n===void 0&&(n="#000000"),a(this.elemset,"",i,n)};return cg=t,cg}var dg,Sw;function Oc(){if(Sw)return dg;Sw=1;var a=ww(),t=xw(),i=function(s,r,o,l,c,d){d||(d={}),this.tuneNumber=c,this.abcelem=s,this.duration=r,this.durationClass=d.durationClassOveride?d.durationClassOveride:this.duration,this.minspacing=o||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=l,s.extraClass&&(this.extraClass=s.extraClass),this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return i.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},i.prototype.addExtra=function(n){this.fixed.w=Math.max(this.fixed.w,n.dx+n.w),this.fixed.t===void 0?this.fixed.t=n.top:this.fixed.t=Math.max(this.fixed.t,n.top),this.fixed.b===void 0?this.fixed.b=n.bottom:this.fixed.b=Math.min(this.fixed.b,n.bottom),n.dxthis.w&&(this.w=n.dx+n.w),this.right[this.right.length]=n,this._addChild(n)},i.prototype.addFixed=function(n){this._addChild(n)},i.prototype.addFixedX=function(n){this._addChild(n)},i.prototype.addCentered=function(n){var s=n.w/2;-sthis.w&&(this.w=n.dx+s),this.right[this.right.length]=n,this._addChild(n)},i.prototype.setLimit=function(n,s){s[n]&&(this.specialY[n]?this.specialY[n]=Math.max(this.specialY[n],s[n]):this.specialY[n]=s[n])},i.prototype._addChild=function(n){var s=!0;this.abcelem.el_type=="clef"&&n.type=="barNumber"&&(s=!1),n.parent=this,this.children[this.children.length]=n,s&&this.pushTop(n.top),this.pushBottom(n.bottom),this.setLimit("tempoHeightAbove",n),this.setLimit("partHeightAbove",n),this.setLimit("volumeHeightAbove",n),this.setLimit("dynamicHeightAbove",n),this.setLimit("endingHeightAbove",n),this.setLimit("chordHeightAbove",n),this.setLimit("lyricHeightAbove",n),this.setLimit("lyricHeightBelow",n),this.setLimit("chordHeightBelow",n),this.setLimit("volumeHeightBelow",n),this.setLimit("dynamicHeightBelow",n)},i.prototype.pushTop=function(n){n!==void 0&&(this.top===void 0?this.top=n:this.top=Math.max(n,this.top))},i.prototype.pushBottom=function(n){n!==void 0&&(this.bottom===void 0?this.bottom=n:this.bottom=Math.min(n,this.bottom))},i.prototype.setX=function(n){this.x=n;for(var s=0;sthis.top&&(this.top=this.pitch2),this.bottom=r,this.pitch2!==void 0&&this.pitch20?this.top+=o.stemHeight:this.bottom+=o.stemHeight),o.dim&&(this.dim=o.dim),o.position&&(this.position=o.position),o.voiceNumber!==void 0&&(this.voiceNumber=o.voiceNumber),this.height=o.height?o.height:4,o.top&&(this.top=o.top),o.bottom&&(this.bottom=o.bottom),o.name?this.name=o.name:this.c?this.name=this.c:this.name=this.type,o.realWidth?this.realWidth=o.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":o.position&&o.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":o.position&&o.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?o.position&&o.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};return a.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var t=0,i=this.type==="chord"?this.realWidth/2:0,n=this.x-i-t,s=n+this.realWidth+t;return{left:n,right:s}},a.prototype.invertLane=function(t){this.lane===void 0&&(this.lane=0),this.lane=t-this.lane-1},a.prototype.putChordInLane=function(t){this.lane=t,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane},a.prototype.getLane=function(){return this.lane===void 0?0:this.lane},a.prototype.setX=function(t){this.x=t+this.dx},ug=a,ug}var fg,$w;function lE(){if($w)return fg;$w=1;var a=Oc(),t=Yr();function i(f){return f!=null&&f.constructor===Object}function n(f,_){for(var b in _)_.hasOwnProperty(b)&&(Array.isArray(_[b])||i(_[b])||(f[b]=_[b]))}function s(f){var _=new a("",0,0,"",0);return n(_,f),_.top=0,_.bottom=-1,f.abcelem&&(_.abcelem={},n(_.abcelem,f.abcelem),_.abcelem.el_type==="note"&&(_.abcelem.el_type="tabNumber")),f.cloned=_,_}function r(f,_){var b=s(f);if(_)for(var v=f.children,T=!0,S=0;S=0){if(b===_)return f.extra[v].x+f.extra[v].w/2;b++}}return-1}function m(f){if(f.abcelem){var _=f.abcelem;if(_.rest)return _.gracenotes}return null}function p(f,_,b){var v=f.semantics.notesToNumber(_,b);if(v.error)return f.setError(v.error),v;if(v.graces&&v.notes){var T=v.notes.length-1;v.notes[T].graces=v.graces}return v}function u(f,_,b,v,T){for(var S=0;S=0&&(f.semantics.clefTranspose=-12),A.abcelem.type.indexOf("+8")>=0&&(f.semantics.clefTranspose=12)),A.type){case"staff-extra key-signature":this.accidentals=A.abcelem.accidentals,f.semantics.accidentals=this.accidentals;break;case"bar":f.semantics.measureAccidentals={};var E=!1;G===P.children.length-1&&(E=!0);var U=r(A,f);if(U.abcelem.barNumber){delete U.abcelem.barNumber;for(var O=0;O0&&(j.abselem=D,b.push(j),B.children.push(D));break}}},fg=c,fg}var pg,qw;function cE(){if(qw)return pg;qw=1;var a=vw(),t=lE(),i=Es();function n(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function s(f){for(var _=0,b=0;b_&&(_=v.specialY.lyricHeightBelow)}return _}function r(f,_,b){var v=f.semantics,T=_.controller.getTextSize,S=v.tabInfos(f),M=v.suppress(f),P=!0;if(M&&(P=!1),P){var B=T.calc(S,"tablabelfont","text instrumentname");return b.tabNameInfos={textSize:{height:B.height,width:B.width},name:S},B.height}return 0}function o(f,_){return _[f].isTabStaff?f===_.length-1?!0:!_[f+1].isTabStaff:!1}function l(f){for(var _=0,b=0;b=0;b--)if(!f[b].isTabStaff)return b;return-1}function d(f){for(var _=0;_1}function h(f,_){for(var b=0,v=0,T=!0,S=0;T;){if(!_[b])return-1;if(_[b].isTabStaff||(S=_[b].voices.length),_[b].isTabStaff){if(v++,o(b,_)&&v=f&&(b+1==_.length||!_[b+1].isTabStaff))return b+1;if(b++,b>_.length)return-1}}function m(f,_){for(var b=_;b>=0;b--)if(!f[b].isTabStaff)return f[b];return null}function p(f,_){var b=f[_],v=b.children[0].abcelem;return v.el_type==="clef"?null:_==0?"none":f[_-1].children[0]}function u(f,_,b,v){var T=new t,S={clef:{type:"TAB"}},M=f.linePitch*f.nbLines,P=b.staff;if(P){var B=P[0];if(B&&B.clef&&B.clef.stafflines==0){f.setError("No tablatures when stafflines=0");return}P.splice(P.length,0,S)}var C=b.staffGroup,j=C.voices,G=j[0],A=s(G),N=3,H=v,E=C.staffs[H],U=M+N-E.bottom-A;E.isTabStaff&&(U=E.top);var O={bottom:-1,isTabStaff:!0,specialY:n(),lines:f.nbLines,linePitch:f.linePitch,dy:.15,top:U},V=h(v,C.staffs);if(V!==-1){O.parentIndex=V-1,C.staffs.splice(V,0,O),C.height+=M+N;var D=m(C.staffs,V),$=1;g(C.staffs,D)&&($=D.voices.length),S.voices=[];for(var F=0;F<$;F++){var z=new a(0,0);F>0&&(z.duplicate=!0);var L=r(f,_,z)/i.STEP;L=Math.max(L,1),C.staffs[v].top+=1,C.height+=L,z.staff=O;var Q=j.length;j.splice(j.length,0,z);var Z=p(j,F+v);S.voices[F]=[],T.build(f,j,S.voices[F],F,v,Z,Q)}d(C.staffs)}}return pg=u,pg}var mg,Cw;function Aw(){if(Cw)return mg;Cw=1;var a={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},t=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function i(s){var r=s.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(r&&r.length===5){var o=a[r[1]],l=t.indexOf(r[2]),c=r[4].length-r[3].length;return 48+l+o+c*12}return 0}function n(s){s=parseInt(s,10);var r=Math.floor(s/12),o=s%12,l=t[o];if(l==="-"&&(l="^"+t[o-1]),r>4)for(l=l.toLowerCase(),r-=5;r>0;)l+="'",r--;else for(;r<4;)l+=",",r++;return l}return mg={noteToMidi:i,midiToNote:n},mg}var gg,Gw;function Fw(){if(Gw)return gg;Gw=1;var{noteToMidi:a,midiToNote:t}=Aw();function i(s,r){var o=a(s);r&&(o+=r);var l=t(o),c=!1,d=!1,g=!1,h=null,m=null,p=!1,u=0;s.startsWith("_")?(c=!0,u=-1,s[1]=="/"?(c=!1,m="v",u=0):s[1]=="_"&&(p=!0,u-=1)):s.startsWith("^")?(d=!0,u=1,s[1]=="/"?(d=!1,m="^",u=0):s[1]=="^"&&(p=!0,u+=1)):s.startsWith("=")&&(h=!0,u=0),g=c||d||m!=null,(g||h)&&(m!=null||p?l=s.slice(2):l=s.slice(1));var f=(l.match(/,/g)||[]).length,_=(l.match(/'/g)||[]).length;this.pitch=o,this.pitchAltered=0,this.name=l,this.acc=u,this.isSharp=d,this.isKeySharp=!1,this.isDouble=p,this.isAltered=g,this.isFlat=c,this.isKeyFlat=!1,this.natural=h,this.quarter=m,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=_}function n(s){var r=s.name,o=new i(r);return o.pitch=s.pitch,o.hasComma=s.hasComma,o.isLower=s.isLower,o.isQuoted=s.isQuoted,o.isSharp=s.isSharp,o.isKeySharp=s.isKeySharp,o.isFlat=s.isFlat,o.isKeyFlat=s.isKeyFlat,o}return i.prototype.sameNoteAs=function(s){return s.pitch===this.pitch},i.prototype.isLowerThan=function(s){return s.pitch>this.pitch},i.prototype.checkKeyAccidentals=function(s,r){if(!(this.isAltered||this.natural)){if(r[this.name.toUpperCase()])switch(r[this.name.toUpperCase()]){case"__":this.acc=-2,this.pitchAltered=-2;return;case"_":this.acc=-1,this.pitchAltered=-1;return;case"=":this.acc=0,this.pitchAltered=0;return;case"^":this.acc=1,this.pitchAltered=1;return;case"^^":this.acc=2,this.pitchAltered=2;return}else if(s)for(var o=this.name,l=0;l0){p=[];for(var f=0;f0&&(u=m.capoTuning);for(var f=u.length-1,_=0;_=0;f--)if(p.pitch+p.pitchAltered>=m.stringPitches[f]){var _=p.pitch+p.pitchAltered-m.stringPitches[f];return p.quarter==="^"?_-=.5:p.quarter==="v"&&(_+=.5),{num:Math.round(_),str:m.stringPitches.length-1-f,note:p}}return{num:"?",str:m.stringPitches.length-1,note:p}}h.prototype.stringToPitch=function(m){var p=5.3,u=this.strings.length-1;return p+(u-m)*this.linePitch};function g(m,p){var u={num:"?",str:0,note:p};m.push(u),m.error=p.emit()+": unexpected note for instrument"}h.prototype.notesToNumber=function(m,p){var u,f,_=null,b=null;if(m&&(b=[],m.length>1?(b=l(this,m),b.error&&(_=b.error)):m[0].endTie||(u=new t(m[0].name,this.clefTranspose),u.checkKeyAccidentals(this.accidentals,this.measureAccidentals),f=d(this,u),f?b.push(f):(g(b,u),_=b.error))),_)return b;var v=null;if(p){v=[];for(var T=0;T0&&(f+=" capo:"+m.capo),p=p.replace("%T",f)),p}return""},h.prototype.suppress=function(m){var p=m.params.suppress;return!!p};function h(m){var p=m.tuning,u=m.capo,f=m.params.highestNote;this.linePitch=m.linePitch,this.highestNote="a'",f&&(this.highestNote=f),this.measureAccidentals={},this.capo=0,u&&(this.capo=parseInt(u,10)),this.transpose=m.transpose?m.transpose:0,this.tuning=p,this.stringPitches=[];for(var _=0;_0&&(this.capoTuning=n(this)),this.strings=s(this),this.strings.error){m.setError(this.strings.error),m.inError=!0;return}this.secondPos=r(this)}return _g=h,_g}var vg,Ew;function fE(){if(Ew)return vg;Ew=1;var a=oE(),t=cE(),i=uE();n.prototype.init=function(r,o,l,c){this.tune=r,this.params=l,this.tuneNumber=o,this.inError=!1,this.abcTune=r,this.linePitch=3,this.nbLines=c.defaultTuning.length,this.isTabBig=c.isTabBig,this.tabSymbolOffset=c.tabSymbolOffset,this.capo=l.capo,this.transpose=l.visualTranspose,this.hideTabSymbol=l.hideTabSymbol,this.tablature=new a(this.nbLines,this.linePitch);var d=l.tuning;d||(d=c.defaultTuning),this.tuning=d,this.semantics=new i(this)},n.prototype.setError=function(r){r&&(this.error=r,this.inError=!0,this.tune.warnings?this.tune.warnings.push(r):this.tune.warnings=[r])},n.prototype.render=function(r,o,l){this.inError||this.tablature.bypass(o)||t(this,r,o,l)};function n(){}var s=function(){return{name:"StringTab",tablature:n}};return vg=s,vg}var bg,Uw;function Rw(){if(Uw)return bg;Uw=1;var a=fE(),t={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},i={inited:!1,plugins:{},register:function(n){var s=n.name,r=n.tablature;this.plugins[s]=r},setError:function(n,s){n.warnings?n.warning.push(s):n.warnings=[s]},preparePlugins:function(n,s,r){this.inited||(this.register(new a),this.inited=!0);var o=null;if(r.tablature){var l=r.tablature;o=[];for(var c=0;c0)for(var c=o.length,d=0;d1&&o&&o.length>0)for(var c=o.length,d=0;d=0&&h0&&i[0].isPercussion)},a.prototype.setRelative=function(t,i,n){switch(t.type){case"bar":i.pitch=this.bar.pitch,i.pitch2=this.bar.pitch2,i.height=this.height;break;case"symbol":var s=this.bar.pitch2/2;if(t.name=="dots.dot")return n?(i.pitch=s,!1):(i.pitch=s+this.lineSpace,!0);break}return n},ng=a,ng}var sg,_w;function vw(){if(_w)return sg;_w=1;var a=function(i,n){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=i,this.voicetotal=n,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return a.prototype.addChild=function(t){if(t.type==="bar"){for(var i=!0,n=0;i&&n0&&(c.length>0&&c[c.length-1]!==" "&&(c+=" "),c+=i),o.setAttribute("class",c)}};return rg=a,rg}var lg,yw;function ww(){if(yw)return lg;yw=1;var a=og(),t=function(i,n){i===void 0&&(i="abcjs-note_selected"),n===void 0&&(n="#ff0000"),a(this.elemset,i,"",n)};return lg=t,lg}var cg,kw;function xw(){if(kw)return cg;kw=1;var a=og(),t=function(i,n){i===void 0&&(i="abcjs-note_selected"),n===void 0&&(n="#000000"),a(this.elemset,"",i,n)};return cg=t,cg}var dg,Sw;function jc(){if(Sw)return dg;Sw=1;var a=ww(),t=xw(),i=function(s,r,o,l,c,d){d||(d={}),this.tuneNumber=c,this.abcelem=s,this.duration=r,this.durationClass=d.durationClassOveride?d.durationClassOveride:this.duration,this.minspacing=o||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=l,s.extraClass&&(this.extraClass=s.extraClass),this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return i.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},i.prototype.addExtra=function(n){this.fixed.w=Math.max(this.fixed.w,n.dx+n.w),this.fixed.t===void 0?this.fixed.t=n.top:this.fixed.t=Math.max(this.fixed.t,n.top),this.fixed.b===void 0?this.fixed.b=n.bottom:this.fixed.b=Math.min(this.fixed.b,n.bottom),n.dxthis.w&&(this.w=n.dx+n.w),this.right[this.right.length]=n,this._addChild(n)},i.prototype.addFixed=function(n){this._addChild(n)},i.prototype.addFixedX=function(n){this._addChild(n)},i.prototype.addCentered=function(n){var s=n.w/2;-sthis.w&&(this.w=n.dx+s),this.right[this.right.length]=n,this._addChild(n)},i.prototype.setLimit=function(n,s){s[n]&&(this.specialY[n]?this.specialY[n]=Math.max(this.specialY[n],s[n]):this.specialY[n]=s[n])},i.prototype._addChild=function(n){var s=!0;this.abcelem.el_type=="clef"&&n.type=="barNumber"&&(s=!1),n.parent=this,this.children[this.children.length]=n,s&&this.pushTop(n.top),this.pushBottom(n.bottom),this.setLimit("tempoHeightAbove",n),this.setLimit("partHeightAbove",n),this.setLimit("volumeHeightAbove",n),this.setLimit("dynamicHeightAbove",n),this.setLimit("endingHeightAbove",n),this.setLimit("chordHeightAbove",n),this.setLimit("lyricHeightAbove",n),this.setLimit("lyricHeightBelow",n),this.setLimit("chordHeightBelow",n),this.setLimit("volumeHeightBelow",n),this.setLimit("dynamicHeightBelow",n)},i.prototype.pushTop=function(n){n!==void 0&&(this.top===void 0?this.top=n:this.top=Math.max(n,this.top))},i.prototype.pushBottom=function(n){n!==void 0&&(this.bottom===void 0?this.bottom=n:this.bottom=Math.min(n,this.bottom))},i.prototype.setX=function(n){this.x=n;for(var s=0;sthis.top&&(this.top=this.pitch2),this.bottom=r,this.pitch2!==void 0&&this.pitch20?this.top+=o.stemHeight:this.bottom+=o.stemHeight),o.dim&&(this.dim=o.dim),o.position&&(this.position=o.position),o.voiceNumber!==void 0&&(this.voiceNumber=o.voiceNumber),this.height=o.height?o.height:4,o.top&&(this.top=o.top),o.bottom&&(this.bottom=o.bottom),o.name?this.name=o.name:this.c?this.name=this.c:this.name=this.type,o.realWidth?this.realWidth=o.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":o.position&&o.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":o.position&&o.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?o.position&&o.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};return a.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var t=0,i=this.type==="chord"?this.realWidth/2:0,n=this.x-i-t,s=n+this.realWidth+t;return{left:n,right:s}},a.prototype.invertLane=function(t){this.lane===void 0&&(this.lane=0),this.lane=t-this.lane-1},a.prototype.putChordInLane=function(t){this.lane=t,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane},a.prototype.getLane=function(){return this.lane===void 0?0:this.lane},a.prototype.setX=function(t){this.x=t+this.dx},ug=a,ug}var fg,$w;function lE(){if($w)return fg;$w=1;var a=jc(),t=Jr();function i(f){return f!=null&&f.constructor===Object}function n(f,_){for(var v in _)_.hasOwnProperty(v)&&(Array.isArray(_[v])||i(_[v])||(f[v]=_[v]))}function s(f){var _=new a("",0,0,"",0);return n(_,f),_.top=0,_.bottom=-1,f.abcelem&&(_.abcelem={},n(_.abcelem,f.abcelem),_.abcelem.el_type==="note"&&(_.abcelem.el_type="tabNumber")),f.cloned=_,_}function r(f,_){var v=s(f);if(_)for(var b=f.children,S=!0,$=0;$=0){if(v===_)return f.extra[b].x+f.extra[b].w/2;v++}}return-1}function m(f){if(f.abcelem){var _=f.abcelem;if(_.rest)return _.gracenotes}return null}function p(f,_,v){var b=f.semantics.notesToNumber(_,v);if(b.error)return f.setError(b.error),b;if(b.graces&&b.notes){var S=b.notes.length-1;b.notes[S].graces=b.graces}return b}function u(f,_,v,b,S){for(var $=0;$=0&&(f.semantics.clefTranspose=-12),A.abcelem.type.indexOf("+8")>=0&&(f.semantics.clefTranspose=12)),A.type){case"staff-extra key-signature":this.accidentals=A.abcelem.accidentals,f.semantics.accidentals=this.accidentals;break;case"bar":f.semantics.measureAccidentals={};var U=!1;G===N.children.length-1&&(U=!0);var E=r(A,f);if(E.abcelem.barNumber){delete E.abcelem.barNumber;for(var O=0;O0&&(j.abselem=L,v.push(j),P.children.push(L));break}}},fg=c,fg}var pg,qw;function cE(){if(qw)return pg;qw=1;var a=vw(),t=lE(),i=Ms();function n(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function s(f){for(var _=0,v=0;v_&&(_=b.specialY.lyricHeightBelow)}return _}function r(f,_,v){var b=f.semantics,S=_.controller.getTextSize,$=b.tabInfos(f),M=b.suppress(f),N=!0;if(M&&(N=!1),N){var P=S.calc($,"tablabelfont","text instrumentname");return v.tabNameInfos={textSize:{height:P.height,width:P.width},name:$},P.height}return 0}function o(f,_){return _[f].isTabStaff?f===_.length-1?!0:!_[f+1].isTabStaff:!1}function l(f){for(var _=0,v=0;v=0;v--)if(!f[v].isTabStaff)return v;return-1}function d(f){for(var _=0;_1}function h(f,_){for(var v=0,b=0,S=!0,$=0;S;){if(!_[v])return-1;if(_[v].isTabStaff||($=_[v].voices.length),_[v].isTabStaff){if(b++,o(v,_)&&b<$)return v+1}else if(b=0,v>=f&&(v+1==_.length||!_[v+1].isTabStaff))return v+1;if(v++,v>_.length)return-1}}function m(f,_){for(var v=_;v>=0;v--)if(!f[v].isTabStaff)return f[v];return null}function p(f,_){var v=f[_],b=v.children[0].abcelem;return b.el_type==="clef"?null:_==0?"none":f[_-1].children[0]}function u(f,_,v,b){var S=new t,$={clef:{type:"TAB"}},M=f.linePitch*f.nbLines,N=v.staff;if(N){var P=N[0];if(P&&P.clef&&P.clef.stafflines==0){f.setError("No tablatures when stafflines=0");return}N.splice(N.length,0,$)}var C=v.staffGroup,j=C.voices,G=j[0],A=s(G),B=3,H=b,U=C.staffs[H],E=M+B-U.bottom-A;U.isTabStaff&&(E=U.top);var O={bottom:-1,isTabStaff:!0,specialY:n(),lines:f.nbLines,linePitch:f.linePitch,dy:.15,top:E},V=h(b,C.staffs);if(V!==-1){O.parentIndex=V-1,C.staffs.splice(V,0,O),C.height+=M+B;var L=m(C.staffs,V),T=1;g(C.staffs,L)&&(T=L.voices.length),$.voices=[];for(var F=0;F0&&(z.duplicate=!0);var D=r(f,_,z)/i.STEP;D=Math.max(D,1),C.staffs[b].top+=1,C.height+=D,z.staff=O;var K=j.length;j.splice(j.length,0,z);var X=p(j,F+b);$.voices[F]=[],S.build(f,j,$.voices[F],F,b,X,K)}d(C.staffs)}}return pg=u,pg}var mg,Cw;function Aw(){if(Cw)return mg;Cw=1;var a={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},t=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function i(s){var r=s.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(r&&r.length===5){var o=a[r[1]],l=t.indexOf(r[2]),c=r[4].length-r[3].length;return 48+l+o+c*12}return 0}function n(s){s=parseInt(s,10);var r=Math.floor(s/12),o=s%12,l=t[o];if(l==="-"&&(l="^"+t[o-1]),r>4)for(l=l.toLowerCase(),r-=5;r>0;)l+="'",r--;else for(;r<4;)l+=",",r++;return l}return mg={noteToMidi:i,midiToNote:n},mg}var gg,Gw;function Fw(){if(Gw)return gg;Gw=1;var{noteToMidi:a,midiToNote:t}=Aw();function i(s,r){var o=a(s);r&&(o+=r);var l=t(o),c=!1,d=!1,g=!1,h=null,m=null,p=!1,u=0;s.startsWith("_")?(c=!0,u=-1,s[1]=="/"?(c=!1,m="v",u=0):s[1]=="_"&&(p=!0,u-=1)):s.startsWith("^")?(d=!0,u=1,s[1]=="/"?(d=!1,m="^",u=0):s[1]=="^"&&(p=!0,u+=1)):s.startsWith("=")&&(h=!0,u=0),g=c||d||m!=null,(g||h)&&(m!=null||p?l=s.slice(2):l=s.slice(1));var f=(l.match(/,/g)||[]).length,_=(l.match(/'/g)||[]).length;this.pitch=o,this.pitchAltered=0,this.name=l,this.acc=u,this.isSharp=d,this.isKeySharp=!1,this.isDouble=p,this.isAltered=g,this.isFlat=c,this.isKeyFlat=!1,this.natural=h,this.quarter=m,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=_}function n(s){var r=s.name,o=new i(r);return o.pitch=s.pitch,o.hasComma=s.hasComma,o.isLower=s.isLower,o.isQuoted=s.isQuoted,o.isSharp=s.isSharp,o.isKeySharp=s.isKeySharp,o.isFlat=s.isFlat,o.isKeyFlat=s.isKeyFlat,o}return i.prototype.sameNoteAs=function(s){return s.pitch===this.pitch},i.prototype.isLowerThan=function(s){return s.pitch>this.pitch},i.prototype.checkKeyAccidentals=function(s,r){if(!(this.isAltered||this.natural)){if(r[this.name.toUpperCase()])switch(r[this.name.toUpperCase()]){case"__":this.acc=-2,this.pitchAltered=-2;return;case"_":this.acc=-1,this.pitchAltered=-1;return;case"=":this.acc=0,this.pitchAltered=0;return;case"^":this.acc=1,this.pitchAltered=1;return;case"^^":this.acc=2,this.pitchAltered=2;return}else if(s)for(var o=this.name,l=0;l0){p=[];for(var f=0;f0&&(u=m.capoTuning);for(var f=u.length-1,_=0;_=0;f--)if(p.pitch+p.pitchAltered>=m.stringPitches[f]){var _=p.pitch+p.pitchAltered-m.stringPitches[f];return p.quarter==="^"?_-=.5:p.quarter==="v"&&(_+=.5),{num:Math.round(_),str:m.stringPitches.length-1-f,note:p}}return{num:"?",str:m.stringPitches.length-1,note:p}}h.prototype.stringToPitch=function(m){var p=5.3,u=this.strings.length-1;return p+(u-m)*this.linePitch};function g(m,p){var u={num:"?",str:0,note:p};m.push(u),m.error=p.emit()+": unexpected note for instrument"}h.prototype.notesToNumber=function(m,p){var u,f,_=null,v=null;if(m&&(v=[],m.length>1?(v=l(this,m),v.error&&(_=v.error)):m[0].endTie||(u=new t(m[0].name,this.clefTranspose),u.checkKeyAccidentals(this.accidentals,this.measureAccidentals),f=d(this,u),f?v.push(f):(g(v,u),_=v.error))),_)return v;var b=null;if(p){b=[];for(var S=0;S0&&(f+=" capo:"+m.capo),p=p.replace("%T",f)),p}return""},h.prototype.suppress=function(m){var p=m.params.suppress;return!!p};function h(m){var p=m.tuning,u=m.capo,f=m.params.highestNote;this.linePitch=m.linePitch,this.highestNote="a'",f&&(this.highestNote=f),this.measureAccidentals={},this.capo=0,u&&(this.capo=parseInt(u,10)),this.transpose=m.transpose?m.transpose:0,this.tuning=p,this.stringPitches=[];for(var _=0;_0&&(this.capoTuning=n(this)),this.strings=s(this),this.strings.error){m.setError(this.strings.error),m.inError=!0;return}this.secondPos=r(this)}return _g=h,_g}var vg,Ew;function fE(){if(Ew)return vg;Ew=1;var a=oE(),t=cE(),i=uE();n.prototype.init=function(r,o,l,c){this.tune=r,this.params=l,this.tuneNumber=o,this.inError=!1,this.abcTune=r,this.linePitch=3,this.nbLines=c.defaultTuning.length,this.isTabBig=c.isTabBig,this.tabSymbolOffset=c.tabSymbolOffset,this.capo=l.capo,this.transpose=l.visualTranspose,this.hideTabSymbol=l.hideTabSymbol,this.tablature=new a(this.nbLines,this.linePitch);var d=l.tuning;d||(d=c.defaultTuning),this.tuning=d,this.semantics=new i(this)},n.prototype.setError=function(r){r&&(this.error=r,this.inError=!0,this.tune.warnings?this.tune.warnings.push(r):this.tune.warnings=[r])},n.prototype.render=function(r,o,l){this.inError||this.tablature.bypass(o)||t(this,r,o,l)};function n(){}var s=function(){return{name:"StringTab",tablature:n}};return vg=s,vg}var bg,Uw;function Rw(){if(Uw)return bg;Uw=1;var a=fE(),t={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},i={inited:!1,plugins:{},register:function(n){var s=n.name,r=n.tablature;this.plugins[s]=r},setError:function(n,s){n.warnings?n.warning.push(s):n.warnings=[s]},preparePlugins:function(n,s,r){this.inited||(this.register(new a),this.inited=!0);var o=null;if(r.tablature){var l=r.tablature;o=[];for(var c=0;c0)for(var c=o.length,d=0;d1&&o&&o.length>0)for(var c=o.length,d=0;d=0&&h0,S=0;S=0&&(f=A.startChar,A.chord===void 0?u=p:u=null),A.chord&&(p=A),A.el_type==="bar"){if(b){var N=d.abc.substring(f,A.endChar),H={abc:N};p=u&&u.chord&&u.chord.length>0?u.chord[0].name:null,p&&(H.lastChord=p),A.startEnding&&(H.startEnding=A.startEnding),A.endEnding&&(H.endEnding=A.endEnding),_.push(H),f=null,b=!1}}else A.el_type==="note"&&(b=!0)}}o.push({header:m,measures:_,hasPickup:T})}return o}})(),yg=n,yg}var wg,Pw;function pE(){if(Pw)return wg;Pw=1;var a=V2(),{relativeMajor:t,transposeKey:i,relativeMode:n,isLegalMode:s}=D2(),r=O2(),o;return(function(){o=function(C,j,G){if(j==="TEST")return{keyAccidentals:a,relativeMajor:t,transposeKey:i,relativeMode:n,transposeChordName:r};G=parseInt(G,10);var A=[],N;for(N=0;N2?A+=7:G===-12&&(A-=7):G>0&&A<0?A+=7:G<0&&A>0&&(A-=7),G>12?A+=7:G<-12&&(A-=7),A}function m(C,j,G,A,N,H){for(var E=[],U=h(N,G,H),O={},V={},D=0;D1?N[1]:"",accidentals:H}}function _(C,j,G,A){for(var N=C.pitch,H=p.indexOf(C.name),E=p.indexOf(j.root),U=(E+N)%7,O=H+G,V=C.oct;O>6;)V++,O-=7;for(;O<0;)V--,O+=7;for(var D=p[U],$="",F=C.adj,z="=",L=0;L4&&(D=D.toLowerCase()),{acc:$,name:D,upper:D.toUpperCase()}}var b=/([_^=]*)([A-Ga-g])([,']*)/,v=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/;function T(C,j,G,A){var N=j==="none"?0:p.indexOf(j),H=C.match(b),E=H[2].toUpperCase(),U=p.indexOf(E)-N;U<0&&(U+=7);var O=u.indexOf(H[3]);E===H[2]&&O--;var V=A[E]||G[E]||"=";return{acc:H[1],name:E,pitch:U,oct:O,adj:B(H[1],G[E],A[E]),courtesy:H[1]===V}}function S(C,j,G){for(var A=C.substring(j,G),N,H=[],E=/("[^"]+")+/g;(N=E.exec(A))!==null;)H.push({start:E.lastIndex-N[0].length,end:E.lastIndex});for(var U=/(![^!]+!)+/g;(N=U.exec(A))!==null;)H.push({start:U.lastIndex-N[0].length,end:U.lastIndex});for(var O=[],V=/([_^=]*)([A-Ga-g])([,']*)/g;(N=V.exec(A))!==null;){for(var D=!1,$=0;$=H[$].start&&V.lastIndex<=H[$].end&&(D=!0);D||O.push({note:N[0],index:j+V.lastIndex-N[0].length})}return O}function M(C,j,G,A,N){var H=C.substring(j,G),E=/\{/,U=/\}/,O=/([^\{]*)/,V=/(\/*)/,D=H.match(new RegExp(O.source+E.source+V.source+v.source+V.source+v.source+V.source+v.source+V.source+v.source+V.source+v.source+V.source+v.source+V.source+v.source+V.source+v.source+U.source));if(D){for(var $=1+D[1].length,F=0;Fthis.max)&&(this.max=i.abcelem.maxpitch))},a.prototype.addBeam=function(i){this.beams.push(i)},a.prototype.setStemDirection=function(){if(this.average=t(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var i=6;this.stemsUp=this.average0&&this.startVoice.staff.voices[0]===t)},xg=a,xg}var Sg,Ow;function ll(){if(Ow)return Sg;Ow=1;var a=Es(),t={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84}};t["noteheads.slash.whole"]={d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},t["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},t["noteheads.harmonic.quarter"]={d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},t["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var i=function(r){for(var o=[],l=0,c=r.length;l0?d.top+3:d.bottom-1,_=c>0?d.top+3:d.bottom-3,b=_-2;r.type==="bass-8"&&(f=3,u=0),d.addRight(new i("8",g+u,t.getSymbolWidth("8")*p,f,{scalex:p,scaley:p,top:_,bottom:b}))}}return d};function s(r){switch(r){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}return Tg=n,Tg}var $g,Dw;function _E(){if(Dw)return $g;Dw=1;var a=Oc(),t=ll(),i=Yr(),n=function(s,r){if(s.el_type="keySignature",!s.accidentals||s.accidentals.length===0)return null;var o=new a(s,0,10,"staff-extra key-signature",r);o.isKeySig=!0;var l=0;return s.accidentals.forEach(function(c){var d,g=0;switch(c.acc){case"sharp":d="accidentals.sharp",g=-3;break;case"natural":d="accidentals.nat";break;case"flat":d="accidentals.flat",g=-1.2;break;case"quartersharp":d="accidentals.halfsharp",g=-2.5;break;case"quarterflat":d="accidentals.halfflat",g=-1.2;break;default:d="accidentals.flat"}o.addRight(new i(d,l,t.getSymbolWidth(d),c.verticalPos,{thickness:t.symbolHeightInPitches(d),top:c.verticalPos+t.symbolHeightInPitches(d)+g,bottom:c.verticalPos+g})),l+=t.getSymbolWidth(d)+2},this),o};return $g=n,$g}var qg,Lw;function vE(){if(Lw)return qg;Lw=1;var a=ll(),t=Yr(),i=function(n,s,r,o){o||(o={});var l=o.dir!==void 0?o.dir:null,c=o.headx!==void 0?o.headx:0,d=o.extrax!==void 0?o.extrax:0,g=o.flag!==void 0?o.flag:null,h=o.dot!==void 0?o.dot:0,m=o.dotshiftx!==void 0?o.dotshiftx:0,p=o.scale!==void 0?o.scale:1,u=o.accidentalSlot!==void 0?o.accidentalSlot:[],f=o.shouldExtendStem!==void 0?o.shouldExtendStem:!1,_=o.printAccidentals!==void 0?o.printAccidentals:!0,b=o.chordPos,v=r.verticalPos,T,S=0,M=0,P=0;if(s===void 0)n.addFixed(new t("pitch is undefined",0,0,0,{type:"debug"}));else if(s==="")T=new t(null,0,0,v,{chordPos:b});else{var B=c;if(r.printer_shift){var C=r.printer_shift==="same"?1:0;B=l==="down"?-a.getSymbolWidth(s)*p+C:a.getSymbolWidth(s)*p-C}var j={scalex:p,scaley:p,thickness:a.symbolHeightInPitches(s)*p,name:r.name,chordPos:b};if(T=new t(s,B,a.getSymbolWidth(s)*p,v,j),T.stemDir=l,g){var G=v+(l==="down"?-7:7)*p;f&&(l==="down"&&G>6&&(G=6),l==="up"&&G<6&&(G=6));var A=l==="down"?c:c+T.w-.6;n.addRight(new t(g,A,a.getSymbolWidth(g)*p,G,{scalex:p,scaley:p,chordPos:b}))}for(M=T.w+m-2+5*h;h>0;h--){var N=1-Math.abs(v)%2;n.addRight(new t("dots.dot",T.w+m-2+5*h,a.getSymbolWidth("dots.dot"),v+N,{chordPos:b}))}}if(T&&(T.highestVert=r.highestVert),_&&r.accidental){var H;switch(r.accidental){case"quartersharp":H="accidentals.halfsharp";break;case"dblsharp":H="accidentals.dblsharp";break;case"sharp":H="accidentals.sharp";break;case"quarterflat":H="accidentals.halfflat";break;case"flat":H="accidentals.flat";break;case"dblflat":H="accidentals.dblflat";break;case"natural":H="accidentals.nat"}for(var E=!1,U=d,O=0;O=6){u[O][0]=v,U=u[O][1],E=!0;break}E===!1&&(U-=a.getSymbolWidth(H)*p+2,u.push([v,U]),S=a.getSymbolWidth(H)*p+2);var V=a.symbolHeightInPitches(H);n.addExtra(new t(H,U,a.getSymbolWidth(H),v,{scalex:p,scaley:p,top:v+V/2,bottom:v-V/2,chordPos:b})),P=a.getSymbolWidth(H)/2}return{notehead:T,accidentalshiftx:S,dotshiftx:M,extraLeft:P}};return qg=i,qg}var Cg,Vw;function bE(){if(Vw)return Cg;Vw=1;var a=Oc(),t=ll(),i=Yr(),n=function(s,r){s.el_type="timeSignature";var o=new a(s,0,10,"staff-extra time-signature",r);if(s.type==="specified")for(var l=0,c=0;c0)this.above=!1;else{var t;this.anchor1?t=this.anchor1.pitch:this.anchor2?t=this.anchor2.pitch:t=14,this.anchor1&&this.anchor1.stemDir==="down"&&this.anchor2&&this.anchor2.stemDir==="down"?this.above=!0:this.anchor1&&this.anchor1.stemDir==="up"&&this.anchor2&&this.anchor2.stemDir==="up"?this.above=!1:this.anchor1&&this.anchor2?this.above=t>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=t>=6}},a.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var t=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(t=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(t=!0);for(var i=0;it&&(t=this.internalNotes[i].highestVert);t>this.startY&&t>this.endY&&(this.startY=this.endY=t-1)}},a.prototype.getYBounds=function(){var t=10,i=1e3;this.isTie?(this.calcTieDirection(),this.calcX(t,i),this.calcTieY()):(this.calcSlurDirection(),this.calcX(t,i),this.calcSlurY());var n,s;return this.above?(s=Math.min(this.startY,this.endY),n=s+3):(n=Math.min(this.startY,this.endY),s=n-3),[n,s]},Mg=a,Mg}var zg,Jw;function xE(){if(Jw)return zg;Jw=1;var a=yE(),t=wE(),i=kE(),n=ll(),s=Yr(),r=Yw(),o=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},l=function(u,f,_,b,v,T,S,M,P){for(var B,C=0;C9&&B++;var G=b/2;n.getSymbolAlign(j)!=="center"&&(G-=n.getSymbolWidth(j)/2),v.addFixedX(new s(j,G,n.getSymbolWidth(j),B))}if(f[C]==="slide"&&v.heads[0]){var A=v.heads[0].pitch;A-=2;var N=new s("",-T-15,0,A-1),H=new s("",-T-5,0,A+1);v.addFixedX(N),v.addFixedX(H),u.addOther(new r({anchor1:N,anchor2:H,fixedY:!0}))}}return B===void 0&&(B=_),{above:B,below:v.bottom}},c=function(u,f,_,b){for(var v=0;vS&&(E=S)),E}function C(H,E,U){var O=B(E),V=2,D=5;_.addFixedX(new s(H,f/2,0,O+V,{type:"decoration",klass:"ornament",thickness:3,anchor:U})),P(E,D)}function j(H,E){var U=f/2;n.getSymbolAlign(H)!=="center"&&(U-=n.getSymbolWidth(H)/2);var O=n.symbolHeightInPitches(H)+1,V=B(E);V=E==="above"?V+O/2:V-O/2,_.addFixedX(new s(H,U,n.getSymbolWidth(H),V,{klass:"ornament",thickness:n.symbolHeightInPitches(H),position:E})),P(E,O)}for(var G={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},A=!1,N=0;N",this.dynamicPositioning)),this.startDiminuendoX=void 0),this.startCrescendoX&&(u.addOther(new t(this.startCrescendoX,p(u.children),"<",this.dynamicPositioning)),this.startCrescendoX=void 0)},o.prototype.dynamicDecoration=function(u,f,_,b){for(var v,T,S,M=0;M",b)),T&&u.addOther(new t(T.start,T.stop,"<",b)),S&&u.addOther(new i(S.start,S.stop))};function m(u){for(var f=0;f0,$=0;$=0&&(f=A.startChar,A.chord===void 0?u=p:u=null),A.chord&&(p=A),A.el_type==="bar"){if(v){var B=d.abc.substring(f,A.endChar),H={abc:B};p=u&&u.chord&&u.chord.length>0?u.chord[0].name:null,p&&(H.lastChord=p),A.startEnding&&(H.startEnding=A.startEnding),A.endEnding&&(H.endEnding=A.endEnding),_.push(H),f=null,v=!1}}else A.el_type==="note"&&(v=!0)}}o.push({header:m,measures:_,hasPickup:S})}return o}})(),yg=n,yg}var wg,Pw;function pE(){if(Pw)return wg;Pw=1;var a=V2(),{relativeMajor:t,transposeKey:i,relativeMode:n,isLegalMode:s}=D2(),r=O2(),o;return(function(){o=function(C,j,G){if(j==="TEST")return{keyAccidentals:a,relativeMajor:t,transposeKey:i,relativeMode:n,transposeChordName:r};G=parseInt(G,10);var A=[],B;for(B=0;B2?A+=7:G===-12&&(A-=7):G>0&&A<0?A+=7:G<0&&A>0&&(A-=7),G>12?A+=7:G<-12&&(A-=7),A}function m(C,j,G,A,B,H){for(var U=[],E=h(B,G,H),O={},V={},L=0;L1?B[1]:"",accidentals:H}}function _(C,j,G,A){for(var B=C.pitch,H=p.indexOf(C.name),U=p.indexOf(j.root),E=(U+B)%7,O=H+G,V=C.oct;O>6;)V++,O-=7;for(;O<0;)V--,O+=7;for(var L=p[E],T="",F=C.adj,z="=",D=0;D4&&(L=L.toLowerCase()),{acc:T,name:L,upper:L.toUpperCase()}}var v=/([_^=]*)([A-Ga-g])([,']*)/,b=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/;function S(C,j,G,A){var B=j==="none"?0:p.indexOf(j),H=C.match(v),U=H[2].toUpperCase(),E=p.indexOf(U)-B;E<0&&(E+=7);var O=u.indexOf(H[3]);U===H[2]&&O--;var V=A[U]||G[U]||"=";return{acc:H[1],name:U,pitch:E,oct:O,adj:P(H[1],G[U],A[U]),courtesy:H[1]===V}}function $(C,j,G){for(var A=C.substring(j,G),B,H=[],U=/("[^"]+")+/g;(B=U.exec(A))!==null;)H.push({start:U.lastIndex-B[0].length,end:U.lastIndex});for(var E=/(![^!]+!)+/g;(B=E.exec(A))!==null;)H.push({start:E.lastIndex-B[0].length,end:E.lastIndex});for(var O=[],V=/([_^=]*)([A-Ga-g])([,']*)/g;(B=V.exec(A))!==null;){for(var L=!1,T=0;T=H[T].start&&V.lastIndex<=H[T].end&&(L=!0);L||O.push({note:B[0],index:j+V.lastIndex-B[0].length})}return O}function M(C,j,G,A,B){var H=C.substring(j,G),U=/\{/,E=/\}/,O=/([^\{]*)/,V=/(\/*)/,L=H.match(new RegExp(O.source+U.source+V.source+b.source+V.source+b.source+V.source+b.source+V.source+b.source+V.source+b.source+V.source+b.source+V.source+b.source+V.source+b.source+E.source));if(L){for(var T=1+L[1].length,F=0;Fthis.max)&&(this.max=i.abcelem.maxpitch))},a.prototype.addBeam=function(i){this.beams.push(i)},a.prototype.setStemDirection=function(){if(this.average=t(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var i=6;this.stemsUp=this.average0&&this.startVoice.staff.voices[0]===t)},xg=a,xg}var Sg,Ow;function el(){if(Ow)return Sg;Ow=1;var a=Ms(),t={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84}};t["noteheads.slash.whole"]={d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},t["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},t["noteheads.harmonic.quarter"]={d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},t["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var i=function(r){for(var o=[],l=0,c=r.length;l0?d.top+3:d.bottom-1,_=c>0?d.top+3:d.bottom-3,v=_-2;r.type==="bass-8"&&(f=3,u=0),d.addRight(new i("8",g+u,t.getSymbolWidth("8")*p,f,{scalex:p,scaley:p,top:_,bottom:v}))}}return d};function s(r){switch(r){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}return Tg=n,Tg}var $g,Dw;function _E(){if(Dw)return $g;Dw=1;var a=jc(),t=el(),i=Jr(),n=function(s,r){if(s.el_type="keySignature",!s.accidentals||s.accidentals.length===0)return null;var o=new a(s,0,10,"staff-extra key-signature",r);o.isKeySig=!0;var l=0;return s.accidentals.forEach(function(c){var d,g=0;switch(c.acc){case"sharp":d="accidentals.sharp",g=-3;break;case"natural":d="accidentals.nat";break;case"flat":d="accidentals.flat",g=-1.2;break;case"quartersharp":d="accidentals.halfsharp",g=-2.5;break;case"quarterflat":d="accidentals.halfflat",g=-1.2;break;default:d="accidentals.flat"}o.addRight(new i(d,l,t.getSymbolWidth(d),c.verticalPos,{thickness:t.symbolHeightInPitches(d),top:c.verticalPos+t.symbolHeightInPitches(d)+g,bottom:c.verticalPos+g})),l+=t.getSymbolWidth(d)+2},this),o};return $g=n,$g}var qg,Lw;function vE(){if(Lw)return qg;Lw=1;var a=el(),t=Jr(),i=function(n,s,r,o){o||(o={});var l=o.dir!==void 0?o.dir:null,c=o.headx!==void 0?o.headx:0,d=o.extrax!==void 0?o.extrax:0,g=o.flag!==void 0?o.flag:null,h=o.dot!==void 0?o.dot:0,m=o.dotshiftx!==void 0?o.dotshiftx:0,p=o.scale!==void 0?o.scale:1,u=o.accidentalSlot!==void 0?o.accidentalSlot:[],f=o.shouldExtendStem!==void 0?o.shouldExtendStem:!1,_=o.printAccidentals!==void 0?o.printAccidentals:!0,v=o.chordPos,b=r.verticalPos,S,$=0,M=0,N=0;if(s===void 0)n.addFixed(new t("pitch is undefined",0,0,0,{type:"debug"}));else if(s==="")S=new t(null,0,0,b,{chordPos:v});else{var P=c;if(r.printer_shift){var C=r.printer_shift==="same"?1:0;P=l==="down"?-a.getSymbolWidth(s)*p+C:a.getSymbolWidth(s)*p-C}var j={scalex:p,scaley:p,thickness:a.symbolHeightInPitches(s)*p,name:r.name,chordPos:v};if(S=new t(s,P,a.getSymbolWidth(s)*p,b,j),S.stemDir=l,g){var G=b+(l==="down"?-7:7)*p;f&&(l==="down"&&G>6&&(G=6),l==="up"&&G<6&&(G=6));var A=l==="down"?c:c+S.w-.6;n.addRight(new t(g,A,a.getSymbolWidth(g)*p,G,{scalex:p,scaley:p,chordPos:v}))}for(M=S.w+m-2+5*h;h>0;h--){var B=1-Math.abs(b)%2;n.addRight(new t("dots.dot",S.w+m-2+5*h,a.getSymbolWidth("dots.dot"),b+B,{chordPos:v}))}}if(S&&(S.highestVert=r.highestVert),_&&r.accidental){var H;switch(r.accidental){case"quartersharp":H="accidentals.halfsharp";break;case"dblsharp":H="accidentals.dblsharp";break;case"sharp":H="accidentals.sharp";break;case"quarterflat":H="accidentals.halfflat";break;case"flat":H="accidentals.flat";break;case"dblflat":H="accidentals.dblflat";break;case"natural":H="accidentals.nat"}for(var U=!1,E=d,O=0;O=6){u[O][0]=b,E=u[O][1],U=!0;break}U===!1&&(E-=a.getSymbolWidth(H)*p+2,u.push([b,E]),$=a.getSymbolWidth(H)*p+2);var V=a.symbolHeightInPitches(H);n.addExtra(new t(H,E,a.getSymbolWidth(H),b,{scalex:p,scaley:p,top:b+V/2,bottom:b-V/2,chordPos:v})),N=a.getSymbolWidth(H)/2}return{notehead:S,accidentalshiftx:$,dotshiftx:M,extraLeft:N}};return qg=i,qg}var Cg,Vw;function bE(){if(Vw)return Cg;Vw=1;var a=jc(),t=el(),i=Jr(),n=function(s,r){s.el_type="timeSignature";var o=new a(s,0,10,"staff-extra time-signature",r);if(s.type==="specified")for(var l=0,c=0;c0)this.above=!1;else{var t;this.anchor1?t=this.anchor1.pitch:this.anchor2?t=this.anchor2.pitch:t=14,this.anchor1&&this.anchor1.stemDir==="down"&&this.anchor2&&this.anchor2.stemDir==="down"?this.above=!0:this.anchor1&&this.anchor1.stemDir==="up"&&this.anchor2&&this.anchor2.stemDir==="up"?this.above=!1:this.anchor1&&this.anchor2?this.above=t>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=t>=6}},a.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var t=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(t=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(t=!0);for(var i=0;it&&(t=this.internalNotes[i].highestVert);t>this.startY&&t>this.endY&&(this.startY=this.endY=t-1)}},a.prototype.getYBounds=function(){var t=10,i=1e3;this.isTie?(this.calcTieDirection(),this.calcX(t,i),this.calcTieY()):(this.calcSlurDirection(),this.calcX(t,i),this.calcSlurY());var n,s;return this.above?(s=Math.min(this.startY,this.endY),n=s+3):(n=Math.min(this.startY,this.endY),s=n-3),[n,s]},Mg=a,Mg}var zg,Jw;function xE(){if(Jw)return zg;Jw=1;var a=yE(),t=wE(),i=kE(),n=el(),s=Jr(),r=Yw(),o=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},l=function(u,f,_,v,b,S,$,M,N){for(var P,C=0;C9&&P++;var G=v/2;n.getSymbolAlign(j)!=="center"&&(G-=n.getSymbolWidth(j)/2),b.addFixedX(new s(j,G,n.getSymbolWidth(j),P))}if(f[C]==="slide"&&b.heads[0]){var A=b.heads[0].pitch;A-=2;var B=new s("",-S-15,0,A-1),H=new s("",-S-5,0,A+1);b.addFixedX(B),b.addFixedX(H),u.addOther(new r({anchor1:B,anchor2:H,fixedY:!0}))}}return P===void 0&&(P=_),{above:P,below:b.bottom}},c=function(u,f,_,v){for(var b=0;b$&&(U=$)),U}function C(H,U,E){var O=P(U),V=2,L=5;_.addFixedX(new s(H,f/2,0,O+V,{type:"decoration",klass:"ornament",thickness:3,anchor:E})),N(U,L)}function j(H,U){var E=f/2;n.getSymbolAlign(H)!=="center"&&(E-=n.getSymbolWidth(H)/2);var O=n.symbolHeightInPitches(H)+1,V=P(U);V=U==="above"?V+O/2:V-O/2,_.addFixedX(new s(H,E,n.getSymbolWidth(H),V,{klass:"ornament",thickness:n.symbolHeightInPitches(H),position:U})),N(U,O)}for(var G={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},A=!1,B=0;B",this.dynamicPositioning)),this.startDiminuendoX=void 0),this.startCrescendoX&&(u.addOther(new t(this.startCrescendoX,p(u.children),"<",this.dynamicPositioning)),this.startCrescendoX=void 0)},o.prototype.dynamicDecoration=function(u,f,_,v){for(var b,S,$,M=0;M",v)),S&&u.addOther(new t(S.start,S.stop,"<",v)),$&&u.addOther(new i($.start,$.stop))};function m(u){for(var f=0;f=0;M--){var P=S[M],B=0,C;c||(P=i(P,v,T));var j=m.calc(P,d,g),G=j.width,A=j.height/t.STEP;switch(o){case"left":f+=G+7,B=-f,C=u.averagepitch,p.addExtra(new a(P,B,G+4,C,{type:"text",height:A,dim:h,position:"left"}));break;case"right":_+=4,B=_,C=u.averagepitch,p.addRight(new a(P,B,G+4,C,{type:"text",height:A,dim:h,position:"right"}));break;case"below":p.addRight(new a(P,0,0,void 0,{type:"text",position:"below",height:A,dim:h,realWidth:G}));break;case"above":p.addRight(new a(P,0,0,void 0,{type:"text",position:"above",height:A,dim:h,realWidth:G}));break;default:if(l){var N=l.y+3*t.STEP;p.addRight(new a(P,B+l.x,0,u.minpitch+N/t.STEP,{position:"relative",type:"text",height:A,dim:h}))}else{var H="above";u.positioning&&u.positioning.chordPosition&&(H=u.positioning.chordPosition),H!=="hidden"&&p.addCentered(new a(P,b/2,G,void 0,{type:"chord",position:H,height:A,dim:h,realWidth:G}))}}}return{roomTaken:f,roomTakenRight:_}}return Ng=n,Ng}var Og,sk;function FE(){if(sk)return Og;sk=1;var a=Oc(),t=mE(),i=gE(),n=hE(),s=_E(),r=vE(),o=bE(),l=xE(),c=SE(),d=ll(),g=Yr(),h=Es(),m=$E(),p=qE(),u=Yw(),f=CE(),_=vw(),b=GE(),v=lw(),T=Kr(),S=function(E){var U=0;return E.duration&&(U=E.duration),U},M=!1,P={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},B=function(E,U,O){this.decoration=new l,this.getTextSize=E,this.tuneNumber=U,this.isBagpipes=O.bagpipes,this.flatBeams=O.flatbeams,this.graceSlurs=O.graceSlurs,this.percmap=O.percmap,this.initialClef=O.initialClef,this.jazzchords=!!O.jazzchords,this.accentAbove=!!O.accentAbove,this.germanAlphabet=!!O.germanAlphabet,this.reset()};B.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},B.prototype.setStemHeight=function(E){this.stemHeight=Math.round(E*10/h.STEP)/10},B.prototype.getCurrentVoiceId=function(E,U){return"s"+E+"v"+U},B.prototype.pushCrossLineElems=function(E,U){this.slursbyvoice[this.getCurrentVoiceId(E,U)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(E,U)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(E,U)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(E,U)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(E,U)]=this.voiceColor)},B.prototype.popCrossLineElems=function(E,U){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(E,U)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(E,U)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(E,U)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(E,U)],this.voiceScale===void 0&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(E,U)]},B.prototype.containsLyrics=function(E){for(var U=0;U0&&(D[0].invisible=!0);break;case"meter":D[0]=o(V,this.tuneNumber),this.startlimitelem=D[0],O.duplicate&&D.length>0&&(D[0].invisible=!0);break;case"clef":if(D[0]=n(V,this.tuneNumber),!D[0])return null;O.duplicate&&D.length>0&&(D[0].invisible=!0);break;case"key":var $=s(V,this.tuneNumber);$&&(D[0]=$,this.startlimitelem=D[0]),O.duplicate&&D.length>0&&(D[0].invisible=!0);break;case"stem":this.stemdir=V.direction==="auto"?void 0:V.direction;break;case"part":var F=new a(V,0,0,"part",this.tuneNumber),z=this.getTextSize.calc(V.title,"partsfont","part");F.addFixedX(new g(V.title,0,0,void 0,{type:"part",height:z.height/h.STEP})),D[0]=F;break;case"tempo":var L=new a(V,0,0,"tempo",this.tuneNumber);V.suppress||L.addFixedX(new p(V,this.tuneNumber,r)),D[0]=L;break;case"style":V.head==="normal"?delete this.style:this.style=V.head;break;case"hint":M=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=V.size;break;case"color":this.voiceColor=V.color,O.color=this.voiceColor;break;default:var Q=new a(V,0,0,"unsupported",this.tuneNumber);Q.addFixed(new g("element type "+V.el_type,0,0,void 0,{type:"debug"})),D[0]=Q}return D};function j(E){if(E.pitches){G(E);for(var U=0,O=0;OE.pitches[O+1].pitch){U=!1;var V=E.pitches[O];E.pitches[O]=E.pitches[O+1],E.pitches[O+1]=V}}while(!U)},A=function(E,U,O,V,D,$,F,z,L){for(var Q=O;Q>11;Q--)Q%2===0&&!V&&E.addFixed(new g(null,z,(D+4)*L,Q,{type:"ledger"}));for(Q=U;Q<1;Q++)Q%2===0&&!V&&E.addFixed(new g(null,z,(D+4)*L,Q,{type:"ledger"}));for(Q=0;Q<$.length;Q++){var Z=D;F==="down"&&(Z=-Z),E.addFixed(new g(null,Z+z,(D+4)*L,$[Q],{type:"ledger"}))}};B.prototype.addGraceNotes=function(E,U,O,V,D,$,F){var z=.6,L=3.5/5;D=Math.round(D*L);var Q=null,Z;E.gracenotes.length>1&&(Q=new t(D,"grace",$),M&&Q.setHint(),Q.mainNote=O);var ee,oe=[];for(ee=E.gracenotes.length-1;ee>=0;ee--)F+=10,oe[ee]=F,E.gracenotes[ee].accidental&&(F+=7);for(ee=0;ee=6?"down":"up";V&&(ce=V),D=U.style?U.style:D,(!D||D==="normal")&&(D="note");var Te;$?Te=P[D].nostem:Te=P[D][-F],Te||console.log("noteSymbol:",D,F,$);var he;for(he=ce==="down"?U.pitches.length-2:1;ce==="down"?he>=0:he11||Le.verticalPos<1)&&ge.push(Le.verticalPos-Le.verticalPos%2),ce==="down"?ee=d.getSymbolWidth(Te)+2:Q=d.getSymbolWidth(Te)+2)}var Ae=U.pitches.length;for(he=0;he1?he+1:null,Se=r(E,ne,U.pitches[he],{dir:ce,extrax:-ee,flag:Ge,dot:O,dotshiftx:Q,scale:this.voiceScale,accidentalSlot:R,shouldExtendStem:!V,printAccidentals:!L.isPercussion,chordPos:be});we=Math.max(d.getSymbolWidth(ne),we),E.extraw-=Se.extraLeft,Z=Se.notehead,Z&&(this.addSlursAndTies(E,U.pitches[he],Z,L,ue?ce:null,!1),U.gracenotes&&U.gracenotes.length>0&&(Z.bottom=Z.bottom-1),E.addHead(Z)),ee+=Se.accidentalshiftx,oe=Math.max(oe,Se.dotshiftx)}if(ue){var Ie=Math.round(70*this.voiceScale)/10,$e=ce==="down"?U.minpitch-Ie:U.minpitch+1/3;$e>6&&!V&&($e=6);var ze=ce==="down"?U.maxpitch-1/3:U.maxpitch+Ie;ze<6&&!V&&(ze=6);var Fe=ce==="down"||E.heads.length===0?0:E.heads[0].w,qe=ce==="down"?1:-1;Z&&Z.c==="noteheads.slash.quarter"&&(ce==="down"?ze-=1:$e+=1),Z&&Z.c==="noteheads.triangle.quarter"&&(ce==="down"?ze-=.7:$e-=1.2),E.addRight(new g(null,Fe,0,$e,{type:"stem",pitch2:ze,linewidth:qe,bottom:$e-1})),fe=Math.min($e,ze)}return{noteHead:Z,roomTaken:ee,roomTakenRight:oe,min:fe,additionalLedgers:ge,dir:ce,symbolWidth:we}},B.prototype.addLyric=function(E,U,O){var V="";U.lyric.forEach(function(F){var z=F.divider===" "?"":F.divider;V+=F.syllable+z+` -`});var D=this.getTextSize.calc(V,"vocalfont","lyric"),$=U.positioning?U.positioning.vocalPosition:"below";E.addCentered(new g(V,0,D.width,void 0,{type:"lyric",position:$,height:D.height/h.STEP,dim:this.getTextSize.attr("vocalfont","lyric"),voiceNumber:O}))},B.prototype.createNote=function(E,U,O,V){var D=null,$=0,F=0,z=0,L=[],Q,Z=S(E),ee=!1;Z===0&&(ee=!0,Z=.25,U=!0);for(var oe=Math.floor(Math.log(Z)/Math.log(2)),fe=0,le=Math.pow(2,oe),ge=le/2;le1,this.stemdir,O,oe,this.voiceScale);D=Te.noteHead,$=Te.roomTaken,F=Te.roomTakenRight}else{var he=this.addNoteToAbcElement(ce,E,fe,this.stemdir,this.style,ee,oe,U,V);he.min!==void 0&&(this.minY=Math.min(he.min,this.minY)),D=he.noteHead,$=he.roomTaken,F=he.roomTakenRight,L=he.additionalLedgers,Q=he.dir,z=he.symbolWidth}if(E.lyric!==void 0&&this.addLyric(ce,E,V.voicenumber),E.gracenotes!==void 0&&($+=this.addGraceNotes(E,V,ce,D,this.stemHeight*this.voiceScale,this.isBagpipes,$)),E.decoration){var je=U&&Q!=="up"?Math.min(-3,ce.bottom-6):ce.bottom;this.decoration.createDecoration(V,E.decoration,ce.top,D?D.w:0,ce,$,Q,je,E.positioning,this.hasVocals,this.accentAbove)}if(E.barNumber&&ce.addFixed(new g(E.barNumber,-10,0,0,{type:"barNumber"})),A(ce,E.minpitch,E.maxpitch,E.rest,z,L,Q,-2,1),E.chord!==void 0){var Le=b(this.getTextSize,ce,E,$,F,z,this.jazzchords,this.germanAlphabet);$=Le.roomTaken,F=Le.roomTakenRight}return E.startTriplet&&(this.triplet=new f(E.startTriplet,D,{flatBeams:this.flatBeams})),E.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(D),this.triplet&&!E.startTriplet&&!E.endTriplet&&!(E.rest&&E.rest.type==="spacer")&&this.triplet.middleNote(D),ce},B.prototype.addSlursAndTies=function(E,U,O,V,D,$){if(U.endTie&&this.ties.length>0){for(var F=!1,z=0;z10&&U.abcelem.type==="treble"?13.5:11;U.addFixed(new g(E,V,O.width,D+O.height/h.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},B.prototype.createBarLine=function(E,U,O){var V=new a(U,0,10,"bar",this.tuneNumber),D=null,$=0;U.barNumber&&this.addMeasureNumber(U.barNumber,V);var F=U.type==="bar_right_repeat"||U.type==="bar_dbl_repeat",z=U.type!=="bar_left_repeat"&&U.type!=="bar_thick_thin"&&U.type!=="bar_invisible",L=U.type==="bar_right_repeat"||U.type==="bar_dbl_repeat"||U.type==="bar_left_repeat"||U.type==="bar_thin_thick"||U.type==="bar_thick_thin",Q=U.type==="bar_left_repeat"||U.type==="bar_thick_thin"||U.type==="bar_thin_thin"||U.type==="bar_dbl_repeat",Z=U.type==="bar_left_repeat"||U.type==="bar_dbl_repeat";if(F||Z){for(var ee in this.slurs)this.slurs.hasOwnProperty(ee)&&this.slurs[ee].setEndX(V);this.startlimitelem=V}if(F&&(V.addRight(new g("dots.dot",$,1,7)),V.addRight(new g("dots.dot",$,1,5)),$+=6),z&&(D=new g(null,$,1,2,{type:"bar",pitch2:10,linewidth:.6}),V.addRight(D)),U.type==="bar_invisible"&&(D=new g(null,$,1,2,{type:"none",pitch2:10,linewidth:.6}),V.addRight(D)),U.decoration&&this.decoration.createDecoration(E,U.decoration,12,L?3:1,V,0,"down",2,U.positioning,this.hasVocals,this.accentAbove),L&&($+=4,D=new g(null,$,4,2,{type:"bar",pitch2:10,linewidth:4}),V.addRight(D),$+=5),this.partstartelem&&U.endEnding&&(this.partstartelem.anchor2=D,this.partstartelem=null),Q&&($+=3,D=new g(null,$,1,2,{type:"bar",pitch2:10,linewidth:.6}),V.addRight(D)),Z&&($+=3,V.addRight(new g("dots.dot",$,1,7)),V.addRight(new g("dots.dot",$,1,5))),U.startEnding&&O&&E.voicenumber===0){var oe=this.getTextSize.calc(U.startEnding,"repeatfont","").width;V.minspacing+=oe+10,this.partstartelem=new c(U.startEnding,D,null),E.addOther(this.partstartelem)}return V.extraw-=5,U.chord!==void 0&&b(this.getTextSize,V,U,0,0,0,!1,this.germanAlphabet),V},Og=B,Og}var Ig,rk;function ME(){if(rk)return Ig;rk=1;var a="http://www.w3.org/2000/svg";function t(o){this.svg=r(),this.currentGroup=[],o.appendChild(this.svg)}t.prototype.clear=function(){if(this.svg){var o=this.svg.parentNode;this.svg=r(),this.currentGroup=[],o&&(o.innerHTML="",o.appendChild(this.svg))}},t.prototype.setTitle=function(o){var l=document.createElement("title"),c=document.createTextNode(o);l.appendChild(c),this.svg.insertBefore(l,this.svg.firstChild)},t.prototype.setResponsiveWidth=function(o,l){if(this.svg.setAttribute("viewBox","0 0 "+o+" "+l),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var c=this.svg.parentNode.getAttribute("class");c?c.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",c+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var d=l/o*100;this.svg.parentNode.style["padding-bottom"]=d+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},t.prototype.setSize=function(o,l){this.svg.setAttribute("width",o),this.svg.setAttribute("height",l)},t.prototype.setAttribute=function(o,l){this.svg.setAttribute(o,l)},t.prototype.setScale=function(o){o!==1?(this.svg.style.transform="scale("+o+","+o+")",this.svg.style["-ms-transform"]="scale("+o+","+o+")",this.svg.style["-webkit-transform"]="scale("+o+","+o+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},t.prototype.insertStyles=function(o){var l=document.createElementNS(a,"style");l.textContent=o,this.svg.insertBefore(l,this.svg.firstChild)},t.prototype.setParentStyles=function(o){for(var l in o)o.hasOwnProperty(l)&&this.svg.parentNode&&(this.svg.parentNode.style[l]=o[l]);if(this.dummySvg){var c=document.querySelector("body");c.removeChild(this.dummySvg),this.dummySvg=null}};function i(o,l,c){var d=c-o;return"M "+o+" "+l+" l "+d+" 0 l 0 1 l "+-d+" 0 z "}function n(o,l,c){var d=c-l;return"M "+o+" "+l+" l 0 "+d+" l 1 0 l 0 "+-d+" z "}t.prototype.rect=function(o){var l=[],c=o.x,d=o.y,g=o.x+o.width,h=o.y+o.height;return l.push(i(c,d,g)),l.push(i(c,h,g)),l.push(n(g,d,h)),l.push(n(c,h,d)),this.path({path:l.join(" "),stroke:"none","data-name":o["data-name"]})},t.prototype.dottedLine=function(o){var l=document.createElementNS(a,"line");l.setAttribute("x1",o.x1),l.setAttribute("x2",o.x2),l.setAttribute("y1",o.y1),l.setAttribute("y2",o.y2),l.setAttribute("stroke",o.stroke),l.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(l,this.svg.firstChild)},t.prototype.rectBeneath=function(o){var l=document.createElementNS(a,"rect");l.setAttribute("x",o.x),l.setAttribute("width",o.width),l.setAttribute("y",o.y),l.setAttribute("height",o.height),o.stroke&&l.setAttribute("stroke",o.stroke),o["stroke-opacity"]&&l.setAttribute("stroke-opacity",o["stroke-opacity"]),o.fill&&l.setAttribute("fill",o.fill),o["fill-opacity"]&&l.setAttribute("fill-opacity",o["fill-opacity"]),this.svg.insertBefore(l,this.svg.firstChild)},t.prototype.text=function(o,l,c,d){var g=document.createElementNS(a,"text");g.setAttribute("stroke","none");for(var h in l)l.hasOwnProperty(h)&&g.setAttribute(h,l[h]);for(var m=l["data-name"]=="free-text",p=(""+o).split(` -`),u=0;u0?this.currentGroup[0].removeChild(c):this.svg.removeChild(c)),d&&(s[d]=h),h},t.prototype.openGroup=function(o){o=o||{};var l=document.createElementNS(a,"g");return o.klass&&l.setAttribute("class",o.klass),o.fill&&l.setAttribute("fill",o.fill),o.stroke&&l.setAttribute("stroke",o.stroke),o["data-name"]&&l.setAttribute("data-name",o["data-name"]),o.prepend?this.prepend(l):this.append(l),this.currentGroup.unshift(l),l},t.prototype.closeGroup=function(){var o=this.currentGroup.shift();return o&&o.children.length===0?(o.parentElement.removeChild(o),null):o},t.prototype.path=function(o){var l=document.createElementNS(a,"path");for(var c in o)o.hasOwnProperty(c)&&(c==="path"?l.setAttributeNS(null,"d",o.path):c==="klass"?l.setAttributeNS(null,"class",o[c]):o[c]!==void 0&&l.setAttributeNS(null,c,o[c]));return this.append(l),l},t.prototype.pathToBack=function(o){var l=document.createElementNS(a,"path");for(var c in o)o.hasOwnProperty(c)&&(c==="path"?l.setAttributeNS(null,"d",o.path):c==="klass"?l.setAttributeNS(null,"class",o[c]):l.setAttributeNS(null,c,o[c]));return this.prepend(l),l},t.prototype.lineToBack=function(o){for(var l=document.createElementNS(a,"line"),c=Object.keys(o),d=0;d0?this.currentGroup[0].appendChild(o):this.svg.appendChild(o)},t.prototype.prepend=function(o){this.currentGroup.length>0?this.currentGroup[0].appendChild(o):this.svg.insertBefore(o,this.svg.firstChild)},t.prototype.setAttributeOnElement=function(o,l){for(var c in l)l.hasOwnProperty(c)&&o.setAttributeNS(null,c,l[c])},t.prototype.moveElementToChild=function(o,l){o.appendChild(l)};function r(){var o=document.createElementNS(a,"svg");return o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.setAttribute("role","img"),o.setAttribute("fill","currentColor"),o.setAttribute("stroke","currentColor"),o}return Ig=t,Ig}var Dg,ok;function zE(){if(ok)return Dg;ok=1;var a=Es(),t=ME(),i=function(n){this.paper=new t(n),this.controller=null,this.space=3*a.SPACE,this.padding={},this.reset(),this.firefox=navigator.userAgent.indexOf("Firefox/")>=0};return i.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},i.prototype.newTune=function(n){this.abctune=n,this.setVerticalSpace(n.formatting),this.isPrint=n.media==="print",this.setPadding(n)},i.prototype.setLineThickness=function(n){this.lineThickness=n},i.prototype.setPaddingOverride=function(n){this.paddingOverride={top:n.paddingtop,bottom:n.paddingbottom,right:n.paddingright,left:n.paddingleft}},i.prototype.setPadding=function(n){function s(r,o,l,c,d){n.formatting[l]!==void 0?r.padding[o]=n.formatting[l]:r.paddingOverride[o]!==void 0?r.padding[o]=r.paddingOverride[o]:r.isPrint?r.padding[o]=c:r.padding[o]=d}s(this,"top","topmargin",38,15),s(this,"bottom","botmargin",38,15),s(this,"left","leftmargin",68,15),s(this,"right","rightmargin",68,15)},i.prototype.adjustNonScaledItems=function(n){this.padding.top/=n,this.padding.bottom/=n,this.padding.left/=n,this.padding.right/=n,this.abctune.formatting.headerfont.size/=n,this.abctune.formatting.footerfont.size/=n},i.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:26.67+10,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},i.prototype.setVerticalSpace=function(n){n.staffsep!==void 0&&(this.spacing.staffSeparation=n.staffsep*4/3),n.composerspace!==void 0&&(this.spacing.composer=n.composerspace*4/3),n.partsspace!==void 0&&(this.spacing.parts=n.partsspace*4/3),n.textspace!==void 0&&(this.spacing.text=n.textspace*4/3),n.musicspace!==void 0&&(this.spacing.music=n.musicspace*4/3),n.titlespace!==void 0&&(this.spacing.title=n.titlespace*4/3),n.sysstaffsep!==void 0&&(this.spacing.systemStaffSeparation=n.sysstaffsep*4/3),n.stafftopmargin!==void 0&&(this.spacing.staffTopMargin=n.stafftopmargin*4/3),n.subtitlespace!==void 0&&(this.spacing.subtitle=n.subtitlespace*4/3),n.topspace!==void 0&&(this.spacing.top=n.topspace*4/3),n.vocalspace!==void 0&&(this.spacing.vocal=n.vocalspace*4/3),n.wordsspace!==void 0&&(this.spacing.words=n.wordsspace*4/3)},i.prototype.calcY=function(n){return this.y-n*a.STEP},i.prototype.yToPitch=function(n){return n/a.STEP},i.prototype.moveY=function(n,s){s===void 0&&(s=1),this.y+=n*s},i.prototype.absolutemoveY=function(n){this.y=n},Dg=i,Dg}var Lg,lk;function EE(){if(lk)return Lg;lk=1;function a(t,i,n,s,r,o){var l=t.text;this.rows=[];var c;i&&this.rows.push({move:i});var d=n.calc("textfont","defined-text");if(l==="")this.rows.push({move:d.attr["font-size"]*2});else if(typeof l=="string"){let _=function(b){return b.replace(/^[ \t]*\n/gm,`X +`)}return jg=t,jg}var Ng,nk;function GE(){if(nk)return Ng;nk=1;var a=Jr(),t=Ms();const i=AE();var n=function(r,o,l,c,d,g,h,m){for(var p=0;p=0;M--){var N=$[M],P=0,C;c||(N=i(N,b,S));var j=m.calc(N,d,g),G=j.width,A=j.height/t.STEP;switch(o){case"left":f+=G+7,P=-f,C=u.averagepitch,p.addExtra(new a(N,P,G+4,C,{type:"text",height:A,dim:h,position:"left"}));break;case"right":_+=4,P=_,C=u.averagepitch,p.addRight(new a(N,P,G+4,C,{type:"text",height:A,dim:h,position:"right"}));break;case"below":p.addRight(new a(N,0,0,void 0,{type:"text",position:"below",height:A,dim:h,realWidth:G}));break;case"above":p.addRight(new a(N,0,0,void 0,{type:"text",position:"above",height:A,dim:h,realWidth:G}));break;default:if(l){var B=l.y+3*t.STEP;p.addRight(new a(N,P+l.x,0,u.minpitch+B/t.STEP,{position:"relative",type:"text",height:A,dim:h}))}else{var H="above";u.positioning&&u.positioning.chordPosition&&(H=u.positioning.chordPosition),H!=="hidden"&&p.addCentered(new a(N,v/2,G,void 0,{type:"chord",position:H,height:A,dim:h,realWidth:G}))}}}return{roomTaken:f,roomTakenRight:_}}return Ng=n,Ng}var Og,sk;function FE(){if(sk)return Og;sk=1;var a=jc(),t=mE(),i=gE(),n=hE(),s=_E(),r=vE(),o=bE(),l=xE(),c=SE(),d=el(),g=Jr(),h=Ms(),m=$E(),p=qE(),u=Yw(),f=CE(),_=vw(),v=GE(),b=lw(),S=Yr(),$=function(U){var E=0;return U.duration&&(E=U.duration),E},M=!1,N={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},P=function(U,E,O){this.decoration=new l,this.getTextSize=U,this.tuneNumber=E,this.isBagpipes=O.bagpipes,this.flatBeams=O.flatbeams,this.graceSlurs=O.graceSlurs,this.percmap=O.percmap,this.initialClef=O.initialClef,this.jazzchords=!!O.jazzchords,this.accentAbove=!!O.accentAbove,this.germanAlphabet=!!O.germanAlphabet,this.reset()};P.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},P.prototype.setStemHeight=function(U){this.stemHeight=Math.round(U*10/h.STEP)/10},P.prototype.getCurrentVoiceId=function(U,E){return"s"+U+"v"+E},P.prototype.pushCrossLineElems=function(U,E){this.slursbyvoice[this.getCurrentVoiceId(U,E)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(U,E)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(U,E)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(U,E)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(U,E)]=this.voiceColor)},P.prototype.popCrossLineElems=function(U,E){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(U,E)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(U,E)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(U,E)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(U,E)],this.voiceScale===void 0&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(U,E)]},P.prototype.containsLyrics=function(U){for(var E=0;E0&&(L[0].invisible=!0);break;case"meter":L[0]=o(V,this.tuneNumber),this.startlimitelem=L[0],O.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"clef":if(L[0]=n(V,this.tuneNumber),!L[0])return null;O.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"key":var T=s(V,this.tuneNumber);T&&(L[0]=T,this.startlimitelem=L[0]),O.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"stem":this.stemdir=V.direction==="auto"?void 0:V.direction;break;case"part":var F=new a(V,0,0,"part",this.tuneNumber),z=this.getTextSize.calc(V.title,"partsfont","part");F.addFixedX(new g(V.title,0,0,void 0,{type:"part",height:z.height/h.STEP})),L[0]=F;break;case"tempo":var D=new a(V,0,0,"tempo",this.tuneNumber);V.suppress||D.addFixedX(new p(V,this.tuneNumber,r)),L[0]=D;break;case"style":V.head==="normal"?delete this.style:this.style=V.head;break;case"hint":M=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=V.size;break;case"color":this.voiceColor=V.color,O.color=this.voiceColor;break;default:var K=new a(V,0,0,"unsupported",this.tuneNumber);K.addFixed(new g("element type "+V.el_type,0,0,void 0,{type:"debug"})),L[0]=K}return L};function j(U){if(U.pitches){G(U);for(var E=0,O=0;OU.pitches[O+1].pitch){E=!1;var V=U.pitches[O];U.pitches[O]=U.pitches[O+1],U.pitches[O+1]=V}}while(!E)},A=function(U,E,O,V,L,T,F,z,D){for(var K=O;K>11;K--)K%2===0&&!V&&U.addFixed(new g(null,z,(L+4)*D,K,{type:"ledger"}));for(K=E;K<1;K++)K%2===0&&!V&&U.addFixed(new g(null,z,(L+4)*D,K,{type:"ledger"}));for(K=0;K1&&(K=new t(L,"grace",T),M&&K.setHint(),K.mainNote=O);var ee,ce=[];for(ee=U.gracenotes.length-1;ee>=0;ee--)F+=10,ce[ee]=F,U.gracenotes[ee].accidental&&(F+=7);for(ee=0;ee=6?"down":"up";V&&(pe=V),L=E.style?E.style:L,(!L||L==="normal")&&(L="note");var Te;T?Te=N[L].nostem:Te=N[L][-F],Te||console.log("noteSymbol:",L,F,T);var he;for(he=pe==="down"?E.pitches.length-2:1;pe==="down"?he>=0:he11||Le.verticalPos<1)&&ge.push(Le.verticalPos-Le.verticalPos%2),pe==="down"?ee=d.getSymbolWidth(Te)+2:K=d.getSymbolWidth(Te)+2)}var Ae=E.pitches.length;for(he=0;he1?he+1:null,xe=r(U,ne,E.pitches[he],{dir:pe,extrax:-ee,flag:Ge,dot:O,dotshiftx:K,scale:this.voiceScale,accidentalSlot:R,shouldExtendStem:!V,printAccidentals:!D.isPercussion,chordPos:be});we=Math.max(d.getSymbolWidth(ne),we),U.extraw-=xe.extraLeft,X=xe.notehead,X&&(this.addSlursAndTies(U,E.pitches[he],X,D,de?pe:null,!1),E.gracenotes&&E.gracenotes.length>0&&(X.bottom=X.bottom-1),U.addHead(X)),ee+=xe.accidentalshiftx,ce=Math.max(ce,xe.dotshiftx)}if(de){var Ie=Math.round(70*this.voiceScale)/10,$e=pe==="down"?E.minpitch-Ie:E.minpitch+1/3;$e>6&&!V&&($e=6);var ze=pe==="down"?E.maxpitch-1/3:E.maxpitch+Ie;ze<6&&!V&&(ze=6);var Fe=pe==="down"||U.heads.length===0?0:U.heads[0].w,qe=pe==="down"?1:-1;X&&X.c==="noteheads.slash.quarter"&&(pe==="down"?ze-=1:$e+=1),X&&X.c==="noteheads.triangle.quarter"&&(pe==="down"?ze-=.7:$e-=1.2),U.addRight(new g(null,Fe,0,$e,{type:"stem",pitch2:ze,linewidth:qe,bottom:$e-1})),fe=Math.min($e,ze)}return{noteHead:X,roomTaken:ee,roomTakenRight:ce,min:fe,additionalLedgers:ge,dir:pe,symbolWidth:we}},P.prototype.addLyric=function(U,E,O){var V="";E.lyric.forEach(function(F){var z=F.divider===" "?"":F.divider;V+=F.syllable+z+` +`});var L=this.getTextSize.calc(V,"vocalfont","lyric"),T=E.positioning?E.positioning.vocalPosition:"below";U.addCentered(new g(V,0,L.width,void 0,{type:"lyric",position:T,height:L.height/h.STEP,dim:this.getTextSize.attr("vocalfont","lyric"),voiceNumber:O}))},P.prototype.createNote=function(U,E,O,V){var L=null,T=0,F=0,z=0,D=[],K,X=$(U),ee=!1;X===0&&(ee=!0,X=.25,E=!0);for(var ce=Math.floor(Math.log(X)/Math.log(2)),fe=0,le=Math.pow(2,ce),ge=le/2;le1,this.stemdir,O,ce,this.voiceScale);L=Te.noteHead,T=Te.roomTaken,F=Te.roomTakenRight}else{var he=this.addNoteToAbcElement(pe,U,fe,this.stemdir,this.style,ee,ce,E,V);he.min!==void 0&&(this.minY=Math.min(he.min,this.minY)),L=he.noteHead,T=he.roomTaken,F=he.roomTakenRight,D=he.additionalLedgers,K=he.dir,z=he.symbolWidth}if(U.lyric!==void 0&&this.addLyric(pe,U,V.voicenumber),U.gracenotes!==void 0&&(T+=this.addGraceNotes(U,V,pe,L,this.stemHeight*this.voiceScale,this.isBagpipes,T)),U.decoration){var Pe=E&&K!=="up"?Math.min(-3,pe.bottom-6):pe.bottom;this.decoration.createDecoration(V,U.decoration,pe.top,L?L.w:0,pe,T,K,Pe,U.positioning,this.hasVocals,this.accentAbove)}if(U.barNumber&&pe.addFixed(new g(U.barNumber,-10,0,0,{type:"barNumber"})),A(pe,U.minpitch,U.maxpitch,U.rest,z,D,K,-2,1),U.chord!==void 0){var Le=v(this.getTextSize,pe,U,T,F,z,this.jazzchords,this.germanAlphabet);T=Le.roomTaken,F=Le.roomTakenRight}return U.startTriplet&&(this.triplet=new f(U.startTriplet,L,{flatBeams:this.flatBeams})),U.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(L),this.triplet&&!U.startTriplet&&!U.endTriplet&&!(U.rest&&U.rest.type==="spacer")&&this.triplet.middleNote(L),pe},P.prototype.addSlursAndTies=function(U,E,O,V,L,T){if(E.endTie&&this.ties.length>0){for(var F=!1,z=0;z10&&E.abcelem.type==="treble"?13.5:11;E.addFixed(new g(U,V,O.width,L+O.height/h.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},P.prototype.createBarLine=function(U,E,O){var V=new a(E,0,10,"bar",this.tuneNumber),L=null,T=0;E.barNumber&&this.addMeasureNumber(E.barNumber,V);var F=E.type==="bar_right_repeat"||E.type==="bar_dbl_repeat",z=E.type!=="bar_left_repeat"&&E.type!=="bar_thick_thin"&&E.type!=="bar_invisible",D=E.type==="bar_right_repeat"||E.type==="bar_dbl_repeat"||E.type==="bar_left_repeat"||E.type==="bar_thin_thick"||E.type==="bar_thick_thin",K=E.type==="bar_left_repeat"||E.type==="bar_thick_thin"||E.type==="bar_thin_thin"||E.type==="bar_dbl_repeat",X=E.type==="bar_left_repeat"||E.type==="bar_dbl_repeat";if(F||X){for(var ee in this.slurs)this.slurs.hasOwnProperty(ee)&&this.slurs[ee].setEndX(V);this.startlimitelem=V}if(F&&(V.addRight(new g("dots.dot",T,1,7)),V.addRight(new g("dots.dot",T,1,5)),T+=6),z&&(L=new g(null,T,1,2,{type:"bar",pitch2:10,linewidth:.6}),V.addRight(L)),E.type==="bar_invisible"&&(L=new g(null,T,1,2,{type:"none",pitch2:10,linewidth:.6}),V.addRight(L)),E.decoration&&this.decoration.createDecoration(U,E.decoration,12,D?3:1,V,0,"down",2,E.positioning,this.hasVocals,this.accentAbove),D&&(T+=4,L=new g(null,T,4,2,{type:"bar",pitch2:10,linewidth:4}),V.addRight(L),T+=5),this.partstartelem&&E.endEnding&&(this.partstartelem.anchor2=L,this.partstartelem=null),K&&(T+=3,L=new g(null,T,1,2,{type:"bar",pitch2:10,linewidth:.6}),V.addRight(L)),X&&(T+=3,V.addRight(new g("dots.dot",T,1,7)),V.addRight(new g("dots.dot",T,1,5))),E.startEnding&&O&&U.voicenumber===0){var ce=this.getTextSize.calc(E.startEnding,"repeatfont","").width;V.minspacing+=ce+10,this.partstartelem=new c(E.startEnding,L,null),U.addOther(this.partstartelem)}return V.extraw-=5,E.chord!==void 0&&v(this.getTextSize,V,E,0,0,0,!1,this.germanAlphabet),V},Og=P,Og}var Ig,rk;function ME(){if(rk)return Ig;rk=1;var a="http://www.w3.org/2000/svg";function t(o){this.svg=r(),this.currentGroup=[],o.appendChild(this.svg)}t.prototype.clear=function(){if(this.svg){var o=this.svg.parentNode;this.svg=r(),this.currentGroup=[],o&&(o.innerHTML="",o.appendChild(this.svg))}},t.prototype.setTitle=function(o){var l=document.createElement("title"),c=document.createTextNode(o);l.appendChild(c),this.svg.insertBefore(l,this.svg.firstChild)},t.prototype.setResponsiveWidth=function(o,l){if(this.svg.setAttribute("viewBox","0 0 "+o+" "+l),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var c=this.svg.parentNode.getAttribute("class");c?c.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",c+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var d=l/o*100;this.svg.parentNode.style["padding-bottom"]=d+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},t.prototype.setSize=function(o,l){this.svg.setAttribute("width",o),this.svg.setAttribute("height",l)},t.prototype.setAttribute=function(o,l){this.svg.setAttribute(o,l)},t.prototype.setScale=function(o){o!==1?(this.svg.style.transform="scale("+o+","+o+")",this.svg.style["-ms-transform"]="scale("+o+","+o+")",this.svg.style["-webkit-transform"]="scale("+o+","+o+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},t.prototype.insertStyles=function(o){var l=document.createElementNS(a,"style");l.textContent=o,this.svg.insertBefore(l,this.svg.firstChild)},t.prototype.setParentStyles=function(o){for(var l in o)o.hasOwnProperty(l)&&this.svg.parentNode&&(this.svg.parentNode.style[l]=o[l]);if(this.dummySvg){var c=document.querySelector("body");c.removeChild(this.dummySvg),this.dummySvg=null}};function i(o,l,c){var d=c-o;return"M "+o+" "+l+" l "+d+" 0 l 0 1 l "+-d+" 0 z "}function n(o,l,c){var d=c-l;return"M "+o+" "+l+" l 0 "+d+" l 1 0 l 0 "+-d+" z "}t.prototype.rect=function(o){var l=[],c=o.x,d=o.y,g=o.x+o.width,h=o.y+o.height;return l.push(i(c,d,g)),l.push(i(c,h,g)),l.push(n(g,d,h)),l.push(n(c,h,d)),this.path({path:l.join(" "),stroke:"none","data-name":o["data-name"]})},t.prototype.dottedLine=function(o){var l=document.createElementNS(a,"line");l.setAttribute("x1",o.x1),l.setAttribute("x2",o.x2),l.setAttribute("y1",o.y1),l.setAttribute("y2",o.y2),l.setAttribute("stroke",o.stroke),l.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(l,this.svg.firstChild)},t.prototype.rectBeneath=function(o){var l=document.createElementNS(a,"rect");l.setAttribute("x",o.x),l.setAttribute("width",o.width),l.setAttribute("y",o.y),l.setAttribute("height",o.height),o.stroke&&l.setAttribute("stroke",o.stroke),o["stroke-opacity"]&&l.setAttribute("stroke-opacity",o["stroke-opacity"]),o.fill&&l.setAttribute("fill",o.fill),o["fill-opacity"]&&l.setAttribute("fill-opacity",o["fill-opacity"]),this.svg.insertBefore(l,this.svg.firstChild)},t.prototype.text=function(o,l,c,d){var g=document.createElementNS(a,"text");g.setAttribute("stroke","none");for(var h in l)l.hasOwnProperty(h)&&g.setAttribute(h,l[h]);for(var m=l["data-name"]=="free-text",p=(""+o).split(` +`),u=0;u0?this.currentGroup[0].removeChild(c):this.svg.removeChild(c)),d&&(s[d]=h),h},t.prototype.openGroup=function(o){o=o||{};var l=document.createElementNS(a,"g");return o.klass&&l.setAttribute("class",o.klass),o.fill&&l.setAttribute("fill",o.fill),o.stroke&&l.setAttribute("stroke",o.stroke),o["data-name"]&&l.setAttribute("data-name",o["data-name"]),o.prepend?this.prepend(l):this.append(l),this.currentGroup.unshift(l),l},t.prototype.closeGroup=function(){var o=this.currentGroup.shift();return o&&o.children.length===0?(o.parentElement.removeChild(o),null):o},t.prototype.path=function(o){var l=document.createElementNS(a,"path");for(var c in o)o.hasOwnProperty(c)&&(c==="path"?l.setAttributeNS(null,"d",o.path):c==="klass"?l.setAttributeNS(null,"class",o[c]):o[c]!==void 0&&l.setAttributeNS(null,c,o[c]));return this.append(l),l},t.prototype.pathToBack=function(o){var l=document.createElementNS(a,"path");for(var c in o)o.hasOwnProperty(c)&&(c==="path"?l.setAttributeNS(null,"d",o.path):c==="klass"?l.setAttributeNS(null,"class",o[c]):l.setAttributeNS(null,c,o[c]));return this.prepend(l),l},t.prototype.lineToBack=function(o){for(var l=document.createElementNS(a,"line"),c=Object.keys(o),d=0;d0?this.currentGroup[0].appendChild(o):this.svg.appendChild(o)},t.prototype.prepend=function(o){this.currentGroup.length>0?this.currentGroup[0].appendChild(o):this.svg.insertBefore(o,this.svg.firstChild)},t.prototype.setAttributeOnElement=function(o,l){for(var c in l)l.hasOwnProperty(c)&&o.setAttributeNS(null,c,l[c])},t.prototype.moveElementToChild=function(o,l){o.appendChild(l)};function r(){var o=document.createElementNS(a,"svg");return o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.setAttribute("role","img"),o.setAttribute("fill","currentColor"),o.setAttribute("stroke","currentColor"),o}return Ig=t,Ig}var Dg,ok;function zE(){if(ok)return Dg;ok=1;var a=Ms(),t=ME(),i=function(n){this.paper=new t(n),this.controller=null,this.space=3*a.SPACE,this.padding={},this.reset(),this.firefox=navigator.userAgent.indexOf("Firefox/")>=0};return i.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},i.prototype.newTune=function(n){this.abctune=n,this.setVerticalSpace(n.formatting),this.isPrint=n.media==="print",this.setPadding(n)},i.prototype.setLineThickness=function(n){this.lineThickness=n},i.prototype.setPaddingOverride=function(n){this.paddingOverride={top:n.paddingtop,bottom:n.paddingbottom,right:n.paddingright,left:n.paddingleft}},i.prototype.setPadding=function(n){function s(r,o,l,c,d){n.formatting[l]!==void 0?r.padding[o]=n.formatting[l]:r.paddingOverride[o]!==void 0?r.padding[o]=r.paddingOverride[o]:r.isPrint?r.padding[o]=c:r.padding[o]=d}s(this,"top","topmargin",38,15),s(this,"bottom","botmargin",38,15),s(this,"left","leftmargin",68,15),s(this,"right","rightmargin",68,15)},i.prototype.adjustNonScaledItems=function(n){this.padding.top/=n,this.padding.bottom/=n,this.padding.left/=n,this.padding.right/=n,this.abctune.formatting.headerfont.size/=n,this.abctune.formatting.footerfont.size/=n},i.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:26.67+10,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},i.prototype.setVerticalSpace=function(n){n.staffsep!==void 0&&(this.spacing.staffSeparation=n.staffsep*4/3),n.composerspace!==void 0&&(this.spacing.composer=n.composerspace*4/3),n.partsspace!==void 0&&(this.spacing.parts=n.partsspace*4/3),n.textspace!==void 0&&(this.spacing.text=n.textspace*4/3),n.musicspace!==void 0&&(this.spacing.music=n.musicspace*4/3),n.titlespace!==void 0&&(this.spacing.title=n.titlespace*4/3),n.sysstaffsep!==void 0&&(this.spacing.systemStaffSeparation=n.sysstaffsep*4/3),n.stafftopmargin!==void 0&&(this.spacing.staffTopMargin=n.stafftopmargin*4/3),n.subtitlespace!==void 0&&(this.spacing.subtitle=n.subtitlespace*4/3),n.topspace!==void 0&&(this.spacing.top=n.topspace*4/3),n.vocalspace!==void 0&&(this.spacing.vocal=n.vocalspace*4/3),n.wordsspace!==void 0&&(this.spacing.words=n.wordsspace*4/3)},i.prototype.calcY=function(n){return this.y-n*a.STEP},i.prototype.yToPitch=function(n){return n/a.STEP},i.prototype.moveY=function(n,s){s===void 0&&(s=1),this.y+=n*s},i.prototype.absolutemoveY=function(n){this.y=n},Dg=i,Dg}var Lg,lk;function EE(){if(lk)return Lg;lk=1;function a(t,i,n,s,r,o){var l=t.text;this.rows=[];var c;i&&this.rows.push({move:i});var d=n.calc("textfont","defined-text");if(l==="")this.rows.push({move:d.attr["font-size"]*2});else if(typeof l=="string"){let _=function(v){return v.replace(/^[ \t]*\n/gm,`X `)};this.rows.push({move:d.attr["font-size"]/2}),this.rows.push({left:s,text:l,font:"textfont",klass:"defined-text",anchor:"start",startChar:t.startChar,endChar:t.endChar,absElemType:"freeText",name:"free-text"});var g=_(l);c=o.calc(g,"textfont","defined-text"),this.rows.push({move:c.height})}else if(l){for(var h=0,m=s,p="textfont",u=0;u0){var v=!!(n.composer||n.origin),_=h?"abcjs-rhythm":"";a(this.rows,{marginLeft:d,text:n.rhythm,font:"infofont",klass:_,absElemType:"rhythm",noMove:v,info:s.rhythm,name:"rhythm"},m)}n.composer&&n.composer,n.origin&&n.origin;var T=n.composer?n.composer:"";if(n.origin&&(typeof T=="string"&&typeof n.origin=="string"?T+=" ("+n.origin+")":typeof T=="string"&&typeof n.origin!="string"?(T=[{text:T}],T.push({text:" ("}),T=T.concat(n.origin),T.push({text:")"})):(T.push({text:" ("}),T=T.concat(n.origin),T.push({text:")"}))),T){var _=h?"abcjs-composer":"";t(this.rows,T,"composerfont",_,"composer",d+l,{anchor:"end",absElemType:"composer",info:s.composer,ingroup:!0},m)}}if(n.author&&n.author.length>0){var _=h?"abcjs-author":"";t(this.rows,n.author,"composerfont",_,"author",d+l,{anchor:"end",absElemType:"author",info:s.author},m)}if(n.partOrder&&n.partOrder.length>0){var _=h?"abcjs-part-order":"";t(this.rows,n.partOrder,"partsfont",_,"part-order",d,{absElemType:"partOrder",info:s.partOrder,anchor:"start"},m)}}return Yg=i,Yg}var Jg,gk;function PE(){if(gk)return Jg;gk=1;const a=Qg(),t=pk();function i(r,o,l,c,d,g,h){this.rows=[],r.unalignedWords&&r.unalignedWords.length>0&&this.unalignedWords(r.unalignedWords,c,d,g,h),this.extraText(r,c,d,g,h),r.footer&&l&&this.footer(r.footer,o,c,h)}i.prototype.unalignedWords=function(r,o,l,c,d){var g=c?"abcjs-unaligned-words":"",h="wordsfont",m=d.calc("i",h,g);this.rows.push({move:l.words}),s(this.rows,"",r,o,h,"unalignedWords","unalignedWords",g,"unalignedWords",l,c,d),this.rows.push({move:m.height})};function n(r,o,l,c,d,g,h){l&&(o&&(typeof l=="string"?l=o+l:l=[{text:o}].concat(l)),d=g?"abcjs-extra-text "+d:"",t(r,l,"historyfont",d,"description",c,{absElemType:"extraText",anchor:"start"},h))}function s(r,o,l,c,d,g,h,m,p,u,f,_){if(l){m=f?"abcjs-extra-text "+m:"";var b=_.calc("A",d,m);if(typeof l=="string")o&&(l=o+` -`+l),a(r,{marginLeft:c,text:l,font:d,absElemType:"extraText",name:p,"dominant-baseline":"middle",klass:m},_);else{r.push({startGroup:h,klass:m,name:p}),r.push({move:u.info}),o&&(a(r,{marginLeft:c,text:o,font:d,absElemType:"extraText",name:p,"dominant-baseline":"middle"},_),r.push({move:b.height*3/4}));for(var v=0;v0;H++){var E=C.selectables[H];if(C.getDim(E),E.dim.leftj&&E.dim.topG)N=H,A=0;else if(E.dim.topG){var U=Math.min(Math.abs(E.dim.left-j),Math.abs(E.dim.right-j));Uj){var O=Math.min(Math.abs(E.dim.top-G),Math.abs(E.dim.bottom-G));OMath.abs(j-E.dim.right)?Math.abs(j-E.dim.right):Math.abs(j-E.dim.left),D=Math.abs(G-E.dim.top)>Math.abs(G-E.dim.bottom)?Math.abs(G-E.dim.bottom):Math.abs(G-E.dim.top),$=Math.sqrt(V*V+D*D);$=0&&A<=12?N:-1}function d(C,j,G){if(C.x<=j.offsetX&&C.x+C.width>=j.offsetX&&C.y<=j.offsetY&&C.y+C.height>=j.offsetY)return[j.offsetX,j.offsetY];var A=Math.abs(j.layerY/G-j.offsetY);return A<3?[j.offsetX,j.offsetY]:[j.layerX,j.layerY]}function g(C){if(!C)return null;if(C.tagName==="svg")return C;if(!C.getAttribute)return null;for(var j=C.getAttribute("selectable");!j;)C.parentElement?(C=C.parentElement,C.tagName==="svg"?j=!0:j=C.getAttribute("selectable")):j=!0;return C}function h(C,j){var G,A,N,H=l(C.selectables,g(j.target));return H>=0?(N=d(C.selectables[H].svgEl.getBBox(),j,C.scale),G=N[0],A=N[1]):(N=n(j),G=N[0],A=N[1],H=c(C,G,A)),{x:G,y:A,clickedOn:H}}function m(C){if(!(!C||!C.target||!C.touches||C.touches.length<1)){var j=C.target.getBoundingClientRect(),G=C.touches[0].pageX-j.left,A=C.touches[0].pageY-j.top;C.touches[0].offsetX=G,C.touches[0].offsetY=A,C.touches[0].layerX=C.touches[0].pageX,C.touches[0].layerY=C.touches[0].pageY}}function p(C){var j=C;C.type==="touchstart"&&(m(C),C.touches.length>0&&(j=C.touches[0]));var G=h(this,j);G.clickedOn>=0&&(C.type==="touchstart"||C.button===0)&&this.selectables[G.clickedOn]&&(this.dragTarget=this.selectables[G.clickedOn],this.dragIndex=G.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:G.x,y:G.y},this.dragging&&this.dragTarget.isDraggable&&(P(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function u(C){var j=C;if(C.type==="touchmove"&&(m(C),C.touches.length>0&&(j=C.touches[0])),this.lastTouchMove=C,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var G=h(this,j),A=Math.round((G.y-this.dragMouseStart.y)/a.STEP);A!==this.dragYStep&&(this.dragYStep=A,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+A*a.STEP+")"))}}function f(C){var j=C;C.type==="touchend"&&this.lastTouchMove&&(m(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(j=this.lastTouchMove.touches[0])),this.dragTarget&&(v.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),b.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,j),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),B(this.renderer.svg,"abcjs-dragging-in-progress"))}function _(C){C>=0&&CU&&CT&&(v=T),v<-T&&(v=-T),v}function l(u,f){var _=u?t.STEP:-t.STEP;return f&&(_=_*.4),_}function c(u,f,_){var b=f.heads[u?0:f.heads.length-1],v=_.heads[u?0:_.heads.length-1],T=b.x;u&&(T+=b.w-.6);var S=v.x;return S+=u?v.w:.6,[T,S]}function d(u,f,_,b,v,T,S,M,P,B){var C=_-2,j=_-2,G=Math.round(b?Math.max(u+C,P+j):Math.min(u-C,M-j)),A=o(v,T,f,S),N=G+Math.floor(A/2),H=G+Math.floor(-A/2);return B||(b&&G<6||!b&&G>6)&&(N=6,H=6),[N,H]}function g(u,f,_,b,v){for(var T=0;T=0;_--)if(!u[_].abcelem.rest)return _;return-1}function p(u,f,_,b,v){for(var T=[],S=[],M=0;M0&&P.abcelem.beambr&&P.abcelem.beambr<=H+1){S[H].split||(S[H].split=[S[H].x]);var E=c(f,u[M-1],P);S[H].split[S[H].split.length-1]>=E[0]&&(E[0]+=P.w),S[H].split.push(E[0]),S[H].split.push(E[1])}}for(var U=S.length-1;U>=0;U--){var O=h(u,M),V=O===-1||O-U-4;if(V){var D=C,$=j+G*(U+1);if(S[U].single){var F=m(u,M),z=F===-1,L=O===-1;if(z)D=C+5;else if(L)D=C-5;else{var Q=u[F].abcelem.duration,Z=u[O].abcelem.duration;Q===Z?D=M%2===0?C+5:C-5:D=Qo.startNote||g>o.endNote)&&(o.startNote=g+3,o.endNote=g+3)}else{for(var m=0,h=0;h=c}function s(o,l,c){if(c.beams.length===0)return 0;c=c.beams[0];var d=o+(l-o)/2;return a(c.startX,c.startY,c.endX,c.endY,d)}function r(o,l){return o+(l-o)/2}return ih=t,ih}var nh,kk;function IE(){if(kk)return nh;kk=1;var a=NE(),t=th(),i=OE(),n=function(g){for(var h=0;h0&&h.putChordInLane(p),g[p]=m.right;return}}g.push(m.right),h.putChordInLane(g.length-1)}}function o(g){var h=[0],m=[0],p,u,f;for(p=0;p=0;u--)f=g[p].children[u],f.chordHeightBelow&&r(m,f)}return(h.length>1||m.length>1)&&c(g,h.length,m.length),{above:h.length,below:m.length}}function l(g){for(var h=0,m=0;m=0&&(f.originalTop=f.top,f.originalBottom=f.bottom),n(f,_,"lyricHeightAbove"),n(f,_,"chordHeightAbove",f.specialY.chordLines.above),f.specialY.endingHeightAbove&&(f.specialY.chordHeightAbove?f.top+=2:f.top+=f.specialY.endingHeightAbove+i,_.endingHeightAbove=f.top),f.specialY.dynamicHeightAbove&&f.specialY.volumeHeightAbove?(f.top+=Math.max(f.specialY.dynamicHeightAbove,f.specialY.volumeHeightAbove)+i,_.dynamicHeightAbove=f.top,_.volumeHeightAbove=f.top):(n(f,_,"dynamicHeightAbove"),n(f,_,"volumeHeightAbove")),n(f,_,"partHeightAbove"),n(f,_,"tempoHeightAbove"),f.specialY.lyricHeightBelow&&(f.specialY.lyricHeightBelow+=h.spacing.vocal/a.STEP,_.lyricHeightBelow=f.bottom,f.bottom-=f.specialY.lyricHeightBelow+i),f.specialY.chordHeightBelow){_.chordHeightBelow=f.bottom;var b=f.specialY.chordHeightBelow;f.specialY.chordLines.below&&(b*=f.specialY.chordLines.below),f.bottom-=b+i}f.specialY.volumeHeightBelow&&f.specialY.dynamicHeightBelow?(_.volumeHeightBelow=f.bottom,_.dynamicHeightBelow=f.bottom,f.bottom-=Math.max(f.specialY.volumeHeightBelow,f.specialY.dynamicHeightBelow)+i):f.specialY.volumeHeightBelow?(_.volumeHeightBelow=f.bottom,f.bottom-=f.specialY.volumeHeightBelow+i):f.specialY.dynamicHeightBelow&&(_.dynamicHeightBelow=f.bottom,f.bottom-=f.specialY.dynamicHeightBelow+i),h.showDebug&&h.showDebug.indexOf("box")>=0&&(f.positionY=_);for(var v=0;v0&&(f.top+=C)}f.top+=h.spacing.staffTopMargin/a.STEP,p=2-f.bottom}},i=1;function n(h,m,p,u){if(h.specialY[p]){var f=h.specialY[p];u&&(f*=u),h.top+=f+i,m[p]=h.top}}function s(h,m,p){var u,f,_=0;for(u=0;u=n.children.length},a.getNextX=function(n){return Math.max(n.minx,n.nextx)},a.getSpacingUnits=function(n){return Math.sqrt(n.spacingduration*8)},a.layoutOneItem=function(n,s,r,o,l){var c=r.children[r.i];if(!c)return 0;var d=n-r.minx,g=r.durationindex+c.duration>0?o:0;if(c.abcelem.el_type==="note"&&!c.abcelem.rest&&r.voicenumber!==0&&l){var h=l.children[l.i],m=h&&(c.abcelem.maxpitch<=h.abcelem.maxpitch+1&&c.abcelem.maxpitch>=h.abcelem.minpitch-1||c.abcelem.minpitch<=h.abcelem.maxpitch+1&&c.abcelem.minpitch>=h.abcelem.minpitch-1);if(m&&c.abcelem.minpitch===h.abcelem.minpitch&&c.abcelem.maxpitch===h.abcelem.maxpitch&&h.heads&&h.heads.length>0&&c.heads&&c.heads.length>0&&h.heads[0].c===c.heads[0].c&&(m=!1),m){var p=h.heads&&h.heads.length>0?h.heads[0].realWidth:h.fixed.w;c.adjustedWidth||(c.adjustedWidth=p+c.w),c.w=c.adjustedWidth;for(var u=0;u0){var g=d.children.length-1,h=d.children[g];if(h.abcelem.el_type==="bar"){var m=h.children[0].x;m>l?l=m:h.children[0].x=l}}}}var i=function(o,l,c,d,g){var h=1e-7,m=0,p=1e3,u=g;d.startx=u;var f,_=0;for(c&&console.log("init layout",o),f=0;fh?T.push(d.voices[f]):v.push(d.voices[f])}b=0;var M=0;for(f=0;fu&&(u=a.getNextX(v[f]),b=a.getSpacingUnits(v[f]),M=v[f].spacingduration);m+=b,p=Math.min(p,b),c&&console.log("currentduration: ",_,m,p);var P=void 0;for(f=0;f0){u=j;for(var A=0;Au&&(u=a.getNextX(d.voices[f]),b=a.getSpacingUnits(d.voices[f]));return t(d.voices),m+=b,d.setWidth(u),{spacingUnits:m,minSpace:p}};function n(o){for(var l=0;l0?0:5e-7)}function r(o,l){return!o||!o.staff||!o.staff.voices||o.staff.voices.length===0||!l||!l.staff||!l.staff.voices||l.staff.voices.length===0?!1:o.staff.voices[0]===l.staff.voices[0]}return oh=i,oh}var lh,$k;function qk(){if($k)return lh;$k=1;function a(s,r,o,l,c){var d=s.padding.left,g=0,h,m;for(h=0;hMath.round(M)&&(M=P,b&&(T=-1))}for(T=0;T0?(b=(f-C)/v,b*T>50&&(b=50/T),b):null}function d(p){for(var u=0;u1){var S=v[0].abcelem.rest&&v[0].abcelem.rest.type==="rest",M=v[T].abcelem.rest&&v[T].abcelem.rest.type==="rest";if(S&&!v[T].abcelem.rest){var P=v[0].children.find(function(A){return A.name.includes("rest")}),B=h(v[T]);if(P){var C=P.bottom-B;C-=2,C<0&&v[0].children.length>0&&(v[0].bottom-=C,v[0].top-=C,v[0].children[0].bottom-=C,v[0].children[0].top-=C,v[0].children[0].pitch-=C)}}else if(M&&!v[0].abcelem.rest){var j=v[T].children.find(function(A){return A.name.includes("rest")});if(j){var G=j.top-m(v[0]);G+=2,G>0&&v[T].children.length>0&&(v[T].bottom-=G,v[T].top-=G,v[T].children[0].bottom-=G,v[T].children[0].top-=G,v[T].children[0].pitch-=G)}}}}}function h(p){if(p.children){for(var u=-90,f=0;f-90)return u}return p.top}function m(p){if(p.children){for(var u=90,f=0;f0&&i.push(t),t==="abcjs-tab-number")return i.join(" ");if(t==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&i.push("l"+this.lineNumber),this.measureNumber!==null&&i.push("m"+this.measureNumber),this.measureNumber!==null&&i.push("mm"+this.measureTotal()),this.voiceNumber!==null&&i.push("v"+this.voiceNumber),t&&(t.indexOf("note")>=0||t.indexOf("rest")>=0||t.indexOf("lyric")>=0)&&this.noteNumber!==null&&i.push("n"+this.noteNumber),i.length>0){i=i.join(" "),i=i.split(" ");for(var n=0;n0&&(i[n]="abcjs-"+i[n])}return i.join(" ")},fh=a,fh}var ph,Mk;function YE(){if(Mk)return ph;Mk=1;var a=function(i,n){this.formatting=i,this.classes=n};return a.prototype.updateFonts=function(t){t.gchordfont&&(this.formatting.gchordfont=t.gchordfont),t.tripletfont&&(this.formatting.tripletfont=t.tripletfont),t.annotationfont&&(this.formatting.annotationfont=t.annotationfont),t.vocalfont&&(this.formatting.vocalfont=t.vocalfont)},a.prototype.getFamily=function(t){return t[0]==='"'&&t[t.length-1]==='"'?t.substring(1,t.length-1):t},a.prototype.calc=function(t,i){var n;typeof t=="string"?(n=this.formatting[t],n?n={face:n.face,size:Math.round(n.size*4/3),decoration:n.decoration,style:n.style,weight:n.weight,box:n.box}:n={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):n={face:t.face,size:Math.round(t.size*4/3),decoration:t.decoration,style:t.style,weight:t.weight,box:t.box};var s=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;n.padding=n.size*s;var r={"font-size":n.size,"font-style":n.style,"font-family":this.getFamily(n.face),"font-weight":n.weight,"text-decoration":n.decoration,class:this.classes.generate(i)};return{font:n,attr:r}},ph=a,ph}var mh,zk;function JE(){if(zk)return mh;zk=1;var a=function(i,n){this.getFontAndAttr=i,this.svg=n};return a.prototype.updateFonts=function(t){this.getFontAndAttr.updateFonts(t)},a.prototype.attr=function(t,i){return this.getFontAndAttr.calc(t,i)},a.prototype.getFamily=function(t){return t[0]==='"'&&t[t.length-1]==='"'?t.substring(1,t.length-1):t},a.prototype.calc=function(t,i,n,s){var r;typeof i=="string"?r=this.attr(i,n):r={font:{face:i.face,size:i.size,decoration:i.decoration,style:i.style,weight:i.weight},attr:{"font-size":i.size,"font-style":i.style,"font-family":this.getFamily(i.face),"font-weight":i.weight,"text-decoration":i.decoration,class:this.getFontAndAttr.classes.generate(n)}};var o=this.svg.getTextSize(t,r.attr,s);return r.font.box?{height:o.height+r.font.padding*4,width:o.width+r.font.padding*4}:o},a.prototype.baselineToCenter=function(t,i,n,s,r){var o=this.calc(t,i,n).height,l=this.attr(i,n).font.size;return o*.5+(r-s-2)*l},mh=a,mh}var gh,Ek;function Wl(){if(Ek)return gh;Ek=1;var a=function(){for(var t=0,i,n=arguments[t++],s=[],r,o,l,c;n;){if(r=/^[^\x25]+/.exec(n))s.push(r[0]);else if(r=/^\x25{2}/.exec(n))s.push("%");else if(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n)){if((i=arguments[r[1]||t++])==null||i==null)throw"Too few arguments.";if(/[^s]/.test(r[7])&&typeof i!="number")throw"Expecting number but found "+typeof i;switch(r[7]){case"b":i=i.toString(2);break;case"c":i=String.fromCharCode(i);break;case"d":i=parseInt(i);break;case"e":i=r[6]?i.toExponential(r[6]):i.toExponential();break;case"f":i=r[6]?parseFloat(i).toFixed(r[6]):parseFloat(i);break;case"o":i=i.toString(8);break;case"s":i=(i=String(i))&&r[6]?i.substring(0,r[6]):i;break;case"u":i=Math.abs(i);break;case"x":i=i.toString(16);break;case"X":i=i.toString(16).toUpperCase();break}i=/[def]/.test(r[7])&&r[2]&&i>0?"+"+i:i,l=r[3]?r[3]=="0"?"0":r[3][1]:" ",c=r[5]-String(i).length,o=r[5]?str_repeat(l,c):"",s.push(r[4]?i+o:o+i)}else throw"Huh ?!";n=n.substring(r[0].length)}return s.join("")};return gh=a,gh}var hh,Uk;function Jr(){if(Uk)return hh;Uk=1;function a(t){return parseFloat(t.toFixed(2))}return hh=a,hh}var _h,Rk;function cl(){if(Rk)return _h;Rk=1;var a=Jr();function t(i,n,s){var r=n.y;if(n.phrases){var d=i.paper.richTextLine(n.phrases,n.x,n.y,n.klass,n.anchor);return d}if(n.lane){var o=n.dim.font.size*.25;r+=(n.dim.font.size+o)*n.lane}var l;n.dim?(l=n.dim,l.attr.class=n.klass):l=i.controller.getFontAndAttr.calc(n.type,n.klass),n.anchor&&(l.attr["text-anchor"]=n.anchor),n["dominant-baseline"]&&(l.attr["dominant-baseline"]=n["dominant-baseline"]),l.attr.x=n.x,l.attr.y=r,n.centerVertically||(l.attr.y+=l.font.size),n.type==="debugfont"&&(console.log("Debug msg: "+n.text),l.attr.stroke="#ff0000"),n.cursor&&(l.attr.cursor=n.cursor);var c;n.name==="free-text"?c=n.text.replace(/^[ \t]*\n/gm,` +`&&o--,!i.noMove){var l=r.height*1.1*o;t.push({move:Math.round(l)}),i.marginBottom&&t.push({move:i.marginBottom})}}}return Wg=a,Wg}var Kg,fk;function pk(){if(fk)return Kg;fk=1;const a=Qg();function t(i,n,s,r,o,l,c,d){var g=d.calc("i",s,r);if(n==="")i.push({move:g.height});else{if(typeof n=="string"){a(i,{marginLeft:l,text:n,font:s,klass:r,marginTop:c.marginTop,anchor:c.anchor,absElemType:c.absElemType,info:c.info,name:o},d);return}c.marginTop&&i.push({move:c.marginTop});var h=0,m={left:l,anchor:c.anchor,phrases:[]};r&&(m.klass=r),i.push(m);for(var p=0;p0){var b=!!(n.composer||n.origin),_=h?"abcjs-rhythm":"";a(this.rows,{marginLeft:d,text:n.rhythm,font:"infofont",klass:_,absElemType:"rhythm",noMove:b,info:s.rhythm,name:"rhythm"},m)}n.composer&&n.composer,n.origin&&n.origin;var S=n.composer?n.composer:"";if(n.origin&&(typeof S=="string"&&typeof n.origin=="string"?S+=" ("+n.origin+")":typeof S=="string"&&typeof n.origin!="string"?(S=[{text:S}],S.push({text:" ("}),S=S.concat(n.origin),S.push({text:")"})):(S.push({text:" ("}),S=S.concat(n.origin),S.push({text:")"}))),S){var _=h?"abcjs-composer":"";t(this.rows,S,"composerfont",_,"composer",d+l,{anchor:"end",absElemType:"composer",info:s.composer,ingroup:!0},m)}}if(n.author&&n.author.length>0){var _=h?"abcjs-author":"";t(this.rows,n.author,"composerfont",_,"author",d+l,{anchor:"end",absElemType:"author",info:s.author},m)}if(n.partOrder&&n.partOrder.length>0){var _=h?"abcjs-part-order":"";t(this.rows,n.partOrder,"partsfont",_,"part-order",d,{absElemType:"partOrder",info:s.partOrder,anchor:"start"},m)}}return Yg=i,Yg}var Jg,gk;function PE(){if(gk)return Jg;gk=1;const a=Qg(),t=pk();function i(r,o,l,c,d,g,h){this.rows=[],r.unalignedWords&&r.unalignedWords.length>0&&this.unalignedWords(r.unalignedWords,c,d,g,h),this.extraText(r,c,d,g,h),r.footer&&l&&this.footer(r.footer,o,c,h)}i.prototype.unalignedWords=function(r,o,l,c,d){var g=c?"abcjs-unaligned-words":"",h="wordsfont",m=d.calc("i",h,g);this.rows.push({move:l.words}),s(this.rows,"",r,o,h,"unalignedWords","unalignedWords",g,"unalignedWords",l,c,d),this.rows.push({move:m.height})};function n(r,o,l,c,d,g,h){l&&(o&&(typeof l=="string"?l=o+l:l=[{text:o}].concat(l)),d=g?"abcjs-extra-text "+d:"",t(r,l,"historyfont",d,"description",c,{absElemType:"extraText",anchor:"start"},h))}function s(r,o,l,c,d,g,h,m,p,u,f,_){if(l){m=f?"abcjs-extra-text "+m:"";var v=_.calc("A",d,m);if(typeof l=="string")o&&(l=o+` +`+l),a(r,{marginLeft:c,text:l,font:d,absElemType:"extraText",name:p,"dominant-baseline":"middle",klass:m},_);else{r.push({startGroup:h,klass:m,name:p}),r.push({move:u.info}),o&&(a(r,{marginLeft:c,text:o,font:d,absElemType:"extraText",name:p,"dominant-baseline":"middle"},_),r.push({move:v.height*3/4}));for(var b=0;b0;H++){var U=C.selectables[H];if(C.getDim(U),U.dim.leftj&&U.dim.topG)B=H,A=0;else if(U.dim.topG){var E=Math.min(Math.abs(U.dim.left-j),Math.abs(U.dim.right-j));Ej){var O=Math.min(Math.abs(U.dim.top-G),Math.abs(U.dim.bottom-G));OMath.abs(j-U.dim.right)?Math.abs(j-U.dim.right):Math.abs(j-U.dim.left),L=Math.abs(G-U.dim.top)>Math.abs(G-U.dim.bottom)?Math.abs(G-U.dim.bottom):Math.abs(G-U.dim.top),T=Math.sqrt(V*V+L*L);T=0&&A<=12?B:-1}function d(C,j,G){if(C.x<=j.offsetX&&C.x+C.width>=j.offsetX&&C.y<=j.offsetY&&C.y+C.height>=j.offsetY)return[j.offsetX,j.offsetY];var A=Math.abs(j.layerY/G-j.offsetY);return A<3?[j.offsetX,j.offsetY]:[j.layerX,j.layerY]}function g(C){if(!C)return null;if(C.tagName==="svg")return C;if(!C.getAttribute)return null;for(var j=C.getAttribute("selectable");!j;)C.parentElement?(C=C.parentElement,C.tagName==="svg"?j=!0:j=C.getAttribute("selectable")):j=!0;return C}function h(C,j){var G,A,B,H=l(C.selectables,g(j.target));return H>=0?(B=d(C.selectables[H].svgEl.getBBox(),j,C.scale),G=B[0],A=B[1]):(B=n(j),G=B[0],A=B[1],H=c(C,G,A)),{x:G,y:A,clickedOn:H}}function m(C){if(!(!C||!C.target||!C.touches||C.touches.length<1)){var j=C.target.getBoundingClientRect(),G=C.touches[0].pageX-j.left,A=C.touches[0].pageY-j.top;C.touches[0].offsetX=G,C.touches[0].offsetY=A,C.touches[0].layerX=C.touches[0].pageX,C.touches[0].layerY=C.touches[0].pageY}}function p(C){var j=C;C.type==="touchstart"&&(m(C),C.touches.length>0&&(j=C.touches[0]));var G=h(this,j);G.clickedOn>=0&&(C.type==="touchstart"||C.button===0)&&this.selectables[G.clickedOn]&&(this.dragTarget=this.selectables[G.clickedOn],this.dragIndex=G.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:G.x,y:G.y},this.dragging&&this.dragTarget.isDraggable&&(N(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function u(C){var j=C;if(C.type==="touchmove"&&(m(C),C.touches.length>0&&(j=C.touches[0])),this.lastTouchMove=C,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var G=h(this,j),A=Math.round((G.y-this.dragMouseStart.y)/a.STEP);A!==this.dragYStep&&(this.dragYStep=A,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+A*a.STEP+")"))}}function f(C){var j=C;C.type==="touchend"&&this.lastTouchMove&&(m(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(j=this.lastTouchMove.touches[0])),this.dragTarget&&(b.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),v.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,j),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),P(this.renderer.svg,"abcjs-dragging-in-progress"))}function _(C){C>=0&&CE&&CS&&(b=S),b<-S&&(b=-S),b}function l(u,f){var _=u?t.STEP:-t.STEP;return f&&(_=_*.4),_}function c(u,f,_){var v=f.heads[u?0:f.heads.length-1],b=_.heads[u?0:_.heads.length-1],S=v.x;u&&(S+=v.w-.6);var $=b.x;return $+=u?b.w:.6,[S,$]}function d(u,f,_,v,b,S,$,M,N,P){var C=_-2,j=_-2,G=Math.round(v?Math.max(u+C,N+j):Math.min(u-C,M-j)),A=o(b,S,f,$),B=G+Math.floor(A/2),H=G+Math.floor(-A/2);return P||(v&&G<6||!v&&G>6)&&(B=6,H=6),[B,H]}function g(u,f,_,v,b){for(var S=0;S=0;_--)if(!u[_].abcelem.rest)return _;return-1}function p(u,f,_,v,b){for(var S=[],$=[],M=0;M0&&N.abcelem.beambr&&N.abcelem.beambr<=H+1){$[H].split||($[H].split=[$[H].x]);var U=c(f,u[M-1],N);$[H].split[$[H].split.length-1]>=U[0]&&(U[0]+=N.w),$[H].split.push(U[0]),$[H].split.push(U[1])}}for(var E=$.length-1;E>=0;E--){var O=h(u,M),V=O===-1||O-E-4;if(V){var L=C,T=j+G*(E+1);if($[E].single){var F=m(u,M),z=F===-1,D=O===-1;if(z)L=C+5;else if(D)L=C-5;else{var K=u[F].abcelem.duration,X=u[O].abcelem.duration;K===X?L=M%2===0?C+5:C-5:L=Ko.startNote||g>o.endNote)&&(o.startNote=g+3,o.endNote=g+3)}else{for(var m=0,h=0;h=c}function s(o,l,c){if(c.beams.length===0)return 0;c=c.beams[0];var d=o+(l-o)/2;return a(c.startX,c.startY,c.endX,c.endY,d)}function r(o,l){return o+(l-o)/2}return ih=t,ih}var nh,kk;function IE(){if(kk)return nh;kk=1;var a=NE(),t=th(),i=OE(),n=function(g){for(var h=0;h0&&h.putChordInLane(p),g[p]=m.right;return}}g.push(m.right),h.putChordInLane(g.length-1)}}function o(g){var h=[0],m=[0],p,u,f;for(p=0;p=0;u--)f=g[p].children[u],f.chordHeightBelow&&r(m,f)}return(h.length>1||m.length>1)&&c(g,h.length,m.length),{above:h.length,below:m.length}}function l(g){for(var h=0,m=0;m=0&&(f.originalTop=f.top,f.originalBottom=f.bottom),n(f,_,"lyricHeightAbove"),n(f,_,"chordHeightAbove",f.specialY.chordLines.above),f.specialY.endingHeightAbove&&(f.specialY.chordHeightAbove?f.top+=2:f.top+=f.specialY.endingHeightAbove+i,_.endingHeightAbove=f.top),f.specialY.dynamicHeightAbove&&f.specialY.volumeHeightAbove?(f.top+=Math.max(f.specialY.dynamicHeightAbove,f.specialY.volumeHeightAbove)+i,_.dynamicHeightAbove=f.top,_.volumeHeightAbove=f.top):(n(f,_,"dynamicHeightAbove"),n(f,_,"volumeHeightAbove")),n(f,_,"partHeightAbove"),n(f,_,"tempoHeightAbove"),f.specialY.lyricHeightBelow&&(f.specialY.lyricHeightBelow+=h.spacing.vocal/a.STEP,_.lyricHeightBelow=f.bottom,f.bottom-=f.specialY.lyricHeightBelow+i),f.specialY.chordHeightBelow){_.chordHeightBelow=f.bottom;var v=f.specialY.chordHeightBelow;f.specialY.chordLines.below&&(v*=f.specialY.chordLines.below),f.bottom-=v+i}f.specialY.volumeHeightBelow&&f.specialY.dynamicHeightBelow?(_.volumeHeightBelow=f.bottom,_.dynamicHeightBelow=f.bottom,f.bottom-=Math.max(f.specialY.volumeHeightBelow,f.specialY.dynamicHeightBelow)+i):f.specialY.volumeHeightBelow?(_.volumeHeightBelow=f.bottom,f.bottom-=f.specialY.volumeHeightBelow+i):f.specialY.dynamicHeightBelow&&(_.dynamicHeightBelow=f.bottom,f.bottom-=f.specialY.dynamicHeightBelow+i),h.showDebug&&h.showDebug.indexOf("box")>=0&&(f.positionY=_);for(var b=0;b0&&(f.top+=C)}f.top+=h.spacing.staffTopMargin/a.STEP,p=2-f.bottom}},i=1;function n(h,m,p,u){if(h.specialY[p]){var f=h.specialY[p];u&&(f*=u),h.top+=f+i,m[p]=h.top}}function s(h,m,p){var u,f,_=0;for(u=0;u=n.children.length},a.getNextX=function(n){return Math.max(n.minx,n.nextx)},a.getSpacingUnits=function(n){return Math.sqrt(n.spacingduration*8)},a.layoutOneItem=function(n,s,r,o,l){var c=r.children[r.i];if(!c)return 0;var d=n-r.minx,g=r.durationindex+c.duration>0?o:0;if(c.abcelem.el_type==="note"&&!c.abcelem.rest&&r.voicenumber!==0&&l){var h=l.children[l.i],m=h&&(c.abcelem.maxpitch<=h.abcelem.maxpitch+1&&c.abcelem.maxpitch>=h.abcelem.minpitch-1||c.abcelem.minpitch<=h.abcelem.maxpitch+1&&c.abcelem.minpitch>=h.abcelem.minpitch-1);if(m&&c.abcelem.minpitch===h.abcelem.minpitch&&c.abcelem.maxpitch===h.abcelem.maxpitch&&h.heads&&h.heads.length>0&&c.heads&&c.heads.length>0&&h.heads[0].c===c.heads[0].c&&(m=!1),m){var p=h.heads&&h.heads.length>0?h.heads[0].realWidth:h.fixed.w;c.adjustedWidth||(c.adjustedWidth=p+c.w),c.w=c.adjustedWidth;for(var u=0;u0){var g=d.children.length-1,h=d.children[g];if(h.abcelem.el_type==="bar"){var m=h.children[0].x;m>l?l=m:h.children[0].x=l}}}}var i=function(o,l,c,d,g){var h=1e-7,m=0,p=1e3,u=g;d.startx=u;var f,_=0;for(c&&console.log("init layout",o),f=0;fh?S.push(d.voices[f]):b.push(d.voices[f])}v=0;var M=0;for(f=0;fu&&(u=a.getNextX(b[f]),v=a.getSpacingUnits(b[f]),M=b[f].spacingduration);m+=v,p=Math.min(p,v),c&&console.log("currentduration: ",_,m,p);var N=void 0;for(f=0;f0){u=j;for(var A=0;Au&&(u=a.getNextX(d.voices[f]),v=a.getSpacingUnits(d.voices[f]));return t(d.voices),m+=v,d.setWidth(u),{spacingUnits:m,minSpace:p}};function n(o){for(var l=0;l0?0:5e-7)}function r(o,l){return!o||!o.staff||!o.staff.voices||o.staff.voices.length===0||!l||!l.staff||!l.staff.voices||l.staff.voices.length===0?!1:o.staff.voices[0]===l.staff.voices[0]}return oh=i,oh}var lh,$k;function qk(){if($k)return lh;$k=1;function a(s,r,o,l,c){var d=s.padding.left,g=0,h,m;for(h=0;hMath.round(M)&&(M=N,v&&(S=-1))}for(S=0;S0?(v=(f-C)/b,v*S>50&&(v=50/S),v):null}function d(p){for(var u=0;u1){var $=b[0].abcelem.rest&&b[0].abcelem.rest.type==="rest",M=b[S].abcelem.rest&&b[S].abcelem.rest.type==="rest";if($&&!b[S].abcelem.rest){var N=b[0].children.find(function(A){return A.name.includes("rest")}),P=h(b[S]);if(N){var C=N.bottom-P;C-=2,C<0&&b[0].children.length>0&&(b[0].bottom-=C,b[0].top-=C,b[0].children[0].bottom-=C,b[0].children[0].top-=C,b[0].children[0].pitch-=C)}}else if(M&&!b[0].abcelem.rest){var j=b[S].children.find(function(A){return A.name.includes("rest")});if(j){var G=j.top-m(b[0]);G+=2,G>0&&b[S].children.length>0&&(b[S].bottom-=G,b[S].top-=G,b[S].children[0].bottom-=G,b[S].children[0].top-=G,b[S].children[0].pitch-=G)}}}}}function h(p){if(p.children){for(var u=-90,f=0;f-90)return u}return p.top}function m(p){if(p.children){for(var u=90,f=0;f0&&i.push(t),t==="abcjs-tab-number")return i.join(" ");if(t==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&i.push("l"+this.lineNumber),this.measureNumber!==null&&i.push("m"+this.measureNumber),this.measureNumber!==null&&i.push("mm"+this.measureTotal()),this.voiceNumber!==null&&i.push("v"+this.voiceNumber),t&&(t.indexOf("note")>=0||t.indexOf("rest")>=0||t.indexOf("lyric")>=0)&&this.noteNumber!==null&&i.push("n"+this.noteNumber),i.length>0){i=i.join(" "),i=i.split(" ");for(var n=0;n0&&(i[n]="abcjs-"+i[n])}return i.join(" ")},fh=a,fh}var ph,Mk;function YE(){if(Mk)return ph;Mk=1;var a=function(i,n){this.formatting=i,this.classes=n};return a.prototype.updateFonts=function(t){t.gchordfont&&(this.formatting.gchordfont=t.gchordfont),t.tripletfont&&(this.formatting.tripletfont=t.tripletfont),t.annotationfont&&(this.formatting.annotationfont=t.annotationfont),t.vocalfont&&(this.formatting.vocalfont=t.vocalfont)},a.prototype.getFamily=function(t){return t[0]==='"'&&t[t.length-1]==='"'?t.substring(1,t.length-1):t},a.prototype.calc=function(t,i){var n;typeof t=="string"?(n=this.formatting[t],n?n={face:n.face,size:Math.round(n.size*4/3),decoration:n.decoration,style:n.style,weight:n.weight,box:n.box}:n={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):n={face:t.face,size:Math.round(t.size*4/3),decoration:t.decoration,style:t.style,weight:t.weight,box:t.box};var s=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;n.padding=n.size*s;var r={"font-size":n.size,"font-style":n.style,"font-family":this.getFamily(n.face),"font-weight":n.weight,"text-decoration":n.decoration,class:this.classes.generate(i)};return{font:n,attr:r}},ph=a,ph}var mh,zk;function JE(){if(zk)return mh;zk=1;var a=function(i,n){this.getFontAndAttr=i,this.svg=n};return a.prototype.updateFonts=function(t){this.getFontAndAttr.updateFonts(t)},a.prototype.attr=function(t,i){return this.getFontAndAttr.calc(t,i)},a.prototype.getFamily=function(t){return t[0]==='"'&&t[t.length-1]==='"'?t.substring(1,t.length-1):t},a.prototype.calc=function(t,i,n,s){var r;typeof i=="string"?r=this.attr(i,n):r={font:{face:i.face,size:i.size,decoration:i.decoration,style:i.style,weight:i.weight},attr:{"font-size":i.size,"font-style":i.style,"font-family":this.getFamily(i.face),"font-weight":i.weight,"text-decoration":i.decoration,class:this.getFontAndAttr.classes.generate(n)}};var o=this.svg.getTextSize(t,r.attr,s);return r.font.box?{height:o.height+r.font.padding*4,width:o.width+r.font.padding*4}:o},a.prototype.baselineToCenter=function(t,i,n,s,r){var o=this.calc(t,i,n).height,l=this.attr(i,n).font.size;return o*.5+(r-s-2)*l},mh=a,mh}var gh,Ek;function Il(){if(Ek)return gh;Ek=1;var a=function(){for(var t=0,i,n=arguments[t++],s=[],r,o,l,c;n;){if(r=/^[^\x25]+/.exec(n))s.push(r[0]);else if(r=/^\x25{2}/.exec(n))s.push("%");else if(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n)){if((i=arguments[r[1]||t++])==null||i==null)throw"Too few arguments.";if(/[^s]/.test(r[7])&&typeof i!="number")throw"Expecting number but found "+typeof i;switch(r[7]){case"b":i=i.toString(2);break;case"c":i=String.fromCharCode(i);break;case"d":i=parseInt(i);break;case"e":i=r[6]?i.toExponential(r[6]):i.toExponential();break;case"f":i=r[6]?parseFloat(i).toFixed(r[6]):parseFloat(i);break;case"o":i=i.toString(8);break;case"s":i=(i=String(i))&&r[6]?i.substring(0,r[6]):i;break;case"u":i=Math.abs(i);break;case"x":i=i.toString(16);break;case"X":i=i.toString(16).toUpperCase();break}i=/[def]/.test(r[7])&&r[2]&&i>0?"+"+i:i,l=r[3]?r[3]=="0"?"0":r[3][1]:" ",c=r[5]-String(i).length,o=r[5]?str_repeat(l,c):"",s.push(r[4]?i+o:o+i)}else throw"Huh ?!";n=n.substring(r[0].length)}return s.join("")};return gh=a,gh}var hh,Uk;function Xr(){if(Uk)return hh;Uk=1;function a(t){return parseFloat(t.toFixed(2))}return hh=a,hh}var _h,Rk;function tl(){if(Rk)return _h;Rk=1;var a=Xr();function t(i,n,s){var r=n.y;if(n.phrases){var d=i.paper.richTextLine(n.phrases,n.x,n.y,n.klass,n.anchor);return d}if(n.lane){var o=n.dim.font.size*.25;r+=(n.dim.font.size+o)*n.lane}var l;n.dim?(l=n.dim,l.attr.class=n.klass):l=i.controller.getFontAndAttr.calc(n.type,n.klass),n.anchor&&(l.attr["text-anchor"]=n.anchor),n["dominant-baseline"]&&(l.attr["dominant-baseline"]=n["dominant-baseline"]),l.attr.x=n.x,l.attr.y=r,n.centerVertically||(l.attr.y+=l.font.size),n.type==="debugfont"&&(console.log("Debug msg: "+n.text),l.attr.stroke="#ff0000"),n.cursor&&(l.attr.cursor=n.cursor);var c;n.name==="free-text"?c=n.text.replace(/^[ \t]*\n/gm,` `):c=n.text.replace(/\n\n/g,` `),c=c.replace(/^\n/,`  -`),l.font.box&&(s||i.paper.openGroup({klass:l.attr.class,fill:i.foregroundColor,"data-name":n.name}),l.attr["text-anchor"]==="end"?l.attr.x-=l.font.padding:l.attr["text-anchor"]==="start"&&(l.attr.x+=l.font.padding),l.attr.y+=l.font.padding,delete l.attr.class),n.noClass&&delete l.attr.class,l.attr.x=a(l.attr.x),l.attr.y=a(l.attr.y),n.name&&(l.attr["data-name"]=n.name);var d=i.paper.text(c,l.attr);if(l.font.box){var g=d.getBBox(),h=0;l.attr["text-anchor"]==="middle"?h=g.width/2+l.font.padding:l.attr["text-anchor"]==="end"&&(h=g.width+l.font.padding*2);var m=0;n.centerVertically&&(m=g.height-l.font.padding),i.paper.rect({"data-name":"box",x:Math.round(n.x-h),y:Math.round(r-m),width:Math.round(g.width+l.font.padding*2),height:Math.round(g.height+l.font.padding*2)}),s||(d=i.paper.closeGroup())}return d}return _h=t,_h}var vh,Bk;function XE(){if(Bk)return vh;Bk=1;var a=Wl(),t=Es(),i=cl();function n(c,d,g){var h=d.startVoice.staff.absoluteY-t.STEP*10;return d.endVoice&&d.endVoice.staff?d.endY=d.endVoice.staff.absoluteY-t.STEP*2:d.lastContinuedVoice&&d.lastContinuedVoice.staff?d.endY=d.lastContinuedVoice.staff.absoluteY-t.STEP*2:d.endY=d.startVoice.staff.absoluteY-t.STEP*2,l(c,d.x,h,d.endY,d.type,d.header,g)}function s(c,d,g,h,m){d+=t.STEP;var p=t.STEP*.75,u=t.STEP*.75,f=h-g,_=a("M %f %f l %f %f l %f %f l %f %f z",d,g-u,0,f+u*2,p,0,0,-(f+u*2)),b=t.STEP*2,v=t.STEP;return _+=a("M %f %f q %f %f %f %f q %f %f %f %f z",d+p,g-u,b*.6,v*.2,b,-v,-b*.1,v*.3,-b,v+t.STEP),_+=a("M %f %f q %f %f %f %f q %f %f %f %f z",d+p,g+u+f,b*.6,-v*.2,b,v,-b*.1,-v*.3,-b,-v-t.STEP),c.paper.path({path:_,stroke:c.foregroundColor,fill:c.foregroundColor,class:c.controller.classes.generate(m),"data-name":m})}function r(c,d,g,h,m){var p=h-g,u=o(d,g,[7.5,-8,21,0,18.5,-10.5,7.5],[0,p/5.5,p/3.14,p/2,p/2.93,p/4.88,0]);return u+=o(d,g,[0,17.5,-7.5,6.6,-5,20,0],[p/2,p/1.46,p/1.22,p,p/1.19,p/1.42,p/2]),c.paper.path({path:u,stroke:c.foregroundColor,fill:c.foregroundColor,class:c.controller.classes.generate(m),"data-name":m})}function o(c,d,g,h){return a("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",c+g[0],d+h[0],c+g[1],d+h[1],c+g[2],d+h[2],c+g[3],d+h[3],c+g[4],d+h[4],c+g[5],d+h[5],c+g[6],d+h[6])}var l=function(c,d,g,h,m,p,u){var f;if(p){c.paper.openGroup({klass:c.controller.classes.generate("staff-extra voice-name"),"data-name":m});var _=g+(h-g)/2;_=_-c.controller.getTextSize.baselineToCenter(p,"voicefont","staff-extra voice-name",0,1),i(c,{x:c.padding.left,y:_,text:p,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return m==="brace"?f=r(c,d,g,h,m):m==="bracket"&&(f=s(c,d,g,h,m)),p&&(f=c.paper.closeGroup()),u.wrapSvgEl({el_type:m,startChar:-1,endChar:-1},f),f};return vh=n,vh}var bh,Pk;function ou(){if(Pk)return bh;Pk=1;function a(t,i,n){var s=t.paper.path(i);return s}return bh=a,bh}var yh,jk;function ZE(){if(jk)return yh;jk=1;var a=Wl(),t=ou(),i=Jr();function n(f,_,b){(!_.anchor1||!_.anchor2||!_.anchor1.heads||!_.anchor2.heads||_.anchor1.heads.length===0||_.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var v=4,T=f.calcY(_.anchor1.heads[0].pitch),S=f.calcY(_.anchor2.heads[0].pitch),M=_.anchor1.x+_.anchor1.w/2,P=_.anchor2.x+_.anchor2.w/2,B=s(M,T,P,S),C=_.anchor1.w/2+v,j=_.anchor2.w/2+v,G=r(M,T,P,S),A=o(T,G,C);o(S,G,-j);var N=l(B-C-j),H=u(f,M+C,A,N,G);return b.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},H),[H]}function s(f,_,b,v){var T=b-f,S=v-_;return Math.sqrt(T*T+S*S)}function r(f,_,b,v){return(v-_)/(b-f)}function o(f,_,b){return i(f+b*_)}function l(f){var _=5;return Math.max(2,Math.floor((f-_*2)/6))}var c=[[3.5,-4.8]],d=[[1.5,-1],[.3,-.3],[-3.5,3.8]],g=[[-1.5,2]],h=[[3,4],[3,-4]],m=[[-3,4],[-3,-4]];function p(f,_){for(var b="",v=0;v1&&c.indexOf(".")<0){var m=i.isInGroup()?"":d.klass;r.paper.openGroup({"data-name":d.name,klass:m});for(var p=0,u=0;u0?l.linewidth+o.lineThickness:l.linewidth-o.lineThickness;l.graphelem=t(o,l.x,u,d,o.calcY(l.pitch2),"abcjs-stem","stem");break;case"ledger":l.graphelem=i(o,l.x,l.x+l.w,l.pitch,"abcjs-ledger","ledger",.35+o.lineThickness);break}return l.scalex!==1&&l.graphelem&&r(o.paper,l.graphelem,l.scalex,l.scaley,l.x,d),l.graphelem}function r(o,l,c,d,g,h){o.setAttributeOnElement(l,{style:"transform:scale("+c+","+d+");transform-origin:"+g+"px "+h+"px;"})}return Uh=s,Uh}var Rh,e3;function oU(){if(e3)return Rh;e3=1;var a=Zk(),t=cl();function i(n,s){var r=s.x;s.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),s.tempo.el_type="tempo";var o=n.calcY(s.pitch)+2,l,c;if(s.tempo.preString){l=t(n,{x:r,y:o,text:s.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),c=n.controller.getTextSize.calc(s.tempo.preString,"tempofont","tempo",l);var d=c.width,g=d/s.tempo.preString.length;r+=d+g}if(s.note){s.note.setX(r);for(var h=0;h0&&l.children[0].type==="TempoElement";l.elemset=[],s.beginGroup(o.paper,o.controller);for(var m=0;m=0&&u.setAttribute("class","abcjs-notehead"),u&&p.chordPos&&p.name.indexOf("flags.")!==0){var f=u.getAttribute("class");f?f=f+" abcjs-chord-pos-"+p.chordPos:f="abcjs-chord-pos-"+p.chordPos,u.setAttribute("class",f)}}}var f=l.type;if((l.type==="note"||l.type==="rest")&&(l.counters=o.controller.classes.getCurrent(),f+=" d"+Math.round(l.durationClass*1e3)/1e3,f=f.replace(/\./g,"-"),l.abcelem.pitches))for(var _=0;_0?b.classList[0]+" ":"";b.setAttribute("class",v+l.overrideClasses)}if(h)l.startChar=l.abcelem.startChar,l.endChar=l.abcelem.endChar,d.add(l,b,!1,g);else{l.elemset.push(b);var T=!1;(l.type==="note"||l.type==="tabNumber")&&(T=!0),d.add(l,b,T,g)}}else l.elemset.length>0&&d.add(l,l.elemset[0],l.type==="note",g);if(l.klass&&n(l.elemset,"mark","","#00ff00"),l.hint&&n(l.elemset,"abcjs-hint","",null),l.abcelem.abselem=l,l.heads&&l.heads.length>0){l.notePositions=[];for(var S=0;S=0;m--){var p=(m+1)*d;h=i.calcY(p),g===0&&(g=h),a(i,n,s,p,c,null,l+i.lineThickness),c=void 0}return i.paper.closeGroup(),[g,h]}return jh=t,jh}var Nh,n3;function uU(){if(n3)return Nh;n3=1;function a(t,i,n){var s=t.paper.rectBeneath(i);return n&&t.paper.text(n,{x:0,y:i.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),s}return Nh=a,Nh}var Oh,s3;function fU(){if(s3)return Oh;s3=1;function a(t,i){var n="rgba(0,0,0,255)",s="rgba(0,0,0,0)",r=Math.round(t.y),o=t.controller.width,l=(o-i)/2,c=l+i,d="M "+l+" "+r+" L "+c+" "+r+" L "+c+" "+(r+1)+" L "+l+" "+(r+1)+" L "+l+" "+r+" z";t.paper.pathToBack({path:d,stroke:s,fill:n,class:t.controller.classes.generate("defined-text")})}return Oh=a,Oh}var Ih,r3;function o3(){if(r3)return Ih;r3=1;var a=fU(),t=cl();function i(n,s,r){for(var o=0;o=0&&b.voices&&d(g,h.voices,b.voices),g.showDebug.indexOf("grid")>=0&&(g.paper.dottedLine({x1:g.padding.left,x2:g.padding.left+g.controller.width,y1:f,y2:f,stroke:"#0000ff"}),s(g,{x:g.padding.left,y:g.calcY(b.originalTop),width:g.controller.width,height:g.calcY(b.originalBottom)-g.calcY(b.originalTop),fill:g.foregroundColor,stroke:g.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),u=0,E(b,"chordHeightAbove"),E(b,"chordHeightBelow"),E(b,"dynamicHeightAbove"),E(b,"dynamicHeightBelow"),E(b,"endingHeightAbove"),E(b,"lyricHeightAbove"),E(b,"lyricHeightBelow"),E(b,"partHeightAbove"),E(b,"tempoHeightAbove"),E(b,"volumeHeightAbove"),E(b,"volumeHeightBelow"))),g.moveY(a.STEP,-b.bottom),g.showDebug&&g.showDebug.indexOf("grid")>=0&&g.paper.dottedLine({x1:g.padding.left,x2:g.padding.left+g.controller.width,y1:g.y,y2:g.y,stroke:"#0000aa"})}for(var v,T,S=2,M=0,P=0;P1&&(v=h.staffs[0].topLine,T=h.staffs[H-1].bottomLine,r(g,h.startx,.6,v,T,null)),g.y=f;function E(U,O){var V=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(U.positionY&&U.positionY[O]){var D=U.specialY[O]*a.STEP;O==="chordHeightAbove"&&U.specialY.chordLines&&U.specialY.chordLines.above&&(D*=U.specialY.chordLines.above),O==="chordHeightBelow"&&U.specialY.chordLines&&U.specialY.chordLines.below&&(D*=U.specialY.chordLines.below),s(g,{x:g.padding.left,y:g.calcY(U.positionY[O]),width:g.controller.width,height:D,fill:V[u],stroke:V[u],"fill-opacity":.4,"stroke-opacity":.4},O.substr(0,4)),u+=1,u>6&&(u=0)}}}function c(g,h,m,p,u){if(m)for(var f=0;f=0},i.prototype.wrapSvgEl=function(n,s){var r={tuneNumber:this.tuneNumber,abcelem:n,elemset:[s],highlight:a,unhighlight:t};this.add(r,s,!1)},Vh=i,Vh}var Hh,u3;function hU(){if(u3)return Hh;u3=1;const a=Th(),t=Mh();function i(v,T,S,M,P){const B=P.gchordfont;P.partsfont;const C=P.annotationfont,j=P.repeatfont,G=P.textfont,A=P.subtitlefont,N=50,H=10,E=14,U=10,O=20,V=16;v.paper.openGroup({klass:"abcjs-chord-grid"}),T.forEach(D=>{switch(D.type){case"text":b(v,D.text,S,v.y,16,G,null,null,!1),v.moveY(V);break;case"subtitle":b(v,D.subtitle,S,v.y+U,20,A,null,"abcjs-subtitle",!1),v.moveY(O);break;case"part":if(D.lines.length>0){b(v,D.name,S,v.y+U,20,A,D.name,"abcjs-part",!1),v.moveY(O);const $=D.lines[0].length,F=M/$;D.lines.forEach((z,L)=>{let Q=!1,Z=!1;z.forEach(oe=>{oe.ending&&(Q=!0),oe.annotations&&oe.annotations.length>0&&(Z=!0)});const ee=Z?E:Q?H:0;z.forEach((oe,fe)=>{if(!oe.noBorder){v.paper.rect({x:S+fe*F,y:v.y,width:F,height:ee+N}),v.paper.rect({x:S+fe*F+1,y:v.y+1,width:F-2,height:ee+N-2});let ge=0,R=0;const we=v.y,ce=S+F*fe;oe.hasStartRepeat&&(s(v,ce,we,we+N+ee,!0,ee),ge=12),oe.hasEndRepeat&&(s(v,ce+F,we,we+N+ee,!1,ee),R=12);let Te=0;oe.ending&&(Te=b(v,oe.ending,S+fe*F+4,we+10,12,j,null,null,!1).getBBox().width+4),l(v,we,S+ge,F,L,fe,oe.chord,B,ge+R,N,ee),oe.annotations&&oe.annotations.length>0&&o(v,we,S+fe*F+Te,oe.annotations,C),ee&&v.paper.rectBeneath({x:S+fe*F,y:v.y,width:F,height:ee,fill:"#e8e8e8",stroke:"none"})}}),v.moveY(ee+N)}),v.moveY(O)}break}}),v.paper.closeGroup()}function n(v,T,S,M){var P=T-10,B=T+10,C=S+10,j=S-10,G=T-10,A=-v.yToPitch(M)+2,N=T+6.5,H=-v.yToPitch(M)-2.3;v.paper.lineToBack({x1:P,x2:B,y1:C,y2:j,"stroke-width":"3px","stroke-linecap":"round"}),a(v,G,A,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),a(v,N,H,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"})}function s(v,T,S,M,P,B){const C=P?T+2:T-4,j=P?T+9:T-11;v.paper.openGroup({klass:"abcjs-repeat"}),t(v,C,3+v.lineThickness,S,M,null,"bar"),a(v,j,-v.yToPitch(B)-4,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),a(v,j,-v.yToPitch(B)-8,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),v.paper.closeGroup()}const r={segno:"scripts.segno",coda:"scripts.coda",fermata:"scripts.ufermata"};function o(v,T,S,M,P){S+=3;let B;for(let C=0;CC&&A>=14;)A-=2,j.setAttribute("font-size",A),G=j.getBBox()}const d=34,g=26,h=20,m=-3;function p(v,T,S,M,P,B,C,j){B==="%"?n(v,T+M/2,S+P/2,j+P/2):c(v,T+M/2,S+P/2+m,d,B,C,M)}function u(v,T,S,M,P,B,C,j,G){v.paper.lineToBack({x1:T,x2:T+M,y1:S+P+G,y2:S+2}),c(v,T+M/4,S+P/4+5+G+m,g,B,j,M/2),c(v,T+3*M/4,S+3*P/4+G+m,g,C,j,M/2)}function f(v,T,S,M,P,B,C,j){v.paper.lineToBack({x1:T+3,x2:T+M-3,y1:S+P/2+j,y2:S+P/2+j}),v.paper.lineToBack({x1:T+M/2,x2:T+M/2,y1:S+3+j,y2:S+P-3+j}),B[0]&&c(v,T+M/4,S+P/4+2+j+m,h,_(B[0]),C,M/2),B[1]&&c(v,T+3*M/4,S+P/4+2+j+m,h,_(B[1]),C,M/2),B[2]&&c(v,T+M/4,S+3*P/4+j+m,h,_(B[2]),C,M/2),B[3]&&c(v,T+3*M/4,S+3*P/4+j+m,h,_(B[3]),C,M/2)}function _(v){return v==="No Chord"?"N.C.":v}function b(v,T,S,M,P,B,C,j,G){const A={x:S,y:M,stroke:"none","font-size":P,"font-style":B.style,"font-family":B.face,"font-weight":B.weight,"text-decoration":B.decoration};return C&&(A["data-name"]=C),j&&(A.class=j),A["text-anchor"]=G?"middle":"start",v.paper.text(T,A,null,{"alignment-baseline":"middle"})}return Hh=i,Hh}var Wh,f3;function _U(){if(f3)return Wh;f3=1;var a=pU(),t=mU(),i=o3(),n=Es(),s=gU(),r=hU();function o(d,g,h,m,p,u,f,_,b,v,T){var S=new s(d.paper,_,b),M={};g.shouldAddClasses&&(M.klass="abcjs-meta-top"),d.paper.openGroup(M),d.moveY(d.padding.top),i(d,h.topText,S),d.paper.closeGroup(),d.moveY(d.spacing.music);let P=!1;T&&h.chordGrid&&(r(d,h.chordGrid,d.padding.left,m,h.formatting),T==="noMusic"&&(P=!0));var B=[],C=0;if(!P)for(var j=0;jh.formatting.maxStaves)break;g.shouldAddClasses&&(M.klass="abcjs-staff-wrapper abcjs-l"+g.lineNumber),d.paper.openGroup(M),G.vskip&&d.moveY(G.vskip),B.length>=1?c(d,d.spacing.staffSeparation,B[B.length-1],G.staffGroup):j>0&&d.moveY(d.spacing.staffSeparation);var A=l(d,G.staffGroup,S,j);A.line=v+j,B.push(A),d.paper.closeGroup()}else G.nonMusic&&(g.shouldAddClasses&&(M.klass="abcjs-non-music"),d.paper.openGroup(M),i(d,G.nonMusic,S),d.paper.closeGroup())}return g.reset(),P||h.bottomText&&h.bottomText.rows&&h.bottomText.rows.length>0&&(g.shouldAddClasses&&(M.klass="abcjs-meta-bottom"),d.paper.openGroup(M),d.moveY(24),i(d,h.bottomText,S),d.paper.closeGroup()),t(d,p,f,u),{staffgroups:B,selectables:S.getElements()}}function l(d,g,h,m){a(d,g,h,m);var p=g.height*n.STEP;return d.moveY(p),g}function c(d,g,h,m){var p=h.staffs[h.staffs.length-1],u=-(p.bottom-2),f=m.staffs[0].top-10,_=f+u,b=_*n.STEP;b=0&&s.1||(this.scale=void 0),S.staffwidth?(this.staffwidthScreen=S.staffwidth,this.staffwidthPrint=S.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],S.clickListener&&this.addSelectListener(S.clickListener),this.renderer=new i(T),this.renderer.setPaddingOverride(S),S.showDebug&&(this.renderer.showDebug=S.showDebug),S.jazzchords&&(this.jazzchords=S.jazzchords),S.accentAbove&&(this.accentAbove=S.accentAbove),S.germanAlphabet&&(this.germanAlphabet=S.germanAlphabet),S.lineThickness&&(this.lineThickness=S.lineThickness),S.chordGrid&&(this.chordGrid=S.chordGrid),this.renderer.controller=this,this.renderer.foregroundColor=S.foregroundColor?S.foregroundColor:"currentColor",S.ariaLabel!==void 0&&(this.renderer.ariaLabel=S.ariaLabel),this.renderer.minPadding=S.minPadding?S.minPadding:0,this.reset()};_.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},_.prototype.engraveABC=function(T,S,M){T[0]===void 0&&(T=[T]),this.reset();for(var P=0;P0)for(var G=j.staffGroup.voices[0],A=!1,N=0,H=0;Hthis.width+1&&(T.topText=new o(T.metaText,T.metaTextInfo,T.formatting,T.lines,C,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),T.lines&&T.lines.length>0))for(var j=T.lines.length,G=0;G0)for(var N=A.nonMusic.rows.length,H=0;H0&&A.text[0].center&&(E.left=C/2+this.renderer.padding.left))}}T.tablatures&&u.layoutTablatures(this.renderer,T);var U=p(this.renderer,this.classes,T,this.width,C,this.responsive,B,this.selectTypes,S,M,this.chordGrid);if(this.staffgroups=U.staffgroups,this.selectables=U.selectables,this.oneSvgPerLine){var O=this.renderer.paper.svg.parentNode;this.svgs=b(this.renderer,O,T.metaText.title,this.responsive,B)}else this.svgs=[this.renderer.paper.svg];c(this,this.svgs),this.jazzchords=P};function b(T,S,M,P,B){M||(M="Untitled");var C=S.querySelector("svg");P==="resize"&&(S.style.paddingBottom="");for(var j=C.querySelector("style"),G=P==="resize"?C.viewBox.baseVal.width:C.getAttribute("width"),A=S.querySelectorAll("svg > g"),N=0,H=[],E=0;E',d.style.overflowX="hidden",d.style.overflowY="auto",d=d.children[0]):d.innerHTML="";var u=new t(d,h);if(u.engraveABC(g,m,p),g.engraver=u,h.viewportVertical||h.viewportHorizontal){var f=d.parentNode;f.style.width=d.style.width}}var l=function(d,g,h,m,p){var u={},f;if(h){for(f in h)h.hasOwnProperty(f)&&(u[f]=h[f]);u.warnings_id&&u.tablature&&(u.tablature.warning_id=u.warnings_id)}if(m)for(f in m)m.hasOwnProperty(f)&&(f==="listener"?m[f].highlight&&(u.clickListener=m[f].highlight):u[f]=m[f]);if(p)for(f in p)p.hasOwnProperty(f)&&(u[f]=p[f]);function _(b,v,T,S){var M=!1;return b==="*"&&(M=!0,b=document.createElement("div"),b.setAttribute("style","visibility: hidden;"),document.body.appendChild(b)),!M&&u.wrap&&u.staffwidth?(v=c(b,v,T,S,u),v):(u.afterParsing&&u.afterParsing(v,T,S),o(b,v,u,T,0),M&&b.parentNode.removeChild(b),null)}return a.renderEngine(_,d,g,u)};function c(d,g,h,m,p){var u=new t(d,p),f=u.getMeasureWidths(g),_=n.calcLineWraps(g,f,p);if(_.reParse){var b=new i;b.parse(m,_.revisedParams),g=b.getTune();var v=b.getWarnings();v&&(g.warnings=v)}return p.afterParsing&&p.afterParsing(g,h,m),o(d,g,_.revisedParams,h,0),g.explanation=_.explanation,g}return Jh=l,Jh}var Xh,_3;function bU(){if(_3)return Xh;_3=1;var a=If(),t=Yh(),i=function(n,s){function r(o,l,c,d){o=document.createElement("div"),o.setAttribute("style","visibility: hidden;"),document.body.appendChild(o);var g=new t(o,s),h=g.getMeasureWidths(l);return o.parentNode.removeChild(o),{sections:h}}return a.renderEngine(r,"*",n,s)};return Xh=i,Xh}var Zh,v3;function e_(){if(v3)return Zh;v3=1;var a={};return Zh=a,Zh}var t_,b3;function yU(){if(b3)return t_;b3=1;var a=e_(),t=function(i,n,s,r){a[n]||(a[n]={});var o=a[n];return o[s]||(o[s]=new Promise(function(l,c){var d=new XMLHttpRequest;let g=i+n+"-mp3/"+s+".mp3";d.open("GET",g,!0),d.responseType="arraybuffer",d.onload=function(){if(d.status!==200){c(Error("Can't load sound at "+g+" status="+d.status));return}var h=function(p){l({instrument:n,name:s,status:"loaded",audioBuffer:p})},m=r.decodeAudioData(d.response,h,function(){c(Error("Can't decode sound at "+g))});m&&typeof m.catch=="function"&&m.catch(c)},d.onerror=function(){c(Error("Can't load sound at "+g))},d.send()}).catch(l=>{throw console.error("Didn't load note",n,s,":",l.message),l})),o[s]};return t_=t,t_}var a_,y3;function i_(){if(y3)return a_;y3=1;var a=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];return a_=a,a_}var n_,w3;function wU(){if(w3)return n_;w3=1;var a=i_(),t=function(i){for(var n=[],s=0;s0){var g=c.gap?c.gap:0,h=c.duration;g=Math.min(g,h*2/3);var m={pitch:c.pitch,instrument:d,start:Math.round(c.start*1e6)/1e6,end:Math.round((c.start+h-g)*1e6)/1e6,volume:c.volume};c.startChar&&(m.startChar=c.startChar),c.endChar&&(m.endChar=c.endChar),c.style&&(m.style=c.style),c.cents&&(m.cents=c.cents),n[l].push(m)}break;case"program":r=a[c.instrument];break;case"text":break;default:console.log("Unhandled midi event",c)}})}),n};return n_=t,n_}var s_,k3;function Df(){if(k3)return s_;k3=1;function a(t){if(t)window.abcjsAudioContext=t;else if(!window.abcjsAudioContext){var i=window.AudioContext||window.webkitAudioContext;if(i)window.abcjsAudioContext=new i;else return!1}return window.abcjsAudioContext.state!=="suspended"}return s_=a,s_}var r_,x3;function Ic(){if(x3)return r_;x3=1;var a=Df();function t(){return window.abcjsAudioContext||a(),window.abcjsAudioContext}return r_=t,r_}var o_,S3;function Lf(){if(S3)return o_;S3=1;var a=Ic();function t(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var i=a();if(i)return i.resume!==void 0}return o_=t,o_}var l_,T3;function c_(){if(T3)return l_;T3=1;var a={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"};return l_=a,l_}var d_,$3;function kU(){if($3)return d_;$3=1;var a=function(i){return window.URL.createObjectURL(t(i.audioBuffers))};function t(i){var n=i[0],s=n.numberOfChannels,r=n.length*s*2+44,o=new ArrayBuffer(r),l=new DataView(o),c=[],d,g,h=0,m=0;for(u(1179011410),u(r-8),u(1163280727),u(544501094),u(16),p(1),p(s),u(n.sampleRate),u(n.sampleRate*2*s),p(s*2),p(16),u(1635017060),u(r-m-4),d=0;d0){if(f.debugCallback&&f.debugCallback("pending "+JSON.stringify(G)),M?M=M*2:M=50,M<9e4)return new Promise(function(V,D){setTimeout(function(){var $=[];for(N=0;N0?$.audioBuffers[0].duration:0;return{status:n().state,duration:F}};var M=n().currentTime,P=f.millisecondsPerMeasure/1e3/f.meterSize;if(f.duration=f.flattened.totalDuration*P,f.duration<=0)return f.audioBuffers=[],T({status:"empty",seconds:0});f.duration+=v;var B=Math.floor(n().sampleRate*f.duration);f.stop();var C=t(f.flattened);if(f.options.swing){var j=f.options.drumIntro?0:f.pickupLength;b(C,f.options.swing,f.meterFraction,j)}f.sequenceCallback&&f.sequenceCallback(C,f.callbackContext);var G=_(C.length,f.pan),A={};C.forEach(function($,F){var z=G&&G.length>F?G[F]:0;$.forEach(function(L){var Q=L.instrument+":"+L.pitch+":"+L.volume+":"+Math.round((L.end-L.start)*1e3)/1e3+":"+z+":"+P+":"+(L.cents?L.cents:0);f.debugCallback&&f.debugCallback("noteMapTrack "+Q),A[Q]||(A[Q]=[]),A[Q].push(L.start)})});for(var N=[],H=n().createBuffer(2,B,n().sampleRate),E=0;E1&&(P=1),S.push(P)}else S.push(0);return S}else{var B=parseFloat(T);if(B*(v-1)>2)return null;for(var C=v%2===0,j=C?0-B/2:0,G=j+B,A=0;A75&&(T=75),T=T/50-1;var P=0,B=.25;S.den===8&&(B=B/2);for(var C=B/2,j=C*T,G=0;G=A[N].start+C)){var E=H.start;H.start+=j,H.volume*=1+P,N>0&&A[N-1].end===E&&(A[N-1].end=H.start,A[N-1].volume*=1-P)}}}}}return p_=u,p_}var g_,F3;function M3(){if(F3)return g_;F3=1;var a=function(){var t=this;t.tracks=[],t.totalDuration=0,t.currentInstrument=[],t.starts=[],t.addTrack=function(){return t.tracks.push([]),t.currentInstrument.push(0),t.starts.push(0),t.tracks.length-1},t.setInstrument=function(i,n){t.tracks[i].push({channel:0,cmd:"program",instrument:n}),t.currentInstrument[i]=n},t.appendNote=function(i,n,s,r,o){var l={cmd:"note",duration:s,gap:0,instrument:t.currentInstrument[i],pitch:n,start:t.starts[i],volume:r};o&&(l.cents=o),t.tracks[i].push(l),t.starts[i]+=s,t.totalDuration=Math.max(t.totalDuration,t.starts[i])}};return g_=a,g_}var h_,z3;function SU(){if(z3)return h_;z3=1;var a=` +`),l.font.box&&(s||i.paper.openGroup({klass:l.attr.class,fill:i.foregroundColor,"data-name":n.name}),l.attr["text-anchor"]==="end"?l.attr.x-=l.font.padding:l.attr["text-anchor"]==="start"&&(l.attr.x+=l.font.padding),l.attr.y+=l.font.padding,delete l.attr.class),n.noClass&&delete l.attr.class,l.attr.x=a(l.attr.x),l.attr.y=a(l.attr.y),n.name&&(l.attr["data-name"]=n.name);var d=i.paper.text(c,l.attr);if(l.font.box){var g=d.getBBox(),h=0;l.attr["text-anchor"]==="middle"?h=g.width/2+l.font.padding:l.attr["text-anchor"]==="end"&&(h=g.width+l.font.padding*2);var m=0;n.centerVertically&&(m=g.height-l.font.padding),i.paper.rect({"data-name":"box",x:Math.round(n.x-h),y:Math.round(r-m),width:Math.round(g.width+l.font.padding*2),height:Math.round(g.height+l.font.padding*2)}),s||(d=i.paper.closeGroup())}return d}return _h=t,_h}var vh,Bk;function XE(){if(Bk)return vh;Bk=1;var a=Il(),t=Ms(),i=tl();function n(c,d,g){var h=d.startVoice.staff.absoluteY-t.STEP*10;return d.endVoice&&d.endVoice.staff?d.endY=d.endVoice.staff.absoluteY-t.STEP*2:d.lastContinuedVoice&&d.lastContinuedVoice.staff?d.endY=d.lastContinuedVoice.staff.absoluteY-t.STEP*2:d.endY=d.startVoice.staff.absoluteY-t.STEP*2,l(c,d.x,h,d.endY,d.type,d.header,g)}function s(c,d,g,h,m){d+=t.STEP;var p=t.STEP*.75,u=t.STEP*.75,f=h-g,_=a("M %f %f l %f %f l %f %f l %f %f z",d,g-u,0,f+u*2,p,0,0,-(f+u*2)),v=t.STEP*2,b=t.STEP;return _+=a("M %f %f q %f %f %f %f q %f %f %f %f z",d+p,g-u,v*.6,b*.2,v,-b,-v*.1,b*.3,-v,b+t.STEP),_+=a("M %f %f q %f %f %f %f q %f %f %f %f z",d+p,g+u+f,v*.6,-b*.2,v,b,-v*.1,-b*.3,-v,-b-t.STEP),c.paper.path({path:_,stroke:c.foregroundColor,fill:c.foregroundColor,class:c.controller.classes.generate(m),"data-name":m})}function r(c,d,g,h,m){var p=h-g,u=o(d,g,[7.5,-8,21,0,18.5,-10.5,7.5],[0,p/5.5,p/3.14,p/2,p/2.93,p/4.88,0]);return u+=o(d,g,[0,17.5,-7.5,6.6,-5,20,0],[p/2,p/1.46,p/1.22,p,p/1.19,p/1.42,p/2]),c.paper.path({path:u,stroke:c.foregroundColor,fill:c.foregroundColor,class:c.controller.classes.generate(m),"data-name":m})}function o(c,d,g,h){return a("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",c+g[0],d+h[0],c+g[1],d+h[1],c+g[2],d+h[2],c+g[3],d+h[3],c+g[4],d+h[4],c+g[5],d+h[5],c+g[6],d+h[6])}var l=function(c,d,g,h,m,p,u){var f;if(p){c.paper.openGroup({klass:c.controller.classes.generate("staff-extra voice-name"),"data-name":m});var _=g+(h-g)/2;_=_-c.controller.getTextSize.baselineToCenter(p,"voicefont","staff-extra voice-name",0,1),i(c,{x:c.padding.left,y:_,text:p,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return m==="brace"?f=r(c,d,g,h,m):m==="bracket"&&(f=s(c,d,g,h,m)),p&&(f=c.paper.closeGroup()),u.wrapSvgEl({el_type:m,startChar:-1,endChar:-1},f),f};return vh=n,vh}var bh,Pk;function ru(){if(Pk)return bh;Pk=1;function a(t,i,n){var s=t.paper.path(i);return s}return bh=a,bh}var yh,jk;function ZE(){if(jk)return yh;jk=1;var a=Il(),t=ru(),i=Xr();function n(f,_,v){(!_.anchor1||!_.anchor2||!_.anchor1.heads||!_.anchor2.heads||_.anchor1.heads.length===0||_.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var b=4,S=f.calcY(_.anchor1.heads[0].pitch),$=f.calcY(_.anchor2.heads[0].pitch),M=_.anchor1.x+_.anchor1.w/2,N=_.anchor2.x+_.anchor2.w/2,P=s(M,S,N,$),C=_.anchor1.w/2+b,j=_.anchor2.w/2+b,G=r(M,S,N,$),A=o(S,G,C);o($,G,-j);var B=l(P-C-j),H=u(f,M+C,A,B,G);return v.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},H),[H]}function s(f,_,v,b){var S=v-f,$=b-_;return Math.sqrt(S*S+$*$)}function r(f,_,v,b){return(b-_)/(v-f)}function o(f,_,v){return i(f+v*_)}function l(f){var _=5;return Math.max(2,Math.floor((f-_*2)/6))}var c=[[3.5,-4.8]],d=[[1.5,-1],[.3,-.3],[-3.5,3.8]],g=[[-1.5,2]],h=[[3,4],[3,-4]],m=[[-3,4],[-3,-4]];function p(f,_){for(var v="",b=0;b1&&c.indexOf(".")<0){var m=i.isInGroup()?"":d.klass;r.paper.openGroup({"data-name":d.name,klass:m});for(var p=0,u=0;u0?l.linewidth+o.lineThickness:l.linewidth-o.lineThickness;l.graphelem=t(o,l.x,u,d,o.calcY(l.pitch2),"abcjs-stem","stem");break;case"ledger":l.graphelem=i(o,l.x,l.x+l.w,l.pitch,"abcjs-ledger","ledger",.35+o.lineThickness);break}return l.scalex!==1&&l.graphelem&&r(o.paper,l.graphelem,l.scalex,l.scaley,l.x,d),l.graphelem}function r(o,l,c,d,g,h){o.setAttributeOnElement(l,{style:"transform:scale("+c+","+d+");transform-origin:"+g+"px "+h+"px;"})}return Uh=s,Uh}var Rh,e3;function oU(){if(e3)return Rh;e3=1;var a=Zk(),t=tl();function i(n,s){var r=s.x;s.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),s.tempo.el_type="tempo";var o=n.calcY(s.pitch)+2,l,c;if(s.tempo.preString){l=t(n,{x:r,y:o,text:s.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),c=n.controller.getTextSize.calc(s.tempo.preString,"tempofont","tempo",l);var d=c.width,g=d/s.tempo.preString.length;r+=d+g}if(s.note){s.note.setX(r);for(var h=0;h0&&l.children[0].type==="TempoElement";l.elemset=[],s.beginGroup(o.paper,o.controller);for(var m=0;m=0&&u.setAttribute("class","abcjs-notehead"),u&&p.chordPos&&p.name.indexOf("flags.")!==0){var f=u.getAttribute("class");f?f=f+" abcjs-chord-pos-"+p.chordPos:f="abcjs-chord-pos-"+p.chordPos,u.setAttribute("class",f)}}}var f=l.type;if((l.type==="note"||l.type==="rest")&&(l.counters=o.controller.classes.getCurrent(),f+=" d"+Math.round(l.durationClass*1e3)/1e3,f=f.replace(/\./g,"-"),l.abcelem.pitches))for(var _=0;_0?v.classList[0]+" ":"";v.setAttribute("class",b+l.overrideClasses)}if(h)l.startChar=l.abcelem.startChar,l.endChar=l.abcelem.endChar,d.add(l,v,!1,g);else{l.elemset.push(v);var S=!1;(l.type==="note"||l.type==="tabNumber")&&(S=!0),d.add(l,v,S,g)}}else l.elemset.length>0&&d.add(l,l.elemset[0],l.type==="note",g);if(l.klass&&n(l.elemset,"mark","","#00ff00"),l.hint&&n(l.elemset,"abcjs-hint","",null),l.abcelem.abselem=l,l.heads&&l.heads.length>0){l.notePositions=[];for(var $=0;$=0;m--){var p=(m+1)*d;h=i.calcY(p),g===0&&(g=h),a(i,n,s,p,c,null,l+i.lineThickness),c=void 0}return i.paper.closeGroup(),[g,h]}return jh=t,jh}var Nh,n3;function uU(){if(n3)return Nh;n3=1;function a(t,i,n){var s=t.paper.rectBeneath(i);return n&&t.paper.text(n,{x:0,y:i.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),s}return Nh=a,Nh}var Oh,s3;function fU(){if(s3)return Oh;s3=1;function a(t,i){var n="rgba(0,0,0,255)",s="rgba(0,0,0,0)",r=Math.round(t.y),o=t.controller.width,l=(o-i)/2,c=l+i,d="M "+l+" "+r+" L "+c+" "+r+" L "+c+" "+(r+1)+" L "+l+" "+(r+1)+" L "+l+" "+r+" z";t.paper.pathToBack({path:d,stroke:s,fill:n,class:t.controller.classes.generate("defined-text")})}return Oh=a,Oh}var Ih,r3;function o3(){if(r3)return Ih;r3=1;var a=fU(),t=tl();function i(n,s,r){for(var o=0;o=0&&v.voices&&d(g,h.voices,v.voices),g.showDebug.indexOf("grid")>=0&&(g.paper.dottedLine({x1:g.padding.left,x2:g.padding.left+g.controller.width,y1:f,y2:f,stroke:"#0000ff"}),s(g,{x:g.padding.left,y:g.calcY(v.originalTop),width:g.controller.width,height:g.calcY(v.originalBottom)-g.calcY(v.originalTop),fill:g.foregroundColor,stroke:g.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),u=0,U(v,"chordHeightAbove"),U(v,"chordHeightBelow"),U(v,"dynamicHeightAbove"),U(v,"dynamicHeightBelow"),U(v,"endingHeightAbove"),U(v,"lyricHeightAbove"),U(v,"lyricHeightBelow"),U(v,"partHeightAbove"),U(v,"tempoHeightAbove"),U(v,"volumeHeightAbove"),U(v,"volumeHeightBelow"))),g.moveY(a.STEP,-v.bottom),g.showDebug&&g.showDebug.indexOf("grid")>=0&&g.paper.dottedLine({x1:g.padding.left,x2:g.padding.left+g.controller.width,y1:g.y,y2:g.y,stroke:"#0000aa"})}for(var b,S,$=2,M=0,N=0;N1&&(b=h.staffs[0].topLine,S=h.staffs[H-1].bottomLine,r(g,h.startx,.6,b,S,null)),g.y=f;function U(E,O){var V=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(E.positionY&&E.positionY[O]){var L=E.specialY[O]*a.STEP;O==="chordHeightAbove"&&E.specialY.chordLines&&E.specialY.chordLines.above&&(L*=E.specialY.chordLines.above),O==="chordHeightBelow"&&E.specialY.chordLines&&E.specialY.chordLines.below&&(L*=E.specialY.chordLines.below),s(g,{x:g.padding.left,y:g.calcY(E.positionY[O]),width:g.controller.width,height:L,fill:V[u],stroke:V[u],"fill-opacity":.4,"stroke-opacity":.4},O.substr(0,4)),u+=1,u>6&&(u=0)}}}function c(g,h,m,p,u){if(m)for(var f=0;f=0},i.prototype.wrapSvgEl=function(n,s){var r={tuneNumber:this.tuneNumber,abcelem:n,elemset:[s],highlight:a,unhighlight:t};this.add(r,s,!1)},Vh=i,Vh}var Hh,u3;function hU(){if(u3)return Hh;u3=1;const a=Th(),t=Mh();function i(b,S,$,M,N){const P=N.gchordfont;N.partsfont;const C=N.annotationfont,j=N.repeatfont,G=N.textfont,A=N.subtitlefont,B=50,H=10,U=14,E=10,O=20,V=16;b.paper.openGroup({klass:"abcjs-chord-grid"}),S.forEach(L=>{switch(L.type){case"text":v(b,L.text,$,b.y,16,G,null,null,!1),b.moveY(V);break;case"subtitle":v(b,L.subtitle,$,b.y+E,20,A,null,"abcjs-subtitle",!1),b.moveY(O);break;case"part":if(L.lines.length>0){v(b,L.name,$,b.y+E,20,A,L.name,"abcjs-part",!1),b.moveY(O);const T=L.lines[0].length,F=M/T;L.lines.forEach((z,D)=>{let K=!1,X=!1;z.forEach(ce=>{ce.ending&&(K=!0),ce.annotations&&ce.annotations.length>0&&(X=!0)});const ee=X?U:K?H:0;z.forEach((ce,fe)=>{if(!ce.noBorder){b.paper.rect({x:$+fe*F,y:b.y,width:F,height:ee+B}),b.paper.rect({x:$+fe*F+1,y:b.y+1,width:F-2,height:ee+B-2});let ge=0,R=0;const we=b.y,pe=$+F*fe;ce.hasStartRepeat&&(s(b,pe,we,we+B+ee,!0,ee),ge=12),ce.hasEndRepeat&&(s(b,pe+F,we,we+B+ee,!1,ee),R=12);let Te=0;ce.ending&&(Te=v(b,ce.ending,$+fe*F+4,we+10,12,j,null,null,!1).getBBox().width+4),l(b,we,$+ge,F,D,fe,ce.chord,P,ge+R,B,ee),ce.annotations&&ce.annotations.length>0&&o(b,we,$+fe*F+Te,ce.annotations,C),ee&&b.paper.rectBeneath({x:$+fe*F,y:b.y,width:F,height:ee,fill:"#e8e8e8",stroke:"none"})}}),b.moveY(ee+B)}),b.moveY(O)}break}}),b.paper.closeGroup()}function n(b,S,$,M){var N=S-10,P=S+10,C=$+10,j=$-10,G=S-10,A=-b.yToPitch(M)+2,B=S+6.5,H=-b.yToPitch(M)-2.3;b.paper.lineToBack({x1:N,x2:P,y1:C,y2:j,"stroke-width":"3px","stroke-linecap":"round"}),a(b,G,A,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),a(b,B,H,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"})}function s(b,S,$,M,N,P){const C=N?S+2:S-4,j=N?S+9:S-11;b.paper.openGroup({klass:"abcjs-repeat"}),t(b,C,3+b.lineThickness,$,M,null,"bar"),a(b,j,-b.yToPitch(P)-4,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),a(b,j,-b.yToPitch(P)-8,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),b.paper.closeGroup()}const r={segno:"scripts.segno",coda:"scripts.coda",fermata:"scripts.ufermata"};function o(b,S,$,M,N){$+=3;let P;for(let C=0;CC&&A>=14;)A-=2,j.setAttribute("font-size",A),G=j.getBBox()}const d=34,g=26,h=20,m=-3;function p(b,S,$,M,N,P,C,j){P==="%"?n(b,S+M/2,$+N/2,j+N/2):c(b,S+M/2,$+N/2+m,d,P,C,M)}function u(b,S,$,M,N,P,C,j,G){b.paper.lineToBack({x1:S,x2:S+M,y1:$+N+G,y2:$+2}),c(b,S+M/4,$+N/4+5+G+m,g,P,j,M/2),c(b,S+3*M/4,$+3*N/4+G+m,g,C,j,M/2)}function f(b,S,$,M,N,P,C,j){b.paper.lineToBack({x1:S+3,x2:S+M-3,y1:$+N/2+j,y2:$+N/2+j}),b.paper.lineToBack({x1:S+M/2,x2:S+M/2,y1:$+3+j,y2:$+N-3+j}),P[0]&&c(b,S+M/4,$+N/4+2+j+m,h,_(P[0]),C,M/2),P[1]&&c(b,S+3*M/4,$+N/4+2+j+m,h,_(P[1]),C,M/2),P[2]&&c(b,S+M/4,$+3*N/4+j+m,h,_(P[2]),C,M/2),P[3]&&c(b,S+3*M/4,$+3*N/4+j+m,h,_(P[3]),C,M/2)}function _(b){return b==="No Chord"?"N.C.":b}function v(b,S,$,M,N,P,C,j,G){const A={x:$,y:M,stroke:"none","font-size":N,"font-style":P.style,"font-family":P.face,"font-weight":P.weight,"text-decoration":P.decoration};return C&&(A["data-name"]=C),j&&(A.class=j),A["text-anchor"]=G?"middle":"start",b.paper.text(S,A,null,{"alignment-baseline":"middle"})}return Hh=i,Hh}var Wh,f3;function _U(){if(f3)return Wh;f3=1;var a=pU(),t=mU(),i=o3(),n=Ms(),s=gU(),r=hU();function o(d,g,h,m,p,u,f,_,v,b,S){var $=new s(d.paper,_,v),M={};g.shouldAddClasses&&(M.klass="abcjs-meta-top"),d.paper.openGroup(M),d.moveY(d.padding.top),i(d,h.topText,$),d.paper.closeGroup(),d.moveY(d.spacing.music);let N=!1;S&&h.chordGrid&&(r(d,h.chordGrid,d.padding.left,m,h.formatting),S==="noMusic"&&(N=!0));var P=[],C=0;if(!N)for(var j=0;jh.formatting.maxStaves)break;g.shouldAddClasses&&(M.klass="abcjs-staff-wrapper abcjs-l"+g.lineNumber),d.paper.openGroup(M),G.vskip&&d.moveY(G.vskip),P.length>=1?c(d,d.spacing.staffSeparation,P[P.length-1],G.staffGroup):j>0&&d.moveY(d.spacing.staffSeparation);var A=l(d,G.staffGroup,$,j);A.line=b+j,P.push(A),d.paper.closeGroup()}else G.nonMusic&&(g.shouldAddClasses&&(M.klass="abcjs-non-music"),d.paper.openGroup(M),i(d,G.nonMusic,$),d.paper.closeGroup())}return g.reset(),N||h.bottomText&&h.bottomText.rows&&h.bottomText.rows.length>0&&(g.shouldAddClasses&&(M.klass="abcjs-meta-bottom"),d.paper.openGroup(M),d.moveY(24),i(d,h.bottomText,$),d.paper.closeGroup()),t(d,p,f,u),{staffgroups:P,selectables:$.getElements()}}function l(d,g,h,m){a(d,g,h,m);var p=g.height*n.STEP;return d.moveY(p),g}function c(d,g,h,m){var p=h.staffs[h.staffs.length-1],u=-(p.bottom-2),f=m.staffs[0].top-10,_=f+u,v=_*n.STEP;v=0&&s.1||(this.scale=void 0),$.staffwidth?(this.staffwidthScreen=$.staffwidth,this.staffwidthPrint=$.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],$.clickListener&&this.addSelectListener($.clickListener),this.renderer=new i(S),this.renderer.setPaddingOverride($),$.showDebug&&(this.renderer.showDebug=$.showDebug),$.jazzchords&&(this.jazzchords=$.jazzchords),$.accentAbove&&(this.accentAbove=$.accentAbove),$.germanAlphabet&&(this.germanAlphabet=$.germanAlphabet),$.lineThickness&&(this.lineThickness=$.lineThickness),$.chordGrid&&(this.chordGrid=$.chordGrid),this.renderer.controller=this,this.renderer.foregroundColor=$.foregroundColor?$.foregroundColor:"currentColor",$.ariaLabel!==void 0&&(this.renderer.ariaLabel=$.ariaLabel),this.renderer.minPadding=$.minPadding?$.minPadding:0,this.reset()};_.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},_.prototype.engraveABC=function(S,$,M){S[0]===void 0&&(S=[S]),this.reset();for(var N=0;N0)for(var G=j.staffGroup.voices[0],A=!1,B=0,H=0;Hthis.width+1&&(S.topText=new o(S.metaText,S.metaTextInfo,S.formatting,S.lines,C,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),S.lines&&S.lines.length>0))for(var j=S.lines.length,G=0;G0)for(var B=A.nonMusic.rows.length,H=0;H0&&A.text[0].center&&(U.left=C/2+this.renderer.padding.left))}}S.tablatures&&u.layoutTablatures(this.renderer,S);var E=p(this.renderer,this.classes,S,this.width,C,this.responsive,P,this.selectTypes,$,M,this.chordGrid);if(this.staffgroups=E.staffgroups,this.selectables=E.selectables,this.oneSvgPerLine){var O=this.renderer.paper.svg.parentNode;this.svgs=v(this.renderer,O,S.metaText.title,this.responsive,P)}else this.svgs=[this.renderer.paper.svg];c(this,this.svgs),this.jazzchords=N};function v(S,$,M,N,P){M||(M="Untitled");var C=$.querySelector("svg");N==="resize"&&($.style.paddingBottom="");for(var j=C.querySelector("style"),G=N==="resize"?C.viewBox.baseVal.width:C.getAttribute("width"),A=$.querySelectorAll("svg > g"),B=0,H=[],U=0;U',d.style.overflowX="hidden",d.style.overflowY="auto",d=d.children[0]):d.innerHTML="";var u=new t(d,h);if(u.engraveABC(g,m,p),g.engraver=u,h.viewportVertical||h.viewportHorizontal){var f=d.parentNode;f.style.width=d.style.width}}var l=function(d,g,h,m,p){var u={},f;if(h){for(f in h)h.hasOwnProperty(f)&&(u[f]=h[f]);u.warnings_id&&u.tablature&&(u.tablature.warning_id=u.warnings_id)}if(m)for(f in m)m.hasOwnProperty(f)&&(f==="listener"?m[f].highlight&&(u.clickListener=m[f].highlight):u[f]=m[f]);if(p)for(f in p)p.hasOwnProperty(f)&&(u[f]=p[f]);function _(v,b,S,$){var M=!1;return v==="*"&&(M=!0,v=document.createElement("div"),v.setAttribute("style","visibility: hidden;"),document.body.appendChild(v)),!M&&u.wrap&&u.staffwidth?(b=c(v,b,S,$,u),b):(u.afterParsing&&u.afterParsing(b,S,$),o(v,b,u,S,0),M&&v.parentNode.removeChild(v),null)}return a.renderEngine(_,d,g,u)};function c(d,g,h,m,p){var u=new t(d,p),f=u.getMeasureWidths(g),_=n.calcLineWraps(g,f,p);if(_.reParse){var v=new i;v.parse(m,_.revisedParams),g=v.getTune();var b=v.getWarnings();b&&(g.warnings=b)}return p.afterParsing&&p.afterParsing(g,h,m),o(d,g,_.revisedParams,h,0),g.explanation=_.explanation,g}return Jh=l,Jh}var Xh,_3;function bU(){if(_3)return Xh;_3=1;var a=If(),t=Yh(),i=function(n,s){function r(o,l,c,d){o=document.createElement("div"),o.setAttribute("style","visibility: hidden;"),document.body.appendChild(o);var g=new t(o,s),h=g.getMeasureWidths(l);return o.parentNode.removeChild(o),{sections:h}}return a.renderEngine(r,"*",n,s)};return Xh=i,Xh}var Zh,v3;function e_(){if(v3)return Zh;v3=1;var a={};return Zh=a,Zh}var t_,b3;function yU(){if(b3)return t_;b3=1;var a=e_(),t=function(i,n,s,r){a[n]||(a[n]={});var o=a[n];return o[s]||(o[s]=new Promise(function(l,c){var d=new XMLHttpRequest;let g=i+n+"-mp3/"+s+".mp3";d.open("GET",g,!0),d.responseType="arraybuffer",d.onload=function(){if(d.status!==200){c(Error("Can't load sound at "+g+" status="+d.status));return}var h=function(p){l({instrument:n,name:s,status:"loaded",audioBuffer:p})},m=r.decodeAudioData(d.response,h,function(){c(Error("Can't decode sound at "+g))});m&&typeof m.catch=="function"&&m.catch(c)},d.onerror=function(){c(Error("Can't load sound at "+g))},d.send()}).catch(l=>{throw console.error("Didn't load note",n,s,":",l.message),l})),o[s]};return t_=t,t_}var a_,y3;function i_(){if(y3)return a_;y3=1;var a=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];return a_=a,a_}var n_,w3;function wU(){if(w3)return n_;w3=1;var a=i_(),t=function(i){for(var n=[],s=0;s0){var g=c.gap?c.gap:0,h=c.duration;g=Math.min(g,h*2/3);var m={pitch:c.pitch,instrument:d,start:Math.round(c.start*1e6)/1e6,end:Math.round((c.start+h-g)*1e6)/1e6,volume:c.volume};c.startChar&&(m.startChar=c.startChar),c.endChar&&(m.endChar=c.endChar),c.style&&(m.style=c.style),c.cents&&(m.cents=c.cents),n[l].push(m)}break;case"program":r=a[c.instrument];break;case"text":break;default:console.log("Unhandled midi event",c)}})}),n};return n_=t,n_}var s_,k3;function Df(){if(k3)return s_;k3=1;function a(t){if(t)window.abcjsAudioContext=t;else if(!window.abcjsAudioContext){var i=window.AudioContext||window.webkitAudioContext;if(i)window.abcjsAudioContext=new i;else return!1}return window.abcjsAudioContext.state!=="suspended"}return s_=a,s_}var r_,x3;function Nc(){if(x3)return r_;x3=1;var a=Df();function t(){return window.abcjsAudioContext||a(),window.abcjsAudioContext}return r_=t,r_}var o_,S3;function Lf(){if(S3)return o_;S3=1;var a=Nc();function t(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var i=a();if(i)return i.resume!==void 0}return o_=t,o_}var l_,T3;function c_(){if(T3)return l_;T3=1;var a={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"};return l_=a,l_}var d_,$3;function kU(){if($3)return d_;$3=1;var a=function(i){return window.URL.createObjectURL(t(i.audioBuffers))};function t(i){var n=i[0],s=n.numberOfChannels,r=n.length*s*2+44,o=new ArrayBuffer(r),l=new DataView(o),c=[],d,g,h=0,m=0;for(u(1179011410),u(r-8),u(1163280727),u(544501094),u(16),p(1),p(s),u(n.sampleRate),u(n.sampleRate*2*s),p(s*2),p(16),u(1635017060),u(r-m-4),d=0;d0){if(f.debugCallback&&f.debugCallback("pending "+JSON.stringify(G)),M?M=M*2:M=50,M<9e4)return new Promise(function(V,L){setTimeout(function(){var T=[];for(B=0;B0?T.audioBuffers[0].duration:0;return{status:n().state,duration:F}};var M=n().currentTime,N=f.millisecondsPerMeasure/1e3/f.meterSize;if(f.duration=f.flattened.totalDuration*N,f.duration<=0)return f.audioBuffers=[],S({status:"empty",seconds:0});f.duration+=b;var P=Math.floor(n().sampleRate*f.duration);f.stop();var C=t(f.flattened);if(f.options.swing){var j=f.options.drumIntro?0:f.pickupLength;v(C,f.options.swing,f.meterFraction,j)}f.sequenceCallback&&f.sequenceCallback(C,f.callbackContext);var G=_(C.length,f.pan),A={};C.forEach(function(T,F){var z=G&&G.length>F?G[F]:0;T.forEach(function(D){var K=D.instrument+":"+D.pitch+":"+D.volume+":"+Math.round((D.end-D.start)*1e3)/1e3+":"+z+":"+N+":"+(D.cents?D.cents:0);f.debugCallback&&f.debugCallback("noteMapTrack "+K),A[K]||(A[K]=[]),A[K].push(D.start)})});for(var B=[],H=n().createBuffer(2,P,n().sampleRate),U=0;U1&&(N=1),$.push(N)}else $.push(0);return $}else{var P=parseFloat(S);if(P*(b-1)>2)return null;for(var C=b%2===0,j=C?0-P/2:0,G=j+P,A=0;A75&&(S=75),S=S/50-1;var N=0,P=.25;$.den===8&&(P=P/2);for(var C=P/2,j=C*S,G=0;G=A[B].start+C)){var U=H.start;H.start+=j,H.volume*=1+N,B>0&&A[B-1].end===U&&(A[B-1].end=H.start,A[B-1].volume*=1-N)}}}}}return p_=u,p_}var g_,F3;function M3(){if(F3)return g_;F3=1;var a=function(){var t=this;t.tracks=[],t.totalDuration=0,t.currentInstrument=[],t.starts=[],t.addTrack=function(){return t.tracks.push([]),t.currentInstrument.push(0),t.starts.push(0),t.tracks.length-1},t.setInstrument=function(i,n){t.tracks[i].push({channel:0,cmd:"program",instrument:n}),t.currentInstrument[i]=n},t.appendNote=function(i,n,s,r,o){var l={cmd:"note",duration:s,gap:0,instrument:t.currentInstrument[i],pitch:n,start:t.starts[i],volume:r};o&&(l.cents=o),t.tracks[i].push(l),t.starts[i]+=s,t.totalDuration=Math.max(t.totalDuration,t.starts[i])}};return g_=a,g_}var h_,z3;function SU(){if(z3)return h_;z3=1;var a=` -`;return y_=a,y_}var w_,P3;function j3(){if(P3)return w_;P3=1;var a=Lf(),t=Df(),i=Ic(),n=SU(),s=TU(),r=$U(),o=qU(),l=CU();function c(p,u){var f=this;if(typeof p=="string"){var _=p;if(p=document.querySelector(_),!p)throw new Error('Cannot find element "'+_+'" in the DOM.')}else if(!(p instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(f.parent=p,f.options={},u&&(f.options=Object.assign({},u)),f.options.ac&&t(f.options.ac),d(f.parent,f.options),m(f),f.disable=function(v){var T=f.parent.querySelector(".abcjs-inline-audio");v?T.classList.add("abcjs-disabled"):T.classList.remove("abcjs-disabled")},f.setWarp=function(v,T){var S=f.parent.querySelector(".abcjs-midi-tempo");S.value=Math.round(T),f.setTempo(v)},f.setTempo=function(v){var T=f.parent.querySelector(".abcjs-midi-current-tempo");T&&(T.innerHTML=Math.round(v))},f.resetAll=function(){for(var v=f.parent.querySelectorAll(".abcjs-pushed"),T=0;T -`;if(f){var P=u.repeatTitle?u.repeatTitle:"Click to toggle play once/repeat.",B=u.repeatAria?u.repeatAria:P;M+=' +`;return y_=a,y_}var w_,P3;function j3(){if(P3)return w_;P3=1;var a=Lf(),t=Df(),i=Nc(),n=SU(),s=TU(),r=$U(),o=qU(),l=CU();function c(p,u){var f=this;if(typeof p=="string"){var _=p;if(p=document.querySelector(_),!p)throw new Error('Cannot find element "'+_+'" in the DOM.')}else if(!(p instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(f.parent=p,f.options={},u&&(f.options=Object.assign({},u)),f.options.ac&&t(f.options.ac),d(f.parent,f.options),m(f),f.disable=function(b){var S=f.parent.querySelector(".abcjs-inline-audio");b?S.classList.add("abcjs-disabled"):S.classList.remove("abcjs-disabled")},f.setWarp=function(b,S){var $=f.parent.querySelector(".abcjs-midi-tempo");$.value=Math.round(S),f.setTempo(b)},f.setTempo=function(b){var S=f.parent.querySelector(".abcjs-midi-current-tempo");S&&(S.innerHTML=Math.round(b))},f.resetAll=function(){for(var b=f.parent.querySelectorAll(".abcjs-pushed"),S=0;S +`;if(f){var N=u.repeatTitle?u.repeatTitle:"Click to toggle play once/repeat.",P=u.repeatAria?u.repeatAria:N;M+=' `}if(_){var C=u.restartTitle?u.restartTitle:"Click to go to beginning.",j=u.restartAria?u.restartAria:C;M+=' -`}if(b){var G=u.playTitle?u.playTitle:"Click to play/pause.",A=u.playAria?u.playAria:G;M+=' -`}if(v){var N=u.randomTitle?u.randomTitle:"Click to change the playback position.",H=u.randomAria?u.randomAria:N;M+=' -`}if(S&&(M+=` -`),T){var E=u.warpTitle?u.warpTitle:"Change the playback speed.",U=u.warpAria?u.warpAria:E,O=u.bpm?u.bpm:"BPM";M+=' ( '+O+`) +`}if(v){var G=u.playTitle?u.playTitle:"Click to play/pause.",A=u.playAria?u.playAria:G;M+=' +`}if(b){var B=u.randomTitle?u.randomTitle:"Click to change the playback position.",H=u.randomAria?u.randomAria:B;M+=' +`}if($&&(M+=` +`),S){var U=u.warpTitle?u.warpTitle:"Change the playback speed.",E=u.warpAria?u.warpAria:U,O=u.bpm?u.bpm:"BPM";M+=' ( '+O+`) `}M+='
            CSS required: load abcjs-audio.css
            ',M+=` -`,p.innerHTML=M}function g(p,u,f,_,b){var v=!0;if(i()?v=i().state==="suspended":t(),!a())throw{status:"NotSupported",message:"This browser does not support audio."};(v||b)&&f&&f.classList.add("abcjs-loading"),v?i().resume().then(function(){_?_().then(function(T){h(p,u,f,b)}):h(p,u,f,b)}):h(p,u,f,b)}function h(p,u,f,_){_?p(u).then(function(){f&&f.classList.remove("abcjs-loading")}):(p(u),f&&f.classList.remove("abcjs-loading"))}function m(p){var u=!!p.options.loopHandler,f=!!p.options.restartHandler,_=!!p.options.playHandler||!!p.options.playPromiseHandler,b=!!p.options.progressHandler,v=!!p.options.warpHandler,T=p.parent.querySelector(".abcjs-midi-start");u&&p.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function(S){g(p.options.loopHandler,S,T,p.options.afterResume)}),f&&p.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function(S){g(p.options.restartHandler,S,T,p.options.afterResume)}),_&&T.addEventListener("click",function(S){g(p.options.playPromiseHandler||p.options.playHandler,S,T,p.options.afterResume,!!p.options.playPromiseHandler)}),b&&p.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function(S){g(p.options.progressHandler,S,T,p.options.afterResume)}),v&&p.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function(S){g(p.options.warpHandler,S,T,p.options.afterResume)})}return w_=c,w_}var k_,N3;function AU(){if(N3)return k_;N3=1;var a=M3(),t=m_(),i=Ic();function n(r,o,l,c,d){for(var g=new a,h=0;h=1&&parseInt(r.cursorControl.beatSubdivisions,10)<=64&&(d=parseInt(r.cursorControl.beatSubdivisions,10)),r.timer=new i(r.visualObj,{beatCallback:r.beatCallback,eventCallback:r.eventCallback,lineEndCallback:r.lineEndCallback,qpm:r.currentTempo,extraMeasuresAtBeginning:r.cursorControl?r.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:r.cursorControl?r.cursorControl.lineEndAnticipation:0,beatSubdivisions:d}),r.cursorControl&&r.cursorControl.onReady&&typeof r.cursorControl.onReady=="function"&&r.cursorControl.onReady(r),r.isLoaded=!0,r.isLoading=!1,Promise.resolve({status:"created",notesStatus:c})})},r.destroy=function(){r.timer&&(r.timer.reset(),r.timer.stop(),r.timer=null),r.midiBuffer&&(r.midiBuffer.stop(),r.midiBuffer=null),r.setProgress(0,1),r.control&&r.control.resetAll()},r.play=function(){return r.runWhenReady(r._play,void 0)};function o(l){return new Promise(function(c){setTimeout(c,l)})}r.runWhenReady=function(l,c){return r.visualObj?r.isLoading?o(500).then(function(){return r.isLoading?r.runWhenReady(l,c):l(c)}):r.isLoaded?l(c):r.go().then(function(){return l(c)}):Promise.resolve({status:"loading"})},r._play=function(){return n().resume().then(function(){return r.isStarted=!r.isStarted,r.isStarted?(r.cursorControl&&r.cursorControl.onStart&&typeof r.cursorControl.onStart=="function"&&r.cursorControl.onStart(),r.midiBuffer.start(),r.timer.start(r.percent),r.control&&r.control.pushPlay(!0)):r.pause(),Promise.resolve({status:"ok"})})},r.pause=function(){r.timer&&(r.timer.pause(),r.midiBuffer.pause(),r.control&&r.control.pushPlay(!1))},r.toggleLoop=function(){r.isLooping=!r.isLooping,r.control&&r.control.pushLoop(r.isLooping)},r.restart=function(){r.timer&&(r.timer.setProgress(0),r.midiBuffer.seek(0))},r.randomAccess=function(l){return r.runWhenReady(r._randomAccess,l)},r._randomAccess=function(l){var c=l.target.classList.contains("abcjs-midi-progress-indicator")?l.target.parentNode:l.target,d=(l.x-c.getBoundingClientRect().left)/c.offsetWidth;return d<0&&(d=0),d>1&&(d=1),r.seek(d),Promise.resolve({status:"ok"})},r.seek=function(l,c){r.timer&&r.midiBuffer&&(r.timer.setProgress(l,c),r.midiBuffer.seek(l,c))},r.setWarp=function(l){if(parseInt(l,10)>0){r.warp=parseInt(l,10);var c=r.isStarted,d=r.percent;return r.destroy(),r.isStarted=!1,r.go().then(function(){return r.setProgress(d,r.midiBuffer.duration*1e3),r.control&&r.control.setWarp(r.currentTempo,r.warp),c?r.play().then(function(){return r.seek(d),Promise.resolve()}):(r.seek(d),Promise.resolve())})}return Promise.resolve()},r.onWarp=function(l){var c=l.target.value;return r.setWarp(c)},r.setProgress=function(l,c){r.percent=l,r.control&&r.control.setProgress(l,c)},r.finished=function(){if(r.timer.reset(),r.isLooping)return r.timer.start(0),r.midiBuffer.finished(),r.midiBuffer.start(),"continue";r.timer.stop(),r.isStarted&&(r.control&&r.control.pushPlay(!1),r.isStarted=!1,r.midiBuffer.finished(),r.cursorControl&&r.cursorControl.onFinished&&typeof r.cursorControl.onFinished=="function"&&r.cursorControl.onFinished(),r.setProgress(0,1))},r.beatCallback=function(l,c,d,g){var h=l/c;r.setProgress(h,d),r.cursorControl&&r.cursorControl.onBeat&&typeof r.cursorControl.onBeat=="function"&&r.cursorControl.onBeat(l,c,d,g)},r.eventCallback=function(l){if(l)r.cursorControl&&r.cursorControl.onEvent&&typeof r.cursorControl.onEvent=="function"&&r.cursorControl.onEvent(l);else return r.finished()},r.lineEndCallback=function(l,c){r.cursorControl&&r.cursorControl.onLineEnd&&typeof r.cursorControl.onLineEnd=="function"&&r.cursorControl.onLineEnd(l,c)},r.getUrl=function(){return r.midiBuffer.download()},r.download=function(l){var c=r.getUrl(),d=document.createElement("a");document.body.appendChild(d),d.setAttribute("style","display: none;"),d.href=c,d.download=l||"output.wav",d.click(),window.URL.revokeObjectURL(c),document.body.removeChild(d)}}return x_=s,x_}var S_,D3;function L3(){if(D3)return S_;D3=1;var a=C3(),t;return(function(){function i(m,p){for(var u in p)p.hasOwnProperty(u)&&m.setAttribute(u,p[u]);return m}function n(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}n.prototype.setTempo=function(m){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+d(Math.round(6e7/m),6),this.endTrack())},n.prototype.setGlobalInfo=function(m,p,u,f){if(this.trackcount===0){this.startTrack();var _=Math.round(6e7/m);this.track+="%00%FF%51%03"+d(_,6),u&&(this.track+=o(u)),f&&(this.track+=l(f)),p&&(this.track+=r(p,"%01")),this.endTrack()}},n.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},n.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var m=d(this.track.length/3+4,8);this.track="MTrk"+m+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},n.prototype.setText=function(m,p){m==="name"&&(this.trackName=r(p,"%03"))},n.prototype.setInstrument=function(m){this.trackInstrument="%00%C0"+d(m,2),this.instrument=m},n.prototype.setChannel=function(m,p){this.channel=m;var u="%00%B"+this.channel.toString(16);this.track+=u+"%79%00",this.track+=u+"%40%00",this.track+=u+"%5B%30",p||(p=0),p=Math.round((p+1)*64),this.track+=u+"%0A"+d(p,2),this.track+=u+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var s=4096;n.prototype.startNote=function(m,p,u){if(this.track+=h(this.silencelength),this.silencelength=0,u){this.track+="%e"+this.channel.toString(16);var f=Math.round(a(u)*s);this.track+=g(8192+f),this.track+=h(0),this.noteWarped[m]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+m.toString(16)+d(p,2)},n.prototype.endNote=function(m){this.track+=h(this.silencelength),this.silencelength=0,this.noteWarped[m]&&(this.track+="%e"+this.channel.toString(16),this.track+=g(8192),this.track+=h(0),this.noteWarped[m]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+m.toString(16)+"%00"},n.prototype.addRest=function(m){this.silencelength+=m,this.silencelength<0&&(this.silencelength=0)},n.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+d(this.trackcount,4)+"%01%e0"+this.trackstrings},n.prototype.embed=function(m,p){var u=this.getData(),f=i(document.createElement("a"),{href:u});if(f.innerHTML="download midi",m.insertBefore(f,m.firstChild),!p){var _=i(document.createElement("embed"),{src:u,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});m.insertBefore(_,m.firstChild)}};function r(m,p){for(var u="",f=0;fp&&(u=u.substring(0,p)),c(u)}function g(m){m=Math.round(m);var p=m%128,u=m-p;return d(u*2+p,4)}function h(m){var p=0,u=[];for(m=Math.round(m);m!==0;)u.push(m&127),m=m>>7;for(var f=u.length-1;f>=0;f--){p=p<<8;var _=u[f];f!==0&&(_=_|128),p=p|_}var b=p.toString(16).length;return b+=b%2,d(p,b)}t=function(){return new n}})(),S_=t,S_}var T_,V3;function GU(){if(V3)return T_;V3=1;var a=L3(),t;return(function(){var i=1920;t=function(r,o){o===void 0&&(o={});var l=r.setUpAudio(o),c=a(),d=r.metaText?r.metaText.title:void 0;d&&d.length>128&&(d=d.substring(0,124)+"...");var g=r.getKeySignature(),h=r.getMeterFraction(),m=l.tempo,p=m/60;if(h.den===8&&h.num!==5&&h.num!==7){var u=r.millisecondsPerMeasure();m=6e4/(u/h.num)/2,p=m/60}c.setGlobalInfo(m,d,g,h);for(var f=0;ff&&(T=o.pan[f]),v.instrument===128?(c.setChannel(9,T),c.setInstrument(0)):(c.setChannel(v.channel,T),c.setInstrument(v.instrument));break;case"note":var S=v.gap*p,M=v.start,P=M+v.duration-S;_[M]||(_[M]=[]),_[M].push({pitch:v.pitch,volume:v.volume,cents:v.cents}),_[P]||(_[P]=[]),_[P].push({pitch:v.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+v.cmd)}}n(c,_,i),c.endTrack()}return c.getData()};function n(s,r,o){for(var l=Object.keys(r),c=0;cd){var m=(l[g]-d)*o;s.addRest(m),d=l[g]}for(var p=0;p';o.preTextDownload&&(g+=o.preTextDownload);var h=r.metaText&&r.metaText.title?r.metaText.title:"Untitled",m;o.downloadLabel&&n(o.downloadLabel)?m=o.downloadLabel(r,c):o.downloadLabel?m=o.downloadLabel.replace(/%T/,h):m='Download MIDI for "'+h+'"',h=h.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var p=o.fileName?o.fileName:h+".midi";return g+=''+m+"",o.postTextDownload&&(g+=o.postTextDownload),g+""};return $_=i,$_}var q_,W3;function Q3(){if(W3)return q_;W3=1;try{if(typeof window.CustomEvent!="function"){var a=function(i,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var s=document.createEvent("CustomEvent");return s.initCustomEvent(i,n.bubbles,n.cancelable,n.detail),s};a.prototype=window.Event.prototype,window.CustomEvent=a}}catch{}var t=function(i){this.isEditArea=!0,typeof i=="string"?(this.textarea=document.getElementById(i),this.textarea||(this.textarea=document.querySelector(i))):this.textarea=i,this.initialText=this.textarea.value,this.isDragging=!1};return t.prototype.addSelectionListener=function(i){this.textarea.onmousemove=function(n){this.isDragging&&i.fireSelectionChanged()}},t.prototype.addChangeListener=function(i){this.changelistener=i,this.textarea.onkeyup=function(){i.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,i.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,i.fireChanged()},this.textarea.onchange=function(){i.fireChanged()}},t.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},t.prototype.setSelection=function(i,n){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(i,n);else if(this.textarea.createTextRange){var s=this.textarea.createTextRange();s.collapse(!0),s.moveEnd("character",n),s.moveStart("character",i),s.select()}this.textarea.focus()},t.prototype.getString=function(){return this.textarea.value},t.prototype.setString=function(i){this.textarea.value=i,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},t.prototype.getElem=function(){return this.textarea},q_=t,q_}var C_,K3;function MU(){if(K3)return C_;K3=1;var a=Kr(),t=I3(),i=Lf(),n=h3(),s=Q3();function r(l){var c={},d;if(l.abcjsParams)for(d in l.abcjsParams)l.abcjsParams.hasOwnProperty(d)&&(c[d]=l.abcjsParams[d]);if(l.midi_options)for(d in l.midi_options)l.midi_options.hasOwnProperty(d)&&(c[d]=l.midi_options[d]);if(l.parser_options)for(d in l.parser_options)l.parser_options.hasOwnProperty(d)&&(c[d]=l.parser_options[d]);if(l.render_options)for(d in l.render_options)l.render_options.hasOwnProperty(d)&&(c[d]=l.render_options[d]);return c.tablature&&l.warnings_id&&(c.tablature.warnings_id=l.warnings_id),c}var o=function(l,c){this.abcjsParams=r(c),c.indicate_changed&&(this.indicate_changed=!0),typeof l=="string"?this.editarea=new s(l):l.isEditArea?this.editarea=l:this.editarea=new s(l),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),c.canvas_id?this.div=c.canvas_id:c.paper_id?this.div=c.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),typeof this.div=="string"&&(this.div=document.getElementById(this.div)),c.selectionChangeCallback&&(this.selectionChangeCallback=c.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),c.synth&&i()&&(this.synth={el:c.synth.el,cursorControl:c.synth.cursorControl,options:c.synth.options}),c.generate_midi&&(this.generate_midi=c.generate_midi,this.abcjsParams.generateDownload&&(typeof c.midi_download_id=="string"?this.downloadMidi=document.getElementById(c.midi_download_id):c.midi_download_id&&(this.downloadMidi=c.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof c.midi_id=="string"?this.inlineMidi=document.getElementById(c.midi_id):c.midi_id&&(this.inlineMidi=c.midi_id))),c.warnings_id?typeof c.warnings_id=="string"?this.warningsdiv=document.getElementById(c.warnings_id):this.warningsdiv=c.warnings_id:c.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=c.onchange,this.redrawCallback=c.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(d,g){var h=function(m,p){var u=m.className;return u.length>0&&(u===p||new RegExp("(^|\\s)"+p+"(\\s|$)").test(u))};return h(d,g)||(d.className+=(d.className?" ":"")+g),d},this.removeClassName=function(d,g){return d.className=a.strip(d.className.replace(new RegExp("(^|\\s+)"+g+"(\\s+|$)")," ")),d},this.setReadOnly=function(d){var g="abc_textarea_readonly",h=this.editarea.getElem();d?(h.setAttribute("readonly","yes"),this.addClassName(h,g)):(h.removeAttribute("readonly"),this.removeClassName(h,g))}};return o.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var l=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(l)}if(this.synth){var c=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new t,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],c,this.synth.options)}},o.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=n(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(l){console.error("ABCJS error: ",l),this.warnings||(this.warnings=[]),this.warnings.push(l.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("
            "):"No errors"),this.updateSelection(),this.bReentry=!1}},o.prototype.paramChanged=function(l){if(l)for(var c in l)l.hasOwnProperty(c)&&(this.abcjsParams[c]=l[c]);this.currentAbc="",this.fireChanged()},o.prototype.getTunes=function(){return this.tunes},o.prototype.synthParamChanged=function(l){if(this.synth){if(this.synth.options={},l)for(var c in l)l.hasOwnProperty(c)&&(this.synth.options[c]=l[c]);this.currentAbc="",this.fireChanged()}},o.prototype.parseABC=function(){var l=this.editarea.getString();return l===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=l,!0)},o.prototype.updateSelection=function(){var l=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(l.start,l.end)}catch{}this.selectionChangeCallback&&this.selectionChangeCallback(l.start,l.end)},o.prototype.fireSelectionChanged=function(){this.updateSelection()},o.prototype.setDirtyStyle=function(l){if(this.indicate_changed!==void 0){var c=function(m,p){var u=function(f,_){var b=f.className;return b.length>0&&(b===_||new RegExp("(^|\\s)"+_+"(\\s|$)").test(b))};return u(m,p)||(m.className+=(m.className?" ":"")+p),m},d=function(m,p){return m.className=a.strip(m.className.replace(new RegExp("(^|\\s+)"+p+"(\\s+|$)")," ")),m},g="abc_textarea_dirty",h=this.editarea.getElem();l?c(h,g):d(h,g)}},o.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var l=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){l.modelChanged()},300);var c=this.isDirty();this.wasDirty!==c&&(this.wasDirty=c,this.setDirtyStyle(c)),this.onchangeCallback&&this.onchangeCallback(this)}},o.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},o.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()},o.prototype.highlight=function(l,c,d,g,h,m){this.editarea.setSelection(l.startChar,l.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(l.startChar,l.endChar),this.clientClickListener&&this.clientClickListener(l,c,d,g,h,m)},o.prototype.pause=function(l){this.bIsPaused=l,l||this.fireChanged()},o.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()},o.prototype.pauseMidi=function(l){this.midiPause=l,l||this.redrawMidi()},C_=o,C_}var A_,Y3;function zU(){if(Y3)return A_;Y3=1;var a=Wz(),t=Qz(),i=If(),n=sw(),s=pE(),r={};r.signature="abcjs-basic v"+a,Object.keys(t).forEach(function(T){r[T]=t[T]}),Object.keys(i).forEach(function(T){r[T]=i[T]}),r.renderAbc=h3(),r.tuneMetrics=bU(),r.TimingCallbacks=A0();var o=ll();r.setGlyph=o.setSymbol,r.strTranspose=s;var l=m_(),c=i_(),d=c_(),g=M3(),h=j3(),m=Df(),p=Ic(),u=Lf(),f=AU(),_=I3(),b=FU(),v=L3();return r.synth={CreateSynth:l,instrumentIndexToName:c,pitchToNoteName:d,SynthController:_,SynthSequence:g,CreateSynthControl:h,registerAudioContext:m,activeAudioContext:p,supportsAudio:u,playEvent:f,getMidiFile:b,sequence:n,midiRenderer:v},r.Editor=MU(),r.EditArea=Q3(),r.test={Parse:ag(),EngraverController:Yh()},A_=r,A_}var J3=zU();const EU=Kx({__proto__:null,default:Hz(J3)},[J3]);var UU=ae(""),RU=ae(''),BU=ae(''),PU=ae('
            Reference voice
            '),jU=ae(''),NU=ae(''),OU=ae('
            Generation
            '),IU=ae('
            Audio
            '),DU=ae('
            RTF
            '),LU=ae('

            Seed
            ',1),VU=ae('

            No dub generated

            '),HU=ae('

            Cross-language dubbing

            Source recording

            Translation

            Speech

            Translation and audio

            ');function WU(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y();let r=xe(t,"busy",12,!1),o=xe(t,"active",8,!0),l=Y(),c=Y([]),d=Y(null),g=Y(null),h=Y(!0),m=Y(null),p=Y(""),u=Y("en"),f=Y(null),_=Y(""),b=Y(""),v=Y(""),T=Y(null),S=Y(""),M=Y(""),P=Y(""),B=Y({}),C=Y(null);const j=[...new Set(Li.filter(Re=>Re.task==="asr"&&Re.request_options?.includes("target_language")).map(Re=>Re.family))];async function G(){if(!r()){y(h,!0),y(v,"");try{y(c,await Pf()),e(d)&&!e(c).some(Re=>Re.id===e(d).id)&&y(d,null),e(g)&&!e(c).some(Re=>Re.id===e(g).id)&&y(g,null)}catch(Re){y(v,Re instanceof Error?Re.message:String(Re))}finally{y(h,!1)}}}function A(Re){Re==="model"&&(y(f,null),y(_,""))}async function N(){if(r()||e(h))return;if(!e(m)||!e(d)||!e(g)||!e(u).trim()){y(v,"Choose a recording, translation model, speech model, and target language.");return}r(!0),y(v,"");const Re=new AbortController;y(T,Re);const Ve=e(m),_t=e(s)?e(f):null,mt=e(_).trim(),et=e(p).trim(),wt=e(u).trim(),Ye=structuredClone(e(d)),ut=structuredClone(e(g));try{const at=Re.signal;y(b,"Preparing models..."),await new iu(Ye,at).prepare();const Zt=new iu(ut,at);await Zt.prepare(),y(b,"Uploading recording...");const At=await gr(await Fr(Ve),at);at.throwIfAborted();const It={};for(const[ea,kt]of Object.entries(Ye.request.options))It[`translator.${ea}`]=kt;for(const[ea,kt]of Object.entries(ut.request.options))It[`tts.${ea}`]=kt;const Ra=et||Ye.request.language?.trim();Ra&&(It["translator.language"]=Ra),It["translator.target_language"]=wt,ut.request.language&&(It["tts.language"]=ut.request.language),ut.request.max_tokens!==void 0&&(It["tts.max_tokens"]=ut.request.max_tokens),It["tts.seed"]=Zt.resolvedSeed;const na={audio:At,options:It};_t?(na.voice_ref=await gr(await Fr(_t),at),mt&&(It["tts.reference_text"]=mt)):ut.request.voice&&(na.voice_id=ut.request.voice),at.throwIfAborted(),y(b,"Translating and generating speech...");const ba=await Sn("/v1/recipes/run",{method:"POST",body:JSON.stringify({recipe:"cross-language-dubbing",models:{translator:Ye.model.id,tts:ut.model.id},request:na})},at);if(at.throwIfAborted(),!ba.audio||!ba.text?.trim())throw new Error("The recipe returned no dubbed audio or translation.");const Ma=mf(ba.audio),en=URL.createObjectURL(new Blob([ba.text],{type:"text/plain;charset=utf-8"}));e(S)&&URL.revokeObjectURL(e(S)),e(P)&&URL.revokeObjectURL(e(P)),y(S,Ma),y(P,en),y(M,ba.text),y(B,ba.timing||{}),y(C,Zt.resolvedSeed),y(b,"Dub ready")}catch(at){Re.signal.aborted?y(b,"Cancelled"):(y(v,at instanceof Error?at.message:String(at)),y(b,""))}finally{r(!1),y(T,null)}}Kn(G),ur(()=>{e(T)?.abort(),e(S)&&URL.revokeObjectURL(e(S)),e(P)&&URL.revokeObjectURL(e(P))}),Ee(()=>(e(g),Li),()=>{y(i,e(g)&&(Li.find(Re=>Re.id===e(g).model.id)||Li.find(Re=>Re.family===e(g).model.family&&Re.task==="tts")))}),Ee(()=>e(i),()=>{y(n,e(i)?.builtin_voices||[])}),Ee(()=>(e(g),Yo),()=>{y(s,!!(e(g)&&Yo[e(g).model.family]?.includes("speaker_reference")))}),Ee(()=>(K(o()),e(l)),()=>{!o()&&e(l)&&e(l).querySelectorAll("audio").forEach(Re=>Re.pause())}),kn(),Xi();var H=HU(),E=k(H),U=k(E),O=k(U);eb(O,{size:24}),Rt(),w(U);var V=q(U,2),D=k(V);OS(D,{size:17}),w(V),w(E);var $=q(E,2),F=k($),z=k(F),L=k(z),Q=k(L);wm(Q,{size:17}),Rt(),w(L);var Z=q(L,2),ee=q(k(Z));w(Z);var oe=q(Z,2);rs(oe,{get file(){return e(m)},label:"Original audio"}),w(z);var fe=q(z,2),le=k(fe),ge=k(le);eb(ge,{size:17}),Rt(),w(le);var R=q(le,2);{let Re=Lt(()=>r()||e(h));nu(R,{label:"Translation model",get choices(){return e(c)},tasks:["asr"],get families(){return j},get disabled(){return e(Re)},onchange:()=>{},get value(){return e(d)},set value(Ve){y(d,Ve)},$$legacy:!0})}var we=q(R,2),ce=k(we),Te=q(k(ce));Pt(Te),w(ce);var he=q(ce,2),je=q(k(he));Pt(je),w(he),w(we),w(fe);var Le=q(fe,2),nt=k(Le),Ae=k(nt);sf(Ae,{size:17}),Rt(),w(nt);var Ge=q(nt,2);{let Re=Lt(()=>r()||e(h));nu(Ge,{label:"Speech model",get choices(){return e(c)},tasks:["tts"],get disabled(){return e(Re)},onchange:A,get value(){return e(g)},set value(Ve){y(g,Ve)},$$legacy:!0})}var ne=q(Ge,2);{var Xe=Re=>{var Ve=RU(),_t=q(k(Ve));Ct(_t,5,()=>e(n),Kt,(mt,et)=>{var wt=UU(),Ye=k(wt,!0);w(wt);var ut={};ie(()=>{W(Ye,e(et)),ut!==(ut=e(et))&&(wt.value=(wt.__value=e(et))??"")}),J(mt,wt)}),w(_t),w(Ve),ie(()=>_t.disabled=r()),dr(_t,()=>e(g).request.voice,mt=>(Bt(g,e(g).request.voice=mt),Wi(()=>{r(),e(n)}))),J(Re,Ve)};ve(ne,Re=>{e(g),e(n),x(()=>e(g)&&e(n).length)&&Re(Xe)})}var de=q(ne,2);{var ye=Re=>{var Ve=PU(),_t=q(k(Ve),2),mt=q(k(_t));w(_t);var et=q(_t,2);rs(et,{get file(){return e(f)},label:"Reference voice"});var wt=q(et,2),Ye=q(k(wt));rn(Ye),w(wt);var ut=q(wt,2);{var at=Zt=>{var At=BU();ie(()=>At.disabled=r()),re("click",At,()=>{y(f,null),y(_,"")}),J(Zt,At)};ve(ut,Zt=>{e(f)&&Zt(at)})}w(Ve),ie(()=>{mt.disabled=r(),Ye.disabled=r()}),re("change",mt,Zt=>y(f,Zt.currentTarget.files?.[0]||null)),Ta(Ye,()=>e(_),Zt=>y(_,Zt)),J(Re,Ve)};ve(de,Re=>{e(s)&&Re(ye)})}w(Le);var ue=q(Le,2),be=k(ue),Se=k(be);Ec(Se,{size:16}),Rt(),w(be);var Ie=q(be,2);{var $e=Re=>{var Ve=jU(),_t=k(Ve);Uc(_t,{size:15}),Rt(),w(Ve),re("click",Ve,()=>e(T)?.abort()),J(Re,Ve)};ve(Ie,Re=>{r()&&Re($e)})}var ze=q(Ie,2),Fe=k(ze,!0);w(ze),w(ue);var qe=q(ue,2);{var it=Re=>{var Ve=NU(),_t=k(Ve,!0);w(Ve),ie(()=>W(_t,e(v))),J(Re,Ve)};ve(qe,Re=>{e(v)&&Re(it)})}w(F);var st=q(F,2),Ne=k(st),He=k(Ne);Ko(He,{size:17}),Rt(),w(Ne);var Be=q(Ne,2);{var Ue=Re=>{var Ve=LU(),_t=ht(Ve),mt=k(_t,!0);w(_t);var et=q(_t,2),wt=q(et,2),Ye=k(wt);{var ut=ra=>{var ki=OU(),ya=q(k(ki)),ni=k(ya);w(ya),w(ki),ie(Ai=>W(ni,`${Ai??""} s`),[()=>(e(B),x(()=>(e(B).wall_ms/1e3).toFixed(2)))]),J(ra,ki)};ve(Ye,ra=>{e(B),x(()=>e(B).wall_ms!==void 0)&&ra(ut)})}var at=q(Ye,2);{var Zt=ra=>{var ki=IU(),ya=q(k(ki)),ni=k(ya);w(ya),w(ki),ie(Ai=>W(ni,`${Ai??""} s`),[()=>(e(B),x(()=>(e(B).audio_duration_ms/1e3).toFixed(2)))]),J(ra,ki)};ve(at,ra=>{e(B),x(()=>e(B).audio_duration_ms!==void 0)&&ra(Zt)})}var At=q(at,2);{var It=ra=>{var ki=DU(),ya=q(k(ki)),ni=k(ya,!0);w(ya),w(ki),ie(Ai=>W(ni,Ai),[()=>(e(B),x(()=>e(B).rtf.toFixed(3)))]),J(ra,ki)};ve(At,ra=>{e(B),x(()=>e(B).rtf!==void 0)&&ra(It)})}var Ra=q(At,2),na=q(k(Ra)),ba=k(na,!0);w(na),w(Ra),w(wt);var Ma=q(wt,2),en=k(Ma),ea=k(en);Cd(ea,{size:15}),Rt(),w(en);var kt=q(en,2),ta=k(kt);Cd(ta,{size:15}),Rt(),w(kt),w(Ma),ie(()=>{W(mt,e(M)),_e(et,"src",e(S)),W(ba,e(C)),_e(en,"href",e(S)),_e(kt,"href",e(P))}),J(Re,Ve)},tt=Re=>{var Ve=VU();J(Re,Ve)};ve(Be,Re=>{e(S)?Re(Ue):Re(tt,-1)})}w(st),w($),w(H),Ci(H,Re=>y(l,Re),()=>e(l)),ie(Re=>{V.disabled=r()||e(h),ee.disabled=r(),Te.disabled=r(),je.disabled=r(),be.disabled=Re,W(Fe,e(h)?"Loading installed models...":e(b))},[()=>(K(r()),e(h),e(m),e(d),e(g),e(u),x(()=>r()||e(h)||!e(m)||!e(d)||!e(g)||!e(u).trim()))]),re("click",V,G),re("change",ee,Re=>y(m,Re.currentTarget.files?.[0]||null)),Ta(Te,()=>e(p),Re=>y(p,Re)),Ta(je,()=>e(u),Re=>y(u,Re)),re("click",be,N),J(a,H),Ei()}const QU=Object.freeze(Object.defineProperty({__proto__:null,default:WU},Symbol.toStringTag,{value:"Module"}));async function KU(a,t,i){if(!a.length)throw new Error("Generate speech before assembling audio.");const n=new AudioContext({sampleRate:t});try{const s=[];for(const d of a){if(i.throwIfAborted(),!Number.isFinite(d.pause)||d.pause<0)throw new Error("Pauses must be zero or positive.");s.push({buffer:await n.decodeAudioData(await d.audio.arrayBuffer()),pause:d.pause})}const r=s[0].buffer.numberOfChannels;if(s.some(d=>d.buffer.numberOfChannels!==r))throw new Error("Chosen takes have different channel counts. Use compatible takes before assembly.");const o=s.reduce((d,g,h)=>d+g.buffer.length+(h0)throw new Error("Enter a valid gain and a peak target at or below 0 dBFS.");const s=new AudioContext({sampleRate:i});try{const r=await s.decodeAudioData(await a.arrayBuffer());n.throwIfAborted();let o=0;for(let c=0;c0?Math.pow(10,t.peakDb/20)/o:Math.pow(10,t.gainDb/20);if(o*l>1.000001)throw new Error("This gain would clip the audio. Lower the gain or enable peak normalization.");for(let c=0;ca.getChannelData(d));return Array.from({length:o},(c,d)=>{let g=0,h=0;for(let m=s+Math.floor(d*r/o);ma/t||!Number.isFinite(d.seconds)||d.seconds<=0)throw new Error("Invalid silence insertion.");const g=Math.round(d.at*t);s.set(g,[...s.get(g)||[],d])}const r=n.map(d=>{if(!Number.isFinite(d.start)||!Number.isFinite(d.end)||d.start<0||d.end>a/t||d.end<=d.start)throw new Error("Invalid audio removal.");return{start:Math.round(d.start*t),end:Math.round(d.end*t)}}).sort((d,g)=>d.start-g.start),o=[...new Set([0,a,...s.keys(),...r.flatMap(d=>[d.start,d.end])])].sort((d,g)=>d-g),l=[];let c=0;for(let d=0;dg&&!r.some(m=>m.start<=g&&m.end>=h)&&(l.push({start:c,frames:h-g,sourceFrame:g}),c+=h-g)}return l}function Z3(a,t,i,n=[]){const s=X3(t.length,t.sampleRate,i,n),r=s.reduce((l,c)=>l+c.frames,0);if(!r)throw new Error("The selection removes the entire recording. Leave some audio or inserted silence.");const o=a.createBuffer(t.numberOfChannels,r,t.sampleRate);for(const l of s)if(l.sourceFrame!==null)for(let c=0;cProject default'),ZU=ae('
            '),eR=ae('

            Add your first speaker

            Pick a model and a voice once, then use that speaker throughout your script.

            '),tR=ae(''),aR=ae('
            APPLY THIS SPEAKER

            Earlier recordings stay available for comparison.

            '),iR=ae('

            Speakers

            Manage presets in Lib → Speakers.

            ',1);function nR(a,t){zi(t,!1);const i=Y(),n=Y();let s=xe(t,"project",12),r=xe(t,"chunk",12),o=xe(t,"choices",8),l=xe(t,"voices",8),c=xe(t,"disabled",8,!1),d=xe(t,"onchange",8),g=xe(t,"onbusy",8),h=xe(t,"onerror",8),m=Y([]),p=Y(!1),u=Y(null);function f(){c()||(y(u,null),y(p,!0))}async function _(z){await T2(z);const L=!s().speakers?.length;y(m,[z,...e(m).filter(Q=>Q.id!==z.id)]),s(s().speakers=s().speakers?.some(Q=>Q.id===z.id)?s().speakers.map(Q=>Q.id===z.id?z:Q):[...s().speakers||[],z],!0),s().defaultSpeakerId||s(s().defaultSpeakerId=z.id,!0),!e(u)&&r()&&!L&&r(r().speakerId=z.id,!0),d()()}function b(z){r()?r(r().speakerId=z.id,!0):s(s().defaultSpeakerId=z.id,!0),d()()}function v(){if(e(i)){s(s().defaultSpeakerId=e(i).id,!0);for(const z of s().chunks)z.speakerId=null;d()()}}Kn(()=>{let z=0;const L=S0.subscribe(async()=>{const Q=++z;try{const Z=await T0();Q===z&&y(m,Z)}catch(Z){Q===z&&h()(`Could not open the speaker library: ${String(Z)}`)}});return()=>{z++,L()}}),Ee(()=>(K(s()),K(r())),()=>{y(i,xo(s(),r()))}),Ee(()=>(K(r()),K(s())),()=>{y(n,r()?s().chunks.indexOf(r())+1:0)}),kn();var T={addSpeaker:f};Xi();var S=iR(),M=ht(S),P=k(M),B=q(k(P),2),C=k(B);Ir(C,{size:17}),w(B),w(P);var j=q(P,2),G=k(j,!0);w(j);var A=q(j,2),N=k(A);Ct(N,1,()=>(K(s()),x(()=>s().speakers||[])),z=>z.id,(z,L)=>{var Q=ZU();let Z;var ee=k(Q),oe=k(ee),fe=k(oe,!0);w(oe);var le=q(oe),ge=k(le),R=k(ge,!0);w(ge);var we=q(ge),ce=k(we);w(we);var Te=q(we);{var he=Ge=>{var ne=XU();J(Ge,ne)};ve(Te,Ge=>{K(s()),e(L),x(()=>s().defaultSpeakerId===e(L).id)&&Ge(he)})}w(le);var je=q(le);{var Le=Ge=>{vm(Ge,{size:14})};ve(je,Ge=>{e(i),e(L),x(()=>e(i)?.id===e(L).id)&&Ge(Le)})}w(ee);var nt=q(ee,2),Ae=k(nt);tb(Ae,{size:14}),w(nt),w(Q),ie((Ge,ne,Xe)=>{Z=va(Q,1,"svelte-1utfzu5",null,Z,{assigned:e(i)?.id===e(L).id}),_e(ee,"aria-label",(e(L),x(()=>`Assign ${e(L).name}`))),_e(ee,"aria-pressed",(e(i),e(L),x(()=>e(i)?.id===e(L).id))),ee.disabled=c(),W(fe,Ge),W(R,(e(L),x(()=>e(L).name))),W(ce,`${ne??""} · ${Xe??""}`),_e(nt,"aria-label",(e(L),x(()=>`Edit ${e(L).name}`))),nt.disabled=c()},[()=>(e(L),x(()=>e(L).name.slice(0,1).toUpperCase())),()=>(K(Hl),e(L),x(()=>Hl(e(L)))),()=>(e(L),x(()=>e(L).configuration.model.display_name.split(" (")[0]))]),re("click",ee,()=>b(e(L))),re("click",nt,()=>{y(u,e(L)),y(p,!0)}),J(z,Q)});var H=q(N,2);{var E=z=>{var L=eR(),Q=k(L);jl(Q,{size:26}),Rt(4),w(L),J(z,L)};ve(H,z=>{K(s()),x(()=>!s().speakers?.length)&&z(E)})}w(A);var U=q(A,2),O=k(U);Ir(O,{size:14}),Rt(),w(U);var V=q(U,4);{var D=z=>{var L=aR(),Q=q(k(L));{var Z=fe=>{var le=tR();ie(()=>le.disabled=c()),re("click",le,()=>{r(r().speakerId=null,!0),d()()}),J(fe,le)};ve(Q,fe=>{K(r()),x(()=>r().speakerId)&&fe(Z)})}var ee=q(Q),oe=k(ee);w(ee),Rt(2),w(L),ie(()=>{ee.disabled=c(),W(oe,`Use ${e(i),x(()=>e(i).name)??""} for all passages`)}),re("click",ee,v),J(z,L)};ve(V,z=>{e(i)&&r()&&z(D)})}w(M);var $=q(M,2);{var F=z=>{{let L=Lt(()=>(K(s()),x(()=>(s().speakers?.length||0)+1)));A2(z,{get initial(){return e(u)},get saved(){return e(m)},get choices(){return o()},get voices(){return l()},get number(){return e(L)},onsave:_,onclose:()=>y(p,!1),get onbusy(){return g()}})}};ve($,z=>{e(p)&&z(F)})}return ie(()=>{B.disabled=c(),W(G,r()?`Assign a speaker to passage ${e(n)}.`:"Choose the default speaker for your narration."),U.disabled=c()}),re("click",B,f),re("click",U,f),J(a,S),El(t,"addSpeaker",f),Ei(T)}var sR=ae(''),rR=ae('

            Review each passage before continuing.

            '),oR=ae('
            '),lR=ae(''),cR=ae(''),dR=ae('
            '),uR=ae('
            01

            Your script, in passages

            Write or import your text, then review how it splits here.

            '),fR=ae('

            No matching passages. Try another search or filter.

            '),pR=ae(" ",1),mR=ae(''),gR=ae('',1),hR=ae('
            '),_R=ae('

            Passages

            ');function vR(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y();let r=xe(t,"project",8),o=xe(t,"selectedId",8),l=xe(t,"disabled",8,!1),c=xe(t,"preview",8,null),d=xe(t,"previewIndex",8,0),g=xe(t,"checked",28,()=>new Set),h=xe(t,"onselect",8),m=xe(t,"onpreview",8),p=xe(t,"onadd",8),u=xe(t,"ongenerate",8),f=Y(""),_=Y("all"),b=Y(0),v=Y(!1);const T=40;function S(z,L){const Q=new Set(g());L?Q.add(z):Q.delete(z),g(Q)}Ee(()=>(K(r()),e(f),e(_),In),()=>{y(i,r().chunks.filter(z=>z.text.toLowerCase().includes(e(f).toLowerCase())&&(e(_)==="all"||e(_)==="missing"&&!ls(z)||e(_)==="changed"&&!In(r(),z))))}),Ee(()=>e(i),()=>{y(n,Math.max(1,Math.ceil(e(i).length/T)))}),Ee(()=>(e(b),e(n)),()=>{e(b)>=e(n)&&y(b,e(n)-1)}),Ee(()=>(e(i),K(o())),()=>{y(s,e(i).findIndex(z=>z.id===o()))}),Ee(()=>e(s),()=>{e(s)>=0&&y(b,Math.floor(e(s)/T))}),kn(),Xi();var M=_R(),P=k(M),B=k(P),C=q(k(B)),j=k(C,!0);w(C),w(B);var G=q(B,2);{var A=z=>{var L=sR(),Q=k(L);$S(Q,{size:15}),w(L),ie(()=>_e(L,"aria-pressed",e(v))),re("click",L,()=>y(v,!e(v))),J(z,L)};ve(G,z=>{K(r()),K(c()),x(()=>r().chunks.length&&!c())&&z(A)})}w(P);var N=q(P,2);{var H=z=>{var L=rR();J(z,L)},E=z=>{var L=oR(),Q=k(L);Pt(Q);var Z=q(Q),ee=k(Z);ee.value=ee.__value="all";var oe=q(ee);oe.value=oe.__value="missing";var fe=q(oe);fe.value=fe.__value="changed",w(Z),w(L),Ta(Q,()=>e(f),le=>y(f,le)),re("input",Q,()=>y(b,0)),dr(Z,()=>e(_),le=>y(_,le)),re("change",Z,()=>y(b,0)),J(z,L)};ve(N,z=>{c()?z(H):(K(r()),x(()=>r().chunks.length)&&z(E,1))})}var U=q(N,2),O=k(U);{var V=z=>{var L=ys(),Q=ht(L);Ct(Q,1,c,Kt,(Z,ee,oe)=>{var fe=lR();let le;_e(fe,"aria-label",`Review passage ${oe+1}`);var ge=k(fe),R=k(ge,!0);w(ge);var we=q(ge),ce=k(we),Te=k(ce,!0);w(ce),Rt(),w(we),w(fe),ie(he=>{le=va(fe,1,"passage-row svelte-zo1321",null,le,{current:d()===oe}),_e(fe,"aria-current",d()===oe?"true":void 0),W(R,he),W(Te,e(ee))},[()=>x(()=>String(oe+1).padStart(2,"0"))]),re("click",fe,()=>m()(oe)),J(Z,fe)}),J(z,L)},D=z=>{var L=pR(),Q=ht(L);Ct(Q,1,()=>(e(i),e(b),x(()=>e(i).slice(e(b)*T,(e(b)+1)*T))),fe=>fe.id,(fe,le)=>{const ge=Lt(()=>(K(r()),e(le),x(()=>r().chunks.indexOf(e(le))))),R=Lt(()=>(K(In),K(r()),e(le),x(()=>In(r(),e(le)))));var we=dR();let ce;var Te=k(we);{var he=be=>{var Se=cR();Pt(Se),ie(Ie=>{_e(Se,"aria-label",`Select passage ${e(ge)+1}`),Se.disabled=l(),zl(Se,Ie)},[()=>(K(g()),e(le),x(()=>g().has(e(le).id)))]),re("change",Se,Ie=>S(e(le).id,Ie.currentTarget.checked)),J(be,Se)};ve(Te,be=>{e(v)&&be(he)})}var je=q(Te),Le=k(je),nt=k(Le,!0);w(Le);var Ae=q(Le),Ge=k(Ae),ne=k(Ge,!0);w(Ge);var Xe=q(Ge),de=k(Xe);let ye;var ue=q(de);w(Xe),w(Ae),w(je),w(we),ie((be,Se,Ie)=>{ce=va(we,1,"passage-item svelte-zo1321",null,ce,{current:o()===e(le).id}),_e(je,"aria-label",`Edit passage ${e(ge)+1}`),_e(je,"aria-current",(K(o()),e(le),x(()=>o()===e(le).id?"true":void 0))),je.disabled=l(),W(nt,be),W(ne,(e(le),x(()=>e(le).text||"Empty passage"))),ye=va(de,1,"readiness svelte-zo1321",null,ye,{ready:e(R)}),W(ue,`${Se??""} · ${Ie??""}`)},[()=>(K(e(ge)),x(()=>String(e(ge)+1).padStart(2,"0"))),()=>(K(xo),K(r()),e(le),x(()=>xo(r(),e(le))?.name||"No speaker")),()=>(K(e(R)),K(ls),e(le),x(()=>e(R)?"Ready":ls(e(le))?"Needs update":"No audio"))]),re("click",je,()=>h()(e(le).id)),J(fe,we)});var Z=q(Q,2);{var ee=fe=>{var le=uR();J(fe,le)},oe=fe=>{var le=fR();J(fe,le)};ve(Z,fe=>{K(r()),x(()=>!r().chunks.length)?fe(ee):(e(i),x(()=>!e(i).length)&&fe(oe,1))})}J(z,L)};ve(O,z=>{c()?z(V):z(D,-1)})}w(U);var $=q(U,2);{var F=z=>{var L=hR(),Q=k(L);{var Z=ge=>{var R=mR(),we=k(R),ce=k(we);rf(ce,{size:14}),w(we);var Te=q(we),he=k(Te);w(Te);var je=q(Te),Le=k(je);of(Le,{size:14}),w(je),w(R),ie(()=>{we.disabled=e(b)===0,W(he,`${e(b)+1} / ${e(n)??""}`),je.disabled=e(b)===e(n)-1}),re("click",we,()=>Bu(b,-1)),re("click",je,()=>Bu(b)),J(ge,R)};ve(Q,ge=>{e(n)>1&&ge(Z)})}var ee=q(Q);{var oe=ge=>{var R=gR(),we=ht(R),ce=k(we);Pt(ce),Rt(),w(we);var Te=q(we),he=k(Te);w(Te),ie(je=>{zl(ce,je),ce.disabled=l(),Te.disabled=(K(l()),K(g()),x(()=>l()||!g().size)),W(he,`Generate selected (${K(g()),x(()=>g().size)??""})`)},[()=>(e(i),K(g()),x(()=>e(i).length>0&&e(i).every(je=>g().has(je.id))))]),re("change",ce,je=>{const Le=new Set(g());for(const nt of e(i))je.currentTarget.checked?Le.add(nt.id):Le.delete(nt.id);g(Le)}),re("click",Te,()=>u()([...g()])),J(ge,R)};ve(ee,ge=>{e(v)&&ge(oe)})}var fe=q(ee),le=k(fe);Ir(le,{size:14}),Rt(),w(fe),w(L),ie(()=>fe.disabled=l()),re("click",fe,function(...ge){p()?.apply(this,ge)}),J(z,L)};ve($,z=>{K(c()),K(r()),x(()=>!c()&&r().chunks.length)&&z(F)})}w(M),ie(()=>W(j,(K(c()),K(r()),x(()=>c()?.length??r().chunks.length)))),J(a,M),Ei()}var bR=ae("Stop preview",1),yR=ae(" ",1),ex=ae('Choose up-to-date audio in Voice.'),wR=ae('

            '),kR=ae('

            Reading the selected recordings…

            '),xR=po('',1),SR=po(''),TR=po(''),$R=po(''),qR=po(''),CR=ae(' ',1),AR=ae('

            ',1),GR=ae('
            '),FR=ae('
            seconds

            ',1),MR=ae(''),zR=ae('

            ');function ER(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y(),g=Y(),h=Y();let m=xe(t,"project",8),p=xe(t,"chunk",12),u=xe(t,"next",8),f=xe(t,"index",8),_=xe(t,"increment",8),b=xe(t,"disabled",8,!1),v=xe(t,"active",8,!0),T=xe(t,"onchange",8),S=Y(!1),M,P=Y(),B=Y(),C=Y(),j=Y(),G=Y([]),A=Y([]),N=Y(!1),H=Y(""),E=0,U=[],O=Y(!1),V=Y(0),D=0,$=0,F=Y(0);async function z(He,Be){const Ue=++E;y(P,He),y(B,Be),Q(),y(C,void 0),y(j,void 0),y(G,[]),y(A,[]),y(N,!0),y(H,"");try{const tt=He?await M.decodeAudioData(await He.arrayBuffer()):void 0,Re=Be?await M.decodeAudioData(await Be.arrayBuffer()):void 0;if(Ue!==E)return;if(y(C,tt),y(j,Re),tt&&y(G,G_(tt,Math.max(0,tt.duration-2),Math.min(2,tt.duration))),Re&&y(A,G_(Re,0,Math.min(2,Re.duration))),tt&&Re&&tt.numberOfChannels!==Re.numberOfChannels)throw new Error("The selected recordings have different channel counts. Choose compatible takes before joining them.")}catch(tt){Ue===E&&y(H,`Could not read this boundary: ${String(tt)}`)}finally{Ue===E&&y(N,!1)}}function L(He){if(!Number.isFinite(_())||_()<=0){y(H,"Choose a positive pause increment.");return}y(H,""),p(p().pauseAfter=Math.max(0,Math.round((e(s)+He)*1e6)/1e6),!0),T()()}function Q(){cancelAnimationFrame(D);for(const He of U)He.onended=null,He.stop(),He.disconnect();U=[],y(O,!1),y(V,0)}async function Z(){if(!(!e(C)||u()&&!e(j))){if(!Number.isFinite(e(s))||e(s)<0){y(H,"Gap must be zero or positive.");return}Q(),y(H,"");try{if(document.querySelectorAll(".tts-app audio").forEach(Re=>Re.pause()),await M.resume(),!e(S)||!v()||b())return;const He=M.currentTime+.03,Be=Math.round(e(s)*m().assembly.sampleRate)/m().assembly.sampleRate,Ue=M.createBufferSource();if(Ue.buffer=e(C),Ue.connect(M.destination),Ue.start(He,Math.max(0,e(C).duration-2),e(r)),U=[Ue],u()&&e(j)){const Re=M.createBufferSource();Re.buffer=e(j),Re.connect(M.destination),Re.start(He+e(r)+Be,0,e(o)),U.push(Re)}y(F,e(s)),$=He,y(O,!0),U[U.length-1].onended=Q;const tt=()=>{y(V,Math.max(0,Math.min(e(l),M.currentTime-$))),e(O)&&(D=requestAnimationFrame(tt))};tt()}catch(He){Q(),y(H,`Could not play this boundary: ${String(He)}`)}}}Kn(()=>{M=new AudioContext({sampleRate:m().assembly.sampleRate}),y(S,!0),document.addEventListener("play",Q,!0)}),ur(()=>{E++,e(S)&&(y(S,!1),Q(),document.removeEventListener("play",Q,!0),M.close())}),Ee(()=>K(p()),()=>{y(i,ls(p()))}),Ee(()=>(K(u()),ls),()=>{y(n,u()&&ls(u()))}),Ee(()=>(K(p()),K(m())),()=>{y(s,p().pauseAfter??m().assembly.pause)}),Ee(()=>e(C),()=>{y(r,e(C)?Math.min(2,e(C).duration):0)}),Ee(()=>e(j),()=>{y(o,e(j)?Math.min(2,e(j).duration):0)}),Ee(()=>(e(r),K(u()),e(s),e(o)),()=>{y(l,e(r)+(u()?e(s)+e(o):0))}),Ee(()=>(e(l),e(r)),()=>{y(c,e(l)?e(r)/e(l)*1e3:0)}),Ee(()=>(e(l),K(u()),e(s)),()=>{y(d,e(l)&&u()?e(s)/e(l)*1e3:0)}),Ee(()=>e(i),()=>{y(g,e(i)?.rendered?.audio||e(i)?.audio)}),Ee(()=>e(n),()=>{y(h,e(n)?.rendered?.audio||e(n)?.audio)}),Ee(()=>(e(S),e(g),e(P),e(h),e(B)),()=>{e(S)&&(e(g)!==e(P)||e(h)!==e(B))&&z(e(g),e(h))}),Ee(()=>(e(O),K(v()),K(b()),e(s),e(F)),()=>{e(O)&&(!v()||b()||e(s)!==e(F))&&Q()}),kn(),Xi();var ee=zR(),oe=k(ee),fe=k(oe),le=k(fe),ge=k(le,!0);w(le);var R=q(le,2),we=k(R,!0);w(R),w(fe);var ce=q(fe,2),Te=k(ce);{var he=He=>{var Be=bR(),Ue=ht(Be);Uc(Ue,{size:15}),Rt(),J(He,Be)},je=He=>{var Be=yR(),Ue=ht(Be);Ec(Ue,{size:15});var tt=q(Ue,1,!0);ie(()=>W(tt,u()?"Listen across boundary":"Listen to ending")),J(He,Be)};ve(Te,He=>{e(O)?He(he):He(je,-1)})}w(ce),w(oe);var Le=q(oe,2),nt=k(Le),Ae=k(nt),Ge=k(Ae);w(Ae);var ne=q(Ae,2),Xe=k(ne,!0);w(ne);var de=q(ne,2);{var ye=He=>{var Be=ex();J(He,Be)},ue=La(()=>(K(In),K(m()),K(p()),x(()=>!In(m(),p()))));ve(de,He=>{e(ue)&&He(ye)})}w(nt);var be=q(nt,2);{var Se=He=>{var Be=wR(),Ue=k(Be),tt=k(Ue);w(Ue);var Re=q(Ue,2),Ve=k(Re,!0);w(Re);var _t=q(Re,2);{var mt=wt=>{var Ye=ex();J(wt,Ye)},et=La(()=>(K(In),K(m()),K(u()),x(()=>!In(m(),u()))));ve(_t,wt=>{e(et)&&wt(mt)})}w(Be),ie(()=>{W(tt,`Passage ${f()+2} · ${e(n),x(()=>e(n)?.reference?.name||e(n)?.configuration.request.voice||e(n)?.configuration.model.display_name||"No recording")??""}`),W(Ve,(K(u()),x(()=>u().text)))}),J(He,Be)};ve(be,He=>{u()&&He(Se)})}w(Le);var Ie=q(Le,2);{var $e=He=>{var Be=kR();J(He,Be)},ze=He=>{var Be=AR(),Ue=ht(Be),tt=k(Ue),Re=k(tt),Ve=q(Re);{var _t=ea=>{var kt=xR(),ta=ht(kt),ra=q(ta);ie(()=>{_e(ta,"x",e(c)),_e(ta,"width",e(d)),_e(ra,"x",e(c)+e(d)),_e(ra,"width",1e3-e(c)-e(d))}),J(ea,kt)};ve(Ve,ea=>{u()&&ea(_t)})}var mt=q(Ve,2);Ct(mt,1,()=>e(G),Kt,(ea,kt,ta)=>{var ra=SR();ie(()=>{_e(ra,"x1",(e(G),e(c),x(()=>(ta+.5)/e(G).length*e(c)))),_e(ra,"x2",(e(G),e(c),x(()=>(ta+.5)/e(G).length*e(c)))),_e(ra,"y1",(e(kt),x(()=>80-e(kt)[1]*68))),_e(ra,"y2",(e(kt),x(()=>80-e(kt)[0]*68)))}),J(ea,ra)});var et=q(mt);Ct(et,1,()=>e(A),Kt,(ea,kt,ta)=>{var ra=TR();ie(()=>{_e(ra,"x1",(e(c),e(d),e(A),x(()=>e(c)+e(d)+(ta+.5)/e(A).length*(1e3-e(c)-e(d))))),_e(ra,"x2",(e(c),e(d),e(A),x(()=>e(c)+e(d)+(ta+.5)/e(A).length*(1e3-e(c)-e(d))))),_e(ra,"y1",(e(kt),x(()=>80-e(kt)[1]*68))),_e(ra,"y2",(e(kt),x(()=>80-e(kt)[0]*68)))}),J(ea,ra)});var wt=q(et),Ye=q(wt);{var ut=ea=>{var kt=$R();ie(()=>{_e(kt,"x1",e(c)+e(d)),_e(kt,"x2",e(c)+e(d))}),J(ea,kt)};ve(Ye,ea=>{u()&&ea(ut)})}var at=q(Ye);{var Zt=ea=>{var kt=qR();ie(()=>{_e(kt,"x1",e(V)/e(l)*1e3),_e(kt,"x2",e(V)/e(l)*1e3)}),J(ea,kt)};ve(at,ea=>{e(O)&&ea(Zt)})}w(tt),w(Ue);var At=q(Ue,2),It=k(At),Ra=k(It);w(It);var na=q(It);{var ba=ea=>{var kt=CR(),ta=ht(kt),ra=k(ta);w(ta);var ki=q(ta),ya=k(ki);w(ki),ie((ni,Ai)=>{W(ra,`Inserted gap · ${ni??""} s`),W(ya,`Beginning · ${Ai??""} s`)},[()=>(e(s),x(()=>e(s).toFixed(2))),()=>(e(o),x(()=>e(o).toFixed(2)))]),J(ea,kt)};ve(na,ea=>{u()&&ea(ba)})}w(At);var Ma=q(At,2),en=k(Ma);w(Ma),ie((ea,kt)=>{_e(Ue,"data-gap",e(s)),_e(tt,"aria-label",ea),_e(Re,"width",e(c)),_e(wt,"x1",e(c)),_e(wt,"x2",e(c)),W(Ra,`Ending · ${kt??""} s`),W(en,`Waveforms include silence already in the recordings. ${u()?"The shaded gap is extra silence you insert.":"The final passage has no trailing gap."}`)},[()=>(e(r),K(f()),K(u()),e(s),e(o),x(()=>`Actual audio waveform: last ${e(r).toFixed(2)} seconds of passage ${f()+1}${u()?`, ${e(s)} seconds inserted silence, first ${e(o).toFixed(2)} seconds of passage ${f()+2}`:""}`)),()=>(e(r),x(()=>e(r).toFixed(2)))]),J(He,Be)},Fe=He=>{var Be=GR(),Ue=k(Be);w(Be),ie(()=>W(Ue,`Generate and choose audio for ${u()?"both passages":"this passage"} in Voice to see the waveforms and hear the join.`)),J(He,Be)};ve(Ie,He=>{e(N)?He($e):e(C)&&(!u()||e(j))?He(ze,1):He(Fe,-1)})}var qe=q(Ie,2);{var it=He=>{var Be=FR(),Ue=ht(Be),tt=k(Ue),Re=k(tt),Ve=q(Re),_t=k(Ve,!0);w(Ve),w(tt);var mt=q(tt,2),et=k(mt),wt=k(et);ES(wt,{size:15}),w(et);var Ye=q(et,2);Pt(Ye);var ut=q(Ye,4),at=k(ut);Ir(at,{size:15}),w(ut),w(mt);var Zt=q(mt,2),At=k(Zt);ab(At,{size:14}),Rt(),w(Zt),w(Ue);var It=q(Ue,2),Ra=k(It);w(It),ie((na,ba,Ma)=>{_e(tt,"for",(K(p()),x(()=>`gap-${p().id}`))),W(Re,`Pause after passage ${f()+1}`),W(_t,(K(p()),x(()=>p().pauseAfter===null?"Project default":"Custom pause"))),_e(et,"aria-label",na),et.disabled=b()||e(s)===0,_e(Ye,"id",(K(p()),x(()=>`gap-${p().id}`))),_e(Ye,"aria-label",`Pause after chunk ${f()+1}`),bi(Ye,e(s)),Ye.disabled=b(),_e(ut,"aria-label",ba),ut.disabled=b(),Zt.disabled=(K(b()),K(p()),x(()=>b()||p().pauseAfter===null)),W(Ra,`Use + / − to adjust by ${Ma??""} s, or enter an exact pause. Set 0 for no pause.`)},[()=>(K(_()),x(()=>`Shorten pause by ${_().toFixed(2)} seconds`)),()=>(K(_()),x(()=>`Lengthen pause by ${_().toFixed(2)} seconds`)),()=>(K(_()),x(()=>_().toFixed(2)))]),re("click",et,()=>L(-_())),re("change",Ye,na=>{const ba=na.currentTarget.valueAsNumber;if(!Number.isFinite(ba)||ba<0){y(H,"Enter a zero or positive pause.");return}y(H,""),p(p().pauseAfter=ba,!0),T()()}),re("click",ut,()=>L(_())),re("click",Zt,()=>{p(p().pauseAfter=null,!0),T()()}),J(He,Be)};ve(qe,He=>{u()&&He(it)})}var st=q(qe,2);{var Ne=He=>{var Be=MR(),Ue=k(Be,!0);w(Be),ie(()=>W(Ue,e(H))),J(He,Be)};ve(st,He=>{e(H)&&He(Ne)})}w(ee),ie(()=>{W(ge,u()?"LISTEN TO THE JOIN":"END OF NARRATION"),W(we,u()?`Passage ${f()+1} → ${f()+2}`:`Passage ${f()+1} · final passage`),ce.disabled=(K(b()),e(N),e(C),K(u()),e(j),x(()=>b()||e(N)||!e(C)||!!u()&&!e(j)||!!e(C)&&!!e(j)&&e(C).numberOfChannels!==e(j).numberOfChannels)),W(Ge,`Passage ${f()+1} · ${e(i),x(()=>e(i)?.reference?.name||e(i)?.configuration.request.voice||e(i)?.configuration.model.display_name||"No recording")??""}`),W(Xe,(K(p()),x(()=>p().text)))}),re("click",ce,()=>e(O)?Q():Z()),J(a,ee),Ei()}var UR=po(''),RR=po(''),BR=po('',1),PR=ae('

            Reading this take…

            '),jR=ae(""),NR=ae(""),OR=ae('
            '),IR=ae(''),DR=ae('

            Edit this take’s audio

            Click to place the playhead and add silence. Drag across a gap to select and delete it. Your original recording stays unchanged.

            Drag to select, or Shift-click to extend a selection. Delete removes all audio in that range, including any speech. Undo restores it.

            ');function LR(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y(),g=Y(),h=Y();let m=xe(t,"take",12),p=xe(t,"sampleRate",8),u=xe(t,"increment",8),f=xe(t,"disabled",8,!1),_=xe(t,"active",8,!0),b=xe(t,"onchange",8),v=xe(t,"onincrement",8),T,S=Y(),M=Y(),P=Y(!0),B=!1,C=Y(""),j=Y(0),G=Y(""),A=Y(0),N=Y(0),H=0,E=0,U="",O=Y(!1),V=Y(1),D=Y(0),$=Y(700),F=Y(),z=Y(),L=Y(""),Q=Y(),Z,ee=Y(0);function oe(Ke){if(!Number.isFinite(Ke)){y(C,"Enter a valid playhead time.");return}e(M)&&y(C,""),y(j,Math.max(0,Math.min(e(i),Ke))),e(z)&&Bt(z,e(z).currentTime=e(j))}function fe(){y(D,e(i)&&e(F)?e(F).scrollLeft/(e($)*e(V))*e(i):0)}async function le(Ke){y(V,Math.max(1,Math.min(64,Ke))),await Ps(),Bt(F,e(F).scrollLeft=Math.max(0,e(j)/e(i)*e($)*e(V)-e($)/2)),fe()}function ge(Ke){const Et=e(c).find(Qa=>Qa.id===Ke);y(G,Ke),oe(Et.start+Et.seconds/2),Ps().then(()=>{Bt(F,e(F).scrollLeft=Math.max(0,e(j)/e(i)*e($)*e(V)-e($)/2)),fe()})}function R(Ke,Et,Qa){e(z).pause();try{const Za=m().rendered?.audio,mi=[...Ke.silences].sort((za,Je)=>za.at-Je.at),Ht=Ke.removed||[],_i=mi.length>0||Ht.length>0,ei=_i?Z3(T,e(S),mi,Ht):e(S),wa=_i?Rc(ei):void 0;m(m().editing={silences:mi,removed:Ht,undo:Et,redo:Qa},!0),m(m().rendered=wa?{audio:wa,duration:ei.duration}:void 0,!0),y(M,ei),y(j,Math.min(e(j),e(M).duration)),y(G,""),y(A,y(N,0)),y(C,""),b()(Za),Ps().then(()=>{B||(fe(),e(z)&&Bt(z,e(z).currentTime=e(j)))})}catch(Za){y(C,`Could not edit this recording: ${String(Za)}`)}}function we(){if(!Number.isFinite(u())||u()<=0){y(C,"Choose a positive silence increment.");return}const Ke=structuredClone(e(r)),Et=Math.round(e(j)*e(S).sampleRate),Qa=e(l).find(Za=>Et>=Za.start&&EtZa.id===Qa.silenceId).seconds+=u();else{const Za=(Qa.sourceFrame+Math.min(Qa.frames,Math.max(0,Et-Qa.start)))/e(S).sampleRate;Ke.push({id:crypto.randomUUID(),at:Za,seconds:u()})}R({silences:Ke,removed:e(o)},[...m().editing?.undo||[],structuredClone({silences:e(r),removed:e(o)})],[])}function ce(){y(j,e(c).find(Ke=>Ke.id===e(G)).start),R({silences:e(r).filter(Ke=>Ke.id!==e(G)),removed:e(o)},[...m().editing?.undo||[],structuredClone({silences:e(r),removed:e(o)})],[])}function Te(){if(!Number.isFinite(e(d))||!Number.isFinite(e(g))||e(d)<0||e(g)>e(i)||e(g)<=e(d)){y(C,"Select a valid audio range.");return}const Ke=e(S).sampleRate,Et=Math.round(e(d)*Ke),Qa=Math.round(e(g)*Ke),Za=structuredClone(e(r)),mi=structuredClone(e(o));for(const Ht of e(l)){const _i=Math.max(Et,Ht.start),ei=Math.min(Qa,Ht.start+Ht.frames);if(!(ei<=_i))if(Ht.sourceFrame===null){const wa=Za.find(za=>za.id===Ht.silenceId);wa.seconds=Math.max(0,Math.round(wa.seconds*Ke)-(ei-_i))/Ke}else mi.push({start:(Ht.sourceFrame+_i-Ht.start)/Ke,end:(Ht.sourceFrame+ei-Ht.start)/Ke})}y(j,e(d)),R({silences:Za.filter(Ht=>Ht.seconds>0),removed:mi},[...m().editing?.undo||[],structuredClone({silences:e(r),removed:e(o)})],[])}function he(){const Ke=m().editing.undo,Et=Ke[Ke.length-1];R(structuredClone(Array.isArray(Et)?{silences:Et}:Et),Ke.slice(0,-1),[...m().editing?.redo||[],structuredClone({silences:e(r),removed:e(o)})])}function je(){const Ke=m().editing.redo,Et=Ke[Ke.length-1];R(structuredClone(Array.isArray(Et)?{silences:Et}:Et),[...m().editing?.undo||[],structuredClone({silences:e(r),removed:e(o)})],Ke.slice(0,-1))}function Le(Ke){return Math.max(0,Math.min(e(i),e(D)+(Ke.clientX-Ke.currentTarget.getBoundingClientRect().left)/e($)*e(n)))}function nt(Ke){f()||e(P)||!e(M)||(e(z).pause(),H=Le(Ke),E=Ke.clientX,U=Ke.target.getAttribute("data-silence")||"",y(O,!0),Ke.currentTarget.setPointerCapture(Ke.pointerId))}function Ae(Ke){e(O)&&Math.abs(Ke.clientX-E)>3&&(y(G,""),y(A,H),y(N,Le(Ke)))}function Ge(Ke){e(O)&&(y(O,!1),Math.abs(Ke.clientX-E)>3?(y(A,H),y(N,Le(Ke)),oe(Math.min(e(A),e(N)))):Ke.shiftKey?(y(A,e(j)),y(N,Le(Ke))):(y(A,y(N,0)),U?ge(U):(y(G,""),oe(Le(Ke)))))}function ne(){document.querySelectorAll(".tts-app audio").forEach(Et=>{Et!==e(z)&&Et.pause()});const Ke=()=>{y(j,e(z).currentTime),y(ee,requestAnimationFrame(Ke))};cancelAnimationFrame(e(ee)),Ke()}Kn(()=>{T=new AudioContext({sampleRate:p()}),Z=new ResizeObserver(Ke=>{y($,Ke[0].contentRect.width),fe()}),Z.observe(e(F)),(async()=>{try{if(y(S,await T.decodeAudioData(await m().audio.arrayBuffer())),B)return;y(M,e(r).length||e(o).length?Z3(T,e(S),e(r),e(o)):e(S))}catch(Ke){B||y(C,`Could not read this recording: ${String(Ke)}`)}finally{B||y(P,!1)}})()}),ur(()=>{B=!0,cancelAnimationFrame(e(ee)),e(z)?.pause(),Z?.disconnect(),e(L)&&URL.revokeObjectURL(e(L)),T&&T.close()}),Ee(()=>e(M),()=>{y(i,e(M)?.duration||0)}),Ee(()=>(e(i),e(V)),()=>{y(n,e(i)/e(V))}),Ee(()=>(e(M),e(D),e(n),e(i),e($)),()=>{y(s,e(M)?G_(e(M),e(D),Math.min(e(n),e(i)-e(D)),Math.min(1e3,Math.round(e($)))):[])}),Ee(()=>K(m()),()=>{y(r,m().editing?.silences||[])}),Ee(()=>K(m()),()=>{y(o,m().editing?.removed||[])}),Ee(()=>(e(S),e(r),e(o)),()=>{y(l,e(S)?X3(e(S).length,e(S).sampleRate,e(r),e(o)):[])}),Ee(()=>(e(l),e(S)),()=>{y(c,e(l).filter(Ke=>Ke.silenceId).map(Ke=>({id:Ke.silenceId,start:Ke.start/e(S).sampleRate,seconds:Ke.frames/e(S).sampleRate})))}),Ee(()=>(e(A),e(N)),()=>{y(d,Math.min(e(A),e(N)))}),Ee(()=>(e(A),e(N)),()=>{y(g,Math.max(e(A),e(N)))}),Ee(()=>K(m()),()=>{y(h,m().rendered?.audio||m().audio)}),Ee(()=>(e(h),e(Q),e(L)),()=>{e(h)!==e(Q)&&(e(L)&&URL.revokeObjectURL(e(L)),y(Q,e(h)),y(L,URL.createObjectURL(e(h))))}),Ee(()=>(K(_()),K(f()),e(z)),()=>{(!_()||f())&&e(z)?.pause()}),kn(),Xi();var Xe=DR(),de=k(Xe),ye=q(k(de)),ue=k(ye);w(ye),w(de);var be=q(de,2),Se=k(be),Ie=k(Se);dT(Ie,{size:16}),w(Se);var $e=q(Se),ze=k($e);w($e);var Fe=q($e),qe=k(Fe);lT(qe,{size:16}),w(Fe);var it=q(Fe),st=q(it,2),Ne=k(st);ZS(Ne,{size:15}),Rt(),w(st);var He=q(st),Be=k(He);jS(Be,{size:15}),Rt(),w(He),w(be);var Ue=q(be,2),tt=k(Ue);let Re;var Ve=k(tt),_t=k(Ve);{var mt=Ke=>{var Et=BR(),Qa=q(ht(Et));Ct(Qa,1,()=>e(c),Kt,(_i,ei)=>{var wa=UR();let za;ie(Je=>{za=va(wa,0,"silence-region svelte-1dg2w50",null,za,{chosen:e(ei).id===e(G)}),_e(wa,"x",(e(ei),e(D),e(n),x(()=>(e(ei).start-e(D))/e(n)*1e3))),_e(wa,"width",(e(ei),e(n),x(()=>e(ei).seconds/e(n)*1e3))),_e(wa,"data-silence",(e(ei),x(()=>e(ei).id))),_e(wa,"aria-label",Je)},[()=>(e(ei),x(()=>`Select inserted silence at ${e(ei).start.toFixed(2)} seconds`))]),re("click",wa,O4(()=>ge(e(ei).id))),re("keydown",wa,Je=>{(Je.key==="Enter"||Je.key===" ")&&(Je.preventDefault(),Je.stopPropagation(),ge(e(ei).id))}),J(_i,wa)});var Za=q(Qa),mi=q(Za,2);Ct(mi,1,()=>e(s),Kt,(_i,ei,wa)=>{var za=RR();ie(()=>{_e(za,"x1",(e(s),x(()=>(wa+.5)/e(s).length*1e3))),_e(za,"x2",(e(s),x(()=>(wa+.5)/e(s).length*1e3))),_e(za,"y1",(e(ei),x(()=>75-e(ei)[1]*65))),_e(za,"y2",(e(ei),x(()=>75-e(ei)[0]*65)))}),J(_i,za)});var Ht=q(mi);ie(()=>{_e(Za,"x",(e(d)-e(D))/e(n)*1e3),_e(Za,"width",(e(g)-e(d))/e(n)*1e3),_e(Ht,"x1",(e(j)-e(D))/e(n)*1e3),_e(Ht,"x2",(e(j)-e(D))/e(n)*1e3)}),J(Ke,Et)};ve(_t,Ke=>{e(M)&&Ke(mt)})}w(Ve),w(tt),w(Ue),Ci(Ue,Ke=>y(F,Ke),()=>e(F));var et=q(Ue,2),wt=k(et),Ye=k(wt);w(wt);var ut=q(wt),at=k(ut);w(ut);var Zt=q(ut),At=k(Zt);w(Zt),w(et);var It=q(et,2);{var Ra=Ke=>{var Et=PR();J(Ke,Et)};ve(It,Ke=>{e(P)&&Ke(Ra)})}var na=q(It,2),ba=k(na),Ma=q(k(ba));Pt(Ma),w(ba);var en=q(ba),ea=q(k(en));Ct(ea,4,()=>[.05,.1,.25,.5,1],Kt,(Ke,Et)=>{var Qa=jR(),Za=k(Qa);w(Qa);var mi={};ie(Ht=>{W(Za,`+${Ht??""} s`),mi!==(mi=Et)&&(Qa.value=(Qa.__value=Et)??"")},[()=>x(()=>Et.toFixed(2))]),J(Ke,Qa)}),w(ea);var kt;On(ea),w(en);var ta=q(en),ra=k(ta);Ir(ra,{size:15});var ki=q(ra);w(ta);var ya=q(ta);w(na);var ni=q(na,2),Ai=k(ni),xi=q(k(Ai));Pt(xi),w(Ai);var tn=q(Ai),Si=q(k(tn));Pt(Si),w(tn);var dn=q(tn),on=q(dn);w(ni);var Bi=q(ni,4);Ci(Bi,Ke=>y(z,Ke),()=>e(z));var Qi=q(Bi,2),Ki=k(Qi);Ec(Ki,{size:14}),Rt(),w(Qi);var Wa=q(Qi,2);{var Jn=Ke=>{var Et=OR();Ct(Et,5,()=>e(c),Kt,(Qa,Za)=>{var mi=NR();let Ht;var _i=k(mi);w(mi),ie((ei,wa)=>{Ht=va(mi,1,"svelte-1dg2w50",null,Ht,{selected:e(Za).id===e(G)}),W(_i,`Silence ${ei??""}–${wa??""} s`)},[()=>(e(Za),x(()=>e(Za).start.toFixed(2))),()=>(e(Za),x(()=>(e(Za).start+e(Za).seconds).toFixed(2)))]),re("click",mi,()=>ge(e(Za).id)),J(Qa,mi)}),w(Et),J(Ke,Et)};ve(Wa,Ke=>{e(c),x(()=>e(c).length)&&Ke(Jn)})}var Vn=q(Wa,2);{var Xn=Ke=>{var Et=IR(),Qa=k(Et,!0);w(Et),ie(()=>W(Qa,e(C))),J(Ke,Et)};ve(Vn,Ke=>{e(C)&&Ke(Xn)})}w(Xe),ie((Ke,Et,Qa,Za,mi,Ht,_i)=>{W(ue,`${Ke??""} s ${e(r),e(o),x(()=>e(r).length||e(o).length?"· Edited":"· Original")??""}`),Se.disabled=e(P)||!e(M)||e(V)===1,W(ze,`${e(V)??""}×`),Fe.disabled=e(P)||!e(M)||e(V)===64,it.disabled=e(P)||!e(M),st.disabled=(K(f()),e(P),K(m()),x(()=>f()||e(P)||!m().editing?.undo.length)),He.disabled=(K(f()),e(P),K(m()),x(()=>f()||e(P)||!m().editing?.redo.length)),Re=Ip(tt,"",Re,{width:`${e(V)*100}%`}),_e(Ve,"width",e($)),_e(Ve,"aria-valuemax",e(i)),_e(Ve,"aria-valuenow",e(j)),_e(Ve,"aria-valuetext",Et),W(Ye,`${Qa??""} s`),W(at,`Visible ${Za??""} s · scroll horizontally to pan`),W(At,`${mi??""} s`),_e(Ma,"max",e(i)),bi(Ma,Ht),Ma.disabled=e(P),ea.disabled=f(),kt!==(kt=u())&&(ea.value=(ea.__value=u())??"",xn(ea,u())),ta.disabled=f()||e(P)||!e(M),W(ki,`Insert ${_i??""} s at playhead`),ya.disabled=f()||e(P)||!e(G),_e(xi,"max",e(i)),xi.disabled=e(P)||f(),_e(Si,"max",e(i)),Si.disabled=e(P)||f(),dn.disabled=f()||e(P)||!e(M)||e(g)<=e(d),on.disabled=e(g)<=e(d),_e(Bi,"src",e(L)),Qi.disabled=e(P)||f()||!e(M)},[()=>(e(i),x(()=>e(i).toFixed(2))),()=>(e(j),x(()=>`${e(j).toFixed(3)} seconds`)),()=>(e(D),x(()=>e(D).toFixed(2))),()=>(e(n),x(()=>e(n).toFixed(2))),()=>(e(i),e(D),e(n),x(()=>Math.min(e(i),e(D)+e(n)).toFixed(2))),()=>(e(j),x(()=>e(j).toFixed(3))),()=>(K(u()),x(()=>u().toFixed(2)))]),re("click",Se,()=>le(e(V)/2)),re("click",Fe,()=>le(e(V)*2)),re("click",it,()=>le(1)),re("click",st,he),re("click",He,je),re("pointerdown",Ve,nt),re("pointermove",Ve,Ae),re("pointerup",Ve,Ge),re("pointercancel",Ve,()=>y(O,!1)),re("keydown",Ve,Ke=>{(Ke.key==="ArrowLeft"||Ke.key==="ArrowRight")&&(Ke.preventDefault(),Ke.shiftKey?(e(g)===e(d)&&y(A,e(j)),y(N,Math.max(0,Math.min(e(i),e(j)+(Ke.key==="ArrowRight"?.1:-.1))))):y(A,y(N,0)),oe(e(j)+(Ke.key==="ArrowRight"?1:-1)*(Ke.shiftKey?.1:.01))),(Ke.key==="Delete"||Ke.key==="Backspace")&&e(g)>e(d)&&!f()&&(Ke.preventDefault(),Te()),Ke.key==="Home"&&(Ke.preventDefault(),oe(0)),Ke.key==="End"&&(Ke.preventDefault(),oe(e(i)))}),re("scroll",Ue,fe),re("change",Ma,Ke=>oe(Ke.currentTarget.valueAsNumber)),re("change",ea,Ke=>v()(Number(Ke.currentTarget.value))),re("click",ta,we),re("click",ya,ce),Ta(xi,()=>e(A),Ke=>y(A,Ke)),Ta(Si,()=>e(N),Ke=>y(N,Ke)),re("click",dn,Te),re("click",on,()=>y(A,y(N,0))),re("play",Bi,ne),re("pause",Bi,()=>cancelAnimationFrame(e(ee))),re("ended",Bi,()=>cancelAnimationFrame(e(ee))),re("click",Qi,()=>{Bt(z,e(z).currentTime=e(j)),e(z).play().catch(Ke=>y(C,String(Ke)))}),J(a,Xe),Ei()}var VR=ae(''),HR=ae('

            Narration

            '),WR=ae(''),QR=ae(''),Vf=ae(""),KR=ae('

            Opening your projects…

            '),YR=ae(''),JR=ae(' '),XR=ae(''),ZR=ae(''),eB=ae(''),tB=ae('
            Preview
            ',1),aB=ae('
            TXT & Markdown
            ',1),iB=ae('

            ',1),nB=ae(' '),sB=ae(''),rB=ae('',1),oB=ae('

            Edit passage

            ',1),lB=ae('

            Add your script first

            '),cB=ae('
            '),dB=ae('

            '),uB=ae('

            Listen to the join

            ',1),fB=ae(''),pB=ae('

            '),mB=ae('

            One final listen

            ',1),gB=ae('

            Script preparation

            Each passage gets its own recording. Paragraphs are a good place to start.

            Next: speakers

            Create a named speaker by choosing a model and voice. Reuse that speaker across your passages.

            '),hB=ae('

            Pauses & audio

            Applies between passages. The center preview lets you override one join.

            '),_B=ae(''),vB=ae(''),bB=ae('Download again'),yB=ae('

            Download settings

            Polish audio Optional

            Projects save in this browser. Download a copy to keep.

            '),wB=ae(''),kB=ae(''),xB=ae(''),SB=ae(''),TB=ae(''),$B=ae('

            Choose a take

            Trying another take keeps your current choice.
            '),qB=ae('

            Edit passage audio

            '),CB=ae('

            '),AB=ae('
            '),GB=ae('

            Passage archive

            '),FB=ae('

            ',1),MB=ae('
            TEXT TO SPEECH
            Projects save automatically in this browser.
            ');function zB(a,t){zi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y(),g=Y(),h=Y(),m=Y(),p=Y(),u=Y(),f=Y(),_=Y(),b=Y(),v=Y(),T=Y(),S=Y(),M=Y(),P=Y(),B=Y();let C=xe(t,"busy",12,!1),j=xe(t,"active",8,!0),G=Y(null),A=Y([]),N=Y([]),H=Y([]),E=Y("script"),U=Y(""),O=Y(0);const V=40;let D=Y(1),$=Y(0),F=Y(""),z=Y(!1),L=Y(!1),Q=Y(0),Z=Y(new Set),ee=Y("all"),oe=Y(""),fe=Y(null),le=Y(""),ge=Y(!1),R=Y(!1),we=Y(""),ce=Y(0),Te=Y("editor"),he=Y(120),je=Y();function Le(pe){return pe.showModal(),{destroy(){pe.close()}}}function nt(pe){const De=()=>{y(he,Math.max(0,Math.round(pe.getBoundingClientRect().top+window.scrollY)))},ft=new ResizeObserver(De),jt=document.querySelector(".topbar");return jt&&ft.observe(jt),window.addEventListener("resize",De),De(),{destroy(){ft.disconnect(),window.removeEventListener("resize",De)}}}function Ae(){if(!e(G)||C())return;const pe=tu("");Bt(G,e(G).chunks=[...e(G).chunks,pe]),Wi(()=>{C(),e(fe),e(qe)}),Ue(pe.id),at(),mt("speech")}function Ge(){y(Te,"settings"),Ps().then(()=>e(je)?.addSpeaker())}function ne(){!e(d)||!e(G)||(y(we,[...e(d).takes].reverse().find(pe=>pe.signature===Ds(e(G),e(d)))?.id||e(d).takes.at(-1)?.id||""),y(R,!0))}let Xe=Y(""),de=Y(""),ye=Y(""),ue=Y(!0),be=Y(j()),Se=Y(!1),Ie=Y(!1),$e,ze=null,Fe=Y(null),qe=Y(""),it=Y(""),st=Y(""),Ne=Y({}),He=new Map,Be=Y();function Ue(pe){if(!e(G))return;document.querySelectorAll(".tts-app audio").forEach(ft=>ft.pause()),y(U,pe),y(le,""),y(ge,!1),y(R,!1),y(Te,"editor"),localStorage.setItem(`audiocpp.tts.chunk:${e(G).id}`,pe);const De=(e(oe)||e(ee)!=="all"?e(c):e(G).chunks).findIndex(ft=>ft.id===pe);De>=0&&y(O,Math.floor(De/V)),y(de,"")}function tt(pe){e(G)?.chunks[pe]&&Ue(e(G).chunks[pe].id)}const Re=[{id:"script",label:"Script"},{id:"speech",label:"Speakers"},{id:"assemble",label:"Arrange"},{id:"finish",label:"Export"}];function Ve(pe){const De=localStorage.getItem(`audiocpp.tts.stage:${pe.id}`);return De==="finish"&&au(pe)||De==="assemble"&&pe.chunks.length&&pe.chunks.every(ft=>In(pe,ft))||De==="script"||De==="speech"&&pe.chunks.length?De:pe.chunks.length?"speech":"script"}function _t(){y(Te,"editor"),Ps().then(()=>{document.querySelector(".stage-title")?.focus({preventScroll:!0}),window.scrollTo({top:0})})}function mt(pe){C()||(y(E,pe),y(de,""),pe==="assemble"&&e(g)>=0&&tt(e(g)),_t())}function et(){e(T)||!e(G)||(e(E)==="script"?e(fe)?.length?en():Ma():e(E)==="speech"?e(o).length&&!e(v)?Ge():e(o).length?ni(e(o).map(pe=>pe.id)):e(l).length?(Ue(e(l)[0].id),ne()):mt("assemble"):e(E)==="assemble"?e(b)?mt("finish"):Ai():Si())}function wt(pe){let De=He.get(pe);return De||(De=URL.createObjectURL(pe),He.set(pe,De)),De}function Ye(pe){if(!pe)return;const De=He.get(pe);De&&(URL.revokeObjectURL(De),He.delete(pe))}function ut(){for(const pe of He.values())URL.revokeObjectURL(pe);He.clear()}function at(){e(G)&&(y(G,{...e(G),updatedAt:Math.max(Date.now(),e(G).updatedAt+1)}),y(Se,!0),clearTimeout($e),$e=setTimeout(()=>{At().catch(pe=>y(ye,`Could not save project: ${String(pe)}`))},450))}async function Zt(){await At()}async function At(){if(clearTimeout($e),ze&&await ze,!e(G)||!e(Se))return;const pe=structuredClone(e(G));y(Ie,!0),ze=U9({id:pe.id,appId:"tts",title:pe.title,updatedAt:pe.updatedAt,data:pe}).then(()=>{e(G)?.id===pe.id&&e(G).updatedAt===pe.updatedAt&&y(Se,!1),y(A,[{id:pe.id,title:pe.title,updatedAt:pe.updatedAt},...e(A).filter(De=>De.id!==pe.id)].sort((De,ft)=>ft.updatedAt-De.updatedAt))}).finally(()=>{y(Ie,!1),ze=null}),await ze,e(Se)&&await At()}async function It(pe){if(!C())try{await At();const De=await B9(pe);if(!De||![1,2].includes(De.data.version))throw new Error("Unsupported or missing TTS project.");ut(),y(G,De.data),C2(e(G))&&at(),localStorage.setItem("audiocpp.tts.project",e(G).id),y(E,Ve(e(G))),y(U,e(G).chunks.find(jt=>jt.id===localStorage.getItem(`audiocpp.tts.chunk:${e(G).id}`))?.id||e(G).chunks[0]?.id||""),y(oe,""),y(ee,"all"),y(O,Math.max(0,Math.floor(e(G).chunks.findIndex(jt=>jt.id===e(U))/V))),y($,0),y(F,""),y(z,!1),y(Q,0),y(fe,null),y(Z,new Set),y(ye,""),y(de,""),y(qe,""),document.querySelector(".project-menu")?.removeAttribute("open"),_t()}catch(De){y(ye,String(De))}}async function Ra(){if(!C())try{await At(),ut(),y(G,$2()),localStorage.setItem("audiocpp.tts.project",e(G).id),y(E,"script"),y(U,""),y(oe,""),y(ee,"all"),y(O,0),y($,0),y(F,""),y(z,!1),y(Q,0),y(Z,new Set),y(fe,null),y(ye,""),y(de,""),y(qe,""),at(),document.querySelector(".project-menu")?.removeAttribute("open"),_t()}catch(pe){y(ye,String(pe))}}async function na(){if(!(!e(G)||C()||!confirm(`Delete project "${e(G).title}" and its audio?`)))try{await At();const pe=e(G).id;await R9(pe),y(A,e(A).filter(De=>De.id!==pe)),ut(),y(G,null),y(Se,!1),e(A).length?await It(e(A)[0].id):await Ra()}catch(pe){y(ye,String(pe))}}async function ba(){try{await(async pe=>{var De=ed(pe,2);y(N,De[0]),y(H,De[1])})(await Promise.all([Pf(),eu()])),y(ye,"")}catch(pe){y(ye,`Could not refresh model choices: ${String(pe)}`)}}function Ma(){if(!e(G))return;if(y(ye,""),!e(G).source.trim()){y(ye,"Paste text or import a TXT/Markdown file first.");return}if(!Number.isInteger(e(G).split.characters)||e(G).split.characters<40){y(ye,"Chunk size must be at least 40 characters.");return}y(ce,0);const pe=e(G).source.trim();y(fe,e(G).split.method==="sentence"?Array.from(new Intl.Segmenter(void 0,{granularity:"sentence"}).segment(pe),De=>De.segment.trim()).filter(Boolean).flatMap(De=>_f(De,e(G).split.characters)):e(G).split.method==="paragraph"?pe.split(/\n\s*\n/).filter(De=>De.trim()).flatMap(De=>_f(De,e(G).split.characters)):_f(pe,e(G).split.characters))}function en(){!e(G)||!e(fe)?.length||e(G).chunks.length&&!confirm("Replace the current chunks? Existing chunks and takes will remain in the project archive.")||(e(G).archivedChunks.push(...e(G).chunks),Bt(G,e(G).chunks=e(fe).map(pe=>tu(pe))),Wi(()=>{C(),e(fe),e(qe)}),y(U,e(G).chunks[0].id),y(fe,null),y(Z,new Set),y(oe,""),y(ee,"all"),y(O,0),y($,0),y(F,""),y(z,!1),y(Q,0),at(),mt("speech"))}async function ea(pe){if(!(!pe||!e(G))){if(y(ye,""),!/\.(txt|md|markdown)$/i.test(pe.name)){y(ye,"Choose a TXT or Markdown file.");return}try{Bt(G,e(G).source=await pe.text()),Wi(()=>{C(),e(fe),e(qe)}),e(G).title==="Untitled narration"&&(Bt(G,e(G).title=pe.name.replace(/\.[^.]+$/,"")),Wi(()=>{C(),e(fe),e(qe)})),y(fe,null),at()}catch(De){y(ye,String(De))}}}function kt(pe){if(!e(G)||C())return;const De=e(Ne)[pe.id]?.selectionStart;if(De===void 0||!pe.text.slice(0,De).trim()||!pe.text.slice(De).trim()){y(ye,"Place the text cursor where you want to split this chunk.");return}const ft=e(G).chunks.indexOf(pe);e(G).archivedChunks.push(structuredClone(pe));const jt=[tu(pe.text.slice(0,De).trim(),pe.override),tu(pe.text.slice(De).trim(),pe.override)];for(const xa of jt)xa.voice=structuredClone(pe.voice),xa.speakerId=pe.speakerId;e(G).chunks.splice(ft,1,...jt),Ue(jt[0].id),y(ye,""),at()}function ta(pe){if(!e(G)||C())return;const De=e(G).chunks.indexOf(pe),ft=e(G).chunks[De+1];if(!ft||JSON.stringify([ol(e(G),pe),Nf(e(G),pe)?.id])!==JSON.stringify([ol(e(G),ft),Nf(e(G),ft)?.id])&&!confirm("These passages use different speakers. Joining them uses the first passage’s speaker. Continue?"))return;e(G).archivedChunks.push(structuredClone(pe),structuredClone(ft));const jt=tu(`${pe.text} -${ft.text}`,pe.override);jt.voice=structuredClone(pe.voice),jt.speakerId=pe.speakerId,e(G).chunks.splice(De,2,jt),Ue(jt.id),at()}function ra(pe,De){if(!e(G)||C())return;const ft=e(G).chunks.indexOf(pe),jt=ft+De;jt<0||jt>=e(G).chunks.length||((xa=>{var Pi=ed(xa,2);Bt(G,e(G).chunks[ft]=Pi[0]),Wi(()=>{C(),e(fe),e(qe)}),Bt(G,e(G).chunks[jt]=Pi[1]),Wi(()=>{C(),e(fe),e(qe)})})([e(G).chunks[jt],e(G).chunks[ft]]),at())}function ki(pe){if(!e(G)||C())return;e(G).archivedChunks.push(pe);const De=e(G).chunks.indexOf(pe);Bt(G,e(G).chunks=e(G).chunks.filter(ft=>ft.id!==pe.id)),Wi(()=>{C(),e(fe),e(qe)}),y(Z,new Set([...e(Z)].filter(ft=>ft!==pe.id))),e(U)===pe.id&&Ue(e(G).chunks[Math.min(De,e(G).chunks.length-1)]?.id||""),at()}function ya(pe,De){pe.takeId=De.id,at()}async function ni(pe){if(!e(G)||C()||!pe.length)return;const De=e(G).chunks.filter(X=>pe.includes(X.id)).map(X=>({id:X.id,text:X.text,configuration:structuredClone(ol(e(G),X)),reference:structuredClone(Nf(e(G),X)),signature:Ds(e(G),X),sequence:e(G).chunks.indexOf(X)+X.takes.length}));if(De.some(X=>!X.configuration)){y(ye,"Add a speaker and assign it to these passages.");return}if(De.some(X=>!X.text.trim())){y(ye,"Remove empty chunks or enter text before generation.");return}if(De.some(X=>X.reference&&X.configuration.model.task!=="clon"&&!Yo[X.configuration.model.family]?.includes("speaker_reference"))){y(ye,"A selected speech model does not support a reference recording. Remove the reference or choose a voice-cloning model.");return}C(!0),y(ye,""),y(Fe,new AbortController);const ft=e(Fe).signal;let jt,xa="";const Pi=new Map;try{for(let X=0;Xbr.id===Gi.id),ns={id:crypto.randomUUID(),text:Gi.text,configuration:Gi.configuration,reference:fi||void 0,signature:Gi.signature,seed:(jt.resolvedSeed+Gi.sequence)%4294967296,audio:Un.blob,duration:Dn,createdAt:Date.now()};Zn.takes=[...Zn.takes,ns],Zn.takeId||(Zn.takeId=ns.id),Zn.id===e(U)&&Zn.takes.length>1&&y(le,Zn.id),at()}y(de,"Audio generated. The first take is selected automatically; use Compare takes to choose a replacement.")}catch(X){y(de,ft.aborted?"Cancelled. Completed takes are saved.":"Generation stopped. Completed takes are saved."),ft.aborted||y(ye,String(X))}finally{C(!1),y(Xe,""),y(Fe,null),await At().catch(X=>y(ye,`Could not save takes: ${String(X)}`))}}async function Ai(){if(!(!e(G)||C())){if(!e(G).chunks.length||e(G).chunks.some(pe=>!In(e(G),pe))){y(ye,"Choose an up-to-date take for every passage before assembly.");return}C(!0),y(ye,""),y(Fe,new AbortController),y(de,"Assembling chosen takes…");try{const pe=await KU(e(G).chunks.map(De=>({audio:ls(De).rendered?.audio||ls(De).audio,pause:De.pauseAfter??e(G).assembly.pause})),e(G).assembly.sampleRate,e(Fe).signal);e(Fe).signal.throwIfAborted(),Ye(e(G).assembled?.audio),Bt(G,e(G).assembled={audio:pe,signature:q2(e(G))}),Wi(()=>{C(),e(fe),e(qe)}),at(),y(de,"Narration assembled. Listen across chunk boundaries before finishing.")}catch(pe){y(ye,e(Fe).signal.aborted?"Cancelled.":String(pe))}finally{C(!1),y(Fe,null)}}}async function xi(){if(!e(G)||!au(e(G))||!e(G).assembled||C())return y(ye,"Combine the chosen chunk audio in step 3 first."),!1;C(!0),y(ye,""),y(Fe,new AbortController),y(de,"Processing final audio…");const pe=e(Fe).signal;try{let De=e(G).assembled.audio;if(e(G).enhancement){y(de,`Processing with ${e(G).enhancement.name}…`);const ft=new iu(e(G).enhancement,pe);await ft.prepare();const jt=await gr(De,pe),xa=await ft.run({audio:jt});if(xa.kind!=="audio")throw new Error("The processing model returned no audio.");De=xa.blob}return De=await YU(De,e(G).finish,e(G).assembly.sampleRate,pe),pe.throwIfAborted(),Ye(e(G).finished?.audio),Bt(G,e(G).finished={audio:De,signature:jc(e(G))}),Wi(()=>{C(),e(fe),e(qe)}),y(qe,""),at(),y(de,"Processing preview ready. Listen before and after, or download your narration."),!0}catch(De){return pe.aborted?y(de,"Processing cancelled."):y(ye,String(De)),!1}finally{C(!1),y(Fe,null)}}async function tn(){if(!e(G)?.finished||!e(_)||C())return!1;C(!0),y(ye,""),y(Fe,new AbortController),y(de,"Preparing download…");try{const pe=await JU(e(G).finished.audio,e(G).finish.format,e(Fe).signal);return e(Fe).signal.throwIfAborted(),y(qe,wt(pe)),y(it,`${e(G).title.replace(/[\\/:*?"<>|]/g,"_")||"narration"}.${e(G).finish.format}`),y(st,jc(e(G))+e(G).finish.format),y(de,"Download ready."),!0}catch(pe){return e(Fe).signal.aborted?y(de,"Export cancelled."):y(ye,String(pe)),!1}finally{C(!1),y(Fe,null)}}async function Si(){if(!e(G)||C()||!e(_)&&!await xi()||!await tn())return;const pe=document.createElement("a");pe.href=e(qe),pe.download=e(it),document.body.append(pe),pe.click(),pe.remove()}function dn(pe){const De=pe.currentTarget;document.querySelectorAll(".tts-app audio").forEach(ft=>{ft!==De&&ft.pause()})}Kn(async()=>{try{const[pe,De,ft]=await Promise.all([E9("tts"),Pf().catch(jt=>(y(ye,`Models are unavailable. You can still prepare your script. ${String(jt)}`),[])),eu()]);if(y(N,De),y(H,ft),y(A,pe.map(({id:jt,title:xa,updatedAt:Pi})=>({id:jt,title:xa,updatedAt:Pi}))),pe.length){const xa=(pe.find(Pi=>Pi.id===localStorage.getItem("audiocpp.tts.project"))||pe[0]).data;if(![1,2].includes(xa.version))throw new Error("Unsupported TTS project version.");y(G,xa),C2(e(G))&&at(),y(E,Ve(e(G))),y(U,e(G).chunks.find(Pi=>Pi.id===localStorage.getItem(`audiocpp.tts.chunk:${e(G).id}`))?.id||e(G).chunks[0]?.id||""),y(oe,""),y(ee,"all"),y(O,Math.max(0,Math.floor(e(G).chunks.findIndex(Pi=>Pi.id===e(U))/V))),y($,0),y(F,""),y(z,!1),y(Q,0)}else y(G,$2()),localStorage.setItem("audiocpp.tts.project",e(G).id),at()}catch(pe){y(ye,String(pe))}finally{y(ue,!1)}}),ur(()=>{e(Fe)?.abort(),clearTimeout($e),ut()}),Ee(()=>e(G),()=>{y(i,Math.max(1,Math.ceil((e(G)?.archivedChunks.length||0)/V)))}),Ee(()=>(e(Q),e(i)),()=>{e(Q)>=e(i)&&y(Q,e(i)-1)}),Ee(()=>(e(G),e(U)),()=>{y(d,e(G)?.chunks.find(pe=>pe.id===e(U)))}),Ee(()=>(e(d),ls),()=>{y(n,e(d)&&ls(e(d)))}),Ee(()=>(e(le),e(d),K(C())),()=>{e(le)&&e(d)?.id===e(le)&&!C()&&(y(we,e(d).takes.at(-1)?.id||""),y(R,!0),y(le,""))}),Ee(()=>(e(d),e(we)),()=>{y(s,e(d)?.takes.find(pe=>pe.id===e(we))||e(d)?.takes.at(-1))}),Ee(()=>(K(j()),e(be),e(ue)),()=>{j()!==e(be)&&(y(be,j()),j()&&!e(ue)&&ba())}),Ee(()=>(K(j()),e(Be)),()=>{j()||(e(Be)?.pause(),typeof document<"u"&&document.querySelectorAll(".tts-app audio").forEach(pe=>pe.pause()))}),Ee(()=>(e(G),In),()=>{y(r,e(G)?e(G).chunks.filter(pe=>In(e(G),pe)).length:0)}),Ee(()=>(e(G),Ds),()=>{y(o,e(G)?.chunks.filter(pe=>!pe.takes.some(De=>De.signature===Ds(e(G),pe)))||[])}),Ee(()=>(e(G),Ds),()=>{y(l,e(G)?.chunks.filter(pe=>!In(e(G),pe)&&pe.takes.some(De=>De.signature===Ds(e(G),pe)))||[])}),Ee(()=>(e(G),e(oe),e(ee),In),()=>{y(c,e(G)?.chunks.filter(pe=>pe.text.toLowerCase().includes(e(oe).toLowerCase())&&(e(ee)==="all"||e(ee)==="missing"&&!ls(pe)||e(ee)==="changed"&&!!ls(pe)&&!In(e(G),pe)))||[])}),Ee(()=>(e(G),e(U)),()=>{y(g,e(G)?.chunks.findIndex(pe=>pe.id===e(U))??-1)}),Ee(()=>e(g),()=>{e(g)>=0&&y(D,e(g)+1)}),Ee(()=>e(c),()=>{y(h,Math.max(1,Math.ceil(e(c).length/V)))}),Ee(()=>(e(O),e(h)),()=>{e(O)>=e(h)&&y(O,e(h)-1)}),Ee(()=>(e(c),e(O)),()=>{y(m,e(c).slice(e(O)*V,(e(O)+1)*V))}),Ee(()=>(e(G),e(F),e(z),In),()=>{y(p,e(G)?.chunks.filter(pe=>pe.text.toLowerCase().includes(e(F).toLowerCase())&&(!e(z)||!In(e(G),pe)))||[])}),Ee(()=>e(p),()=>{y(u,Math.max(1,Math.ceil(e(p).length/V)))}),Ee(()=>(e($),e(u)),()=>{e($)>=e(u)&&y($,e(u)-1)}),Ee(()=>(e(p),e($)),()=>{y(f,e(p).slice(e($)*V,(e($)+1)*V))}),Ee(()=>(e(G),jc),()=>{y(_,!!e(G)?.finished&&au(e(G))&&e(G).finished.signature===jc(e(G)))}),Ee(()=>(e(G),au),()=>{y(b,e(G)?au(e(G)):!1)}),Ee(()=>(e(G),e(E)),()=>{e(G)&&localStorage.setItem(`audiocpp.tts.stage:${e(G).id}`,e(E))}),Ee(()=>(e(G),e(o),ol),()=>{y(v,!!e(G)&&e(o).every(pe=>!!ol(e(G),pe)&&!!pe.text.trim()))}),Ee(()=>(K(C()),e(E),e(G),e(o),e(r),e(b)),()=>{y(T,C()||(e(E)==="script"?!e(G)?.source.trim():e(E)==="speech"?!e(G)?.chunks.length||e(o).some(pe=>!pe.text.trim()):e(E)==="assemble"?!e(G)?.chunks.length||e(r)!==e(G).chunks.length:!e(b)))}),Ee(()=>(e(E),e(fe),e(o),e(v),e(l),e(b)),()=>{y(S,e(E)==="script"?e(fe)?.length?"Continue to speakers":"Review passages":e(E)==="speech"?e(o).length?!e(v)&&!e(o).some(pe=>!pe.text.trim())?"Add speaker":`Generate narration${e(o).length>1?` (${e(o).length})`:""}`:e(l).length?"Review updated takes":"Continue to arrange":e(E)==="assemble"?e(b)?"Continue to export":"Combine narration":"Download")}),Ee(()=>(e(E),e(fe),e(o),e(v),e(l),e(r),e(G),e(b)),()=>{y(M,e(E)==="script"?e(fe)?.length?`${e(fe).length} passages ready to voice`:"Your words come first":e(E)==="speech"?e(o).some(pe=>!pe.text.trim())?"Add text to your empty passages":!e(v)&&e(o).length?"Create a speaker to continue":e(o).length?`${e(o).length} passages need audio`:e(l).length?`${e(l).length} updated takes need your choice`:"Every passage is ready":e(E)==="assemble"?e(r)!==e(G)?.chunks.length?"Review the passages needing audio":e(b)?"Your narration is combined":"Bring your passages together":"Save your finished narration")}),Ee(()=>(e(E),e(fe),e(o),e(v),e(l),e(b)),()=>{y(P,e(E)==="script"?e(fe)?.length?"Next, create a speaker for these passages.":"Paste text or import a TXT or Markdown file.":e(E)==="speech"?e(o).some(pe=>!pe.text.trim())?"Write a passage or remove it using Edit passage.":!e(v)&&e(o).length?"A speaker keeps the model and voice together.":e(o).length?"Generate the missing audio, then listen and refine.":e(l).length?"Compare the recordings and choose the take to keep.":"Next, adjust pauses and combine the audio.":e(E)==="assemble"?e(b)?"Continue to choose a format and download.":"Chosen takes will be combined in the order above.":"Your processing choices are applied automatically.")}),Ee(()=>Yo,()=>{y(B,Object.keys(Yo).filter(pe=>Yo[pe].includes("audio_enhancement")))}),kn();var on={saveBeforeClose:Zt};Xi();var Bi=MB();re("beforeunload",xc,pe=>{(e(Se)||e(Ie)||C())&&(pe.preventDefault(),pe.returnValue="")});let Qi;var Ki=k(Bi),Wa=k(Ki),Jn=q(k(Wa));{var Vn=pe=>{var De=VR();Pt(De),ie(()=>De.disabled=C()),Ta(De,()=>e(G).title,ft=>(Bt(G,e(G).title=ft),Wi(()=>{C(),e(fe),e(qe)}))),re("input",De,at),J(pe,De)},Xn=pe=>{var De=HR();J(pe,De)};ve(Jn,pe=>{e(G)?pe(Vn):pe(Xn,-1)})}w(Wa);var Ke=q(Wa,2);{var Et=pe=>{var De=QR();Ct(De,5,()=>Re,Kt,(ft,jt,xa)=>{const Pi=Lt(()=>(e(G),e(r),e(b),e(qe),e(_),x(()=>xa===0?e(G).chunks.length>0:xa===1?e(r)>0&&e(r)===e(G).chunks.length:xa===2?e(b):!!e(qe)&&e(_))));var X=WR();let Gi;var $i=k(X),fi=k($i);{var En=Dn=>{vm(Dn,{size:12})},Un=Dn=>{var Zn=Bp();Zn.nodeValue=xa+1,J(Dn,Zn)};ve(fi,Dn=>{K(e(Pi)),e(E),e(jt),x(()=>e(Pi)&&e(E)!==e(jt).id)?Dn(En):Dn(Un,-1)})}w($i);var Xr=q($i,1,!0);w(X),ie(()=>{_e(X,"aria-current",(e(E),e(jt),x(()=>e(E)===e(jt).id?"step":void 0))),X.disabled=(K(C()),e(G),e(r),e(b),x(()=>C()||xa>0&&!e(G).chunks.length||xa>1&&e(r)!==e(G).chunks.length||xa>2&&!e(b))),Gi=va(X,1,"svelte-1szouna",null,Gi,{active:e(E)===e(jt).id}),W(Xr,(e(jt),x(()=>e(jt).label)))}),re("click",X,()=>mt(e(jt).id)),J(ft,X)}),w(De),J(pe,De)};ve(Ke,pe=>{e(G)&&pe(Et)})}var Qa=q(Ke,2),Za=k(Qa,!0);w(Qa);var mi=q(Qa,2),Ht=k(mi),_i=k(Ht);zc(_i,{size:16});var ei=q(_i);bm(ei,{size:12}),w(Ht);var wa=q(Ht,2),za=k(wa),Je=q(k(za)),Ce=k(Je);{var pt=pe=>{var De=Vf(),ft=k(De,!0);w(De);var jt={};ie(()=>{W(ft,(e(G),x(()=>e(G).title))),jt!==(jt=(e(G),x(()=>e(G).id)))&&(De.value=(De.__value=(e(G),x(()=>e(G).id)))??"")}),J(pe,De)},zt=La(()=>(e(G),e(A),x(()=>e(G)&&!e(A).some(pe=>pe.id===e(G).id))));ve(Ce,pe=>{e(zt)&&pe(pt)})}var $a=q(Ce);Ct($a,1,()=>e(A),Kt,(pe,De)=>{var ft=Vf(),jt=k(ft,!0);w(ft);var xa={};ie(()=>{W(jt,(e(De),x(()=>e(De).title))),xa!==(xa=(e(De),x(()=>e(De).id)))&&(ft.value=(ft.__value=(e(De),x(()=>e(De).id)))??"")}),J(pe,ft)}),w(Je);var sa;On(Je),w(za);var ui=q(za),Ti=k(ui);Ir(Ti,{size:14}),Rt(),w(ui);var fa=q(ui),Ft=k(fa);ho(Ft,{size:14}),Rt(),w(fa),Rt(),w(wa),w(mi),w(Ki);var Nt=q(Ki,2);{var ka=pe=>{var De=KR();J(pe,De)};ve(Nt,pe=>{e(ue)&&pe(ka)})}var Ii=q(Nt,2);{var Ka=pe=>{var De=YR(),ft=k(De),jt=k(ft,!0);w(ft);var xa=q(ft);w(De),ie(()=>W(jt,e(ye))),re("click",xa,()=>y(ye,"")),J(pe,De)};ve(Ii,pe=>{e(ye)&&pe(Ka)})}var oa=q(Ii,2);{var Ba=pe=>{var De=FB(),ft=ht(De),jt=k(ft),xa=k(jt),Pi=k(xa,!0);w(xa);var X=q(xa,2),Gi=k(X,!0);w(X),w(jt);var $i=q(jt,2);{var fi=Dt=>{var gt=JR(),da=k(gt);w(gt),ie(()=>W(da,`${e(r)??""}/${e(G),x(()=>e(G).chunks.length)??""} ready`)),J(Dt,gt)};ve($i,Dt=>{e(E)!=="script"&&Dt(fi)})}w(ft);var En=q(ft,2),Un=k(En),Xr=k(Un);CS(Xr,{size:14}),Rt(),w(Un);var Dn=q(Un),Zn=k(Dn);Ko(Zn,{size:14}),Rt(),w(Dn);var ns=q(Dn),br=k(ns);sb(br,{size:14});var Ql=q(br,1,!0);w(ns),w(En);var Zr=q(En,2),eo=k(Zr);let Vs;var So=k(eo);{let Dt=Lt(()=>e(E)==="script"?e(fe):null);vR(So,{get project(){return e(G)},get selectedId(){return e(U)},get disabled(){return C()},get preview(){return e(Dt)},get previewIndex(){return e(ce)},onselect:gt=>{Ue(gt),e(E)==="script"&&mt("speech")},onpreview:gt=>{y(ce,gt),y(Te,"editor")},onadd:Ae,ongenerate:ni,get checked(){return e(Z)},set checked(gt){y(Z,gt)},$$legacy:!0})}var Kl=q(So);{var yr=Dt=>{var gt=XR(),da=k(gt);w(gt),ie(()=>W(da,`Archive · ${e(G),x(()=>e(G).archivedChunks.length)??""}`)),re("click",gt,()=>y(L,!0)),J(Dt,gt)};ve(Kl,Dt=>{e(G),x(()=>e(G).archivedChunks.length)&&Dt(yr)})}w(eo);var To=q(eo,2);let Rr;var $o=k(To);{var lu=Dt=>{var gt=iB(),da=ht(gt),ha=k(da),Pa=k(ha,!0);w(ha);var qa=q(ha,2);{var $t=dt=>{var lt=ZR();ie(()=>lt.disabled=C()),re("click",lt,()=>y(fe,null)),J(dt,lt)},me=dt=>{var lt=eB(),Qe=k(lt);Ko(Qe,{size:14});var yt=q(Qe,2);w(lt),ie(()=>yt.disabled=C()),re("change",yt,aa=>{ea(aa.currentTarget.files?.[0]),aa.currentTarget.value=""}),J(dt,lt)};ve(qa,dt=>{e(fe)?dt($t):dt(me,-1)})}w(da);var Me=q(da,2);{var Pe=dt=>{var lt=tB(),Qe=ht(lt);rn(Qe);var yt=q(Qe,2),aa=k(yt),Yt=k(aa);w(aa),Rt(),w(yt),ie(()=>{_e(Qe,"aria-label",`Preview passage ${e(ce)+1}`),bi(Qe,(e(fe),e(ce),x(()=>e(fe)[e(ce)]||""))),W(Yt,`${e(fe),x(()=>e(fe).length)??""} passages · ready to assign speakers`)}),J(dt,lt)},rt=dt=>{var lt=aB(),Qe=ht(lt);rn(Qe),_e(Qe,"placeholder",`Every narration starts with a few words. +`,p.innerHTML=M}function g(p,u,f,_,v){var b=!0;if(i()?b=i().state==="suspended":t(),!a())throw{status:"NotSupported",message:"This browser does not support audio."};(b||v)&&f&&f.classList.add("abcjs-loading"),b?i().resume().then(function(){_?_().then(function(S){h(p,u,f,v)}):h(p,u,f,v)}):h(p,u,f,v)}function h(p,u,f,_){_?p(u).then(function(){f&&f.classList.remove("abcjs-loading")}):(p(u),f&&f.classList.remove("abcjs-loading"))}function m(p){var u=!!p.options.loopHandler,f=!!p.options.restartHandler,_=!!p.options.playHandler||!!p.options.playPromiseHandler,v=!!p.options.progressHandler,b=!!p.options.warpHandler,S=p.parent.querySelector(".abcjs-midi-start");u&&p.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function($){g(p.options.loopHandler,$,S,p.options.afterResume)}),f&&p.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function($){g(p.options.restartHandler,$,S,p.options.afterResume)}),_&&S.addEventListener("click",function($){g(p.options.playPromiseHandler||p.options.playHandler,$,S,p.options.afterResume,!!p.options.playPromiseHandler)}),v&&p.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function($){g(p.options.progressHandler,$,S,p.options.afterResume)}),b&&p.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function($){g(p.options.warpHandler,$,S,p.options.afterResume)})}return w_=c,w_}var k_,N3;function AU(){if(N3)return k_;N3=1;var a=M3(),t=m_(),i=Nc();function n(r,o,l,c,d){for(var g=new a,h=0;h=1&&parseInt(r.cursorControl.beatSubdivisions,10)<=64&&(d=parseInt(r.cursorControl.beatSubdivisions,10)),r.timer=new i(r.visualObj,{beatCallback:r.beatCallback,eventCallback:r.eventCallback,lineEndCallback:r.lineEndCallback,qpm:r.currentTempo,extraMeasuresAtBeginning:r.cursorControl?r.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:r.cursorControl?r.cursorControl.lineEndAnticipation:0,beatSubdivisions:d}),r.cursorControl&&r.cursorControl.onReady&&typeof r.cursorControl.onReady=="function"&&r.cursorControl.onReady(r),r.isLoaded=!0,r.isLoading=!1,Promise.resolve({status:"created",notesStatus:c})})},r.destroy=function(){r.timer&&(r.timer.reset(),r.timer.stop(),r.timer=null),r.midiBuffer&&(r.midiBuffer.stop(),r.midiBuffer=null),r.setProgress(0,1),r.control&&r.control.resetAll()},r.play=function(){return r.runWhenReady(r._play,void 0)};function o(l){return new Promise(function(c){setTimeout(c,l)})}r.runWhenReady=function(l,c){return r.visualObj?r.isLoading?o(500).then(function(){return r.isLoading?r.runWhenReady(l,c):l(c)}):r.isLoaded?l(c):r.go().then(function(){return l(c)}):Promise.resolve({status:"loading"})},r._play=function(){return n().resume().then(function(){return r.isStarted=!r.isStarted,r.isStarted?(r.cursorControl&&r.cursorControl.onStart&&typeof r.cursorControl.onStart=="function"&&r.cursorControl.onStart(),r.midiBuffer.start(),r.timer.start(r.percent),r.control&&r.control.pushPlay(!0)):r.pause(),Promise.resolve({status:"ok"})})},r.pause=function(){r.timer&&(r.timer.pause(),r.midiBuffer.pause(),r.control&&r.control.pushPlay(!1))},r.toggleLoop=function(){r.isLooping=!r.isLooping,r.control&&r.control.pushLoop(r.isLooping)},r.restart=function(){r.timer&&(r.timer.setProgress(0),r.midiBuffer.seek(0))},r.randomAccess=function(l){return r.runWhenReady(r._randomAccess,l)},r._randomAccess=function(l){var c=l.target.classList.contains("abcjs-midi-progress-indicator")?l.target.parentNode:l.target,d=(l.x-c.getBoundingClientRect().left)/c.offsetWidth;return d<0&&(d=0),d>1&&(d=1),r.seek(d),Promise.resolve({status:"ok"})},r.seek=function(l,c){r.timer&&r.midiBuffer&&(r.timer.setProgress(l,c),r.midiBuffer.seek(l,c))},r.setWarp=function(l){if(parseInt(l,10)>0){r.warp=parseInt(l,10);var c=r.isStarted,d=r.percent;return r.destroy(),r.isStarted=!1,r.go().then(function(){return r.setProgress(d,r.midiBuffer.duration*1e3),r.control&&r.control.setWarp(r.currentTempo,r.warp),c?r.play().then(function(){return r.seek(d),Promise.resolve()}):(r.seek(d),Promise.resolve())})}return Promise.resolve()},r.onWarp=function(l){var c=l.target.value;return r.setWarp(c)},r.setProgress=function(l,c){r.percent=l,r.control&&r.control.setProgress(l,c)},r.finished=function(){if(r.timer.reset(),r.isLooping)return r.timer.start(0),r.midiBuffer.finished(),r.midiBuffer.start(),"continue";r.timer.stop(),r.isStarted&&(r.control&&r.control.pushPlay(!1),r.isStarted=!1,r.midiBuffer.finished(),r.cursorControl&&r.cursorControl.onFinished&&typeof r.cursorControl.onFinished=="function"&&r.cursorControl.onFinished(),r.setProgress(0,1))},r.beatCallback=function(l,c,d,g){var h=l/c;r.setProgress(h,d),r.cursorControl&&r.cursorControl.onBeat&&typeof r.cursorControl.onBeat=="function"&&r.cursorControl.onBeat(l,c,d,g)},r.eventCallback=function(l){if(l)r.cursorControl&&r.cursorControl.onEvent&&typeof r.cursorControl.onEvent=="function"&&r.cursorControl.onEvent(l);else return r.finished()},r.lineEndCallback=function(l,c){r.cursorControl&&r.cursorControl.onLineEnd&&typeof r.cursorControl.onLineEnd=="function"&&r.cursorControl.onLineEnd(l,c)},r.getUrl=function(){return r.midiBuffer.download()},r.download=function(l){var c=r.getUrl(),d=document.createElement("a");document.body.appendChild(d),d.setAttribute("style","display: none;"),d.href=c,d.download=l||"output.wav",d.click(),window.URL.revokeObjectURL(c),document.body.removeChild(d)}}return x_=s,x_}var S_,D3;function L3(){if(D3)return S_;D3=1;var a=C3(),t;return(function(){function i(m,p){for(var u in p)p.hasOwnProperty(u)&&m.setAttribute(u,p[u]);return m}function n(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}n.prototype.setTempo=function(m){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+d(Math.round(6e7/m),6),this.endTrack())},n.prototype.setGlobalInfo=function(m,p,u,f){if(this.trackcount===0){this.startTrack();var _=Math.round(6e7/m);this.track+="%00%FF%51%03"+d(_,6),u&&(this.track+=o(u)),f&&(this.track+=l(f)),p&&(this.track+=r(p,"%01")),this.endTrack()}},n.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},n.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var m=d(this.track.length/3+4,8);this.track="MTrk"+m+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},n.prototype.setText=function(m,p){m==="name"&&(this.trackName=r(p,"%03"))},n.prototype.setInstrument=function(m){this.trackInstrument="%00%C0"+d(m,2),this.instrument=m},n.prototype.setChannel=function(m,p){this.channel=m;var u="%00%B"+this.channel.toString(16);this.track+=u+"%79%00",this.track+=u+"%40%00",this.track+=u+"%5B%30",p||(p=0),p=Math.round((p+1)*64),this.track+=u+"%0A"+d(p,2),this.track+=u+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var s=4096;n.prototype.startNote=function(m,p,u){if(this.track+=h(this.silencelength),this.silencelength=0,u){this.track+="%e"+this.channel.toString(16);var f=Math.round(a(u)*s);this.track+=g(8192+f),this.track+=h(0),this.noteWarped[m]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+m.toString(16)+d(p,2)},n.prototype.endNote=function(m){this.track+=h(this.silencelength),this.silencelength=0,this.noteWarped[m]&&(this.track+="%e"+this.channel.toString(16),this.track+=g(8192),this.track+=h(0),this.noteWarped[m]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+m.toString(16)+"%00"},n.prototype.addRest=function(m){this.silencelength+=m,this.silencelength<0&&(this.silencelength=0)},n.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+d(this.trackcount,4)+"%01%e0"+this.trackstrings},n.prototype.embed=function(m,p){var u=this.getData(),f=i(document.createElement("a"),{href:u});if(f.innerHTML="download midi",m.insertBefore(f,m.firstChild),!p){var _=i(document.createElement("embed"),{src:u,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});m.insertBefore(_,m.firstChild)}};function r(m,p){for(var u="",f=0;fp&&(u=u.substring(0,p)),c(u)}function g(m){m=Math.round(m);var p=m%128,u=m-p;return d(u*2+p,4)}function h(m){var p=0,u=[];for(m=Math.round(m);m!==0;)u.push(m&127),m=m>>7;for(var f=u.length-1;f>=0;f--){p=p<<8;var _=u[f];f!==0&&(_=_|128),p=p|_}var v=p.toString(16).length;return v+=v%2,d(p,v)}t=function(){return new n}})(),S_=t,S_}var T_,V3;function GU(){if(V3)return T_;V3=1;var a=L3(),t;return(function(){var i=1920;t=function(r,o){o===void 0&&(o={});var l=r.setUpAudio(o),c=a(),d=r.metaText?r.metaText.title:void 0;d&&d.length>128&&(d=d.substring(0,124)+"...");var g=r.getKeySignature(),h=r.getMeterFraction(),m=l.tempo,p=m/60;if(h.den===8&&h.num!==5&&h.num!==7){var u=r.millisecondsPerMeasure();m=6e4/(u/h.num)/2,p=m/60}c.setGlobalInfo(m,d,g,h);for(var f=0;ff&&(S=o.pan[f]),b.instrument===128?(c.setChannel(9,S),c.setInstrument(0)):(c.setChannel(b.channel,S),c.setInstrument(b.instrument));break;case"note":var $=b.gap*p,M=b.start,N=M+b.duration-$;_[M]||(_[M]=[]),_[M].push({pitch:b.pitch,volume:b.volume,cents:b.cents}),_[N]||(_[N]=[]),_[N].push({pitch:b.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+b.cmd)}}n(c,_,i),c.endTrack()}return c.getData()};function n(s,r,o){for(var l=Object.keys(r),c=0;cd){var m=(l[g]-d)*o;s.addRest(m),d=l[g]}for(var p=0;p';o.preTextDownload&&(g+=o.preTextDownload);var h=r.metaText&&r.metaText.title?r.metaText.title:"Untitled",m;o.downloadLabel&&n(o.downloadLabel)?m=o.downloadLabel(r,c):o.downloadLabel?m=o.downloadLabel.replace(/%T/,h):m='Download MIDI for "'+h+'"',h=h.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var p=o.fileName?o.fileName:h+".midi";return g+=''+m+"",o.postTextDownload&&(g+=o.postTextDownload),g+""};return $_=i,$_}var q_,W3;function Q3(){if(W3)return q_;W3=1;try{if(typeof window.CustomEvent!="function"){var a=function(i,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var s=document.createEvent("CustomEvent");return s.initCustomEvent(i,n.bubbles,n.cancelable,n.detail),s};a.prototype=window.Event.prototype,window.CustomEvent=a}}catch{}var t=function(i){this.isEditArea=!0,typeof i=="string"?(this.textarea=document.getElementById(i),this.textarea||(this.textarea=document.querySelector(i))):this.textarea=i,this.initialText=this.textarea.value,this.isDragging=!1};return t.prototype.addSelectionListener=function(i){this.textarea.onmousemove=function(n){this.isDragging&&i.fireSelectionChanged()}},t.prototype.addChangeListener=function(i){this.changelistener=i,this.textarea.onkeyup=function(){i.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,i.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,i.fireChanged()},this.textarea.onchange=function(){i.fireChanged()}},t.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},t.prototype.setSelection=function(i,n){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(i,n);else if(this.textarea.createTextRange){var s=this.textarea.createTextRange();s.collapse(!0),s.moveEnd("character",n),s.moveStart("character",i),s.select()}this.textarea.focus()},t.prototype.getString=function(){return this.textarea.value},t.prototype.setString=function(i){this.textarea.value=i,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},t.prototype.getElem=function(){return this.textarea},q_=t,q_}var C_,K3;function MU(){if(K3)return C_;K3=1;var a=Yr(),t=I3(),i=Lf(),n=h3(),s=Q3();function r(l){var c={},d;if(l.abcjsParams)for(d in l.abcjsParams)l.abcjsParams.hasOwnProperty(d)&&(c[d]=l.abcjsParams[d]);if(l.midi_options)for(d in l.midi_options)l.midi_options.hasOwnProperty(d)&&(c[d]=l.midi_options[d]);if(l.parser_options)for(d in l.parser_options)l.parser_options.hasOwnProperty(d)&&(c[d]=l.parser_options[d]);if(l.render_options)for(d in l.render_options)l.render_options.hasOwnProperty(d)&&(c[d]=l.render_options[d]);return c.tablature&&l.warnings_id&&(c.tablature.warnings_id=l.warnings_id),c}var o=function(l,c){this.abcjsParams=r(c),c.indicate_changed&&(this.indicate_changed=!0),typeof l=="string"?this.editarea=new s(l):l.isEditArea?this.editarea=l:this.editarea=new s(l),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),c.canvas_id?this.div=c.canvas_id:c.paper_id?this.div=c.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),typeof this.div=="string"&&(this.div=document.getElementById(this.div)),c.selectionChangeCallback&&(this.selectionChangeCallback=c.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),c.synth&&i()&&(this.synth={el:c.synth.el,cursorControl:c.synth.cursorControl,options:c.synth.options}),c.generate_midi&&(this.generate_midi=c.generate_midi,this.abcjsParams.generateDownload&&(typeof c.midi_download_id=="string"?this.downloadMidi=document.getElementById(c.midi_download_id):c.midi_download_id&&(this.downloadMidi=c.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof c.midi_id=="string"?this.inlineMidi=document.getElementById(c.midi_id):c.midi_id&&(this.inlineMidi=c.midi_id))),c.warnings_id?typeof c.warnings_id=="string"?this.warningsdiv=document.getElementById(c.warnings_id):this.warningsdiv=c.warnings_id:c.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=c.onchange,this.redrawCallback=c.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(d,g){var h=function(m,p){var u=m.className;return u.length>0&&(u===p||new RegExp("(^|\\s)"+p+"(\\s|$)").test(u))};return h(d,g)||(d.className+=(d.className?" ":"")+g),d},this.removeClassName=function(d,g){return d.className=a.strip(d.className.replace(new RegExp("(^|\\s+)"+g+"(\\s+|$)")," ")),d},this.setReadOnly=function(d){var g="abc_textarea_readonly",h=this.editarea.getElem();d?(h.setAttribute("readonly","yes"),this.addClassName(h,g)):(h.removeAttribute("readonly"),this.removeClassName(h,g))}};return o.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var l=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(l)}if(this.synth){var c=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new t,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],c,this.synth.options)}},o.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=n(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(l){console.error("ABCJS error: ",l),this.warnings||(this.warnings=[]),this.warnings.push(l.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("
            "):"No errors"),this.updateSelection(),this.bReentry=!1}},o.prototype.paramChanged=function(l){if(l)for(var c in l)l.hasOwnProperty(c)&&(this.abcjsParams[c]=l[c]);this.currentAbc="",this.fireChanged()},o.prototype.getTunes=function(){return this.tunes},o.prototype.synthParamChanged=function(l){if(this.synth){if(this.synth.options={},l)for(var c in l)l.hasOwnProperty(c)&&(this.synth.options[c]=l[c]);this.currentAbc="",this.fireChanged()}},o.prototype.parseABC=function(){var l=this.editarea.getString();return l===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=l,!0)},o.prototype.updateSelection=function(){var l=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(l.start,l.end)}catch{}this.selectionChangeCallback&&this.selectionChangeCallback(l.start,l.end)},o.prototype.fireSelectionChanged=function(){this.updateSelection()},o.prototype.setDirtyStyle=function(l){if(this.indicate_changed!==void 0){var c=function(m,p){var u=function(f,_){var v=f.className;return v.length>0&&(v===_||new RegExp("(^|\\s)"+_+"(\\s|$)").test(v))};return u(m,p)||(m.className+=(m.className?" ":"")+p),m},d=function(m,p){return m.className=a.strip(m.className.replace(new RegExp("(^|\\s+)"+p+"(\\s+|$)")," ")),m},g="abc_textarea_dirty",h=this.editarea.getElem();l?c(h,g):d(h,g)}},o.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var l=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){l.modelChanged()},300);var c=this.isDirty();this.wasDirty!==c&&(this.wasDirty=c,this.setDirtyStyle(c)),this.onchangeCallback&&this.onchangeCallback(this)}},o.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},o.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()},o.prototype.highlight=function(l,c,d,g,h,m){this.editarea.setSelection(l.startChar,l.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(l.startChar,l.endChar),this.clientClickListener&&this.clientClickListener(l,c,d,g,h,m)},o.prototype.pause=function(l){this.bIsPaused=l,l||this.fireChanged()},o.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()},o.prototype.pauseMidi=function(l){this.midiPause=l,l||this.redrawMidi()},C_=o,C_}var A_,Y3;function zU(){if(Y3)return A_;Y3=1;var a=Wz(),t=Qz(),i=If(),n=sw(),s=pE(),r={};r.signature="abcjs-basic v"+a,Object.keys(t).forEach(function(S){r[S]=t[S]}),Object.keys(i).forEach(function(S){r[S]=i[S]}),r.renderAbc=h3(),r.tuneMetrics=bU(),r.TimingCallbacks=A0();var o=el();r.setGlyph=o.setSymbol,r.strTranspose=s;var l=m_(),c=i_(),d=c_(),g=M3(),h=j3(),m=Df(),p=Nc(),u=Lf(),f=AU(),_=I3(),v=FU(),b=L3();return r.synth={CreateSynth:l,instrumentIndexToName:c,pitchToNoteName:d,SynthController:_,SynthSequence:g,CreateSynthControl:h,registerAudioContext:m,activeAudioContext:p,supportsAudio:u,playEvent:f,getMidiFile:v,sequence:n,midiRenderer:b},r.Editor=MU(),r.EditArea=Q3(),r.test={Parse:ag(),EngraverController:Yh()},A_=r,A_}var J3=zU();const EU=Kx({__proto__:null,default:Hz(J3)},[J3]);var UU=ae(""),RU=ae(''),BU=ae(''),PU=ae('
            Reference voice
            '),jU=ae(''),NU=ae(''),OU=ae('
            Generation
            '),IU=ae('
            Audio
            '),DU=ae('
            RTF
            '),LU=ae('

            Seed
            ',1),VU=ae('

            No dub generated

            '),HU=ae('

            Cross-language dubbing

            Source recording

            Translation

            Speech

            Translation and audio

            ');function WU(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y();let r=Se(t,"busy",12,!1),o=Se(t,"active",8,!0),l=Y(),c=Y([]),d=Y(null),g=Y(null),h=Y(!0),m=Y(null),p=Y(""),u=Y("en"),f=Y(null),_=Y(""),v=Y(""),b=Y(""),S=Y(null),$=Y(""),M=Y(""),N=Y(""),P=Y({}),C=Y(null);const j=[...new Set(Di.filter(Ne=>Ne.task==="asr"&&Ne.request_options?.includes("target_language")).map(Ne=>Ne.family))];async function G(){if(!r()){y(h,!0),y(b,"");try{y(c,await Pf()),e(d)&&!e(c).some(Ne=>Ne.id===e(d).id)&&y(d,null),e(g)&&!e(c).some(Ne=>Ne.id===e(g).id)&&y(g,null)}catch(Ne){y(b,Ne instanceof Error?Ne.message:String(Ne))}finally{y(h,!1)}}}function A(Ne){Ne==="model"&&(y(f,null),y(_,""))}async function B(){if(r()||e(h))return;if(!e(m)||!e(d)||!e(g)||!e(u).trim()){y(b,"Choose a recording, translation model, speech model, and target language.");return}r(!0),y(b,"");const Ne=new AbortController;y(S,Ne);const Ve=e(m),gt=e(s)?e(f):null,_t=e(_).trim(),at=e(p).trim(),wt=e(u).trim(),Ke=structuredClone(e(d)),ut=structuredClone(e(g));try{const nt=Ne.signal;y(v,"Preparing models..."),await new au(Ke,nt).prepare();const Lt=new au(ut,nt);await Lt.prepare(),y(v,"Uploading recording...");const Gt=await hr(await Gr(Ve),nt);nt.throwIfAborted();const jt={};for(const[Kt,St]of Object.entries(Ke.request.options))jt[`translator.${Kt}`]=St;for(const[Kt,St]of Object.entries(ut.request.options))jt[`tts.${Kt}`]=St;const za=at||Ke.request.language?.trim();za&&(jt["translator.language"]=za),jt["translator.target_language"]=wt,ut.request.language&&(jt["tts.language"]=ut.request.language),ut.request.max_tokens!==void 0&&(jt["tts.max_tokens"]=ut.request.max_tokens),jt["tts.seed"]=Lt.resolvedSeed;const sa={audio:Gt,options:jt};gt?(sa.voice_ref=await hr(await Gr(gt),nt),_t&&(jt["tts.reference_text"]=_t)):ut.request.voice&&(sa.voice_id=ut.request.voice),nt.throwIfAborted(),y(v,"Translating and generating speech...");const wa=await xn("/v1/recipes/run",{method:"POST",body:JSON.stringify({recipe:"cross-language-dubbing",models:{translator:Ke.model.id,tts:ut.model.id},request:sa})},nt);if(nt.throwIfAborted(),!wa.audio||!wa.text?.trim())throw new Error("The recipe returned no dubbed audio or translation.");const Fa=mf(wa.audio),ln=URL.createObjectURL(new Blob([wa.text],{type:"text/plain;charset=utf-8"}));e($)&&URL.revokeObjectURL(e($)),e(N)&&URL.revokeObjectURL(e(N)),y($,Fa),y(N,ln),y(M,wa.text),y(P,wa.timing||{}),y(C,Lt.resolvedSeed),y(v,"Dub ready")}catch(nt){Ne.signal.aborted?y(v,"Cancelled"):(y(b,nt instanceof Error?nt.message:String(nt)),y(v,""))}finally{r(!1),y(S,null)}}Jn(G),fr(()=>{e(S)?.abort(),e($)&&URL.revokeObjectURL(e($)),e(N)&&URL.revokeObjectURL(e(N))}),Ue(()=>(e(g),Di),()=>{y(i,e(g)&&(Di.find(Ne=>Ne.id===e(g).model.id)||Di.find(Ne=>Ne.family===e(g).model.family&&Ne.task==="tts")))}),Ue(()=>e(i),()=>{y(n,e(i)?.builtin_voices||[])}),Ue(()=>(e(g),Io),()=>{y(s,!!(e(g)&&Io[e(g).model.family]?.includes("speaker_reference")))}),Ue(()=>(Q(o()),e(l)),()=>{!o()&&e(l)&&e(l).querySelectorAll("audio").forEach(Ne=>Ne.pause())}),wn(),Zi();var H=HU(),U=k(H),E=k(U),O=k(E);eb(O,{size:24}),zt(),w(E);var V=q(E,2),L=k(V);OS(L,{size:17}),w(V),w(U);var T=q(U,2),F=k(T),z=k(F),D=k(z),K=k(D);wm(K,{size:17}),zt(),w(D);var X=q(D,2),ee=q(k(X));w(X);var ce=q(X,2);ss(ce,{get file(){return e(m)},label:"Original audio"}),w(z);var fe=q(z,2),le=k(fe),ge=k(le);eb(ge,{size:17}),zt(),w(le);var R=q(le,2);{let Ne=Nt(()=>r()||e(h));iu(R,{label:"Translation model",get choices(){return e(c)},tasks:["asr"],get families(){return j},get disabled(){return e(Ne)},onchange:()=>{},get value(){return e(d)},set value(Ve){y(d,Ve)},$$legacy:!0})}var we=q(R,2),pe=k(we),Te=q(k(pe));Pt(Te),w(pe);var he=q(pe,2),Pe=q(k(he));Pt(Pe),w(he),w(we),w(fe);var Le=q(fe,2),ct=k(Le),Ae=k(ct);sf(Ae,{size:17}),zt(),w(ct);var Ge=q(ct,2);{let Ne=Nt(()=>r()||e(h));iu(Ge,{label:"Speech model",get choices(){return e(c)},tasks:["tts"],get disabled(){return e(Ne)},onchange:A,get value(){return e(g)},set value(Ve){y(g,Ve)},$$legacy:!0})}var ne=q(Ge,2);{var Je=Ne=>{var Ve=RU(),gt=q(k(Ve));Ct(gt,5,()=>e(n),Qt,(_t,at)=>{var wt=UU(),Ke=k(wt,!0);w(wt);var ut={};ie(()=>{W(Ke,e(at)),ut!==(ut=e(at))&&(wt.value=(wt.__value=e(at))??"")}),J(_t,wt)}),w(gt),w(Ve),ie(()=>gt.disabled=r()),ur(gt,()=>e(g).request.voice,_t=>(Et(g,e(g).request.voice=_t),Yi(()=>{r(),e(n)}))),J(Ne,Ve)};ve(ne,Ne=>{e(g),e(n),x(()=>e(g)&&e(n).length)&&Ne(Je)})}var ue=q(ne,2);{var ye=Ne=>{var Ve=PU(),gt=q(k(Ve),2),_t=q(k(gt));w(gt);var at=q(gt,2);ss(at,{get file(){return e(f)},label:"Reference voice"});var wt=q(at,2),Ke=q(k(wt));sn(Ke),w(wt);var ut=q(wt,2);{var nt=Lt=>{var Gt=BU();ie(()=>Gt.disabled=r()),re("click",Gt,()=>{y(f,null),y(_,"")}),J(Lt,Gt)};ve(ut,Lt=>{e(f)&&Lt(nt)})}w(Ve),ie(()=>{_t.disabled=r(),Ke.disabled=r()}),re("change",_t,Lt=>y(f,Lt.currentTarget.files?.[0]||null)),Sa(Ke,()=>e(_),Lt=>y(_,Lt)),J(Ne,Ve)};ve(ue,Ne=>{e(s)&&Ne(ye)})}w(Le);var de=q(Le,2),be=k(de),xe=k(be);Mc(xe,{size:16}),zt(),w(be);var Ie=q(be,2);{var $e=Ne=>{var Ve=jU(),gt=k(Ve);zc(gt,{size:15}),zt(),w(Ve),re("click",Ve,()=>e(S)?.abort()),J(Ne,Ve)};ve(Ie,Ne=>{r()&&Ne($e)})}var ze=q(Ie,2),Fe=k(ze,!0);w(ze),w(de);var qe=q(de,2);{var rt=Ne=>{var Ve=NU(),gt=k(Ve,!0);w(Ve),ie(()=>W(gt,e(b))),J(Ne,Ve)};ve(qe,Ne=>{e(b)&&Ne(rt)})}w(F);var ot=q(F,2),je=k(ot),He=k(je);Oo(He,{size:17}),zt(),w(je);var Be=q(je,2);{var Re=Ne=>{var Ve=LU(),gt=ht(Ve),_t=k(gt,!0);w(gt);var at=q(gt,2),wt=q(at,2),Ke=k(wt);{var ut=da=>{var wi=OU(),ma=q(k(wi)),hi=k(ma);w(ma),w(wi),ie(zi=>W(hi,`${zi??""} s`),[()=>(e(P),x(()=>(e(P).wall_ms/1e3).toFixed(2)))]),J(da,wi)};ve(Ke,da=>{e(P),x(()=>e(P).wall_ms!==void 0)&&da(ut)})}var nt=q(Ke,2);{var Lt=da=>{var wi=IU(),ma=q(k(wi)),hi=k(ma);w(ma),w(wi),ie(zi=>W(hi,`${zi??""} s`),[()=>(e(P),x(()=>(e(P).audio_duration_ms/1e3).toFixed(2)))]),J(da,wi)};ve(nt,da=>{e(P),x(()=>e(P).audio_duration_ms!==void 0)&&da(Lt)})}var Gt=q(nt,2);{var jt=da=>{var wi=DU(),ma=q(k(wi)),hi=k(ma,!0);w(ma),w(wi),ie(zi=>W(hi,zi),[()=>(e(P),x(()=>e(P).rtf.toFixed(3)))]),J(da,wi)};ve(Gt,da=>{e(P),x(()=>e(P).rtf!==void 0)&&da(jt)})}var za=q(Gt,2),sa=q(k(za)),wa=k(sa,!0);w(sa),w(za),w(wt);var Fa=q(wt,2),ln=k(Fa),Kt=k(ln);qd(Kt,{size:15}),zt(),w(ln);var St=q(ln,2),ea=k(St);qd(ea,{size:15}),zt(),w(St),w(Fa),ie(()=>{W(_t,e(M)),_e(at,"src",e($)),W(wa,e(C)),_e(ln,"href",e($)),_e(St,"href",e(N))}),J(Ne,Ve)},Ze=Ne=>{var Ve=VU();J(Ne,Ve)};ve(Be,Ne=>{e($)?Ne(Re):Ne(Ze,-1)})}w(ot),w(T),w(H),Ci(H,Ne=>y(l,Ne),()=>e(l)),ie(Ne=>{V.disabled=r()||e(h),ee.disabled=r(),Te.disabled=r(),Pe.disabled=r(),be.disabled=Ne,W(Fe,e(h)?"Loading installed models...":e(v))},[()=>(Q(r()),e(h),e(m),e(d),e(g),e(u),x(()=>r()||e(h)||!e(m)||!e(d)||!e(g)||!e(u).trim()))]),re("click",V,G),re("change",ee,Ne=>y(m,Ne.currentTarget.files?.[0]||null)),Sa(Te,()=>e(p),Ne=>y(p,Ne)),Sa(Pe,()=>e(u),Ne=>y(u,Ne)),re("click",be,B),J(a,H),Mi()}const QU=Object.freeze(Object.defineProperty({__proto__:null,default:WU},Symbol.toStringTag,{value:"Module"}));async function KU(a,t,i){if(!a.length)throw new Error("Generate speech before assembling audio.");const n=new AudioContext({sampleRate:t});try{const s=[];for(const d of a){if(i.throwIfAborted(),!Number.isFinite(d.pause)||d.pause<0)throw new Error("Pauses must be zero or positive.");s.push({buffer:await n.decodeAudioData(await d.audio.arrayBuffer()),pause:d.pause})}const r=s[0].buffer.numberOfChannels;if(s.some(d=>d.buffer.numberOfChannels!==r))throw new Error("Chosen takes have different channel counts. Use compatible takes before assembly.");const o=s.reduce((d,g,h)=>d+g.buffer.length+(h0)throw new Error("Enter a valid gain and a peak target at or below 0 dBFS.");const s=new AudioContext({sampleRate:i});try{const r=await s.decodeAudioData(await a.arrayBuffer());n.throwIfAborted();let o=0;for(let c=0;c0?Math.pow(10,t.peakDb/20)/o:Math.pow(10,t.gainDb/20);if(o*l>1.000001)throw new Error("This gain would clip the audio. Lower the gain or enable peak normalization.");for(let c=0;ca.getChannelData(d));return Array.from({length:o},(c,d)=>{let g=0,h=0;for(let m=s+Math.floor(d*r/o);ma/t||!Number.isFinite(d.seconds)||d.seconds<=0)throw new Error("Invalid silence insertion.");const g=Math.round(d.at*t);s.set(g,[...s.get(g)||[],d])}const r=n.map(d=>{if(!Number.isFinite(d.start)||!Number.isFinite(d.end)||d.start<0||d.end>a/t||d.end<=d.start)throw new Error("Invalid audio removal.");return{start:Math.round(d.start*t),end:Math.round(d.end*t)}}).sort((d,g)=>d.start-g.start),o=[...new Set([0,a,...s.keys(),...r.flatMap(d=>[d.start,d.end])])].sort((d,g)=>d-g),l=[];let c=0;for(let d=0;dg&&!r.some(m=>m.start<=g&&m.end>=h)&&(l.push({start:c,frames:h-g,sourceFrame:g}),c+=h-g)}return l}function Z3(a,t,i,n=[]){const s=X3(t.length,t.sampleRate,i,n),r=s.reduce((l,c)=>l+c.frames,0);if(!r)throw new Error("The selection removes the entire recording. Leave some audio or inserted silence.");const o=a.createBuffer(t.numberOfChannels,r,t.sampleRate);for(const l of s)if(l.sourceFrame!==null)for(let c=0;cProject default'),ZU=ae('
            '),eR=ae('

            Add your first speaker

            Pick a model and a voice once, then use that speaker throughout your script.

            '),tR=ae(''),aR=ae('
            APPLY THIS SPEAKER

            Earlier recordings stay available for comparison.

            '),iR=ae('

            Speakers

            Manage presets in Lib → Speakers.

            ',1);function nR(a,t){Fi(t,!1);const i=Y(),n=Y();let s=Se(t,"project",12),r=Se(t,"chunk",12),o=Se(t,"choices",8),l=Se(t,"voices",8),c=Se(t,"disabled",8,!1),d=Se(t,"onchange",8),g=Se(t,"onbusy",8),h=Se(t,"onerror",8),m=Y([]),p=Y(!1),u=Y(null);function f(){c()||(y(u,null),y(p,!0))}async function _(z){await T2(z);const D=!s().speakers?.length;y(m,[z,...e(m).filter(K=>K.id!==z.id)]),s(s().speakers=s().speakers?.some(K=>K.id===z.id)?s().speakers.map(K=>K.id===z.id?z:K):[...s().speakers||[],z],!0),s().defaultSpeakerId||s(s().defaultSpeakerId=z.id,!0),!e(u)&&r()&&!D&&r(r().speakerId=z.id,!0),d()()}function v(z){r()?r(r().speakerId=z.id,!0):s(s().defaultSpeakerId=z.id,!0),d()()}function b(){if(e(i)){s(s().defaultSpeakerId=e(i).id,!0);for(const z of s().chunks)z.speakerId=null;d()()}}Jn(()=>{let z=0;const D=S0.subscribe(async()=>{const K=++z;try{const X=await T0();K===z&&y(m,X)}catch(X){K===z&&h()(`Could not open the speaker library: ${String(X)}`)}});return()=>{z++,D()}}),Ue(()=>(Q(s()),Q(r())),()=>{y(i,xo(s(),r()))}),Ue(()=>(Q(r()),Q(s())),()=>{y(n,r()?s().chunks.indexOf(r())+1:0)}),wn();var S={addSpeaker:f};Zi();var $=iR(),M=ht($),N=k(M),P=q(k(N),2),C=k(P);Dr(C,{size:17}),w(P),w(N);var j=q(N,2),G=k(j,!0);w(j);var A=q(j,2),B=k(A);Ct(B,1,()=>(Q(s()),x(()=>s().speakers||[])),z=>z.id,(z,D)=>{var K=ZU();let X;var ee=k(K),ce=k(ee),fe=k(ce,!0);w(ce);var le=q(ce),ge=k(le),R=k(ge,!0);w(ge);var we=q(ge),pe=k(we);w(we);var Te=q(we);{var he=Ge=>{var ne=XU();J(Ge,ne)};ve(Te,Ge=>{Q(s()),e(D),x(()=>s().defaultSpeakerId===e(D).id)&&Ge(he)})}w(le);var Pe=q(le);{var Le=Ge=>{vm(Ge,{size:14})};ve(Pe,Ge=>{e(i),e(D),x(()=>e(i)?.id===e(D).id)&&Ge(Le)})}w(ee);var ct=q(ee,2),Ae=k(ct);tb(Ae,{size:14}),w(ct),w(K),ie((Ge,ne,Je)=>{X=ya(K,1,"svelte-1utfzu5",null,X,{assigned:e(i)?.id===e(D).id}),_e(ee,"aria-label",(e(D),x(()=>`Assign ${e(D).name}`))),_e(ee,"aria-pressed",(e(i),e(D),x(()=>e(i)?.id===e(D).id))),ee.disabled=c(),W(fe,Ge),W(R,(e(D),x(()=>e(D).name))),W(pe,`${ne??""} · ${Je??""}`),_e(ct,"aria-label",(e(D),x(()=>`Edit ${e(D).name}`))),ct.disabled=c()},[()=>(e(D),x(()=>e(D).name.slice(0,1).toUpperCase())),()=>(Q(Ol),e(D),x(()=>Ol(e(D)))),()=>(e(D),x(()=>e(D).configuration.model.display_name.split(" (")[0]))]),re("click",ee,()=>v(e(D))),re("click",ct,()=>{y(u,e(D)),y(p,!0)}),J(z,K)});var H=q(B,2);{var U=z=>{var D=eR(),K=k(D);El(K,{size:26}),zt(4),w(D),J(z,D)};ve(H,z=>{Q(s()),x(()=>!s().speakers?.length)&&z(U)})}w(A);var E=q(A,2),O=k(E);Dr(O,{size:14}),zt(),w(E);var V=q(E,4);{var L=z=>{var D=aR(),K=q(k(D));{var X=fe=>{var le=tR();ie(()=>le.disabled=c()),re("click",le,()=>{r(r().speakerId=null,!0),d()()}),J(fe,le)};ve(K,fe=>{Q(r()),x(()=>r().speakerId)&&fe(X)})}var ee=q(K),ce=k(ee);w(ee),zt(2),w(D),ie(()=>{ee.disabled=c(),W(ce,`Use ${e(i),x(()=>e(i).name)??""} for all passages`)}),re("click",ee,b),J(z,D)};ve(V,z=>{e(i)&&r()&&z(L)})}w(M);var T=q(M,2);{var F=z=>{{let D=Nt(()=>(Q(s()),x(()=>(s().speakers?.length||0)+1)));A2(z,{get initial(){return e(u)},get saved(){return e(m)},get choices(){return o()},get voices(){return l()},get number(){return e(D)},onsave:_,onclose:()=>y(p,!1),get onbusy(){return g()}})}};ve(T,z=>{e(p)&&z(F)})}return ie(()=>{P.disabled=c(),W(G,r()?`Assign a speaker to passage ${e(n)}.`:"Choose the default speaker for your narration."),E.disabled=c()}),re("click",P,f),re("click",E,f),J(a,$),Al(t,"addSpeaker",f),Mi(S)}var sR=ae(''),rR=ae('

            Review each passage before continuing.

            '),oR=ae('
            '),lR=ae(''),cR=ae(''),dR=ae('
            '),uR=ae('
            01

            Your script, in passages

            Write or import your text, then review how it splits here.

            '),fR=ae('

            No matching passages. Try another search or filter.

            '),pR=ae(" ",1),mR=ae(''),gR=ae('',1),hR=ae('
            '),_R=ae('

            Passages

            ');function vR(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y();let r=Se(t,"project",8),o=Se(t,"selectedId",8),l=Se(t,"disabled",8,!1),c=Se(t,"preview",8,null),d=Se(t,"previewIndex",8,0),g=Se(t,"checked",28,()=>new Set),h=Se(t,"onselect",8),m=Se(t,"onpreview",8),p=Se(t,"onadd",8),u=Se(t,"ongenerate",8),f=Y(""),_=Y("all"),v=Y(0),b=Y(!1);const S=40;function $(z,D){const K=new Set(g());D?K.add(z):K.delete(z),g(K)}Ue(()=>(Q(r()),e(f),e(_),On),()=>{y(i,r().chunks.filter(z=>z.text.toLowerCase().includes(e(f).toLowerCase())&&(e(_)==="all"||e(_)==="missing"&&!os(z)||e(_)==="changed"&&!On(r(),z))))}),Ue(()=>e(i),()=>{y(n,Math.max(1,Math.ceil(e(i).length/S)))}),Ue(()=>(e(v),e(n)),()=>{e(v)>=e(n)&&y(v,e(n)-1)}),Ue(()=>(e(i),Q(o())),()=>{y(s,e(i).findIndex(z=>z.id===o()))}),Ue(()=>e(s),()=>{e(s)>=0&&y(v,Math.floor(e(s)/S))}),wn(),Zi();var M=_R(),N=k(M),P=k(N),C=q(k(P)),j=k(C,!0);w(C),w(P);var G=q(P,2);{var A=z=>{var D=sR(),K=k(D);$S(K,{size:15}),w(D),ie(()=>_e(D,"aria-pressed",e(b))),re("click",D,()=>y(b,!e(b))),J(z,D)};ve(G,z=>{Q(r()),Q(c()),x(()=>r().chunks.length&&!c())&&z(A)})}w(N);var B=q(N,2);{var H=z=>{var D=rR();J(z,D)},U=z=>{var D=oR(),K=k(D);Pt(K);var X=q(K),ee=k(X);ee.value=ee.__value="all";var ce=q(ee);ce.value=ce.__value="missing";var fe=q(ce);fe.value=fe.__value="changed",w(X),w(D),Sa(K,()=>e(f),le=>y(f,le)),re("input",K,()=>y(v,0)),ur(X,()=>e(_),le=>y(_,le)),re("change",X,()=>y(v,0)),J(z,D)};ve(B,z=>{c()?z(H):(Q(r()),x(()=>r().chunks.length)&&z(U,1))})}var E=q(B,2),O=k(E);{var V=z=>{var D=ys(),K=ht(D);Ct(K,1,c,Qt,(X,ee,ce)=>{var fe=lR();let le;_e(fe,"aria-label",`Review passage ${ce+1}`);var ge=k(fe),R=k(ge,!0);w(ge);var we=q(ge),pe=k(we),Te=k(pe,!0);w(pe),zt(),w(we),w(fe),ie(he=>{le=ya(fe,1,"passage-row svelte-zo1321",null,le,{current:d()===ce}),_e(fe,"aria-current",d()===ce?"true":void 0),W(R,he),W(Te,e(ee))},[()=>x(()=>String(ce+1).padStart(2,"0"))]),re("click",fe,()=>m()(ce)),J(X,fe)}),J(z,D)},L=z=>{var D=pR(),K=ht(D);Ct(K,1,()=>(e(i),e(v),x(()=>e(i).slice(e(v)*S,(e(v)+1)*S))),fe=>fe.id,(fe,le)=>{const ge=Nt(()=>(Q(r()),e(le),x(()=>r().chunks.indexOf(e(le))))),R=Nt(()=>(Q(On),Q(r()),e(le),x(()=>On(r(),e(le)))));var we=dR();let pe;var Te=k(we);{var he=be=>{var xe=cR();Pt(xe),ie(Ie=>{_e(xe,"aria-label",`Select passage ${e(ge)+1}`),xe.disabled=l(),Cl(xe,Ie)},[()=>(Q(g()),e(le),x(()=>g().has(e(le).id)))]),re("change",xe,Ie=>$(e(le).id,Ie.currentTarget.checked)),J(be,xe)};ve(Te,be=>{e(b)&&be(he)})}var Pe=q(Te),Le=k(Pe),ct=k(Le,!0);w(Le);var Ae=q(Le),Ge=k(Ae),ne=k(Ge,!0);w(Ge);var Je=q(Ge),ue=k(Je);let ye;var de=q(ue);w(Je),w(Ae),w(Pe),w(we),ie((be,xe,Ie)=>{pe=ya(we,1,"passage-item svelte-zo1321",null,pe,{current:o()===e(le).id}),_e(Pe,"aria-label",`Edit passage ${e(ge)+1}`),_e(Pe,"aria-current",(Q(o()),e(le),x(()=>o()===e(le).id?"true":void 0))),Pe.disabled=l(),W(ct,be),W(ne,(e(le),x(()=>e(le).text||"Empty passage"))),ye=ya(ue,1,"readiness svelte-zo1321",null,ye,{ready:e(R)}),W(de,`${xe??""} · ${Ie??""}`)},[()=>(Q(e(ge)),x(()=>String(e(ge)+1).padStart(2,"0"))),()=>(Q(xo),Q(r()),e(le),x(()=>xo(r(),e(le))?.name||"No speaker")),()=>(Q(e(R)),Q(os),e(le),x(()=>e(R)?"Ready":os(e(le))?"Needs update":"No audio"))]),re("click",Pe,()=>h()(e(le).id)),J(fe,we)});var X=q(K,2);{var ee=fe=>{var le=uR();J(fe,le)},ce=fe=>{var le=fR();J(fe,le)};ve(X,fe=>{Q(r()),x(()=>!r().chunks.length)?fe(ee):(e(i),x(()=>!e(i).length)&&fe(ce,1))})}J(z,D)};ve(O,z=>{c()?z(V):z(L,-1)})}w(E);var T=q(E,2);{var F=z=>{var D=hR(),K=k(D);{var X=ge=>{var R=mR(),we=k(R),pe=k(we);rf(pe,{size:14}),w(we);var Te=q(we),he=k(Te);w(Te);var Pe=q(Te),Le=k(Pe);of(Le,{size:14}),w(Pe),w(R),ie(()=>{we.disabled=e(v)===0,W(he,`${e(v)+1} / ${e(n)??""}`),Pe.disabled=e(v)===e(n)-1}),re("click",we,()=>Bu(v,-1)),re("click",Pe,()=>Bu(v)),J(ge,R)};ve(K,ge=>{e(n)>1&&ge(X)})}var ee=q(K);{var ce=ge=>{var R=gR(),we=ht(R),pe=k(we);Pt(pe),zt(),w(we);var Te=q(we),he=k(Te);w(Te),ie(Pe=>{Cl(pe,Pe),pe.disabled=l(),Te.disabled=(Q(l()),Q(g()),x(()=>l()||!g().size)),W(he,`Generate selected (${Q(g()),x(()=>g().size)??""})`)},[()=>(e(i),Q(g()),x(()=>e(i).length>0&&e(i).every(Pe=>g().has(Pe.id))))]),re("change",pe,Pe=>{const Le=new Set(g());for(const ct of e(i))Pe.currentTarget.checked?Le.add(ct.id):Le.delete(ct.id);g(Le)}),re("click",Te,()=>u()([...g()])),J(ge,R)};ve(ee,ge=>{e(b)&&ge(ce)})}var fe=q(ee),le=k(fe);Dr(le,{size:14}),zt(),w(fe),w(D),ie(()=>fe.disabled=l()),re("click",fe,function(...ge){p()?.apply(this,ge)}),J(z,D)};ve(T,z=>{Q(c()),Q(r()),x(()=>!c()&&r().chunks.length)&&z(F)})}w(M),ie(()=>W(j,(Q(c()),Q(r()),x(()=>c()?.length??r().chunks.length)))),J(a,M),Mi()}var bR=ae("Stop preview",1),yR=ae(" ",1),ex=ae('Choose up-to-date audio in Voice.'),wR=ae('

            '),kR=ae('

            Reading the selected recordings…

            '),xR=po('',1),SR=po(''),TR=po(''),$R=po(''),qR=po(''),CR=ae(' ',1),AR=ae('

            ',1),GR=ae('
            '),FR=ae('
            seconds

            ',1),MR=ae(''),zR=ae('

            ');function ER(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y(),g=Y(),h=Y();let m=Se(t,"project",8),p=Se(t,"chunk",12),u=Se(t,"next",8),f=Se(t,"index",8),_=Se(t,"increment",8),v=Se(t,"disabled",8,!1),b=Se(t,"active",8,!0),S=Se(t,"onchange",8),$=Y(!1),M,N=Y(),P=Y(),C=Y(),j=Y(),G=Y([]),A=Y([]),B=Y(!1),H=Y(""),U=0,E=[],O=Y(!1),V=Y(0),L=0,T=0,F=Y(0);async function z(He,Be){const Re=++U;y(N,He),y(P,Be),K(),y(C,void 0),y(j,void 0),y(G,[]),y(A,[]),y(B,!0),y(H,"");try{const Ze=He?await M.decodeAudioData(await He.arrayBuffer()):void 0,Ne=Be?await M.decodeAudioData(await Be.arrayBuffer()):void 0;if(Re!==U)return;if(y(C,Ze),y(j,Ne),Ze&&y(G,G_(Ze,Math.max(0,Ze.duration-2),Math.min(2,Ze.duration))),Ne&&y(A,G_(Ne,0,Math.min(2,Ne.duration))),Ze&&Ne&&Ze.numberOfChannels!==Ne.numberOfChannels)throw new Error("The selected recordings have different channel counts. Choose compatible takes before joining them.")}catch(Ze){Re===U&&y(H,`Could not read this boundary: ${String(Ze)}`)}finally{Re===U&&y(B,!1)}}function D(He){if(!Number.isFinite(_())||_()<=0){y(H,"Choose a positive pause increment.");return}y(H,""),p(p().pauseAfter=Math.max(0,Math.round((e(s)+He)*1e6)/1e6),!0),S()()}function K(){cancelAnimationFrame(L);for(const He of E)He.onended=null,He.stop(),He.disconnect();E=[],y(O,!1),y(V,0)}async function X(){if(!(!e(C)||u()&&!e(j))){if(!Number.isFinite(e(s))||e(s)<0){y(H,"Gap must be zero or positive.");return}K(),y(H,"");try{if(document.querySelectorAll(".tts-app audio").forEach(Ne=>Ne.pause()),await M.resume(),!e($)||!b()||v())return;const He=M.currentTime+.03,Be=Math.round(e(s)*m().assembly.sampleRate)/m().assembly.sampleRate,Re=M.createBufferSource();if(Re.buffer=e(C),Re.connect(M.destination),Re.start(He,Math.max(0,e(C).duration-2),e(r)),E=[Re],u()&&e(j)){const Ne=M.createBufferSource();Ne.buffer=e(j),Ne.connect(M.destination),Ne.start(He+e(r)+Be,0,e(o)),E.push(Ne)}y(F,e(s)),T=He,y(O,!0),E[E.length-1].onended=K;const Ze=()=>{y(V,Math.max(0,Math.min(e(l),M.currentTime-T))),e(O)&&(L=requestAnimationFrame(Ze))};Ze()}catch(He){K(),y(H,`Could not play this boundary: ${String(He)}`)}}}Jn(()=>{M=new AudioContext({sampleRate:m().assembly.sampleRate}),y($,!0),document.addEventListener("play",K,!0)}),fr(()=>{U++,e($)&&(y($,!1),K(),document.removeEventListener("play",K,!0),M.close())}),Ue(()=>Q(p()),()=>{y(i,os(p()))}),Ue(()=>(Q(u()),os),()=>{y(n,u()&&os(u()))}),Ue(()=>(Q(p()),Q(m())),()=>{y(s,p().pauseAfter??m().assembly.pause)}),Ue(()=>e(C),()=>{y(r,e(C)?Math.min(2,e(C).duration):0)}),Ue(()=>e(j),()=>{y(o,e(j)?Math.min(2,e(j).duration):0)}),Ue(()=>(e(r),Q(u()),e(s),e(o)),()=>{y(l,e(r)+(u()?e(s)+e(o):0))}),Ue(()=>(e(l),e(r)),()=>{y(c,e(l)?e(r)/e(l)*1e3:0)}),Ue(()=>(e(l),Q(u()),e(s)),()=>{y(d,e(l)&&u()?e(s)/e(l)*1e3:0)}),Ue(()=>e(i),()=>{y(g,e(i)?.rendered?.audio||e(i)?.audio)}),Ue(()=>e(n),()=>{y(h,e(n)?.rendered?.audio||e(n)?.audio)}),Ue(()=>(e($),e(g),e(N),e(h),e(P)),()=>{e($)&&(e(g)!==e(N)||e(h)!==e(P))&&z(e(g),e(h))}),Ue(()=>(e(O),Q(b()),Q(v()),e(s),e(F)),()=>{e(O)&&(!b()||v()||e(s)!==e(F))&&K()}),wn(),Zi();var ee=zR(),ce=k(ee),fe=k(ce),le=k(fe),ge=k(le,!0);w(le);var R=q(le,2),we=k(R,!0);w(R),w(fe);var pe=q(fe,2),Te=k(pe);{var he=He=>{var Be=bR(),Re=ht(Be);zc(Re,{size:15}),zt(),J(He,Be)},Pe=He=>{var Be=yR(),Re=ht(Be);Mc(Re,{size:15});var Ze=q(Re,1,!0);ie(()=>W(Ze,u()?"Listen across boundary":"Listen to ending")),J(He,Be)};ve(Te,He=>{e(O)?He(he):He(Pe,-1)})}w(pe),w(ce);var Le=q(ce,2),ct=k(Le),Ae=k(ct),Ge=k(Ae);w(Ae);var ne=q(Ae,2),Je=k(ne,!0);w(ne);var ue=q(ne,2);{var ye=He=>{var Be=ex();J(He,Be)},de=Va(()=>(Q(On),Q(m()),Q(p()),x(()=>!On(m(),p()))));ve(ue,He=>{e(de)&&He(ye)})}w(ct);var be=q(ct,2);{var xe=He=>{var Be=wR(),Re=k(Be),Ze=k(Re);w(Re);var Ne=q(Re,2),Ve=k(Ne,!0);w(Ne);var gt=q(Ne,2);{var _t=wt=>{var Ke=ex();J(wt,Ke)},at=Va(()=>(Q(On),Q(m()),Q(u()),x(()=>!On(m(),u()))));ve(gt,wt=>{e(at)&&wt(_t)})}w(Be),ie(()=>{W(Ze,`Passage ${f()+2} · ${e(n),x(()=>e(n)?.reference?.name||e(n)?.configuration.request.voice||e(n)?.configuration.model.display_name||"No recording")??""}`),W(Ve,(Q(u()),x(()=>u().text)))}),J(He,Be)};ve(be,He=>{u()&&He(xe)})}w(Le);var Ie=q(Le,2);{var $e=He=>{var Be=kR();J(He,Be)},ze=He=>{var Be=AR(),Re=ht(Be),Ze=k(Re),Ne=k(Ze),Ve=q(Ne);{var gt=Kt=>{var St=xR(),ea=ht(St),da=q(ea);ie(()=>{_e(ea,"x",e(c)),_e(ea,"width",e(d)),_e(da,"x",e(c)+e(d)),_e(da,"width",1e3-e(c)-e(d))}),J(Kt,St)};ve(Ve,Kt=>{u()&&Kt(gt)})}var _t=q(Ve,2);Ct(_t,1,()=>e(G),Qt,(Kt,St,ea)=>{var da=SR();ie(()=>{_e(da,"x1",(e(G),e(c),x(()=>(ea+.5)/e(G).length*e(c)))),_e(da,"x2",(e(G),e(c),x(()=>(ea+.5)/e(G).length*e(c)))),_e(da,"y1",(e(St),x(()=>80-e(St)[1]*68))),_e(da,"y2",(e(St),x(()=>80-e(St)[0]*68)))}),J(Kt,da)});var at=q(_t);Ct(at,1,()=>e(A),Qt,(Kt,St,ea)=>{var da=TR();ie(()=>{_e(da,"x1",(e(c),e(d),e(A),x(()=>e(c)+e(d)+(ea+.5)/e(A).length*(1e3-e(c)-e(d))))),_e(da,"x2",(e(c),e(d),e(A),x(()=>e(c)+e(d)+(ea+.5)/e(A).length*(1e3-e(c)-e(d))))),_e(da,"y1",(e(St),x(()=>80-e(St)[1]*68))),_e(da,"y2",(e(St),x(()=>80-e(St)[0]*68)))}),J(Kt,da)});var wt=q(at),Ke=q(wt);{var ut=Kt=>{var St=$R();ie(()=>{_e(St,"x1",e(c)+e(d)),_e(St,"x2",e(c)+e(d))}),J(Kt,St)};ve(Ke,Kt=>{u()&&Kt(ut)})}var nt=q(Ke);{var Lt=Kt=>{var St=qR();ie(()=>{_e(St,"x1",e(V)/e(l)*1e3),_e(St,"x2",e(V)/e(l)*1e3)}),J(Kt,St)};ve(nt,Kt=>{e(O)&&Kt(Lt)})}w(Ze),w(Re);var Gt=q(Re,2),jt=k(Gt),za=k(jt);w(jt);var sa=q(jt);{var wa=Kt=>{var St=CR(),ea=ht(St),da=k(ea);w(ea);var wi=q(ea),ma=k(wi);w(wi),ie((hi,zi)=>{W(da,`Inserted gap · ${hi??""} s`),W(ma,`Beginning · ${zi??""} s`)},[()=>(e(s),x(()=>e(s).toFixed(2))),()=>(e(o),x(()=>e(o).toFixed(2)))]),J(Kt,St)};ve(sa,Kt=>{u()&&Kt(wa)})}w(Gt);var Fa=q(Gt,2),ln=k(Fa);w(Fa),ie((Kt,St)=>{_e(Re,"data-gap",e(s)),_e(Ze,"aria-label",Kt),_e(Ne,"width",e(c)),_e(wt,"x1",e(c)),_e(wt,"x2",e(c)),W(za,`Ending · ${St??""} s`),W(ln,`Waveforms include silence already in the recordings. ${u()?"The shaded gap is extra silence you insert.":"The final passage has no trailing gap."}`)},[()=>(e(r),Q(f()),Q(u()),e(s),e(o),x(()=>`Actual audio waveform: last ${e(r).toFixed(2)} seconds of passage ${f()+1}${u()?`, ${e(s)} seconds inserted silence, first ${e(o).toFixed(2)} seconds of passage ${f()+2}`:""}`)),()=>(e(r),x(()=>e(r).toFixed(2)))]),J(He,Be)},Fe=He=>{var Be=GR(),Re=k(Be);w(Be),ie(()=>W(Re,`Generate and choose audio for ${u()?"both passages":"this passage"} in Voice to see the waveforms and hear the join.`)),J(He,Be)};ve(Ie,He=>{e(B)?He($e):e(C)&&(!u()||e(j))?He(ze,1):He(Fe,-1)})}var qe=q(Ie,2);{var rt=He=>{var Be=FR(),Re=ht(Be),Ze=k(Re),Ne=k(Ze),Ve=q(Ne),gt=k(Ve,!0);w(Ve),w(Ze);var _t=q(Ze,2),at=k(_t),wt=k(at);ES(wt,{size:15}),w(at);var Ke=q(at,2);Pt(Ke);var ut=q(Ke,4),nt=k(ut);Dr(nt,{size:15}),w(ut),w(_t);var Lt=q(_t,2),Gt=k(Lt);ab(Gt,{size:14}),zt(),w(Lt),w(Re);var jt=q(Re,2),za=k(jt);w(jt),ie((sa,wa,Fa)=>{_e(Ze,"for",(Q(p()),x(()=>`gap-${p().id}`))),W(Ne,`Pause after passage ${f()+1}`),W(gt,(Q(p()),x(()=>p().pauseAfter===null?"Project default":"Custom pause"))),_e(at,"aria-label",sa),at.disabled=v()||e(s)===0,_e(Ke,"id",(Q(p()),x(()=>`gap-${p().id}`))),_e(Ke,"aria-label",`Pause after chunk ${f()+1}`),bi(Ke,e(s)),Ke.disabled=v(),_e(ut,"aria-label",wa),ut.disabled=v(),Lt.disabled=(Q(v()),Q(p()),x(()=>v()||p().pauseAfter===null)),W(za,`Use + / − to adjust by ${Fa??""} s, or enter an exact pause. Set 0 for no pause.`)},[()=>(Q(_()),x(()=>`Shorten pause by ${_().toFixed(2)} seconds`)),()=>(Q(_()),x(()=>`Lengthen pause by ${_().toFixed(2)} seconds`)),()=>(Q(_()),x(()=>_().toFixed(2)))]),re("click",at,()=>D(-_())),re("change",Ke,sa=>{const wa=sa.currentTarget.valueAsNumber;if(!Number.isFinite(wa)||wa<0){y(H,"Enter a zero or positive pause.");return}y(H,""),p(p().pauseAfter=wa,!0),S()()}),re("click",ut,()=>D(_())),re("click",Lt,()=>{p(p().pauseAfter=null,!0),S()()}),J(He,Be)};ve(qe,He=>{u()&&He(rt)})}var ot=q(qe,2);{var je=He=>{var Be=MR(),Re=k(Be,!0);w(Be),ie(()=>W(Re,e(H))),J(He,Be)};ve(ot,He=>{e(H)&&He(je)})}w(ee),ie(()=>{W(ge,u()?"LISTEN TO THE JOIN":"END OF NARRATION"),W(we,u()?`Passage ${f()+1} → ${f()+2}`:`Passage ${f()+1} · final passage`),pe.disabled=(Q(v()),e(B),e(C),Q(u()),e(j),x(()=>v()||e(B)||!e(C)||!!u()&&!e(j)||!!e(C)&&!!e(j)&&e(C).numberOfChannels!==e(j).numberOfChannels)),W(Ge,`Passage ${f()+1} · ${e(i),x(()=>e(i)?.reference?.name||e(i)?.configuration.request.voice||e(i)?.configuration.model.display_name||"No recording")??""}`),W(Je,(Q(p()),x(()=>p().text)))}),re("click",pe,()=>e(O)?K():X()),J(a,ee),Mi()}var UR=po(''),RR=po(''),BR=po('',1),PR=ae('

            Reading this take…

            '),jR=ae(""),NR=ae(""),OR=ae('
            '),IR=ae(''),DR=ae('

            Edit this take’s audio

            Click to place the playhead and add silence. Drag across a gap to select and delete it. Your original recording stays unchanged.

            Drag to select, or Shift-click to extend a selection. Delete removes all audio in that range, including any speech. Undo restores it.

            ');function LR(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y(),g=Y(),h=Y();let m=Se(t,"take",12),p=Se(t,"sampleRate",8),u=Se(t,"increment",8),f=Se(t,"disabled",8,!1),_=Se(t,"active",8,!0),v=Se(t,"onchange",8),b=Se(t,"onincrement",8),S,$=Y(),M=Y(),N=Y(!0),P=!1,C=Y(""),j=Y(0),G=Y(""),A=Y(0),B=Y(0),H=0,U=0,E="",O=Y(!1),V=Y(1),L=Y(0),T=Y(700),F=Y(),z=Y(),D=Y(""),K=Y(),X,ee=Y(0);function ce(Qe){if(!Number.isFinite(Qe)){y(C,"Enter a valid playhead time.");return}e(M)&&y(C,""),y(j,Math.max(0,Math.min(e(i),Qe))),e(z)&&Et(z,e(z).currentTime=e(j))}function fe(){y(L,e(i)&&e(F)?e(F).scrollLeft/(e(T)*e(V))*e(i):0)}async function le(Qe){y(V,Math.max(1,Math.min(64,Qe))),await js(),Et(F,e(F).scrollLeft=Math.max(0,e(j)/e(i)*e(T)*e(V)-e(T)/2)),fe()}function ge(Qe){const Ut=e(c).find(ja=>ja.id===Qe);y(G,Qe),ce(Ut.start+Ut.seconds/2),js().then(()=>{Et(F,e(F).scrollLeft=Math.max(0,e(j)/e(i)*e(T)*e(V)-e(T)/2)),fe()})}function R(Qe,Ut,ja){e(z).pause();try{const ai=m().rendered?.audio,oi=[...Qe.silences].sort((Ea,Ye)=>Ea.at-Ye.at),ta=Qe.removed||[],_i=oi.length>0||ta.length>0,Ja=_i?Z3(S,e($),oi,ta):e($),va=_i?Ec(Ja):void 0;m(m().editing={silences:oi,removed:ta,undo:Ut,redo:ja},!0),m(m().rendered=va?{audio:va,duration:Ja.duration}:void 0,!0),y(M,Ja),y(j,Math.min(e(j),e(M).duration)),y(G,""),y(A,y(B,0)),y(C,""),v()(ai),js().then(()=>{P||(fe(),e(z)&&Et(z,e(z).currentTime=e(j)))})}catch(ai){y(C,`Could not edit this recording: ${String(ai)}`)}}function we(){if(!Number.isFinite(u())||u()<=0){y(C,"Choose a positive silence increment.");return}const Qe=structuredClone(e(r)),Ut=Math.round(e(j)*e($).sampleRate),ja=e(l).find(ai=>Ut>=ai.start&&Utai.id===ja.silenceId).seconds+=u();else{const ai=(ja.sourceFrame+Math.min(ja.frames,Math.max(0,Ut-ja.start)))/e($).sampleRate;Qe.push({id:crypto.randomUUID(),at:ai,seconds:u()})}R({silences:Qe,removed:e(o)},[...m().editing?.undo||[],structuredClone({silences:e(r),removed:e(o)})],[])}function pe(){y(j,e(c).find(Qe=>Qe.id===e(G)).start),R({silences:e(r).filter(Qe=>Qe.id!==e(G)),removed:e(o)},[...m().editing?.undo||[],structuredClone({silences:e(r),removed:e(o)})],[])}function Te(){if(!Number.isFinite(e(d))||!Number.isFinite(e(g))||e(d)<0||e(g)>e(i)||e(g)<=e(d)){y(C,"Select a valid audio range.");return}const Qe=e($).sampleRate,Ut=Math.round(e(d)*Qe),ja=Math.round(e(g)*Qe),ai=structuredClone(e(r)),oi=structuredClone(e(o));for(const ta of e(l)){const _i=Math.max(Ut,ta.start),Ja=Math.min(ja,ta.start+ta.frames);if(!(Ja<=_i))if(ta.sourceFrame===null){const va=ai.find(Ea=>Ea.id===ta.silenceId);va.seconds=Math.max(0,Math.round(va.seconds*Qe)-(Ja-_i))/Qe}else oi.push({start:(ta.sourceFrame+_i-ta.start)/Qe,end:(ta.sourceFrame+Ja-ta.start)/Qe})}y(j,e(d)),R({silences:ai.filter(ta=>ta.seconds>0),removed:oi},[...m().editing?.undo||[],structuredClone({silences:e(r),removed:e(o)})],[])}function he(){const Qe=m().editing.undo,Ut=Qe[Qe.length-1];R(structuredClone(Array.isArray(Ut)?{silences:Ut}:Ut),Qe.slice(0,-1),[...m().editing?.redo||[],structuredClone({silences:e(r),removed:e(o)})])}function Pe(){const Qe=m().editing.redo,Ut=Qe[Qe.length-1];R(structuredClone(Array.isArray(Ut)?{silences:Ut}:Ut),[...m().editing?.undo||[],structuredClone({silences:e(r),removed:e(o)})],Qe.slice(0,-1))}function Le(Qe){return Math.max(0,Math.min(e(i),e(L)+(Qe.clientX-Qe.currentTarget.getBoundingClientRect().left)/e(T)*e(n)))}function ct(Qe){f()||e(N)||!e(M)||(e(z).pause(),H=Le(Qe),U=Qe.clientX,E=Qe.target.getAttribute("data-silence")||"",y(O,!0),Qe.currentTarget.setPointerCapture(Qe.pointerId))}function Ae(Qe){e(O)&&Math.abs(Qe.clientX-U)>3&&(y(G,""),y(A,H),y(B,Le(Qe)))}function Ge(Qe){e(O)&&(y(O,!1),Math.abs(Qe.clientX-U)>3?(y(A,H),y(B,Le(Qe)),ce(Math.min(e(A),e(B)))):Qe.shiftKey?(y(A,e(j)),y(B,Le(Qe))):(y(A,y(B,0)),E?ge(E):(y(G,""),ce(Le(Qe)))))}function ne(){document.querySelectorAll(".tts-app audio").forEach(Ut=>{Ut!==e(z)&&Ut.pause()});const Qe=()=>{y(j,e(z).currentTime),y(ee,requestAnimationFrame(Qe))};cancelAnimationFrame(e(ee)),Qe()}Jn(()=>{S=new AudioContext({sampleRate:p()}),X=new ResizeObserver(Qe=>{y(T,Qe[0].contentRect.width),fe()}),X.observe(e(F)),(async()=>{try{if(y($,await S.decodeAudioData(await m().audio.arrayBuffer())),P)return;y(M,e(r).length||e(o).length?Z3(S,e($),e(r),e(o)):e($))}catch(Qe){P||y(C,`Could not read this recording: ${String(Qe)}`)}finally{P||y(N,!1)}})()}),fr(()=>{P=!0,cancelAnimationFrame(e(ee)),e(z)?.pause(),X?.disconnect(),e(D)&&URL.revokeObjectURL(e(D)),S&&S.close()}),Ue(()=>e(M),()=>{y(i,e(M)?.duration||0)}),Ue(()=>(e(i),e(V)),()=>{y(n,e(i)/e(V))}),Ue(()=>(e(M),e(L),e(n),e(i),e(T)),()=>{y(s,e(M)?G_(e(M),e(L),Math.min(e(n),e(i)-e(L)),Math.min(1e3,Math.round(e(T)))):[])}),Ue(()=>Q(m()),()=>{y(r,m().editing?.silences||[])}),Ue(()=>Q(m()),()=>{y(o,m().editing?.removed||[])}),Ue(()=>(e($),e(r),e(o)),()=>{y(l,e($)?X3(e($).length,e($).sampleRate,e(r),e(o)):[])}),Ue(()=>(e(l),e($)),()=>{y(c,e(l).filter(Qe=>Qe.silenceId).map(Qe=>({id:Qe.silenceId,start:Qe.start/e($).sampleRate,seconds:Qe.frames/e($).sampleRate})))}),Ue(()=>(e(A),e(B)),()=>{y(d,Math.min(e(A),e(B)))}),Ue(()=>(e(A),e(B)),()=>{y(g,Math.max(e(A),e(B)))}),Ue(()=>Q(m()),()=>{y(h,m().rendered?.audio||m().audio)}),Ue(()=>(e(h),e(K),e(D)),()=>{e(h)!==e(K)&&(e(D)&&URL.revokeObjectURL(e(D)),y(K,e(h)),y(D,URL.createObjectURL(e(h))))}),Ue(()=>(Q(_()),Q(f()),e(z)),()=>{(!_()||f())&&e(z)?.pause()}),wn(),Zi();var Je=DR(),ue=k(Je),ye=q(k(ue)),de=k(ye);w(ye),w(ue);var be=q(ue,2),xe=k(be),Ie=k(xe);dT(Ie,{size:16}),w(xe);var $e=q(xe),ze=k($e);w($e);var Fe=q($e),qe=k(Fe);lT(qe,{size:16}),w(Fe);var rt=q(Fe),ot=q(rt,2),je=k(ot);ZS(je,{size:15}),zt(),w(ot);var He=q(ot),Be=k(He);jS(Be,{size:15}),zt(),w(He),w(be);var Re=q(be,2),Ze=k(Re);let Ne;var Ve=k(Ze),gt=k(Ve);{var _t=Qe=>{var Ut=BR(),ja=q(ht(Ut));Ct(ja,1,()=>e(c),Qt,(_i,Ja)=>{var va=UR();let Ea;ie(Ye=>{Ea=ya(va,0,"silence-region svelte-1dg2w50",null,Ea,{chosen:e(Ja).id===e(G)}),_e(va,"x",(e(Ja),e(L),e(n),x(()=>(e(Ja).start-e(L))/e(n)*1e3))),_e(va,"width",(e(Ja),e(n),x(()=>e(Ja).seconds/e(n)*1e3))),_e(va,"data-silence",(e(Ja),x(()=>e(Ja).id))),_e(va,"aria-label",Ye)},[()=>(e(Ja),x(()=>`Select inserted silence at ${e(Ja).start.toFixed(2)} seconds`))]),re("click",va,O4(()=>ge(e(Ja).id))),re("keydown",va,Ye=>{(Ye.key==="Enter"||Ye.key===" ")&&(Ye.preventDefault(),Ye.stopPropagation(),ge(e(Ja).id))}),J(_i,va)});var ai=q(ja),oi=q(ai,2);Ct(oi,1,()=>e(s),Qt,(_i,Ja,va)=>{var Ea=RR();ie(()=>{_e(Ea,"x1",(e(s),x(()=>(va+.5)/e(s).length*1e3))),_e(Ea,"x2",(e(s),x(()=>(va+.5)/e(s).length*1e3))),_e(Ea,"y1",(e(Ja),x(()=>75-e(Ja)[1]*65))),_e(Ea,"y2",(e(Ja),x(()=>75-e(Ja)[0]*65)))}),J(_i,Ea)});var ta=q(oi);ie(()=>{_e(ai,"x",(e(d)-e(L))/e(n)*1e3),_e(ai,"width",(e(g)-e(d))/e(n)*1e3),_e(ta,"x1",(e(j)-e(L))/e(n)*1e3),_e(ta,"x2",(e(j)-e(L))/e(n)*1e3)}),J(Qe,Ut)};ve(gt,Qe=>{e(M)&&Qe(_t)})}w(Ve),w(Ze),w(Re),Ci(Re,Qe=>y(F,Qe),()=>e(F));var at=q(Re,2),wt=k(at),Ke=k(wt);w(wt);var ut=q(wt),nt=k(ut);w(ut);var Lt=q(ut),Gt=k(Lt);w(Lt),w(at);var jt=q(at,2);{var za=Qe=>{var Ut=PR();J(Qe,Ut)};ve(jt,Qe=>{e(N)&&Qe(za)})}var sa=q(jt,2),wa=k(sa),Fa=q(k(wa));Pt(Fa),w(wa);var ln=q(wa),Kt=q(k(ln));Ct(Kt,4,()=>[.05,.1,.25,.5,1],Qt,(Qe,Ut)=>{var ja=jR(),ai=k(ja);w(ja);var oi={};ie(ta=>{W(ai,`+${ta??""} s`),oi!==(oi=Ut)&&(ja.value=(ja.__value=Ut)??"")},[()=>x(()=>Ut.toFixed(2))]),J(Qe,ja)}),w(Kt);var St;Nn(Kt),w(ln);var ea=q(ln),da=k(ea);Dr(da,{size:15});var wi=q(da);w(ea);var ma=q(ea);w(sa);var hi=q(sa,2),zi=k(hi),ui=q(k(zi));Pt(ui),w(zi);var hn=q(zi),Ai=q(k(hn));Pt(Ai),w(hn);var Vi=q(hn),_n=q(Vi);w(hi);var Ni=q(hi,4);Ci(Ni,Qe=>y(z,Qe),()=>e(z));var Hi=q(Ni,2),Wi=k(Hi);Mc(Wi,{size:14}),zt(),w(Hi);var Qa=q(Hi,2);{var Zn=Qe=>{var Ut=OR();Ct(Ut,5,()=>e(c),Qt,(ja,ai)=>{var oi=NR();let ta;var _i=k(oi);w(oi),ie((Ja,va)=>{ta=ya(oi,1,"svelte-1dg2w50",null,ta,{selected:e(ai).id===e(G)}),W(_i,`Silence ${Ja??""}–${va??""} s`)},[()=>(e(ai),x(()=>e(ai).start.toFixed(2))),()=>(e(ai),x(()=>(e(ai).start+e(ai).seconds).toFixed(2)))]),re("click",oi,()=>ge(e(ai).id)),J(ja,oi)}),w(Ut),J(Qe,Ut)};ve(Qa,Qe=>{e(c),x(()=>e(c).length)&&Qe(Zn)})}var Vn=q(Qa,2);{var ls=Qe=>{var Ut=IR(),ja=k(Ut,!0);w(Ut),ie(()=>W(ja,e(C))),J(Qe,Ut)};ve(Vn,Qe=>{e(C)&&Qe(ls)})}w(Je),ie((Qe,Ut,ja,ai,oi,ta,_i)=>{W(de,`${Qe??""} s ${e(r),e(o),x(()=>e(r).length||e(o).length?"· Edited":"· Original")??""}`),xe.disabled=e(N)||!e(M)||e(V)===1,W(ze,`${e(V)??""}×`),Fe.disabled=e(N)||!e(M)||e(V)===64,rt.disabled=e(N)||!e(M),ot.disabled=(Q(f()),e(N),Q(m()),x(()=>f()||e(N)||!m().editing?.undo.length)),He.disabled=(Q(f()),e(N),Q(m()),x(()=>f()||e(N)||!m().editing?.redo.length)),Ne=Ip(Ze,"",Ne,{width:`${e(V)*100}%`}),_e(Ve,"width",e(T)),_e(Ve,"aria-valuemax",e(i)),_e(Ve,"aria-valuenow",e(j)),_e(Ve,"aria-valuetext",Ut),W(Ke,`${ja??""} s`),W(nt,`Visible ${ai??""} s · scroll horizontally to pan`),W(Gt,`${oi??""} s`),_e(Fa,"max",e(i)),bi(Fa,ta),Fa.disabled=e(N),Kt.disabled=f(),St!==(St=u())&&(Kt.value=(Kt.__value=u())??"",kn(Kt,u())),ea.disabled=f()||e(N)||!e(M),W(wi,`Insert ${_i??""} s at playhead`),ma.disabled=f()||e(N)||!e(G),_e(ui,"max",e(i)),ui.disabled=e(N)||f(),_e(Ai,"max",e(i)),Ai.disabled=e(N)||f(),Vi.disabled=f()||e(N)||!e(M)||e(g)<=e(d),_n.disabled=e(g)<=e(d),_e(Ni,"src",e(D)),Hi.disabled=e(N)||f()||!e(M)},[()=>(e(i),x(()=>e(i).toFixed(2))),()=>(e(j),x(()=>`${e(j).toFixed(3)} seconds`)),()=>(e(L),x(()=>e(L).toFixed(2))),()=>(e(n),x(()=>e(n).toFixed(2))),()=>(e(i),e(L),e(n),x(()=>Math.min(e(i),e(L)+e(n)).toFixed(2))),()=>(e(j),x(()=>e(j).toFixed(3))),()=>(Q(u()),x(()=>u().toFixed(2)))]),re("click",xe,()=>le(e(V)/2)),re("click",Fe,()=>le(e(V)*2)),re("click",rt,()=>le(1)),re("click",ot,he),re("click",He,Pe),re("pointerdown",Ve,ct),re("pointermove",Ve,Ae),re("pointerup",Ve,Ge),re("pointercancel",Ve,()=>y(O,!1)),re("keydown",Ve,Qe=>{(Qe.key==="ArrowLeft"||Qe.key==="ArrowRight")&&(Qe.preventDefault(),Qe.shiftKey?(e(g)===e(d)&&y(A,e(j)),y(B,Math.max(0,Math.min(e(i),e(j)+(Qe.key==="ArrowRight"?.1:-.1))))):y(A,y(B,0)),ce(e(j)+(Qe.key==="ArrowRight"?1:-1)*(Qe.shiftKey?.1:.01))),(Qe.key==="Delete"||Qe.key==="Backspace")&&e(g)>e(d)&&!f()&&(Qe.preventDefault(),Te()),Qe.key==="Home"&&(Qe.preventDefault(),ce(0)),Qe.key==="End"&&(Qe.preventDefault(),ce(e(i)))}),re("scroll",Re,fe),re("change",Fa,Qe=>ce(Qe.currentTarget.valueAsNumber)),re("change",Kt,Qe=>b()(Number(Qe.currentTarget.value))),re("click",ea,we),re("click",ma,pe),Sa(ui,()=>e(A),Qe=>y(A,Qe)),Sa(Ai,()=>e(B),Qe=>y(B,Qe)),re("click",Vi,Te),re("click",_n,()=>y(A,y(B,0))),re("play",Ni,ne),re("pause",Ni,()=>cancelAnimationFrame(e(ee))),re("ended",Ni,()=>cancelAnimationFrame(e(ee))),re("click",Hi,()=>{Et(z,e(z).currentTime=e(j)),e(z).play().catch(Qe=>y(C,String(Qe)))}),J(a,Je),Mi()}var VR=ae(''),HR=ae('

            Narration

            '),WR=ae(''),QR=ae(''),Vf=ae(""),KR=ae('

            Opening your projects…

            '),YR=ae(''),JR=ae(' '),XR=ae(''),ZR=ae(''),eB=ae(''),tB=ae('
            Preview
            ',1),aB=ae('
            TXT & Markdown
            ',1),iB=ae('

            ',1),nB=ae(' '),sB=ae(''),rB=ae('',1),oB=ae('

            Edit passage

            ',1),lB=ae('

            Add your script first

            '),cB=ae('
            '),dB=ae('

            '),uB=ae('

            Listen to the join

            ',1),fB=ae(''),pB=ae('

            '),mB=ae('

            One final listen

            ',1),gB=ae('

            Script preparation

            Each passage gets its own recording. Paragraphs are a good place to start.

            Next: speakers

            Create a named speaker by choosing a model and voice. Reuse that speaker across your passages.

            '),hB=ae('

            Pauses & audio

            Applies between passages. The center preview lets you override one join.

            '),_B=ae(''),vB=ae(''),bB=ae('Download again'),yB=ae('

            Download settings

            Polish audio Optional

            Projects save in this browser. Download a copy to keep.

            '),wB=ae(''),kB=ae(''),xB=ae(''),SB=ae(''),TB=ae(''),$B=ae('

            Choose a take

            Trying another take keeps your current choice.
            '),qB=ae('

            Edit passage audio

            '),CB=ae('

            '),AB=ae('
            '),GB=ae('

            Passage archive

            '),FB=ae('

            ',1),MB=ae('
            TEXT TO SPEECH
            Projects save automatically in this browser.
            ');function zB(a,t){Fi(t,!1);const i=Y(),n=Y(),s=Y(),r=Y(),o=Y(),l=Y(),c=Y(),d=Y(),g=Y(),h=Y(),m=Y(),p=Y(),u=Y(),f=Y(),_=Y(),v=Y(),b=Y(),S=Y(),$=Y(),M=Y(),N=Y(),P=Y();let C=Se(t,"busy",12,!1),j=Se(t,"active",8,!0),G=Y(null),A=Y([]),B=Y([]),H=Y([]),U=Y("script"),E=Y(""),O=Y(0);const V=40;let L=Y(1),T=Y(0),F=Y(""),z=Y(!1),D=Y(!1),K=Y(0),X=Y(new Set),ee=Y("all"),ce=Y(""),fe=Y(null),le=Y(""),ge=Y(!1),R=Y(!1),we=Y(""),pe=Y(0),Te=Y("editor"),he=Y(120),Pe=Y();function Le(me){return me.showModal(),{destroy(){me.close()}}}function ct(me){const De=()=>{y(he,Math.max(0,Math.round(me.getBoundingClientRect().top+window.scrollY)))},ft=new ResizeObserver(De),Rt=document.querySelector(".topbar");return Rt&&ft.observe(Rt),window.addEventListener("resize",De),De(),{destroy(){ft.disconnect(),window.removeEventListener("resize",De)}}}function Ae(){if(!e(G)||C())return;const me=eu("");Et(G,e(G).chunks=[...e(G).chunks,me]),Yi(()=>{C(),e(fe),e(qe)}),Re(me.id),nt(),_t("speech")}function Ge(){y(Te,"settings"),js().then(()=>e(Pe)?.addSpeaker())}function ne(){!e(d)||!e(G)||(y(we,[...e(d).takes].reverse().find(me=>me.signature===Ls(e(G),e(d)))?.id||e(d).takes.at(-1)?.id||""),y(R,!0))}let Je=Y(""),ue=Y(""),ye=Y(""),de=Y(!0),be=Y(j()),xe=Y(!1),Ie=Y(!1),$e,ze=null,Fe=Y(null),qe=Y(""),rt=Y(""),ot=Y(""),je=Y({}),He=new Map,Be=Y();function Re(me){if(!e(G))return;document.querySelectorAll(".tts-app audio").forEach(ft=>ft.pause()),y(E,me),y(le,""),y(ge,!1),y(R,!1),y(Te,"editor"),localStorage.setItem(`audiocpp.tts.chunk:${e(G).id}`,me);const De=(e(ce)||e(ee)!=="all"?e(c):e(G).chunks).findIndex(ft=>ft.id===me);De>=0&&y(O,Math.floor(De/V)),y(ue,"")}function Ze(me){e(G)?.chunks[me]&&Re(e(G).chunks[me].id)}const Ne=[{id:"script",label:"Script"},{id:"speech",label:"Speakers"},{id:"assemble",label:"Arrange"},{id:"finish",label:"Export"}];function Ve(me){const De=localStorage.getItem(`audiocpp.tts.stage:${me.id}`);return De==="finish"&&tu(me)||De==="assemble"&&me.chunks.length&&me.chunks.every(ft=>On(me,ft))||De==="script"||De==="speech"&&me.chunks.length?De:me.chunks.length?"speech":"script"}function gt(){y(Te,"editor"),js().then(()=>{document.querySelector(".stage-title")?.focus({preventScroll:!0}),window.scrollTo({top:0})})}function _t(me){C()||(y(U,me),y(ue,""),me==="assemble"&&e(g)>=0&&Ze(e(g)),gt())}function at(){e(S)||!e(G)||(e(U)==="script"?e(fe)?.length?ln():Fa():e(U)==="speech"?e(o).length&&!e(b)?Ge():e(o).length?hi(e(o).map(me=>me.id)):e(l).length?(Re(e(l)[0].id),ne()):_t("assemble"):e(U)==="assemble"?e(v)?_t("finish"):zi():Ai())}function wt(me){let De=He.get(me);return De||(De=URL.createObjectURL(me),He.set(me,De)),De}function Ke(me){if(!me)return;const De=He.get(me);De&&(URL.revokeObjectURL(De),He.delete(me))}function ut(){for(const me of He.values())URL.revokeObjectURL(me);He.clear()}function nt(){e(G)&&(y(G,{...e(G),updatedAt:Math.max(Date.now(),e(G).updatedAt+1)}),y(xe,!0),clearTimeout($e),$e=setTimeout(()=>{Gt().catch(me=>y(ye,`Could not save project: ${String(me)}`))},450))}async function Lt(){await Gt()}async function Gt(){if(clearTimeout($e),ze&&await ze,!e(G)||!e(xe))return;const me=structuredClone(e(G));y(Ie,!0),ze=U9({id:me.id,appId:"tts",title:me.title,updatedAt:me.updatedAt,data:me}).then(()=>{e(G)?.id===me.id&&e(G).updatedAt===me.updatedAt&&y(xe,!1),y(A,[{id:me.id,title:me.title,updatedAt:me.updatedAt},...e(A).filter(De=>De.id!==me.id)].sort((De,ft)=>ft.updatedAt-De.updatedAt))}).finally(()=>{y(Ie,!1),ze=null}),await ze,e(xe)&&await Gt()}async function jt(me){if(!C())try{await Gt();const De=await B9(me);if(!De||![1,2].includes(De.data.version))throw new Error("Unsupported or missing TTS project.");ut(),y(G,De.data),C2(e(G))&&nt(),localStorage.setItem("audiocpp.tts.project",e(G).id),y(U,Ve(e(G))),y(E,e(G).chunks.find(Rt=>Rt.id===localStorage.getItem(`audiocpp.tts.chunk:${e(G).id}`))?.id||e(G).chunks[0]?.id||""),y(ce,""),y(ee,"all"),y(O,Math.max(0,Math.floor(e(G).chunks.findIndex(Rt=>Rt.id===e(E))/V))),y(T,0),y(F,""),y(z,!1),y(K,0),y(fe,null),y(X,new Set),y(ye,""),y(ue,""),y(qe,""),document.querySelector(".project-menu")?.removeAttribute("open"),gt()}catch(De){y(ye,String(De))}}async function za(){if(!C())try{await Gt(),ut(),y(G,$2()),localStorage.setItem("audiocpp.tts.project",e(G).id),y(U,"script"),y(E,""),y(ce,""),y(ee,"all"),y(O,0),y(T,0),y(F,""),y(z,!1),y(K,0),y(X,new Set),y(fe,null),y(ye,""),y(ue,""),y(qe,""),nt(),document.querySelector(".project-menu")?.removeAttribute("open"),gt()}catch(me){y(ye,String(me))}}async function sa(){if(!(!e(G)||C()||!confirm(`Delete project "${e(G).title}" and its audio?`)))try{await Gt();const me=e(G).id;await R9(me),y(A,e(A).filter(De=>De.id!==me)),ut(),y(G,null),y(xe,!1),e(A).length?await jt(e(A)[0].id):await za()}catch(me){y(ye,String(me))}}async function wa(){try{await(async me=>{var De=Zc(me,2);y(B,De[0]),y(H,De[1])})(await Promise.all([Pf(),Zd()])),y(ye,"")}catch(me){y(ye,`Could not refresh model choices: ${String(me)}`)}}function Fa(){if(!e(G))return;if(y(ye,""),!e(G).source.trim()){y(ye,"Paste text or import a TXT/Markdown file first.");return}if(!Number.isInteger(e(G).split.characters)||e(G).split.characters<40){y(ye,"Chunk size must be at least 40 characters.");return}y(pe,0);const me=e(G).source.trim();y(fe,e(G).split.method==="sentence"?Array.from(new Intl.Segmenter(void 0,{granularity:"sentence"}).segment(me),De=>De.segment.trim()).filter(Boolean).flatMap(De=>_f(De,e(G).split.characters)):e(G).split.method==="paragraph"?me.split(/\n\s*\n/).filter(De=>De.trim()).flatMap(De=>_f(De,e(G).split.characters)):_f(me,e(G).split.characters))}function ln(){!e(G)||!e(fe)?.length||e(G).chunks.length&&!confirm("Replace the current chunks? Existing chunks and takes will remain in the project archive.")||(e(G).archivedChunks.push(...e(G).chunks),Et(G,e(G).chunks=e(fe).map(me=>eu(me))),Yi(()=>{C(),e(fe),e(qe)}),y(E,e(G).chunks[0].id),y(fe,null),y(X,new Set),y(ce,""),y(ee,"all"),y(O,0),y(T,0),y(F,""),y(z,!1),y(K,0),nt(),_t("speech"))}async function Kt(me){if(!(!me||!e(G))){if(y(ye,""),!/\.(txt|md|markdown)$/i.test(me.name)){y(ye,"Choose a TXT or Markdown file.");return}try{Et(G,e(G).source=await me.text()),Yi(()=>{C(),e(fe),e(qe)}),e(G).title==="Untitled narration"&&(Et(G,e(G).title=me.name.replace(/\.[^.]+$/,"")),Yi(()=>{C(),e(fe),e(qe)})),y(fe,null),nt()}catch(De){y(ye,String(De))}}}function St(me){if(!e(G)||C())return;const De=e(je)[me.id]?.selectionStart;if(De===void 0||!me.text.slice(0,De).trim()||!me.text.slice(De).trim()){y(ye,"Place the text cursor where you want to split this chunk.");return}const ft=e(G).chunks.indexOf(me);e(G).archivedChunks.push(structuredClone(me));const Rt=[eu(me.text.slice(0,De).trim(),me.override),eu(me.text.slice(De).trim(),me.override)];for(const $a of Rt)$a.voice=structuredClone(me.voice),$a.speakerId=me.speakerId;e(G).chunks.splice(ft,1,...Rt),Re(Rt[0].id),y(ye,""),nt()}function ea(me){if(!e(G)||C())return;const De=e(G).chunks.indexOf(me),ft=e(G).chunks[De+1];if(!ft||JSON.stringify([Zo(e(G),me),Nf(e(G),me)?.id])!==JSON.stringify([Zo(e(G),ft),Nf(e(G),ft)?.id])&&!confirm("These passages use different speakers. Joining them uses the first passage’s speaker. Continue?"))return;e(G).archivedChunks.push(structuredClone(me),structuredClone(ft));const Rt=eu(`${me.text} +${ft.text}`,me.override);Rt.voice=structuredClone(me.voice),Rt.speakerId=me.speakerId,e(G).chunks.splice(De,2,Rt),Re(Rt.id),nt()}function da(me,De){if(!e(G)||C())return;const ft=e(G).chunks.indexOf(me),Rt=ft+De;Rt<0||Rt>=e(G).chunks.length||(($a=>{var Oi=Zc($a,2);Et(G,e(G).chunks[ft]=Oi[0]),Yi(()=>{C(),e(fe),e(qe)}),Et(G,e(G).chunks[Rt]=Oi[1]),Yi(()=>{C(),e(fe),e(qe)})})([e(G).chunks[Rt],e(G).chunks[ft]]),nt())}function wi(me){if(!e(G)||C())return;e(G).archivedChunks.push(me);const De=e(G).chunks.indexOf(me);Et(G,e(G).chunks=e(G).chunks.filter(ft=>ft.id!==me.id)),Yi(()=>{C(),e(fe),e(qe)}),y(X,new Set([...e(X)].filter(ft=>ft!==me.id))),e(E)===me.id&&Re(e(G).chunks[Math.min(De,e(G).chunks.length-1)]?.id||""),nt()}function ma(me,De){me.takeId=De.id,nt()}async function hi(me){if(!e(G)||C()||!me.length)return;const De=e(G).chunks.filter(Z=>me.includes(Z.id)).map(Z=>({id:Z.id,text:Z.text,configuration:structuredClone(Zo(e(G),Z)),reference:structuredClone(Nf(e(G),Z)),signature:Ls(e(G),Z),sequence:e(G).chunks.indexOf(Z)+Z.takes.length}));if(De.some(Z=>!Z.configuration)){y(ye,"Add a speaker and assign it to these passages.");return}if(De.some(Z=>!Z.text.trim())){y(ye,"Remove empty chunks or enter text before generation.");return}if(De.some(Z=>Z.reference&&Z.configuration.model.task!=="clon"&&!Io[Z.configuration.model.family]?.includes("speaker_reference"))){y(ye,"A selected speech model does not support a reference recording. Remove the reference or choose a voice-cloning model.");return}C(!0),y(ye,""),y(Fe,new AbortController);const ft=e(Fe).signal;let Rt,$a="";const Oi=new Map;try{for(let Z=0;Zzs.id===Si.id),cs={id:crypto.randomUUID(),text:Si.text,configuration:Si.configuration,reference:fi||void 0,signature:Si.signature,seed:(Rt.resolvedSeed+Si.sequence)%4294967296,audio:Hn.blob,duration:Wn,createdAt:Date.now()};Qn.takes=[...Qn.takes,cs],Qn.takeId||(Qn.takeId=cs.id),Qn.id===e(E)&&Qn.takes.length>1&&y(le,Qn.id),nt()}y(ue,"Audio generated. The first take is selected automatically; use Compare takes to choose a replacement.")}catch(Z){y(ue,ft.aborted?"Cancelled. Completed takes are saved.":"Generation stopped. Completed takes are saved."),ft.aborted||y(ye,String(Z))}finally{C(!1),y(Je,""),y(Fe,null),await Gt().catch(Z=>y(ye,`Could not save takes: ${String(Z)}`))}}async function zi(){if(!(!e(G)||C())){if(!e(G).chunks.length||e(G).chunks.some(me=>!On(e(G),me))){y(ye,"Choose an up-to-date take for every passage before assembly.");return}C(!0),y(ye,""),y(Fe,new AbortController),y(ue,"Assembling chosen takes…");try{const me=await KU(e(G).chunks.map(De=>({audio:os(De).rendered?.audio||os(De).audio,pause:De.pauseAfter??e(G).assembly.pause})),e(G).assembly.sampleRate,e(Fe).signal);e(Fe).signal.throwIfAborted(),Ke(e(G).assembled?.audio),Et(G,e(G).assembled={audio:me,signature:q2(e(G))}),Yi(()=>{C(),e(fe),e(qe)}),nt(),y(ue,"Narration assembled. Listen across chunk boundaries before finishing.")}catch(me){y(ye,e(Fe).signal.aborted?"Cancelled.":String(me))}finally{C(!1),y(Fe,null)}}}async function ui(){if(!e(G)||!tu(e(G))||!e(G).assembled||C())return y(ye,"Combine the chosen chunk audio in step 3 first."),!1;C(!0),y(ye,""),y(Fe,new AbortController),y(ue,"Processing final audio…");const me=e(Fe).signal;try{let De=e(G).assembled.audio;if(e(G).enhancement){y(ue,`Processing with ${e(G).enhancement.name}…`);const ft=new au(e(G).enhancement,me);await ft.prepare();const Rt=await hr(De,me),$a=await ft.run({audio:Rt});if($a.kind!=="audio")throw new Error("The processing model returned no audio.");De=$a.blob}return De=await YU(De,e(G).finish,e(G).assembly.sampleRate,me),me.throwIfAborted(),Ke(e(G).finished?.audio),Et(G,e(G).finished={audio:De,signature:Bc(e(G))}),Yi(()=>{C(),e(fe),e(qe)}),y(qe,""),nt(),y(ue,"Processing preview ready. Listen before and after, or download your narration."),!0}catch(De){return me.aborted?y(ue,"Processing cancelled."):y(ye,String(De)),!1}finally{C(!1),y(Fe,null)}}async function hn(){if(!e(G)?.finished||!e(_)||C())return!1;C(!0),y(ye,""),y(Fe,new AbortController),y(ue,"Preparing download…");try{const me=await JU(e(G).finished.audio,e(G).finish.format,e(Fe).signal);return e(Fe).signal.throwIfAborted(),y(qe,wt(me)),y(rt,`${e(G).title.replace(/[\\/:*?"<>|]/g,"_")||"narration"}.${e(G).finish.format}`),y(ot,Bc(e(G))+e(G).finish.format),y(ue,"Download ready."),!0}catch(me){return e(Fe).signal.aborted?y(ue,"Export cancelled."):y(ye,String(me)),!1}finally{C(!1),y(Fe,null)}}async function Ai(){if(!e(G)||C()||!e(_)&&!await ui()||!await hn())return;const me=document.createElement("a");me.href=e(qe),me.download=e(rt),document.body.append(me),me.click(),me.remove()}function Vi(me){const De=me.currentTarget;document.querySelectorAll(".tts-app audio").forEach(ft=>{ft!==De&&ft.pause()})}Jn(async()=>{try{const[me,De,ft]=await Promise.all([E9("tts"),Pf().catch(Rt=>(y(ye,`Models are unavailable. You can still prepare your script. ${String(Rt)}`),[])),Zd()]);if(y(B,De),y(H,ft),y(A,me.map(({id:Rt,title:$a,updatedAt:Oi})=>({id:Rt,title:$a,updatedAt:Oi}))),me.length){const $a=(me.find(Oi=>Oi.id===localStorage.getItem("audiocpp.tts.project"))||me[0]).data;if(![1,2].includes($a.version))throw new Error("Unsupported TTS project version.");y(G,$a),C2(e(G))&&nt(),y(U,Ve(e(G))),y(E,e(G).chunks.find(Oi=>Oi.id===localStorage.getItem(`audiocpp.tts.chunk:${e(G).id}`))?.id||e(G).chunks[0]?.id||""),y(ce,""),y(ee,"all"),y(O,Math.max(0,Math.floor(e(G).chunks.findIndex(Oi=>Oi.id===e(E))/V))),y(T,0),y(F,""),y(z,!1),y(K,0)}else y(G,$2()),localStorage.setItem("audiocpp.tts.project",e(G).id),nt()}catch(me){y(ye,String(me))}finally{y(de,!1)}}),fr(()=>{e(Fe)?.abort(),clearTimeout($e),ut()}),Ue(()=>e(G),()=>{y(i,Math.max(1,Math.ceil((e(G)?.archivedChunks.length||0)/V)))}),Ue(()=>(e(K),e(i)),()=>{e(K)>=e(i)&&y(K,e(i)-1)}),Ue(()=>(e(G),e(E)),()=>{y(d,e(G)?.chunks.find(me=>me.id===e(E)))}),Ue(()=>(e(d),os),()=>{y(n,e(d)&&os(e(d)))}),Ue(()=>(e(le),e(d),Q(C())),()=>{e(le)&&e(d)?.id===e(le)&&!C()&&(y(we,e(d).takes.at(-1)?.id||""),y(R,!0),y(le,""))}),Ue(()=>(e(d),e(we)),()=>{y(s,e(d)?.takes.find(me=>me.id===e(we))||e(d)?.takes.at(-1))}),Ue(()=>(Q(j()),e(be),e(de)),()=>{j()!==e(be)&&(y(be,j()),j()&&!e(de)&&wa())}),Ue(()=>(Q(j()),e(Be)),()=>{j()||(e(Be)?.pause(),typeof document<"u"&&document.querySelectorAll(".tts-app audio").forEach(me=>me.pause()))}),Ue(()=>(e(G),On),()=>{y(r,e(G)?e(G).chunks.filter(me=>On(e(G),me)).length:0)}),Ue(()=>(e(G),Ls),()=>{y(o,e(G)?.chunks.filter(me=>!me.takes.some(De=>De.signature===Ls(e(G),me)))||[])}),Ue(()=>(e(G),Ls),()=>{y(l,e(G)?.chunks.filter(me=>!On(e(G),me)&&me.takes.some(De=>De.signature===Ls(e(G),me)))||[])}),Ue(()=>(e(G),e(ce),e(ee),On),()=>{y(c,e(G)?.chunks.filter(me=>me.text.toLowerCase().includes(e(ce).toLowerCase())&&(e(ee)==="all"||e(ee)==="missing"&&!os(me)||e(ee)==="changed"&&!!os(me)&&!On(e(G),me)))||[])}),Ue(()=>(e(G),e(E)),()=>{y(g,e(G)?.chunks.findIndex(me=>me.id===e(E))??-1)}),Ue(()=>e(g),()=>{e(g)>=0&&y(L,e(g)+1)}),Ue(()=>e(c),()=>{y(h,Math.max(1,Math.ceil(e(c).length/V)))}),Ue(()=>(e(O),e(h)),()=>{e(O)>=e(h)&&y(O,e(h)-1)}),Ue(()=>(e(c),e(O)),()=>{y(m,e(c).slice(e(O)*V,(e(O)+1)*V))}),Ue(()=>(e(G),e(F),e(z),On),()=>{y(p,e(G)?.chunks.filter(me=>me.text.toLowerCase().includes(e(F).toLowerCase())&&(!e(z)||!On(e(G),me)))||[])}),Ue(()=>e(p),()=>{y(u,Math.max(1,Math.ceil(e(p).length/V)))}),Ue(()=>(e(T),e(u)),()=>{e(T)>=e(u)&&y(T,e(u)-1)}),Ue(()=>(e(p),e(T)),()=>{y(f,e(p).slice(e(T)*V,(e(T)+1)*V))}),Ue(()=>(e(G),Bc),()=>{y(_,!!e(G)?.finished&&tu(e(G))&&e(G).finished.signature===Bc(e(G)))}),Ue(()=>(e(G),tu),()=>{y(v,e(G)?tu(e(G)):!1)}),Ue(()=>(e(G),e(U)),()=>{e(G)&&localStorage.setItem(`audiocpp.tts.stage:${e(G).id}`,e(U))}),Ue(()=>(e(G),e(o),Zo),()=>{y(b,!!e(G)&&e(o).every(me=>!!Zo(e(G),me)&&!!me.text.trim()))}),Ue(()=>(Q(C()),e(U),e(G),e(o),e(r),e(v)),()=>{y(S,C()||(e(U)==="script"?!e(G)?.source.trim():e(U)==="speech"?!e(G)?.chunks.length||e(o).some(me=>!me.text.trim()):e(U)==="assemble"?!e(G)?.chunks.length||e(r)!==e(G).chunks.length:!e(v)))}),Ue(()=>(e(U),e(fe),e(o),e(b),e(l),e(v)),()=>{y($,e(U)==="script"?e(fe)?.length?"Continue to speakers":"Review passages":e(U)==="speech"?e(o).length?!e(b)&&!e(o).some(me=>!me.text.trim())?"Add speaker":`Generate narration${e(o).length>1?` (${e(o).length})`:""}`:e(l).length?"Review updated takes":"Continue to arrange":e(U)==="assemble"?e(v)?"Continue to export":"Combine narration":"Download")}),Ue(()=>(e(U),e(fe),e(o),e(b),e(l),e(r),e(G),e(v)),()=>{y(M,e(U)==="script"?e(fe)?.length?`${e(fe).length} passages ready to voice`:"Your words come first":e(U)==="speech"?e(o).some(me=>!me.text.trim())?"Add text to your empty passages":!e(b)&&e(o).length?"Create a speaker to continue":e(o).length?`${e(o).length} passages need audio`:e(l).length?`${e(l).length} updated takes need your choice`:"Every passage is ready":e(U)==="assemble"?e(r)!==e(G)?.chunks.length?"Review the passages needing audio":e(v)?"Your narration is combined":"Bring your passages together":"Save your finished narration")}),Ue(()=>(e(U),e(fe),e(o),e(b),e(l),e(v)),()=>{y(N,e(U)==="script"?e(fe)?.length?"Next, create a speaker for these passages.":"Paste text or import a TXT or Markdown file.":e(U)==="speech"?e(o).some(me=>!me.text.trim())?"Write a passage or remove it using Edit passage.":!e(b)&&e(o).length?"A speaker keeps the model and voice together.":e(o).length?"Generate the missing audio, then listen and refine.":e(l).length?"Compare the recordings and choose the take to keep.":"Next, adjust pauses and combine the audio.":e(U)==="assemble"?e(v)?"Continue to choose a format and download.":"Chosen takes will be combined in the order above.":"Your processing choices are applied automatically.")}),Ue(()=>Io,()=>{y(P,Object.keys(Io).filter(me=>Io[me].includes("audio_enhancement")))}),wn();var _n={saveBeforeClose:Lt};Zi();var Ni=MB();re("beforeunload",wc,me=>{(e(xe)||e(Ie)||C())&&(me.preventDefault(),me.returnValue="")});let Hi;var Wi=k(Ni),Qa=k(Wi),Zn=q(k(Qa));{var Vn=me=>{var De=VR();Pt(De),ie(()=>De.disabled=C()),Sa(De,()=>e(G).title,ft=>(Et(G,e(G).title=ft),Yi(()=>{C(),e(fe),e(qe)}))),re("input",De,nt),J(me,De)},ls=me=>{var De=HR();J(me,De)};ve(Zn,me=>{e(G)?me(Vn):me(ls,-1)})}w(Qa);var Qe=q(Qa,2);{var Ut=me=>{var De=QR();Ct(De,5,()=>Ne,Qt,(ft,Rt,$a)=>{const Oi=Nt(()=>(e(G),e(r),e(v),e(qe),e(_),x(()=>$a===0?e(G).chunks.length>0:$a===1?e(r)>0&&e(r)===e(G).chunks.length:$a===2?e(v):!!e(qe)&&e(_))));var Z=WR();let Si;var Ti=k(Z),fi=k(Ti);{var zn=Wn=>{vm(Wn,{size:12})},Hn=Wn=>{var Qn=Bp();Qn.nodeValue=$a+1,J(Wn,Qn)};ve(fi,Wn=>{Q(e(Oi)),e(U),e(Rt),x(()=>e(Oi)&&e(U)!==e(Rt).id)?Wn(zn):Wn(Hn,-1)})}w(Ti);var Ur=q(Ti,1,!0);w(Z),ie(()=>{_e(Z,"aria-current",(e(U),e(Rt),x(()=>e(U)===e(Rt).id?"step":void 0))),Z.disabled=(Q(C()),e(G),e(r),e(v),x(()=>C()||$a>0&&!e(G).chunks.length||$a>1&&e(r)!==e(G).chunks.length||$a>2&&!e(v))),Si=ya(Z,1,"svelte-1szouna",null,Si,{active:e(U)===e(Rt).id}),W(Ur,(e(Rt),x(()=>e(Rt).label)))}),re("click",Z,()=>_t(e(Rt).id)),J(ft,Z)}),w(De),J(me,De)};ve(Qe,me=>{e(G)&&me(Ut)})}var ja=q(Qe,2),ai=k(ja,!0);w(ja);var oi=q(ja,2),ta=k(oi),_i=k(ta);Fc(_i,{size:16});var Ja=q(_i);bm(Ja,{size:12}),w(ta);var va=q(ta,2),Ea=k(va),Ye=q(k(Ea)),Ce=k(Ye);{var pt=me=>{var De=Vf(),ft=k(De,!0);w(De);var Rt={};ie(()=>{W(ft,(e(G),x(()=>e(G).title))),Rt!==(Rt=(e(G),x(()=>e(G).id)))&&(De.value=(De.__value=(e(G),x(()=>e(G).id)))??"")}),J(me,De)},Ft=Va(()=>(e(G),e(A),x(()=>e(G)&&!e(A).some(me=>me.id===e(G).id))));ve(Ce,me=>{e(Ft)&&me(pt)})}var Ta=q(Ce);Ct(Ta,1,()=>e(A),Qt,(me,De)=>{var ft=Vf(),Rt=k(ft,!0);w(ft);var $a={};ie(()=>{W(Rt,(e(De),x(()=>e(De).title))),$a!==($a=(e(De),x(()=>e(De).id)))&&(ft.value=(ft.__value=(e(De),x(()=>e(De).id)))??"")}),J(me,ft)}),w(Ye);var oa;Nn(Ye),w(Ea);var ii=q(Ea),Ei=k(ii);Dr(Ei,{size:14}),zt(),w(ii);var ga=q(ii),$t=k(ga);ho($t,{size:14}),zt(),w(ga),zt(),w(va),w(oi),w(Wi);var Ot=q(Wi,2);{var ka=me=>{var De=KR();J(me,De)};ve(Ot,me=>{e(de)&&me(ka)})}var Qi=q(Ot,2);{var Na=me=>{var De=YR(),ft=k(De),Rt=k(ft,!0);w(ft);var $a=q(ft);w(De),ie(()=>W(Rt,e(ye))),re("click",$a,()=>y(ye,"")),J(me,De)};ve(Qi,me=>{e(ye)&&me(Na)})}var ua=q(Qi,2);{var Ra=me=>{var De=FB(),ft=ht(De),Rt=k(ft),$a=k(Rt),Oi=k($a,!0);w($a);var Z=q($a,2),Si=k(Z,!0);w(Z),w(Rt);var Ti=q(Rt,2);{var fi=Bt=>{var vt=JR(),pa=k(vt);w(vt),ie(()=>W(pa,`${e(r)??""}/${e(G),x(()=>e(G).chunks.length)??""} ready`)),J(Bt,vt)};ve(Ti,Bt=>{e(U)!=="script"&&Bt(fi)})}w(ft);var zn=q(ft,2),Hn=k(zn),Ur=k(Hn);CS(Ur,{size:14}),zt(),w(Hn);var Wn=q(Hn),Qn=k(Wn);Oo(Qn,{size:14}),zt(),w(Wn);var cs=q(Wn),zs=k(cs);sb(zs,{size:14});var Dl=q(zs,1,!0);w(cs),w(zn);var Zr=q(zn,2),al=k(Zr);let ds;var il=k(al);{let Bt=Nt(()=>e(U)==="script"?e(fe):null);vR(il,{get project(){return e(G)},get selectedId(){return e(E)},get disabled(){return C()},get preview(){return e(Bt)},get previewIndex(){return e(pe)},onselect:vt=>{Re(vt),e(U)==="script"&&_t("speech")},onpreview:vt=>{y(pe,vt),y(Te,"editor")},onadd:Ae,ongenerate:hi,get checked(){return e(X)},set checked(vt){y(X,vt)},$$legacy:!0})}var Ll=q(il);{var eo=Bt=>{var vt=XR(),pa=k(vt);w(vt),ie(()=>W(pa,`Archive · ${e(G),x(()=>e(G).archivedChunks.length)??""}`)),re("click",vt,()=>y(D,!0)),J(Bt,vt)};ve(Ll,Bt=>{e(G),x(()=>e(G).archivedChunks.length)&&Bt(eo)})}w(al);var Rr=q(al,2);let to;var nl=k(Rr);{var ou=Bt=>{var vt=iB(),pa=ht(vt),ha=k(pa),Oa=k(ha,!0);w(ha);var qa=q(ha,2);{var oe=st=>{var Xe=ZR();ie(()=>Xe.disabled=C()),re("click",Xe,()=>y(fe,null)),J(st,Xe)},Me=st=>{var Xe=eB(),it=k(Xe);Oo(it,{size:14});var Yt=q(it,2);w(Xe),ie(()=>Yt.disabled=C()),re("change",Yt,It=>{Kt(It.currentTarget.files?.[0]),It.currentTarget.value=""}),J(st,Xe)};ve(qa,st=>{e(fe)?st(oe):st(Me,-1)})}w(pa);var Ee=q(pa,2);{var tt=st=>{var Xe=tB(),it=ht(Xe);sn(it);var Yt=q(it,2),It=k(Yt),Jt=k(It);w(It),zt(),w(Yt),ie(()=>{_e(it,"aria-label",`Preview passage ${e(pe)+1}`),bi(it,(e(fe),e(pe),x(()=>e(fe)[e(pe)]||""))),W(Jt,`${e(fe),x(()=>e(fe).length)??""} passages · ready to assign speakers`)}),J(st,Xe)},mt=st=>{var Xe=aB(),it=ht(Xe);sn(it),_e(it,"placeholder",`Every narration starts with a few words. -Paste your story, script, or article here…`);var yt=q(Qe,2),aa=k(yt),Yt=k(aa);w(aa),Rt(),w(yt),ie(Ca=>{Qe.disabled=C(),W(Yt,`${Ca??""} characters`)},[()=>(e(G),x(()=>e(G).source.length.toLocaleString()))]),Ta(Qe,()=>e(G).source,Ca=>(Bt(G,e(G).source=Ca),Wi(()=>{C(),e(fe),e(qe)}))),re("input",Qe,()=>{y(fe,null),at()}),J(dt,lt)};ve(Me,dt=>{e(fe)?dt(Pe):dt(rt,-1)})}ie(()=>W(Pa,(e(fe),e(ce),x(()=>e(fe)?`Passage ${e(ce)+1} of ${e(fe).length}`:"Your script")))),J(Dt,gt)},wr=Dt=>{var gt=ys(),da=ht(gt);{var ha=qa=>{const $t=Lt(()=>e(d)),me=Lt(()=>e(g)),Me=Lt(()=>(K(ls),K(e($t)),x(()=>ls(e($t))))),Pe=Lt(()=>(K(In),e(G),K(e($t)),x(()=>In(e(G),e($t)))));var rt=oB(),dt=ht(rt),lt=k(dt),Qe=k(lt),yt=k(Qe);w(Qe);var aa=q(Qe,2),Yt=k(aa,!0);w(aa),w(lt);var Ca=q(lt,2),Ya=k(Ca),pa=k(Ya);rf(pa,{size:16}),w(Ya);var Ea=q(Ya),Gt=k(Ea);of(Gt,{size:16}),w(Ea),w(Ca),w(dt);var ma=q(dt,2),Ot=q(ma);rn(Ot),Ci(Ot,cn=>Bt(Ne,e(Ne)[e($t).id]=cn),()=>e(Ne)?.[e($t).id]);var gi=q(Ot,2),si=k(gi);let ln;var cs=k(si,!0);w(si);var Ss=q(si),ul=k(Ss);w(Ss);var Vc=q(Ss,2),fl=k(Vc),Hc=q(k(fl));bm(Hc,{size:12}),w(fl);var io=q(fl,2),kr=k(io),cu=k(kr);ib(cu,{size:13}),Rt(),w(kr);var Ts=q(kr),fn=k(Ts);GS(fn,{size:13}),Rt(),w(Ts);var Fi=q(Ts),ds=k(Fi);ho(ds,{size:13}),Rt(),w(Fi),w(io),w(Vc),w(gi);var zo=q(gi,2),ac=k(zo),$n=k(ac),Hs=k($n,!0);w($n);var xr=q($n,2),pl=k(xr,!0);w(xr);var Eo=q(xr);{var ic=cn=>{var us=nB(),Ys=k(us,!0);w(us),ie(no=>W(Ys,no),[()=>(K(e($t)),K(Ds),e(G),x(()=>e($t).takes.some(no=>no.signature===Ds(e(G),e($t)))?"Choose an updated take.":"Text or speaker changed."))]),J(cn,us)};ve(Eo,cn=>{e(Me)&&!e(Pe)&&cn(ic)})}w(ac);var Wc=q(ac,2);{var du=cn=>{var us=sB();ie(Ys=>_e(us,"src",Ys),[()=>(K(e(Me)),x(()=>wt(e(Me).rendered?.audio||e(Me).audio)))]),re("play",us,dn),J(cn,us)};ve(Wc,cn=>{e(Me)&&cn(du)})}var Uo=q(Wc,2),Ws=k(Uo),Qs=k(Ws);ab(Qs,{size:14});var nc=q(Qs,1,!0);w(Ws);var Ks=q(Ws);{var Ro=cn=>{var us=rB(),Ys=ht(us),no=k(Ys);w(Ys);var Pr=q(Ys),F_=k(Pr);ib(F_,{size:14}),Rt(),w(Pr),ie(()=>{Ys.disabled=C(),W(no,`Compare takes (${K(e($t)),x(()=>e($t).takes.length)??""})`),Pr.disabled=C()}),re("click",Ys,ne),re("click",Pr,()=>y(ge,!0)),J(cn,us)};ve(Ks,cn=>{K(e($t)),x(()=>e($t).takes.length)&&cn(Ro)})}w(Uo),w(zo),ie((cn,us,Ys,no,Pr)=>{W(yt,`PASSAGE ${e(me)+1} OF ${e(G),x(()=>e(G).chunks.length)??""}`),W(Yt,cn),Ya.disabled=C()||e(me)===0,Ea.disabled=(K(C()),K(e(me)),e(G),x(()=>C()||e(me)===e(G).chunks.length-1)),_e(ma,"for",(K(e($t)),x(()=>`text-${e($t).id}`))),_e(Ot,"id",(K(e($t)),x(()=>`text-${e($t).id}`))),_e(Ot,"aria-label",`Chunk ${e(me)+1} text`),Ot.disabled=C(),ln=va(si,1,"chunk-badge svelte-1szouna",null,ln,{ready:e(Pe)}),W(cs,us),W(ul,`${K(e($t)),x(()=>e($t).text.length)??""} characters`),kr.disabled=C(),Ts.disabled=(K(C()),K(e(me)),e(G),x(()=>C()||e(me)===e(G).chunks.length-1)),Fi.disabled=C(),W(Hs,Ys),W(pl,no),Ws.disabled=Pr,W(nc,e(Me)?"Try another take":"Generate this passage")},[()=>(K(xo),e(G),K(e($t)),x(()=>xo(e(G),e($t))?.name||"Choose a speaker")),()=>(e(Xe),K(e($t)),K(e(Me)),K(e(Pe)),K(Ds),e(G),x(()=>e(Xe)===e($t).id?"Generating…":e(Me)?e(Pe)?"Ready":e($t).takes.some(cn=>cn.signature===Ds(e(G),e($t)))?"Choose an updated take":"Audio needs updating":"No audio yet")),()=>(K(e(Me)),K(e($t)),x(()=>e(Me)?`Take ${e($t).takes.indexOf(e(Me))+1}`:"Ready when you are")),()=>(K(e(Me)),x(()=>e(Me)?`${(e(Me).rendered?.duration??e(Me).duration).toFixed(1)} seconds`:"Generate this passage to hear it.")),()=>(K(C()),K(ol),e(G),K(e($t)),x(()=>C()||!ol(e(G),e($t))||!e($t).text.trim()))]),re("click",Ya,()=>Ue(e(G).chunks[e(me)-1].id)),re("click",Ea,()=>Ue(e(G).chunks[e(me)+1].id)),Ta(Ot,()=>e($t).text,cn=>e($t).text=cn),re("input",Ot,at),re("click",kr,()=>kt(e($t))),re("click",Ts,()=>ta(e($t))),re("click",Fi,()=>ki(e($t))),re("click",Ws,()=>ni([e($t).id])),J(qa,rt)},Pa=qa=>{var $t=lB(),me=k($t);Ko(me,{size:30});var Me=q(me,4);w($t),re("click",Me,()=>mt("script")),J(qa,$t)};ve(da,qa=>{e(d)?qa(ha):qa(Pa,-1)})}J(Dt,gt)},qo=Dt=>{var gt=uB(),da=ht(gt),ha=q(k(da),2),Pa=k(ha),qa=k(Pa);rf(qa,{size:16}),w(Pa);var $t=q(Pa),me=k($t);of(me,{size:16}),w($t),w(ha),w(da);var Me=q(da,2),Pe=k(Me);{var rt=Gt=>{var ma=cB(),Ot=k(ma),gi=q(Ot);w(ma),ie(()=>{W(Ot,`${e(G),e(r),x(()=>e(G).chunks.length-e(r))??""} passages need current audio.`),gi.disabled=C()}),re("click",gi,()=>mt("speech")),J(Gt,ma)};ve(Pe,Gt=>{e(r),e(G),x(()=>e(r)!==e(G).chunks.length)&&Gt(rt)})}var dt=q(Pe);{var lt=Gt=>{{let ma=Lt(()=>(e(G),x(()=>e(G).pauseIncrement??.1))),Ot=Lt(()=>j()&&!C());ER(Gt,{get project(){return e(G)},get chunk(){return e(d)},get next(){return e(G),e(g),x(()=>e(G).chunks[e(g)+1])},get index(){return e(g)},get increment(){return e(ma)},get disabled(){return C()},get active(){return e(Ot)},onchange:at})}};ve(dt,Gt=>{e(d)&&Gt(lt)})}w(Me);var Qe=q(Me,2),yt=k(Qe),aa=k(yt);Xv(aa,{size:14}),Rt(),w(yt);var Yt=q(yt),Ca=k(Yt);Jv(Ca,{size:14}),Rt(),w(Yt);var Ya=q(Yt);w(Qe);var pa=q(Qe,2);{var Ea=Gt=>{var ma=dB(),Ot=k(ma),gi=k(Ot,!0);w(Ot);var si=q(Ot,2);Ci(si,ln=>y(Be,ln),()=>e(Be)),w(ma),ie(ln=>{W(gi,e(b)?"Full narration":"Previous narration · needs updating"),_e(si,"src",ln)},[()=>(e(G),x(()=>wt(e(G).assembled.audio)))]),re("play",si,dn),J(Gt,ma)};ve(pa,Gt=>{e(G),x(()=>e(G).assembled)&&Gt(Ea)})}ie(()=>{Pa.disabled=C()||e(g)<=0,$t.disabled=(K(C()),e(g),e(G),x(()=>C()||e(g)===e(G).chunks.length-1)),yt.disabled=C()||e(g)<=0,Yt.disabled=(K(C()),e(g),e(G),x(()=>C()||e(g)===e(G).chunks.length-1)),Ya.disabled=C()}),re("click",Pa,()=>tt(e(g)-1)),re("click",$t,()=>tt(e(g)+1)),re("click",yt,()=>{const Gt=e(g)-1;ra(e(d),-1),tt(Gt)}),re("click",Yt,()=>{const Gt=e(g)+1;ra(e(d),1),tt(Gt)}),re("click",Ya,()=>mt("speech")),J(Dt,gt)},Yl=Dt=>{var gt=mB(),da=ht(gt),ha=q(k(da),2),Pa=k(ha);w(ha),w(da);var qa=q(da,2),$t=k(qa);sf($t,{size:38});var me=q($t,2),Me=k(me,!0);w(me);var Pe=q(me,2),rt=k(Pe);w(Pe);var dt=q(Pe,2);{var lt=aa=>{var Yt=fB();ie(Ca=>_e(Yt,"src",Ca),[()=>(e(G),x(()=>wt(e(G).assembled.audio)))]),re("play",Yt,dn),J(aa,Yt)};ve(dt,aa=>{e(G),x(()=>e(G).assembled)&&aa(lt)})}var Qe=q(dt);{var yt=aa=>{var Yt=pB(),Ca=k(Yt),Ya=k(Ca,!0);w(Ca);var pa=q(Ca,2);w(Yt),ie(Ea=>{W(Ya,e(_)?"Processed preview":"Previous processing · needs updating"),_e(pa,"src",Ea)},[()=>(e(G),x(()=>wt(e(G).finished.audio)))]),re("play",pa,dn),J(aa,Yt)};ve(Qe,aa=>{e(G),x(()=>e(G).finished)&&aa(yt)})}w(qa),ie((aa,Yt)=>{W(Pa,`${e(G),x(()=>e(G).chunks.length)??""} PASSAGES`),W(Me,(e(G),x(()=>e(G).title))),W(rt,`${aa??""} Hz · ${Yt??""}`)},[()=>(e(G),x(()=>e(G).assembly.sampleRate.toLocaleString())),()=>(e(G),x(()=>e(G).finish.format.toUpperCase()))]),J(Dt,gt)};ve($o,Dt=>{e(E)==="script"?Dt(lu):e(E)==="speech"?Dt(wr,1):e(E)==="assemble"?Dt(qo,2):Dt(Yl,-1)})}w(To);var Co=q(To,2);let Dc;var Jl=k(Co);{var Xl=Dt=>{var gt=gB(),da=q(k(gt),4),ha=q(k(da)),Pa=k(ha);Pa.value=Pa.__value="paragraph";var qa=q(Pa);qa.value=qa.__value="sentence";var $t=q(qa);$t.value=$t.__value="size",w(ha),w(da);var me=q(da),Me=q(k(me));Pt(Me),w(me),Rt(2),w(gt),ie(()=>{ha.disabled=C(),Me.disabled=C()}),dr(ha,()=>e(G).split.method,Pe=>(Bt(G,e(G).split.method=Pe),Wi(()=>{C(),e(fe),e(qe)}))),re("change",ha,()=>{y(fe,null),at()}),Ta(Me,()=>e(G).split.characters,Pe=>(Bt(G,e(G).split.characters=Pe),Wi(()=>{C(),e(fe),e(qe)}))),re("input",Me,()=>{y(fe,null),at()}),J(Dt,gt)},Hi=Dt=>{Ci(nR(Dt,{get project(){return e(G)},get chunk(){return e(d)},get choices(){return e(N)},get voices(){return e(H)},get disabled(){return C()},onchange:()=>{at(),y(Te,"editor")},onbusy:gt=>C(gt),onerror:gt=>y(ye,gt),$$legacy:!0}),gt=>y(je,gt),()=>e(je))},dl=Dt=>{var gt=hB(),da=q(k(gt),2),ha=q(k(da));Pt(ha),w(da);var Pa=q(da,4),qa=q(k(Pa));Ct(qa,4,()=>[.05,.1,.25,.5,1],Kt,(Pe,rt)=>{var dt=Vf(),lt=k(dt);w(dt);var Qe={};ie(yt=>{W(lt,`${yt??""} seconds`),Qe!==(Qe=rt)&&(dt.value=(dt.__value=rt)??"")},[()=>x(()=>rt.toFixed(2))]),J(Pe,dt)}),w(qa);var $t;On(qa),w(Pa);var me=q(Pa),Me=q(k(me));Ct(Me,4,()=>[16e3,22050,24e3,44100,48e3],Kt,(Pe,rt)=>{var dt=Vf(),lt=k(dt);w(dt);var Qe={};ie(yt=>{W(lt,`${yt??""} Hz`),Qe!==(Qe=rt)&&(dt.value=(dt.__value=rt)??"")},[()=>x(()=>rt.toLocaleString())]),J(Pe,dt)}),w(Me),w(me),w(gt),ie(()=>{ha.disabled=C(),qa.disabled=C(),$t!==($t=(e(G),x(()=>e(G).pauseIncrement??.1)))&&(qa.value=(qa.__value=(e(G),x(()=>e(G).pauseIncrement??.1)))??"",xn(qa,(e(G),x(()=>e(G).pauseIncrement??.1)))),Me.disabled=C()}),Ta(ha,()=>e(G).assembly.pause,Pe=>(Bt(G,e(G).assembly.pause=Pe),Wi(()=>{C(),e(fe),e(qe)}))),re("input",ha,at),re("change",qa,Pe=>{Bt(G,e(G).pauseIncrement=Number(Pe.currentTarget.value)),Wi(()=>{C(),e(fe),e(qe)}),at()}),dr(Me,()=>e(G).assembly.sampleRate,Pe=>(Bt(G,e(G).assembly.sampleRate=Pe),Wi(()=>{C(),e(fe),e(qe)}))),re("change",Me,at),J(Dt,gt)},Tn=Dt=>{var gt=yB(),da=q(k(gt),2),ha=q(k(da)),Pa=k(ha);Pa.value=Pa.__value="wav";var qa=q(Pa);qa.value=qa.__value="webm",w(ha),w(da);var $t=q(da,2),me=k($t,!0);w($t);var Me=q($t,2),Pe=q(k(Me));nu(Pe,{label:"Enhancement model",emptyLabel:"Keep original audio",get choices(){return e(N)},tasks:["s2s","gen"],get families(){return e(B)},get disabled(){return C()},onchange:at,get value(){return e(G).enhancement},set value(Gt){Bt(G,e(G).enhancement=Gt),Wi(()=>{C(),e(fe),e(qe)})},$$legacy:!0});var rt=q(Pe),dt=k(rt);Pt(dt),Rt(),w(rt);var lt=q(rt);{var Qe=Gt=>{var ma=_B(),Ot=q(k(ma));Pt(Ot),w(ma),ie(()=>Ot.disabled=C()),Ta(Ot,()=>e(G).finish.peakDb,gi=>(Bt(G,e(G).finish.peakDb=gi),Wi(()=>{C(),e(fe),e(qe)}))),re("input",Ot,at),J(Gt,ma)},yt=Gt=>{var ma=vB(),Ot=q(k(ma));Pt(Ot),w(ma),ie(()=>Ot.disabled=C()),Ta(Ot,()=>e(G).finish.gainDb,gi=>(Bt(G,e(G).finish.gainDb=gi),Wi(()=>{C(),e(fe),e(qe)}))),re("input",Ot,at),J(Gt,ma)};ve(lt,Gt=>{e(G),x(()=>e(G).finish.normalize)?Gt(Qe):Gt(yt,-1)})}var aa=q(lt);w(Me);var Yt=q(Me,2),Ca=k(Yt);Cd(Ca,{size:16}),Rt(2),w(Yt);var Ya=q(Yt,2);{var pa=Gt=>{var ma=bB();ie(()=>{_e(ma,"href",e(qe)),_e(ma,"download",e(it))}),J(Gt,ma)},Ea=La(()=>(e(qe),e(_),e(st),K(jc),e(G),x(()=>e(qe)&&e(_)&&e(st)===jc(e(G))+e(G).finish.format)));ve(Ya,Gt=>{e(Ea)&&Gt(pa)})}w(gt),ie(()=>{ha.disabled=C(),W(me,(e(G),x(()=>e(G).finish.format==="wav"?"Full-quality PCM 16-bit audio, ready for your editor.":"A smaller audio file, encoded using your browser."))),dt.disabled=C(),aa.disabled=C()||!e(b)}),dr(ha,()=>e(G).finish.format,Gt=>(Bt(G,e(G).finish.format=Gt),Wi(()=>{C(),e(fe),e(qe)}))),re("change",ha,()=>{y(qe,""),at()}),Dp(dt,()=>e(G).finish.normalize,Gt=>(Bt(G,e(G).finish.normalize=Gt),Wi(()=>{C(),e(fe),e(qe)}))),re("change",dt,at),re("click",aa,xi),J(Dt,gt)};ve(Jl,Dt=>{e(E)==="script"?Dt(Xl):e(E)==="speech"?Dt(Hi,1):e(E)==="assemble"?Dt(dl,2):Dt(Tn,-1)})}w(Co),w(Zr);var ks=q(Zr,2),un=k(ks);{var Zl=Dt=>{var gt=wB(),da=k(gt);rf(da,{size:15}),Rt(),w(gt),ie(()=>gt.disabled=C()),re("click",gt,()=>mt(Re[Re.findIndex(ha=>ha.id===e(E))-1].id)),J(Dt,gt)};ve(un,Dt=>{e(E)!=="script"&&Dt(Zl)})}var Hn=q(un,2),li=k(Hn),Ao=k(li,!0);w(li);var ec=q(li),Us=k(ec,!0);w(ec),w(Hn);var Lc=q(Hn,2);{var xs=Dt=>{var gt=ys(),da=ht(gt);{var ha=Pa=>{var qa=kB(),$t=k(qa);Uc($t,{size:14}),Rt(),w(qa),re("click",qa,()=>e(Fe)?.abort()),J(Pa,qa)};ve(da,Pa=>{e(Fe)&&Pa(ha)})}J(Dt,gt)},Go=Dt=>{var gt=xB(),da=k(gt,!0),ha=q(da);{var Pa=me=>{Cd(me,{size:16})},qa=me=>{Ec(me,{size:15})},$t=me=>{of(me,{size:16})};ve(ha,me=>{e(E)==="finish"?me(Pa):(e(E),e(o),e(v),x(()=>e(E)==="speech"&&e(o).length&&e(v))?me(qa,1):me($t,-1))})}w(gt),ie(me=>{gt.disabled=e(T),W(da,me)},[()=>(e(E),e(G),e(S),x(()=>e(E)==="finish"?"Download "+e(G).finish.format.toUpperCase():e(S)))]),re("click",gt,et),J(Dt,gt)};ve(Lc,Dt=>{C()?Dt(xs):Dt(Go,-1)})}w(ks);var to=q(ks,2);{var tc=Dt=>{var gt=$B(),da=k(gt),ha=k(da),Pa=q(k(ha),2),qa=k(Pa);w(Pa),w(ha);var $t=q(ha,2);w(da);var me=q(da,2),Me=k(me);Ct(Me,5,()=>(e(d),x(()=>e(d).takes)),Kt,(Ya,pa,Ea)=>{var Gt=SB();let ma;var Ot=k(Gt);Ot.textContent=`Take ${Ea+1}`;var gi=q(Ot),si=k(gi,!0);w(gi);var ln=q(gi),cs=k(ln);w(ln),w(Gt),ie((Ss,ul)=>{_e(Gt,"aria-pressed",(e(pa),e(s),x(()=>e(pa).id===e(s).id))),ma=va(Gt,1,"svelte-1szouna",null,ma,{chosen:e(pa).id===e(s).id}),W(si,Ss),W(cs,`${ul??""} s`)},[()=>(e(pa),e(d),K(Ds),e(G),x(()=>e(pa).id===e(d).takeId?"Used in narration":e(pa).signature===Ds(e(G),e(d))?"Matches current settings":"Earlier text or speaker")),()=>(e(pa),x(()=>(e(pa).rendered?.duration??e(pa).duration).toFixed(1)))]),re("click",Gt,()=>y(we,e(pa).id)),J(Ya,Gt)}),w(Me);var Pe=q(Me,2),rt=k(Pe),dt=k(rt);w(rt);var lt=q(rt,2),Qe=k(lt,!0);w(lt);var yt=q(lt,2);sv(yt,()=>(e(s),x(()=>e(s).id)),Ya=>{var pa=TB();ie(Ea=>_e(pa,"src",Ea),[()=>(e(s),x(()=>wt(e(s).rendered?.audio||e(s).audio)))]),re("play",pa,dn),J(Ya,pa)}),w(Pe),w(me);var aa=q(me,2),Yt=q(k(aa)),Ca=k(Yt,!0);w(Yt),w(aa),w(gt),Du(gt,Ya=>Le?.(Ya)),Do(()=>re("cancel",gt,()=>y(R,!1))),ie((Ya,pa)=>{W(qa,`Passage ${e(g)+1} · ${Ya??""}`),W(dt,`Take ${pa??""}`),W(Qe,(e(s),x(()=>e(s).text))),Yt.disabled=(K(C()),e(s),e(d),x(()=>C()||e(s).id===e(d).takeId)),W(Ca,(e(s),e(d),x(()=>e(s).id===e(d).takeId?"Selected":"Use this take")))},[()=>(K(xo),e(G),e(d),x(()=>xo(e(G),e(d))?.name||"Speaker")),()=>(e(d),e(s),x(()=>e(d).takes.indexOf(e(s))+1))]),re("click",$t,()=>y(R,!1)),re("click",Yt,()=>{ya(e(d),e(s)),y(R,!1)}),J(Dt,gt)};ve(to,Dt=>{e(R)&&e(d)&&e(s)&&Dt(tc)})}var ao=q(to,2);{var Fo=Dt=>{var gt=qB(),da=k(gt),ha=k(da),Pa=q(k(ha),2),qa=k(Pa);w(Pa),w(ha);var $t=q(ha,2);w(da);var me=q(da,2),Me=k(me);{let Pe=Lt(()=>(e(G),x(()=>e(G).pauseIncrement??.1)));LR(Me,{get take(){return e(n)},get sampleRate(){return e(G),x(()=>e(G).assembly.sampleRate)},get increment(){return e(Pe)},get disabled(){return C()},get active(){return j()},onchange:rt=>{Ye(rt),at()},onincrement:rt=>{Bt(G,e(G).pauseIncrement=rt),Wi(()=>{C(),e(fe),e(qe)}),at()}})}w(me),w(gt),Du(gt,Pe=>Le?.(Pe)),Do(()=>re("cancel",gt,()=>y(ge,!1))),ie(()=>W(qa,`Passage ${e(g)+1} · original audio is preserved`)),re("click",$t,()=>y(ge,!1)),J(Dt,gt)};ve(ao,Dt=>{e(ge)&&e(n)&&Dt(Fo)})}var Br=q(ao,2);{var Mo=Dt=>{var gt=GB(),da=k(gt),ha=q(k(da),2);w(da);var Pa=q(da,2),qa=k(Pa);Ct(qa,1,()=>(e(G),e(Q),x(()=>e(G).archivedChunks.slice(e(Q)*V,(e(Q)+1)*V))),Kt,(Me,Pe,rt)=>{var dt=CB(),lt=k(dt),Qe=k(lt,!0),yt=q(Qe),aa=k(yt);w(yt),w(lt);var Yt=q(lt,2);w(dt),ie(()=>{W(Qe,(e(Pe),x(()=>e(Pe).text))),W(aa,`${e(Pe),x(()=>e(Pe).takes.length)??""} recordings`),Yt.disabled=C()}),re("click",Yt,()=>{Bt(G,e(G).chunks=[...e(G).chunks,e(Pe)]),Wi(()=>{C(),e(fe),e(qe)}),e(G).archivedChunks.splice(e(Q)*V+rt,1),at()}),J(Me,dt)});var $t=q(qa);{var me=Me=>{var Pe=AB(),rt=k(Pe),dt=q(rt),lt=k(dt);w(dt);var Qe=q(dt);w(Pe),ie(()=>{rt.disabled=e(Q)===0,W(lt,`${e(Q)+1} / ${e(i)??""}`),Qe.disabled=e(Q)===e(i)-1}),re("click",rt,()=>Bu(Q,-1)),re("click",Qe,()=>Bu(Q)),J(Me,Pe)};ve($t,Me=>{e(i)>1&&Me(me)})}w(Pa),w(gt),Du(gt,Me=>Le?.(Me)),Do(()=>re("cancel",gt,()=>y(L,!1))),re("click",ha,()=>y(L,!1)),J(Dt,gt)};ve(Br,Dt=>{e(L)&&Dt(Mo)})}ie(()=>{W(Pi,e(E)==="script"?e(fe)?"Review your passages":"Write your script":e(E)==="speech"?"Speakers & recordings":e(E)==="assemble"?"Arrange your narration":"Export your narration"),W(Gi,e(E)==="script"?e(fe)?"Choose a passage on the left to check the split.":"Start with your words. Review the passages when you’re ready.":e(E)==="speech"?"Choose a passage on the left. Assign its speaker on the right.":e(E)==="assemble"?"Choose a join on the left, then listen and adjust the pause.":"Listen once more and download your finished audio."),_e(Un,"aria-pressed",e(Te)==="passages"),_e(Dn,"aria-pressed",e(Te)==="editor"),_e(ns,"aria-pressed",e(Te)==="settings"),W(Ql,e(E)==="speech"?"Speakers":"Settings"),Vs=va(eo,1,"passage-rail svelte-1szouna",null,Vs,{"mobile-visible":e(Te)==="passages"}),Rr=va(To,1,"editor-pane svelte-1szouna",null,Rr,{"mobile-visible":e(Te)==="editor"}),Dc=va(Co,1,"settings-rail svelte-1szouna",null,Dc,{"mobile-visible":e(Te)==="settings"}),_e(Co,"aria-label",e(E)==="speech"?"Speaker controls":"Project settings"),W(Ao,C()?e(de):e(de)||e(M)),W(Us,C()?"Completed work is saved as you go.":e(P))}),re("click",Un,()=>y(Te,"passages")),re("click",Dn,()=>y(Te,"editor")),re("click",ns,()=>y(Te,"settings")),J(pe,De)};ve(oa,pe=>{e(G)&&pe(Ba)})}return w(Bi),Du(Bi,pe=>nt?.(pe)),ie(()=>{_e(Bi,"data-active",j()),Qi=Ip(Bi,"",Qi,{"--tts-top":`${e(he)}px`}),W(Za,e(ue)?"Opening…":e(Ie)||e(Se)?"Saving…":"Saved"),Je.disabled=C()||e(ue),sa!==(sa=(e(G),x(()=>e(G)?.id||"")))&&(Je.value=(Je.__value=(e(G),x(()=>e(G)?.id||"")))??"",xn(Je,(e(G),x(()=>e(G)?.id||"")))),ui.disabled=C()||e(ue),fa.disabled=C()||e(ue)||!e(G)}),re("change",Je,pe=>It(pe.currentTarget.value)),re("click",ui,Ra),re("click",fa,na),J(a,Bi),El(t,"saveBeforeClose",Zt),Ei(on)}const EB=Object.freeze(Object.defineProperty({__proto__:null,default:zB},Symbol.toStringTag,{value:"Module"}));return Tu.app=Kv,Tu.start=Q5,Object.defineProperty(Tu,Symbol.toStringTag,{value:"Module"}),Tu})({}); +Paste your story, script, or article here…`);var Yt=q(it,2),It=k(Yt),Jt=k(It);w(It),zt(),w(Yt),ie(ni=>{it.disabled=C(),W(Jt,`${ni??""} characters`)},[()=>(e(G),x(()=>e(G).source.length.toLocaleString()))]),Sa(it,()=>e(G).source,ni=>(Et(G,e(G).source=ni),Yi(()=>{C(),e(fe),e(qe)}))),re("input",it,()=>{y(fe,null),nt()}),J(st,Xe)};ve(Ee,st=>{e(fe)?st(tt):st(mt,-1)})}ie(()=>W(Oa,(e(fe),e(pe),x(()=>e(fe)?`Passage ${e(pe)+1} of ${e(fe).length}`:"Your script")))),J(Bt,vt)},ks=Bt=>{var vt=ys(),pa=ht(vt);{var ha=qa=>{const oe=Nt(()=>e(d)),Me=Nt(()=>e(g)),Ee=Nt(()=>(Q(os),Q(e(oe)),x(()=>os(e(oe))))),tt=Nt(()=>(Q(On),e(G),Q(e(oe)),x(()=>On(e(G),e(oe)))));var mt=oB(),st=ht(mt),Xe=k(st),it=k(Xe),Yt=k(it);w(it);var It=q(it,2),Jt=k(It,!0);w(It),w(Xe);var ni=q(Xe,2),Xa=k(ni),ia=k(Xa);rf(ia,{size:16}),w(Xa);var Ua=q(Xa),Vt=k(Ua);of(Vt,{size:16}),w(Ua),w(ni),w(st);var ra=q(st,2),aa=q(ra);sn(aa),Ci(aa,on=>Et(je,e(je)[e(oe).id]=on),()=>e(je)?.[e(oe).id]);var li=q(aa,2),$i=k(li);let Dn;var Qs=k($i,!0);w($i);var yr=q($i),Xl=k(yr);w(yr);var Zl=q(yr,2),ec=k(Zl),tc=q(k(ec));bm(tc,{size:12}),w(ec);var Co=q(ec,2),wr=k(Co),lu=k(wr);ib(lu,{size:13}),zt(),w(wr);var ki=q(wr),un=k(ki);GS(un,{size:13}),zt(),w(ki);var Tn=q(ki),ao=k(Tn);ho(ao,{size:13}),zt(),w(Tn),w(Co),w(Zl),w(li);var ac=q(li,2),ol=k(ac),En=k(ol),xs=k(En,!0);w(En);var kr=q(En,2),Lc=k(kr,!0);w(kr);var io=q(kr);{var Vc=on=>{var Rs=nB(),Js=k(Rs,!0);w(Rs),ie(no=>W(Js,no),[()=>(Q(e(oe)),Q(Ls),e(G),x(()=>e(oe).takes.some(no=>no.signature===Ls(e(G),e(oe)))?"Choose an updated take.":"Text or speaker changed."))]),J(on,Rs)};ve(io,on=>{e(Ee)&&!e(tt)&&on(Vc)})}w(ol);var Hc=q(ol,2);{var cu=on=>{var Rs=sB();ie(Js=>_e(Rs,"src",Js),[()=>(Q(e(Ee)),x(()=>wt(e(Ee).rendered?.audio||e(Ee).audio)))]),re("play",Rs,Vi),J(on,Rs)};ve(Hc,on=>{e(Ee)&&on(cu)})}var Ks=q(Hc,2),Ys=k(Ks),Pr=k(Ys);ab(Pr,{size:14});var du=q(Pr,1,!0);w(Ys);var Us=q(Ys);{var ll=on=>{var Rs=rB(),Js=ht(Rs),no=k(Js);w(Js);var jr=q(Js),F_=k(jr);ib(F_,{size:14}),zt(),w(jr),ie(()=>{Js.disabled=C(),W(no,`Compare takes (${Q(e(oe)),x(()=>e(oe).takes.length)??""})`),jr.disabled=C()}),re("click",Js,ne),re("click",jr,()=>y(ge,!0)),J(on,Rs)};ve(Us,on=>{Q(e(oe)),x(()=>e(oe).takes.length)&&on(ll)})}w(Ks),w(ac),ie((on,Rs,Js,no,jr)=>{W(Yt,`PASSAGE ${e(Me)+1} OF ${e(G),x(()=>e(G).chunks.length)??""}`),W(Jt,on),Xa.disabled=C()||e(Me)===0,Ua.disabled=(Q(C()),Q(e(Me)),e(G),x(()=>C()||e(Me)===e(G).chunks.length-1)),_e(ra,"for",(Q(e(oe)),x(()=>`text-${e(oe).id}`))),_e(aa,"id",(Q(e(oe)),x(()=>`text-${e(oe).id}`))),_e(aa,"aria-label",`Chunk ${e(Me)+1} text`),aa.disabled=C(),Dn=ya($i,1,"chunk-badge svelte-1szouna",null,Dn,{ready:e(tt)}),W(Qs,Rs),W(Xl,`${Q(e(oe)),x(()=>e(oe).text.length)??""} characters`),wr.disabled=C(),ki.disabled=(Q(C()),Q(e(Me)),e(G),x(()=>C()||e(Me)===e(G).chunks.length-1)),Tn.disabled=C(),W(xs,Js),W(Lc,no),Ys.disabled=jr,W(du,e(Ee)?"Try another take":"Generate this passage")},[()=>(Q(xo),e(G),Q(e(oe)),x(()=>xo(e(G),e(oe))?.name||"Choose a speaker")),()=>(e(Je),Q(e(oe)),Q(e(Ee)),Q(e(tt)),Q(Ls),e(G),x(()=>e(Je)===e(oe).id?"Generating…":e(Ee)?e(tt)?"Ready":e(oe).takes.some(on=>on.signature===Ls(e(G),e(oe)))?"Choose an updated take":"Audio needs updating":"No audio yet")),()=>(Q(e(Ee)),Q(e(oe)),x(()=>e(Ee)?`Take ${e(oe).takes.indexOf(e(Ee))+1}`:"Ready when you are")),()=>(Q(e(Ee)),x(()=>e(Ee)?`${(e(Ee).rendered?.duration??e(Ee).duration).toFixed(1)} seconds`:"Generate this passage to hear it.")),()=>(Q(C()),Q(Zo),e(G),Q(e(oe)),x(()=>C()||!Zo(e(G),e(oe))||!e(oe).text.trim()))]),re("click",Xa,()=>Re(e(G).chunks[e(Me)-1].id)),re("click",Ua,()=>Re(e(G).chunks[e(Me)+1].id)),Sa(aa,()=>e(oe).text,on=>e(oe).text=on),re("input",aa,nt),re("click",wr,()=>St(e(oe))),re("click",ki,()=>ea(e(oe))),re("click",Tn,()=>wi(e(oe))),re("click",Ys,()=>hi([e(oe).id])),J(qa,mt)},Oa=qa=>{var oe=lB(),Me=k(oe);Oo(Me,{size:30});var Ee=q(Me,4);w(oe),re("click",Ee,()=>_t("script")),J(qa,oe)};ve(pa,qa=>{e(d)?qa(ha):qa(Oa,-1)})}J(Bt,vt)},Vl=Bt=>{var vt=uB(),pa=ht(vt),ha=q(k(pa),2),Oa=k(ha),qa=k(Oa);rf(qa,{size:16}),w(Oa);var oe=q(Oa),Me=k(oe);of(Me,{size:16}),w(oe),w(ha),w(pa);var Ee=q(pa,2),tt=k(Ee);{var mt=Vt=>{var ra=cB(),aa=k(ra),li=q(aa);w(ra),ie(()=>{W(aa,`${e(G),e(r),x(()=>e(G).chunks.length-e(r))??""} passages need current audio.`),li.disabled=C()}),re("click",li,()=>_t("speech")),J(Vt,ra)};ve(tt,Vt=>{e(r),e(G),x(()=>e(r)!==e(G).chunks.length)&&Vt(mt)})}var st=q(tt);{var Xe=Vt=>{{let ra=Nt(()=>(e(G),x(()=>e(G).pauseIncrement??.1))),aa=Nt(()=>j()&&!C());ER(Vt,{get project(){return e(G)},get chunk(){return e(d)},get next(){return e(G),e(g),x(()=>e(G).chunks[e(g)+1])},get index(){return e(g)},get increment(){return e(ra)},get disabled(){return C()},get active(){return e(aa)},onchange:nt})}};ve(st,Vt=>{e(d)&&Vt(Xe)})}w(Ee);var it=q(Ee,2),Yt=k(it),It=k(Yt);Xv(It,{size:14}),zt(),w(Yt);var Jt=q(Yt),ni=k(Jt);Jv(ni,{size:14}),zt(),w(Jt);var Xa=q(Jt);w(it);var ia=q(it,2);{var Ua=Vt=>{var ra=dB(),aa=k(ra),li=k(aa,!0);w(aa);var $i=q(aa,2);Ci($i,Dn=>y(Be,Dn),()=>e(Be)),w(ra),ie(Dn=>{W(li,e(v)?"Full narration":"Previous narration · needs updating"),_e($i,"src",Dn)},[()=>(e(G),x(()=>wt(e(G).assembled.audio)))]),re("play",$i,Vi),J(Vt,ra)};ve(ia,Vt=>{e(G),x(()=>e(G).assembled)&&Vt(Ua)})}ie(()=>{Oa.disabled=C()||e(g)<=0,oe.disabled=(Q(C()),e(g),e(G),x(()=>C()||e(g)===e(G).chunks.length-1)),Yt.disabled=C()||e(g)<=0,Jt.disabled=(Q(C()),e(g),e(G),x(()=>C()||e(g)===e(G).chunks.length-1)),Xa.disabled=C()}),re("click",Oa,()=>Ze(e(g)-1)),re("click",oe,()=>Ze(e(g)+1)),re("click",Yt,()=>{const Vt=e(g)-1;da(e(d),-1),Ze(Vt)}),re("click",Jt,()=>{const Vt=e(g)+1;da(e(d),1),Ze(Vt)}),re("click",Xa,()=>_t("speech")),J(Bt,vt)},Oc=Bt=>{var vt=mB(),pa=ht(vt),ha=q(k(pa),2),Oa=k(ha);w(ha),w(pa);var qa=q(pa,2),oe=k(qa);sf(oe,{size:38});var Me=q(oe,2),Ee=k(Me,!0);w(Me);var tt=q(Me,2),mt=k(tt);w(tt);var st=q(tt,2);{var Xe=It=>{var Jt=fB();ie(ni=>_e(Jt,"src",ni),[()=>(e(G),x(()=>wt(e(G).assembled.audio)))]),re("play",Jt,Vi),J(It,Jt)};ve(st,It=>{e(G),x(()=>e(G).assembled)&&It(Xe)})}var it=q(st);{var Yt=It=>{var Jt=pB(),ni=k(Jt),Xa=k(ni,!0);w(ni);var ia=q(ni,2);w(Jt),ie(Ua=>{W(Xa,e(_)?"Processed preview":"Previous processing · needs updating"),_e(ia,"src",Ua)},[()=>(e(G),x(()=>wt(e(G).finished.audio)))]),re("play",ia,Vi),J(It,Jt)};ve(it,It=>{e(G),x(()=>e(G).finished)&&It(Yt)})}w(qa),ie((It,Jt)=>{W(Oa,`${e(G),x(()=>e(G).chunks.length)??""} PASSAGES`),W(Ee,(e(G),x(()=>e(G).title))),W(mt,`${It??""} Hz · ${Jt??""}`)},[()=>(e(G),x(()=>e(G).assembly.sampleRate.toLocaleString())),()=>(e(G),x(()=>e(G).finish.format.toUpperCase()))]),J(Bt,vt)};ve(nl,Bt=>{e(U)==="script"?Bt(ou):e(U)==="speech"?Bt(ks,1):e(U)==="assemble"?Bt(Vl,2):Bt(Oc,-1)})}w(Rr);var So=q(Rr,2);let Ic;var Hl=k(So);{var To=Bt=>{var vt=gB(),pa=q(k(vt),4),ha=q(k(pa)),Oa=k(ha);Oa.value=Oa.__value="paragraph";var qa=q(Oa);qa.value=qa.__value="sentence";var oe=q(qa);oe.value=oe.__value="size",w(ha),w(pa);var Me=q(pa),Ee=q(k(Me));Pt(Ee),w(Me),zt(2),w(vt),ie(()=>{ha.disabled=C(),Ee.disabled=C()}),ur(ha,()=>e(G).split.method,tt=>(Et(G,e(G).split.method=tt),Yi(()=>{C(),e(fe),e(qe)}))),re("change",ha,()=>{y(fe,null),nt()}),Sa(Ee,()=>e(G).split.characters,tt=>(Et(G,e(G).split.characters=tt),Yi(()=>{C(),e(fe),e(qe)}))),re("input",Ee,()=>{y(fe,null),nt()}),J(Bt,vt)},Ki=Bt=>{Ci(nR(Bt,{get project(){return e(G)},get chunk(){return e(d)},get choices(){return e(B)},get voices(){return e(H)},get disabled(){return C()},onchange:()=>{nt(),y(Te,"editor")},onbusy:vt=>C(vt),onerror:vt=>y(ye,vt),$$legacy:!0}),vt=>y(Pe,vt),()=>e(Pe))},sl=Bt=>{var vt=hB(),pa=q(k(vt),2),ha=q(k(pa));Pt(ha),w(pa);var Oa=q(pa,4),qa=q(k(Oa));Ct(qa,4,()=>[.05,.1,.25,.5,1],Qt,(tt,mt)=>{var st=Vf(),Xe=k(st);w(st);var it={};ie(Yt=>{W(Xe,`${Yt??""} seconds`),it!==(it=mt)&&(st.value=(st.__value=mt)??"")},[()=>x(()=>mt.toFixed(2))]),J(tt,st)}),w(qa);var oe;Nn(qa),w(Oa);var Me=q(Oa),Ee=q(k(Me));Ct(Ee,4,()=>[16e3,22050,24e3,44100,48e3],Qt,(tt,mt)=>{var st=Vf(),Xe=k(st);w(st);var it={};ie(Yt=>{W(Xe,`${Yt??""} Hz`),it!==(it=mt)&&(st.value=(st.__value=mt)??"")},[()=>x(()=>mt.toLocaleString())]),J(tt,st)}),w(Ee),w(Me),w(vt),ie(()=>{ha.disabled=C(),qa.disabled=C(),oe!==(oe=(e(G),x(()=>e(G).pauseIncrement??.1)))&&(qa.value=(qa.__value=(e(G),x(()=>e(G).pauseIncrement??.1)))??"",kn(qa,(e(G),x(()=>e(G).pauseIncrement??.1)))),Ee.disabled=C()}),Sa(ha,()=>e(G).assembly.pause,tt=>(Et(G,e(G).assembly.pause=tt),Yi(()=>{C(),e(fe),e(qe)}))),re("input",ha,nt),re("change",qa,tt=>{Et(G,e(G).pauseIncrement=Number(tt.currentTarget.value)),Yi(()=>{C(),e(fe),e(qe)}),nt()}),ur(Ee,()=>e(G).assembly.sampleRate,tt=>(Et(G,e(G).assembly.sampleRate=tt),Yi(()=>{C(),e(fe),e(qe)}))),re("change",Ee,nt),J(Bt,vt)},Sn=Bt=>{var vt=yB(),pa=q(k(vt),2),ha=q(k(pa)),Oa=k(ha);Oa.value=Oa.__value="wav";var qa=q(Oa);qa.value=qa.__value="webm",w(ha),w(pa);var oe=q(pa,2),Me=k(oe,!0);w(oe);var Ee=q(oe,2),tt=q(k(Ee));iu(tt,{label:"Enhancement model",emptyLabel:"Keep original audio",get choices(){return e(B)},tasks:["s2s","gen"],get families(){return e(P)},get disabled(){return C()},onchange:nt,get value(){return e(G).enhancement},set value(Vt){Et(G,e(G).enhancement=Vt),Yi(()=>{C(),e(fe),e(qe)})},$$legacy:!0});var mt=q(tt),st=k(mt);Pt(st),zt(),w(mt);var Xe=q(mt);{var it=Vt=>{var ra=_B(),aa=q(k(ra));Pt(aa),w(ra),ie(()=>aa.disabled=C()),Sa(aa,()=>e(G).finish.peakDb,li=>(Et(G,e(G).finish.peakDb=li),Yi(()=>{C(),e(fe),e(qe)}))),re("input",aa,nt),J(Vt,ra)},Yt=Vt=>{var ra=vB(),aa=q(k(ra));Pt(aa),w(ra),ie(()=>aa.disabled=C()),Sa(aa,()=>e(G).finish.gainDb,li=>(Et(G,e(G).finish.gainDb=li),Yi(()=>{C(),e(fe),e(qe)}))),re("input",aa,nt),J(Vt,ra)};ve(Xe,Vt=>{e(G),x(()=>e(G).finish.normalize)?Vt(it):Vt(Yt,-1)})}var It=q(Xe);w(Ee);var Jt=q(Ee,2),ni=k(Jt);qd(ni,{size:16}),zt(2),w(Jt);var Xa=q(Jt,2);{var ia=Vt=>{var ra=bB();ie(()=>{_e(ra,"href",e(qe)),_e(ra,"download",e(rt))}),J(Vt,ra)},Ua=Va(()=>(e(qe),e(_),e(ot),Q(Bc),e(G),x(()=>e(qe)&&e(_)&&e(ot)===Bc(e(G))+e(G).finish.format)));ve(Xa,Vt=>{e(Ua)&&Vt(ia)})}w(vt),ie(()=>{ha.disabled=C(),W(Me,(e(G),x(()=>e(G).finish.format==="wav"?"Full-quality PCM 16-bit audio, ready for your editor.":"A smaller audio file, encoded using your browser."))),st.disabled=C(),It.disabled=C()||!e(v)}),ur(ha,()=>e(G).finish.format,Vt=>(Et(G,e(G).finish.format=Vt),Yi(()=>{C(),e(fe),e(qe)}))),re("change",ha,()=>{y(qe,""),nt()}),Dp(st,()=>e(G).finish.normalize,Vt=>(Et(G,e(G).finish.normalize=Vt),Yi(()=>{C(),e(fe),e(qe)}))),re("change",st,nt),re("click",It,ui),J(Bt,vt)};ve(Hl,Bt=>{e(U)==="script"?Bt(To):e(U)==="speech"?Bt(Ki,1):e(U)==="assemble"?Bt(sl,2):Bt(Sn,-1)})}w(So),w(Zr);var Hs=q(Zr,2),rn=k(Hs);{var Dc=Bt=>{var vt=wB(),pa=k(vt);rf(pa,{size:15}),zt(),w(vt),ie(()=>vt.disabled=C()),re("click",vt,()=>_t(Ne[Ne.findIndex(ha=>ha.id===e(U))-1].id)),J(Bt,vt)};ve(rn,Bt=>{e(U)!=="script"&&Bt(Dc)})}var In=q(rn,2),pi=k(In),$o=k(pi,!0);w(pi);var Wl=q(pi),Es=k(Wl,!0);w(Wl),w(In);var Ql=q(In,2);{var us=Bt=>{var vt=ys(),pa=ht(vt);{var ha=Oa=>{var qa=kB(),oe=k(qa);zc(oe,{size:14}),zt(),w(qa),re("click",qa,()=>e(Fe)?.abort()),J(Oa,qa)};ve(pa,Oa=>{e(Fe)&&Oa(ha)})}J(Bt,vt)},Br=Bt=>{var vt=xB(),pa=k(vt,!0),ha=q(pa);{var Oa=Me=>{qd(Me,{size:16})},qa=Me=>{Mc(Me,{size:15})},oe=Me=>{of(Me,{size:16})};ve(ha,Me=>{e(U)==="finish"?Me(Oa):(e(U),e(o),e(b),x(()=>e(U)==="speech"&&e(o).length&&e(b))?Me(qa,1):Me(oe,-1))})}w(vt),ie(Me=>{vt.disabled=e(S),W(pa,Me)},[()=>(e(U),e(G),e($),x(()=>e(U)==="finish"?"Download "+e(G).finish.format.toUpperCase():e($)))]),re("click",vt,at),J(Bt,vt)};ve(Ql,Bt=>{C()?Bt(us):Bt(Br,-1)})}w(Hs);var Kl=q(Hs,2);{var Yl=Bt=>{var vt=$B(),pa=k(vt),ha=k(pa),Oa=q(k(ha),2),qa=k(Oa);w(Oa),w(ha);var oe=q(ha,2);w(pa);var Me=q(pa,2),Ee=k(Me);Ct(Ee,5,()=>(e(d),x(()=>e(d).takes)),Qt,(Xa,ia,Ua)=>{var Vt=SB();let ra;var aa=k(Vt);aa.textContent=`Take ${Ua+1}`;var li=q(aa),$i=k(li,!0);w(li);var Dn=q(li),Qs=k(Dn);w(Dn),w(Vt),ie((yr,Xl)=>{_e(Vt,"aria-pressed",(e(ia),e(s),x(()=>e(ia).id===e(s).id))),ra=ya(Vt,1,"svelte-1szouna",null,ra,{chosen:e(ia).id===e(s).id}),W($i,yr),W(Qs,`${Xl??""} s`)},[()=>(e(ia),e(d),Q(Ls),e(G),x(()=>e(ia).id===e(d).takeId?"Used in narration":e(ia).signature===Ls(e(G),e(d))?"Matches current settings":"Earlier text or speaker")),()=>(e(ia),x(()=>(e(ia).rendered?.duration??e(ia).duration).toFixed(1)))]),re("click",Vt,()=>y(we,e(ia).id)),J(Xa,Vt)}),w(Ee);var tt=q(Ee,2),mt=k(tt),st=k(mt);w(mt);var Xe=q(mt,2),it=k(Xe,!0);w(Xe);var Yt=q(Xe,2);sv(Yt,()=>(e(s),x(()=>e(s).id)),Xa=>{var ia=TB();ie(Ua=>_e(ia,"src",Ua),[()=>(e(s),x(()=>wt(e(s).rendered?.audio||e(s).audio)))]),re("play",ia,Vi),J(Xa,ia)}),w(tt),w(Me);var It=q(Me,2),Jt=q(k(It)),ni=k(Jt,!0);w(Jt),w(It),w(vt),Du(vt,Xa=>Le?.(Xa)),Uo(()=>re("cancel",vt,()=>y(R,!1))),ie((Xa,ia)=>{W(qa,`Passage ${e(g)+1} · ${Xa??""}`),W(st,`Take ${ia??""}`),W(it,(e(s),x(()=>e(s).text))),Jt.disabled=(Q(C()),e(s),e(d),x(()=>C()||e(s).id===e(d).takeId)),W(ni,(e(s),e(d),x(()=>e(s).id===e(d).takeId?"Selected":"Use this take")))},[()=>(Q(xo),e(G),e(d),x(()=>xo(e(G),e(d))?.name||"Speaker")),()=>(e(d),e(s),x(()=>e(d).takes.indexOf(e(s))+1))]),re("click",oe,()=>y(R,!1)),re("click",Jt,()=>{ma(e(d),e(s)),y(R,!1)}),J(Bt,vt)};ve(Kl,Bt=>{e(R)&&e(d)&&e(s)&&Bt(Yl)})}var qo=q(Kl,2);{var Ws=Bt=>{var vt=qB(),pa=k(vt),ha=k(pa),Oa=q(k(ha),2),qa=k(Oa);w(Oa),w(ha);var oe=q(ha,2);w(pa);var Me=q(pa,2),Ee=k(Me);{let tt=Nt(()=>(e(G),x(()=>e(G).pauseIncrement??.1)));LR(Ee,{get take(){return e(n)},get sampleRate(){return e(G),x(()=>e(G).assembly.sampleRate)},get increment(){return e(tt)},get disabled(){return C()},get active(){return j()},onchange:mt=>{Ke(mt),nt()},onincrement:mt=>{Et(G,e(G).pauseIncrement=mt),Yi(()=>{C(),e(fe),e(qe)}),nt()}})}w(Me),w(vt),Du(vt,tt=>Le?.(tt)),Uo(()=>re("cancel",vt,()=>y(ge,!1))),ie(()=>W(qa,`Passage ${e(g)+1} · original audio is preserved`)),re("click",oe,()=>y(ge,!1)),J(Bt,vt)};ve(qo,Bt=>{e(ge)&&e(n)&&Bt(Ws)})}var Jl=q(qo,2);{var rl=Bt=>{var vt=GB(),pa=k(vt),ha=q(k(pa),2);w(pa);var Oa=q(pa,2),qa=k(Oa);Ct(qa,1,()=>(e(G),e(K),x(()=>e(G).archivedChunks.slice(e(K)*V,(e(K)+1)*V))),Qt,(Ee,tt,mt)=>{var st=CB(),Xe=k(st),it=k(Xe,!0),Yt=q(it),It=k(Yt);w(Yt),w(Xe);var Jt=q(Xe,2);w(st),ie(()=>{W(it,(e(tt),x(()=>e(tt).text))),W(It,`${e(tt),x(()=>e(tt).takes.length)??""} recordings`),Jt.disabled=C()}),re("click",Jt,()=>{Et(G,e(G).chunks=[...e(G).chunks,e(tt)]),Yi(()=>{C(),e(fe),e(qe)}),e(G).archivedChunks.splice(e(K)*V+mt,1),nt()}),J(Ee,st)});var oe=q(qa);{var Me=Ee=>{var tt=AB(),mt=k(tt),st=q(mt),Xe=k(st);w(st);var it=q(st);w(tt),ie(()=>{mt.disabled=e(K)===0,W(Xe,`${e(K)+1} / ${e(i)??""}`),it.disabled=e(K)===e(i)-1}),re("click",mt,()=>Bu(K,-1)),re("click",it,()=>Bu(K)),J(Ee,tt)};ve(oe,Ee=>{e(i)>1&&Ee(Me)})}w(Oa),w(vt),Du(vt,Ee=>Le?.(Ee)),Uo(()=>re("cancel",vt,()=>y(D,!1))),re("click",ha,()=>y(D,!1)),J(Bt,vt)};ve(Jl,Bt=>{e(D)&&Bt(rl)})}ie(()=>{W(Oi,e(U)==="script"?e(fe)?"Review your passages":"Write your script":e(U)==="speech"?"Speakers & recordings":e(U)==="assemble"?"Arrange your narration":"Export your narration"),W(Si,e(U)==="script"?e(fe)?"Choose a passage on the left to check the split.":"Start with your words. Review the passages when you’re ready.":e(U)==="speech"?"Choose a passage on the left. Assign its speaker on the right.":e(U)==="assemble"?"Choose a join on the left, then listen and adjust the pause.":"Listen once more and download your finished audio."),_e(Hn,"aria-pressed",e(Te)==="passages"),_e(Wn,"aria-pressed",e(Te)==="editor"),_e(cs,"aria-pressed",e(Te)==="settings"),W(Dl,e(U)==="speech"?"Speakers":"Settings"),ds=ya(al,1,"passage-rail svelte-1szouna",null,ds,{"mobile-visible":e(Te)==="passages"}),to=ya(Rr,1,"editor-pane svelte-1szouna",null,to,{"mobile-visible":e(Te)==="editor"}),Ic=ya(So,1,"settings-rail svelte-1szouna",null,Ic,{"mobile-visible":e(Te)==="settings"}),_e(So,"aria-label",e(U)==="speech"?"Speaker controls":"Project settings"),W($o,C()?e(ue):e(ue)||e(M)),W(Es,C()?"Completed work is saved as you go.":e(N))}),re("click",Hn,()=>y(Te,"passages")),re("click",Wn,()=>y(Te,"editor")),re("click",cs,()=>y(Te,"settings")),J(me,De)};ve(ua,me=>{e(G)&&me(Ra)})}return w(Ni),Du(Ni,me=>ct?.(me)),ie(()=>{_e(Ni,"data-active",j()),Hi=Ip(Ni,"",Hi,{"--tts-top":`${e(he)}px`}),W(ai,e(de)?"Opening…":e(Ie)||e(xe)?"Saving…":"Saved"),Ye.disabled=C()||e(de),oa!==(oa=(e(G),x(()=>e(G)?.id||"")))&&(Ye.value=(Ye.__value=(e(G),x(()=>e(G)?.id||"")))??"",kn(Ye,(e(G),x(()=>e(G)?.id||"")))),ii.disabled=C()||e(de),ga.disabled=C()||e(de)||!e(G)}),re("change",Ye,me=>jt(me.currentTarget.value)),re("click",ii,za),re("click",ga,sa),J(a,Ni),Al(t,"saveBeforeClose",Lt),Mi(_n)}const EB=Object.freeze(Object.defineProperty({__proto__:null,default:zB},Symbol.toStringTag,{value:"Module"}));return Tu.app=Kv,Tu.start=Q5,Object.defineProperty(Tu,Symbol.toStringTag,{value:"Module"}),Tu})({}); __sveltekit_1xyyov.app.start(element); diff --git a/webui/native/src/routes/+page.svelte b/webui/native/src/routes/+page.svelte index a7c7e6f88..91c37e536 100644 --- a/webui/native/src/routes/+page.svelte +++ b/webui/native/src/routes/+page.svelte @@ -3244,7 +3244,6 @@ {entrySelectable} {studioPackageSlots} {packageIsAvailable} - {packageSessionOptionsMatch} {supportsMaxTokens} {supportsRequestOption} {requiresRequestOption} diff --git a/webui/native/src/routes/Arena.svelte b/webui/native/src/routes/Arena.svelte index 92d114581..9acbeee4d 100644 --- a/webui/native/src/routes/Arena.svelte +++ b/webui/native/src/routes/Arena.svelte @@ -30,8 +30,6 @@ export let studioPackageSlots: (entry: CatalogEntry) => Array<{ key: string; label: string; choice?: InstallPackageChoice }> = () => []; export let packageIsAvailable: (entry: CatalogEntry, choice: InstallPackageChoice) => boolean = () => false; - export let packageSessionOptionsMatch: - (entry: CatalogEntry, choice: InstallPackageChoice, model: LoadedModel) => boolean = () => true; export let supportsMaxTokens: (entry: CatalogEntry) => boolean = () => false; export let supportsRequestOption: (entry: CatalogEntry, option: string) => boolean = () => false; export let requiresRequestOption: (entry: CatalogEntry, option: string) => boolean = () => false; @@ -432,9 +430,11 @@ throw new StatusWarning(tr('arena.error.notDownloaded', { package: choice.label })); } const path = modelPathForChoice(entry, choice); + // Arena matches its own request, independently of Studio overrides. + const sessionOptions = mergedSessionOptionsForChoice(entry, choice); const resident = loadedModels.find((model) => model.id === entry.id && model.loaded && loadedPathMatches(path, model.path) && - (!choice || packageSessionOptionsMatch(entry, choice, model))); + Object.entries(sessionOptions).every(([key, value]) => model.session_options?.[key] === value)); if (resident) return; const replaced = loadedModels.filter((model) => model.loaded && @@ -450,12 +450,12 @@ task: entry.task, mode: entry.mode || 'offline', load_options: { ...choice?.load_options, ...entry.load_options }, - session_options: mergedSessionOptionsForChoice(entry, choice) + session_options: sessionOptions }); await refresh(); if (!loadedModels.some((model) => model.id === entry.id && model.loaded && loadedPathMatches(path, model.path) && - (!choice || packageSessionOptionsMatch(entry, choice, model)))) { + Object.entries(sessionOptions).every(([key, value]) => model.session_options?.[key] === value))) { throw new Error(tr('arena.error.loadFailed')); } }