1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[419],{7268:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/image-generator/[[...slug]]",function(){return r(342)}])},2463:function(e,t,r){"use strict";r.d(t,{Z:function(){return Footer}});var a=r(5893);function Footer(){return(0,a.jsx)("footer",{className:"w-full border-t mt-5",children:(0,a.jsxs)("div",{className:"max-w-5xl mx-auto px-3 h-16 sm:h-20 flex justify-center items-center text-sm gap-4",children:[(0,a.jsx)("div",{className:"text-gray-500",children:"\xa9 2025 AIImageStudio"}),(0,a.jsx)("a",{href:"/appprivacypolicy/",className:"hover:underline transition underline-offset-2",children:"Privacy Policy"}),(0,a.jsx)("a",{href:"https://docs.google.com/forms/d/e/1FAIpQLScJ1HYJFoGfciWoT7wn6iFjaMa4xRlgJkdoe9aKd8p9J88nQQ/viewform?usp=sf_link",target:"_blank",rel:"noopener noreferrer",className:"hover:underline transition underline-offset-2",children:"Feedback"})]})})}},3242:function(e,t,r){"use strict";var a=r(5893),n=r(6145),s=r.n(n);let LoadingDots=e=>{let{color:t="#000",style:r="small"}=e;return(0,a.jsxs)("span",{className:"small"==r?s().loading2:s().loading,children:[(0,a.jsx)("span",{style:{backgroundColor:t}}),(0,a.jsx)("span",{style:{backgroundColor:t}}),(0,a.jsx)("span",{style:{backgroundColor:t}})]})};t.Z=LoadingDots,LoadingDots.defaultProps={style:"small"}},9766:function(e,t,r){"use strict";var a=r(5893),n=r(1664),s=r.n(n),i=r(5675),o=r.n(i),l=r(7294),c=r(4856),d=r.n(c),m=r(3299),u=r(1163);t.Z=()=>{var e;let[t,r]=(0,l.useState)(!1),{data:n,status:i}=(0,m.useSession)(),c=(0,u.useRouter)();return(0,l.useEffect)(()=>{},[i,n]),(0,a.jsx)("div",{className:"w-full bg-white shadow-md",children:(0,a.jsx)("div",{className:"max-w-5xl mx-auto px-4",children:(0,a.jsxs)("nav",{className:"".concat(d().nav," flex items-center justify-between h-16"),children:[(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)(s(),{href:"/",className:"flex items-center space-x-2",children:[(0,a.jsx)(o(),{src:"/icon.png",alt:"AI Image Studio",width:32,height:32,className:"h-8 w-8"}),(0,a.jsx)("span",{className:"text-lg",children:"AI Image Studio"})]})}),(0,a.jsxs)("ul",{className:"".concat(t?d().navLinksMobile:d().navLinks),children:[(0,a.jsx)("li",{children:(0,a.jsx)(s(),{href:"/image-generation-flow/",children:"Image Generation Flow"})}),(0,a.jsx)("li",{children:(0,a.jsx)(s(),{href:"/nanobanana-image-editor/",children:"Nano Banana Image Editor"})}),(0,a.jsx)("li",{children:(0,a.jsx)(s(),{href:"/veo-video-prompter/",children:"Veo3 Video Prompter"})}),(0,a.jsx)("li",{children:(0,a.jsx)(s(),{href:"/price/",children:"Price"})}),"authenticated"===i&&n&&(0,a.jsx)("li",{children:(0,a.jsx)("button",{onClick:()=>c.push("/profile"),className:"whitespace-nowrap",children:(null===(e=n.user)||void 0===e?void 0:e.email)?n.user.email.length>7?"".concat(n.user.email.substring(0,7),"..."):n.user.email:""})}),"unauthenticated"===i&&(0,a.jsx)("li",{children:(0,a.jsx)("button",{onClick:()=>(0,m.signIn)(null,{callbackUrl:"/nanobanana-image-editor/"}),className:"whitespace-nowrap",children:"Sign in"})})]}),(0,a.jsx)("button",{className:d().mobileIcon,onClick:()=>r(!t),children:t?(0,a.jsx)("h3",{children:"Close"}):(0,a.jsx)("h3",{children:"Menu"})})]})})})}},342:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return k},default:function(){return _slug_}});var a=r(5893),n=r(5820),s=r(3454),i=r(9008),o=r.n(i),l=r(5675),c=r.n(l),d=r(7294),m=r(6501),u=r(2463),x=r(3242),p=r(2427);function ResizablePanel(e){let{children:t}=e,[r,{height:n}]=(0,p.Z)();return(0,a.jsx)(s.E.div,{animate:n?{height:n}:{},style:n?{height:n}:{},className:"relative w-full overflow-hidden",transition:{type:"tween",duration:.5},children:(0,a.jsx)("div",{ref:r,className:n?"absolute inset-x-0":"relative",children:t})})}var h=r(2029),g=r(708),f=r(7561),_=r(1163),j=r(3299),b=r(4855),v=r(9766);r(1664);var w=r(4856),N=r.n(w),y=r(2523);function Tab(e){let{}=e,[t,r]=(0,d.useState)(!1),[n,s]=(0,d.useState)(""),i=" whitespace-nowrap py-2 px-2 h-9 underline cursor-pointer w-1/5",o=(0,_.useRouter)(),{slug:l}=o.query;(0,d.useEffect)(()=>{let e;"string"==typeof l?e=l:Array.isArray(l)&&l.length>=2?e=l[1]:Array.isArray(l)&&1===l.length&&(e=l[0]),e&&y.aA.includes(e)?s(e):y.aA&&y.aA.length>0?s(y.aA[0]):s("")},[l]);let handleClick=(e,t)=>{e.preventDefault(),window.location.href="/image-generator/".concat(t)};return(0,a.jsxs)("nav",{className:N().tab,children:[(0,a.jsx)("ul",{className:t?N().navLinksMobile:N().navLinks,children:(0,a.jsx)("div",{className:"flex flex-wrap ",children:y.aA.map((e,r)=>{let s="AI ".concat(y.ST[r]," Generator");return(0,a.jsx)("li",{className:t?" whitespace-nowrap py-2 px-2 h-9 underline cursor-pointer":n===e?"relative inline-block bg-blue-300 rounded-t-md font-semibold no-underline"+i:i,onClick:t=>handleClick(t,e),children:s},e)})})}),(0,a.jsxs)("button",{className:N().mobileIcon,onClick:()=>r(!t),children:[t?"":(0,a.jsx)("h3",{children:"Prompt Generators"})," "]})]})}var components_Features=()=>{let{t:e}=(0,f.$G)("common"),t=[{title:e("feature_1_title"),description:e("feature_1_desc"),icon:"\uD83D\uDCFA"},{title:e("feature_2_title"),description:e("feature_2_desc"),icon:"\uD83D\uDCF1"},{title:e("feature_3_title"),description:e("feature_3_desc"),icon:"\uD83D\uDECDï¸"},{title:e("feature_4_title"),description:e("feature_4_desc"),icon:"\uD83D\uDC57"},{title:e("feature_5_title"),description:e("feature_5_desc"),icon:"\uD83C\uDFAC"},{title:e("feature_6_title"),description:e("feature_6_desc"),icon:"\uD83D\uDCDD"}];return(0,a.jsx)("section",{className:"py-16 bg-gray-50",children:(0,a.jsxs)("div",{className:"max-w-6xl mx-auto px-4",children:[(0,a.jsxs)("div",{className:"text-center mb-12",children:[(0,a.jsx)("h2",{className:"text-4xl font-bold text-gray-800 mb
1-4",children:e("features_title")}),(0,a.jsx)("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto",children:e("features_subtitle")})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map((e,t)=>(0,a.jsxs)("div",{className:"bg-white rounded-lg p-6 shadow-md hover:shadow-lg transition-shadow",children:[(0,a.jsx)("div",{className:"text-4xl mb-4",children:e.icon}),(0,a.jsx)("h3",{className:"text-xl font-semibold text-gray-800 mb-3",children:e.title}),(0,a.jsx)("p",{className:"text-gray-600 leading-relaxed",children:e.description})]},t))})]})})},components_Testimonials=()=>{let{t:e}=(0,f.$G)("common"),t=[{text:e("testimonial_1_text"),author:e("testimonial_1_author"),role:e("testimonial_1_role"),avatar:"\uD83C\uDFAC"},{text:e("testimonial_2_text"),author:e("testimonial_2_author"),role:e("testimonial_2_role"),avatar:"\uD83D\uDED2"},{text:e("testimonial_3_text"),author:e("testimonial_3_author"),role:e("testimonial_3_role"),avatar:"\uD83D\uDCF1"}];return(0,a.jsx)("section",{className:"py-16 bg-white",children:(0,a.jsxs)("div",{className:"max-w-6xl mx-auto px-4",children:[(0,a.jsx)("div",{className:"text-center mb-12",children:(0,a.jsx)("h2",{className:"text-4xl font-bold text-gray-800 mb-4",children:e("testimonials_title")})}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map((e,t)=>(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-6 shadow-md",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("div",{className:"flex text-yellow-400 mb-3",children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,a.jsx)("span",{children:"â"},t))}),(0,a.jsxs)("p",{className:"text-gray-700 italic leading-relaxed",children:['"',e.text,'"']})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"text-3xl mr-3",children:e.avatar}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-semibold text-gray-800",children:e.author}),(0,a.jsx)("div",{className:"text-sm text-gray-600",children:e.role})]})]})]},t))})]})})},k=!0,_slug_=e=>{let{catInServer:t}=e,[r,i]=(0,d.useState)(!1),[l,p]=(0,d.useState)(!1),[w,N]=(0,d.useState)(""),[k,A]=(0,d.useState)(null),[I,D]=(0,g.Z)(["deviceid"]),[C,E]=(0,d.useState)("image"),{t:P,i18n:S}=(0,f.$G)("common"),{locale:T}=(0,_.useRouter)(),[L,F]=(0,d.useState)(!1),R=(0,_.useRouter)(),{data:U,status:M}=(0,j.useSession)(),{slug:G}=R.query;(0,d.useEffect)(()=>{if(I.deviceid||fetch("/api/genDeviceid").then(e=>e.json()).then(e=>{D("deviceid",e.deviceid,{path:"/",maxAge:36e6,sameSite:!0})}).catch(e=>console.error("Error fetching deviceId:",e)),G&&G.length>0){let e=G[0];if(e&&y.aA.includes(e)){let t=e.split("-");t.length>1&&"prompt"===t[0]?E(t[1]):E(e)}else E("image"),console.warn("Invalid category slug: ".concat(e,", defaulting to 'image'. Consider redirect."))}else E("image")},[T,I,D,G,R]);let generateBio=async e=>{var t;if(e.preventDefault(),"unauthenticated"===M){R.push("/auth/signin");return}if(!w||""===w.trim()){m.Am.error(P("prompt_required_toast")||"Please enter a prompt.");return}i(!0),A(null);let r=null!==(t=y.$U[C])&&void 0!==t?t:0;h.cM.info("New generation request",{prompt:w,generatorType:r,category:C});try{let e=await fetch("/api/generateTextImage",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:w,generatorType:r})});if(i(!1),!e.ok){let t=await e.json().catch(()=>({error:"An unexpected error occurred.",reason:"CLIENT_PARSE_ERROR"}));console.error("API Error:",t),401===e.status||403===e.status||"AUTH_REQUIRED"===t.reason?m.Am.error(P("login_required_toast")||"Please log in to generate images."):"LIMIT_REACHED"===t.reason?m.Am.error(P("limit_reached_toast")||"Daily limit reached. Please try again tomorrow."):"GLOBAL_LIMIT_REACHED"===t.reason?m.Am.error(P("global_limit_reached_toast")||"The daily total generation limit for the service has been reached. Please try again tomorrow."):"INSUFFICIENT_CREDITS"===t.reason?(m.Am.error("You have run out of credits. Redirecting to pricing page."),setTimeout(()=>{R.push("/price")},3e3)):m.Am.error(t.error||"Error: ".concat(e.status," ").concat(e.statusText));return}let t=await e.json();t.generatedPrompt&&t.imageUrl?(A({prompt:t.generatedPrompt,imageUrl:t.imageUrl}),m.Am.success(P("generation_successful_toast")||"Generation successful!")):(console.error("API response missing generatedPrompt or imageUrl:",t),m.Am.error(P("generation_failed_toast")||"Failed to get valid result from server."))}catch(e){i(!1),console.error("Fetch Error:",e),m.Am.error(P("generation_fetch_error_toast")||"An error occurred while sending the request.")}},handleEditImage=async()=>
1{if(!(null==k?void 0:k.imageUrl)){m.Am.error("No image to edit.");return}p(!0);try{let e=await fetch("/api/uploadToR2",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageUrl:k.imageUrl})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to upload image.")}let{url:t}=await e.json();R.push("/nanobanana-image-editor?imageUrl=".concat(encodeURIComponent(t)))}catch(e){console.error("Failed to upload image for editing:",e),m.Am.error(e.message||"Failed to prepare image for editing.")}finally{p(!1)}};return(0,a.jsxs)("div",{className:"flex max-w-5xl mx-auto flex-col items-center justify-center py-2 min-h-screen",children:[(0,a.jsx)("div",{className:"w-full flex justify-end",children:(0,a.jsx)(v.Z,{})}),(0,a.jsxs)(o(),{children:[(0,a.jsx)("title",{children:t?P("product_name").replace(/Prompt/gi,t):P("product_name")}),t?"":(0,a.jsx)("link",{rel:"canonical",href:"https://www.aigenprompt.com/"}),(0,a.jsx)("meta",{name:"description",content:t?P("description").replace(/image/gi,t):P("description")}),(0,a.jsx)("meta",{name:"keywords",content:t?P("keywords").replace(/Prompt/g,t):P("keywords")}),(0,a.jsx)("meta",{name:"author",content:"Kristin Roberts"}),(0,a.jsx)("meta",{name:"robots",content:"index, follow"}),(0,a.jsx)("meta",{property:"og:site_name",content:"AIImageStudio"}),(0,a.jsx)("meta",{property:"og:description",content:t?P("description").replace(/image/gi,t):P("description")}),(0,a.jsx)("meta",{property:"og:title",content:t?P("product_name").replace(/Prompt/gi,t):P("product_name")}),(0,a.jsx)("meta",{property:"og:image",content:"https://www.aigenprompt.com/icon.png"})]}),(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"authenticated"===M&&(0,a.jsx)(Tab,{}),(0,a.jsx)("main",{className:"flex flex-1 w-full flex-col items-center justify-center text-center px-4 mt-2 sm:mt-4",children:"authenticated"===M&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-full text-center mt-8 mb-24",children:(0,a.jsxs)("div",{className:"inline-flex items-center px-4 py-2 bg-blue-50 border border-blue-200 rounded-full text-sm text-blue-800 font-medium",children:[(0,a.jsx)("svg",{className:"w-4 h-4 mr-2 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),P("promo_text_part1"),(0,a.jsx)("strong",{children:P("promo_text_part2_strong")}),P("promo_text_part3"),(0,a.jsx)("strong",{children:P("promo_text_part4_strong")}),P("promo_text_part5")]})}),(0,a.jsx)("h1",{className:"sm:text-6xl text-4xl max-w-2xl font-bold text-slate-900 ",children:t?P("intro").replace(/image/gi,t.charAt(0).toLowerCase()+t.slice(1)):P("intro")}),(0,a.jsxs)("div",{className:"max-w-xl w-full",children:[(0,a.jsx)("div",{className:"flex mt-10 items-center space-x-3",children:(0,a.jsxs)("p",{className:"text-left font-medium",children:[" ",P("writesubject")," "," "]})}),(0,a.jsx)("textarea",{value:w,onChange:e=>N(e.target.value),rows:4,className:"w-full rounded-md border-gray-300 shadow-sm focus:border-black focus:ring-black my-5",placeholder:P("placeholder")}),!r&&(0,a.jsx)("button",{className:"bg-black rounded-xl text-white font-medium px-4 py-2 sm:mt-10 mt-8 hover:bg-black/80 w-full",onClick:e=>generateBio(e),children:P("btn_generate")}),r&&(0,a.jsx)("button",{className:"bg-black rounded-xl text-white font-medium px-4 py-2 sm:mt-10 mt-8 hover:bg-black/80 w-full",disabled:!0,children:(0,a.jsx)(x.Z,{color:"white",style:"large"})})]}),(0,a.jsx)(m.x7,{position:"top-center",reverseOrder:!1,toastOptions:{duration:3e3}}),(0,a.jsx)("hr",{className:"h-px bg-gray-700 border-1 dark:bg-gray-700"}),(0,a.jsx)(ResizablePanel,{children:(0,a.jsx)(n.M,{mode:"wait",children:(0,a.jsx)(s.E.div,{className:"space-y-10 my-10",children:k&&!r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsx)("h2",{className:"sm:text-4xl text-3xl font-bold text-slate-900 mx-auto",children:P("yourResultHeading")||"Your Generated Result"})}),(0,a.jsxs)("div",{className:"space-y-8 flex flex-col items-center justify-center max-w-xl mx-auto",children:[k.imageUrl&&(0,a.jsxs)("div",{className:"w-full p-2 border rounded-lg shadow-md bg-gray-50 flex flex-col items-center",children:[(0,a.jsx)(c(),{src:k.imageUrl,alt:P("generatedImageAltText")||"Generated image from prompt",width:512,height:512,className:"rounded-lg object-contain",unoptimized:!0}),(0,a.jsxs)("div",{className:"flex items-center justify-center space-x-4 mt-4",children:[(0,a.jsx)("a",{href:"".concat(k.imageUrl,"?download"),download:"aiimageStudio-".concat(k.prompt.substring(0,20),".png"),className:"bg-white border border-black rounded-xl text-black font-medium px-4 py-2 hover:bg-gray-100",children:P("Download")}),(0,a.jsx)("button",{onClick:handleEditImage,disabled:l,className:"bg-white border border-black rounded-xl text-black font-medium px-4 py-2 hover:bg-gray-100 disabled:bg-gray-200",children:l?(0,a.jsx)(x.Z,{color:"white",style:"small"}):"Edit Image"})]})]}),k.prompt&&(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)("h3",{className:"text-xl text-slate-800 mb-2",children:P("generatedPromptHeading")||"Generated Prompt"}),(0,a.jsx)(b.CopyToClipboard,{text:k.prompt,onCopy:()=>{F(!0),(0,m.Am)(P("copied_toast")||"Copied to clipboard!",{icon:"âï¸"}),setTimeout(()=>{F(!1)},1500)},children:(0,a.jsx)("div",{className:"bg-white rounded-xl shadow-md p-4 hover:bg-gray-100 transition cursor-copy border text-left",children:(0,a.jsx)("p",{children:k.prompt})})})]})]})]})})})})]})}),"unauthenticated"===M&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(components_Features,{}),(0,a.jsx)(components_Testimonials,{})]}),(0,a.jsx)(u.Z,{})]})}},2523:function(e,t,r){"use strict";r.d(t,{$U:function(){return c},Nv:function(){return i},ST:function(){return l},aA:function(){return o},fK:function(){return s},zM:function(){return n}});var a=r(4155);let n=parseInt("3",10);a.env.GLOBAL_DAILY_LIMIT&&parseInt(a.env.GLOBAL_DAILY_LIMIT,10);let s=parseInt("5",10),i=parseInt("10",10),o=["prompt-image","prompt-logo","prompt-photo","prompt-portrait","prompt-landscape","prompt-art","prompt-painting","prompt-illustration"],l=["Image","Logo","Photo","Portrait","Landscape","Art","Painting","Illustration"],c={image:0,logo:1,photo:2,portrait:3,landscape:4,art:5,painting:6,illustration:7}},4856:function(e){e.exports={nav:"Navbar_nav__yFFPE",tab:"Navbar_tab__S17Fj",logo:"Navbar_logo__X4o9i",navLinks:"Navbar_navLinks__BPXkM",navLinksMobile:"Navbar_navLinksMobile__O8lFg",mobileIcon:"Navbar_mobileIcon__wu_9q"}},6145:function(e){e.exports={loading:"loading-dots_loading__Ry98_",spacer:"loading-dots_spacer__Me41Y",blink:"loading-dots_blink__ATWnq",loading2:"loading-dots_loading2____Ssb"}}},function(e){e.O(0,[247,6,774,888,179],function(){return e(e.s=7268)}),_N_E=e.O()}]); 2//# sourceMappingURL=[[...slug]]-60562fbca8dd6b40.js.map
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.