PageSourceSearch

https://whatsthebigdata.com/_next/static/chunks/pages/ai-image-enhancer-afb925dd7634b396.js

js whatsthebigdata.com collected 2026-10-02 14:50:58 UTC 24,642 bytes, 7 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3041],{18142:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ai-image-enhancer",function(){return t(36690)}])},32692:function(e,a,t){"use strict";t.d(a,{Cd:function(){return d},X:function(){return o},bZ:function(){return r}});var l=t(85893);t(67294);var s=t(12003),n=t(98694);let i=(0,s.j)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),r=e=>{let{className:a,variant:t,...s}=e;return(0,l.jsx)("div",{role:"alert",className:(0,n.cn)(i({variant:t}),a),...s})},d=e=>{let{className:a,...t}=e;return(0,l.jsx)("h5",{className:(0,n.cn)("mb-1 font-medium leading-none tracking-tight",a),...t})},o=e=>{let{className:a,...t}=e;return(0,l.jsx)("div",{className:(0,n.cn)("text-sm [&_p]:leading-relaxed",a),...t})}},66953:function(e,a,t){"use strict";t.d(a,{_:function(){return i}});var l=t(85893),s=t(67294),n=t(49102);let i=s.forwardRef((e,a)=>{let{className:t,...s}=e;return(0,l.jsx)(n.f,{ref:a,className:t,...s})});i.displayName=n.f.displayName},29979:function(e,a,t){"use strict";t.d(a,{B:function(){return d}});var l=t(85893),s=t(50607),n=t(67294);let{signIn:i}=t(33299),{useRouter:r}=t(11163),d=e=>{let{onClose:a}=e,[t,d]=(0,n.useState)(!1),o=r(),c=()=>{d(!0);let e=o.asPath;i("google",{callbackUrl:e})};return(0,l.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,l.jsxs)(s.E.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},style:{backgroundColor:"white",padding:"2rem",borderRadius:"0.5rem",maxWidth:"400px",width:"90%",textAlign:"center"},children:[(0,l.jsx)("h2",{style:{marginBottom:"1rem"},children:"Sign in to use this tool for free"}),(0,l.jsx)("p",{style:{marginBottom:"1rem"},children:"Unlock the power of AI Tools"}),(0,l.jsx)(s.E.button,{whileHover:{scale:1.05},whileTap:{scale:.95},disabled:t,onClick:c,style:{width:"100%",padding:"0.5rem 1rem",backgroundColor:"#4F46E5",color:"white",border:"none",borderRadius:"0.25rem",cursor:"pointer",marginBottom:"1rem"},children:t?(0,l.jsxs)("div",{className:"flex gap-3 items-center justify-center",children:["Signing in",(0,l.jsx)("div",{className:"w-6 h-6 border-t-2 border-white rounded-full animate-spin"})]}):"Sign in with Google"})]})})}},24385:function(e,a,t){"use strict";t.d(a,{E:function(){return y}});var l=t(85893),s=t(67294),n=t(25360),i=t(75320),r="Progress",[d,o]=(0,n.b)(r),[c,u]=d(r),m=s.forwardRef((e,a)=>{let{__scopeProgress:t,value:s=null,max:n,getValueLabel:r=g,...d}=e;(n||0===n)&&!v(n)&&console.error(`Invalid prop `max` of value `${n}\` supplied to \`Progress\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`);let o=v(n)?n:100;null===s||b(s,o)||console.error(`Invalid prop `value` of value `${s}\` supplied to \`Progress\`. The \`value\` prop must be:
2  - a positive number
3  - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
4  - \`null\` or \`undefined\` if the progress is indeterminate.
5
6Defaulting to \`null\`.`);let u=b(s,o)?s:null,m=p(u)?r(u,o):void 0;return(0,l.jsx)(c,{scope:t,value:u,max:o,children:(0,l.jsx)(i.WV.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":p(u)?u:void 0,"aria-valuetext":m,role:"progressbar","data-state":f(u,o),"data-value":u??void 0,"data-max":o,...d,ref:a})})});m.displayName=r;var h="ProgressIndicator",x=s.forwardRef((e,a)=>{let{__scopeProgress:t,...s}=e,n=u(h,t);return(0,l.jsx)(i.WV.div,{"data-state":f(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...s,ref:a})});function g(e,a){return`${Math.round(e/a*100)}%`}function f(e,a){return null==e?"indeterminate":e===a?"complete":"loading"}function p(e){return"number"==typeof e}function v(e){return p(e)&&!isNaN(e)&&e>0}function b(e,a){return p(e)&&!isNaN(e)&&e<=a&&e>=0}x.displayName=h;var j=t(98694);let y=s.forwardRef((e,a)=>{let{className:t,value:s,...n}=e;return(0,l.jsx)(m,{ref:a,className:(0,j.cn)("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",t),...n,children:(0,l.jsx)(x,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(s||0)}%)`}})})});y.displayName=m.displayName},71095:function(e,a,t){"use strict";t.d(a,{Bw:function(){return g},Ph:function(){return c},Ql:function(){return p},i4:function(){return m},ki:function(){return u}});
6var l=t(85893),s=t(67294),n=t(79009),i=t(3424),r=t(2112),d=t(34001),o=t(98694);let c=n.fC;n.ZA;let u=n.B4,m=s.forwardRef(function(e,a){let{className:t,children:s,...r}=e;return(0,l.jsxs)(n.xz,{ref:a,className:(0,o.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 ",t),...r,style:{border:"1px solid #d1d5db"},children:[s,(0,l.jsx)(n.JO,{asChild:!0,children:(0,l.jsx)(i.Z,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=n.xz.displayName;let h=s.forwardRef(function(e,a){let{className:t,...s}=e;return(0,l.jsx)(n.u_,{ref:a,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,l.jsx)(r.Z,{className:"h-4 w-4"})})});h.displayName=n.u_.displayName;let x=s.forwardRef(function(e,a){let{className:t,...s}=e;return(0,l.jsx)(n.$G,{ref:a,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,l.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=n.$G.displayName;let g=s.forwardRef(function(e,a){let{className:t,children:s,position:i="popper",...r}=e;return(0,l.jsx)(n.h_,{children:(0,l.jsxs)(n.VY,{ref:a,className:(0,o.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:i,...r,children:[(0,l.jsx)(h,{}),(0,l.jsx)(n.l_,{className:(0,o.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),(0,l.jsx)(x,{})]})})});g.displayName=n.VY.displayName;let f=s.forwardRef(function(e,a){let{className:t,...s}=e;return(0,l.jsx)(n.__,{ref:a,className:(0,o.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...s})});f.displayName=n.__.displayName;let p=s.forwardRef(function(e,a){let{className:t,children:s,...i}=e;return(0,l.jsxs)(n.ck,{ref:a,className:(0,o.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...i,children:[(0,l.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,l.jsx)(n.wU,{children:(0,l.jsx)(d.Z,{className:"h-4 w-4"})})}),(0,l.jsx)(n.eT,{children:s})]})});p.displayName=n.ck.displayName;let v=s.forwardRef(function(e,a){let{className:t,...s}=e;return(0,l.jsx)(n.Z0,{ref:a,className:(0,o.cn)("-mx-1 my-1 h-px bg-muted",t),...s})});v.displayName=n.Z0.displayName},4289:function(e,a,t){"use strict";t.d(a,{i:function(){return r}});var l=t(85893),s=t(67294),n=t(68482),i=t(98694);let r=s.forwardRef(function(e,a){let{className:t,...s}=e;return(0,l.jsxs)(n.fC,{ref:a,className:(0,i.cn)("relative flex w-full touch-none select-none items-center bg-gray-300 rounded-full",t),...s,children:[(0,l.jsx)(n.fQ,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:(0,l.jsx)(n.e6,{className:"absolute h-full  "})}),(0,l.jsx)(n.bU,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors bg-indigo-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]})});r.displayName=n.fC.displayName},14055:function(e,a,t){"use strict";t.d(a,{g:function(){return i}});var l=t(85893),s=t(67294),n=t(98694);let i=s.forwardRef(function(e,a){let{className:t,...s}=e;return(0,l.jsx)("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:a,...s})});i.displayName="Textarea"},36690:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return C}});
6var l=t(85893),s=t(36657),n=t(9008),i=t.n(n),r=t(67294),d=t(50607),o=t(89583),c=t(33299),u=t(71095),m=t(4289),h=t(66953),x=t(14055),g=t(37370),f=t(78936);t(29979);var p=t(11163),v=t(36961),b=t(32692),j=t(24385),y=t(87066),N=t(67595);let w=[{value:"natural",label:"Natural Enhancement"},{value:"vivid",label:"Vivid Colors"},{value:"hdr",label:"HDR Effect"},{value:"dramatic",label:"Dramatic Look"},{value:"lighting",label:"Lighting Correction"},{value:"clarity",label:"Clarity & Sharpness"},{value:"restoration",label:"Photo Restoration"}],k=[{value:"overall",label:"Overall Enhancement"},{value:"color",label:"Color Correction"},{value:"detail",label:"Detail Enhancement"},{value:"noise",label:"Noise Reduction"},{value:"lighting",label:"Lighting Balance"}],E=[{value:"standard",label:"Standard Quality"},{value:"high",label:"High Quality"},{value:"ultra",label:"Ultra High Quality"}];function C(){var e,a,t;let{data:n,status:C}=(0,c.useSession)(),[S,P]=(0,r.useState)(!1),[R,_]=(0,r.useState)(!1),[I,V]=(0,r.useState)(!1),[B,Z]=(0,r.useState)(""),[F,A]=(0,r.useState)(""),[D,T]=(0,r.useState)(""),[U,L]=(0,r.useState)("natural"),[$,z]=(0,r.useState)("overall"),[O,Q]=(0,r.useState)("high"),[W,q]=(0,r.useState)(""),[G,M]=(0,r.useState)([70]),[H,X]=(0,r.useState)([60]),[Y,J]=(0,r.useState)([50]),[K,ee]=(0,r.useState)(null),[ea,et]=(0,r.useState)(""),[el,es]=(0,r.useState)(0),en=(0,r.useRef)(null),ei=N.hV.introContent,er=(0,p.useRouter)(),ed=(null==ei?void 0:ei.title)||"AI Image Enhancer";(0,r.useEffect)(()=>{var e,a;let t=`Enhance this image with ${null===(e=w.find(e=>e.value===U))||void 0===e?void 0:e.label} style`;t+=`, focus on ${null===(a=k.find(e=>e.value===$))||void 0===a?void 0:a.label.toLowerCase()}`,("high"===O||"ultra"===O)&&(t+=", produce high resolution output with enhanced details"),"ultra"===O&&(t+=", maximum quality, perfect lighting balance"),q(t)},[U,$,O]);let eo=async e=>{let a=e.target.files[0];if(a){if(a.size>10485760){ee("File is too large. Maximum size is 10MB.");return}if(!["image/jpeg","image/png","image/webp"].includes(a.type)){ee("Invalid file type. Please upload a JPG, PNG, or WEBP image.");return}_(!0),ee(null);try{let e=new FileReader;e.onload=e=>{A(e.target.result)},e.readAsDataURL(a);let t=new FormData;t.append("image",a);let l=await y.Z.post("/api/upload-image",t,{headers:{"Content-Type":"multipart/form-data"}});if(l.data.url)Z(l.data.url);else throw Error("No URL received from upload")}catch(e){console.error("Error uploading image:",e),ee("Failed to upload image. Please try again.")}finally{_(!1)}}},ec=async e=>{if(e.preventDefault(),!B){ee("Please upload an image first.");return}V(!0),ee(null),et("Starting image enhancement..."),es(5),T("");try{let e={imageUrl:B,prompt:W,enhancementStyle:U,focusArea:$,quality:O,enhancementStrength:G[0]/100,sharpnessLevel:H[0]/100,colorVibrancy:Y[0]/100},a=setInterval(()=>{es(e=>e>=90?(clearInterval(a),e):e+10),el<30?et("Analyzing image..."):el<60?et("Applying enhancements..."):el<90&&et("Finalizing your enhanced image...")},800),t=await y.Z.post("/api/enhance-image",e);clearInterval(a);let{imageUrl:l,success:s}=t.data;if(s)T(l),es(100),et("Enhancement complete!");else throw Error("Image enhancement failed")}catch(e){var a,t;console.error("Error enhancing image:",e),ee((null===(a=e.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.details)||e.message||"Failed to enhance image. Please try again."),es(0),et("")}finally{V(!1)}},eu=()=>{if(D){let e=document.createElement("a");e.href=D,e.download="enhanced-image.jpg",document.body.appendChild(e),e.click()}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(i(),{children:[(0,l.jsx)("title",{children:ed}),(0,l.jsx)("link",{rel:"canonical",href:`https://whatsthebigdata.com${er.asPath.split("?")[0]}`}),(0,l.jsx)("meta",{name:"description",content:(null==ei?void 0:ei.description)||"Transform your photos into stunning high-quality images in seconds"})]}),(0,l.jsxs)(s.Z,{children:[(0,l.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,l.jsxs)("div",{className:"bg-white p-6 rounded-xl shadow-lg mb-8",children:[(0,l.jsx)("div",{className:"mb-6 border-b-2 border-indigo-100",children:(0,l.jsxs)("div",{className:"mb-5",children:[(0,l.jsx)("h1",{className:"display-3 mg-bottom-0",children:ed}),(0,l.jsx)("p",{className:"paragraph-large mg-top-16px",children:(null==ei?void 0:ei.description)||"Transform your photos into stunning high-quality images in seconds"})]})}),(0,l.jsxs)("form",{onSubmit:ec,className:"space-y-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"font-semibold text-indigo-700 mb-2 block",children:"Upload Your Image"}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,l.jsxs)("div",{className:`border-2 border-dashed rounded-lg p-6 flex flex-col items-center justify-center text-center cursor-pointer hover:bg-gray-50 transition
7                    ${F?"border-green-300 bg-green-50":"border-gray-300"}`,onClick:()=>en.current.click(),children:[(0,l.jsx)("input",{type:"file",ref:en,onChange:eo,className:"hidden",accept:"image/jpeg,image/png,image/webp"}),R?(0,l.jsxs)("div",{className:"py-4",children:[(0,l.jsx)("div",{className:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-indigo-600 mx-auto"}),(0,l.jsx)("p",{className:"mt-2 text-indigo-600",children:"Uploading..."})]}):F?(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)("img",{src:F,alt:"Preview",className:"max-h-48 mx-auto rounded-lg"}),(0,l.jsx)("p",{className:"mt-2 text-green-600",children:"Image uploaded! Click to change."})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.DUB,{className:"text-3xl text-gray-400 mb-2"}),(0,l.jsx)("p",{className:"text-gray-600",children:"Click to upload your image"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"(JPG, PNG or WEBP, max 10MB)"})]})]}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"bg-gray-50 p-4 rounded-lg",children:[(0,l.jsx)("h4",{className:"font-semibold text-gray-700 mb-2",children:"Image Tips:"}),(0,l.jsxs)("ul",{className:"text-sm text-gray-600 space-y-1 list-disc pl-4",children:[(0,l.jsx)("li",{children:"Start with the highest resolution image available"}),(0,l.jsx)("li",{children:"Works with any type of photo - landscapes, portraits, etc."}),(0,l.jsx)("li",{children:"Best results with decent quality source images"}),(0,l.jsx)("li",{children:"Enhancement works well for lighting, colors, and sharpness"}),(0,l.jsx)("li",{children:"For heavily damaged photos, try the Restoration style"})]})]})})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"font-semibold text-indigo-700 mb-1 block",children:"Enhancement Style"}),(0,l.jsxs)(u.Ph,{onValueChange:L,value:U,children:[(0,l.jsx)(u.i4,{children:(0,l.jsx)(u.ki,{placeholder:"Select enhancement style"})}),(0,l.jsx)(u.Bw,{className:"bg-white",children:w.map(e=>(0,l.jsx)(u.Ql,{value:e.value,children:e.label},e.value))})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"font-semibold text-indigo-700 mb-1 block",children:"Focus Area"}),(0,l.jsxs)(u.Ph,{onValueChange:z,value:$,children:[(0,l.jsx)(u.i4,{children:(0,l.jsx)(u.ki,{placeholder:"Select focus area"})}),(0,l.jsx)(u.Bw,{className:"bg-white",children:k.map(e=>(0,l.jsx)(u.Ql,{value:e.value,children:e.label},e.value))})]})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"font-semibold text-indigo-700 mb-1 block",children:"Quality"}),(0,l.jsxs)(u.Ph,{onValueChange:Q,value:O,children:[(0,l.jsx)(u.i4,{children:(0,l.jsx)(u.ki,{placeholder:"Select quality"})}),(0,l.jsx)(u.Bw,{className:"bg-white",children:E.map(e=>(0,l.jsx)(u.Ql,{value:e.value,children:e.label},e.value))})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Higher quality settings produce better results but may take longer to process"})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(h._,{htmlFor:"enhancement",className:"font-semibold text-indigo-700",children:"Enhancement Strength"}),(0,l.jsxs)("span",{className:"text-sm text-gray-500",children:[G,"%"]})]}),(0,l.jsx)(m.i,{id:"enhancement",defaultValue:[70],max:100,step:1,className:"mt-2",onValueChange:M}),(0,l.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[(0,l.jsx)("span",{children:"Subtle"}),(0,l.jsx)("span",{children:"Balanced"}),(0,l.jsx)("span",{children:"Maximum"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(h._,{htmlFor:"sharpness",className:"font-semibold text-indigo-700",children:"Sharpness Level"}),(0,l.jsxs)("span",{className:"text-sm text-gray-500",children:[H,"%"]})]}),(0,l.jsx)(m.i,{id:"sharpness",defaultValue:[60],max:100,step:1,className:"mt-2",onValueChange:X}),(0,l.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[(0,l.jsx)("span",{children:"Soft"}),(0,l.jsx)("span",{children:"Balanced"}),(0,l.jsx)("span",{children:"Ultra Sharp"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(h._,{htmlFor:"color",className:"font-semibold text-indigo-700",children:"Color Vibrancy"}),(0,l.jsxs)("span",{className:"text-sm text-gray-500",children:[Y,"%"]})]}),(0,l.jsx)(m.i,{id:"color",defaultValue:[50],max:100,step:1,className:"mt-2",onValueChange:J}),(0,l.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[(0,l.jsx)("span",{children:"Natural"}),(0,l.jsx)("span",{children:"Enhanced"}),(0,l.jsx)("span",{children:"Vivid"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"font-semibold text-indigo-700 mb-1 block flex justify-between",children:[(0,l.jsx)("span",{children:"Enhancement Prompt"}),(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"(Auto-generated from your settings)"})]}),(0,l.jsx)(x.g,{value:W,onChange:e=>q(e.target.value),className:"h-20 bg-gray-50",placeholder:"Image enhancement prompt will appear here..."})]}),K&&(0,l.jsxs)(b.bZ,{variant:"destructive",children:[(0,l.jsx)(v.Z,{className:"h-4 w-4"}),(0,l.jsx)(b.Cd,{children:"Error"}),(0,l.jsx)(b.X,{children:K})]}),(0,l.jsxs)(d.E.button,{whileHover:{scale:1.02},whileTap:{scale:.98},type:"submit",className:"w-full bg-gradient-to-r from-indigo-600 to-purple-600 text-white py-3 rounded-lg font-semibold flex items-center justify-center gap-2",disabled:I||!B,children:[(0,l.jsx)(o.hWE,{}),I?"Enhancing Your Image...":"Enhance Image"]}),I&&(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(j.E,{value:el,className:"h-2"}),(0,l.jsx)("p",{className:"text-center text-sm text-indigo-600",children:ea})]})]})]}),D&&(0,l.jsx)(d.E.div,{initial:{opacity:0}
7,animate:{opacity:1},exit:{opacity:0},children:(0,l.jsxs)("div",{className:"bg-white p-6 rounded-xl shadow-lg mb-8",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)("p",{className:"text-2xl font-bold text-indigo-800 border-b-2 border-indigo-100 pb-2",children:"Your Enhanced Image"}),(0,l.jsxs)("button",{onClick:eu,className:"flex items-center gap-2 bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-lg transition",children:[(0,l.jsx)(o.aBF,{})," Download"]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{className:"font-semibold text-center mb-2",children:"Original Image"}),(0,l.jsx)("div",{className:"bg-gray-100 p-2 rounded-lg flex items-center justify-center",children:(0,l.jsx)("img",{src:F,alt:"Original image",className:"max-h-80 rounded"})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{className:"font-semibold text-center mb-2",children:"Enhanced Image"}),(0,l.jsx)("div",{className:"bg-gray-100 p-2 rounded-lg flex items-center justify-center",children:(0,l.jsx)("img",{src:D,alt:"AI enhanced image",className:"max-h-80 rounded shadow-sm"})})]})]}),(0,l.jsxs)("div",{className:"bg-gray-50 p-4 rounded-lg mb-4",children:[(0,l.jsx)("h4",{className:"font-semibold text-gray-700 mb-2",children:"Enhancement Details"}),(0,l.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-x-4 gap-y-2 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Style:"})," ",null===(e=w.find(e=>e.value===U))||void 0===e?void 0:e.label]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Focus Area:"})," ",null===(a=k.find(e=>e.value===$))||void 0===a?void 0:a.label]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Quality:"})," ",null===(t=E.find(e=>e.value===O))||void 0===t?void 0:t.label]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Enhancement Strength:"})," ",G,"%"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Sharpness Level:"})," ",H,"%"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Color Vibrancy:"})," ",Y,"%"]})]})]}),(0,l.jsx)("div",{className:"mt-4 flex justify-center",children:(0,l.jsxs)("button",{onClick:ec,className:"flex items-center gap-2 bg-indigo-100 hover:bg-indigo-200 text-indigo-700 py-2 px-4 rounded-md transition-colors",disabled:I,children:[(0,l.jsx)(o.WLu,{className:I?"animate-spin":""}),"Enhance Again with Current Settings"]})}),(0,l.jsx)("p",{className:"text-sm text-center text-gray-500 mt-4",children:"Not satisfied? Try adjusting the enhancement style or sliders for different results."})]})},"content")]}),(0,l.jsx)(f.Z,{slug:"ai-image-enhancer",title:ed,introContent:ei}),(0,l.jsx)(g.Z,{})]})]})}},49102:function(e,a,t){"use strict";t.d(a,{f:function(){return r}});var l=t(67294),s=t(75320),n=t(85893),i=l.forwardRef((e,a)=>(0,n.jsx)(s.WV.label,{...e,ref:a,onMouseDown:a=>{let t=a.target;t.closest("button, input, select, textarea")||(e.onMouseDown?.(a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));i.displayName="Label";var r=i},12003:function(e,a,t){"use strict";t.d(a,{j:function(){return i}});var l=t(90512);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=l.W,i=(e,a)=>t=>{var l;if((null==a?void 0:a.variants)==null)return n(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:i,defaultVariants:r}=a,d=Object.keys(i).map(e=>{let a=null==t?void 0:t[e],l=null==r?void 0:r[e];if(null===a)return null;let n=s(a)||s(l);return i[e][n]}),o=t&&Object.entries(t).reduce((e,a)=>{let[t,l]=a;return void 0===l||(e[t]=l),e},{}),c=null==a?void 0:null===(l=a.compoundVariants)||void 0===l?void 0:l.reduce((e,a)=>{let{class:t,className:l,...s}=a;return Object.entries(s).every(e=>{let[a,t]=e;return Array.isArray(t)?t.includes({...r,...o}[a]):({...r,...o})[a]===t})?[...e,t,l]:e},[]);return n(e,d,c,null==t?void 0:t.class,null==t?void 0:t.className)}},36961:function(e,a,t){"use strict";t.d(a,{Z:function(){return s}});
7var l=t(84102);let s=(0,l.Z)("CircleAlert",[["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"}]])}},function(e){e.O(0,[5445,3996,5675,2498,8764,7066,607,6501,1789,8482,3034,6657,6947,7595,9774,2888,179],function(){return e(e.s=18142)}),_N_E=e.O()}]);

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.