PageSourceSearch

https://snapfy.ai/assets/HomeDecor.BLqtcqKD.js

js snapfy.ai collected 2026-10-05 12:39:07 UTC 20,016 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min.DXR31XkH.js","assets/vendor.B7-ms4FH.js"])))=>i.map(i=>d[i]);
2!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"snapfy-frontend@1790655446049"}}catch(e){}}();try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(t=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="03f25e0b-7bab-47b2-9452-b8f27ca33219",e._sentryDebugIdIdentifier="sentry-dbid-03f25e0b-7bab-47b2-9452-b8f27ca33219")}catch(e){}var e,t;import{e as a,c as s,j as r,m as o,P as n,U as i,T as l,h as d,A as c,k as p,B as m,f,W as u,D as g,l as x,E as y,V as h,F as b,b as v,G as j,g as w,_ as N,a as k}from"./index.DuJZvJ7M.js";import{b as C}from"./vendor.B7-ms4FH.js";const S=({brandbooks:t,userGallery:S,onItemGenerated:I,onEditItem:D,onStartVideoCreation:P})=>{const $=a(),R=s(e=>{var t;return null==(t=e.user)?void 0:t.maxResolution}),[_,L]=C.useState([]),[U,E]=C.useState([]),[T,O]=C.useState(new Map),[A,z]=C.useState(!1),[F,M]=C.useState(!1),[G,B]=C.useState(null),q=C.useRef(null),W=C.useRef(null),[V,H]=C.useState(!1),[J,Z]=C.useState(!1),[K,Y]=C.useState(!1),[Q,X]=C.useState("products"),[ee,te]=C.useState(!1),[ae,se]=C.useState(!1),[re,oe]=C.useState([]),[ne,ie]=C.useState(0),[le,de]=C.useState(new Set),[ce,pe]=C.useState("prompt"),[me,fe]=C.useState(""),[ue,ge]=C.useState(null),[xe,ye]=C.useState(null),[he,be]=C.useState(""),[ve,je]=C.useState([]),[we,Ne]=C.useState([]),[ke,Ce]=C.useState("16:9"),[Se,Ie]=C.useState("1K"),[De,Pe]=C.useState("png"),$e=U.length;C.useEffect(()=>{0!==T.size&&O(e=>{const t=new Map(e);let a=!1;return t.forEach((e,s)=>{if("success"===e.status&&"image"===e.image.type){const r=S.find(t=>t.id===e.image.id);r&&"image"===r.type&&r.src!==e.image.src&&(a=!0,t.set(s,{...e,image:r}))}}),a?new Map(t):e})},[S]);const Re=e=>{const t=Array.from(e).filter(e=>e.type.startsWith("image/")).map(e=>({id:`${e.name}-${e.lastModified}`,file:e,previewUrl:URL.createObjectURL(e)}));L(e=>[...e,...t])},_e=(e,t)=>{const a=e.replace(/^(img_|vid_)/,""),s=`https://snapfy.ai/api/download/${e.startsWith("vid_")?"videos":"images"}/${a}/proxy`,r=localStorage.getItem("auth_token");fetch(s,{headers:{Authorization:`Bearer ${r}`,Accept:"application/json"}}).then(e=>{if(!e.ok)throw new Error("Download failed");return e.blob()}).then(e=>{const a=window.URL.createObjectURL(e),s=document.createElement("a");s.href=a,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(a)}).catch(e=>{console.error("Download error:",e),alert("Erro ao baixar arquivo. Tente novamente.")})},Le=(e,t="products")=>{X(t),Z(!0)},Ue=async()=>{if(0===U.length)return;z(!0),B(null),O(new Map);try{await Promise.all(U.map(a=>(async a=>{var s,r,o,n,i,l;try{const d=a.productItems.map(e=>e.file);let c,p,m="Produtos em ambiente. ";const f=a.environment;if("brandbook"===f.type){const a=t.find(e=>e.id===f.brandbookId);if(!a)throw new Error("Brandbook não encontrado.");let l={};try{l="string"==typeof a.stylePrompt?JSON.parse(a.stylePrompt):a.stylePrompt}catch(e){console.warn("Failed to parse brandbook style data",e),l={description:a.stylePrompt}}if(null==(s=l.photography_recommendations)?void 0:s.style_summary)p=`${l.photography_recommendations.style_summary}. ${(null==(r=l.photography_recommendations.key_characteristics)?void 0:r.join(", "))||""}`;else if(l.product_photography_style){const e=l.product_photography_style;p=`Style: ${null==(o=e.overall_aesthetic)?void 0:o.vibe}. Lighting: ${null==(n=e.lighting_setup)?void 0:n.mood}. Composition: ${null==(i=e.composition)?void 0:i.framing}.`}else p=l.description||("string"==typeof a.stylePrompt?a.stylePrompt:JSON.stringify(a.stylePrompt));c={type:"prompt",value:f.scenePrompt},m+=`Ambiente: ${f.scenePrompt||"fundo de estúdio"} com estilo do brandbook ${a.url}.`}let u,g="none";"brandbook"===f.type?(u=parseInt(f.brandbookId),g="specific"):"prompt"===f.type?(c=f,m+=`Ambiente: ${f.value}
2`,p=void 0):(c={type:"image",file:f.file},m+="Ambiente baseado em imagem.",p=void 0);const x=await k.generateHomeDecorScene(d,c,a.aspectRatio,p,u,g,a.tagIds,De);if(!x)throw new Error("API did not return an image.");{const e={id:`img_${x.id}`,backendId:x.id,type:"image",src:x.url,prompt:m,createdAt:(new Date).toISOString(),tags:null==(l=a.tagIds)?void 0:l.map(e=>we.find(t=>t.id===e)).filter(e=>void 0!==e)};I(e),O(t=>new Map(t).set(a.id,{status:"success",image:e}))}}catch(e){console.error(`Failed to generate composition ${a.id}:`,e),O(e=>new Map(e).set(a.id,{status:"failed",image:null}))}})(a)))}catch(e){B(`Ocorreu um erro geral durante a geração: ${e.message}`)}finally{z(!1)}},Ee=0===le.size||"prompt"===ce&&""===me.trim()||"image"===ce&&!ue||"brandbook"===ce&&!xe,Te={hidden:$?{opacity:1,y:0}:{opacity:0,y:16},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.22,1,.36,1],delay:.1}}};return r.jsxs(o.div,{className:"space-y-8",variants:Te,initial:"hidden",animate:"visible",children:[r.jsx(n,{title:"Home & Decor",subtitle:"Crie cenas e ambientes profissionais para seus produtos de casa e decoração.",infoTooltip:"Crie ambientes virtuais para produtos.",icon:r.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,className:"w-full h-full",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-start",children:[r.jsxs("div",{className:"bg-snapfy-surface rounded-xl p-6 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[r.jsx("span",{className:"bg-snapfy-primary/10 text-snapfy-primary w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold flex-shrink-0",children:"1"}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold text-snapfy-text-primary",children:"Envie os Produtos"}),r.jsx("p",{className:"text-sm text-snapfy-text-secondary",children:"Móveis, vasos, quadros, etc."})]})]}),r.jsxs("div",{onClick:()=>Le(0,"products"),onDrop:e=>{e.preventDefault(),e.stopPropagation(),H(!1);const t=e.dataTransfer.files;t&&t.length>0&&(Re(t),e.dataTransfer&&e.dataTransfer.clearData())},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),H(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),H(!1)},className:"w-full h-32 rounded-card border-2 border-dashed flex flex-col items-center justify-center text-snapfy-text-secondary cursor-pointer transition-colors "+(V?"bg-snapfy-inner border-snapfy-primary":"bg-snapfy-inner border-snapfy-border hover:bg-snapfy-inner hover:border-snapfy-border-strong"),children:[r.jsx("input",{type:"file",ref:q,onChange:e=>{const t=e.target.files;t&&t.length>0&&Re(t)},className:"hidden",accept:"image/*",multiple:!0}),r.jsx(i,{}),r.jsx("span",{className:"mt-2 text-sm",children:"Clique ou arraste as imagens dos produtos"})]}),_.length>0&&r.jsx("div",{className:"mt-4 grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3",children:_.map(e=>r.jsxs("button",{onClick:()=>{return t=e.id,void de(e=>{const a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a});var t},className:"relative rounded-card overflow-hidden border-2 focus:outline-none focus-visible:ring-snapfy-focus "+(le.has(e.id)?"border-snapfy-primary":"border-transparent"),children:[r.jsx("img",{src:e.previewUrl,alt:e.file.name,className:"w-full h-full object-cover aspect-square"}),le.has(e.id)&&r.jsx("div",{className:"absolute inset-0 bg-snapfy-primary/50"})]},e.id))})]}),r.jsxs("div",{className:"bg-snapfy-surface rounded-xl p-6 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[r.jsx("span",{className:"bg-snapfy-primary/10 text-snapfy-primary w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold flex-shrink-0",children:"2"}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold text-snapfy-text-primary",children:"Defina o Ambiente"}),r.jsx("p",{className:"text-sm text-snapfy-text-secondary",children:"Descreva ou envie um cômodo"})]})]}),r.jsxs("div",{role:"tablist","aria-label":"Tipo de ambiente",className:"flex items-center gap-1 p-1 bg-snapfy-inner rounded-xl mb-3 w-full",children:[r.jsx("button",{type:"button",role:"tab","aria-selected":"image"!==ce,onClick:()=>pe("prompt"),className:"flex-1 px-3 py-2 rounded-lg text-sm font-bold transition-colors "+("image"!==ce?"bg-snapfy-primary text-white":"text-snapfy-text-secondary hover:text-snapfy-text-primary"),children:"Descrever"}),r.jsx("button",{type:"button",role:"tab","aria-selected":"image"===ce,onClick:()=>pe("image"),className:"flex-1 px-3 py-2 rounded-lg text-sm font-bold transition-colors "+("image"===ce?"bg-snapfy-primary text-white":"text-snapfy-text-secondary hover:text-snapfy-text-primary"),children:"Foto"})]}),"image"!==ce&&r.jsx(l,{value:me,onChange:e=>fe(e.target.value),placeholder:"Ex: Sala de estar moderna e iluminada, com piso de madeira, grandes janelas e um sofá cinza."}),"image"===ce&&r.jsxs("div",{onClick:()=>Le(0,"environment"),onDrop:e=>{var t;e.preventDefault(),e.stopPropagation(),te(!1);const a=null==(t=e.dataTransfer.files)?void 0:t[0];a&&a.type.startsWith("image/")&&ge({file:a,previewUrl:URL.createObjectURL(a)}),e.dataTransfer&&e.dataTransfer.clearData()},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),te(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),te(!1)},className:"w-full h-48 rounded-card border-2 border-dashed flex flex-col items-center justify-center text-snapfy-text-secondary cursor-pointer transition-colors p-4 "+(ee?"bg-snapfy-inner border-snapfy-primary":"bg-snapfy-inner border-snapfy-border hover:bg-snapfy-inner hover:border-snapfy-border-strong"),children:[r.jsx("input",{type:"file",ref:W,onChange:e=>{var t;const a=null==(t=e.target.files)?void 0:t[0];a&&a.type.startsWith("image/")&&ge({file:a,previewUrl:URL.createObjectURL(a)})},className:"hidden",accept:"image/*"}),ue?r.jsxs("div",{className:"relative w-full h-full",children:[r.jsx("img",{src:ue.previewUrl,alt:"Preview do ambiente",className:"w-full h-full object-contain rounded-card"}),r.jsx("button",{onClick:e=>{e.stopPropagation(),ge(null)}
2,className:"absolute top-1 right-1 p-1 bg-snapfy-error rounded-full text-white hover:opacity-80 transition-opacity",children:r.jsx(d,{className:"w-3 h-3"})})]}):r.jsxs(r.Fragment,{children:[r.jsx(i,{}),r.jsx("span",{className:"mt-2 text-sm text-center",children:"Clique ou arraste a foto do ambiente"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-snapfy-text-secondary mb-1.5",children:"Proporção"}),r.jsx(c,{aspectRatio:ke,onAspectRatioChange:Ce,resolution:Se,onResolutionChange:e=>Ie(e),maxResolution:R,outputFormat:De,onOutputFormatChange:Pe})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-snapfy-text-secondary mb-1.5",children:"Tags (Opcional)"}),r.jsx(p,{selectedTags:ve,onChange:je,onTagsLoaded:Ne,placeholder:"Selecione tags para organizar suas gerações..."})]}),r.jsx(m,{variant:"cta",onClick:()=>{if(0===le.size)return void alert("Por favor, selecione pelo menos um produto.");let e;if("prompt"===ce){if(!me.trim())return void alert("Por favor, descreva o ambiente.");e={type:"prompt",value:me}}else if("image"===ce){if(!ue)return void alert("Por favor, envie uma imagem de ambiente.");e={type:"image",file:ue.file,previewUrl:ue.previewUrl}}else{if(!xe)return void alert("Por favor, selecione um brandbook.");e={type:"brandbook",brandbookId:xe,scenePrompt:he}}const t=_.filter(e=>le.has(e.id)),a={id:`comp-${Date.now()}`,productItems:t,environment:e,aspectRatio:ke,tagIds:ve};E(e=>[...e,a]),de(new Set),fe(""),ge(null),ye(null),be(""),je([])},disabled:Ee,className:"w-full",children:"Adicionar Composição à Fila"})]})]}),r.jsxs("div",{className:"bg-snapfy-surface rounded-xl p-6 space-y-4",children:[r.jsx("h2",{className:"text-2xl font-bold text-snapfy-text-primary",children:"Fila de Tarefas"}),0===U.length&&r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-snapfy-text-secondary text-center py-8",children:"Nenhuma composição na fila."}),r.jsx(m,{variant:"cta",onClick:Ue,disabled:A||0===U.length,isLoading:A,className:"w-full",children:A?"Gerando...":`Gerar ${U.length} Composição(ões) (${$e} créditos)`})]}),U.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:U.map(e=>r.jsxs("div",{className:"bg-snapfy-inner p-3 rounded-xl flex gap-4 items-start",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex -space-x-4 items-center mb-2",children:[e.productItems.map(e=>r.jsx("img",{src:e.previewUrl,className:"w-10 h-10 rounded-full border-2 border-snapfy-border object-cover",alt:e.file.name},e.id)),"image"===e.environment.type&&r.jsx("img",{src:e.environment.previewUrl,className:"w-10 h-10 rounded-xl border-2 border-snapfy-border object-cover",alt:"Ambiente"}),"brandbook"===e.environment.type&&r.jsx("div",{className:"w-10 h-10 rounded-card border-2 border-snapfy-border bg-[#1a0a3e]/50 flex items-center justify-center text-snapfy-accent-soft font-bold",children:"B"})]}),r.jsxs("div",{className:"text-xs text-snapfy-text-secondary space-y-1",children:[r.jsxs("p",{children:[e.productItems.length," produto",e.productItems.length>1?"s":""," em","prompt"===e.environment.type?" ambiente descrito.":"image"===e.environment.type?" ambiente de foto.":" ambiente com estilo de brandbook."]}),r.jsxs("p",{children:["Proporção: ",e.aspectRatio]}),r.jsx("p",{className:"font-semibold text-snapfy-accent-soft",children:"Custo: 1 crédito"}),e.tagIds&&e.tagIds.length>0&&r.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:e.tagIds.map(e=>{const t=we.find(t=>t.id===e);return t?r.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium text-white",style:{backgroundColor:t.color},children:t.name},e):null})})]})]}),r.jsx("button",{onClick:()=>{return t=e.id,void E(e=>e.filter(e=>e.id!==t));var t},className:"text-snapfy-text-secondary hover:text-red-500 transition-colors",children:r.jsx(d,{})})]},e.id))}),r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pt-4 border-t border-snapfy-border",children:[r.jsxs("p",{className:"text-lg font-semibold text-snapfy-text-primary",children:["Custo Total: ",$e," créditos"]}),r.jsx(m,{variant:"cta",onClick:Ue,disabled:A||0===U.length,isLoading:A,className:"w-full sm:w-auto",children:A?"Gerando...":`Gerar ${U.length} Composição(ões) (${$e} créditos)`})]})]})]}),(A||T.size>0||G)&&r.jsxs("div",{className:"mt-12",children:[r.jsxs("div",{className:"flex justify-center items-center gap-4 mb-6",children:[r.jsx("h2",{className:"text-3xl font-bold text-snapfy-text-primary",children:"Resultados"}),T.size>0&&!A&&r.jsx(m,{variant:"solid",onClick:async()=>
2{if(0!==T.size&&!F){M(!0),B(null);try{const{default:e}=await N(async()=>{const{default:e}=await import("./jszip.min.DXR31XkH.js").then(e=>e.j);return{default:e}},__vite__mapDeps([0,1])),t=new e;T.forEach((e,a)=>{if("success"!==e.status||"image"!==e.image.type)return;const s=U.find(e=>e.id===a),r=U.findIndex(e=>e.id===a);if(!s)return;const o=`Composicao-${r+1}_${s.productItems.map(e=>e.file.name.replace(/\.[^/.]+$/,"")).join("-")}`,n=e.image.src.match(/^data:image\/(\w+);base64,(.*)$/);if(!n)return;const i=n[1]||"png",l=n[2],d=`${o}.${i}`;t.file(d,l,{base64:!0})});const a=await t.generateAsync({type:"blob"});if(a.size>0){const e=document.createElement("a");e.href=URL.createObjectURL(a),e.download="snapfy_composicoes.zip",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(e.href)}}catch(e){console.error("Failed to create zip file:",e),B("Não foi possível criar o arquivo ZIP. Tente novamente.")}finally{M(!1)}}},disabled:F,isLoading:F,children:F?"Criando ZIP...":"Baixar Todas"})]}),A&&!T.size&&r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-snapfy-accent-soft"}),r.jsx("p",{className:"mt-4 text-lg",children:"Gerando suas composições, isso pode levar alguns minutos..."})]}),G&&r.jsx("div",{className:"my-4 text-center text-snapfy-error bg-snapfy-error/10 border border-snapfy-error/30 p-3 rounded-card",children:G}),r.jsx("div",{className:"space-y-8",children:U.map(e=>{const t=T.get(e.id);return r.jsxs(f,{children:[r.jsxs("h3",{className:"font-semibold mb-3",children:["Composição com ",e.productItems.length," produto(s)"]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:A&&!t?r.jsx("div",{className:"bg-snapfy-inner rounded-card aspect-[4/3] relative flex items-center justify-center",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-snapfy-accent-soft"})}):t?"failed"===t.status?r.jsxs("div",{className:"bg-snapfy-inner rounded-card aspect-[4/3] relative group flex flex-col items-center justify-center p-2 text-center text-snapfy-text-primary",children:[r.jsx(u,{className:"w-8 h-8 text-snapfy-error mb-2"}),r.jsx("p",{className:"text-xs font-semibold text-snapfy-error mb-3",children:"Falha ao gerar"})]}):r.jsxs(f,{interactive:!0,className:"overflow-hidden aspect-[4/3] relative group p-0",children:[r.jsx("img",{src:t.image.src,alt:`Composição ${e.id}`,className:"w-full h-full object-cover cursor-pointer",onClick:()=>{const e=[];U.forEach(t=>{const a=T.get(t.id);"success"===(null==a?void 0:a.status)&&e.push({id:a.image.id,src:a.image.src,prompt:a.image.prompt})});const a=e.findIndex(e=>e.id===t.image.id);oe(e),ie(a),se(!0)}}),t.image.tags&&t.image.tags.length>0&&r.jsx("div",{className:"absolute bottom-2 left-2 flex flex-wrap gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-20",children:t.image.tags.map(e=>r.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium text-white shadow-sm",style:{backgroundColor:e.color},children:e.name},e.id))}),r.jsxs("div",{className:"absolute top-2 right-2 flex flex-col gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[r.jsx("button",{onClick:()=>_e(t.image.id,`snapfy-decor-${e.id}.${x(t.image.src)}`),className:"p-1.5 bg-black/50 rounded-full text-white hover:bg-snapfy-primary focus:opacity-100 transition-colors",title:"Baixar Imagem",children:r.jsx(g,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>D(t.image),className:"p-1.5 bg-black/50 rounded-full text-white hover:bg-snapfy-primary focus:opacity-100 transition-colors",title:"Edição Rápida",children:r.jsx(y,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>P(t.image),className:"p-1.5 bg-black/50 rounded-full text-white hover:bg-snapfy-primary focus:opacity-100 transition-colors",title:"Criar Vídeo",children:r.jsx(h,{className:"w-4 h-4"})})]})]},t.image.id):null})]},e.id)})})]}),r.jsx(b,{isOpen:ae,images:re,currentIndex:ne,onClose:()=>se(!1),onNavigate:ie,onDownload:e=>{var t;return _e(e,`snapfy-decor-${e}.${x(null==(t=re.find(t=>
2t.id===e))?void 0:t.src)}`)}}),r.jsx(v,{isOpen:J,onClose:()=>Z(!1),onChooseFile:()=>{var e,t;"products"===Q?null==(e=q.current)||e.click():null==(t=W.current)||t.click()},onChooseGallery:()=>{Z(!1),Y(!0)}}),r.jsx(j,{isOpen:K,onClose:()=>Y(!1),onSelectImage:async(e,t)=>{try{const a=await w(t,e);if("products"===Q){const e=new DataTransfer;e.items.add(a),Re(e.files)}else ge({file:a,previewUrl:URL.createObjectURL(a)})}catch(a){console.error("Failed to load gallery image:",a)}Y(!1)}})]})};export{S as default};
3//# sourceMappingURL=HomeDecor.BLqtcqKD.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.