@socialgen_user/socialgen 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/BDNIAT8Y.js +1 -0
- package/.output/public/_nuxt/CDHRWqHx.js +1 -0
- package/.output/public/_nuxt/{8VnlkoEA.js → CmR5Iggk.js} +1 -1
- package/.output/public/_nuxt/{BPLr5diI.js → QBlLTvjN.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/0a887d6d-9340-488f-8265-8ecb33690a1e.json +1 -0
- package/.output/public/_nuxt/{0Br9Vc0s.js → fuMtRmMX.js} +1 -1
- package/.output/public/_nuxt/{De9_qv1a.js → nK16jZIC.js} +1 -1
- package/.output/public/_nuxt/tf8XWazX.js +5 -0
- package/.output/server/chunks/_/niches.mjs +142 -0
- package/.output/server/chunks/_/niches.mjs.map +1 -0
- package/.output/server/chunks/_/nitro.mjs +110 -94
- package/.output/server/chunks/_/storage.mjs +7 -1
- package/.output/server/chunks/_/storage.mjs.map +1 -1
- package/.output/server/chunks/_/topicMatrix.mjs +33 -65
- package/.output/server/chunks/_/topicMatrix.mjs.map +1 -1
- package/.output/server/chunks/build/{TableCard-C_ouH7xZ.mjs → TableCard-DK13vKzs.mjs} +61 -1
- package/.output/server/chunks/build/TableCard-DK13vKzs.mjs.map +1 -0
- package/.output/server/chunks/build/{_mode_-Bqv8WY_m.mjs → _mode_-CQcOaIv6.mjs} +2 -2
- package/.output/server/chunks/build/{_mode_-Bqv8WY_m.mjs.map → _mode_-CQcOaIv6.mjs.map} +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/entry-styles.BtOU26pL.mjs +8 -0
- package/.output/server/chunks/build/entry-styles.BtOU26pL.mjs.map +1 -0
- package/.output/server/chunks/build/{pages-BHQfewv9.mjs → pages-CbBqCzvC.mjs} +217 -40
- package/.output/server/chunks/build/pages-CbBqCzvC.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +2 -2
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/build/styles.mjs.map +1 -1
- package/.output/server/chunks/routes/api/auto-topic.post.mjs +3 -2
- package/.output/server/chunks/routes/api/auto-topic.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/copy-prompt.get.mjs +12 -13
- package/.output/server/chunks/routes/api/copy-prompt.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/generate.post.mjs +32 -19
- package/.output/server/chunks/routes/api/generate.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/generation-history.delete.mjs +51 -0
- package/.output/server/chunks/routes/api/generation-history.delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/generation-history.get.mjs +41 -0
- package/.output/server/chunks/routes/api/generation-history.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/generation-history.post.mjs +42 -0
- package/.output/server/chunks/routes/api/generation-history.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/last-session.get.mjs +35 -0
- package/.output/server/chunks/routes/api/last-session.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/last-session.post.mjs +36 -0
- package/.output/server/chunks/routes/api/last-session.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/niches.delete.mjs +32 -0
- package/.output/server/chunks/routes/api/niches.delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/niches.get.mjs +24 -0
- package/.output/server/chunks/routes/api/niches.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/niches.post.mjs +56 -0
- package/.output/server/chunks/routes/api/niches.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/status.get.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/bin/cli.js +8 -2
- package/data/history.json +5 -42
- package/data/niches.json +100 -0
- package/package.json +1 -1
- package/.output/public/_nuxt/BUd27fqX.js +0 -4
- package/.output/public/_nuxt/CElmFakF.js +0 -1
- package/.output/public/_nuxt/DQwlrwii.js +0 -1
- package/.output/public/_nuxt/builds/meta/6961e184-03aa-44e3-8c16-c6847eb1ef2b.json +0 -1
- package/.output/server/chunks/build/TableCard-C_ouH7xZ.mjs.map +0 -1
- package/.output/server/chunks/build/entry-styles.C2d8MIct.mjs +0 -8
- package/.output/server/chunks/build/entry-styles.C2d8MIct.mjs.map +0 -1
- package/.output/server/chunks/build/pages-BHQfewv9.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, mergeProps, unref, isRef,
|
|
2
|
-
import { ssrRenderAttrs,
|
|
3
|
-
import {
|
|
4
|
-
import { _ as _sfc_main$3 } from './TableCard-
|
|
1
|
+
import { defineComponent, ref, watch, computed, mergeProps, unref, isRef, nextTick, useSSRContext } from 'vue';
|
|
2
|
+
import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderComponent, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
|
|
3
|
+
import { Settings, X, Check, Edit2, Trash2, FileText, Copy, Wand2, Plus, Sparkles, Bookmark, LayoutTemplate, CheckCircle2, AlertCircle, Film, Upload, Scissors, Music, Clock, RefreshCw, Play, ZoomOut, ZoomIn, RotateCcw, ShieldAlert, Pause, Volume2, VolumeX, Download, FolderOpen } from 'lucide-vue-next';
|
|
4
|
+
import { _ as _sfc_main$3 } from './TableCard-DK13vKzs.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
7
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
@@ -18,7 +18,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
drafts: {},
|
|
19
19
|
activeDraftIndex: {}
|
|
20
20
|
},
|
|
21
|
-
emits: ["update:modelValue", "update:options", "generate", "autoTopic", "selectDraft", "deleteDraft", "saveDraft"],
|
|
21
|
+
emits: ["update:modelValue", "update:options", "generate", "autoTopic", "selectDraft", "deleteDraft", "clearAllDrafts", "saveDraft"],
|
|
22
22
|
setup(__props, { emit: __emit }) {
|
|
23
23
|
const props = __props;
|
|
24
24
|
const jsonText = ref("");
|
|
@@ -26,6 +26,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
ref("");
|
|
27
27
|
const selectedModel = ref("gemini-3.8-flash");
|
|
28
28
|
const activeTab = ref("editor");
|
|
29
|
+
const nichesList = ref([]);
|
|
30
|
+
const selectedNicheId = ref("tech");
|
|
31
|
+
const showNicheModal = ref(false);
|
|
32
|
+
const editingNicheId = ref(null);
|
|
33
|
+
const nicheForm = ref({
|
|
34
|
+
id: "",
|
|
35
|
+
name: "",
|
|
36
|
+
theme: "blue-tech",
|
|
37
|
+
description: ""
|
|
38
|
+
});
|
|
29
39
|
const showPromptModal = ref(false);
|
|
30
40
|
const manualPromptText = ref("");
|
|
31
41
|
const manualPromptMeta = ref({});
|
|
@@ -50,16 +60,40 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
50
60
|
},
|
|
51
61
|
{ immediate: true, deep: true }
|
|
52
62
|
);
|
|
53
|
-
ref({ audio: [], videos: [] });
|
|
54
63
|
return (_ctx, _push, _parent, _attrs) => {
|
|
55
|
-
var _a, _b, _c, _d, _e, _f;
|
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
56
65
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-3 text-slate-100" }, _attrs))}>`);
|
|
66
|
+
if (unref(showNicheModal)) {
|
|
67
|
+
_push(`<div class="fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"><div class="bg-slate-900 border border-slate-700 rounded-3xl max-w-xl w-full p-5 shadow-2xl flex flex-col gap-4 text-xs max-h-[90vh] overflow-y-auto custom-scrollbar"><div class="flex items-center justify-between pb-3 border-b border-slate-800"><div><h3 class="text-sm font-black text-white flex items-center gap-2">`);
|
|
68
|
+
_push(ssrRenderComponent(unref(Settings), { class: "w-4 h-4 text-sky-400" }, null, _parent));
|
|
69
|
+
_push(` Kelola & Buat Niche Baru </h3><p class="text-[11px] text-slate-400 mt-0.5"> Simpan niche favoritmu. AI dan Prompt Generator akan otomatis menggunakannya. </p></div><button class="p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800">`);
|
|
70
|
+
_push(ssrRenderComponent(unref(X), { class: "w-4 h-4" }, null, _parent));
|
|
71
|
+
_push(`</button></div><div class="p-3.5 bg-slate-950 rounded-2xl border border-slate-800 flex flex-col gap-2.5"><div class="font-bold text-sky-400 flex items-center justify-between"><span>${ssrInterpolate(unref(editingNicheId) ? "\u270F\uFE0F Edit Niche" : "\u2795 Tambah Niche Baru")}</span>`);
|
|
72
|
+
if (unref(editingNicheId)) {
|
|
73
|
+
_push(`<button class="text-[10px] text-slate-400 hover:text-white"> Batal Edit </button>`);
|
|
74
|
+
} else {
|
|
75
|
+
_push(`<!---->`);
|
|
76
|
+
}
|
|
77
|
+
_push(`</div><div class="grid grid-cols-1 sm:grid-cols-2 gap-2"><div><label class="block text-[10px] font-bold text-slate-400 mb-1">Nama Niche</label><input${ssrRenderAttr("value", unref(nicheForm).name)} type="text" placeholder="Contoh: Kuliner & Restoran, Otomotif EV" class="w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white focus:outline-none focus:border-sky-500"></div><div><label class="block text-[10px] font-bold text-slate-400 mb-1">Tema Default</label><select class="w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white focus:outline-none focus:border-sky-500"><option value="blue-tech"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "blue-tech") : ssrLooseEqual(unref(nicheForm).theme, "blue-tech")) ? " selected" : ""}>\u{1F535} Blue Tech</option><option value="emerald-finance"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "emerald-finance") : ssrLooseEqual(unref(nicheForm).theme, "emerald-finance")) ? " selected" : ""}>\u{1F7E2} Emerald Finance</option><option value="slate-education"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "slate-education") : ssrLooseEqual(unref(nicheForm).theme, "slate-education")) ? " selected" : ""}>\u{1F7E3} Slate Education</option><option value="dark-contrast"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "dark-contrast") : ssrLooseEqual(unref(nicheForm).theme, "dark-contrast")) ? " selected" : ""}>\u26AB Dark Contrast</option><option value="crimson-alert"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "crimson-alert") : ssrLooseEqual(unref(nicheForm).theme, "crimson-alert")) ? " selected" : ""}>\u{1F534} Crimson Alert</option><option value="amber-gold"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "amber-gold") : ssrLooseEqual(unref(nicheForm).theme, "amber-gold")) ? " selected" : ""}>\u{1F7E1} Amber Gold</option><option value="cyber-violet"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "cyber-violet") : ssrLooseEqual(unref(nicheForm).theme, "cyber-violet")) ? " selected" : ""}>\u{1F7EA} Cyber Violet</option><option value="sunset-orange"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "sunset-orange") : ssrLooseEqual(unref(nicheForm).theme, "sunset-orange")) ? " selected" : ""}>\u{1F7E0} Sunset Orange</option><option value="nordic-frost"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "nordic-frost") : ssrLooseEqual(unref(nicheForm).theme, "nordic-frost")) ? " selected" : ""}>\u2744\uFE0F Nordic Frost</option><option value="monochrome-luxe"${ssrIncludeBooleanAttr(Array.isArray(unref(nicheForm).theme) ? ssrLooseContain(unref(nicheForm).theme, "monochrome-luxe") : ssrLooseEqual(unref(nicheForm).theme, "monochrome-luxe")) ? " selected" : ""}>\u26AA Monochrome Luxe</option></select></div></div><div><label class="block text-[10px] font-bold text-slate-400 mb-1">Fokus Topik & Instruksi Prompt</label><textarea rows="2" placeholder="Jelaskan topik yang ingin disorot AI (misal: perbandingan harga kopi, biaya buka gerai, margin laba kuliner...)" class="w-full bg-slate-900 border border-slate-800 rounded-xl p-2 text-xs text-slate-200 focus:outline-none focus:border-sky-500 resize-none leading-relaxed">${ssrInterpolate(unref(nicheForm).description)}</textarea></div><button class="self-end px-4 py-1.5 rounded-xl bg-sky-600 hover:bg-sky-500 text-white font-bold text-xs transition flex items-center gap-1.5 shadow">`);
|
|
78
|
+
_push(ssrRenderComponent(unref(Check), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
79
|
+
_push(`<span>${ssrInterpolate(unref(editingNicheId) ? "Perbarui Niche" : "Simpan Niche")}</span></button></div><div class="flex flex-col gap-2"><div class="text-[11px] font-bold text-slate-400 uppercase tracking-wider"> Daftar Niche Tersimpan (${ssrInterpolate(unref(nichesList).length)}) </div><div class="flex flex-col gap-2 max-h-[220px] overflow-y-auto pr-1 custom-scrollbar"><!--[-->`);
|
|
80
|
+
ssrRenderList(unref(nichesList), (n) => {
|
|
81
|
+
_push(`<div class="p-2.5 rounded-xl border bg-slate-950 border-slate-800 flex items-start justify-between gap-2"><div class="flex-1"><div class="flex items-center gap-2 mb-1"><span class="font-extrabold text-white text-xs">${ssrInterpolate(n.name)}</span><span class="px-1.5 py-0.2 rounded text-[9px] font-bold bg-slate-800 text-slate-300 border border-slate-700">${ssrInterpolate(n.theme || "blue-tech")}</span></div><p class="text-[11px] text-slate-400 leading-snug">${ssrInterpolate(n.description)}</p></div><div class="flex items-center gap-1"><button class="p-1.5 rounded-lg text-slate-400 hover:text-sky-300 hover:bg-slate-800 transition" title="Edit Niche">`);
|
|
82
|
+
_push(ssrRenderComponent(unref(Edit2), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
83
|
+
_push(`</button><button class="p-1.5 rounded-lg text-slate-400 hover:text-rose-400 hover:bg-slate-800 transition" title="Hapus Niche">`);
|
|
84
|
+
_push(ssrRenderComponent(unref(Trash2), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
85
|
+
_push(`</button></div></div>`);
|
|
86
|
+
});
|
|
87
|
+
_push(`<!--]--></div></div></div></div>`);
|
|
88
|
+
} else {
|
|
89
|
+
_push(`<!---->`);
|
|
90
|
+
}
|
|
57
91
|
if (unref(showPromptModal)) {
|
|
58
92
|
_push(`<div class="fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"><div class="bg-slate-900 border border-slate-700 rounded-3xl max-w-2xl w-full p-6 shadow-2xl flex flex-col gap-4 text-xs max-h-[90vh]"><div class="flex items-center justify-between pb-3 border-b border-slate-800"><div><h3 class="text-sm font-black text-white flex items-center gap-2">`);
|
|
59
93
|
_push(ssrRenderComponent(unref(FileText), { class: "w-4 h-4 text-purple-400" }, null, _parent));
|
|
60
94
|
_push(` Master Prompt AI (Dynamic Research & Zero-Collision) </h3><p class="text-[11px] text-slate-400 mt-0.5"> Salin prompt ini ke ChatGPT / Gemini / Claude / DeepSeek untuk mencari topik terbaru. </p></div><button class="p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800">`);
|
|
61
95
|
_push(ssrRenderComponent(unref(X), { class: "w-4 h-4" }, null, _parent));
|
|
62
|
-
_push(`</button></div><div class="flex items-center gap-2 bg-slate-950 p-2.5 rounded-xl border border-slate-800 text-[11px]"><span class="font-bold text-sky-400">
|
|
96
|
+
_push(`</button></div><div class="flex items-center gap-2 bg-slate-950 p-2.5 rounded-xl border border-slate-800 text-[11px] flex-wrap"><span class="font-bold text-sky-400">Niche Aktif:</span><span class="text-white font-semibold">${ssrInterpolate(((_a = unref(nichesList).find((n) => n.id === unref(selectedNicheId))) == null ? void 0 : _a.name) || "Default")}</span><span class="text-slate-500">\u2022</span><span class="text-purple-400 font-bold">${ssrInterpolate(unref(manualPromptMeta).usedCount || 0)} Topik Riwayat Dikecualikan</span></div><div class="relative flex-1 min-h-[220px]"><textarea readonly rows="12" class="w-full h-full bg-slate-950 text-slate-300 font-mono text-[11px] p-3 rounded-xl border border-slate-800 focus:outline-none resize-none leading-relaxed select-all">${ssrInterpolate(unref(manualPromptText))}</textarea></div><div class="flex items-center justify-between pt-2 border-t border-slate-800"><span class="text-[11px] text-slate-400"> Paste hasil JSON yang kamu buat ke kolom <b>RAW JSON</b> SocialGen. </span><button class="px-5 py-2.5 rounded-xl font-bold bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-500 hover:to-indigo-500 text-white shadow-lg flex items-center gap-2 transition">`);
|
|
63
97
|
if (unref(promptCopied)) {
|
|
64
98
|
_push(ssrRenderComponent(unref(Check), { class: "w-4 h-4 text-emerald-400" }, null, _parent));
|
|
65
99
|
} else {
|
|
@@ -71,13 +105,19 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
71
105
|
}
|
|
72
106
|
_push(`<div class="flex flex-wrap items-center justify-between gap-2.5 p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl shadow-lg"><div><h2 class="text-xs font-black text-white flex items-center gap-2">`);
|
|
73
107
|
_push(ssrRenderComponent(unref(Wand2), { class: "w-3.5 h-3.5 text-sky-400" }, null, _parent));
|
|
74
|
-
_push(` Content Studio </h2><p class="text-[10px] text-slate-400">Multi-Format Studio</p></div><div class="flex items-center gap-1.5"><
|
|
108
|
+
_push(` Content Studio </h2><p class="text-[10px] text-slate-400">Multi-Format Studio</p></div><div class="flex items-center gap-1.5 flex-wrap"><div class="flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 mr-1.5 shadow-inner"><select class="bg-transparent text-[11px] font-bold text-sky-300 focus:outline-none px-2 py-0.5 cursor-pointer max-w-[130px] truncate" title="Pilih Niche Konten"><!--[-->`);
|
|
109
|
+
ssrRenderList(unref(nichesList), (n) => {
|
|
110
|
+
_push(`<option${ssrRenderAttr("value", n.id)} class="bg-slate-900 text-white"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedNicheId)) ? ssrLooseContain(unref(selectedNicheId), n.id) : ssrLooseEqual(unref(selectedNicheId), n.id)) ? " selected" : ""}>${ssrInterpolate(n.name)}</option>`);
|
|
111
|
+
});
|
|
112
|
+
_push(`<!--]--></select><button class="p-1 px-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-sky-400 hover:text-sky-300 border border-slate-700 text-[10px] font-bold transition flex items-center gap-1" title="Kelola & Buat Niche Baru">`);
|
|
113
|
+
_push(ssrRenderComponent(unref(Plus), { class: "w-3 h-3" }, null, _parent));
|
|
114
|
+
_push(`<span class="hidden sm:inline">Niche</span></button></div><button title="Buat prompt manual bebas bentrok untuk ChatGPT / Gemini Web" class="inline-flex items-center gap-1 px-2.5 py-1.5 text-[11px] font-bold text-purple-300 bg-purple-950/40 hover:bg-purple-900/50 border border-purple-500/30 rounded-xl transition shadow-sm">`);
|
|
75
115
|
_push(ssrRenderComponent(unref(FileText), { class: "w-3 h-3" }, null, _parent));
|
|
76
116
|
_push(`<span class="hidden sm:inline">Prompt Manual</span></button><button${ssrIncludeBooleanAttr(__props.isGenerating || __props.isAutoTopicLoading) ? " disabled" : ""} class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold text-white bg-gradient-to-r from-sky-500 via-indigo-600 to-purple-600 hover:from-sky-400 hover:to-indigo-500 rounded-xl shadow-md transition disabled:opacity-50">`);
|
|
77
117
|
_push(ssrRenderComponent(unref(Sparkles), {
|
|
78
118
|
class: ["w-3.5 h-3.5", { "animate-spin": __props.isAutoTopicLoading }]
|
|
79
119
|
}, null, _parent));
|
|
80
|
-
_push(`<span>${ssrInterpolate(__props.isAutoTopicLoading ? "Meriset Data..." : "\u2728 Auto-Topic")}</span></button><div class="relative group"><button class="px-2 py-1.5 text-xs font-bold text-slate-300 bg-slate-800 hover:bg-slate-700 border border-slate-700 rounded-xl"> \u25BE </button><div class="absolute right-0 mt-1 hidden group-hover:flex flex-col bg-slate-900 border border-slate-800 rounded-xl shadow-2xl py-2 z-20 w-56 text-xs"><div class="px-3 py-1 text-[10px] font-bold text-slate-500 uppercase">Model AI Engine</div><div class="px-3 py-1.5"><select class="w-full bg-slate-950 border border-slate-700 rounded-lg p-1.5 text-xs text-sky-300 focus:outline-none"><option value="gemini-3.
|
|
120
|
+
_push(`<span>${ssrInterpolate(__props.isAutoTopicLoading ? "Meriset Data..." : "\u2728 Auto-Topic")}</span></button><div class="relative group"><button class="px-2 py-1.5 text-xs font-bold text-slate-300 bg-slate-800 hover:bg-slate-700 border border-slate-700 rounded-xl"> \u25BE </button><div class="absolute right-0 mt-1 hidden group-hover:flex flex-col bg-slate-900 border border-slate-800 rounded-xl shadow-2xl py-2 z-20 w-56 text-xs"><div class="px-3 py-1 text-[10px] font-bold text-slate-500 uppercase">Model AI Engine</div><div class="px-3 py-1.5"><select class="w-full bg-slate-950 border border-slate-700 rounded-lg p-1.5 text-xs text-sky-300 focus:outline-none"><option value="gemini-3.8-flash"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedModel)) ? ssrLooseContain(unref(selectedModel), "gemini-3.8-flash") : ssrLooseEqual(unref(selectedModel), "gemini-3.8-flash")) ? " selected" : ""}>\u26A1 Gemini 3.8 Flash</option><option value="gemini-3.5-flash"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedModel)) ? ssrLooseContain(unref(selectedModel), "gemini-3.5-flash") : ssrLooseEqual(unref(selectedModel), "gemini-3.5-flash")) ? " selected" : ""}>\u26A1 Gemini 3.5 Flash</option><option value="gemini-2.5-pro"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedModel)) ? ssrLooseContain(unref(selectedModel), "gemini-2.5-pro") : ssrLooseEqual(unref(selectedModel), "gemini-2.5-pro")) ? " selected" : ""}>\u{1F48E} Gemini 2.5 Pro</option><option value="gemini-1.5-pro"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedModel)) ? ssrLooseContain(unref(selectedModel), "gemini-1.5-pro") : ssrLooseEqual(unref(selectedModel), "gemini-1.5-pro")) ? " selected" : ""}>\u{1F48E} Gemini 1.5 Pro</option></select></div><div class="border-t border-slate-800 my-1"></div><div class="px-3 py-1 text-[10px] font-bold text-slate-500 uppercase">Pilih Format Khusus</div><button class="px-3 py-1.5 text-left text-sky-300 hover:bg-slate-800"> \u{1F4CA} Classic Comparison Table </button><button class="px-3 py-1.5 text-left text-orange-300 hover:bg-slate-800"> \u2694\uFE0F Versus Showdown Arena </button><button class="px-3 py-1.5 text-left text-teal-300 hover:bg-slate-800"> \u{1F9FE} Monthly Living Invoice </button><button class="px-3 py-1.5 text-left text-rose-300 hover:bg-slate-800"> \u{1F4F0} Breaking News / Pamphlet </button><button class="px-3 py-1.5 text-left text-amber-300 hover:bg-slate-800"> \u{1F3AF} Big Shocking Number </button><button class="px-3 py-1.5 text-left text-yellow-300 hover:bg-slate-800"> \u23F3 10-Year Shift (Then vs Now) </button><button class="px-3 py-1.5 text-left text-cyan-300 hover:bg-slate-800"> \u{1F4C8} Income Allocation Bars </button><button class="px-3 py-1.5 text-left text-emerald-300 hover:bg-slate-800"> \u{1F3C6} Top 5 Ranked Countdown </button><button class="px-3 py-1.5 text-left text-purple-300 hover:bg-slate-800"> \u{1F4AC} Hot Take / Quote Debate </button><button class="px-3 py-1.5 text-left text-yellow-400 hover:bg-slate-800 font-bold"> \u{1F947} Multi-Country Leaderboard (Top 10) </button><button class="px-3 py-1.5 text-left text-sky-400 hover:bg-slate-800 font-bold"> \u{1F4F0} Editorial Storytelling Deep Dive </button><button class="px-3 py-1.5 text-left text-teal-300 hover:bg-slate-800 font-bold"> \u{1F4CA} Multi-Column Matrix (3-4 Negara) </button><button class="px-3 py-1.5 text-left text-rose-400 hover:bg-slate-800 font-bold"> \u26A1 Debate Arena (Pro vs Kontra) </button><button class="px-3 py-1.5 text-left text-amber-300 hover:bg-slate-800 font-bold"> \u{1F396}\uFE0F Tier List Ranking (S, A, B, C) </button></div></div></div></div>`);
|
|
81
121
|
if (__props.isAutoTopicLoading) {
|
|
82
122
|
_push(`<div class="p-3 bg-gradient-to-r from-sky-950 via-indigo-950 to-purple-950 border border-sky-500/50 rounded-2xl flex items-center gap-3 animate-pulse shadow-lg shadow-sky-500/10"><div class="w-6 h-6 rounded-lg bg-sky-500/20 border border-sky-400/40 flex items-center justify-center flex-shrink-0">`);
|
|
83
123
|
_push(ssrRenderComponent(unref(Sparkles), { class: "w-3.5 h-3.5 text-sky-400 animate-spin" }, null, _parent));
|
|
@@ -85,27 +125,33 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
85
125
|
} else {
|
|
86
126
|
_push(`<!---->`);
|
|
87
127
|
}
|
|
88
|
-
_push(`<div class="flex items-center justify-between bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-semibold"><div class="flex items-center gap-1"><button class="${ssrRenderClass([unref(activeTab) === "editor" ? "bg-slate-800 text-sky-400 shadow" : "text-slate-400 hover:text-white", "px-3 py-1 rounded-lg transition text-[11px]"])}"> JSON Editor </button><button class="${ssrRenderClass([unref(activeTab) === "drafts" ? "bg-slate-800 text-purple-400 shadow" : "text-slate-400 hover:text-white", "px-3 py-1 rounded-lg transition flex items-center gap-1.5 text-[11px]"])}">`);
|
|
128
|
+
_push(`<div class="flex items-center justify-between bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-semibold"><div class="flex items-center gap-1"><button class="${ssrRenderClass([unref(activeTab) === "editor" ? "bg-slate-800 text-sky-400 shadow font-bold" : "text-slate-400 hover:text-white", "px-3 py-1 rounded-lg transition text-[11px]"])}"> JSON Editor </button><button class="${ssrRenderClass([unref(activeTab) === "drafts" ? "bg-slate-800 text-purple-400 shadow font-bold" : "text-slate-400 hover:text-white", "px-3 py-1 rounded-lg transition flex items-center gap-1.5 text-[11px]"])}">`);
|
|
89
129
|
_push(ssrRenderComponent(unref(Bookmark), { class: "w-3 h-3" }, null, _parent));
|
|
90
|
-
_push(`<span>
|
|
130
|
+
_push(`<span>Riwayat Pembuatan (${ssrInterpolate(__props.drafts.length)})</span></button></div><div class="flex items-center gap-2">`);
|
|
131
|
+
if (unref(activeTab) === "drafts" && __props.drafts.length > 0) {
|
|
132
|
+
_push(`<button class="text-[10px] text-rose-400 hover:text-rose-300 transition font-bold pr-1" title="Hapus semua riwayat"> Bersihkan Semua </button>`);
|
|
133
|
+
} else {
|
|
134
|
+
_push(`<!---->`);
|
|
135
|
+
}
|
|
136
|
+
_push(`<button class="text-[10px] text-slate-400 hover:text-sky-400 transition pr-2 font-bold"> + Simpan Riwayat </button></div></div>`);
|
|
91
137
|
if (unref(activeTab) === "drafts") {
|
|
92
|
-
_push(`<div class="flex flex-col gap-1.5 p-2.5 bg-slate-900/90 border border-slate-800 rounded-2xl max-h-[300px] overflow-y-auto">`);
|
|
138
|
+
_push(`<div class="flex flex-col gap-1.5 p-2.5 bg-slate-900/90 border border-slate-800 rounded-2xl max-h-[300px] overflow-y-auto custom-scrollbar">`);
|
|
93
139
|
if (__props.drafts.length === 0) {
|
|
94
|
-
_push(`<div class="text-center py-8 text-slate-500 text-[11px]"> Belum ada
|
|
140
|
+
_push(`<div class="text-center py-8 text-slate-500 text-[11px]"> Belum ada riwayat pembuatan. Setiap kali generate konten, riwayat akan otomatis tersimpan di sini! </div>`);
|
|
95
141
|
} else {
|
|
96
142
|
_push(`<!---->`);
|
|
97
143
|
}
|
|
98
144
|
_push(`<!--[-->`);
|
|
99
145
|
ssrRenderList(__props.drafts, (draft, dIdx) => {
|
|
100
|
-
_push(`<div class="${ssrRenderClass([__props.activeDraftIndex === dIdx ? "bg-sky-500/15 border-sky-500/50 text-white" : "bg-slate-950/60 border-slate-800 text-slate-300 hover:border-slate-700", "p-2 rounded-xl border cursor-pointer transition flex items-center justify-between text-xs group"])}"><div class="flex-1 pr-2"><div class="flex items-center gap-1.5 mb-0.5"><span class="${ssrRenderClass([draft.layoutType === "news" ? "bg-rose-500/20 text-rose-300 border border-rose-500/30" : draft.layoutType === "versus" ? "bg-orange-500/20 text-orange-300 border border-orange-500/30" : draft.layoutType === "receipt" ? "bg-teal-500/20 text-teal-300 border border-teal-500/30" : draft.layoutType === "stat" ? "bg-amber-500/20 text-amber-300 border border-amber-500/30" : draft.layoutType === "timeline" ? "bg-yellow-500/20 text-yellow-300 border border-yellow-500/30" : draft.layoutType === "barchart" ? "bg-cyan-500/20 text-cyan-300 border border-cyan-500/30" : draft.layoutType === "list" ? "bg-emerald-500/20 text-emerald-300 border border-emerald-500/30" : draft.layoutType === "quote" ? "bg-purple-500/20 text-purple-300 border border-purple-500/30" : "bg-sky-500/20 text-sky-300 border border-sky-500/30", "px-1.5 py-0.2 rounded text-[8px] font-bold uppercase"])}">${ssrInterpolate(draft.layoutType || "table")}</span><span class="text-[9px] text-slate-400 font-semibold">${ssrInterpolate(draft.category)}</span></div><div class="font-bold text-[11px] truncate">${ssrInterpolate(draft.title)}</div></div><button class="opacity-0 group-hover:opacity-100 p-1 text-slate-400 hover:text-rose-400 transition rounded">`);
|
|
101
|
-
_push(ssrRenderComponent(unref(Trash2), { class: "w-3 h-3" }, null, _parent));
|
|
146
|
+
_push(`<div class="${ssrRenderClass([__props.activeDraftIndex === dIdx ? "bg-sky-500/15 border-sky-500/50 text-white" : "bg-slate-950/60 border-slate-800 text-slate-300 hover:border-slate-700", "p-2 rounded-xl border cursor-pointer transition flex items-center justify-between text-xs group"])}"><div class="flex-1 pr-2"><div class="flex items-center gap-1.5 mb-0.5"><span class="${ssrRenderClass([draft.layoutType === "news" ? "bg-rose-500/20 text-rose-300 border border-rose-500/30" : draft.layoutType === "versus" ? "bg-orange-500/20 text-orange-300 border border-orange-500/30" : draft.layoutType === "receipt" ? "bg-teal-500/20 text-teal-300 border border-teal-500/30" : draft.layoutType === "stat" ? "bg-amber-500/20 text-amber-300 border border-amber-500/30" : draft.layoutType === "timeline" ? "bg-yellow-500/20 text-yellow-300 border border-yellow-500/30" : draft.layoutType === "barchart" ? "bg-cyan-500/20 text-cyan-300 border border-cyan-500/30" : draft.layoutType === "list" ? "bg-emerald-500/20 text-emerald-300 border border-emerald-500/30" : draft.layoutType === "quote" ? "bg-purple-500/20 text-purple-300 border border-purple-500/30" : "bg-sky-500/20 text-sky-300 border border-sky-500/30", "px-1.5 py-0.2 rounded text-[8px] font-bold uppercase"])}">${ssrInterpolate(draft.layoutType || "table")}</span><span class="text-[9px] text-slate-400 font-semibold">${ssrInterpolate(draft.category)}</span></div><div class="font-bold text-[11px] truncate">${ssrInterpolate(draft.title)}</div></div><button class="opacity-0 group-hover:opacity-100 p-1 text-slate-400 hover:text-rose-400 transition rounded" title="Hapus item ini">`);
|
|
147
|
+
_push(ssrRenderComponent(unref(Trash2), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
102
148
|
_push(`</button></div>`);
|
|
103
149
|
});
|
|
104
150
|
_push(`<!--]--></div>`);
|
|
105
151
|
} else {
|
|
106
152
|
_push(`<div class="flex flex-col bg-slate-900/90 border border-slate-800 rounded-2xl overflow-hidden shadow-lg"><div class="grid grid-cols-2 gap-2 p-2.5 bg-slate-950/70 border-b border-slate-800 text-xs"><div><label class="block text-[10px] font-bold text-slate-300 mb-1 flex items-center gap-1">`);
|
|
107
153
|
_push(ssrRenderComponent(unref(LayoutTemplate), { class: "w-3 h-3 text-sky-400" }, null, _parent));
|
|
108
|
-
_push(` Format Template </label><select${ssrRenderAttr("value", __props.modelValue.layoutType || "table")} class="w-full bg-slate-900 border border-slate-800 rounded-lg p-1.5 text-slate-200 focus:outline-none focus:border-sky-500 font-semibold text-[11px]"><option value="table">\u{1F4CA} Comparison Table</option><option value="versus">\u2694\uFE0F Versus Showdown Arena</option><option value="receipt">\u{1F9FE} Monthly Living Invoice</option><option value="news">\u{1F4F0} Special Report Pamphlet</option><option value="stat">\u{1F3AF} Big Shocking Number</option><option value="timeline">\u23F3 10-Year Shift (Then vs Now)</option><option value="barchart">\u{1F4C8} Income Allocation Bars</option><option value="list">\u{1F3C6} Top 5 Ranked List</option><option value="quote">\u{1F4AC} Hot Take / Quote Debate</option><option value="leaderboard">\u{1F947} Multi-Country Leaderboard (Top 10)</option><option value="editorial">\u{1F4F0} Editorial Storytelling Deep Dive</option><option value="matrix">\u{1F4CA} Multi-Column Matrix (3-4 Negara)</option><option value="debate">\u26A1 Debate Arena (Pro vs Kontra)</option><option value="tierlist">\u{1F396}\uFE0F Tier List Ranking (S, A, B, C)</option></select></div><div><label class="block text-[10px] font-bold text-slate-300 mb-1"> Theme Color </label><select${ssrRenderAttr("value", __props.modelValue.theme || "blue-tech")} class="w-full bg-slate-900 border border-slate-800 rounded-lg p-1.5 text-slate-200 focus:outline-none focus:border-sky-500 font-semibold text-[11px]"><option value="blue-tech">\u{1F535} Blue Tech (
|
|
154
|
+
_push(` Format Template </label><select${ssrRenderAttr("value", __props.modelValue.layoutType || "table")} class="w-full bg-slate-900 border border-slate-800 rounded-lg p-1.5 text-slate-200 focus:outline-none focus:border-sky-500 font-semibold text-[11px]"><option value="table">\u{1F4CA} Comparison Table</option><option value="versus">\u2694\uFE0F Versus Showdown Arena</option><option value="receipt">\u{1F9FE} Monthly Living Invoice</option><option value="news">\u{1F4F0} Special Report Pamphlet</option><option value="stat">\u{1F3AF} Big Shocking Number</option><option value="timeline">\u23F3 10-Year Shift (Then vs Now)</option><option value="barchart">\u{1F4C8} Income Allocation Bars</option><option value="list">\u{1F3C6} Top 5 Ranked List</option><option value="quote">\u{1F4AC} Hot Take / Quote Debate</option><option value="leaderboard">\u{1F947} Multi-Country Leaderboard (Top 10)</option><option value="editorial">\u{1F4F0} Editorial Storytelling Deep Dive</option><option value="matrix">\u{1F4CA} Multi-Column Matrix (3-4 Negara)</option><option value="debate">\u26A1 Debate Arena (Pro vs Kontra)</option><option value="tierlist">\u{1F396}\uFE0F Tier List Ranking (S, A, B, C)</option></select></div><div><label class="block text-[10px] font-bold text-slate-300 mb-1"> Theme Color (10 Pilihan) </label><select${ssrRenderAttr("value", __props.modelValue.theme || "blue-tech")} class="w-full bg-slate-900 border border-slate-800 rounded-lg p-1.5 text-slate-200 focus:outline-none focus:border-sky-500 font-semibold text-[11px]"><option value="blue-tech">\u{1F535} Blue Tech (AI & Software)</option><option value="emerald-finance">\u{1F7E2} Emerald Finance (Salaries & Living)</option><option value="slate-education">\u{1F7E3} Slate Education (Education & Career)</option><option value="dark-contrast">\u26AB Dark Contrast (Universal Bold)</option><option value="crimson-alert">\u{1F534} Crimson Alert (Breaking Shock)</option><option value="amber-gold">\u{1F7E1} Amber Gold (Luxury & Executive)</option><option value="cyber-violet">\u{1F7EA} Cyber Violet (Synthwave & Neon)</option><option value="sunset-orange">\u{1F7E0} Sunset Orange (Warm Energy)</option><option value="nordic-frost">\u2744\uFE0F Nordic Frost (Polar Cyan Clean)</option><option value="monochrome-luxe">\u26AA Monochrome Luxe (Minimalist)</option></select></div><div class="col-span-2 grid grid-cols-3 gap-2 pt-1 border-t border-slate-800/60 mt-1"><div class="col-span-1"><label class="block text-[10px] font-bold text-slate-400 mb-1"> Watermark Handle </label><input type="text"${ssrRenderAttr("value", __props.modelValue.watermark || "@SocialGen")} placeholder="@NamaAkun" class="w-full bg-slate-900 border border-slate-800 rounded-lg px-2.5 py-1.5 text-sky-400 font-semibold text-[11px] focus:outline-none focus:border-sky-500 transition"></div><div class="col-span-2"><label class="block text-[10px] font-bold text-slate-400 mb-1"> Judul Konten (Title) </label><input type="text"${ssrRenderAttr("value", __props.modelValue.title)} placeholder="Judul Utama Konten..." class="w-full bg-slate-900 border border-slate-800 rounded-lg px-2.5 py-1.5 text-slate-100 font-semibold text-[11px] focus:outline-none focus:border-sky-500 transition"></div></div></div><div class="flex items-center justify-between px-3 py-1.5 bg-slate-950/50 border-b border-slate-800"><div class="flex items-center gap-2 text-xs"><span class="font-bold text-slate-300 text-[10px]">RAW JSON SocialGen</span>`);
|
|
109
155
|
if (__props.isValid && !unref(jsonFormatError)) {
|
|
110
156
|
_push(`<span class="inline-flex items-center gap-0.5 px-1.5 py-0.2 rounded-full text-[9px] font-semibold bg-emerald-500/20 text-emerald-400 border border-emerald-500/30">`);
|
|
111
157
|
_push(ssrRenderComponent(unref(CheckCircle2), { class: "w-2.5 h-2.5" }, null, _parent));
|
|
@@ -123,7 +169,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
123
169
|
}
|
|
124
170
|
_push(`</div></div>`);
|
|
125
171
|
}
|
|
126
|
-
_push(`<input type="file" accept="video/mp4,video/webm" class="hidden"><input type="file" accept="audio/mp3,audio/mpeg,audio/wav" class="hidden"><div class="p-3 bg-slate-900/90 border border-slate-800 rounded-2xl flex flex-col gap-2.5 shadow-lg text-xs"><div class="flex items-center justify-between gap-2"><label class="font-bold text-slate-300 flex items-center gap-1.5 text-[11px]">`);
|
|
172
|
+
_push(`<input type="file" accept="video/mp4,video/webm" class="hidden"><input type="file" accept="audio/mp3,audio/mpeg,audio/wav" class="hidden"><div class="p-3 bg-slate-900/90 border border-slate-800 rounded-2xl flex flex-col gap-2.5 shadow-lg text-xs"><div class="flex flex-col gap-1.5"><div class="flex items-center justify-between gap-2"><label class="font-bold text-slate-300 flex items-center gap-1.5 text-[11px]">`);
|
|
127
173
|
_push(ssrRenderComponent(unref(Film), { class: "w-3.5 h-3.5 text-sky-400" }, null, _parent));
|
|
128
174
|
_push(`<span>Background</span></label><div class="flex items-center gap-1.5"><select${ssrRenderAttr("value", __props.options.backgroundSource || "random")} class="bg-slate-950 border border-slate-800 rounded-lg px-2 py-1 text-slate-300 text-[11px] focus:outline-none max-w-[170px]"><option value="random">\u{1F500} Acak Video</option><!--[-->`);
|
|
129
175
|
ssrRenderList(unref(availableVideos), (v) => {
|
|
@@ -131,7 +177,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
131
177
|
});
|
|
132
178
|
_push(`<!--]--><option value="pexels">\u{1F310} Pexels API (Auto HD)</option></select><button${ssrIncludeBooleanAttr(unref(isUploading)) ? " disabled" : ""} title="Upload Video MP4 Sendiri" class="p-1 px-2 rounded-lg border border-sky-500/30 text-sky-300 bg-sky-950/40 hover:bg-sky-900/60 text-[10px] flex items-center gap-1 font-bold transition disabled:opacity-50">`);
|
|
133
179
|
_push(ssrRenderComponent(unref(Upload), { class: "w-3 h-3" }, null, _parent));
|
|
134
|
-
_push(`<span class="hidden sm:inline">${ssrInterpolate(unref(isUploading) ? "..." : "Upload")}</span></button></div></div><div class="flex items-center justify-between
|
|
180
|
+
_push(`<span class="hidden sm:inline">${ssrInterpolate(unref(isUploading) ? "..." : "Upload")}</span></button></div></div><div class="flex items-center justify-between pl-5 pr-1 text-[10px] text-slate-400"><span class="flex items-center gap-1 text-sky-300">`);
|
|
181
|
+
_push(ssrRenderComponent(unref(Scissors), { class: "w-2.5 h-2.5" }, null, _parent));
|
|
182
|
+
_push(` Mulai Video: ${ssrInterpolate(__props.options.videoStartOffset || 0)}s </span><input type="range" min="0" max="60" step="1"${ssrRenderAttr("value", __props.options.videoStartOffset || 0)} class="w-32 h-1 bg-slate-950 rounded appearance-none cursor-pointer accent-sky-400"></div></div><div class="flex flex-col gap-1.5 pt-1.5 border-t border-slate-800"><div class="flex items-center justify-between gap-2"><label class="font-bold text-slate-300 flex items-center gap-1.5 text-[11px]">`);
|
|
135
183
|
_push(ssrRenderComponent(unref(Music), { class: "w-3.5 h-3.5 text-purple-400" }, null, _parent));
|
|
136
184
|
_push(`<span>Musik Reels</span></label><div class="flex items-center gap-1.5"><select${ssrRenderAttr("value", __props.options.musicFile || "random")} class="bg-slate-950 border border-slate-800 rounded-lg px-2 py-1 text-slate-300 text-[11px] focus:outline-none max-w-[170px]"><option value="random">\u{1F500} Acak Musik</option><!--[-->`);
|
|
137
185
|
ssrRenderList(unref(availableAudio), (a) => {
|
|
@@ -139,13 +187,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
139
187
|
});
|
|
140
188
|
_push(`<!--]--></select><button${ssrIncludeBooleanAttr(unref(isUploading)) ? " disabled" : ""} title="Upload Musik MP3 Sendiri" class="p-1 px-2 rounded-lg border border-purple-500/30 text-purple-300 bg-purple-950/40 hover:bg-purple-900/60 text-[10px] flex items-center gap-1 font-bold transition disabled:opacity-50">`);
|
|
141
189
|
_push(ssrRenderComponent(unref(Upload), { class: "w-3 h-3" }, null, _parent));
|
|
142
|
-
_push(`<span class="hidden sm:inline">${ssrInterpolate(unref(isUploading) ? "..." : "Upload")}</span></button></div></div><div class="flex items-center justify-between
|
|
190
|
+
_push(`<span class="hidden sm:inline">${ssrInterpolate(unref(isUploading) ? "..." : "Upload")}</span></button></div></div><div class="flex items-center justify-between pl-5 pr-1 text-[10px] text-slate-400"><span class="flex items-center gap-1 text-purple-300">`);
|
|
191
|
+
_push(ssrRenderComponent(unref(Scissors), { class: "w-2.5 h-2.5" }, null, _parent));
|
|
192
|
+
_push(` Mulai Musik: ${ssrInterpolate(__props.options.audioStartOffset || 0)}s </span><input type="range" min="0" max="120" step="1"${ssrRenderAttr("value", __props.options.audioStartOffset || 0)} class="w-32 h-1 bg-slate-950 rounded appearance-none cursor-pointer accent-purple-400"></div></div><div class="flex items-center justify-between pt-1.5 border-t border-slate-800"><label class="font-bold text-slate-300 flex items-center gap-1.5 text-[11px]">`);
|
|
143
193
|
_push(ssrRenderComponent(unref(Clock), { class: "w-3.5 h-3.5 text-emerald-400" }, null, _parent));
|
|
144
194
|
_push(`<span>Durasi Reels:</span></label><div class="flex items-center gap-1.5 flex-wrap justify-end"><!--[-->`);
|
|
145
195
|
ssrRenderList([7, 10, 15, 30, 60], (d) => {
|
|
146
|
-
_push(`<button class="${ssrRenderClass([(__props.modelValue.reelsDuration ||
|
|
196
|
+
_push(`<button class="${ssrRenderClass([(__props.modelValue.reelsDuration || 30) === d ? "bg-emerald-500/20 border-emerald-500/60 text-emerald-300" : "bg-slate-950 border-slate-800 text-slate-400 hover:text-white", "px-2 py-0.5 text-[10px] font-bold rounded-lg border transition"])}">${ssrInterpolate(d === 60 ? "1m" : d + "s")}</button>`);
|
|
147
197
|
});
|
|
148
|
-
_push(`<!--]--></div></div><div class="grid grid-cols-3 gap-2 pt-1.5 border-t border-slate-800"><label class="${ssrRenderClass([((
|
|
198
|
+
_push(`<!--]--></div></div><div class="grid grid-cols-3 gap-2 pt-1.5 border-t border-slate-800"><label class="${ssrRenderClass([((_b = __props.options.outputs) == null ? void 0 : _b.feed) !== false ? "bg-sky-500/10 border-sky-500/40 text-sky-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_c = __props.options.outputs) == null ? void 0 : _c.feed) !== false) ? " checked" : ""} class="rounded text-sky-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Feed 4:5</span></label><label class="${ssrRenderClass([((_d = __props.options.outputs) == null ? void 0 : _d.story) !== false ? "bg-indigo-500/10 border-indigo-500/40 text-indigo-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_e = __props.options.outputs) == null ? void 0 : _e.story) !== false) ? " checked" : ""} class="rounded text-indigo-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Story 9:16</span></label><label class="${ssrRenderClass([((_f = __props.options.outputs) == null ? void 0 : _f.reels) !== false ? "bg-emerald-500/10 border-emerald-500/40 text-emerald-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_g = __props.options.outputs) == null ? void 0 : _g.reels) !== false) ? " checked" : ""} class="rounded text-emerald-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Reels MP4</span></label></div></div><button${ssrIncludeBooleanAttr(!__props.isValid || __props.isGenerating || !!unref(jsonFormatError)) ? " disabled" : ""} class="${ssrRenderClass([[
|
|
149
199
|
!__props.isValid || __props.isGenerating || !!unref(jsonFormatError) ? "bg-slate-800 text-slate-500 cursor-not-allowed border border-slate-700" : "bg-gradient-to-r from-sky-500 via-blue-600 to-indigo-600 text-white hover:from-sky-400 hover:to-indigo-500 shadow-sky-500/25 active:scale-[0.99]"
|
|
150
200
|
], "w-full py-3 px-4 rounded-xl font-black text-xs tracking-wide shadow-xl transition flex items-center justify-center gap-2"])}">`);
|
|
151
201
|
if (__props.isGenerating) {
|
|
@@ -169,24 +219,71 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
169
219
|
props: {
|
|
170
220
|
data: {},
|
|
171
221
|
selectedVideo: {},
|
|
222
|
+
selectedMusic: {},
|
|
223
|
+
videoStartOffset: { default: 0 },
|
|
224
|
+
audioStartOffset: { default: 0 },
|
|
172
225
|
generatedResult: {}
|
|
173
226
|
},
|
|
174
|
-
|
|
227
|
+
emits: ["update:videoStartOffset", "update:audioStartOffset"],
|
|
228
|
+
setup(__props, { emit: __emit }) {
|
|
175
229
|
const props = __props;
|
|
176
230
|
const activeVideoSrc = computed(() => {
|
|
177
|
-
if (props.selectedVideo && props.selectedVideo !== "pexels") {
|
|
231
|
+
if (props.selectedVideo && props.selectedVideo !== "pexels" && props.selectedVideo !== "random") {
|
|
178
232
|
return `/videos/${props.selectedVideo}`;
|
|
179
233
|
}
|
|
180
234
|
return "/videos/default_bg.mp4";
|
|
181
235
|
});
|
|
236
|
+
const activeAudioSrc = computed(() => {
|
|
237
|
+
if (props.selectedMusic && props.selectedMusic !== "random") {
|
|
238
|
+
return `/musics/${props.selectedMusic}`;
|
|
239
|
+
}
|
|
240
|
+
return "/musics/synthwave_pulse.mp3";
|
|
241
|
+
});
|
|
182
242
|
const activeTab = ref("feed");
|
|
183
243
|
const showSafeZones = ref(false);
|
|
244
|
+
const showOffsetEditor = ref(false);
|
|
184
245
|
const copied = ref(false);
|
|
185
246
|
const isOpeningFolder = ref(false);
|
|
186
247
|
const zoomScale = ref(1);
|
|
248
|
+
const videoElement = ref(null);
|
|
249
|
+
const audioElement = ref(null);
|
|
250
|
+
const isPlaying = ref(true);
|
|
251
|
+
const isMuted = ref(true);
|
|
252
|
+
const currentTime = ref(0);
|
|
253
|
+
const totalDuration = computed(() => props.data.reelsDuration || 30);
|
|
254
|
+
function seekToRelative(relSec) {
|
|
255
|
+
currentTime.value = relSec;
|
|
256
|
+
const vOffset = props.videoStartOffset || 0;
|
|
257
|
+
const aOffset = props.audioStartOffset || 0;
|
|
258
|
+
if (videoElement.value) {
|
|
259
|
+
videoElement.value.currentTime = vOffset + relSec;
|
|
260
|
+
}
|
|
261
|
+
if (audioElement.value) {
|
|
262
|
+
audioElement.value.currentTime = aOffset + relSec;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function formatTime(sec) {
|
|
266
|
+
const m = Math.floor(sec / 60);
|
|
267
|
+
const s = Math.floor(sec % 60);
|
|
268
|
+
return `${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
|
|
269
|
+
}
|
|
270
|
+
watch(
|
|
271
|
+
() => activeVideoSrc.value,
|
|
272
|
+
() => {
|
|
273
|
+
nextTick(() => {
|
|
274
|
+
seekToRelative(0);
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
);
|
|
187
278
|
return (_ctx, _push, _parent, _attrs) => {
|
|
188
279
|
const _component_TableCard = _sfc_main$3;
|
|
189
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-
|
|
280
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-2.5 h-full text-slate-100 min-h-0 justify-between" }, _attrs))}><div class="flex flex-wrap items-center justify-between gap-2 p-2.5 bg-slate-900/90 border border-slate-800 rounded-2xl shadow-lg flex-shrink-0"><div class="flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-bold"><button class="${ssrRenderClass([unref(activeTab) === "feed" ? "bg-sky-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition"])}"> Feed 4:5 </button><button class="${ssrRenderClass([unref(activeTab) === "story" ? "bg-indigo-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition"])}"> Story 9:16 </button><button class="${ssrRenderClass([unref(activeTab) === "reels" ? "bg-emerald-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition flex items-center gap-1.5"])}"><span>Reels 9:16 (Video)</span>`);
|
|
281
|
+
if (unref(activeTab) === "reels" && unref(isPlaying)) {
|
|
282
|
+
_push(`<span class="w-1.5 h-1.5 rounded-full bg-white animate-pulse"></span>`);
|
|
283
|
+
} else {
|
|
284
|
+
_push(`<!---->`);
|
|
285
|
+
}
|
|
286
|
+
_push(`</button></div><div class="flex items-center gap-2 text-xs"><div class="flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs shadow-inner"><button title="Zoom Out (-15%)" class="p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition">`);
|
|
190
287
|
_push(ssrRenderComponent(unref(ZoomOut), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
191
288
|
_push(`</button><button title="Klik untuk Reset Zoom (100% Fit)" class="px-2 py-0.5 rounded-lg text-[11px] font-bold text-sky-400 hover:bg-slate-800 hover:text-sky-300 transition font-mono min-w-[42px] text-center">${ssrInterpolate(Math.round(unref(zoomScale) * 100))}% </button><button title="Zoom In (+15%)" class="p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition">`);
|
|
192
289
|
_push(ssrRenderComponent(unref(ZoomIn), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
@@ -202,11 +299,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
202
299
|
if (unref(activeTab) !== "feed") {
|
|
203
300
|
_push(`<button class="${ssrRenderClass([unref(showSafeZones) ? "bg-amber-500/20 text-amber-300 border-amber-500/50" : "bg-slate-950 text-slate-400 border-slate-800", "inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border text-xs font-bold transition"])}">`);
|
|
204
301
|
_push(ssrRenderComponent(unref(ShieldAlert), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
205
|
-
_push(`<span>Safe Zones</span></button>`);
|
|
302
|
+
_push(`<span class="hidden sm:inline">Safe Zones</span></button>`);
|
|
206
303
|
} else {
|
|
207
304
|
_push(`<!---->`);
|
|
208
305
|
}
|
|
209
|
-
_push(`</div></div><div class="relative flex-1 min-h-0 bg-slate-950/80 border border-slate-800/80 rounded-2xl flex items-center justify-center p-
|
|
306
|
+
_push(`</div></div><div class="relative flex-1 min-h-0 bg-slate-950/80 border border-slate-800/80 rounded-2xl flex items-center justify-center p-3 overflow-auto shadow-inner custom-scrollbar"><div class="transition-transform duration-200 ease-out origin-center flex-shrink-0" style="${ssrRenderStyle({ transform: `scale(${unref(zoomScale)})` })}">`);
|
|
210
307
|
if (unref(activeTab) === "feed") {
|
|
211
308
|
_push(`<div class="relative shadow-2xl rounded-2xl overflow-hidden border border-slate-700/80 flex-shrink-0" style="width:360px;height:450px;"><div style="width:1080px;height:1350px;transform:scale(0.333333);transform-origin:top left;">`);
|
|
212
309
|
_push(ssrRenderComponent(_component_TableCard, {
|
|
@@ -218,11 +315,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
218
315
|
} else {
|
|
219
316
|
_push(`<div class="relative shadow-2xl rounded-2xl overflow-hidden border border-slate-700/80 flex-shrink-0" style="width:300px;height:533.33px;">`);
|
|
220
317
|
if (unref(activeTab) === "reels") {
|
|
221
|
-
_push(`<div class="absolute inset-0 z-0 bg-slate-950 overflow-hidden"><video autoplay loop muted playsinline class="w-full h-full object-cover brightness-90 contrast-105"${ssrRenderAttr("src", unref(activeVideoSrc))}></video><div class="absolute inset-0 bg-slate-950/30 backdrop-blur-[0.5px]"></div></div>`);
|
|
318
|
+
_push(`<div class="absolute inset-0 z-0 bg-slate-950 overflow-hidden"><video autoplay loop muted playsinline class="w-full h-full object-cover brightness-90 contrast-105"${ssrRenderAttr("src", unref(activeVideoSrc))}></video><div class="absolute inset-0 bg-slate-950/30 backdrop-blur-[0.5px]"></div><audio${ssrRenderAttr("src", unref(activeAudioSrc))}${ssrIncludeBooleanAttr(unref(isMuted)) ? " muted" : ""} loop></audio></div>`);
|
|
222
319
|
} else {
|
|
223
320
|
_push(`<!---->`);
|
|
224
321
|
}
|
|
225
|
-
_push(`<div class="relative z-10" style="width:1080px;height:1920px;transform:scale(0.277778);transform-origin:top left;">`);
|
|
322
|
+
_push(`<div class="relative z-10 pointer-events-none" style="width:1080px;height:1920px;transform:scale(0.277778);transform-origin:top left;">`);
|
|
226
323
|
_push(ssrRenderComponent(_component_TableCard, {
|
|
227
324
|
data: __props.data,
|
|
228
325
|
mode: unref(activeTab) === "reels" ? "overlay" : "story",
|
|
@@ -242,13 +339,43 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
242
339
|
}
|
|
243
340
|
_push(`</div>`);
|
|
244
341
|
}
|
|
245
|
-
_push(`</div></div
|
|
342
|
+
_push(`</div></div>`);
|
|
343
|
+
if (unref(activeTab) === "reels") {
|
|
344
|
+
_push(`<div class="flex flex-col bg-slate-900/95 border border-slate-800 rounded-2xl p-2.5 gap-2 shadow-xl flex-shrink-0 text-xs"><div class="flex items-center justify-between gap-3"><button class="p-2 rounded-xl bg-emerald-600 hover:bg-emerald-500 text-white font-bold transition flex items-center gap-1.5 shadow-md"${ssrRenderAttr("title", unref(isPlaying) ? "Pause Preview" : "Putar Preview")}>`);
|
|
345
|
+
if (unref(isPlaying)) {
|
|
346
|
+
_push(ssrRenderComponent(unref(Pause), { class: "w-3.5 h-3.5 fill-current" }, null, _parent));
|
|
347
|
+
} else {
|
|
348
|
+
_push(ssrRenderComponent(unref(Play), { class: "w-3.5 h-3.5 fill-current" }, null, _parent));
|
|
349
|
+
}
|
|
350
|
+
_push(`<span class="text-[11px] hidden sm:inline">${ssrInterpolate(unref(isPlaying) ? "Pause" : "Play")}</span></button><div class="flex-1 flex items-center gap-2"><input type="range" min="0"${ssrRenderAttr("max", unref(totalDuration))} step="0.1"${ssrRenderAttr("value", unref(currentTime))} class="flex-1 h-1.5 bg-slate-950 rounded-lg appearance-none cursor-pointer accent-emerald-500 hover:accent-emerald-400"><span class="font-mono text-[11px] font-bold text-slate-300 min-w-[75px] text-right">${ssrInterpolate(formatTime(unref(currentTime)))} / ${ssrInterpolate(formatTime(unref(totalDuration)))}</span></div><button class="${ssrRenderClass([!unref(isMuted) ? "bg-purple-600/30 text-purple-300 border-purple-500/50" : "bg-slate-950 text-slate-400 border-slate-800 hover:text-white", "p-2 rounded-xl border transition flex items-center gap-1"])}"${ssrRenderAttr("title", unref(isMuted) ? "Aktifkan Suara Musik" : "Mute Musik")}>`);
|
|
351
|
+
if (!unref(isMuted)) {
|
|
352
|
+
_push(ssrRenderComponent(unref(Volume2), { class: "w-3.5 h-3.5 text-purple-400" }, null, _parent));
|
|
353
|
+
} else {
|
|
354
|
+
_push(ssrRenderComponent(unref(VolumeX), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
355
|
+
}
|
|
356
|
+
_push(`<span class="text-[10px] font-bold hidden sm:inline">${ssrInterpolate(!unref(isMuted) ? "Audio ON" : "Muted")}</span></button><button class="${ssrRenderClass([unref(showOffsetEditor) ? "bg-sky-500/20 text-sky-300 border-sky-500/50" : "bg-slate-950 text-slate-400 border-slate-800 hover:text-white", "px-2.5 py-2 rounded-xl border text-[11px] font-bold flex items-center gap-1.5 transition"])}" title="Atur Detik Awal Video & Musik">`);
|
|
357
|
+
_push(ssrRenderComponent(unref(Scissors), { class: "w-3.5 h-3.5 text-sky-400" }, null, _parent));
|
|
358
|
+
_push(`<span class="hidden sm:inline">Trim Offset</span></button></div>`);
|
|
359
|
+
if (unref(showOffsetEditor)) {
|
|
360
|
+
_push(`<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 p-2.5 bg-slate-950/80 rounded-xl border border-slate-800/80 animate-fadeIn"><div class="flex flex-col gap-1.5"><div class="flex items-center justify-between text-[11px]"><span class="font-bold text-sky-300 flex items-center gap-1">`);
|
|
361
|
+
_push(ssrRenderComponent(unref(Film), { class: "w-3 h-3" }, null, _parent));
|
|
362
|
+
_push(` Start Video: ${ssrInterpolate(__props.videoStartOffset || 0)}s </span><button class="text-[9px] px-1.5 py-0.5 rounded bg-slate-800 hover:bg-slate-700 text-sky-300 border border-slate-700 transition" title="Gunakan posisi video saat ini sebagai detik mulai"> Set Detik Ini </button></div><input type="range" min="0" max="60" step="1"${ssrRenderAttr("value", __props.videoStartOffset || 0)} class="w-full h-1 bg-slate-900 rounded appearance-none cursor-pointer accent-sky-400"></div><div class="flex flex-col gap-1.5"><div class="flex items-center justify-between text-[11px]"><span class="font-bold text-purple-300 flex items-center gap-1">`);
|
|
363
|
+
_push(ssrRenderComponent(unref(Music), { class: "w-3 h-3" }, null, _parent));
|
|
364
|
+
_push(` Start Musik: ${ssrInterpolate(__props.audioStartOffset || 0)}s </span><span class="text-[10px] text-slate-500 font-mono"> (Skip intro ke beat) </span></div><input type="range" min="0" max="120" step="1"${ssrRenderAttr("value", __props.audioStartOffset || 0)} class="w-full h-1 bg-slate-900 rounded appearance-none cursor-pointer accent-purple-400"></div></div>`);
|
|
365
|
+
} else {
|
|
366
|
+
_push(`<!---->`);
|
|
367
|
+
}
|
|
368
|
+
_push(`</div>`);
|
|
369
|
+
} else {
|
|
370
|
+
_push(`<!---->`);
|
|
371
|
+
}
|
|
372
|
+
_push(`<div class="flex flex-col bg-slate-900/90 border border-slate-800 rounded-2xl p-2.5 gap-1.5 shadow-lg flex-shrink-0"><div class="flex items-center justify-between text-xs"><span class="font-extrabold text-slate-300 text-[11px]">VIRAL CAPTION & HASHTAGS</span><button class="inline-flex items-center gap-1.5 px-3 py-1 bg-slate-800 hover:bg-slate-700 text-sky-300 border border-slate-700 rounded-lg transition text-[11px] font-bold">`);
|
|
246
373
|
if (unref(copied)) {
|
|
247
374
|
_push(ssrRenderComponent(unref(Check), { class: "w-3.5 h-3.5 text-emerald-400" }, null, _parent));
|
|
248
375
|
} else {
|
|
249
376
|
_push(ssrRenderComponent(unref(Copy), { class: "w-3.5 h-3.5" }, null, _parent));
|
|
250
377
|
}
|
|
251
|
-
_push(`<span>${ssrInterpolate(unref(copied) ? "Tersalin!" : "Copy Caption")}</span></button></div><textarea rows="2" class="w-full bg-slate-950 text-slate-200 text-xs p-2
|
|
378
|
+
_push(`<span>${ssrInterpolate(unref(copied) ? "Tersalin!" : "Copy Caption")}</span></button></div><textarea rows="2" class="w-full bg-slate-950 text-slate-200 text-xs p-2 rounded-xl border border-slate-800 focus:outline-none focus:border-sky-500/50 resize-none leading-relaxed font-sans" placeholder="Caption will appear here...">${ssrInterpolate(__props.data.caption)}</textarea></div>`);
|
|
252
379
|
if (__props.generatedResult) {
|
|
253
380
|
_push(`<div class="flex flex-wrap items-center justify-between gap-2 p-3 bg-emerald-950/40 border border-emerald-500/40 rounded-2xl shadow-xl flex-shrink-0"><div><div class="flex items-center gap-2 text-xs font-black text-emerald-300">`);
|
|
254
381
|
_push(ssrRenderComponent(unref(Check), { class: "w-4 h-4 text-emerald-400" }, null, _parent));
|
|
@@ -278,7 +405,18 @@ const ComparisonRowSchema = z.object({
|
|
|
278
405
|
const ContentDataSchema = z.object({
|
|
279
406
|
id: z.string().min(1),
|
|
280
407
|
category: z.string().optional().default("TECH"),
|
|
281
|
-
theme: z.enum([
|
|
408
|
+
theme: z.enum([
|
|
409
|
+
"blue-tech",
|
|
410
|
+
"emerald-finance",
|
|
411
|
+
"slate-education",
|
|
412
|
+
"dark-contrast",
|
|
413
|
+
"crimson-alert",
|
|
414
|
+
"amber-gold",
|
|
415
|
+
"cyber-violet",
|
|
416
|
+
"sunset-orange",
|
|
417
|
+
"nordic-frost",
|
|
418
|
+
"monochrome-luxe"
|
|
419
|
+
]).default("blue-tech"),
|
|
282
420
|
layoutType: z.enum([
|
|
283
421
|
"table",
|
|
284
422
|
"news",
|
|
@@ -421,7 +559,7 @@ const ContentDataSchema = z.object({
|
|
|
421
559
|
footerNote: z.string().optional().default("Industry Benchmark 2026"),
|
|
422
560
|
watermark: z.string().optional().default("@SocialGen"),
|
|
423
561
|
bgKeyword: z.string().optional().default("modern office coding night"),
|
|
424
|
-
reelsDuration: z.number().min(5).max(90).default(
|
|
562
|
+
reelsDuration: z.number().min(5).max(90).default(30),
|
|
425
563
|
caption: z.string().optional().default("Bagikan pendapat Anda di kolom komentar! #infografis #edukasi")
|
|
426
564
|
});
|
|
427
565
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -471,13 +609,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
471
609
|
footerNote: "Source: Verified Industry Compensation Survey 2026",
|
|
472
610
|
watermark: "@SocialGen",
|
|
473
611
|
bgKeyword: "modern office coding night technology",
|
|
474
|
-
reelsDuration:
|
|
612
|
+
reelsDuration: 30,
|
|
475
613
|
caption: "Higher gross salary in the US or guaranteed 30 days off in Germany? Which lifestyle would you choose? Drop your vote below! \u{1F447} #techcareers #salary #softwareengineer #worklife"
|
|
476
614
|
});
|
|
477
615
|
const options = ref({
|
|
478
616
|
theme: "blue-tech",
|
|
479
617
|
backgroundSource: "pexels",
|
|
480
618
|
musicFile: "random",
|
|
619
|
+
videoStartOffset: 0,
|
|
620
|
+
audioStartOffset: 0,
|
|
481
621
|
outputs: {
|
|
482
622
|
feed: true,
|
|
483
623
|
story: true,
|
|
@@ -502,14 +642,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
502
642
|
drafts.value.unshift(JSON.parse(JSON.stringify(contentData.value)));
|
|
503
643
|
activeDraftIndex.value = 0;
|
|
504
644
|
saveDraftsToStorage();
|
|
505
|
-
showToast("
|
|
645
|
+
showToast("Tersimpan ke riwayat pembuatan!");
|
|
506
646
|
}
|
|
507
647
|
function handleSelectDraft(index) {
|
|
508
648
|
if (drafts.value[index]) {
|
|
509
649
|
contentData.value = JSON.parse(JSON.stringify(drafts.value[index]));
|
|
510
650
|
options.value.theme = contentData.value.theme;
|
|
511
651
|
activeDraftIndex.value = index;
|
|
512
|
-
showToast(`Memuat
|
|
652
|
+
showToast(`Memuat item riwayat #${index + 1}`);
|
|
513
653
|
}
|
|
514
654
|
}
|
|
515
655
|
function handleDeleteDraft(index) {
|
|
@@ -518,7 +658,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
518
658
|
activeDraftIndex.value = -1;
|
|
519
659
|
}
|
|
520
660
|
saveDraftsToStorage();
|
|
661
|
+
showToast("Item riwayat dihapus");
|
|
662
|
+
}
|
|
663
|
+
function handleClearAllDrafts() {
|
|
664
|
+
drafts.value = [];
|
|
665
|
+
activeDraftIndex.value = -1;
|
|
666
|
+
saveDraftsToStorage();
|
|
667
|
+
showToast("Seluruh riwayat pembuatan berhasil dibersihkan!");
|
|
521
668
|
}
|
|
669
|
+
let saveSessionTimeout = null;
|
|
670
|
+
function persistActiveSession() {
|
|
671
|
+
try {
|
|
672
|
+
localStorage.setItem("sg_active_content", JSON.stringify(contentData.value));
|
|
673
|
+
localStorage.setItem("sg_active_options", JSON.stringify(options.value));
|
|
674
|
+
} catch {
|
|
675
|
+
}
|
|
676
|
+
clearTimeout(saveSessionTimeout);
|
|
677
|
+
saveSessionTimeout = setTimeout(() => {
|
|
678
|
+
$fetch("/api/last-session", {
|
|
679
|
+
method: "POST",
|
|
680
|
+
body: {
|
|
681
|
+
content: contentData.value,
|
|
682
|
+
options: options.value
|
|
683
|
+
}
|
|
684
|
+
}).catch(() => {
|
|
685
|
+
});
|
|
686
|
+
}, 1e3);
|
|
687
|
+
}
|
|
688
|
+
watch(() => contentData.value, persistActiveSession, { deep: true });
|
|
689
|
+
watch(() => options.value, persistActiveSession, { deep: true });
|
|
522
690
|
const isGenerating = ref(false);
|
|
523
691
|
const isAutoTopicLoading = ref(false);
|
|
524
692
|
const generateStage = ref("");
|
|
@@ -583,6 +751,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
583
751
|
isGenerating.value = true;
|
|
584
752
|
generateStage.value = "Rendering Images & Reels...";
|
|
585
753
|
generatedResult.value = null;
|
|
754
|
+
drafts.value.unshift(JSON.parse(JSON.stringify(contentData.value)));
|
|
755
|
+
activeDraftIndex.value = 0;
|
|
756
|
+
saveDraftsToStorage();
|
|
586
757
|
mobileTab.value = "preview";
|
|
587
758
|
try {
|
|
588
759
|
const res = await $fetch("/api/generate", {
|
|
@@ -604,11 +775,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
604
775
|
}
|
|
605
776
|
}
|
|
606
777
|
return (_ctx, _push, _parent, _attrs) => {
|
|
607
|
-
var _a;
|
|
778
|
+
var _a, _b;
|
|
608
779
|
const _component_DashboardControls = _sfc_main$2;
|
|
609
780
|
const _component_LivePreview = _sfc_main$1;
|
|
610
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "h-screen w-screen bg-slate-950 text-slate-100 flex flex-col font-sans selection:bg-sky-500 selection:text-white overflow-hidden" }, _attrs))}><header class="h-14 flex-shrink-0 border-b border-slate-800/80 bg-slate-900/60 backdrop-blur sticky top-0 z-30 px-3 sm:px-6 flex items-center justify-between"><div class="flex items-center gap-2.5 sm:gap-3"><div class="w-8 h-8 rounded-xl bg-gradient-to-tr from-sky-500 via-indigo-600 to-purple-600 flex items-center justify-center font-black text-white shadow-md shadow-sky-500/20 text-xs"> SG </div><div><h1 class="text-sm font-extrabold tracking-tight text-white flex items-center gap-1.5 sm:gap-2"> SocialGen <span class="text-[9px] sm:text-[10px] font-bold px-2 py-0.5 rounded-full bg-slate-800 text-slate-300 border border-slate-700">
|
|
611
|
-
if ((
|
|
781
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "h-screen w-screen bg-slate-950 text-slate-100 flex flex-col font-sans selection:bg-sky-500 selection:text-white overflow-hidden" }, _attrs))}><header class="h-14 flex-shrink-0 border-b border-slate-800/80 bg-slate-900/60 backdrop-blur sticky top-0 z-30 px-3 sm:px-6 flex items-center justify-between"><div class="flex items-center gap-2.5 sm:gap-3"><div class="w-8 h-8 rounded-xl bg-gradient-to-tr from-sky-500 via-indigo-600 to-purple-600 flex items-center justify-center font-black text-white shadow-md shadow-sky-500/20 text-xs"> SG </div><div><h1 class="text-sm font-extrabold tracking-tight text-white flex items-center gap-1.5 sm:gap-2"> SocialGen <span class="text-[9px] sm:text-[10px] font-bold px-2 py-0.5 rounded-full bg-slate-800 text-slate-300 border border-slate-700"> v${ssrInterpolate(((_a = unref(systemStatus)) == null ? void 0 : _a.version) || "2.1.1")}</span></h1></div></div><div class="flex items-center gap-2 sm:gap-3 text-xs">`);
|
|
782
|
+
if ((_b = unref(systemStatus)) == null ? void 0 : _b.geminiActive) {
|
|
612
783
|
_push(`<span class="px-2.5 py-0.5 sm:py-1 rounded-full bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 font-semibold text-[10px] sm:text-[11px]"> \u25CF AI Connected </span>`);
|
|
613
784
|
} else {
|
|
614
785
|
_push(`<span class="px-2.5 py-0.5 sm:py-1 rounded-full bg-slate-800 text-slate-400 border border-slate-700 font-semibold text-[10px] sm:text-[11px]"> \u25CF Local Engine </span>`);
|
|
@@ -642,12 +813,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
642
813
|
onAutoTopic: handleAutoTopic,
|
|
643
814
|
onSelectDraft: handleSelectDraft,
|
|
644
815
|
onDeleteDraft: handleDeleteDraft,
|
|
816
|
+
onClearAllDrafts: handleClearAllDrafts,
|
|
645
817
|
onSaveDraft: handleSaveCurrentDraft
|
|
646
818
|
}, null, _parent));
|
|
647
819
|
_push(`</section><section class="${ssrRenderClass([unref(mobileTab) === "preview" ? "flex" : "hidden lg:flex", "lg:col-span-7 h-full flex-col gap-3 overflow-hidden justify-between min-h-0"])}">`);
|
|
648
820
|
_push(ssrRenderComponent(_component_LivePreview, {
|
|
649
821
|
data: unref(contentData),
|
|
650
822
|
"selected-video": unref(options).backgroundSource,
|
|
823
|
+
"selected-music": unref(options).musicFile,
|
|
824
|
+
"video-start-offset": unref(options).videoStartOffset,
|
|
825
|
+
"onUpdate:videoStartOffset": ($event) => unref(options).videoStartOffset = $event,
|
|
826
|
+
"audio-start-offset": unref(options).audioStartOffset,
|
|
827
|
+
"onUpdate:audioStartOffset": ($event) => unref(options).audioStartOffset = $event,
|
|
651
828
|
"generated-result": unref(generatedResult)
|
|
652
829
|
}, null, _parent));
|
|
653
830
|
_push(`</section></main>`);
|
|
@@ -668,4 +845,4 @@ _sfc_main.setup = (props, ctx) => {
|
|
|
668
845
|
};
|
|
669
846
|
|
|
670
847
|
export { _sfc_main as default };
|
|
671
|
-
//# sourceMappingURL=pages-
|
|
848
|
+
//# sourceMappingURL=pages-CbBqCzvC.mjs.map
|