@socialgen_user/socialgen 2.5.1 → 2.6.1

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.
Files changed (50) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-qGtRcp1.js +55 -0
  3. package/.output/public/_nuxt/{DF2JzMIr.js → BeHrGX06.js} +4 -4
  4. package/.output/public/_nuxt/Bx_4f2Ey.js +128 -0
  5. package/.output/public/_nuxt/{DFkoTwsH.js → C6sfPUyS.js} +1 -1
  6. package/.output/public/_nuxt/{BWTcUa3O.js → CfCES4pU.js} +1 -1
  7. package/.output/public/_nuxt/builds/latest.json +1 -1
  8. package/.output/public/_nuxt/builds/meta/cb051a05-4d96-400f-908d-ce12561883cd.json +1 -0
  9. package/.output/public/_nuxt/{BwBAVlrf.js → lNTwsIHu.js} +1 -1
  10. package/.output/public/_nuxt/{BmiTz0Bj.js → nbOVMk7_.js} +1 -1
  11. package/.output/public/_nuxt/{pages.CurYQ93c.css → pages.DIMOTVGA.css} +1 -1
  12. package/.output/server/chunks/_/content.mjs +10 -0
  13. package/.output/server/chunks/_/content.mjs.map +1 -1
  14. package/.output/server/chunks/_/nitro.mjs +119 -119
  15. package/.output/server/chunks/_/templates.mjs.map +1 -1
  16. package/.output/server/chunks/build/LivePreview-styles.CNmUJrmb.mjs +8 -0
  17. package/.output/server/chunks/build/LivePreview-styles.CNmUJrmb.mjs.map +1 -0
  18. package/.output/server/chunks/build/{TableCard-J91PndXn.mjs → TableCard-CM2Gw7wR.mjs} +165 -36
  19. package/.output/server/chunks/build/TableCard-CM2Gw7wR.mjs.map +1 -0
  20. package/.output/server/chunks/build/{_mode_-BzB4uUM9.mjs → _mode_-Ddaj-NiO.mjs} +2 -2
  21. package/.output/server/chunks/build/{_mode_-BzB4uUM9.mjs.map → _mode_-Ddaj-NiO.mjs.map} +1 -1
  22. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  23. package/.output/server/chunks/build/entry-styles.DMrkT6oD.mjs +8 -0
  24. package/.output/server/chunks/build/entry-styles.DMrkT6oD.mjs.map +1 -0
  25. package/.output/server/chunks/build/index-styles-1.mjs-BPqnNiR_.mjs +4 -0
  26. package/.output/server/chunks/build/index-styles-1.mjs-BPqnNiR_.mjs.map +1 -0
  27. package/.output/server/chunks/build/{index-styles.CThHhoy-.mjs → index-styles.D6Stv-gv.mjs} +5 -5
  28. package/.output/server/chunks/build/index-styles.D6Stv-gv.mjs.map +1 -0
  29. package/.output/server/chunks/build/{pages-BB0Bky-X.mjs → pages-gpRRlAUy.mjs} +140 -60
  30. package/.output/server/chunks/build/pages-gpRRlAUy.mjs.map +1 -0
  31. package/.output/server/chunks/build/server.mjs +2 -2
  32. package/.output/server/chunks/build/styles.mjs +5 -5
  33. package/.output/server/chunks/build/styles.mjs.map +1 -1
  34. package/.output/server/chunks/routes/api/templates.post.mjs +1 -0
  35. package/.output/server/chunks/routes/api/templates.post.mjs.map +1 -1
  36. package/.output/server/package.json +1 -1
  37. package/data/templates.json +172 -15
  38. package/package.json +1 -1
  39. package/.output/public/_nuxt/4OV7a3GF.js +0 -54
  40. package/.output/public/_nuxt/DqCMQ7mU.js +0 -111
  41. package/.output/public/_nuxt/builds/meta/5a2b79fd-fbdb-482c-97eb-c377dcd65f19.json +0 -1
  42. package/.output/server/chunks/build/LivePreview-styles.BAXzj6mF.mjs +0 -8
  43. package/.output/server/chunks/build/LivePreview-styles.BAXzj6mF.mjs.map +0 -1
  44. package/.output/server/chunks/build/TableCard-J91PndXn.mjs.map +0 -1
  45. package/.output/server/chunks/build/entry-styles.DlYZJ_Pu.mjs +0 -8
  46. package/.output/server/chunks/build/entry-styles.DlYZJ_Pu.mjs.map +0 -1
  47. package/.output/server/chunks/build/index-styles-1.mjs-BYkUF4b0.mjs +0 -4
  48. package/.output/server/chunks/build/index-styles-1.mjs-BYkUF4b0.mjs.map +0 -1
  49. package/.output/server/chunks/build/index-styles.CThHhoy-.mjs.map +0 -1
  50. package/.output/server/chunks/build/pages-BB0Bky-X.mjs.map +0 -1
