GitHub Action
commited on
Commit
·
7b8563d
1
Parent(s):
01cf23e
Sync from GitHub: 66a7002ce67b36480422033a80270412b21f5553
Browse files- .gitattributes +6 -0
- frontend/src/routes/+page.svelte +140 -4
- frontend/vite.config.js +8 -1
- hfstudio/server.py +80 -31
- hfstudio/static/_app/immutable/chunks/BjLLwVl5.js +3 -0
- hfstudio/static/_app/immutable/chunks/DHiQh_KC.js +1 -0
- hfstudio/static/_app/immutable/entry/app.xcR2Llsq.js +2 -0
- hfstudio/static/_app/immutable/entry/start.BW3Wd3PX.js +1 -0
- hfstudio/static/_app/immutable/nodes/1.D0DlLN_q.js +1 -0
- hfstudio/static/_app/immutable/nodes/2.CSt1XReV.js +16 -0
- hfstudio/static/_app/immutable/nodes/3.Dy9JpshT.js +1 -0
- pyproject.toml +4 -0
.gitattributes
CHANGED
|
@@ -7,3 +7,9 @@
|
|
| 7 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.pdf filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
hfstudio/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
hfstudio/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
frontend/static/assets/hf-studio-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
frontend/static/assets/hf-logo.png filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
hfstudio/static/samples/harvard.wav filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
frontend/static/samples/harvard.wav filter=lfs diff=lfs merge=lfs -text
|
frontend/src/routes/+page.svelte
CHANGED
|
@@ -46,11 +46,147 @@ That evening, there was a knock at the door. A little girl stood there, eyes wid
|
|
| 46 |
// Create title from first part of text
|
| 47 |
audioTitle = text.length > 30 ? text.substring(0, 30) + '...' : text;
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
isGenerating = false;
|
| 53 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
|
| 56 |
function togglePlayPause() {
|
|
|
|
| 46 |
// Create title from first part of text
|
| 47 |
audioTitle = text.length > 30 ? text.substring(0, 30) + '...' : text;
|
| 48 |
|
| 49 |
+
try {
|
| 50 |
+
// Get OAuth token from browser storage or handle authentication
|
| 51 |
+
const accessToken = getAccessToken();
|
| 52 |
+
console.log('Access token for API call:', accessToken ? 'Found (' + accessToken.substring(0, 10) + '...)' : 'None');
|
| 53 |
+
|
| 54 |
+
const requestBody = {
|
| 55 |
+
text: text,
|
| 56 |
+
voice_id: selectedVoice.toLowerCase(),
|
| 57 |
+
model_id: selectedModel.toLowerCase(),
|
| 58 |
+
mode: mode,
|
| 59 |
+
access_token: accessToken,
|
| 60 |
+
parameters: {
|
| 61 |
+
speed: speed,
|
| 62 |
+
stability: stability,
|
| 63 |
+
similarity: similarity,
|
| 64 |
+
style_exaggeration: styleExaggeration
|
| 65 |
+
}
|
| 66 |
+
};
|
| 67 |
+
|
| 68 |
+
console.log('Sending request to /api/tts/generate:', requestBody);
|
| 69 |
+
|
| 70 |
+
const response = await fetch('/api/tts/generate', {
|
| 71 |
+
method: 'POST',
|
| 72 |
+
headers: {
|
| 73 |
+
'Content-Type': 'application/json',
|
| 74 |
+
},
|
| 75 |
+
body: JSON.stringify(requestBody)
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
console.log('API response status:', response.status);
|
| 79 |
+
|
| 80 |
+
if (!response.ok) {
|
| 81 |
+
const errorText = await response.text();
|
| 82 |
+
console.error('API error response:', errorText);
|
| 83 |
+
throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
const result = await response.json();
|
| 87 |
+
console.log('API response result:', result);
|
| 88 |
+
|
| 89 |
+
if (result.success && result.audio_url) {
|
| 90 |
+
audioUrl = result.audio_url;
|
| 91 |
+
} else {
|
| 92 |
+
// Show error message to user
|
| 93 |
+
const errorMessage = result.error || 'Unknown error occurred';
|
| 94 |
+
alert(`❌ ${errorMessage}`);
|
| 95 |
+
audioUrl = null;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
} catch (error) {
|
| 99 |
+
console.error('Error generating speech:', error);
|
| 100 |
+
alert('❌ Network error: Failed to connect to the server');
|
| 101 |
+
audioUrl = null;
|
| 102 |
+
} finally {
|
| 103 |
isGenerating = false;
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
function getAccessToken() {
|
| 108 |
+
console.log('Getting access token...');
|
| 109 |
+
|
| 110 |
+
// For HuggingFace Spaces, check if we can access the global hf object
|
| 111 |
+
if (typeof window !== 'undefined' && window.gradio && window.gradio.auth_token) {
|
| 112 |
+
console.log('Found Gradio auth token:', window.gradio.auth_token.substring(0, 10) + '...');
|
| 113 |
+
return window.gradio.auth_token;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
// Check for HF OAuth token in meta tags (common in HF Spaces)
|
| 117 |
+
const metaToken = document.querySelector('meta[name="hf-oauth-token"]');
|
| 118 |
+
if (metaToken) {
|
| 119 |
+
const token = metaToken.getAttribute('content');
|
| 120 |
+
if (token) {
|
| 121 |
+
console.log('Found token in meta tag:', token.substring(0, 10) + '...');
|
| 122 |
+
return token;
|
| 123 |
+
}
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
// Try multiple possible token storage locations
|
| 127 |
+
const possibleKeys = [
|
| 128 |
+
'hf_access_token',
|
| 129 |
+
'hf_token',
|
| 130 |
+
'huggingface_token',
|
| 131 |
+
'oauth_token',
|
| 132 |
+
'access_token'
|
| 133 |
+
];
|
| 134 |
+
|
| 135 |
+
for (const key of possibleKeys) {
|
| 136 |
+
const token = localStorage.getItem(key);
|
| 137 |
+
if (token) {
|
| 138 |
+
console.log(`Found token in localStorage['${key}']:`, token.substring(0, 10) + '...');
|
| 139 |
+
return token;
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
// Also check sessionStorage
|
| 144 |
+
for (const key of possibleKeys) {
|
| 145 |
+
const token = sessionStorage.getItem(key);
|
| 146 |
+
if (token) {
|
| 147 |
+
console.log(`Found token in sessionStorage['${key}']:`, token.substring(0, 10) + '...');
|
| 148 |
+
return token;
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
// Check if there's a token in cookies (for Spaces)
|
| 153 |
+
const cookies = document.cookie.split(';');
|
| 154 |
+
for (const cookie of cookies) {
|
| 155 |
+
const [name, value] = cookie.trim().split('=');
|
| 156 |
+
if (name && (name.includes('token') || name.includes('hf') || name.includes('oauth'))) {
|
| 157 |
+
console.log(`Found potential token in cookie '${name}':`, value ? value.substring(0, 10) + '...' : 'empty');
|
| 158 |
+
return decodeURIComponent(value);
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
// Try to get it from fetch headers if available in the environment
|
| 163 |
+
try {
|
| 164 |
+
const authHeader = document.querySelector('script[data-hf-token]');
|
| 165 |
+
if (authHeader) {
|
| 166 |
+
const token = authHeader.getAttribute('data-hf-token');
|
| 167 |
+
if (token) {
|
| 168 |
+
console.log('Found token in script data attribute:', token.substring(0, 10) + '...');
|
| 169 |
+
return token;
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
} catch (e) {
|
| 173 |
+
// Ignore errors
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
console.log('No OAuth token found in any storage location');
|
| 177 |
+
console.log('Available localStorage keys:', Object.keys(localStorage));
|
| 178 |
+
console.log('Available sessionStorage keys:', Object.keys(sessionStorage));
|
| 179 |
+
console.log('Available cookies:', document.cookie);
|
| 180 |
+
console.log('Available global objects:', {
|
| 181 |
+
window: typeof window,
|
| 182 |
+
gradio: typeof window?.gradio,
|
| 183 |
+
hf: typeof window?.hf,
|
| 184 |
+
huggingface: typeof window?.huggingface
|
| 185 |
+
});
|
| 186 |
+
console.log('URL search params:', new URLSearchParams(window.location.search).toString());
|
| 187 |
+
console.log('All meta tags:', Array.from(document.getElementsByTagName('meta')).map(m => ({name: m.name, content: m.content?.substring(0, 20) + '...'})));
|
| 188 |
+
|
| 189 |
+
return null;
|
| 190 |
}
|
| 191 |
|
| 192 |
function togglePlayPause() {
|
frontend/vite.config.js
CHANGED
|
@@ -5,6 +5,13 @@ export default defineConfig({
|
|
| 5 |
plugins: [sveltekit()],
|
| 6 |
server: {
|
| 7 |
port: 11111,
|
| 8 |
-
host: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
});
|
|
|
|
| 5 |
plugins: [sveltekit()],
|
| 6 |
server: {
|
| 7 |
port: 11111,
|
| 8 |
+
host: true,
|
| 9 |
+
proxy: {
|
| 10 |
+
'/api': {
|
| 11 |
+
target: 'http://localhost:7860',
|
| 12 |
+
changeOrigin: true,
|
| 13 |
+
secure: false
|
| 14 |
+
}
|
| 15 |
+
}
|
| 16 |
}
|
| 17 |
});
|
hfstudio/server.py
CHANGED
|
@@ -11,6 +11,7 @@ import soundfile as sf
|
|
| 11 |
import httpx
|
| 12 |
import os
|
| 13 |
from pathlib import Path
|
|
|
|
| 14 |
|
| 15 |
app = FastAPI(title="HFStudio API", version="0.1.0")
|
| 16 |
|
|
@@ -27,7 +28,13 @@ if static_dir.exists():
|
|
| 27 |
# Configure CORS
|
| 28 |
app.add_middleware(
|
| 29 |
CORSMiddleware,
|
| 30 |
-
allow_origins=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
allow_credentials=True,
|
| 32 |
allow_methods=["*"],
|
| 33 |
allow_headers=["*"],
|
|
@@ -40,11 +47,14 @@ class TTSRequest(BaseModel):
|
|
| 40 |
model_id: str = "coqui-tts"
|
| 41 |
parameters: Dict[str, Any] = {}
|
| 42 |
mode: str = "api" # "api" or "local"
|
|
|
|
| 43 |
|
| 44 |
class TTSResponse(BaseModel):
|
| 45 |
-
audio_url: str
|
| 46 |
-
duration: float
|
| 47 |
format: str = "wav"
|
|
|
|
|
|
|
| 48 |
|
| 49 |
class Voice(BaseModel):
|
| 50 |
id: str
|
|
@@ -106,36 +116,75 @@ async def get_models():
|
|
| 106 |
@app.post("/api/tts/generate")
|
| 107 |
async def generate_tts(request: TTSRequest):
|
| 108 |
try:
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
t = np.linspace(0, duration, int(sample_rate * duration))
|
| 113 |
|
| 114 |
-
#
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
except Exception as e:
|
| 140 |
raise HTTPException(status_code=500, detail=str(e))
|
| 141 |
|
|
|
|
| 11 |
import httpx
|
| 12 |
import os
|
| 13 |
from pathlib import Path
|
| 14 |
+
from huggingface_hub import InferenceClient
|
| 15 |
|
| 16 |
app = FastAPI(title="HFStudio API", version="0.1.0")
|
| 17 |
|
|
|
|
| 28 |
# Configure CORS
|
| 29 |
app.add_middleware(
|
| 30 |
CORSMiddleware,
|
| 31 |
+
allow_origins=[
|
| 32 |
+
"http://localhost:7860",
|
| 33 |
+
"http://localhost:11111",
|
| 34 |
+
"http://localhost:11112", # Add the current frontend port
|
| 35 |
+
"http://localhost:3000",
|
| 36 |
+
"*" # Allow all origins for Spaces deployment
|
| 37 |
+
],
|
| 38 |
allow_credentials=True,
|
| 39 |
allow_methods=["*"],
|
| 40 |
allow_headers=["*"],
|
|
|
|
| 47 |
model_id: str = "coqui-tts"
|
| 48 |
parameters: Dict[str, Any] = {}
|
| 49 |
mode: str = "api" # "api" or "local"
|
| 50 |
+
access_token: Optional[str] = None
|
| 51 |
|
| 52 |
class TTSResponse(BaseModel):
|
| 53 |
+
audio_url: Optional[str] = None
|
| 54 |
+
duration: Optional[float] = None
|
| 55 |
format: str = "wav"
|
| 56 |
+
error: Optional[str] = None
|
| 57 |
+
success: bool = True
|
| 58 |
|
| 59 |
class Voice(BaseModel):
|
| 60 |
id: str
|
|
|
|
| 116 |
@app.post("/api/tts/generate")
|
| 117 |
async def generate_tts(request: TTSRequest):
|
| 118 |
try:
|
| 119 |
+
print(f"Received TTS request: mode={request.mode}, has_token={bool(request.access_token)}")
|
| 120 |
+
if request.access_token:
|
| 121 |
+
print(f"Token preview: {request.access_token[:10]}...")
|
|
|
|
| 122 |
|
| 123 |
+
# Check if we have an access token for API mode
|
| 124 |
+
if request.mode == "api" and request.access_token:
|
| 125 |
+
print("Using Chatterbox API...")
|
| 126 |
+
try:
|
| 127 |
+
# Use Chatterbox API via HuggingFace InferenceClient
|
| 128 |
+
client = InferenceClient(
|
| 129 |
+
provider="fal-ai",
|
| 130 |
+
api_key=request.access_token,
|
| 131 |
+
)
|
| 132 |
+
|
| 133 |
+
print(f"Calling text_to_speech with text: '{request.text[:50]}...'")
|
| 134 |
+
|
| 135 |
+
# Generate audio using Chatterbox
|
| 136 |
+
audio_bytes = client.text_to_speech(
|
| 137 |
+
request.text,
|
| 138 |
+
model="ResembleAI/chatterbox",
|
| 139 |
+
)
|
| 140 |
+
|
| 141 |
+
print(f"Received audio bytes: {len(audio_bytes)} bytes")
|
| 142 |
+
|
| 143 |
+
# Convert audio bytes to base64 for data URL
|
| 144 |
+
audio_base64 = base64.b64encode(audio_bytes).decode('utf-8')
|
| 145 |
+
audio_url = f"data:audio/wav;base64,{audio_base64}"
|
| 146 |
+
|
| 147 |
+
# Estimate duration (rough calculation)
|
| 148 |
+
duration = len(request.text) * 0.05 # ~0.05 seconds per character
|
| 149 |
+
|
| 150 |
+
print("Successfully generated audio via Chatterbox API")
|
| 151 |
+
return TTSResponse(
|
| 152 |
+
audio_url=audio_url,
|
| 153 |
+
duration=duration,
|
| 154 |
+
format="wav"
|
| 155 |
+
)
|
| 156 |
+
except Exception as api_error:
|
| 157 |
+
error_str = str(api_error)
|
| 158 |
+
print(f"Chatterbox API error: {error_str}")
|
| 159 |
+
|
| 160 |
+
# Provide specific error messages based on the error type
|
| 161 |
+
if "403 Forbidden" in error_str and "permissions" in error_str:
|
| 162 |
+
return TTSResponse(
|
| 163 |
+
success=False,
|
| 164 |
+
error="Your HuggingFace token doesn't have permission to use Inference Providers. Please create a new token with 'Inference API' permissions at https://huggingface.co/settings/tokens"
|
| 165 |
+
)
|
| 166 |
+
elif "authentication" in error_str.lower():
|
| 167 |
+
return TTSResponse(
|
| 168 |
+
success=False,
|
| 169 |
+
error="Authentication failed. Please check your HuggingFace token or log in again."
|
| 170 |
+
)
|
| 171 |
+
else:
|
| 172 |
+
return TTSResponse(
|
| 173 |
+
success=False,
|
| 174 |
+
error=f"Chatterbox API error: {error_str}"
|
| 175 |
+
)
|
| 176 |
|
| 177 |
+
# No token provided
|
| 178 |
+
if request.mode == "api":
|
| 179 |
+
return TTSResponse(
|
| 180 |
+
success=False,
|
| 181 |
+
error="Please log in to HuggingFace to use the Chatterbox API."
|
| 182 |
+
)
|
| 183 |
+
else:
|
| 184 |
+
return TTSResponse(
|
| 185 |
+
success=False,
|
| 186 |
+
error="Local mode not yet implemented."
|
| 187 |
+
)
|
| 188 |
except Exception as e:
|
| 189 |
raise HTTPException(status_code=500, detail=str(e))
|
| 190 |
|
hfstudio/static/_app/immutable/chunks/BjLLwVl5.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var St=Object.defineProperty;var Et=(e,t,n)=>t in e?St(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>Et(e,typeof t!="symbol"?t+"":t,n);import{S as At,F as Rt,Y as Tt,Z as Ut,_ as It,$ as Lt,a0 as xt,a1 as $t,r as ve,a2 as Ct,G as be,n as ge,s as Pt}from"./9DiovRey.js";class Qe extends At{constructor(n){if(!n||!n.target&&!n.$$inline)throw new Error("'target' is a required option");super();R(this,"$$prop_def");R(this,"$$events_def");R(this,"$$slot_def")}$destroy(){super.$destroy(),this.$destroy=()=>{console.warn("Component was already destroyed")}}$capture_state(){}$inject_state(){}}class Ot extends Qe{}const Nt=Object.freeze(Object.defineProperty({__proto__:null,SvelteComponent:Qe,SvelteComponentTyped:Ot,afterUpdate:Rt,beforeUpdate:Tt,createEventDispatcher:Ut,getAllContexts:It,getContext:Lt,hasContext:xt,onDestroy:$t,onMount:ve,setContext:Ct,tick:be},Symbol.toStringTag,{value:"Module"}));class ce{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class Te extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function jt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Dt(e){return e.split("%25").map(decodeURI).join("%25")}function Ft(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function Bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function Mt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const Vt=new TextDecoder;function qt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Gt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&Y.delete(Ue(e)),Gt(e,t));const Y=new Map;function Yt(e,t){const n=Ue(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=qt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Ht(e,t,n){if(Y.size>0){const r=Ue(e,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(t,n)}function Ue(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Mt(...a)}"]`}return r}const Kt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function zt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Jt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(u=>parseInt(u,16))));const d=Kt.exec(c),[,h,y,f,p]=d;return t.push({name:f,matcher:p,optional:!!h,rest:!!y,chained:y?l===1&&i[0]==="":!1}),y?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return _e(c)}).join("")}).join("")}/?$`),params:t}}function Wt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Jt(e){return e.slice(1).split("/").filter(Wt)}function Xt(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Zt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:h,params:y}=zt(o),f={id:o,exec:p=>{const u=h.exec(p);if(u)return Xt(u,y,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function et(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const D=[];function Ie(e,t=ge){let n;const r=new Set;function a(o){if(Pt(e,o)&&(e=o,n)){const c=!D.length;for(const l of r)l[1](),D.push(l,e);if(c){for(let l=0;l<D.length;l+=2)D[l][0](D[l+1]);D.length=0}}}function s(o){a(o(e))}function i(o,c=ge){const l=[o,c];return r.add(l),r.size===1&&(n=t(a,s)||ge),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}var Xe;const x=((Xe=globalThis.__sveltekit_gdnxkg)==null?void 0:Xe.base)??"";var Ze;const Qt=((Ze=globalThis.__sveltekit_gdnxkg)==null?void 0:Ze.assets)??x??"",en="1760662356698",tt="sveltekit:snapshot",nt="sveltekit:scroll",at="sveltekit:states",tn="sveltekit:pageurl",B="sveltekit:history",z="sveltekit:navigation",O={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Le(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function le(){return{x:pageXOffset,y:pageYOffset}}function F(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...O,"":O.hover};function rt(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function ot(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=rt(e)}}function ke(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||fe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ee(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=F(o,"preload-code")),a===null&&(a=F(o,"preload-data")),t===null&&(t=F(o,"keepfocus")),n===null&&(n=F(o,"noscroll")),s===null&&(s=F(o,"reload")),i===null&&(i=F(o,"replacestate")),o=rt(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function qe(e){const t=Ie(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const st={v:()=>{}};function nn(){const{set:e,subscribe:t}=Ie(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Qt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==en;return i&&(e(!0),st.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function fe(e,t,n){return e.origin!==Z||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function qn(e){}function an(e){const t=on(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function on(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=rn.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const sn=-1,cn=-2,ln=-3,fn=-4,un=-5,dn=-6;function hn(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===sn)return;if(s===ln)return NaN;if(s===fn)return 1/0;if(s===un)return-1/0;if(s===dn)return-0;if(i||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t==null?void 0:t[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let f=1;f<o.length;f+=1)d.add(a(o[f]));break;case"Map":const h=new Map;r[s]=h;for(let f=1;f<o.length;f+=2)h.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const y=Object.create(null);r[s]=y;for(let f=1;f<o.length;f+=2)y[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],p=new f(a(o[1]));r[s]=o[2]!==void 0?p.subarray(o[2],o[3]):p;break}case"ArrayBuffer":{const f=o[1],p=an(f);r[s]=p;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const f=c.slice(9);r[s]=Temporal[f].from(o[1]);break}case"URL":{const f=new URL(o[1]);r[s]=f;break}case"URLSearchParams":{const f=new URLSearchParams(o[1]);r[s]=f;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const d=o[l];d!==cn&&(c[l]=a(d))}}else{const c={};r[s]=c;for(const l in o){if(l==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const d=o[l];c[l]=a(d)}}return r[s]}return a(0)}const it=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...it];const pn=new Set([...it]);[...pn];function gn(e){return e.filter(t=>t!=null)}const mn="x-sveltekit-invalidated",_n="x-sveltekit-trailing-slash";function te(e){return e instanceof ce||e instanceof Te?e.status:500}function wn(e){return e instanceof Te?e.text:"Internal Error"}let T,W,we;const yn=ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(ve.toString());yn?(T={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},we={current:!1}):(T=new class{constructor(){R(this,"data",$state.raw({}));R(this,"form",$state.raw(null));R(this,"error",$state.raw(null));R(this,"params",$state.raw({}));R(this,"route",$state.raw({id:null}));R(this,"state",$state.raw({}));R(this,"status",$state.raw(-1));R(this,"url",$state.raw(new URL("https://example.com")))}},W=new class{constructor(){R(this,"current",$state.raw(null))}},we=new class{constructor(){R(this,"current",$state.raw(!1))}},st.v=()=>we.current=!0);function vn(e){Object.assign(T,e)}const bn="/__data.json",kn=".html__data.json";function Sn(e){return e.endsWith(".html")?e.replace(/\.html$/,kn):e.replace(/\/$/,"")+bn}const Ge={spanContext(){return En},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},En={traceId:"",spanId:"",traceFlags:0},{tick:An}=Nt,Rn=new Set(["icon","shortcut icon","apple-touch-icon"]),j=et(nt)??{},J=et(tt)??{},C={url:qe({}),page:qe({}),navigating:Ie(null),updated:nn()};function xe(e){j[e]=le()}function Tn(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function q(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function ct(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Ye(){}let $e,Se,ne,$,Ee,S;const ae=[],re=[];let I=null;const Q=new Map,lt=new Set,Un=new Set,H=new Set;let b={branch:[],error:null,url:null},Ce=!1,oe=!1,He=!0,X=!1,G=!1,ft=!1,Pe=!1,ut,A,L,N;const K=new Set,Ke=new Map;async function Kn(e,t,n){var s,i,o,c,l;(s=globalThis.__sveltekit_gdnxkg)!=null&&s.data&&globalThis.__sveltekit_gdnxkg.data,document.URL!==location.href&&(location.href=location.href),S=e,await((o=(i=e.hooks).init)==null?void 0:o.call(i)),$e=Zt(e),$=document.documentElement,Ee=t,Se=e.nodes[0],ne=e.nodes[1],Se(),ne(),A=(c=history.state)==null?void 0:c[B],L=(l=history.state)==null?void 0:l[z],A||(A=L=Date.now(),history.replaceState({...history.state,[B]:A,[z]:L},""));const r=j[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await Dn(Ee,n)):(await M({type:"enter",url:Le(S.hash?Bn(new URL(location.href)):location.href),replace_state:!0}),a()),jn()}function In(){ae.length=0,Pe=!1}function dt(e){re.some(t=>t==null?void 0:t.snapshot)&&(J[e]=re.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function ht(e){var t;(t=J[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=re[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ze(){xe(A),Me(nt,j),dt(L),Me(tt,J)}async function pt(e,t,n,r){let a;t.invalidateAll&&(I=null),await M({type:"goto",url:Le(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...Ke.keys()]),t.invalidate&&t.invalidate.forEach(Nn)}}),t.invalidateAll&&be().then(be).then(()=>{Ke.forEach(({resource:s},i)=>{var o;a!=null&&a.includes(i)&&((o=s.refresh)==null||o.call(s))})})}async function Ln(e){if(e.id!==(I==null?void 0:I.id)){const t={};K.add(t),I={id:e.id,token:t,promise:_t({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(I=null),n))}}return I.promise}async function ye(e){var n;const t=(n=await de(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].map(r=>r==null?void 0:r[1]()))}function gt(e,t,n){var a;b=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(T,e.props.page),ut=new S.root({target:t,props:{...e.props,stores:C,components:re},hydrate:n,sync:!1}),ht(L),n){const s={from:null,to:{params:b.params,route:{id:((a=b.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(i=>i(s))}oe=!0}function se({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);e.pathname=jt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:gn(n).map(f=>f.node.component),page:De(T)}};i!==void 0&&(c.props.form=i);let l={},d=!T,h=0;for(let f=0;f<Math.max(n.length,b.branch.length);f+=1){const p=n[f],u=b.branch[f];(p==null?void 0:p.data)!==(u==null?void 0:u.data)&&(d=!0),p&&(l={...l,...p.data},d&&(c.props[`data_${h}`]=l),h+=1)}return(!b.url||e.href!==b.url.href||b.error!==a||i!==void 0&&i!==T.form||d)&&(c.props.page={error:a,params:t,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:i??null,data:d?l:T.data}),c}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){var d,h,y;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if((d=l.universal)!=null&&d.load){let f=function(...u){for(const g of u){const{href:_}=new URL(g,n);c.dependencies.add(_)}};const p={tracing:{enabled:!1,root:Ge,current:Ge},route:new Proxy(a,{get:(u,g)=>(o&&(c.route=!0),u[g])}),params:new Proxy(r,{get:(u,g)=>(o&&c.params.add(g),u[g])}),data:(s==null?void 0:s.data)??null,url:Bt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},S.hash),async fetch(u,g){u instanceof Request&&(g={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u==null?void 0:u.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...g});const{resolved:_,promise:U}=mt(u,g,n);return o&&f(_.href),U},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await l.universal.load.call(null,p)??null}return{node:l,loader:e,server:s,universal:(h=l.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=l.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function mt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=oe?Ht(r,a.href,t):Yt(r,t);return{resolved:a,promise:s}}function We(e,t,n,r,a,s){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==b.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Ne(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function xn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function Je({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:De(T),constructors:[]}}}async function _t({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((I==null?void 0:I.id)===e)return K.delete(I.token),I.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(w=>w==null?void 0:w().catch(()=>{})),l.forEach(w=>w==null?void 0:w[1]().catch(()=>{}));let d=null;const h=b.url?e!==ie(b.url):!1,y=b.route?a.id!==b.route.id:!1,f=xn(b.url,n);let p=!1;const u=l.map((w,m)=>{var P;const v=b.branch[m],k=!!(w!=null&&w[0])&&((v==null?void 0:v.loader)!==w[1]||We(p,y,h,f,(P=v.server)==null?void 0:P.uses,r));return k&&(p=!0),k});if(u.some(Boolean)){try{d=await vt(n,u)}catch(w){const m=await V(w,{url:n,params:r,route:{id:e}});return K.has(s)?Je({error:m,url:n,params:r,route:a}):ue({status:te(w),error:m,url:n,route:a})}if(d.type==="redirect")return d}const g=d==null?void 0:d.nodes;let _=!1;const U=l.map(async(w,m)=>{var he;if(!w)return;const v=b.branch[m],k=g==null?void 0:g[m];if((!k||k.type==="skip")&&w[1]===(v==null?void 0:v.loader)&&!We(_,y,h,f,(he=v.universal)==null?void 0:he.uses,r))return v;if(_=!0,(k==null?void 0:k.type)==="error")throw k;return Oe({loader:w[1],url:n,params:r,route:a,parent:async()=>{var Be;const Fe={};for(let pe=0;pe<m;pe+=1)Object.assign(Fe,(Be=await U[pe])==null?void 0:Be.data);return Fe},server_data_node:Ne(k===void 0&&w[0]?{type:"skip"}:k??null,w[0]?v==null?void 0:v.server:void 0)})});for(const w of U)w.catch(()=>{});const E=[];for(let w=0;w<l.length;w+=1)if(l[w])try{E.push(await U[w])}catch(m){if(m instanceof Re)return{type:"redirect",location:m.location};if(K.has(s))return Je({error:await V(m,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let v=te(m),k;if(g!=null&&g.includes(m))v=m.status??v,k=m.error;else if(m instanceof ce)k=m.body;else{if(await C.updated.check())return await ct(),await q(n);k=await V(m,{params:r,url:n,route:{id:a.id}})}const P=await $n(w,E,i);return P?se({url:n,params:r,branch:E.slice(0,P.idx).concat(P.node),status:v,error:k,route:a}):await yt(n,{id:a.id},k,v)}else E.push(void 0);return se({url:n,params:r,branch:E,status:200,error:null,route:a,form:t?void 0:null})}async function $n(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function ue({status:e,error:t,url:n,route:r}){const a={};let s=null;if(S.server_loads[0]===0)try{const o=await vt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==Z||n.pathname!==location.pathname||Ce)&&await q(n)}try{const o=await Oe({loader:Se,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ne(s)}),c={node:await ne(),loader:ne,universal:null,server:null,data:null};return se({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Re)return pt(new URL(o.location,location.href),{},0);throw o}}async function Cn(e){const t=e.href;if(Q.has(t))return Q.get(t);let n;try{const r=(async()=>{let a=await S.hooks.reroute({url:new URL(e),fetch:async(s,i)=>mt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);S.hash?s.hash=a:s.pathname=a,a=s}return a})();Q.set(t,r),n=await r}catch{Q.delete(t);return}return n}async function de(e,t){if(e&&!fe(e,x,S.hash)){const n=await Cn(e);if(!n)return;const r=Pn(n);for(const a of $e){const s=a.exec(r);if(s)return{id:ie(e),invalidating:t,route:a,params:Ft(s),url:e}}}}function Pn(e){return Dt(S.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ie(e){return(S.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function wt({url:e,type:t,intent:n,delta:r,event:a}){let s=!1;const i=je(b,n,e,t);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const o={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return X||lt.forEach(c=>c(o)),s?null:i}async function M({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=Ye,block:d=Ye,event:h}){const y=N;N=c;const f=await de(t,!1),p=e==="enter"?je(b,f,t,e):wt({url:t,type:e,delta:n==null?void 0:n.delta,intent:f,event:h});if(!p){d(),N===c&&(N=y);return}const u=A,g=L;l(),X=!0,oe&&p.navigation.type!=="enter"&&C.navigating.set(W.current=p.navigation);let _=f&&await _t(f);if(!_){if(fe(t,x,S.hash))return await q(t,s);_=await yt(t,{id:null},await V(new Te(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=(f==null?void 0:f.url)||t,N!==c)return p.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(o<20){await M({type:e,url:new URL(_.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i,redirect_count:o+1,nav_token:c}),p.fulfil(void 0);return}_=await ue({status:500,error:await V(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else _.props.page.status>=400&&await C.updated.check()&&(await ct(),await q(t,s));if(In(),xe(u),dt(g),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const m=s?0:1,v={[B]:A+=m,[z]:L+=m,[at]:i};(s?history.replaceState:history.pushState).call(history,v,"",t),s||Tn(A,L)}if(I=null,_.props.page.state=i,oe){const m=(await Promise.all(Array.from(Un,v=>v(p.navigation)))).filter(v=>typeof v=="function");if(m.length>0){let v=function(){m.forEach(k=>{H.delete(k)})};m.push(v),m.forEach(k=>{H.add(k)})}b=_.state,_.props.page&&(_.props.page.url=t),ut.$set(_.props),vn(_.props.page),ft=!0}else gt(_,Ee,!1);const{activeElement:U}=document;await An();let E=n?n.scroll:a?le():null;if(He){const m=t.hash&&document.getElementById(kt(t));if(E)scrollTo(E.x,E.y);else if(m){m.scrollIntoView();const{top:v,left:k}=m.getBoundingClientRect();E={x:pageXOffset+k,y:pageYOffset+v}}else scrollTo(0,0)}const w=document.activeElement!==U&&document.activeElement!==document.body;!r&&!w&&Fn(t,E),He=!0,_.props.page&&Object.assign(T,_.props.page),X=!1,e==="popstate"&&ht(L),p.fulfil(void 0),H.forEach(m=>m(p.navigation)),C.navigating.set(W.current=null)}async function yt(e,t,n,r,a){return e.origin===Z&&e.pathname===location.pathname&&!Ce?await ue({status:r,error:n,url:e,route:t}):await q(e,a)}function On(){let e,t,n;$.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,O.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],O.tap)}$.addEventListener("mousedown",r),$.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(ye(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=ot(o,$),d=l===t&&c>=n;if(!l||d)return;const{url:h,external:y,download:f}=ke(l,x,S.hash);if(y||f)return;const p=ee(l),u=h&&ie(b.url)===ie(h);if(!(p.reload||u))if(c<=p.preload_data){t=l,n=O.tap;const g=await de(h,!1);if(!g)return;Ln(g)}else c<=p.preload_code&&(t=l,n=c,ye(h))}function i(){a.disconnect();for(const o of $.querySelectorAll("a")){const{url:c,external:l,download:d}=ke(o,x,S.hash);if(l||d)continue;const h=ee(o);h.reload||(h.preload_code===O.viewport&&a.observe(o),h.preload_code===O.eager&&ye(c))}}H.add(i),i()}function V(e,t){if(e instanceof ce)return e.body;const n=te(e),r=wn(e);return S.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function zn(e,t={}){return e=new URL(Le(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):pt(e,t,0)}function Nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function jn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ze(),!X){const a=je(b,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};lt.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),(t=navigator.connection)!=null&&t.saveData||On(),$.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=ot(n.composedPath()[0],$);if(!r)return;const{url:a,external:s,target:i,download:o}=ke(r,x,S.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=ee(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[d,h]=(S.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=d===me(location);if(s||c.reload&&(!y||!h)){wt({url:a,type:"link",event:n})?X=!0:n.preventDefault();return}if(h!==void 0&&y){const[,f]=b.url.href.split("#");if(f===h){if(n.preventDefault(),h===""||h==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const p=r.ownerDocument.getElementById(decodeURIComponent(h));p&&(p.scrollIntoView(),p.focus())}return}if(G=!0,xe(A),e(a),!c.replace_state)return;G=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await M({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href,event:n})}),$.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(fe(o,x,!1))return;const c=n.target,l=ee(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c,a);o.search=new URLSearchParams(d).toString(),M({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Ae){if((r=n.state)!=null&&r[B]){const a=n.state[B];if(N={},a===A)return;const s=j[a],i=n.state[at]??{},o=new URL(n.state[tn]??location.href),c=n.state[z],l=b.url?me(location)===me(b.url):!1;if(c===L&&(ft||l)){i!==T.state&&(T.state=i),e(o),j[A]=le(),s&&scrollTo(s.x,s.y),A=a;return}const h=a-A;await M({type:"popstate",url:o,popped:{state:i,scroll:s,delta:h},accept:()=>{A=a,L=c},block:()=>{history.go(-h)},nav_token:N,event:n})}else if(!G){const a=new URL(location.href);e(a),S.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[B]:++A,[z]:L},"",location.href))});for(const n of document.querySelectorAll("link"))Rn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&C.navigating.set(W.current=null)});function e(n){b.url=T.url=n,C.page.set(De(T)),C.page.notify()}}async function Dn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Ce=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await de(l,!1)||{}),d=$e.find(({id:f})=>f===s.id);let h,y=!0;try{const f=r.map(async(u,g)=>{const _=o[g];return _!=null&&_.uses&&(_.uses=bt(_.uses)),Oe({loader:S.nodes[u],url:l,params:a,route:s,parent:async()=>{const U={};for(let E=0;E<g;E+=1)Object.assign(U,(await f[E]).data);return U},server_data_node:Ne(_)})}),p=await Promise.all(f);if(d){const u=d.layouts;for(let g=0;g<u.length;g++)u[g]||p.splice(g,0,void 0)}h=se({url:l,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(f){if(f instanceof Re){await q(new URL(f.location,location.href));return}h=await ue({status:te(f),error:await V(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",y=!1}h.props.page&&(h.props.page.state={}),gt(h,e,y)}async function vt(e,t){var s;const n=new URL(e);n.pathname=Sn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(_n,"1"),n.searchParams.append(mn,t.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new ce(a.status,i)}return new Promise(async i=>{var h;const o=new Map,c=a.body.getReader();function l(y){return hn(y,{...S.decoders,Promise:f=>new Promise((p,u)=>{o.set(f,{fulfil:p,reject:u})})})}let d="";for(;;){const{done:y,value:f}=await c.read();if(y&&!d)break;for(d+=!f&&d?`
|
| 2 |
+
`:Vt.decode(f,{stream:!0});;){const p=d.indexOf(`
|
| 3 |
+
`);if(p===-1)break;const u=JSON.parse(d.slice(0,p));if(d=d.slice(p+1),u.type==="redirect")return i(u);if(u.type==="data")(h=u.nodes)==null||h.forEach(g=>{(g==null?void 0:g.type)==="data"&&(g.uses=bt(g.uses),g.data=l(g.data))}),i(u);else if(u.type==="chunk"){const{id:g,data:_,error:U}=u,E=o.get(g);o.delete(g),U?E.reject(l(U)):E.fulfil(l(_))}}}})}function bt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}let Ae=!1;function Fn(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=kt(e);if(r&&document.getElementById(r)){const{x:s,y:i}=t??le();setTimeout(()=>{const o=history.state;Ae=!0,location.replace(`#${r}`),S.hash&&location.replace(e.hash),history.replaceState(o,"",e.hash),scrollTo(s,i),Ae=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let i=0;i<a.rangeCount;i+=1)s.push(a.getRangeAt(i));setTimeout(()=>{if(a.rangeCount===s.length){for(let i=0;i<a.rangeCount;i+=1){const o=s[i],c=a.getRangeAt(i);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function je(e,t,n,r){var c,l;let a,s;const i=new Promise((d,h)=>{a=d,s=h});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((l=t==null?void 0:t.route)==null?void 0:l.id)??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function De(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Bn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function kt(e){let t;if(S.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Kn as a,zn as g,qn as l,C as s};
|
hfstudio/static/_app/immutable/chunks/DHiQh_KC.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{s as e}from"./BjLLwVl5.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
|
hfstudio/static/_app/immutable/entry/app.xcR2Llsq.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BWfnr5bB.js","../chunks/9DiovRey.js","../chunks/IHki7fMi.js","../assets/0.DkRYx-5s.css","../nodes/1.D0DlLN_q.js","../chunks/DHiQh_KC.js","../chunks/BjLLwVl5.js","../nodes/2.CSt1XReV.js","../nodes/3.Dy9JpshT.js"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{S as j,i as q,s as B,d,x as h,y as g,C as O,D as A,b as E,h as U,E as w,k as F,F as G,r as H,G as J,H as y,I as P,J as R,K as L,L as C,o as D,M as p,e as K,f as W,j as z,N as I,a as Q,g as X,t as Y}from"../chunks/9DiovRey.js";import"../chunks/IHki7fMi.js";const Z="modulepreload",M=function(o,e){return new URL(o,e).href},N={},S=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(n.map(f=>{if(f=M(f,i),f in N)return;N[f]=!0;const l=f.endsWith(".css"),_=l?'[rel="stylesheet"]':"";if(!!i)for(let k=t.length-1;k>=0;k--){const v=t[k];if(v.href===f&&(!l||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${_}`))return;const m=document.createElement("link");if(m.rel=l?"stylesheet":Z,l||(m.as="script"),m.crossOrigin="",m.href=f,a&&m.setAttribute("nonce",a),document.head.appendChild(m),l)return new Promise((k,v)=>{m.addEventListener("load",k),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function u(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return r.then(t=>{for(const s of t||[])s.status==="rejected"&&u(s.reason);return e().catch(u)})},ae={};function $(o){let e,n,i;var r=o[2][0];function u(t,s){return{props:{data:t[4],form:t[3],params:t[1].params}}}return r&&(e=y(r,u(o)),o[12](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&C(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][0])){if(e){O();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}r?(e=y(r,u(t)),t[12](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&16&&(a.data=t[4]),s&8&&(a.form=t[3]),s&2&&(a.params=t[1].params),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[12](null),e&&P(e,t)}}}function x(o){let e,n,i;var r=o[2][0];function u(t,s){return{props:{data:t[4],params:t[1].params,$$slots:{default:[ee]},$$scope:{ctx:t}}}}return r&&(e=y(r,u(o)),o[11](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&C(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][0])){if(e){O();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}r?(e=y(r,u(t)),t[11](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&16&&(a.data=t[4]),s&2&&(a.params=t[1].params),s&8239&&(a.$$scope={dirty:s,ctx:t}),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[11](null),e&&P(e,t)}}}function ee(o){let e,n,i;var r=o[2][1];function u(t,s){return{props:{data:t[5],form:t[3],params:t[1].params}}}return r&&(e=y(r,u(o)),o[10](e)),{c(){e&&R(e.$$.fragment),n=w()},l(t){e&&C(e.$$.fragment,t),n=w()},m(t,s){e&&L(e,t,s),E(t,n,s),i=!0},p(t,s){if(s&4&&r!==(r=t[2][1])){if(e){O();const a=e;h(a.$$.fragment,1,0,()=>{P(a,1)}),A()}r?(e=y(r,u(t)),t[10](e),R(e.$$.fragment),g(e.$$.fragment,1),L(e,n.parentNode,n)):e=null}else if(r){const a={};s&32&&(a.data=t[5]),s&8&&(a.form=t[3]),s&2&&(a.params=t[1].params),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[10](null),e&&P(e,t)}}}function T(o){let e,n=o[7]&&V(o);return{c(){e=z("div"),n&&n.c(),this.h()},l(i){e=K(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var r=W(e);n&&n.l(r),r.forEach(d),this.h()},h(){D(e,"id","svelte-announcer"),D(e,"aria-live","assertive"),D(e,"aria-atomic","true"),p(e,"position","absolute"),p(e,"left","0"),p(e,"top","0"),p(e,"clip","rect(0 0 0 0)"),p(e,"clip-path","inset(50%)"),p(e,"overflow","hidden"),p(e,"white-space","nowrap"),p(e,"width","1px"),p(e,"height","1px")},m(i,r){E(i,e,r),n&&n.m(e,null)},p(i,r){i[7]?n?n.p(i,r):(n=V(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&d(e),n&&n.d()}}}function V(o){let e;return{c(){e=Y(o[8])},l(n){e=X(n,o[8])},m(n,i){E(n,e,i)},p(n,i){i&256&&Q(e,n[8])},d(n){n&&d(e)}}}function te(o){let e,n,i,r,u;const t=[x,$],s=[];function a(l,_){return l[2][1]?0:1}e=a(o),n=s[e]=t[e](o);let f=o[6]&&T(o);return{c(){n.c(),i=F(),f&&f.c(),r=w()},l(l){n.l(l),i=U(l),f&&f.l(l),r=w()},m(l,_){s[e].m(l,_),E(l,i,_),f&&f.m(l,_),E(l,r,_),u=!0},p(l,[_]){let b=e;e=a(l),e===b?s[e].p(l,_):(O(),h(s[b],1,1,()=>{s[b]=null}),A(),n=s[e],n?n.p(l,_):(n=s[e]=t[e](l),n.c()),g(n,1),n.m(i.parentNode,i)),l[6]?f?f.p(l,_):(f=T(l),f.c(),f.m(r.parentNode,r)):f&&(f.d(1),f=null)},i(l){u||(g(n),u=!0)},o(l){h(n),u=!1},d(l){l&&(d(i),d(r)),s[e].d(l),f&&f.d(l)}}}function ne(o,e,n){let{stores:i}=e,{page:r}=e,{constructors:u}=e,{components:t=[]}=e,{form:s}=e,{data_0:a=null}=e,{data_1:f=null}=e;G(i.page.notify);let l=!1,_=!1,b=null;H(()=>{const c=i.page.subscribe(()=>{l&&(n(7,_=!0),J().then(()=>{n(8,b=document.title||"untitled page")}))});return n(6,l=!0),c});function m(c){I[c?"unshift":"push"](()=>{t[1]=c,n(0,t)})}function k(c){I[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}function v(c){I[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}return o.$$set=c=>{"stores"in c&&n(9,i=c.stores),"page"in c&&n(1,r=c.page),"constructors"in c&&n(2,u=c.constructors),"components"in c&&n(0,t=c.components),"form"in c&&n(3,s=c.form),"data_0"in c&&n(4,a=c.data_0),"data_1"in c&&n(5,f=c.data_1)},o.$$.update=()=>{o.$$.dirty&514&&i.page.set(r)},[t,r,u,s,a,f,l,_,b,i,m,k,v]}class le extends j{constructor(e){super(),q(this,e,ne,te,B,{stores:9,page:1,constructors:2,components:0,form:3,data_0:4,data_1:5})}}const fe=[()=>S(()=>import("../nodes/0.BWfnr5bB.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>S(()=>import("../nodes/1.D0DlLN_q.js"),__vite__mapDeps([4,1,2,5,6]),import.meta.url),()=>S(()=>import("../nodes/2.CSt1XReV.js"),__vite__mapDeps([7,1,2]),import.meta.url),()=>S(()=>import("../nodes/3.Dy9JpshT.js"),__vite__mapDeps([8,1,2,6,5]),import.meta.url)],ce=[],ue={"/":[2],"/auth/callback":[3]},se={handleError:({error:o})=>{console.error(o)},reroute:()=>{},transport:{}},ie=Object.fromEntries(Object.entries(se.transport).map(([o,e])=>[o,e.decode])),_e=!1,me=(o,e)=>ie[o](e);export{me as decode,ie as decoders,ue as dictionary,_e as hash,se as hooks,ae as matchers,fe as nodes,le as root,ce as server_loads};
|
hfstudio/static/_app/immutable/entry/start.BW3Wd3PX.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{l as o,a as r}from"../chunks/BjLLwVl5.js";export{o as load_css,r as start};
|
hfstudio/static/_app/immutable/nodes/1.D0DlLN_q.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{S as x,i as S,s as j,n as u,d as c,a as h,b as _,c as d,e as v,f as g,g as b,h as k,j as E,t as $,k as q,l as y}from"../chunks/9DiovRey.js";import"../chunks/IHki7fMi.js";import{p as C}from"../chunks/DHiQh_KC.js";function H(p){var f;let a,s=p[0].status+"",r,n,o,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),n=q(),o=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),n=k(e),o=v(e,"P",{});var l=g(o);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,n,t),_(e,o,t),d(o,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(n),c(o))}}}function P(p,a,s){let r;return y(p,C,n=>s(0,r=n)),[r]}class B extends x{constructor(a){super(),S(this,a,P,H,j,{})}}export{B as component};
|
hfstudio/static/_app/immutable/nodes/2.CSt1XReV.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{S as Ye,i as Ze,s as Le,v as ct,O as S,d as c,P as Sl,x as w,y as $,z as ft,A as dt,B as ht,Q as Dl,b as J,c as r,R as bn,f as h,E as zt,T as vn,U as Yl,V as X,I as O,K as z,L as j,J as x,w as jl,o as i,D as dl,W as wt,a as ut,u as U,e as f,g as I,h as p,q as Qe,j as d,t as A,k as b,n as Kt,C as hl,M as fl,N as $n,X as Al,m as Zl}from"../chunks/9DiovRey.js";import"../chunks/IHki7fMi.js";function Ot(o){return(o==null?void 0:o.length)!==void 0?o:Array.from(o)}function et(o,e){const s={},t={},l={$$scope:1};let n=o.length;for(;n--;){const a=o[n],u=e[n];if(u){for(const g in a)g in u||(t[g]=1);for(const g in u)l[g]||(s[g]=u[g],l[g]=1);o[n]=u}else for(const g in a)l[g]=1}for(const a in t)a in s||(s[a]=void 0);return s}function Et(o){return typeof o=="object"&&o!==null?o:{}}/**
|
| 2 |
+
* @license lucide-svelte v0.303.0 - ISC
|
| 3 |
+
|
| 4 |
+
This source code is licensed under the ISC license.
|
| 5 |
+
See the LICENSE file in the root directory of this source tree.
|
| 6 |
+
*/const en={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 tn(o,e,s){const t=o.slice();return t[10]=e[s][0],t[11]=e[s][1],t}function Ol(o){let e,s=[o[11]],t={};for(let l=0;l<s.length;l+=1)t=S(t,s[l]);return{c(){e=vn(o[10]),this.h()},l(l){e=bn(l,o[10],{}),h(e).forEach(c),this.h()},h(){Dl(e,t)},m(l,n){J(l,e,n)},p(l,n){Dl(e,t=et(s,[n&32&&l[11]]))},d(l){l&&c(e)}}}function ln(o){let e=o[10],s,t=o[10]&&Ol(o);return{c(){t&&t.c(),s=zt()},l(l){t&&t.l(l),s=zt()},m(l,n){t&&t.m(l,n),J(l,s,n)},p(l,n){l[10]?e?Le(e,l[10])?(t.d(1),t=Ol(l),e=l[10],t.c(),t.m(s.parentNode,s)):t.p(l,n):(t=Ol(l),e=l[10],t.c(),t.m(s.parentNode,s)):e&&(t.d(1),t=null,e=l[10])},d(l){l&&c(s),t&&t.d(l)}}}function yn(o){let e,s,t,l,n,a=Ot(o[5]),u=[];for(let _=0;_<a.length;_+=1)u[_]=ln(tn(o,a,_));const g=o[9].default,E=ct(g,o,o[8],null);let N=[en,o[6],{width:o[2]},{height:o[2]},{stroke:o[1]},{"stroke-width":t=o[4]?Number(o[3])*24/Number(o[2]):o[3]},{class:l=`lucide-icon lucide lucide-${o[0]} ${o[7].class??""}`}],T={};for(let _=0;_<N.length;_+=1)T=S(T,N[_]);return{c(){e=vn("svg");for(let _=0;_<u.length;_+=1)u[_].c();s=zt(),E&&E.c(),this.h()},l(_){e=bn(_,"svg",{width:!0,height:!0,stroke:!0,"stroke-width":!0,class:!0});var v=h(e);for(let k=0;k<u.length;k+=1)u[k].l(v);s=zt(),E&&E.l(v),v.forEach(c),this.h()},h(){Dl(e,T)},m(_,v){J(_,e,v);for(let k=0;k<u.length;k+=1)u[k]&&u[k].m(e,null);r(e,s),E&&E.m(e,null),n=!0},p(_,[v]){if(v&32){a=Ot(_[5]);let k;for(k=0;k<a.length;k+=1){const P=tn(_,a,k);u[k]?u[k].p(P,v):(u[k]=ln(P),u[k].c(),u[k].m(e,s))}for(;k<u.length;k+=1)u[k].d(1);u.length=a.length}E&&E.p&&(!n||v&256)&&ft(E,g,_,_[8],n?ht(g,_[8],v,null):dt(_[8]),null),Dl(e,T=et(N,[en,v&64&&_[6],(!n||v&4)&&{width:_[2]},(!n||v&4)&&{height:_[2]},(!n||v&2)&&{stroke:_[1]},(!n||v&28&&t!==(t=_[4]?Number(_[3])*24/Number(_[2]):_[3]))&&{"stroke-width":t},(!n||v&129&&l!==(l=`lucide-icon lucide lucide-${_[0]} ${_[7].class??""}`))&&{class:l}]))},i(_){n||($(E,_),n=!0)},o(_){w(E,_),n=!1},d(_){_&&c(e),Sl(u,_),E&&E.d(_)}}}function wn(o,e,s){const t=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=Yl(e,t),{$$slots:n={},$$scope:a}=e,{name:u}=e,{color:g="currentColor"}=e,{size:E=24}=e,{strokeWidth:N=2}=e,{absoluteStrokeWidth:T=!1}=e,{iconNode:_}=e;return o.$$set=v=>{s(7,e=S(S({},e),X(v))),s(6,l=Yl(e,t)),"name"in v&&s(0,u=v.name),"color"in v&&s(1,g=v.color),"size"in v&&s(2,E=v.size),"strokeWidth"in v&&s(3,N=v.strokeWidth),"absoluteStrokeWidth"in v&&s(4,T=v.absoluteStrokeWidth),"iconNode"in v&&s(5,_=v.iconNode),"$$scope"in v&&s(8,a=v.$$scope)},e=X(e),[u,g,E,N,T,_,l,e,a,n]}class Nt extends Ye{constructor(e){super(),Ze(this,e,wn,yn,Le,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function En(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Nn(o){let e,s;const t=[{name:"alert-circle"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[En]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Tn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class In extends Ye{constructor(e){super(),Ze(this,e,Tn,Nn,Le,{})}}function An(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Sn(o){let e,s;const t=[{name:"chevron-down"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[An]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Dn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"m6 9 6 6 6-6"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class Vn extends Ye{constructor(e){super(),Ze(this,e,Dn,Sn,Le,{})}}function Cn(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Pn(o){let e,s;const t=[{name:"download"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Cn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Un(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"7 10 12 15 17 10"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class nn extends Ye{constructor(e){super(),Ze(this,e,Un,Pn,Le,{})}}function Bn(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function On(o){let e,s;const t=[{name:"loader-2"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Bn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function zn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class jn extends Ye{constructor(e){super(),Ze(this,e,zn,On,Le,{})}}function xn(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Ln(o){let e,s;const t=[{name:"more-horizontal"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[xn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Mn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class kn extends Ye{constructor(e){super(),Ze(this,e,Mn,Ln,Le,{})}}function Hn(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Fn(o){let e,s;const t=[{name:"play"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Hn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Wn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"5 3 19 12 5 21 5 3"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class xl extends Ye{constructor(e){super(),Ze(this,e,Wn,Fn,Le,{})}}function qn(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Gn(o){let e,s;const t=[{name:"settings"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[qn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Rn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class Kn extends Ye{constructor(e){super(),Ze(this,e,Rn,Gn,Le,{})}}function Jn(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Xn(o){let e,s;const t=[{name:"share"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Jn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function Qn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}],["polyline",{points:"16 6 12 2 8 6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class zl extends Ye{constructor(e){super(),Ze(this,e,Qn,Xn,Le,{})}}function Yn(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function Zn(o){let e,s;const t=[{name:"skip-back"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Yn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function es(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"19 20 9 12 19 4 19 20"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class ts extends Ye{constructor(e){super(),Ze(this,e,es,Zn,Le,{})}}function ls(o){let e;const s=o[2].default,t=ct(s,o,o[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,n){t&&t.m(l,n),e=!0},p(l,n){t&&t.p&&(!e||n&8)&&ft(t,s,l,l[3],e?ht(s,l[3],n,null):dt(l[3]),null)},i(l){e||($(t,l),e=!0)},o(l){w(t,l),e=!1},d(l){t&&t.d(l)}}}function ns(o){let e,s;const t=[{name:"skip-forward"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[ls]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=S(l,t[n]);return e=new Nt({props:l}),{c(){x(e.$$.fragment)},l(n){j(e.$$.fragment,n)},m(n,a){z(e,n,a),s=!0},p(n,[a]){const u=a&3?et(t,[t[0],a&2&&Et(n[1]),a&1&&{iconNode:n[0]}]):{};a&8&&(u.$$scope={dirty:a,ctx:n}),e.$set(u)},i(n){s||($(e.$$.fragment,n),s=!0)},o(n){w(e.$$.fragment,n),s=!1},d(n){O(e,n)}}}function ss(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"5 4 15 12 5 20 5 4"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19"}]];return o.$$set=a=>{s(1,e=S(S({},e),X(a))),"$$scope"in a&&s(3,l=a.$$scope)},e=X(e),[n,e,t,l]}class os extends Ye{constructor(e){super(),Ze(this,e,ss,ns,Le,{})}}function sn(o,e,s){const t=o.slice();return t[39]=e[s],t}function on(o,e,s){const t=o.slice();return t[42]=e[s],t}function an(o,e,s){const t=o.slice();return t[42]=e[s],t}function rn(o){let e,s,t,l,n='<p class="font-medium text-blue-900">To run locally:</p> <code class="text-xs bg-blue-100 px-1.5 py-0.5 rounded">pip install hfstudio</code> <span class="text-blue-700">and run</span> <code class="text-xs bg-blue-100 px-1.5 py-0.5 rounded">hfstudio</code> <span class="text-blue-700">from your terminal</span>',a;return s=new In({props:{size:18,class:"text-blue-600 mt-0.5 flex-shrink-0"}}),{c(){e=d("div"),x(s.$$.fragment),t=b(),l=d("div"),l.innerHTML=n,this.h()},l(u){e=f(u,"DIV",{class:!0});var g=h(e);j(s.$$.fragment,g),t=p(g),l=f(g,"DIV",{class:!0,"data-svelte-h":!0}),Qe(l)!=="svelte-p3cqs1"&&(l.innerHTML=n),g.forEach(c),this.h()},h(){i(l,"class","text-sm"),i(e,"class","mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg flex items-start gap-2")},m(u,g){J(u,e,g),z(s,e,null),r(e,t),r(e,l),a=!0},i(u){a||($(s.$$.fragment,u),a=!0)},o(u){w(s.$$.fragment,u),a=!1},d(u){u&&c(e),O(s)}}}function un(o){let e,s="Clear",t,l;return{c(){e=d("button"),e.textContent=s,this.h()},l(n){e=f(n,"BUTTON",{class:!0,"data-svelte-h":!0}),Qe(e)!=="svelte-18e8snq"&&(e.textContent=s),this.h()},h(){i(e,"class","absolute top-4 right-6 text-sm text-gray-400 hover:text-gray-600")},m(n,a){J(n,e,a),t||(l=U(e,"click",o[26]),t=!0)},p:Kt,d(n){n&&c(e),t=!1,l()}}}function as(o){let e,s,t;return e=new xl({props:{size:20}}),{c(){x(e.$$.fragment),s=A(`
|
| 7 |
+
Generate speech`)},l(l){j(e.$$.fragment,l),s=I(l,`
|
| 8 |
+
Generate speech`)},m(l,n){z(e,l,n),J(l,s,n),t=!0},i(l){t||($(e.$$.fragment,l),t=!0)},o(l){w(e.$$.fragment,l),t=!1},d(l){l&&c(s),O(e,l)}}}function rs(o){let e,s,t;return e=new jn({props:{size:20,class:"animate-spin"}}),{c(){x(e.$$.fragment),s=A(`
|
| 9 |
+
Generating...`)},l(l){j(e.$$.fragment,l),s=I(l,`
|
| 10 |
+
Generating...`)},m(l,n){z(e,l,n),J(l,s,n),t=!0},i(l){t||($(e.$$.fragment,l),t=!0)},o(l){w(e.$$.fragment,l),t=!1},d(l){l&&c(s),O(e,l)}}}function cn(o){let e,s,t,l,n,a,u,g,E,N,T,_,v,k,P,fe,de,M="Share",Q,L,R,Ee="Download",Me,Y,le,Ne,ne,q,he,Tt,Z,Te,Ie=Bt(o[12])+"",He,mt,Fe,Oe,pe,se,ie=Bt(o[13])+"",C,gt,H,F,W,tt,lt,Ae,ee,_t,nt,Se,jt,Ce,De,ze=Bt(o[12])+"",xt,Lt,be,We,qe,It,At=Bt(o[13])+"",me,je,ue,ve,pt,Mt,st,Pe,Ge,Ht,ot,oe,Ft,ae,Jt,Xt;P=new zl({props:{size:14,class:"text-gray-600"}}),Y=new nn({props:{size:14,class:"text-gray-600"}});const bt=[us,is],ke=[];function vt(y,B){return y[11]?0:1}q=vt(o),he=ke[q]=bt[q](o),W=new ts({props:{size:20,class:"text-gray-600"}});const ul=[fs,cs],at=[];function kt(y,B){return y[11]?0:1}Ae=kt(o),ee=at[Ae]=ul[Ae](o),Se=new os({props:{size:20,class:"text-gray-600"}}),pt=new zl({props:{size:14}}),Ge=new nn({props:{size:16,class:"text-gray-600"}}),oe=new kn({props:{size:16,class:"text-gray-600"}});let K=o[6]&&fn(o);return{c(){e=d("div"),s=d("div"),t=d("div"),l=b(),n=d("div"),a=d("h3"),u=A(o[14]),g=b(),E=d("p"),N=A(o[1]),T=A(" • Created 1 second ago"),_=b(),v=d("div"),k=d("button"),x(P.$$.fragment),fe=b(),de=d("span"),de.textContent=M,Q=b(),L=d("button"),R=d("span"),R.textContent=Ee,Me=b(),x(Y.$$.fragment),le=b(),Ne=d("div"),ne=d("button"),he.c(),Tt=b(),Z=d("div"),Te=d("span"),He=A(Ie),mt=b(),Fe=d("div"),Oe=d("div"),pe=b(),se=d("span"),C=A(ie),gt=b(),H=d("div"),F=d("button"),x(W.$$.fragment),tt=b(),lt=d("button"),ee.c(),_t=b(),nt=d("button"),x(Se.$$.fragment),jt=b(),Ce=d("div"),De=d("span"),xt=A(ze),Lt=b(),be=d("div"),We=d("div"),qe=b(),It=d("span"),me=A(At),je=b(),ue=d("div"),ve=d("button"),x(pt.$$.fragment),Mt=A(`
|
| 11 |
+
Share`),st=b(),Pe=d("button"),x(Ge.$$.fragment),Ht=b(),ot=d("button"),x(oe.$$.fragment),Ft=b(),K&&K.c(),this.h()},l(y){e=f(y,"DIV",{class:!0});var B=h(e);s=f(B,"DIV",{class:!0});var Ue=h(s);t=f(Ue,"DIV",{class:!0}),h(t).forEach(c),l=p(Ue),n=f(Ue,"DIV",{class:!0});var te=h(n);a=f(te,"H3",{class:!0});var Qt=h(a);u=I(Qt,o[14]),Qt.forEach(c),g=p(te),E=f(te,"P",{class:!0});var rt=h(E);N=I(rt,o[1]),T=I(rt," • Created 1 second ago"),rt.forEach(c),te.forEach(c),_=p(Ue),v=f(Ue,"DIV",{class:!0});var xe=h(v);k=f(xe,"BUTTON",{class:!0});var Re=h(k);j(P.$$.fragment,Re),fe=p(Re),de=f(Re,"SPAN",{class:!0,"data-svelte-h":!0}),Qe(de)!=="svelte-hbn8gl"&&(de.textContent=M),Re.forEach(c),Q=p(xe),L=f(xe,"BUTTON",{class:!0});var Wt=h(L);R=f(Wt,"SPAN",{class:!0,"data-svelte-h":!0}),Qe(R)!=="svelte-h01aeg"&&(R.textContent=Ee),Me=p(Wt),j(Y.$$.fragment,Wt),Wt.forEach(c),xe.forEach(c),Ue.forEach(c),le=p(B),Ne=f(B,"DIV",{class:!0});var Dt=h(Ne);ne=f(Dt,"BUTTON",{class:!0});var $t=h(ne);he.l($t),$t.forEach(c),Tt=p(Dt),Z=f(Dt,"DIV",{class:!0});var Ke=h(Z);Te=f(Ke,"SPAN",{class:!0});var qt=h(Te);He=I(qt,Ie),qt.forEach(c),mt=p(Ke),Fe=f(Ke,"DIV",{class:!0});var Yt=h(Fe);Oe=f(Yt,"DIV",{class:!0,style:!0}),h(Oe).forEach(c),Yt.forEach(c),pe=p(Ke),se=f(Ke,"SPAN",{class:!0});var Zt=h(se);C=I(Zt,ie),Zt.forEach(c),Ke.forEach(c),Dt.forEach(c),gt=p(B),H=f(B,"DIV",{class:!0});var G=h(H);F=f(G,"BUTTON",{class:!0,title:!0});var el=h(F);j(W.$$.fragment,el),el.forEach(c),tt=p(G),lt=f(G,"BUTTON",{class:!0});var yt=h(lt);ee.l(yt),yt.forEach(c),_t=p(G),nt=f(G,"BUTTON",{class:!0,title:!0});var it=h(nt);j(Se.$$.fragment,it),it.forEach(c),jt=p(G),Ce=f(G,"DIV",{class:!0});var Be=h(Ce);De=f(Be,"SPAN",{class:!0});var cl=h(De);xt=I(cl,ze),cl.forEach(c),Lt=p(Be),be=f(Be,"DIV",{class:!0});var tl=h(be);We=f(tl,"DIV",{class:!0,style:!0}),h(We).forEach(c),tl.forEach(c),qe=p(Be),It=f(Be,"SPAN",{class:!0});var St=h(It);me=I(St,At),St.forEach(c),Be.forEach(c),je=p(G),ue=f(G,"DIV",{class:!0});var Je=h(ue);ve=f(Je,"BUTTON",{class:!0});var Vt=h(ve);j(pt.$$.fragment,Vt),Mt=I(Vt,`
|
| 12 |
+
Share`),Vt.forEach(c),st=p(Je),Pe=f(Je,"BUTTON",{class:!0,title:!0});var ll=h(Pe);j(Ge.$$.fragment,ll),ll.forEach(c),Ht=p(Je),ot=f(Je,"BUTTON",{class:!0,title:!0});var Ve=h(ot);j(oe.$$.fragment,Ve),Ve.forEach(c),Je.forEach(c),G.forEach(c),Ft=p(B),K&&K.l(B),B.forEach(c),this.h()},h(){i(t,"class","w-2 h-2 bg-green-500 rounded-full"),i(a,"class","font-medium text-gray-900 text-sm"),i(E,"class","text-xs text-gray-500"),i(n,"class","flex-1"),i(de,"class","text-gray-700"),i(k,"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"),i(R,"class","text-gray-700"),i(L,"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"),i(v,"class","flex items-center gap-2"),i(s,"class","flex items-center gap-3 mb-4"),i(ne,"class","w-8 h-8 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),i(Te,"class","text-xs text-gray-500 font-mono"),i(Oe,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),fl(Oe,"width",o[12]/o[13]*100+"%"),i(Fe,"class","flex-1 h-1 bg-gray-200 rounded-full cursor-pointer"),i(se,"class","text-xs text-gray-500 font-mono"),i(Z,"class","flex-1 flex items-center gap-2"),i(Ne,"class","flex items-center gap-3 mb-4"),i(F,"class","p-2 hover:bg-gray-100 rounded-full"),i(F,"title","Skip back"),i(lt,"class","w-12 h-12 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),i(nt,"class","p-2 hover:bg-gray-100 rounded-full"),i(nt,"title","Skip forward"),i(De,"class","text-xs text-gray-500 font-mono"),i(We,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),fl(We,"width",o[12]/o[13]*100+"%"),i(be,"class","flex-1 h-1 bg-gray-200 rounded-full"),i(It,"class","text-xs text-gray-500 font-mono"),i(Ce,"class","flex-1 flex items-center gap-3"),i(ve,"class","flex items-center gap-2 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50"),i(Pe,"class","p-2 hover:bg-gray-100 rounded-md"),i(Pe,"title","Download"),i(ot,"class","p-2 hover:bg-gray-100 rounded-md"),i(ot,"title","More options"),i(ue,"class","flex items-center gap-2"),i(H,"class","flex items-center gap-4 mb-4"),i(e,"class","p-4 border border-gray-200 rounded-lg bg-white")},m(y,B){J(y,e,B),r(e,s),r(s,t),r(s,l),r(s,n),r(n,a),r(a,u),r(n,g),r(n,E),r(E,N),r(E,T),r(s,_),r(s,v),r(v,k),z(P,k,null),r(k,fe),r(k,de),r(v,Q),r(v,L),r(L,R),r(L,Me),z(Y,L,null),r(e,le),r(e,Ne),r(Ne,ne),ke[q].m(ne,null),r(Ne,Tt),r(Ne,Z),r(Z,Te),r(Te,He),r(Z,mt),r(Z,Fe),r(Fe,Oe),r(Z,pe),r(Z,se),r(se,C),r(e,gt),r(e,H),r(H,F),z(W,F,null),r(H,tt),r(H,lt),at[Ae].m(lt,null),r(H,_t),r(H,nt),z(Se,nt,null),r(H,jt),r(H,Ce),r(Ce,De),r(De,xt),r(Ce,Lt),r(Ce,be),r(be,We),r(Ce,qe),r(Ce,It),r(It,me),r(H,je),r(H,ue),r(ue,ve),z(pt,ve,null),r(ve,Mt),r(ue,st),r(ue,Pe),z(Ge,Pe,null),r(ue,Ht),r(ue,ot),z(oe,ot,null),r(e,Ft),K&&K.m(e,null),ae=!0,Jt||(Xt=[U(k,"click",pn),U(L,"click",o[24]),U(ne,"click",o[19]),U(lt,"click",o[19]),U(ve,"click",pn),U(Pe,"click",o[24])],Jt=!0)},p(y,B){(!ae||B[0]&16384)&&ut(u,y[14]),(!ae||B[0]&2)&&ut(N,y[1]);let Ue=q;q=vt(y),q!==Ue&&(hl(),w(ke[Ue],1,1,()=>{ke[Ue]=null}),dl(),he=ke[q],he||(he=ke[q]=bt[q](y),he.c()),$(he,1),he.m(ne,null)),(!ae||B[0]&4096)&&Ie!==(Ie=Bt(y[12])+"")&&ut(He,Ie),(!ae||B[0]&12288)&&fl(Oe,"width",y[12]/y[13]*100+"%"),(!ae||B[0]&8192)&&ie!==(ie=Bt(y[13])+"")&&ut(C,ie);let te=Ae;Ae=kt(y),Ae!==te&&(hl(),w(at[te],1,1,()=>{at[te]=null}),dl(),ee=at[Ae],ee||(ee=at[Ae]=ul[Ae](y),ee.c()),$(ee,1),ee.m(lt,null)),(!ae||B[0]&4096)&&ze!==(ze=Bt(y[12])+"")&&ut(xt,ze),(!ae||B[0]&12288)&&fl(We,"width",y[12]/y[13]*100+"%"),(!ae||B[0]&8192)&&At!==(At=Bt(y[13])+"")&&ut(me,At),y[6]?K?K.p(y,B):(K=fn(y),K.c(),K.m(e,null)):K&&(K.d(1),K=null)},i(y){ae||($(P.$$.fragment,y),$(Y.$$.fragment,y),$(he),$(W.$$.fragment,y),$(ee),$(Se.$$.fragment,y),$(pt.$$.fragment,y),$(Ge.$$.fragment,y),$(oe.$$.fragment,y),ae=!0)},o(y){w(P.$$.fragment,y),w(Y.$$.fragment,y),w(he),w(W.$$.fragment,y),w(ee),w(Se.$$.fragment,y),w(pt.$$.fragment,y),w(Ge.$$.fragment,y),w(oe.$$.fragment,y),ae=!1},d(y){y&&c(e),O(P),O(Y),ke[q].d(),O(W),at[Ae].d(),O(Se),O(pt),O(Ge),O(oe),K&&K.d(),Jt=!1,jl(Xt)}}}function is(o){let e,s;return e=new xl({props:{size:14,class:"text-white ml-0.5"}}),{c(){x(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,l){z(e,t,l),s=!0},i(t){s||($(e.$$.fragment,t),s=!0)},o(t){w(e.$$.fragment,t),s=!1},d(t){O(e,t)}}}function us(o){let e;return{c(){e=d("div"),this.h()},l(s){e=f(s,"DIV",{class:!0}),h(e).forEach(c),this.h()},h(){i(e,"class","pause-filled text-white")},m(s,t){J(s,e,t)},i:Kt,o:Kt,d(s){s&&c(e)}}}function cs(o){let e,s;return e=new xl({props:{size:20,class:"text-white ml-0.5"}}),{c(){x(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,l){z(e,t,l),s=!0},i(t){s||($(e.$$.fragment,t),s=!0)},o(t){w(e.$$.fragment,t),s=!1},d(t){O(e,t)}}}function fs(o){let e;return{c(){e=d("div"),this.h()},l(s){e=f(s,"DIV",{class:!0}),h(e).forEach(c),this.h()},h(){i(e,"class","pause-filled text-white scale-150")},m(s,t){J(s,e,t)},i:Kt,o:Kt,d(s){s&&c(e)}}}function fn(o){let e,s,t,l;return{c(){e=d("audio"),this.h()},l(n){e=f(n,"AUDIO",{src:!0,style:!0}),h(e).forEach(c),this.h()},h(){Zl(e.src,s=o[6])||i(e,"src",s),fl(e,"display","none")},m(n,a){J(n,e,a),o[30](e),t||(l=[U(e,"loadedmetadata",o[20]),U(e,"timeupdate",o[21]),U(e,"play",o[22]),U(e,"pause",o[23])],t=!0)},p(n,a){a[0]&64&&!Zl(e.src,s=n[6])&&i(e,"src",s)},d(n){n&&c(e),o[30](null),t=!1,jl(l)}}}function dn(o){let e=o[42].name+"",s,t,l=o[42].badge&&ds(o);return{c(){s=A(e),l&&l.c(),t=zt()},l(n){s=I(n,e),l&&l.l(n),t=zt()},m(n,a){J(n,s,a),l&&l.m(n,a),J(n,t,a)},p(n,a){n[42].badge&&l.p(n,a)},d(n){n&&(c(s),c(t)),l&&l.d(n)}}}function ds(o){let e,s,t,l=o[42].badge+"",n,a;return{c(){e=A(" "),s=d("span"),t=A("("),n=A(l),a=A(")"),this.h()},l(u){e=I(u," "),s=f(u,"SPAN",{class:!0});var g=h(s);t=I(g,"("),n=I(g,l),a=I(g,")"),g.forEach(c),this.h()},h(){i(s,"class","text-xs text-gray-500")},m(u,g){J(u,e,g),J(u,s,g),r(s,t),r(s,n),r(s,a)},p:Kt,d(u){u&&(c(e),c(s))}}}function hn(o){let e,s=o[42].name===o[2]&&dn(o);return{c(){s&&s.c(),e=zt()},l(t){s&&s.l(t),e=zt()},m(t,l){s&&s.m(t,l),J(t,e,l)},p(t,l){t[42].name===t[2]?s?s.p(t,l):(s=dn(t),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},d(t){t&&c(e),s&&s.d(t)}}}function mn(o){let e,s=Ot(o[16]),t=[];for(let l=0;l<s.length;l+=1)t[l]=gn(on(o,s,l));return{c(){e=d("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=f(l,"DIV",{class:!0});var n=h(e);for(let a=0;a<t.length;a+=1)t[a].l(n);n.forEach(c),this.h()},h(){i(e,"class","absolute top-full left-0 right-0 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg z-10")},m(l,n){J(l,e,n);for(let a=0;a<t.length;a+=1)t[a]&&t[a].m(e,null)},p(l,n){if(n[0]&65556){s=Ot(l[16]);let a;for(a=0;a<s.length;a+=1){const u=on(l,s,a);t[a]?t[a].p(u,n):(t[a]=gn(u),t[a].c(),t[a].m(e,null))}for(;a<t.length;a+=1)t[a].d(1);t.length=s.length}},d(l){l&&c(e),Sl(t,l)}}}function hs(o){let e,s,t,l=o[42].badge+"",n,a;return{c(){e=A(" "),s=d("span"),t=A("("),n=A(l),a=A(")"),this.h()},l(u){e=I(u," "),s=f(u,"SPAN",{class:!0});var g=h(s);t=I(g,"("),n=I(g,l),a=I(g,")"),g.forEach(c),this.h()},h(){i(s,"class","text-xs text-gray-500")},m(u,g){J(u,e,g),J(u,s,g),r(s,t),r(s,n),r(s,a)},p:Kt,d(u){u&&(c(e),c(s))}}}function gn(o){let e,s=o[42].name+"",t,l,n,a,u,g=o[42].badge&&hs(o);function E(){return o[32](o[42])}return{c(){e=d("button"),t=A(s),g&&g.c(),l=b(),this.h()},l(N){e=f(N,"BUTTON",{class:!0});var T=h(e);t=I(T,s),g&&g.l(T),l=p(T),T.forEach(c),this.h()},h(){i(e,"class",n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[42].name===o[2]?"bg-gray-100":""))},m(N,T){J(N,e,T),r(e,t),g&&g.m(e,null),r(e,l),a||(u=U(e,"click",E),a=!0)},p(N,T){o=N,o[42].badge&&g.p(o,T),T[0]&4&&n!==(n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[42].name===o[2]?"bg-gray-100":""))&&i(e,"class",n)},d(N){N&&c(e),g&&g.d(),a=!1,u()}}}function _n(o){let e,s,t,l=o[39].name[0]+"",n,a,u,g=o[39].name+"",E,N,T,_=o[39].description+"",v,k,P,fe,de;function M(){return o[33](o[39])}return{c(){e=d("button"),s=d("div"),t=d("div"),n=A(l),a=b(),u=d("span"),E=A(g),N=b(),T=d("div"),v=A(_),k=b(),this.h()},l(Q){e=f(Q,"BUTTON",{class:!0});var L=h(e);s=f(L,"DIV",{class:!0});var R=h(s);t=f(R,"DIV",{class:!0});var Ee=h(t);n=I(Ee,l),Ee.forEach(c),a=p(R),u=f(R,"SPAN",{class:!0});var Me=h(u);E=I(Me,g),Me.forEach(c),R.forEach(c),N=p(L),T=f(L,"DIV",{class:!0});var Y=h(T);v=I(Y,_),Y.forEach(c),k=p(L),L.forEach(c),this.h()},h(){i(t,"class","w-8 h-8 bg-gradient-to-br from-amber-400 to-orange-500 rounded-full flex items-center justify-center text-white text-xs font-medium"),i(u,"class","text-sm font-medium"),i(s,"class","flex items-center gap-2"),i(T,"class","text-xs text-gray-500"),i(e,"class",P="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left "+(o[39].name===o[1]?"bg-gray-100":""))},m(Q,L){J(Q,e,L),r(e,s),r(s,t),r(t,n),r(s,a),r(s,u),r(u,E),r(e,N),r(e,T),r(T,v),r(e,k),fe||(de=U(e,"click",M),fe=!0)},p(Q,L){o=Q,L[0]&2&&P!==(P="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left "+(o[39].name===o[1]?"bg-gray-100":""))&&i(e,"class",P)},d(Q){Q&&c(e),fe=!1,de()}}}function ms(o){let e,s,t,l,n,a,u,g,E,N,T,_,v,k,P,fe,de,M,Q,L,R,Ee,Me,Y,le,Ne,ne,q,he,Tt,Z,Te,Ie,He=o[0].length+"",mt,Fe,Oe,pe,se,ie,C,gt,H,F,W,tt,lt="Model",Ae,ee,_t,nt,Se,jt,Ce,De,ze,xt='<h3 class="font-medium text-gray-900">Voice</h3>',Lt,be,We,qe,It='<div class="flex items-center gap-2"><div class="w-8 h-8 bg-gray-400 rounded-full flex items-center justify-center text-white text-xs font-medium">+</div> <span class="text-sm font-medium text-gray-600">Clone your voice</span></div> <div class="text-xs text-gray-400">(coming soon)</div>',At,me,je,ue,ve,pt="Speed",Mt,st,Pe=o[7].toFixed(1)+"",Ge,Ht,ot,oe,Ft,ae,Jt="<span>0.5x</span> <span>2.0x</span>",Xt,bt,ke,vt,ul="Stability",at,kt,K=(o[8]*100).toFixed(0)+"",y,B,Ue,te,Qt,rt,xe,Re,Wt="Similarity",Dt,$t,Ke=(o[9]*100).toFixed(0)+"",qt,Yt,Zt,G,el,yt,it,Be,cl="Style",tl,St,Je=o[10]===0?"None":"Exaggerated",Vt,ll,Ve,Xe,Vl,Ll;fe=new Kn({props:{size:18,class:"text-gray-600"}}),Q=new zl({props:{size:18,class:"text-gray-600"}}),Ee=new kn({props:{size:18,class:"text-gray-600"}});let ce=o[3]==="local"&&rn(),$e=o[0]&&un(o);const Ml=[rs,as],Gt=[];function Hl(m,D){return m[5]?0:1}se=Hl(o),ie=Gt[se]=Ml[se](o);let re=o[6]&&cn(o),nl=Ot(o[16]),ge=[];for(let m=0;m<nl.length;m+=1)ge[m]=hn(an(o,nl,m));Se=new Vn({props:{size:16,class:"text-gray-500"}});let ye=o[4]&&mn(o),sl=Ot(o[17]),_e=[];for(let m=0;m<sl.length;m+=1)_e[m]=_n(sn(o,sl,m));return{c(){e=d("div"),s=d("header"),t=d("div"),l=d("div"),n=d("div"),a=d("button"),u=A("API"),E=b(),N=d("button"),T=A("Local"),v=b(),k=d("div"),P=d("button"),x(fe.$$.fragment),de=b(),M=d("button"),x(Q.$$.fragment),L=b(),R=d("button"),x(Ee.$$.fragment),Me=b(),Y=d("div"),le=d("div"),ce&&ce.c(),Ne=b(),ne=d("div"),q=d("textarea"),he=b(),$e&&$e.c(),Tt=b(),Z=d("div"),Te=d("div"),Ie=d("span"),mt=A(He),Fe=A(" / 5,000 characters"),Oe=b(),pe=d("button"),ie.c(),gt=b(),re&&re.c(),H=b(),F=d("div"),W=d("div"),tt=d("h3"),tt.textContent=lt,Ae=b(),ee=d("button"),_t=d("span");for(let m=0;m<ge.length;m+=1)ge[m].c();nt=b(),x(Se.$$.fragment),jt=b(),ye&&ye.c(),Ce=b(),De=d("div"),ze=d("div"),ze.innerHTML=xt,Lt=b(),be=d("div");for(let m=0;m<_e.length;m+=1)_e[m].c();We=b(),qe=d("button"),qe.innerHTML=It,At=b(),me=d("div"),je=d("div"),ue=d("div"),ve=d("label"),ve.textContent=pt,Mt=b(),st=d("span"),Ge=A(Pe),Ht=A("x"),ot=b(),oe=d("input"),Ft=b(),ae=d("div"),ae.innerHTML=Jt,Xt=b(),bt=d("div"),ke=d("div"),vt=d("label"),vt.textContent=ul,at=b(),kt=d("span"),y=A(K),B=A("%"),Ue=b(),te=d("input"),Qt=b(),rt=d("div"),xe=d("div"),Re=d("label"),Re.textContent=Wt,Dt=b(),$t=d("span"),qt=A(Ke),Yt=A("%"),Zt=b(),G=d("input"),el=b(),yt=d("div"),it=d("div"),Be=d("label"),Be.textContent=cl,tl=b(),St=d("span"),Vt=A(Je),ll=b(),Ve=d("input"),this.h()},l(m){e=f(m,"DIV",{class:!0});var D=h(e);s=f(D,"HEADER",{class:!0});var we=h(s);t=f(we,"DIV",{class:!0});var V=h(t);l=f(V,"DIV",{class:!0});var Ct=h(l);n=f(Ct,"DIV",{class:!0});var ml=h(n);a=f(ml,"BUTTON",{class:!0});var Fl=h(a);u=I(Fl,"API"),Fl.forEach(c),E=p(ml),N=f(ml,"BUTTON",{class:!0});var Wl=h(N);T=I(Wl,"Local"),Wl.forEach(c),ml.forEach(c),Ct.forEach(c),v=p(V),k=f(V,"DIV",{class:!0});var ol=h(k);P=f(ol,"BUTTON",{class:!0,title:!0});var ql=h(P);j(fe.$$.fragment,ql),ql.forEach(c),de=p(ol),M=f(ol,"BUTTON",{class:!0,title:!0});var Gl=h(M);j(Q.$$.fragment,Gl),Gl.forEach(c),L=p(ol),R=f(ol,"BUTTON",{class:!0,title:!0});var Rl=h(R);j(Ee.$$.fragment,Rl),Rl.forEach(c),ol.forEach(c),V.forEach(c),we.forEach(c),Me=p(D),Y=f(D,"DIV",{class:!0});var gl=h(Y);le=f(gl,"DIV",{class:!0});var Pt=h(le);ce&&ce.l(Pt),Ne=p(Pt),ne=f(Pt,"DIV",{class:!0});var _l=h(ne);q=f(_l,"TEXTAREA",{class:!0,placeholder:!0}),h(q).forEach(c),he=p(_l),$e&&$e.l(_l),_l.forEach(c),Tt=p(Pt),Z=f(Pt,"DIV",{class:!0});var pl=h(Z);Te=f(pl,"DIV",{class:!0});var Kl=h(Te);Ie=f(Kl,"SPAN",{class:!0});var Cl=h(Ie);mt=I(Cl,He),Fe=I(Cl," / 5,000 characters"),Cl.forEach(c),Kl.forEach(c),Oe=p(pl),pe=f(pl,"BUTTON",{class:!0});var Jl=h(pe);ie.l(Jl),Jl.forEach(c),pl.forEach(c),gt=p(Pt),re&&re.l(Pt),Pt.forEach(c),H=p(gl),F=f(gl,"DIV",{class:!0});var al=h(F);W=f(al,"DIV",{class:!0});var rl=h(W);tt=f(rl,"H3",{class:!0,"data-svelte-h":!0}),Qe(tt)!=="svelte-b3hs3r"&&(tt.textContent=lt),Ae=p(rl),ee=f(rl,"BUTTON",{class:!0});var bl=h(ee);_t=f(bl,"SPAN",{});var Xl=h(_t);for(let Rt=0;Rt<ge.length;Rt+=1)ge[Rt].l(Xl);Xl.forEach(c),nt=p(bl),j(Se.$$.fragment,bl),bl.forEach(c),jt=p(rl),ye&&ye.l(rl),rl.forEach(c),Ce=p(al),De=f(al,"DIV",{class:!0});var vl=h(De);ze=f(vl,"DIV",{class:!0,"data-svelte-h":!0}),Qe(ze)!=="svelte-182x1ki"&&(ze.innerHTML=xt),Lt=p(vl),be=f(vl,"DIV",{class:!0});var kl=h(be);for(let Rt=0;Rt<_e.length;Rt+=1)_e[Rt].l(kl);We=p(kl),qe=f(kl,"BUTTON",{class:!0,"data-svelte-h":!0}),Qe(qe)!=="svelte-20x663"&&(qe.innerHTML=It),kl.forEach(c),vl.forEach(c),At=p(al),me=f(al,"DIV",{class:!0});var Ut=h(me);je=f(Ut,"DIV",{});var il=h(je);ue=f(il,"DIV",{class:!0});var $l=h(ue);ve=f($l,"LABEL",{class:!0,"data-svelte-h":!0}),Qe(ve)!=="svelte-9vcpiu"&&(ve.textContent=pt),Mt=p($l),st=f($l,"SPAN",{class:!0});var Pl=h(st);Ge=I(Pl,Pe),Ht=I(Pl,"x"),Pl.forEach(c),$l.forEach(c),ot=p(il),oe=f(il,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),Ft=p(il),ae=f(il,"DIV",{class:!0,"data-svelte-h":!0}),Qe(ae)!=="svelte-4ydm1m"&&(ae.innerHTML=Jt),il.forEach(c),Xt=p(Ut),bt=f(Ut,"DIV",{});var yl=h(bt);ke=f(yl,"DIV",{class:!0});var wl=h(ke);vt=f(wl,"LABEL",{class:!0,"data-svelte-h":!0}),Qe(vt)!=="svelte-1lgjete"&&(vt.textContent=ul),at=p(wl),kt=f(wl,"SPAN",{class:!0});var Ul=h(kt);y=I(Ul,K),B=I(Ul,"%"),Ul.forEach(c),wl.forEach(c),Ue=p(yl),te=f(yl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),yl.forEach(c),Qt=p(Ut),rt=f(Ut,"DIV",{});var El=h(rt);xe=f(El,"DIV",{class:!0});var Nl=h(xe);Re=f(Nl,"LABEL",{class:!0,"data-svelte-h":!0}),Qe(Re)!=="svelte-1ha0vec"&&(Re.textContent=Wt),Dt=p(Nl),$t=f(Nl,"SPAN",{class:!0});var Bl=h($t);qt=I(Bl,Ke),Yt=I(Bl,"%"),Bl.forEach(c),Nl.forEach(c),Zt=p(El),G=f(El,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),El.forEach(c),el=p(Ut),yt=f(Ut,"DIV",{});var Tl=h(yt);it=f(Tl,"DIV",{class:!0});var Il=h(it);Be=f(Il,"LABEL",{class:!0,"data-svelte-h":!0}),Qe(Be)!=="svelte-1ata0tk"&&(Be.textContent=cl),tl=p(Il),St=f(Il,"SPAN",{class:!0});var Ql=h(St);Vt=I(Ql,Je),Ql.forEach(c),Il.forEach(c),ll=p(Tl),Ve=f(Tl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),Tl.forEach(c),Ut.forEach(c),al.forEach(c),gl.forEach(c),D.forEach(c),this.h()},h(){i(a,"class",g="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[3]==="api"?"bg-white shadow-sm":"text-gray-600")),i(N,"class",_="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[3]==="local"?"bg-white shadow-sm":"text-gray-600")),i(n,"class","flex items-center bg-gray-100 rounded-md p-0.5"),i(l,"class","flex items-center gap-3"),i(P,"class","p-2 hover:bg-gray-50 rounded-md"),i(P,"title","Settings"),i(M,"class","p-2 hover:bg-gray-50 rounded-md"),i(M,"title","Share"),i(R,"class","p-2 hover:bg-gray-50 rounded-md"),i(R,"title","More"),i(k,"class","flex items-center gap-2"),i(t,"class","flex items-center justify-between px-4 py-2"),i(s,"class","border-b border-gray-200 bg-white"),i(q,"class","w-full h-full p-6 bg-white resize-none border-0 focus:outline-none text-gray-900 text-base leading-relaxed"),i(q,"placeholder","Enter text to convert to speech..."),i(ne,"class","flex-1 pb-24"),i(Ie,"class","text-sm text-gray-500"),i(Te,"class","flex items-center justify-between mb-3"),pe.disabled=C=o[5]||!o[0].trim(),i(pe,"class","w-full px-6 py-3 bg-gradient-to-r from-amber-400 to-orange-500 text-white rounded-lg font-medium hover:from-amber-500 hover:to-orange-600 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 shadow-sm"),i(Z,"class","fixed bottom-0 left-56 right-80 p-4 bg-white border-t border-gray-200"),i(le,"class","flex-1 flex flex-col p-6"),i(tt,"class","font-medium text-gray-900 mb-3"),i(ee,"class","w-full p-3 border border-gray-200 rounded-lg bg-white text-sm focus:outline-none focus:ring-2 focus:ring-amber-400 focus:border-transparent appearance-none bg-no-repeat bg-right pr-10 shadow-sm text-left flex items-center justify-between"),i(W,"class","mb-6 relative model-dropdown"),i(ze,"class","mb-3"),i(qe,"class","w-full flex items-center justify-between p-2 rounded-md opacity-50 cursor-not-allowed text-left"),qe.disabled=!0,i(be,"class","space-y-1"),i(De,"class","mb-6"),i(ve,"class","text-sm font-medium text-gray-700"),i(st,"class","text-sm text-gray-500"),i(ue,"class","flex justify-between mb-1"),i(oe,"type","range"),i(oe,"min","0.5"),i(oe,"max","2"),i(oe,"step","0.1"),i(oe,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),i(ae,"class","flex justify-between text-xs text-gray-400 mt-1"),i(vt,"class","text-sm font-medium text-gray-700"),i(kt,"class","text-sm text-gray-500"),i(ke,"class","flex justify-between mb-1"),i(te,"type","range"),i(te,"min","0"),i(te,"max","1"),i(te,"step","0.01"),i(te,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),i(Re,"class","text-sm font-medium text-gray-700"),i($t,"class","text-sm text-gray-500"),i(xe,"class","flex justify-between mb-1"),i(G,"type","range"),i(G,"min","0"),i(G,"max","1"),i(G,"step","0.01"),i(G,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),i(Be,"class","text-sm font-medium text-gray-700"),i(St,"class","text-sm text-gray-500"),i(it,"class","flex justify-between mb-1"),i(Ve,"type","range"),i(Ve,"min","0"),i(Ve,"max","1"),i(Ve,"step","1"),i(Ve,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),i(me,"class","space-y-4 pt-4 border-t border-gray-200"),i(F,"class","w-80 border-l border-gray-200 bg-white p-4 overflow-y-auto"),i(Y,"class","flex-1 flex"),i(e,"class","flex flex-col h-full")},m(m,D){J(m,e,D),r(e,s),r(s,t),r(t,l),r(l,n),r(n,a),r(a,u),r(n,E),r(n,N),r(N,T),r(t,v),r(t,k),r(k,P),z(fe,P,null),r(k,de),r(k,M),z(Q,M,null),r(k,L),r(k,R),z(Ee,R,null),r(e,Me),r(e,Y),r(Y,le),ce&&ce.m(le,null),r(le,Ne),r(le,ne),r(ne,q),wt(q,o[0]),r(ne,he),$e&&$e.m(ne,null),r(le,Tt),r(le,Z),r(Z,Te),r(Te,Ie),r(Ie,mt),r(Ie,Fe),r(Z,Oe),r(Z,pe),Gt[se].m(pe,null),r(le,gt),re&&re.m(le,null),r(Y,H),r(Y,F),r(F,W),r(W,tt),r(W,Ae),r(W,ee),r(ee,_t);for(let we=0;we<ge.length;we+=1)ge[we]&&ge[we].m(_t,null);r(ee,nt),z(Se,ee,null),r(W,jt),ye&&ye.m(W,null),r(F,Ce),r(F,De),r(De,ze),r(De,Lt),r(De,be);for(let we=0;we<_e.length;we+=1)_e[we]&&_e[we].m(be,null);r(be,We),r(be,qe),r(F,At),r(F,me),r(me,je),r(je,ue),r(ue,ve),r(ue,Mt),r(ue,st),r(st,Ge),r(st,Ht),r(je,ot),r(je,oe),wt(oe,o[7]),r(je,Ft),r(je,ae),r(me,Xt),r(me,bt),r(bt,ke),r(ke,vt),r(ke,at),r(ke,kt),r(kt,y),r(kt,B),r(bt,Ue),r(bt,te),wt(te,o[8]),r(me,Qt),r(me,rt),r(rt,xe),r(xe,Re),r(xe,Dt),r(xe,$t),r($t,qt),r($t,Yt),r(rt,Zt),r(rt,G),wt(G,o[9]),r(me,el),r(me,yt),r(yt,it),r(it,Be),r(it,tl),r(it,St),r(St,Vt),r(yt,ll),r(yt,Ve),wt(Ve,o[10]),Xe=!0,Vl||(Ll=[U(a,"click",o[27]),U(N,"click",o[28]),U(q,"input",o[29]),U(pe,"click",o[18]),U(ee,"click",o[31]),U(oe,"change",o[34]),U(oe,"input",o[34]),U(te,"change",o[35]),U(te,"input",o[35]),U(G,"change",o[36]),U(G,"input",o[36]),U(Ve,"change",o[37]),U(Ve,"input",o[37]),U(e,"click",o[25])],Vl=!0)},p(m,D){(!Xe||D[0]&8&&g!==(g="px-3 py-1 text-sm font-medium rounded transition-colors "+(m[3]==="api"?"bg-white shadow-sm":"text-gray-600")))&&i(a,"class",g),(!Xe||D[0]&8&&_!==(_="px-3 py-1 text-sm font-medium rounded transition-colors "+(m[3]==="local"?"bg-white shadow-sm":"text-gray-600")))&&i(N,"class",_),m[3]==="local"?ce?D[0]&8&&$(ce,1):(ce=rn(),ce.c(),$(ce,1),ce.m(le,Ne)):ce&&(hl(),w(ce,1,1,()=>{ce=null}),dl()),D[0]&1&&wt(q,m[0]),m[0]?$e?$e.p(m,D):($e=un(m),$e.c(),$e.m(ne,null)):$e&&($e.d(1),$e=null),(!Xe||D[0]&1)&&He!==(He=m[0].length+"")&&ut(mt,He);let we=se;if(se=Hl(m),se!==we&&(hl(),w(Gt[we],1,1,()=>{Gt[we]=null}),dl(),ie=Gt[se],ie||(ie=Gt[se]=Ml[se](m),ie.c()),$(ie,1),ie.m(pe,null)),(!Xe||D[0]&33&&C!==(C=m[5]||!m[0].trim()))&&(pe.disabled=C),m[6]?re?(re.p(m,D),D[0]&64&&$(re,1)):(re=cn(m),re.c(),$(re,1),re.m(le,null)):re&&(hl(),w(re,1,1,()=>{re=null}),dl()),D[0]&65540){nl=Ot(m[16]);let V;for(V=0;V<nl.length;V+=1){const Ct=an(m,nl,V);ge[V]?ge[V].p(Ct,D):(ge[V]=hn(Ct),ge[V].c(),ge[V].m(_t,null))}for(;V<ge.length;V+=1)ge[V].d(1);ge.length=nl.length}if(m[4]?ye?ye.p(m,D):(ye=mn(m),ye.c(),ye.m(W,null)):ye&&(ye.d(1),ye=null),D[0]&131074){sl=Ot(m[17]);let V;for(V=0;V<sl.length;V+=1){const Ct=sn(m,sl,V);_e[V]?_e[V].p(Ct,D):(_e[V]=_n(Ct),_e[V].c(),_e[V].m(be,We))}for(;V<_e.length;V+=1)_e[V].d(1);_e.length=sl.length}(!Xe||D[0]&128)&&Pe!==(Pe=m[7].toFixed(1)+"")&&ut(Ge,Pe),D[0]&128&&wt(oe,m[7]),(!Xe||D[0]&256)&&K!==(K=(m[8]*100).toFixed(0)+"")&&ut(y,K),D[0]&256&&wt(te,m[8]),(!Xe||D[0]&512)&&Ke!==(Ke=(m[9]*100).toFixed(0)+"")&&ut(qt,Ke),D[0]&512&&wt(G,m[9]),(!Xe||D[0]&1024)&&Je!==(Je=m[10]===0?"None":"Exaggerated")&&ut(Vt,Je),D[0]&1024&&wt(Ve,m[10])},i(m){Xe||($(fe.$$.fragment,m),$(Q.$$.fragment,m),$(Ee.$$.fragment,m),$(ce),$(ie),$(re),$(Se.$$.fragment,m),Xe=!0)},o(m){w(fe.$$.fragment,m),w(Q.$$.fragment,m),w(Ee.$$.fragment,m),w(ce),w(ie),w(re),w(Se.$$.fragment,m),Xe=!1},d(m){m&&c(e),O(fe),O(Q),O(Ee),ce&&ce.d(),$e&&$e.d(),Gt[se].d(),re&&re.d(),Sl(ge,m),O(Se),ye&&ye.d(),Sl(_e,m),Vl=!1,jl(Ll)}}}function gs(){if(console.log("Getting access token..."),typeof window<"u"&&window.gradio&&window.gradio.auth_token)return console.log("Found Gradio auth token:",window.gradio.auth_token.substring(0,10)+"..."),window.gradio.auth_token;const o=document.querySelector('meta[name="hf-oauth-token"]');if(o){const t=o.getAttribute("content");if(t)return console.log("Found token in meta tag:",t.substring(0,10)+"..."),t}const e=["hf_access_token","hf_token","huggingface_token","oauth_token","access_token"];for(const t of e){const l=localStorage.getItem(t);if(l)return console.log(`Found token in localStorage['${t}']:`,l.substring(0,10)+"..."),l}for(const t of e){const l=sessionStorage.getItem(t);if(l)return console.log(`Found token in sessionStorage['${t}']:`,l.substring(0,10)+"..."),l}const s=document.cookie.split(";");for(const t of s){const[l,n]=t.trim().split("=");if(l&&(l.includes("token")||l.includes("hf")||l.includes("oauth")))return console.log(`Found potential token in cookie '${l}':`,n?n.substring(0,10)+"...":"empty"),decodeURIComponent(n)}try{const t=document.querySelector("script[data-hf-token]");if(t){const l=t.getAttribute("data-hf-token");if(l)return console.log("Found token in script data attribute:",l.substring(0,10)+"..."),l}}catch{}return console.log("No OAuth token found in any storage location"),console.log("Available localStorage keys:",Object.keys(localStorage)),console.log("Available sessionStorage keys:",Object.keys(sessionStorage)),console.log("Available cookies:",document.cookie),console.log("Available global objects:",{window:typeof window,gradio:typeof(window==null?void 0:window.gradio),hf:typeof(window==null?void 0:window.hf),huggingface:typeof(window==null?void 0:window.huggingface)}),console.log("URL search params:",new URLSearchParams(window.location.search).toString()),console.log("All meta tags:",Array.from(document.getElementsByTagName("meta")).map(t=>{var l;return{name:t.name,content:((l=t.content)==null?void 0:l.substring(0,20))+"..."}})),null}function Bt(o){const e=Math.floor(o/60),s=Math.floor(o%60);return`${e}:${s.toString().padStart(2,"0")}`}function pn(){console.log("Share audio")}function _s(o,e,s){let t=`Adam was playing outside when he heard a tiny meow! He looked around. Meow! There it was again! He tiptoed toward the bushes. Pushing the leaves aside, he gasped. A fluffy, orange kitten with big, curious eyes stared up at him. "Oh no! Where is your home?" Adam asked. The kitten just blinked and let out a tiny mew!
|
| 13 |
+
|
| 14 |
+
"Mama! I found a lost kitten!" Adam called as he carried the little furball inside. The kitten sniffed around, then jumped up—boing!—right onto the couch. "Oh!" Mama laughed. "Let's give it some milk while we find its owner." The kitten licked the milk happily and purred, prrrr! Adam giggled. "I think he likes it here!"
|
| 15 |
+
|
| 16 |
+
That evening, there was a knock at the door. A little girl stood there, eyes wide. "Have you seen my kitten, Biscuit?" she asked. Adam smiled and pointed. The kitten ran to her, mew mew mew! The girl hugged Biscuit tightly. "Thank you!" she said. As she left, Adam waved. "Goodbye, Biscuit!" he whispered. And in the quiet, he could still hear a happy prrrr!`,l="Novia",n="Chatterbox",a="api",u=!1,g=!1,E=null,N=1,T=.5,_=.75,v=0,k=!1,P=0,fe=0,de="",M=null;const Q=[{id:"chatterbox",name:"Chatterbox",badge:"recommended"},{id:"kokoro",name:"Kokoro",badge:"faster but lower quality"}],L=[{id:"novia",name:"Novia",description:"Warm, conversational voice"},{id:"sarah",name:"Sarah",description:"Clear, professional tone"},{id:"alex",name:"Alex",description:"Friendly, approachable voice"},{id:"emma",name:"Emma",description:"Calm, soothing delivery"}];async function R(){if(t.trim()){s(5,g=!0),s(6,E=null),s(12,P=0),s(11,k=!1),s(14,de=t.length>30?t.substring(0,30)+"...":t);try{const C=gs();console.log("Access token for API call:",C?"Found ("+C.substring(0,10)+"...)":"None");const gt={text:t,voice_id:l.toLowerCase(),model_id:n.toLowerCase(),mode:a,access_token:C,parameters:{speed:N,stability:T,similarity:_,style_exaggeration:v}};console.log("Sending request to /api/tts/generate:",gt);const H=await fetch("/api/tts/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)});if(console.log("API response status:",H.status),!H.ok){const W=await H.text();throw console.error("API error response:",W),new Error(`HTTP error! status: ${H.status}, body: ${W}`)}const F=await H.json();if(console.log("API response result:",F),F.success&&F.audio_url)s(6,E=F.audio_url);else{const W=F.error||"Unknown error occurred";alert(`❌ ${W}`),s(6,E=null)}}catch(C){console.error("Error generating speech:",C),alert("❌ Network error: Failed to connect to the server"),s(6,E=null)}finally{s(5,g=!1)}}}function Ee(){M&&(k?M.pause():M.play())}function Me(){M&&(s(13,fe=M.duration),M.play())}function Y(){M&&s(12,P=M.currentTime)}function le(){s(11,k=!0)}function Ne(){s(11,k=!1)}function ne(){if(E){const C=document.createElement("a");C.href=E,C.download="speech.wav",C.click()}}function q(C){C.target.closest(".model-dropdown")||s(4,u=!1)}function he(){s(0,t=""),s(6,E=null)}const Tt=()=>s(3,a="api"),Z=()=>s(3,a="local");function Te(){t=this.value,s(0,t)}function Ie(C){$n[C?"unshift":"push"](()=>{M=C,s(15,M)})}const He=()=>s(4,u=!u),mt=C=>{s(2,n=C.name),s(4,u=!1)},Fe=C=>s(1,l=C.name);function Oe(){N=Al(this.value),s(7,N)}function pe(){T=Al(this.value),s(8,T)}function se(){_=Al(this.value),s(9,_)}function ie(){v=Al(this.value),s(10,v)}return[t,l,n,a,u,g,E,N,T,_,v,k,P,fe,de,M,Q,L,R,Ee,Me,Y,le,Ne,ne,q,he,Tt,Z,Te,Ie,He,mt,Fe,Oe,pe,se,ie]}class vs extends Ye{constructor(e){super(),Ze(this,e,_s,ms,Le,{},null,[-1,-1])}}export{vs as component};
|
hfstudio/static/_app/immutable/nodes/3.Dy9JpshT.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{S as V,i as j,s as q,n as A,d,b as y,c as h,m as N,o as f,p as O,h as E,e as p,f as b,q as H,k as P,j as _,l as z,r as M,a as S,u as R,g as I,t as C}from"../chunks/9DiovRey.js";import"../chunks/IHki7fMi.js";import{g as F}from"../chunks/BjLLwVl5.js";import{p as B}from"../chunks/DHiQh_KC.js";function G(m){let s,t,l,e,r;return{c(){s=_("div"),t=_("div"),l=P(),e=_("p"),r=C(m[0]),this.h()},l(u){s=p(u,"DIV",{class:!0});var o=b(s);t=p(o,"DIV",{class:!0}),b(t).forEach(d),l=E(o),e=p(o,"P",{});var n=b(e);r=I(n,m[0]),n.forEach(d),o.forEach(d),this.h()},h(){f(t,"class","animate-spin w-8 h-8 border-2 border-amber-400 border-t-transparent rounded-full mx-auto mb-2"),f(s,"class","text-gray-600 mb-4")},m(u,o){y(u,s,o),h(s,t),h(s,l),h(s,e),h(e,r)},p(u,o){o&1&&S(r,u[0])},d(u){u&&d(s)}}}function J(m){let s,t,l,e,r,u,o,n,k="Return to HFStudio",g,x;return{c(){s=_("div"),t=_("p"),l=C(m[0]),e=P(),r=_("p"),u=C(m[1]),o=P(),n=_("button"),n.textContent=k,this.h()},l(c){s=p(c,"DIV",{class:!0});var a=b(s);t=p(a,"P",{class:!0});var i=b(t);l=I(i,m[0]),i.forEach(d),e=E(a),r=p(a,"P",{class:!0});var v=b(r);u=I(v,m[1]),v.forEach(d),a.forEach(d),o=E(c),n=p(c,"BUTTON",{class:!0,"data-svelte-h":!0}),H(n)!=="svelte-lo2i5l"&&(n.textContent=k),this.h()},h(){f(t,"class","font-medium"),f(r,"class","text-sm mt-1"),f(s,"class","text-red-600 mb-4"),f(n,"class","px-4 py-2 bg-gradient-to-r from-amber-400 to-orange-500 text-white rounded-lg hover:from-amber-500 hover:to-orange-600 transition-colors")},m(c,a){y(c,s,a),h(s,t),h(t,l),h(s,e),h(s,r),h(r,u),y(c,o,a),y(c,n,a),g||(x=R(n,"click",m[2]),g=!0)},p(c,a){a&1&&S(l,c[0]),a&2&&S(u,c[1])},d(c){c&&(d(s),d(o),d(n)),g=!1,x()}}}function L(m){let s,t,l,e,r,u,o,n,k="HFStudio Authentication",g;function x(i,v){return i[1]?J:G}let c=x(m),a=c(m);return{c(){s=P(),t=_("div"),l=_("div"),e=_("div"),r=_("img"),o=P(),n=_("h1"),n.textContent=k,g=P(),a.c(),this.h()},l(i){O("svelte-17lku3q",document.head).forEach(d),s=E(i),t=p(i,"DIV",{class:!0});var D=b(t);l=p(D,"DIV",{class:!0});var T=b(l);e=p(T,"DIV",{class:!0});var w=b(e);r=p(w,"IMG",{src:!0,alt:!0,class:!0}),o=E(w),n=p(w,"H1",{class:!0,"data-svelte-h":!0}),H(n)!=="svelte-l7zisw"&&(n.textContent=k),g=E(w),a.l(w),w.forEach(d),T.forEach(d),D.forEach(d),this.h()},h(){document.title="Authenticating with Hugging Face - HFStudio",N(r.src,u="/assets/hf-logo.png")||f(r,"src",u),f(r,"alt","HF Logo"),f(r,"class","w-12 h-12 mx-auto mb-4"),f(n,"class","text-xl font-semibold mb-2"),f(e,"class","text-center"),f(l,"class","max-w-md w-full bg-white rounded-lg shadow-md p-6"),f(t,"class","min-h-screen flex items-center justify-center bg-gray-50")},m(i,v){y(i,s,v),y(i,t,v),h(t,l),h(l,e),h(e,r),h(e,o),h(e,n),h(e,g),a.m(e,null)},p(i,[v]){c===(c=x(i))&&a?a.p(i,v):(a.d(1),a=c(i),a&&(a.c(),a.m(e,null)))},i:A,o:A,d(i){i&&(d(s),d(t)),a.d()}}}function U(m,s,t){let l;z(m,B,o=>t(3,l=o));let e="Processing...",r=null;return M(async()=>{try{const o=l.url.searchParams.get("code"),n=l.url.searchParams.get("state"),k=l.url.searchParams.get("error"),g=l.url.searchParams.get("error_description");if(k){t(1,r=g||k),t(0,e="Authentication failed");return}if(!o){t(1,r="No authorization code received"),t(0,e="Authentication failed");return}const x=sessionStorage.getItem("oauth_state");if(x&&n!==x){t(1,r="Invalid state parameter"),t(0,e="Authentication failed");return}const c=await fetch("/api/auth/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:o})});if(!c.ok){const i=await c.text();throw console.error("Token exchange failed:",i),new Error(`Failed to exchange code for token: ${i}`)}const a=await c.json();localStorage.setItem("hf_access_token",a.access_token),t(0,e="Successfully authenticated!"),setTimeout(()=>{F("/")},2e3)}catch(o){t(1,r=o.message),t(0,e="Authentication failed")}}),[e,r,()=>F("/")]}class Y extends V{constructor(s){super(),j(this,s,U,L,q,{})}}export{Y as component};
|
pyproject.toml
CHANGED
|
@@ -28,6 +28,10 @@ dependencies = [
|
|
| 28 |
"uvicorn[standard]>=0.20.0",
|
| 29 |
"typer[all]>=0.9.0",
|
| 30 |
"pydantic>=2.0.0",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
]
|
| 32 |
|
| 33 |
[project.optional-dependencies]
|
|
|
|
| 28 |
"uvicorn[standard]>=0.20.0",
|
| 29 |
"typer[all]>=0.9.0",
|
| 30 |
"pydantic>=2.0.0",
|
| 31 |
+
"huggingface-hub>=0.20.0",
|
| 32 |
+
"httpx>=0.25.0",
|
| 33 |
+
"numpy>=1.21.0",
|
| 34 |
+
"soundfile>=0.12.0",
|
| 35 |
]
|
| 36 |
|
| 37 |
[project.optional-dependencies]
|