1import{c as X,a as j,j as e,h as Z,d8 as ee,aK as ae,ad as E,ae as F,I as te,V as se,b as ie,aY as oe,cV as ne,r as u,aq as re,d as le,bx as de,d4 as ce,ax as me,dH as pe,a5 as ue,b3 as ge,b6 as he,ba as fe,b7 as xe,a0 as be,ar as O}from"./chunk-BYAnRR-i.js";import{T as ye,C as _e,F as je}from"./chunk-BN3Dzjv8.js";import{H as we}from"./chunk-Cin43Th0.js";import{a as ve,M as U}from"./chunk-DONnLx3D.js";import{D as Se}from"./chunk-G7j4-c1p.js";import{A as ke}from"./chunk-CpQzbtJQ.js";import{b as Ne,a as $}from"./chunk-D6N4ibiw.js";import"./chunk-C_hVRVZt.js";/* empty css */import"./chunk-BpdEOUOv.js";import"./chunk-D7jvefln.js";/** 2 * @license lucide-react v0.511.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Ie=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Ae=X("grid-3x3",Ie),Ce=({steps:i,currentStepId:n,onBack:m})=>{const{t:g}=j(),o=i.findIndex(r=>
6r.id===n);return e.jsxs("div",{className:"flex items-center justify-center w-full max-w-2xl mx-auto py-4 gap-2 md:gap-4",children:[m&&e.jsx(Z,{isIconOnly:!0,variant:"light",onPress:m,"aria-label":"Go back",size:"sm",children:e.jsx(ee,{size:18})}),e.jsx("div",{className:"flex items-center justify-center",children:i.map((r,c)=>{const p=c===o;return e.jsxs(ae.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1 md:gap-3",children:[e.jsx("div",{className:` 7 w-6 h-6 md:w-8 md:h-8 rounded-full flex items-center justify-center transition-all duration-300 8 ${p?"bg-default-200 text-foreground font-bold":"bg-default-100 text-default-400"} 9 `,children:e.jsx("span",{className:"text-xs md:text-sm",children:c+1})}),e.jsx("span",{className:`text-xs md:text-sm font-medium whitespace-nowrap transition-colors duration-300 ${p?"text-foreground":"text-default-400"}`,children:g(r.label)})]}),c<i.length-1&&e.jsx("div",{className:`w-8 md:w-12 h-[1px] mx-1 md:mx-4 transition-colors duration-300 ${c<o?"bg-default-400":"bg-default-200"}`})]},r.id)})})]})},Pe=({style:i,isSelected:n,onSelect:m})=>{const{t:g}=j(),{id:o,name:r,description:c,backgroundImage:p}=i;return e.jsxs(E,{isPressable:!0,isHoverable:!0,shadow:"none",className:` 10 w-full overflow-hidden 11 ${n?"ring-2 ring-primary bg-primary/10 border-primary":"bg-content2 border-transparent hover:bg-content3"} 12 aspect-square 13 `,style:{backgroundImage:p?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center"},onPress:()=>m(o),children:[p&&e.jsx("div",{className:"absolute inset-0 bg-black/40 z-0"}),e.jsx(F,{className:"flex flex-col items-center justify-center gap-2 p-3 relative z-10",children:e.jsx("div",{className:"text-center",children:e.jsx("p",{className:`text-xl font-semibold ${n?"text-primary":"text-white"}`,children:g(r)})})})]})},Te=({outputType:i,isSelected:n,onSelect:m})=>{const{t:g}=j(),{id:o,name:r,icon:c}=i;return e.jsx(E,{isPressable:!0,isHoverable:!0,shadow:"none",className:` 14 flex-1 15 ${n?"ring-2 ring-primary border-primary":"bg-content2 border-transparent hover:bg-content3"} 16 aspect-square 17 `,onPress:()=>m(o),children:e.jsxs(F,{className:"flex flex-col p-2 items-center justify-center gap-2 relative overflow-hidden",children:[e.jsx("div",{className:` 18 p-2 rounded-lg 19 ${n?"bg-primary text-primary-foreground":"bg-default-100"} 20 `,children:e.jsx(c,{size:20})}),e.jsx("p",{className:`text-sm md:text-md font-bold uppercase ${n?"text-primary":"text-foreground"}`,children:g(r)})]})})},Me=[{id:"realistic",name:"Realistic",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-1.webp"},{id:"polaroid",name:"Polaroid",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-2.webp"},{id:"anime",name:"Anime",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-3.webp"},{id:"3d-render",name:"3D Render",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-4.webp"},{id:"illustration",name:"Illustration",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-5.webp"},{id:"manga",name:"Manga",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-6.webp"},{id:"pixel-art",name:"Pixel Art",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-7.webp"},{id:"figure",name:"Figure",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-8.webp"},{id:"chibi",name:"Chibi",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-9.webp"},{id:"needle-felted",name:"Needle Felted",backgroundImage:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/style-10.webp"}],v=[{id:"single",name:"Single",icon:te,credits:2,count:1},{id:"grid",name:"Batch (9)",icon:Ae,credits:18,count:9},{id:"video",name:"Video",icon:se,credits:26,count:1}],Oe=[{question:"Will the result look like me?",answer:"We use the most advanced facial feature preservation technology. Our AI enhances your hairstyle and makeup while strictly preserving your facial features â beautiful yet authentic."},{question:"Can guys use this?",answer:"Absolutely! The system automatically detects gender and applies matching outfits and stylish poses."},{question:"Does it work for group photos?",answer:"Yes! The system automatically detects the number of people and creates a stunning group portrait for your celebration. We recommend 5 people or fewer for optimal quality."},{question:"Is my data safe?",answer:"Your privacy is our top priority. Uploaded photos are used only for the current generation and are never used to train other models or displayed publicly. All data is automatically and permanently deleted after a short period."}],Ue=[{step:1,title:"Upload Photo",description:"Upload a clear portrait photo. Solo shots or group photos with up to 5 people work great.",image:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/step/step1.webp"}
20,{step:2,title:"Choose Style",description:"Select from 10 unique styles â Realistic, Polaroid, Anime, and more. Pick your output: single image, 9-grid album, or animated video.",image:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/step/step2.webp"},{step:3,title:"Generate",description:"Click generate and wait just a moment. Your stunning Coming of Age portrait will be ready to download and share!",image:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/step/step3.webp"}],h={template_type:"",download_url:"https://cdn.sousaku.ai/home/image/user/6459dd5e-8f02-46cf-8ceb-630152249d9d/53ae7a0f-1c6c-4a45-8091-57b21faa4fce/origin/20260109-e3c6993f1d50496e86478814e45b5794.mp4",thumbnail_url:"https://cdn.sousaku.ai/home/image/libs/mini-apps/coming-of-age-day/step/coming-of-age-day.webp",template_id:"coming-of-age-day",template_name:"Coming of Age Photo Maker",template_short_description:"Transform any photo into a beautiful Coming of Age Day (Seijin no Hi) portrait. Choose from 10 stunning styles including traditional, anime, and artistic interpretations."},$e=[{id:"photo",label:"Photo"},{id:"design",label:"Design"},{id:"result",label:"Result"}],He=()=>{var A,C,P,T;const{t:i}=j(),[n]=ie(a=>[a.user]),[m]=oe(a=>[a.batchUploadFileNoWatch]),{isLoading:g,allGroups:o,appsRootPath:r,onBreadcrumbNav:c}=ne(),[p,q]=u.useState([]),{teamId:S}=re(),{login:k}=le(),{resetTask:D,sendTemplateToVideo:R,setSelectedAppName:G}=de(),[w,W]=u.useState(null),[f,_]=u.useState("landing"),[N,z]=u.useState("realistic"),[x,L]=u.useState("single"),[b,I]=u.useState([]),[y,V]=u.useState([]);G(h.template_name),u.useEffect(()=>{if(!(o!=null&&o.length))return;const a=o.flatMap(s=>s.apps),t=new Map;a.forEach(s=>{t.has(s.template_id)||t.set(s.template_id,s)});const l=Array.from(t.values()).filter(s=>s.template_id!==h.template_id);q(l)},[o]);const Y=()=>{f==="design"?_("landing"):f==="result"&&(D(),_("design"))},H=()=>{w&&w.scrollTo({top:0,behavior:"smooth"})},B=async()=>{if(!n){k();return}const a=y[0];if(!a)return;const t=v.find(s=>s.id===x);if(!t)return;const l={reference:[{file_id:a.file_id,download_url:a.download_url}]};try{await R({template_id:h.template_id,images:l,number:t.count,credits:t.credits,parameters:{style:N},content_type:x==="video"?O.Video:O.Image},{template_id:h.template_id,template_name:h.template_name}),_("result")}catch(s){s==null||s.message}},K=async(a,t)=>{if(!n){k();return}if(!a)return;const l=[{...fe,file_id:he(),download_url:URL.createObjectURL(a),file:a,requirementId:t}];I(s=>[...s,...l]);try{const s=[{action:xe.UPLOAD_TO_AI_AGENT,file_name:a.name}],d=await m([a],s);if(d&&d.length>0){const M=[...y],J=l[0].download_url;M.splice(t,1,{...l[0],file_id:d[0].file_id,download_url:d[0].download_url,thumbnail_url:d[0].download_url,display_url:J,blob:void 0}),V(M)}}catch(s){console.error("Upload failed",s),be.error(i("Failed to upload image"))}finally{I(s=>s.filter(d=>!l.includes(d)))}},Q=()=>{const a=y.filter(t=>!!t);return(b==null?void 0:b.length)===0&&a.length>=1};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${ce} max-w-6xl`,children:e.jsxs(Ne,{children:[e.jsx($,{onPress:()=>c(r),children:i("Apps")}),e.jsx($,{children:i(h.template_name)})]})}),e.jsx("div",{className:"flex flex-1 h-full overflow-hidden flex-col relative",children:f==="landing"?e.jsx("div",{ref:W,className:"w-full h-full flex-1 overflow-y-auto scrollbar-thin pb-4",children:e.jsxs("div",{className:"max-w-6xl m-auto px-4",children:[e.jsx(Se,{data:h,btnText:i("Continue to Style Selection"),onUpload:a=>K(a,0),uploadedImageUrl:((A=b.find(a=>a.requirementId===0))==null?void 0:A.download_url)||((C=y[0])==null?void 0:C.display_url)||((P=y[0])==null?void 0:P.download_url),onGenerate:()=>{_("design")},isValid:Q(),uploadingImages:b}),e.jsxs("div",{className:"flex flex-col gap-8 mt-12",children:[e.jsx(we,{steps:Ue,title:"Create Your Portrait in 3 Easy Steps"}),e.jsx(ye,{}),e.jsx(_e,{onAction:H}),e.jsx(je,{items:Oe})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("h2",{className:"text-2xl font-bold my-8",children:i("Explore More Apps")}),g?e.jsx("div",{className:"min-h-10 flex justify-center",children:e.jsx(me,{color:"default"})}):e.jsx(pe,{useWindowScroll:!1,customScrollParent:w||void 0,data:p,listClassName:"grid mini-apps-gallery-container gap-4 pb-4",itemContent:(a,t)=>{var s,d;const l=S?`/t/${S}
20/apps/${((s=t.template_type)==null?void 0:s[0])||"catalog"}/${t.template_id}`:`/apps/${((d=t.template_type)==null?void 0:d[0])||"catalog"}/${t.template_id}${t.mini_app_config_type===ue.OnlyStyle?"/editor":""}`;return e.jsx(ke,{item:t,href:l},t.template_id)}})]})]})}):e.jsx("div",{className:"w-full h-full flex-1 overflow-y-auto scrollbar-thin pb-4",children:e.jsxs("div",{className:`h-full max-w-6xl m-auto px-4 flex flex-col ${x==="grid"?"mini-app-9-grid":""}`,children:[e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Ce,{steps:$e,currentStepId:f,onBack:Y})}),f==="design"&&e.jsxs("div",{className:"space-y-6 pb-4",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("b",{children:[" ",i("Choose a Style")]}),e.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))"},children:Me.map(a=>e.jsx(Pe,{style:a,isSelected:N===a.id,onSelect:t=>z(t)},a.id))})]}),e.jsxs("div",{className:"space-y-4 mt-4",children:[e.jsxs("b",{children:[" ",i("Choose Your Result")]}),e.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(auto-fill, minmax(100px, 1fr))"},children:v.map(a=>e.jsx(Te,{outputType:a,isSelected:x===a.id,onSelect:t=>L(t)},a.id))})]}),e.jsx(ge,{creditCost:((T=v.find(a=>a.id===x))==null?void 0:T.credits)??2,onPress:()=>{B()},btnProps:{radius:"full",size:"lg"}})]}),f==="result"&&e.jsx(ve,{hideReturn:!0,mode:x==="grid"?U.MultiStep:U.Default})]})})})]})};export{He as ComingOfAgeDayPage};
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.