@@ -0,0 +1,128 @@
1
+ import{h as ma,d as wa,i as _,M as Te,o as _a,A as p,B as f,l as n,C as e,E as y,G as z,D as m,N as M,O as X,P as ce,Q as dt,R as $t,S as de,T as me,U as Me,V as ut,W as Ne,X as E,Y as Be,Z as Vs,m as re,$ as Ls,c as Bs,a0 as za,_ as Us}from"./BeHrGX06.js";import{r as Fs,_ as Hs}from"./-qGtRcp1.js";async function _t(o){if(!o)return!1;if(typeof window<"u"&&window.isSecureContext&&navigator?.clipboard?.writeText)try{return await navigator.clipboard.writeText(o),!0}catch(t){console.warn("[SocialGen Clipboard] navigator.clipboard.writeText failed, falling back to execCommand:",t)}if(typeof document<"u")try{const t=document.createElement("textarea");if(t.value=o,t.style.position="fixed",t.style.left="-9999px",t.style.top=(window.pageYOffset||document.documentElement.scrollTop||0)+"px",t.style.width="2em",t.style.height="2em",t.style.padding="0",t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.style.fontSize="16px",document.body.appendChild(t),typeof navigator<"u"&&/ipad|iphone|ipod/i.test(navigator.userAgent)){t.contentEditable="true",t.readOnly=!1;const r=document.createRange();r.selectNodeContents(t);const d=window.getSelection();d&&(d.removeAllRanges(),d.addRange(r)),t.setSelectionRange(0,999999)}else t.focus(),t.select();let l=!1;try{l=document.execCommand("copy")}catch(r){console.warn("[SocialGen Clipboard] execCommand call threw error:",r)}if(document.body.removeChild(t),l)return!0}catch(t){console.warn("[SocialGen Clipboard] DOM fallback failed:",t)}return!1}const Js=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var jt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const zs=({size:o,strokeWidth:t=2,absoluteStrokeWidth:s,color:l,iconNode:r,name:d,class:x,...c},{slots:C})=>ma("svg",{...jt,width:o||jt.width,height:o||jt.height,stroke:l||jt.stroke,"stroke-width":s?Number(t)*24/Number(o):t,class:["lucide",`lucide-${Js(d??"icon")}`],...c},[...r.map(w=>ma(...w)),...C.default?[C.default()]:[]]);const L=(o,t)=>(s,{slots:l})=>ma(zs,{...s,iconNode:t,name:o},l);const Zs=L("AtSignIcon",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]);const Pt=L("BookmarkIcon",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);const at=L("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Gs=L("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Ks=L("ChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Za=L("CircleAlertIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Ws=L("CircleCheckIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const da=L("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const ua=L("CodeIcon",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const We=L("CopyIcon",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ca=L("EllipsisIcon",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const Ga=L("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const pa=L("FileTextIcon",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Vt=L("FilmIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);const hs=L("GlobeIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const qs=L("HeartIcon",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);const Ys=L("LayersIcon",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const Ka=L("LayoutTemplateIcon",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);const Xs=L("MessageCircleIcon",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);const Lt=L("MusicIcon",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);const Qs=L("PauseIcon",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);const Dt=L("PenIcon",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);const bs=L("PlayIcon",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const wt=L("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Wa=L("RefreshCwIcon",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const gs=L("RotateCcwIcon",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const xa=L("ScissorsIcon",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);const qa=L("SearchIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Ya=L("SettingsIcon",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Xa=L("Share2Icon",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);const en=L("ShieldAlertIcon",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);const tn=L("SlidersVerticalIcon",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);const an=L("SmileIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);const pt=L("SparklesIcon",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const sn=L("ThumbsUpIcon",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);const ct=L("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const nn=L("TrendingUpIcon",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);const on=L("TypeIcon",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);const Et=L("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);const ln=L("Volume2Icon",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);const rn=L("VolumeXIcon",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);const dn=L("WandSparklesIcon",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);const Rt=L("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const un=L("ZoomInIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);const cn=L("ZoomOutIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),pn={class:"flex flex-col gap-3 text-slate-100"},fn={key:0,class:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"},mn={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"},xn={class:"flex items-center justify-between pb-3 border-b border-slate-800"},hn={class:"text-sm font-black text-white flex items-center gap-2"},bn={class:"p-3.5 bg-slate-950 rounded-2xl border border-slate-800 flex flex-col gap-2.5"},gn={class:"font-bold text-sky-400 flex items-center justify-between"},yn={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},vn={class:"flex flex-col gap-2"},kn={class:"text-[11px] font-bold text-slate-400 uppercase tracking-wider"},wn={class:"flex flex-col gap-2 max-h-[220px] overflow-y-auto pr-1 custom-scrollbar"},_n={class:"flex-1"},Sn={class:"flex items-center gap-2 mb-1"},Tn={class:"font-extrabold text-white text-xs"},Cn={class:"px-1.5 py-0.2 rounded text-[9px] font-bold bg-slate-800 text-slate-300 border border-slate-700"},An={class:"text-[11px] text-slate-400 leading-snug"},On={class:"flex items-center gap-1"},In=["onClick"],Nn=["onClick"],Mn={key:1,class:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"},$n={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]"},jn={class:"flex items-center justify-between pb-3 border-b border-slate-800"},Dn={class:"text-sm font-black text-white flex items-center gap-2"},En={class:"flex items-center gap-2 bg-slate-950 p-2.5 rounded-xl border border-slate-800 text-[11px] flex-wrap"},Rn={class:"text-white font-semibold"},Pn={class:"text-white font-semibold"},Vn={class:"text-white font-semibold"},Ln={class:"text-purple-400 font-bold"},Bn={class:"relative flex-1 min-h-[220px]"},Un=["value"],Fn={class:"flex items-center justify-between pt-2 border-t border-slate-800"},Hn={class:"bg-slate-900 border border-slate-700/80 rounded-3xl max-w-lg w-full p-6 shadow-2xl flex flex-col gap-4 text-xs max-h-[92vh] overflow-y-auto"},Jn={class:"flex items-center justify-between pb-3 border-b border-slate-800"},zn={class:"grid grid-cols-2 gap-3"},Zn={class:"p-3 bg-slate-950/60 border border-slate-800 rounded-2xl flex flex-col gap-2"},Gn={class:"flex items-center gap-2.5"},Kn={class:"p-3 bg-slate-950/60 border border-slate-800 rounded-2xl flex flex-col gap-2"},Wn={class:"flex items-center gap-2.5"},qn={class:"p-3 bg-slate-950/60 border border-slate-800 rounded-2xl flex flex-col gap-2"},Yn={class:"flex items-center gap-2.5"},Xn={class:"p-3 bg-slate-950/60 border border-slate-800 rounded-2xl flex flex-col gap-2"},Qn={class:"flex items-center gap-2.5"},eo={class:"flex flex-col gap-2"},to={class:"flex flex-wrap gap-1.5"},ao=["onClick"],so={class:"flex items-center -space-x-1"},no={class:"flex items-center justify-between mb-2"},oo={class:"flex items-center justify-end gap-2.5 pt-3 border-t border-slate-800"},lo={class:"bg-slate-900 border border-slate-700 rounded-3xl max-w-2xl w-full p-5 shadow-2xl flex flex-col gap-4 text-xs max-h-[92vh] overflow-hidden"},io={class:"flex items-center justify-between pb-3 border-b border-slate-800"},ro={class:"text-sm font-black text-white flex items-center gap-2"},uo={class:"flex items-center justify-between bg-slate-950 p-1 rounded-xl border border-slate-800"},co={class:"flex items-center gap-1"},po={key:0,class:"px-2.5 py-0.5 rounded-lg bg-amber-500/20 text-amber-300 border border-amber-500/40 text-[10px] font-bold flex items-center gap-1"},fo={key:0,class:"flex-1 overflow-y-auto pr-1 flex flex-col gap-2.5 custom-scrollbar min-h-[300px]"},mo={key:0,class:"text-center py-12 text-slate-500 text-xs"},xo={class:"flex-1 min-w-0"},ho={class:"flex items-center gap-2 mb-1 flex-wrap"},bo={class:"font-extrabold text-white text-xs"},go={class:"px-1.5 py-0.2 rounded text-[9px] font-bold bg-sky-950 text-sky-300 border border-sky-800"},yo={class:"text-[9px] text-slate-500 font-mono"},vo={class:"text-[11px] text-slate-400 leading-snug line-clamp-2"},ko={class:"flex items-center gap-1.5 flex-shrink-0 self-end sm:self-center"},wo=["onClick"],_o=["onClick"],So=["onClick"],To=["onClick"],Co={key:1,class:"flex-1 overflow-y-auto pr-1 flex flex-col gap-3 custom-scrollbar min-h-[350px]"},Ao={key:0,class:"p-2 rounded-xl bg-rose-950/60 border border-rose-500/50 text-rose-300 text-[11px] font-semibold"},Oo={key:1,class:"p-2.5 rounded-2xl bg-amber-950/60 border border-amber-500/50 text-amber-200 text-xs flex items-center justify-between shadow-lg"},Io={class:"flex items-center gap-2 min-w-0"},No={class:"p-1 rounded-lg bg-amber-500/20 text-amber-400 shrink-0"},Mo={class:"min-w-0"},$o={class:"font-extrabold text-white text-xs flex items-center gap-1.5 truncate"},jo={class:"text-amber-300 truncate"},Do={class:"text-[10px] text-amber-400/80"},Eo={class:"p-3 rounded-2xl bg-gradient-to-r from-sky-950/60 via-indigo-950/40 to-slate-900 border border-sky-500/30 flex flex-col gap-2.5"},Ro={class:"flex flex-col sm:flex-row sm:items-center justify-between gap-2"},Po={class:"flex items-center gap-1.5 shrink-0 flex-wrap"},Vo=["title"],Lo={key:0,class:"mt-1 flex flex-col gap-2 p-2.5 rounded-xl bg-slate-950/90 border border-sky-500/40"},Bo={class:"flex items-center justify-between"},Uo=["value"],Fo={key:1,class:"mt-1 flex flex-col gap-2 p-2.5 rounded-xl bg-slate-950/90 border border-sky-500/40"},Ho={class:"flex justify-end gap-2"},Jo={class:"grid grid-cols-1 sm:grid-cols-3 gap-2.5"},zo=["disabled"],Zo={class:"grid grid-cols-1 sm:grid-cols-2 gap-2.5"},Go=["value"],Ko={key:2,class:"flex flex-col gap-2.5 p-3 rounded-2xl bg-slate-950/80 border border-sky-500/30"},Wo={class:"flex items-center justify-between"},qo={class:"text-[11px] font-black text-sky-400 flex items-center gap-1"},Yo={class:"flex items-center justify-end gap-2 pt-2 border-t border-slate-800"},Xo={class:"flex lg:hidden flex-col gap-3 pb-24"},Qo={class:"flex items-center justify-between gap-1 p-1 bg-slate-900/95 border border-slate-800 rounded-2xl shadow-lg sticky top-0 z-20 backdrop-blur-md"},el={class:"flex items-center gap-1 overflow-x-auto no-scrollbar flex-1 py-0.5"},tl={key:0,class:"flex flex-col gap-3"},al={class:"flex items-start gap-2.5"},sl={class:"min-w-0 flex-1"},nl={class:"font-black text-white text-xs"},ol={class:"text-[11px] mt-0.5 leading-relaxed opacity-90"},ll={key:0},il={key:1},rl={class:"underline text-white"},dl={class:"underline text-white"},ul={key:2},cl={class:"flex items-center gap-2 pt-1 border-t border-white/10 flex-wrap"},pl={key:1,class:"p-2.5 rounded-xl bg-slate-900/60 border border-slate-800 flex items-center justify-between text-[11px] shadow-sm"},fl={class:"flex items-center gap-2 text-slate-300 truncate"},ml={class:"font-extrabold text-white truncate"},xl={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1.5 shadow-md"},hl=["value"],bl={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1.5 shadow-md"},gl=["value"],yl={class:"grid grid-cols-1 sm:grid-cols-2 gap-2.5"},vl={class:"p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1 shadow-md"},kl=["value"],wl={class:"p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1 shadow-md"},_l=["value"],Sl={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2 shadow-md"},Tl={class:"flex items-center justify-between"},Cl=["value"],Al={key:1,class:"flex flex-col gap-3"},Ol={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2.5 shadow-md"},Il={class:"flex items-center justify-between"},Nl={class:"text-xs font-extrabold text-white"},Ml={key:0,class:"p-2.5 rounded-xl bg-amber-950/70 border border-amber-500/40 text-amber-200 text-xs flex items-center justify-between shadow"},$l={class:"flex items-center gap-1.5 truncate"},jl={class:"text-[11px] truncate"},Dl={key:0},El={key:1},Rl={key:2},Pl={class:"flex gap-2 overflow-x-auto no-scrollbar py-1"},Vl=["onClick"],Ll={class:"w-8 h-8 rounded-xl bg-slate-800 flex items-center justify-center text-sm shadow"},Bl={class:"text-[10px] font-black text-white leading-tight truncate w-full"},Ul={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2.5 shadow-md"},Fl={class:"flex items-center justify-between"},Hl={class:"text-[10px] text-sky-400 font-bold truncate max-w-[150px]"},Jl={class:"grid grid-cols-6 gap-2 py-1"},zl=["onClick","title"],Zl={key:0,class:"drop-shadow"},Gl={class:"text-[8px] text-slate-400 truncate w-full text-center"},Kl={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl flex flex-col gap-3 shadow-md"},Wl={class:"flex items-center justify-between"},ql={class:"pt-2.5 border-t border-slate-800/80 flex items-center justify-between gap-2"},Yl={class:"flex items-center gap-1.5"},Xl={key:0,class:"p-2 rounded-xl bg-slate-950 border border-sky-500/40"},Ql=["value"],ei={key:2,class:"flex flex-col gap-3"},ti={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2.5 shadow-md"},ai={class:"flex items-center justify-between"},si={class:"text-xs font-extrabold text-sky-400 flex items-center gap-1.5"},ni=["disabled"],oi=["value"],li=["value"],ii={class:"pt-1 space-y-1"},ri={class:"flex items-center justify-between text-[11px]"},di={class:"text-slate-400 font-mono"},ui={class:"text-sky-300 font-bold"},ci=["max","value"],pi={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2.5 shadow-md"},fi={class:"flex items-center justify-between"},mi={class:"text-xs font-extrabold text-purple-400 flex items-center gap-1.5"},xi=["disabled"],hi=["value"],bi=["value"],gi={class:"pt-1 space-y-1"},yi={class:"flex items-center justify-between text-[11px]"},vi={class:"text-slate-400 font-mono"},ki={class:"text-purple-300 font-bold"},wi=["max","value"],_i={class:"p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl flex items-center justify-between shadow-md"},Si={class:"text-xs font-bold text-slate-300 flex items-center gap-1.5"},Ti={class:"flex items-center gap-1.5"},Ci=["onClick"],Ai={class:"p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1.5 shadow-md"},Oi={class:"grid grid-cols-3 gap-2"},Ii=["checked"],Ni=["checked"],Mi=["checked"],$i={key:3,class:"flex flex-col gap-3"},ji={class:"p-4 rounded-3xl bg-gradient-to-br from-indigo-950/80 via-slate-900 to-sky-950/80 border border-sky-500/30 space-y-3 shadow-xl"},Di={class:"flex items-center justify-between"},Ei={class:"text-xs font-black text-sky-300 uppercase tracking-wider flex items-center gap-1.5"},Ri={class:"text-[9px] px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400 font-bold border border-emerald-500/30"},Pi={class:"grid grid-cols-2 gap-2"},Vi={class:"space-y-1"},Li=["value"],Bi={class:"space-y-1"},Ui=["disabled"],Fi={class:"p-3.5 bg-slate-900/90 border border-purple-500/30 rounded-2xl space-y-2.5 shadow-md"},Hi={class:"flex items-center justify-between"},Ji={class:"flex items-center gap-1.5"},zi={class:"flex items-center gap-2"},Zi=["disabled"],Gi={key:4,class:"flex flex-col gap-3"},Ki={class:"flex items-center justify-between bg-slate-900/90 p-1 rounded-2xl border border-slate-800 text-xs font-bold shadow-md"},Wi={key:0,class:"flex flex-col gap-2"},qi={class:"flex items-center justify-between px-1"},Yi={key:0,class:"text-center py-10 text-slate-500 text-xs bg-slate-900/50 rounded-2xl border border-slate-800"},Xi=["onClick"],Qi={class:"flex-1 pr-2 truncate"},er={class:"font-extrabold text-xs text-white truncate"},tr={class:"text-[10px] text-slate-400 font-mono"},ar=["onClick"],sr={key:1,class:"flex flex-col gap-2"},nr={class:"flex items-center justify-between px-1"},or={key:0,class:"text-center py-10 text-slate-500 text-xs bg-slate-900/50 rounded-2xl border border-slate-800"},lr=["onClick"],ir={class:"flex-1 pr-2 truncate"},rr={class:"font-extrabold text-xs text-white truncate"},dr={class:"text-[10px] text-slate-400 font-mono"},ur=["onClick"],cr={key:5,class:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex flex-col justify-end"},pr={class:"w-full max-h-[80vh] bg-slate-900 border-t border-slate-700 rounded-t-3xl p-4 flex flex-col gap-3 shadow-2xl animate-in slide-in-from-bottom"},fr={class:"flex items-center justify-between pb-2 border-b border-slate-800"},mr={class:"flex items-center gap-1.5 truncate"},xr={class:"truncate"},hr={key:0},br={key:1},gr={key:2},yr=["value"],vr={class:"flex items-center justify-between gap-2"},kr={class:"hidden lg:flex flex-col h-full overflow-hidden w-full"},wr={class:"h-12 px-3 bg-slate-900/90 border-b border-slate-800/80 flex items-center justify-between shrink-0 shadow-sm z-20"},_r={class:"flex items-center gap-2"},Sr={class:"flex items-center gap-1.5 mr-1"},Tr={class:"flex items-center gap-1 bg-slate-950 px-2 py-1 rounded-xl border border-slate-800 shadow-inner"},Cr=["value"],Ar={class:"flex items-center gap-1 bg-slate-950 px-2 py-1 rounded-xl border border-slate-800 shadow-inner"},Or={class:"flex items-center gap-2"},Ir=["disabled"],Nr={class:"relative group"},Mr={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-30 w-56 text-xs"},$r={class:"px-3 py-1.5"},jr={key:0,class:"p-2.5 bg-gradient-to-r from-sky-950 via-indigo-950 to-purple-950 border-b border-sky-500/50 flex items-center gap-3 animate-pulse shadow-md shrink-0"},Dr={class:"w-5 h-5 rounded-lg bg-sky-500/20 border border-sky-400/40 flex items-center justify-center flex-shrink-0"},Er={class:"text-[11px] flex items-center gap-2"},Rr={class:"text-[9px] px-1.5 py-0.2 rounded bg-sky-500/30 text-sky-200 border border-sky-400/30"},Pr={class:"flex-1 flex flex-row overflow-hidden min-h-0"},Vr={class:"w-80 xl:w-96 bg-slate-900/80 border-r border-slate-800/80 flex flex-col shrink-0 overflow-hidden"},Lr={class:"p-2 border-b border-slate-800/80 bg-slate-950/70 flex items-center justify-between shrink-0"},Br={class:"flex items-center gap-1.5 w-full"},Ur={key:0,class:"flex-1 flex flex-col overflow-hidden min-h-0"},Fr={class:"p-2.5 border-b border-slate-800/60 flex flex-col gap-2 shrink-0"},Hr={class:"flex items-center justify-between"},Jr={class:"text-[10px] font-extrabold uppercase tracking-wider text-slate-400"},zr={class:"relative"},Zr={class:"flex-1 overflow-y-auto p-2 space-y-1.5 custom-scrollbar"},Gr=["onClick"],Kr={class:"flex items-center justify-between"},Wr={class:"text-xs font-black truncate text-white group-hover:text-sky-300 transition"},qr={key:0,class:"w-2 h-2 rounded-full bg-sky-400 shrink-0"},Yr={key:1,class:"text-[9px] text-amber-400 font-bold shrink-0"},Xr={class:"text-[10px] text-slate-400 line-clamp-1 leading-snug"},Qr={class:"flex items-center gap-1 mt-0.5 flex-wrap"},ed={class:"px-1.5 py-0.2 rounded text-[8px] font-bold bg-sky-900/60 text-sky-300 border border-sky-700/50 uppercase"},td={key:0,class:"px-1.5 py-0.2 rounded text-[8px] font-bold bg-slate-800 text-slate-400 uppercase"},ad={class:"p-2.5 border-t border-slate-800/80 bg-slate-950/80 flex items-center justify-between shrink-0"},sd={class:"text-[10px] font-bold text-slate-400 flex items-center gap-1"},nd={key:1,class:"flex-1 flex flex-col overflow-hidden min-h-0"},od={class:"p-2.5 border-b border-slate-800/60 flex items-center justify-between shrink-0"},ld={class:"text-[10px] font-extrabold uppercase tracking-wider text-slate-400"},id={class:"flex-1 overflow-y-auto p-2 space-y-1.5 custom-scrollbar"},rd={key:0,class:"p-2 rounded-xl bg-amber-500/15 border border-amber-500/40 text-amber-200 flex items-center justify-between gap-1 shadow-sm text-xs mb-1"},dd={class:"truncate text-[10px]"},ud={class:"text-amber-100 font-semibold truncate"},cd={key:1,class:"text-center py-8 text-slate-500 text-[11px] leading-relaxed"},pd=["onClick"],fd={class:"flex-1 min-w-0 pr-1"},md={class:"flex items-center gap-1 mb-0.5"},xd={class:"px-1.5 py-0.2 rounded text-[8px] font-bold uppercase bg-amber-500/20 text-amber-300 border border-amber-500/30"},hd={class:"text-[9px] text-slate-400 font-semibold truncate"},bd={class:"font-bold text-[11px] truncate text-slate-100"},gd=["onClick"],yd={key:2,class:"flex-1 flex flex-col overflow-hidden min-h-0"},vd={class:"p-2.5 border-b border-slate-800/60 flex items-center justify-between shrink-0"},kd={class:"text-[10px] font-extrabold uppercase tracking-wider text-slate-400"},wd={class:"flex-1 overflow-y-auto p-2 space-y-1.5 custom-scrollbar"},_d={key:0,class:"p-2 rounded-xl bg-purple-500/15 border border-purple-500/40 text-purple-200 flex items-center justify-between gap-1 shadow-sm text-xs mb-1"},Sd={class:"truncate text-[10px]"},Td={class:"text-purple-100 font-semibold truncate"},Cd={key:1,class:"text-center py-8 text-slate-500 text-[11px] leading-relaxed"},Ad=["onClick"],Od={class:"flex-1 min-w-0 pr-1"},Id={class:"flex items-center gap-1 mb-0.5"},Nd={class:"px-1.5 py-0.2 rounded text-[8px] font-bold uppercase bg-purple-500/20 text-purple-300 border border-purple-500/30"},Md={class:"text-[9px] text-slate-400 font-semibold truncate"},$d={key:0,class:"text-[8px] text-slate-500 font-mono ml-auto"},jd={class:"font-bold text-[11px] truncate text-slate-100"},Dd=["onClick"],Ed={class:"w-[460px] xl:w-[500px] bg-slate-950 border-r border-slate-800/80 flex flex-col shrink-0 overflow-hidden"},Rd={class:"px-3.5 py-2.5 bg-slate-900/70 border-b border-slate-800 flex items-center justify-between shrink-0"},Pd={class:"flex items-center gap-2"},Vd={class:"text-[10px] px-2 py-0.5 rounded-full bg-slate-800 text-sky-300 font-semibold truncate max-w-[150px]"},Ld={class:"flex items-center gap-1"},Bd={class:"flex-1 overflow-y-auto p-3 space-y-3.5 custom-scrollbar"},Ud={class:"p-3 bg-slate-900/80 border border-slate-800 rounded-2xl space-y-2.5 shadow-sm"},Fd={class:"flex items-center justify-between"},Hd={class:"text-[10px] font-bold text-sky-400 truncate max-w-[170px]"},Jd={class:"grid grid-cols-6 gap-1.5"},zd=["onClick","title"],Zd={class:"p-3 bg-slate-900/80 border border-slate-800 rounded-2xl space-y-2.5 shadow-sm"},Gd={class:"flex items-center justify-between"},Kd={class:"space-y-1.5 pt-1"},Wd={class:"flex flex-col min-w-[105px] shrink-0"},qd={class:"text-[11px] font-bold text-white leading-tight truncate max-w-[125px]"},Yd={class:"text-[8.5px] text-slate-400 font-mono"},Xd={class:"flex items-center gap-1.5 flex-1 justify-end"},Qd=["onClick"],eu=["min","max","step","value","onInput"],tu=["onClick"],au={class:"w-9 text-right font-mono text-[11px] font-extrabold text-sky-400 shrink-0"},su={class:"grid grid-cols-3 gap-2"},nu={class:"col-span-1 space-y-1"},ou=["value"],lu={class:"col-span-2 space-y-1"},iu=["value"],ru={class:"p-3 bg-slate-900/80 border border-slate-800 rounded-2xl space-y-2 shadow-sm"},du={class:"flex items-center justify-between"},uu={class:"text-[10px] font-black uppercase tracking-wider text-slate-400 flex items-center gap-1.5"},cu={key:0,class:"inline-flex items-center gap-0.5 px-2 py-0.5 rounded-full text-[9px] font-semibold bg-emerald-500/20 text-emerald-400 border border-emerald-500/30"},pu={key:1,class:"inline-flex items-center gap-0.5 px-2 py-0.5 rounded-full text-[9px] font-semibold bg-rose-500/20 text-rose-400 border border-rose-500/30"},fu={key:0},mu={key:1},xu={class:"flex items-center gap-1.5"},hu=["value"],bu={key:1,class:"text-[10px] text-rose-400 mt-1 px-1"},gu={class:"p-3 bg-slate-900/80 border border-slate-800 rounded-2xl flex flex-col gap-2.5 shadow-sm text-xs"},yu={class:"flex flex-col gap-1.5"},vu={class:"flex items-center justify-between gap-2"},ku={class:"font-bold text-slate-300 flex items-center gap-1.5 text-[11px]"},wu={class:"flex items-center gap-1.5"},_u=["value"],Su=["value"],Tu=["disabled"],Cu={class:"hidden sm:inline"},Au={class:"flex items-center justify-between pl-5 pr-1 text-[10px] text-slate-400"},Ou={class:"flex items-center gap-1 text-sky-300 font-mono"},Iu=["max","value"],Nu={class:"flex flex-col gap-1.5 pt-1.5 border-t border-slate-800"},Mu={class:"flex items-center justify-between gap-2"},$u={class:"font-bold text-slate-300 flex items-center gap-1.5 text-[11px]"},ju={class:"flex items-center gap-1.5"},Du=["value"],Eu=["value"],Ru=["disabled"],Pu={class:"hidden sm:inline"},Vu={class:"flex items-center justify-between pl-5 pr-1 text-[10px] text-slate-400"},Lu={class:"flex items-center gap-1 text-purple-300 font-mono"},Bu=["max","value"],Uu={class:"flex items-center justify-between pt-1.5 border-t border-slate-800"},Fu={class:"font-bold text-slate-300 flex items-center gap-1.5 text-[11px]"},Hu={class:"flex items-center gap-1.5 flex-wrap justify-end"},Ju=["onClick"],zu={class:"grid grid-cols-3 gap-2 pt-1.5 border-t border-slate-800"},Zu=["checked"],Gu=["checked"],Ku=["checked"],Wu={class:"p-3 bg-slate-900/90 border-t border-slate-800 shrink-0"},qu=["disabled"],Yu=wa({__name:"DashboardControls",props:{modelValue:{},options:{},isValid:{type:Boolean},validationError:{},isGenerating:{type:Boolean},generateStage:{},isAutoTopicLoading:{type:Boolean},drafts:{},activeDraftIndex:{},history:{},activeHistoryIndex:{},unsavedStash:{}},emits:["update:modelValue","update:options","generate","autoTopic","selectDraft","deleteDraft","saveDraft","selectHistory","deleteHistory","clearAllHistory","restoreStash","clearStash","toast"],setup(o,{emit:t}){const s=o,l=t,r=_(""),d=_(s.modelValue?.templateId||s.modelValue?.layoutType||"table"),x=_(!0),c=_(""),C=_(""),w=_("gemini-3.8-flash"),$=_("editor");function ne(){l("restoreStash"),$.value="editor"}const ge=_([]),Y=_("tech"),U=_(!1),D=_(null),H=_({id:"",name:"",theme:"blue-tech",description:""});async function ye(){try{const u=await $fetch("/api/niches");u?.niches&&u.niches.length>0&&(ge.value=u.niches,ge.value.some(a=>a.id===Y.value)||(Y.value=ge.value[0].id))}catch(u){console.error("Failed to load niches:",u)}}function je(){D.value=null,H.value={id:"",name:"",theme:s.modelValue.theme||"blue-tech",description:""},U.value=!0}function Pe(u){D.value=u.id,H.value={id:u.id,name:u.name,theme:u.theme||"blue-tech",description:u.description}}async function _e(){if(!H.value.name.trim()){alert("Nama Niche wajib diisi");return}const a={id:D.value||H.value.name.toLowerCase().replace(/[^a-z0-9_-]/g,"_"),name:H.value.name.trim(),theme:H.value.theme,description:H.value.description.trim()||`Fokus pada topik ${H.value.name.trim()}`};try{const i=await $fetch("/api/niches",{method:"POST",body:a});i?.niches&&(ge.value=i.niches,Y.value=a.id,D.value=null,H.value={id:"",name:"",theme:"blue-tech",description:""})}catch(i){alert("Gagal menyimpan niche: "+(i.data?.statusMessage||i.message))}}async function te(u){if(ge.value.length<=1){alert("Minimal harus ada 1 niche tersisa.");return}if(confirm("Hapus niche ini?"))try{const a=await $fetch(`/api/niches?id=${u}`,{method:"DELETE"});a?.niches&&(ge.value=a.niches,Y.value===u&&(Y.value=a.niches[0].id),D.value===u&&(D.value=null))}catch(a){alert("Gagal menghapus niche: "+(a.data?.statusMessage||a.message))}}const K=_("id"),W=_([{id:"table",name:"📊 Comparison Table",category:"Perbandingan",description:"Tabel komparasi 2 entitas",icon:"Table",layoutType:"table",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"versus",name:"⚔️ Versus Showdown Arena",category:"Perbandingan",description:"Duel head-to-head dua kubu",icon:"Swords",layoutType:"versus",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"receipt",name:"🧾 Monthly Living Invoice",category:"Finansial",description:"Format slip gaji pengeluaran bulanan",icon:"Receipt",layoutType:"receipt",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"news",name:"📰 Special Report Pamphlet",category:"Jurnalisme",description:"Pamflet investigasi dengan 3 poin kunci",icon:"Newspaper",layoutType:"news",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"stat",name:"🎯 Big Shocking Number",category:"Analisis",description:"Fokus pada satu angka kontras raksasa",icon:"Target",layoutType:"stat",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"timeline",name:"⏳ 10-Year Shift (Then vs Now)",category:"Tren",description:"Pergeseran tren 10 tahun lalu vs sekarang",icon:"Clock",layoutType:"timeline",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"barchart",name:"📈 Income Allocation Bars",category:"Finansial",description:"Distribusi alokasi dana dengan bar chart",icon:"BarChart3",layoutType:"barchart",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"list",name:"🏆 Top 5 Ranked List",category:"Peringkat",description:"Ranking 5 teratas dengan kartu metrik",icon:"ListOrdered",layoutType:"list",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"quote",name:"💬 Hot Take / Quote Debate",category:"Opini",description:"Kutipan tajam memicu perdebatan",icon:"Quote",layoutType:"quote",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"leaderboard",name:"🥇 Multi-Country Leaderboard (Top 10)",category:"Peringkat",description:"Peringkat 5-10 negara dengan horizontal bar chart",icon:"Trophy",layoutType:"leaderboard",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"editorial",name:"📰 Editorial Storytelling Deep Dive",category:"Jurnalisme",description:"Format narasi editorial 3 kartu bertahap",icon:"BookOpen",layoutType:"editorial",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"matrix",name:"📊 Multi-Column Matrix (3-4 Negara)",category:"Perbandingan",description:"Tabel matriks komparasi 3-4 negara sekaligus",icon:"Grid",layoutType:"matrix",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"debate",name:"⚡ Debate Arena (Pro vs Kontra)",category:"Interaktif",description:"Arena debat dua kubu dengan skor komunitas",icon:"Flame",layoutType:"debate",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"tierlist",name:"🎖️ Tier List Ranking (S, A, B, C)",category:"Peringkat",description:"Hierarki tingkatan Tier S, A, B, C",icon:"Layers",layoutType:"tierlist",isBuiltin:!0,sampleData:{},promptDirective:""},{id:"breaking-notifications",name:"📱 Breaking Alert Notification Stack",category:"Berita Viral",description:"Tumpukan 3 kartu notifikasi darurat kaca iOS/Android",icon:"Bell",layoutType:"custom",isBuiltin:!0,sampleData:{},promptDirective:""}]),Ce=_(!1),ue=_("list"),ae=_(null),oe=_(""),G=_(""),we=_(!1),le=_(!1),Ae=_(!1),ie=_(""),O=_({id:"",name:"",category:"Kustom",description:"",layoutType:"custom",customHtml:"",customCss:"",fontSlots:void 0,promptDirective:"",sampleJsonText:""});async function Qe(){try{const u=await $fetch("/api/templates");u?.templates&&u.templates.length>0&&(W.value=u.templates)}catch(u){console.error("Failed to load templates:",u)}}function j(u="list"){ue.value=u,G.value="",u==="form"&&F(),Ce.value=!0}function g(){F(),G.value="",ue.value="form",Ce.value=!0}function se(){F(),G.value="",ue.value="list"}function Re(){Ce.value=!1,F(),G.value="",ue.value="list"}function F(){ae.value=null,O.value={id:"",name:"",category:"Kustom",description:"",layoutType:"custom",customHtml:`<div class="p-6 rounded-2xl bg-slate-900/90 border border-slate-700/80 text-center shadow-xl">
2
+ <span class="px-3 py-1 rounded-full text-xs font-black uppercase tracking-wider bg-sky-500/20 text-sky-400 border border-sky-500/30 mb-3 inline-block">{{ data.category }}</span>
3
+ <h2 class="text-3xl font-black text-white mb-2 leading-tight">{{ data.title }}</h2>
4
+ <p class="text-lg text-sky-300 font-bold mb-4">{{ data.subtitle }}</p>
5
+ </div>`,customCss:".custom-card-glow { box-shadow: 0 10px 30px -5px rgba(14, 165, 233, 0.3); }",promptDirective:"Instruksi khusus untuk AI saat generate format ini...",sampleJsonText:JSON.stringify({title:"JUDUL KONTEN MENARIK 2026",subtitle:"Subjudul penjelas berbasis fakta data",category:"KUSTOM VIRAL",watermark:"@SocialGen"},null,2)}}function Ge(u){if(O.value.layoutType=u,u==="custom"){O.value.customHtml||(O.value.customHtml=`<div class="p-6 rounded-2xl bg-slate-900/90 border border-slate-700/80 text-center shadow-xl">
6
+ <span class="px-3 py-1 rounded-full text-xs font-black uppercase tracking-wider bg-sky-500/20 text-sky-400 border border-sky-500/30 mb-3 inline-block">{{ data.category }}</span>
7
+ <h2 class="text-3xl font-black text-white mb-2 leading-tight">{{ data.title }}</h2>
8
+ <p class="text-lg text-sky-300 font-bold mb-4">{{ data.subtitle }}</p>
9
+ </div>`);return}const a=W.value.find(i=>i.id===u||i.layoutType===u);a&&(O.value.promptDirective=a.promptDirective,O.value.sampleJsonText=JSON.stringify(a.sampleData,null,2),O.value.customHtml=a.customHtml||"",O.value.customCss=a.customCss||"")}function Zt(u){ae.value=u.id,O.value={id:u.id,name:u.name,category:u.category,description:u.description,layoutType:u.layoutType,customHtml:u.customHtml||"",customCss:u.customCss||"",promptDirective:u.promptDirective,sampleJsonText:JSON.stringify(u.sampleData,null,2)},ue.value="form"}function nt(u){ae.value=null,O.value={id:`${u.id}-custom-${Date.now().toString().slice(-4)}`,name:`${u.name} (Kustom)`,category:u.category||"Kustom",description:u.description,layoutType:u.layoutType,customHtml:u.customHtml||"",customCss:u.customCss||"",promptDirective:u.promptDirective,sampleJsonText:JSON.stringify(u.sampleData,null,2)},ue.value="form"}const yt=re(()=>`Bertindaklah sebagai Lead Design Technologist & Senior Frontend Engineer untuk SocialGen (Dynamic Visual Engine for High-CPM Meta Monetization).
10
+
11
+ Saya melampirkan screenshot / gambar desain kartu visual media sosial.
12
+
13
+ Tugas Anda:
14
+ Analisis tata letak visual, dekorasi, tipografi, palet warna HEX, bingkai, dan struktur konten pada gambar ini, lalu ubah menjadi template visual kustom SocialGen dalam format 1 objek JSON valid persis seperti ini:
15
+
16
+ {
17
+ "id": "slug-unik-kebab-case",
18
+ "name": "Nama Template Unik (Awali dengan Emoji, misal: 📰 Orange Pill Hero & News Tablet)",
19
+ "category": "Kategori Template (misal: Edukasi, Finansial, Berita Viral, Ranking, Perbandingan)",
20
+ "description": "Deskripsi singkat 1-2 kalimat mengenai gaya visual dan kegunaan template ini.",
21
+ "layoutType": "custom",
22
+ "fontSlots": [
23
+ { "id": "title", "label": "Judul Utama", "default": 56, "min": 38, "max": 76 },
24
+ { "id": "subtitle", "label": "Subjudul", "default": 28, "min": 20, "max": 42 },
25
+ { "id": "items", "label": "Poin Konten", "default": 26, "min": 20, "max": 38 },
26
+ { "id": "source", "label": "Sumber Data", "default": 21, "min": 16, "max": 28 }
27
+ ],
28
+ "customHtml": "<div class=\\"my-container\\">\\n <!-- Header / Hero Section -->\\n <div class=\\"my-hero\\">\\n <div class=\\"my-subtitle\\">{{ data.subtitle }}</div>\\n <div class=\\"my-title-box\\">\\n <h1 class=\\"my-title\\">{{ data.title }}</h1>\\n </div>\\n </div>\\n\\n <!-- Body / Main Content Visual Structure (Tablet / Frame / Pill Cards) -->\\n <div class=\\"my-frame-box\\">\\n {{#each data.items}}\\n <div class=\\"my-item-card\\">\\n <div class=\\"my-item-dot\\"></div>\\n <div class=\\"my-item-text\\">{{ text }}</div>\\n </div>\\n {{/each}}\\n </div>\\n\\n <!-- Footer / Source Attribution -->\\n <div class=\\"my-footer\\">\\n <span class=\\"my-source\\">{{ data.footerNote }}</span>\\n </div>\\n</div>",
29
+ "customCss": ".my-container { width: 100%; max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } .my-hero { display: flex; flex-direction: column; gap: 12px; } .my-subtitle { font-size: var(--font-subtitle, 28px); font-weight: 800; color: #ffffff; text-shadow: 0 2px 8px rgba(0,0,0,0.4); } .my-title-box { background: #ffffff; border-radius: 24px; padding: 22px 32px; box-shadow: 0 12px 28px rgba(0,0,0,0.25); } .my-title { margin: 0; font-size: var(--font-title, 56px); font-weight: 900; line-height: 1.1; color: #d84e1f; text-transform: uppercase; } .my-frame-box { display: flex; flex-direction: column; gap: 16px; background: rgba(30, 41, 59, 0.9); border-radius: 32px; padding: 26px; border: 2px solid rgba(255,255,255,0.15); box-shadow: 0 20px 40px rgba(0,0,0,0.35); } .my-item-card { display: flex; align-items: flex-start; gap: 16px; background: #ffffff; border-radius: 18px; padding: 20px 24px; border-left: 8px solid #eb6a37; box-shadow: 0 4px 12px rgba(0,0,0,0.06); } .my-item-dot { width: 14px; height: 14px; min-width: 14px; border-radius: 50%; background: #f5b027; margin-top: 6px; } .my-item-text { font-size: var(--font-items, 26px); font-weight: 700; line-height: 1.45; color: #1e293b; margin: 0; } .my-footer { display: flex; justify-content: center; } .my-source { font-size: var(--font-source, 21px); font-weight: 700; color: rgba(255,255,255,0.9); background: rgba(15,23,42,0.6); padding: 10px 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.2); text-shadow: 0 1px 3px rgba(0,0,0,0.4); }",
30
+ "sampleData": {
31
+ "templateId": "slug-unik-kebab-case",
32
+ "layoutType": "custom",
33
+ "title": "CONTOH JUDUL BESAR KAPITAL SESUAI GAMBAR",
34
+ "subtitle": "Contoh subjudul pengantar informatif sesuai konteks gambar",
35
+ "category": "KATEGORI KONTEN",
36
+ "watermark": "@SocialGen",
37
+ "theme": "sunset-orange",
38
+ "accentColor": "#eb6a37",
39
+ "footerNote": "Sumber: Lembaga Riset / Instansi Resmi (domain.go.id / .org) 2026",
40
+ "methodologyBadge": "Metodologi Riset Resmi 2026",
41
+ "disclaimer": "Ringkasan data edukasi • Bukan nasihat resmi",
42
+ "sourceUrl": "https://domain-resmi.org",
43
+ "reelsDuration": 30,
44
+ "caption": "Pertanyaan pemantik interaksi netizen? Tulis pendapatmu di bawah! 👇 #hashtags",
45
+ "items": [
46
+ { "text": "Poin penjelasan pertama yang ringkas dan padat (maksimal 20 kata per poin)..." },
47
+ { "text": "Poin penjelasan kedua yang mereplikasi isi kartu pada gambar..." },
48
+ { "text": "Poin penjelasan ketiga yang melengkapi data infografis..." }
49
+ ]
50
+ },
51
+ "promptDirective": "FORMAT STRUKTUR JSON:\\n- 'templateId': Wajib cantumkan 'slug-unik-kebab-case'.\\n- 'layoutType': Wajib 'custom'.\\n- 'title': Judul utama singkat, padat, kapital (2-4 kata) yang menonjol.\\n- 'subtitle': Subjudul informatif 1 baris (6-10 kata) sebagai pengantar.\\n- 'footerNote': WAJIB cantumkan nama lembaga/sumber data riset resmi & tahun data.\\n- 'items': Array berisi 3 hingga 5 objek dengan properti 'text' (1-2 kalimat ringkas padat)."
52
+ }
53
+
54
+ =======================================================
55
+ PANDUAN STANDAR WAJIB ARSITEKTUR TEMPLATE SOCIALGEN:
56
+
57
+ 1. ATURAN KRUSIAL KODE HTML & HANDLEBARS TAGS:
58
+ - Kolom \\"customHtml\\" WAJIB berupa string HTML utuh dengan seluruh tag pembuka & penutup <div>, <h1>, <p>, <span>.
59
+ - Tag Handlebars yang didukung:
60
+ * {{ data.title }} untuk judul utama
61
+ * {{ data.subtitle }} untuk subjudul/kicker
62
+ * {{ data.footerNote }} untuk sumber/keterangan bawah
63
+ * {{#each data.items}} ... {{ text }} ... {{/each}} untuk list/grid poin
64
+ - DILARANG KERAS menulis variabel raw tanpa pembungkus elemen HTML dan class CSS!
65
+ - Semua tanda kutip dua atribut di dalam JSON wajib di-escape (misal: class=\\"my-card\\").
66
+
67
+ 2. KESERASIAN ID TEMPLATE (ID MATCHING):
68
+ - Field root \\"id\\" dan field \\"sampleData.templateId\\" HARUS BERNILAI SAMA PERSIS (contoh: \\"orange-pill-hero\\").
69
+ - Jangan menggunakan ID yang berbeda antara root dan sampleData karena sistem SocialGen auto-switch menggunakan ID ini.
70
+
71
+ 3. EKSTRAKSI WARNA AKURAT & ACCENT COLOR:
72
+ - Nilai \\"theme\\" dapat berupa salah satu preset SocialGen:
73
+ ('blue-tech' | 'emerald-finance' | 'slate-education' | 'dark-contrast' | 'crimson-alert' | 'amber-gold' | 'cyber-violet' | 'sunset-orange' | 'nordic-frost' | 'monochrome-luxe')
74
+ ATAU identifier tema kustom (misal: 'navy-gold', 'crimson-dark', 'sepia-vintage').
75
+ - Sertakan field \\"accentColor\\" dengan kode HEX dominan yang diekstrak langsung dari gambar screenshot (contoh: \\"#eb6a37\\", \\"#d4af37\\", \\"#38bdf8\\").
76
+ - Dalam \\"customCss\\", Anda dapat menggunakan warna HEX langsung atau variabel CSS var(--accent-color, #eb6a37).
77
+
78
+ 4. JAMINAN KONTRAS TINGGI (HIGH CONTRAST & READABILITY):
79
+ - Pastikan teks selalu sangat kontras dan mudah dibaca:
80
+ * Latar belakang gelap -> Gunakan teks putih (#ffffff) atau teks aksen terang (#fde047, #38bdf8).
81
+ * Kotak/Kartu terang/putih -> Gunakan teks gelap (#0f172a, #1e293b, #334155). JANGAN PERNAH gunakan teks putih di atas kartu putih!
82
+ * Tambahkan drop-shadow (text-shadow: 0 2px 8px rgba(0,0,0,0.5);) pada teks yang berada langsung di atas foto/background kanvas.
83
+
84
+ 5. KANVAS RESPONSIVE MULTI-FORMAT (FEED 4:5 & REELS 9:16):
85
+ - SocialGen mengekspor konten ke Feed 4:5 (1080x1350) dan Story/Reels 9:16 (1080x1920).
86
+ - JANGAN PERNAH memberi tinggi mati (height: 1350px) pada kontainer utama!
87
+ - Kontainer terluar WAJIB menggunakan:
88
+ width: 100%; max-width: 960px; margin: 0 auto; display: flex; flex-direction: column;
89
+ - Dengan aturan ini, kartu akan selalu berada tepat di tengah (center) dan berada di dalam Safe Zone baik pada format Feed maupun Reels.
90
+
91
+ 6. JANGAN DUPLIKASI HEADER & FOOTER GLOBAL SOCIALGEN:
92
+ - SocialGen SUDAH otomatis merender Top Metadata Bar (Category Badge & Watermark @SocialGen) di bagian paling atas kanvas.
93
+ - SocialGen SUDAH otomatis merender Bottom Callout (\\"💬 Drop your opinion below • Share to your feed ↗\\" & Disclaimer) di bagian paling bawah.
94
+ - Oleh karena itu, customHtml HANYA fokus mendesain kartu konten di bagian tengah:
95
+ * Header kartu (Subtitle + Judul Besar)
96
+ * Badan kartu (mockup tablet, framed box, kartu list pil/bubble)
97
+ * Sumber data (footerNote) di bagian bawah kartu
98
+
99
+ 7. TIPOGRAFI UNIVERSAL BERBOBOT BESAR (RAMAH BACA SEMUA USIA - MUDA & LANSIA):
100
+ - Kanvas beresolusi 1080px lebar. Ketika tampil di layar HP 390px, ukuran teks akan mengecil ~2.8x.
101
+ - SEMUA TEKS WAJIB BERUKURAN BESAR, BOLD, DAN KONTRASTING agar audiens lansia maupun anak muda dapat membaca sekilas tanpa zoom:
102
+ * Judul Utama (title): font-size: 56px – 68px (font-weight: 900, line-height: 1.08 - 1.15)
103
+ * Subjudul / Kicker (subtitle): font-size: 28px – 32px (font-weight: 700 - 800)
104
+ * Isi Poin / Body Teks (items): font-size: 25px – 28px (DILARANG KERAS di bawah 22px!)
105
+ * Sumber Data (footerNote): font-size: 21px – 22px (font-weight: 700)
106
+ * Disclaimer & Callout: font-size: 19px – 20px (font-weight: 700)
107
+
108
+ 8. DYNAMIC FONT SLOTS (KONTROL UKURAN FONT DINAMIS PER SECTION):
109
+ - Wajib sertakan field \\"fontSlots\\" di JSON root untuk setiap bagian teks yang kamu buat (apakah template memiliki 2, 3, 5, atau lebih section teks):
110
+ \\"fontSlots\\": [
111
+ { \\"id\\": \\"title\\", \\"label\\": \\"Judul Utama\\", \\"default\\": 56, \\"min\\": 38, \\"max\\": 76 },
112
+ { \\"id\\": \\"subtitle\\", \\"label\\": \\"Subjudul\\", \\"default\\": 28, \\"min\\": 20, \\"max\\": 42 },
113
+ { \\"id\\": \\"items\\", \\"label\\": \\"Poin Konten\\", \\"default\\": 26, \\"min\\": 20, \\"max\\": 38 },
114
+ { \\"id\\": \\"source\\", \\"label\\": \\"Sumber Data\\", \\"default\\": 21, \\"min\\": 16, \\"max\\": 28 }
115
+ ]
116
+ - Pada \\"customCss\\", gunakan variabel CSS var(--font-[id], [default]px) pada setiap elemen teks tersebut agar pengguna dapat menyesuaikan font size secara langsung via slider Studio Inspector!
117
+
118
+ 9. MURNI CSS EKSPLISIT DI 'customCss':
119
+ - Karena aplikasi sudah di-compile, jangan mengandalkan arbitrary Tailwind baru (seperti text-[55px] atau bg-[#123456]).
120
+ - Semua warna, background, border, radius, bayangan, font-size, dan flexbox WAJIB ditulis lengkap dan eksplisit di \\"customCss\\".
121
+
122
+ 10. KREDIBILITAS TIER 1 (META CPM MONETIZATION):
123
+ - Selalu sertakan field \\"methodologyBadge\\", \\"disclaimer\\", dan \\"sourceUrl\\" di sampleData untuk lolos verifikasi transparansi data audiens Tier 1.
124
+
125
+ Keluarkan HANYA 1 objek JSON valid tanpa markdown formatting (\`\`\`json) agar bisa langsung diimpor otomatis ke aplikasi SocialGen.`);async function ot(){await _t(yt.value)&&(we.value=!0,setTimeout(()=>{we.value=!1},3e3))}function Gt(){if(G.value="",!!ie.value.trim())try{let u=ie.value.trim();u=u.replace(/^```json\s*/i,"").replace(/```$/i,"").trim();const a=JSON.parse(u),i=(a.id||a.sampleData?.templateId||a.name||"").toLowerCase().replace(/[^a-z0-9_-]/g,"-").replace(/^-+|-+$/g,"");if(i&&(O.value.id=i),a.name&&(O.value.name=a.name),a.category&&(O.value.category=a.category),a.description&&(O.value.description=a.description),O.value.layoutType=a.layoutType||"custom",a.customHtml){const h=a.customHtml.trim();O.value.customHtml=h,/<[a-z][\s\S]*>/i.test(h)||(G.value="⚠️ Perhatian: customHtml tidak mendeteksi tag HTML (seperti <div>, <p>). Pastikan AI menyertakan elemen HTML pembungkus class CSS.")}if(a.customCss&&(O.value.customCss=a.customCss),a.fontSlots&&Array.isArray(a.fontSlots)&&(O.value.fontSlots=a.fontSlots),a.promptDirective&&(O.value.promptDirective=a.promptDirective),a.sampleData){const h={...a.sampleData};O.value.id&&(h.templateId=O.value.id,h.layoutType="custom"),h.id||(h.id="sample-"+(O.value.id||Date.now())),O.value.sampleJsonText=JSON.stringify(h,null,2)}le.value=!1,ie.value=""}catch(u){G.value="Gagal membaca JSON dari AI: "+u.message}}async function Kt(){if(G.value="",!O.value.name.trim()){G.value="Nama template wajib diisi";return}const u=ae.value||O.value.id.trim()||O.value.name.toLowerCase().replace(/[^a-z0-9_-]/g,"-");let a=null;try{a=JSON.parse(O.value.sampleJsonText),a.id||(a.id=u)}catch(i){G.value="JSON Sampel Data tidak valid: "+i.message;return}try{const i=await $fetch("/api/templates",{method:"POST",body:{id:u,name:O.value.name.trim(),category:O.value.category.trim()||"Kustom",description:O.value.description.trim(),layoutType:O.value.layoutType,customHtml:O.value.customHtml?.trim()||void 0,customCss:O.value.customCss?.trim()||void 0,fontSlots:O.value.fontSlots,sampleData:a,promptDirective:O.value.promptDirective.trim(),isBuiltin:!!(ae.value&&W.value.find(h=>h.id===ae.value)?.isBuiltin)}});i?.templates&&(W.value=i.templates),ue.value="list",ae.value=null}catch(i){G.value=i.data?.statusMessage||i.message||"Gagal menyimpan template"}}async function At(u){if(confirm("Yakin ingin menghapus template kustom ini?"))try{const a=await $fetch(`/api/templates?id=${u}`,{method:"DELETE"});a?.templates&&(W.value=a.templates)}catch(a){alert(a.data?.statusMessage||a.message||"Gagal menghapus template")}}function Wt(u){lt(u.layoutType==="custom"?u.id:u.layoutType||u.id),Ce.value=!1}const T=re(()=>{if(!oe.value.trim())return W.value;const u=oe.value.toLowerCase();return W.value.filter(a=>a.name.toLowerCase().includes(u)||a.category.toLowerCase().includes(u)||a.description.toLowerCase().includes(u)||a.layoutType.toLowerCase().includes(u))}),b=_(!1),Se=_(""),fe=_({}),Ta=_(!1),Ot=_(!1),qt=_(["cyber_blue.mp4","emerald_flow.mp4","default_bg.mp4"]),Yt=_(["synthwave_pulse.mp3","lofi_chill.mp3","default_ambient.mp3"]),Ve=_({"neon_cyber_grid.mp4":8,"financial_pulse_flow.mp4":8,"dark_luxury_particles.mp4":8,"cyber_matrix_stream.mp4":10,"cyber_blue.mp4":15,"default_bg.mp4":15,"emerald_flow.mp4":15,"cyber_pulse.mp4":15,"cyber_future_tech.mp3":15,"dark_phonk_pulse.mp3":15,"deep_finance_groove.mp3":15,"synthwave_pulse.mp3":15,"lofi_chill.mp3":15,"default_ambient.mp3":15,"motivation_cinematic.mp3":110,"lofi_viral_study.mp3":147}),Xt=re(()=>{const u=s.options.backgroundSource||"";return Ve.value[u]||15}),et=re(()=>Math.max(1,Xt.value-1)),Qt=re(()=>{const u=s.options.musicFile||"";return Ve.value[u]||30}),tt=re(()=>Math.max(1,Qt.value-1));function Ca(u,a){if(!u||u==="random"||typeof window>"u")return;const i=a==="video"?`/api/stream/videos/${encodeURIComponent(u)}`:`/api/stream/musics/${encodeURIComponent(u)}`;if(a==="audio"){const h=new Audio;h.preload="metadata",h.src=i,h.onloadedmetadata=()=>{if(h.duration&&!isNaN(h.duration)&&isFinite(h.duration)){const N=Math.round(h.duration);N>0&&N!==Ve.value[u]&&(Ve.value={...Ve.value,[u]:N})}}}else{const h=document.createElement("video");h.preload="metadata",h.src=i,h.onloadedmetadata=()=>{if(h.duration&&!isNaN(h.duration)&&isFinite(h.duration)){const N=Math.round(h.duration);N>0&&N!==Ve.value[u]&&(Ve.value={...Ve.value,[u]:N})}}}}Te(()=>s.options.backgroundSource,(u,a)=>{if(u&&Ca(u,"video"),a!==void 0&&u!==a)Le("videoStartOffset",0);else{const i=et.value;(s.options.videoStartOffset||0)>i&&Le("videoStartOffset",i)}},{immediate:!0}),Te(()=>s.options.musicFile,(u,a)=>{if(u&&Ca(u,"audio"),a!==void 0&&u!==a)Le("audioStartOffset",0);else{const i=tt.value;(s.options.audioStartOffset||0)>i&&Le("audioStartOffset",i)}},{immediate:!0});const Ke=_(!1),ea=_(null),ta=_(null);async function Aa(){try{const u=await $fetch("/api/media");u?.videos?.length&&(qt.value=u.videos),u?.audio?.length&&(Yt.value=u.audio),u?.durations&&(Ve.value={...Ve.value,...u.durations})}catch(u){console.error("Failed to fetch media list:",u)}}_a(()=>{try{const u=localStorage.getItem("sg_selected_language");u&&(K.value=u)}catch{}Aa(),ye(),Qe()}),Te(K,u=>{try{localStorage.setItem("sg_selected_language",u)}catch{}});async function Oa(u,a){const i=u.target,h=i.files?.[0];if(h){Ke.value=!0;try{const N=new FormData;N.append("file",h);const Q=await $fetch("/api/upload-media",{method:"POST",body:N});Q?.success&&(await Aa(),Q.type==="video"?l("update:options",{...s.options,backgroundSource:Q.filename,videoStartOffset:0}):l("update:options",{...s.options,musicFile:Q.filename,audioStartOffset:0}))}catch(N){alert("Upload gagal: "+(N.data?.statusMessage||N.message))}finally{Ke.value=!1,i.value=""}}}const he=re(()=>{const u=(d.value||"table").trim().toLowerCase();return W.value.find(a=>a.id.toLowerCase()===u||a.layoutType&&a.layoutType.toLowerCase()===u)||W.value[0]}),ve=re(()=>{const u=r.value.trim();if(!u)return null;try{return JSON.parse(u)}catch{return null}}),q=re(()=>{if(!r.value.trim()||!ve.value)return null;const u=(ve.value.templateId||ve.value.layoutType||(W.value.some(N=>N.id===ve.value?.id)?ve.value?.id:"")||"").trim().toLowerCase();if(!u)return null;const a=(d.value||"").trim().toLowerCase(),i=(he.value?.layoutType||"").trim().toLowerCase();if(u===a||u===i)return null;const h=W.value.find(N=>N.id.toLowerCase()===u||N.layoutType&&N.layoutType.toLowerCase()===u);return{jsonTemplateId:ve.value.templateId||ve.value.layoutType||ve.value.id,matchedTarget:h||null,isKnown:!!h}}),Je=re(()=>{if(!r.value.trim()){const u=he.value?.sampleData?JSON.parse(JSON.stringify(he.value.sampleData)):{},a=he.value?.id||"table",i=he.value?.layoutType==="custom"?a:he.value?.layoutType||a;return{...u,id:u.id||a,templateId:a,layoutType:i,customHtml:he.value?.customHtml||void 0,customCss:he.value?.customCss||void 0}}if(ve.value){const u=he.value?.id||ve.value.templateId||"table",a=he.value?.layoutType==="custom"?u:he.value?.layoutType||u;return{...ve.value,templateId:u,layoutType:a,customHtml:he.value?.customHtml||ve.value.customHtml||void 0,customCss:he.value?.customCss||ve.value.customCss||void 0}}return s.modelValue});Te(()=>Je.value,u=>{l("update:modelValue",u),u.theme&&u.theme!==s.options.theme&&l("update:options",{...s.options,theme:u.theme})},{immediate:!0,deep:!0}),Te(()=>s.modelValue,u=>{if(!u)return;const a=JSON.stringify(Je.value),i=JSON.stringify(u);if(a!==i){const h=u.templateId||u.layoutType;if(h){const N=W.value.find(Q=>Q.id.toLowerCase()===h.toLowerCase()||Q.layoutType&&Q.layoutType.toLowerCase()===h.toLowerCase());N&&(d.value=N.id)}r.value=JSON.stringify(u,null,2)}},{deep:!0}),Te(()=>s.unsavedStash,(u,a)=>{a&&!u&&($.value="editor")});function Ia(u){const a=u.target;if(r.value=a.value,!a.value.trim()){c.value="";return}try{const i=JSON.parse(a.value);if(c.value="",x.value){const h=(i.templateId||i.layoutType||(W.value.some(N=>N.id===i.id)?i.id:"")||"").trim().toLowerCase();if(h){const N=W.value.find(Q=>Q.id.toLowerCase()===h||Q.layoutType&&Q.layoutType.toLowerCase()===h);N?N.id.toLowerCase()!==d.value.toLowerCase()?(d.value=N.id,l("toast",`✓ JSON terdeteksi: Otomatis beralih ke template ${N.name}`,"success")):l("toast",`✓ JSON cocok dengan template ${N.name}`,"success"):l("toast",`⚠️ Format JSON: Template ID "${h}" tidak terdaftar di sistem`,"error")}else l("toast",`JSON valid dimasukkan untuk template ${he.value?.name}`,"success")}}catch(i){c.value="Format JSON tidak valid: "+i.message}}function aa(){r.value="",c.value="",l("toast",`Format direset ke sampel template ${he.value?.name||""}`,"success")}function sa(){r.value="",c.value="",l("toast",`Format disesuaikan ke data sampel ${he.value?.name||""}`,"success")}function Na(){if(r.value.trim())try{const u=JSON.parse(r.value);r.value=JSON.stringify(u,null,2),c.value="",l("toast","JSON berhasil dirapikan","success")}catch{c.value="Format JSON tidak valid, periksa kembali kurung/tanda petik"}}function lt(u){d.value=u;const a=W.value.find(h=>h.id===u),i=a?.name||u;if(r.value.trim()&&ve.value){const h=(ve.value.templateId||ve.value.layoutType||(W.value.some(ke=>ke.id===ve.value?.id)?ve.value?.id:"")||"").trim().toLowerCase(),N=u.trim().toLowerCase(),Q=(a?.layoutType||"").trim().toLowerCase();h&&h!==N&&h!==Q?l("toast",`Beralih ke template ${i}. Format JSON berbeda, klik 'Pakai Sampel' untuk menyesuaikan.`,"info"):l("toast",`Template diubah ke ${i}`,"success")}else l("toast",`Template diubah ke ${i}`,"success")}function Ma(u){try{const a=r.value.trim()?JSON.parse(r.value):{...Je.value};a.title=u,r.value=JSON.stringify(a,null,2)}catch{}}function $a(u){try{const a=r.value.trim()?JSON.parse(r.value):{...Je.value};a.watermark=u,r.value=JSON.stringify(a,null,2)}catch{}}function ws(u){try{const a=r.value.trim()?JSON.parse(r.value):{...Je.value};a.subtitle=u,r.value=JSON.stringify(a,null,2)}catch{}}function _s(u){try{const a=r.value.trim()?JSON.parse(r.value):{...Je.value};a.footerNote=u,r.value=JSON.stringify(a,null,2)}catch{}}function Ss(u){try{const a=r.value.trim()?JSON.parse(r.value):{...Je.value};a.caption=u,r.value=JSON.stringify(a,null,2)}catch{}}const Oe=_("content"),vt=_(!1),ja=[{id:"custom-palette",name:"🎨 Kustom",color:"#8b5cf6"},{id:"blue-tech",name:"Blue Tech",color:"#0284c7"},{id:"emerald-finance",name:"Emerald Finance",color:"#059669"},{id:"slate-education",name:"Slate Education",color:"#64748b"},{id:"dark-contrast",name:"Dark Contrast",color:"#1e293b"},{id:"crimson-alert",name:"Crimson Alert",color:"#e11d48"},{id:"amber-gold",name:"Amber Gold",color:"#d97706"},{id:"cyber-violet",name:"Cyber Violet",color:"#7c3aed"},{id:"sunset-orange",name:"Sunset Orange",color:"#ea580c"},{id:"nordic-frost",name:"Nordic Frost",color:"#0891b2"},{id:"monochrome-luxe",name:"Monochrome Luxe",color:"#475569"}],Da={"blue-tech":"#0284c7","emerald-finance":"#059669","slate-education":"#64748b","dark-contrast":"#1e293b","crimson-alert":"#e11d48","amber-gold":"#d97706","cyber-violet":"#7c3aed","sunset-orange":"#ea580c","nordic-frost":"#0891b2","monochrome-luxe":"#475569","custom-palette":"#8b5cf6"},Ts={"blue-tech":{primary:"#38bdf8",secondary:"#818cf8",surface:"#0f172a",bg:"#020617"},"emerald-finance":{primary:"#10b981",secondary:"#34d399",surface:"#064e3b",bg:"#022c22"},"slate-education":{primary:"#60a5fa",secondary:"#a78bfa",surface:"#1e1b4b",bg:"#0f172a"},"dark-contrast":{primary:"#f8fafc",secondary:"#94a3b8",surface:"#18181b",bg:"#09090b"},"crimson-alert":{primary:"#f43f5e",secondary:"#fb7185",surface:"#4c0519",bg:"#1c0309"},"amber-gold":{primary:"#f59e0b",secondary:"#fbbf24",surface:"#451a03",bg:"#1a0802"},"cyber-violet":{primary:"#a855f7",secondary:"#ec4899",surface:"#3b0764",bg:"#18022a"},"sunset-orange":{primary:"#f97316",secondary:"#fb923c",surface:"#431407",bg:"#1c0602"},"nordic-frost":{primary:"#06b6d4",secondary:"#38bdf8",surface:"#083344",bg:"#031926"},"monochrome-luxe":{primary:"#e2e8f0",secondary:"#cbd5e1",surface:"#27272a",bg:"#18181b"}},it=_(!1),R=Ls({primary:"#8b5cf6",secondary:"#ec4899",surface:"#1e1145",bg:"#0c061d"});function Cs(u){let a=u.replace("#","").trim();a.length===3&&(a=a.split("").map(h=>h+h).join(""));const i=parseInt(a,16);return{r:i>>16&255,g:i>>8&255,b:i&255}}function As(u,a,i){u/=255,a/=255,i/=255;const h=Math.max(u,a,i),N=Math.min(u,a,i);let Q=0,ke=0,De=(h+N)/2;if(h!==N){const Ie=h-N;switch(ke=De>.5?Ie/(2-h-N):Ie/(h+N),h){case u:Q=((a-i)/Ie+(a<i?6:0))/6;break;case a:Q=((i-u)/Ie+2)/6;break;case i:Q=((u-a)/Ie+4)/6;break}}return{h:Math.round(Q*360),s:Math.round(ke*100),l:Math.round(De*100)}}function na(u,a,i){u=(u%360+360)%360,a=Math.max(0,Math.min(100,a))/100,i=Math.max(0,Math.min(100,i))/100;const h=(1-Math.abs(2*i-1))*a,N=h*(1-Math.abs(u/60%2-1)),Q=i-h/2;let ke=0,De=0,Ie=0;0<=u&&u<60?(ke=h,De=N,Ie=0):60<=u&&u<120?(ke=N,De=h,Ie=0):120<=u&&u<180?(ke=0,De=h,Ie=N):180<=u&&u<240?(ke=0,De=N,Ie=h):240<=u&&u<300?(ke=N,De=0,Ie=h):300<=u&&u<360&&(ke=h,De=0,Ie=N);const kt=ra=>Math.round((ra+Q)*255).toString(16).padStart(2,"0");return`#${kt(ke)}${kt(De)}${kt(Ie)}`}function Ea(u){const a=u||R.primary||"#8b5cf6";try{const{r:i,g:h,b:N}=Cs(a),{h:Q,s:ke,l:De}=As(i,h,N),Ie=na((Q+35)%360,Math.max(ke,70),Math.max(De,55)),kt=na(Q,Math.min(ke,35),12),ra=na(Q,Math.min(ke,25),6);R.primary=a,R.secondary=Ie,R.surface=kt,R.bg=ra}catch(i){console.error("Auto-harmony calculation error:",i)}}function Ra(){const u=s.modelValue?.palette;if(u&&u.primary)R.primary=u.primary,R.secondary=u.secondary||"#38bdf8",R.surface=u.surface||"#0f172a",R.bg=u.bg||"#020617";else{const a=Ns.value||"#8b5cf6";Ea(a)}it.value=!0}function Os(){const u={primary:R.primary,secondary:R.secondary,surface:R.surface,bg:R.bg};try{const a=r.value.trim()?JSON.parse(r.value):{...Je.value};a.theme="custom-palette",a.accentColor=u.primary,a.palette=u,r.value=JSON.stringify(a,null,2);const i={...s.modelValue,...a,theme:"custom-palette",accentColor:u.primary,palette:u};l("update:modelValue",i)}catch{}l("update:options",{...s.options,theme:"custom-palette",accentColor:u.primary,palette:u}),it.value=!1}function Is(u){R.primary=u.primary,R.secondary=u.secondary,R.surface=u.surface,R.bg=u.bg}const Ns=re(()=>{if(s.modelValue?.palette?.primary)return s.modelValue.palette.primary;if(s.modelValue?.accentColor)return s.modelValue.accentColor;const u=s.modelValue?.theme||s.options?.theme||"blue-tech";return Da[u]||(u.startsWith("#")?u:"#0284c7")});function Ms(u,a){const i=(a||u||"").toLowerCase();return i.includes("orange")||i.includes("news")?"📰":i.includes("edu")||i.includes("infografis")?"📜":i.includes("breaking")||i.includes("alert")?"🚨":i.includes("stat")?"🎯":i.includes("table")||i.includes("matrix")?"📊":i.includes("versus")||i.includes("debate")?"⚔️":i.includes("receipt")?"🧾":i.includes("tierlist")?"🎖️":i.includes("leaderboard")||i.includes("list")?"🏆":i.includes("quote")?"💬":i.includes("timeline")?"⏳":i.includes("barchart")?"📈":"🎨"}function Pa(u){if(u==="custom-palette"){Ra();return}const a=Da[u]||"#0284c7",i=Ts[u]||{primary:a,secondary:"#38bdf8",surface:"#0f172a",bg:"#020617"};try{const h=r.value.trim()?JSON.parse(r.value):{...Je.value};h.theme=u,h.accentColor=a,h.palette=i,r.value=JSON.stringify(h,null,2);const N={...s.modelValue,...h,theme:u,accentColor:a,palette:i};l("update:modelValue",N)}catch{}l("update:options",{...s.options,theme:u,accentColor:a,palette:i})}const Va=[{id:"custom-palette",name:"🎨 Kustom (Palette Manager)",bgClass:"bg-gradient-to-tr from-violet-600 via-fuchsia-600 to-amber-500 border-violet-400"},{id:"dark-contrast",name:"Dark Contrast (Universal Bold)",bgClass:"bg-slate-950 border-slate-700"},{id:"blue-tech",name:"Blue Tech (AI & Software)",bgClass:"bg-blue-900 border-blue-600"},{id:"emerald-finance",name:"Emerald Finance (Salaries & Living)",bgClass:"bg-emerald-900 border-emerald-600"},{id:"amber-gold",name:"Amber Gold (Luxury & Executive)",bgClass:"bg-amber-900 border-amber-600"},{id:"slate-education",name:"Slate Education (Education & Career)",bgClass:"bg-indigo-900 border-indigo-600"},{id:"crimson-alert",name:"Crimson Alert (Breaking Shock)",bgClass:"bg-rose-900 border-rose-600"},{id:"cyber-violet",name:"Cyber Violet (Synthwave & Neon)",bgClass:"bg-purple-900 border-purple-600"},{id:"sunset-orange",name:"Sunset Orange (Warm Energy)",bgClass:"bg-orange-900 border-orange-600"},{id:"nordic-frost",name:"Nordic Frost (Polar Cyan Clean)",bgClass:"bg-cyan-900 border-cyan-600"},{id:"monochrome-luxe",name:"Monochrome Luxe (Minimalist)",bgClass:"bg-zinc-800 border-zinc-500"}],$s=re(()=>W.value.find(a=>a.id===d.value)?.name||d.value||"Custom"),It=_(!0),js=re(()=>W.value.find(u=>u.id===d.value)),oa=re(()=>Fs(s.modelValue.layoutType,js.value||s.modelValue)),Ds=re(()=>{const u=s.modelValue.fontSizes;return!u||Object.keys(u).length===0?!1:oa.value.some(a=>u[a.id]!==void 0&&u[a.id]!==a.default)});function la(u,a){return s.modelValue.fontSizes?.[u]??a}function La(u,a){const i={...s.modelValue.fontSizes||{}};i[u]=a,l("update:modelValue",{...s.modelValue,fontSizes:i})}function Ba(u,a,i,h,N){const Q=la(u,N),ke=Math.min(h,Math.max(i,Q+a));La(u,ke)}function Es(){const u={...s.modelValue};delete u.fontSizes,l("update:modelValue",u)}function Ua(u){const a={...s.modelValue,reelsDuration:u};l("update:modelValue",a)}function Le(u,a){l("update:options",{...s.options,[u]:a})}function rt(u,a){const i=s.options.outputs||{feed:!0,story:!0,reels:!0};l("update:options",{...s.options,outputs:{...i,[u]:a}})}function Fa(u,a){l("autoTopic",Y.value,C.value||void 0,w.value,K.value)}async function ia(){b.value=!0,Ta.value=!0;try{const u=await $fetch("/api/copy-prompt",{query:{niche:Y.value,layout:s.modelValue.layoutType||"table",language:K.value}});Se.value=u.prompt,fe.value={topic:u.topic,pair:u.pair,niche:u.niche,template:u.template,usedCount:u.usedCount,language:u.language||K.value}}catch(u){console.error("Failed to get manual prompt:",u)}finally{Ta.value=!1}}async function Rs(){if(!Se.value)return;await _t(Se.value)&&(Ot.value=!0,setTimeout(()=>{Ot.value=!1},2500))}const Nt=_(!1),Mt=_(!1);async function Ps(){Nt.value=!0;try{const u=await $fetch("/api/copy-prompt",{query:{niche:Y.value,layout:s.modelValue.layoutType||"table",language:K.value}});Se.value=u.prompt,fe.value={topic:u.topic,pair:u.pair,niche:u.niche,template:u.template,usedCount:u.usedCount,language:u.language||K.value},await _t(u.prompt)&&(Mt.value=!0,setTimeout(()=>{Mt.value=!1},2500))}catch(u){console.error("Failed to copy topic prompt:",u)}finally{Nt.value=!1}}function Ha(){s.history.length!==0&&confirm(`Bersihkan semua ${s.history.length} riwayat generate otomatis?`)&&l("clearAllHistory")}function Ja(u){if(!u)return"";try{return new Date(u).toLocaleDateString("id-ID",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}catch{return""}}return(u,a)=>(p(),f("div",pn,[n(U)?(p(),f("div",fn,[e("div",mn,[e("div",xn,[e("div",null,[e("h3",hn,[y(n(Ya),{class:"w-4 h-4 text-sky-400"}),a[94]||(a[94]=z(" Kelola & Buat Niche Baru ",-1))]),a[95]||(a[95]=e("p",{class:"text-[11px] text-slate-400 mt-0.5"}," Simpan niche favoritmu. AI dan Prompt Generator akan otomatis menggunakannya. ",-1))]),e("button",{onClick:a[0]||(a[0]=i=>U.value=!1),class:"p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800"},[y(n(Rt),{class:"w-4 h-4"})])]),e("div",bn,[e("div",gn,[e("span",null,m(n(D)?"✏️ Edit Niche":"➕ Tambah Niche Baru"),1),n(D)?(p(),f("button",{key:0,onClick:a[1]||(a[1]=i=>{D.value=null,H.value={id:"",name:"",theme:"blue-tech",description:""}}),class:"text-[10px] text-slate-400 hover:text-white"}," Batal Edit ")):M("",!0)]),e("div",yn,[e("div",null,[a[96]||(a[96]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Nama Niche",-1)),X(e("input",{"onUpdate:modelValue":a[2]||(a[2]=i=>n(H).name=i),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"},null,512),[[ce,n(H).name]])]),e("div",null,[a[98]||(a[98]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Tema Default",-1)),X(e("select",{"onUpdate:modelValue":a[3]||(a[3]=i=>n(H).theme=i),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"},[...a[97]||(a[97]=[$t('<option value="blue-tech">🔵 Blue Tech</option><option value="emerald-finance">🟢 Emerald Finance</option><option value="slate-education">🟣 Slate Education</option><option value="dark-contrast">⚫ Dark Contrast</option><option value="crimson-alert">🔴 Crimson Alert</option><option value="amber-gold">🟡 Amber Gold</option><option value="cyber-violet">🟪 Cyber Violet</option><option value="sunset-orange">🟠 Sunset Orange</option><option value="nordic-frost">❄️ Nordic Frost</option><option value="monochrome-luxe">⚪ Monochrome Luxe</option>',10)])],512),[[dt,n(H).theme]])])]),e("div",null,[a[99]||(a[99]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Fokus Topik & Instruksi Prompt",-1)),X(e("textarea",{"onUpdate:modelValue":a[4]||(a[4]=i=>n(H).description=i),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"},null,512),[[ce,n(H).description]])]),e("button",{onClick:_e,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"},[y(n(at),{class:"w-3.5 h-3.5"}),e("span",null,m(n(D)?"Perbarui Niche":"Simpan Niche"),1)])]),e("div",vn,[e("div",kn," Daftar Niche Tersimpan ("+m(n(ge).length)+") ",1),e("div",wn,[(p(!0),f(de,null,me(n(ge),i=>(p(),f("div",{key:i.id,class:"p-2.5 rounded-xl border bg-slate-950 border-slate-800 flex items-start justify-between gap-2"},[e("div",_n,[e("div",Sn,[e("span",Tn,m(i.name),1),e("span",Cn,m(i.theme||"blue-tech"),1)]),e("p",An,m(i.description),1)]),e("div",On,[e("button",{onClick:h=>Pe(i),class:"p-1.5 rounded-lg text-slate-400 hover:text-sky-300 hover:bg-slate-800 transition",title:"Edit Niche"},[y(n(Dt),{class:"w-3.5 h-3.5"})],8,In),e("button",{onClick:h=>te(i.id),class:"p-1.5 rounded-lg text-slate-400 hover:text-rose-400 hover:bg-slate-800 transition",title:"Hapus Niche"},[y(n(ct),{class:"w-3.5 h-3.5"})],8,Nn)])]))),128))])])])])):M("",!0),n(b)?(p(),f("div",Mn,[e("div",$n,[e("div",jn,[e("div",null,[e("h3",Dn,[y(n(pa),{class:"w-4 h-4 text-purple-400"}),a[100]||(a[100]=z(" Master Prompt AI (Dynamic Research & Zero-Collision) ",-1))]),a[101]||(a[101]=e("p",{class:"text-[11px] text-slate-400 mt-0.5"}," Salin prompt ini ke ChatGPT / Gemini / Claude / DeepSeek untuk mencari topik terbaru. ",-1))]),e("button",{onClick:a[5]||(a[5]=i=>b.value=!1),class:"p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800"},[y(n(Rt),{class:"w-4 h-4"})])]),e("div",En,[a[102]||(a[102]=e("span",{class:"font-bold text-sky-400"},"Niche Aktif:",-1)),e("span",Rn,m(n(ge).find(i=>i.id===n(Y))?.name||"Default"),1),a[103]||(a[103]=e("span",{class:"text-slate-500"},"•",-1)),a[104]||(a[104]=e("span",{class:"font-bold text-amber-400"},"Template:",-1)),e("span",Pn,m(n(fe).template||"Otomatis"),1),a[105]||(a[105]=e("span",{class:"text-slate-500"},"•",-1)),a[106]||(a[106]=e("span",{class:"font-bold text-emerald-400"},"Bahasa:",-1)),e("span",Vn,m(n(fe).language||"Bahasa Indonesia 🇮🇩"),1),a[107]||(a[107]=e("span",{class:"text-slate-500"},"•",-1)),e("span",Ln,m(n(fe).usedCount||0)+" Topik Riwayat Dikecualikan",1)]),e("div",Bn,[e("textarea",{value:n(Se),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"},null,8,Un)]),e("div",Fn,[a[108]||(a[108]=e("span",{class:"text-[11px] text-slate-400"},[z(" Paste hasil JSON yang kamu buat ke kolom "),e("b",null,"RAW JSON"),z(" SocialGen. ")],-1)),e("button",{onClick:Rs,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"},[n(Ot)?(p(),Me(n(at),{key:0,class:"w-4 h-4 text-emerald-400"})):(p(),Me(n(We),{key:1,class:"w-4 h-4"})),e("span",null,m(n(Ot)?"Prompt Berhasil Disalin!":"Copy Master Prompt"),1)])])])])):M("",!0),n(it)?(p(),f("div",{key:2,onClick:a[17]||(a[17]=ut(i=>it.value=!1,["self"])),class:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"},[e("div",Hn,[e("div",Jn,[a[109]||(a[109]=e("div",null,[e("h3",{class:"text-base font-black text-white flex items-center gap-2"},[e("span",{class:"text-lg"},"🎨"),z(" Palette Manager & Custom Colors ")]),e("p",{class:"text-[11px] text-slate-400 mt-0.5"}," Kelola paduan warna utama, kontras sekunder, permukaan kartu, dan atmosfer kanvas. ")],-1)),e("button",{onClick:a[6]||(a[6]=i=>it.value=!1),class:"text-slate-400 hover:text-white p-1 rounded-lg hover:bg-slate-800 transition"},[y(n(Rt),{class:"w-5 h-5"})])]),e("div",zn,[e("div",Zn,[a[110]||(a[110]=e("div",{class:"flex items-center justify-between"},[e("span",{class:"text-[10px] font-black uppercase text-slate-400"},"1. Warna Utama (Primary)"),e("span",{class:"text-[9px] text-sky-400 font-bold"},"Subtitle & Badge")],-1)),e("div",Gn,[e("label",{class:"relative flex items-center justify-center w-10 h-10 rounded-xl border-2 border-slate-700 hover:border-sky-400 cursor-pointer shadow-md transition overflow-hidden shrink-0",style:Ne({backgroundColor:n(R).primary}),title:"Pilih Warna Utama"},[X(e("input",{type:"color","onUpdate:modelValue":a[7]||(a[7]=i=>n(R).primary=i),class:"absolute inset-0 opacity-0 w-full h-full cursor-pointer"},null,512),[[ce,n(R).primary]])],4),X(e("input",{type:"text","onUpdate:modelValue":a[8]||(a[8]=i=>n(R).primary=i),class:"w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 font-mono text-xs text-white font-bold focus:outline-none focus:border-sky-500 uppercase",placeholder:"#8B5CF6",maxlength:"7"},null,512),[[ce,n(R).primary]])])]),e("div",Kn,[a[111]||(a[111]=e("div",{class:"flex items-center justify-between"},[e("span",{class:"text-[10px] font-black uppercase text-slate-400"},"2. Warna Sekunder (Kontras)"),e("span",{class:"text-[9px] text-fuchsia-400 font-bold"},"Kolom Kanan / VS")],-1)),e("div",Wn,[e("label",{class:"relative flex items-center justify-center w-10 h-10 rounded-xl border-2 border-slate-700 hover:border-sky-400 cursor-pointer shadow-md transition overflow-hidden shrink-0",style:Ne({backgroundColor:n(R).secondary}),title:"Pilih Warna Sekunder"},[X(e("input",{type:"color","onUpdate:modelValue":a[9]||(a[9]=i=>n(R).secondary=i),class:"absolute inset-0 opacity-0 w-full h-full cursor-pointer"},null,512),[[ce,n(R).secondary]])],4),X(e("input",{type:"text","onUpdate:modelValue":a[10]||(a[10]=i=>n(R).secondary=i),class:"w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 font-mono text-xs text-white font-bold focus:outline-none focus:border-sky-500 uppercase",placeholder:"#EC4899",maxlength:"7"},null,512),[[ce,n(R).secondary]])])]),e("div",qn,[a[112]||(a[112]=e("div",{class:"flex items-center justify-between"},[e("span",{class:"text-[10px] font-black uppercase text-slate-400"},"3. Kartu (Surface Tint)"),e("span",{class:"text-[9px] text-indigo-400 font-bold"},"Latar Kotak")],-1)),e("div",Yn,[e("label",{class:"relative flex items-center justify-center w-10 h-10 rounded-xl border-2 border-slate-700 hover:border-sky-400 cursor-pointer shadow-md transition overflow-hidden shrink-0",style:Ne({backgroundColor:n(R).surface}),title:"Pilih Warna Kartu"},[X(e("input",{type:"color","onUpdate:modelValue":a[11]||(a[11]=i=>n(R).surface=i),class:"absolute inset-0 opacity-0 w-full h-full cursor-pointer"},null,512),[[ce,n(R).surface]])],4),X(e("input",{type:"text","onUpdate:modelValue":a[12]||(a[12]=i=>n(R).surface=i),class:"w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 font-mono text-xs text-white font-bold focus:outline-none focus:border-sky-500 uppercase",placeholder:"#1E1145",maxlength:"7"},null,512),[[ce,n(R).surface]])])]),e("div",Xn,[a[113]||(a[113]=e("div",{class:"flex items-center justify-between"},[e("span",{class:"text-[10px] font-black uppercase text-slate-400"},"4. Atmosfer Kanvas (Bg)"),e("span",{class:"text-[9px] text-slate-400 font-bold"},"Gradasi Gelap")],-1)),e("div",Qn,[e("label",{class:"relative flex items-center justify-center w-10 h-10 rounded-xl border-2 border-slate-700 hover:border-sky-400 cursor-pointer shadow-md transition overflow-hidden shrink-0",style:Ne({backgroundColor:n(R).bg}),title:"Pilih Warna Latar Kanvas"},[X(e("input",{type:"color","onUpdate:modelValue":a[13]||(a[13]=i=>n(R).bg=i),class:"absolute inset-0 opacity-0 w-full h-full cursor-pointer"},null,512),[[ce,n(R).bg]])],4),X(e("input",{type:"text","onUpdate:modelValue":a[14]||(a[14]=i=>n(R).bg=i),class:"w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 font-mono text-xs text-white font-bold focus:outline-none focus:border-sky-500 uppercase",placeholder:"#0C061D",maxlength:"7"},null,512),[[ce,n(R).bg]])])])]),e("button",{onClick:a[15]||(a[15]=i=>Ea(n(R).primary)),type:"button",class:"w-full py-2 px-3 rounded-2xl bg-gradient-to-r from-violet-600/30 via-fuchsia-600/30 to-amber-500/30 border border-violet-500/40 hover:border-violet-400 text-violet-200 font-bold text-xs flex items-center justify-center gap-2 transition hover:scale-[1.01] active:scale-[0.99] shadow-md"},[...a[114]||(a[114]=[e("span",null,"⚡ Auto-Harmonize dari Warna Utama",-1)])]),e("div",eo,[a[115]||(a[115]=e("span",{class:"text-[10px] font-black uppercase tracking-wider text-slate-400"},"Inspirasi Komposisi Warna:",-1)),e("div",to,[(p(),f(de,null,me([{name:"Cyber Neon",primary:"#00f5d4",secondary:"#f72585",surface:"#131127",bg:"#080711"},{name:"Royal Gold",primary:"#fbbf24",secondary:"#38bdf8",surface:"#20180a",bg:"#0a0803"},{name:"Synthwave",primary:"#c084fc",secondary:"#f43f5e",surface:"#1e1145",bg:"#0b051b"},{name:"Emerald Luxe",primary:"#10b981",secondary:"#fbbf24",surface:"#052e25",bg:"#021410"},{name:"Crimson Shock",primary:"#f43f5e",secondary:"#fb923c",surface:"#300713",bg:"#130206"}],i=>e("button",{key:i.name,onClick:h=>Is(i),type:"button",class:"px-2.5 py-1.5 rounded-xl border border-slate-800 hover:border-slate-600 bg-slate-950 flex items-center gap-2 text-[11px] font-semibold text-slate-300 transition hover:bg-slate-800"},[e("div",so,[e("span",{class:"w-3 h-3 rounded-full border border-black/40",style:Ne({backgroundColor:i.primary})},null,4),e("span",{class:"w-3 h-3 rounded-full border border-black/40",style:Ne({backgroundColor:i.secondary})},null,4),e("span",{class:"w-3 h-3 rounded-full border border-black/40",style:Ne({backgroundColor:i.surface})},null,4)]),e("span",null,m(i.name),1)],8,ao)),64))])]),e("div",{class:"p-3.5 rounded-2xl border transition shadow-inner relative overflow-hidden",style:Ne({background:`radial-gradient(circle at 50% 20%, ${n(R).surface} 0%, ${n(R).bg} 100%)`,borderColor:`${n(R).primary}44`})},[e("div",no,[e("span",{class:"text-[9px] font-black uppercase px-2 py-0.5 rounded-full border",style:Ne({backgroundColor:`${n(R).primary}22`,borderColor:`${n(R).primary}66`,color:n(R).primary})}," PREVIEW PALETTE ",4),e("span",{class:"text-[9px] font-bold",style:Ne({color:n(R).secondary})}," KOLOM KANAN ★ ",4)]),e("div",{class:"p-2.5 rounded-xl border",style:Ne({backgroundColor:`${n(R).surface}ee`,borderColor:`${n(R).primary}55`})},[a[116]||(a[116]=e("h4",{class:"text-xs font-black text-white"},"Pratinjau Judul Konten",-1)),e("p",{class:"text-[10px] font-bold mt-0.5",style:Ne({color:n(R).primary})}," Subjudul mengikuti Warna Utama ",4)],4)],4),e("div",oo,[e("button",{onClick:a[16]||(a[16]=i=>it.value=!1),type:"button",class:"px-4 py-2 rounded-xl text-slate-400 hover:text-white font-bold text-xs hover:bg-slate-800 transition"}," Batal "),e("button",{onClick:Os,type:"button",class:"px-5 py-2.5 rounded-xl bg-gradient-to-r from-sky-500 via-indigo-600 to-purple-600 hover:from-sky-400 hover:to-indigo-500 text-white font-black text-xs shadow-lg transition hover:scale-[1.02] active:scale-[0.98]"}," Terapkan Palette Ini ")])])])):M("",!0),n(Ce)?(p(),f("div",{key:3,onClick:ut(Re,["self"]),class:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"},[e("div",lo,[e("div",io,[e("div",null,[e("h3",ro,[y(n(Ka),{class:"w-4 h-4 text-sky-400"}),a[117]||(a[117]=z(" Kelola Template Visual (Dynamic Template System) ",-1))]),a[118]||(a[118]=e("p",{class:"text-[11px] text-slate-400 mt-0.5"}," Buat format baru, edit sampel tampilan, dan atur prompt AI spesifik per template. ",-1))]),e("button",{onClick:Re,class:"p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800"},[y(n(Rt),{class:"w-4 h-4"})])]),e("div",uo,[e("div",co,[e("button",{onClick:se,class:E(["px-3 py-1 rounded-lg transition font-bold text-xs",n(ue)==="list"?"bg-slate-800 text-sky-400 shadow":"text-slate-400 hover:text-white"])}," Daftar Template ("+m(n(W).length)+") ",3),e("button",{onClick:g,class:E(["px-3 py-1 rounded-lg transition font-bold text-xs flex items-center gap-1",n(ue)==="form"&&!n(ae)?"bg-slate-800 text-emerald-400 shadow":"text-slate-400 hover:text-white"])},[y(n(wt),{class:"w-3.5 h-3.5"}),a[119]||(a[119]=e("span",null,"Buat Template Baru",-1))],2),n(ae)&&n(ue)==="form"?(p(),f("span",po,[y(n(Dt),{class:"w-3 h-3"}),a[120]||(a[120]=e("span",null,"Sedang Edit Template",-1))])):M("",!0)]),n(ue)==="list"?X((p(),f("input",{key:0,"onUpdate:modelValue":a[18]||(a[18]=i=>Be(oe)?oe.value=i:null),type:"text",placeholder:"Cari template...",class:"bg-slate-900 border border-slate-800 rounded-lg px-2 py-0.5 text-[11px] text-white focus:outline-none focus:border-sky-500 w-36"},null,512)),[[ce,n(oe)]]):M("",!0)]),n(ue)==="list"?(p(),f("div",fo,[n(T).length===0?(p(),f("div",mo,' Tidak ada template yang cocok dengan pencarian "'+m(n(oe))+'". ',1)):M("",!0),(p(!0),f(de,null,me(n(T),i=>(p(),f("div",{key:i.id,class:"p-3 rounded-2xl border bg-slate-950 border-slate-800/80 hover:border-slate-700 transition flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 group"},[e("div",xo,[e("div",ho,[e("span",bo,m(i.name),1),e("span",go,m(i.category),1),e("span",{class:E(["px-1.5 py-0.2 rounded text-[8px] font-bold uppercase tracking-wider",i.isBuiltin?"bg-slate-800 text-slate-400 border border-slate-700":"bg-purple-950 text-purple-300 border border-purple-800"])},m(i.isBuiltin?"Bawaan":"⭐ Kustom"),3),e("span",yo," layout: "+m(i.layoutType),1)]),e("p",vo,m(i.description||"Tidak ada deskripsi."),1)]),e("div",ko,[e("button",{onClick:h=>Wt(i),class:"px-2.5 py-1 rounded-xl bg-sky-600/20 hover:bg-sky-600/40 text-sky-300 border border-sky-500/40 font-bold text-[10px] transition flex items-center gap-1",title:"Pilih dan gunakan format template ini"},[y(n(at),{class:"w-3 h-3"}),a[121]||(a[121]=e("span",null,"Pilih Format",-1))],8,wo),e("button",{onClick:h=>nt(i),class:"p-1.5 rounded-lg text-slate-400 hover:text-sky-300 hover:bg-slate-800 transition",title:"Duplikasi sebagai template kustom baru"},[y(n(We),{class:"w-3.5 h-3.5"})],8,_o),i.isBuiltin?M("",!0):(p(),f("button",{key:0,onClick:h=>Zt(i),class:"p-1.5 rounded-lg text-slate-400 hover:text-amber-300 hover:bg-slate-800 transition",title:"Edit template kustom"},[y(n(Dt),{class:"w-3.5 h-3.5"})],8,So)),i.isBuiltin?M("",!0):(p(),f("button",{key:1,onClick:h=>At(i.id),class:"p-1.5 rounded-lg text-slate-400 hover:text-rose-400 hover:bg-slate-800 transition",title:"Hapus template kustom"},[y(n(ct),{class:"w-3.5 h-3.5"})],8,To))])]))),128))])):(p(),f("div",Co,[n(G)?(p(),f("div",Ao,m(n(G)),1)):M("",!0),n(ae)?(p(),f("div",Oo,[e("div",Io,[e("div",No,[y(n(Dt),{class:"w-4 h-4"})]),e("div",Mo,[e("div",$o,[a[122]||(a[122]=e("span",null,"Sedang Mengedit:",-1)),e("span",jo,m(n(O).name),1)]),e("div",Do,"ID: "+m(n(O).id)+" • Perubahan akan memperbarui template yang tersimpan",1)])]),e("button",{onClick:g,type:"button",class:"px-2.5 py-1 rounded-xl bg-slate-900 hover:bg-slate-800 text-slate-200 border border-slate-700 text-[10px] font-bold transition flex items-center gap-1 shrink-0 ml-2"},[y(n(wt),{class:"w-3 h-3"}),a[123]||(a[123]=e("span",null,"Beralih ke Buat Baru",-1))])])):M("",!0),e("div",Eo,[e("div",Ro,[a[125]||(a[125]=e("div",{class:"flex items-center gap-2"},[e("span",{class:"text-xl"},"🤖"),e("div",null,[e("h4",{class:"text-xs font-black text-white"},"Buat Template Otomatis dari Screenshot / Gambar"),e("p",{class:"text-[10px] text-slate-400"},"Punya referensi gambar desain? Salin prompt AI dan kirim bersama screenshot ke ChatGPT / Claude / Gemini.")])],-1)),e("div",Po,[e("button",{onClick:ot,type:"button",class:E(["px-2.5 py-1.5 rounded-xl text-xs font-bold transition flex items-center gap-1.5 shadow",n(we)?"bg-emerald-600 text-white":"bg-sky-600 hover:bg-sky-500 text-white"])},[y(n(We),{class:"w-3.5 h-3.5"}),e("span",null,m(n(we)?"✓ Prompt Tersalin!":"Salin Prompt Bantuan AI"),1)],2),e("button",{onClick:a[19]||(a[19]=i=>Ae.value=!n(Ae)),type:"button",class:"px-2 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-bold transition flex items-center gap-1",title:n(Ae)?"Sembunyikan teks prompt":"Lihat / salin teks prompt manual di HP"},[e("span",null,m(n(Ae)?"Tutup Teks":"👁️ Lihat Teks Prompt"),1)],8,Vo),e("button",{onClick:a[20]||(a[20]=i=>le.value=!n(le)),type:"button",class:"px-2.5 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-bold transition flex items-center gap-1"},[...a[124]||(a[124]=[e("span",null,"📥 Tempel JSON",-1)])])])]),n(Ae)?(p(),f("div",Lo,[e("div",Bo,[a[126]||(a[126]=e("label",{class:"text-[10px] font-bold text-sky-400"},"Teks Lengkap Prompt Bantuan AI (Bisa ditandai/disalin manual di HP):",-1)),e("button",{onClick:a[21]||(a[21]=i=>Ae.value=!1),class:"text-[10px] text-slate-400 hover:text-white"},"✕ Tutup")]),e("textarea",{value:n(yt),readonly:"",rows:"6",class:"w-full bg-slate-900 border border-slate-700 rounded-lg p-2 text-[11px] text-sky-200 font-mono select-all focus:outline-none focus:border-sky-500 custom-scrollbar"},null,8,Uo)])):M("",!0),n(le)?(p(),f("div",Fo,[a[127]||(a[127]=e("label",{class:"text-[10px] font-bold text-sky-400"},"Tempelkan respon JSON dari AI di sini:",-1)),X(e("textarea",{"onUpdate:modelValue":a[22]||(a[22]=i=>Be(ie)?ie.value=i:null),rows:"4",placeholder:'Tempelkan respon JSON dari AI di sini (contoh: { "name": "...", "layoutType": "custom", "customHtml": "...", "sampleData": {...} })...',class:"w-full bg-slate-900 border border-slate-700 rounded-lg p-2 text-xs text-sky-200 font-mono focus:outline-none focus:border-sky-500"},null,512),[[ce,n(ie)]]),e("div",Ho,[e("button",{onClick:a[23]||(a[23]=i=>le.value=!1),type:"button",class:"px-2.5 py-1 rounded-lg text-[10px] font-bold text-slate-400 hover:text-white"}," Tutup "),e("button",{onClick:Gt,type:"button",class:"px-3 py-1 rounded-lg bg-emerald-600 hover:bg-emerald-500 text-white text-[10px] font-bold shadow"}," Terapkan ke Form Otomatis ")])])):M("",!0)]),e("div",Jo,[e("div",null,[a[128]||(a[128]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"ID Template (Slug Unik)",-1)),X(e("input",{"onUpdate:modelValue":a[24]||(a[24]=i=>n(O).id=i),disabled:!!n(ae),type:"text",placeholder:"misal: tech-radar, crypto-card",class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white focus:outline-none focus:border-sky-500 disabled:opacity-50"},null,8,zo),[[ce,n(O).id]])]),e("div",null,[a[129]||(a[129]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Nama Template",-1)),X(e("input",{"onUpdate:modelValue":a[25]||(a[25]=i=>n(O).name=i),type:"text",placeholder:"misal: ⚡ Tech Radar 2026",class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white focus:outline-none focus:border-sky-500"},null,512),[[ce,n(O).name]])]),e("div",null,[a[130]||(a[130]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Kategori",-1)),X(e("input",{"onUpdate:modelValue":a[26]||(a[26]=i=>n(O).category=i),type:"text",placeholder:"misal: Perbandingan, Peringkat, Finansial",class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white focus:outline-none focus:border-sky-500"},null,512),[[ce,n(O).category]])])]),e("div",Zo,[e("div",null,[a[132]||(a[132]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Base Layout Visual Engine",-1)),e("select",{value:n(O).layoutType,onChange:a[27]||(a[27]=i=>Ge(i.target.value)),class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-sky-300 font-semibold focus:outline-none focus:border-sky-500"},[...a[131]||(a[131]=[$t('<option value="custom">🎨 Custom HTML &amp; CSS (Bebas / Desain Sendiri)</option><option value="table">📊 Comparison Table</option><option value="versus">⚔️ Versus Showdown Arena</option><option value="receipt">🧾 Monthly Living Invoice</option><option value="news">📰 Special Report Pamphlet</option><option value="stat">🎯 Big Shocking Number</option><option value="timeline">⏳ 10-Year Shift (Then vs Now)</option><option value="barchart">📈 Income Allocation Bars</option><option value="list">🏆 Top 5 Ranked List</option><option value="quote">💬 Hot Take / Quote Debate</option><option value="leaderboard">🥇 Multi-Country Leaderboard (Top 10)</option><option value="editorial">📰 Editorial Storytelling Deep Dive</option><option value="matrix">📊 Multi-Column Matrix (3-4 Negara)</option><option value="debate">⚡ Debate Arena (Pro vs Kontra)</option><option value="tierlist">🎖️ Tier List Ranking (S, A, B, C)</option>',15)])],40,Go)]),e("div",null,[a[133]||(a[133]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Deskripsi Ringkas",-1)),X(e("input",{"onUpdate:modelValue":a[28]||(a[28]=i=>n(O).description=i),type:"text",placeholder:"Jelaskan kegunaan format tampilan template ini...",class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white focus:outline-none focus:border-sky-500"},null,512),[[ce,n(O).description]])])]),n(O).layoutType==="custom"?(p(),f("div",Ko,[e("div",Wo,[e("span",qo,[y(n(ua),{class:"w-3.5 h-3.5"}),a[134]||(a[134]=z(" Template Engine HTML & Styling CSS ",-1))]),a[135]||(a[135]=e("span",{class:"text-[10px] text-slate-400 font-mono"},"Gunakan {{ data.title }} & {{#each data.items}}",-1))]),e("div",null,[a[136]||(a[136]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"HTML Template (Tailwind utility classes didukung penuh)",-1)),X(e("textarea",{"onUpdate:modelValue":a[29]||(a[29]=i=>n(O).customHtml=i),rows:"6",placeholder:`<div class="p-6 rounded-2xl bg-slate-900/90 border border-slate-700 text-center">
126
+ <h2 class="text-3xl font-black text-white">{{ data.title }}</h2>
127
+ <p class="text-slate-300">{{ data.subtitle }}</p>
128
+ </div>`,class:"w-full bg-slate-900 border border-slate-800 rounded-xl p-2.5 text-xs text-sky-300 font-mono leading-relaxed focus:outline-none focus:border-sky-500"},null,512),[[ce,n(O).customHtml]])]),e("div",null,[a[137]||(a[137]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Custom CSS (Opsional - animasi, gradien unik, glassmorphism)",-1)),X(e("textarea",{"onUpdate:modelValue":a[30]||(a[30]=i=>n(O).customCss=i),rows:"3",placeholder:".my-custom-card { backdrop-filter: blur(16px); }",class:"w-full bg-slate-900 border border-slate-800 rounded-xl p-2.5 text-xs text-emerald-300 font-mono leading-relaxed focus:outline-none focus:border-emerald-500"},null,512),[[ce,n(O).customCss]])])])):M("",!0),e("div",null,[a[138]||(a[138]=e("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"AI Prompt Directive (Aturan Khusus Generator)",-1)),X(e("textarea",{"onUpdate:modelValue":a[31]||(a[31]=i=>n(O).promptDirective=i),rows:"3",placeholder:"Instruksi spesifik untuk AI Gemini / ChatGPT saat meriset konten dengan template ini...",class:"w-full bg-slate-950 border border-slate-800 rounded-xl p-2.5 text-xs text-slate-200 focus:outline-none focus:border-sky-500 font-mono leading-relaxed"},null,512),[[ce,n(O).promptDirective]])]),e("div",null,[a[139]||(a[139]=e("div",{class:"flex items-center justify-between mb-1"},[e("label",{class:"text-[10px] font-bold text-slate-400"},"Sampel Data JSON (Pristine Default Tampilan)"),e("span",{class:"text-[10px] text-slate-500"},"Akan langsung ditampilkan di Live Preview")],-1)),X(e("textarea",{"onUpdate:modelValue":a[32]||(a[32]=i=>n(O).sampleJsonText=i),rows:"7",class:"w-full bg-slate-950 border border-slate-800 rounded-xl p-2.5 text-xs text-sky-200 focus:outline-none focus:border-sky-500 font-mono leading-relaxed select-all"},null,512),[[ce,n(O).sampleJsonText]])]),e("div",Yo,[e("button",{onClick:se,class:"px-3.5 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-300 font-bold text-xs transition"}," Batal "),e("button",{onClick:Kt,class:"px-5 py-1.5 rounded-xl bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-500 hover:to-teal-500 text-white font-bold text-xs shadow-lg transition flex items-center gap-1.5"},[y(n(at),{class:"w-3.5 h-3.5"}),e("span",null,m(n(ae)?"Perbarui Template":"Simpan Template"),1)])])]))])])):M("",!0),e("div",Xo,[e("div",Qo,[e("div",el,[e("button",{onClick:a[33]||(a[33]=i=>Oe.value="content"),type:"button",class:E(["px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition",n(Oe)==="content"?"bg-sky-500 text-white shadow font-black":"text-slate-400 hover:text-white"])},[...a[140]||(a[140]=[e("span",null,"📝 Konten",-1)])],2),e("button",{onClick:a[34]||(a[34]=i=>Oe.value="design"),type:"button",class:E(["px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition",n(Oe)==="design"?"bg-sky-500 text-white shadow font-black":"text-slate-400 hover:text-white"])},[...a[141]||(a[141]=[e("span",null,"🎨 Template",-1)])],2),e("button",{onClick:a[35]||(a[35]=i=>Oe.value="media"),type:"button",class:E(["px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition",n(Oe)==="media"?"bg-sky-500 text-white shadow font-black":"text-slate-400 hover:text-white"])},[...a[142]||(a[142]=[e("span",null,"🎬 Media",-1)])],2),e("button",{onClick:a[36]||(a[36]=i=>Oe.value="ai"),type:"button",class:E(["px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition",n(Oe)==="ai"?"bg-sky-500 text-white shadow font-black":"text-slate-400 hover:text-white"])},[...a[143]||(a[143]=[e("span",null,"⚡ AI Topic",-1)])],2),e("button",{onClick:a[37]||(a[37]=i=>Oe.value="history"),type:"button",class:E(["px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition",n(Oe)==="history"?"bg-sky-500 text-white shadow font-black":"text-slate-400 hover:text-white"])},[...a[144]||(a[144]=[e("span",null,"💾 Draft",-1)])],2)]),e("button",{onClick:a[38]||(a[38]=i=>vt.value=!0),type:"button",class:"px-2 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-[10px] font-mono font-bold text-sky-300 border border-slate-700 flex items-center gap-0.5 shrink-0 ml-1",title:"Buka RAW JSON Editor"},[...a[145]||(a[145]=[e("span",null,"</> JSON",-1)])])]),n(Oe)==="content"?(p(),f("div",tl,[n(c)||o.validationError||n(q)?(p(),f("div",{key:0,class:E(["p-3.5 rounded-2xl border text-xs shadow-lg space-y-2.5 animate-in fade-in",n(c)||o.validationError?"bg-rose-950/80 border-rose-500/60 text-rose-200":"bg-amber-950/80 border-amber-500/60 text-amber-200"])},[e("div",al,[y(n(Za),{class:E(["w-4 h-4 shrink-0 mt-0.5",n(c)||o.validationError?"text-rose-400":"text-amber-400"])},null,8,["class"]),e("div",sl,[e("div",nl,m(n(c)?"Sintaks JSON Tidak Valid":n(q)?"Perbedaan Format Template":"Data Belum Sesuai Template"),1),e("p",ol,[n(c)?(p(),f("span",ll,m(n(c)),1)):n(q)?(p(),f("span",il,[a[146]||(a[146]=z(" Data JSON saat ini dibuat untuk template ",-1)),e("b",rl,m(n(q).matchedTarget?.name||n(q).jsonTemplateId),1),a[147]||(a[147]=z(", sedangkan template aktif saat ini adalah ",-1)),e("b",dl,m(n(he).name),1),a[148]||(a[148]=z(". ",-1))])):(p(),f("span",ul,m(o.validationError),1))])])]),e("div",cl,[e("button",{onClick:sa,type:"button",class:"px-3 py-1.5 rounded-xl bg-white text-slate-950 text-xs font-black shadow transition active:scale-95 flex items-center gap-1.5"},[y(n(Wa),{class:"w-3.5 h-3.5"}),e("span",null,"Pakai Sampel "+m(n(he).name),1)]),n(q)?.isKnown&&n(q).matchedTarget?(p(),f("button",{key:0,onClick:a[39]||(a[39]=i=>lt(n(q).matchedTarget.id)),type:"button",class:"px-2.5 py-1.5 rounded-xl bg-amber-500/20 hover:bg-amber-500/40 text-amber-300 border border-amber-500/40 text-xs font-bold transition flex items-center gap-1 active:scale-95"},[e("span",null,"Beralih ke "+m(n(q).matchedTarget.name),1)])):M("",!0),e("button",{onClick:a[40]||(a[40]=i=>vt.value=!0),type:"button",class:"px-2.5 py-1.5 rounded-xl bg-slate-800 text-slate-200 text-xs font-bold border border-slate-700 transition ml-auto active:scale-95"},[...a[149]||(a[149]=[e("span",null,"</> Buka JSON",-1)])])])],2)):(p(),f("div",pl,[e("div",fl,[a[150]||(a[150]=e("span",{class:"w-2 h-2 rounded-full bg-emerald-400 shrink-0"},null,-1)),a[151]||(a[151]=e("span",{class:"text-slate-400"},"Template Aktif:",-1)),e("span",ml,m(n(he).name),1)]),e("button",{onClick:sa,type:"button",class:"text-[10px] text-sky-400 hover:text-sky-300 font-bold shrink-0 ml-2 transition",title:"Muat ulang sampel data template aktif"}," Reset ke Sampel ")])),e("div",xl,[a[152]||(a[152]=e("div",{class:"flex items-center justify-between"},[e("label",{class:"text-xs font-extrabold text-white flex items-center gap-1.5"},[e("span",null,"Judul Utama (Title)")]),e("span",{class:"text-[9px] text-sky-400 font-bold uppercase tracking-wider"},"Wajib")],-1)),e("input",{type:"text",value:o.modelValue.title,onInput:a[41]||(a[41]=i=>Ma(i.target.value)),placeholder:"Judul Utama Konten...",class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-xs text-white font-bold focus:outline-none focus:border-sky-500 transition"},null,40,hl)]),e("div",bl,[a[153]||(a[153]=e("label",{class:"text-xs font-bold text-slate-300"},"Subtitle / Penjelasan Ringkas",-1)),e("textarea",{value:o.modelValue.subtitle||"",onInput:a[42]||(a[42]=i=>ws(i.target.value)),rows:"2",placeholder:"Ringkasan atau penjelas judul...",class:"w-full bg-slate-950 border border-slate-800 rounded-xl p-2.5 text-xs text-slate-200 focus:outline-none focus:border-sky-500 transition resize-none leading-relaxed"},null,40,gl)]),e("div",yl,[e("div",vl,[a[154]||(a[154]=e("label",{class:"text-[11px] font-bold text-slate-400"},"Watermark Handle",-1)),e("input",{type:"text",value:o.modelValue.watermark||"@SocialGen",onInput:a[43]||(a[43]=i=>$a(i.target.value)),placeholder:"@NamaAkun",class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-sky-400 font-bold text-xs focus:outline-none focus:border-sky-500"},null,40,kl)]),e("div",wl,[a[155]||(a[155]=e("label",{class:"text-[11px] font-bold text-slate-400"},"Sumber (Footer Note)",-1)),e("input",{type:"text",value:o.modelValue.footerNote||"",onInput:a[44]||(a[44]=i=>_s(i.target.value)),placeholder:"Source: Data Wire 2026...",class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-slate-300 text-xs focus:outline-none focus:border-sky-500"},null,40,_l)])]),e("div",Sl,[e("div",Tl,[a[157]||(a[157]=e("span",{class:"text-xs font-bold text-slate-300"},"Viral Caption & Hashtags",-1)),e("button",{onClick:a[45]||(a[45]=async()=>{o.modelValue.caption&&(await n(_t)(o.modelValue.caption),l("toast","Caption berhasil disalin!","success"))}),type:"button",class:"text-[11px] font-bold text-sky-400 hover:text-sky-300 flex items-center gap-1 active:scale-95 transition"},[y(n(We),{class:"w-3 h-3"}),a[156]||(a[156]=e("span",null,"Salin Caption",-1))])]),e("textarea",{value:o.modelValue.caption||"",onInput:a[46]||(a[46]=i=>Ss(i.target.value)),rows:"3",placeholder:"Tulis caption reels / post di sini...",class:"w-full bg-slate-950 border border-slate-800 rounded-xl p-2.5 text-xs text-slate-200 focus:outline-none focus:border-sky-500 leading-relaxed resize-none"},null,40,Cl)])])):n(Oe)==="design"?(p(),f("div",Al,[e("div",Ol,[e("div",Il,[e("div",null,[e("span",Nl,"Pilih Format Template ("+m(n(W).length)+")",1),a[158]||(a[158]=e("p",{class:"text-[10px] text-slate-400"},"Geser ke kanan untuk melihat semua format",-1))]),e("button",{onClick:a[47]||(a[47]=i=>j("list")),type:"button",class:"text-[10px] font-bold text-sky-400 hover:text-sky-300 flex items-center gap-1 bg-slate-800 px-2 py-1 rounded-lg border border-slate-700"},[y(n(Ya),{class:"w-3 h-3"}),a[159]||(a[159]=e("span",null,"Kelola",-1))])]),n(q)||o.validationError||n(c)?(p(),f("div",Ml,[e("div",$l,[a[161]||(a[161]=e("span",{class:"text-sm"},"⚠️",-1)),e("span",jl,[n(q)?(p(),f("span",Dl,[a[160]||(a[160]=z("Format JSON milik: ",-1)),e("b",null,m(n(q).matchedTarget?.name||n(q).jsonTemplateId),1)])):n(c)?(p(),f("span",El,"Sintaks JSON tidak valid")):(p(),f("span",Rl,m(o.validationError),1))])]),e("button",{onClick:sa,type:"button",class:"px-2.5 py-1 rounded-lg bg-amber-500 text-slate-950 font-black text-[10px] shrink-0 active:scale-95 shadow ml-2"}," Pakai Sampel ")])):M("",!0),e("div",Pl,[(p(!0),f(de,null,me(n(W),i=>(p(),f("button",{key:i.id,onClick:h=>lt(i.id),type:"button",class:E(["shrink-0 w-28 p-2.5 rounded-2xl border text-center flex flex-col items-center gap-1.5 transition active:scale-95",n(d)===i.id?"bg-slate-950 border-sky-500 shadow-lg shadow-sky-500/20":"bg-slate-950/70 border-slate-800 hover:border-slate-700"])},[e("div",Ll,m(Ms(i.layoutType,i.id)),1),e("span",Bl,m(i.name),1),e("span",{class:E(["text-[8px] font-bold px-1.5 py-0.2 rounded uppercase tracking-wider",i.isBuiltin?"bg-slate-800 text-slate-400":"bg-purple-950 text-purple-300 border border-purple-800"])},m(i.isBuiltin?i.category:"⭐ Kustom"),3)],10,Vl))),128))])]),e("div",Ul,[e("div",Fl,[a[162]||(a[162]=e("span",{class:"text-xs font-extrabold text-white"},"Tema & Palette Warna",-1)),e("span",Hl,m(o.modelValue.theme==="custom-palette"?"🎨 Kustom":ja.find(i=>i.id===(o.modelValue.theme||"blue-tech"))?.name||o.modelValue.theme||"Blue Tech"),1)]),e("div",Jl,[(p(),f(de,null,me(ja,i=>e("button",{key:i.id,onClick:h=>Pa(i.id),type:"button",class:"flex flex-col items-center gap-1 p-1 rounded-xl transition",title:i.name},[e("div",{class:E(["w-7 h-7 rounded-full border-2 transition transform active:scale-90 flex items-center justify-center text-[11px]",[i.id==="custom-palette"?"bg-gradient-to-tr from-violet-600 via-fuchsia-600 to-amber-500":"",o.modelValue.theme===i.id?"ring-2 ring-white ring-offset-2 ring-offset-slate-950 scale-105":"border-white/10 hover:border-white/40"]]),style:Ne(i.id!=="custom-palette"?{backgroundColor:i.color}:{})},[i.id==="custom-palette"?(p(),f("span",Zl,"🎨")):M("",!0)],6),e("span",Gl,m(i.name.split(" ")[0]),1)],8,zl)),64))])]),e("div",Kl,[e("div",Wl,[a[164]||(a[164]=e("div",{class:"flex flex-col"},[e("span",{class:"text-xs font-bold text-white"},"Buat Template Kustom"),e("span",{class:"text-[10px] text-slate-400"},"Punya referensi kartu baru? Tambahkan ke sistem.")],-1)),e("button",{onClick:g,type:"button",class:"px-3 py-1.5 rounded-xl bg-gradient-to-r from-sky-600 to-indigo-600 hover:from-sky-500 text-white text-xs font-bold shadow flex items-center gap-1.5 active:scale-95 transition"},[y(n(wt),{class:"w-3.5 h-3.5"}),a[163]||(a[163]=e("span",null,"+ Buat Template",-1))])]),e("div",ql,[a[165]||(a[165]=e("span",{class:"text-[10px] text-slate-400 flex items-center gap-1"},[e("span",null,"🤖 Prompt AI Buat Template")],-1)),e("div",Yl,[e("button",{onClick:ot,type:"button",class:"px-2.5 py-1 rounded-lg bg-sky-600/20 hover:bg-sky-600/40 text-sky-300 text-[10px] font-bold border border-sky-500/30 flex items-center gap-1 transition active:scale-95"},[y(n(We),{class:"w-3 h-3"}),e("span",null,m(n(we)?"✓ Tersalin":"Salin Prompt"),1)]),e("button",{onClick:a[48]||(a[48]=i=>Ae.value=!n(Ae)),type:"button",class:"px-2 py-1 rounded-lg bg-slate-800 text-slate-300 text-[10px] font-bold border border-slate-700"},[e("span",null,m(n(Ae)?"Tutup":"Lihat"),1)])])]),n(Ae)?(p(),f("div",Xl,[a[166]||(a[166]=e("p",{class:"text-[9px] text-slate-400 mb-1"},"Kirim prompt ini bersama screenshot kartu ke ChatGPT / Gemini / Claude untuk menghasilkan HTML & CSS template:",-1)),e("textarea",{value:n(yt),readonly:"",rows:"5",class:"w-full bg-slate-900 border border-slate-700 rounded-lg p-2 text-[10px] text-sky-200 font-mono select-all focus:outline-none custom-scrollbar"},null,8,Ql)])):M("",!0)])])):n(Oe)==="media"?(p(),f("div",ei,[e("div",ti,[e("div",ai,[e("label",si,[y(n(Vt),{class:"w-4 h-4"}),a[167]||(a[167]=e("span",null,"Background Video",-1))]),e("button",{onClick:a[49]||(a[49]=i=>n(ea)?.click()),disabled:n(Ke),type:"button",class:"px-2.5 py-1 rounded-xl bg-sky-950/60 border border-sky-500/40 text-sky-300 text-[10px] font-bold flex items-center gap-1"},[y(n(Et),{class:"w-3 h-3"}),a[168]||(a[168]=e("span",null,"Upload MP4",-1))],8,ni)]),e("select",{value:o.options.backgroundSource||"random",onChange:a[50]||(a[50]=i=>{const h=i.target.value;l("update:options",{...o.options,backgroundSource:h,videoStartOffset:0})}),class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-slate-200 text-xs font-semibold focus:outline-none focus:border-sky-500"},[a[169]||(a[169]=e("option",{value:"random"},"🔀 Acak Video",-1)),(p(!0),f(de,null,me(n(qt),i=>(p(),f("option",{key:i,value:i},m(i.replace(".mp4","").replace(/_/g," ")),9,li))),128)),a[170]||(a[170]=e("option",{value:"pexels"},"🌐 Pexels API (Auto HD)",-1))],40,oi),e("div",ii,[e("div",ri,[e("span",di,[a[171]||(a[171]=z(" ✂️ Mulai Detik: ",-1)),e("strong",ui,m(Math.min(o.options.videoStartOffset||0,n(et)))+"s",1),z(" / "+m(n(Xt))+"s ",1)]),e("button",{onClick:a[51]||(a[51]=i=>Le("videoStartOffset",0)),type:"button",class:"text-[10px] text-sky-400 hover:text-white"}," Reset 0s ")]),e("input",{type:"range",min:"0",max:n(et),step:"1",value:Math.min(o.options.videoStartOffset||0,n(et)),onInput:a[52]||(a[52]=i=>Le("videoStartOffset",Number(i.target.value))),class:"w-full h-1.5 bg-slate-950 rounded appearance-none cursor-pointer accent-sky-400"},null,40,ci)])]),e("div",pi,[e("div",fi,[e("label",mi,[y(n(Lt),{class:"w-4 h-4"}),a[172]||(a[172]=e("span",null,"Musik Reels",-1))]),e("button",{onClick:a[53]||(a[53]=i=>n(ta)?.click()),disabled:n(Ke),type:"button",class:"px-2.5 py-1 rounded-xl bg-purple-950/60 border border-purple-500/40 text-purple-300 text-[10px] font-bold flex items-center gap-1"},[y(n(Et),{class:"w-3 h-3"}),a[173]||(a[173]=e("span",null,"Upload MP3",-1))],8,xi)]),e("select",{value:o.options.musicFile||"random",onChange:a[54]||(a[54]=i=>{const h=i.target.value;l("update:options",{...o.options,musicFile:h,audioStartOffset:0})}),class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-slate-200 text-xs font-semibold focus:outline-none focus:border-purple-500"},[a[174]||(a[174]=e("option",{value:"random"},"🔀 Acak Musik",-1)),(p(!0),f(de,null,me(n(Yt),i=>(p(),f("option",{key:i,value:i},m(i.replace(".mp3","").replace(/_/g," ")),9,bi))),128))],40,hi),e("div",gi,[e("div",yi,[e("span",vi,[a[175]||(a[175]=z(" ✂️ Mulai Intro: ",-1)),e("strong",ki,m(Math.min(o.options.audioStartOffset||0,n(tt)))+"s",1),z(" / "+m(n(Qt))+"s ",1)]),e("button",{onClick:a[55]||(a[55]=i=>Le("audioStartOffset",0)),type:"button",class:"text-[10px] text-purple-400 hover:text-white"}," Reset 0s ")]),e("input",{type:"range",min:"0",max:n(tt),step:"1",value:Math.min(o.options.audioStartOffset||0,n(tt)),onInput:a[56]||(a[56]=i=>Le("audioStartOffset",Number(i.target.value))),class:"w-full h-1.5 bg-slate-950 rounded appearance-none cursor-pointer accent-purple-400"},null,40,wi)])]),e("div",_i,[e("label",Si,[y(n(da),{class:"w-3.5 h-3.5 text-emerald-400"}),a[176]||(a[176]=e("span",null,"Durasi Reels:",-1))]),e("div",Ti,[(p(),f(de,null,me([7,10,15,30,60],i=>e("button",{key:i,onClick:h=>Ua(i),type:"button",class:E(["px-2.5 py-1 rounded-xl text-xs font-bold transition",o.modelValue.reelsDuration===i?"bg-emerald-500 text-white shadow":"bg-slate-950 text-slate-400 border border-slate-800"])},m(i)+"s ",11,Ci)),64))])]),e("div",Ai,[a[180]||(a[180]=e("span",{class:"text-[11px] font-bold text-slate-400 uppercase tracking-wider block"},"Format Output Aktif",-1)),e("div",Oi,[e("label",{class:E(["flex items-center gap-1.5 p-2 rounded-xl border text-xs cursor-pointer select-none",o.options.outputs?.feed!==!1?"bg-sky-500/10 border-sky-500/40 text-sky-200":"bg-slate-950 border-slate-800 text-slate-500"])},[e("input",{type:"checkbox",checked:o.options.outputs?.feed!==!1,onChange:a[57]||(a[57]=i=>rt("feed",i.target.checked)),class:"rounded text-sky-500"},null,40,Ii),a[177]||(a[177]=e("span",{class:"font-bold"},"Feed 4:5",-1))],2),e("label",{class:E(["flex items-center gap-1.5 p-2 rounded-xl border text-xs cursor-pointer select-none",o.options.outputs?.story!==!1?"bg-indigo-500/10 border-indigo-500/40 text-indigo-200":"bg-slate-950 border-slate-800 text-slate-500"])},[e("input",{type:"checkbox",checked:o.options.outputs?.story!==!1,onChange:a[58]||(a[58]=i=>rt("story",i.target.checked)),class:"rounded text-indigo-500"},null,40,Ni),a[178]||(a[178]=e("span",{class:"font-bold"},"Story 9:16",-1))],2),e("label",{class:E(["flex items-center gap-1.5 p-2 rounded-xl border text-xs cursor-pointer select-none",o.options.outputs?.reels!==!1?"bg-emerald-500/10 border-emerald-500/40 text-emerald-200":"bg-slate-950 border-slate-800 text-slate-500"])},[e("input",{type:"checkbox",checked:o.options.outputs?.reels!==!1,onChange:a[59]||(a[59]=i=>rt("reels",i.target.checked)),class:"rounded text-emerald-500"},null,40,Mi),a[179]||(a[179]=e("span",{class:"font-bold"},"Reels MP4",-1))],2)])])])):n(Oe)==="ai"?(p(),f("div",$i,[e("div",ji,[e("div",Di,[e("span",Ei,[y(n(pt),{class:"w-4 h-4 text-sky-400"}),a[181]||(a[181]=z(" Auto-Topic AI Generator ",-1))]),e("span",Ri,m(n(w)),1)]),e("div",Pi,[e("div",Vi,[a[182]||(a[182]=e("label",{class:"text-[10px] font-bold text-slate-400"},"Pilih Niche",-1)),X(e("select",{"onUpdate:modelValue":a[60]||(a[60]=i=>Be(Y)?Y.value=i:null),class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-2 text-xs text-white font-bold focus:outline-none"},[(p(!0),f(de,null,me(n(ge),i=>(p(),f("option",{key:i.id,value:i.id},m(i.name),9,Li))),128))],512),[[dt,n(Y)]])]),e("div",Bi,[a[184]||(a[184]=e("label",{class:"text-[10px] font-bold text-slate-400"},"Bahasa Konten",-1)),X(e("select",{"onUpdate:modelValue":a[61]||(a[61]=i=>Be(K)?K.value=i:null),class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-2 text-xs text-emerald-300 font-bold focus:outline-none"},[...a[183]||(a[183]=[$t('<option value="id">🇮🇩 Indonesia</option><option value="en">🇺🇸 English</option><option value="es">🇪🇸 Español</option><option value="ja">🇯🇵 日本語</option><option value="de">🇩🇪 Deutsch</option>',5)])],512),[[dt,n(K)]])])]),e("button",{onClick:a[62]||(a[62]=i=>Fa()),disabled:o.isGenerating||o.isAutoTopicLoading,type:"button",class:"w-full py-3 rounded-2xl bg-gradient-to-r from-sky-500 via-indigo-600 to-purple-600 text-white font-black text-xs shadow-xl shadow-sky-500/25 flex items-center justify-center gap-2 active:scale-98 transition disabled:opacity-50"},[y(n(pt),{class:E(["w-4 h-4",{"animate-spin":o.isAutoTopicLoading}])},null,8,["class"]),e("span",null,m(o.isAutoTopicLoading?"Meriset Data Viral...":"✨ Auto-Topic Viral Baru"),1)],8,Ui)]),e("div",Fi,[e("div",Hi,[e("div",Ji,[y(n(pa),{class:"w-4 h-4 text-purple-400"}),a[185]||(a[185]=e("span",{class:"text-xs font-black text-white"},"Master Prompt Riset Topik AI",-1))]),e("button",{onClick:ia,type:"button",class:"px-2 py-0.5 rounded-lg bg-purple-950/60 border border-purple-500/40 text-purple-300 text-[10px] font-bold flex items-center gap-1 hover:text-white"},[y(n(Ga),{class:"w-3 h-3"}),a[186]||(a[186]=e("span",null,"Buka Detail",-1))])]),a[187]||(a[187]=e("p",{class:"text-[11px] text-slate-400 leading-relaxed"},[z(" Salin prompt riset cerdas ini ke "),e("b",null,"ChatGPT / Gemini / Claude"),z(" untuk riset topik konten viral terbaru sesuai niche & template yang aktif (bebas bentrok riwayat): ")],-1)),e("div",zi,[e("button",{onClick:Ps,disabled:n(Nt),type:"button",class:"flex-1 px-3 py-2.5 rounded-xl bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-500 text-white text-xs font-bold shadow-lg transition flex items-center justify-center gap-1.5 active:scale-95 disabled:opacity-50"},[n(Mt)?(p(),Me(n(at),{key:0,class:"w-3.5 h-3.5 text-emerald-300"})):(p(),Me(n(We),{key:1,class:"w-3.5 h-3.5"})),e("span",null,m(n(Nt)?"Menyiapkan Prompt...":n(Mt)?"✓ Master Prompt Tersalin!":"Salin Master Prompt Topik"),1)],8,Zi),e("button",{onClick:ia,type:"button",title:"Lihat teks prompt manual lengkap",class:"px-3 py-2.5 rounded-xl bg-slate-800 text-slate-300 text-xs font-bold border border-slate-700 hover:bg-slate-700 transition"},[y(n(Ga),{class:"w-3.5 h-3.5"})])])])])):n(Oe)==="history"?(p(),f("div",Gi,[e("div",Ki,[e("button",{onClick:a[63]||(a[63]=i=>$.value="drafts"),type:"button",class:E(["flex-1 py-1.5 px-3 rounded-xl transition text-center",n($)==="drafts"?"bg-amber-500 text-slate-950 font-black shadow":"text-slate-400 hover:text-white"])},[e("span",null,"Drafts ("+m(o.drafts.length)+")",1)],2),e("button",{onClick:a[64]||(a[64]=i=>$.value="history"),type:"button",class:E(["flex-1 py-1.5 px-3 rounded-xl transition text-center",n($)==="history"?"bg-purple-600 text-white font-black shadow":"text-slate-400 hover:text-white"])},[e("span",null,"Riwayat ("+m(o.history.length)+")",1)],2)]),n($)==="drafts"?(p(),f("div",Wi,[e("div",qi,[a[189]||(a[189]=e("span",{class:"text-[11px] font-bold text-slate-400 uppercase tracking-wider"},"Daftar Draft Tersimpan",-1)),e("button",{onClick:a[65]||(a[65]=i=>l("saveDraft")),type:"button",class:"text-[11px] font-bold text-amber-400 hover:text-amber-300 flex items-center gap-1"},[y(n(Pt),{class:"w-3 h-3"}),a[188]||(a[188]=e("span",null,"+ Simpan Draft",-1))])]),o.drafts.length===0?(p(),f("div",Yi," Belum ada draft tersimpan. ")):M("",!0),(p(!0),f(de,null,me(o.drafts,(i,h)=>(p(),f("div",{key:h,onClick:N=>l("selectDraft",h),class:"p-3 rounded-2xl border bg-slate-900/80 border-slate-800 hover:border-amber-500/40 flex items-center justify-between cursor-pointer active:scale-98 transition shadow"},[e("div",Qi,[e("div",er,m(i.title||"Tanpa Judul"),1),e("div",tr,m(i.category||"Draft"),1)]),e("button",{onClick:ut(N=>l("deleteDraft",h),["stop"]),type:"button",class:"p-1.5 text-slate-400 hover:text-rose-400 rounded-lg transition"},[y(n(ct),{class:"w-3.5 h-3.5"})],8,ar)],8,Xi))),128))])):(p(),f("div",sr,[e("div",nr,[a[190]||(a[190]=e("span",{class:"text-[11px] font-bold text-slate-400 uppercase tracking-wider"},"Riwayat Generasi Terakhir",-1)),o.history.length>0?(p(),f("button",{key:0,onClick:Ha,type:"button",class:"text-[10px] font-bold text-rose-400 hover:text-rose-300"}," Hapus Semua ")):M("",!0)]),o.history.length===0?(p(),f("div",or," Belum ada riwayat pembuatan. ")):M("",!0),(p(!0),f(de,null,me(o.history,(i,h)=>(p(),f("div",{key:h,onClick:N=>l("selectHistory",h),class:"p-3 rounded-2xl border bg-slate-900/80 border-slate-800 hover:border-purple-500/40 flex items-center justify-between cursor-pointer active:scale-98 transition shadow"},[e("div",ir,[e("div",rr,m(i.title),1),e("div",dr,m(i.category)+" • "+m(Ja(i.generatedAt)),1)]),e("button",{onClick:ut(N=>l("deleteHistory",h),["stop"]),type:"button",class:"p-1.5 text-slate-400 hover:text-rose-400 rounded-lg transition"},[y(n(ct),{class:"w-3.5 h-3.5"})],8,ur)],8,lr))),128))]))])):M("",!0),n(vt)?(p(),f("div",cr,[e("div",pr,[e("div",fr,[a[191]||(a[191]=e("div",{class:"flex items-center gap-2"},[e("span",{class:"text-xs font-bold text-white font-mono"},"</> RAW JSON SocialGen"),e("span",{class:"text-[9px] px-1.5 py-0.2 rounded-full bg-sky-500/20 text-sky-300 font-mono"},"Format V2")],-1)),e("button",{onClick:a[66]||(a[66]=i=>vt.value=!1),type:"button",class:"w-7 h-7 rounded-full bg-slate-800 flex items-center justify-center text-xs text-slate-400 hover:text-white"}," ✕ ")]),n(q)||n(c)||o.validationError?(p(),f("div",{key:0,class:E(["p-2.5 rounded-xl border text-[11px] flex items-center justify-between gap-2 shadow",n(c)||o.validationError?"bg-rose-950/80 border-rose-500/50 text-rose-200":"bg-amber-950/80 border-amber-500/50 text-amber-200"])},[e("div",mr,[a[193]||(a[193]=e("span",null,"⚠️",-1)),e("span",xr,[n(c)?(p(),f("span",hr,m(n(c)),1)):n(q)?(p(),f("span",br,[a[192]||(a[192]=z("JSON untuk template: ",-1)),e("b",null,m(n(q).matchedTarget?.name||n(q).jsonTemplateId),1)])):(p(),f("span",gr,m(o.validationError),1))])]),n(q)?.isKnown&&n(q).matchedTarget?(p(),f("button",{key:0,onClick:a[67]||(a[67]=i=>lt(n(q).matchedTarget.id)),type:"button",class:"px-2 py-0.5 rounded-lg bg-amber-500 text-slate-950 font-bold text-[10px] shrink-0 active:scale-95 shadow"}," Ganti Template ")):M("",!0)],2)):M("",!0),e("textarea",{value:n(r),onInput:Ia,rows:"8",spellcheck:"false",class:"w-full bg-slate-950 text-sky-200 text-xs font-mono p-3 rounded-xl border border-slate-800 focus:outline-none focus:border-sky-500/50 resize-y leading-relaxed",placeholder:"Paste Content JSON here..."},null,40,yr),e("div",vr,[e("button",{onClick:aa,type:"button",class:"px-3 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-amber-400"}," Pakai Sample "),e("button",{onClick:Na,type:"button",class:"px-3 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-sky-400"}," Format JSON "),e("button",{onClick:a[68]||(a[68]=i=>vt.value=!1),type:"button",class:"px-4 py-2 rounded-xl bg-sky-500 hover:bg-sky-400 text-xs font-bold text-white shadow-lg"}," Selesai ")])])])):M("",!0)]),e("div",kr,[e("div",wr,[e("div",_r,[e("div",Sr,[y(n(dn),{class:"w-3.5 h-3.5 text-sky-400"}),a[194]||(a[194]=e("span",{class:"text-xs font-black text-white"},"Content Studio",-1))]),e("div",Tr,[y(n(Ys),{class:"w-3.5 h-3.5 text-sky-400"}),a[196]||(a[196]=e("span",{class:"text-[11px] font-bold text-slate-400"},"Niche:",-1)),X(e("select",{"onUpdate:modelValue":a[69]||(a[69]=i=>Be(Y)?Y.value=i:null),class:"bg-transparent text-[11px] font-black text-white focus:outline-none cursor-pointer max-w-[130px] truncate",title:"Pilih Niche Konten"},[(p(!0),f(de,null,me(n(ge),i=>(p(),f("option",{key:i.id,value:i.id,class:"bg-slate-900 text-white"},m(i.name),9,Cr))),128))],512),[[dt,n(Y)]]),e("button",{onClick:je,class:"p-0.5 px-1 rounded bg-slate-800 hover:bg-slate-700 text-sky-400 text-[10px] font-bold transition flex items-center gap-0.5",title:"Kelola & Buat Niche Baru"},[y(n(wt),{class:"w-3 h-3"}),a[195]||(a[195]=e("span",null,"Niche",-1))])]),e("div",Ar,[y(n(hs),{class:"w-3.5 h-3.5 text-emerald-400"}),X(e("select",{"onUpdate:modelValue":a[70]||(a[70]=i=>Be(K)?K.value=i:null),class:"bg-transparent text-[11px] font-bold text-emerald-300 focus:outline-none cursor-pointer"},[...a[197]||(a[197]=[$t('<option value="id" class="bg-slate-900 text-white">🇮🇩 Indonesia</option><option value="en" class="bg-slate-900 text-white">🇺🇸 English</option><option value="es" class="bg-slate-900 text-white">🇪🇸 Español</option><option value="ja" class="bg-slate-900 text-white">🇯🇵 日本語</option><option value="de" class="bg-slate-900 text-white">🇩🇪 Deutsch</option>',5)])],512),[[dt,n(K)]])])]),e("div",Or,[e("button",{onClick:ia,title:"Buat prompt manual bebas bentrok untuk ChatGPT / Gemini Web",class:"px-2.5 py-1.5 rounded-xl bg-purple-950/40 hover:bg-purple-900/50 border border-purple-500/30 text-purple-300 text-xs font-bold transition flex items-center gap-1.5 shadow-sm active:scale-95"},[y(n(pa),{class:"w-3.5 h-3.5 text-purple-400"}),a[198]||(a[198]=e("span",null,"Prompt Manual",-1))]),e("button",{onClick:a[71]||(a[71]=i=>Fa()),disabled:o.isGenerating||o.isAutoTopicLoading,class:"px-3 py-1.5 rounded-xl bg-gradient-to-r from-sky-500 via-indigo-600 to-purple-600 hover:opacity-90 text-white text-xs font-bold transition flex items-center gap-1.5 shadow-md shadow-indigo-500/20 active:scale-95 disabled:opacity-50"},[y(n(pt),{class:E(["w-3.5 h-3.5 text-amber-300",{"animate-spin":o.isAutoTopicLoading}])},null,8,["class"]),e("span",null,m(o.isAutoTopicLoading?"Meriset Data...":"✨ Auto-Topic"),1)],8,Ir),e("div",Nr,[a[201]||(a[201]=e("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"}," ▾ ",-1)),e("div",Mr,[a[200]||(a[200]=e("div",{class:"px-3 py-1 text-[10px] font-bold text-slate-500 uppercase"},"Model AI Engine",-1)),e("div",$r,[X(e("select",{"onUpdate:modelValue":a[72]||(a[72]=i=>Be(w)?w.value=i:null),class:"w-full bg-slate-950 border border-slate-700 rounded-lg p-1.5 text-xs text-sky-300 focus:outline-none"},[...a[199]||(a[199]=[e("option",{value:"gemini-3.8-flash"},"⚡ Gemini 3.8 Flash",-1),e("option",{value:"gemini-3.5-flash"},"⚡ Gemini 3.5 Flash",-1),e("option",{value:"gemini-2.5-pro"},"💎 Gemini 2.5 Pro",-1),e("option",{value:"gemini-1.5-pro"},"💎 Gemini 1.5 Pro",-1)])],512),[[dt,n(w)]])])])])])]),o.isAutoTopicLoading?(p(),f("div",jr,[e("div",Dr,[y(n(pt),{class:"w-3 h-3 text-sky-400 animate-spin"})]),e("div",Er,[a[202]||(a[202]=e("span",{class:"font-bold text-white"},"AI Research Engine Sedang Bekerja...",-1)),e("span",Rr,m(n(w)),1),a[203]||(a[203]=e("span",{class:"text-[10px] text-slate-300"},"Meriset data perbandingan terbaru & copywriting viral.",-1))])])):M("",!0),e("div",Pr,[e("aside",Vr,[e("div",Lr,[e("div",Br,[e("button",{onClick:a[73]||(a[73]=i=>$.value="editor"),class:E(["flex-1 py-1.5 px-2 rounded-lg text-[11px] transition flex items-center justify-center gap-1 font-bold whitespace-nowrap",n($)==="editor"?"bg-slate-800 text-sky-400 shadow":"text-slate-400 hover:text-white"])},[y(n(Ka),{class:"w-3.5 h-3.5 shrink-0"}),a[204]||(a[204]=e("span",null,"Template",-1))],2),e("button",{onClick:a[74]||(a[74]=i=>$.value="drafts"),class:E(["flex-1 py-1.5 px-2 rounded-lg text-[11px] transition flex items-center justify-center gap-1 font-bold whitespace-nowrap",n($)==="drafts"?"bg-slate-800 text-amber-400 shadow":"text-slate-400 hover:text-white"])},[y(n(Pt),{class:"w-3.5 h-3.5 shrink-0"}),e("span",null,"Drafts ("+m(o.drafts.length)+")",1)],2),e("button",{onClick:a[75]||(a[75]=i=>$.value="history"),class:E(["flex-1 py-1.5 px-2 rounded-lg text-[11px] transition flex items-center justify-center gap-1 font-bold whitespace-nowrap",n($)==="history"?"bg-slate-800 text-purple-400 shadow":"text-slate-400 hover:text-white"])},[y(n(da),{class:"w-3.5 h-3.5 shrink-0"}),e("span",null,"Riwayat ("+m(o.history.length)+")",1)],2)])]),n($)==="editor"?(p(),f("div",Ur,[e("div",Fr,[e("div",Hr,[e("span",Jr,"Library ("+m(n(W).length)+" Template)",1),e("button",{onClick:g,type:"button",class:"px-2 py-0.5 rounded-lg bg-sky-500/20 text-sky-300 border border-sky-500/30 text-[10px] font-bold hover:bg-sky-500/30 flex items-center gap-1 transition active:scale-95"},[y(n(wt),{class:"w-3 h-3"}),a[205]||(a[205]=e("span",null,"+ Buat Template",-1))])]),e("div",zr,[X(e("input",{"onUpdate:modelValue":a[76]||(a[76]=i=>Be(oe)?oe.value=i:null),type:"text",placeholder:"Cari template...",class:"w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white placeholder-slate-500 focus:outline-none focus:border-sky-500"},null,512),[[ce,n(oe)]])])]),e("div",Zr,[(p(!0),f(de,null,me(n(T),i=>(p(),f("div",{key:i.id,onClick:h=>lt(i.layoutType==="custom"?i.id:i.layoutType||i.id),class:E(["p-2.5 rounded-xl border cursor-pointer transition flex flex-col gap-1 group text-left",n(d)===i.id?"bg-sky-950/40 border-sky-500/50 shadow-sm":"bg-slate-950/60 border-slate-800/80 hover:border-slate-700"])},[e("div",Kr,[e("span",Wr,m(i.name),1),n(d)===i.id?(p(),f("span",qr)):i.isBuiltin?M("",!0):(p(),f("span",Yr,"⭐ Kustom"))]),e("span",Xr,m(i.description||"Format kartu visual studio"),1),e("div",Qr,[e("span",ed,m(i.category||"UMUM"),1),i.isBuiltin?(p(),f("span",td," BAWAAN ")):M("",!0)])],10,Gr))),128))]),e("div",ad,[e("span",sd,[y(n(pt),{class:"w-3 h-3 text-purple-400"}),a[206]||(a[206]=e("span",null,"AI Vision Template",-1))]),e("button",{onClick:ot,class:"px-2 py-1 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white text-[10px] font-bold transition flex items-center gap-1"},[y(n(We),{class:"w-2.5 h-2.5"}),e("span",null,m(n(we)?"✓ Tersalin":"Salin Prompt"),1)])])])):n($)==="drafts"?(p(),f("div",nd,[e("div",od,[e("span",ld,"Tersimpan ("+m(o.drafts.length)+")",1),e("button",{onClick:a[77]||(a[77]=i=>l("saveDraft")),class:"text-[10px] text-amber-400 hover:text-amber-300 transition font-bold flex items-center gap-1",title:"Simpan konten saat ini ke Drafts"},[y(n(Pt),{class:"w-3 h-3"}),a[207]||(a[207]=e("span",null,"+ Simpan ke Draft",-1))])]),e("div",id,[o.unsavedStash?(p(),f("div",rd,[e("div",dd,[a[208]||(a[208]=e("span",{class:"font-bold text-amber-300"},"Editan aktif: ",-1)),e("span",ud,m(o.unsavedStash.title||"Tanpa Judul"),1)]),e("button",{onClick:ne,class:"px-1.5 py-0.5 bg-amber-500 text-slate-950 font-bold rounded text-[9px] shrink-0"}," Kembali ")])):M("",!0),o.drafts.length===0?(p(),f("div",cd,[...a[209]||(a[209]=[z(" Belum ada draft tersimpan.",-1),e("br",null,null,-1),z(" Klik ",-1),e("b",null,"+ Simpan ke Draft",-1),z(" di atas untuk menyimpan konten ini! ",-1)])])):M("",!0),(p(!0),f(de,null,me(o.drafts,(i,h)=>(p(),f("div",{key:h,onClick:N=>l("selectDraft",h),"data-draft-item":"",class:E(["p-2 rounded-xl border cursor-pointer transition flex items-center justify-between text-xs group",o.activeDraftIndex===h?"bg-amber-500/15 border-amber-500/50 text-white":"bg-slate-950/60 border-slate-800 text-slate-300 hover:border-slate-700"])},[e("div",fd,[e("div",md,[e("span",xd,m(i.layoutType||"table"),1),e("span",hd,m(i.category),1)]),e("div",bd,m(i.title),1)]),e("button",{onClick:ut(N=>l("deleteDraft",h),["stop"]),class:"opacity-0 group-hover:opacity-100 p-1 text-slate-400 hover:text-rose-400 transition rounded shrink-0",title:"Hapus draft ini"},[y(n(ct),{class:"w-3.5 h-3.5"})],8,gd)],10,pd))),128))])])):n($)==="history"?(p(),f("div",yd,[e("div",vd,[e("span",kd,"Riwayat ("+m(o.history.length)+")",1),o.history.length>0?(p(),f("button",{key:0,onClick:Ha,class:"text-[10px] text-rose-400 hover:text-rose-300 transition font-bold"}," Bersihkan Riwayat ")):M("",!0)]),e("div",wd,[o.unsavedStash?(p(),f("div",_d,[e("div",Sd,[a[210]||(a[210]=e("span",{class:"font-bold text-purple-300"},"Editan aktif: ",-1)),e("span",Td,m(o.unsavedStash.title||"Tanpa Judul"),1)]),e("button",{onClick:ne,class:"px-1.5 py-0.5 bg-purple-500 text-white font-bold rounded text-[9px] shrink-0"}," Kembali ")])):M("",!0),o.history.length===0?(p(),f("div",Cd,[...a[211]||(a[211]=[z(" Belum ada riwayat pembuatan.",-1),e("br",null,null,-1),z(" Hasil generate akan otomatis tercatat di sini! ",-1)])])):M("",!0),(p(!0),f(de,null,me(o.history,(i,h)=>(p(),f("div",{key:h,onClick:N=>l("selectHistory",h),"data-history-item":"",class:E(["p-2 rounded-xl border cursor-pointer transition flex items-center justify-between text-xs group",o.activeHistoryIndex===h?"bg-purple-500/15 border-purple-500/50 text-white":"bg-slate-950/60 border-slate-800 text-slate-300 hover:border-slate-700"])},[e("div",Od,[e("div",Id,[e("span",Nd,m(i.layoutType||"reels"),1),e("span",Md,m(i.category),1),i.generatedAt?(p(),f("span",$d,m(Ja(i.generatedAt)),1)):M("",!0)]),e("div",jd,m(i.title),1)]),e("button",{onClick:ut(N=>l("deleteHistory",h),["stop"]),class:"opacity-0 group-hover:opacity-100 p-1 text-slate-400 hover:text-rose-400 transition rounded shrink-0",title:"Hapus riwayat ini"},[y(n(ct),{class:"w-3.5 h-3.5"})],8,Dd)],10,Ad))),128))])])):M("",!0)]),e("section",Ed,[e("div",Rd,[e("div",Pd,[y(n(tn),{class:"w-3.5 h-3.5 text-sky-400"}),a[212]||(a[212]=e("span",{class:"text-xs font-black text-white"},"Studio Inspector",-1)),e("span",Vd,m(n($s)),1)]),e("div",Ld,[e("button",{onClick:Na,class:"px-2 py-1 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 text-[10px] font-bold transition flex items-center gap-1",title:"Format JSON"},[y(n(ua),{class:"w-2.5 h-2.5"}),a[213]||(a[213]=e("span",null,"Format",-1))]),e("button",{onClick:aa,class:"px-2 py-1 rounded-lg bg-sky-950/60 border border-sky-500/40 text-sky-300 text-[10px] font-bold hover:bg-sky-900/50 transition flex items-center gap-1",title:"Clear / Pakai Sample"},[y(n(gs),{class:"w-2.5 h-2.5"}),a[214]||(a[214]=e("span",null,"Sample",-1))])])]),e("div",Bd,[e("div",Ud,[e("div",Fd,[a[215]||(a[215]=e("label",{class:"text-[10px] font-black uppercase tracking-wider text-slate-400"},"Palette Tema & Aksen",-1)),e("span",Hd,m(o.modelValue.theme==="custom-palette"?"🎨 Kustom Palette":Va.find(i=>i.id===(o.modelValue.theme||"blue-tech"))?.name||o.modelValue.theme||"Blue Tech"),1)]),e("div",Jd,[e("button",{onClick:Ra,type:"button",class:E(["h-7 rounded-lg transition border flex items-center justify-center shadow font-bold text-xs group relative overflow-hidden",o.modelValue.theme==="custom-palette"?"border-2 border-violet-400 ring-2 ring-violet-400/40 scale-105 bg-gradient-to-tr from-violet-600 via-fuchsia-600 to-amber-500 text-white":"border-slate-700 bg-slate-800 hover:border-violet-400 text-violet-300"]),title:"🎨 Buka Palette Manager Kustom"},[...a[216]||(a[216]=[e("span",{class:"drop-shadow"},"🎨",-1)])],2),(p(!0),f(de,null,me(Va.filter(i=>i.id!=="custom-palette"),i=>(p(),f("button",{key:i.id,onClick:h=>Pa(i.id),type:"button",class:E(["h-7 rounded-lg transition border flex items-center justify-center shadow",[i.bgClass,(o.modelValue.theme||"blue-tech")===i.id?"border-2 border-sky-400 ring-2 ring-sky-400/30 scale-105":"border-slate-800 hover:border-slate-600"]]),title:i.name},[(o.modelValue.theme||"blue-tech")===i.id?(p(),Me(n(at),{key:0,class:"w-3 h-3 text-white"})):M("",!0)],10,zd))),128))])]),e("div",Zd,[e("div",Gd,[e("button",{type:"button",onClick:a[78]||(a[78]=i=>It.value=!n(It)),class:"flex items-center gap-1.5 text-left text-[10px] font-black uppercase tracking-wider text-slate-300 hover:text-white transition"},[y(n(on),{class:"w-3.5 h-3.5 text-sky-400"}),e("span",null,"Ukuran Teks Dinamis ("+m(n(oa).length)+" Section)",1),y(n(Gs),{class:E(["w-3 h-3 text-slate-400 transition-transform duration-200",{"rotate-180":n(It)}])},null,8,["class"])]),n(Ds)?(p(),f("button",{key:0,onClick:Es,type:"button",class:"text-[9.5px] font-bold text-amber-400 hover:text-amber-300 transition",title:"Kembalikan semua font ke standar template"}," Reset Standar ")):M("",!0)]),X(e("div",Kd,[(p(!0),f(de,null,me(n(oa),i=>(p(),f("div",{key:i.id,class:"flex items-center justify-between gap-2.5 bg-slate-950/70 p-2 rounded-xl border border-slate-800/80 hover:border-slate-700 transition"},[e("div",Wd,[e("span",qd,m(i.label),1),e("span",Yd,"--font-"+m(i.id),1)]),e("div",Xd,[e("button",{type:"button",onClick:h=>Ba(i.id,-2,i.min,i.max,i.default),class:"w-6 h-6 rounded-lg bg-slate-800 hover:bg-slate-700 text-white font-black text-xs flex items-center justify-center transition active:scale-95 border border-slate-700/60",title:"Kecilkan 2px"}," - ",8,Qd),e("input",{type:"range",min:i.min,max:i.max,step:i.step||1,value:la(i.id,i.default),onInput:h=>La(i.id,Number(h.target.value)),class:"flex-1 max-w-[110px] h-1.5 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-sky-400"},null,40,eu),e("button",{type:"button",onClick:h=>Ba(i.id,2,i.min,i.max,i.default),class:"w-6 h-6 rounded-lg bg-slate-800 hover:bg-slate-700 text-white font-black text-xs flex items-center justify-center transition active:scale-95 border border-slate-700/60",title:"Besarkan 2px"}," + ",8,tu),e("span",au,m(la(i.id,i.default))+"px ",1)])]))),128))],512),[[Vs,n(It)]])]),e("div",su,[e("div",nu,[a[217]||(a[217]=e("label",{class:"text-[10px] font-black uppercase tracking-wider text-slate-400"},"Watermark",-1)),e("input",{type:"text",value:o.modelValue.watermark||"@SocialGen",onInput:a[79]||(a[79]=i=>$a(i.target.value)),class:"w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-sky-400 font-semibold focus:outline-none focus:border-sky-500"},null,40,ou)]),e("div",lu,[a[218]||(a[218]=e("label",{class:"text-[10px] font-black uppercase tracking-wider text-slate-400"},"Judul Konten (Title)",-1)),e("input",{type:"text",value:o.modelValue.title,onInput:a[80]||(a[80]=i=>Ma(i.target.value)),placeholder:"Judul Utama Konten...",class:"w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-slate-100 font-semibold focus:outline-none focus:border-sky-500"},null,40,iu)])]),e("div",ru,[e("div",du,[e("label",uu,[y(n(ua),{class:"w-3.5 h-3.5 text-sky-400"}),a[219]||(a[219]=e("span",null,"RAW JSON Content",-1))]),n(c)?(p(),f("span",pu,[y(n(Za),{class:"w-2.5 h-2.5"}),a[220]||(a[220]=z(" Invalid ",-1))])):(p(),f("span",cu,[y(n(Ws),{class:"w-2.5 h-2.5"}),z(" "+m(n(r).trim()?"Valid":"Sample Mode"),1)]))]),n(q)?(p(),f("div",{key:0,class:E(["p-2 rounded-xl border text-xs transition-all shadow-md flex flex-col gap-1.5",n(q).isKnown?"bg-amber-500/10 border-amber-500/30":"bg-rose-500/10 border-rose-500/30"])},[e("div",{class:E(["flex items-center gap-1.5 text-[11px]",n(q).isKnown?"text-amber-300":"text-rose-300"])},[a[222]||(a[222]=e("span",null,"⚠️",-1)),n(q).isKnown?(p(),f("span",fu,[a[221]||(a[221]=z(" Format milik: ",-1)),e("b",null,m(n(q).matchedTarget?.name),1)])):(p(),f("span",mu,' Template "'+m(n(q).jsonTemplateId)+'" tidak ditemukan. ',1))],2),e("div",xu,[n(q).isKnown&&n(q).matchedTarget?(p(),f("button",{key:0,onClick:a[81]||(a[81]=i=>lt(n(q).matchedTarget.id)),class:"px-2 py-0.5 rounded-lg bg-amber-500/20 hover:bg-amber-500/30 text-amber-200 border border-amber-500/40 text-[10px] font-bold transition"}," Pindah Template ")):M("",!0),e("button",{onClick:aa,class:"px-2 py-0.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 text-[10px] font-semibold transition"}," Pakai Sampel ")])],2)):M("",!0),e("textarea",{value:n(r),onInput:Ia,rows:"7",spellcheck:"false",class:"w-full bg-slate-950 text-sky-200 text-[11px] font-mono p-2.5 rounded-xl border border-slate-800 focus:outline-none focus:border-sky-500/50 resize-y leading-relaxed select-text custom-scrollbar",placeholder:"Paste Content JSON here... (kosong = otomatis menggunakan data sampel template aktif)"},null,40,hu),n(c)||o.validationError?(p(),f("p",bu," ⚠️ "+m(n(c)||o.validationError),1)):M("",!0)]),e("input",{type:"file",ref_key:"videoInputRef",ref:ea,accept:"video/mp4,video/webm",class:"hidden",onChange:a[82]||(a[82]=i=>Oa(i))},null,544),e("input",{type:"file",ref_key:"audioInputRef",ref:ta,accept:"audio/mp3,audio/mpeg,audio/wav",class:"hidden",onChange:a[83]||(a[83]=i=>Oa(i))},null,544),e("div",gu,[e("div",yu,[e("div",vu,[e("label",ku,[y(n(Vt),{class:"w-3.5 h-3.5 text-sky-400"}),a[223]||(a[223]=e("span",null,"Background Video",-1))]),e("div",wu,[e("select",{value:o.options.backgroundSource||"random",onChange:a[84]||(a[84]=i=>{const h=i.target.value;l("update:options",{...o.options,backgroundSource:h,videoStartOffset:0})}),class:"bg-slate-950 border border-slate-800 rounded-lg px-2 py-1 text-slate-300 text-[11px] focus:outline-none max-w-[150px] truncate"},[a[224]||(a[224]=e("option",{value:"random"},"🔀 Acak Video",-1)),(p(!0),f(de,null,me(n(qt),i=>(p(),f("option",{key:i,value:i},m(i.replace(".mp4","").replace(/_/g," ")),9,Su))),128)),a[225]||(a[225]=e("option",{value:"pexels"},"🌐 Pexels API (Auto HD)",-1))],40,_u),e("button",{onClick:a[85]||(a[85]=i=>n(ea)?.click()),disabled:n(Ke),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"},[y(n(Et),{class:"w-3 h-3"}),e("span",Cu,m(n(Ke)?"...":"Upload"),1)],8,Tu)])]),e("div",Au,[e("span",Ou,[y(n(xa),{class:"w-2.5 h-2.5"}),z(" Mulai: "+m(Math.min(o.options.videoStartOffset||0,n(et)))+"s / "+m(n(Xt))+"s ",1)]),e("input",{type:"range",min:"0",max:n(et),step:"1",value:Math.min(o.options.videoStartOffset||0,n(et)),onInput:a[86]||(a[86]=i=>Le("videoStartOffset",Number(i.target.value))),class:"w-28 h-1 bg-slate-950 rounded appearance-none cursor-pointer accent-sky-400"},null,40,Iu)])]),e("div",Nu,[e("div",Mu,[e("label",$u,[y(n(Lt),{class:"w-3.5 h-3.5 text-purple-400"}),a[226]||(a[226]=e("span",null,"Musik Reels",-1))]),e("div",ju,[e("select",{value:o.options.musicFile||"random",onChange:a[87]||(a[87]=i=>{const h=i.target.value;l("update:options",{...o.options,musicFile:h,audioStartOffset:0})}),class:"bg-slate-950 border border-slate-800 rounded-lg px-2 py-1 text-slate-300 text-[11px] focus:outline-none max-w-[150px] truncate"},[a[227]||(a[227]=e("option",{value:"random"},"🔀 Acak Musik",-1)),(p(!0),f(de,null,me(n(Yt),i=>(p(),f("option",{key:i,value:i},m(i.replace(".mp3","").replace(/_/g," ")),9,Eu))),128))],40,Du),e("button",{onClick:a[88]||(a[88]=i=>n(ta)?.click()),disabled:n(Ke),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"},[y(n(Et),{class:"w-3 h-3"}),e("span",Pu,m(n(Ke)?"...":"Upload"),1)],8,Ru)])]),e("div",Vu,[e("span",Lu,[y(n(xa),{class:"w-2.5 h-2.5"}),z(" Mulai: "+m(Math.min(o.options.audioStartOffset||0,n(tt)))+"s / "+m(n(Qt))+"s ",1)]),e("input",{type:"range",min:"0",max:n(tt),step:"1",value:Math.min(o.options.audioStartOffset||0,n(tt)),onInput:a[89]||(a[89]=i=>Le("audioStartOffset",Number(i.target.value))),class:"w-28 h-1 bg-slate-950 rounded appearance-none cursor-pointer accent-purple-400"},null,40,Bu)])]),e("div",Uu,[e("label",Fu,[y(n(da),{class:"w-3.5 h-3.5 text-emerald-400"}),a[228]||(a[228]=e("span",null,"Durasi Reels:",-1))]),e("div",Hu,[(p(),f(de,null,me([7,10,15,30,60],i=>e("button",{key:i,onClick:h=>Ua(i),class:E(["px-2 py-0.5 text-[10px] font-bold rounded-lg border transition",(o.modelValue.reelsDuration||30)===i?"bg-emerald-500/20 border-emerald-500/60 text-emerald-300":"bg-slate-950 border-slate-800 text-slate-400 hover:text-white"])},m(i===60?"1m":i+"s"),11,Ju)),64))])]),e("div",zu,[e("label",{class:E(["flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none",o.options.outputs?.feed!==!1?"bg-sky-500/10 border-sky-500/40 text-sky-200":"bg-slate-950/50 border-slate-800 text-slate-500"])},[e("input",{type:"checkbox",checked:o.options.outputs?.feed!==!1,onChange:a[90]||(a[90]=i=>rt("feed",i.target.checked)),class:"rounded text-sky-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"},null,40,Zu),a[229]||(a[229]=e("span",{class:"font-bold"},"Feed 4:5",-1))],2),e("label",{class:E(["flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none",o.options.outputs?.story!==!1?"bg-indigo-500/10 border-indigo-500/40 text-indigo-200":"bg-slate-950/50 border-slate-800 text-slate-500"])},[e("input",{type:"checkbox",checked:o.options.outputs?.story!==!1,onChange:a[91]||(a[91]=i=>rt("story",i.target.checked)),class:"rounded text-indigo-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"},null,40,Gu),a[230]||(a[230]=e("span",{class:"font-bold"},"Story 9:16",-1))],2),e("label",{class:E(["flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none",o.options.outputs?.reels!==!1?"bg-emerald-500/10 border-emerald-500/40 text-emerald-200":"bg-slate-950/50 border-slate-800 text-slate-500"])},[e("input",{type:"checkbox",checked:o.options.outputs?.reels!==!1,onChange:a[92]||(a[92]=i=>rt("reels",i.target.checked)),class:"rounded text-emerald-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"},null,40,Ku),a[231]||(a[231]=e("span",{class:"font-bold"},"Reels MP4",-1))],2)])])]),e("div",Wu,[e("button",{onClick:a[93]||(a[93]=i=>l("generate")),disabled:!o.isValid||o.isGenerating||!!n(c),class:E(["w-full py-3 px-4 rounded-xl font-black text-xs tracking-wide shadow-xl transition flex items-center justify-center gap-2",[!o.isValid||o.isGenerating||n(c)?"bg-slate-800 text-slate-500 cursor-not-allowed border border-slate-700":"bg-gradient-to-r from-sky-500 via-indigo-600 to-purple-600 hover:from-sky-400 hover:to-indigo-500 text-white shadow-sky-500/25 active:scale-[0.99]"]])},[o.isGenerating?(p(),Me(n(Wa),{key:0,class:"w-3.5 h-3.5 animate-spin"})):(p(),Me(n(bs),{key:1,class:"w-3.5 h-3.5 fill-current"})),e("span",null,m(o.isGenerating?o.generateStage||"Rendering Content...":"GENERATE CONTENT SEKARANG"),1)],10,qu)])])])])]))}}),Xu={class:"flex flex-col gap-2.5 h-full text-slate-100 min-h-0 justify-between relative"},Qu={key:0,class:"absolute inset-0 z-50 bg-slate-950/85 backdrop-blur-md rounded-2xl flex flex-col items-center justify-center p-6 text-center animate-in fade-in duration-200"},ec={class:"relative flex items-center justify-center mb-5"},tc={class:"absolute inset-0 flex items-center justify-center"},ac={class:"text-xs text-sky-300 font-bold mb-4 flex items-center gap-2"},sc={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"},nc={class:"flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-bold"},oc={key:0,class:"w-1.5 h-1.5 rounded-full bg-white animate-pulse"},lc={class:"flex items-center gap-2 text-xs"},ic={class:"flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs shadow-inner"},rc=["title"],dc={class:"hidden sm:inline"},uc={key:0,class:"relative shadow-2xl rounded-2xl overflow-hidden border border-slate-700/80 flex-shrink-0",style:{width:"360px",height:"450px"}},cc={style:{width:"1080px",height:"1350px",transform:"scale(0.333333)","transform-origin":"top left"}},pc={key:1,class:"relative shadow-2xl rounded-2xl overflow-hidden border border-slate-700/80 flex-shrink-0",style:{width:"300px",height:"533.33px"}},fc={key:0,class:"absolute inset-0 z-0 bg-slate-950 overflow-hidden"},mc=["src"],xc=["src","muted"],hc={class:"relative z-10 pointer-events-none",style:{width:"1080px",height:"1920px",transform:"scale(0.277778)","transform-origin":"top left"}},bc={key:1,class:"absolute inset-0 z-30 pointer-events-none flex flex-col justify-between overflow-hidden select-none"},gc={class:"h-11 bg-gradient-to-b from-black/85 via-black/40 to-transparent px-3 pt-2.5 flex items-center justify-between text-white"},yc={class:"flex items-center text-white/95"},vc={class:"flex items-center gap-3.5 text-white/95"},kc={class:"w-7 h-7 rounded-full bg-black/40 backdrop-blur-md flex items-center justify-center border border-white/10 shadow-sm"},wc={class:"absolute right-2 bottom-[98px] flex flex-col items-center gap-3 z-20"},_c={class:"flex flex-col items-center gap-0.5"},Sc={class:"w-7 h-7 rounded-full bg-[#1877F2] flex items-center justify-center text-white shadow-lg"},Tc={class:"flex flex-col items-center gap-0.5"},Cc={class:"w-7 h-7 rounded-full bg-black/35 backdrop-blur-sm flex items-center justify-center text-white border border-white/10 shadow"},Ac={class:"w-7 h-7 rounded-full bg-black/35 backdrop-blur-sm flex items-center justify-center text-white border border-white/10 shadow"},Oc={class:"w-7 h-7 rounded-full bg-black/35 backdrop-blur-sm flex items-center justify-center text-white border border-white/10 shadow"},Ic={class:"w-7 h-7 rounded-full bg-black/35 backdrop-blur-sm flex items-center justify-center text-white border border-white/10 shadow"},Nc={class:"bg-gradient-to-t from-black via-black/85 to-transparent px-3 pb-2 pt-6 flex flex-col justify-end gap-1 relative z-20"},Mc={class:"flex items-center gap-1.5"},$c={class:"w-6 h-6 rounded-full bg-slate-700 border border-white/50 flex items-center justify-center text-[9px] font-black text-white flex-shrink-0 shadow overflow-hidden"},jc={class:"text-[10.5px] font-bold text-white truncate max-w-[130px] drop-shadow"},Dc={class:"flex items-center gap-1.5 text-[9px] text-white/95 font-medium drop-shadow pr-10"},Ec={class:"truncate"},Rc={class:"text-[9px] text-white/95 leading-tight line-clamp-1 drop-shadow pr-10"},Pc={class:"py-0.5"},Vc={class:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-white/20 backdrop-blur-md text-[8.5px] font-bold text-white border border-white/10 shadow-sm"},Lc={class:"w-full bg-[#242526]/90 backdrop-blur-md rounded-xl px-2.5 py-1.5 border border-white/10 flex items-center justify-between text-white text-[9px] shadow-md my-0.5"},Bc={class:"flex items-center gap-1.5 truncate pr-2"},Uc={class:"truncate font-medium text-white/95"},Fc={class:"w-full h-6 rounded-full border border-white/20 bg-black/40 px-3 flex items-center justify-between text-white text-[8.5px] shadow-inner"},Hc={class:"flex items-center gap-2 text-white/80"},Jc={class:"h-12 bg-gradient-to-b from-black/80 to-transparent px-3 pt-2 flex flex-col justify-between"},zc={class:"flex items-center justify-between text-white pb-1"},Zc={class:"flex items-center gap-1.5"},Gc={class:"text-[9px] font-bold"},Kc={class:"h-14 bg-gradient-to-t from-black/85 to-transparent px-3 pb-2 flex items-center justify-between gap-2"},Wc={key:1,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"},qc={class:"flex items-center justify-between gap-3"},Yc=["title"],Xc={class:"text-[11px] hidden sm:inline"},Qc={class:"flex-1 flex items-center gap-2"},e0=["max","value"],t0={class:"font-mono text-[11px] font-bold text-slate-300 min-w-[75px] text-right"},a0=["title"],s0={key:0,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"},n0={class:"flex flex-col gap-1.5"},o0={class:"flex items-center justify-between text-[11px]"},l0={class:"font-bold text-sky-300 flex items-center gap-1"},i0=["max","value"],r0={class:"text-[9px] text-slate-500"},d0={class:"flex flex-col gap-1.5"},u0={class:"flex items-center justify-between text-[11px]"},c0={class:"font-bold text-purple-300 flex items-center gap-1"},p0=["max","value"],f0={class:"text-[9px] text-slate-500"},m0={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"},x0={class:"flex items-center justify-between text-xs"},h0=["value"],b0=wa({__name:"LivePreview",props:{data:{},selectedVideo:{},selectedMusic:{},videoStartOffset:{default:0},audioStartOffset:{default:0},isGenerating:{type:Boolean,default:!1},generateStage:{default:""},generatedResult:{}},emits:["update:videoStartOffset","update:audioStartOffset"],setup(o,{emit:t}){const s=o,l=t,r={"neon_cyber_grid.mp4":8,"financial_pulse_flow.mp4":8,"dark_luxury_particles.mp4":8,"cyber_matrix_stream.mp4":10,"cyber_blue.mp4":15,"default_bg.mp4":15,"emerald_flow.mp4":15,"cyber_pulse.mp4":15,"cyber_future_tech.mp3":15,"dark_phonk_pulse.mp3":15,"deep_finance_groove.mp3":15,"synthwave_pulse.mp3":15,"lofi_chill.mp3":15,"default_ambient.mp3":15,"motivation_cinematic.mp3":110,"lofi_viral_study.mp3":147},d=re(()=>s.selectedVideo&&s.selectedVideo!=="pexels"&&s.selectedVideo!=="random"?`/api/stream/videos/${s.selectedVideo}`:"/api/stream/videos/default_bg.mp4"),x=re(()=>s.selectedMusic&&s.selectedMusic!=="random"?`/api/stream/audio/${s.selectedMusic}`:"/api/stream/audio/lofi_viral_study.mp3"),c=_("feed"),C=_(!1),w=_(!1),$=_(!1),ne=_(1),ge=re(()=>c.value==="feed"?360:300),Y=re(()=>c.value==="feed"?450:533.33),U=_(null),D=_(null),H=_(!0),ye=_(!1),je=_(0),Pe=re(()=>s.data.reelsDuration||30),_e=_(r[s.selectedVideo||""]||8),te=_(r[s.selectedMusic||""]||30),K=re(()=>Math.max(1,Math.floor(_e.value-1))),pe=re(()=>Math.max(1,Math.floor(te.value-1)));function W(){ne.value<2.5&&(ne.value=Math.min(2.5,+(ne.value+.15).toFixed(2)))}function Ce(){ne.value>.5&&(ne.value=Math.max(.5,+(ne.value-.15).toFixed(2)))}function ue(){ne.value=1}function ae(T){(T.ctrlKey||T.metaKey)&&(T.preventDefault(),T.deltaY<0?W():Ce())}let oe=0,G=null;function we(T){if(H.value){if(oe>0){const b=(T-oe)/1e3;b>0&&b<1&&(je.value+=b,je.value>=Pe.value&&(je.value=0,nt(0)))}oe=T,G=requestAnimationFrame(we)}}const le=_({});async function Ae(){try{const T=await $fetch("/api/media");if(T?.durations){le.value=T.durations;const b=s.selectedVideo||"";le.value[b]&&(_e.value=le.value[b]);const Se=s.selectedMusic||"";le.value[Se]&&(te.value=le.value[Se])}}catch{}}_a(()=>{Ae(),H.value&&(oe=performance.now(),G&&cancelAnimationFrame(G),G=requestAnimationFrame(we))}),Bs(()=>{G&&(cancelAnimationFrame(G),G=null)}),Te(Pe,T=>{je.value>T&&(je.value=0,nt(0))});function ie(){H.value?Qe():O()}function O(){H.value=!0,oe=performance.now(),G&&cancelAnimationFrame(G),G=requestAnimationFrame(we),U.value&&U.value.play().catch(()=>{}),D.value&&(D.value.muted=ye.value,D.value.volume=.85,D.value.play().catch(()=>{}))}function Qe(){H.value=!1,oe=0,G&&(cancelAnimationFrame(G),G=null),U.value&&U.value.pause(),D.value&&D.value.pause()}function j(){if(ye.value=!ye.value,D.value)if(D.value.muted=ye.value,D.value.volume=.85,!ye.value&&H.value){const T=s.audioStartOffset||0;D.value.currentTime=T+je.value%Math.max(1,te.value-T),D.value.play().catch(()=>{})}else D.value.pause()}function g(T){const b=T.target;b&&b.duration&&!isNaN(b.duration)&&isFinite(b.duration)&&(_e.value=Math.max(1,Math.floor(b.duration)),s.videoStartOffset&&s.videoStartOffset>=_e.value&&l("update:videoStartOffset",Math.max(0,_e.value-2))),U.value&&(U.value.currentTime=Math.min(s.videoStartOffset||0,K.value),H.value&&U.value.play().catch(()=>{}))}function se(T){const b=T.target;b&&b.duration&&!isNaN(b.duration)&&isFinite(b.duration)&&(te.value=Math.max(1,Math.floor(b.duration)),s.audioStartOffset&&s.audioStartOffset>=te.value&&l("update:audioStartOffset",Math.max(0,te.value-2))),D.value&&(D.value.muted=ye.value,D.value.volume=.85,D.value.currentTime=Math.min(s.audioStartOffset||0,pe.value),H.value&&!ye.value&&D.value.play().catch(()=>{}))}function Re(){if(!U.value)return;const T=Math.min(s.videoStartOffset||0,K.value);U.value.currentTime=T,H.value&&U.value.play().catch(()=>{})}function F(){if(!D.value)return;const T=Math.min(s.audioStartOffset||0,pe.value);D.value.currentTime=T,H.value&&!ye.value&&D.value.play().catch(()=>{})}function Ge(){if(!U.value)return;const T=Math.min(s.videoStartOffset||0,K.value),b=_e.value;U.value.currentTime>=b-.25&&(U.value.currentTime=T,H.value&&U.value.play().catch(()=>{}))}function Zt(){if(!D.value)return;const T=Math.min(s.audioStartOffset||0,pe.value),b=te.value;D.value.currentTime>=b-.25&&(D.value.currentTime=T,H.value&&!ye.value&&D.value.play().catch(()=>{}))}function nt(T){je.value=Math.min(Math.max(0,T),Pe.value),oe=performance.now();const b=Math.min(s.videoStartOffset||0,K.value),Se=Math.min(s.audioStartOffset||0,pe.value);if(U.value){const fe=b+T%Math.max(1,_e.value-b);U.value.currentTime=Math.min(fe,_e.value-.1)}if(D.value){const fe=Se+T%Math.max(1,te.value-Se);D.value.currentTime=Math.min(fe,te.value-.1)}}function yt(T){const b=Number(T.target.value);nt(b)}Te(()=>s.selectedVideo,(T,b)=>{b!==void 0&&T!==b&&(l("update:videoStartOffset",0),je.value=0,U.value&&(U.value.currentTime=0))}),Te(()=>s.selectedMusic,(T,b)=>{b!==void 0&&T!==b&&(l("update:audioStartOffset",0),D.value&&(D.value.currentTime=0))}),Te(()=>s.videoStartOffset,T=>{const b=Math.min(T||0,K.value);U.value&&(U.value.currentTime=b)}),Te(()=>s.audioStartOffset,T=>{const b=Math.min(T||0,pe.value);D.value&&(D.value.currentTime=b)});function ot(T){const b=Math.min(T,K.value);l("update:videoStartOffset",b),U.value&&(U.value.currentTime=b)}function Gt(T){const b=Math.min(T,pe.value);l("update:audioStartOffset",b),D.value&&(D.value.currentTime=b)}function Kt(){if(U.value){const T=Math.min(Math.floor(U.value.currentTime),K.value);ot(T)}}function At(T){const b=Math.floor(T/60),Se=Math.floor(T%60);return`${b.toString().padStart(2,"0")}:${Se.toString().padStart(2,"0")}`}async function Wt(){if(!s.data.caption)return;await _t(s.data.caption)&&($.value=!0,setTimeout(()=>{$.value=!1},2e3))}return Te(()=>d.value,()=>{const T=s.selectedVideo||"";(le.value[T]||r[T])&&(_e.value=le.value[T]||r[T]),za(()=>{nt(0)})}),Te(()=>x.value,()=>{const T=s.selectedMusic||"";(le.value[T]||r[T])&&(te.value=le.value[T]||r[T])}),Te(()=>c.value,T=>{T==="reels"?za(()=>{H.value&&O()}):D.value&&D.value.pause()}),(T,b)=>{const Se=Hs;return p(),f("div",Xu,[o.isGenerating?(p(),f("div",Qu,[e("div",ec,[b[8]||(b[8]=e("div",{class:"w-20 h-20 rounded-full border-4 border-sky-500/20 border-t-sky-400 border-r-indigo-500 animate-spin"},null,-1)),e("div",tc,[y(n(pt),{class:"w-8 h-8 text-sky-400 animate-pulse"})])]),b[10]||(b[10]=e("h3",{class:"text-base font-black text-white tracking-wide mb-1.5"}," Sedang Men-generate Konten... ",-1)),e("p",ac,[b[9]||(b[9]=e("span",{class:"w-2 h-2 rounded-full bg-sky-400 animate-ping"},null,-1)),e("span",null,m(o.generateStage||"Merender Gambar & Video Reels..."),1)]),b[11]||(b[11]=e("div",{class:"w-64 max-w-full bg-slate-900 border border-slate-800 rounded-full h-2.5 overflow-hidden shadow-inner mb-3"},[e("div",{class:"h-full bg-gradient-to-r from-sky-500 via-indigo-500 to-purple-500 rounded-full animate-pulse w-full"})],-1)),b[12]||(b[12]=e("span",{class:"text-[10px] text-slate-400 font-mono tracking-wider uppercase"}," Multi-Format Studio Engine • Mohon Tunggu Sebentar ",-1))])):M("",!0),e("div",sc,[e("div",nc,[e("button",{onClick:b[0]||(b[0]=fe=>c.value="feed"),class:E(["px-3 py-1.5 rounded-lg transition",n(c)==="feed"?"bg-sky-500 text-white shadow-md":"text-slate-400 hover:text-white"])}," Feed 4:5 ",2),e("button",{onClick:b[1]||(b[1]=fe=>c.value="story"),class:E(["px-3 py-1.5 rounded-lg transition",n(c)==="story"?"bg-indigo-500 text-white shadow-md":"text-slate-400 hover:text-white"])}," Story 9:16 ",2),e("button",{onClick:b[2]||(b[2]=fe=>c.value="reels"),class:E(["px-3 py-1.5 rounded-lg transition flex items-center gap-1.5",n(c)==="reels"?"bg-emerald-500 text-white shadow-md":"text-slate-400 hover:text-white"])},[b[13]||(b[13]=e("span",null,"Reels 9:16 (Video)",-1)),n(c)==="reels"&&n(H)?(p(),f("span",oc)):M("",!0)],2)]),e("div",lc,[e("div",ic,[e("button",{onClick:Ce,title:"Zoom Out (-15%)",class:"p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition"},[y(n(cn),{class:"w-3.5 h-3.5"})]),e("button",{onClick:ue,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"},m(Math.round(n(ne)*100))+"% ",1),e("button",{onClick:W,title:"Zoom In (+15%)",class:"p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition"},[y(n(un),{class:"w-3.5 h-3.5"})]),n(ne)!==1?(p(),f("button",{key:0,onClick:ue,title:"Reset ke Ukuran Pas",class:"p-1.5 rounded-lg text-amber-400 hover:bg-slate-800 transition"},[y(n(gs),{class:"w-3.5 h-3.5"})])):M("",!0)]),n(c)!=="feed"?(p(),f("button",{key:0,onClick:b[3]||(b[3]=fe=>C.value=!n(C)),class:E(["inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border text-xs font-bold transition shadow-sm",n(C)?"bg-sky-500/25 text-sky-300 border-sky-400/60":"bg-slate-950 text-slate-400 border-slate-800 hover:text-white"]),title:n(C)?"Sembunyikan Simulasi UI":"Tampilkan Simulasi Facebook Reels UI Asli"},[n(c)==="reels"?(p(),Me(n(Vt),{key:0,class:"w-3.5 h-3.5 text-sky-400"})):(p(),Me(n(en),{key:1,class:"w-3.5 h-3.5 text-indigo-400"})),e("span",dc,m(n(c)==="reels"?"Simulasi FB Reels UI":"Simulasi Story UI"),1),b[14]||(b[14]=e("span",{class:"sm:hidden"},"Simulasi UI",-1))],10,rc)):M("",!0)])]),e("div",{onWheel:ae,class:"relative flex-1 min-h-0 bg-slate-950/80 canvas-dot-bg border border-slate-800/80 rounded-2xl flex p-4 overflow-auto shadow-inner custom-scrollbar"},[e("div",{class:"m-auto flex-shrink-0 relative transition-all duration-200 ease-out",style:Ne({width:`${Math.round(n(ge)*n(ne))}px`,height:`${Math.round(n(Y)*n(ne))}px`})},[e("div",{class:"origin-top-left transition-transform duration-200 ease-out absolute top-0 left-0",style:Ne({width:`${n(ge)}px`,height:`${n(Y)}px`,transform:`scale(${n(ne)})`})},[n(c)==="feed"?(p(),f("div",uc,[e("div",cc,[y(Se,{data:o.data,mode:"feed","is-render":!0},null,8,["data"])])])):(p(),f("div",pc,[n(c)==="reels"?(p(),f("div",fc,[(p(),f("video",{ref_key:"videoElement",ref:U,key:n(d),autoplay:"",muted:"",playsinline:"",class:"w-full h-full object-cover brightness-90 contrast-105",src:n(d),onLoadedmetadata:g,onTimeupdate:Ge,onEnded:Re},null,40,mc)),b[15]||(b[15]=e("div",{class:"absolute inset-0 bg-slate-950/30 backdrop-blur-[0.5px]"},null,-1)),(p(),f("audio",{ref_key:"audioElement",ref:D,key:n(x),src:n(x),muted:n(ye),onLoadedmetadata:se,onTimeupdate:Zt,onEnded:F},null,40,xc))])):M("",!0),e("div",hc,[y(Se,{data:o.data,mode:n(c)==="reels"?"overlay":"story","is-render":!0},null,8,["data","mode"])]),n(C)?(p(),f("div",bc,[n(c)==="reels"?(p(),f(de,{key:0},[e("div",gc,[e("div",yc,[y(n(Ks),{class:"w-6 h-6 stroke-[2.4]"})]),e("div",vc,[y(n(qa),{class:"w-5 h-5 stroke-[2.2]"}),e("div",kc,[y(n(ca),{class:"w-4 h-4 stroke-[2.2]"})])])]),e("div",wc,[e("div",_c,[e("div",Sc,[y(n(sn),{class:"w-3.5 h-3.5 fill-white text-white"})]),b[16]||(b[16]=e("span",{class:"text-[9px] font-bold text-white drop-shadow"},"1",-1))]),e("div",Tc,[e("div",Cc,[y(n(Xs),{class:"w-3.5 h-3.5 text-white stroke-[2.2]"})]),b[17]||(b[17]=e("span",{class:"text-[9px] font-bold text-white drop-shadow"},"3",-1))]),e("div",Ac,[y(n(Xa),{class:"w-3.5 h-3.5 text-white stroke-[2.2]"})]),e("div",Oc,[y(n(Pt),{class:"w-3.5 h-3.5 text-white stroke-[2.2]"})]),e("div",Ic,[y(n(ca),{class:"w-3.5 h-3.5 text-white stroke-[2.2]"})])]),e("div",Nc,[e("div",Mc,[e("div",$c,m((o.data.watermark?.replace(/^@/,"")||"BK").slice(0,2).toUpperCase()),1),e("span",jc,m(o.data.watermark?.replace(/^@/,"")||"Brian Ken Junior"),1),b[18]||(b[18]=e("span",{class:"w-3 h-3 rounded-full bg-[#1877F2] text-white flex items-center justify-center text-[7.5px] font-black shadow-sm flex-shrink-0"}," ✓ ",-1)),y(n(hs),{class:"w-2.5 h-2.5 text-white/80 flex-shrink-0"})]),e("div",Dc,[y(n(Lt),{class:"w-2.5 h-2.5 flex-shrink-0 text-white"}),e("span",Ec,m(o.data.watermark?.replace(/^@/,"")||"Brian Ken Junior")+" • Audio asli",1)]),e("p",Rc,[z(m(o.data.viralCaption||o.data.subtitle||"Financial advisors still say rent shouldn't...")+" ",1),b[19]||(b[19]=e("span",{class:"text-white font-bold ml-1 cursor-pointer"},"selengkapnya",-1))]),e("div",Pc,[e("div",Vc,[y(n(nn),{class:"w-2.5 h-2.5 text-white stroke-[2.5]"}),b[20]||(b[20]=e("span",null,"Lihat insight",-1))])]),e("div",Lc,[e("div",Bc,[y(n(qa),{class:"w-3 h-3 text-white/80 flex-shrink-0"}),e("span",Uc,m(o.data.title||"Vienna public housing"),1)]),y(n(ca),{class:"w-3 h-3 text-white/60 flex-shrink-0"})]),e("div",Fc,[b[22]||(b[22]=e("span",{class:"text-white/60"},"Tambahkan komentar",-1)),e("div",Hc,[y(n(Zs),{class:"w-2.5 h-2.5 text-white/70"}),y(n(an),{class:"w-2.5 h-2.5 text-white/70"}),b[21]||(b[21]=e("span",{class:"text-[7.5px] font-bold px-1 rounded border border-white/40 text-white/80 leading-none py-0.5"},"GIF",-1))])])])],64)):(p(),f(de,{key:1},[e("div",Jc,[b[25]||(b[25]=e("div",{class:"flex gap-1 w-full"},[e("div",{class:"h-0.5 flex-1 bg-white rounded-full"}),e("div",{class:"h-0.5 flex-1 bg-white/40 rounded-full"}),e("div",{class:"h-0.5 flex-1 bg-white/40 rounded-full"})],-1)),e("div",zc,[e("div",Zc,[b[23]||(b[23]=e("div",{class:"w-4 h-4 rounded-full bg-gradient-to-tr from-amber-500 to-rose-500 p-0.5"},[e("div",{class:"w-full h-full bg-black rounded-full"})],-1)),e("span",Gc,m(o.data.watermark?.replace(/^@/,"")||"akunkreator"),1),b[24]||(b[24]=e("span",{class:"text-[8px] text-white/60"},"2j",-1))])])]),e("div",Kc,[b[26]||(b[26]=e("div",{class:"flex-1 h-7 rounded-full border border-white/30 bg-black/20 px-3 flex items-center text-[9px] text-white/50"}," Kirim pesan... ",-1)),y(n(qs),{class:"w-4 h-4 text-white/90"}),y(n(Xa),{class:"w-4 h-4 text-white/90"})])],64))])):M("",!0)]))],4)],4)],32),n(c)==="reels"?(p(),f("div",Wc,[e("div",qc,[e("button",{onClick:ie,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",title:n(H)?"Pause Preview":"Putar Preview"},[n(H)?(p(),Me(n(Qs),{key:0,class:"w-3.5 h-3.5 fill-current"})):(p(),Me(n(bs),{key:1,class:"w-3.5 h-3.5 fill-current"})),e("span",Xc,m(n(H)?"Pause":"Play"),1)],8,Yc),e("div",Qc,[e("input",{type:"range",min:"0",max:n(Pe),step:"0.1",value:n(je),onInput:yt,class:"flex-1 h-1.5 bg-slate-950 rounded-lg appearance-none cursor-pointer accent-emerald-500 hover:accent-emerald-400"},null,40,e0),e("span",t0,m(At(n(je)))+" / "+m(At(n(Pe))),1)]),e("button",{onClick:j,class:E(["px-2.5 py-2 rounded-xl border transition flex items-center gap-1.5 font-bold text-[11px]",n(ye)?"bg-slate-950 text-slate-400 border-slate-800 hover:text-white":"bg-purple-600/40 text-purple-200 border-purple-500/60 shadow-md ring-1 ring-purple-500/40"]),title:n(ye)?"Aktifkan Suara Musik (Unmute)":"Matikan Suara Musik (Mute)"},[n(ye)?(p(),Me(n(rn),{key:1,class:"w-3.5 h-3.5"})):(p(),Me(n(ln),{key:0,class:"w-3.5 h-3.5 text-purple-300 animate-pulse"})),e("span",null,m(n(ye)?"Muted":"Audio ON"),1)],10,a0),e("button",{onClick:b[4]||(b[4]=fe=>w.value=!n(w)),class:E(["px-2.5 py-2 rounded-xl border text-[11px] font-bold flex items-center gap-1.5 transition",n(w)?"bg-sky-500/20 text-sky-300 border-sky-500/50":"bg-slate-950 text-slate-400 border-slate-800 hover:text-white"]),title:"Atur Detik Awal Video & Musik"},[y(n(xa),{class:"w-3.5 h-3.5 text-sky-400"}),b[27]||(b[27]=e("span",{class:"hidden sm:inline"},"Trim Offset",-1))],2)]),n(w)?(p(),f("div",s0,[e("div",n0,[e("div",o0,[e("span",l0,[y(n(Vt),{class:"w-3 h-3"}),z(" Mulai Video: "+m(Math.min(o.videoStartOffset||0,n(K)))+"s / "+m(n(_e))+"s ",1)]),e("button",{onClick:Kt,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 ")]),e("input",{type:"range",min:"0",max:n(K),step:"1",value:Math.min(o.videoStartOffset||0,n(K)),onInput:b[5]||(b[5]=fe=>ot(Number(fe.target.value))),class:"w-full h-1 bg-slate-900 rounded appearance-none cursor-pointer accent-sky-400"},null,40,i0),e("div",r0," Maksimal offset: "+m(n(K))+" detik (panjang asli video: "+m(n(_e))+"s) ",1)]),e("div",d0,[e("div",u0,[e("span",c0,[y(n(Lt),{class:"w-3 h-3"}),z(" Mulai Musik: "+m(Math.min(o.audioStartOffset||0,n(pe)))+"s / "+m(n(te))+"s ",1)]),b[28]||(b[28]=e("span",{class:"text-[10px] text-slate-500 font-mono"}," (Skip intro) ",-1))]),e("input",{type:"range",min:"0",max:n(pe),step:"1",value:Math.min(o.audioStartOffset||0,n(pe)),onInput:b[6]||(b[6]=fe=>Gt(Number(fe.target.value))),class:"w-full h-1 bg-slate-900 rounded appearance-none cursor-pointer accent-purple-400"},null,40,p0),e("div",f0," Maksimal offset: "+m(n(pe))+" detik (panjang asli musik: "+m(n(te))+"s) ",1)])])):M("",!0)])):M("",!0),e("div",m0,[e("div",x0,[b[29]||(b[29]=e("span",{class:"font-extrabold text-slate-300 text-[11px]"},"VIRAL CAPTION & HASHTAGS",-1)),e("button",{onClick:Wt,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"},[n($)?(p(),Me(n(at),{key:0,class:"w-3.5 h-3.5 text-emerald-400"})):(p(),Me(n(We),{key:1,class:"w-3.5 h-3.5"})),e("span",null,m(n($)?"Tersalin!":"Copy Caption"),1)])]),e("textarea",{value:o.data.caption,onInput:b[7]||(b[7]=fe=>o.data.caption=fe.target.value),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..."},null,40,h0)])])}}}),g0=Us(b0,[["__scopeId","data-v-8e58b0d4"]]);var Z;(function(o){o.assertEqual=r=>{};function t(r){}o.assertIs=t;function s(r){throw new Error}o.assertNever=s,o.arrayToEnum=r=>{const d={};for(const x of r)d[x]=x;return d},o.getValidEnumValues=r=>{const d=o.objectKeys(r).filter(c=>typeof r[r[c]]!="number"),x={};for(const c of d)x[c]=r[c];return o.objectValues(x)},o.objectValues=r=>o.objectKeys(r).map(function(d){return r[d]}),o.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const d=[];for(const x in r)Object.prototype.hasOwnProperty.call(r,x)&&d.push(x);return d},o.find=(r,d)=>{for(const x of r)if(d(x))return x},o.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function l(r,d=" | "){return r.map(x=>typeof x=="string"?`'${x}'`:x).join(d)}o.joinValues=l,o.jsonStringifyReplacer=(r,d)=>typeof d=="bigint"?d.toString():d})(Z||(Z={}));var Qa;(function(o){o.mergeShapes=(t,s)=>({...t,...s})})(Qa||(Qa={}));const A=Z.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qe=o=>{switch(typeof o){case"undefined":return A.undefined;case"string":return A.string;case"number":return Number.isNaN(o)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(o)?A.array:o===null?A.null:o.then&&typeof o.then=="function"&&o.catch&&typeof o.catch=="function"?A.promise:typeof Map<"u"&&o instanceof Map?A.map:typeof Set<"u"&&o instanceof Set?A.set:typeof Date<"u"&&o instanceof Date?A.date:A.object;default:return A.unknown}},k=Z.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ze extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=t}format(t){const s=t||function(d){return d.message},l={_errors:[]},r=d=>{for(const x of d.issues)if(x.code==="invalid_union")x.unionErrors.map(r);else if(x.code==="invalid_return_type")r(x.returnTypeError);else if(x.code==="invalid_arguments")r(x.argumentsError);else if(x.path.length===0)l._errors.push(s(x));else{let c=l,C=0;for(;C<x.path.length;){const w=x.path[C];C===x.path.length-1?(c[w]=c[w]||{_errors:[]},c[w]._errors.push(s(x))):c[w]=c[w]||{_errors:[]},c=c[w],C++}}};return r(this),l}static assert(t){if(!(t instanceof Ze))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Z.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=s=>s.message){const s={},l=[];for(const r of this.issues)if(r.path.length>0){const d=r.path[0];s[d]=s[d]||[],s[d].push(t(r))}else l.push(t(r));return{formErrors:l,fieldErrors:s}}get formErrors(){return this.flatten()}}Ze.create=o=>new Ze(o);const ha=(o,t)=>{let s;switch(o.code){case k.invalid_type:o.received===A.undefined?s="Required":s=`Expected ${o.expected}, received ${o.received}`;break;case k.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(o.expected,Z.jsonStringifyReplacer)}`;break;case k.unrecognized_keys:s=`Unrecognized key(s) in object: ${Z.joinValues(o.keys,", ")}`;break;case k.invalid_union:s="Invalid input";break;case k.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${Z.joinValues(o.options)}`;break;case k.invalid_enum_value:s=`Invalid enum value. Expected ${Z.joinValues(o.options)}, received '${o.received}'`;break;case k.invalid_arguments:s="Invalid function arguments";break;case k.invalid_return_type:s="Invalid function return type";break;case k.invalid_date:s="Invalid date";break;case k.invalid_string:typeof o.validation=="object"?"includes"in o.validation?(s=`Invalid input: must include "${o.validation.includes}"`,typeof o.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${o.validation.position}`)):"startsWith"in o.validation?s=`Invalid input: must start with "${o.validation.startsWith}"`:"endsWith"in o.validation?s=`Invalid input: must end with "${o.validation.endsWith}"`:Z.assertNever(o.validation):o.validation!=="regex"?s=`Invalid ${o.validation}`:s="Invalid";break;case k.too_small:o.type==="array"?s=`Array must contain ${o.exact?"exactly":o.inclusive?"at least":"more than"} ${o.minimum} element(s)`:o.type==="string"?s=`String must contain ${o.exact?"exactly":o.inclusive?"at least":"over"} ${o.minimum} character(s)`:o.type==="number"?s=`Number must be ${o.exact?"exactly equal to ":o.inclusive?"greater than or equal to ":"greater than "}${o.minimum}`:o.type==="bigint"?s=`Number must be ${o.exact?"exactly equal to ":o.inclusive?"greater than or equal to ":"greater than "}${o.minimum}`:o.type==="date"?s=`Date must be ${o.exact?"exactly equal to ":o.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(o.minimum))}`:s="Invalid input";break;case k.too_big:o.type==="array"?s=`Array must contain ${o.exact?"exactly":o.inclusive?"at most":"less than"} ${o.maximum} element(s)`:o.type==="string"?s=`String must contain ${o.exact?"exactly":o.inclusive?"at most":"under"} ${o.maximum} character(s)`:o.type==="number"?s=`Number must be ${o.exact?"exactly":o.inclusive?"less than or equal to":"less than"} ${o.maximum}`:o.type==="bigint"?s=`BigInt must be ${o.exact?"exactly":o.inclusive?"less than or equal to":"less than"} ${o.maximum}`:o.type==="date"?s=`Date must be ${o.exact?"exactly":o.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(o.maximum))}`:s="Invalid input";break;case k.custom:s="Invalid input";break;case k.invalid_intersection_types:s="Intersection results could not be merged";break;case k.not_multiple_of:s=`Number must be a multiple of ${o.multipleOf}`;break;case k.not_finite:s="Number must be finite";break;default:s=t.defaultError,Z.assertNever(o)}return{message:s}};let y0=ha;function v0(){return y0}const k0=o=>{const{data:t,path:s,errorMaps:l,issueData:r}=o,d=[...s,...r.path||[]],x={...r,path:d};if(r.message!==void 0)return{...r,path:d,message:r.message};let c="";const C=l.filter(w=>!!w).slice().reverse();for(const w of C)c=w(x,{data:t,defaultError:c}).message;return{...r,path:d,message:c}};function S(o,t){const s=v0(),l=k0({issueData:t,data:o.data,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,s,s===ha?void 0:ha].filter(r=>!!r)});o.common.issues.push(l)}class $e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,s){const l=[];for(const r of s){if(r.status==="aborted")return V;r.status==="dirty"&&t.dirty(),l.push(r.value)}return{status:t.value,value:l}}static async mergeObjectAsync(t,s){const l=[];for(const r of s){const d=await r.key,x=await r.value;l.push({key:d,value:x})}return $e.mergeObjectSync(t,l)}static mergeObjectSync(t,s){const l={};for(const r of s){const{key:d,value:x}=r;if(d.status==="aborted"||x.status==="aborted")return V;d.status==="dirty"&&t.dirty(),x.status==="dirty"&&t.dirty(),d.value!=="__proto__"&&(typeof x.value<"u"||r.alwaysSet)&&(l[d.value]=x.value)}return{status:t.value,value:l}}}const V=Object.freeze({status:"aborted"}),St=o=>({status:"dirty",value:o}),Ee=o=>({status:"valid",value:o}),es=o=>o.status==="aborted",ts=o=>o.status==="dirty",mt=o=>o.status==="valid",Bt=o=>typeof Promise<"u"&&o instanceof Promise;var I;(function(o){o.errToObj=t=>typeof t=="string"?{message:t}:t||{},o.toString=t=>typeof t=="string"?t:t?.message})(I||(I={}));class He{constructor(t,s,l,r){this._cachedPath=[],this.parent=t,this.data=s,this._path=l,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const as=(o,t)=>{if(mt(t))return{success:!0,data:t.value};if(!o.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new Ze(o.common.issues);return this._error=s,this._error}}};function B(o){if(!o)return{};const{errorMap:t,invalid_type_error:s,required_error:l,description:r}=o;if(t&&(s||l))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(x,c)=>{const{message:C}=o;return x.code==="invalid_enum_value"?{message:C??c.defaultError}:typeof c.data>"u"?{message:C??l??c.defaultError}:x.code!=="invalid_type"?{message:c.defaultError}:{message:C??s??c.defaultError}},description:r}}class J{get description(){return this._def.description}_getType(t){return qe(t.data)}_getOrReturnCtx(t,s){return s||{common:t.parent.common,data:t.data,parsedType:qe(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $e,ctx:{common:t.parent.common,data:t.data,parsedType:qe(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const s=this._parse(t);if(Bt(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(t){const s=this._parse(t);return Promise.resolve(s)}parse(t,s){const l=this.safeParse(t,s);if(l.success)return l.data;throw l.error}safeParse(t,s){const l={common:{issues:[],async:s?.async??!1,contextualErrorMap:s?.errorMap},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qe(t)},r=this._parseSync({data:t,path:l.path,parent:l});return as(l,r)}"~validate"(t){const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qe(t)};if(!this["~standard"].async)try{const l=this._parseSync({data:t,path:[],parent:s});return mt(l)?{value:l.value}:{issues:s.common.issues}}catch(l){l?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(l=>mt(l)?{value:l.value}:{issues:s.common.issues})}async parseAsync(t,s){const l=await this.safeParseAsync(t,s);if(l.success)return l.data;throw l.error}async safeParseAsync(t,s){const l={common:{issues:[],contextualErrorMap:s?.errorMap,async:!0},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qe(t)},r=this._parse({data:t,path:l.path,parent:l}),d=await(Bt(r)?r:Promise.resolve(r));return as(l,d)}refine(t,s){const l=r=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(r):s;return this._refinement((r,d)=>{const x=t(r),c=()=>d.addIssue({code:k.custom,...l(r)});return typeof Promise<"u"&&x instanceof Promise?x.then(C=>C?!0:(c(),!1)):x?!0:(c(),!1)})}refinement(t,s){return this._refinement((l,r)=>t(l)?!0:(r.addIssue(typeof s=="function"?s(l,r):s),!1))}_refinement(t){return new bt({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return Ye.create(this,this._def)}nullable(){return gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Fe.create(this)}promise(){return zt.create(this,this._def)}or(t){return Ft.create([this,t],this._def)}and(t){return Ht.create(this,t,this._def)}transform(t){return new bt({...B(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const s=typeof t=="function"?t:()=>t;return new ya({...B(this._def),innerType:this,defaultValue:s,typeName:P.ZodDefault})}brand(){return new J0({typeName:P.ZodBranded,type:this,...B(this._def)})}catch(t){const s=typeof t=="function"?t:()=>t;return new va({...B(this._def),innerType:this,catchValue:s,typeName:P.ZodCatch})}describe(t){const s=this.constructor;return new s({...this._def,description:t})}pipe(t){return Sa.create(this,t)}readonly(){return ka.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const w0=/^c[^\s-]{8,}$/i,_0=/^[0-9a-z]+$/,S0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,T0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,C0=/^[a-z0-9_-]{21}$/i,A0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,O0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,I0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,N0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let fa;const M0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,j0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,D0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,E0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,R0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ys="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",P0=new RegExp(`^${ys}$`);function vs(o){let t="[0-5]\\d";o.precision?t=`${t}\\.\\d{${o.precision}}`:o.precision==null&&(t=`${t}(\\.\\d+)?`);const s=o.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${s}`}function V0(o){return new RegExp(`^${vs(o)}$`)}function L0(o){let t=`${ys}T${vs(o)}`;const s=[];return s.push(o.local?"Z?":"Z"),o.offset&&s.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${s.join("|")})`,new RegExp(`^${t}$`)}function B0(o,t){return!!((t==="v4"||!t)&&M0.test(o)||(t==="v6"||!t)&&j0.test(o))}function U0(o,t){if(!A0.test(o))return!1;try{const[s]=o.split(".");if(!s)return!1;const l=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),r=JSON.parse(atob(l));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function F0(o,t){return!!((t==="v4"||!t)&&$0.test(o)||(t==="v6"||!t)&&D0.test(o))}class ze extends J{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==A.string){const d=this._getOrReturnCtx(t);return S(d,{code:k.invalid_type,expected:A.string,received:d.parsedType}),V}const l=new $e;let r;for(const d of this._def.checks)if(d.kind==="min")t.data.length<d.value&&(r=this._getOrReturnCtx(t,r),S(r,{code:k.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),l.dirty());else if(d.kind==="max")t.data.length>d.value&&(r=this._getOrReturnCtx(t,r),S(r,{code:k.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),l.dirty());else if(d.kind==="length"){const x=t.data.length>d.value,c=t.data.length<d.value;(x||c)&&(r=this._getOrReturnCtx(t,r),x?S(r,{code:k.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}):c&&S(r,{code:k.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}),l.dirty())}else if(d.kind==="email")I0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"email",code:k.invalid_string,message:d.message}),l.dirty());else if(d.kind==="emoji")fa||(fa=new RegExp(N0,"u")),fa.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"emoji",code:k.invalid_string,message:d.message}),l.dirty());else if(d.kind==="uuid")T0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"uuid",code:k.invalid_string,message:d.message}),l.dirty());else if(d.kind==="nanoid")C0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"nanoid",code:k.invalid_string,message:d.message}),l.dirty());else if(d.kind==="cuid")w0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"cuid",code:k.invalid_string,message:d.message}),l.dirty());else if(d.kind==="cuid2")_0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"cuid2",code:k.invalid_string,message:d.message}),l.dirty());else if(d.kind==="ulid")S0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"ulid",code:k.invalid_string,message:d.message}),l.dirty());else if(d.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),S(r,{validation:"url",code:k.invalid_string,message:d.message}),l.dirty()}else d.kind==="regex"?(d.regex.lastIndex=0,d.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"regex",code:k.invalid_string,message:d.message}),l.dirty())):d.kind==="trim"?t.data=t.data.trim():d.kind==="includes"?t.data.includes(d.value,d.position)||(r=this._getOrReturnCtx(t,r),S(r,{code:k.invalid_string,validation:{includes:d.value,position:d.position},message:d.message}),l.dirty()):d.kind==="toLowerCase"?t.data=t.data.toLowerCase():d.kind==="toUpperCase"?t.data=t.data.toUpperCase():d.kind==="startsWith"?t.data.startsWith(d.value)||(r=this._getOrReturnCtx(t,r),S(r,{code:k.invalid_string,validation:{startsWith:d.value},message:d.message}),l.dirty()):d.kind==="endsWith"?t.data.endsWith(d.value)||(r=this._getOrReturnCtx(t,r),S(r,{code:k.invalid_string,validation:{endsWith:d.value},message:d.message}),l.dirty()):d.kind==="datetime"?L0(d).test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{code:k.invalid_string,validation:"datetime",message:d.message}),l.dirty()):d.kind==="date"?P0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{code:k.invalid_string,validation:"date",message:d.message}),l.dirty()):d.kind==="time"?V0(d).test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{code:k.invalid_string,validation:"time",message:d.message}),l.dirty()):d.kind==="duration"?O0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"duration",code:k.invalid_string,message:d.message}),l.dirty()):d.kind==="ip"?B0(t.data,d.version)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"ip",code:k.invalid_string,message:d.message}),l.dirty()):d.kind==="jwt"?U0(t.data,d.alg)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"jwt",code:k.invalid_string,message:d.message}),l.dirty()):d.kind==="cidr"?F0(t.data,d.version)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"cidr",code:k.invalid_string,message:d.message}),l.dirty()):d.kind==="base64"?E0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"base64",code:k.invalid_string,message:d.message}),l.dirty()):d.kind==="base64url"?R0.test(t.data)||(r=this._getOrReturnCtx(t,r),S(r,{validation:"base64url",code:k.invalid_string,message:d.message}),l.dirty()):Z.assertNever(d);return{status:l.value,value:t.data}}_regex(t,s,l){return this.refinement(r=>t.test(r),{validation:s,code:k.invalid_string,...I.errToObj(l)})}_addCheck(t){return new ze({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...I.errToObj(t)})}url(t){return this._addCheck({kind:"url",...I.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...I.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...I.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...I.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...I.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...I.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...I.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...I.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...I.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...I.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...I.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...I.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...I.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...I.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...I.errToObj(t)})}regex(t,s){return this._addCheck({kind:"regex",regex:t,...I.errToObj(s)})}includes(t,s){return this._addCheck({kind:"includes",value:t,position:s?.position,...I.errToObj(s?.message)})}startsWith(t,s){return this._addCheck({kind:"startsWith",value:t,...I.errToObj(s)})}endsWith(t,s){return this._addCheck({kind:"endsWith",value:t,...I.errToObj(s)})}min(t,s){return this._addCheck({kind:"min",value:t,...I.errToObj(s)})}max(t,s){return this._addCheck({kind:"max",value:t,...I.errToObj(s)})}length(t,s){return this._addCheck({kind:"length",value:t,...I.errToObj(s)})}nonempty(t){return this.min(1,I.errToObj(t))}trim(){return new ze({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ze({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ze({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxLength(){let t=null;for(const s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}}ze.create=o=>new ze({checks:[],typeName:P.ZodString,coerce:o?.coerce??!1,...B(o)});function H0(o,t){const s=(o.toString().split(".")[1]||"").length,l=(t.toString().split(".")[1]||"").length,r=s>l?s:l,d=Number.parseInt(o.toFixed(r).replace(".","")),x=Number.parseInt(t.toFixed(r).replace(".",""));return d%x/10**r}class xt extends J{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==A.number){const d=this._getOrReturnCtx(t);return S(d,{code:k.invalid_type,expected:A.number,received:d.parsedType}),V}let l;const r=new $e;for(const d of this._def.checks)d.kind==="int"?Z.isInteger(t.data)||(l=this._getOrReturnCtx(t,l),S(l,{code:k.invalid_type,expected:"integer",received:"float",message:d.message}),r.dirty()):d.kind==="min"?(d.inclusive?t.data<d.value:t.data<=d.value)&&(l=this._getOrReturnCtx(t,l),S(l,{code:k.too_small,minimum:d.value,type:"number",inclusive:d.inclusive,exact:!1,message:d.message}),r.dirty()):d.kind==="max"?(d.inclusive?t.data>d.value:t.data>=d.value)&&(l=this._getOrReturnCtx(t,l),S(l,{code:k.too_big,maximum:d.value,type:"number",inclusive:d.inclusive,exact:!1,message:d.message}),r.dirty()):d.kind==="multipleOf"?H0(t.data,d.value)!==0&&(l=this._getOrReturnCtx(t,l),S(l,{code:k.not_multiple_of,multipleOf:d.value,message:d.message}),r.dirty()):d.kind==="finite"?Number.isFinite(t.data)||(l=this._getOrReturnCtx(t,l),S(l,{code:k.not_finite,message:d.message}),r.dirty()):Z.assertNever(d);return{status:r.value,value:t.data}}gte(t,s){return this.setLimit("min",t,!0,I.toString(s))}gt(t,s){return this.setLimit("min",t,!1,I.toString(s))}lte(t,s){return this.setLimit("max",t,!0,I.toString(s))}lt(t,s){return this.setLimit("max",t,!1,I.toString(s))}setLimit(t,s,l,r){return new xt({...this._def,checks:[...this._def.checks,{kind:t,value:s,inclusive:l,message:I.toString(r)}]})}_addCheck(t){return new xt({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:I.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(t)})}multipleOf(t,s){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(s)})}finite(t){return this._addCheck({kind:"finite",message:I.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(t)})}get minValue(){let t=null;for(const s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxValue(){let t=null;for(const s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Z.isInteger(t.value))}get isFinite(){let t=null,s=null;for(const l of this._def.checks){if(l.kind==="finite"||l.kind==="int"||l.kind==="multipleOf")return!0;l.kind==="min"?(s===null||l.value>s)&&(s=l.value):l.kind==="max"&&(t===null||l.value<t)&&(t=l.value)}return Number.isFinite(s)&&Number.isFinite(t)}}xt.create=o=>new xt({checks:[],typeName:P.ZodNumber,coerce:o?.coerce||!1,...B(o)});class Tt extends J{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==A.bigint)return this._getInvalidInput(t);let l;const r=new $e;for(const d of this._def.checks)d.kind==="min"?(d.inclusive?t.data<d.value:t.data<=d.value)&&(l=this._getOrReturnCtx(t,l),S(l,{code:k.too_small,type:"bigint",minimum:d.value,inclusive:d.inclusive,message:d.message}),r.dirty()):d.kind==="max"?(d.inclusive?t.data>d.value:t.data>=d.value)&&(l=this._getOrReturnCtx(t,l),S(l,{code:k.too_big,type:"bigint",maximum:d.value,inclusive:d.inclusive,message:d.message}),r.dirty()):d.kind==="multipleOf"?t.data%d.value!==BigInt(0)&&(l=this._getOrReturnCtx(t,l),S(l,{code:k.not_multiple_of,multipleOf:d.value,message:d.message}),r.dirty()):Z.assertNever(d);return{status:r.value,value:t.data}}_getInvalidInput(t){const s=this._getOrReturnCtx(t);return S(s,{code:k.invalid_type,expected:A.bigint,received:s.parsedType}),V}gte(t,s){return this.setLimit("min",t,!0,I.toString(s))}gt(t,s){return this.setLimit("min",t,!1,I.toString(s))}lte(t,s){return this.setLimit("max",t,!0,I.toString(s))}lt(t,s){return this.setLimit("max",t,!1,I.toString(s))}setLimit(t,s,l,r){return new Tt({...this._def,checks:[...this._def.checks,{kind:t,value:s,inclusive:l,message:I.toString(r)}]})}_addCheck(t){return new Tt({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(t)})}multipleOf(t,s){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(s)})}get minValue(){let t=null;for(const s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxValue(){let t=null;for(const s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}}Tt.create=o=>new Tt({checks:[],typeName:P.ZodBigInt,coerce:o?.coerce??!1,...B(o)});class ss extends J{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==A.boolean){const l=this._getOrReturnCtx(t);return S(l,{code:k.invalid_type,expected:A.boolean,received:l.parsedType}),V}return Ee(t.data)}}ss.create=o=>new ss({typeName:P.ZodBoolean,coerce:o?.coerce||!1,...B(o)});class Ut extends J{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==A.date){const d=this._getOrReturnCtx(t);return S(d,{code:k.invalid_type,expected:A.date,received:d.parsedType}),V}if(Number.isNaN(t.data.getTime())){const d=this._getOrReturnCtx(t);return S(d,{code:k.invalid_date}),V}const l=new $e;let r;for(const d of this._def.checks)d.kind==="min"?t.data.getTime()<d.value&&(r=this._getOrReturnCtx(t,r),S(r,{code:k.too_small,message:d.message,inclusive:!0,exact:!1,minimum:d.value,type:"date"}),l.dirty()):d.kind==="max"?t.data.getTime()>d.value&&(r=this._getOrReturnCtx(t,r),S(r,{code:k.too_big,message:d.message,inclusive:!0,exact:!1,maximum:d.value,type:"date"}),l.dirty()):Z.assertNever(d);return{status:l.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ut({...this._def,checks:[...this._def.checks,t]})}min(t,s){return this._addCheck({kind:"min",value:t.getTime(),message:I.toString(s)})}max(t,s){return this._addCheck({kind:"max",value:t.getTime(),message:I.toString(s)})}get minDate(){let t=null;for(const s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t!=null?new Date(t):null}}Ut.create=o=>new Ut({checks:[],coerce:o?.coerce||!1,typeName:P.ZodDate,...B(o)});class ns extends J{_parse(t){if(this._getType(t)!==A.symbol){const l=this._getOrReturnCtx(t);return S(l,{code:k.invalid_type,expected:A.symbol,received:l.parsedType}),V}return Ee(t.data)}}ns.create=o=>new ns({typeName:P.ZodSymbol,...B(o)});class os extends J{_parse(t){if(this._getType(t)!==A.undefined){const l=this._getOrReturnCtx(t);return S(l,{code:k.invalid_type,expected:A.undefined,received:l.parsedType}),V}return Ee(t.data)}}os.create=o=>new os({typeName:P.ZodUndefined,...B(o)});class ls extends J{_parse(t){if(this._getType(t)!==A.null){const l=this._getOrReturnCtx(t);return S(l,{code:k.invalid_type,expected:A.null,received:l.parsedType}),V}return Ee(t.data)}}ls.create=o=>new ls({typeName:P.ZodNull,...B(o)});class ba extends J{constructor(){super(...arguments),this._any=!0}_parse(t){return Ee(t.data)}}ba.create=o=>new ba({typeName:P.ZodAny,...B(o)});class is extends J{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ee(t.data)}}is.create=o=>new is({typeName:P.ZodUnknown,...B(o)});class Xe extends J{_parse(t){const s=this._getOrReturnCtx(t);return S(s,{code:k.invalid_type,expected:A.never,received:s.parsedType}),V}}Xe.create=o=>new Xe({typeName:P.ZodNever,...B(o)});class rs extends J{_parse(t){if(this._getType(t)!==A.undefined){const l=this._getOrReturnCtx(t);return S(l,{code:k.invalid_type,expected:A.void,received:l.parsedType}),V}return Ee(t.data)}}rs.create=o=>new rs({typeName:P.ZodVoid,...B(o)});class Fe extends J{_parse(t){const{ctx:s,status:l}=this._processInputParams(t),r=this._def;if(s.parsedType!==A.array)return S(s,{code:k.invalid_type,expected:A.array,received:s.parsedType}),V;if(r.exactLength!==null){const x=s.data.length>r.exactLength.value,c=s.data.length<r.exactLength.value;(x||c)&&(S(s,{code:x?k.too_big:k.too_small,minimum:c?r.exactLength.value:void 0,maximum:x?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),l.dirty())}if(r.minLength!==null&&s.data.length<r.minLength.value&&(S(s,{code:k.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),l.dirty()),r.maxLength!==null&&s.data.length>r.maxLength.value&&(S(s,{code:k.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),l.dirty()),s.common.async)return Promise.all([...s.data].map((x,c)=>r.type._parseAsync(new He(s,x,s.path,c)))).then(x=>$e.mergeArray(l,x));const d=[...s.data].map((x,c)=>r.type._parseSync(new He(s,x,s.path,c)));return $e.mergeArray(l,d)}get element(){return this._def.type}min(t,s){return new Fe({...this._def,minLength:{value:t,message:I.toString(s)}})}max(t,s){return new Fe({...this._def,maxLength:{value:t,message:I.toString(s)}})}length(t,s){return new Fe({...this._def,exactLength:{value:t,message:I.toString(s)}})}nonempty(t){return this.min(1,t)}}Fe.create=(o,t)=>new Fe({type:o,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...B(t)});function ft(o){if(o instanceof xe){const t={};for(const s in o.shape){const l=o.shape[s];t[s]=Ye.create(ft(l))}return new xe({...o._def,shape:()=>t})}else return o instanceof Fe?new Fe({...o._def,type:ft(o.element)}):o instanceof Ye?Ye.create(ft(o.unwrap())):o instanceof gt?gt.create(ft(o.unwrap())):o instanceof st?st.create(o.items.map(t=>ft(t))):o}class xe extends J{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),s=Z.objectKeys(t);return this._cached={shape:t,keys:s},this._cached}_parse(t){if(this._getType(t)!==A.object){const w=this._getOrReturnCtx(t);return S(w,{code:k.invalid_type,expected:A.object,received:w.parsedType}),V}const{status:l,ctx:r}=this._processInputParams(t),{shape:d,keys:x}=this._getCached(),c=[];if(!(this._def.catchall instanceof Xe&&this._def.unknownKeys==="strip"))for(const w in r.data)x.includes(w)||c.push(w);const C=[];for(const w of x){const $=d[w],ne=r.data[w];C.push({key:{status:"valid",value:w},value:$._parse(new He(r,ne,r.path,w)),alwaysSet:w in r.data})}if(this._def.catchall instanceof Xe){const w=this._def.unknownKeys;if(w==="passthrough")for(const $ of c)C.push({key:{status:"valid",value:$},value:{status:"valid",value:r.data[$]}});else if(w==="strict")c.length>0&&(S(r,{code:k.unrecognized_keys,keys:c}),l.dirty());else if(w!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const w=this._def.catchall;for(const $ of c){const ne=r.data[$];C.push({key:{status:"valid",value:$},value:w._parse(new He(r,ne,r.path,$)),alwaysSet:$ in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const w=[];for(const $ of C){const ne=await $.key,ge=await $.value;w.push({key:ne,value:ge,alwaysSet:$.alwaysSet})}return w}).then(w=>$e.mergeObjectSync(l,w)):$e.mergeObjectSync(l,C)}get shape(){return this._def.shape()}strict(t){return I.errToObj,new xe({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(s,l)=>{const r=this._def.errorMap?.(s,l).message??l.defaultError;return s.code==="unrecognized_keys"?{message:I.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new xe({...this._def,unknownKeys:"strip"})}passthrough(){return new xe({...this._def,unknownKeys:"passthrough"})}extend(t){return new xe({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new xe({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(t,s){return this.augment({[t]:s})}catchall(t){return new xe({...this._def,catchall:t})}pick(t){const s={};for(const l of Z.objectKeys(t))t[l]&&this.shape[l]&&(s[l]=this.shape[l]);return new xe({...this._def,shape:()=>s})}omit(t){const s={};for(const l of Z.objectKeys(this.shape))t[l]||(s[l]=this.shape[l]);return new xe({...this._def,shape:()=>s})}deepPartial(){return ft(this)}partial(t){const s={};for(const l of Z.objectKeys(this.shape)){const r=this.shape[l];t&&!t[l]?s[l]=r:s[l]=r.optional()}return new xe({...this._def,shape:()=>s})}required(t){const s={};for(const l of Z.objectKeys(this.shape))if(t&&!t[l])s[l]=this.shape[l];else{let d=this.shape[l];for(;d instanceof Ye;)d=d._def.innerType;s[l]=d}return new xe({...this._def,shape:()=>s})}keyof(){return ks(Z.objectKeys(this.shape))}}xe.create=(o,t)=>new xe({shape:()=>o,unknownKeys:"strip",catchall:Xe.create(),typeName:P.ZodObject,...B(t)});xe.strictCreate=(o,t)=>new xe({shape:()=>o,unknownKeys:"strict",catchall:Xe.create(),typeName:P.ZodObject,...B(t)});xe.lazycreate=(o,t)=>new xe({shape:o,unknownKeys:"strip",catchall:Xe.create(),typeName:P.ZodObject,...B(t)});class Ft extends J{_parse(t){const{ctx:s}=this._processInputParams(t),l=this._def.options;function r(d){for(const c of d)if(c.result.status==="valid")return c.result;for(const c of d)if(c.result.status==="dirty")return s.common.issues.push(...c.ctx.common.issues),c.result;const x=d.map(c=>new Ze(c.ctx.common.issues));return S(s,{code:k.invalid_union,unionErrors:x}),V}if(s.common.async)return Promise.all(l.map(async d=>{const x={...s,common:{...s.common,issues:[]},parent:null};return{result:await d._parseAsync({data:s.data,path:s.path,parent:x}),ctx:x}})).then(r);{let d;const x=[];for(const C of l){const w={...s,common:{...s.common,issues:[]},parent:null},$=C._parseSync({data:s.data,path:s.path,parent:w});if($.status==="valid")return $;$.status==="dirty"&&!d&&(d={result:$,ctx:w}),w.common.issues.length&&x.push(w.common.issues)}if(d)return s.common.issues.push(...d.ctx.common.issues),d.result;const c=x.map(C=>new Ze(C));return S(s,{code:k.invalid_union,unionErrors:c}),V}}get options(){return this._def.options}}Ft.create=(o,t)=>new Ft({options:o,typeName:P.ZodUnion,...B(t)});function ga(o,t){const s=qe(o),l=qe(t);if(o===t)return{valid:!0,data:o};if(s===A.object&&l===A.object){const r=Z.objectKeys(t),d=Z.objectKeys(o).filter(c=>r.indexOf(c)!==-1),x={...o,...t};for(const c of d){const C=ga(o[c],t[c]);if(!C.valid)return{valid:!1};x[c]=C.data}return{valid:!0,data:x}}else if(s===A.array&&l===A.array){if(o.length!==t.length)return{valid:!1};const r=[];for(let d=0;d<o.length;d++){const x=o[d],c=t[d],C=ga(x,c);if(!C.valid)return{valid:!1};r.push(C.data)}return{valid:!0,data:r}}else return s===A.date&&l===A.date&&+o==+t?{valid:!0,data:o}:{valid:!1}}class Ht extends J{_parse(t){const{status:s,ctx:l}=this._processInputParams(t),r=(d,x)=>{if(es(d)||es(x))return V;const c=ga(d.value,x.value);return c.valid?((ts(d)||ts(x))&&s.dirty(),{status:s.value,value:c.data}):(S(l,{code:k.invalid_intersection_types}),V)};return l.common.async?Promise.all([this._def.left._parseAsync({data:l.data,path:l.path,parent:l}),this._def.right._parseAsync({data:l.data,path:l.path,parent:l})]).then(([d,x])=>r(d,x)):r(this._def.left._parseSync({data:l.data,path:l.path,parent:l}),this._def.right._parseSync({data:l.data,path:l.path,parent:l}))}}Ht.create=(o,t,s)=>new Ht({left:o,right:t,typeName:P.ZodIntersection,...B(s)});class st extends J{_parse(t){const{status:s,ctx:l}=this._processInputParams(t);if(l.parsedType!==A.array)return S(l,{code:k.invalid_type,expected:A.array,received:l.parsedType}),V;if(l.data.length<this._def.items.length)return S(l,{code:k.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),V;!this._def.rest&&l.data.length>this._def.items.length&&(S(l,{code:k.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const d=[...l.data].map((x,c)=>{const C=this._def.items[c]||this._def.rest;return C?C._parse(new He(l,x,l.path,c)):null}).filter(x=>!!x);return l.common.async?Promise.all(d).then(x=>$e.mergeArray(s,x)):$e.mergeArray(s,d)}get items(){return this._def.items}rest(t){return new st({...this._def,rest:t})}}st.create=(o,t)=>{if(!Array.isArray(o))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new st({items:o,typeName:P.ZodTuple,rest:null,...B(t)})};class Jt extends J{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:s,ctx:l}=this._processInputParams(t);if(l.parsedType!==A.object)return S(l,{code:k.invalid_type,expected:A.object,received:l.parsedType}),V;const r=[],d=this._def.keyType,x=this._def.valueType;for(const c in l.data)r.push({key:d._parse(new He(l,c,l.path,c)),value:x._parse(new He(l,l.data[c],l.path,c)),alwaysSet:c in l.data});return l.common.async?$e.mergeObjectAsync(s,r):$e.mergeObjectSync(s,r)}get element(){return this._def.valueType}static create(t,s,l){return s instanceof J?new Jt({keyType:t,valueType:s,typeName:P.ZodRecord,...B(l)}):new Jt({keyType:ze.create(),valueType:t,typeName:P.ZodRecord,...B(s)})}}class ds extends J{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:s,ctx:l}=this._processInputParams(t);if(l.parsedType!==A.map)return S(l,{code:k.invalid_type,expected:A.map,received:l.parsedType}),V;const r=this._def.keyType,d=this._def.valueType,x=[...l.data.entries()].map(([c,C],w)=>({key:r._parse(new He(l,c,l.path,[w,"key"])),value:d._parse(new He(l,C,l.path,[w,"value"]))}));if(l.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const C of x){const w=await C.key,$=await C.value;if(w.status==="aborted"||$.status==="aborted")return V;(w.status==="dirty"||$.status==="dirty")&&s.dirty(),c.set(w.value,$.value)}return{status:s.value,value:c}})}else{const c=new Map;for(const C of x){const w=C.key,$=C.value;if(w.status==="aborted"||$.status==="aborted")return V;(w.status==="dirty"||$.status==="dirty")&&s.dirty(),c.set(w.value,$.value)}return{status:s.value,value:c}}}}ds.create=(o,t,s)=>new ds({valueType:t,keyType:o,typeName:P.ZodMap,...B(s)});class Ct extends J{_parse(t){const{status:s,ctx:l}=this._processInputParams(t);if(l.parsedType!==A.set)return S(l,{code:k.invalid_type,expected:A.set,received:l.parsedType}),V;const r=this._def;r.minSize!==null&&l.data.size<r.minSize.value&&(S(l,{code:k.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),s.dirty()),r.maxSize!==null&&l.data.size>r.maxSize.value&&(S(l,{code:k.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),s.dirty());const d=this._def.valueType;function x(C){const w=new Set;for(const $ of C){if($.status==="aborted")return V;$.status==="dirty"&&s.dirty(),w.add($.value)}return{status:s.value,value:w}}const c=[...l.data.values()].map((C,w)=>d._parse(new He(l,C,l.path,w)));return l.common.async?Promise.all(c).then(C=>x(C)):x(c)}min(t,s){return new Ct({...this._def,minSize:{value:t,message:I.toString(s)}})}max(t,s){return new Ct({...this._def,maxSize:{value:t,message:I.toString(s)}})}size(t,s){return this.min(t,s).max(t,s)}nonempty(t){return this.min(1,t)}}Ct.create=(o,t)=>new Ct({valueType:o,minSize:null,maxSize:null,typeName:P.ZodSet,...B(t)});class us extends J{get schema(){return this._def.getter()}_parse(t){const{ctx:s}=this._processInputParams(t);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}us.create=(o,t)=>new us({getter:o,typeName:P.ZodLazy,...B(t)});class cs extends J{_parse(t){if(t.data!==this._def.value){const s=this._getOrReturnCtx(t);return S(s,{received:s.data,code:k.invalid_literal,expected:this._def.value}),V}return{status:"valid",value:t.data}}get value(){return this._def.value}}cs.create=(o,t)=>new cs({value:o,typeName:P.ZodLiteral,...B(t)});function ks(o,t){return new ht({values:o,typeName:P.ZodEnum,...B(t)})}class ht extends J{_parse(t){if(typeof t.data!="string"){const s=this._getOrReturnCtx(t),l=this._def.values;return S(s,{expected:Z.joinValues(l),received:s.parsedType,code:k.invalid_type}),V}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const s=this._getOrReturnCtx(t),l=this._def.values;return S(s,{received:s.data,code:k.invalid_enum_value,options:l}),V}return Ee(t.data)}get options(){return this._def.values}get enum(){const t={};for(const s of this._def.values)t[s]=s;return t}get Values(){const t={};for(const s of this._def.values)t[s]=s;return t}get Enum(){const t={};for(const s of this._def.values)t[s]=s;return t}extract(t,s=this._def){return ht.create(t,{...this._def,...s})}exclude(t,s=this._def){return ht.create(this.options.filter(l=>!t.includes(l)),{...this._def,...s})}}ht.create=ks;class ps extends J{_parse(t){const s=Z.getValidEnumValues(this._def.values),l=this._getOrReturnCtx(t);if(l.parsedType!==A.string&&l.parsedType!==A.number){const r=Z.objectValues(s);return S(l,{expected:Z.joinValues(r),received:l.parsedType,code:k.invalid_type}),V}if(this._cache||(this._cache=new Set(Z.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const r=Z.objectValues(s);return S(l,{received:l.data,code:k.invalid_enum_value,options:r}),V}return Ee(t.data)}get enum(){return this._def.values}}ps.create=(o,t)=>new ps({values:o,typeName:P.ZodNativeEnum,...B(t)});class zt extends J{unwrap(){return this._def.type}_parse(t){const{ctx:s}=this._processInputParams(t);if(s.parsedType!==A.promise&&s.common.async===!1)return S(s,{code:k.invalid_type,expected:A.promise,received:s.parsedType}),V;const l=s.parsedType===A.promise?s.data:Promise.resolve(s.data);return Ee(l.then(r=>this._def.type.parseAsync(r,{path:s.path,errorMap:s.common.contextualErrorMap})))}}zt.create=(o,t)=>new zt({type:o,typeName:P.ZodPromise,...B(t)});class bt extends J{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:s,ctx:l}=this._processInputParams(t),r=this._def.effect||null,d={addIssue:x=>{S(l,x),x.fatal?s.abort():s.dirty()},get path(){return l.path}};if(d.addIssue=d.addIssue.bind(d),r.type==="preprocess"){const x=r.transform(l.data,d);if(l.common.async)return Promise.resolve(x).then(async c=>{if(s.value==="aborted")return V;const C=await this._def.schema._parseAsync({data:c,path:l.path,parent:l});return C.status==="aborted"?V:C.status==="dirty"||s.value==="dirty"?St(C.value):C});{if(s.value==="aborted")return V;const c=this._def.schema._parseSync({data:x,path:l.path,parent:l});return c.status==="aborted"?V:c.status==="dirty"||s.value==="dirty"?St(c.value):c}}if(r.type==="refinement"){const x=c=>{const C=r.refinement(c,d);if(l.common.async)return Promise.resolve(C);if(C instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(l.common.async===!1){const c=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});return c.status==="aborted"?V:(c.status==="dirty"&&s.dirty(),x(c.value),{status:s.value,value:c.value})}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(c=>c.status==="aborted"?V:(c.status==="dirty"&&s.dirty(),x(c.value).then(()=>({status:s.value,value:c.value}))))}if(r.type==="transform")if(l.common.async===!1){const x=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});if(!mt(x))return V;const c=r.transform(x.value,d);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:c}}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(x=>mt(x)?Promise.resolve(r.transform(x.value,d)).then(c=>({status:s.value,value:c})):V);Z.assertNever(r)}}bt.create=(o,t,s)=>new bt({schema:o,typeName:P.ZodEffects,effect:t,...B(s)});bt.createWithPreprocess=(o,t,s)=>new bt({schema:t,effect:{type:"preprocess",transform:o},typeName:P.ZodEffects,...B(s)});class Ye extends J{_parse(t){return this._getType(t)===A.undefined?Ee(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ye.create=(o,t)=>new Ye({innerType:o,typeName:P.ZodOptional,...B(t)});class gt extends J{_parse(t){return this._getType(t)===A.null?Ee(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gt.create=(o,t)=>new gt({innerType:o,typeName:P.ZodNullable,...B(t)});class ya extends J{_parse(t){const{ctx:s}=this._processInputParams(t);let l=s.data;return s.parsedType===A.undefined&&(l=this._def.defaultValue()),this._def.innerType._parse({data:l,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}ya.create=(o,t)=>new ya({innerType:o,typeName:P.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...B(t)});class va extends J{_parse(t){const{ctx:s}=this._processInputParams(t),l={...s,common:{...s.common,issues:[]}},r=this._def.innerType._parse({data:l.data,path:l.path,parent:{...l}});return Bt(r)?r.then(d=>({status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new Ze(l.common.issues)},input:l.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ze(l.common.issues)},input:l.data})}}removeCatch(){return this._def.innerType}}va.create=(o,t)=>new va({innerType:o,typeName:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...B(t)});class fs extends J{_parse(t){if(this._getType(t)!==A.nan){const l=this._getOrReturnCtx(t);return S(l,{code:k.invalid_type,expected:A.nan,received:l.parsedType}),V}return{status:"valid",value:t.data}}}fs.create=o=>new fs({typeName:P.ZodNaN,...B(o)});class J0 extends J{_parse(t){const{ctx:s}=this._processInputParams(t),l=s.data;return this._def.type._parse({data:l,path:s.path,parent:s})}unwrap(){return this._def.type}}class Sa extends J{_parse(t){const{status:s,ctx:l}=this._processInputParams(t);if(l.common.async)return(async()=>{const d=await this._def.in._parseAsync({data:l.data,path:l.path,parent:l});return d.status==="aborted"?V:d.status==="dirty"?(s.dirty(),St(d.value)):this._def.out._parseAsync({data:d.value,path:l.path,parent:l})})();{const r=this._def.in._parseSync({data:l.data,path:l.path,parent:l});return r.status==="aborted"?V:r.status==="dirty"?(s.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:l.path,parent:l})}}static create(t,s){return new Sa({in:t,out:s,typeName:P.ZodPipeline})}}class ka extends J{_parse(t){const s=this._def.innerType._parse(t),l=r=>(mt(r)&&(r.value=Object.freeze(r.value)),r);return Bt(s)?s.then(r=>l(r)):l(s)}unwrap(){return this._def.innerType}}ka.create=(o,t)=>new ka({innerType:o,typeName:P.ZodReadonly,...B(t)});var P;(function(o){o.ZodString="ZodString",o.ZodNumber="ZodNumber",o.ZodNaN="ZodNaN",o.ZodBigInt="ZodBigInt",o.ZodBoolean="ZodBoolean",o.ZodDate="ZodDate",o.ZodSymbol="ZodSymbol",o.ZodUndefined="ZodUndefined",o.ZodNull="ZodNull",o.ZodAny="ZodAny",o.ZodUnknown="ZodUnknown",o.ZodNever="ZodNever",o.ZodVoid="ZodVoid",o.ZodArray="ZodArray",o.ZodObject="ZodObject",o.ZodUnion="ZodUnion",o.ZodDiscriminatedUnion="ZodDiscriminatedUnion",o.ZodIntersection="ZodIntersection",o.ZodTuple="ZodTuple",o.ZodRecord="ZodRecord",o.ZodMap="ZodMap",o.ZodSet="ZodSet",o.ZodFunction="ZodFunction",o.ZodLazy="ZodLazy",o.ZodLiteral="ZodLiteral",o.ZodEnum="ZodEnum",o.ZodEffects="ZodEffects",o.ZodNativeEnum="ZodNativeEnum",o.ZodOptional="ZodOptional",o.ZodNullable="ZodNullable",o.ZodDefault="ZodDefault",o.ZodCatch="ZodCatch",o.ZodPromise="ZodPromise",o.ZodBranded="ZodBranded",o.ZodPipeline="ZodPipeline",o.ZodReadonly="ZodReadonly"})(P||(P={}));const v=ze.create,Ue=xt.create,ms=ba.create;Xe.create;const be=Fe.create,ee=xe.create;Ft.create;Ht.create;st.create;const xs=Jt.create;ht.create;zt.create;Ye.create;gt.create;const z0=ee({label:v().min(1).max(40),left:v().min(1).max(35),right:v().min(1).max(35)}),Z0=ee({primary:v().optional(),secondary:v().optional(),surface:v().optional(),bg:v().optional()}).optional(),G0=ee({id:v(),label:v(),default:Ue(),min:Ue(),max:Ue(),step:Ue().optional().default(1)}),K0=ee({id:v().optional().default(()=>`post-${Date.now()}`).transform(o=>o||`post-${Date.now()}`),templateId:v().optional(),category:v().optional().default("TECH"),theme:v().optional().default("blue-tech"),accentColor:v().optional(),palette:Z0,fontSizes:xs(Ue()).optional(),fontSlots:be(G0).optional(),layoutType:v().default("table"),title:v().min(1).max(120),subtitle:v().min(1).max(250),leftHeader:v().optional().default("USA 🇺🇸"),rightHeader:v().optional().default("UK 🇬🇧"),rows:be(z0).optional().default([]),bullets:be(ee({highlight:v().optional().default(""),text:v().min(1)})).optional().default([]),bigStat:ee({number:v().default("$165,000"),label:v().default("Average Compensation"),subtext:v().optional().default(""),secondaryNumber:v().optional().default(""),secondaryLabel:v().optional().default("")}).optional(),listItems:be(ee({rank:Ue(),title:v(),value:v(),tag:v().optional().default("")})).optional().default([]),quoteData:ee({quote:v(),highlight:v().optional().default(""),source:v().default("Industry Insider")}).optional(),versusData:ee({leftEntity:v().optional(),leftStats:be(ee({label:v(),value:v()})).optional(),leftPerk:v().optional(),rightEntity:v().optional(),rightStats:be(ee({label:v(),value:v()})).optional(),rightPerk:v().optional(),verdict:v().optional()}).optional(),receiptData:ee({grossMonthly:v().optional(),items:be(ee({label:v(),amount:v(),note:v().optional()})).optional(),totalDeductions:v().optional(),netRemaining:v().optional()}).optional(),timelineData:ee({pastYear:v().optional().default("2016"),presentYear:v().optional().default("2026"),items:be(ee({label:v(),pastValue:v(),presentValue:v(),changeBadge:v().optional()})).optional(),bottomInsight:v().optional()}).optional(),barchartData:be(ee({label:v(),percentage:Ue().min(0).max(100),amount:v().optional(),tag:v().optional()})).optional().default([]),leaderboardData:ee({calloutNote:v().optional().default("*Asumsi kurs : Rp15.500/US$"),items:be(ee({rank:Ue(),name:v(),flag:v().optional().default("🌐"),value:v(),percentage:Ue().min(0).max(100).optional()})).optional()}).optional(),editorialData:ee({badge:v().optional().default("INVESTIGASI KHUSUS"),highlightPhrase:v().optional(),cards:be(ee({step:v().optional(),title:v(),text:v(),stat:v().optional()})).optional(),keyTakeaway:v().optional()}).optional(),matrixData:ee({headers:be(v()).optional().default(["Indikator","🇮🇩 IDN","🇲🇾 MYS","🇸🇬 SGP"]),rows:be(ee({label:v(),values:be(v())})).optional()}).optional(),debateData:ee({proTitle:v().optional().default("SISI PRO / BENEFIT"),proScore:v().optional().default("65%"),proPoints:be(v()).optional(),conTitle:v().optional().default("SISI KONTRA / RISIKO"),conScore:v().optional().default("35%"),conPoints:be(v()).optional(),callToAction:v().optional().default("Kalian di tim mana? Tulis pendapatmu di bawah! 👇")}).optional(),tierlistData:be(ee({tier:v(),tierColor:v().optional(),items:be(ee({name:v(),badge:v().optional(),desc:v().optional()}))})).optional().default([]),customHtml:v().optional(),customCss:v().optional(),customFields:xs(ms()).optional(),items:be(ms()).optional(),footerNote:v().optional().default("Industry Benchmark 2026"),sourceUrl:v().optional(),methodologyBadge:v().optional(),disclaimer:v().optional(),watermark:v().optional().default("@SocialGen"),bgKeyword:v().optional().default("modern office coding night"),reelsDuration:Ue().min(5).max(90).default(30),caption:v().optional().default("Bagikan pendapat Anda di kolom komentar! #infografis #edukasi")}),W0={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"},q0={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"},Y0={class:"flex items-center gap-2.5 sm:gap-3"},X0={class:"text-sm font-extrabold tracking-tight text-white flex items-center gap-1.5 sm:gap-2"},Q0={class:"text-[9px] sm:text-[10px] font-bold px-2 py-0.5 rounded-full bg-slate-800 text-sky-400 border border-slate-700"},ep={class:"flex items-center gap-2 sm:gap-3 text-xs"},tp={key:0,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]"},ap={key:1,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]"},sp={class:"lg:hidden flex items-center justify-center px-3 py-2 bg-slate-900/90 border-b border-slate-800 flex-shrink-0"},np={class:"grid grid-cols-2 w-full max-w-sm bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-bold shadow-inner"},op={key:0,class:"w-2 h-2 rounded-full bg-emerald-400 animate-ping"},lp={class:"flex items-center gap-2"},ip={key:0,class:"text-emerald-400"},rp={key:1,class:"text-sky-400"},dp={key:2,class:"text-rose-400"},up={class:"flex-1 w-full flex flex-col lg:flex-row overflow-hidden min-h-0"},cp={key:2,class:"lg:hidden fixed bottom-0 left-0 right-0 z-30 h-16 px-4 bg-slate-900/95 backdrop-blur-lg border-t border-slate-800 flex items-center justify-between gap-3 shadow-2xl"},pp={class:"flex flex-col"},fp={class:"flex items-center gap-1 text-[10px] font-bold text-sky-400"},mp={key:0},xp={key:1},hp={key:2},bp=["disabled"],gp={key:0,class:"animate-spin"},yp={key:1},vp={key:3,class:"lg:hidden fixed inset-0 z-50 bg-slate-950 flex flex-col justify-between overflow-hidden animate-in slide-in-from-bottom"},kp={class:"h-14 px-4 bg-slate-900/95 border-b border-slate-800 flex items-center justify-between shrink-0 shadow-md"},wp={class:"flex-1 overflow-hidden p-2 flex flex-col min-h-0"},_p={class:"h-16 px-4 bg-slate-900/95 border-t border-slate-800 flex items-center justify-between gap-2 shrink-0"},Sp=["disabled"],Ap=wa({__name:"index",setup(o){const t=_({id:"news-us-germany-salary-divide-2026",category:"TECH REPORT",theme:"blue-tech",layoutType:"news",title:"THE $90,000 TRANSATLANTIC TECH DIVIDE",subtitle:"United States 🇺🇸 vs Germany 🇩🇪 (2026 Real Purchasing Power)",leftHeader:"USA 🇺🇸",rightHeader:"Germany 🇩🇪",rows:[{label:"Junior Dev",left:"$88,000/yr",right:"$52,000/yr"},{label:"Mid-Level",left:"$135,000/yr",right:"$75,000/yr"},{label:"Senior Lead",left:"$180,000/yr",right:"$98,000/yr"},{label:"Effective Tax",left:"24%",right:"42%"},{label:"Paid Vacation",left:"15 Days",right:"30 Days"}],bullets:[{highlight:"Gross Salary Lead",text:"American engineers take home up to 84% higher base compensation."},{highlight:"Work-Life Balance",text:"German labor laws guarantee 30 paid days off with zero expectation of after-hours Slack."},{highlight:"Healthcare Drag",text:"US health insurance deductibles and out-of-pocket costs eat up to $14,000/yr per family."}],bigStat:{number:"$180,000",label:"Senior Tech Base in California",secondaryNumber:"$98,000",secondaryLabel:"Munich Hub",subtext:"The gap widens at senior level, but so does cost of childcare and housing inflation."},listItems:[{rank:1,title:"Switzerland 🇨🇭",value:"$145,000/yr",tag:"Top Net Pay"},{rank:2,title:"United States 🇺🇸",value:"$135,000/yr",tag:"Fast Growth"},{rank:3,title:"Australia 🇦🇺",value:"$98,000/yr",tag:"High Super"},{rank:4,title:"Germany 🇩🇪",value:"$84,000/yr",tag:"Pension Safety"},{rank:5,title:"United Kingdom 🇬🇧",value:"$72,000/yr",tag:"Flexible"}],quoteData:{quote:"Chasing the American gross salary without calculating healthcare deductibles and 50-hour workweeks is the most common financial illusion in global tech.",highlight:"most common financial illusion",source:"Principal Tech Recruiter"},footerNote:"Source: Verified Industry Compensation Survey 2026",watermark:"@SocialGen",bgKeyword:"modern office coding night technology",reelsDuration:30,caption:"Higher gross salary in the US or guaranteed 30 days off in Germany? Which lifestyle would you choose? Drop your vote below! 👇 #techcareers #salary #softwareengineer #worklife"}),s=_({theme:"blue-tech",backgroundSource:"pexels",musicFile:"random",videoStartOffset:0,audioStartOffset:0,outputs:{feed:!0,story:!0,reels:!0}}),l=_([]),r=_(-1),d=_(null);function x(j){if(!t.value||!t.value.title||d.value)return;const g=JSON.stringify(t.value),se=j?JSON.stringify(j):"";if(g!==se){d.value=JSON.parse(g);try{localStorage.setItem("sg_unsaved_stash",g)}catch{}}}function c(){if(!d.value)return;const j=d.value.title||"Editan Anda";t.value=JSON.parse(JSON.stringify(d.value)),d.value.theme&&(s.value.theme=d.value.theme),d.value=null,r.value=-1,U.value=-1;try{localStorage.removeItem("sg_unsaved_stash")}catch{}ie(`Editan sebelumnya ("${j.slice(0,24)}...") berhasil dikembalikan! ↩️`,"success")}function C(){d.value=null;try{localStorage.removeItem("sg_unsaved_stash")}catch{}}function w(){try{localStorage.setItem("sg_drafts",JSON.stringify(l.value))}catch{}$fetch("/api/drafts",{method:"POST",body:{drafts:l.value}}).catch(()=>{})}function $(){l.value.unshift(JSON.parse(JSON.stringify(t.value))),r.value=0,U.value=-1,w(),ie("Draft berhasil disimpan!")}function ne(j){const g=l.value[j];if(g){x(g),t.value=JSON.parse(JSON.stringify(g)),g.theme&&(s.value.theme=g.theme),r.value=j,U.value=-1;const se=!!d.value;ie(`Memuat draft #${j+1}: "${(g.title||"Untitled").slice(0,20)}..."`,"success",se?{label:"↩️ Kembalikan Editan",onClick:c}:void 0)}}function ge(j){l.value.splice(j,1),r.value===j&&(r.value=-1),w(),ie("Draft dihapus")}const Y=_([]),U=_(-1);function D(){try{localStorage.setItem("sg_gen_history",JSON.stringify(Y.value))}catch{}$fetch("/api/generation-history",{method:"POST",body:{history:Y.value}}).catch(()=>{})}function H(j){const g=Y.value[j];if(g){const se=g.contentData||g;x(se),t.value=JSON.parse(JSON.stringify(se)),g.options&&(s.value={...s.value,...g.options}),U.value=j,r.value=-1;const Re=!!d.value;ie(`Memuat riwayat: "${(g.title||"Untitled").slice(0,24)}..."`,"success",Re?{label:"↩️ Kembalikan Editan",onClick:c}:void 0)}}function ye(j){Y.value.splice(j,1),U.value===j&&(U.value=-1),D(),ie("Item riwayat dihapus")}function je(){Y.value=[],U.value=-1,D(),ie("Seluruh riwayat generate berhasil dibersihkan!")}let Pe=null;function _e(){try{localStorage.setItem("sg_active_content",JSON.stringify(t.value)),localStorage.setItem("sg_active_options",JSON.stringify(s.value))}catch{}clearTimeout(Pe),Pe=setTimeout(()=>{$fetch("/api/last-session",{method:"POST",body:{content:t.value,options:s.value}}).catch(()=>{})},1e3)}Te(()=>t.value,_e,{deep:!0}),Te(()=>s.value,_e,{deep:!0});const te=_(!1),K=_(!1),pe=_(""),W=_(null),Ce=_(""),ue=_("success"),ae=_("editor"),oe=_(!1),G=_(null);_a(async()=>{try{const j=localStorage.getItem("sg_active_content");if(j){const g=JSON.parse(j);g&&g.title&&(t.value=g)}else{const g=await $fetch("/api/last-session");g?.session?.content&&(t.value=g.session.content,g.session.options&&(s.value={...s.value,...g.session.options}))}}catch{}try{const j=localStorage.getItem("sg_active_options");if(j){const g=JSON.parse(j);g&&(s.value={...s.value,...g})}}catch{}try{const j=await $fetch("/api/drafts");if(j?.drafts&&Array.isArray(j.drafts)&&j.drafts.length>0)l.value=j.drafts;else{const g=localStorage.getItem("sg_drafts");if(g){const se=JSON.parse(g);Array.isArray(se)&&se.length>0&&(l.value=se,$fetch("/api/drafts",{method:"POST",body:{drafts:se}}).catch(()=>{}))}}}catch{const j=localStorage.getItem("sg_drafts");if(j)try{l.value=JSON.parse(j)}catch{}}try{const j=await $fetch("/api/generation-history");if(j?.history&&Array.isArray(j.history)&&j.history.length>0)Y.value=j.history;else{const g=localStorage.getItem("sg_gen_history");g&&(Y.value=JSON.parse(g))}}catch{}try{const j=await $fetch("/api/status");G.value=j}catch{}try{const j=localStorage.getItem("sg_unsaved_stash");j&&(d.value=JSON.parse(j))}catch{}});const we=re(()=>{const j=K0.safeParse(t.value);if(j.success)return{isValid:!0,error:""};{const g=j.error.errors[0];return{isValid:!1,error:`${g.path.join(".")}: ${g.message}`}}}),le=_(null);let Ae=null;function ie(j,g="success",se){clearTimeout(Ae),Ce.value=j,ue.value=g,le.value=se||null,Ae=setTimeout(()=>{Ce.value="",le.value=null},se?7e3:4e3)}async function O(j,g,se,Re){K.value=!0,pe.value=`AI Research (${se||"Gemini"})...`;try{const F=await $fetch("/api/auto-topic",{method:"POST",body:{niche:j,layoutType:g,model:se,language:Re}});if(F?.dataset){x(F.dataset),t.value=F.dataset,s.value.theme=F.dataset.theme,l.value.unshift(F.dataset),r.value=0,w();const Ge=!!d.value;F.source==="gemini"?ie(`✨ [${F.modelUsed||"Gemini"}] Berhasil meriset: "${F.dataset.title.slice(0,32)}..."`,"success",Ge?{label:"↩️ Kembalikan Editan",onClick:c}:void 0):ie(`ℹ️ [Curated Data] Topik siap: "${F.dataset.title.slice(0,32)}..."`,"success",Ge?{label:"↩️ Kembalikan Editan",onClick:c}:void 0)}}catch(F){ie("Gagal auto-topic: "+(F.data?.statusMessage||F.message),"error")}finally{K.value=!1,pe.value=""}}async function Qe(){if(!we.value.isValid){ie("Data tidak valid: "+we.value.error,"error");return}te.value=!0,pe.value="Rendering Images & Reels...",W.value=null;const j={id:t.value.id||String(Date.now()),title:t.value.title||"Untitled Creation",layoutType:t.value.layoutType||"table",category:t.value.category||"GENERAL",theme:t.value.theme||"blue-tech",generatedAt:new Date().toISOString(),contentData:JSON.parse(JSON.stringify(t.value)),options:JSON.parse(JSON.stringify(s.value))};Y.value.unshift(j),U.value=0,D(),ae.value="preview";try{const g=await $fetch("/api/generate",{method:"POST",body:{data:t.value,options:s.value}});g?.success&&(W.value=g,ie(`✅ Generate selesai! Berhasil dirender dalam ${(g.durationMs/1e3).toFixed(1)} detik.`,"success"))}catch(g){ie("Gagal render: "+(g.data?.statusMessage||g.message),"error")}finally{te.value=!1,pe.value=""}}return(j,g)=>{const se=Yu,Re=g0;return p(),f("div",W0,[e("header",q0,[e("div",Y0,[g[16]||(g[16]=e("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 ",-1)),e("div",null,[e("h1",X0,[g[15]||(g[15]=z(" SocialGen ",-1)),e("span",Q0," v"+m(n(G)?.version||"2.4.2 Studio"),1)])])]),e("div",ep,[n(G)?.geminiActive?(p(),f("span",tp," ● AI Connected ")):(p(),f("span",ap," ● Local Engine "))])]),e("div",sp,[e("div",np,[e("button",{onClick:g[0]||(g[0]=F=>ae.value="editor"),class:E(["py-1.5 px-3 rounded-lg transition flex items-center justify-center gap-1.5",n(ae)==="editor"?"bg-sky-500 text-white shadow-md font-black":"text-slate-400 hover:text-slate-200"])},[...g[17]||(g[17]=[e("span",null,"⚙️ Studio & Editor",-1)])],2),e("button",{onClick:g[1]||(g[1]=F=>ae.value="preview"),class:E(["py-1.5 px-3 rounded-lg transition flex items-center justify-center gap-1.5",n(ae)==="preview"?"bg-indigo-600 text-white shadow-md font-black":"text-slate-400 hover:text-slate-200"])},[g[18]||(g[18]=e("span",null,"👁️ Live Preview",-1)),n(W)?(p(),f("span",op)):M("",!0)],2)])]),n(Ce)?(p(),f("div",{key:0,class:E(["fixed bottom-20 lg:bottom-6 right-4 lg:right-6 z-50 flex items-center gap-3 px-4 py-3 rounded-2xl shadow-2xl text-xs font-bold border transition-all max-w-[90vw]",n(ue)==="success"?"bg-slate-900 text-slate-100 border-sky-500/50 shadow-sky-950/50":n(ue)==="info"?"bg-slate-900 text-sky-200 border-indigo-500/50 shadow-indigo-950/50":"bg-rose-950 text-rose-200 border-rose-500/50"])},[e("div",lp,[n(ue)==="success"?(p(),f("span",ip,"●")):n(ue)==="info"?(p(),f("span",rp,"ℹ️")):(p(),f("span",dp,"⚠️")),e("span",null,m(n(Ce)),1)]),n(le)?(p(),f("button",{key:0,onClick:g[2]||(g[2]=()=>{n(le)?.onClick(),Ce.value="",le.value=null}),class:"px-2.5 py-1 bg-sky-500 hover:bg-sky-400 text-white font-extrabold rounded-lg shadow transition text-[11px] flex items-center gap-1 active:scale-95"},m(n(le).label),1)):M("",!0),e("button",{onClick:g[3]||(g[3]=F=>{Ce.value="",le.value=null}),class:"text-slate-400 hover:text-white transition ml-1 text-xs"}," ✕ ")],2)):M("",!0),e("main",up,[e("section",{class:E(["h-full shrink-0",n(ae)==="editor"?"flex flex-col w-full lg:w-auto lg:flex-row lg:overflow-hidden p-2 lg:p-0":"hidden lg:flex lg:flex-row lg:overflow-hidden"])},[y(se,{modelValue:n(t),"onUpdate:modelValue":g[4]||(g[4]=F=>Be(t)?t.value=F:null),options:n(s),"onUpdate:options":g[5]||(g[5]=F=>Be(s)?s.value=F:null),"is-valid":n(we).isValid,"validation-error":n(we).error,"is-generating":n(te),"generate-stage":n(pe),"is-auto-topic-loading":n(K),drafts:n(l),"active-draft-index":n(r),history:n(Y),"active-history-index":n(U),"unsaved-stash":n(d),onGenerate:Qe,onAutoTopic:O,onSelectDraft:ne,onDeleteDraft:ge,onSaveDraft:$,onSelectHistory:H,onDeleteHistory:ye,onClearAllHistory:je,onRestoreStash:c,onClearStash:C,onToast:g[6]||(g[6]=(F,Ge)=>ie(F,Ge))},null,8,["modelValue","options","is-valid","validation-error","is-generating","generate-stage","is-auto-topic-loading","drafts","active-draft-index","history","active-history-index","unsaved-stash"])],2),e("section",{class:E(["h-full min-w-0 flex-col justify-between overflow-hidden",n(ae)==="preview"?"flex w-full p-2":"hidden lg:flex lg:flex-1 lg:p-3"])},[y(Re,{data:n(t),"selected-video":n(s).backgroundSource,"selected-music":n(s).musicFile,"video-start-offset":n(s).videoStartOffset,"onUpdate:videoStartOffset":g[7]||(g[7]=F=>n(s).videoStartOffset=F),"audio-start-offset":n(s).audioStartOffset,"onUpdate:audioStartOffset":g[8]||(g[8]=F=>n(s).audioStartOffset=F),"is-generating":n(te),"generate-stage":n(pe)},null,8,["data","selected-video","selected-music","video-start-offset","audio-start-offset","is-generating","generate-stage"])],2)]),n(ae)==="editor"?(p(),f("button",{key:1,onClick:g[9]||(g[9]=F=>oe.value=!0),type:"button",class:"lg:hidden fixed bottom-20 right-4 z-40 px-4 py-2.5 rounded-full bg-gradient-to-r from-sky-500 to-indigo-600 hover:from-sky-400 hover:to-indigo-500 text-white font-black text-xs shadow-2xl border border-sky-400/40 flex items-center gap-1.5 active:scale-95 transition"},[...g[19]||(g[19]=[e("span",{class:"text-sm"},"👁️",-1),e("span",null,"Intip Canvas",-1)])])):M("",!0),n(ae)==="editor"?(p(),f("div",cp,[e("div",pp,[g[20]||(g[20]=e("span",{class:"text-[9px] font-bold text-slate-400 uppercase tracking-wider"},"Output",-1)),e("div",fp,[n(s).outputs?.feed!==!1?(p(),f("span",mp,"Feed")):M("",!0),n(s).outputs?.feed!==!1&&n(s).outputs?.reels!==!1?(p(),f("span",xp,"•")):M("",!0),n(s).outputs?.reels!==!1?(p(),f("span",hp,"Reels")):M("",!0)])]),e("button",{onClick:Qe,disabled:n(te)||!n(we).isValid,type:"button",class:"flex-1 py-3 px-4 rounded-2xl bg-gradient-to-r from-sky-500 to-indigo-600 hover:from-sky-400 hover:to-indigo-500 text-white font-black text-xs tracking-wide shadow-xl shadow-sky-500/25 flex items-center justify-center gap-2 active:scale-95 transition disabled:opacity-50"},[n(te)?(p(),f("span",gp,"🔄")):(p(),f("span",yp,"🚀")),e("span",null,m(n(te)?n(pe)||"Rendering Content...":"GENERATE SEKARANG"),1)],8,bp)])):M("",!0),n(oe)?(p(),f("div",vp,[e("div",kp,[g[22]||(g[22]=e("div",{class:"flex items-center gap-2"},[e("span",{class:"w-2 h-2 rounded-full bg-emerald-400 animate-ping"}),e("span",{class:"text-xs font-black text-white"},"Preview Canvas Penuh")],-1)),e("button",{onClick:g[10]||(g[10]=F=>oe.value=!1),type:"button",class:"px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-slate-200 border border-slate-700 flex items-center gap-1 active:scale-95 transition"},[...g[21]||(g[21]=[e("span",null,"✕ Tutup Preview",-1)])])]),e("div",wp,[y(Re,{data:n(t),"selected-video":n(s).backgroundSource,"selected-music":n(s).musicFile,"video-start-offset":n(s).videoStartOffset,"onUpdate:videoStartOffset":g[11]||(g[11]=F=>n(s).videoStartOffset=F),"audio-start-offset":n(s).audioStartOffset,"onUpdate:audioStartOffset":g[12]||(g[12]=F=>n(s).audioStartOffset=F),"is-generating":n(te),"generate-stage":n(pe)},null,8,["data","selected-video","selected-music","video-start-offset","audio-start-offset","is-generating","generate-stage"])]),e("div",_p,[e("button",{onClick:g[13]||(g[13]=F=>oe.value=!1),type:"button",class:"flex-1 py-2.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-slate-200 active:scale-95 transition"}," ✏️ Lanjut Edit Form "),e("button",{onClick:g[14]||(g[14]=()=>{oe.value=!1,Qe()}),disabled:n(te)||!n(we).isValid,type:"button",class:"flex-1 py-2.5 rounded-xl bg-gradient-to-r from-sky-500 to-indigo-600 text-xs font-bold text-white shadow-lg active:scale-95 transition disabled:opacity-50"}," 🚀 Langsung Render ",8,Sp)])])):M("",!0)])}}});export{Ap as default};