-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
673 lines (622 loc) · 27 KB
/
Copy pathindex.html
File metadata and controls
673 lines (622 loc) · 27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nautilus Lab · PROMPT FORGE AI</title>
<style>
:root {
--bg-dark: #0a0a0f;
--card-bg: #12121a;
--neon-cyan: #00f3ff;
--neon-purple: #bc13fe;
--neon-red: #ff2d55;
--text-main: #e0e0e0;
--text-dim: #888;
--border: #2a2a35;
}
* { box-sizing: border-box; }
body {
font-family: 'Segoe UI', system-ui, sans-serif;
background-color: var(--bg-dark);
color: var(--text-main);
margin: 0;
padding: 20px;
line-height: 1.6;
}
header {
text-align: center;
margin-bottom: 30px;
border-bottom: 1px solid var(--border);
padding-bottom: 20px;
}
h1 {
font-size: 2rem;
background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 20px;
}
.card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.card.negative-card {
border-color: rgba(255, 45, 85, 0.35);
box-shadow: 0 4px 20px rgba(255, 45, 85, 0.08);
}
.card h2 {
margin-top: 0;
color: var(--neon-cyan);
font-size: 1.2rem;
display: flex;
align-items: center;
gap: 10px;
}
.card.negative-card h2 { color: var(--neon-red); }
.form-group { margin-bottom: 15px; }
label {
display: block;
margin-bottom: 5px;
font-size: 0.9rem;
color: var(--text-dim);
}
select, input, textarea {
width: 100%;
padding: 10px;
background: #1a1a24;
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text-main);
font-size: 0.95rem;
}
select:focus, input:focus, textarea:focus {
outline: none;
border-color: var(--neon-cyan);
}
.negative-card select:focus,
.negative-card input:focus,
.negative-card textarea:focus {
border-color: var(--neon-red);
}
textarea { resize: vertical; min-height: 80px; }
.btn {
width: 100%;
padding: 12px;
background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
border: none;
border-radius: 6px;
color: #000;
font-weight: bold;
font-size: 1rem;
cursor: pointer;
transition: transform 0.1s, opacity 0.2s;
margin-top: 10px;
}
.btn-negative {
background: linear-gradient(90deg, #ff2d55, #bc13fe);
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.output-box {
margin-top: 15px;
background: #050508;
border: 1px dashed var(--border);
border-radius: 6px;
padding: 15px;
min-height: 100px;
white-space: pre-wrap;
font-family: monospace;
font-size: 0.9rem;
position: relative;
color: var(--text-dim);
}
.output-box.has-content { color: var(--text-main); }
.output-box.neg-output { border-color: rgba(255, 45, 85, 0.3); }
.copy-btn {
position: absolute;
top: 10px;
right: 10px;
background: #333;
border: none;
color: #fff;
padding: 5px 10px;
border-radius: 4px;
cursor: pointer;
font-size: 0.8rem;
z-index: 1;
}
.copy-btn:hover { background: var(--neon-cyan); color: #000; }
.row { display: flex; gap: 10px; }
.row .form-group { flex: 1; }
.tag-group {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 12px;
}
.tag-toggle {
padding: 5px 12px;
background: #1a1a24;
border: 1px solid var(--border);
border-radius: 20px;
color: var(--text-dim);
font-size: 0.8rem;
cursor: pointer;
user-select: none;
transition: all 0.15s;
}
.tag-toggle.active {
background: rgba(255, 45, 85, 0.15);
border-color: var(--neon-red);
color: var(--neon-red);
}
.section-label {
font-size: 0.75rem;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 6px;
}
.divider {
border: none;
border-top: 1px solid var(--border);
margin: 12px 0;
}
.char-count {
font-size: 0.75rem;
color: var(--text-dim);
text-align: right;
margin-top: 3px;
}
</style>
</head>
<body>
<header>
<h1>⬡ Nautilus Lab · PROMPT FORGE AI</h1>
<p style="color: var(--text-dim); margin: 5px 0 0 0;">Sistema de Creación de Contenido · 100% Offline · Sin APIs</p>
</header>
<div class="container">
<!-- CARD 1: PROMPT POSITIVO -->
<div class="card">
<h2>🔮 Generador de Prompt Positivo</h2>
<div class="row">
<div class="form-group">
<label>Tipo de contenido</label>
<select id="p-type">
<option>Imagen</option><option>Video</option><option>Personaje</option>
<option>Escena</option><option>Logo</option><option>Manga</option>
</select>
</div>
<div class="form-group">
<label>Idioma</label>
<select id="p-lang">
<option value="en">English</option>
<option value="es">Español</option>
</select>
</div>
</div>
<div class="form-group">
<label>Estilo visual</label>
<select id="p-style">
<option>Cyberpunk neon</option><option>Anime shonen</option><option>Voxel 3D</option>
<option>Pixel art retro</option><option>Dark fantasy</option><option>Synthwave</option>
<option>Lo-fi aesthetic</option><option>Hyperrealista</option><option>Steampunk</option>
<option>Watercolor</option>
</select>
</div>
<div class="row">
<div class="form-group">
<label>Calidad</label>
<select id="p-quality">
<option>4K ultra detailed</option><option>8K cinematic</option>
<option>Masterpiece quality</option><option>Concept art</option>
</select>
</div>
<div class="form-group">
<label>Longitud</label>
<select id="p-length">
<option value="short">Corto (~50 tok)</option>
<option value="medium" selected>Medio (~100 tok)</option>
<option value="long">Largo (150+ tok)</option>
</select>
</div>
</div>
<div class="form-group">
<label>💡 Tu idea (personaje, ambiente, colores, acción)</label>
<textarea id="p-idea" placeholder="Ej: Un samurai bajo la lluvia en una calle de neón..."></textarea>
</div>
<button class="btn" id="btn-prompt" onclick="generatePrompt()">⚡ GENERAR PROMPT</button>
<div class="output-box" id="out-prompt">
<button class="copy-btn" onclick="copyText('out-prompt')">Copiar</button>
El prompt aparecerá aquí...
</div>
</div>
<!-- CARD 2: PROMPT NEGATIVO -->
<div class="card negative-card">
<h2>🚫 Generador de Prompt Negativo</h2>
<p style="color: var(--text-dim); font-size:0.85rem; margin-top:-5px; margin-bottom:12px;">
Define qué quieres <strong style="color:var(--neon-red)">eliminar</strong> de tu imagen generada.
</p>
<div class="section-label">Categorías a excluir</div>
<div class="tag-group" id="neg-tags">
<span class="tag-toggle active" data-key="quality">❌ Baja calidad</span>
<span class="tag-toggle active" data-key="anatomy">🦴 Anatomía mala</span>
<span class="tag-toggle active" data-key="deform">🌀 Deformaciones</span>
<span class="tag-toggle" data-key="text">✍️ Texto/Letras</span>
<span class="tag-toggle" data-key="watermark">💧 Marca de agua</span>
<span class="tag-toggle" data-key="blur">🌫️ Borroso</span>
<span class="tag-toggle" data-key="frame">🖼️ Bordes/Marcos</span>
<span class="tag-toggle" data-key="cartoon">🐭 Cartoon/Childish</span>
<span class="tag-toggle" data-key="nsfw">🔞 NSFW</span>
<span class="tag-toggle" data-key="noise">📺 Ruido/Artefactos</span>
<span class="tag-toggle" data-key="duplicate">👬 Duplicados</span>
</div>
<hr class="divider">
<div class="form-group">
<label>🎨 Estilo de generador objetivo</label>
<select id="neg-engine">
<option value="general">General (SD / Flux)</option>
<option value="xl">SDXL optimizado</option>
<option value="realistic">Hiperealista (RealVisXL)</option>
<option value="anime">Anime (DivineElegance / Anything)</option>
<option value="pixel">Pixel Art</option>
</select>
</div>
<div class="form-group">
<label>✏️ Exclusiones personalizadas (separadas por coma)</label>
<textarea id="neg-custom" placeholder="Ej: sombrero, fondo blanco, lentes de sol..." style="min-height:60px;"></textarea>
</div>
<div class="form-group">
<label>Intensidad del negativo</label>
<select id="neg-intensity">
<option value="light">Ligero (prompts esenciales)</option>
<option value="medium" selected>Medio (recomendado)</option>
<option value="heavy">Agresivo (máximo control)</option>
</select>
</div>
<button class="btn btn-negative" id="btn-neg" onclick="generateNegativePrompt()">🚫 GENERAR NEGATIVO</button>
<div class="output-box neg-output" id="out-neg">
<button class="copy-btn" onclick="copyText('out-neg')">Copiar</button>
El prompt negativo aparecerá aquí...
</div>
<div class="char-count" id="neg-char-count"></div>
</div>
<!-- CARD 3: DESCRIPCIÓN -->
<div class="card">
<h2>📺 Generador de Descripción</h2>
<div class="form-group">
<label>Título del video</label>
<input type="text" id="v-title" placeholder="Ej: Construyendo una PC Cyberpunk">
</div>
<div class="row">
<div class="form-group">
<label>Género / Categoría</label>
<select id="v-genre">
<option>Anime / Manga</option><option>Gaming retro</option><option>Cyberpunk</option>
<option>Tech / Dev</option><option>Música / Beats</option><option>Tutorial</option>
</select>
</div>
<div class="form-group">
<label>Plataforma</label>
<select id="v-plat">
<option>YouTube</option><option>TikTok</option><option>Instagram</option>
</select>
</div>
</div>
<div class="form-group">
<label>De qué trata (resumen)</label>
<textarea id="v-summary" placeholder="Ej: En este video te muestro paso a paso..."></textarea>
</div>
<div class="form-group">
<label>🔗 Links a incluir (uno por línea)</label>
<textarea id="v-links" placeholder="https://miweb.com https://twitter.com/miuser"></textarea>
</div>
<button class="btn" onclick="generateDescription()">⚡ GENERAR DESCRIPCIÓN</button>
<div class="output-box" id="out-desc">
<button class="copy-btn" onclick="copyText('out-desc')">Copiar</button>
La descripción aparecerá aquí...
</div>
</div>
<!-- CARD 4: HASHTAGS -->
<div class="card">
<h2>🏷️ Generador de Hashtags</h2>
<div class="row">
<div class="form-group">
<label>Tema del contenido</label>
<select id="h-theme">
<option value="gaming">Gaming</option>
<option value="tech">Tech / Dev</option>
<option value="anime">Anime / Arte</option>
<option value="music">Música / Lo-fi</option>
<option value="lifestyle">Lifestyle / Vlog</option>
</select>
</div>
<div class="form-group">
<label>Cantidad</label>
<select id="h-qty">
<option>10</option>
<option selected>20</option>
<option>30</option>
</select>
</div>
</div>
<div class="form-group">
<label>Idioma / Mix</label>
<select id="h-lang">
<option value="mix">Mix ES / EN (Recomendado)</option>
<option value="es">Solo Español</option>
<option value="en">Solo English</option>
</select>
</div>
<button class="btn" onclick="generateHashtags()">📈 GENERAR HASHTAGS</button>
<div class="output-box" id="out-tags">
<button class="copy-btn" onclick="copyText('out-tags')">Copiar</button>
Los hashtags aparecerán aquí...
</div>
</div>
</div>
<script>
// =============================================================
// NAUTILUS LAB · PROMPT FORGE v2 — Motor local sin APIs
// =============================================================
// ── HELPERS ──────────────────────────────────────────────────
const $ = id => document.getElementById(id);
const rand = arr => arr[Math.floor(Math.random() * arr.length)];
function getVal(id) {
const el = $(id);
if (!el) return '';
return el.value.trim();
}
function setOutput(id, text) {
const el = $(id);
if (!el) return;
const copyBtn = el.querySelector('.copy-btn');
el.textContent = text;
if (copyBtn) el.prepend(copyBtn);
el.classList.toggle('has-content', !!text);
}
function copyText(id) {
const el = $(id);
if (!el) return;
const copyBtn = el.querySelector('.copy-btn');
const rawText = el.textContent || '';
const textToCopy = copyBtn
? rawText.replace(copyBtn.textContent, '').trim()
: rawText.trim();
navigator.clipboard.writeText(textToCopy).then(() => {
if (!copyBtn) return;
const prev = copyBtn.textContent;
copyBtn.textContent = '✅ Copiado';
copyBtn.style.background = 'var(--neon-cyan)';
copyBtn.style.color = '#000';
setTimeout(() => {
copyBtn.textContent = prev;
copyBtn.style.background = '#333';
copyBtn.style.color = '#fff';
}, 1500);
}).catch(() => {
alert('Error al copiar. Selecciona el texto manualmente.');
});
}
// ── DATOS ─────────────────────────────────────────────────────
const DATA = {
lighting: ["cinematic lighting","volumetric rays","neon glow","soft ambient light","dramatic shadows","golden hour","rim lighting","studio lighting"],
camera: ["wide angle shot","close up","macro lens","depth of field","bokeh effect","isometric view","low angle","bird eye view"],
render: ["unreal engine 5","octane render","ray tracing","highly detailed textures","sharp focus","redshift","arnold renderer"],
negativeDb: {
quality: {
light: "low quality, bad quality",
medium: "low quality, bad quality, worst quality, jpeg artifacts, lowres",
heavy: "low quality, bad quality, worst quality, jpeg artifacts, lowres, (low res:1.3), blurry, grainy, pixelated, oversaturated"
},
anatomy: {
light: "bad anatomy",
medium: "bad anatomy, bad hands, extra fingers, missing fingers",
heavy: "bad anatomy, bad hands, extra fingers, missing fingers, extra limbs, missing limbs, fused fingers, malformed hands, mutated, mutation, disfigured"
},
deform: {
light: "deformed",
medium: "deformed, ugly, malformed",
heavy: "deformed, ugly, malformed, morbid, mutilated, gross proportions, long neck, cloned face, bad proportions"
},
text: {
light: "text",
medium: "text, letters, watermark",
heavy: "text, letters, watermark, signature, username, title, words, font"
},
watermark: {
light: "watermark",
medium: "watermark, signature, logo overlay",
heavy: "watermark, signature, logo overlay, copyright mark, text overlay, branded"
},
blur: {
light: "blurry",
medium: "blurry, out of focus",
heavy: "blurry, out of focus, soft focus, motion blur, unfocused background, haze"
},
frame: {
light: "border",
medium: "border, frame, cropped",
heavy: "border, frame, cropped, cut off, out of frame, panel border, comic frame"
},
cartoon: {
light: "cartoon",
medium: "cartoon, childish, 3d render",
heavy: "cartoon, childish, 3d render, oversimplified, flat art, novice art, beginner sketch, simple drawing"
},
nsfw: {
light: "nsfw",
medium: "nsfw, explicit content",
heavy: "nsfw, explicit content, nude, nudity, adult content, suggestive"
},
noise: {
light: "noise",
medium: "noise, grain, artifacts",
heavy: "noise, grain, artifacts, compression artifacts, digital noise, chromatic aberration, halftone, scan lines"
},
duplicate: {
light: "duplicate",
medium: "duplicate, clone",
heavy: "duplicate, clone, copy, replicated, multiple instances, out of focus twin"
}
},
engineExtra: {
general: [],
xl: ["embedding:easynegative", "embedding:badhandv4"],
realistic: ["painting", "illustration", "anime", "cgi", "render", "plastic", "fake", "artificial lighting"],
anime: ["realistic", "photo", "3d render", "cgi", "western art style", "proportional anatomy"],
pixel: ["blurry", "smooth gradient", "photo realistic", "3d", "high resolution", "anti-aliased"]
},
hashPools: {
gaming: {
es: ["gaming","gamer","videojuegos","gameplay","streamer","jugadores","retrogaming","setupgamer","esports","comunidadgamer","pcgamer","consoleros"],
en: ["gaming","gamer","videogames","gameplay","twitch","streamer","retrogaming","pcgaming","esports","gamingcommunity","indiegames","retrogamer"]
},
tech: {
es: ["tecnologia","programacion","desarrollo","coding","tech","innovacion","gadgets","aprenderaprogramar","software","futuro","opensource","devs"],
en: ["technology","programming","coding","tech","innovation","gadgets","developer","software","futuretech","techtok","openSource","selfhosted"]
},
anime: {
es: ["anime","manga","otaku","animelover","arte","dibujo","ilustracion","cosplay","culturaotaku","fanart","arteDigital","animacion"],
en: ["anime","manga","otaku","animelover","art","drawing","illustration","cosplay","weeb","fanart","digitalart","animation"]
},
music: {
es: ["musica","beats","lofi","productor","hiphop","instrumental","musicos","estudiar","relax","vibes","chillbeats","sonidero"],
en: ["music","beats","lofi","producer","hiphop","instrumental","musicians","studybeats","chill","vibes","chillhop","beatmaker"]
},
lifestyle: {
es: ["vlog","diario","lifestyle","rutina","motivacion","vida","consejos","crecimiento","experiencias","minivlog","creadorDeContenido","tendencia"],
en: ["vlog","dailyvlog","lifestyle","routine","motivation","life","tips","growth","experiences","minivlog","contentcreator","trending"]
}
},
hashUniversal: {
es: ["parati","fyp","viral","tendencia","explorar","contenido","creador","nautiluslab"],
en: ["fyp","foryou","viral","trending","explore","content","creator","nautiluslab"]
}
};
// ── 1. PROMPT POSITIVO ────────────────────────────────────────
function generatePrompt() {
const type = getVal('p-type');
const lang = getVal('p-lang');
const style = getVal('p-style');
const quality = getVal('p-quality');
const length = getVal('p-length');
const idea = getVal('p-idea') || 'a mysterious subject';
const light = rand(DATA.lighting);
const cam = rand(DATA.camera);
const render = rand(DATA.render);
let prompt = '';
if (lang === 'en') {
prompt = `${style} ${type.toLowerCase()} of ${idea}, ${quality}.`;
if (length !== 'short') prompt += ` Illuminated with ${light}, captured with ${cam}.`;
if (length === 'long') prompt += ` Masterpiece, ${render}, intricate details, trending on artstation, 8k resolution, vivid colors, award winning.`;
} else {
prompt = `${type} estilo ${style} de ${idea}, calidad ${quality}.`;
if (length !== 'short') prompt += ` Iluminado con ${light}, capturado con ${cam}.`;
if (length === 'long') prompt += ` Obra maestra, ${render}, detalles intrincados, tendencia en artstation, resolución 8k, colores vibrantes, premiado.`;
}
setOutput('out-prompt', prompt.trim());
}
// ── 2. PROMPT NEGATIVO ────────────────────────────────────────
// Init tag toggles
document.querySelectorAll('#neg-tags .tag-toggle').forEach(tag => {
tag.addEventListener('click', () => tag.classList.toggle('active'));
});
function generateNegativePrompt() {
const intensity = getVal('neg-intensity') || 'medium';
const engine = getVal('neg-engine') || 'general';
const custom = getVal('neg-custom');
const activeKeys = Array.from(
document.querySelectorAll('#neg-tags .tag-toggle.active')
).map(el => el.dataset.key).filter(Boolean);
if (activeKeys.length === 0 && !custom) {
setOutput('out-neg', '⚠️ Selecciona al menos una categoría o escribe exclusiones personalizadas.');
return;
}
// Collect terms evitando duplicados
const terms = new Set();
activeKeys.forEach(key => {
const db = DATA.negativeDb[key];
if (!db) return;
const line = db[intensity] || db.medium || '';
line.split(',').forEach(t => { const s = t.trim(); if (s) terms.add(s); });
});
// Engine-specific extras
(DATA.engineExtra[engine] || []).forEach(t => terms.add(t));
// Custom
if (custom) {
custom.split(',').forEach(t => { const s = t.trim(); if (s) terms.add(s.toLowerCase()); });
}
const result = Array.from(terms).join(', ');
setOutput('out-neg', result);
// Char count
const cc = $('neg-char-count');
if (cc) cc.textContent = `${result.length} caracteres · ${result.split(',').length} términos`;
}
// ── 3. DESCRIPCIÓN ────────────────────────────────────────────
const CTA_MAP = {
YouTube: "🔔 ¡No olvides SUSCRIBIRTE, dejar tu LIKE y comentar qué te pareció!\n🔗 Comparte este video con tus amigos.",
TikTok: "✨ Sígueme para más contenido diario.\n💬 ¿Qué opinas? Te leo en los comentarios.",
Instagram: "📸 Guarda este post y compártelo en tus historias.\n💬 Déjame un 🔥 en los comentarios si te gustó."
};
function generateDescription() {
const title = getVal('v-title') || 'Mi Nuevo Video';
const genre = getVal('v-genre') || 'Contenido';
const plat = getVal('v-plat') || 'YouTube';
const summary = getVal('v-summary') || 'No te pierdas este increíble contenido.';
const linksRaw = getVal('v-links');
let linksBlock = '🔗 Enlaces:\n';
if (!linksRaw) {
linksBlock += '👉 ¡Suscríbete para más contenido!';
} else {
linksRaw.split('\n')
.map(l => l.trim())
.filter(Boolean)
.forEach(l => { linksBlock += `🔗 ${l}\n`; });
}
const cta = CTA_MAP[plat] || '';
const desc = `🎬 ${title.toUpperCase()}\n\n📂 Categoría: ${genre}\n\n📝 ${summary}\n\n${linksBlock}\n\n${cta}`;
setOutput('out-desc', desc.trim());
}
// ── 4. HASHTAGS ───────────────────────────────────────────────
function generateHashtags() {
const theme = getVal('h-theme') || 'gaming';
const qty = parseInt(getVal('h-qty')) || 20;
const lang = getVal('h-lang') || 'mix';
const pool = DATA.hashPools[theme];
const univ = DATA.hashUniversal;
const fallback = ['nautiluslab','contentcreator','digitalart','creator','viralvideo','indiedev'];
let themePool = [];
if (lang === 'es') themePool = [...pool.es, ...univ.es];
else if (lang === 'en') themePool = [...pool.en, ...univ.en];
else themePool = [...pool.es, ...pool.en, ...univ.es, ...univ.en];
// Shuffle (Fisher-Yates para mejor aleatoriedad)
for (let i = themePool.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[themePool[i], themePool[j]] = [themePool[j], themePool[i]];
}
const selected = new Set(themePool.slice(0, qty));
// Relleno si falta
let fi = 0;
while (selected.size < qty && fi < fallback.length * 3) {
selected.add(fallback[fi % fallback.length]);
fi++;
}
const result = Array.from(selected).map(t => `#${t}`).join(' ');
setOutput('out-tags', result);
}
</script>
</body>
</html>