GitHub Action commited on
Commit
8ddb1dd
·
1 Parent(s): eb03a8e

Sync from GitHub: bfc82fce359dc7c52eb1c021caff7176188e669c

Browse files
.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/package-lock.json CHANGED
@@ -14,6 +14,7 @@
14
  "clsx": "^2.0.0",
15
  "lucide-svelte": "^0.303.0",
16
  "mode-watcher": "^0.2.0",
 
17
  "svelte-sonner": "^0.3.19",
18
  "tailwind-merge": "^2.2.0",
19
  "tailwind-variants": "^0.1.19",
@@ -2382,6 +2383,15 @@
2382
  "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
2383
  }
2384
  },
 
 
 
 
 
 
 
 
 
2385
  "node_modules/queue-microtask": {
2386
  "version": "1.2.3",
2387
  "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
 
14
  "clsx": "^2.0.0",
15
  "lucide-svelte": "^0.303.0",
16
  "mode-watcher": "^0.2.0",
17
+ "prismjs": "^1.30.0",
18
  "svelte-sonner": "^0.3.19",
19
  "tailwind-merge": "^2.2.0",
20
  "tailwind-variants": "^0.1.19",
 
2383
  "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
2384
  }
2385
  },
2386
+ "node_modules/prismjs": {
2387
+ "version": "1.30.0",
2388
+ "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz",
2389
+ "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==",
2390
+ "license": "MIT",
2391
+ "engines": {
2392
+ "node": ">=6"
2393
+ }
2394
+ },
2395
  "node_modules/queue-microtask": {
2396
  "version": "1.2.3",
2397
  "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
frontend/package.json CHANGED
@@ -29,6 +29,7 @@
29
  "clsx": "^2.0.0",
30
  "lucide-svelte": "^0.303.0",
31
  "mode-watcher": "^0.2.0",
 
32
  "svelte-sonner": "^0.3.19",
33
  "tailwind-merge": "^2.2.0",
34
  "tailwind-variants": "^0.1.19",
 
29
  "clsx": "^2.0.0",
30
  "lucide-svelte": "^0.303.0",
31
  "mode-watcher": "^0.2.0",
32
+ "prismjs": "^1.30.0",
33
  "svelte-sonner": "^0.3.19",
34
  "tailwind-merge": "^2.2.0",
35
  "tailwind-variants": "^0.1.19",
frontend/src/routes/+page.svelte CHANGED
@@ -1,21 +1,6 @@
1
  <script>
2
  import { Play, Download, Loader2, AlertCircle, ChevronDown, Copy, RefreshCw, Share, MoreHorizontal, Settings, Sliders, Pause, SkipBack, SkipForward, Layout, Code } from 'lucide-svelte';
3
 
4
- // Simple Python syntax highlighting
5
- function highlightPython(code) {
6
- return code
7
- // Keywords
8
- .replace(/\b(import|from|def|class|if|else|elif|try|except|finally|with|as|return|for|while|in|is|not|and|or|None|True|False|print|open)\b/g, '<span class="text-blue-600 font-medium">$1</span>')
9
- // Strings
10
- .replace(/("""[\s\S]*?"""|'''[\s\S]*?'''|"[^"]*"|'[^']*')/g, '<span class="text-green-600">$1</span>')
11
- // Comments
12
- .replace(/(#[^\n]*)/g, '<span class="text-gray-500 italic">$1</span>')
13
- // Numbers
14
- .replace(/\b(\d+\.?\d*)\b/g, '<span class="text-purple-600">$1</span>')
15
- // Functions
16
- .replace(/(\w+)(\()/g, '<span class="text-amber-600">$1</span>$2');
17
- }
18
-
19
  let text = `In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.`;
20
  let selectedVoice = 'Novia';
21
  let selectedModel = 'Chatterbox';
@@ -51,8 +36,10 @@
51
  ];
52
 
53
  async function generateSpeech() {
 
54
  if (!text.trim()) return;
55
 
 
56
  isGenerating = true;
57
  audioUrl = null;
58
  currentTime = 0;
@@ -63,12 +50,12 @@
63
  }
64
  addCodeCell('Generate Speech', generateTTSCode());
65
 
66
- // Flash the code button to draw attention
67
  if (viewMode === 'ui') {
68
  codeButtonFlash = true;
69
  setTimeout(() => {
70
  codeButtonFlash = false;
71
- }, 1000);
72
  }
73
  isPlaying = false;
74
 
@@ -120,12 +107,12 @@
120
  // Add code cell for saving the audio
121
  addCodeCell('Save Audio Output', generateSaveCode());
122
 
123
- // Flash the code button again for the save code
124
  if (viewMode === 'ui') {
125
  codeButtonFlash = true;
126
  setTimeout(() => {
127
  codeButtonFlash = false;
128
- }, 1000);
129
  }
130
  } else {
131
  // Show error message to user
@@ -306,7 +293,7 @@
306
  }
307
 
308
  function generateSetupCode() {
309
- const token = getHuggingFaceToken();
310
  const tokenDisplay = token ? 'YOUR_HF_TOKEN' : 'YOUR_HF_TOKEN';
311
 
312
  return `# Install required packages
@@ -434,7 +421,7 @@ print(f"✓ Audio saved to {output_filename}")
434
  on:click={() => viewMode = 'code'}
435
  >
436
  <Code size={14} />
437
- Code
438
  {#if codeButtonFlash}
439
  <span class="flash-sweep"></span>
440
  {/if}
@@ -820,7 +807,7 @@ print(f"✓ Audio saved to {output_filename}")
820
 
821
  <!-- Code content -->
822
  <div class="relative">
823
- <pre class="p-4 overflow-x-auto bg-gray-50"><code class="language-python text-sm">{@html highlightPython(cell.code)}</code></pre>
824
  </div>
825
 
826
  <!-- Output (if any) -->
@@ -859,6 +846,12 @@ print(f"✓ Audio saved to {output_filename}")
859
  0% {
860
  left: -100%;
861
  }
 
 
 
 
 
 
862
  100% {
863
  left: 100%;
864
  }
@@ -872,16 +865,16 @@ print(f"✓ Audio saved to {output_filename}")
872
  height: 100%;
873
  background: linear-gradient(90deg,
874
  transparent 0%,
875
- rgba(251, 191, 36, 0.4) 25%,
876
- rgba(249, 115, 22, 0.6) 50%,
877
- rgba(251, 191, 36, 0.4) 75%,
878
  transparent 100%);
879
- animation: sweep 0.8s ease-out;
880
  pointer-events: none;
881
  }
882
 
883
  .code-flash {
884
- animation: pulse 0.3s ease-out;
885
  }
886
 
887
  @keyframes pulse {
@@ -889,10 +882,45 @@ print(f"✓ Audio saved to {output_filename}")
889
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
890
  }
891
  50% {
892
- box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.3);
893
  }
894
  100% {
895
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
896
  }
897
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
898
  </style>
 
1
  <script>
2
  import { Play, Download, Loader2, AlertCircle, ChevronDown, Copy, RefreshCw, Share, MoreHorizontal, Settings, Sliders, Pause, SkipBack, SkipForward, Layout, Code } from 'lucide-svelte';
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  let text = `In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.`;
5
  let selectedVoice = 'Novia';
6
  let selectedModel = 'Chatterbox';
 
36
  ];
37
 
38
  async function generateSpeech() {
39
+ console.log('generateSpeech called, text:', text.trim().substring(0, 50));
40
  if (!text.trim()) return;
41
 
42
+ console.log('Starting generation...');
43
  isGenerating = true;
44
  audioUrl = null;
45
  currentTime = 0;
 
50
  }
51
  addCodeCell('Generate Speech', generateTTSCode());
52
 
53
+ // Flash the API Recorder button to draw attention
54
  if (viewMode === 'ui') {
55
  codeButtonFlash = true;
56
  setTimeout(() => {
57
  codeButtonFlash = false;
58
+ }, 2500);
59
  }
60
  isPlaying = false;
61
 
 
107
  // Add code cell for saving the audio
108
  addCodeCell('Save Audio Output', generateSaveCode());
109
 
110
+ // Flash the API Recorder button again for the save code
111
  if (viewMode === 'ui') {
112
  codeButtonFlash = true;
113
  setTimeout(() => {
114
  codeButtonFlash = false;
115
+ }, 2500);
116
  }
117
  } else {
118
  // Show error message to user
 
293
  }
294
 
295
  function generateSetupCode() {
296
+ const token = getAccessToken();
297
  const tokenDisplay = token ? 'YOUR_HF_TOKEN' : 'YOUR_HF_TOKEN';
298
 
299
  return `# Install required packages
 
421
  on:click={() => viewMode = 'code'}
422
  >
423
  <Code size={14} />
424
+ API Recorder
425
  {#if codeButtonFlash}
426
  <span class="flash-sweep"></span>
427
  {/if}
 
807
 
808
  <!-- Code content -->
809
  <div class="relative">
810
+ <pre class="p-4 overflow-x-auto bg-gray-50 text-gray-900"><code class="language-python text-sm font-mono">{cell.code}</code></pre>
811
  </div>
812
 
813
  <!-- Output (if any) -->
 
846
  0% {
847
  left: -100%;
848
  }
849
+ 20% {
850
+ left: -100%;
851
+ }
852
+ 80% {
853
+ left: 100%;
854
+ }
855
  100% {
856
  left: 100%;
857
  }
 
865
  height: 100%;
866
  background: linear-gradient(90deg,
867
  transparent 0%,
868
+ rgba(251, 191, 36, 0.5) 25%,
869
+ rgba(249, 115, 22, 0.8) 50%,
870
+ rgba(251, 191, 36, 0.5) 75%,
871
  transparent 100%);
872
+ animation: sweep 2s ease-in-out;
873
  pointer-events: none;
874
  }
875
 
876
  .code-flash {
877
+ animation: pulse 0.5s ease-out;
878
  }
879
 
880
  @keyframes pulse {
 
882
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
883
  }
884
  50% {
885
+ box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.4);
886
  }
887
  100% {
888
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
889
  }
890
  }
891
+
892
+ /* Prism.js syntax highlighting styles */
893
+ .prism-code .token.comment {
894
+ color: #6b7280; /* gray-500 */
895
+ font-style: italic;
896
+ }
897
+
898
+ .prism-code .token.string {
899
+ color: #059669; /* emerald-600 */
900
+ }
901
+
902
+ .prism-code .token.keyword {
903
+ color: #2563eb; /* blue-600 */
904
+ font-weight: 600;
905
+ }
906
+
907
+ .prism-code .token.function {
908
+ color: #d97706; /* amber-600 */
909
+ }
910
+
911
+ .prism-code .token.number {
912
+ color: #7c3aed; /* violet-600 */
913
+ }
914
+
915
+ .prism-code .token.operator {
916
+ color: #374151; /* gray-700 */
917
+ }
918
+
919
+ .prism-code .token.punctuation {
920
+ color: #6b7280; /* gray-500 */
921
+ }
922
+
923
+ .prism-code .token.class-name {
924
+ color: #dc2626; /* red-600 */
925
+ }
926
  </style>
hfstudio/static/_app/immutable/assets/0.DBHxtHYB.css ADDED
@@ -0,0 +1 @@
 
 
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 5.9% 10%;--radius: .5rem}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-2{left:.5rem}.left-56{left:14rem}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.right-80{right:20rem}.top-full{top:100%}.z-10{z-index:10}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.block{display:block}.flex{display:flex}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-2{height:.5rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-12{width:3rem}.w-2{width:.5rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.bg-right{background-position:right}.bg-no-repeat{background-repeat:no-repeat}.p-0\.5{padding:.125rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-24{padding-bottom:6rem}.pr-10{padding-right:2.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.slider-hf::-webkit-slider-thumb{height:1rem;width:1rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;background:linear-gradient(45deg,#ffd21e,#ff9d00);box-shadow:0 1px 3px #0000001a}.slider-hf::-moz-range-thumb{height:1rem;width:1rem;cursor:pointer;border-radius:9999px;border-width:0px;background:linear-gradient(45deg,#ffd21e,#ff9d00);box-shadow:0 1px 3px #0000001a}.pause-filled{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px}.pause-filled:before,.pause-filled:after{content:"";width:2px;height:10px;background-color:currentColor;border-radius:1px}.pause-filled:before{margin-right:2px}.pause-filled:after{margin-left:2px}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-orange-600:hover{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.hover\:from-amber-500:hover{--tw-gradient-from: #f59e0b var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-orange-600:hover{--tw-gradient-to: #ea580c var(--tw-gradient-to-position)}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-amber-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(251 191 36 / var(--tw-ring-opacity, 1))}.focus\:ring-orange-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}
hfstudio/static/_app/immutable/assets/2.We9sRuZI.css ADDED
@@ -0,0 +1 @@
 
 
1
+ @keyframes svelte-10276gt-fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.animate-fade-in.svelte-10276gt{animation:svelte-10276gt-fade-in .3s ease-out}@keyframes svelte-10276gt-sweep{0%{left:-100%}20%{left:-100%}80%{left:100%}to{left:100%}}.flash-sweep.svelte-10276gt{position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent 0%,rgba(251,191,36,.5) 25%,rgba(249,115,22,.8) 50%,rgba(251,191,36,.5) 75%,transparent 100%);animation:svelte-10276gt-sweep 2s ease-in-out;pointer-events:none}.code-flash.svelte-10276gt{animation:svelte-10276gt-pulse .5s ease-out}@keyframes svelte-10276gt-pulse{0%{box-shadow:0 0 #fbbf2400}50%{box-shadow:0 0 0 6px #fbbf2466}to{box-shadow:0 0 #fbbf2400}}
hfstudio/static/_app/immutable/chunks/A_pQz6w4.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ var kt=Object.defineProperty;var Et=(e,t,n)=>t in e?kt(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,G as Rt,Y as Tt,Z as Ut,_ as It,$ as Lt,a0 as $t,a1 as xt,r as ve,a2 as Ct,H as be,n as ge,s as Pt}from"./BI_gvUUO.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:$t,onDestroy:xt,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 Bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function Ft(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 zt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&G.delete(Ue(e)),zt(e,t));const G=new Map;function Gt(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&&G.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 Yt(e,t,n){if(G.size>0){const r=Ue(e,n),a=G.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);G.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 Ht=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Kt(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=Ht.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}=Kt(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 $=((Xe=globalThis.__sveltekit_15blozf)==null?void 0:Xe.base)??"";var Ze;const Qt=((Ze=globalThis.__sveltekit_15blozf)==null?void 0:Ze.assets)??$??"",en="1760679521635",tt="sveltekit:snapshot",nt="sveltekit:scroll",at="sveltekit:states",tn="sveltekit:pageurl",F="sveltekit:history",K="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 B(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 Se(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=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(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",Sn=".html__data.json";function kn(e){return e.endsWith(".html")?e.replace(/\.html$/,Sn):e.replace(/\/$/,"")+bn}const ze={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 $e(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($||"/");e&&await e.update()}}function Ge(){}let xe,ke,ne,x,Ee,k;const ae=[],re=[];let I=null;const Q=new Map,lt=new Set,Un=new Set,Y=new Set;let b={branch:[],error:null,url:null},Ce=!1,oe=!1,Ye=!0,X=!1,z=!1,ft=!1,Pe=!1,ut,A,L,N;const H=new Set,He=new Map;async function Hn(e,t,n){var s,i,o,c,l;(s=globalThis.__sveltekit_15blozf)!=null&&s.data&&globalThis.__sveltekit_15blozf.data,document.URL!==location.href&&(location.href=location.href),k=e,await((o=(i=e.hooks).init)==null?void 0:o.call(i)),xe=Zt(e),x=document.documentElement,Ee=t,ke=e.nodes[0],ne=e.nodes[1],ke(),ne(),A=(c=history.state)==null?void 0:c[F],L=(l=history.state)==null?void 0:l[K],A||(A=L=Date.now(),history.replaceState({...history.state,[F]:A,[K]: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(k.hash?Fn(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 Ke(){$e(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=[...He.keys()]),t.invalidate&&t.invalidate.forEach(Nn)}}),t.invalidateAll&&be().then(be).then(()=>{He.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={};H.add(t),I={id:e.id,token:t,promise:_t({...e,preload:t}).then(n=>(H.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 k.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()};Y.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($&&(e.pathname===$||e.pathname===$+"/"))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:ze,current:ze},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:Ft(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},k.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?Yt(r,a.href,t):Gt(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 $n(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 H.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=$n(b.url,n);let p=!1;const u=l.map((w,m)=>{var P;const v=b.branch[m],S=!!(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 S&&(p=!0),S});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 H.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],S=g==null?void 0:g[m];if((!S||S.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,(S==null?void 0:S.type)==="error")throw S;return Oe({loader:w[1],url:n,params:r,route:a,parent:async()=>{var Fe;const Be={};for(let pe=0;pe<m;pe+=1)Object.assign(Be,(Fe=await U[pe])==null?void 0:Fe.data);return Be},server_data_node:Ne(S===void 0&&w[0]?{type:"skip"}:S??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(H.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),S;if(g!=null&&g.includes(m))v=m.status??v,S=m.error;else if(m instanceof ce)S=m.body;else{if(await C.updated.check())return await ct(),await q(n);S=await V(m,{params:r,url:n,route:{id:a.id}})}const P=await xn(w,E,i);return P?se({url:n,params:r,branch:E.slice(0,P.idx).concat(P.node),status:v,error:S,route:a}):await yt(n,{id:a.id},S,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 xn(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(k.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:ke,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 k.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);k.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,$,k.hash)){const n=await Cn(e);if(!n)return;const r=Pn(n);for(const a of xe){const s=a.exec(r);if(s)return{id:ie(e),invalidating:t,route:a,params:Bt(s),url:e}}}}function Pn(e){return Dt(k.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice($.length))||"/"}function ie(e){return(k.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=Ge,block:d=Ge,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,$,k.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(),$e(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={[F]:A+=m,[K]: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(S=>{Y.delete(S)})};m.push(v),m.forEach(S=>{Y.add(S)})}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(Ye){const m=t.hash&&document.getElementById(St(t));if(E)scrollTo(E.x,E.y);else if(m){m.scrollIntoView();const{top:v,left:S}=m.getBoundingClientRect();E={x:pageXOffset+S,y:pageYOffset+v}}else scrollTo(0,0)}const w=document.activeElement!==U&&document.activeElement!==document.body;!r&&!w&&Bn(t,E),Ye=!0,_.props.page&&Object.assign(T,_.props.page),X=!1,e==="popstate"&&ht(L),p.fulfil(void 0),Y.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;x.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)}x.addEventListener("mousedown",r),x.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,x),d=l===t&&c>=n;if(!l||d)return;const{url:h,external:y,download:f}=Se(l,$,k.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 x.querySelectorAll("a")){const{url:c,external:l,download:d}=Se(o,$,k.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))}}Y.add(i),i()}function V(e,t){if(e instanceof ce)return e.body;const n=te(e),r=wn(e);return k.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Kn(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(Ke(),!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"&&Ke()}),(t=navigator.connection)!=null&&t.saveData||On(),x.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],x);if(!r)return;const{url:a,external:s,target:i,download:o}=Se(r,$,k.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]=(k.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(z=!0,$e(A),e(a),!c.replace_state)return;z=!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})}),x.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,$,!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[F]){const a=n.state[F];if(N={},a===A)return;const s=j[a],i=n.state[at]??{},o=new URL(n.state[tn]??location.href),c=n.state[K],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(!z){const a=new URL(location.href);e(a),k.hash&&location.reload()}}}),addEventListener("hashchange",()=>{z&&(z=!1,history.replaceState({...history.state,[F]:++A,[K]: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=xe.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:k.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=kn(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,{...k.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 Bn(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=St(e);if(r&&document.getElementById(r)){const{x:s,y:i}=t??le();setTimeout(()=>{const o=history.state;Ae=!0,location.replace(`#${r}`),k.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 Fn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function St(e){let t;if(k.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Hn as a,Kn as g,qn as l,C as s};
hfstudio/static/_app/immutable/chunks/Bt6XZmgQ.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{s as e}from"./A_pQz6w4.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.pMgeiL_r.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.D8G6wrKC.js","../chunks/BI_gvUUO.js","../chunks/IHki7fMi.js","../assets/0.DBHxtHYB.css","../nodes/1.alvLztP8.js","../chunks/Bt6XZmgQ.js","../chunks/A_pQz6w4.js","../nodes/2.BL8tuR7b.js","../assets/2.We9sRuZI.css","../nodes/3.WlLGF3D1.js"])))=>i.map(i=>d[i]);
2
+ import{S as C,i as q,s as B,d,x as h,y as g,D as S,E as A,b as E,h as U,F as w,k as F,G,r as H,H as J,I as y,J as P,K as R,L,M as N,o as D,N as p,e as K,f as W,j as z,O as I,a as Q,g as X,t as Y}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";const Z="modulepreload",M=function(o,e){return new URL(o,e).href},T={},O=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 T)return;T[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&&N(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){S();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&&N(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){S();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&&N(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){S();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 V(o){let e,n=o[7]&&j(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=j(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&d(e),n&&n.d()}}}function j(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]&&V(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,_):(S(),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=V(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 C{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=[()=>O(()=>import("../nodes/0.D8G6wrKC.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>O(()=>import("../nodes/1.alvLztP8.js"),__vite__mapDeps([4,1,2,5,6]),import.meta.url),()=>O(()=>import("../nodes/2.BL8tuR7b.js"),__vite__mapDeps([7,1,2,8]),import.meta.url),()=>O(()=>import("../nodes/3.WlLGF3D1.js"),__vite__mapDeps([9,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.DK66rcHD.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as o,a as r}from"../chunks/A_pQz6w4.js";export{o as load_css,r as start};
hfstudio/static/_app/immutable/nodes/0.D8G6wrKC.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import{S as we,i as Te,s as Ce,v as Ie,d as v,w as ye,x as Le,y as Ee,o as r,z as Se,A as He,B as Me,b as X,c as s,u as te,m as Ae,e as i,f as N,q as L,h as x,j as c,k as y,r as Ne,C as be,a as ge,g as se,t as ne,n as Ue}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";function Pe(u){let t,e="Sign In";return{c(){t=c("span"),t.textContent=e},l(o){t=i(o,"SPAN",{"data-svelte-h":!0}),L(t)!=="svelte-6n3gky"&&(t.textContent=e)},m(o,f){X(o,t,f)},p:Ue,d(o){o&&v(t)}}}function Be(u){let t,e,o;return{c(){t=c("span"),e=ne("Sign Out, "),o=ne(u[2])},l(f){t=i(f,"SPAN",{});var b=N(t);e=se(b,"Sign Out, "),o=se(b,u[2]),b.forEach(v)},m(f,b){X(f,t,b),s(t,e),s(t,o)},p(f,b){b&4&&ge(o,f[2])},d(f){f&&v(t)}}}function je(u){let t,e,o=u[1]?"logged in":"not logged in",f,b;return{c(){t=c("span"),e=ne("Checking... ("),f=ne(o),b=ne(")")},l(n){t=i(n,"SPAN",{});var a=N(t);e=se(a,"Checking... ("),f=se(a,o),b=se(a,")"),a.forEach(v)},m(n,a){X(n,t,a),s(t,e),s(t,f),s(t,b)},p(n,a){a&2&&o!==(o=n[1]?"logged in":"not logged in")&&ge(f,o)},d(n){n&&v(t)}}}function ve(u){let t,e,o,f="Sign In with HuggingFace Token",b,n,a,q="<strong>Manual Token Entry:</strong> Please enter your HuggingFace token.",I,g,U=`1. Go to <a href="https://huggingface.co/settings/tokens" target="_blank" class="underline text-blue-600">HuggingFace Settings</a><br/>
2
+ 2. Create a new token with &quot;Inference API&quot; permissions<br/>
3
+ 3. Copy and paste it below`,G,R,m,j,W="HuggingFace Token",z,_,J,Y,w,l,d="Cancel",k,H,Z="Sign In",O,oe,T=u[6]&&ke(),h=u[5]&&xe(u);return{c(){t=c("div"),e=c("div"),o=c("h2"),o.textContent=f,b=y(),n=c("div"),a=c("p"),a.innerHTML=q,I=y(),g=c("p"),g.innerHTML=U,G=y(),T&&T.c(),R=y(),m=c("div"),j=c("label"),j.textContent=W,z=y(),_=c("input"),J=y(),h&&h.c(),Y=y(),w=c("div"),l=c("button"),l.textContent=d,k=y(),H=c("button"),H.textContent=Z,this.h()},l(M){t=i(M,"DIV",{class:!0});var V=N(t);e=i(V,"DIV",{class:!0});var A=N(e);o=i(A,"H2",{class:!0,"data-svelte-h":!0}),L(o)!=="svelte-1t0ehet"&&(o.textContent=f),b=x(A),n=i(A,"DIV",{class:!0});var C=N(n);a=i(C,"P",{class:!0,"data-svelte-h":!0}),L(a)!=="svelte-344vn4"&&(a.innerHTML=q),I=x(C),g=i(C,"P",{class:!0,"data-svelte-h":!0}),L(g)!=="svelte-1ffvpx3"&&(g.innerHTML=U),G=x(C),T&&T.l(C),C.forEach(v),R=x(A),m=i(A,"DIV",{class:!0});var P=N(m);j=i(P,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),L(j)!=="svelte-vtbmxo"&&(j.textContent=W),z=x(P),_=i(P,"INPUT",{id:!0,type:!0,placeholder:!0,class:!0}),J=x(P),h&&h.l(P),P.forEach(v),Y=x(A),w=i(A,"DIV",{class:!0});var Q=N(w);l=i(Q,"BUTTON",{class:!0,"data-svelte-h":!0}),L(l)!=="svelte-csk0rj"&&(l.textContent=d),k=x(Q),H=i(Q,"BUTTON",{class:!0,"data-svelte-h":!0}),L(H)!=="svelte-1nxas5u"&&(H.textContent=Z),Q.forEach(v),A.forEach(v),V.forEach(v),this.h()},h(){r(o,"class","text-xl font-semibold mb-4"),r(a,"class","text-blue-800 mb-2"),r(g,"class","text-blue-700"),r(n,"class","mb-4 p-3 bg-blue-50 rounded-md text-sm"),r(j,"for","token"),r(j,"class","block text-sm font-medium text-gray-700 mb-2"),r(_,"id","token"),r(_,"type","password"),r(_,"placeholder","hf_..."),r(_,"class","w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent"),r(m,"class","mb-4"),r(l,"class","px-4 py-2 text-gray-600 hover:text-gray-800 transition-colors"),r(H,"class","px-4 py-2 bg-orange-500 text-white rounded-md hover:bg-orange-600 transition-colors"),r(w,"class","flex justify-end gap-3"),r(e,"class","bg-white rounded-lg p-6 max-w-md w-full mx-4 shadow-xl"),r(t,"class","fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50")},m(M,V){X(M,t,V),s(t,e),s(e,o),s(e,b),s(e,n),s(n,a),s(n,I),s(n,g),s(n,G),T&&T.m(n,null),s(e,R),s(e,m),s(m,j),s(m,z),s(m,_),be(_,u[4]),s(m,J),h&&h.m(m,null),s(e,Y),s(e,w),s(w,l),s(w,k),s(w,H),O||(oe=[te(_,"input",u[14]),te(_,"keydown",u[15]),te(l,"click",u[9]),te(H,"click",u[10])],O=!0)},p(M,V){M[6]?T||(T=ke(),T.c(),T.m(n,null)):T&&(T.d(1),T=null),V&16&&_.value!==M[4]&&be(_,M[4]),M[5]?h?h.p(M,V):(h=xe(M),h.c(),h.m(m,null)):h&&(h.d(1),h=null)},d(M){M&&v(t),T&&T.d(),h&&h.d(),O=!1,ye(oe)}}}function ke(u){let t,e="<strong>Tip:</strong> You can also run <code>huggingface-cli login</code> in your terminal to automatically use your local token.";return{c(){t=c("p"),t.innerHTML=e,this.h()},l(o){t=i(o,"P",{class:!0,"data-svelte-h":!0}),L(t)!=="svelte-1gg2uwy"&&(t.innerHTML=e),this.h()},h(){r(t,"class","text-blue-600 mt-2")},m(o,f){X(o,t,f)},d(o){o&&v(t)}}}function xe(u){let t,e;return{c(){t=c("p"),e=ne(u[5]),this.h()},l(o){t=i(o,"P",{class:!0});var f=N(t);e=se(f,u[5]),f.forEach(v),this.h()},h(){r(t,"class","text-red-600 text-sm mt-1")},m(o,f){X(o,t,f),s(t,e)},p(o,f){f&32&&ge(e,o[5])},d(o){o&&v(t)}}}function De(u){let t,e,o,f='<div class="flex items-center gap-3"><img src="/assets/hf-studio-logo.png" alt="HF Logo" class="w-8 h-8"/> <h1 class="text-xl font-semibold">HFStudio<sup class="text-xs text-gray-500 ml-1">BETA</sup></h1></div>',b,n,a,q="Tasks",I,g,U,G="🎙️",R,m,j="Text to Speech",W,z,_,J="<span>🎵</span> <span>Voice Cloning</span>",Y,w,l="<span>🎧</span> <span>Speech to Text</span>",d,k,H="<span>🎼</span> <span>Sound Effects</span>",Z,O,oe="<span>🎸</span> <span>Music Generation</span>",T,h,M="<span>🔊</span> <span>Audio Enhancement</span>",V,A,C,P,Q,ie,ce,$,ue,K,fe,pe;function he(p,S){return p[7]?je:p[1]?Be:Pe}let le=he(u),F=le(u);const de=u[12].default,D=Ie(de,u,u[11],null);let E=u[3]&&ve(u);return{c(){t=c("div"),e=c("aside"),o=c("div"),o.innerHTML=f,b=y(),n=c("nav"),a=c("div"),a.textContent=q,I=y(),g=c("button"),U=c("span"),U.textContent=G,R=y(),m=c("span"),m.textContent=j,z=y(),_=c("button"),_.innerHTML=J,Y=y(),w=c("button"),w.innerHTML=l,d=y(),k=c("button"),k.innerHTML=H,Z=y(),O=c("button"),O.innerHTML=oe,T=y(),h=c("button"),h.innerHTML=M,V=y(),A=c("div"),C=c("button"),P=c("img"),ie=y(),F.c(),ce=y(),$=c("main"),D&&D.c(),ue=y(),E&&E.c(),this.h()},l(p){t=i(p,"DIV",{class:!0});var S=N(t);e=i(S,"ASIDE",{class:!0});var ee=N(e);o=i(ee,"DIV",{class:!0,"data-svelte-h":!0}),L(o)!=="svelte-1vahj38"&&(o.innerHTML=f),b=x(ee),n=i(ee,"NAV",{class:!0});var B=N(n);a=i(B,"DIV",{class:!0,"data-svelte-h":!0}),L(a)!=="svelte-1x5465q"&&(a.textContent=q),I=x(B),g=i(B,"BUTTON",{class:!0});var ae=N(g);U=i(ae,"SPAN",{"data-svelte-h":!0}),L(U)!=="svelte-1yx42xi"&&(U.textContent=G),R=x(ae),m=i(ae,"SPAN",{"data-svelte-h":!0}),L(m)!=="svelte-2j89jk"&&(m.textContent=j),ae.forEach(v),z=x(B),_=i(B,"BUTTON",{class:!0,"data-svelte-h":!0}),L(_)!=="svelte-10dl8nf"&&(_.innerHTML=J),Y=x(B),w=i(B,"BUTTON",{class:!0,"data-svelte-h":!0}),L(w)!=="svelte-wf0x5d"&&(w.innerHTML=l),d=x(B),k=i(B,"BUTTON",{class:!0,"data-svelte-h":!0}),L(k)!=="svelte-x7bha3"&&(k.innerHTML=H),Z=x(B),O=i(B,"BUTTON",{class:!0,"data-svelte-h":!0}),L(O)!=="svelte-1tyblmt"&&(O.innerHTML=oe),T=x(B),h=i(B,"BUTTON",{class:!0,"data-svelte-h":!0}),L(h)!=="svelte-1emrjb3"&&(h.innerHTML=M),B.forEach(v),V=x(ee),A=i(ee,"DIV",{class:!0});var me=N(A);C=i(me,"BUTTON",{class:!0});var re=N(C);P=i(re,"IMG",{src:!0,alt:!0,class:!0}),ie=x(re),F.l(re),re.forEach(v),me.forEach(v),ee.forEach(v),ce=x(S),$=i(S,"MAIN",{class:!0});var _e=N($);D&&D.l(_e),_e.forEach(v),ue=x(S),E&&E.l(S),S.forEach(v),this.h()},h(){r(o,"class","p-4 border-b border-gray-200"),r(a,"class","mt-2 mb-1 px-2 text-xs font-medium text-gray-500 uppercase"),r(g,"class",W="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(u[0]==="tts"?"bg-gray-100":"")),r(_,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),_.disabled=!0,r(w,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),w.disabled=!0,r(k,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),k.disabled=!0,r(O,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),O.disabled=!0,r(h,"class","w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left opacity-40 cursor-not-allowed"),h.disabled=!0,r(n,"class","p-2 text-sm"),Ae(P.src,Q="/assets/hf-logo.png")||r(P,"src",Q),r(P,"alt","HF Logo"),r(P,"class","w-5 h-5"),C.disabled=u[7],r(C,"class","w-full px-6 py-3 bg-black text-white rounded-lg font-medium hover:bg-gray-800 transition-colors shadow-sm flex items-center justify-center gap-2 text-sm disabled:opacity-50 disabled:cursor-not-allowed"),r(A,"class","absolute bottom-4 left-2 right-2 w-52"),r(e,"class","w-56 border-r border-gray-200 bg-white flex-shrink-0 "),r($,"class","flex-1 overflow-auto"),r(t,"class","flex h-screen bg-white")},m(p,S){X(p,t,S),s(t,e),s(e,o),s(e,b),s(e,n),s(n,a),s(n,I),s(n,g),s(g,U),s(g,R),s(g,m),s(n,z),s(n,_),s(n,Y),s(n,w),s(n,d),s(n,k),s(n,Z),s(n,O),s(n,T),s(n,h),s(e,V),s(e,A),s(A,C),s(C,P),s(C,ie),F.m(C,null),s(t,ce),s(t,$),D&&D.m($,null),s(t,ue),E&&E.m(t,null),K=!0,fe||(pe=[te(g,"click",u[13]),te(C,"click",u[8])],fe=!0)},p(p,[S]){(!K||S&1&&W!==(W="w-full flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-gray-100 transition-colors text-left "+(p[0]==="tts"?"bg-gray-100":"")))&&r(g,"class",W),le===(le=he(p))&&F?F.p(p,S):(F.d(1),F=le(p),F&&(F.c(),F.m(C,null))),(!K||S&128)&&(C.disabled=p[7]),D&&D.p&&(!K||S&2048)&&Se(D,de,p,p[11],K?Me(de,p[11],S,null):He(p[11]),null),p[3]?E?E.p(p,S):(E=ve(p),E.c(),E.m(t,null)):E&&(E.d(1),E=null)},i(p){K||(Ee(D,p),K=!0)},o(p){Le(D,p),K=!1},d(p){p&&v(t),F.d(),D&&D.d(p),E&&E.d(),fe=!1,ye(pe)}}}function Oe(u,t,e){let{$$slots:o={},$$scope:f}=t,b="tts",n=!1,a="",q=!1,I="",g="",U=!1,G=!0;Ne(()=>{console.log("onMount called - starting auth check"),R(),m(),document.addEventListener("visibilitychange",()=>{document.hidden||m()}),window.addEventListener("storage",m);const l=setInterval(m,1e3);return()=>{window.removeEventListener("storage",m),clearInterval(l)}});async function R(){try{console.log("Checking local token availability...");const d=await(await fetch("/api/auth/local-token")).json();console.log("Local token response:",d),d.available?(e(6,U=!0),localStorage.setItem("hf_access_token",d.token),console.log("Set local token in localStorage"),d.user_info&&d.user_info.name!=="Local User"?(e(1,n=!0),e(2,a=d.user_info.name.split(" ")[0]),console.log("Logged in with user info:",a)):(e(1,n=!0),e(2,a="Local User"),console.log("Logged in with local token (validation skipped due to rate limiting)"),console.log("isLoggedIn set to:",n,"username set to:",a))):(e(6,U=!1),console.log("No local token available"))}catch(l){console.log("Could not check local token availability:",l),e(6,U=!1)}finally{e(7,G=!1),console.log("Finished checking auth, isLoggedIn:",n)}}function m(){const l=localStorage.getItem("hf_access_token");l&&!n?j(l):l||(e(1,n=!1),e(2,a=""))}async function j(l){try{console.log("Fetching user info for token:",l.substring(0,10)+"...");const d=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${l}`}});if(d.ok){const k=await d.json();e(1,n=!0);const H=k.name||k.fullname||k.login||k.username||"User";e(2,a=H.split(" ")[0]),console.log("Successfully fetched user info:",a)}else localStorage.removeItem("hf_access_token"),e(1,n=!1),e(2,a=""),console.log("Token validation failed:",d.status)}catch(d){localStorage.removeItem("hf_access_token"),e(1,n=!1),e(2,a=""),console.log("Error fetching user info:",d)}}async function W(){if(n)localStorage.removeItem("hf_access_token"),sessionStorage.removeItem("oauth_state"),e(1,n=!1),e(2,a="");else if(window.location.hostname.includes("hf.space")||window.location.hostname.includes("huggingface.co"))try{const d=await(await fetch("/api/auth/oauth-config")).json(),k=d.scopes||"read-repos write-repos manage-repos inference-api",H=`https://huggingface.co/oauth/authorize?client_id=${d.client_id}&redirect_uri=${encodeURIComponent(window.location.origin+"/auth/callback")}&scope=${encodeURIComponent(k)}&response_type=code&state=${Date.now()}`;window.location.href=H}catch(l){console.error("Failed to get OAuth config:",l),e(3,q=!0),e(4,I=""),e(5,g="")}else e(3,q=!0),e(4,I=""),e(5,g="")}function z(){e(3,q=!1),e(4,I=""),e(5,g="")}async function _(){if(!I.trim()){e(5,g="Please enter a token");return}if(!I.startsWith("hf_")){e(5,g='Token should start with "hf_"');return}try{const l=await fetch("https://huggingface.co/api/whoami-v2",{headers:{Authorization:`Bearer ${I.trim()}`}});if(l.ok){const d=await l.json();localStorage.setItem("hf_access_token",I.trim()),e(1,n=!0);const k=d.name||d.fullname||d.login||d.username||"User";e(2,a=k.split(" ")[0]),z()}else{const d=await l.text();console.log("Token validation error:",l.status,d),e(5,g=`Invalid token (${l.status}). Please check your token and try again.`)}}catch(l){console.error("Token validation error:",l),e(5,g="Error validating token. Please try again.")}}const J=()=>e(0,b="tts");function Y(){I=this.value,e(4,I)}const w=l=>l.key==="Enter"&&_();return u.$$set=l=>{"$$scope"in l&&e(11,f=l.$$scope)},[b,n,a,q,I,g,U,G,W,z,_,f,o,J,Y,w]}class qe extends we{constructor(t){super(),Te(this,t,Oe,De,Ce,{})}}export{qe as component};
hfstudio/static/_app/immutable/nodes/1.alvLztP8.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/BI_gvUUO.js";import"../chunks/IHki7fMi.js";import{p as C}from"../chunks/Bt6XZmgQ.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.BL8tuR7b.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{w as Jt,y,x as I,S as Fe,i as We,s as He,v as Ye,P as L,d as u,Q as rl,z as Qe,A as Ze,B as et,R as al,b as Q,c as a,T as Bl,f as m,F as xt,U as Hl,V as gl,W as ie,J as ee,L as te,M as le,K as ne,o as c,E as St,u as Y,e as d,g as O,h as w,j as h,t as M,k as E,D as Vt,C as kt,a as Le,q as Xe,O as Gl,X as ol,N as Kt,n as $t,m as _l}from"../chunks/BI_gvUUO.js";import"../chunks/IHki7fMi.js";function yt(o){return(o==null?void 0:o.length)!==void 0?o:Array.from(o)}function Rl(o,e){I(o,1,1,()=>{e.delete(o.key)})}function ql(o,e,s,t,l,n,r,i,f,p,$,v){let _=o.length,g=n.length,b=_;const k={};for(;b--;)k[o[b].key]=b;const T=[],S=new Map,R=new Map,q=[];for(b=g;b--;){const U=v(l,n,b),F=s(U);let K=r.get(F);K?q.push(()=>K.p(U,e)):(K=p(F,U),K.c()),S.set(F,T[b]=K),F in k&&R.set(F,Math.abs(b-k[F]))}const A=new Set,C=new Set;function x(U){y(U,1),U.m(i,$),r.set(U.key,U),$=U.first,g--}for(;_&&g;){const U=T[g-1],F=o[_-1],K=U.key,H=F.key;U===F?($=U.first,_--,g--):S.has(H)?!r.has(K)||A.has(K)?x(U):C.has(H)?_--:R.get(K)>R.get(H)?(C.add(K),x(U)):(A.add(H),_--):(f(F,r),_--)}for(;_--;){const U=o[_];S.has(U.key)||f(U,r)}for(;g;)x(T[g-1]);return Jt(q),T}function Ge(o,e){const s={},t={},l={$$scope:1};let n=o.length;for(;n--;){const r=o[n],i=e[n];if(i){for(const f in r)f in i||(t[f]=1);for(const f in i)l[f]||(s[f]=i[f],l[f]=1);o[n]=i}else for(const f in r)l[f]=1}for(const r in t)r in s||(s[r]=void 0);return s}function rt(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 pl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function bl(o,e,s){const t=o.slice();return t[10]=e[s][0],t[11]=e[s][1],t}function fl(o){let e,s=[o[11]],t={};for(let l=0;l<s.length;l+=1)t=L(t,s[l]);return{c(){e=Hl(o[10]),this.h()},l(l){e=Bl(l,o[10],{}),m(e).forEach(u),this.h()},h(){al(e,t)},m(l,n){Q(l,e,n)},p(l,n){al(e,t=Ge(s,[n&32&&l[11]]))},d(l){l&&u(e)}}}function vl(o){let e=o[10],s,t=o[10]&&fl(o);return{c(){t&&t.c(),s=xt()},l(l){t&&t.l(l),s=xt()},m(l,n){t&&t.m(l,n),Q(l,s,n)},p(l,n){l[10]?e?He(e,l[10])?(t.d(1),t=fl(l),e=l[10],t.c(),t.m(s.parentNode,s)):t.p(l,n):(t=fl(l),e=l[10],t.c(),t.m(s.parentNode,s)):e&&(t.d(1),t=null,e=l[10])},d(l){l&&u(s),t&&t.d(l)}}}function Kl(o){let e,s,t,l,n,r=yt(o[5]),i=[];for(let _=0;_<r.length;_+=1)i[_]=vl(bl(o,r,_));const f=o[9].default,p=Ye(f,o,o[8],null);let $=[pl,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??""}`}],v={};for(let _=0;_<$.length;_+=1)v=L(v,$[_]);return{c(){e=Hl("svg");for(let _=0;_<i.length;_+=1)i[_].c();s=xt(),p&&p.c(),this.h()},l(_){e=Bl(_,"svg",{width:!0,height:!0,stroke:!0,"stroke-width":!0,class:!0});var g=m(e);for(let b=0;b<i.length;b+=1)i[b].l(g);s=xt(),p&&p.l(g),g.forEach(u),this.h()},h(){al(e,v)},m(_,g){Q(_,e,g);for(let b=0;b<i.length;b+=1)i[b]&&i[b].m(e,null);a(e,s),p&&p.m(e,null),n=!0},p(_,[g]){if(g&32){r=yt(_[5]);let b;for(b=0;b<r.length;b+=1){const k=bl(_,r,b);i[b]?i[b].p(k,g):(i[b]=vl(k),i[b].c(),i[b].m(e,s))}for(;b<i.length;b+=1)i[b].d(1);i.length=r.length}p&&p.p&&(!n||g&256)&&Qe(p,f,_,_[8],n?et(f,_[8],g,null):Ze(_[8]),null),al(e,v=Ge($,[pl,g&64&&_[6],(!n||g&4)&&{width:_[2]},(!n||g&4)&&{height:_[2]},(!n||g&2)&&{stroke:_[1]},(!n||g&28&&t!==(t=_[4]?Number(_[3])*24/Number(_[2]):_[3]))&&{"stroke-width":t},(!n||g&129&&l!==(l=`lucide-icon lucide lucide-${_[0]} ${_[7].class??""}`))&&{class:l}]))},i(_){n||(y(p,_),n=!0)},o(_){I(p,_),n=!1},d(_){_&&u(e),rl(i,_),p&&p.d(_)}}}function Jl(o,e,s){const t=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=gl(e,t),{$$slots:n={},$$scope:r}=e,{name:i}=e,{color:f="currentColor"}=e,{size:p=24}=e,{strokeWidth:$=2}=e,{absoluteStrokeWidth:v=!1}=e,{iconNode:_}=e;return o.$$set=g=>{s(7,e=L(L({},e),ie(g))),s(6,l=gl(e,t)),"name"in g&&s(0,i=g.name),"color"in g&&s(1,f=g.color),"size"in g&&s(2,p=g.size),"strokeWidth"in g&&s(3,$=g.strokeWidth),"absoluteStrokeWidth"in g&&s(4,v=g.absoluteStrokeWidth),"iconNode"in g&&s(5,_=g.iconNode),"$$scope"in g&&s(8,r=g.$$scope)},e=ie(e),[i,f,p,$,v,_,l,e,r,n]}class at extends Fe{constructor(e){super(),We(this,e,Jl,Kl,He,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Xl(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function Yl(o){let e,s;const t=[{name:"alert-circle"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Xl]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Ql(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=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class Zl extends Fe{constructor(e){super(),We(this,e,Ql,Yl,He,{})}}function en(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function tn(o){let e,s;const t=[{name:"chevron-down"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[en]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function ln(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["path",{d:"m6 9 6 6 6-6"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class nn extends Fe{constructor(e){super(),We(this,e,ln,tn,He,{})}}function sn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function on(o){let e,s;const t=[{name:"code"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[sn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function rn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polyline",{points:"16 18 22 12 16 6"}],["polyline",{points:"8 6 2 12 8 18"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class an extends Fe{constructor(e){super(),We(this,e,rn,on,He,{})}}function cn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function un(o){let e,s;const t=[{name:"copy"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[cn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function fn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class Fl extends Fe{constructor(e){super(),We(this,e,fn,un,He,{})}}function dn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function hn(o){let e,s;const t=[{name:"download"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[dn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function mn(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=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class kl extends Fe{constructor(e){super(),We(this,e,mn,hn,He,{})}}function gn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function _n(o){let e,s;const t=[{name:"loader-2"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[gn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function pn(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=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class bn extends Fe{constructor(e){super(),We(this,e,pn,_n,He,{})}}function vn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function kn(o){let e,s;const t=[{name:"more-horizontal"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[vn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function yn(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=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class $n extends Fe{constructor(e){super(),We(this,e,yn,kn,He,{})}}function wn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function En(o){let e,s;const t=[{name:"panels-top-left"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[wn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Nn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M9 21V9"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class In extends Fe{constructor(e){super(),We(this,e,Nn,En,He,{})}}function Tn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function Dn(o){let e,s;const t=[{name:"play"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Tn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Sn(o,e,s){let{$$slots:t={},$$scope:l}=e;const n=[["polygon",{points:"5 3 19 12 5 21 5 3"}]];return o.$$set=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class dl extends Fe{constructor(e){super(),We(this,e,Sn,Dn,He,{})}}function Vn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function Cn(o){let e,s;const t=[{name:"share"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Vn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function An(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=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class yl extends Fe{constructor(e){super(),We(this,e,An,Cn,He,{})}}function Pn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function xn(o){let e,s;const t=[{name:"skip-back"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Pn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Un(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=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class On extends Fe{constructor(e){super(),We(this,e,Un,xn,He,{})}}function Mn(o){let e;const s=o[2].default,t=Ye(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)&&Qe(t,s,l,l[3],e?et(s,l[3],n,null):Ze(l[3]),null)},i(l){e||(y(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function zn(o){let e,s;const t=[{name:"skip-forward"},o[1],{iconNode:o[0]}];let l={$$slots:{default:[Mn]},$$scope:{ctx:o}};for(let n=0;n<t.length;n+=1)l=L(l,t[n]);return e=new at({props:l}),{c(){ne(e.$$.fragment)},l(n){le(e.$$.fragment,n)},m(n,r){te(e,n,r),s=!0},p(n,[r]){const i=r&3?Ge(t,[t[0],r&2&&rt(n[1]),r&1&&{iconNode:n[0]}]):{};r&8&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(y(e.$$.fragment,n),s=!0)},o(n){I(e.$$.fragment,n),s=!1},d(n){ee(e,n)}}}function Ln(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=r=>{s(1,e=L(L({},e),ie(r))),"$$scope"in r&&s(3,l=r.$$scope)},e=ie(e),[n,e,t,l]}class jn extends Fe{constructor(e){super(),We(this,e,Ln,zn,He,{})}}function $l(o,e,s){const t=o.slice();return t[58]=e[s],t}function wl(o,e,s){const t=o.slice();return t[50]=e[s],t}function El(o,e,s){const t=o.slice();return t[53]=e[s],t}function Nl(o,e,s){const t=o.slice();return t[53]=e[s],t}function Il(o){let e;return{c(){e=h("span"),this.h()},l(s){e=d(s,"SPAN",{class:!0}),m(e).forEach(u),this.h()},h(){c(e,"class","flash-sweep svelte-10276gt")},m(s,t){Q(s,e,t)},d(s){s&&u(e)}}}function Bn(o){let e,s,t,l,n='<h2 class="text-2xl font-semibold text-gray-900">Integration Code</h2> <p class="text-sm text-gray-600 mt-1">Python code to reproduce your actions via the API</p>',r,i,f,p,$,v=o[2].length>0&&Tl(o);const _=[Wn,Fn],g=[];function b(k,T){return k[2].length===0?0:1}return f=b(o),p=g[f]=_[f](o),{c(){e=h("div"),s=h("div"),t=h("div"),l=h("div"),l.innerHTML=n,r=E(),v&&v.c(),i=E(),p.c(),this.h()},l(k){e=d(k,"DIV",{class:!0});var T=m(e);s=d(T,"DIV",{class:!0});var S=m(s);t=d(S,"DIV",{class:!0});var R=m(t);l=d(R,"DIV",{"data-svelte-h":!0}),Xe(l)!=="svelte-jwt4ug"&&(l.innerHTML=n),r=w(R),v&&v.l(R),R.forEach(u),i=w(S),p.l(S),S.forEach(u),T.forEach(u),this.h()},h(){c(t,"class","flex items-center justify-between mb-6"),c(s,"class","max-w-4xl mx-auto p-8"),c(e,"class","flex-1 bg-gray-50 overflow-y-auto")},m(k,T){Q(k,e,T),a(e,s),a(s,t),a(t,l),a(t,r),v&&v.m(t,null),a(s,i),g[f].m(s,null),$=!0},p(k,T){k[2].length>0?v?(v.p(k,T),T[0]&4&&y(v,1)):(v=Tl(k),v.c(),y(v,1),v.m(t,null)):v&&(Vt(),I(v,1,1,()=>{v=null}),St());let S=f;f=b(k),f===S?g[f].p(k,T):(Vt(),I(g[S],1,1,()=>{g[S]=null}),St(),p=g[f],p?p.p(k,T):(p=g[f]=_[f](k),p.c()),y(p,1),p.m(s,null))},i(k){$||(y(v),y(p),$=!0)},o(k){I(v),I(p),$=!1},d(k){k&&u(e),v&&v.d(),g[f].d()}}}function Hn(o){let e,s,t,l,n,r,i,f,p,$=o[0].length+"",v,_,g,b,k,T,S,R,q,A,C,x,U="Model",F,K,H,P,j,z,Ce,Z,W,Ee='<h3 class="font-medium text-gray-900">Voice</h3>',pe,de,J,D,re='<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>',Ne,ce,Ie,Te,oe,je="Speed",Ue,Ae,$e=o[11].toFixed(1)+"",he,xe,wt,be,B,ke,ye="<span>0.5x</span> <span>2.0x</span>",De,Pe,Re,it,Et="Stability",ct,ut,tt=(o[12]*100).toFixed(0)+"",_t,Ct,Ut,me,lt,Be,nt,ft,dt="Similarity",ht,mt,qe=(o[13]*100).toFixed(0)+"",st,Ot,Oe,Me,Bt,pt,ze,bt,Rt="Style",gt,Nt,ve=o[14]===0?"None":"Exaggerated",V,ae,ge,Se,Ht,Ft,fe=o[5]==="local"&&Vl();const Mt=[Rn,Gn],ot=[];function zt(N,X){return N[7]?0:1}k=zt(o),T=ot[k]=Mt[k](o);let _e=o[8]&&Cl(o),Ke=yt(o[20]),we=[];for(let N=0;N<Ke.length;N+=1)we[N]=xl(Nl(o,Ke,N));j=new nn({props:{size:16,class:"text-gray-500"}});let Ve=o[6]&&Ul(o),It=yt(o[21]),se=[];for(let N=0;N<It.length;N+=1)se[N]=Ml(wl(o,It,N));return{c(){e=h("div"),s=h("div"),fe&&fe.c(),t=E(),l=h("div"),n=h("textarea"),r=E(),i=h("div"),f=h("div"),p=h("span"),v=M($),_=M(" / 5,000 characters"),g=E(),b=h("button"),T.c(),R=E(),_e&&_e.c(),q=E(),A=h("div"),C=h("div"),x=h("h3"),x.textContent=U,F=E(),K=h("button"),H=h("span");for(let N=0;N<we.length;N+=1)we[N].c();P=E(),ne(j.$$.fragment),z=E(),Ve&&Ve.c(),Ce=E(),Z=h("div"),W=h("div"),W.innerHTML=Ee,pe=E(),de=h("div");for(let N=0;N<se.length;N+=1)se[N].c();J=E(),D=h("button"),D.innerHTML=re,Ne=E(),ce=h("div"),Ie=h("div"),Te=h("div"),oe=h("label"),oe.textContent=je,Ue=E(),Ae=h("span"),he=M($e),xe=M("x"),wt=E(),be=h("input"),B=E(),ke=h("div"),ke.innerHTML=ye,De=E(),Pe=h("div"),Re=h("div"),it=h("label"),it.textContent=Et,ct=E(),ut=h("span"),_t=M(tt),Ct=M("%"),Ut=E(),me=h("input"),lt=E(),Be=h("div"),nt=h("div"),ft=h("label"),ft.textContent=dt,ht=E(),mt=h("span"),st=M(qe),Ot=M("%"),Oe=E(),Me=h("input"),Bt=E(),pt=h("div"),ze=h("div"),bt=h("label"),bt.textContent=Rt,gt=E(),Nt=h("span"),V=M(ve),ae=E(),ge=h("input"),this.h()},l(N){e=d(N,"DIV",{class:!0});var X=m(e);s=d(X,"DIV",{class:!0});var ue=m(s);fe&&fe.l(ue),t=w(ue),l=d(ue,"DIV",{class:!0});var G=m(l);n=d(G,"TEXTAREA",{class:!0,placeholder:!0}),m(n).forEach(u),G.forEach(u),r=w(ue),i=d(ue,"DIV",{class:!0});var Je=m(i);f=d(Je,"DIV",{class:!0});var qt=m(f);p=d(qt,"SPAN",{class:!0});var Wt=m(p);v=O(Wt,$),_=O(Wt," / 5,000 characters"),Wt.forEach(u),qt.forEach(u),g=w(Je),b=d(Je,"BUTTON",{class:!0});var Tt=m(b);T.l(Tt),Tt.forEach(u),Je.forEach(u),R=w(ue),_e&&_e.l(ue),ue.forEach(u),q=w(X),A=d(X,"DIV",{class:!0});var vt=m(A);C=d(vt,"DIV",{class:!0});var Dt=m(C);x=d(Dt,"H3",{class:!0,"data-svelte-h":!0}),Xe(x)!=="svelte-b3hs3r"&&(x.textContent=U),F=w(Dt),K=d(Dt,"BUTTON",{class:!0});var Lt=m(K);H=d(Lt,"SPAN",{});var hl=m(H);for(let jt=0;jt<we.length;jt+=1)we[jt].l(hl);hl.forEach(u),P=w(Lt),le(j.$$.fragment,Lt),Lt.forEach(u),z=w(Dt),Ve&&Ve.l(Dt),Dt.forEach(u),Ce=w(vt),Z=d(vt,"DIV",{class:!0});var Xt=m(Z);W=d(Xt,"DIV",{class:!0,"data-svelte-h":!0}),Xe(W)!=="svelte-182x1ki"&&(W.innerHTML=Ee),pe=w(Xt),de=d(Xt,"DIV",{class:!0});var Yt=m(de);for(let jt=0;jt<se.length;jt+=1)se[jt].l(Yt);J=w(Yt),D=d(Yt,"BUTTON",{class:!0,"data-svelte-h":!0}),Xe(D)!=="svelte-20x663"&&(D.innerHTML=re),Yt.forEach(u),Xt.forEach(u),Ne=w(vt),ce=d(vt,"DIV",{class:!0});var At=m(ce);Ie=d(At,"DIV",{});var Gt=m(Ie);Te=d(Gt,"DIV",{class:!0});var Qt=m(Te);oe=d(Qt,"LABEL",{class:!0,"data-svelte-h":!0}),Xe(oe)!=="svelte-9vcpiu"&&(oe.textContent=je),Ue=w(Qt),Ae=d(Qt,"SPAN",{class:!0});var il=m(Ae);he=O(il,$e),xe=O(il,"x"),il.forEach(u),Qt.forEach(u),wt=w(Gt),be=d(Gt,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),B=w(Gt),ke=d(Gt,"DIV",{class:!0,"data-svelte-h":!0}),Xe(ke)!=="svelte-4ydm1m"&&(ke.innerHTML=ye),Gt.forEach(u),De=w(At),Pe=d(At,"DIV",{});var Zt=m(Pe);Re=d(Zt,"DIV",{class:!0});var el=m(Re);it=d(el,"LABEL",{class:!0,"data-svelte-h":!0}),Xe(it)!=="svelte-1lgjete"&&(it.textContent=Et),ct=w(el),ut=d(el,"SPAN",{class:!0});var cl=m(ut);_t=O(cl,tt),Ct=O(cl,"%"),cl.forEach(u),el.forEach(u),Ut=w(Zt),me=d(Zt,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),Zt.forEach(u),lt=w(At),Be=d(At,"DIV",{});var tl=m(Be);nt=d(tl,"DIV",{class:!0});var ll=m(nt);ft=d(ll,"LABEL",{class:!0,"data-svelte-h":!0}),Xe(ft)!=="svelte-1ha0vec"&&(ft.textContent=dt),ht=w(ll),mt=d(ll,"SPAN",{class:!0});var ul=m(mt);st=O(ul,qe),Ot=O(ul,"%"),ul.forEach(u),ll.forEach(u),Oe=w(tl),Me=d(tl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),tl.forEach(u),Bt=w(At),pt=d(At,"DIV",{});var nl=m(pt);ze=d(nl,"DIV",{class:!0});var sl=m(ze);bt=d(sl,"LABEL",{class:!0,"data-svelte-h":!0}),Xe(bt)!=="svelte-1ata0tk"&&(bt.textContent=Rt),gt=w(sl),Nt=d(sl,"SPAN",{class:!0});var ml=m(Nt);V=O(ml,ve),ml.forEach(u),sl.forEach(u),ae=w(nl),ge=d(nl,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),nl.forEach(u),At.forEach(u),vt.forEach(u),X.forEach(u),this.h()},h(){c(n,"class","w-full h-full p-6 bg-white resize-none border-0 focus:outline-none text-gray-900 text-base leading-relaxed"),c(n,"placeholder","Welcome to our text to speech demo. This technology can transform any written content into natural sounding audio."),c(l,"class","flex-1 pb-24"),c(p,"class","text-sm text-gray-500"),c(f,"class","flex items-center justify-between mb-3"),b.disabled=S=o[7]||!o[0].trim(),c(b,"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"),c(i,"class","fixed bottom-0 left-56 right-80 p-4 bg-white border-t border-gray-200"),c(s,"class","flex-1 flex flex-col p-6"),c(x,"class","font-medium text-gray-900 mb-3"),c(K,"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"),c(C,"class","mb-6 relative model-dropdown"),c(W,"class","mb-3"),c(D,"class","w-full flex items-center justify-between p-2 rounded-md opacity-50 cursor-not-allowed text-left"),D.disabled=!0,c(de,"class","space-y-1"),c(Z,"class","mb-6"),c(oe,"class","text-sm font-medium text-gray-700"),c(Ae,"class","text-sm text-gray-500"),c(Te,"class","flex justify-between mb-1"),c(be,"type","range"),c(be,"min","0.5"),c(be,"max","2"),c(be,"step","0.1"),c(be,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(ke,"class","flex justify-between text-xs text-gray-400 mt-1"),c(it,"class","text-sm font-medium text-gray-700"),c(ut,"class","text-sm text-gray-500"),c(Re,"class","flex justify-between mb-1"),c(me,"type","range"),c(me,"min","0"),c(me,"max","1"),c(me,"step","0.01"),c(me,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(ft,"class","text-sm font-medium text-gray-700"),c(mt,"class","text-sm text-gray-500"),c(nt,"class","flex justify-between mb-1"),c(Me,"type","range"),c(Me,"min","0"),c(Me,"max","1"),c(Me,"step","0.01"),c(Me,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(bt,"class","text-sm font-medium text-gray-700"),c(Nt,"class","text-sm text-gray-500"),c(ze,"class","flex justify-between mb-1"),c(ge,"type","range"),c(ge,"min","0"),c(ge,"max","1"),c(ge,"step","1"),c(ge,"class","w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer slider-hf"),c(ce,"class","space-y-4 pt-4 border-t border-gray-200"),c(A,"class","w-80 border-l border-gray-200 bg-white p-4 overflow-y-auto"),c(e,"class","flex-1 flex")},m(N,X){Q(N,e,X),a(e,s),fe&&fe.m(s,null),a(s,t),a(s,l),a(l,n),kt(n,o[0]),a(s,r),a(s,i),a(i,f),a(f,p),a(p,v),a(p,_),a(i,g),a(i,b),ot[k].m(b,null),a(s,R),_e&&_e.m(s,null),a(e,q),a(e,A),a(A,C),a(C,x),a(C,F),a(C,K),a(K,H);for(let ue=0;ue<we.length;ue+=1)we[ue]&&we[ue].m(H,null);a(K,P),te(j,K,null),a(C,z),Ve&&Ve.m(C,null),a(A,Ce),a(A,Z),a(Z,W),a(Z,pe),a(Z,de);for(let ue=0;ue<se.length;ue+=1)se[ue]&&se[ue].m(de,null);a(de,J),a(de,D),a(A,Ne),a(A,ce),a(ce,Ie),a(Ie,Te),a(Te,oe),a(Te,Ue),a(Te,Ae),a(Ae,he),a(Ae,xe),a(Ie,wt),a(Ie,be),kt(be,o[11]),a(Ie,B),a(Ie,ke),a(ce,De),a(ce,Pe),a(Pe,Re),a(Re,it),a(Re,ct),a(Re,ut),a(ut,_t),a(ut,Ct),a(Pe,Ut),a(Pe,me),kt(me,o[12]),a(ce,lt),a(ce,Be),a(Be,nt),a(nt,ft),a(nt,ht),a(nt,mt),a(mt,st),a(mt,Ot),a(Be,Oe),a(Be,Me),kt(Me,o[13]),a(ce,Bt),a(ce,pt),a(pt,ze),a(ze,bt),a(ze,gt),a(ze,Nt),a(Nt,V),a(pt,ae),a(pt,ge),kt(ge,o[14]),Se=!0,Ht||(Ft=[Y(n,"input",o[37]),Y(b,"click",o[22]),Y(K,"click",o[39]),Y(be,"change",o[42]),Y(be,"input",o[42]),Y(me,"change",o[43]),Y(me,"input",o[43]),Y(Me,"change",o[44]),Y(Me,"input",o[44]),Y(ge,"change",o[45]),Y(ge,"input",o[45])],Ht=!0)},p(N,X){N[5]==="local"?fe?X[0]&32&&y(fe,1):(fe=Vl(),fe.c(),y(fe,1),fe.m(s,t)):fe&&(Vt(),I(fe,1,1,()=>{fe=null}),St()),X[0]&1&&kt(n,N[0]),(!Se||X[0]&1)&&$!==($=N[0].length+"")&&Le(v,$);let ue=k;if(k=zt(N),k!==ue&&(Vt(),I(ot[ue],1,1,()=>{ot[ue]=null}),St(),T=ot[k],T||(T=ot[k]=Mt[k](N),T.c()),y(T,1),T.m(b,null)),(!Se||X[0]&129&&S!==(S=N[7]||!N[0].trim()))&&(b.disabled=S),N[8]?_e?(_e.p(N,X),X[0]&256&&y(_e,1)):(_e=Cl(N),_e.c(),y(_e,1),_e.m(s,null)):_e&&(Vt(),I(_e,1,1,()=>{_e=null}),St()),X[0]&1048592){Ke=yt(N[20]);let G;for(G=0;G<Ke.length;G+=1){const Je=Nl(N,Ke,G);we[G]?we[G].p(Je,X):(we[G]=xl(Je),we[G].c(),we[G].m(H,null))}for(;G<we.length;G+=1)we[G].d(1);we.length=Ke.length}if(N[6]?Ve?Ve.p(N,X):(Ve=Ul(N),Ve.c(),Ve.m(C,null)):Ve&&(Ve.d(1),Ve=null),X[0]&2097160){It=yt(N[21]);let G;for(G=0;G<It.length;G+=1){const Je=wl(N,It,G);se[G]?se[G].p(Je,X):(se[G]=Ml(Je),se[G].c(),se[G].m(de,J))}for(;G<se.length;G+=1)se[G].d(1);se.length=It.length}(!Se||X[0]&2048)&&$e!==($e=N[11].toFixed(1)+"")&&Le(he,$e),X[0]&2048&&kt(be,N[11]),(!Se||X[0]&4096)&&tt!==(tt=(N[12]*100).toFixed(0)+"")&&Le(_t,tt),X[0]&4096&&kt(me,N[12]),(!Se||X[0]&8192)&&qe!==(qe=(N[13]*100).toFixed(0)+"")&&Le(st,qe),X[0]&8192&&kt(Me,N[13]),(!Se||X[0]&16384)&&ve!==(ve=N[14]===0?"None":"Exaggerated")&&Le(V,ve),X[0]&16384&&kt(ge,N[14])},i(N){Se||(y(fe),y(T),y(_e),y(j.$$.fragment,N),Se=!0)},o(N){I(fe),I(T),I(_e),I(j.$$.fragment,N),Se=!1},d(N){N&&u(e),fe&&fe.d(),ot[k].d(),_e&&_e.d(),rl(we,N),ee(j),Ve&&Ve.d(),rl(se,N),Ht=!1,Jt(Ft)}}}function Tl(o){let e,s,t,l,n,r;return s=new Fl({props:{size:16}}),{c(){e=h("button"),ne(s.$$.fragment),t=M(`
7
+ Copy All`),this.h()},l(i){e=d(i,"BUTTON",{class:!0});var f=m(e);le(s.$$.fragment,f),t=O(f,`
8
+ Copy All`),f.forEach(u),this.h()},h(){c(e,"class","flex items-center gap-2 px-4 py-2 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors")},m(i,f){Q(i,e,f),te(s,e,null),a(e,t),l=!0,n||(r=Y(e,"click",o[31]),n=!0)},p:$t,i(i){l||(y(s.$$.fragment,i),l=!0)},o(i){I(s.$$.fragment,i),l=!1},d(i){i&&u(e),ee(s),n=!1,r()}}}function Fn(o){let e,s=[],t=new Map,l,n=yt(o[2]);const r=i=>i[58].id;for(let i=0;i<n.length;i+=1){let f=$l(o,n,i),p=r(f);t.set(p,s[i]=Sl(p,f))}return{c(){e=h("div");for(let i=0;i<s.length;i+=1)s[i].c();this.h()},l(i){e=d(i,"DIV",{class:!0});var f=m(e);for(let p=0;p<s.length;p+=1)s[p].l(f);f.forEach(u),this.h()},h(){c(e,"class","space-y-4")},m(i,f){Q(i,e,f);for(let p=0;p<s.length;p+=1)s[p]&&s[p].m(e,null);l=!0},p(i,f){f[0]&1073741828&&(n=yt(i[2]),Vt(),s=ql(s,f,r,1,i,n,t,e,Rl,Sl,null,$l),St())},i(i){if(!l){for(let f=0;f<n.length;f+=1)y(s[f]);l=!0}},o(i){for(let f=0;f<s.length;f+=1)I(s[f]);l=!1},d(i){i&&u(e);for(let f=0;f<s.length;f+=1)s[f].d()}}}function Wn(o){let e,s='<p class="text-gray-500">Start using the UI to see generated code here</p>';return{c(){e=h("div"),e.innerHTML=s,this.h()},l(t){e=d(t,"DIV",{class:!0,"data-svelte-h":!0}),Xe(e)!=="svelte-1dkp70o"&&(e.innerHTML=s),this.h()},h(){c(e,"class","bg-white rounded-lg border border-gray-200 p-8 text-center")},m(t,l){Q(t,e,l)},p:$t,i:$t,o:$t,d(t){t&&u(e)}}}function Dl(o){let e,s=o[58].output+"",t;return{c(){e=h("div"),t=M(s),this.h()},l(l){e=d(l,"DIV",{class:!0});var n=m(e);t=O(n,s),n.forEach(u),this.h()},h(){c(e,"class","px-4 py-2 bg-gray-900 text-green-400 font-mono text-xs border-t border-gray-200")},m(l,n){Q(l,e,n),a(e,t)},p(l,n){n[0]&4&&s!==(s=l[58].output+"")&&Le(t,s)},d(l){l&&u(e)}}}function Sl(o,e){let s,t,l,n,r=e[58].title+"",i,f,p,$=e[58].timestamp+"",v,_,g,b,k,T,S,R,q=e[58].code+"",A,C,x,U,F,K;b=new Fl({props:{size:14,class:"text-gray-600"}});function H(){return e[46](e[58])}let P=e[58].output&&Dl(e);return{key:o,first:null,c(){s=h("div"),t=h("div"),l=h("div"),n=h("span"),i=M(r),f=E(),p=h("span"),v=M($),_=E(),g=h("button"),ne(b.$$.fragment),k=E(),T=h("div"),S=h("pre"),R=h("code"),A=M(q),C=E(),P&&P.c(),x=E(),this.h()},l(j){s=d(j,"DIV",{class:!0});var z=m(s);t=d(z,"DIV",{class:!0});var Ce=m(t);l=d(Ce,"DIV",{class:!0});var Z=m(l);n=d(Z,"SPAN",{class:!0});var W=m(n);i=O(W,r),W.forEach(u),f=w(Z),p=d(Z,"SPAN",{class:!0});var Ee=m(p);v=O(Ee,$),Ee.forEach(u),Z.forEach(u),_=w(Ce),g=d(Ce,"BUTTON",{class:!0,title:!0});var pe=m(g);le(b.$$.fragment,pe),pe.forEach(u),Ce.forEach(u),k=w(z),T=d(z,"DIV",{class:!0});var de=m(T);S=d(de,"PRE",{class:!0});var J=m(S);R=d(J,"CODE",{class:!0});var D=m(R);A=O(D,q),D.forEach(u),J.forEach(u),de.forEach(u),C=w(z),P&&P.l(z),x=w(z),z.forEach(u),this.h()},h(){c(n,"class","text-sm font-medium text-gray-700"),c(p,"class","text-xs text-gray-500"),c(l,"class","flex items-center gap-3"),c(g,"class","p-1.5 hover:bg-gray-200 rounded transition-colors"),c(g,"title","Copy code"),c(t,"class","flex items-center justify-between px-4 py-2 bg-gray-50 border-b border-gray-200"),c(R,"class","language-python text-sm font-mono"),c(S,"class","p-4 overflow-x-auto bg-gray-50 text-gray-900"),c(T,"class","relative"),c(s,"class","bg-white rounded-lg border border-gray-200 overflow-hidden"),this.first=s},m(j,z){Q(j,s,z),a(s,t),a(t,l),a(l,n),a(n,i),a(l,f),a(l,p),a(p,v),a(t,_),a(t,g),te(b,g,null),a(s,k),a(s,T),a(T,S),a(S,R),a(R,A),a(s,C),P&&P.m(s,null),a(s,x),U=!0,F||(K=Y(g,"click",H),F=!0)},p(j,z){e=j,(!U||z[0]&4)&&r!==(r=e[58].title+"")&&Le(i,r),(!U||z[0]&4)&&$!==($=e[58].timestamp+"")&&Le(v,$),(!U||z[0]&4)&&q!==(q=e[58].code+"")&&Le(A,q),e[58].output?P?P.p(e,z):(P=Dl(e),P.c(),P.m(s,x)):P&&(P.d(1),P=null)},i(j){U||(y(b.$$.fragment,j),U=!0)},o(j){I(b.$$.fragment,j),U=!1},d(j){j&&u(s),ee(b),P&&P.d(),F=!1,K()}}}function Vl(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>',r;return s=new Zl({props:{size:18,class:"text-blue-600 mt-0.5 flex-shrink-0"}}),{c(){e=h("div"),ne(s.$$.fragment),t=E(),l=h("div"),l.innerHTML=n,this.h()},l(i){e=d(i,"DIV",{class:!0});var f=m(e);le(s.$$.fragment,f),t=w(f),l=d(f,"DIV",{class:!0,"data-svelte-h":!0}),Xe(l)!=="svelte-p3cqs1"&&(l.innerHTML=n),f.forEach(u),this.h()},h(){c(l,"class","text-sm"),c(e,"class","mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg flex items-start gap-2")},m(i,f){Q(i,e,f),te(s,e,null),a(e,t),a(e,l),r=!0},i(i){r||(y(s.$$.fragment,i),r=!0)},o(i){I(s.$$.fragment,i),r=!1},d(i){i&&u(e),ee(s)}}}function Gn(o){let e,s,t;return e=new dl({props:{size:20}}),{c(){ne(e.$$.fragment),s=M(`
9
+ Generate speech`)},l(l){le(e.$$.fragment,l),s=O(l,`
10
+ Generate speech`)},m(l,n){te(e,l,n),Q(l,s,n),t=!0},i(l){t||(y(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){l&&u(s),ee(e,l)}}}function Rn(o){let e,s,t;return e=new bn({props:{size:20,class:"animate-spin"}}),{c(){ne(e.$$.fragment),s=M(`
11
+ Generating...`)},l(l){le(e.$$.fragment,l),s=O(l,`
12
+ Generating...`)},m(l,n){te(e,l,n),Q(l,s,n),t=!0},i(l){t||(y(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){l&&u(s),ee(e,l)}}}function Cl(o){let e,s,t,l,n,r,i,f,p,$,v,_,g,b,k,T,S,R="Share",q,A,C,x="Download",U,F,K,H,P,j,z,Ce,Z,W,Ee=Pt(o[16])+"",pe,de,J,D,re,Ne,ce=Pt(o[17])+"",Ie,Te,oe,je,Ue,Ae,$e,he,xe,wt,be,B,ke,ye,De,Pe=Pt(o[16])+"",Re,it,Et,ct,ut,tt,_t=Pt(o[17])+"",Ct,Ut,me,lt,Be,nt,ft,dt,ht,mt,qe,st,Ot,Oe,Me,Bt;k=new yl({props:{size:14,class:"text-gray-600"}}),F=new kl({props:{size:14,class:"text-gray-600"}});const pt=[Kn,qn],ze=[];function bt(V,ae){return V[15]?0:1}j=bt(o),z=ze[j]=pt[j](o),Ue=new On({props:{size:20,class:"text-gray-600"}});const Rt=[Xn,Jn],gt=[];function Nt(V,ae){return V[15]?0:1}he=Nt(o),xe=gt[he]=Rt[he](o),B=new jn({props:{size:20,class:"text-gray-600"}}),Be=new yl({props:{size:14}}),ht=new kl({props:{size:16,class:"text-gray-600"}}),st=new $n({props:{size:16,class:"text-gray-600"}});let ve=o[8]&&Al(o);return{c(){e=h("div"),s=h("div"),t=h("div"),l=E(),n=h("div"),r=h("h3"),i=M(o[18]),f=E(),p=h("p"),$=M(o[3]),v=M(" • Created 1 second ago"),_=E(),g=h("div"),b=h("button"),ne(k.$$.fragment),T=E(),S=h("span"),S.textContent=R,q=E(),A=h("button"),C=h("span"),C.textContent=x,U=E(),ne(F.$$.fragment),K=E(),H=h("div"),P=h("button"),z.c(),Ce=E(),Z=h("div"),W=h("span"),pe=M(Ee),de=E(),J=h("div"),D=h("div"),re=E(),Ne=h("span"),Ie=M(ce),Te=E(),oe=h("div"),je=h("button"),ne(Ue.$$.fragment),Ae=E(),$e=h("button"),xe.c(),wt=E(),be=h("button"),ne(B.$$.fragment),ke=E(),ye=h("div"),De=h("span"),Re=M(Pe),it=E(),Et=h("div"),ct=h("div"),ut=E(),tt=h("span"),Ct=M(_t),Ut=E(),me=h("div"),lt=h("button"),ne(Be.$$.fragment),nt=M(`
13
+ Share`),ft=E(),dt=h("button"),ne(ht.$$.fragment),mt=E(),qe=h("button"),ne(st.$$.fragment),Ot=E(),ve&&ve.c(),this.h()},l(V){e=d(V,"DIV",{class:!0});var ae=m(e);s=d(ae,"DIV",{class:!0});var ge=m(s);t=d(ge,"DIV",{class:!0}),m(t).forEach(u),l=w(ge),n=d(ge,"DIV",{class:!0});var Se=m(n);r=d(Se,"H3",{class:!0});var Ht=m(r);i=O(Ht,o[18]),Ht.forEach(u),f=w(Se),p=d(Se,"P",{class:!0});var Ft=m(p);$=O(Ft,o[3]),v=O(Ft," • Created 1 second ago"),Ft.forEach(u),Se.forEach(u),_=w(ge),g=d(ge,"DIV",{class:!0});var fe=m(g);b=d(fe,"BUTTON",{class:!0});var Mt=m(b);le(k.$$.fragment,Mt),T=w(Mt),S=d(Mt,"SPAN",{class:!0,"data-svelte-h":!0}),Xe(S)!=="svelte-hbn8gl"&&(S.textContent=R),Mt.forEach(u),q=w(fe),A=d(fe,"BUTTON",{class:!0});var ot=m(A);C=d(ot,"SPAN",{class:!0,"data-svelte-h":!0}),Xe(C)!=="svelte-h01aeg"&&(C.textContent=x),U=w(ot),le(F.$$.fragment,ot),ot.forEach(u),fe.forEach(u),ge.forEach(u),K=w(ae),H=d(ae,"DIV",{class:!0});var zt=m(H);P=d(zt,"BUTTON",{class:!0});var _e=m(P);z.l(_e),_e.forEach(u),Ce=w(zt),Z=d(zt,"DIV",{class:!0});var Ke=m(Z);W=d(Ke,"SPAN",{class:!0});var we=m(W);pe=O(we,Ee),we.forEach(u),de=w(Ke),J=d(Ke,"DIV",{class:!0});var Ve=m(J);D=d(Ve,"DIV",{class:!0,style:!0}),m(D).forEach(u),Ve.forEach(u),re=w(Ke),Ne=d(Ke,"SPAN",{class:!0});var It=m(Ne);Ie=O(It,ce),It.forEach(u),Ke.forEach(u),zt.forEach(u),Te=w(ae),oe=d(ae,"DIV",{class:!0});var se=m(oe);je=d(se,"BUTTON",{class:!0,title:!0});var N=m(je);le(Ue.$$.fragment,N),N.forEach(u),Ae=w(se),$e=d(se,"BUTTON",{class:!0});var X=m($e);xe.l(X),X.forEach(u),wt=w(se),be=d(se,"BUTTON",{class:!0,title:!0});var ue=m(be);le(B.$$.fragment,ue),ue.forEach(u),ke=w(se),ye=d(se,"DIV",{class:!0});var G=m(ye);De=d(G,"SPAN",{class:!0});var Je=m(De);Re=O(Je,Pe),Je.forEach(u),it=w(G),Et=d(G,"DIV",{class:!0});var qt=m(Et);ct=d(qt,"DIV",{class:!0,style:!0}),m(ct).forEach(u),qt.forEach(u),ut=w(G),tt=d(G,"SPAN",{class:!0});var Wt=m(tt);Ct=O(Wt,_t),Wt.forEach(u),G.forEach(u),Ut=w(se),me=d(se,"DIV",{class:!0});var Tt=m(me);lt=d(Tt,"BUTTON",{class:!0});var vt=m(lt);le(Be.$$.fragment,vt),nt=O(vt,`
14
+ Share`),vt.forEach(u),ft=w(Tt),dt=d(Tt,"BUTTON",{class:!0,title:!0});var Dt=m(dt);le(ht.$$.fragment,Dt),Dt.forEach(u),mt=w(Tt),qe=d(Tt,"BUTTON",{class:!0,title:!0});var Lt=m(qe);le(st.$$.fragment,Lt),Lt.forEach(u),Tt.forEach(u),se.forEach(u),Ot=w(ae),ve&&ve.l(ae),ae.forEach(u),this.h()},h(){c(t,"class","w-2 h-2 bg-green-500 rounded-full"),c(r,"class","font-medium text-gray-900 text-sm"),c(p,"class","text-xs text-gray-500"),c(n,"class","flex-1"),c(S,"class","text-gray-700"),c(b,"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"),c(C,"class","text-gray-700"),c(A,"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"),c(g,"class","flex items-center gap-2"),c(s,"class","flex items-center gap-3 mb-4"),c(P,"class","w-8 h-8 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),c(W,"class","text-xs text-gray-500 font-mono"),c(D,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Kt(D,"width",o[16]/o[17]*100+"%"),c(J,"class","flex-1 h-1 bg-gray-200 rounded-full cursor-pointer"),c(Ne,"class","text-xs text-gray-500 font-mono"),c(Z,"class","flex-1 flex items-center gap-2"),c(H,"class","flex items-center gap-3 mb-4"),c(je,"class","p-2 hover:bg-gray-100 rounded-full"),c(je,"title","Skip back"),c($e,"class","w-12 h-12 bg-black rounded-full flex items-center justify-center hover:bg-gray-800 transition-colors"),c(be,"class","p-2 hover:bg-gray-100 rounded-full"),c(be,"title","Skip forward"),c(De,"class","text-xs text-gray-500 font-mono"),c(ct,"class","h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all"),Kt(ct,"width",o[16]/o[17]*100+"%"),c(Et,"class","flex-1 h-1 bg-gray-200 rounded-full"),c(tt,"class","text-xs text-gray-500 font-mono"),c(ye,"class","flex-1 flex items-center gap-3"),c(lt,"class","flex items-center gap-2 px-3 py-1.5 text-sm border border-gray-200 rounded-md hover:bg-gray-50"),c(dt,"class","p-2 hover:bg-gray-100 rounded-md"),c(dt,"title","Download"),c(qe,"class","p-2 hover:bg-gray-100 rounded-md"),c(qe,"title","More options"),c(me,"class","flex items-center gap-2"),c(oe,"class","flex items-center gap-4 mb-4"),c(e,"class","p-4 border border-gray-200 rounded-lg bg-white")},m(V,ae){Q(V,e,ae),a(e,s),a(s,t),a(s,l),a(s,n),a(n,r),a(r,i),a(n,f),a(n,p),a(p,$),a(p,v),a(s,_),a(s,g),a(g,b),te(k,b,null),a(b,T),a(b,S),a(g,q),a(g,A),a(A,C),a(A,U),te(F,A,null),a(e,K),a(e,H),a(H,P),ze[j].m(P,null),a(H,Ce),a(H,Z),a(Z,W),a(W,pe),a(Z,de),a(Z,J),a(J,D),a(Z,re),a(Z,Ne),a(Ne,Ie),a(e,Te),a(e,oe),a(oe,je),te(Ue,je,null),a(oe,Ae),a(oe,$e),gt[he].m($e,null),a(oe,wt),a(oe,be),te(B,be,null),a(oe,ke),a(oe,ye),a(ye,De),a(De,Re),a(ye,it),a(ye,Et),a(Et,ct),a(ye,ut),a(ye,tt),a(tt,Ct),a(oe,Ut),a(oe,me),a(me,lt),te(Be,lt,null),a(lt,nt),a(me,ft),a(me,dt),te(ht,dt,null),a(me,mt),a(me,qe),te(st,qe,null),a(e,Ot),ve&&ve.m(e,null),Oe=!0,Me||(Bt=[Y(b,"click",Ll),Y(A,"click",o[28]),Y(P,"click",o[23]),Y($e,"click",o[23]),Y(lt,"click",Ll),Y(dt,"click",o[28])],Me=!0)},p(V,ae){(!Oe||ae[0]&262144)&&Le(i,V[18]),(!Oe||ae[0]&8)&&Le($,V[3]);let ge=j;j=bt(V),j!==ge&&(Vt(),I(ze[ge],1,1,()=>{ze[ge]=null}),St(),z=ze[j],z||(z=ze[j]=pt[j](V),z.c()),y(z,1),z.m(P,null)),(!Oe||ae[0]&65536)&&Ee!==(Ee=Pt(V[16])+"")&&Le(pe,Ee),(!Oe||ae[0]&196608)&&Kt(D,"width",V[16]/V[17]*100+"%"),(!Oe||ae[0]&131072)&&ce!==(ce=Pt(V[17])+"")&&Le(Ie,ce);let Se=he;he=Nt(V),he!==Se&&(Vt(),I(gt[Se],1,1,()=>{gt[Se]=null}),St(),xe=gt[he],xe||(xe=gt[he]=Rt[he](V),xe.c()),y(xe,1),xe.m($e,null)),(!Oe||ae[0]&65536)&&Pe!==(Pe=Pt(V[16])+"")&&Le(Re,Pe),(!Oe||ae[0]&196608)&&Kt(ct,"width",V[16]/V[17]*100+"%"),(!Oe||ae[0]&131072)&&_t!==(_t=Pt(V[17])+"")&&Le(Ct,_t),V[8]?ve?ve.p(V,ae):(ve=Al(V),ve.c(),ve.m(e,null)):ve&&(ve.d(1),ve=null)},i(V){Oe||(y(k.$$.fragment,V),y(F.$$.fragment,V),y(z),y(Ue.$$.fragment,V),y(xe),y(B.$$.fragment,V),y(Be.$$.fragment,V),y(ht.$$.fragment,V),y(st.$$.fragment,V),Oe=!0)},o(V){I(k.$$.fragment,V),I(F.$$.fragment,V),I(z),I(Ue.$$.fragment,V),I(xe),I(B.$$.fragment,V),I(Be.$$.fragment,V),I(ht.$$.fragment,V),I(st.$$.fragment,V),Oe=!1},d(V){V&&u(e),ee(k),ee(F),ze[j].d(),ee(Ue),gt[he].d(),ee(B),ee(Be),ee(ht),ee(st),ve&&ve.d(),Me=!1,Jt(Bt)}}}function qn(o){let e,s;return e=new dl({props:{size:14,class:"text-white ml-0.5"}}),{c(){ne(e.$$.fragment)},l(t){le(e.$$.fragment,t)},m(t,l){te(e,t,l),s=!0},i(t){s||(y(e.$$.fragment,t),s=!0)},o(t){I(e.$$.fragment,t),s=!1},d(t){ee(e,t)}}}function Kn(o){let e;return{c(){e=h("div"),this.h()},l(s){e=d(s,"DIV",{class:!0}),m(e).forEach(u),this.h()},h(){c(e,"class","pause-filled text-white")},m(s,t){Q(s,e,t)},i:$t,o:$t,d(s){s&&u(e)}}}function Jn(o){let e,s;return e=new dl({props:{size:20,class:"text-white ml-0.5"}}),{c(){ne(e.$$.fragment)},l(t){le(e.$$.fragment,t)},m(t,l){te(e,t,l),s=!0},i(t){s||(y(e.$$.fragment,t),s=!0)},o(t){I(e.$$.fragment,t),s=!1},d(t){ee(e,t)}}}function Xn(o){let e;return{c(){e=h("div"),this.h()},l(s){e=d(s,"DIV",{class:!0}),m(e).forEach(u),this.h()},h(){c(e,"class","pause-filled text-white scale-150")},m(s,t){Q(s,e,t)},i:$t,o:$t,d(s){s&&u(e)}}}function Al(o){let e,s,t,l;return{c(){e=h("audio"),this.h()},l(n){e=d(n,"AUDIO",{src:!0,style:!0}),m(e).forEach(u),this.h()},h(){_l(e.src,s=o[8])||c(e,"src",s),Kt(e,"display","none")},m(n,r){Q(n,e,r),o[38](e),t||(l=[Y(e,"loadedmetadata",o[24]),Y(e,"timeupdate",o[25]),Y(e,"play",o[26]),Y(e,"pause",o[27])],t=!0)},p(n,r){r[0]&256&&!_l(e.src,s=n[8])&&c(e,"src",s)},d(n){n&&u(e),o[38](null),t=!1,Jt(l)}}}function Pl(o){let e=o[53].name+"",s,t,l=o[53].badge&&Yn(o);return{c(){s=M(e),l&&l.c(),t=xt()},l(n){s=O(n,e),l&&l.l(n),t=xt()},m(n,r){Q(n,s,r),l&&l.m(n,r),Q(n,t,r)},p(n,r){n[53].badge&&l.p(n,r)},d(n){n&&(u(s),u(t)),l&&l.d(n)}}}function Yn(o){let e,s,t,l=o[53].badge+"",n,r;return{c(){e=M(" "),s=h("span"),t=M("("),n=M(l),r=M(")"),this.h()},l(i){e=O(i," "),s=d(i,"SPAN",{class:!0});var f=m(s);t=O(f,"("),n=O(f,l),r=O(f,")"),f.forEach(u),this.h()},h(){c(s,"class","text-xs text-gray-500")},m(i,f){Q(i,e,f),Q(i,s,f),a(s,t),a(s,n),a(s,r)},p:$t,d(i){i&&(u(e),u(s))}}}function xl(o){let e,s=o[53].name===o[4]&&Pl(o);return{c(){s&&s.c(),e=xt()},l(t){s&&s.l(t),e=xt()},m(t,l){s&&s.m(t,l),Q(t,e,l)},p(t,l){t[53].name===t[4]?s?s.p(t,l):(s=Pl(t),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},d(t){t&&u(e),s&&s.d(t)}}}function Ul(o){let e,s=yt(o[20]),t=[];for(let l=0;l<s.length;l+=1)t[l]=Ol(El(o,s,l));return{c(){e=h("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=d(l,"DIV",{class:!0});var n=m(e);for(let r=0;r<t.length;r+=1)t[r].l(n);n.forEach(u),this.h()},h(){c(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){Q(l,e,n);for(let r=0;r<t.length;r+=1)t[r]&&t[r].m(e,null)},p(l,n){if(n[0]&1048656){s=yt(l[20]);let r;for(r=0;r<s.length;r+=1){const i=El(l,s,r);t[r]?t[r].p(i,n):(t[r]=Ol(i),t[r].c(),t[r].m(e,null))}for(;r<t.length;r+=1)t[r].d(1);t.length=s.length}},d(l){l&&u(e),rl(t,l)}}}function Qn(o){let e,s,t,l=o[53].badge+"",n,r;return{c(){e=M(" "),s=h("span"),t=M("("),n=M(l),r=M(")"),this.h()},l(i){e=O(i," "),s=d(i,"SPAN",{class:!0});var f=m(s);t=O(f,"("),n=O(f,l),r=O(f,")"),f.forEach(u),this.h()},h(){c(s,"class","text-xs text-gray-500")},m(i,f){Q(i,e,f),Q(i,s,f),a(s,t),a(s,n),a(s,r)},p:$t,d(i){i&&(u(e),u(s))}}}function Ol(o){let e,s=o[53].name+"",t,l,n,r,i,f=o[53].badge&&Qn(o);function p(){return o[40](o[53])}return{c(){e=h("button"),t=M(s),f&&f.c(),l=E(),this.h()},l($){e=d($,"BUTTON",{class:!0});var v=m(e);t=O(v,s),f&&f.l(v),l=w(v),v.forEach(u),this.h()},h(){c(e,"class",n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[53].name===o[4]?"bg-gray-100":""))},m($,v){Q($,e,v),a(e,t),f&&f.m(e,null),a(e,l),r||(i=Y(e,"click",p),r=!0)},p($,v){o=$,o[53].badge&&f.p(o,v),v[0]&16&&n!==(n="w-full px-3 py-2 text-left hover:bg-gray-50 transition-colors text-sm "+(o[53].name===o[4]?"bg-gray-100":""))&&c(e,"class",n)},d($){$&&u(e),f&&f.d(),r=!1,i()}}}function Ml(o){let e,s,t,l=o[50].name[0]+"",n,r,i,f=o[50].name+"",p,$,v,_=o[50].description+"",g,b,k,T,S;function R(){return o[41](o[50])}return{c(){e=h("button"),s=h("div"),t=h("div"),n=M(l),r=E(),i=h("span"),p=M(f),$=E(),v=h("div"),g=M(_),b=E(),this.h()},l(q){e=d(q,"BUTTON",{class:!0});var A=m(e);s=d(A,"DIV",{class:!0});var C=m(s);t=d(C,"DIV",{class:!0});var x=m(t);n=O(x,l),x.forEach(u),r=w(C),i=d(C,"SPAN",{class:!0});var U=m(i);p=O(U,f),U.forEach(u),C.forEach(u),$=w(A),v=d(A,"DIV",{class:!0});var F=m(v);g=O(F,_),F.forEach(u),b=w(A),A.forEach(u),this.h()},h(){c(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"),c(i,"class","text-sm font-medium"),c(s,"class","flex items-center gap-2"),c(v,"class","text-xs text-gray-500"),c(e,"class",k="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left "+(o[50].name===o[3]?"bg-gray-100":""))},m(q,A){Q(q,e,A),a(e,s),a(s,t),a(t,n),a(s,r),a(s,i),a(i,p),a(e,$),a(e,v),a(v,g),a(e,b),T||(S=Y(e,"click",R),T=!0)},p(q,A){o=q,A[0]&8&&k!==(k="w-full flex items-center justify-between p-2 rounded-md hover:bg-gray-50 transition-colors text-left "+(o[50].name===o[3]?"bg-gray-100":""))&&c(e,"class",k)},d(q){q&&u(e),T=!1,S()}}}function zl(o){let e,s;return{c(){e=h("div"),s=M(o[9]),this.h()},l(t){e=d(t,"DIV",{class:!0});var l=m(e);s=O(l,o[9]),l.forEach(u),this.h()},h(){c(e,"class","fixed bottom-4 right-4 px-4 py-2 bg-gray-900 text-white rounded-lg shadow-lg z-50 animate-fade-in svelte-10276gt")},m(t,l){Q(t,e,l),a(e,s)},p(t,l){l[0]&512&&Le(s,t[9])},d(t){t&&u(e)}}}function Zn(o){let e,s,t,l,n,r,i,f,p,$,v,_,g,b,k,T,S,R,q,A,C,x,U,F,K,H,P,j,z,Ce,Z;S=new In({props:{size:14}}),x=new an({props:{size:14}});let W=o[10]&&Il();const Ee=[Hn,Bn],pe=[];function de(D,re){return D[1]==="ui"?0:1}H=de(o),P=pe[H]=Ee[H](o);let J=o[9]&&zl(o);return{c(){e=h("div"),s=h("header"),t=h("div"),l=h("div"),n=h("div"),r=h("button"),i=M("API"),p=E(),$=h("button"),v=M("Local"),g=E(),b=h("div"),k=h("div"),T=h("button"),ne(S.$$.fragment),R=M(`
15
+ UI`),A=E(),C=h("button"),ne(x.$$.fragment),U=M(`
16
+ API Recorder
17
+ `),W&&W.c(),K=E(),P.c(),j=E(),J&&J.c(),this.h()},l(D){e=d(D,"DIV",{class:!0});var re=m(e);s=d(re,"HEADER",{class:!0});var Ne=m(s);t=d(Ne,"DIV",{class:!0});var ce=m(t);l=d(ce,"DIV",{class:!0});var Ie=m(l);n=d(Ie,"DIV",{class:!0});var Te=m(n);r=d(Te,"BUTTON",{class:!0});var oe=m(r);i=O(oe,"API"),oe.forEach(u),p=w(Te),$=d(Te,"BUTTON",{class:!0});var je=m($);v=O(je,"Local"),je.forEach(u),Te.forEach(u),Ie.forEach(u),g=w(ce),b=d(ce,"DIV",{class:!0});var Ue=m(b);k=d(Ue,"DIV",{class:!0});var Ae=m(k);T=d(Ae,"BUTTON",{class:!0});var $e=m(T);le(S.$$.fragment,$e),R=O($e,`
18
+ UI`),$e.forEach(u),A=w(Ae),C=d(Ae,"BUTTON",{class:!0});var he=m(C);le(x.$$.fragment,he),U=O(he,`
19
+ API Recorder
20
+ `),W&&W.l(he),he.forEach(u),Ae.forEach(u),Ue.forEach(u),ce.forEach(u),Ne.forEach(u),K=w(re),P.l(re),j=w(re),J&&J.l(re),re.forEach(u),this.h()},h(){c(r,"class",f="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[5]==="api"?"bg-white shadow-sm":"text-gray-600")),c($,"class",_="px-3 py-1 text-sm font-medium rounded transition-colors "+(o[5]==="local"?"bg-white shadow-sm":"text-gray-600")),c(n,"class","flex items-center bg-gray-100 rounded-md p-0.5"),c(l,"class","flex items-center gap-3"),c(T,"class",q="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(o[1]==="ui"?"bg-white shadow-sm":"text-gray-600")),c(C,"class",F="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative overflow-hidden "+(o[1]==="code"?"bg-white shadow-sm":"text-gray-600")+" "+(o[10]?"code-flash":"")+" svelte-10276gt"),c(k,"class","flex items-center bg-gray-100 rounded-md p-0.5"),c(b,"class","flex items-center gap-2"),c(t,"class","flex items-center justify-between px-4 py-2"),c(s,"class","border-b border-gray-200 bg-white"),c(e,"class","flex flex-col h-full")},m(D,re){Q(D,e,re),a(e,s),a(s,t),a(t,l),a(l,n),a(n,r),a(r,i),a(n,p),a(n,$),a($,v),a(t,g),a(t,b),a(b,k),a(k,T),te(S,T,null),a(T,R),a(k,A),a(k,C),te(x,C,null),a(C,U),W&&W.m(C,null),a(e,K),pe[H].m(e,null),a(e,j),J&&J.m(e,null),z=!0,Ce||(Z=[Y(r,"click",o[33]),Y($,"click",o[34]),Y(T,"click",o[35]),Y(C,"click",o[36]),Y(e,"click",o[29])],Ce=!0)},p(D,re){(!z||re[0]&32&&f!==(f="px-3 py-1 text-sm font-medium rounded transition-colors "+(D[5]==="api"?"bg-white shadow-sm":"text-gray-600")))&&c(r,"class",f),(!z||re[0]&32&&_!==(_="px-3 py-1 text-sm font-medium rounded transition-colors "+(D[5]==="local"?"bg-white shadow-sm":"text-gray-600")))&&c($,"class",_),(!z||re[0]&2&&q!==(q="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors "+(D[1]==="ui"?"bg-white shadow-sm":"text-gray-600")))&&c(T,"class",q),D[10]?W||(W=Il(),W.c(),W.m(C,null)):W&&(W.d(1),W=null),(!z||re[0]&1026&&F!==(F="flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded transition-colors relative overflow-hidden "+(D[1]==="code"?"bg-white shadow-sm":"text-gray-600")+" "+(D[10]?"code-flash":"")+" svelte-10276gt"))&&c(C,"class",F);let Ne=H;H=de(D),H===Ne?pe[H].p(D,re):(Vt(),I(pe[Ne],1,1,()=>{pe[Ne]=null}),St(),P=pe[H],P?P.p(D,re):(P=pe[H]=Ee[H](D),P.c()),y(P,1),P.m(e,j)),D[9]?J?J.p(D,re):(J=zl(D),J.c(),J.m(e,null)):J&&(J.d(1),J=null)},i(D){z||(y(S.$$.fragment,D),y(x.$$.fragment,D),y(P),z=!0)},o(D){I(S.$$.fragment,D),I(x.$$.fragment,D),I(P),z=!1},d(D){D&&u(e),ee(S),ee(x),W&&W.d(),pe[H].d(),J&&J.d(),Ce=!1,Jt(Z)}}}function Wl(){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 Pt(o){const e=Math.floor(o/60),s=Math.floor(o%60);return`${e}:${s.toString().padStart(2,"0")}`}function Ll(){console.log("Share audio")}function jl(){const o=Wl();return`# Install required packages
21
+ # pip install huggingface-hub
22
+
23
+ from huggingface_hub import InferenceClient
24
+ import base64
25
+ import io
26
+
27
+ # Initialize the client
28
+ client = InferenceClient(
29
+ provider="fal-ai",
30
+ api_key="YOUR_HF_TOKEN", # Get your token from https://huggingface.co/settings/tokens
31
+ )`}function es(){return`# Save the audio to a file
32
+ output_filename = "output_speech.wav"
33
+
34
+ with open(output_filename, "wb") as f:
35
+ f.write(audio_bytes)
36
+
37
+ print(f"✓ Audio saved to {output_filename}")
38
+
39
+ # Optional: Play the audio (requires additional packages)
40
+ # from playsound import playsound
41
+ # playsound(output_filename)`}function ts(o,e,s){let t="In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.",l="Novia",n="Chatterbox",r="api",i="ui",f=!1,p=!1,$=[],v=null,_=null,g=!1,b=1,k=.5,T=.75,S=0,R=!1,q=0,A=0,C="",x=null;const U=[{id:"chatterbox",name:"Chatterbox",badge:"recommended"},{id:"kokoro",name:"Kokoro",badge:"faster but lower quality"}],F=[{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 K(){if(console.log("generateSpeech called, text:",t.trim().substring(0,50)),!!t.trim()){console.log("Starting generation..."),s(7,p=!0),s(8,v=null),s(16,q=0),$.length===0&&Ee("Setup and Import",jl()),Ee("Generate Speech",pe()),i==="ui"&&(s(10,g=!0),setTimeout(()=>{s(10,g=!1)},2500)),s(15,R=!1),s(18,C=t.length>30?t.substring(0,30)+"...":t);try{const B=Wl();console.log("Access token for API call:",B?"Found ("+B.substring(0,10)+"...)":"None");const ke={text:t,voice_id:l.toLowerCase(),model_id:n.toLowerCase(),mode:r,access_token:B,parameters:{speed:b,stability:k,similarity:T,style_exaggeration:S}};console.log("Sending request to /api/tts/generate:",ke);const ye=await fetch("/api/tts/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(console.log("API response status:",ye.status),!ye.ok){const Pe=await ye.text();throw console.error("API error response:",Pe),new Error(`HTTP error! status: ${ye.status}, body: ${Pe}`)}const De=await ye.json();if(console.log("API response result:",De),De.success&&De.audio_url)s(8,v=De.audio_url),Ee("Save Audio Output",es()),i==="ui"&&(s(10,g=!0),setTimeout(()=>{s(10,g=!1)},2500));else{const Pe=De.error||"Unknown error occurred";alert(`❌ ${Pe}`),s(8,v=null)}}catch(B){console.error("Error generating speech:",B),alert("❌ Network error: Failed to connect to the server"),s(8,v=null)}finally{s(7,p=!1)}}}function H(){x&&(R?x.pause():x.play())}function P(){x&&(s(17,A=x.duration),x.play())}function j(){x&&s(16,q=x.currentTime)}function z(){s(15,R=!0)}function Ce(){s(15,R=!1)}function Z(){if(v){const B=document.createElement("a");B.href=v,B.download="speech.wav",B.click()}}function W(B){B.target.closest(".model-dropdown")||s(6,f=!1)}function Ee(B,ke,ye=null){const De={id:Date.now()+Math.random(),title:B,code:ke,output:ye,timestamp:new Date().toLocaleTimeString()};return s(2,$=[...$,De]),De}function pe(){return t.length>100&&t.substring(0,100)+"",`# Text to convert to speech
42
+ text = """${t}"""
43
+
44
+ # Voice and model settings
45
+ model = "ResembleAI/chatterbox"
46
+ voice = "${l.toLowerCase()}"
47
+ speed = ${b}
48
+ stability = ${k}
49
+ similarity = ${T}
50
+ style_exaggeration = ${S}
51
+
52
+ # Generate speech
53
+ print("Generating speech...")
54
+ try:
55
+ audio_bytes = client.text_to_speech(
56
+ text,
57
+ model=model,
58
+ # Note: Voice and other parameters may vary by model
59
+ )
60
+ print(f"✓ Generated {len(audio_bytes)} bytes of audio")
61
+ except Exception as e:
62
+ print(f"Error: {e}")`}function de(B,ke="Copied to clipboard!"){navigator.clipboard.writeText(B).then(()=>{s(9,_=ke),setTimeout(()=>{s(9,_=null)},2e3)})}function J(){const B=$.map(ke=>`# ${ke.title}
63
+ ${ke.code}`).join(`
64
+
65
+ `);de(B,"All code copied!")}let D=t;const re=()=>s(5,r="api"),Ne=()=>s(5,r="local"),ce=()=>s(1,i="ui"),Ie=()=>s(1,i="code");function Te(){t=this.value,s(0,t)}function oe(B){Gl[B?"unshift":"push"](()=>{x=B,s(19,x)})}const je=()=>s(6,f=!f),Ue=B=>{s(4,n=B.name),s(6,f=!1)},Ae=B=>s(3,l=B.name);function $e(){b=ol(this.value),s(11,b)}function he(){k=ol(this.value),s(12,k)}function xe(){T=ol(this.value),s(13,T)}function wt(){S=ol(this.value),s(14,S)}const be=B=>de(B.code);return o.$$.update=()=>{o.$$.dirty[0]&2&&i==="ui"&&s(2,$=[]),o.$$.dirty[0]&6&&$.length===0&&i==="code"&&Ee("Setup and Import",jl()),o.$$.dirty[0]&5|o.$$.dirty[1]&2&&t!==D&&$.length>0&&s(32,D=t)},[t,i,$,l,n,r,f,p,v,_,g,b,k,T,S,R,q,A,C,x,U,F,K,H,P,j,z,Ce,Z,W,de,J,D,re,Ne,ce,Ie,Te,oe,je,Ue,Ae,$e,he,xe,wt,be]}class ss extends Fe{constructor(e){super(),We(this,e,ts,Zn,He,{},null,[-1,-1])}}export{ss as component};
hfstudio/static/_app/immutable/nodes/3.WlLGF3D1.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/BI_gvUUO.js";import"../chunks/IHki7fMi.js";import{g as F}from"../chunks/A_pQz6w4.js";import{p as B}from"../chunks/Bt6XZmgQ.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};
hfstudio/static/_app/version.json CHANGED
@@ -1 +1 @@
1
- {"version":"1760678788235"}
 
1
+ {"version":"1760679521635"}
hfstudio/static/index.html CHANGED
@@ -6,25 +6,25 @@
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
  <title>HFStudio - Text to Speech</title>
8
 
9
- <link rel="modulepreload" href="/_app/immutable/entry/start.NQKN_c-m.js">
10
- <link rel="modulepreload" href="/_app/immutable/chunks/p8TMrHIb.js">
11
- <link rel="modulepreload" href="/_app/immutable/chunks/B1LPgyXz.js">
12
- <link rel="modulepreload" href="/_app/immutable/entry/app.Ldw6h6nD.js">
13
  <link rel="modulepreload" href="/_app/immutable/chunks/IHki7fMi.js">
14
  </head>
15
  <body data-sveltekit-preload-data="hover">
16
  <div style="display: contents">
17
  <script>
18
  {
19
- __sveltekit_cvtmlb = {
20
  base: ""
21
  };
22
 
23
  const element = document.currentScript.parentElement;
24
 
25
  Promise.all([
26
- import("/_app/immutable/entry/start.NQKN_c-m.js"),
27
- import("/_app/immutable/entry/app.Ldw6h6nD.js")
28
  ]).then(([kit, app]) => {
29
  kit.start(app, element);
30
  });
 
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
  <title>HFStudio - Text to Speech</title>
8
 
9
+ <link rel="modulepreload" href="/_app/immutable/entry/start.DK66rcHD.js">
10
+ <link rel="modulepreload" href="/_app/immutable/chunks/A_pQz6w4.js">
11
+ <link rel="modulepreload" href="/_app/immutable/chunks/BI_gvUUO.js">
12
+ <link rel="modulepreload" href="/_app/immutable/entry/app.pMgeiL_r.js">
13
  <link rel="modulepreload" href="/_app/immutable/chunks/IHki7fMi.js">
14
  </head>
15
  <body data-sveltekit-preload-data="hover">
16
  <div style="display: contents">
17
  <script>
18
  {
19
+ __sveltekit_15blozf = {
20
  base: ""
21
  };
22
 
23
  const element = document.currentScript.parentElement;
24
 
25
  Promise.all([
26
+ import("/_app/immutable/entry/start.DK66rcHD.js"),
27
+ import("/_app/immutable/entry/app.pMgeiL_r.js")
28
  ]).then(([kit, app]) => {
29
  kit.start(app, element);
30
  });