1import{a as s,c as R,ab as I,ad as A,r,j as e,D as M,E as P,K as E,M as F,J as T,bX as h,B as y,k as z,n as ne,dI as D,dJ as O,dK as $,dL as B,dM as G,e as J,b$ as Pe,an as Ee,dN as Fe,dO as Te}from"./main-BmIQ3Ne6.js";import{C as Le}from"./container-B_TDmTjr.js";import{D as Ue}from"./dashboard-header-BdQNUYgK.js";import{T as L}from"./textarea-BLN1TyYE.js";import{I as Y,d as Z}from"./download-D-vXNc7I.js";import{a as re}from"./ai_page_common_prompt-D5Asxnmj.js";import{a as Q}from"./ai_page_common_download-ol28LQ8V.js";import"./IconArrowLeft-DSoudaeK.js";const De=()=>"ì´ë¯¸ì§ 캡ì
ìì±",Oe=((t={},a={})=>(a.locale??s(),De())),$e=()=>"Cloudflare Workers AIë¡ ì´ë¯¸ì§ë¥¼ ì¤ëª
íê±°ë ì´ë¯¸ì§ì ëí ì§ë¬¸ì ëµí©ëë¤.",Be=((t={},a={})=>(a.locale??s(),$e())),Ge=()=>"캡ì
ì´ ì¬ê¸°ì íìë©ëë¤.",Re=((t={},a={})=>(a.locale??s(),Ge())),We=()=>"캡ì
ì ìì±í ì´ë¯¸ì§ë¥¼ ì
ë¡ëíì¸ì.",Ke=((t={},a={})=>(a.locale??s(),We())),qe=()=>"ì´ë¯¸ì§ 캡ì
ìì±ì ì¤í¨íìµëë¤.",Ve=((t={},a={})=>(a.locale??s(),qe())),He=()=>"ì´ë¯¸ì§ (ìµë 1 MB)",Xe=((t={},a={})=>(a.locale??s(),He())),Je=()=>"ê²°ê³¼",Ye=((t={},a={})=>(a.locale??s(),Je())),Ze=()=>"캡ì
ìì± ì¤...",Qe=((t={},a={})=>(a.locale??s(),Ze())),ea=()=>"ì´ ì´ë¯¸ì§ì 캡ì
ì ìì±í´ 주ì¸ì.",aa=((t={},a={})=>(a.locale??s(),ea())),ta=()=>"ì´ ì´ë¯¸ì§ìì ë³´ì´ë ë´ì©ì ìì¸í ì¤ëª
í´ ì£¼ì¸ì.",sa=((t={},a={})=>(a.locale??s(),ta())),na=()=>"ì´ ì´ë¯¸ì§ë¥¼ ì¤ëª
íë í¤ìë 5ê°ë¥¼ ì¼íë¡ êµ¬ë¶íì¬ ëì´í´ 주ì¸ì.",ra=((t={},a={})=>(a.locale??s(),na())),ia=()=>"ì´ ì´ë¯¸ì§ìë ì´ë¤ ì¬ë¬¼ì´ ìëì?",la=((t={},a={})=>(a.locale??s(),ia())),oa=()=>"미리보기",ca=((t={},a={})=>(a.locale??s(),oa())),_a=()=>"í롬íí¸",pa=((t={},a={})=>(a.locale??s(),_a())),da=()=>"ì´ë¯¸ì§ë¥¼ ì½ë ì¤...",ua=((t={},a={})=>(a.locale??s(),da())),ma=()=>"ì´ë¯¸ì§ 캡ì
ìì±",ga=((t={},a={})=>(a.locale??s(),ma())),xa=()=>"ì´ë¯¸ì§ ë³ê²½",ie=((t={},a={})=>(a.locale??s(),xa())),ha=()=>"ì",W=((t={},a={})=>
1(a.locale??s(),ha())),fa=()=>"ì¬ì©ì ì§ì í롬íí¸",le=((t={},a={})=>(a.locale??s(),fa())),ja=()=>"AI ìì± ì´ë¯¸ì§",oe=((t={},a={})=>(a.locale??s(),ja())),ba=()=>"1 MB 미ë§ì ì´ë¯¸ì§ë¥¼ ì¬ì©í´ 주ì¸ì.",ce=((t={},a={})=>(a.locale??s(),ba())),va=()=>"모ë¸",_e=((t={},a={})=>(a.locale??s(),va())),ka=()=>"ì íí íì¼ì ì½ì ì ììµëë¤.",pe=((t={},a={})=>(a.locale??s(),ka())),Na=()=>"ê²°ê³¼",ee=((t={},a={})=>(a.locale??s(),Na())),ya=()=>"ì´ë¯¸ì§ ì
ë¡ë",de=((t={},a={})=>(a.locale??s(),ya())),Sa=()=>"ì´ë¯¸ì§ íì¼ì ì
ë¡ëí´ ì£¼ì¸ì.",ue=((t={},a={})=>(a.locale??s(),Sa())),za=()=>"TanStack AI, Cloudflare Workers AI, fal.aië¡ ì ìëììµëë¤.",Ca=((t={},a={})=>(a.locale??s(),za())),wa=()=>"ì´ë¯¸ì§ ìì±",me=((t={},a={})=>(a.locale??s(),wa())),Ia=()=>"Cloudflare Workers AIë¡ í
ì¤í¸ í롬íí¸ìì ë°ë¡ ì´ë¯¸ì§ë¥¼ ìì±í©ëë¤.",Aa=((t={},a={})=>(a.locale??s(),Ia())),Ma=()=>"fal.aiì ì í ê°ë¥í 모ë¸ë¡ í
ì¤í¸ í롬íí¸ìì ììí ì´ë¯¸ì§ë¥¼ ìì±í©ëë¤.",Pa=((t={},a={})=>(a.locale??s(),Ma())),Ea=()=>"ì¤íì¼ ì ì©",Fa=((t={},a={})=>(a.locale??s(),Ea())),Ta=()=>"fal.aië¡ ì
ë¡ëí ì¸ë¬¼ ì¬ì§ì ì¤íì¼íë ë§í, ìºë¦¬ì»¤ì² ëë ì ëë©ì´ì
ë²ì ì¼ë¡ ë³íí©ëë¤.",La=((t={},a={})=>(a.locale??s(),Ta())),Ua=()=>"ì¤íì¼íë ì¸ë¬¼ ì¬ì§ì´ ì¬ê¸°ì íìë©ëë¤.",Da=((t={},a={})=>(a.locale??s(),Ua())),Oa=()=>"ì¤íì¼ì ì ì©í ì¸ë¬¼ ì¬ì§ì ì
ë¡ëíì¸ì.",$a=((t={},a={})=>(a.locale??s(),Oa())),Ba=()=>"ì´ë¯¸ì§ í¸ì§ì ì¤í¨íìµëë¤.",Ga=((t={},a={})=>(a.locale??s(),Ba())),Ra=()=>"ì본 ì¸ë¬¼ ì¬ì§ (ìµë 1 MB)",Wa=((t={},a={})=>(a.locale??s(),Ra())),Ka=()=>"ì¤íì¼ ì ì© ì¤...",qa=((t={},a={})=>(a.locale??s(),Ka())),Va=()=>"ìíë ì¤íì¼ì ì¤ëª
íì¸ì...",Ha=((t={},a={})=>(a.locale??s(),Va())),Xa=()=>"머리 íë¤ì´ ìºë¦¬ì»¤ì²",Ja=((t={},a={})=>(a.locale??s(),Xa())),Ya=()=>"ì´ ì¬ëì ê·ì¬ì´ 머리 íë¤ì´ ì¤íì¼ì ë§í ìºë¦¬ì»¤ì²ë¡ ë³ííì¸ì: ê³¼ì¥ëê² í° ë¥ê·¼ 머리, ìì ì´ê¹¨, 매ëë½ê³ ê¹ëí ë¼ì¸ ìí¸, ì ëª
í ë¨ì, ë°ê·¸ë í ë³¼, ì¹ê·¼í 미ì, ë¨ì íì¤í
ë°°ê²½, ì¤í°ì»¤ ì¤íì¼, ì본 ì¼êµ´ í¹ì§ì ììë³¼ ì ìê² ì ì§.",Za=((t={},a={})=>(a.locale??s(),Ya())),Qa=()=>"í½ì¬ 3D",et=((t={},a={})=>(a.locale??s(),Qa())),at=()=>"ì´ ì¬ëì í¬ê³ ííë ¥ ìë ë, ë¶ëë½ê² ìì ì²ë¦¬ë í¼ë¶, ë¶ëë¬ì´ ìíì ì¡°ëª
, ì¹ê·¼í 미ì, ê¹ëí ì¤íëì¤ ë°°ê²½ì ê°ì§ í½ì¬ ì¤íì¼ì 3D ì ëë©ì´ì
ìºë¦í°ë¡ ë³ííê³ , ì본 ì ì²´ì±ì ììë³¼ ì ìê² ì ì§íì¸ì.",tt=((t={},a={})=>(a.locale??s(),at())),st=()=>"ì ëë©ì´ì
ì¸ë¬¼í",nt=((t={},a={})=>(a.locale??s(),st())),rt=()=>"ì´ ì¬ëì ê³ íì§ ì ëë©ì´ì
ìºë¦í° ì¸ë¬¼íë¡ ë³ííì¸ì: ëë ·í ì ê³¼ í¨ê» ì
ì
°ì´ë© ì²ë¦¬, ííë ¥ ìê³ ë°ì§ì´ë ë, ë¶ëë¬ì´ íì¤í
ë°°ê²½, ì¼ë³¸ ì ëë©ì´ì
ì¤íì¼, ì본 ì¼êµ´ í¹ì§ì ììë³¼ ì ìê² ì ì§.",it=((t={},a={})=>(a.locale??s(),rt())),lt=()=>"ì본 미리보기",ot=((t={},a={})=>(a.locale??s(),lt())),ct=()=>"ì¤íì¼ í롬íí¸",_t=((t={},a={})=>(a.locale??s(),ct())),pt=()=>"ì¤íì¼ ì ì© ê²°ê³¼",dt=((t={},a={})=>(a.locale??s(),pt())),ut=()=>"ì´ë¯¸ì§ í¸ì§ · ìë°í ì¤íì¼ë¬",mt=((t={},a={})=>(a.locale??s(),ut())),gt=()=>"ìì±ë ì´ë¯¸ì§ê° ì¬ê¸°ì íìë©ëë¤.",ge=((t={},a={})=>(a.locale??s(),gt())),xt=()=>"ì´ë¯¸ì§ ìì±ì ì¤í¨íìµëë¤.",xe=((t={},a={})=>(a.locale??s(),xt())),ht=()=>"ìì± ì¤...",he=((t={},a={})=>(a.locale??s(),ht())),ft=()=>"ìì±íë ¤ë ì´ë¯¸ì§ë¥¼ ì¤ëª
íì¸ì...",fe=((t={},a={})=>(a.locale??s(),ft())),jt=()=>"ì°ì£¼ë¹íì¬ íë¤",je=((t={},a={})=>(a.locale??s(),jt())),bt=()=>"ì±ì´ ì¬ì´ë¥¼ ë ë¤ëë ìì ì°ì£¼ë¹íì¬ í¬ë©§ì ì´ ê·ì¬ì´ ë ìíë¤, ìí ê°ì ì¡°ëª
, ì´ì ë° ëí
ì¼",be=((t={},a={})=>(a.locale??s(),bt())),vt=()=>"ì¬ì´ë²íí¬ ëì¿",ve=((t={},a={})=>(a.locale??s(),vt())),kt=()=>"ë°¤ì ì¬ì´ë²íí¬ ëì¿ ê±°ë¦¬, ë¹ë¬¼ì ì ì´ ë°ì¬ëë ë¤ì¨, íë¡ê·¸ë¨ ê´ê³ í, ìíì ë¶ì기, ì´ì ë° ëí
ì¼",ke=((t={},a={})=>(a.locale??s(),kt())),Nt=()=>"ìì±í ë§ì",Ne=((t={},a={})=>(a.locale??s(),Nt())),yt=()=>"í´ ë° ë¬´ë µì ííë¡ì´ ì¼ë³¸ ì°ê³¨ ë§ì, ìì±í ì¤íì¼, ë¶ëë¬ì´ ë¹, ì¬ì¸í ë¶ í°ì¹",ye=((t={},a={})=>(a.locale??s(),yt())),St=()=>"ì í ì´¬ì",Se=((t={},a={})=>(a.locale??s(),St())),zt=()=>"í°ì ë리ì ìì ëì¸ ë§¤ëë¬ì´ ë¬´ê´ ë¸ë 무ì ì´ì´ë²ëì 미ëë©í ì í ì¬ì§, ë¶ëë¬ì´ ì¤íëì¤ ì¡°ëª
, ìì í¼ì¬ê³ ì¬ë",ze=((t={},a={})=>(a.locale??s(),zt())),Ct=()=>"í½ì
ëë곤",Ce=((t={},a={})=>(a.locale??s(),Ct())),wt=()=>"ë¹ëë í¬ë¦¬ì¤í ëêµ´ì ì§í¤ë ìì ëë곤ì 16ë¹í¸ í½ì
ìí¸, ë í¸ë¡ ê²ì ê°ì±, ì ëª
í ìê°",we=((t={},a={})=>(a.locale??s(),wt())),It=()=>"ì´ë¯¸ì§ ìì± Â· Workers AI",At=((t={},a={})=>(a.locale??s(),It())),Mt=()=>"ì´ë¯¸ì§ ìì± Â· fal.ai",Pt=((t={},a={})=>(a.locale??s(),Mt())),Et=()=>"ìì½í기",Ft=((t={},a={})=>(a.locale??s(),Et())),Tt=()=>"Cloudflare Workers AI 기ë°ì¼ë¡ 긴 í
ì¤í¸ë¥¼ ê°ê²°í ìì½ì¼ë¡ ìì¶í©ëë¤.",Lt=((t={},a={})=>(a.locale??s(),Tt())),Ut=()=>"ìì½ì´ ì¬ê¸°ì íìë©ëë¤.",Dt=((t={},a={})=>(a.locale??s(),Ut())),Ot=()=>"í
ì¤í¸ ìì½ì ì¤í¨íìµëë¤.",$t=((t={},a={})=>(a.locale??s(),Ot())),Bt=()=>"ìì½",Gt=((t={},a={})=>(a.locale??s(),Bt())),Rt=()=>"ìì½ ì¤...",Wt=((t={},a={})=>(a.locale??s(),Rt())),Kt=()=>"긴 기ì¬ë 문ë¨ì ì¬ê¸°ì ë¶ì¬ë£ì¼ì¸ì...",qt=((t={},a={})=>(a.locale??s(),Kt())),Vt=()=>"Cloudflare Workers AI를 ì¬ì©íë©´ ê°ë°ìê° Cloudflare ê¸ë¡ë² ë¤í¸ìí¬ìì 머ì ë¬ë 모ë¸ì ì¤íí ì ììµëë¤. ì¸íë¼ë¥¼ ê´ë¦¬íì§ ìê³ ë ì¸ê¸° ìë ì¤íìì¤ ëª¨ë¸ì ìµì¢
ì¬ì©ì ê°ê¹ì´ìì ì ê³µíë ìë²ë¦¬ì¤ GPU ê¸°ë° ì¶ë¡ íë«í¼ì ì ê³µí©ëë¤. Cloudflare AI Gatewayì ê²°í©íë©´ ì¬ë¬ AI ê³µê¸ì
ì²´ ì ë°
1ìì ìºì±, ë¶ì, ìë ì í, íµí© ì²êµ¬ë¥¼ íì©í ì ìì´ íë¡ëì
íê²½ìì ìì ì ì¸ AI 기ë¥ì ìì½ê² ì¶ìí ì ììµëë¤.",Ht=((t={},a={})=>(a.locale??s(),Vt())),Xt=()=>"ì본 ì½í
ì¸ ",Jt=((t={},a={})=>(a.locale??s(),Xt())),Yt=()=>"ìì½",Zt=((t={},a={})=>(a.locale??s(),Yt())),Qt=()=>"íê·¸ë¼ì¸ ìì±",es=((t={},a={})=>(a.locale??s(),Qt())),as=()=>"Cloudflare Workers AI 기ë°ì¼ë¡ ì¤ëª
ì¼ë¡ë¶í° ìí©í¸ ìë SaaS íê·¸ë¼ì¸ì ìì±í©ëë¤.",ts=((t={},a={})=>(a.locale??s(),as())),ss=()=>"ìì±ë íê·¸ë¼ì¸ 5ê°ê° ì¬ê¸°ì íìë©ëë¤.",ns=((t={},a={})=>(a.locale??s(),ss())),rs=()=>"íê·¸ë¼ì¸ ìì±ì ì¤í¨íìµëë¤.",is=((t={},a={})=>(a.locale??s(),rs())),ls=()=>"ì í ì¤ëª
",os=((t={},a={})=>(a.locale??s(),ls())),cs=()=>"ì¶ì² íê·¸ë¼ì¸",_s=((t={},a={})=>(a.locale??s(),cs())),ps=()=>"ìì± ì¤...",ds=((t={},a={})=>(a.locale??s(),ps())),us=()=>"SaaSê° íë ì¼ì íë 문ì¥ì¼ë¡ ì¤ëª
íì¸ì...",ms=((t={},a={})=>(a.locale??s(),us())),gs=()=>"TanStack Start, Cloudflare Workers, Better Auth, Drizzle ORMì¼ë¡ 구ì¶ë SaaS ë³´ì¼ë¬íë ì´í¸ì
ëë¤. ì¸ë ê°ë°ìê° ì£¼ë§ ëì íë¡ëì
ì¤ë¹ê° ìë£ë ì±ì ì¶ìí ì ìëë¡ ëìµëë¤.",xs=((t={},a={})=>(a.locale??s(),gs())),hs=()=>"SaaS íê·¸ë¼ì¸ ìì±ê¸°",fs=((t={},a={})=>(a.locale??s(),hs())),js=()=>"ë²ìí기",bs=((t={},a={})=>(a.locale??s(),js())),vs=()=>"Cloudflare Workers AI 기ë°ì¼ë¡ ì¬ë¬ ì¸ì´ ê°ì í
ì¤í¸ë¥¼ ë²ìí©ëë¤.",ks=((t={},a={})=>(a.locale??s(),vs())),Ns=()=>"ë²ì ê²°ê³¼ê° ì¬ê¸°ì íìë©ëë¤.",ys=((t={},a={})=>(a.locale??s(),Ns())),Ss=()=>"í
ì¤í¸ ë²ìì ì¤í¨íìµëë¤.",zs=((t={},a={})=>(a.locale??s(),Ss())),Cs=()=>"ì본 ì¸ì´",ws=((t={},a={})=>(a.locale??s(),Cs())),Is=()=>"ë²ì",As=((t={},a={})=>(a.locale??s(),Is())),Ms=()=>"ë²ì ì¤...",Ps=((t={},a={})=>(a.locale??s(),Ms())),Es=()=>"ë²ìí í
ì¤í¸ë¥¼ ì
ë ¥íê±°ë ë¶ì¬ë£ì¼ì¸ì...",Fs=((t={},a={})=>(a.locale??s(),Es())),Ts=()=>"ì본 ì¸ì´ì ëì ì¸ì´ë ìë¡ ë¬ë¼ì¼ í©ëë¤.",Ls=((t={},a={})=>(a.locale??s(),Ts())),Us=()=>"Cloudflare Workers AI를 ì¬ì©íë©´ ê°ë°ìê° ì£ì§ìì 머ì ë¬ë 모ë¸ì ì¤íí ì ììµëë¤.",Ds=((t={},a={})=>(a.locale??s(),Us())),Os=()=>"ì본 í
ì¤í¸",$s=((t={},a={})=>(a.locale??s(),Os())),Bs=()=>"ì¸ì´ ë°ê¾¸ê¸°",Gs=((t={},a={})=>(a.locale??s(),Bs())),Rs=()=>"ë²ì",Ws=((t={},a={})=>(a.locale??s(),Rs())),Ks=()=>"ëì ì¸ì´",qs=((t={},a={})=>(a.locale??s(),Ks())),Vs=()=>"ìì± í©ì±",Hs=((t={},a={})=>(a.locale??s(),Vs())),Xs=()=>"ìì²ë¹",Js=((t={},a={})=>(a.locale??s(),Xs())),Ys=()=>"Cloudflare Workers AI 기ë°ì¼ë¡ í
ì¤í¸ ì
ë ¥ìì ìì°ì¤ë¬ì´ ìì±ì í©ì±í©ëë¤.",Zs=((t={},a={})=>(a.locale??s(),Ys())),Qs=()=>"ìì±ë ì¤ëì¤ê° ì¬ê¸°ì íìë©ëë¤.",en=((t={},a={})=>(a.locale??s(),Qs())),an=()=>"ìì± í©ì±ì ì¤í¨íìµëë¤.",tn=((t={},a={})=>(a.locale??s(),an())),sn=()=>"í
ì¤í¸",nn=((t={},a={})=>(a.locale??s(),sn())),rn=()=>"ì¤ëì¤",ln=((t={},a={})=>(a.locale??s(),rn())),on=()=>"í©ì± ì¤...",cn=((t={},a={})=>(a.locale??s(),on())),_n=()=>"ì리 ë´ì´ ì½ì í
ì¤í¸ë¥¼ ì
ë ¥íê±°ë ë¶ì¬ë£ì¼ì¸ì...",pn=((t={},a={})=>(a.locale??s(),_n())),dn=()=>"Cloudflare Workers AIìì ì¸ì¬ë립ëë¤. ì´ ë°ëª¨ë ë¨ í ë²ì API í¸ì¶ë¡ í
ì¤í¸ë¥¼ ìì°ì¤ë¬ì´ ìì±ì¼ë¡ ë³íí©ëë¤.",un=((t={},a={})=>(a.locale??s(),dn())),mn=()=>"í
ì¤í¸ ìì± ë³í",gn=((t={},a={})=>(a.locale??s(),mn())),xn=()=>"ìì±",hn=((t={},a={})=>(a.locale??s(),xn()));const fn=[["path",{d:"M7 10h14l-4 -4",key:"svg-0"}],["path",{d:"M17 14h-14l4 4",key:"svg-1"}]],jn=R("outline","arrows-exchange","ArrowsExchange",fn);const bn=[["path",{d:"M9 5a3 3 0 0 1 3 -3a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3a3 3 0 0 1 -3 -3l0 -5",key:"svg-0"}],["path",{d:"M5 10a7 7 0 0 0 14 0",key:"svg-1"}],["path",{d:"M8 21l8 0",key:"svg-2"}],["path",{d:"M12 17l0 4",key:"svg-3"}]],vn=R("outline","microphone","Microphone",bn);const kn=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M11 20h-4a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v4",key:"svg-1"}],["path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-2"}
1],["path",{d:"M14 14l1 -1c.31 -.298 .644 -.497 .987 -.596",key:"svg-3"}],["path",{d:"M18.42 15.61a2.1 2.1 0 0 1 2.97 2.97l-3.39 3.42h-3v-3l3.42 -3.39",key:"svg-4"}]],Nn=R("outline","photo-edit","PhotoEdit",kn);const yn=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M6 13l2.644 -2.644a1.21 1.21 0 0 1 1.712 0l3.644 3.644",key:"svg-1"}],["path",{d:"M13 13l1.644 -1.644a1.21 1.21 0 0 1 1.712 0l1.644 1.644",key:"svg-2"}],["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-3"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-4"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-5"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-6"}]],Sn=R("outline","photo-scan","PhotoScan",yn);const zn=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],Ie=R("outline","upload","Upload",zn),Cn=I({method:"POST"}).handler(A("187e529cef0f3031f66cb9ad7c4e6c750801c48be9a735e8ad181bb0a481aa49")),wn=I({method:"POST"}).handler(A("1460ae44e155c8dfecd6ceee24db8a80cf69b7802860fdd62e18a67c8b6e6704")),In=I({method:"POST"}).handler(A("8f87b9b75a7c2d7fb4abff62475835586541d2d14874a3a42e699a6f45fedd16")),An=I({method:"POST"}).handler(A("dead70b057543f333c2f7b5c04e801fa0c491907f3dbc3e60f89bcb9c171c67e")),Mn=I({method:"POST"}).handler(A("3265ad4bc7d0b71fac892879d87de9a2580aefd06396a4669167b7fd68a71494")),Pn=I({method:"POST"}).handler(A("becedfafb9962dc48114658bdba43d852f72733856e7d99d711b3b750735a273")),En=I({method:"POST"}).handler(A("70a7cf203b4794de95cf7c27fd80881c2dd37c08787ebc75fe059ee0ba5d8287")),Fn=I({method:"POST"}).handler(A("d840745e32a78659650dc65d87b6fd58d92806852028942a629730b71a101fa6")),K={summarization:"@cf/meta/llama-3.2-3b-instruct",tagline:"@cf/meta/llama-3.2-3b-instruct",translation:"@cf/meta/m2m100-1.2b",textToSpeech:"@cf/deepgram/aura-1",imageCaption:"@cf/llava-hf/llava-1.5-7b-hf"},H=["@cf/black-forest-labs/flux-1-schnell","@cf/bytedance/stable-diffusion-xl-lightning","@cf/lykon/dreamshaper-8-lcm"],Tn=H[0],Ln=["fal-ai/flux/schnell","fal-ai/nano-banana","openai/gpt-image-2"],Ae="fal-ai/nano-banana",Un="fal-ai/nano-banana/edit",Dn="openai/gpt-image-2",On=1e6;function $n(){const t=[aa(),sa(),ra(),la()],a=r.useRef(null),[m,g]=r.useState(),[_,p]=r.useState(),[d,u]=r.useState(),[x,l]=r.useState(t[0]),[v,o]=r.useState(""),[k,b]=r.useState(),[S,i]=r.useState(!1);function C(c){const f=c.target.files?.[0];if(!f)return;if(!f.type.startsWith("image/")){b(ue());return}
1if(f.size>On){b(`Image is too large (${(f.size/1024).toFixed(0)} KB). ${ce()}`);return}const U=new FileReader;U.onloadend=()=>{const q=U.result;g(q),p(q.replace(/^data:image\/[^;]+;base64,/,"")),u({name:f.name,size:f.size}),o(""),b(void 0)},U.onerror=()=>b(pe()),U.readAsDataURL(f)}async function n(){if(_){b(void 0),o(""),i(!0);try{const c=await Fn({data:{imageBase64:_,prompt:x}});o(c.description)}catch(c){b(c instanceof Error?c.message:Ve())}finally{i(!1)}}}return e.jsxs(M,{children:[e.jsxs(P,{children:[e.jsxs(E,{className:"flex items-center gap-2",children:[e.jsx(Sn,{className:"size-5 text-primary"}),ga()]}),e.jsxs(F,{children:[Be()," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:K.imageCaption})]})]}),e.jsx(T,{children:e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:Xe()}),e.jsx("input",{ref:a,type:"file",accept:"image/*",className:"hidden",onChange:C}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs(y,{type:"button",variant:"outline",size:"sm",onClick:()=>a.current?.click(),children:[e.jsx(Ie,{className:"mr-1 size-4"}),d?ie():de()]}),d&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[d.name," · ",(d.size/1024).toFixed(0)," KB"]})]}),e.jsx("div",{className:"flex aspect-square w-full items-center justify-center overflow-hidden rounded-md border bg-muted/30",children:m?e.jsx("img",{src:m,alt:ca(),className:"size-full object-cover"}):e.jsx("span",{className:"px-4 text-center text-sm text-muted-foreground",children:Ke()})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"ai-caption-prompt",children:pa()}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(c=>{const f=x===c;return e.jsx("button",{type:"button",onClick:()=>l(c),className:f?"rounded-full border border-primary bg-primary px-3 py-1 text-xs text-primary-foreground":"rounded-full border border-border bg-muted/40 px-3 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted",children:c.length>28?`${c.slice(0,28)}â¦`:c},c)})}),e.jsx(L,{id:"ai-caption-prompt",rows:3,value:x,onChange:c=>l(c.target.value)}),e.jsx(y,{type:"button",onClick:n,disabled:S||!_||x.trim().length===0,children:S?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"mr-1 size-4 animate-spin"}),Qe()]}):Oe()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:Ye()}),e.jsx("div",{className:"min-h-[160px] rounded-md border bg-muted/30 p-4 text-sm leading-relaxed whitespace-pre-wrap",children:k?e.jsx("span",{className:"text-destructive",children:k}):S?e.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(z,{className:"size-4 animate-spin"}),ua()]}):v||e.jsx("span",{className:"text-muted-foreground",children:Re()})})]})]})]})})]})}const Me=[{value:H[0],label:"Flux.1 Schnell",hint:"Default · 12B distilled flow transformer"},{value:H[1],label:"SDXL Lightning",hint:"Lightning-fast 1024px generations",beta:!0},{value:H[2],label:"DreamShaper 8 LCM",hint:"Photorealistic Stable Diffusion fine-tune"}],te=Me.map(t=>({...t,label:t.beta?`${t.label} (Beta)`:t.label}));function Bn(){const t=[{id:"astronaut-panda",label:je(),prompt:be()},{id:"cyberpunk-tokyo",label:ve(),prompt:ke()},{id:"watercolor-village",label:Ne(),prompt:ye()},{id:"product-earbuds",label:Se(),prompt:ze()},{id:"pixel-dragon",label:Ce(),prompt:we()}],[a,m]=r.useState(t[0].id),[g,_]=r.useState(t[0].prompt),[p,d]=r.useState(Tn),[u,x]=r.useState(),[l,v]=r.useState(),[o,k]=r.useState(!1),b=Me.find(n=>n.value===p);function S(n){const c=t.find(f=>f.id===n);c&&(m(n),_(c.prompt))}function i(n){_(n);const c=t.find(f=>f.prompt===n);m(c?.id??null)}async function C(){v(void 0),x(void 0),k(!0);try{const n=await En({data:{prompt:g,model:p}});x(n.imageUrl)}catch(n){v(n instanceof Error?n.message:xe())}finally{k(!1)}}return e.jsxs(M,{children:[e.jsxs(P,{children:[e.jsxs(E,{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"size-5 text-primary"}),At()]}),e.jsxs(F,{children:[Aa()," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:p})," "]})]}),e.jsxs(T,{children:[e.jsxs("div",{className:"mb-4 space-y-1.5",children:[e.jsx(h,{className:"text-xs text-muted-foreground",children:_e()}),e.jsxs(D,{items:te,value:p,onValueChange:n=>{n&&d(n)},children:[e.jsx(O,{className:"w-72",size:"sm",children:e.jsx($,{})}),e.jsx(B,{children:te.map(n=>e.jsx(G,{value:n.value,label:n.label,children:n.label},n.value))})]}),b&&e.jsx("p",{className:"text-xs text-muted-foreground",children:b.hint})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"ai-cf-image-prompt",children:re()}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(n=>{const c=a===n.id;return e.jsx("button",{type:"button",onClick:()=>S(n.id),className:J("rounded-full border px-3 py-1 text-xs transition-colors",c?"border-primary bg-primary text-primary-foreground":"border-border bg-muted/40 text-muted-foreground hover:bg-muted"),children:n.label},n.id)})}),e.jsx(L,{id:"ai-cf-image-prompt",rows:6,value:g,onChange:n=>i(n.target.value),placeholder:fe()}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.length," ",W(),a===null&&` · ${le()}`]}),e.jsx(y,{type:"button",onClick:C,disabled:o||g.trim().length<3,children:o?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"mr-1 size-4 animate-spin"}),he()]}):me()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{children:ee()}),u&&!o&&e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:()=>Z(u,`cf-${p.replace(/[@/]/g,"-")}-${Date.now()}.jpg`),children:[e.jsx(Y,{className:"mr-1 size-4"}),Q()]})]}),e.jsx("div",{className:"flex aspect-square w-full items-center justify-center overflow-hidden rounded-md border bg-muted/30",children:l?e.jsx("span",{className:"px-4 text-center text-sm text-destructive",children:l}):o?e.jsx(z,{className:"size-8 animate-spin text-muted-foreground"}):u?e.jsx("img",{src:u,alt:oe(),className:"size-full object-cover"}):e.jsx("span",{className:"px-4 text-center text-sm text-muted-foreground",children:ge()})})]})]})]})]})}const X=[{value:Ae,label:"Nano Banana",hint:"Google's image model · ~$0.039 / image"},{value:Ln[0],label:"Flux Schnell",hint:"Fast & cheap · ~$0.003 / image"},{value:Dn,label:"GPT Image 2",hint:"OpenAI's premium model · sharp text & photoreal · slower (~30s, quality=low)"}];function Gn(){const t=[{id:"astronaut-panda",label:je(),prompt:be()},{id:"cyberpunk-tokyo",label:ve(),prompt:ke()},{id:"watercolor-village",label:Ne(),prompt:ye()}
1,{id:"product-earbuds",label:Se(),prompt:ze()},{id:"pixel-dragon",label:Ce(),prompt:we()}],[a,m]=r.useState(t[0].id),[g,_]=r.useState(t[0].prompt),[p,d]=r.useState(Ae),[u,x]=r.useState(),[l,v]=r.useState(),[o,k]=r.useState(!1),b=X.find(n=>n.value===p);function S(n){const c=t.find(f=>f.id===n);c&&(m(n),_(c.prompt))}function i(n){_(n);const c=t.find(f=>f.prompt===n);m(c?.id??null)}async function C(){v(void 0),x(void 0),k(!0);try{const n=await An({data:{prompt:g,model:p}});x(n.imageUrl)}catch(n){v(n instanceof Error?n.message:xe())}finally{k(!1)}}return e.jsxs(M,{children:[e.jsxs(P,{children:[e.jsxs(E,{className:"flex items-center gap-2",children:[e.jsx(Pe,{className:"size-5 text-primary"}),Pt()]}),e.jsxs(F,{children:[Pa()," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:p})," "]})]}),e.jsxs(T,{children:[e.jsxs("div",{className:"mb-4 space-y-1.5",children:[e.jsx(h,{className:"text-xs text-muted-foreground",children:_e()}),e.jsxs(D,{items:X,value:p,onValueChange:n=>{n&&d(n)},children:[e.jsx(O,{className:"w-72",size:"sm",children:e.jsx($,{})}),e.jsx(B,{children:X.map(n=>e.jsx(G,{value:n.value,label:n.label,children:n.label},n.value))})]}),b&&e.jsx("p",{className:"text-xs text-muted-foreground",children:b.hint})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"ai-image-prompt",children:re()}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(n=>{const c=a===n.id;return e.jsx("button",{type:"button",onClick:()=>S(n.id),className:J("rounded-full border px-3 py-1 text-xs transition-colors",c?"border-primary bg-primary text-primary-foreground":"border-border bg-muted/40 text-muted-foreground hover:bg-muted"),children:n.label},n.id)})}),e.jsx(L,{id:"ai-image-prompt",rows:6,value:g,onChange:n=>i(n.target.value),placeholder:fe()}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.length," ",W(),a===null&&` · ${le()}`]}),e.jsx(y,{type:"button",onClick:C,disabled:o||g.trim().length<3,children:o?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"mr-1 size-4 animate-spin"}),he()]}):me()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{children:ee()}),u&&!o&&e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:()=>Z(u,`fal-${p.replace(/[/]/g,"-")}-${Date.now()}.jpg`),children:[e.jsx(Y,{className:"mr-1 size-4"}),Q()]})]}),e.jsx("div",{className:"flex aspect-square w-full items-center justify-center overflow-hidden rounded-md border bg-muted/30",children:l?e.jsx("span",{className:"px-4 text-center text-sm text-destructive",children:l}):o?e.jsx(z,{className:"size-8 animate-spin text-muted-foreground"}):u?e.jsx("img",{src:u,alt:oe(),className:"size-full object-cover"}):e.jsx("span",{className:"px-4 text-center text-sm text-muted-foreground",children:ge()})})]})]})]})]})}const Rn=1e6;function Wn(){const t=[{id:"caricature",label:Ja(),prompt:Za()},{id:"pixar",label:et(),prompt:tt()},{id:"anime",label:nt(),prompt:it()}],a=r.useRef(null),[m,g]=r.useState(),[_,p]=r.useState(),[d,u]=r.useState(),[x,l]=r.useState(t[0].id),[v,o]=r.useState(t[0].prompt),[k,b]=r.useState(),[S,i]=r.useState(),[C,n]=r.useState(!1);function c(j){const N=t.find(w=>w.id===j);N&&(l(j),o(N.prompt))}function f(j){o(j);const N=t.find(w=>w.prompt===j);l(N?.id??null)}function U(j){const N=j.target.files?.[0];if(!N)return;if(!N.type.startsWith("image/")){i(ue());return}if(N.size>Rn){i(`Image is too large (${(N.size/1024).toFixed(0)} KB). ${ce()}`);return}const w=new FileReader;w.onloadend=()=>{const ae=w.result;g(ae),p(ae),u({name:N.name,size:N.size}),b(void 0),i(void 0)},w.onerror=()=>i(pe()),w.readAsDataURL(N)}async function q(){if(_){i(void 0),b(void 0),n(!0);try{const j=await Mn({data:{imageBase64:_,prompt:v}});b(j.imageUrl)}catch(j){i(j instanceof Error?j.message:Ga())}finally{n(!1)}}}return e.jsxs(M,{children:[e.jsxs(P,{children:[e.jsxs(E,{className:"flex items-center gap-2",children:[e.jsx(Nn,{className:"size-5 text-primary"}),mt()]}),e.jsxs(F,{children:[La()," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:Un})]})]}),e.jsx(T,{children:e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:Wa()}),e.jsx("input",{ref:a,type:"file",accept:"image/*",className:"hidden",onChange:U}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs(y,{type:"button",variant:"outline",size:"sm",onClick:()=>a.current?.click(),children:[e.jsx(Ie,{className:"mr-1 size-4"}),d?ie():de()]}),d&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[d.name," · ",(d.size/1024).toFixed(0)," KB"]}
1)]}),e.jsx("div",{className:"flex aspect-square w-full items-center justify-center overflow-hidden rounded-md border bg-muted/30",children:m?e.jsx("img",{src:m,alt:ot(),className:"size-full object-cover"}):e.jsx("span",{className:"px-4 text-center text-sm text-muted-foreground",children:$a()})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"ai-image-edit-prompt",children:_t()}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(j=>{const N=x===j.id;return e.jsx("button",{type:"button",onClick:()=>c(j.id),className:J("rounded-full border px-3 py-1 text-xs transition-colors",N?"border-primary bg-primary text-primary-foreground":"border-border bg-muted/40 text-muted-foreground hover:bg-muted"),children:j.label},j.id)})}),e.jsx(L,{id:"ai-image-edit-prompt",rows:4,value:v,onChange:j=>f(j.target.value),placeholder:Ha()}),e.jsx(y,{type:"button",onClick:q,disabled:C||!_||v.trim().length<5,children:C?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"mr-1 size-4 animate-spin"}),qa()]}):Fa()})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{children:ee()}),k&&!C&&e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:()=>Z(k,`avatar-stylized-${Date.now()}.png`),children:[e.jsx(Y,{className:"mr-1 size-4"}),Q()]})]}),e.jsx("div",{className:"flex aspect-square w-full items-center justify-center overflow-hidden rounded-md border bg-muted/30",children:S?e.jsx("span",{className:"px-4 text-center text-sm text-destructive",children:S}):C?e.jsx(z,{className:"size-8 animate-spin text-muted-foreground"}):k?e.jsx("img",{src:k,alt:dt(),className:"size-full object-cover"}):e.jsx("span",{className:"px-4 text-center text-sm text-muted-foreground",children:Da()})})]})]})})]})}function Kn(){const[t,a]=r.useState(Ht().trim()),[m,g]=r.useState(""),[_,p]=r.useState(),[d,u]=r.useState(!1);async function x(){p(void 0),g(""),u(!0);try{const l=await Cn({data:{text:t}});g(l.summary)}catch(l){p(l instanceof Error?l.message:$t())}finally{u(!1)}}return e.jsxs(M,{children:[e.jsxs(P,{children:[e.jsxs(E,{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"size-5 text-primary"}),Zt()]}),e.jsxs(F,{children:[Lt()," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:K.summarization})]})]}),e.jsx(T,{children:e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"ai-summarization-input",children:Jt()}),e.jsx(L,{id:"ai-summarization-input",rows:10,value:t,onChange:l=>a(l.target.value),placeholder:qt()}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.length," ",W()]}),e.jsx(y,{type:"button",onClick:x,disabled:d||t.trim().length<50,children:d?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"mr-1 size-4 animate-spin"}),Wt()]}):Ft()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:Gt()}),e.jsx("div",{className:"min-h-[256px] rounded-md border bg-muted/30 p-4 text-sm leading-relaxed whitespace-pre-wrap",children:_?e.jsx("span",{className:"text-destructive",children:_}):m||e.jsx("span",{className:"text-muted-foreground",children:Dt()})})]})]})})]})}function qn(){const[t,a]=r.useState(xs()),[m,g]=r.useState([]),[_,p]=r.useState(),[d,u]=r.useState(!1);async function x(){p(void 0),g([]),u(!0);try{const l=await In({data:{product:t}});g(l.taglines)}catch(l){p(l instanceof Error?l.message:is())}finally{u(!1)}}return e.jsxs(M,{children:[e.jsxs(P,{children:[e.jsxs(E,{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"size-5 text-primary"}),fs()]}),e.jsxs(F,{children:[ts()," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:K.tagline})]})]}),e.jsx(T,{children:e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"ai-tagline-input",children:os()}),e.jsx(L,{id:"ai-tagline-input",rows:8,value:t,onChange:l=>a(l.target.value),placeholder:ms()}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.length," ",W()]}),e.jsx(y,{type:"button",onClick:x,disabled:d||t.trim().length<10,children:d?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"mr-1 size-4 animate-spin"}),ds()]}):es()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:_s()}),e.jsx("div",{className:"min-h-[208px] rounded-md border bg-muted/30 p-4 text-sm leading-relaxed",children:_?e.jsx("span",{className:"text-destructive",children:_}):m.length>0?e.jsx("ol",{className:"list-decimal space-y-2 pl-5",children:m.map(l=>e.jsx("li",{children:l},l))}):e.jsx("span",{className:"text-muted-foreground",children:ns()})})]})]})})]})}const V=[{value:"english",label:"English"},{value:"chinese",label:"䏿 Chinese"},{value:"french",label:"Français French"},{value:"german",label:"Deutsch German"},{value:"spanish",label:"Español Spanish"},{value:"japanese",label:"æ¥æ¬èª Japanese"},{value:"korean",label:"íêµì´ Korean"},{value:"russian",label:"Ð ÑÑÑкий Russian"},{value:"portuguese",label:"Português Portuguese"},{value:"arabic",label:"Ø§ÙØ¹Ø±Ø¨ÙØ© Arabic"}];function Vn(){const[t,a]=r.useState(Ds()),[m,g]=r.useState("english"),[_,p]=r.useState("chinese"),[d,u]=r.useState(""),[x,l]=r.useState(),[v,o]=r.useState(!1);function k(){g(_),p(m),a(d||t),u("")}async function b(){l(void 0),u(""),o(!0);try{const i=await wn({data:{text:t,sourceLang:m,targetLang:_}});u(i.translatedText)}catch(i){l(i instanceof Error?i.message:zs())}finally{o(!1)}}const S=m===_;return e.jsxs(M,{children:[e.jsxs(P,{children:[e.jsxs(E,{className:"flex items-center gap-2",children:[e.jsx(Fe,{className:"size-5 text-primary"}),Ws()]}),e.jsxs(F,{children:[ks()," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:K.translation})]})]}),e.jsxs(T,{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-end gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(h,{className:"text-xs text-muted-foreground",children:ws()}),e.jsxs(D,{items:V,value:m,onValueChange:i=>{i&&g(i)},children:[e.jsx(O,{className:"w-44",size:"sm",children:e.jsx($,{})}),e.jsx(B,{children:V.map(i=>e.jsx(G,{value:i.value,label:i.label,children:i.label},i.value))})]})]}),e.jsx(y,{type:"button",variant:"outline",size:"icon",className:"mb-0.5 shrink-0",onClick:k,"aria-label":Gs(),children:e.jsx(jn,{className:"size-4"})}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(h,{className:"text-xs text-muted-foreground",children:qs()}),e.jsxs(D,{items:V,value:_,onValueChange:i=>{i&&p(i)},children:[e.jsx(O,{className:"w-44",size:"sm",children:e.jsx($,{})}),e.jsx(B,{children:V.map(i=>e.jsx(G,{value:i.value,label:i.label,children:i.label},i.value))})]})]})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"ai-translation-input",children:$s()}),e.jsx(L,{id:"ai-translation-input",rows:6,value:t,onChange:i=>a(i.target.value),placeholder:Fs()}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.length," ",W()]}),e.jsx(y,{type:"button",onClick:b,disabled:v||S||t.trim().length===0,children:v?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"mr-1 size-4 animate-spin"}),Ps()]}):bs()}),S&&e.jsx("p",{className:"text-xs text-destructive",children:Ls()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:As()}),e.jsx("div",{className:"min-h-[160px] rounded-md border bg-muted/30 p-4 text-sm leading-relaxed whitespace-pre-wrap",children:x?e.jsx("span",{className:"text-destructive",children:x}):d||e.jsx("span",{className:"text-muted-foreground",children:ys()})})]})]})]})]})}const se=[{value:"asteria",label:"Asteria · Female (US)"},{value:"luna",label:"Luna · Female (US)"},{value:"stella",label:"Stella · Female (US)"},{value:"athena",label:"Athena · Female (UK)"},{value:"hera",label:"Hera · Female (US)"},{value:"angus",label:"Angus · Male (IE)"},{value:"arcas",label:"Arcas · Male (US)"},{value:"orion",label:"Orion · Male (US)"},{value:"orpheus",label:"Orpheus · Male (US)"},{value:"perseus",label:"Perseus · Male (US)"},{value:"helios",label:"Helios · Male (UK)"},{value:"zeus",label:"Zeus · Male (US)"}];function Hn(){const[t,a]=r.useState(un()),[m,g]=r.useState("asteria"),[_,p]=r.useState(),[d,u]=r.useState(),[x,l]=r.useState(!1);async function v(){u(void 0),p(void 0),l(!0);try{const o=await Pn({data:{text:t,speaker:m}});p(o.audioUrl)}catch(o){u(o instanceof Error?o.message:tn())}finally{l(!1)}}return e.jsxs(M,{children:[e.jsxs(P,{children:[e.jsxs(E,{className:"flex items-center gap-2",children:[e.jsx(vn,{className:"size-5 text-primary"}),gn()]}),e.jsxs(F,{children:[Zs()," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:K.textToSpeech})]})]}),e.jsxs(T,{children:[e.jsx("div",{className:"mb-4 flex flex-wrap items-end gap-3",children:e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(h,{className:"text-xs text-muted-foreground",children:hn()}),e.jsxs(D,{items:se,value:m,onValueChange:o=>{o&&g(o)},children:[e.jsx(O,{className:"w-56",size:"sm",children:e.jsx($,{})}),e.jsx(B,{children:se.map(o=>e.jsx(G,{value:o.value,label:o.label,children:o.label},o.value))})]})]})}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"ai-tts-input",children:nn()}),e.jsx(L,{id:"ai-tts-input",rows:6,value:t,onChange:o=>a(o.target.value),placeholder:pn()}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.length," characters · ~$",(t.length/1e3*.015).toFixed(4)," ",Js()]}),e.jsx(y,{type:"button",onClick:v,disabled:x||t.trim().length===0,children:x?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"mr-1 size-4 animate-spin"}),cn()]}):Hs()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:ln()}),e.jsx("div",{className:"flex min-h-[160px] w-full items-center justify-center rounded-md border bg-muted/30 p-4",children:d?e.jsx("span",{className:"text-center text-sm text-destructive",children:d}):x?e.jsx(z,{className:"size-8 animate-spin text-muted-foreground"}):_?e.jsx("audio",{controls:!0,src:_,className:"w-full",children:e.jsx("track",{kind:"captions"})}):e.jsx("span",{className:"text-center text-sm text-muted-foreground",children:en()})})]})]})]})]})}function sr(){return e.jsxs("div",{className:"flex min-h-svh flex-col",children:[e.jsx(Ue,{showBack:!0}),e.jsx(Le,{className:"py-16 px-4",children:e.jsxs("div",{className:"mx-auto max-w-5xl space-y-10 pb-16",children:[e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:Te()}),e.jsx("p",{className:"text-lg text-muted-foreground",children:Ca()})]}),e.jsx("section",{id:"text-summarization",className:"scroll-mt-20",children:e.jsx(Kn,{})}),e.jsx("section",{id:"translation",className:"scroll-mt-20",children:e.jsx(Vn,{})}),e.jsx("section",{id:"tagline-generator",className:"scroll-mt-20",children:e.jsx(qn,{})}),e.jsx("section",{id:"text-to-speech",className:"scroll-mt-20",children:e.jsx(Hn,{})}),e.jsx("section",{id:"image-captioning",className:"scroll-mt-20",children:e.jsx($n,{})}),e.jsx("section",{id:"image-generator-cloudflare",className:"scroll-mt-20",children:e.jsx(Bn,{})}),e.jsx("section",{id:"image-generator-fal",className:"scroll-mt-20",children:e.jsx(Gn,{})}),e.jsx("section",{id:"image-editing",className:"scroll-mt-20",children:e.jsx(Wn,{})})]})})]})}export{sr as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.