diff --git "a/hfstudio/static/_app/immutable/nodes/2.D1a2TSEw.js" "b/hfstudio/static/_app/immutable/nodes/2.D1a2TSEw.js" new file mode 100644--- /dev/null +++ "b/hfstudio/static/_app/immutable/nodes/2.D1a2TSEw.js" @@ -0,0 +1,73 @@ +import{r as vt,a as x,t as F,S as Re,i as He,s as Le,c as je,O as Q,d as f,P as Bt,u as Ge,g as qe,e as We,Q as jt,f as ge,h as i,R as Mn,m as v,E as Dt,T as Vn,U as ln,V as ve,I as se,K as ae,L as oe,J as ie,b as u,D as rt,l as pe,k as h,y as ne,o as V,p,z as re,q as R,v as Un,x as Oe,w as Lt,C as lt,n as Pe,N as sn,W as an,M as Rt,A as Ft,X as Kt,Y as Zt,j as Gt}from"../chunks/BF3xBGh8.js";import"../chunks/IHki7fMi.js";function bt(s){return(s==null?void 0:s.length)!==void 0?s:Array.from(s)}function zn(s,e){F(s,1,1,()=>{e.delete(s.key)})}function Bn(s,e,n,t,r,l,a,o,_,C,D,I){let y=s.length,S=l.length,T=y;const N={};for(;T--;)N[s[T].key]=T;const k=[],E=new Map,c=new Map,d=[];for(T=S;T--;){const w=I(r,l,T),A=n(w);let b=a.get(A);b?d.push(()=>b.p(w,e)):(b=C(A,w),b.c()),E.set(A,k[T]=b),A in N&&c.set(A,Math.abs(T-N[A]))}const m=new Set,g=new Set;function $(w){x(w,1),w.m(o,D),a.set(w.key,w),D=w.first,S--}for(;y&&S;){const w=k[S-1],A=s[y-1],b=w.key,L=A.key;w===A?(D=w.first,y--,S--):E.has(L)?!a.has(b)||m.has(b)?$(w):g.has(L)?y--:c.get(b)>c.get(L)?(g.add(b),$(w)):(m.add(L),y--):(_(A,a),y--)}for(;y--;){const w=s[y];E.has(w.key)||_(w,a)}for(;S;)$(k[S-1]);return vt(d),k}function Ue(s,e){const n={},t={},r={$$scope:1};let l=s.length;for(;l--;){const a=s[l],o=e[l];if(o){for(const _ in a)_ in o||(t[_]=1);for(const _ in o)r[_]||(n[_]=o[_],r[_]=1);s[l]=o}else for(const _ in a)r[_]=1}for(const a in t)a in n||(n[a]=void 0);return n}function Ke(s){return typeof s=="object"&&s!==null?s:{}}/** + * @license lucide-svelte v0.303.0 - ISC + +This source code is licensed under the ISC license. +See the LICENSE file in the root directory of this source tree. + */const on={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"};function un(s,e,n){const t=s.slice();return t[10]=e[n][0],t[11]=e[n][1],t}function Wt(s){let e,n=[s[11]],t={};for(let r=0;r{n(7,e=Q(Q({},e),ve(S))),n(6,r=ln(e,t)),"name"in S&&n(0,o=S.name),"color"in S&&n(1,_=S.color),"size"in S&&n(2,C=S.size),"strokeWidth"in S&&n(3,D=S.strokeWidth),"absoluteStrokeWidth"in S&&n(4,I=S.absoluteStrokeWidth),"iconNode"in S&&n(5,y=S.iconNode),"$$scope"in S&&n(8,a=S.$$scope)},e=ve(e),[o,_,C,D,I,y,r,e,a,l]}class Ze extends Re{constructor(e){super(),He(this,e,Gn,jn,Le,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function qn(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Wn(s){let e,n;const t=[{name:"alert-circle"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[qn]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Yn extends Re{constructor(e){super(),He(this,e,Xn,Wn,Le,{})}}function Kn(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Zn(s){let e,n;const t=[{name:"chevron-down"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Kn]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Qn extends Re{constructor(e){super(),He(this,e,Jn,Zn,Le,{})}}function er(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function tr(s){let e,n;const t=[{name:"code"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[er]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class rr extends Re{constructor(e){super(),He(this,e,nr,tr,Le,{})}}function lr(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function sr(s){let e,n;const t=[{name:"copy"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[lr]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Ht extends Re{constructor(e){super(),He(this,e,ar,sr,Le,{})}}function or(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function ir(s){let e,n;const t=[{name:"download"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[or]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Xt extends Re{constructor(e){super(),He(this,e,ur,ir,Le,{})}}function cr(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function fr(s){let e,n;const t=[{name:"loader-2"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[cr]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class gr extends Re{constructor(e){super(),He(this,e,dr,fr,Le,{})}}function hr(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function pr(s){let e,n;const t=[{name:"more-horizontal"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[hr]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class _r extends Re{constructor(e){super(),He(this,e,mr,pr,Le,{})}}function br(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function vr(s){let e,n;const t=[{name:"panels-top-left"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[br]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class kr extends Re{constructor(e){super(),He(this,e,yr,vr,Le,{})}}function wr(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function $r(s){let e,n;const t=[{name:"pause"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[wr]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Rn extends Re{constructor(e){super(),He(this,e,Er,$r,Le,{})}}function Sr(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Ar(s){let e,n;const t=[{name:"play"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Sr]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Ut extends Re{constructor(e){super(),He(this,e,Tr,Ar,Le,{})}}function Ir(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Dr(s){let e,n;const t=[{name:"rotate-ccw"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Ir]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Cr extends Re{constructor(e){super(),He(this,e,Nr,Dr,Le,{})}}function xr(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Fr(s){let e,n;const t=[{name:"share"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[xr]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Yt extends Re{constructor(e){super(),He(this,e,Pr,Fr,Le,{})}}function Or(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Lr(s){let e,n;const t=[{name:"skip-back"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Or]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class Vr extends Re{constructor(e){super(),He(this,e,Mr,Lr,Le,{})}}function Rr(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function Hr(s){let e,n;const t=[{name:"skip-forward"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Rr]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class zr extends Re{constructor(e){super(),He(this,e,Ur,Hr,Le,{})}}function Br(s){let e;const n=s[2].default,t=je(n,s,s[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,l){t&&t.m(r,l),e=!0},p(r,l){t&&t.p&&(!e||l&8)&&Ge(t,n,r,r[3],e?We(n,r[3],l,null):qe(r[3]),null)},i(r){e||(x(t,r),e=!0)},o(r){F(t,r),e=!1},d(r){t&&t.d(r)}}}function jr(s){let e,n;const t=[{name:"x"},s[1],{iconNode:s[0]}];let r={$$slots:{default:[Br]},$$scope:{ctx:s}};for(let l=0;l{n(1,e=Q(Q({},e),ve(a))),"$$scope"in a&&n(3,r=a.$$scope)},e=ve(e),[l,e,t,r]}class qr extends Re{constructor(e){super(),He(this,e,Gr,jr,Le,{})}}var fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wr(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Hn={exports:{}};(function(s){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var n=function(t){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,a={},o={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function c(d){return d instanceof _?new _(d.type,c(d.content),d.alias):Array.isArray(d)?d.map(c):d.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(g){var c=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(g.stack)||[])[1];if(c){var d=document.getElementsByTagName("script");for(var m in d)if(d[m].src==c)return d[m]}return null}},isActive:function(c,d,m){for(var g="no-"+d;c;){var $=c.classList;if($.contains(d))return!0;if($.contains(g))return!1;c=c.parentElement}return!!m}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(c,d){var m=o.util.clone(o.languages[c]);for(var g in d)m[g]=d[g];return m},insertBefore:function(c,d,m,g){g=g||o.languages;var $=g[c],w={};for(var A in $)if($.hasOwnProperty(A)){if(A==d)for(var b in m)m.hasOwnProperty(b)&&(w[b]=m[b]);m.hasOwnProperty(A)||(w[A]=$[A])}var L=g[c];return g[c]=w,o.languages.DFS(o.languages,function(P,B){B===L&&P!=c&&(this[P]=w)}),w},DFS:function c(d,m,g,$){$=$||{};var w=o.util.objId;for(var A in d)if(d.hasOwnProperty(A)){m.call(d,A,d[A],g||A);var b=d[A],L=o.util.type(b);L==="Object"&&!$[w(b)]?($[w(b)]=!0,c(b,m,null,$)):L==="Array"&&!$[w(b)]&&($[w(b)]=!0,c(b,m,A,$))}}},plugins:{},highlightAll:function(c,d){o.highlightAllUnder(document,c,d)},highlightAllUnder:function(c,d,m){var g={callback:m,container:c,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",g),g.elements=Array.prototype.slice.apply(g.container.querySelectorAll(g.selector)),o.hooks.run("before-all-elements-highlight",g);for(var $=0,w;w=g.elements[$++];)o.highlightElement(w,d===!0,g.callback)},highlightElement:function(c,d,m){var g=o.util.getLanguage(c),$=o.languages[g];o.util.setLanguage(c,g);var w=c.parentElement;w&&w.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(w,g);var A=c.textContent,b={element:c,language:g,grammar:$,code:A};function L(B){b.highlightedCode=B,o.hooks.run("before-insert",b),b.element.innerHTML=b.highlightedCode,o.hooks.run("after-highlight",b),o.hooks.run("complete",b),m&&m.call(b.element)}if(o.hooks.run("before-sanity-check",b),w=b.element.parentElement,w&&w.nodeName.toLowerCase()==="pre"&&!w.hasAttribute("tabindex")&&w.setAttribute("tabindex","0"),!b.code){o.hooks.run("complete",b),m&&m.call(b.element);return}if(o.hooks.run("before-highlight",b),!b.grammar){L(o.util.encode(b.code));return}if(d&&t.Worker){var P=new Worker(o.filename);P.onmessage=function(B){L(B.data)},P.postMessage(JSON.stringify({language:b.language,code:b.code,immediateClose:!0}))}else L(o.highlight(b.code,b.grammar,b.language))},highlight:function(c,d,m){var g={code:c,grammar:d,language:m};if(o.hooks.run("before-tokenize",g),!g.grammar)throw new Error('The language "'+g.language+'" has no grammar.');return g.tokens=o.tokenize(g.code,g.grammar),o.hooks.run("after-tokenize",g),_.stringify(o.util.encode(g.tokens),g.language)},tokenize:function(c,d){var m=d.rest;if(m){for(var g in m)d[g]=m[g];delete d.rest}var $=new I;return y($,$.head,c),D(c,$,d,$.head,0),T($)},hooks:{all:{},add:function(c,d){var m=o.hooks.all;m[c]=m[c]||[],m[c].push(d)},run:function(c,d){var m=o.hooks.all[c];if(!(!m||!m.length))for(var g=0,$;$=m[g++];)$(d)}},Token:_};t.Prism=o;function _(c,d,m,g){this.type=c,this.content=d,this.alias=m,this.length=(g||"").length|0}_.stringify=function c(d,m){if(typeof d=="string")return d;if(Array.isArray(d)){var g="";return d.forEach(function(L){g+=c(L,m)}),g}var $={type:d.type,content:c(d.content,m),tag:"span",classes:["token",d.type],attributes:{},language:m},w=d.alias;w&&(Array.isArray(w)?Array.prototype.push.apply($.classes,w):$.classes.push(w)),o.hooks.run("wrap",$);var A="";for(var b in $.attributes)A+=" "+b+'="'+($.attributes[b]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+A+">"+$.content+""};function C(c,d,m,g){c.lastIndex=d;var $=c.exec(m);if($&&g&&$[1]){var w=$[1].length;$.index+=w,$[0]=$[0].slice(w)}return $}function D(c,d,m,g,$,w){for(var A in m)if(!(!m.hasOwnProperty(A)||!m[A])){var b=m[A];b=Array.isArray(b)?b:[b];for(var L=0;L=w.reach);Y+=U.value.length,U=U.next){var J=U.value;if(d.length>c.length)return;if(!(J instanceof _)){var fe=1,ye;if(H){if(ye=C(G,Y,c,M),!ye||ye.index>=c.length)break;var de=ye.index,z=ye.index+ye[0].length,q=Y;for(q+=U.value.length;de>=q;)U=U.next,q+=U.value.length;if(q-=U.value.length,Y=q,U.value instanceof _)continue;for(var Z=U;Z!==d.tail&&(qw.reach&&(w.reach=Ce);var _e=U.prev;we&&(_e=y(d,_e,we),Y+=we.length),S(d,_e,fe);var $e=new _(A,B?o.tokenize(ee,B):ee,j,ee);if(U=y(d,_e,$e),me&&y(d,U,me),fe>1){var he={cause:A+","+L,reach:Ce};D(c,d,m,U.prev,Y,he),w&&he.reach>w.reach&&(w.reach=he.reach)}}}}}}function I(){var c={value:null,prev:null,next:null},d={value:null,prev:c,next:null};c.next=d,this.head=c,this.tail=d,this.length=0}function y(c,d,m){var g=d.next,$={value:m,prev:d,next:g};return d.next=$,g.prev=$,c.length++,$}function S(c,d,m){for(var g=d.next,$=0;$/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,l){var a={};a["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[l]},a.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:a}};o["language-"+l]={pattern:/[\s\S]+/,inside:n.languages[l]};var _={};_[r]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:o},n.languages.insertBefore("markup","cdata",_)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(t,r){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:n.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(t){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var l=t.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var t="Loading…",r=function(N,k){return"✖ Error "+N+" while fetching file: "+k},l="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",_="loading",C="loaded",D="failed",I="pre[data-src]:not(["+o+'="'+C+'"]):not(['+o+'="'+_+'"])';function y(N,k,E){var c=new XMLHttpRequest;c.open("GET",N,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status<400&&c.responseText?k(c.responseText):c.status>=400?E(r(c.status,c.statusText)):E(l))},c.send(null)}function S(N){var k=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(N||"");if(k){var E=Number(k[1]),c=k[2],d=k[3];return c?d?[E,Number(d)]:[E,void 0]:[E,E]}}n.hooks.add("before-highlightall",function(N){N.selector+=", "+I}),n.hooks.add("before-sanity-check",function(N){var k=N.element;if(k.matches(I)){N.code="",k.setAttribute(o,_);var E=k.appendChild(document.createElement("CODE"));E.textContent=t;var c=k.getAttribute("data-src"),d=N.language;if(d==="none"){var m=(/\.(\w+)$/.exec(c)||[,"none"])[1];d=a[m]||m}n.util.setLanguage(E,d),n.util.setLanguage(k,d);var g=n.plugins.autoloader;g&&g.loadLanguages(d),y(c,function($){k.setAttribute(o,C);var w=S(k.getAttribute("data-range"));if(w){var A=$.split(/\r\n?|\n/g),b=w[0],L=w[1]==null?A.length:w[1];b<0&&(b+=A.length),b=Math.max(0,Math.min(b-1,A.length)),L<0&&(L+=A.length),L=Math.max(0,Math.min(L,A.length)),$=A.slice(b,L).join(` +`),k.hasAttribute("data-start")||k.setAttribute("data-start",String(b+1))}E.textContent=$,n.highlightElement(E)},function($){k.setAttribute(o,D),E.textContent=$})}}),n.plugins.fileHighlight={highlight:function(k){for(var E=(k||document).querySelectorAll(I),c=0,d;d=E[c++];)n.highlightElement(d)}};var T=!1;n.fileHighlight=function(){T||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),T=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Hn);var Xr=Hn.exports;const ct=Wr(Xr);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(s){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},t={bash:n,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};s.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:t.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:t.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=s.languages.bash;for(var r=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],l=t.variable[1].inside,a=0;a0||s[9]||s[1])&&_n(s),U=s[9]&&bn(s),Y=s[1]&&vn(s),J=!s[1]&&s[8].length===0&&yn(s),fe=bt(s[8]);const ye=z=>z[79].id;for(let z=0;z0||z[9]||z[1]?G?(G.p(z,q),q[0]&770&&x(G,1)):(G=_n(z),G.c(),x(G,1),G.m(D,null)):G&&(lt(),F(G,1,1,()=>{G=null}),rt()),z[9]?U?(U.p(z,q),q[0]&512&&x(U,1)):(U=bn(z),U.c(),x(U,1),U.m(g,$)):U&&(lt(),F(U,1,1,()=>{U=null}),rt()),z[1]?Y?(Y.p(z,q),q[0]&2&&x(Y,1)):(Y=vn(z),Y.c(),x(Y,1),Y.m(g,w)):Y&&(lt(),F(Y,1,1,()=>{Y=null}),rt()),!z[1]&&z[8].length===0?J?J.p(z,q):(J=yn(z),J.c(),J.m(g,A)):J&&(J.d(1),J=null),q[0]&256|q[1]&544&&(fe=bt(z[8]),lt(),b=Bn(b,q,ye,1,z,fe,L,g,zn,$n,null,dn),rt())},i(z){if(!P){x(G),x(U),x(Y);for(let q=0;qBilling ⤴',le,G,U,Y='

Voice

',J,fe,ye,z,q='
+
Clone your voice
(coming soon)
',Z,de,ee,we,me,Ce="Exaggeration",_e,$e,he=s[12].toFixed(2)+"",Fe,ze,Se,pt,xe,ft="None Exaggerated",dt,Be,Je,Me,ot="Stability",yt,Xe,st=s[13].toFixed(2)+"",gt,kt,Ae,Qe,Ve,Tt="More stable More variable",et,tt,it;const O=[ll,rl],X=[];function ue(W,ce){return W[7]?0:1}T=ue(s),N=X[T]=O[T](s);let ke=s[10]&&En(s),Ie=bt(s[24]),Ee=[];for(let W=0;WF(be[W],1,1,()=>{be[W]=null});return{c(){e=p("div"),n=p("div"),t=p("div"),r=p("textarea"),l=R(),a=p("div"),o=p("div"),_=p("span"),D=re(C),I=re(" / 5,000 characters"),y=R(),S=p("button"),N.c(),E=R(),ke&&ke.c(),c=R(),d=p("div"),m=p("div"),g=p("h3"),g.textContent=$,w=R(),A=p("button"),b=p("span");for(let W=0;W{X[Ne]=null}),rt(),N=X[T],N||(N=X[T]=O[T](W),N.c()),x(N,1),N.m(S,null)),(!et||ce[0]&132&&k!==(k=W[7]||!W[2].trim()))&&(S.disabled=k),W[10]?ke?(ke.p(W,ce),ce[0]&1024&&x(ke,1)):(ke=En(W),ke.c(),x(ke,1),ke.m(n,null)):ke&&(lt(),F(ke,1,1,()=>{ke=null}),rt()),ce[0]&16777232){Ie=bt(W[24]);let te;for(te=0;tes[58](L,B,M),z=()=>s[58](null,B,M);function q(){return s[59](s[79],s[80],s[81])}return{c(){e=p("div"),n=p("div"),t=p("div"),r=p("div"),l=p("button"),o.c(),_=R(),C=p("div"),D=p("div"),y=re(I),S=R(),T=p("div"),N=re("Duration: "),E=re(k),c=R(),d=p("div"),m=p("button"),ie(g.$$.fragment),$=R(),w=p("button"),ie(A.$$.fragment),b=R(),L=p("audio"),this.h()},l(Z){e=h(Z,"DIV",{class:!0});var de=v(e);n=h(de,"DIV",{class:!0});var ee=v(n);t=h(ee,"DIV",{class:!0});var we=v(t);r=h(we,"DIV",{class:!0});var me=v(r);l=h(me,"BUTTON",{class:!0});var Ce=v(l);o.l(Ce),Ce.forEach(f),_=V(me),C=h(me,"DIV",{class:!0});var _e=v(C);D=h(_e,"DIV",{class:!0});var $e=v(D);y=ne($e,I),$e.forEach(f),S=V(_e),T=h(_e,"DIV",{class:!0});var he=v(T);N=ne(he,"Duration: "),E=ne(he,k),he.forEach(f),_e.forEach(f),me.forEach(f),c=V(we),d=h(we,"DIV",{class:!0});var Fe=v(d);m=h(Fe,"BUTTON",{class:!0,title:!0});var ze=v(m);oe(g.$$.fragment,ze),ze.forEach(f),$=V(Fe),w=h(Fe,"BUTTON",{class:!0,title:!0});var Se=v(w);oe(A.$$.fragment,Se),Se.forEach(f),Fe.forEach(f),we.forEach(f),b=V(ee),L=h(ee,"AUDIO",{src:!0,class:!0}),v(L).forEach(f),ee.forEach(f),de.forEach(f),this.h()},h(){u(l,"class","w-10 h-10 bg-gradient-to-r from-amber-500 to-orange-500 rounded-full flex items-center justify-center text-white hover:from-amber-600 hover:to-orange-600 transition-colors shadow-md"),u(D,"class","text-sm font-medium text-gray-900 truncate"),u(T,"class","text-xs text-gray-500"),u(C,"class","flex-1"),u(r,"class","flex items-center gap-3 flex-1"),u(m,"class","p-2 hover:bg-gray-100 rounded-lg transition-colors"),u(m,"title","Download"),u(w,"class","p-2 hover:bg-gray-100 rounded-lg transition-colors"),u(w,"title","Share"),u(d,"class","flex items-center gap-1"),u(t,"class","flex items-center justify-between"),Gt(L.src,P=s[79].result.url)||u(L,"src",P),u(L,"class","hidden"),u(n,"class","bg-white rounded-lg border border-gray-200 p-4 shadow-sm"),u(e,"class","bg-gradient-to-b from-gray-50 to-white p-4")},m(Z,de){ge(Z,e,de),i(e,n),i(n,t),i(t,r),i(r,l),U[a].m(l,null),i(r,_),i(r,C),i(C,D),i(D,y),i(C,S),i(C,T),i(T,N),i(T,E),i(t,c),i(t,d),i(d,m),ae(g,m,null),i(d,$),i(d,w),ae(A,w,null),i(n,b),i(n,L),ye(),H=!0,j||(le=[pe(l,"click",J),pe(m,"click",fe),pe(L,"ended",q)],j=!0)},p(Z,de){s=Z;let ee=a;a=Y(s),a!==ee&&(lt(),F(U[ee],1,1,()=>{U[ee]=null}),rt(),o=U[a],o||(o=U[a]=G[a](s),o.c()),x(o,1),o.m(l,null)),(!H||de[0]&256)&&I!==(I=(s[79].result.title||"Generated Audio")+"")&&Oe(y,I),(!H||de[0]&256)&&k!==(k=Ln(s[79].result.duration||0)+"")&&Oe(E,k),(!H||de[0]&256&&!Gt(L.src,P=s[79].result.url))&&u(L,"src",P),(B!==s[80]||M!==s[81])&&(z(),B=s[80],M=s[81],ye())},i(Z){H||(x(o),x(g.$$.fragment,Z),x(A.$$.fragment,Z),H=!0)},o(Z){F(o),F(g.$$.fragment,Z),F(A.$$.fragment,Z),H=!1},d(Z){Z&&f(e),U[a].d(),se(g),se(A),z(),j=!1,vt(le)}}}function tl(s){let e,n;return e=new Ut({props:{size:18,class:"ml-0.5"}}),{c(){ie(e.$$.fragment)},l(t){oe(e.$$.fragment,t)},m(t,r){ae(e,t,r),n=!0},i(t){n||(x(e.$$.fragment,t),n=!0)},o(t){F(e.$$.fragment,t),n=!1},d(t){se(e,t)}}}function nl(s){let e,n;return e=new Rn({props:{size:18}}),{c(){ie(e.$$.fragment)},l(t){oe(e.$$.fragment,t)},m(t,r){ae(e,t,r),n=!0},i(t){n||(x(e.$$.fragment,t),n=!0)},o(t){F(e.$$.fragment,t),n=!1},d(t){se(e,t)}}}function $n(s,e){let n,t,r,l,a,o=e[81]+1+"",_,C,D,I,y,S,T,N,k,E=ct.highlight(e[79].code,ct.languages.python,"python")+"",c,d,m,g,$;I=new Ht({props:{size:14,class:"text-gray-600"}});function w(){return e[55](e[79])}let A=e[79].result&&e[79].result.type==="audio"&&wn(e);return{key:s,first:null,c(){n=p("div"),t=p("div"),r=p("div"),l=p("span"),a=re("Cell "),_=re(o),C=R(),D=p("button"),ie(I.$$.fragment),y=R(),S=p("div"),T=p("pre"),N=p("code"),k=new Zt(!1),c=R(),A&&A.c(),d=R(),this.h()},l(b){n=h(b,"DIV",{class:!0});var L=v(n);t=h(L,"DIV",{class:!0});var P=v(t);r=h(P,"DIV",{class:!0});var B=v(r);l=h(B,"SPAN",{class:!0});var M=v(l);a=ne(M,"Cell "),_=ne(M,o),M.forEach(f),C=V(B),D=h(B,"BUTTON",{class:!0,title:!0});var H=v(D);oe(I.$$.fragment,H),H.forEach(f),B.forEach(f),y=V(P),S=h(P,"DIV",{class:!0});var j=v(S);T=h(j,"PRE",{class:!0});var le=v(T);N=h(le,"CODE",{class:!0});var G=v(N);k=Kt(G,!1),G.forEach(f),le.forEach(f),j.forEach(f),P.forEach(f),c=V(L),A&&A.l(L),d=V(L),L.forEach(f),this.h()},h(){u(l,"class","text-sm font-medium text-gray-700"),u(D,"class","p-1.5 hover:bg-gray-200 rounded transition-colors"),u(D,"title","Copy code"),u(r,"class","flex items-center justify-between px-4 py-2 bg-gray-50 border-b border-gray-100"),k.a=null,u(N,"class","language-python text-sm"),u(T,"class","p-4 overflow-x-auto bg-gray-50"),u(S,"class","relative"),u(t,"class","border-b border-gray-200"),u(n,"class","bg-white rounded-lg border border-gray-200 overflow-hidden shadow-sm"),this.first=n},m(b,L){ge(b,n,L),i(n,t),i(t,r),i(r,l),i(l,a),i(l,_),i(r,C),i(r,D),ae(I,D,null),i(t,y),i(t,S),i(S,T),i(T,N),k.m(E,N),i(n,c),A&&A.m(n,null),i(n,d),m=!0,g||($=pe(D,"click",w),g=!0)},p(b,L){e=b,(!m||L[0]&256)&&o!==(o=e[81]+1+"")&&Oe(_,o),(!m||L[0]&256)&&E!==(E=ct.highlight(e[79].code,ct.languages.python,"python")+"")&&k.p(E),e[79].result&&e[79].result.type==="audio"?A?(A.p(e,L),L[0]&256&&x(A,1)):(A=wn(e),A.c(),x(A,1),A.m(n,d)):A&&(lt(),F(A,1,1,()=>{A=null}),rt())},i(b){m||(x(I.$$.fragment,b),x(A),m=!0)},o(b){F(I.$$.fragment,b),F(A),m=!1},d(b){b&&f(n),se(I),A&&A.d(),g=!1,$()}}}function rl(s){let e,n,t;return e=new Ut({props:{size:20}}),{c(){ie(e.$$.fragment),n=re(` + Generate speech`)},l(r){oe(e.$$.fragment,r),n=ne(r,` + Generate speech`)},m(r,l){ae(e,r,l),ge(r,n,l),t=!0},i(r){t||(x(e.$$.fragment,r),t=!0)},o(r){F(e.$$.fragment,r),t=!1},d(r){r&&f(n),se(e,r)}}}function ll(s){let e,n,t;return e=new gr({props:{size:20,class:"animate-spin"}}),{c(){ie(e.$$.fragment),n=re(` + Generating...`)},l(r){oe(e.$$.fragment,r),n=ne(r,` + Generating...`)},m(r,l){ae(e,r,l),ge(r,n,l),t=!0},i(r){t||(x(e.$$.fragment,r),t=!0)},o(r){F(e.$$.fragment,r),t=!1},d(r){r&&f(n),se(e,r)}}}function En(s){let e,n,t,r,l,a,o,_,C,D,I,y,S,T,N,k,E,c="Share",d,m,g,$="Download",w,A,b,L,P,B,M,H,j,le,G=It(s[15])+"",U,Y,J,fe,ye,z,q=It(s[16])+"",Z,de,ee,we,me,Ce,_e,$e,he,Fe,ze,Se,pt,xe,ft,dt=It(s[15])+"",Be,Je,Me,ot,yt,Xe,st=It(s[16])+"",gt,kt,Ae,Qe,Ve,Tt,et,tt,it,O,X,ue,ke,Ie,Ee,De;N=new Yt({props:{size:14,class:"text-gray-600"}}),A=new Xt({props:{size:14,class:"text-gray-600"}});const mt=[al,sl],be=[];function zt(K,Te){return K[14]?0:1}B=zt(s),M=be[B]=mt[B](s),me=new Vr({props:{size:20,class:"text-gray-600"}});const W=[il,ol],ce=[];function Ne(K,Te){return K[14]?0:1}$e=Ne(s),he=ce[$e]=W[$e](s),Se=new zr({props:{size:20,class:"text-gray-600"}}),Ve=new Yt({props:{size:14}}),it=new Xt({props:{size:16,class:"text-gray-600"}}),ue=new _r({props:{size:16,class:"text-gray-600"}});let te=s[10]&&Sn(s);return{c(){e=p("div"),n=p("div"),t=p("div"),r=R(),l=p("div"),a=p("h3"),o=re(s[17]),_=R(),C=p("p"),D=re(s[3]),I=re(" • Created 1 second ago"),y=R(),S=p("div"),T=p("button"),ie(N.$$.fragment),k=R(),E=p("span"),E.textContent=c,d=R(),m=p("button"),g=p("span"),g.textContent=$,w=R(),ie(A.$$.fragment),b=R(),L=p("div"),P=p("button"),M.c(),H=R(),j=p("div"),le=p("span"),U=re(G),Y=R(),J=p("div"),fe=p("div"),ye=R(),z=p("span"),Z=re(q),de=R(),ee=p("div"),we=p("button"),ie(me.$$.fragment),Ce=R(),_e=p("button"),he.c(),Fe=R(),ze=p("button"),ie(Se.$$.fragment),pt=R(),xe=p("div"),ft=p("span"),Be=re(dt),Je=R(),Me=p("div"),ot=p("div"),yt=R(),Xe=p("span"),gt=re(st),kt=R(),Ae=p("div"),Qe=p("button"),ie(Ve.$$.fragment),Tt=re(` + Share`),et=R(),tt=p("button"),ie(it.$$.fragment),O=R(),X=p("button"),ie(ue.$$.fragment),ke=R(),te&&te.c(),this.h()},l(K){e=h(K,"DIV",{class:!0});var Te=v(e);n=h(Te,"DIV",{class:!0});var nt=v(n);t=h(nt,"DIV",{class:!0}),v(t).forEach(f),r=V(nt),l=h(nt,"DIV",{class:!0});var ht=v(l);a=h(ht,"H3",{class:!0});var wt=v(a);o=ne(wt,s[17]),wt.forEach(f),_=V(ht),C=h(ht,"P",{class:!0});var ut=v(C);D=ne(ut,s[3]),I=ne(ut," • Created 1 second ago"),ut.forEach(f),ht.forEach(f),y=V(nt),S=h(nt,"DIV",{class:!0});var $t=v(S);T=h($t,"BUTTON",{class:!0});var Nt=v(T);oe(N.$$.fragment,Nt),k=V(Nt),E=h(Nt,"SPAN",{class:!0,"data-svelte-h":!0}),Pe(E)!=="svelte-hbn8gl"&&(E.textContent=c),Nt.forEach(f),d=V($t),m=h($t,"BUTTON",{class:!0});var Et=v(m);g=h(Et,"SPAN",{class:!0,"data-svelte-h":!0}),Pe(g)!=="svelte-h01aeg"&&(g.textContent=$),w=V(Et),oe(A.$$.fragment,Et),Et.forEach(f),$t.forEach(f),nt.forEach(f),b=V(Te),L=h(Te,"DIV",{class:!0});var St=v(L);P=h(St,"BUTTON",{class:!0});var Ct=v(P);M.l(Ct),Ct.forEach(f),H=V(St),j=h(St,"DIV",{class:!0});var at=v(j);le=h(at,"SPAN",{class:!0});var xt=v(le);U=ne(xt,G),xt.forEach(f),Y=V(at),J=h(at,"DIV",{class:!0});var Mt=v(J);fe=h(Mt,"DIV",{class:!0,style:!0}),v(fe).forEach(f),Mt.forEach(f),ye=V(at),z=h(at,"SPAN",{class:!0});var At=v(z);Z=ne(At,q),At.forEach(f),at.forEach(f),St.forEach(f),de=V(Te),ee=h(Te,"DIV",{class:!0});var Ye=v(ee);we=h(Ye,"BUTTON",{class:!0,title:!0});var Vt=v(we);oe(me.$$.fragment,Vt),Vt.forEach(f),Ce=V(Ye),_e=h(Ye,"BUTTON",{class:!0});var _t=v(_e);he.l(_t),_t.forEach(f),Fe=V(Ye),ze=h(Ye,"BUTTON",{class:!0,title:!0});var Jt=v(ze);oe(Se.$$.fragment,Jt),Jt.forEach(f),pt=V(Ye),xe=h(Ye,"DIV",{class:!0});var Pt=v(xe);ft=h(Pt,"SPAN",{class:!0});var Qt=v(ft);Be=ne(Qt,dt),Qt.forEach(f),Je=V(Pt),Me=h(Pt,"DIV",{class:!0});var en=v(Me);ot=h(en,"DIV",{class:!0,style:!0}),v(ot).forEach(f),en.forEach(f),yt=V(Pt),Xe=h(Pt,"SPAN",{class:!0});var tn=v(Xe);gt=ne(tn,st),tn.forEach(f),Pt.forEach(f),kt=V(Ye),Ae=h(Ye,"DIV",{class:!0});var Ot=v(Ae);Qe=h(Ot,"BUTTON",{class:!0});var qt=v(Qe);oe(Ve.$$.fragment,qt),Tt=ne(qt,` + Share`),qt.forEach(f),et=V(Ot),tt=h(Ot,"BUTTON",{class:!0,title:!0});var nn=v(tt);oe(it.$$.fragment,nn),nn.forEach(f),O=V(Ot),X=h(Ot,"BUTTON",{class:!0,title:!0});var rn=v(X);oe(ue.$$.fragment,rn),rn.forEach(f),Ot.forEach(f),Ye.forEach(f),ke=V(Te),te&&te.l(Te),Te.forEach(f),this.h()},h(){u(t,"class","w-2 h-2 bg-green-500 rounded-full"),u(a,"class","font-medium text-gray-900 text-sm"),u(C,"class","text-xs text-gray-500"),u(l,"class","flex-1"),u(E,"class","text-gray-700"),u(T,"class","flex items-center gap-1.5 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50 transition-colors"),u(g,"class","text-gray-700"),u(m,"class","flex items-center gap-1.5 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50 transition-colors"),u(S,"class","flex items-center gap-2"),u(n,"class","flex items-center gap-3 mb-4"),u(P,"class","w-8 h-8 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),u(le,"class","text-xs text-gray-500 font-mono"),u(fe,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Rt(fe,"width",s[15]/s[16]*100+"%"),u(J,"class","flex-1 h-1 bg-gray-200 rounded-full cursor-pointer"),u(z,"class","text-xs text-gray-500 font-mono"),u(j,"class","flex-1 flex items-center gap-2"),u(L,"class","flex items-center gap-3 mb-4"),u(we,"class","p-2 hover:bg-gray-100 rounded-full"),u(we,"title","Skip back"),u(_e,"class","w-12 h-12 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),u(ze,"class","p-2 hover:bg-gray-100 rounded-full"),u(ze,"title","Skip forward"),u(ft,"class","text-xs text-gray-500 font-mono"),u(ot,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Rt(ot,"width",s[15]/s[16]*100+"%"),u(Me,"class","flex-1 h-1 bg-gray-200 rounded-full"),u(Xe,"class","text-xs text-gray-500 font-mono"),u(xe,"class","flex-1 flex items-center gap-3"),u(Qe,"class","flex items-center gap-2 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50"),u(tt,"class","p-2 hover:bg-gray-100 rounded-md"),u(tt,"title","Download"),u(X,"class","p-2 hover:bg-gray-100 rounded-md"),u(X,"title","More options"),u(Ae,"class","flex items-center gap-2"),u(ee,"class","flex items-center gap-4 mb-4"),u(e,"class","p-4 border border-gray-200 rounded-lg bg-white")},m(K,Te){ge(K,e,Te),i(e,n),i(n,t),i(n,r),i(n,l),i(l,a),i(a,o),i(l,_),i(l,C),i(C,D),i(C,I),i(n,y),i(n,S),i(S,T),ae(N,T,null),i(T,k),i(T,E),i(S,d),i(S,m),i(m,g),i(m,w),ae(A,m,null),i(e,b),i(e,L),i(L,P),be[B].m(P,null),i(L,H),i(L,j),i(j,le),i(le,U),i(j,Y),i(j,J),i(J,fe),i(j,ye),i(j,z),i(z,Z),i(e,de),i(e,ee),i(ee,we),ae(me,we,null),i(ee,Ce),i(ee,_e),ce[$e].m(_e,null),i(ee,Fe),i(ee,ze),ae(Se,ze,null),i(ee,pt),i(ee,xe),i(xe,ft),i(ft,Be),i(xe,Je),i(xe,Me),i(Me,ot),i(xe,yt),i(xe,Xe),i(Xe,gt),i(ee,kt),i(ee,Ae),i(Ae,Qe),ae(Ve,Qe,null),i(Qe,Tt),i(Ae,et),i(Ae,tt),ae(it,tt,null),i(Ae,O),i(Ae,X),ae(ue,X,null),i(e,ke),te&&te.m(e,null),Ie=!0,Ee||(De=[pe(T,"click",On),pe(m,"click",s[32]),pe(P,"click",s[27]),pe(_e,"click",s[27]),pe(Qe,"click",On),pe(tt,"click",s[32])],Ee=!0)},p(K,Te){(!Ie||Te[0]&131072)&&Oe(o,K[17]),(!Ie||Te[0]&8)&&Oe(D,K[3]);let nt=B;B=zt(K),B!==nt&&(lt(),F(be[nt],1,1,()=>{be[nt]=null}),rt(),M=be[B],M||(M=be[B]=mt[B](K),M.c()),x(M,1),M.m(P,null)),(!Ie||Te[0]&32768)&&G!==(G=It(K[15])+"")&&Oe(U,G),(!Ie||Te[0]&98304)&&Rt(fe,"width",K[15]/K[16]*100+"%"),(!Ie||Te[0]&65536)&&q!==(q=It(K[16])+"")&&Oe(Z,q);let ht=$e;$e=Ne(K),$e!==ht&&(lt(),F(ce[ht],1,1,()=>{ce[ht]=null}),rt(),he=ce[$e],he||(he=ce[$e]=W[$e](K),he.c()),x(he,1),he.m(_e,null)),(!Ie||Te[0]&32768)&&dt!==(dt=It(K[15])+"")&&Oe(Be,dt),(!Ie||Te[0]&98304)&&Rt(ot,"width",K[15]/K[16]*100+"%"),(!Ie||Te[0]&65536)&&st!==(st=It(K[16])+"")&&Oe(gt,st),K[10]?te?te.p(K,Te):(te=Sn(K),te.c(),te.m(e,null)):te&&(te.d(1),te=null)},i(K){Ie||(x(N.$$.fragment,K),x(A.$$.fragment,K),x(M),x(me.$$.fragment,K),x(he),x(Se.$$.fragment,K),x(Ve.$$.fragment,K),x(it.$$.fragment,K),x(ue.$$.fragment,K),Ie=!0)},o(K){F(N.$$.fragment,K),F(A.$$.fragment,K),F(M),F(me.$$.fragment,K),F(he),F(Se.$$.fragment,K),F(Ve.$$.fragment,K),F(it.$$.fragment,K),F(ue.$$.fragment,K),Ie=!1},d(K){K&&f(e),se(N),se(A),be[B].d(),se(me),ce[$e].d(),se(Se),se(Ve),se(it),se(ue),te&&te.d(),Ee=!1,vt(De)}}}function sl(s){let e,n;return e=new Ut({props:{size:14,class:"text-white ml-0.5"}}),{c(){ie(e.$$.fragment)},l(t){oe(e.$$.fragment,t)},m(t,r){ae(e,t,r),n=!0},i(t){n||(x(e.$$.fragment,t),n=!0)},o(t){F(e.$$.fragment,t),n=!1},d(t){se(e,t)}}}function al(s){let e;return{c(){e=p("div"),this.h()},l(n){e=h(n,"DIV",{class:!0}),v(e).forEach(f),this.h()},h(){u(e,"class","pause-filled text-white")},m(n,t){ge(n,e,t)},i:Ft,o:Ft,d(n){n&&f(e)}}}function ol(s){let e,n;return e=new Ut({props:{size:20,class:"text-white ml-0.5"}}),{c(){ie(e.$$.fragment)},l(t){oe(e.$$.fragment,t)},m(t,r){ae(e,t,r),n=!0},i(t){n||(x(e.$$.fragment,t),n=!0)},o(t){F(e.$$.fragment,t),n=!1},d(t){se(e,t)}}}function il(s){let e;return{c(){e=p("div"),this.h()},l(n){e=h(n,"DIV",{class:!0}),v(e).forEach(f),this.h()},h(){u(e,"class","pause-filled text-white scale-150")},m(n,t){ge(n,e,t)},i:Ft,o:Ft,d(n){n&&f(e)}}}function Sn(s){let e,n,t,r;return{c(){e=p("audio"),this.h()},l(l){e=h(l,"AUDIO",{src:!0,style:!0}),v(e).forEach(f),this.h()},h(){Gt(e.src,n=s[10])||u(e,"src",n),Rt(e,"display","none")},m(l,a){ge(l,e,a),s[44](e),t||(r=[pe(e,"loadedmetadata",s[28]),pe(e,"timeupdate",s[29]),pe(e,"play",s[30]),pe(e,"pause",s[31])],t=!0)},p(l,a){a[0]&1024&&!Gt(e.src,n=l[10])&&u(e,"src",n)},d(l){l&&f(e),s[44](null),t=!1,vt(r)}}}function An(s){let e=s[74].name+"",n,t,r=s[74].badge&&ul(s);return{c(){n=re(e),r&&r.c(),t=Dt()},l(l){n=ne(l,e),r&&r.l(l),t=Dt()},m(l,a){ge(l,n,a),r&&r.m(l,a),ge(l,t,a)},p(l,a){l[74].badge&&r.p(l,a)},d(l){l&&(f(n),f(t)),r&&r.d(l)}}}function ul(s){let e,n,t,r=s[74].badge+"",l,a;return{c(){e=re(" "),n=p("span"),t=re("("),l=re(r),a=re(")"),this.h()},l(o){e=ne(o," "),n=h(o,"SPAN",{class:!0});var _=v(n);t=ne(_,"("),l=ne(_,r),a=ne(_,")"),_.forEach(f),this.h()},h(){u(n,"class","text-xs text-gray-500")},m(o,_){ge(o,e,_),ge(o,n,_),i(n,t),i(n,l),i(n,a)},p:Ft,d(o){o&&(f(e),f(n))}}}function Tn(s){let e,n=s[74].name===s[4]&&An(s);return{c(){n&&n.c(),e=Dt()},l(t){n&&n.l(t),e=Dt()},m(t,r){n&&n.m(t,r),ge(t,e,r)},p(t,r){t[74].name===t[4]?n?n.p(t,r):(n=An(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){t&&f(e),n&&n.d(t)}}}function In(s){let e,n=bt(s[24]),t=[];for(let r=0;r{b[j]=null}),rt(),c=b[E],c||(c=b[E]=A[E](s),c.c()),x(c,1),c.m(k,null)),(!g||H[0]&8&&m!==(m="w-full flex items-center justify-between p-2 rounded-lg hover:bg-gray-50 transition-colors text-left group border border-transparent "+(s[71].name===s[3]?"bg-gray-100 border-gray-200":"")))&&u(e,"class",m)},i(M){g||(x(c),g=!0)},o(M){F(c),g=!1},d(M){M&&f(e),b[E].d(),$=!1,vt(w)}}}function Cn(s){let e,n;return{c(){e=p("div"),n=re(s[11]),this.h()},l(t){e=h(t,"DIV",{class:!0});var r=v(e);n=ne(r,s[11]),r.forEach(f),this.h()},h(){u(e,"class","fixed bottom-4 right-4 px-4 py-2 bg-gray-900 text-white rounded-lg shadow-lg z-50 animate-fade-in svelte-u8edqi")},m(t,r){ge(t,e,r),i(e,n)},p(t,r){r[0]&2048&&Oe(n,t[11])},d(t){t&&f(e)}}}function xn(s){let e,n,t,r,l,a,o,_,C,D,I,y,S="An error occurred while processing your request",T,N,k,E,c,d,m,g,$,w,A,b,L="Close",P,B,M;a=new Yn({props:{size:20,class:"text-red-600"}}),k=new qr({props:{size:20,class:"text-gray-500"}});let H=s[22]&&Fn(s);return $=new Ht({props:{size:16}}),{c(){e=p("div"),n=p("div"),t=p("div"),r=p("div"),l=p("div"),ie(a.$$.fragment),o=R(),_=p("div"),C=p("h3"),D=re(s[21]),I=R(),y=p("p"),y.textContent=S,T=R(),N=p("button"),ie(k.$$.fragment),E=R(),c=p("div"),H&&H.c(),d=R(),m=p("div"),g=p("button"),ie($.$$.fragment),w=re(` + Copy Error`),A=R(),b=p("button"),b.textContent=L,this.h()},l(j){e=h(j,"DIV",{class:!0});var le=v(e);n=h(le,"DIV",{class:!0});var G=v(n);t=h(G,"DIV",{class:!0});var U=v(t);r=h(U,"DIV",{class:!0});var Y=v(r);l=h(Y,"DIV",{class:!0});var J=v(l);oe(a.$$.fragment,J),J.forEach(f),o=V(Y),_=h(Y,"DIV",{class:!0});var fe=v(_);C=h(fe,"H3",{class:!0});var ye=v(C);D=ne(ye,s[21]),ye.forEach(f),I=V(fe),y=h(fe,"P",{class:!0,"data-svelte-h":!0}),Pe(y)!=="svelte-1l3zl3"&&(y.textContent=S),fe.forEach(f),Y.forEach(f),T=V(U),N=h(U,"BUTTON",{class:!0,title:!0});var z=v(N);oe(k.$$.fragment,z),z.forEach(f),U.forEach(f),E=V(G),c=h(G,"DIV",{class:!0});var q=v(c);H&&H.l(q),q.forEach(f),d=V(G),m=h(G,"DIV",{class:!0});var Z=v(m);g=h(Z,"BUTTON",{class:!0});var de=v(g);oe($.$$.fragment,de),w=ne(de,` + Copy Error`),de.forEach(f),A=V(Z),b=h(Z,"BUTTON",{class:!0,"data-svelte-h":!0}),Pe(b)!=="svelte-1nyppew"&&(b.textContent=L),Z.forEach(f),G.forEach(f),le.forEach(f),this.h()},h(){u(l,"class","w-10 h-10 bg-red-100 rounded-full flex items-center justify-center flex-shrink-0"),u(C,"class","text-lg font-semibold text-gray-900 truncate"),u(y,"class","text-sm text-gray-600"),u(_,"class","min-w-0"),u(r,"class","flex items-center gap-3 min-w-0"),u(N,"class","p-2 hover:bg-red-100 rounded-full transition-colors flex-shrink-0"),u(N,"title","Close"),u(t,"class","flex items-center justify-between p-6 border-b border-gray-200 bg-red-50 flex-shrink-0"),u(c,"class","p-6 overflow-y-auto flex-1 min-h-0"),u(g,"class","flex items-center gap-2 px-4 py-2 text-gray-700 hover:bg-gray-200 rounded-lg transition-colors"),u(b,"class","px-6 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors"),u(m,"class","flex items-center justify-end gap-3 p-6 border-t border-gray-200 bg-gray-50 flex-shrink-0"),u(n,"class","bg-white rounded-xl shadow-2xl max-w-2xl w-full max-h-[80vh] flex flex-col"),u(e,"class","fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4")},m(j,le){ge(j,e,le),i(e,n),i(n,t),i(t,r),i(r,l),ae(a,l,null),i(r,o),i(r,_),i(_,C),i(C,D),i(_,I),i(_,y),i(t,T),i(t,N),ae(k,N,null),i(n,E),i(n,c),H&&H.m(c,null),i(n,d),i(n,m),i(m,g),ae($,g,null),i(g,w),i(m,A),i(m,b),P=!0,B||(M=[pe(N,"click",s[37]),pe(g,"click",s[38]),pe(b,"click",s[37])],B=!0)},p(j,le){(!P||le[0]&2097152)&&Oe(D,j[21]),j[22]?H?H.p(j,le):(H=Fn(j),H.c(),H.m(c,null)):H&&(H.d(1),H=null)},i(j){P||(x(a.$$.fragment,j),x(k.$$.fragment,j),x($.$$.fragment,j),P=!0)},o(j){F(a.$$.fragment,j),F(k.$$.fragment,j),F($.$$.fragment,j),P=!1},d(j){j&&f(e),se(a),se(k),H&&H.d(),se($),B=!1,vt(M)}}}function Fn(s){let e,n,t="Error Details:",r,l,a;return{c(){e=p("div"),n=p("h4"),n.textContent=t,r=R(),l=p("pre"),a=re(s[22]),this.h()},l(o){e=h(o,"DIV",{class:!0});var _=v(e);n=h(_,"H4",{class:!0,"data-svelte-h":!0}),Pe(n)!=="svelte-3lmggt"&&(n.textContent=t),r=V(_),l=h(_,"PRE",{class:!0});var C=v(l);a=ne(C,s[22]),C.forEach(f),_.forEach(f),this.h()},h(){u(n,"class","text-sm font-medium text-gray-900 mb-2"),u(l,"class","text-xs text-gray-700 whitespace-pre-wrap font-mono leading-relaxed break-words"),u(e,"class","bg-gray-50 rounded-lg p-4 border")},m(o,_){ge(o,e,_),i(e,n),i(e,r),i(e,l),i(l,a)},p(o,_){_[0]&4194304&&Oe(a,o[22])},d(o){o&&f(e)}}}function gl(s){let e,n,t,r,l,a,o,_,C,D,I,y,S,T,N,k,E,c,d,m,g,$;o=new kr({props:{size:14}}),y=new rr({props:{size:14}});let w=s[8].length>0&&mn(s);const A=[Kr,Yr],b=[];function L(M,H){return M[5]==="ui"?0:1}k=L(s),E=b[k]=A[k](s);let P=s[11]&&Cn(s),B=s[20]&&xn(s);return{c(){e=p("div"),n=p("header"),t=p("div"),r=p("div"),l=p("div"),a=p("button"),ie(o.$$.fragment),_=re(` + UI`),D=R(),I=p("button"),ie(y.$$.fragment),S=re(` + Code Recorder + `),w&&w.c(),N=R(),E.c(),c=R(),P&&P.c(),d=R(),B&&B.c(),this.h()},l(M){e=h(M,"DIV",{class:!0});var H=v(e);n=h(H,"HEADER",{class:!0});var j=v(n);t=h(j,"DIV",{class:!0});var le=v(t);r=h(le,"DIV",{class:!0});var G=v(r);l=h(G,"DIV",{class:!0});var U=v(l);a=h(U,"BUTTON",{class:!0});var Y=v(a);oe(o.$$.fragment,Y),_=ne(Y,` + UI`),Y.forEach(f),D=V(U),I=h(U,"BUTTON",{class:!0});var J=v(I);oe(y.$$.fragment,J),S=ne(J,` + Code Recorder + `),w&&w.l(J),J.forEach(f),U.forEach(f),G.forEach(f),le.forEach(f),j.forEach(f),N=V(H),E.l(H),c=V(H),P&&P.l(H),d=V(H),B&&B.l(H),H.forEach(f),this.h()},h(){u(a,"class",C="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(s[5]==="ui"?"bg-white shadow-sm":"text-gray-600")),u(I,"class",T="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative "+(s[5]==="code"?"bg-white shadow-sm":"text-gray-600")),u(l,"class","flex items-center bg-gray-100 rounded-md p-0.5"),u(r,"class","flex items-center gap-2"),u(t,"class","flex items-center justify-end px-4 py-2"),u(n,"class","border-b border-gray-200 bg-white"),u(e,"class","flex flex-col h-full")},m(M,H){ge(M,e,H),i(e,n),i(n,t),i(t,r),i(r,l),i(l,a),ae(o,a,null),i(a,_),i(l,D),i(l,I),ae(y,I,null),i(I,S),w&&w.m(I,null),i(e,N),b[k].m(e,null),i(e,c),P&&P.m(e,null),i(e,d),B&&B.m(e,null),m=!0,g||($=[pe(a,"click",s[41]),pe(I,"click",s[42]),pe(e,"click",s[34])],g=!0)},p(M,H){(!m||H[0]&32&&C!==(C="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(M[5]==="ui"?"bg-white shadow-sm":"text-gray-600")))&&u(a,"class",C),M[8].length>0?w?w.p(M,H):(w=mn(M),w.c(),w.m(I,null)):w&&(w.d(1),w=null),(!m||H[0]&32&&T!==(T="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative "+(M[5]==="code"?"bg-white shadow-sm":"text-gray-600")))&&u(I,"class",T);let j=k;k=L(M),k===j?b[k].p(M,H):(lt(),F(b[j],1,1,()=>{b[j]=null}),rt(),E=b[k],E?E.p(M,H):(E=b[k]=A[k](M),E.c()),x(E,1),E.m(e,c)),M[11]?P?P.p(M,H):(P=Cn(M),P.c(),P.m(e,d)):P&&(P.d(1),P=null),M[20]?B?(B.p(M,H),H[0]&1048576&&x(B,1)):(B=xn(M),B.c(),x(B,1),B.m(e,null)):B&&(lt(),F(B,1,1,()=>{B=null}),rt())},i(M){m||(x(o.$$.fragment,M),x(y.$$.fragment,M),x(E),x(B),m=!0)},o(M){F(o.$$.fragment,M),F(y.$$.fragment,M),F(E),F(B),m=!1},d(M){M&&f(e),se(o),se(y),w&&w.d(),b[k].d(),P&&P.d(),B&&B.d(),g=!1,vt($)}}}function Pn(){if(typeof window<"u"&&window.gradio&&window.gradio.auth_token)return window.gradio.auth_token;const s=document.querySelector('meta[name="hf-oauth-token"]');if(s){const t=s.getAttribute("content");if(t)return t}const e=["hf_access_token","hf_token","huggingface_token","oauth_token","access_token"];for(const t of e){const r=localStorage.getItem(t);if(r)return r}for(const t of e){const r=sessionStorage.getItem(t);if(r)return r}const n=document.cookie.split(";");for(const t of n){const[r,l]=t.trim().split("=");if(r&&(r.includes("token")||r.includes("hf")||r.includes("oauth")))return decodeURIComponent(l)}try{const t=document.querySelector("script[data-hf-token]");if(t){const r=t.getAttribute("data-hf-token");if(r)return r}}catch{}return null}function It(s){const e=Math.floor(s/60),n=Math.floor(s%60);return`${e}:${n.toString().padStart(2,"0")}`}function On(){}function hl(s,e){const n=document.createElement("a");n.href=s,n.download=`${e||"audio"}.wav`,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Ln(s){if(!s)return"0:00";const e=Math.floor(s/60),n=Math.floor(s%60);return`${e}:${n.toString().padStart(2,"0")}`}function pl(s,e,n){let t="In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.",r="Lily",l="Chatterbox",a="api",o="ui",_=!1,C=!1,D=[],I=ee(),y=null,S=null,T=null,N=.25,k=.7,E=!1,c=0,d=0,m="",g=null,$=null,w=null,A=!1,b="",L="",P=null;const B=[{id:"chatterbox",name:"Chatterbox",badge:"recommended"},{id:"kokoro",name:"Kokoro",badge:"coming soon",disabled:!0}],M=[{id:"lily",name:"Lily",description:"Warm, conversational voice from a female in her 30s",sample:"/voices/lily.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/lily.mp3"},{id:"andrew",name:"Andrew",description:"Older British man who speaks clearly and kindly",sample:"/voices/andrew.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/andrew.mp3"},{id:"fairy",name:"Fairy",description:"High and airy female voice that bursts with excitement",sample:"/voices/fairy.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/fairy.mp3"},{id:"pirate",name:"Pirate",description:"Young pirate that speaks gruffly and passionately",sample:"/voices/pirate.mp3",preview_url:"https://huggingface.co/spaces/abidlabs/hfstudio/resolve/main/frontend/static/voices/pirate.mp3"}];async function H(){if(!t.trim())return;if(!Pn()){window.dispatchEvent(new CustomEvent("show-signin-popover"));return}n(7,C=!0),n(10,S=null),n(15,c=0),y||n(1,y=me());const X=Ce();n(14,E=!1),n(17,m=t.length>30?t.substring(0,30)+"...":t);try{const ue=Pn(),ke={text:t,voice_id:r.toLowerCase(),model_id:l.toLowerCase(),mode:a,access_token:ue,parameters:{exaggeration:N,temperature:k}},Ie=await fetch("/api/tts/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!Ie.ok){const De=await Ie.text();throw new Error(`HTTP error! status: ${Ie.status}, body: ${De}`)}const Ee=await Ie.json();if(Ee.success&&Ee.audio_url)n(10,S=Ee.audio_url),z(X,{type:"audio",url:Ee.audio_url,title:m,duration:Ee.duration}),o==="ui"&&setTimeout(()=>{g&&g.play().catch(()=>{})},100);else{const De=Ee.error||"Unknown error occurred";$e("Generation Failed",De),n(10,S=null)}}catch{$e("Network Error","Failed to connect to the server. Please check your connection and try again."),n(10,S=null)}finally{n(7,C=!1)}}function j(){g&&(E?g.pause():g.play())}function le(){g&&n(16,d=g.duration)}function G(){g&&n(15,c=g.currentTime)}function U(){n(14,E=!0)}function Y(){n(14,E=!1)}function J(){if(S){const O=document.createElement("a");O.href=S,O.download="speech.wav",O.click()}}function fe(O,X){if(X.stopPropagation(),w===O.name)$&&($.pause(),$.currentTime=0),n(19,w=null);else{$&&$.pause(),n(19,w=O.name);const ue=O.sample||"/samples/harvard.wav";$?$.src=ue:($=new Audio(ue),$.addEventListener("ended",()=>{n(19,w=null)})),$.play().catch(ke=>{n(19,w=null)})}}function ye(O){O.target.closest(".model-dropdown")||n(6,_=!1)}function z(O,X=null){const ue={id:Date.now()+Math.random(),code:O,result:X};return n(8,D=[...D,ue]),q(),ue}function q(){if(!P)return;const O=`hfstudio_history_${P}`,X={username:P,setupCode:I,importCode:y,history:D};localStorage.setItem(O,JSON.stringify(X))}function Z(){if(!P)return;const O=`hfstudio_history_${P}`,X=localStorage.getItem(O);if(X)try{const ue=JSON.parse(X);ue.username===P&&(n(9,I=ee()),n(1,y=ue.importCode||null),n(8,D=ue.history||[]))}catch(ue){console.error("Error loading history:",ue)}}function de(){if(n(8,D=[]),n(9,I=ee()),n(1,y=null),P){const O=`hfstudio_history_${P}`;localStorage.removeItem(O)}}function ee(){return a==="local"?`pip install huggingface-hub hfstudio uv +hfstudio start ${l.toLowerCase()} --port 7861`:"pip install huggingface-hub"}function we(){return a==="local"?'client = InferenceClient(base_url="http://localhost:7861/api/v1")':`client = InferenceClient( + api_key="YOUR_HF_TOKEN", # Get your token from https://huggingface.co/settings/tokens + model="${l.toLowerCase()==="chatterbox"?"ResembleAI/chatterbox":l.toLowerCase()}", +)`}function me(){const O=we();return a==="local"?`from huggingface_hub import InferenceClient + +${O}`:`from huggingface_hub import InferenceClient + +${O}`}function Ce(){const O=M.find(ue=>ue.name===r),X=(O==null?void 0:O.preview_url)||(O==null?void 0:O.sample);return a==="local"?`text = """${t}""" + +# audio is in bytes format +audio = client.text_to_speech( + text, + extra_body={ + "audio_url": "${X}", + "exaggeration": ${N}, + "temperature": ${k} + } +)`:`text = """${t}""" + +# audio is in bytes format +audio = client.text_to_speech( + text, + extra_body={ + "audio_url": "${X}", + "exaggeration": ${N}, + "temperature": ${k} + } +)`}function _e(O,X="Copied to clipboard!"){navigator.clipboard.writeText(O).then(()=>{n(11,T=X),setTimeout(()=>{n(11,T=null)},2e3)})}function $e(O,X=""){n(21,b=O),n(22,L=X),n(20,A=!0)}function he(){n(20,A=!1),n(21,b=""),n(22,L="")}function Fe(){const O=L?`${b} + +Details: +${L}`:b;_e(O,"Error message copied!")}function ze(){const O=[];if(I){const ke=I.includes("pip install")||I.includes("hfstudio start")?"bash":"";O.push(`## Setup (Run in Terminal) + +\`\`\`${ke} +${I} +\`\`\``)}y&&O.push(`## Imports (Python) + +\`\`\`python +${y} +\`\`\``),D.forEach((ue,ke)=>{O.push(`## Cell ${ke+1} + +\`\`\`python +${ue.code} +\`\`\``)});const X=O.join(` + +`);_e(X,"All code copied as Markdown!")}Un(()=>{const O=()=>{const X=localStorage.getItem("hf_access_token");X&&Se(X)};O(),window.addEventListener("storage",X=>{X.key==="hf_access_token"&&O()})});async function Se(O){try{const X=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${O}`}});if(X.ok){const ue=await X.json();n(23,P=ue.name||ue.fullname||ue.login||ue.username||"User"),Z()}}catch(X){console.error("Error fetching user info:",X)}}function pt(O){O.audioElement||(O.audioElement=new Audio(O.result.url),O.audioElement.addEventListener("ended",()=>{O.isPlaying=!1,n(8,D=[...D])})),O.isPlaying?(O.audioElement.pause(),O.isPlaying=!1):(D.forEach(X=>{X!==O&&X.isPlaying&&X.audioElement&&(X.audioElement.pause(),X.isPlaying=!1)}),O.audioElement.play(),O.isPlaying=!0),n(8,D=[...D])}const xe=()=>n(5,o="ui"),ft=()=>n(5,o="code");function dt(){t=this.value,n(2,t)}function Be(O){sn[O?"unshift":"push"](()=>{g=O,n(18,g)})}const Je=()=>n(6,_=!_),Me=O=>{O.disabled||(n(4,l=O.name),n(6,_=!1))},ot=(O,X)=>fe(O,X),yt=O=>n(3,r=O.name);function Xe(){N=an(this.value),n(12,N)}function st(){k=an(this.value),n(13,k)}const gt=()=>n(0,a="api"),kt=()=>n(0,a="local"),Ae=()=>_e(I),Qe=()=>_e(y),Ve=O=>_e(O.code),Tt=O=>pt(O),et=O=>hl(O.result.url,O.result.title);function tt(O,X,ue){sn[O?"unshift":"push"](()=>{X[ue].audioElement=O,n(8,D)})}const it=(O,X,ue)=>n(8,X[ue].isPlaying=!1,D);return s.$$.update=()=>{s.$$.dirty[0]&3&&a&&(n(9,I=ee()),y&&n(1,y=me()))},[a,y,t,r,l,o,_,C,D,I,S,T,N,k,E,c,d,m,g,w,A,b,L,P,B,M,H,j,le,G,U,Y,J,fe,ye,de,_e,he,Fe,ze,pt,xe,ft,dt,Be,Je,Me,ot,yt,Xe,st,gt,kt,Ae,Qe,Ve,Tt,et,tt,it]}class bl extends Re{constructor(e){super(),He(this,e,pl,gl,Le,{},null,[-1,-1,-1])}}export{bl as component};